]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
e28cfb523072c02f0ae92f168bd1f0a318eac563
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.752 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 # ABI 5 defaults:
1724 cf_dft_ccharw_max=5
1725 cf_dft_chtype=auto
1726 cf_dft_ext_colors=no
1727 cf_dft_ext_const=no
1728 cf_dft_ext_mouse=no
1729 cf_dft_ext_putwin=no
1730 cf_dft_ext_spfuncs=no
1731 cf_dft_filter_syms=no
1732 cf_dft_interop=no
1733 cf_dft_mmask_t=auto
1734 cf_dft_opaque_curses=no
1735 cf_dft_ordinate_type=short
1736 cf_dft_signed_char=no
1737 cf_dft_tparm_arg=long
1738 cf_dft_with_lp64=no
1739
1740 # ABI 6 defaults:
1741 case x$cf_cv_abi_version in
1742 (x[6789])
1743         cf_dft_chtype=uint32_t
1744         cf_dft_ext_colors=yes
1745         cf_dft_ext_const=yes
1746         cf_dft_ext_mouse=yes
1747         cf_dft_ext_putwin=yes
1748         cf_dft_ext_spfuncs=yes
1749         cf_dft_filter_syms=yes
1750         cf_dft_interop=yes
1751         cf_dft_mmask_t=uint32_t
1752         cf_dft_tparm_arg=intptr_t
1753         cf_dft_with_lp64=yes
1754         ;;
1755 esac
1756
1757 # ABI 7 defaults:
1758 case x$cf_cv_abi_version in
1759 (x[789])
1760         cf_dft_ccharw_max=6
1761         cf_dft_mmask_t=uint64_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_ordinate_type=int
1764         cf_dft_signed_char=yes
1765         # also: remove the wgetch-events feature in ABI 7
1766         ;;
1767 esac
1768
1769 ###     Checks for programs.
1770
1771 # Check whether --with-ada or --without-ada was given.
1772 if test "${with_ada+set}" = set; then
1773   withval="$with_ada"
1774   cf_with_ada=$withval
1775 else
1776   cf_with_ada=yes
1777 fi;
1778
1779 if test "x$cf_with_ada" = xyes
1780 then
1781         cf_prog_cc="gnatgcc gcc cc"
1782 else
1783         cf_prog_cc="gcc cc"
1784 fi
1785
1786 ac_ext=c
1787 ac_cpp='$CPP $CPPFLAGS'
1788 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1789 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1791 ac_main_return="return"
1792 if test -n "$ac_tool_prefix"; then
1793   for ac_prog in $cf_prog_cc
1794   do
1795     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1796 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1797 echo "$as_me:1797: checking for $ac_word" >&5
1798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1799 if test "${ac_cv_prog_CC+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   ac_save_IFS=$IFS; IFS=$ac_path_separator
1806 ac_dummy="$PATH"
1807 for ac_dir in $ac_dummy; do
1808   IFS=$ac_save_IFS
1809   test -z "$ac_dir" && ac_dir=.
1810   $as_executable_p "$ac_dir/$ac_word" || continue
1811 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1812 echo "$as_me:1812: found $ac_dir/$ac_word" >&5
1813 break
1814 done
1815
1816 fi
1817 fi
1818 CC=$ac_cv_prog_CC
1819 if test -n "$CC"; then
1820   echo "$as_me:1820: result: $CC" >&5
1821 echo "${ECHO_T}$CC" >&6
1822 else
1823   echo "$as_me:1823: result: no" >&5
1824 echo "${ECHO_T}no" >&6
1825 fi
1826
1827     test -n "$CC" && break
1828   done
1829 fi
1830 if test -z "$CC"; then
1831   ac_ct_CC=$CC
1832   for ac_prog in $cf_prog_cc
1833 do
1834   # Extract the first word of "$ac_prog", so it can be a program name with args.
1835 set dummy $ac_prog; ac_word=$2
1836 echo "$as_me:1836: checking for $ac_word" >&5
1837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1839   echo $ECHO_N "(cached) $ECHO_C" >&6
1840 else
1841   if test -n "$ac_ct_CC"; then
1842   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1843 else
1844   ac_save_IFS=$IFS; IFS=$ac_path_separator
1845 ac_dummy="$PATH"
1846 for ac_dir in $ac_dummy; do
1847   IFS=$ac_save_IFS
1848   test -z "$ac_dir" && ac_dir=.
1849   $as_executable_p "$ac_dir/$ac_word" || continue
1850 ac_cv_prog_ac_ct_CC="$ac_prog"
1851 echo "$as_me:1851: found $ac_dir/$ac_word" >&5
1852 break
1853 done
1854
1855 fi
1856 fi
1857 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1858 if test -n "$ac_ct_CC"; then
1859   echo "$as_me:1859: result: $ac_ct_CC" >&5
1860 echo "${ECHO_T}$ac_ct_CC" >&6
1861 else
1862   echo "$as_me:1862: result: no" >&5
1863 echo "${ECHO_T}no" >&6
1864 fi
1865
1866   test -n "$ac_ct_CC" && break
1867 done
1868
1869   CC=$ac_ct_CC
1870 fi
1871
1872 test -z "$CC" && { { echo "$as_me:1872: error: no acceptable cc found in \$PATH" >&5
1873 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1874    { (exit 1); exit 1; }; }
1875
1876 # Provide some information about the compiler.
1877 echo "$as_me:1877:" \
1878      "checking for C compiler version" >&5
1879 ac_compiler=`set X $ac_compile; echo "$2"`
1880 { (eval echo "$as_me:1880: \"$ac_compiler --version </dev/null >&5\"") >&5
1881   (eval $ac_compiler --version </dev/null >&5) 2>&5
1882   ac_status=$?
1883   echo "$as_me:1883: \$? = $ac_status" >&5
1884   (exit "$ac_status"); }
1885 { (eval echo "$as_me:1885: \"$ac_compiler -v </dev/null >&5\"") >&5
1886   (eval $ac_compiler -v </dev/null >&5) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit "$ac_status"); }
1890 { (eval echo "$as_me:1890: \"$ac_compiler -V </dev/null >&5\"") >&5
1891   (eval $ac_compiler -V </dev/null >&5) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit "$ac_status"); }
1895
1896 cat >"conftest.$ac_ext" <<_ACEOF
1897 #line 1897 "configure"
1898 #include "confdefs.h"
1899
1900 int
1901 main (void)
1902 {
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 ac_clean_files_save=$ac_clean_files
1909 ac_clean_files="$ac_clean_files a.out a.exe"
1910 # Try to create an executable without -o first, disregard a.out.
1911 # It will help us diagnose broken compilers, and finding out an intuition
1912 # of exeext.
1913 echo "$as_me:1913: checking for C compiler default output" >&5
1914 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1915 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1916 if { (eval echo "$as_me:1916: \"$ac_link_default\"") >&5
1917   (eval $ac_link_default) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }; then
1921   # Find the output, starting from the most likely.  This scheme is
1922 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1923 # resort.
1924 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1925                 ls a.out conftest 2>/dev/null;
1926                 ls a.* conftest.* 2>/dev/null`; do
1927   case $ac_file in
1928     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1929     a.out ) # We found the default executable, but exeext='' is most
1930             # certainly right.
1931             break;;
1932     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1933           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1934           export ac_cv_exeext
1935           break;;
1936     * ) break;;
1937   esac
1938 done
1939 else
1940   echo "$as_me: failed program was:" >&5
1941 cat "conftest.$ac_ext" >&5
1942 { { echo "$as_me:1942: error: C compiler cannot create executables" >&5
1943 echo "$as_me: error: C compiler cannot create executables" >&2;}
1944    { (exit 77); exit 77; }; }
1945 fi
1946
1947 ac_exeext=$ac_cv_exeext
1948 echo "$as_me:1948: result: $ac_file" >&5
1949 echo "${ECHO_T}$ac_file" >&6
1950
1951 # Check the compiler produces executables we can run.  If not, either
1952 # the compiler is broken, or we cross compile.
1953 echo "$as_me:1953: checking whether the C compiler works" >&5
1954 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1955 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1956 # If not cross compiling, check that we can run a simple program.
1957 if test "$cross_compiling" != yes; then
1958   if { ac_try='./$ac_file'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit "$ac_status"); }; }; then
1964     cross_compiling=no
1965   else
1966     if test "$cross_compiling" = maybe; then
1967         cross_compiling=yes
1968     else
1969         { { echo "$as_me:1969: error: cannot run C compiled programs.
1970 If you meant to cross compile, use \`--host'." >&5
1971 echo "$as_me: error: cannot run C compiled programs.
1972 If you meant to cross compile, use \`--host'." >&2;}
1973    { (exit 1); exit 1; }; }
1974     fi
1975   fi
1976 fi
1977 echo "$as_me:1977: result: yes" >&5
1978 echo "${ECHO_T}yes" >&6
1979
1980 rm -f a.out a.exe "conftest$ac_cv_exeext"
1981 ac_clean_files=$ac_clean_files_save
1982 # Check the compiler produces executables we can run.  If not, either
1983 # the compiler is broken, or we cross compile.
1984 echo "$as_me:1984: checking whether we are cross compiling" >&5
1985 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1986 echo "$as_me:1986: result: $cross_compiling" >&5
1987 echo "${ECHO_T}$cross_compiling" >&6
1988
1989 echo "$as_me:1989: checking for executable suffix" >&5
1990 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1991 if { (eval echo "$as_me:1991: \"$ac_link\"") >&5
1992   (eval $ac_link) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit "$ac_status"); }; then
1996   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1997 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1998 # work properly (i.e., refer to `conftest.exe'), while it won't with
1999 # `rm'.
2000 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2001   case $ac_file in
2002     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2003     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2004           export ac_cv_exeext
2005           break;;
2006     * ) break;;
2007   esac
2008 done
2009 else
2010   { { echo "$as_me:2010: error: cannot compute EXEEXT: cannot compile and link" >&5
2011 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2012    { (exit 1); exit 1; }; }
2013 fi
2014
2015 rm -f "conftest$ac_cv_exeext"
2016 echo "$as_me:2016: result: $ac_cv_exeext" >&5
2017 echo "${ECHO_T}$ac_cv_exeext" >&6
2018
2019 rm -f "conftest.$ac_ext"
2020 EXEEXT=$ac_cv_exeext
2021 ac_exeext=$EXEEXT
2022 echo "$as_me:2022: checking for object suffix" >&5
2023 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2024 if test "${ac_cv_objext+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   cat >"conftest.$ac_ext" <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030
2031 int
2032 main (void)
2033 {
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.o conftest.obj
2040 if { (eval echo "$as_me:2040: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit "$ac_status"); }; then
2045   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2046   case $ac_file in
2047     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2048     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2049        break;;
2050   esac
2051 done
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat "conftest.$ac_ext" >&5
2055 { { echo "$as_me:2055: error: cannot compute OBJEXT: cannot compile" >&5
2056 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2057    { (exit 1); exit 1; }; }
2058 fi
2059
2060 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2061 fi
2062 echo "$as_me:2062: result: $ac_cv_objext" >&5
2063 echo "${ECHO_T}$ac_cv_objext" >&6
2064 OBJEXT=$ac_cv_objext
2065 ac_objext=$OBJEXT
2066 echo "$as_me:2066: checking whether we are using the GNU C compiler" >&5
2067 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2068 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2069   echo $ECHO_N "(cached) $ECHO_C" >&6
2070 else
2071   cat >"conftest.$ac_ext" <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2074
2075 int
2076 main (void)
2077 {
2078 #ifndef __GNUC__
2079        choke me
2080 #endif
2081
2082   ;
2083   return 0;
2084 }
2085 _ACEOF
2086 rm -f "conftest.$ac_objext"
2087 if { (eval echo "$as_me:2087: \"$ac_compile\"") >&5
2088   (eval $ac_compile) 2>&5
2089   ac_status=$?
2090   echo "$as_me:2090: \$? = $ac_status" >&5
2091   (exit "$ac_status"); } &&
2092          { ac_try='test -s "conftest.$ac_objext"'
2093   { (eval echo "$as_me:2093: \"$ac_try\"") >&5
2094   (eval $ac_try) 2>&5
2095   ac_status=$?
2096   echo "$as_me:2096: \$? = $ac_status" >&5
2097   (exit "$ac_status"); }; }; then
2098   ac_compiler_gnu=yes
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat "conftest.$ac_ext" >&5
2102 ac_compiler_gnu=no
2103 fi
2104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2105 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2106
2107 fi
2108 echo "$as_me:2108: result: $ac_cv_c_compiler_gnu" >&5
2109 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2110 GCC=`test $ac_compiler_gnu = yes && echo yes`
2111 ac_test_CFLAGS=${CFLAGS+set}
2112 ac_save_CFLAGS=$CFLAGS
2113 CFLAGS="-g"
2114 echo "$as_me:2114: checking whether $CC accepts -g" >&5
2115 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2116 if test "${ac_cv_prog_cc_g+set}" = set; then
2117   echo $ECHO_N "(cached) $ECHO_C" >&6
2118 else
2119   cat >"conftest.$ac_ext" <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122
2123 int
2124 main (void)
2125 {
2126
2127   ;
2128   return 0;
2129 }
2130 _ACEOF
2131 rm -f "conftest.$ac_objext"
2132 if { (eval echo "$as_me:2132: \"$ac_compile\"") >&5
2133   (eval $ac_compile) 2>&5
2134   ac_status=$?
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit "$ac_status"); } &&
2137          { ac_try='test -s "conftest.$ac_objext"'
2138   { (eval echo "$as_me:2138: \"$ac_try\"") >&5
2139   (eval $ac_try) 2>&5
2140   ac_status=$?
2141   echo "$as_me:2141: \$? = $ac_status" >&5
2142   (exit "$ac_status"); }; }; then
2143   ac_cv_prog_cc_g=yes
2144 else
2145   echo "$as_me: failed program was:" >&5
2146 cat "conftest.$ac_ext" >&5
2147 ac_cv_prog_cc_g=no
2148 fi
2149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2150 fi
2151 echo "$as_me:2151: result: $ac_cv_prog_cc_g" >&5
2152 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2153 if test "$ac_test_CFLAGS" = set; then
2154   CFLAGS=$ac_save_CFLAGS
2155 elif test $ac_cv_prog_cc_g = yes; then
2156   if test "$GCC" = yes; then
2157     CFLAGS="-g -O2"
2158   else
2159     CFLAGS="-g"
2160   fi
2161 else
2162   if test "$GCC" = yes; then
2163     CFLAGS="-O2"
2164   else
2165     CFLAGS=
2166   fi
2167 fi
2168 # Some people use a C++ compiler to compile C.  Since we use `exit',
2169 # in C++ we need to declare it.  In case someone uses the same compiler
2170 # for both compiling C and C++ we need to have the C++ compiler decide
2171 # the declaration of exit, since it's the most demanding environment.
2172 cat >"conftest.$ac_ext" <<_ACEOF
2173 #ifndef __cplusplus
2174   choke me
2175 #endif
2176 _ACEOF
2177 rm -f "conftest.$ac_objext"
2178 if { (eval echo "$as_me:2178: \"$ac_compile\"") >&5
2179   (eval $ac_compile) 2>&5
2180   ac_status=$?
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit "$ac_status"); } &&
2183          { ac_try='test -s "conftest.$ac_objext"'
2184   { (eval echo "$as_me:2184: \"$ac_try\"") >&5
2185   (eval $ac_try) 2>&5
2186   ac_status=$?
2187   echo "$as_me:2187: \$? = $ac_status" >&5
2188   (exit "$ac_status"); }; }; then
2189   for ac_declaration in \
2190    ''\
2191    '#include <stdlib.h>' \
2192    'extern "C" void std::exit (int) throw (); using std::exit;' \
2193    'extern "C" void std::exit (int); using std::exit;' \
2194    'extern "C" void exit (int) throw ();' \
2195    'extern "C" void exit (int);' \
2196    'void exit (int);'
2197 do
2198   cat >"conftest.$ac_ext" <<_ACEOF
2199 #line 2199 "configure"
2200 #include "confdefs.h"
2201 #include <stdlib.h>
2202 $ac_declaration
2203 int
2204 main (void)
2205 {
2206 exit (42);
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 rm -f "conftest.$ac_objext"
2212 if { (eval echo "$as_me:2212: \"$ac_compile\"") >&5
2213   (eval $ac_compile) 2>&5
2214   ac_status=$?
2215   echo "$as_me:2215: \$? = $ac_status" >&5
2216   (exit "$ac_status"); } &&
2217          { ac_try='test -s "conftest.$ac_objext"'
2218   { (eval echo "$as_me:2218: \"$ac_try\"") >&5
2219   (eval $ac_try) 2>&5
2220   ac_status=$?
2221   echo "$as_me:2221: \$? = $ac_status" >&5
2222   (exit "$ac_status"); }; }; then
2223   :
2224 else
2225   echo "$as_me: failed program was:" >&5
2226 cat "conftest.$ac_ext" >&5
2227 continue
2228 fi
2229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2230   cat >"conftest.$ac_ext" <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 $ac_declaration
2234 int
2235 main (void)
2236 {
2237 exit (42);
2238   ;
2239   return 0;
2240 }
2241 _ACEOF
2242 rm -f "conftest.$ac_objext"
2243 if { (eval echo "$as_me:2243: \"$ac_compile\"") >&5
2244   (eval $ac_compile) 2>&5
2245   ac_status=$?
2246   echo "$as_me:2246: \$? = $ac_status" >&5
2247   (exit "$ac_status"); } &&
2248          { ac_try='test -s "conftest.$ac_objext"'
2249   { (eval echo "$as_me:2249: \"$ac_try\"") >&5
2250   (eval $ac_try) 2>&5
2251   ac_status=$?
2252   echo "$as_me:2252: \$? = $ac_status" >&5
2253   (exit "$ac_status"); }; }; then
2254   break
2255 else
2256   echo "$as_me: failed program was:" >&5
2257 cat "conftest.$ac_ext" >&5
2258 fi
2259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2260 done
2261 rm -rf conftest*
2262 if test -n "$ac_declaration"; then
2263   echo '#ifdef __cplusplus' >>confdefs.h
2264   echo "$ac_declaration"    >>confdefs.h
2265   echo '#endif'             >>confdefs.h
2266 fi
2267
2268 else
2269   echo "$as_me: failed program was:" >&5
2270 cat "conftest.$ac_ext" >&5
2271 fi
2272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2273 ac_ext=c
2274 ac_cpp='$CPP $CPPFLAGS'
2275 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2276 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2278 ac_main_return="return"
2279
2280 GCC_VERSION=none
2281 if test "$GCC" = yes ; then
2282         echo "$as_me:2282: checking version of $CC" >&5
2283 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2284         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.].*//'`"
2285         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2286         echo "$as_me:2286: result: $GCC_VERSION" >&5
2287 echo "${ECHO_T}$GCC_VERSION" >&6
2288 fi
2289
2290 INTEL_COMPILER=no
2291
2292 if test "$GCC" = yes ; then
2293         case "$host_os" in
2294         (linux*|gnu*)
2295                 echo "$as_me:2295: checking if this is really Intel C compiler" >&5
2296 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2297                 cf_save_CFLAGS="$CFLAGS"
2298                 CFLAGS="$CFLAGS -no-gcc"
2299                 cat >"conftest.$ac_ext" <<_ACEOF
2300 #line 2300 "configure"
2301 #include "confdefs.h"
2302
2303 int
2304 main (void)
2305 {
2306
2307 #ifdef __INTEL_COMPILER
2308 #else
2309 make an error
2310 #endif
2311
2312   ;
2313   return 0;
2314 }
2315 _ACEOF
2316 rm -f "conftest.$ac_objext"
2317 if { (eval echo "$as_me:2317: \"$ac_compile\"") >&5
2318   (eval $ac_compile) 2>&5
2319   ac_status=$?
2320   echo "$as_me:2320: \$? = $ac_status" >&5
2321   (exit "$ac_status"); } &&
2322          { ac_try='test -s "conftest.$ac_objext"'
2323   { (eval echo "$as_me:2323: \"$ac_try\"") >&5
2324   (eval $ac_try) 2>&5
2325   ac_status=$?
2326   echo "$as_me:2326: \$? = $ac_status" >&5
2327   (exit "$ac_status"); }; }; then
2328   INTEL_COMPILER=yes
2329 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2330
2331 else
2332   echo "$as_me: failed program was:" >&5
2333 cat "conftest.$ac_ext" >&5
2334 fi
2335 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2336                 CFLAGS="$cf_save_CFLAGS"
2337                 echo "$as_me:2337: result: $INTEL_COMPILER" >&5
2338 echo "${ECHO_T}$INTEL_COMPILER" >&6
2339                 ;;
2340         esac
2341 fi
2342
2343 CLANG_COMPILER=no
2344
2345 if test "$GCC" = yes ; then
2346         echo "$as_me:2346: checking if this is really Clang C compiler" >&5
2347 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2348         cf_save_CFLAGS="$CFLAGS"
2349         cat >"conftest.$ac_ext" <<_ACEOF
2350 #line 2350 "configure"
2351 #include "confdefs.h"
2352
2353 int
2354 main (void)
2355 {
2356
2357 #ifdef __clang__
2358 #else
2359 make an error
2360 #endif
2361
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 rm -f "conftest.$ac_objext"
2367 if { (eval echo "$as_me:2367: \"$ac_compile\"") >&5
2368   (eval $ac_compile) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit "$ac_status"); } &&
2372          { ac_try='test -s "conftest.$ac_objext"'
2373   { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit "$ac_status"); }; }; then
2378   CLANG_COMPILER=yes
2379
2380 else
2381   echo "$as_me: failed program was:" >&5
2382 cat "conftest.$ac_ext" >&5
2383 fi
2384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2385         CFLAGS="$cf_save_CFLAGS"
2386         echo "$as_me:2386: result: $CLANG_COMPILER" >&5
2387 echo "${ECHO_T}$CLANG_COMPILER" >&6
2388 fi
2389
2390 CLANG_VERSION=none
2391
2392 if test "x$CLANG_COMPILER" = "xyes" ; then
2393         case "$CC" in
2394         (c[1-9][0-9]|*/c[1-9][0-9])
2395                 { echo "$as_me:2395: WARNING: replacing broken compiler alias $CC" >&5
2396 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2397                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2398                 CC=clang
2399                 ;;
2400         esac
2401
2402         echo "$as_me:2402: checking version of $CC" >&5
2403 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2404         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.].*//'`"
2405         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2406         echo "$as_me:2406: result: $CLANG_VERSION" >&5
2407 echo "${ECHO_T}$CLANG_VERSION" >&6
2408
2409         for cf_clang_opt in \
2410                 -Qunused-arguments \
2411                 -Wno-error=implicit-function-declaration
2412         do
2413                 echo "$as_me:2413: checking if option $cf_clang_opt works" >&5
2414 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2415                 cf_save_CFLAGS="$CFLAGS"
2416                 CFLAGS="$CFLAGS $cf_clang_opt"
2417                 cat >"conftest.$ac_ext" <<_ACEOF
2418 #line 2418 "configure"
2419 #include "confdefs.h"
2420
2421                         #include <stdio.h>
2422 int
2423 main (void)
2424 {
2425
2426                         printf("hello!\\n");
2427   ;
2428   return 0;
2429 }
2430 _ACEOF
2431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2432 if { (eval echo "$as_me:2432: \"$ac_link\"") >&5
2433   (eval $ac_link) 2>&5
2434   ac_status=$?
2435   echo "$as_me:2435: \$? = $ac_status" >&5
2436   (exit "$ac_status"); } &&
2437          { ac_try='test -s "conftest$ac_exeext"'
2438   { (eval echo "$as_me:2438: \"$ac_try\"") >&5
2439   (eval $ac_try) 2>&5
2440   ac_status=$?
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit "$ac_status"); }; }; then
2443
2444                         cf_clang_optok=yes
2445 else
2446   echo "$as_me: failed program was:" >&5
2447 cat "conftest.$ac_ext" >&5
2448
2449                         cf_clang_optok=no
2450 fi
2451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2452                 echo "$as_me:2452: result: $cf_clang_optok" >&5
2453 echo "${ECHO_T}$cf_clang_optok" >&6
2454                 CFLAGS="$cf_save_CFLAGS"
2455                 if test "$cf_clang_optok" = yes; then
2456                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2457
2458 echo "${as_me:-configure}:2458: testing adding option $cf_clang_opt ..." 1>&5
2459
2460         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2461         CFLAGS="${CFLAGS}$cf_clang_opt"
2462
2463                 fi
2464         done
2465 fi
2466
2467 echo "$as_me:2467: checking for $CC option to accept ANSI C" >&5
2468 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2469 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2470   echo $ECHO_N "(cached) $ECHO_C" >&6
2471 else
2472   ac_cv_prog_cc_stdc=no
2473 ac_save_CC=$CC
2474 cat >"conftest.$ac_ext" <<_ACEOF
2475 #line 2475 "configure"
2476 #include "confdefs.h"
2477 #include <stdarg.h>
2478 #include <stdio.h>
2479 #include <sys/types.h>
2480 #include <sys/stat.h>
2481 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2482 struct buf { int x; };
2483 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2484 static char *e (p, i)
2485      char **p;
2486      int i;
2487 {
2488   return p[i];
2489 }
2490 static char *f (char * (*g) (char **, int), char **p, ...)
2491 {
2492   char *s;
2493   va_list v;
2494   va_start (v,p);
2495   s = g (p, va_arg (v,int));
2496   va_end (v);
2497   return s;
2498 }
2499 int test (int i, double x);
2500 struct s1 {int (*f) (int a);};
2501 struct s2 {int (*f) (double a);};
2502 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2503 int argc;
2504 char **argv;
2505 int
2506 main (void)
2507 {
2508 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2509   ;
2510   return 0;
2511 }
2512 _ACEOF
2513 # Don't try gcc -ansi; that turns off useful extensions and
2514 # breaks some systems' header files.
2515 # AIX                   -qlanglvl=ansi
2516 # Ultrix and OSF/1      -std1
2517 # HP-UX 10.20 and later -Ae
2518 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2519 # SVR4                  -Xc -D__EXTENSIONS__
2520 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2521 do
2522   CC="$ac_save_CC $ac_arg"
2523   rm -f "conftest.$ac_objext"
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525   (eval $ac_compile) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit "$ac_status"); } &&
2529          { ac_try='test -s "conftest.$ac_objext"'
2530   { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531   (eval $ac_try) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit "$ac_status"); }; }; then
2535   ac_cv_prog_cc_stdc=$ac_arg
2536 break
2537 else
2538   echo "$as_me: failed program was:" >&5
2539 cat "conftest.$ac_ext" >&5
2540 fi
2541 rm -f "conftest.$ac_objext"
2542 done
2543 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2544 CC=$ac_save_CC
2545
2546 fi
2547
2548 case "x$ac_cv_prog_cc_stdc" in
2549   x|xno)
2550     echo "$as_me:2550: result: none needed" >&5
2551 echo "${ECHO_T}none needed" >&6 ;;
2552   *)
2553     echo "$as_me:2553: result: $ac_cv_prog_cc_stdc" >&5
2554 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2555     CC="$CC $ac_cv_prog_cc_stdc" ;;
2556 esac
2557
2558 # This should have been defined by AC_PROG_CC
2559 : "${CC:=cc}"
2560
2561 echo "$as_me:2561: checking \$CFLAGS variable" >&5
2562 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2563 case "x$CFLAGS" in
2564 (*-[IUD]*)
2565         echo "$as_me:2565: result: broken" >&5
2566 echo "${ECHO_T}broken" >&6
2567         { echo "$as_me:2567: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2568 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2569         cf_flags="$CFLAGS"
2570         CFLAGS=
2571         for cf_arg in $cf_flags
2572         do
2573
2574 cf_fix_cppflags=no
2575 cf_new_cflags=
2576 cf_new_cppflags=
2577 cf_new_extra_cppflags=
2578
2579 for cf_add_cflags in $cf_arg
2580 do
2581 case "$cf_fix_cppflags" in
2582 (no)
2583         case "$cf_add_cflags" in
2584         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2585                 case "$cf_add_cflags" in
2586                 (-D*)
2587                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2588
2589                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2590                                 && test -z "${cf_tst_cflags}" \
2591                                 && cf_fix_cppflags=yes
2592
2593                         if test "$cf_fix_cppflags" = yes ; then
2594
2595         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2596         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2597
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600
2601         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2602         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2603
2604                                 continue
2605                         fi
2606                         ;;
2607                 esac
2608                 case "$CPPFLAGS" in
2609                 (*$cf_add_cflags)
2610                         ;;
2611                 (*)
2612                         case "$cf_add_cflags" in
2613                         (-D*)
2614                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2615
2616 CPPFLAGS=`echo "$CPPFLAGS" | \
2617         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2618                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2619
2620                                 ;;
2621                         esac
2622
2623         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2624         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2625
2626                         ;;
2627                 esac
2628                 ;;
2629         (*)
2630
2631         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2632         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2633
2634                 ;;
2635         esac
2636         ;;
2637 (yes)
2638
2639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2641
2642         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2643
2644         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2645                 && test -z "${cf_tst_cflags}" \
2646                 && cf_fix_cppflags=no
2647         ;;
2648 esac
2649 done
2650
2651 if test -n "$cf_new_cflags" ; then
2652
2653         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2654         CFLAGS="${CFLAGS}$cf_new_cflags"
2655
2656 fi
2657
2658 if test -n "$cf_new_cppflags" ; then
2659
2660         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2661         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2662
2663 fi
2664
2665 if test -n "$cf_new_extra_cppflags" ; then
2666
2667         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2668         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2669
2670 fi
2671
2672         done
2673         ;;
2674 (*)
2675         echo "$as_me:2675: result: ok" >&5
2676 echo "${ECHO_T}ok" >&6
2677         ;;
2678 esac
2679
2680 echo "$as_me:2680: checking \$CC variable" >&5
2681 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2682 case "$CC" in
2683 (*[\ \  ]-*)
2684         echo "$as_me:2684: result: broken" >&5
2685 echo "${ECHO_T}broken" >&6
2686         { echo "$as_me:2686: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2687 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2688         # humor him...
2689         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2690         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2691         CC="$cf_prog"
2692         for cf_arg in $cf_flags
2693         do
2694                 case "x$cf_arg" in
2695                 (x-[IUDfgOW]*)
2696
2697 cf_fix_cppflags=no
2698 cf_new_cflags=
2699 cf_new_cppflags=
2700 cf_new_extra_cppflags=
2701
2702 for cf_add_cflags in $cf_arg
2703 do
2704 case "$cf_fix_cppflags" in
2705 (no)
2706         case "$cf_add_cflags" in
2707         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2708                 case "$cf_add_cflags" in
2709                 (-D*)
2710                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2711
2712                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2713                                 && test -z "${cf_tst_cflags}" \
2714                                 && cf_fix_cppflags=yes
2715
2716                         if test "$cf_fix_cppflags" = yes ; then
2717
2718         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2719         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2720
2721                                 continue
2722                         elif test "${cf_tst_cflags}" = "\"'" ; then
2723
2724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2726
2727                                 continue
2728                         fi
2729                         ;;
2730                 esac
2731                 case "$CPPFLAGS" in
2732                 (*$cf_add_cflags)
2733                         ;;
2734                 (*)
2735                         case "$cf_add_cflags" in
2736                         (-D*)
2737                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2738
2739 CPPFLAGS=`echo "$CPPFLAGS" | \
2740         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2741                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2742
2743                                 ;;
2744                         esac
2745
2746         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2747         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2748
2749                         ;;
2750                 esac
2751                 ;;
2752         (*)
2753
2754         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2755         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2756
2757                 ;;
2758         esac
2759         ;;
2760 (yes)
2761
2762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2764
2765         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2766
2767         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2768                 && test -z "${cf_tst_cflags}" \
2769                 && cf_fix_cppflags=no
2770         ;;
2771 esac
2772 done
2773
2774 if test -n "$cf_new_cflags" ; then
2775
2776         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2777         CFLAGS="${CFLAGS}$cf_new_cflags"
2778
2779 fi
2780
2781 if test -n "$cf_new_cppflags" ; then
2782
2783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2784         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2785
2786 fi
2787
2788 if test -n "$cf_new_extra_cppflags" ; then
2789
2790         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2791         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2792
2793 fi
2794
2795                         ;;
2796                 (*)
2797                         CC="$CC $cf_arg"
2798                         ;;
2799                 esac
2800         done
2801         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2802
2803 echo "${as_me:-configure}:2803: testing resulting CC: '$CC' ..." 1>&5
2804
2805         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2806
2807 echo "${as_me:-configure}:2807: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2808
2809         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2810
2811 echo "${as_me:-configure}:2811: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2812
2813         ;;
2814 (*)
2815         echo "$as_me:2815: result: ok" >&5
2816 echo "${ECHO_T}ok" >&6
2817         ;;
2818 esac
2819
2820 ac_ext=c
2821 ac_cpp='$CPP $CPPFLAGS'
2822 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2823 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2824 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2825 ac_main_return="return"
2826 echo "$as_me:2826: checking how to run the C preprocessor" >&5
2827 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2828 # On Suns, sometimes $CPP names a directory.
2829 if test -n "$CPP" && test -d "$CPP"; then
2830   CPP=
2831 fi
2832 if test -z "$CPP"; then
2833   if test "${ac_cv_prog_CPP+set}" = set; then
2834   echo $ECHO_N "(cached) $ECHO_C" >&6
2835 else
2836       # Double quotes because CPP needs to be expanded
2837     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2838     do
2839       ac_preproc_ok=false
2840 for ac_c_preproc_warn_flag in '' yes
2841 do
2842   # Use a header file that comes with gcc, so configuring glibc
2843   # with a fresh cross-compiler works.
2844   # On the NeXT, cc -E runs the code through the compiler's parser,
2845   # not just through cpp. "Syntax error" is here to catch this case.
2846   cat >"conftest.$ac_ext" <<_ACEOF
2847 #line 2847 "configure"
2848 #include "confdefs.h"
2849 #include <assert.h>
2850                      Syntax error
2851 _ACEOF
2852 if { (eval echo "$as_me:2852: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2853   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2854   ac_status=$?
2855   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2856   rm -f conftest.er1
2857   cat conftest.err >&5
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit "$ac_status"); } >/dev/null; then
2860   if test -s conftest.err; then
2861     ac_cpp_err=$ac_c_preproc_warn_flag
2862   else
2863     ac_cpp_err=
2864   fi
2865 else
2866   ac_cpp_err=yes
2867 fi
2868 if test -z "$ac_cpp_err"; then
2869   :
2870 else
2871   echo "$as_me: failed program was:" >&5
2872   cat "conftest.$ac_ext" >&5
2873   # Broken: fails on valid input.
2874 continue
2875 fi
2876 rm -f conftest.err "conftest.$ac_ext"
2877
2878   # OK, works on sane cases.  Now check whether non-existent headers
2879   # can be detected and how.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <ac_nonexistent.h>
2884 _ACEOF
2885 if { (eval echo "$as_me:2885: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2886   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2887   ac_status=$?
2888   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2889   rm -f conftest.er1
2890   cat conftest.err >&5
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit "$ac_status"); } >/dev/null; then
2893   if test -s conftest.err; then
2894     ac_cpp_err=$ac_c_preproc_warn_flag
2895   else
2896     ac_cpp_err=
2897   fi
2898 else
2899   ac_cpp_err=yes
2900 fi
2901 if test -z "$ac_cpp_err"; then
2902   # Broken: success on invalid input.
2903 continue
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Passes both tests.
2908 ac_preproc_ok=:
2909 break
2910 fi
2911 rm -f conftest.err "conftest.$ac_ext"
2912
2913 done
2914 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2915 rm -f conftest.err "conftest.$ac_ext"
2916 if $ac_preproc_ok; then
2917   break
2918 fi
2919
2920     done
2921     ac_cv_prog_CPP=$CPP
2922
2923 fi
2924   CPP=$ac_cv_prog_CPP
2925 else
2926   ac_cv_prog_CPP=$CPP
2927 fi
2928 echo "$as_me:2928: result: $CPP" >&5
2929 echo "${ECHO_T}$CPP" >&6
2930 ac_preproc_ok=false
2931 for ac_c_preproc_warn_flag in '' yes
2932 do
2933   # Use a header file that comes with gcc, so configuring glibc
2934   # with a fresh cross-compiler works.
2935   # On the NeXT, cc -E runs the code through the compiler's parser,
2936   # not just through cpp. "Syntax error" is here to catch this case.
2937   cat >"conftest.$ac_ext" <<_ACEOF
2938 #line 2938 "configure"
2939 #include "confdefs.h"
2940 #include <assert.h>
2941                      Syntax error
2942 _ACEOF
2943 if { (eval echo "$as_me:2943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2945   ac_status=$?
2946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:2949: \$? = $ac_status" >&5
2950   (exit "$ac_status"); } >/dev/null; then
2951   if test -s conftest.err; then
2952     ac_cpp_err=$ac_c_preproc_warn_flag
2953   else
2954     ac_cpp_err=
2955   fi
2956 else
2957   ac_cpp_err=yes
2958 fi
2959 if test -z "$ac_cpp_err"; then
2960   :
2961 else
2962   echo "$as_me: failed program was:" >&5
2963   cat "conftest.$ac_ext" >&5
2964   # Broken: fails on valid input.
2965 continue
2966 fi
2967 rm -f conftest.err "conftest.$ac_ext"
2968
2969   # OK, works on sane cases.  Now check whether non-existent headers
2970   # can be detected and how.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <ac_nonexistent.h>
2975 _ACEOF
2976 if { (eval echo "$as_me:2976: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2977   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2978   ac_status=$?
2979   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2980   rm -f conftest.er1
2981   cat conftest.err >&5
2982   echo "$as_me:2982: \$? = $ac_status" >&5
2983   (exit "$ac_status"); } >/dev/null; then
2984   if test -s conftest.err; then
2985     ac_cpp_err=$ac_c_preproc_warn_flag
2986   else
2987     ac_cpp_err=
2988   fi
2989 else
2990   ac_cpp_err=yes
2991 fi
2992 if test -z "$ac_cpp_err"; then
2993   # Broken: success on invalid input.
2994 continue
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Passes both tests.
2999 ac_preproc_ok=:
3000 break
3001 fi
3002 rm -f conftest.err "conftest.$ac_ext"
3003
3004 done
3005 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3006 rm -f conftest.err "conftest.$ac_ext"
3007 if $ac_preproc_ok; then
3008   :
3009 else
3010   { { echo "$as_me:3010: error: C preprocessor \"$CPP\" fails sanity check" >&5
3011 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3012    { (exit 1); exit 1; }; }
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3018 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return="return"
3021
3022 if test $ac_cv_c_compiler_gnu = yes; then
3023     echo "$as_me:3023: checking whether $CC needs -traditional" >&5
3024 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3025 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028     ac_pattern="Autoconf.*'x'"
3029   cat >"conftest.$ac_ext" <<_ACEOF
3030 #line 3030 "configure"
3031 #include "confdefs.h"
3032 #include <sgtty.h>
3033 int Autoconf = TIOCGETP;
3034 _ACEOF
3035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3036   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3037   ac_cv_prog_gcc_traditional=yes
3038 else
3039   ac_cv_prog_gcc_traditional=no
3040 fi
3041 rm -rf conftest*
3042
3043   if test $ac_cv_prog_gcc_traditional = no; then
3044     cat >"conftest.$ac_ext" <<_ACEOF
3045 #line 3045 "configure"
3046 #include "confdefs.h"
3047 #include <termio.h>
3048 int Autoconf = TCGETA;
3049 _ACEOF
3050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3051   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3052   ac_cv_prog_gcc_traditional=yes
3053 fi
3054 rm -rf conftest*
3055
3056   fi
3057 fi
3058 echo "$as_me:3058: result: $ac_cv_prog_gcc_traditional" >&5
3059 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3060   if test $ac_cv_prog_gcc_traditional = yes; then
3061     CC="$CC -traditional"
3062   fi
3063 fi
3064
3065 echo "$as_me:3065: checking whether $CC understands -c and -o together" >&5
3066 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3067 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3068   echo $ECHO_N "(cached) $ECHO_C" >&6
3069 else
3070
3071 cat > conftest.$ac_ext <<CF_EOF
3072 int main(void)
3073 {
3074         ${cf_cv_main_return:-return}(0);
3075 }
3076 CF_EOF
3077 # We do the test twice because some compilers refuse to overwrite an
3078 # existing .o file with -o, though they will create one.
3079 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3080 if { (eval echo "$as_me:3080: \"$ac_try\"") >&5
3081   (eval $ac_try) 2>&5
3082   ac_status=$?
3083   echo "$as_me:3083: \$? = $ac_status" >&5
3084   (exit "$ac_status"); } &&
3085   test -f conftest2.$ac_objext && { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit "$ac_status"); };
3090 then
3091   eval cf_cv_prog_CC_c_o=yes
3092 else
3093   eval cf_cv_prog_CC_c_o=no
3094 fi
3095 rm -rf ./conftest*
3096
3097 fi
3098 if test "$cf_cv_prog_CC_c_o" = yes; then
3099   echo "$as_me:3099: result: yes" >&5
3100 echo "${ECHO_T}yes" >&6
3101 else
3102   echo "$as_me:3102: result: no" >&5
3103 echo "${ECHO_T}no" >&6
3104 fi
3105
3106 if test "$cross_compiling" = yes ; then
3107         LDCONFIG=:
3108 else
3109         case "$cf_cv_system_name" in
3110         (dragonfly*|mirbsd*|freebsd*)
3111                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3112                 ;;
3113         (*) LDPATH=$PATH:/sbin:/usr/sbin
3114                 # Extract the first word of "ldconfig", so it can be a program name with args.
3115 set dummy ldconfig; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3119   echo $ECHO_N "(cached) $ECHO_C" >&6
3120 else
3121   case $LDCONFIG in
3122   [\\/]* | ?:[\\/]*)
3123   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3124   ;;
3125   *)
3126   ac_save_IFS=$IFS; IFS=$ac_path_separator
3127 ac_dummy="$LDPATH"
3128 for ac_dir in $ac_dummy; do
3129   IFS=$ac_save_IFS
3130   test -z "$ac_dir" && ac_dir=.
3131   if $as_executable_p "$ac_dir/$ac_word"; then
3132    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3133    echo "$as_me:3133: found $ac_dir/$ac_word" >&5
3134    break
3135 fi
3136 done
3137
3138   ;;
3139 esac
3140 fi
3141 LDCONFIG=$ac_cv_path_LDCONFIG
3142
3143 if test -n "$LDCONFIG"; then
3144   echo "$as_me:3144: result: $LDCONFIG" >&5
3145 echo "${ECHO_T}$LDCONFIG" >&6
3146 else
3147   echo "$as_me:3147: result: no" >&5
3148 echo "${ECHO_T}no" >&6
3149 fi
3150
3151                 ;;
3152         esac
3153 fi
3154
3155 echo "$as_me:3155: checking if you want to ensure bool is consistent with C++" >&5
3156 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3157
3158 # Check whether --with-cxx or --without-cxx was given.
3159 if test "${with_cxx+set}" = set; then
3160   withval="$with_cxx"
3161   cf_with_cxx=$withval
3162 else
3163   cf_with_cxx=yes
3164 fi;
3165 echo "$as_me:3165: result: $cf_with_cxx" >&5
3166 echo "${ECHO_T}$cf_with_cxx" >&6
3167 if test "X$cf_with_cxx" = Xno ; then
3168         CXX=""
3169         GXX=""
3170 else
3171         # with autoconf 2.13, we can change the error to a warning:
3172                 ac_ext=cc
3173 ac_cpp='$CXXCPP $CPPFLAGS'
3174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3175 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3177 ac_main_return="return"
3178 if test -n "$ac_tool_prefix"; then
3179   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3180   do
3181     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3182 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3183 echo "$as_me:3183: checking for $ac_word" >&5
3184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3185 if test "${ac_cv_prog_CXX+set}" = set; then
3186   echo $ECHO_N "(cached) $ECHO_C" >&6
3187 else
3188   if test -n "$CXX"; then
3189   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3190 else
3191   ac_save_IFS=$IFS; IFS=$ac_path_separator
3192 ac_dummy="$PATH"
3193 for ac_dir in $ac_dummy; do
3194   IFS=$ac_save_IFS
3195   test -z "$ac_dir" && ac_dir=.
3196   $as_executable_p "$ac_dir/$ac_word" || continue
3197 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3198 echo "$as_me:3198: found $ac_dir/$ac_word" >&5
3199 break
3200 done
3201
3202 fi
3203 fi
3204 CXX=$ac_cv_prog_CXX
3205 if test -n "$CXX"; then
3206   echo "$as_me:3206: result: $CXX" >&5
3207 echo "${ECHO_T}$CXX" >&6
3208 else
3209   echo "$as_me:3209: result: no" >&5
3210 echo "${ECHO_T}no" >&6
3211 fi
3212
3213     test -n "$CXX" && break
3214   done
3215 fi
3216 if test -z "$CXX"; then
3217   ac_ct_CXX=$CXX
3218   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3219 do
3220   # Extract the first word of "$ac_prog", so it can be a program name with args.
3221 set dummy $ac_prog; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3225   echo $ECHO_N "(cached) $ECHO_C" >&6
3226 else
3227   if test -n "$ac_ct_CXX"; then
3228   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3229 else
3230   ac_save_IFS=$IFS; IFS=$ac_path_separator
3231 ac_dummy="$PATH"
3232 for ac_dir in $ac_dummy; do
3233   IFS=$ac_save_IFS
3234   test -z "$ac_dir" && ac_dir=.
3235   $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_ac_ct_CXX="$ac_prog"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3238 break
3239 done
3240
3241 fi
3242 fi
3243 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3244 if test -n "$ac_ct_CXX"; then
3245   echo "$as_me:3245: result: $ac_ct_CXX" >&5
3246 echo "${ECHO_T}$ac_ct_CXX" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252   test -n "$ac_ct_CXX" && break
3253 done
3254 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3255
3256   CXX=$ac_ct_CXX
3257 fi
3258
3259 # Provide some information about the compiler.
3260 echo "$as_me:3260:" \
3261      "checking for C++ compiler version" >&5
3262 ac_compiler=`set X $ac_compile; echo $2`
3263 { (eval echo "$as_me:3263: \"$ac_compiler --version </dev/null >&5\"") >&5
3264   (eval $ac_compiler --version </dev/null >&5) 2>&5
3265   ac_status=$?
3266   echo "$as_me:3266: \$? = $ac_status" >&5
3267   (exit "$ac_status"); }
3268 { (eval echo "$as_me:3268: \"$ac_compiler -v </dev/null >&5\"") >&5
3269   (eval $ac_compiler -v </dev/null >&5) 2>&5
3270   ac_status=$?
3271   echo "$as_me:3271: \$? = $ac_status" >&5
3272   (exit "$ac_status"); }
3273 { (eval echo "$as_me:3273: \"$ac_compiler -V </dev/null >&5\"") >&5
3274   (eval $ac_compiler -V </dev/null >&5) 2>&5
3275   ac_status=$?
3276   echo "$as_me:3276: \$? = $ac_status" >&5
3277   (exit "$ac_status"); }
3278
3279 echo "$as_me:3279: checking whether we are using the GNU C++ compiler" >&5
3280 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3281 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3282   echo $ECHO_N "(cached) $ECHO_C" >&6
3283 else
3284   cat >"conftest.$ac_ext" <<_ACEOF
3285 #line 3285 "configure"
3286 #include "confdefs.h"
3287
3288 int
3289 main (void)
3290 {
3291 #ifndef __GNUC__
3292        choke me
3293 #endif
3294
3295   ;
3296   return 0;
3297 }
3298 _ACEOF
3299 rm -f "conftest.$ac_objext"
3300 if { (eval echo "$as_me:3300: \"$ac_compile\"") >&5
3301   (eval $ac_compile) 2>&5
3302   ac_status=$?
3303   echo "$as_me:3303: \$? = $ac_status" >&5
3304   (exit "$ac_status"); } &&
3305          { ac_try='test -s "conftest.$ac_objext"'
3306   { (eval echo "$as_me:3306: \"$ac_try\"") >&5
3307   (eval $ac_try) 2>&5
3308   ac_status=$?
3309   echo "$as_me:3309: \$? = $ac_status" >&5
3310   (exit "$ac_status"); }; }; then
3311   ac_compiler_gnu=yes
3312 else
3313   echo "$as_me: failed program was:" >&5
3314 cat "conftest.$ac_ext" >&5
3315 ac_compiler_gnu=no
3316 fi
3317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3318 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3319
3320 fi
3321 echo "$as_me:3321: result: $ac_cv_cxx_compiler_gnu" >&5
3322 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3323 GXX=`test $ac_compiler_gnu = yes && echo yes`
3324 ac_test_CXXFLAGS=${CXXFLAGS+set}
3325 ac_save_CXXFLAGS=$CXXFLAGS
3326 CXXFLAGS="-g"
3327 echo "$as_me:3327: checking whether $CXX accepts -g" >&5
3328 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3329 if test "${ac_cv_prog_cxx_g+set}" = set; then
3330   echo $ECHO_N "(cached) $ECHO_C" >&6
3331 else
3332   cat >"conftest.$ac_ext" <<_ACEOF
3333 #line 3333 "configure"
3334 #include "confdefs.h"
3335
3336 int
3337 main (void)
3338 {
3339
3340   ;
3341   return 0;
3342 }
3343 _ACEOF
3344 rm -f "conftest.$ac_objext"
3345 if { (eval echo "$as_me:3345: \"$ac_compile\"") >&5
3346   (eval $ac_compile) 2>&5
3347   ac_status=$?
3348   echo "$as_me:3348: \$? = $ac_status" >&5
3349   (exit "$ac_status"); } &&
3350          { ac_try='test -s "conftest.$ac_objext"'
3351   { (eval echo "$as_me:3351: \"$ac_try\"") >&5
3352   (eval $ac_try) 2>&5
3353   ac_status=$?
3354   echo "$as_me:3354: \$? = $ac_status" >&5
3355   (exit "$ac_status"); }; }; then
3356   ac_cv_prog_cxx_g=yes
3357 else
3358   echo "$as_me: failed program was:" >&5
3359 cat "conftest.$ac_ext" >&5
3360 ac_cv_prog_cxx_g=no
3361 fi
3362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3363 fi
3364 echo "$as_me:3364: result: $ac_cv_prog_cxx_g" >&5
3365 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3366 if test "$ac_test_CXXFLAGS" = set; then
3367   CXXFLAGS=$ac_save_CXXFLAGS
3368 elif test $ac_cv_prog_cxx_g = yes; then
3369   if test "$GXX" = yes; then
3370     CXXFLAGS="-g -O2"
3371   else
3372     CXXFLAGS="-g"
3373   fi
3374 else
3375   if test "$GXX" = yes; then
3376     CXXFLAGS="-O2"
3377   else
3378     CXXFLAGS=
3379   fi
3380 fi
3381 for ac_declaration in \
3382    ''\
3383    '#include <stdlib.h>' \
3384    'extern "C" void std::exit (int) throw (); using std::exit;' \
3385    'extern "C" void std::exit (int); using std::exit;' \
3386    'extern "C" void exit (int) throw ();' \
3387    'extern "C" void exit (int);' \
3388    'void exit (int);'
3389 do
3390   cat >"conftest.$ac_ext" <<_ACEOF
3391 #line 3391 "configure"
3392 #include "confdefs.h"
3393 #include <stdlib.h>
3394 $ac_declaration
3395 int
3396 main (void)
3397 {
3398 exit (42);
3399   ;
3400   return 0;
3401 }
3402 _ACEOF
3403 rm -f "conftest.$ac_objext"
3404 if { (eval echo "$as_me:3404: \"$ac_compile\"") >&5
3405   (eval $ac_compile) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3407: \$? = $ac_status" >&5
3408   (exit "$ac_status"); } &&
3409          { ac_try='test -s "conftest.$ac_objext"'
3410   { (eval echo "$as_me:3410: \"$ac_try\"") >&5
3411   (eval $ac_try) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3413: \$? = $ac_status" >&5
3414   (exit "$ac_status"); }; }; then
3415   :
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 cat "conftest.$ac_ext" >&5
3419 continue
3420 fi
3421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3422   cat >"conftest.$ac_ext" <<_ACEOF
3423 #line 3423 "configure"
3424 #include "confdefs.h"
3425 $ac_declaration
3426 int
3427 main (void)
3428 {
3429 exit (42);
3430   ;
3431   return 0;
3432 }
3433 _ACEOF
3434 rm -f "conftest.$ac_objext"
3435 if { (eval echo "$as_me:3435: \"$ac_compile\"") >&5
3436   (eval $ac_compile) 2>&5
3437   ac_status=$?
3438   echo "$as_me:3438: \$? = $ac_status" >&5
3439   (exit "$ac_status"); } &&
3440          { ac_try='test -s "conftest.$ac_objext"'
3441   { (eval echo "$as_me:3441: \"$ac_try\"") >&5
3442   (eval $ac_try) 2>&5
3443   ac_status=$?
3444   echo "$as_me:3444: \$? = $ac_status" >&5
3445   (exit "$ac_status"); }; }; then
3446   break
3447 else
3448   echo "$as_me: failed program was:" >&5
3449 cat "conftest.$ac_ext" >&5
3450 fi
3451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3452 done
3453 rm -rf conftest*
3454 if test -n "$ac_declaration"; then
3455   echo '#ifdef __cplusplus' >>confdefs.h
3456   echo "$ac_declaration"    >>confdefs.h
3457   echo '#endif'             >>confdefs.h
3458 fi
3459
3460 ac_ext=c
3461 ac_cpp='$CPP $CPPFLAGS'
3462 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3463 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3465 ac_main_return="return"
3466
3467         ac_ext=cc
3468 ac_cpp='$CXXCPP $CPPFLAGS'
3469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3470 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3472 ac_main_return="return"
3473
3474         if test "x$cf_with_cxx" != xno
3475         then
3476                 # Several of the C++ configurations do not work, particularly when
3477                 # cross-compiling (20140913 -TD)
3478                 echo "$as_me:3478: checking if $CXX works" >&5
3479 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3480
3481                 save_CPPFLAGS="$CPPFLAGS"
3482                 eval cf_includedir=${includedir}
3483                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3484
3485 cat >"conftest.$ac_ext" <<_ACEOF
3486 #line 3486 "configure"
3487 #include "confdefs.h"
3488
3489 #include <stdlib.h>
3490 #include <stdio.h>
3491
3492 int
3493 main (void)
3494 {
3495
3496                 printf("Hello world!\n")
3497
3498   ;
3499   return 0;
3500 }
3501 _ACEOF
3502 rm -f "conftest.$ac_objext"
3503 if { (eval echo "$as_me:3503: \"$ac_compile\"") >&5
3504   (eval $ac_compile) 2>&5
3505   ac_status=$?
3506   echo "$as_me:3506: \$? = $ac_status" >&5
3507   (exit "$ac_status"); } &&
3508          { ac_try='test -s "conftest.$ac_objext"'
3509   { (eval echo "$as_me:3509: \"$ac_try\"") >&5
3510   (eval $ac_try) 2>&5
3511   ac_status=$?
3512   echo "$as_me:3512: \$? = $ac_status" >&5
3513   (exit "$ac_status"); }; }; then
3514   cf_cxx_works=yes
3515 else
3516   echo "$as_me: failed program was:" >&5
3517 cat "conftest.$ac_ext" >&5
3518 cf_cxx_works=no
3519 fi
3520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3521                 CPPFLAGS="$save_CPPFLAGS"
3522
3523                 echo "$as_me:3523: result: $cf_cxx_works" >&5
3524 echo "${ECHO_T}$cf_cxx_works" >&6
3525                 if test "x$cf_cxx_works" = xno
3526                 then
3527                         { echo "$as_me:3527: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3528 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3529                         cf_with_cxx=no; CXX=""; GXX="";
3530                 fi
3531         fi
3532         ac_ext=c
3533 ac_cpp='$CPP $CPPFLAGS'
3534 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3535 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3537 ac_main_return="return"
3538
3539         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3540         if test "$CXX" = "g++" ; then
3541                 # Extract the first word of "g++", so it can be a program name with args.
3542 set dummy g++; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_path_CXX+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   case $CXX in
3549   [\\/]* | ?:[\\/]*)
3550   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3551   ;;
3552   *)
3553   ac_save_IFS=$IFS; IFS=$ac_path_separator
3554 ac_dummy="$PATH"
3555 for ac_dir in $ac_dummy; do
3556   IFS=$ac_save_IFS
3557   test -z "$ac_dir" && ac_dir=.
3558   if $as_executable_p "$ac_dir/$ac_word"; then
3559    ac_cv_path_CXX="$ac_dir/$ac_word"
3560    echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3561    break
3562 fi
3563 done
3564
3565   ;;
3566 esac
3567 fi
3568 CXX=$ac_cv_path_CXX
3569
3570 if test -n "$CXX"; then
3571   echo "$as_me:3571: result: $CXX" >&5
3572 echo "${ECHO_T}$CXX" >&6
3573 else
3574   echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578         fi
3579         case "x$CXX" in
3580         (x|xg++)
3581                 { echo "$as_me:3581: WARNING: You don't have any C++ compiler, too bad" >&5
3582 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3583                 cf_with_cxx=no; CXX=""; GXX="";
3584                 ;;
3585         esac
3586 fi
3587
3588 GXX_VERSION=none
3589 if test "$GXX" = yes; then
3590         echo "$as_me:3590: checking version of ${CXX:-g++}" >&5
3591 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3592         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3593         if test -z "$GXX_VERSION"
3594         then
3595                 GXX_VERSION=unknown
3596                 GXX=no
3597         fi
3598         echo "$as_me:3598: result: $GXX_VERSION" >&5
3599 echo "${ECHO_T}$GXX_VERSION" >&6
3600 fi
3601
3602 case "$GXX_VERSION" in
3603 ([1-9][0-9].*)
3604         ;;
3605 (1.*|2.[0-6]*)
3606         { echo "$as_me:3606: WARNING: templates do not work" >&5
3607 echo "$as_me: WARNING: templates do not work" >&2;}
3608         ;;
3609 esac
3610
3611 echo "$as_me:3611: checking if you want to build C++ binding and demo" >&5
3612 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3613
3614 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3615 if test "${with_cxx_binding+set}" = set; then
3616   withval="$with_cxx_binding"
3617   cf_with_cxx_binding=$withval
3618 else
3619   cf_with_cxx_binding=$cf_with_cxx
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_cxx_binding" >&5
3622 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3623
3624 echo "$as_me:3624: checking if you want to build with Ada" >&5
3625 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3626 echo "$as_me:3626: result: $cf_with_ada" >&5
3627 echo "${ECHO_T}$cf_with_ada" >&6
3628
3629 echo "$as_me:3629: checking if you want to install terminal database" >&5
3630 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3631
3632 # Check whether --enable-db-install or --disable-db-install was given.
3633 if test "${enable_db_install+set}" = set; then
3634   enableval="$enable_db_install"
3635   cf_with_db_install=$enableval
3636 else
3637   cf_with_db_install=yes
3638 fi;
3639 echo "$as_me:3639: result: $cf_with_db_install" >&5
3640 echo "${ECHO_T}$cf_with_db_install" >&6
3641
3642 echo "$as_me:3642: checking if you want to install manpages" >&5
3643 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3644
3645 # Check whether --with-manpages or --without-manpages was given.
3646 if test "${with_manpages+set}" = set; then
3647   withval="$with_manpages"
3648   cf_with_manpages=$withval
3649 else
3650   cf_with_manpages=yes
3651 fi;
3652 echo "$as_me:3652: result: $cf_with_manpages" >&5
3653 echo "${ECHO_T}$cf_with_manpages" >&6
3654
3655 echo "$as_me:3655: checking if you want to build programs such as tic" >&5
3656 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3657
3658 # Check whether --with-progs or --without-progs was given.
3659 if test "${with_progs+set}" = set; then
3660   withval="$with_progs"
3661   cf_with_progs=$withval
3662 else
3663   cf_with_progs=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_with_progs" >&5
3666 echo "${ECHO_T}$cf_with_progs" >&6
3667
3668 if test -f "$srcdir/tack/tack.h" ; then
3669         if test "x$cross_compiling" = xyes ; then
3670                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3671
3672 echo "${as_me:-configure}:3672: testing ignoring tack because we are cross-compiling ..." 1>&5
3673
3674                 cf_with_tack=no
3675         else
3676                 echo "$as_me:3676: checking if you want to build the tack program" >&5
3677 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3678
3679 # Check whether --with-tack or --without-tack was given.
3680 if test "${with_tack+set}" = set; then
3681   withval="$with_tack"
3682   cf_with_tack=$withval
3683 else
3684   cf_with_tack=$cf_with_progs
3685 fi;
3686                 echo "$as_me:3686: result: $cf_with_tack" >&5
3687 echo "${ECHO_T}$cf_with_tack" >&6
3688         fi
3689 else
3690         cf_with_tack=no
3691 fi
3692
3693 echo "$as_me:3693: checking if you want to build test-programs" >&5
3694 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3695
3696 # Check whether --with-tests or --without-tests was given.
3697 if test "${with_tests+set}" = set; then
3698   withval="$with_tests"
3699   cf_with_tests=$withval
3700 else
3701   cf_with_tests=yes
3702 fi;
3703 echo "$as_me:3703: result: $cf_with_tests" >&5
3704 echo "${ECHO_T}$cf_with_tests" >&6
3705
3706 echo "$as_me:3706: checking if you wish to install curses.h" >&5
3707 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3708
3709 # Check whether --with-curses-h or --without-curses-h was given.
3710 if test "${with_curses_h+set}" = set; then
3711   withval="$with_curses_h"
3712   with_curses_h=$withval
3713 else
3714   with_curses_h=yes
3715 fi;
3716 echo "$as_me:3716: result: $with_curses_h" >&5
3717 echo "${ECHO_T}$with_curses_h" >&6
3718
3719 modules_to_build="ncurses"
3720 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3721 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3722 modules_to_build="$modules_to_build panel menu form"
3723
3724 test "$program_prefix" != NONE &&
3725   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3726 # Use a double $ so make ignores it.
3727 test "$program_suffix" != NONE &&
3728   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3729 # Double any \ or $.  echo might interpret backslashes.
3730 # By default was `s,x,x', remove it if useless.
3731 cat <<\_ACEOF >conftest.sed
3732 s/[\\$]/&&/g;s/;s,x,x,$//
3733 _ACEOF
3734 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3735 rm conftest.sed
3736
3737 for ac_prog in mawk gawk nawk awk
3738 do
3739   # Extract the first word of "$ac_prog", so it can be a program name with args.
3740 set dummy $ac_prog; ac_word=$2
3741 echo "$as_me:3741: checking for $ac_word" >&5
3742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3743 if test "${ac_cv_prog_AWK+set}" = set; then
3744   echo $ECHO_N "(cached) $ECHO_C" >&6
3745 else
3746   if test -n "$AWK"; then
3747   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3748 else
3749   ac_save_IFS=$IFS; IFS=$ac_path_separator
3750 ac_dummy="$PATH"
3751 for ac_dir in $ac_dummy; do
3752   IFS=$ac_save_IFS
3753   test -z "$ac_dir" && ac_dir=.
3754   $as_executable_p "$ac_dir/$ac_word" || continue
3755 ac_cv_prog_AWK="$ac_prog"
3756 echo "$as_me:3756: found $ac_dir/$ac_word" >&5
3757 break
3758 done
3759
3760 fi
3761 fi
3762 AWK=$ac_cv_prog_AWK
3763 if test -n "$AWK"; then
3764   echo "$as_me:3764: result: $AWK" >&5
3765 echo "${ECHO_T}$AWK" >&6
3766 else
3767   echo "$as_me:3767: result: no" >&5
3768 echo "${ECHO_T}no" >&6
3769 fi
3770
3771   test -n "$AWK" && break
3772 done
3773
3774 test -z "$AWK" && { { echo "$as_me:3774: error: No awk program found" >&5
3775 echo "$as_me: error: No awk program found" >&2;}
3776    { (exit 1); exit 1; }; }
3777
3778 # Find a good install program.  We prefer a C program (faster),
3779 # so one script is as good as another.  But avoid the broken or
3780 # incompatible versions:
3781 # SysV /etc/install, /usr/sbin/install
3782 # SunOS /usr/etc/install
3783 # IRIX /sbin/install
3784 # AIX /bin/install
3785 # AmigaOS /C/install, which installs bootblocks on floppy discs
3786 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3787 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3788 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3789 # ./install, which can be erroneously created by make from ./install.sh.
3790 echo "$as_me:3790: checking for a BSD compatible install" >&5
3791 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3792 if test -z "$INSTALL"; then
3793 if test "${ac_cv_path_install+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796     ac_save_IFS=$IFS; IFS=$ac_path_separator
3797   for ac_dir in $PATH; do
3798     IFS=$ac_save_IFS
3799     # Account for people who put trailing slashes in PATH elements.
3800     case $ac_dir/ in
3801     / | ./ | .// | /cC/* \
3802     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3803     | /usr/ucb/* ) ;;
3804     *)
3805       # OSF1 and SCO ODT 3.0 have their own names for install.
3806       # Don't use installbsd from OSF since it installs stuff as root
3807       # by default.
3808       for ac_prog in ginstall scoinst install; do
3809         if $as_executable_p "$ac_dir/$ac_prog"; then
3810           if test $ac_prog = install &&
3811             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3812             # AIX install.  It has an incompatible calling convention.
3813             :
3814           elif test $ac_prog = install &&
3815             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3816             # program-specific install script used by HP pwplus--don't use.
3817             :
3818           else
3819             ac_cv_path_install="$ac_dir/$ac_prog -c"
3820             break 2
3821           fi
3822         fi
3823       done
3824       ;;
3825     esac
3826   done
3827
3828 fi
3829   if test "${ac_cv_path_install+set}" = set; then
3830     INSTALL=$ac_cv_path_install
3831   else
3832     # As a last resort, use the slow shell script.  We don't cache a
3833     # path for INSTALL within a source directory, because that will
3834     # break other packages using the cache if that directory is
3835     # removed, or if the path is relative.
3836     INSTALL=$ac_install_sh
3837   fi
3838 fi
3839 echo "$as_me:3839: result: $INSTALL" >&5
3840 echo "${ECHO_T}$INSTALL" >&6
3841
3842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3843 # It thinks the first close brace ends the variable substitution.
3844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3845
3846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3847
3848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3849
3850 case $INSTALL in
3851 (/*)
3852         ;;
3853 (*)
3854         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3855         test -z "$cf_dir" && cf_dir=.
3856         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3857         ;;
3858 esac
3859
3860 for ac_prog in lint cppcheck splint
3861 do
3862   # Extract the first word of "$ac_prog", so it can be a program name with args.
3863 set dummy $ac_prog; ac_word=$2
3864 echo "$as_me:3864: checking for $ac_word" >&5
3865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3866 if test "${ac_cv_prog_LINT+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   if test -n "$LINT"; then
3870   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3871 else
3872   ac_save_IFS=$IFS; IFS=$ac_path_separator
3873 ac_dummy="$PATH"
3874 for ac_dir in $ac_dummy; do
3875   IFS=$ac_save_IFS
3876   test -z "$ac_dir" && ac_dir=.
3877   $as_executable_p "$ac_dir/$ac_word" || continue
3878 ac_cv_prog_LINT="$ac_prog"
3879 echo "$as_me:3879: found $ac_dir/$ac_word" >&5
3880 break
3881 done
3882
3883 fi
3884 fi
3885 LINT=$ac_cv_prog_LINT
3886 if test -n "$LINT"; then
3887   echo "$as_me:3887: result: $LINT" >&5
3888 echo "${ECHO_T}$LINT" >&6
3889 else
3890   echo "$as_me:3890: result: no" >&5
3891 echo "${ECHO_T}no" >&6
3892 fi
3893
3894   test -n "$LINT" && break
3895 done
3896
3897 case "x$LINT" in
3898 (xcppcheck|x*/cppcheck)
3899         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3900         ;;
3901 esac
3902
3903 echo "$as_me:3903: checking whether ln -s works" >&5
3904 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3905 LN_S=$as_ln_s
3906 if test "$LN_S" = "ln -s"; then
3907   echo "$as_me:3907: result: yes" >&5
3908 echo "${ECHO_T}yes" >&6
3909 else
3910   echo "$as_me:3910: result: no, using $LN_S" >&5
3911 echo "${ECHO_T}no, using $LN_S" >&6
3912 fi
3913
3914 echo "$as_me:3914: checking if $LN_S -f options work" >&5
3915 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3916
3917 rm -f conf$$.src conf$$dst
3918 echo >conf$$.dst
3919 echo first >conf$$.src
3920 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3921         cf_prog_ln_sf=yes
3922 else
3923         cf_prog_ln_sf=no
3924 fi
3925 rm -f conf$$.dst conf$$src
3926 echo "$as_me:3926: result: $cf_prog_ln_sf" >&5
3927 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3928
3929 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3930
3931 echo "$as_me:3931: checking for long file names" >&5
3932 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3933 if test "${ac_cv_sys_long_file_names+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   ac_cv_sys_long_file_names=yes
3937 # Test for long file names in all the places we know might matter:
3938 #      .                the current directory, where building will happen
3939 #      $prefix/lib      where we will be installing things
3940 #      $exec_prefix/lib likewise
3941 # eval it to expand exec_prefix.
3942 #      $TMPDIR          if set, where it might want to write temporary files
3943 # if $TMPDIR is not set:
3944 #      /tmp             where it might want to write temporary files
3945 #      /var/tmp         likewise
3946 #      /usr/tmp         likewise
3947 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3948   ac_tmpdirs=$TMPDIR
3949 else
3950   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3951 fi
3952 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3953   test -d "$ac_dir" || continue
3954   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3955   ac_xdir=$ac_dir/cf$$
3956   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3957   ac_tf1=$ac_xdir/conftest9012345
3958   ac_tf2=$ac_xdir/conftest9012346
3959   (echo 1 >"$ac_tf1") 2>/dev/null
3960   (echo 2 >"$ac_tf2") 2>/dev/null
3961   ac_val=`cat "$ac_tf1" 2>/dev/null`
3962   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3963     ac_cv_sys_long_file_names=no
3964     rm -rf "$ac_xdir" 2>/dev/null
3965     break
3966   fi
3967   rm -rf "$ac_xdir" 2>/dev/null
3968 done
3969 fi
3970 echo "$as_me:3970: result: $ac_cv_sys_long_file_names" >&5
3971 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3972 if test "$ac_cv_sys_long_file_names" = yes; then
3973
3974 cat >>confdefs.h <<\EOF
3975 #define HAVE_LONG_FILE_NAMES 1
3976 EOF
3977
3978 fi
3979
3980 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3981 # of package conflict.
3982 cf_config_suffix=
3983
3984 # Check whether --with-config-suffix or --without-config-suffix was given.
3985 if test "${with_config_suffix+set}" = set; then
3986   withval="$with_config_suffix"
3987   case "x$withval" in
3988         (xyes|xno)
3989                 { echo "$as_me:3989: WARNING: expected a value for config-suffix option" >&5
3990 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3991                 ;;
3992         (*)     cf_config_suffix="$withval"
3993                 ;;
3994         esac
3995 fi;
3996
3997 # If we find pkg-config, check if we should install the ".pc" files.
3998
3999 echo "$as_me:3999: checking if you want to use pkg-config" >&5
4000 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4001
4002 # Check whether --with-pkg-config or --without-pkg-config was given.
4003 if test "${with_pkg_config+set}" = set; then
4004   withval="$with_pkg_config"
4005   cf_pkg_config=$withval
4006 else
4007   cf_pkg_config=yes
4008 fi;
4009 echo "$as_me:4009: result: $cf_pkg_config" >&5
4010 echo "${ECHO_T}$cf_pkg_config" >&6
4011
4012 case "$cf_pkg_config" in
4013 (no)
4014         PKG_CONFIG=none
4015         ;;
4016 (yes)
4017
4018 if test -n "$ac_tool_prefix"; then
4019   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4020 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   case $PKG_CONFIG in
4027   [\\/]* | ?:[\\/]*)
4028   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4029   ;;
4030   *)
4031   ac_save_IFS=$IFS; IFS=$ac_path_separator
4032 ac_dummy="$PATH"
4033 for ac_dir in $ac_dummy; do
4034   IFS=$ac_save_IFS
4035   test -z "$ac_dir" && ac_dir=.
4036   if $as_executable_p "$ac_dir/$ac_word"; then
4037    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4038    echo "$as_me:4038: found $ac_dir/$ac_word" >&5
4039    break
4040 fi
4041 done
4042
4043   ;;
4044 esac
4045 fi
4046 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4047
4048 if test -n "$PKG_CONFIG"; then
4049   echo "$as_me:4049: result: $PKG_CONFIG" >&5
4050 echo "${ECHO_T}$PKG_CONFIG" >&6
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054 fi
4055
4056 fi
4057 if test -z "$ac_cv_path_PKG_CONFIG"; then
4058   ac_pt_PKG_CONFIG=$PKG_CONFIG
4059   # Extract the first word of "pkg-config", so it can be a program name with args.
4060 set dummy pkg-config; ac_word=$2
4061 echo "$as_me:4061: checking for $ac_word" >&5
4062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4063 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4064   echo $ECHO_N "(cached) $ECHO_C" >&6
4065 else
4066   case $ac_pt_PKG_CONFIG in
4067   [\\/]* | ?:[\\/]*)
4068   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4069   ;;
4070   *)
4071   ac_save_IFS=$IFS; IFS=$ac_path_separator
4072 ac_dummy="$PATH"
4073 for ac_dir in $ac_dummy; do
4074   IFS=$ac_save_IFS
4075   test -z "$ac_dir" && ac_dir=.
4076   if $as_executable_p "$ac_dir/$ac_word"; then
4077    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4078    echo "$as_me:4078: found $ac_dir/$ac_word" >&5
4079    break
4080 fi
4081 done
4082
4083   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4084   ;;
4085 esac
4086 fi
4087 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4088
4089 if test -n "$ac_pt_PKG_CONFIG"; then
4090   echo "$as_me:4090: result: $ac_pt_PKG_CONFIG" >&5
4091 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   PKG_CONFIG=$ac_pt_PKG_CONFIG
4098 else
4099   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4100 fi
4101
4102         ;;
4103 (*)
4104         PKG_CONFIG=$withval
4105         ;;
4106 esac
4107
4108 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4109 if test "$PKG_CONFIG" != none ; then
4110
4111 if test "x$prefix" != xNONE; then
4112         cf_path_syntax="$prefix"
4113 else
4114         cf_path_syntax="$ac_default_prefix"
4115 fi
4116
4117 case ".$PKG_CONFIG" in
4118 (.\$\(*\)*|.\'*\'*)
4119         ;;
4120 (..|./*|.\\*)
4121         ;;
4122 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4123         ;;
4124 (.\$\{*prefix\}*|.\$\{*dir\}*)
4125         eval PKG_CONFIG="$PKG_CONFIG"
4126         case ".$PKG_CONFIG" in
4127         (.NONE/*)
4128                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4129                 ;;
4130         esac
4131         ;;
4132 (.no|.NONE/*)
4133         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4134         ;;
4135 (*)
4136         { { echo "$as_me:4136: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4137 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4138    { (exit 1); exit 1; }; }
4139         ;;
4140 esac
4141
4142 elif test "x$cf_pkg_config" != xno ; then
4143         { echo "$as_me:4143: WARNING: pkg-config is not installed" >&5
4144 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4145 fi
4146
4147 case "$PKG_CONFIG" in
4148 (no|none|yes)
4149         echo "$as_me:4149: checking for pkg-config library directory" >&5
4150 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4151         ;;
4152 (*)
4153         echo "$as_me:4153: checking for $PKG_CONFIG library directory" >&5
4154 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4155         ;;
4156 esac
4157
4158 # if $PKG_CONFIG_LIBDIR is set, try to use that
4159 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4160
4161 # if the option is used, let that override.  otherwise default to "libdir"
4162
4163 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4164 if test "${with_pkg_config_libdir+set}" = set; then
4165   withval="$with_pkg_config_libdir"
4166   cf_search_path=$withval
4167 else
4168   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4169 fi;
4170
4171 case "x$cf_search_path" in
4172 (xlibdir)
4173         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4174         echo "$as_me:4174: result: $PKG_CONFIG_LIBDIR" >&5
4175 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4176         cf_search_path=
4177         ;;
4178 (x)
4179         ;;
4180 (x/*\ *)
4181         PKG_CONFIG_LIBDIR=
4182         ;;
4183 (x/*)
4184         PKG_CONFIG_LIBDIR="$cf_search_path"
4185         echo "$as_me:4185: result: $PKG_CONFIG_LIBDIR" >&5
4186 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4187         cf_search_path=
4188         ;;
4189 (xyes|xauto)
4190         echo "$as_me:4190: result: auto" >&5
4191 echo "${ECHO_T}auto" >&6
4192         cf_search_path=
4193         # Look for the library directory using the same prefix as the executable
4194         echo "$as_me:4194: checking for search-list" >&5
4195 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4196         if test "x$PKG_CONFIG" != xnone
4197         then
4198                 # works for pkg-config since version 0.24 (2009)
4199                 # works for pkgconf since version 0.8.3 (2012)
4200                 for cf_pkg_program in \
4201                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4202                         pkg-config \
4203                         pkgconf
4204                 do
4205                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4206                         test -n "$cf_search_path" && break
4207                 done
4208
4209                 # works for pkg-config since import in 2005 of original 2001 HP code.
4210                 test -z "$cf_search_path" && \
4211                 cf_search_path=`
4212                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4213 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4214         sub(\"^[^']*'\",\"\"); \
4215         sub(\"'.*\",\"\"); \
4216         printf \" %s\", \\$0; } \
4217 { next; } \
4218 "`
4219         fi
4220
4221         echo "$as_me:4221: result: $cf_search_path" >&5
4222 echo "${ECHO_T}$cf_search_path" >&6
4223         ;;
4224 (*)
4225         { { echo "$as_me:4225: error: Unexpected option value: $cf_search_path" >&5
4226 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4227    { (exit 1); exit 1; }; }
4228         ;;
4229 esac
4230
4231 if test -n "$cf_search_path"
4232 then
4233         echo "$as_me:4233: checking for first directory" >&5
4234 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4235         cf_pkg_config_path=none
4236         for cf_config in $cf_search_path
4237         do
4238                 if test -d "$cf_config"
4239                 then
4240                         cf_pkg_config_path=$cf_config
4241                         break
4242                 fi
4243         done
4244         echo "$as_me:4244: result: $cf_pkg_config_path" >&5
4245 echo "${ECHO_T}$cf_pkg_config_path" >&6
4246
4247         if test "x$cf_pkg_config_path" != xnone ; then
4248                 # limit this to the first directory found
4249                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4250         fi
4251
4252         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4253         then
4254                 echo "$as_me:4254: checking for workaround" >&5
4255 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4256                 if test "$prefix" = "NONE" ; then
4257                         cf_prefix="$ac_default_prefix"
4258                 else
4259                         cf_prefix="$prefix"
4260                 fi
4261                 eval cf_libdir=$libdir
4262                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4263                 cf_backup=
4264                 for cf_config in $cf_search_path
4265                 do
4266                         case $cf_config in
4267                         $cf_libdir/pkgconfig)
4268                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4269                                 break
4270                                 ;;
4271                         *)
4272                                 test -z "$cf_backup" && cf_backup=$cf_config
4273                                 ;;
4274                         esac
4275                 done
4276                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4277                 echo "$as_me:4277: result: $PKG_CONFIG_LIBDIR" >&5
4278 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4279         fi
4280 fi
4281
4282 if test "x$PKG_CONFIG" != xnone
4283 then
4284         echo "$as_me:4284: checking if we should install .pc files for $PKG_CONFIG" >&5
4285 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4286 else
4287         echo "$as_me:4287: checking if we should install .pc files" >&5
4288 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4289 fi
4290
4291 # Check whether --enable-pc-files or --disable-pc-files was given.
4292 if test "${enable_pc_files+set}" = set; then
4293   enableval="$enable_pc_files"
4294   enable_pc_files=$enableval
4295 else
4296   enable_pc_files=no
4297 fi;
4298 echo "$as_me:4298: result: $enable_pc_files" >&5
4299 echo "${ECHO_T}$enable_pc_files" >&6
4300
4301 if test "x$enable_pc_files" != xno
4302 then
4303         MAKE_PC_FILES=
4304         case "x$PKG_CONFIG_LIBDIR" in
4305         (xno|xnone|xyes|x)
4306                 { echo "$as_me:4306: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4307 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4308                 ;;
4309         (*)
4310                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4311
4312 if test "x$prefix" != xNONE; then
4313         cf_path_syntax="$prefix"
4314 else
4315         cf_path_syntax="$ac_default_prefix"
4316 fi
4317
4318 case ".$cf_pkg_config_libdir" in
4319 (.\$\(*\)*|.\'*\'*)
4320         ;;
4321 (..|./*|.\\*)
4322         ;;
4323 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4324         ;;
4325 (.\$\{*prefix\}*|.\$\{*dir\}*)
4326         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4327         case ".$cf_pkg_config_libdir" in
4328         (.NONE/*)
4329                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4330                 ;;
4331         esac
4332         ;;
4333 (.no|.NONE/*)
4334         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4335         ;;
4336 (*)
4337         { { echo "$as_me:4337: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4338 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4339    { (exit 1); exit 1; }; }
4340         ;;
4341 esac
4342
4343                 ;;
4344         esac
4345 else
4346         MAKE_PC_FILES="#"
4347 fi
4348
4349 if test -z "$MAKE_PC_FILES"
4350 then
4351         echo "$as_me:4351: checking for suffix to add to pc-files" >&5
4352 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4353
4354 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4355 if test "${with_pc_suffix+set}" = set; then
4356   withval="$with_pc_suffix"
4357   case "x$withval" in
4358         (xyes|xno)
4359                 PC_MODULE_SUFFIX=
4360                 ;;
4361         (*)     PC_MODULE_SUFFIX="$withval"
4362                 ;;
4363         esac
4364 fi;
4365         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4366         echo "$as_me:4366: result: $PC_MODULE_SUFFIX" >&5
4367 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4368         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4369
4370 fi
4371
4372 echo "$as_me:4372: checking if we should assume mixed-case filenames" >&5
4373 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4374
4375 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4376 if test "${enable_mixed_case+set}" = set; then
4377   enableval="$enable_mixed_case"
4378   enable_mixedcase=$enableval
4379 else
4380   enable_mixedcase=auto
4381 fi;
4382 echo "$as_me:4382: result: $enable_mixedcase" >&5
4383 echo "${ECHO_T}$enable_mixedcase" >&6
4384 if test "$enable_mixedcase" = "auto" ; then
4385
4386 echo "$as_me:4386: checking if filesystem supports mixed-case filenames" >&5
4387 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4388 if test "${cf_cv_mixedcase+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391
4392 if test "$cross_compiling" = yes ; then
4393         case "$target_alias" in
4394         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4395                 cf_cv_mixedcase=no
4396                 ;;
4397         (*)
4398                 cf_cv_mixedcase=yes
4399                 ;;
4400         esac
4401 else
4402         rm -f conftest CONFTEST
4403         echo test >conftest
4404         if test -f CONFTEST ; then
4405                 cf_cv_mixedcase=no
4406         else
4407                 cf_cv_mixedcase=yes
4408         fi
4409         rm -f conftest CONFTEST
4410 fi
4411
4412 fi
4413 echo "$as_me:4413: result: $cf_cv_mixedcase" >&5
4414 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4415 test "$cf_cv_mixedcase" = yes &&
4416 cat >>confdefs.h <<\EOF
4417 #define MIXEDCASE_FILENAMES 1
4418 EOF
4419
4420 else
4421         cf_cv_mixedcase=$enable_mixedcase
4422         if test "x$enable_mixedcase" = "xyes" ; then
4423
4424 cat >>confdefs.h <<\EOF
4425 #define MIXEDCASE_FILENAMES 1
4426 EOF
4427
4428         fi
4429 fi
4430
4431 # do this after mixed-case option (tags/TAGS is not as important as tic).
4432 echo "$as_me:4432: checking whether ${MAKE-make} sets \${MAKE}" >&5
4433 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4434 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4435 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438   cat >conftest.make <<\EOF
4439 all:
4440         @echo 'ac_maketemp="${MAKE}"'
4441 EOF
4442 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4443 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4444 if test -n "$ac_maketemp"; then
4445   eval ac_cv_prog_make_${ac_make}_set=yes
4446 else
4447   eval ac_cv_prog_make_${ac_make}_set=no
4448 fi
4449 rm -f conftest.make
4450 fi
4451 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4452   echo "$as_me:4452: result: yes" >&5
4453 echo "${ECHO_T}yes" >&6
4454   SET_MAKE=
4455 else
4456   echo "$as_me:4456: result: no" >&5
4457 echo "${ECHO_T}no" >&6
4458   SET_MAKE="MAKE=${MAKE-make}"
4459 fi
4460
4461 echo "$as_me:4461: checking for \".PHONY\" make-support" >&5
4462 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4463 if test "${cf_cv_make_PHONY+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466
4467         rm -rf conftest*
4468         (
4469                 mkdir conftest || exit 1
4470                 cd conftest
4471                 cat >makefile <<'CF_EOF'
4472 .PHONY: always
4473 DATA=0
4474 always: always.out
4475         @echo "** making $@ $(DATA)"
4476 once: once.out
4477         @echo "** making $@ $(DATA)"
4478 always.out:
4479         @echo "** making $@ $(DATA)"
4480         echo $(DATA) > $@
4481 once.out:
4482         @echo "** making $@ $(DATA)"
4483         echo $(DATA) > $@
4484 CF_EOF
4485                 for cf_data in 1 2 3
4486                 do
4487                         ${MAKE:-make} always DATA=$cf_data
4488                         ${MAKE:-make} once   DATA=$cf_data
4489                         ${MAKE:-make} -t always once
4490                         if test -f always ; then
4491                                 echo "no (case 1)" > ../conftest.tmp
4492                         elif test ! -f always.out ; then
4493                                 echo "no (case 2)" > ../conftest.tmp
4494                         elif test ! -f once.out ; then
4495                                 echo "no (case 3)" > ../conftest.tmp
4496                         elif ! cmp -s always.out once.out ; then
4497                                 echo "no (case 4)" > ../conftest.tmp
4498                                 diff always.out once.out
4499                         else
4500                                 cf_check="`cat always.out`"
4501                                 if test "x$cf_check" != "x$cf_data" ; then
4502                                         echo "no (case 5)" > ../conftest.tmp
4503                                 else
4504                                         echo yes > ../conftest.tmp
4505                                         rm -f ./*.out
4506                                         continue
4507                                 fi
4508                         fi
4509                         break
4510                 done
4511         ) >&5 2>&1
4512         cf_cv_make_PHONY="`cat conftest.tmp`"
4513         rm -rf conftest*
4514
4515 fi
4516 echo "$as_me:4516: result: $cf_cv_make_PHONY" >&5
4517 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4518 MAKE_NO_PHONY="#"
4519 MAKE_PHONY="#"
4520 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4521 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4522
4523 for ac_prog in exctags ctags
4524 do
4525   # Extract the first word of "$ac_prog", so it can be a program name with args.
4526 set dummy $ac_prog; ac_word=$2
4527 echo "$as_me:4527: checking for $ac_word" >&5
4528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4529 if test "${ac_cv_prog_CTAGS+set}" = set; then
4530   echo $ECHO_N "(cached) $ECHO_C" >&6
4531 else
4532   if test -n "$CTAGS"; then
4533   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4534 else
4535   ac_save_IFS=$IFS; IFS=$ac_path_separator
4536 ac_dummy="$PATH"
4537 for ac_dir in $ac_dummy; do
4538   IFS=$ac_save_IFS
4539   test -z "$ac_dir" && ac_dir=.
4540   $as_executable_p "$ac_dir/$ac_word" || continue
4541 ac_cv_prog_CTAGS="$ac_prog"
4542 echo "$as_me:4542: found $ac_dir/$ac_word" >&5
4543 break
4544 done
4545
4546 fi
4547 fi
4548 CTAGS=$ac_cv_prog_CTAGS
4549 if test -n "$CTAGS"; then
4550   echo "$as_me:4550: result: $CTAGS" >&5
4551 echo "${ECHO_T}$CTAGS" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   test -n "$CTAGS" && break
4558 done
4559
4560 for ac_prog in exetags etags
4561 do
4562   # Extract the first word of "$ac_prog", so it can be a program name with args.
4563 set dummy $ac_prog; ac_word=$2
4564 echo "$as_me:4564: checking for $ac_word" >&5
4565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4566 if test "${ac_cv_prog_ETAGS+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   if test -n "$ETAGS"; then
4570   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4571 else
4572   ac_save_IFS=$IFS; IFS=$ac_path_separator
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575   IFS=$ac_save_IFS
4576   test -z "$ac_dir" && ac_dir=.
4577   $as_executable_p "$ac_dir/$ac_word" || continue
4578 ac_cv_prog_ETAGS="$ac_prog"
4579 echo "$as_me:4579: found $ac_dir/$ac_word" >&5
4580 break
4581 done
4582
4583 fi
4584 fi
4585 ETAGS=$ac_cv_prog_ETAGS
4586 if test -n "$ETAGS"; then
4587   echo "$as_me:4587: result: $ETAGS" >&5
4588 echo "${ECHO_T}$ETAGS" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   test -n "$ETAGS" && break
4595 done
4596
4597 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4598 set dummy ${CTAGS:-ctags}; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$MAKE_LOWER_TAGS"; then
4605   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4619 fi
4620 fi
4621 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4622 if test -n "$MAKE_LOWER_TAGS"; then
4623   echo "$as_me:4623: result: $MAKE_LOWER_TAGS" >&5
4624 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630 if test "$cf_cv_mixedcase" = yes ; then
4631         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4632 set dummy ${ETAGS:-etags}; 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_UPPER_TAGS+set}" = set; then
4636   echo $ECHO_N "(cached) $ECHO_C" >&6
4637 else
4638   if test -n "$MAKE_UPPER_TAGS"; then
4639   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_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_UPPER_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_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4653 fi
4654 fi
4655 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4656 if test -n "$MAKE_UPPER_TAGS"; then
4657   echo "$as_me:4657: result: $MAKE_UPPER_TAGS" >&5
4658 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4659 else
4660   echo "$as_me:4660: result: no" >&5
4661 echo "${ECHO_T}no" >&6
4662 fi
4663
4664 else
4665         MAKE_UPPER_TAGS=no
4666 fi
4667
4668 if test "$MAKE_UPPER_TAGS" = yes ; then
4669         MAKE_UPPER_TAGS=
4670 else
4671         MAKE_UPPER_TAGS="#"
4672 fi
4673
4674 if test "$MAKE_LOWER_TAGS" = yes ; then
4675         MAKE_LOWER_TAGS=
4676 else
4677         MAKE_LOWER_TAGS="#"
4678 fi
4679
4680 echo "$as_me:4680: checking for makeflags variable" >&5
4681 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4682 if test "${cf_cv_makeflags+set}" = set; then
4683   echo $ECHO_N "(cached) $ECHO_C" >&6
4684 else
4685
4686         cf_cv_makeflags=''
4687         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4688         do
4689                 cat >cf_makeflags.tmp <<CF_EOF
4690 SHELL = $SHELL
4691 all :
4692         @ echo '.$cf_option'
4693 CF_EOF
4694                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4695                 case "$cf_result" in
4696                 (.*k|.*kw)
4697                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4698                         case "$cf_result" in
4699                         (.*CC=*)        cf_cv_makeflags=
4700                                 ;;
4701                         (*)     cf_cv_makeflags=$cf_option
4702                                 ;;
4703                         esac
4704                         break
4705                         ;;
4706                 (.-)
4707                         ;;
4708                 (*)
4709
4710 echo "${as_me:-configure}:4710: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4711
4712                         ;;
4713                 esac
4714         done
4715         rm -f cf_makeflags.tmp
4716
4717 fi
4718 echo "$as_me:4718: result: $cf_cv_makeflags" >&5
4719 echo "${ECHO_T}$cf_cv_makeflags" >&6
4720
4721 if test -n "$ac_tool_prefix"; then
4722   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4723 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4724 echo "$as_me:4724: checking for $ac_word" >&5
4725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4726 if test "${ac_cv_prog_RANLIB+set}" = set; then
4727   echo $ECHO_N "(cached) $ECHO_C" >&6
4728 else
4729   if test -n "$RANLIB"; then
4730   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4731 else
4732   ac_save_IFS=$IFS; IFS=$ac_path_separator
4733 ac_dummy="$PATH"
4734 for ac_dir in $ac_dummy; do
4735   IFS=$ac_save_IFS
4736   test -z "$ac_dir" && ac_dir=.
4737   $as_executable_p "$ac_dir/$ac_word" || continue
4738 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4739 echo "$as_me:4739: found $ac_dir/$ac_word" >&5
4740 break
4741 done
4742
4743 fi
4744 fi
4745 RANLIB=$ac_cv_prog_RANLIB
4746 if test -n "$RANLIB"; then
4747   echo "$as_me:4747: result: $RANLIB" >&5
4748 echo "${ECHO_T}$RANLIB" >&6
4749 else
4750   echo "$as_me:4750: result: no" >&5
4751 echo "${ECHO_T}no" >&6
4752 fi
4753
4754 fi
4755 if test -z "$ac_cv_prog_RANLIB"; then
4756   ac_ct_RANLIB=$RANLIB
4757   # Extract the first word of "ranlib", so it can be a program name with args.
4758 set dummy ranlib; ac_word=$2
4759 echo "$as_me:4759: checking for $ac_word" >&5
4760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4761 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4762   echo $ECHO_N "(cached) $ECHO_C" >&6
4763 else
4764   if test -n "$ac_ct_RANLIB"; then
4765   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4766 else
4767   ac_save_IFS=$IFS; IFS=$ac_path_separator
4768 ac_dummy="$PATH"
4769 for ac_dir in $ac_dummy; do
4770   IFS=$ac_save_IFS
4771   test -z "$ac_dir" && ac_dir=.
4772   $as_executable_p "$ac_dir/$ac_word" || continue
4773 ac_cv_prog_ac_ct_RANLIB="ranlib"
4774 echo "$as_me:4774: found $ac_dir/$ac_word" >&5
4775 break
4776 done
4777
4778   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4779 fi
4780 fi
4781 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4782 if test -n "$ac_ct_RANLIB"; then
4783   echo "$as_me:4783: result: $ac_ct_RANLIB" >&5
4784 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4785 else
4786   echo "$as_me:4786: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   RANLIB=$ac_ct_RANLIB
4791 else
4792   RANLIB="$ac_cv_prog_RANLIB"
4793 fi
4794
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4797 set dummy ${ac_tool_prefix}ld; ac_word=$2
4798 echo "$as_me:4798: checking for $ac_word" >&5
4799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4800 if test "${ac_cv_prog_LD+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803   if test -n "$LD"; then
4804   ac_cv_prog_LD="$LD" # Let the user override the test.
4805 else
4806   ac_save_IFS=$IFS; IFS=$ac_path_separator
4807 ac_dummy="$PATH"
4808 for ac_dir in $ac_dummy; do
4809   IFS=$ac_save_IFS
4810   test -z "$ac_dir" && ac_dir=.
4811   $as_executable_p "$ac_dir/$ac_word" || continue
4812 ac_cv_prog_LD="${ac_tool_prefix}ld"
4813 echo "$as_me:4813: found $ac_dir/$ac_word" >&5
4814 break
4815 done
4816
4817 fi
4818 fi
4819 LD=$ac_cv_prog_LD
4820 if test -n "$LD"; then
4821   echo "$as_me:4821: result: $LD" >&5
4822 echo "${ECHO_T}$LD" >&6
4823 else
4824   echo "$as_me:4824: result: no" >&5
4825 echo "${ECHO_T}no" >&6
4826 fi
4827
4828 fi
4829 if test -z "$ac_cv_prog_LD"; then
4830   ac_ct_LD=$LD
4831   # Extract the first word of "ld", so it can be a program name with args.
4832 set dummy ld; ac_word=$2
4833 echo "$as_me:4833: checking for $ac_word" >&5
4834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4835 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4836   echo $ECHO_N "(cached) $ECHO_C" >&6
4837 else
4838   if test -n "$ac_ct_LD"; then
4839   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4840 else
4841   ac_save_IFS=$IFS; IFS=$ac_path_separator
4842 ac_dummy="$PATH"
4843 for ac_dir in $ac_dummy; do
4844   IFS=$ac_save_IFS
4845   test -z "$ac_dir" && ac_dir=.
4846   $as_executable_p "$ac_dir/$ac_word" || continue
4847 ac_cv_prog_ac_ct_LD="ld"
4848 echo "$as_me:4848: found $ac_dir/$ac_word" >&5
4849 break
4850 done
4851
4852   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4853 fi
4854 fi
4855 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4856 if test -n "$ac_ct_LD"; then
4857   echo "$as_me:4857: result: $ac_ct_LD" >&5
4858 echo "${ECHO_T}$ac_ct_LD" >&6
4859 else
4860   echo "$as_me:4860: result: no" >&5
4861 echo "${ECHO_T}no" >&6
4862 fi
4863
4864   LD=$ac_ct_LD
4865 else
4866   LD="$ac_cv_prog_LD"
4867 fi
4868
4869 if test -n "$ac_tool_prefix"; then
4870   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4871 set dummy ${ac_tool_prefix}ar; ac_word=$2
4872 echo "$as_me:4872: checking for $ac_word" >&5
4873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4874 if test "${ac_cv_prog_AR+set}" = set; then
4875   echo $ECHO_N "(cached) $ECHO_C" >&6
4876 else
4877   if test -n "$AR"; then
4878   ac_cv_prog_AR="$AR" # Let the user override the test.
4879 else
4880   ac_save_IFS=$IFS; IFS=$ac_path_separator
4881 ac_dummy="$PATH"
4882 for ac_dir in $ac_dummy; do
4883   IFS=$ac_save_IFS
4884   test -z "$ac_dir" && ac_dir=.
4885   $as_executable_p "$ac_dir/$ac_word" || continue
4886 ac_cv_prog_AR="${ac_tool_prefix}ar"
4887 echo "$as_me:4887: found $ac_dir/$ac_word" >&5
4888 break
4889 done
4890
4891 fi
4892 fi
4893 AR=$ac_cv_prog_AR
4894 if test -n "$AR"; then
4895   echo "$as_me:4895: result: $AR" >&5
4896 echo "${ECHO_T}$AR" >&6
4897 else
4898   echo "$as_me:4898: result: no" >&5
4899 echo "${ECHO_T}no" >&6
4900 fi
4901
4902 fi
4903 if test -z "$ac_cv_prog_AR"; then
4904   ac_ct_AR=$AR
4905   # Extract the first word of "ar", so it can be a program name with args.
4906 set dummy ar; ac_word=$2
4907 echo "$as_me:4907: checking for $ac_word" >&5
4908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4909 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   if test -n "$ac_ct_AR"; then
4913   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4914 else
4915   ac_save_IFS=$IFS; IFS=$ac_path_separator
4916 ac_dummy="$PATH"
4917 for ac_dir in $ac_dummy; do
4918   IFS=$ac_save_IFS
4919   test -z "$ac_dir" && ac_dir=.
4920   $as_executable_p "$ac_dir/$ac_word" || continue
4921 ac_cv_prog_ac_ct_AR="ar"
4922 echo "$as_me:4922: found $ac_dir/$ac_word" >&5
4923 break
4924 done
4925
4926   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4927 fi
4928 fi
4929 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4930 if test -n "$ac_ct_AR"; then
4931   echo "$as_me:4931: result: $ac_ct_AR" >&5
4932 echo "${ECHO_T}$ac_ct_AR" >&6
4933 else
4934   echo "$as_me:4934: result: no" >&5
4935 echo "${ECHO_T}no" >&6
4936 fi
4937
4938   AR=$ac_ct_AR
4939 else
4940   AR="$ac_cv_prog_AR"
4941 fi
4942
4943 if test -n "$ac_tool_prefix"; then
4944   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4945 set dummy ${ac_tool_prefix}nm; ac_word=$2
4946 echo "$as_me:4946: checking for $ac_word" >&5
4947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4948 if test "${ac_cv_prog_NM+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   if test -n "$NM"; then
4952   ac_cv_prog_NM="$NM" # Let the user override the test.
4953 else
4954   ac_save_IFS=$IFS; IFS=$ac_path_separator
4955 ac_dummy="$PATH"
4956 for ac_dir in $ac_dummy; do
4957   IFS=$ac_save_IFS
4958   test -z "$ac_dir" && ac_dir=.
4959   $as_executable_p "$ac_dir/$ac_word" || continue
4960 ac_cv_prog_NM="${ac_tool_prefix}nm"
4961 echo "$as_me:4961: found $ac_dir/$ac_word" >&5
4962 break
4963 done
4964
4965 fi
4966 fi
4967 NM=$ac_cv_prog_NM
4968 if test -n "$NM"; then
4969   echo "$as_me:4969: result: $NM" >&5
4970 echo "${ECHO_T}$NM" >&6
4971 else
4972   echo "$as_me:4972: result: no" >&5
4973 echo "${ECHO_T}no" >&6
4974 fi
4975
4976 fi
4977 if test -z "$ac_cv_prog_NM"; then
4978   ac_ct_NM=$NM
4979   # Extract the first word of "nm", so it can be a program name with args.
4980 set dummy nm; ac_word=$2
4981 echo "$as_me:4981: checking for $ac_word" >&5
4982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4984   echo $ECHO_N "(cached) $ECHO_C" >&6
4985 else
4986   if test -n "$ac_ct_NM"; then
4987   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4988 else
4989   ac_save_IFS=$IFS; IFS=$ac_path_separator
4990 ac_dummy="$PATH"
4991 for ac_dir in $ac_dummy; do
4992   IFS=$ac_save_IFS
4993   test -z "$ac_dir" && ac_dir=.
4994   $as_executable_p "$ac_dir/$ac_word" || continue
4995 ac_cv_prog_ac_ct_NM="nm"
4996 echo "$as_me:4996: found $ac_dir/$ac_word" >&5
4997 break
4998 done
4999
5000   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5001 fi
5002 fi
5003 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5004 if test -n "$ac_ct_NM"; then
5005   echo "$as_me:5005: result: $ac_ct_NM" >&5
5006 echo "${ECHO_T}$ac_ct_NM" >&6
5007 else
5008   echo "$as_me:5008: result: no" >&5
5009 echo "${ECHO_T}no" >&6
5010 fi
5011
5012   NM=$ac_ct_NM
5013 else
5014   NM="$ac_cv_prog_NM"
5015 fi
5016
5017 if test -n "$ac_tool_prefix"; then
5018   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5019 set dummy ${ac_tool_prefix}ar; ac_word=$2
5020 echo "$as_me:5020: checking for $ac_word" >&5
5021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5022 if test "${ac_cv_prog_AR+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025   if test -n "$AR"; then
5026   ac_cv_prog_AR="$AR" # Let the user override the test.
5027 else
5028   ac_save_IFS=$IFS; IFS=$ac_path_separator
5029 ac_dummy="$PATH"
5030 for ac_dir in $ac_dummy; do
5031   IFS=$ac_save_IFS
5032   test -z "$ac_dir" && ac_dir=.
5033   $as_executable_p "$ac_dir/$ac_word" || continue
5034 ac_cv_prog_AR="${ac_tool_prefix}ar"
5035 echo "$as_me:5035: found $ac_dir/$ac_word" >&5
5036 break
5037 done
5038
5039 fi
5040 fi
5041 AR=$ac_cv_prog_AR
5042 if test -n "$AR"; then
5043   echo "$as_me:5043: result: $AR" >&5
5044 echo "${ECHO_T}$AR" >&6
5045 else
5046   echo "$as_me:5046: result: no" >&5
5047 echo "${ECHO_T}no" >&6
5048 fi
5049
5050 fi
5051 if test -z "$ac_cv_prog_AR"; then
5052   ac_ct_AR=$AR
5053   # Extract the first word of "ar", so it can be a program name with args.
5054 set dummy ar; ac_word=$2
5055 echo "$as_me:5055: checking for $ac_word" >&5
5056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5057 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5058   echo $ECHO_N "(cached) $ECHO_C" >&6
5059 else
5060   if test -n "$ac_ct_AR"; then
5061   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5062 else
5063   ac_save_IFS=$IFS; IFS=$ac_path_separator
5064 ac_dummy="$PATH"
5065 for ac_dir in $ac_dummy; do
5066   IFS=$ac_save_IFS
5067   test -z "$ac_dir" && ac_dir=.
5068   $as_executable_p "$ac_dir/$ac_word" || continue
5069 ac_cv_prog_ac_ct_AR="ar"
5070 echo "$as_me:5070: found $ac_dir/$ac_word" >&5
5071 break
5072 done
5073
5074   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5075 fi
5076 fi
5077 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5078 if test -n "$ac_ct_AR"; then
5079   echo "$as_me:5079: result: $ac_ct_AR" >&5
5080 echo "${ECHO_T}$ac_ct_AR" >&6
5081 else
5082   echo "$as_me:5082: result: no" >&5
5083 echo "${ECHO_T}no" >&6
5084 fi
5085
5086   AR=$ac_ct_AR
5087 else
5088   AR="$ac_cv_prog_AR"
5089 fi
5090
5091 echo "$as_me:5091: checking for options to update archives" >&5
5092 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5093 if test "${cf_cv_ar_flags+set}" = set; then
5094   echo $ECHO_N "(cached) $ECHO_C" >&6
5095 else
5096
5097         case "$cf_cv_system_name" in
5098         (*-msvc*)
5099                 cf_cv_ar_flags=''
5100                 cat >mk_static_lib.sh <<-EOF
5101                 #!$SHELL
5102                 MSVC_BIN="$AR"
5103                 out="\$1"
5104                 shift
5105                 exec \$MSVC_BIN -out:"\$out" \$@
5106                 EOF
5107                 chmod +x mk_static_lib.sh
5108                 AR=`pwd`/mk_static_lib.sh
5109                 ;;
5110         (*)
5111                 cf_cv_ar_flags=unknown
5112                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5113                 do
5114
5115                         # check if $ARFLAGS already contains this choice
5116                         if test "x$ARFLAGS" != "x" ; then
5117                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5118                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5119                                         cf_cv_ar_flags=
5120                                         break
5121                                 fi
5122                         fi
5123
5124                         rm -f "conftest.$ac_cv_objext"
5125                         rm -f conftest.a
5126
5127                         cat >"conftest.$ac_ext" <<EOF
5128 #line 5128 "configure"
5129 int     testdata[3] = { 123, 456, 789 };
5130 EOF
5131                         if { (eval echo "$as_me:5131: \"$ac_compile\"") >&5
5132   (eval $ac_compile) 2>&5
5133   ac_status=$?
5134   echo "$as_me:5134: \$? = $ac_status" >&5
5135   (exit "$ac_status"); } ; then
5136                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5137                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5138                                 if test -f conftest.a ; then
5139                                         cf_cv_ar_flags="$cf_ar_flags"
5140                                         break
5141                                 fi
5142                         else
5143                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5144
5145 echo "${as_me:-configure}:5145: testing cannot compile test-program ..." 1>&5
5146
5147                                 break
5148                         fi
5149                 done
5150                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5151                 ;;
5152         esac
5153
5154 fi
5155 echo "$as_me:5155: result: $cf_cv_ar_flags" >&5
5156 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5157
5158 if test -n "$ARFLAGS" ; then
5159         if test -n "$cf_cv_ar_flags" ; then
5160                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5161         fi
5162 else
5163         ARFLAGS=$cf_cv_ar_flags
5164 fi
5165
5166 echo "$as_me:5166: checking if you have specified an install-prefix" >&5
5167 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5168
5169 # Check whether --with-install-prefix or --without-install-prefix was given.
5170 if test "${with_install_prefix+set}" = set; then
5171   withval="$with_install_prefix"
5172   case "x$withval" in
5173         (xyes|xno)
5174                 ;;
5175         (*)     DESTDIR="$withval"
5176                 ;;
5177         esac
5178 fi;
5179 echo "$as_me:5179: result: $DESTDIR" >&5
5180 echo "${ECHO_T}$DESTDIR" >&6
5181
5182 ###############################################################################
5183
5184 # If we're cross-compiling, allow the user to override the tools and their
5185 # options.  The configure script is oriented toward identifying the host
5186 # compiler, etc., but we need a build compiler to generate parts of the source.
5187
5188 case "$cf_cv_system_name" in
5189 (*-msvc*)
5190         LDFLAGS="$LDFLAGS user32.lib"
5191         export LDFLAGS
5192         ;;
5193 esac
5194
5195 if test "$cross_compiling" = yes ; then
5196
5197         # defaults that we might want to override
5198         : ${BUILD_CFLAGS:=''}
5199         : ${BUILD_CPPFLAGS:=''}
5200         : ${BUILD_LDFLAGS:=''}
5201         : ${BUILD_LIBS:=''}
5202         : ${BUILD_EXEEXT:='$x'}
5203         : ${BUILD_OBJEXT:='o'}
5204
5205 # Check whether --with-build-cc or --without-build-cc was given.
5206 if test "${with_build_cc+set}" = set; then
5207   withval="$with_build_cc"
5208   BUILD_CC="$withval"
5209 else
5210   for ac_prog in gcc clang c99 c89 cc cl
5211 do
5212   # Extract the first word of "$ac_prog", so it can be a program name with args.
5213 set dummy $ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$BUILD_CC"; then
5220   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_BUILD_CC="$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 BUILD_CC=$ac_cv_prog_BUILD_CC
5236 if test -n "$BUILD_CC"; then
5237   echo "$as_me:5237: result: $BUILD_CC" >&5
5238 echo "${ECHO_T}$BUILD_CC" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244   test -n "$BUILD_CC" && break
5245 done
5246 test -n "$BUILD_CC" || BUILD_CC="none"
5247
5248 fi;
5249         echo "$as_me:5249: checking for native build C compiler" >&5
5250 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5251         echo "$as_me:5251: result: $BUILD_CC" >&5
5252 echo "${ECHO_T}$BUILD_CC" >&6
5253
5254         echo "$as_me:5254: checking for native build C preprocessor" >&5
5255 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5256
5257 # Check whether --with-build-cpp or --without-build-cpp was given.
5258 if test "${with_build_cpp+set}" = set; then
5259   withval="$with_build_cpp"
5260   BUILD_CPP="$withval"
5261 else
5262   BUILD_CPP='${BUILD_CC} -E'
5263 fi;
5264         echo "$as_me:5264: result: $BUILD_CPP" >&5
5265 echo "${ECHO_T}$BUILD_CPP" >&6
5266
5267         echo "$as_me:5267: checking for native build C flags" >&5
5268 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5269
5270 # Check whether --with-build-cflags or --without-build-cflags was given.
5271 if test "${with_build_cflags+set}" = set; then
5272   withval="$with_build_cflags"
5273   BUILD_CFLAGS="$withval"
5274 fi;
5275         echo "$as_me:5275: result: $BUILD_CFLAGS" >&5
5276 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5277
5278         echo "$as_me:5278: checking for native build C preprocessor-flags" >&5
5279 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5280
5281 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5282 if test "${with_build_cppflags+set}" = set; then
5283   withval="$with_build_cppflags"
5284   BUILD_CPPFLAGS="$withval"
5285 fi;
5286         echo "$as_me:5286: result: $BUILD_CPPFLAGS" >&5
5287 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5288
5289         echo "$as_me:5289: checking for native build linker-flags" >&5
5290 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5291
5292 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5293 if test "${with_build_ldflags+set}" = set; then
5294   withval="$with_build_ldflags"
5295   BUILD_LDFLAGS="$withval"
5296 fi;
5297         echo "$as_me:5297: result: $BUILD_LDFLAGS" >&5
5298 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5299
5300         echo "$as_me:5300: checking for native build linker-libraries" >&5
5301 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5302
5303 # Check whether --with-build-libs or --without-build-libs was given.
5304 if test "${with_build_libs+set}" = set; then
5305   withval="$with_build_libs"
5306   BUILD_LIBS="$withval"
5307 fi;
5308         echo "$as_me:5308: result: $BUILD_LIBS" >&5
5309 echo "${ECHO_T}$BUILD_LIBS" >&6
5310
5311         # this assumes we're on Unix.
5312         BUILD_EXEEXT=
5313         BUILD_OBJEXT=o
5314
5315         : ${BUILD_CC:='${CC}'}
5316
5317         echo "$as_me:5317: checking if the build-compiler \"$BUILD_CC\" works" >&5
5318 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5319
5320         cf_save_crossed=$cross_compiling
5321         cf_save_ac_link=$ac_link
5322         cross_compiling=no
5323         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $BUILD_CPPFLAGS $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5324
5325         if test "$cross_compiling" = yes; then
5326   cf_ok_build_cc=unknown
5327 else
5328   cat >"conftest.$ac_ext" <<_ACEOF
5329 #line 5329 "configure"
5330 #include "confdefs.h"
5331 #include <stdio.h>
5332                 int main(int argc, char *argv[])
5333                 {
5334                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5335                 }
5336
5337 _ACEOF
5338 rm -f "conftest$ac_exeext"
5339 if { (eval echo "$as_me:5339: \"$ac_link\"") >&5
5340   (eval $ac_link) 2>&5
5341   ac_status=$?
5342   echo "$as_me:5342: \$? = $ac_status" >&5
5343   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5344   { (eval echo "$as_me:5344: \"$ac_try\"") >&5
5345   (eval $ac_try) 2>&5
5346   ac_status=$?
5347   echo "$as_me:5347: \$? = $ac_status" >&5
5348   (exit "$ac_status"); }; }; then
5349   cf_ok_build_cc=yes
5350 else
5351   echo "$as_me: program exited with status $ac_status" >&5
5352 echo "$as_me: failed program was:" >&5
5353 cat "conftest.$ac_ext" >&5
5354 cf_ok_build_cc=no
5355 fi
5356 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5357 fi
5358
5359         cross_compiling=$cf_save_crossed
5360         ac_link=$cf_save_ac_link
5361
5362         echo "$as_me:5362: result: $cf_ok_build_cc" >&5
5363 echo "${ECHO_T}$cf_ok_build_cc" >&6
5364
5365         if test "$cf_ok_build_cc" != yes
5366         then
5367                 { { echo "$as_me:5367: error: Cross-build requires two compilers.
5368 Use --with-build-cc to specify the native compiler." >&5
5369 echo "$as_me: error: Cross-build requires two compilers.
5370 Use --with-build-cc to specify the native compiler." >&2;}
5371    { (exit 1); exit 1; }; }
5372         fi
5373
5374 else
5375         : ${BUILD_CC:='${CC}'}
5376         : ${BUILD_CPP:='${CPP}'}
5377         : ${BUILD_CFLAGS:='${CFLAGS}'}
5378         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5379         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5380         : ${BUILD_LIBS:='${LIBS}'}
5381         : ${BUILD_EXEEXT:='$x'}
5382         : ${BUILD_OBJEXT:='o'}
5383 fi
5384
5385 ###############################################################################
5386
5387 ### Options to allow the user to specify the set of libraries which are used.
5388 ### Use "--without-normal --with-shared" to allow the default model to be
5389 ### shared, for example.
5390 cf_list_models=""
5391
5392 echo "$as_me:5392: checking if libtool -version-number should be used" >&5
5393 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5394
5395 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5396 if test "${enable_libtool_version+set}" = set; then
5397   enableval="$enable_libtool_version"
5398   test "$enableval" != no && enableval=yes
5399         if test "$enableval" != "yes" ; then
5400     cf_libtool_version=no
5401         else
5402                 cf_libtool_version=yes
5403         fi
5404 else
5405   enableval=yes
5406         cf_libtool_version=yes
5407
5408 fi;
5409 echo "$as_me:5409: result: $cf_libtool_version" >&5
5410 echo "${ECHO_T}$cf_libtool_version" >&6
5411
5412 if test "$cf_libtool_version" = yes ; then
5413         LIBTOOL_VERSION="-version-number"
5414 else
5415         LIBTOOL_VERSION="-version-info"
5416         case "x$VERSION" in
5417         (x)
5418                 { echo "$as_me:5418: WARNING: VERSION was not set" >&5
5419 echo "$as_me: WARNING: VERSION was not set" >&2;}
5420                 ;;
5421         (x*.*.*)
5422                 ABI_VERSION="$VERSION"
5423                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5424
5425 echo "${as_me:-configure}:5425: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5426
5427                 ;;
5428         (x*:*:*)
5429                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5430                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5431
5432 echo "${as_me:-configure}:5432: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5433
5434                 ;;
5435         (*)
5436                 { echo "$as_me:5436: WARNING: unexpected VERSION value: $VERSION" >&5
5437 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5438                 ;;
5439         esac
5440 fi
5441
5442 LIBTOOL=
5443
5444 # common library maintenance symbols that are convenient for libtool scripts:
5445 LIB_CREATE='${AR} -cr'
5446 LIB_OBJECT='${OBJECTS}'
5447 LIB_SUFFIX=.a
5448 LIB_PREP="$RANLIB"
5449
5450 # symbols used to prop libtool up to enable it to determine what it should be
5451 # doing:
5452 LIB_CLEAN=
5453 LIB_COMPILE=
5454 LIB_LINK='${CC}'
5455 LIB_INSTALL=
5456 LIB_UNINSTALL=
5457
5458 echo "$as_me:5458: checking if you want to build libraries with libtool" >&5
5459 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5460
5461 # Check whether --with-libtool or --without-libtool was given.
5462 if test "${with_libtool+set}" = set; then
5463   withval="$with_libtool"
5464   with_libtool=$withval
5465 else
5466   with_libtool=no
5467 fi;
5468 echo "$as_me:5468: result: $with_libtool" >&5
5469 echo "${ECHO_T}$with_libtool" >&6
5470 if test "$with_libtool" != "no"; then
5471
5472         if test "$with_libtool" != "yes" ; then
5473
5474 if test "x$prefix" != xNONE; then
5475         cf_path_syntax="$prefix"
5476 else
5477         cf_path_syntax="$ac_default_prefix"
5478 fi
5479
5480 case ".$with_libtool" in
5481 (.\$\(*\)*|.\'*\'*)
5482         ;;
5483 (..|./*|.\\*)
5484         ;;
5485 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5486         ;;
5487 (.\$\{*prefix\}*|.\$\{*dir\}*)
5488         eval with_libtool="$with_libtool"
5489         case ".$with_libtool" in
5490         (.NONE/*)
5491                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5492                 ;;
5493         esac
5494         ;;
5495 (.no|.NONE/*)
5496         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5497         ;;
5498 (*)
5499         { { echo "$as_me:5499: error: expected a pathname, not \"$with_libtool\"" >&5
5500 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5501    { (exit 1); exit 1; }; }
5502         ;;
5503 esac
5504
5505                 LIBTOOL=$with_libtool
5506         else
5507                 if test -n "$ac_tool_prefix"; then
5508   for ac_prog in libtool glibtool
5509   do
5510     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5511 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5512 echo "$as_me:5512: checking for $ac_word" >&5
5513 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5514 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5515   echo $ECHO_N "(cached) $ECHO_C" >&6
5516 else
5517   if test -n "$LIBTOOL"; then
5518   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5519 else
5520   ac_save_IFS=$IFS; IFS=$ac_path_separator
5521 ac_dummy="$PATH"
5522 for ac_dir in $ac_dummy; do
5523   IFS=$ac_save_IFS
5524   test -z "$ac_dir" && ac_dir=.
5525   $as_executable_p "$ac_dir/$ac_word" || continue
5526 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5527 echo "$as_me:5527: found $ac_dir/$ac_word" >&5
5528 break
5529 done
5530
5531 fi
5532 fi
5533 LIBTOOL=$ac_cv_prog_LIBTOOL
5534 if test -n "$LIBTOOL"; then
5535   echo "$as_me:5535: result: $LIBTOOL" >&5
5536 echo "${ECHO_T}$LIBTOOL" >&6
5537 else
5538   echo "$as_me:5538: result: no" >&5
5539 echo "${ECHO_T}no" >&6
5540 fi
5541
5542     test -n "$LIBTOOL" && break
5543   done
5544 fi
5545 if test -z "$LIBTOOL"; then
5546   ac_ct_LIBTOOL=$LIBTOOL
5547   for ac_prog in libtool glibtool
5548 do
5549   # Extract the first word of "$ac_prog", so it can be a program name with args.
5550 set dummy $ac_prog; ac_word=$2
5551 echo "$as_me:5551: checking for $ac_word" >&5
5552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5553 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5554   echo $ECHO_N "(cached) $ECHO_C" >&6
5555 else
5556   if test -n "$ac_ct_LIBTOOL"; then
5557   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5558 else
5559   ac_save_IFS=$IFS; IFS=$ac_path_separator
5560 ac_dummy="$PATH"
5561 for ac_dir in $ac_dummy; do
5562   IFS=$ac_save_IFS
5563   test -z "$ac_dir" && ac_dir=.
5564   $as_executable_p "$ac_dir/$ac_word" || continue
5565 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5566 echo "$as_me:5566: found $ac_dir/$ac_word" >&5
5567 break
5568 done
5569
5570 fi
5571 fi
5572 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5573 if test -n "$ac_ct_LIBTOOL"; then
5574   echo "$as_me:5574: result: $ac_ct_LIBTOOL" >&5
5575 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5576 else
5577   echo "$as_me:5577: result: no" >&5
5578 echo "${ECHO_T}no" >&6
5579 fi
5580
5581   test -n "$ac_ct_LIBTOOL" && break
5582 done
5583 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5584
5585   LIBTOOL=$ac_ct_LIBTOOL
5586 fi
5587
5588 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5589 then
5590         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.].*//'`
5591 else
5592         cf_cv_libtool_version=
5593 fi
5594 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5595
5596                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5597                 then
5598
5599 unset ac_cv_prog_ac_ct_LIBTOOL
5600 unset ac_ct_LIBTOOL
5601 unset LIBTOOL
5602
5603                         if test -n "$ac_tool_prefix"; then
5604   for ac_prog in glibtool
5605   do
5606     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5607 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5608 echo "$as_me:5608: checking for $ac_word" >&5
5609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5610 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5611   echo $ECHO_N "(cached) $ECHO_C" >&6
5612 else
5613   if test -n "$LIBTOOL"; then
5614   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5615 else
5616   ac_save_IFS=$IFS; IFS=$ac_path_separator
5617 ac_dummy="$PATH"
5618 for ac_dir in $ac_dummy; do
5619   IFS=$ac_save_IFS
5620   test -z "$ac_dir" && ac_dir=.
5621   $as_executable_p "$ac_dir/$ac_word" || continue
5622 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5623 echo "$as_me:5623: found $ac_dir/$ac_word" >&5
5624 break
5625 done
5626
5627 fi
5628 fi
5629 LIBTOOL=$ac_cv_prog_LIBTOOL
5630 if test -n "$LIBTOOL"; then
5631   echo "$as_me:5631: result: $LIBTOOL" >&5
5632 echo "${ECHO_T}$LIBTOOL" >&6
5633 else
5634   echo "$as_me:5634: result: no" >&5
5635 echo "${ECHO_T}no" >&6
5636 fi
5637
5638     test -n "$LIBTOOL" && break
5639   done
5640 fi
5641 if test -z "$LIBTOOL"; then
5642   ac_ct_LIBTOOL=$LIBTOOL
5643   for ac_prog in glibtool
5644 do
5645   # Extract the first word of "$ac_prog", so it can be a program name with args.
5646 set dummy $ac_prog; ac_word=$2
5647 echo "$as_me:5647: checking for $ac_word" >&5
5648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5649 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652   if test -n "$ac_ct_LIBTOOL"; then
5653   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5654 else
5655   ac_save_IFS=$IFS; IFS=$ac_path_separator
5656 ac_dummy="$PATH"
5657 for ac_dir in $ac_dummy; do
5658   IFS=$ac_save_IFS
5659   test -z "$ac_dir" && ac_dir=.
5660   $as_executable_p "$ac_dir/$ac_word" || continue
5661 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5662 echo "$as_me:5662: found $ac_dir/$ac_word" >&5
5663 break
5664 done
5665
5666 fi
5667 fi
5668 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5669 if test -n "$ac_ct_LIBTOOL"; then
5670   echo "$as_me:5670: result: $ac_ct_LIBTOOL" >&5
5671 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5672 else
5673   echo "$as_me:5673: result: no" >&5
5674 echo "${ECHO_T}no" >&6
5675 fi
5676
5677   test -n "$ac_ct_LIBTOOL" && break
5678 done
5679 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5680
5681   LIBTOOL=$ac_ct_LIBTOOL
5682 fi
5683
5684 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5685 then
5686         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.].*//'`
5687 else
5688         cf_cv_libtool_version=
5689 fi
5690 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5691
5692                 fi
5693         fi
5694         if test -z "$LIBTOOL" ; then
5695                 { { echo "$as_me:5695: error: Cannot find libtool" >&5
5696 echo "$as_me: error: Cannot find libtool" >&2;}
5697    { (exit 1); exit 1; }; }
5698         fi
5699         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5700         LIB_OBJECT='${OBJECTS:.o=.lo}'
5701         LIB_SUFFIX=.la
5702         LIB_CLEAN='${LIBTOOL} --mode=clean'
5703         LIB_COMPILE='${LIBTOOL} --mode=compile'
5704         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5705         LIB_INSTALL='${LIBTOOL} --mode=install'
5706         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5707         LIB_PREP=:
5708
5709 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5710 then
5711         echo "$as_me:5711: checking version of $LIBTOOL" >&5
5712 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5713
5714 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5715 then
5716         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.].*//'`
5717 else
5718         cf_cv_libtool_version=
5719 fi
5720 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5721
5722         echo "$as_me:5722: result: $cf_cv_libtool_version" >&5
5723 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5724         if test -n "$cf_cv_libtool_version"
5725         then
5726                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5727                 case "x$cf_check_libtool_version" in
5728                 (*...GNU-libtool...*)
5729                         ;;
5730                 (*)
5731                         { { echo "$as_me:5731: error: This is not GNU libtool" >&5
5732 echo "$as_me: error: This is not GNU libtool" >&2;}
5733    { (exit 1); exit 1; }; }
5734                         ;;
5735                 esac
5736         else
5737                 { { echo "$as_me:5737: error: No version found for $LIBTOOL" >&5
5738 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5739    { (exit 1); exit 1; }; }
5740         fi
5741 else
5742         { { echo "$as_me:5742: error: GNU libtool has not been found" >&5
5743 echo "$as_me: error: GNU libtool has not been found" >&2;}
5744    { (exit 1); exit 1; }; }
5745 fi
5746
5747         # special hack to add -no-undefined (which libtool should do for itself)
5748         LT_UNDEF=
5749         case "$cf_cv_system_name" in
5750         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5751                 LT_UNDEF=-no-undefined
5752                 ;;
5753         esac
5754
5755         # special hack to add --tag option for C++ compiler
5756         case "$cf_cv_libtool_version" in
5757         (1.[5-9]*|[2-9].[0-9.a-z]*)
5758                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5759                 LIBTOOL="$LIBTOOL --tag=CC"
5760                 ;;
5761         (*)
5762                 LIBTOOL_CXX="$LIBTOOL"
5763                 ;;
5764         esac
5765 else
5766         LIBTOOL=""
5767         LIBTOOL_CXX=""
5768 fi
5769
5770 test -z "$LIBTOOL" && ECHO_LT=
5771
5772 if test "$with_libtool" != "no" ; then
5773
5774 cf_list_models="$cf_list_models libtool"
5775
5776 else
5777
5778 echo "$as_me:5778: checking if you want to build shared libraries" >&5
5779 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5780
5781 # Check whether --with-shared or --without-shared was given.
5782 if test "${with_shared+set}" = set; then
5783   withval="$with_shared"
5784   with_shared=$withval
5785 else
5786   with_shared=no
5787 fi;
5788 echo "$as_me:5788: result: $with_shared" >&5
5789 echo "${ECHO_T}$with_shared" >&6
5790 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5791
5792 echo "$as_me:5792: checking if you want to build static libraries" >&5
5793 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5794
5795 # Check whether --with-normal or --without-normal was given.
5796 if test "${with_normal+set}" = set; then
5797   withval="$with_normal"
5798   with_normal=$withval
5799 else
5800   with_normal=yes
5801 fi;
5802 echo "$as_me:5802: result: $with_normal" >&5
5803 echo "${ECHO_T}$with_normal" >&6
5804 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5805
5806 echo "$as_me:5806: checking if you want to build debug libraries" >&5
5807 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5808
5809 # Check whether --with-debug or --without-debug was given.
5810 if test "${with_debug+set}" = set; then
5811   withval="$with_debug"
5812   with_debug=$withval
5813 else
5814   with_debug=yes
5815 fi;
5816 echo "$as_me:5816: result: $with_debug" >&5
5817 echo "${ECHO_T}$with_debug" >&6
5818 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5819
5820 echo "$as_me:5820: checking if you want to build profiling libraries" >&5
5821 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5822
5823 # Check whether --with-profile or --without-profile was given.
5824 if test "${with_profile+set}" = set; then
5825   withval="$with_profile"
5826   with_profile=$withval
5827 else
5828   with_profile=no
5829 fi;
5830 echo "$as_me:5830: result: $with_profile" >&5
5831 echo "${ECHO_T}$with_profile" >&6
5832 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5833
5834 fi
5835
5836 if test "X$cf_with_cxx_binding" != Xno; then
5837 if test "x$with_shared" = "xyes"; then
5838 echo "$as_me:5838: checking if you want to build C++ shared libraries" >&5
5839 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5840
5841 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5842 if test "${with_cxx_shared+set}" = set; then
5843   withval="$with_cxx_shared"
5844   with_shared_cxx=$withval
5845 else
5846   with_shared_cxx=no
5847 fi;
5848 echo "$as_me:5848: result: $with_shared_cxx" >&5
5849 echo "${ECHO_T}$with_shared_cxx" >&6
5850 fi
5851 fi
5852
5853 ###############################################################################
5854
5855 echo "$as_me:5855: checking for specified models" >&5
5856 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5857 test -z "$cf_list_models" && cf_list_models=normal
5858 test "$with_libtool" != "no" && cf_list_models=libtool
5859 echo "$as_me:5859: result: $cf_list_models" >&5
5860 echo "${ECHO_T}$cf_list_models" >&6
5861
5862 ### Use the first model as the default, and save its suffix for use in building
5863 ### up test-applications.
5864 echo "$as_me:5864: checking for default model" >&5
5865 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5866 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5867 echo "$as_me:5867: result: $DFT_LWR_MODEL" >&5
5868 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5869
5870 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5871
5872 TICS_NAME=tic
5873
5874 TINFO_NAME=tinfo
5875
5876 LIB_NAME=ncurses
5877
5878 LIB_DIR=../lib
5879 LIB_2ND=../../lib
5880
5881 echo "$as_me:5881: checking if you want to have a library-prefix" >&5
5882 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5883
5884 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5885 if test "${with_lib_prefix+set}" = set; then
5886   withval="$with_lib_prefix"
5887   with_lib_prefix=$withval
5888 else
5889   with_lib_prefix=auto
5890 fi;
5891 echo "$as_me:5891: result: $with_lib_prefix" >&5
5892 echo "${ECHO_T}$with_lib_prefix" >&6
5893
5894 if test "$with_lib_prefix" = auto
5895 then
5896
5897         case "$cf_cv_system_name" in
5898         (OS/2*|os2*)
5899                 if test "$DFT_LWR_MODEL" = libtool; then
5900                         LIB_PREFIX='lib'
5901                 else
5902                         LIB_PREFIX=''
5903                 fi
5904                 ;;
5905         (*-msvc*)
5906                 LIB_PREFIX=''
5907                 ;;
5908         (*)     LIB_PREFIX='lib'
5909                 ;;
5910         esac
5911 cf_prefix=$LIB_PREFIX
5912
5913 elif test "$with_lib_prefix" = no
5914 then
5915         LIB_PREFIX=
5916 else
5917         LIB_PREFIX=$with_lib_prefix
5918 fi
5919
5920 LIB_SUFFIX=
5921
5922         echo "$as_me:5922: checking for PATH separator" >&5
5923 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5924         case "$cf_cv_system_name" in
5925         (os2*)  PATH_SEPARATOR=';'  ;;
5926         (*)     ${PATH_SEPARATOR:=':'}  ;;
5927         esac
5928
5929         echo "$as_me:5929: result: $PATH_SEPARATOR" >&5
5930 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5931
5932 ###############################################################################
5933
5934 echo "$as_me:5934: checking if you want to build a separate terminfo library" >&5
5935 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5936
5937 # Check whether --with-termlib or --without-termlib was given.
5938 if test "${with_termlib+set}" = set; then
5939   withval="$with_termlib"
5940   with_termlib=$withval
5941 else
5942   with_termlib=no
5943 fi;
5944 echo "$as_me:5944: result: $with_termlib" >&5
5945 echo "${ECHO_T}$with_termlib" >&6
5946
5947 echo "$as_me:5947: checking if you want to build a separate tic library" >&5
5948 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5949
5950 # Check whether --with-ticlib or --without-ticlib was given.
5951 if test "${with_ticlib+set}" = set; then
5952   withval="$with_ticlib"
5953   with_ticlib=$withval
5954 else
5955   with_ticlib=no
5956 fi;
5957 echo "$as_me:5957: result: $with_ticlib" >&5
5958 echo "${ECHO_T}$with_ticlib" >&6
5959
5960 if test X"$CC_G_OPT" = X"" ; then
5961         CC_G_OPT='-g'
5962         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5963 fi
5964
5965 if test X"$CXX_G_OPT" = X"" ; then
5966         CXX_G_OPT='-g'
5967         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5968 fi
5969
5970 echo "$as_me:5970: checking for default loader flags" >&5
5971 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5972 case "$DFT_LWR_MODEL" in
5973 (libtool) LD_MODEL=''   ;;
5974 (normal)  LD_MODEL=''   ;;
5975 (debug)   LD_MODEL=$CC_G_OPT ;;
5976 (profile) LD_MODEL='-pg';;
5977 (shared)  LD_MODEL=''   ;;
5978 esac
5979 echo "$as_me:5979: result: $LD_MODEL" >&5
5980 echo "${ECHO_T}$LD_MODEL" >&6
5981
5982 case "$DFT_LWR_MODEL" in
5983 (shared)
5984
5985 echo "$as_me:5985: checking if rpath option should be used" >&5
5986 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5987
5988 # Check whether --enable-rpath or --disable-rpath was given.
5989 if test "${enable_rpath+set}" = set; then
5990   enableval="$enable_rpath"
5991   cf_cv_enable_rpath=$enableval
5992 else
5993   cf_cv_enable_rpath=no
5994 fi;
5995 echo "$as_me:5995: result: $cf_cv_enable_rpath" >&5
5996 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5997
5998 echo "$as_me:5998: checking if shared libraries should be relinked during install" >&5
5999 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6000
6001 # Check whether --enable-relink or --disable-relink was given.
6002 if test "${enable_relink+set}" = set; then
6003   enableval="$enable_relink"
6004   cf_cv_do_relink=$enableval
6005 else
6006   cf_cv_do_relink=yes
6007 fi;
6008 echo "$as_me:6008: result: $cf_cv_do_relink" >&5
6009 echo "${ECHO_T}$cf_cv_do_relink" >&6
6010         ;;
6011 esac
6012
6013 # we will build libraries one-level down.
6014 rel_builddir=..
6015
6016 LD_RPATH_OPT=
6017 if test "x$cf_cv_enable_rpath" != xno
6018 then
6019         echo "$as_me:6019: checking for an rpath option" >&5
6020 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6021         case "$cf_cv_system_name" in
6022         (irix*)
6023                 if test "$GCC" = yes; then
6024                         LD_RPATH_OPT="-Wl,-rpath,"
6025                 else
6026                         LD_RPATH_OPT="-rpath "
6027                 fi
6028                 ;;
6029         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6030                 LD_RPATH_OPT="-Wl,-rpath,"
6031                 ;;
6032         (openbsd[2-9].*|mirbsd*)
6033                 LD_RPATH_OPT="-Wl,-rpath,"
6034                 ;;
6035         (dragonfly*)
6036                 LD_RPATH_OPT="-rpath "
6037                 ;;
6038         (netbsd*)
6039                 LD_RPATH_OPT="-Wl,-rpath,"
6040                 ;;
6041         (osf*|mls+*)
6042                 LD_RPATH_OPT="-rpath "
6043                 ;;
6044         (solaris2*)
6045                 LD_RPATH_OPT="-R"
6046                 ;;
6047         (*)
6048                 ;;
6049         esac
6050         echo "$as_me:6050: result: $LD_RPATH_OPT" >&5
6051 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6052
6053         case "x$LD_RPATH_OPT" in
6054         (x-R*)
6055                 echo "$as_me:6055: checking if we need a space after rpath option" >&5
6056 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6057                 cf_save_LIBS="$LIBS"
6058
6059 cf_add_libs="$LIBS"
6060 # reverse order
6061 cf_add_0lib=
6062 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6063 # filter duplicates
6064 for cf_add_1lib in $cf_add_0lib; do
6065         for cf_add_2lib in $cf_add_libs; do
6066                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6067                         cf_add_1lib=
6068                         break
6069                 fi
6070         done
6071         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6072 done
6073 LIBS="$cf_add_libs"
6074
6075                 cat >"conftest.$ac_ext" <<_ACEOF
6076 #line 6076 "configure"
6077 #include "confdefs.h"
6078
6079 int
6080 main (void)
6081 {
6082
6083   ;
6084   return 0;
6085 }
6086 _ACEOF
6087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6088 if { (eval echo "$as_me:6088: \"$ac_link\"") >&5
6089   (eval $ac_link) 2>&5
6090   ac_status=$?
6091   echo "$as_me:6091: \$? = $ac_status" >&5
6092   (exit "$ac_status"); } &&
6093          { ac_try='test -s "conftest$ac_exeext"'
6094   { (eval echo "$as_me:6094: \"$ac_try\"") >&5
6095   (eval $ac_try) 2>&5
6096   ac_status=$?
6097   echo "$as_me:6097: \$? = $ac_status" >&5
6098   (exit "$ac_status"); }; }; then
6099   cf_rpath_space=no
6100 else
6101   echo "$as_me: failed program was:" >&5
6102 cat "conftest.$ac_ext" >&5
6103 cf_rpath_space=yes
6104 fi
6105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6106                 LIBS="$cf_save_LIBS"
6107                 echo "$as_me:6107: result: $cf_rpath_space" >&5
6108 echo "${ECHO_T}$cf_rpath_space" >&6
6109                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6110                 ;;
6111         esac
6112 fi
6113
6114         RM_SHARED_OPTS=
6115         LOCAL_LDFLAGS=
6116         LOCAL_LDFLAGS2=
6117         LD_SHARED_OPTS=
6118         INSTALL_LIB="-m 644"
6119         : ${rel_builddir:=.}
6120
6121         shlibdir=$libdir
6122
6123         MAKE_DLLS="#"
6124
6125         cf_cv_do_symlinks=no
6126         cf_ld_rpath_opt=
6127         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6128
6129         echo "$as_me:6129: checking if release/abi version should be used for shared libs" >&5
6130 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6131
6132 # Check whether --with-shlib-version or --without-shlib-version was given.
6133 if test "${with_shlib_version+set}" = set; then
6134   withval="$with_shlib_version"
6135   test -z "$withval" && withval=auto
6136         case "$withval" in
6137         (yes)
6138                 cf_cv_shlib_version=auto
6139                 ;;
6140         (rel|abi|auto)
6141                 cf_cv_shlib_version=$withval
6142                 ;;
6143         (*)
6144                 echo "$as_me:6144: result: $withval" >&5
6145 echo "${ECHO_T}$withval" >&6
6146                 { { echo "$as_me:6146: error: option value must be one of: rel, abi, or auto" >&5
6147 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6148    { (exit 1); exit 1; }; }
6149                 ;;
6150         esac
6151
6152 else
6153   cf_cv_shlib_version=auto
6154 fi;
6155         echo "$as_me:6155: result: $cf_cv_shlib_version" >&5
6156 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6157
6158         cf_cv_rm_so_locs=no
6159         cf_try_cflags=
6160
6161         # Some less-capable ports of gcc support only -fpic
6162         CC_SHARED_OPTS=
6163
6164         cf_try_fPIC=no
6165         if test "$GCC" = yes
6166         then
6167                 cf_try_fPIC=yes
6168         else
6169                 case "$cf_cv_system_name" in
6170                 (*linux*)       # e.g., PGI compiler
6171                         cf_try_fPIC=yes
6172                         ;;
6173                 esac
6174         fi
6175
6176         if test "$cf_try_fPIC" = yes
6177         then
6178                 echo "$as_me:6178: checking which $CC option to use" >&5
6179 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6180                 cf_save_CFLAGS="$CFLAGS"
6181                 for CC_SHARED_OPTS in -fPIC -fpic ''
6182                 do
6183                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6184                         cat >"conftest.$ac_ext" <<_ACEOF
6185 #line 6185 "configure"
6186 #include "confdefs.h"
6187 #include <stdio.h>
6188 int
6189 main (void)
6190 {
6191 int x = 1
6192   ;
6193   return 0;
6194 }
6195 _ACEOF
6196 rm -f "conftest.$ac_objext"
6197 if { (eval echo "$as_me:6197: \"$ac_compile\"") >&5
6198   (eval $ac_compile) 2>&5
6199   ac_status=$?
6200   echo "$as_me:6200: \$? = $ac_status" >&5
6201   (exit "$ac_status"); } &&
6202          { ac_try='test -s "conftest.$ac_objext"'
6203   { (eval echo "$as_me:6203: \"$ac_try\"") >&5
6204   (eval $ac_try) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit "$ac_status"); }; }; then
6208   break
6209 else
6210   echo "$as_me: failed program was:" >&5
6211 cat "conftest.$ac_ext" >&5
6212 fi
6213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6214                 done
6215                 echo "$as_me:6215: result: $CC_SHARED_OPTS" >&5
6216 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6217                 CFLAGS="$cf_save_CFLAGS"
6218         fi
6219
6220         cf_cv_shlib_version_infix=no
6221
6222         case "$cf_cv_system_name" in
6223         (aix4.3-9*|aix[5-7]*)
6224                 if test "$GCC" = yes; then
6225                         CC_SHARED_OPTS='-Wl,-brtl'
6226                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6227                 else
6228                         CC_SHARED_OPTS='-brtl'
6229                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6230                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6231                 fi
6232                 ;;
6233         (beos*)
6234                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6235                 ;;
6236         (cygwin*)
6237                 CC_SHARED_OPTS=
6238                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6239                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6240                 cf_cv_shlib_version=cygdll
6241                 cf_cv_shlib_version_infix=cygdll
6242                 shlibdir=$bindir
6243                 MAKE_DLLS=
6244                 cat >mk_shared_lib.sh <<-CF_EOF
6245                 #!$SHELL
6246                 SHARED_LIB=\$1
6247                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6248                 shift
6249                 cat <<-EOF
6250                 Linking shared library
6251                 ** SHARED_LIB \$SHARED_LIB
6252                 ** IMPORT_LIB \$IMPORT_LIB
6253 EOF
6254                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6255 CF_EOF
6256                 chmod +x mk_shared_lib.sh
6257                 ;;
6258         (msys*)
6259                 CC_SHARED_OPTS=
6260                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6261                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6262                 cf_cv_shlib_version=msysdll
6263                 cf_cv_shlib_version_infix=msysdll
6264                 shlibdir=$bindir
6265                 MAKE_DLLS=
6266                 cat >mk_shared_lib.sh <<-CF_EOF
6267                 #!$SHELL
6268                 SHARED_LIB=\$1
6269                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6270                 shift
6271                 cat <<-EOF
6272                 Linking shared library
6273                 ** SHARED_LIB \$SHARED_LIB
6274                 ** IMPORT_LIB \$IMPORT_LIB
6275 EOF
6276                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6277 CF_EOF
6278                 chmod +x mk_shared_lib.sh
6279                 ;;
6280         (darwin*)
6281                 cf_try_cflags="no-cpp-precomp"
6282                 CC_SHARED_OPTS="-dynamic"
6283                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6284                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6285                 cf_cv_shlib_version_infix=yes
6286                 echo "$as_me:6286: checking if ld -search_paths_first works" >&5
6287 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6288 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6289   echo $ECHO_N "(cached) $ECHO_C" >&6
6290 else
6291
6292                         cf_save_LDFLAGS=$LDFLAGS
6293                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6294                         cat >"conftest.$ac_ext" <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297
6298 int
6299 main (void)
6300 {
6301 int i;
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6307 if { (eval echo "$as_me:6307: \"$ac_link\"") >&5
6308   (eval $ac_link) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit "$ac_status"); } &&
6312          { ac_try='test -s "conftest$ac_exeext"'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit "$ac_status"); }; }; then
6318   cf_cv_ldflags_search_paths_first=yes
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat "conftest.$ac_ext" >&5
6322 cf_cv_ldflags_search_paths_first=no
6323 fi
6324 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6325                                 LDFLAGS=$cf_save_LDFLAGS
6326 fi
6327 echo "$as_me:6327: result: $cf_cv_ldflags_search_paths_first" >&5
6328 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6329                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6330                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6331                 fi
6332                 ;;
6333         (haiku*)
6334
6335         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6336         if test "$cf_cv_shlib_version" = rel; then
6337                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6338         else
6339                 cf_cv_shared_soname='`basename $@`'
6340         fi
6341
6342                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6343                 ;;
6344         (hpux[7-8]*)
6345                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6346                 if test "$GCC" != yes; then
6347                         CC_SHARED_OPTS='+Z'
6348                 fi
6349                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6350                 INSTALL_LIB="-m 555"
6351                 ;;
6352         (hpux*)
6353                 # (tested with gcc 2.7.2 -- I don't have c89)
6354                 if test "$GCC" = yes; then
6355                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6356                 else
6357                         CC_SHARED_OPTS='+Z'
6358                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6359                 fi
6360                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6361                 # HP-UX shared libraries must be executable, and should be
6362                 # readonly to exploit a quirk in the memory manager.
6363                 INSTALL_LIB="-m 555"
6364                 ;;
6365         (interix*)
6366                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6367                 if test "$cf_cv_shlib_version" = rel; then
6368                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6369                 else
6370                         cf_shared_soname='`basename $@`'
6371                 fi
6372                 CC_SHARED_OPTS=
6373                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6374                 ;;
6375         (irix*)
6376                 if test "$cf_cv_enable_rpath" = yes ; then
6377                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6378                 fi
6379                 # tested with IRIX 5.2 and 'cc'.
6380                 if test "$GCC" != yes; then
6381                         CC_SHARED_OPTS='-KPIC'
6382                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6383                 else
6384                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6385                 fi
6386                 cf_cv_rm_so_locs=yes
6387                 ;;
6388         (linux*|gnu*|k*bsd*-gnu)
6389                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6390                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6391                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6392                 fi
6393                 if test "$cf_cv_enable_rpath" = yes ; then
6394                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6395                 fi
6396
6397         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6398         if test "$cf_cv_shlib_version" = rel; then
6399                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6400         else
6401                 cf_cv_shared_soname='`basename $@`'
6402         fi
6403
6404                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6405                 ;;
6406         (mingw*msvc*)
6407                 cf_cv_shlib_version=msvcdll
6408                 cf_cv_shlib_version_infix=msvcdll
6409                 shlibdir=$bindir
6410                 MAKE_DLLS=
6411                 if test "$DFT_LWR_MODEL" = "shared" ; then
6412                         LOCAL_LDFLAGS="-link -dll"
6413                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6414                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6415                 fi
6416                 CC_SHARED_OPTS=
6417                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6418                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6419                 cat >mk_shared_lib.sh <<-CF_EOF
6420                 #!$SHELL
6421                 SHARED_LIB=\$1
6422                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6423                 shift
6424                 my_ld=\$1
6425                 shift
6426                 cat <<-EOF
6427                 Linking shared library
6428                 ** SHARED LIB \$SHARED_LIB
6429                 ** IMPORT_LIB \$IMPORT_LIB
6430 EOF
6431                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6432                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6433                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6434 CF_EOF
6435                 chmod +x mk_shared_lib.sh
6436                 cat >mk_prog.sh <<-CF_EOF
6437                 #!$SHELL
6438                 shift
6439                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6440                 LD="$LD"
6441                 clopts=()
6442                 ldopts=("/subsystem:console")
6443                 libs=()
6444                 isdll=0
6445                 while test \$# -gt 0; do
6446                         case "\$1" in
6447                                 -link)
6448                                         # ignore -link argument
6449                                         ;;
6450                                 -M[TD] | -M[TD]d)
6451                                         # ignore runtime-library option
6452                                         ;;
6453                                 -dll)
6454                                         isdll=1
6455                                         ;;
6456                                 -W* | -w*)
6457                                         # ignore warnings
6458                                         ;;
6459                                 -D*)
6460                                         clopts+=("\$1")
6461                                         ;;
6462                                 -I*)
6463                                         clopts+=("\$1")
6464                                         ;;
6465                                 -l*)
6466                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6467                                         ;;
6468                                 -L*)
6469                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6470                                         ;;
6471                                 *.obj | *.o)
6472                                         ldopts+=("\$1")
6473                                         ;;
6474                                 -Wl,*)
6475                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6476                                                 ldopts+=("\${linkarg}")
6477                                         done
6478                                         ;;
6479                                 *.lib)
6480                                         ldopts+=("\$1")
6481                                         ;;
6482                                 -o)
6483                                         shift
6484                                         ldopts+=("-out:\$1")
6485                                         ;;
6486                                 *)
6487                                         clopts+=("\$1")
6488                                         ldopts+=("\$1")
6489                                         ;;
6490                         esac
6491                         shift
6492                 done
6493                 if [ "\$isdll" -ne 0 ]; then
6494                         for lib in \${libs[*]}; do
6495                                 ldopts+=("\$lib.dll.lib")
6496                         done
6497                 else
6498                         for lib in \${libs[*]}; do
6499                                 ldopts+=("\$lib.lib")
6500                         done
6501                 fi
6502                 cat <<-EOF
6503                 Creating program
6504                 ** ld options:   "\${ldopts[@]}"
6505 EOF
6506                 exec \$LD \${ldopts[@]}
6507 CF_EOF
6508                 chmod +x mk_prog.sh
6509                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6510                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6511                 ;;
6512         (mingw*)
6513                 cf_cv_shlib_version=mingw
6514                 cf_cv_shlib_version_infix=mingw
6515                 shlibdir=$bindir
6516                 MAKE_DLLS=
6517                 if test "$DFT_LWR_MODEL" = "shared" ; then
6518                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6519                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6520                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6521                 fi
6522                 CC_SHARED_OPTS=
6523                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6524                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6525                 cat >mk_shared_lib.sh <<-CF_EOF
6526                 #!$SHELL
6527                 SHARED_LIB=\$1
6528                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6529                 shift
6530                 cat <<-EOF
6531                 Linking shared library
6532                 ** SHARED_LIB \$SHARED_LIB
6533                 ** IMPORT_LIB \$IMPORT_LIB
6534 EOF
6535                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6536 CF_EOF
6537                 chmod +x mk_shared_lib.sh
6538                 ;;
6539         (openbsd[2-9].*|mirbsd*)
6540                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6541                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6542                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6543                 fi
6544                 if test "$cf_cv_enable_rpath" = yes ; then
6545                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6546                 fi
6547                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6548
6549         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6550         if test "$cf_cv_shlib_version" = rel; then
6551                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6552         else
6553                 cf_cv_shared_soname='`basename $@`'
6554         fi
6555
6556                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6557                 ;;
6558         (nskJ*)
6559                 CC_SHARED_OPTS=
6560                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6561                 ;;
6562         (nskL*)
6563                 CC_SHARED_OPTS=
6564                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6565                 ;;
6566         (nto-qnx*|openbsd*|freebsd[12].*)
6567                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6568                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6569                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6570                 ;;
6571         (dragonfly*|freebsd*)
6572                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6573                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6574                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6575                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6576                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6577                 fi
6578
6579         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6580         if test "$cf_cv_shlib_version" = rel; then
6581                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6582         else
6583                 cf_cv_shared_soname='`basename $@`'
6584         fi
6585
6586                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6587                 ;;
6588         (netbsd*)
6589                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6590                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6591                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6592                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6593                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6594                         if test "$cf_cv_shlib_version" = auto; then
6595                         if test -f /usr/libexec/ld.elf_so; then
6596                                 cf_cv_shlib_version=abi
6597                         else
6598                                 cf_cv_shlib_version=rel
6599                         fi
6600                         fi
6601
6602         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6603         if test "$cf_cv_shlib_version" = rel; then
6604                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6605         else
6606                 cf_cv_shared_soname='`basename $@`'
6607         fi
6608
6609                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6610                 else
6611                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6612                 fi
6613                 ;;
6614         (osf*|mls+*)
6615                 # tested with OSF/1 V3.2 and 'cc'
6616                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6617                 # link with shared libs).
6618                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6619                 case "$host_os" in
6620                 (osf4*)
6621                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6622                         ;;
6623                 esac
6624                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6625                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6626                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6627                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6628                 fi
6629                 cf_cv_rm_so_locs=yes
6630                 ;;
6631         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6632                 # tested with osr5.0.5
6633                 if test "$GCC" != yes; then
6634                         CC_SHARED_OPTS='-belf -KPIC'
6635                 fi
6636                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6637                 if test "$cf_cv_enable_rpath" = yes ; then
6638                         # only way is to set LD_RUN_PATH but no switch for it
6639                         RUN_PATH=$libdir
6640                 fi
6641                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6642                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6643                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6644                 ;;
6645         (sunos4*)
6646                 # tested with SunOS 4.1.1 and gcc 2.7.0
6647                 if test "$GCC" != yes; then
6648                         CC_SHARED_OPTS='-KPIC'
6649                 fi
6650                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6651                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6652                 ;;
6653         (solaris2*)
6654                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6655                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6656                 if test "$DFT_LWR_MODEL" = "shared" ; then
6657                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6658                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6659                 fi
6660                 if test "$cf_cv_enable_rpath" = yes ; then
6661                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6662                 fi
6663
6664         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6665         if test "$cf_cv_shlib_version" = rel; then
6666                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6667         else
6668                 cf_cv_shared_soname='`basename $@`'
6669         fi
6670
6671                 if test "$GCC" != yes; then
6672                         cf_save_CFLAGS="$CFLAGS"
6673                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6674                         do
6675                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6676                                 cat >"conftest.$ac_ext" <<_ACEOF
6677 #line 6677 "configure"
6678 #include "confdefs.h"
6679 #include <stdio.h>
6680 int
6681 main (void)
6682 {
6683 printf("Hello\\n");
6684   ;
6685   return 0;
6686 }
6687 _ACEOF
6688 rm -f "conftest.$ac_objext"
6689 if { (eval echo "$as_me:6689: \"$ac_compile\"") >&5
6690   (eval $ac_compile) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit "$ac_status"); } &&
6694          { ac_try='test -s "conftest.$ac_objext"'
6695   { (eval echo "$as_me:6695: \"$ac_try\"") >&5
6696   (eval $ac_try) 2>&5
6697   ac_status=$?
6698   echo "$as_me:6698: \$? = $ac_status" >&5
6699   (exit "$ac_status"); }; }; then
6700   break
6701 else
6702   echo "$as_me: failed program was:" >&5
6703 cat "conftest.$ac_ext" >&5
6704 fi
6705 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6706                         done
6707                         CFLAGS="$cf_save_CFLAGS"
6708                         CC_SHARED_OPTS=$cf_shared_opts
6709                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6710                 else
6711                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6712                 fi
6713                 ;;
6714         (sysv5uw7*|unix_sv*)
6715                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6716                 if test "$GCC" != yes; then
6717                         CC_SHARED_OPTS='-KPIC'
6718                 fi
6719                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6720                 ;;
6721         (*)
6722                 CC_SHARED_OPTS='unknown'
6723                 MK_SHARED_LIB='echo unknown'
6724                 ;;
6725         esac
6726
6727         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6728         case "$cf_cv_shlib_version" in
6729         (rel|abi)
6730                 case "$MK_SHARED_LIB" in
6731                 (*'-o $@')
6732                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6733                         ;;
6734                 (*)
6735                         { echo "$as_me:6735: WARNING: ignored --with-shlib-version" >&5
6736 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6737                         ;;
6738                 esac
6739                 ;;
6740         esac
6741
6742         if test -n "$cf_try_cflags"
6743         then
6744 cat > conftest.$ac_ext <<EOF
6745 #line 6745 "${as_me:-configure}"
6746 #include <stdio.h>
6747 int main(int argc, char *argv[])
6748 {
6749         printf("hello\\n");
6750         return (argv[argc-1] == 0) ;
6751 }
6752 EOF
6753                 cf_save_CFLAGS="$CFLAGS"
6754                 for cf_opt in $cf_try_cflags
6755                 do
6756                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6757                         echo "$as_me:6757: checking if CFLAGS option -$cf_opt works" >&5
6758 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6759                         if { (eval echo "$as_me:6759: \"$ac_compile\"") >&5
6760   (eval $ac_compile) 2>&5
6761   ac_status=$?
6762   echo "$as_me:6762: \$? = $ac_status" >&5
6763   (exit "$ac_status"); }; then
6764                                 echo "$as_me:6764: result: yes" >&5
6765 echo "${ECHO_T}yes" >&6
6766                                 cf_save_CFLAGS="$CFLAGS"
6767                         else
6768                                 echo "$as_me:6768: result: no" >&5
6769 echo "${ECHO_T}no" >&6
6770                         fi
6771                 done
6772                 CFLAGS="$cf_save_CFLAGS"
6773         fi
6774
6775         # RPATH_LIST is a colon-separated list of directories
6776         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6777         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6778
6779         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6780
6781         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6782
6783 echo "${as_me:-configure}:6783: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6784
6785         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6786
6787 echo "${as_me:-configure}:6787: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6788
6789 for model in $cf_list_models ; do
6790         case "$model" in
6791         (libtool)
6792
6793 echo "$as_me:6793: checking for additional libtool options" >&5
6794 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6795
6796 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6797 if test "${with_libtool_opts+set}" = set; then
6798   withval="$with_libtool_opts"
6799   with_libtool_opts=$withval
6800 else
6801   with_libtool_opts=no
6802 fi;
6803 echo "$as_me:6803: result: $with_libtool_opts" >&5
6804 echo "${ECHO_T}$with_libtool_opts" >&6
6805
6806 case .$with_libtool_opts in
6807 (.yes|.no|.)
6808         ;;
6809 (*)
6810         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6811         ;;
6812 esac
6813
6814 echo "$as_me:6814: checking if exported-symbols file should be used" >&5
6815 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6816
6817 # Check whether --with-export-syms or --without-export-syms was given.
6818 if test "${with_export_syms+set}" = set; then
6819   withval="$with_export_syms"
6820   with_export_syms=$withval
6821 else
6822   with_export_syms=no
6823 fi;
6824 if test "x$with_export_syms" = xyes
6825 then
6826         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6827
6828 fi
6829 echo "$as_me:6829: result: $with_export_syms" >&5
6830 echo "${ECHO_T}$with_export_syms" >&6
6831 if test "x$with_export_syms" != xno
6832 then
6833         EXPORT_SYMS="-export-symbols $with_export_syms"
6834
6835 fi
6836
6837                 ;;
6838         (shared)
6839                 if test "$CC_SHARED_OPTS" = "unknown"; then
6840                         { { echo "$as_me:6840: error: Shared libraries are not supported in this version" >&5
6841 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6842    { (exit 1); exit 1; }; }
6843                 fi
6844                 # workaround for inept transition to PIE vs PIC...
6845                 echo "$as_me:6845: checking if current CFLAGS link properly" >&5
6846 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6847                 cat >"conftest.$ac_ext" <<_ACEOF
6848 #line 6848 "configure"
6849 #include "confdefs.h"
6850 #include <stdio.h>
6851 int
6852 main (void)
6853 {
6854 printf("Hello work\\n");
6855   ;
6856   return 0;
6857 }
6858 _ACEOF
6859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6860 if { (eval echo "$as_me:6860: \"$ac_link\"") >&5
6861   (eval $ac_link) 2>&5
6862   ac_status=$?
6863   echo "$as_me:6863: \$? = $ac_status" >&5
6864   (exit "$ac_status"); } &&
6865          { ac_try='test -s "conftest$ac_exeext"'
6866   { (eval echo "$as_me:6866: \"$ac_try\"") >&5
6867   (eval $ac_try) 2>&5
6868   ac_status=$?
6869   echo "$as_me:6869: \$? = $ac_status" >&5
6870   (exit "$ac_status"); }; }; then
6871   cf_cflags_work=yes
6872 else
6873   echo "$as_me: failed program was:" >&5
6874 cat "conftest.$ac_ext" >&5
6875 cf_cflags_work=no
6876 fi
6877 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6878                 echo "$as_me:6878: result: $cf_cflags_work" >&5
6879 echo "${ECHO_T}$cf_cflags_work" >&6
6880                 if test "$cf_cflags_work" = no
6881                 then
6882                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6883
6884 echo "${as_me:-configure}:6884: testing try to work around by appending shared-options ..." 1>&5
6885
6886                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6887                 fi
6888
6889 echo "$as_me:6889: checking if versioned-symbols file should be used" >&5
6890 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6891
6892 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6893 if test "${with_versioned_syms+set}" = set; then
6894   withval="$with_versioned_syms"
6895   with_versioned_syms=$withval
6896 else
6897   with_versioned_syms=no
6898 fi;
6899 case "x$with_versioned_syms" in
6900 (xyes)
6901         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6902
6903         ;;
6904 (xno)
6905         ;;
6906 (x/*)
6907         test -f "$with_versioned_syms" || { { echo "$as_me:6907: error: expected a filename: $with_versioned_syms" >&5
6908 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6909    { (exit 1); exit 1; }; }
6910         ;;
6911 (*)
6912         test -f "$with_versioned_syms" || { { echo "$as_me:6912: error: expected a filename: $with_versioned_syms" >&5
6913 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6914    { (exit 1); exit 1; }; }
6915         with_versioned_syms=`pwd`/"$with_versioned_syms"
6916         ;;
6917 esac
6918 echo "$as_me:6918: result: $with_versioned_syms" >&5
6919 echo "${ECHO_T}$with_versioned_syms" >&6
6920
6921 RESULTING_SYMS=
6922 VERSIONED_SYMS=
6923 WILDCARD_SYMS=
6924
6925 if test "x$with_versioned_syms" != xno
6926 then
6927         RESULTING_SYMS=$with_versioned_syms
6928         case "x$MK_SHARED_LIB" in
6929         (*-Wl,*)
6930                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6931                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6932                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6933
6934 echo "${as_me:-configure}:6934: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6935
6936                 ;;
6937         (*-dy\ *)
6938                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6939                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6940                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6941
6942 echo "${as_me:-configure}:6942: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6943
6944                 ;;
6945         (*)
6946                 { echo "$as_me:6946: WARNING: this system does not support versioned-symbols" >&5
6947 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6948                 ;;
6949         esac
6950
6951         # Linux ld can selectively override scope, e.g., of symbols beginning with
6952         # "_" by first declaring some as global, and then using a wildcard to
6953         # declare the others as local.  Some other loaders cannot do this.  Check
6954         # by constructing a (very) simple shared library and inspecting its
6955         # symbols.
6956         if test "x$VERSIONED_SYMS" != "x"
6957         then
6958                 echo "$as_me:6958: checking if wildcards can be used to selectively omit symbols" >&5
6959 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6960                 WILDCARD_SYMS=no
6961
6962                 # make sources
6963                 rm -f conftest.*
6964
6965                 cat >conftest.ver <<EOF
6966 module_1.0 {
6967 global:
6968         globalf1;
6969 local:
6970         localf1;
6971 };
6972 module_2.0 {
6973 global:
6974         globalf2;
6975 local:
6976         localf2;
6977         _*;
6978 } module_1.0;
6979 submodule_1.0 {
6980 global:
6981         subglobalf1;
6982         _ismissing;
6983 local:
6984         sublocalf1;
6985 };
6986 submodule_2.0 {
6987 global:
6988         subglobalf2;
6989 local:
6990         sublocalf2;
6991         _*;
6992 } submodule_1.0;
6993 EOF
6994                 cat >conftest.$ac_ext <<EOF
6995 #line 6995 "configure"
6996 int     _ismissing(void) { return 1; }
6997 int     _localf1(void) { return 1; }
6998 int     _localf2(void) { return 2; }
6999 int     globalf1(void) { return 1; }
7000 int     globalf2(void) { return 2; }
7001 int     _sublocalf1(void) { return 1; }
7002 int     _sublocalf2(void) { return 2; }
7003 int     subglobalf1(void) { return 1; }
7004 int     subglobalf2(void) { return 2; }
7005 EOF
7006                 cat >conftest.mk <<EOF
7007 CC=${CC}
7008 CFLAGS=${CFLAGS}
7009 CPPFLAGS=${CPPFLAGS}
7010 LDFLAGS=${LDFLAGS}
7011 LIBS=${LIBS}
7012 VERSIONED_SYMS=${VERSIONED_SYMS}
7013 RESULTING_SYMS=conftest.ver
7014 MK_SHARED_LIB=${MK_SHARED_LIB}
7015 conftest.so: conftest.$ac_cv_objext
7016                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7017 EOF
7018
7019                 # compile source, make library
7020                 if make -f conftest.mk 2>&5 >/dev/null
7021                 then
7022                         # test for missing symbol in either Data or Text section
7023                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7024                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7025                 fi
7026                 echo "$as_me:7026: result: $WILDCARD_SYMS" >&5
7027 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7028                 rm -f conftest.*
7029         fi
7030 fi
7031
7032                 ;;
7033         esac
7034 done
7035
7036 ### Checks for special libraries, must be done up-front.
7037 SHLIB_LIST=""
7038
7039 echo "$as_me:7039: checking if you want to link with the GPM mouse library" >&5
7040 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7041
7042 # Check whether --with-gpm or --without-gpm was given.
7043 if test "${with_gpm+set}" = set; then
7044   withval="$with_gpm"
7045   with_gpm=$withval
7046 else
7047   with_gpm=maybe
7048 fi;
7049 echo "$as_me:7049: result: $with_gpm" >&5
7050 echo "${ECHO_T}$with_gpm" >&6
7051
7052 if test "$with_gpm" != no ; then
7053         echo "$as_me:7053: checking for gpm.h" >&5
7054 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7055 if test "${ac_cv_header_gpm_h+set}" = set; then
7056   echo $ECHO_N "(cached) $ECHO_C" >&6
7057 else
7058   cat >"conftest.$ac_ext" <<_ACEOF
7059 #line 7059 "configure"
7060 #include "confdefs.h"
7061 #include <gpm.h>
7062 _ACEOF
7063 if { (eval echo "$as_me:7063: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7064   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7065   ac_status=$?
7066   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7067   rm -f conftest.er1
7068   cat conftest.err >&5
7069   echo "$as_me:7069: \$? = $ac_status" >&5
7070   (exit "$ac_status"); } >/dev/null; then
7071   if test -s conftest.err; then
7072     ac_cpp_err=$ac_c_preproc_warn_flag
7073   else
7074     ac_cpp_err=
7075   fi
7076 else
7077   ac_cpp_err=yes
7078 fi
7079 if test -z "$ac_cpp_err"; then
7080   ac_cv_header_gpm_h=yes
7081 else
7082   echo "$as_me: failed program was:" >&5
7083   cat "conftest.$ac_ext" >&5
7084   ac_cv_header_gpm_h=no
7085 fi
7086 rm -f conftest.err "conftest.$ac_ext"
7087 fi
7088 echo "$as_me:7088: result: $ac_cv_header_gpm_h" >&5
7089 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7090 if test "$ac_cv_header_gpm_h" = yes; then
7091
7092 cat >>confdefs.h <<\EOF
7093 #define HAVE_GPM_H 1
7094 EOF
7095
7096                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7097                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7098
7099 echo "${as_me:-configure}:7099: testing assuming we really have GPM library ..." 1>&5
7100
7101 cat >>confdefs.h <<\EOF
7102 #define HAVE_LIBGPM 1
7103 EOF
7104
7105                         with_gpm=yes
7106                 else
7107                         echo "$as_me:7107: checking for Gpm_Open in -lgpm" >&5
7108 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7109 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7110   echo $ECHO_N "(cached) $ECHO_C" >&6
7111 else
7112   ac_check_lib_save_LIBS=$LIBS
7113 LIBS="-lgpm  $LIBS"
7114 cat >"conftest.$ac_ext" <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7117
7118 /* Override any gcc2 internal prototype to avoid an error.  */
7119 #ifdef __cplusplus
7120 extern "C"
7121 #endif
7122 /* We use char because int might match the return type of a gcc2
7123    builtin and then its argument prototype would still apply.  */
7124 char Gpm_Open ();
7125 int
7126 main (void)
7127 {
7128 Gpm_Open ();
7129   ;
7130   return 0;
7131 }
7132 _ACEOF
7133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7134 if { (eval echo "$as_me:7134: \"$ac_link\"") >&5
7135   (eval $ac_link) 2>&5
7136   ac_status=$?
7137   echo "$as_me:7137: \$? = $ac_status" >&5
7138   (exit "$ac_status"); } &&
7139          { ac_try='test -s "conftest$ac_exeext"'
7140   { (eval echo "$as_me:7140: \"$ac_try\"") >&5
7141   (eval $ac_try) 2>&5
7142   ac_status=$?
7143   echo "$as_me:7143: \$? = $ac_status" >&5
7144   (exit "$ac_status"); }; }; then
7145   ac_cv_lib_gpm_Gpm_Open=yes
7146 else
7147   echo "$as_me: failed program was:" >&5
7148 cat "conftest.$ac_ext" >&5
7149 ac_cv_lib_gpm_Gpm_Open=no
7150 fi
7151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7152 LIBS=$ac_check_lib_save_LIBS
7153 fi
7154 echo "$as_me:7154: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7155 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7156 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7157   with_gpm=yes
7158 else
7159
7160                                 if test "$with_gpm" = maybe; then
7161                                         { echo "$as_me:7161: WARNING: Cannot link with GPM library" >&5
7162 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7163                                         with_gpm=no
7164                                 else
7165                                         { { echo "$as_me:7165: error: Cannot link with GPM library" >&5
7166 echo "$as_me: error: Cannot link with GPM library" >&2;}
7167    { (exit 1); exit 1; }; }
7168                                 fi
7169
7170 fi
7171
7172                 fi
7173
7174 else
7175
7176                 test "$with_gpm" != maybe && { echo "$as_me:7176: WARNING: Cannot find GPM header" >&5
7177 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7178                 with_gpm=no
7179
7180 fi
7181
7182 fi
7183
7184 if test "$with_gpm" != no ; then
7185         echo "$as_me:7185: checking if you want to load GPM dynamically" >&5
7186 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7187
7188 # Check whether --with-dlsym or --without-dlsym was given.
7189 if test "${with_dlsym+set}" = set; then
7190   withval="$with_dlsym"
7191   with_dlsym=$withval
7192 else
7193   with_dlsym=yes
7194 fi;
7195         echo "$as_me:7195: result: $with_dlsym" >&5
7196 echo "${ECHO_T}$with_dlsym" >&6
7197         if test "x$with_dlsym" = xyes ; then
7198
7199 cf_have_dlsym=no
7200 echo "$as_me:7200: checking for dlsym" >&5
7201 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7202 if test "${ac_cv_func_dlsym+set}" = set; then
7203   echo $ECHO_N "(cached) $ECHO_C" >&6
7204 else
7205   cat >"conftest.$ac_ext" <<_ACEOF
7206 #line 7206 "configure"
7207 #include "confdefs.h"
7208 #define dlsym autoconf_temporary
7209 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7210 #undef dlsym
7211
7212 #ifdef __cplusplus
7213 extern "C"
7214 #endif
7215
7216 /* We use char because int might match the return type of a gcc2
7217    builtin and then its argument prototype would still apply.  */
7218 char dlsym (void);
7219
7220 int
7221 main (void)
7222 {
7223
7224 /* The GNU C library defines stubs for functions which it implements
7225     to always fail with ENOSYS.  Some functions are actually named
7226     something starting with __ and the normal name is an alias.  */
7227 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7228 #error found stub for dlsym
7229 #endif
7230
7231         return dlsym ();
7232   ;
7233   return 0;
7234 }
7235 _ACEOF
7236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7237 if { (eval echo "$as_me:7237: \"$ac_link\"") >&5
7238   (eval $ac_link) 2>&5
7239   ac_status=$?
7240   echo "$as_me:7240: \$? = $ac_status" >&5
7241   (exit "$ac_status"); } &&
7242          { ac_try='test -s "conftest$ac_exeext"'
7243   { (eval echo "$as_me:7243: \"$ac_try\"") >&5
7244   (eval $ac_try) 2>&5
7245   ac_status=$?
7246   echo "$as_me:7246: \$? = $ac_status" >&5
7247   (exit "$ac_status"); }; }; then
7248   ac_cv_func_dlsym=yes
7249 else
7250   echo "$as_me: failed program was:" >&5
7251 cat "conftest.$ac_ext" >&5
7252 ac_cv_func_dlsym=no
7253 fi
7254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7255 fi
7256 echo "$as_me:7256: result: $ac_cv_func_dlsym" >&5
7257 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7258 if test "$ac_cv_func_dlsym" = yes; then
7259   cf_have_dlsym=yes
7260 else
7261
7262 cf_have_libdl=no
7263 echo "$as_me:7263: checking for dlsym in -ldl" >&5
7264 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7265 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7266   echo $ECHO_N "(cached) $ECHO_C" >&6
7267 else
7268   ac_check_lib_save_LIBS=$LIBS
7269 LIBS="-ldl  $LIBS"
7270 cat >"conftest.$ac_ext" <<_ACEOF
7271 #line 7271 "configure"
7272 #include "confdefs.h"
7273
7274 /* Override any gcc2 internal prototype to avoid an error.  */
7275 #ifdef __cplusplus
7276 extern "C"
7277 #endif
7278 /* We use char because int might match the return type of a gcc2
7279    builtin and then its argument prototype would still apply.  */
7280 char dlsym ();
7281 int
7282 main (void)
7283 {
7284 dlsym ();
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   ac_cv_lib_dl_dlsym=yes
7302 else
7303   echo "$as_me: failed program was:" >&5
7304 cat "conftest.$ac_ext" >&5
7305 ac_cv_lib_dl_dlsym=no
7306 fi
7307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7308 LIBS=$ac_check_lib_save_LIBS
7309 fi
7310 echo "$as_me:7310: result: $ac_cv_lib_dl_dlsym" >&5
7311 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7312 if test "$ac_cv_lib_dl_dlsym" = yes; then
7313
7314         cf_have_dlsym=yes
7315         cf_have_libdl=yes
7316 fi
7317
7318 fi
7319
7320 if test "$cf_have_dlsym" = yes ; then
7321         test "$cf_have_libdl" = yes && {
7322 cf_add_libs="$LIBS"
7323 # reverse order
7324 cf_add_0lib=
7325 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7326 # filter duplicates
7327 for cf_add_1lib in $cf_add_0lib; do
7328         for cf_add_2lib in $cf_add_libs; do
7329                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7330                         cf_add_1lib=
7331                         break
7332                 fi
7333         done
7334         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7335 done
7336 LIBS="$cf_add_libs"
7337  }
7338
7339         echo "$as_me:7339: checking whether able to link to dl*() functions" >&5
7340 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7341         cat >"conftest.$ac_ext" <<_ACEOF
7342 #line 7342 "configure"
7343 #include "confdefs.h"
7344 #include <dlfcn.h>
7345 int
7346 main (void)
7347 {
7348
7349                 void *obj;
7350                 if ((obj = dlopen("filename", 0)) != 0) {
7351                         if (dlsym(obj, "symbolname") == 0) {
7352                         dlclose(obj);
7353                         }
7354                 }
7355   ;
7356   return 0;
7357 }
7358 _ACEOF
7359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361   (eval $ac_link) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit "$ac_status"); } &&
7365          { ac_try='test -s "conftest$ac_exeext"'
7366   { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit "$ac_status"); }; }; then
7371
7372 cat >>confdefs.h <<\EOF
7373 #define HAVE_LIBDL 1
7374 EOF
7375
7376 else
7377   echo "$as_me: failed program was:" >&5
7378 cat "conftest.$ac_ext" >&5
7379
7380                 { { echo "$as_me:7380: error: Cannot link test program for libdl" >&5
7381 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7382    { (exit 1); exit 1; }; }
7383 fi
7384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7385         echo "$as_me:7385: result: ok" >&5
7386 echo "${ECHO_T}ok" >&6
7387 else
7388         { { echo "$as_me:7388: error: Cannot find dlsym function" >&5
7389 echo "$as_me: error: Cannot find dlsym function" >&2;}
7390    { (exit 1); exit 1; }; }
7391 fi
7392
7393                 if test "x$with_gpm" != xyes ; then
7394                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7395
7396 echo "${as_me:-configure}:7396: testing assuming soname for gpm is $with_gpm ..." 1>&5
7397
7398                         cf_cv_gpm_soname="$with_gpm"
7399                 else
7400
7401 echo "$as_me:7401: checking for soname of gpm library" >&5
7402 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7403 if test "${cf_cv_gpm_soname+set}" = set; then
7404   echo $ECHO_N "(cached) $ECHO_C" >&6
7405 else
7406
7407 cf_cv_gpm_soname=unknown
7408 if test "$cross_compiling" != yes ; then
7409 cat >conftest.$ac_ext <<CF_EOF
7410 #include <gpm.h>
7411 int main(void)
7412 {
7413 if (Gpm_Open(0,0)) Gpm_Close();
7414         ${cf_cv_main_return:-return}(0);
7415 }
7416 CF_EOF
7417 cf_save_LIBS="$LIBS"
7418
7419 cf_add_libs="$LIBS"
7420 # reverse order
7421 cf_add_0lib=
7422 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7423 # filter duplicates
7424 for cf_add_1lib in $cf_add_0lib; do
7425         for cf_add_2lib in $cf_add_libs; do
7426                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7427                         cf_add_1lib=
7428                         break
7429                 fi
7430         done
7431         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7432 done
7433 LIBS="$cf_add_libs"
7434
7435         if { (eval echo "$as_me:7435: \"$ac_compile\"") >&5
7436   (eval $ac_compile) 2>&5
7437   ac_status=$?
7438   echo "$as_me:7438: \$? = $ac_status" >&5
7439   (exit "$ac_status"); } ; then
7440                 if { (eval echo "$as_me:7440: \"$ac_link\"") >&5
7441   (eval $ac_link) 2>&5
7442   ac_status=$?
7443   echo "$as_me:7443: \$? = $ac_status" >&5
7444   (exit "$ac_status"); } ; then
7445                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7446                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7447                 fi
7448         fi
7449 rm -rf ./conftest*
7450 LIBS="$cf_save_LIBS"
7451 fi
7452
7453 fi
7454 echo "$as_me:7454: result: $cf_cv_gpm_soname" >&5
7455 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7456
7457                 fi
7458                 test "$cf_cv_gpm_soname" != "unknown" &&
7459 cat >>confdefs.h <<EOF
7460 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7461 EOF
7462
7463                 SHLIB_LIST="-ldl $SHLIB_LIST"
7464
7465 cf_add_libs="$PRIVATE_LIBS"
7466 # reverse order
7467 cf_add_0lib=
7468 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7469 # filter duplicates
7470 for cf_add_1lib in $cf_add_0lib; do
7471         for cf_add_2lib in $cf_add_libs; do
7472                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7473                         cf_add_1lib=
7474                         break
7475                 fi
7476         done
7477         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7478 done
7479 PRIVATE_LIBS="$cf_add_libs"
7480
7481         else
7482                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7483
7484 cf_add_libs="$TEST_LIBS"
7485 # reverse order
7486 cf_add_0lib=
7487 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7488 # filter duplicates
7489 for cf_add_1lib in $cf_add_0lib; do
7490         for cf_add_2lib in $cf_add_libs; do
7491                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7492                         cf_add_1lib=
7493                         break
7494                 fi
7495         done
7496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7497 done
7498 TEST_LIBS="$cf_add_libs"
7499
7500 cf_add_libs="$PRIVATE_LIBS"
7501 # reverse order
7502 cf_add_0lib=
7503 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7504 # filter duplicates
7505 for cf_add_1lib in $cf_add_0lib; do
7506         for cf_add_2lib in $cf_add_libs; do
7507                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7508                         cf_add_1lib=
7509                         break
7510                 fi
7511         done
7512         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7513 done
7514 PRIVATE_LIBS="$cf_add_libs"
7515
7516         fi
7517
7518 cat >>confdefs.h <<\EOF
7519 #define HAVE_LIBGPM 1
7520 EOF
7521
7522 echo "$as_me:7522: checking for Gpm_Wgetch in -lgpm" >&5
7523 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7524 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7525   echo $ECHO_N "(cached) $ECHO_C" >&6
7526 else
7527   ac_check_lib_save_LIBS=$LIBS
7528 LIBS="-lgpm  $LIBS"
7529 cat >"conftest.$ac_ext" <<_ACEOF
7530 #line 7530 "configure"
7531 #include "confdefs.h"
7532
7533 /* Override any gcc2 internal prototype to avoid an error.  */
7534 #ifdef __cplusplus
7535 extern "C"
7536 #endif
7537 /* We use char because int might match the return type of a gcc2
7538    builtin and then its argument prototype would still apply.  */
7539 char Gpm_Wgetch ();
7540 int
7541 main (void)
7542 {
7543 Gpm_Wgetch ();
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7549 if { (eval echo "$as_me:7549: \"$ac_link\"") >&5
7550   (eval $ac_link) 2>&5
7551   ac_status=$?
7552   echo "$as_me:7552: \$? = $ac_status" >&5
7553   (exit "$ac_status"); } &&
7554          { ac_try='test -s "conftest$ac_exeext"'
7555   { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7556   (eval $ac_try) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit "$ac_status"); }; }; then
7560   ac_cv_lib_gpm_Gpm_Wgetch=yes
7561 else
7562   echo "$as_me: failed program was:" >&5
7563 cat "conftest.$ac_ext" >&5
7564 ac_cv_lib_gpm_Gpm_Wgetch=no
7565 fi
7566 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7567 LIBS=$ac_check_lib_save_LIBS
7568 fi
7569 echo "$as_me:7569: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7570 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7571 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7572
7573 echo "$as_me:7573: checking if GPM is weakly bound to curses library" >&5
7574 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7575 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7576   echo $ECHO_N "(cached) $ECHO_C" >&6
7577 else
7578
7579 cf_cv_check_gpm_wgetch=unknown
7580 if test "$cross_compiling" != yes ; then
7581
7582 cat >conftest.$ac_ext <<CF_EOF
7583 #include <gpm.h>
7584 int main(void)
7585 {
7586         Gpm_Wgetch();
7587         ${cf_cv_main_return:-return}(0);
7588 }
7589 CF_EOF
7590
7591         cf_save_LIBS="$LIBS"
7592         # This only works if we can look at the symbol table.  If a shared
7593         # library is stripped for install, we cannot use that.  So we're forced
7594         # to rely on the static library, noting that some packagers may not
7595         # include it.
7596         LIBS="-static -lgpm -dynamic $LIBS"
7597         if { (eval echo "$as_me:7597: \"$ac_compile\"") >&5
7598   (eval $ac_compile) 2>&5
7599   ac_status=$?
7600   echo "$as_me:7600: \$? = $ac_status" >&5
7601   (exit "$ac_status"); } ; then
7602                 if { (eval echo "$as_me:7602: \"$ac_link\"") >&5
7603   (eval $ac_link) 2>&5
7604   ac_status=$?
7605   echo "$as_me:7605: \$? = $ac_status" >&5
7606   (exit "$ac_status"); } ; then
7607                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7608                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7609                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7610                 fi
7611         fi
7612         rm -rf ./conftest*
7613         LIBS="$cf_save_LIBS"
7614 fi
7615
7616 fi
7617 echo "$as_me:7617: result: $cf_cv_check_gpm_wgetch" >&5
7618 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7619
7620 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7621         { echo "$as_me:7621: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7622 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7623 fi
7624
7625 fi
7626
7627 fi
7628
7629 echo "$as_me:7629: checking if you want to use PCRE2 for regular-expressions" >&5
7630 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7631
7632 # Check whether --with-pcre2 or --without-pcre2 was given.
7633 if test "${with_pcre2+set}" = set; then
7634   withval="$with_pcre2"
7635
7636 fi;
7637 test -z "$with_pcre2" && with_pcre2=no
7638 echo "$as_me:7638: result: $with_pcre2" >&5
7639 echo "${ECHO_T}$with_pcre2" >&6
7640
7641 if test "x$with_pcre2" != xno ; then
7642         cf_with_pcre2_ok=no
7643         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7644         do
7645
7646 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7647         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7648
7649 echo "${as_me:-configure}:7649: testing found package $cf_with_pcre2 ..." 1>&5
7650
7651         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7652         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7653         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7654
7655 echo "${as_me:-configure}:7655: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7656
7657         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7658
7659 echo "${as_me:-configure}:7659: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7660
7661 cf_fix_cppflags=no
7662 cf_new_cflags=
7663 cf_new_cppflags=
7664 cf_new_extra_cppflags=
7665
7666 for cf_add_cflags in $cf_pkgconfig_incs
7667 do
7668 case "$cf_fix_cppflags" in
7669 (no)
7670         case "$cf_add_cflags" in
7671         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7672                 case "$cf_add_cflags" in
7673                 (-D*)
7674                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7675
7676                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7677                                 && test -z "${cf_tst_cflags}" \
7678                                 && cf_fix_cppflags=yes
7679
7680                         if test "$cf_fix_cppflags" = yes ; then
7681
7682         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7683         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7684
7685                                 continue
7686                         elif test "${cf_tst_cflags}" = "\"'" ; then
7687
7688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7690
7691                                 continue
7692                         fi
7693                         ;;
7694                 esac
7695                 case "$CPPFLAGS" in
7696                 (*$cf_add_cflags)
7697                         ;;
7698                 (*)
7699                         case "$cf_add_cflags" in
7700                         (-D*)
7701                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7702
7703 CPPFLAGS=`echo "$CPPFLAGS" | \
7704         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7705                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7706
7707                                 ;;
7708                         esac
7709
7710         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7711         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7712
7713                         ;;
7714                 esac
7715                 ;;
7716         (*)
7717
7718         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7719         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7720
7721                 ;;
7722         esac
7723         ;;
7724 (yes)
7725
7726         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7727         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7728
7729         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7730
7731         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7732                 && test -z "${cf_tst_cflags}" \
7733                 && cf_fix_cppflags=no
7734         ;;
7735 esac
7736 done
7737
7738 if test -n "$cf_new_cflags" ; then
7739
7740         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7741         CFLAGS="${CFLAGS}$cf_new_cflags"
7742
7743 fi
7744
7745 if test -n "$cf_new_cppflags" ; then
7746
7747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7748         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7749
7750 fi
7751
7752 if test -n "$cf_new_extra_cppflags" ; then
7753
7754         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7755         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7756
7757 fi
7758
7759 cf_add_libs="$LIBS"
7760 # reverse order
7761 cf_add_0lib=
7762 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7763 # filter duplicates
7764 for cf_add_1lib in $cf_add_0lib; do
7765         for cf_add_2lib in $cf_add_libs; do
7766                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7767                         cf_add_1lib=
7768                         break
7769                 fi
7770         done
7771         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7772 done
7773 LIBS="$cf_add_libs"
7774
7775         cf_with_pcre2_ok=yes; break
7776 else
7777         cf_pkgconfig_incs=
7778         cf_pkgconfig_libs=
7779         :
7780 fi
7781
7782         done
7783         cf_with_pcre2_ok=yes || { { echo "$as_me:7783: error: Cannot find PCRE2 library" >&5
7784 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7785    { (exit 1); exit 1; }; }
7786
7787 cat >>confdefs.h <<\EOF
7788 #define HAVE_LIB_PCRE2 1
7789 EOF
7790
7791         # if pkgconfig gave no results, look for the libraries directly
7792         case "$LIBS" in
7793         (*pcre2-posix*|*pcreposix*)
7794                 ;;
7795         (*)
7796                 echo "$as_me:7796: checking for regcomp in -lpcre2-posix" >&5
7797 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7798 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7799   echo $ECHO_N "(cached) $ECHO_C" >&6
7800 else
7801   ac_check_lib_save_LIBS=$LIBS
7802 LIBS="-lpcre2-posix  $LIBS"
7803 cat >"conftest.$ac_ext" <<_ACEOF
7804 #line 7804 "configure"
7805 #include "confdefs.h"
7806
7807 /* Override any gcc2 internal prototype to avoid an error.  */
7808 #ifdef __cplusplus
7809 extern "C"
7810 #endif
7811 /* We use char because int might match the return type of a gcc2
7812    builtin and then its argument prototype would still apply.  */
7813 char regcomp ();
7814 int
7815 main (void)
7816 {
7817 regcomp ();
7818   ;
7819   return 0;
7820 }
7821 _ACEOF
7822 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7823 if { (eval echo "$as_me:7823: \"$ac_link\"") >&5
7824   (eval $ac_link) 2>&5
7825   ac_status=$?
7826   echo "$as_me:7826: \$? = $ac_status" >&5
7827   (exit "$ac_status"); } &&
7828          { ac_try='test -s "conftest$ac_exeext"'
7829   { (eval echo "$as_me:7829: \"$ac_try\"") >&5
7830   (eval $ac_try) 2>&5
7831   ac_status=$?
7832   echo "$as_me:7832: \$? = $ac_status" >&5
7833   (exit "$ac_status"); }; }; then
7834   ac_cv_lib_pcre2_posix_regcomp=yes
7835 else
7836   echo "$as_me: failed program was:" >&5
7837 cat "conftest.$ac_ext" >&5
7838 ac_cv_lib_pcre2_posix_regcomp=no
7839 fi
7840 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7841 LIBS=$ac_check_lib_save_LIBS
7842 fi
7843 echo "$as_me:7843: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7844 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7845 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7846
7847 cf_add_libs="$LIBS"
7848 # reverse order
7849 cf_add_0lib=
7850 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7851 # filter duplicates
7852 for cf_add_1lib in $cf_add_0lib; do
7853         for cf_add_2lib in $cf_add_libs; do
7854                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7855                         cf_add_1lib=
7856                         break
7857                 fi
7858         done
7859         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7860 done
7861 LIBS="$cf_add_libs"
7862
7863 else
7864   echo "$as_me:7864: checking for regcomp in -lpcreposix" >&5
7865 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7866 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7867   echo $ECHO_N "(cached) $ECHO_C" >&6
7868 else
7869   ac_check_lib_save_LIBS=$LIBS
7870 LIBS="-lpcreposix  $LIBS"
7871 cat >"conftest.$ac_ext" <<_ACEOF
7872 #line 7872 "configure"
7873 #include "confdefs.h"
7874
7875 /* Override any gcc2 internal prototype to avoid an error.  */
7876 #ifdef __cplusplus
7877 extern "C"
7878 #endif
7879 /* We use char because int might match the return type of a gcc2
7880    builtin and then its argument prototype would still apply.  */
7881 char regcomp ();
7882 int
7883 main (void)
7884 {
7885 regcomp ();
7886   ;
7887   return 0;
7888 }
7889 _ACEOF
7890 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7891 if { (eval echo "$as_me:7891: \"$ac_link\"") >&5
7892   (eval $ac_link) 2>&5
7893   ac_status=$?
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit "$ac_status"); } &&
7896          { ac_try='test -s "conftest$ac_exeext"'
7897   { (eval echo "$as_me:7897: \"$ac_try\"") >&5
7898   (eval $ac_try) 2>&5
7899   ac_status=$?
7900   echo "$as_me:7900: \$? = $ac_status" >&5
7901   (exit "$ac_status"); }; }; then
7902   ac_cv_lib_pcreposix_regcomp=yes
7903 else
7904   echo "$as_me: failed program was:" >&5
7905 cat "conftest.$ac_ext" >&5
7906 ac_cv_lib_pcreposix_regcomp=no
7907 fi
7908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7909 LIBS=$ac_check_lib_save_LIBS
7910 fi
7911 echo "$as_me:7911: result: $ac_cv_lib_pcreposix_regcomp" >&5
7912 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7913 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7914
7915 cf_add_libs="$LIBS"
7916 # reverse order
7917 cf_add_0lib=
7918 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7919 # filter duplicates
7920 for cf_add_1lib in $cf_add_0lib; do
7921         for cf_add_2lib in $cf_add_libs; do
7922                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7923                         cf_add_1lib=
7924                         break
7925                 fi
7926         done
7927         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7928 done
7929 LIBS="$cf_add_libs"
7930
7931 else
7932   { { echo "$as_me:7932: error: Cannot find PCRE2 POSIX library" >&5
7933 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7934    { (exit 1); exit 1; }; }
7935 fi
7936
7937 fi
7938
7939                 ;;
7940         esac
7941
7942         # either way, check for the library header files
7943
7944 for ac_header in pcre2posix.h pcreposix.h
7945 do
7946 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7947 echo "$as_me:7947: checking for $ac_header" >&5
7948 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7949 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7950   echo $ECHO_N "(cached) $ECHO_C" >&6
7951 else
7952   cat >"conftest.$ac_ext" <<_ACEOF
7953 #line 7953 "configure"
7954 #include "confdefs.h"
7955 #include <$ac_header>
7956 _ACEOF
7957 if { (eval echo "$as_me:7957: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7958   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7959   ac_status=$?
7960   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7961   rm -f conftest.er1
7962   cat conftest.err >&5
7963   echo "$as_me:7963: \$? = $ac_status" >&5
7964   (exit "$ac_status"); } >/dev/null; then
7965   if test -s conftest.err; then
7966     ac_cpp_err=$ac_c_preproc_warn_flag
7967   else
7968     ac_cpp_err=
7969   fi
7970 else
7971   ac_cpp_err=yes
7972 fi
7973 if test -z "$ac_cpp_err"; then
7974   eval "$as_ac_Header=yes"
7975 else
7976   echo "$as_me: failed program was:" >&5
7977   cat "conftest.$ac_ext" >&5
7978   eval "$as_ac_Header=no"
7979 fi
7980 rm -f conftest.err "conftest.$ac_ext"
7981 fi
7982 echo "$as_me:7982: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7983 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7984 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7985   cat >>confdefs.h <<EOF
7986 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7987 EOF
7988
7989 fi
7990 done
7991
7992 for ac_func in PCRE2regcomp
7993 do
7994 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7995 echo "$as_me:7995: checking for $ac_func" >&5
7996 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7997 if eval "test \"\${$as_ac_var+set}\" = set"; then
7998   echo $ECHO_N "(cached) $ECHO_C" >&6
7999 else
8000   cat >"conftest.$ac_ext" <<_ACEOF
8001 #line 8001 "configure"
8002 #include "confdefs.h"
8003 #define $ac_func autoconf_temporary
8004 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8005 #undef $ac_func
8006
8007 #ifdef __cplusplus
8008 extern "C"
8009 #endif
8010
8011 /* We use char because int might match the return type of a gcc2
8012    builtin and then its argument prototype would still apply.  */
8013 char $ac_func (void);
8014
8015 int
8016 main (void)
8017 {
8018
8019 /* The GNU C library defines stubs for functions which it implements
8020     to always fail with ENOSYS.  Some functions are actually named
8021     something starting with __ and the normal name is an alias.  */
8022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8023 #error found stub for $ac_func
8024 #endif
8025
8026         return $ac_func ();
8027   ;
8028   return 0;
8029 }
8030 _ACEOF
8031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
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"); } &&
8037          { ac_try='test -s "conftest$ac_exeext"'
8038   { (eval echo "$as_me:8038: \"$ac_try\"") >&5
8039   (eval $ac_try) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit "$ac_status"); }; }; then
8043   eval "$as_ac_var=yes"
8044 else
8045   echo "$as_me: failed program was:" >&5
8046 cat "conftest.$ac_ext" >&5
8047 eval "$as_ac_var=no"
8048 fi
8049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8050 fi
8051 echo "$as_me:8051: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8052 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8053 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8054   cat >>confdefs.h <<EOF
8055 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8056 EOF
8057
8058 fi
8059 done
8060
8061 fi
8062
8063 # not everyone has "test -c"
8064 if test -c /dev/sysmouse 2>/dev/null ; then
8065 echo "$as_me:8065: checking if you want to use sysmouse" >&5
8066 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8067
8068 # Check whether --with-sysmouse or --without-sysmouse was given.
8069 if test "${with_sysmouse+set}" = set; then
8070   withval="$with_sysmouse"
8071   cf_with_sysmouse=$withval
8072 else
8073   cf_with_sysmouse=maybe
8074 fi;
8075         if test "$cf_with_sysmouse" != no ; then
8076         cat >"conftest.$ac_ext" <<_ACEOF
8077 #line 8077 "configure"
8078 #include "confdefs.h"
8079
8080 #include <osreldate.h>
8081 #if (__FreeBSD_version >= 400017)
8082 #include <sys/consio.h>
8083 #include <sys/fbio.h>
8084 #else
8085 #include <machine/console.h>
8086 #endif
8087
8088 int
8089 main (void)
8090 {
8091
8092         struct mouse_info the_mouse;
8093         ioctl(0, CONS_MOUSECTL, &the_mouse);
8094
8095   ;
8096   return 0;
8097 }
8098 _ACEOF
8099 rm -f "conftest.$ac_objext"
8100 if { (eval echo "$as_me:8100: \"$ac_compile\"") >&5
8101   (eval $ac_compile) 2>&5
8102   ac_status=$?
8103   echo "$as_me:8103: \$? = $ac_status" >&5
8104   (exit "$ac_status"); } &&
8105          { ac_try='test -s "conftest.$ac_objext"'
8106   { (eval echo "$as_me:8106: \"$ac_try\"") >&5
8107   (eval $ac_try) 2>&5
8108   ac_status=$?
8109   echo "$as_me:8109: \$? = $ac_status" >&5
8110   (exit "$ac_status"); }; }; then
8111   cf_with_sysmouse=yes
8112 else
8113   echo "$as_me: failed program was:" >&5
8114 cat "conftest.$ac_ext" >&5
8115 cf_with_sysmouse=no
8116 fi
8117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8118         fi
8119 echo "$as_me:8119: result: $cf_with_sysmouse" >&5
8120 echo "${ECHO_T}$cf_with_sysmouse" >&6
8121 test "$cf_with_sysmouse" = yes &&
8122 cat >>confdefs.h <<\EOF
8123 #define USE_SYSMOUSE 1
8124 EOF
8125
8126 fi
8127
8128 # pretend that ncurses==ncursesw==ncursest
8129 echo "$as_me:8129: checking if you want to disable library suffixes" >&5
8130 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8131
8132 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8133 if test "${enable_lib_suffixes+set}" = set; then
8134   enableval="$enable_lib_suffixes"
8135   test "$enableval" != no && enableval=yes
8136         if test "$enableval" != "yes" ; then
8137     disable_lib_suffixes=yes
8138         else
8139                 disable_lib_suffixes=no
8140         fi
8141 else
8142   enableval=yes
8143         disable_lib_suffixes=no
8144
8145 fi;
8146 echo "$as_me:8146: result: $disable_lib_suffixes" >&5
8147 echo "${ECHO_T}$disable_lib_suffixes" >&6
8148
8149 ### If we're building with rpath, try to link non-standard libs that way too.
8150 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8151
8152 echo "$as_me:8152: checking if rpath-hack should be disabled" >&5
8153 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8154
8155 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8156 if test "${enable_rpath_hack+set}" = set; then
8157   enableval="$enable_rpath_hack"
8158   test "$enableval" != no && enableval=yes
8159         if test "$enableval" != "yes" ; then
8160     enable_rpath_hack=no
8161         else
8162                 enable_rpath_hack=yes
8163         fi
8164 else
8165   enableval=yes
8166         enable_rpath_hack=yes
8167
8168 fi;
8169 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8170 echo "$as_me:8170: result: $cf_disable_rpath_hack" >&5
8171 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8172
8173 if test "$enable_rpath_hack" = yes ; then
8174
8175 echo "$as_me:8175: checking for updated LDFLAGS" >&5
8176 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8177 if test -n "$LD_RPATH_OPT" ; then
8178         echo "$as_me:8178: result: maybe" >&5
8179 echo "${ECHO_T}maybe" >&6
8180
8181         for ac_prog in ldd
8182 do
8183   # Extract the first word of "$ac_prog", so it can be a program name with args.
8184 set dummy $ac_prog; ac_word=$2
8185 echo "$as_me:8185: checking for $ac_word" >&5
8186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8187 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8188   echo $ECHO_N "(cached) $ECHO_C" >&6
8189 else
8190   if test -n "$cf_ldd_prog"; then
8191   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8192 else
8193   ac_save_IFS=$IFS; IFS=$ac_path_separator
8194 ac_dummy="$PATH"
8195 for ac_dir in $ac_dummy; do
8196   IFS=$ac_save_IFS
8197   test -z "$ac_dir" && ac_dir=.
8198   $as_executable_p "$ac_dir/$ac_word" || continue
8199 ac_cv_prog_cf_ldd_prog="$ac_prog"
8200 echo "$as_me:8200: found $ac_dir/$ac_word" >&5
8201 break
8202 done
8203
8204 fi
8205 fi
8206 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8207 if test -n "$cf_ldd_prog"; then
8208   echo "$as_me:8208: result: $cf_ldd_prog" >&5
8209 echo "${ECHO_T}$cf_ldd_prog" >&6
8210 else
8211   echo "$as_me:8211: result: no" >&5
8212 echo "${ECHO_T}no" >&6
8213 fi
8214
8215   test -n "$cf_ldd_prog" && break
8216 done
8217 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8218
8219         cf_rpath_list="/usr/lib /lib"
8220         if test "$cf_ldd_prog" != no
8221         then
8222                 cf_rpath_oops=
8223
8224 cat >"conftest.$ac_ext" <<_ACEOF
8225 #line 8225 "configure"
8226 #include "confdefs.h"
8227 #include <stdio.h>
8228 int
8229 main (void)
8230 {
8231 printf("Hello");
8232   ;
8233   return 0;
8234 }
8235 _ACEOF
8236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8237 if { (eval echo "$as_me:8237: \"$ac_link\"") >&5
8238   (eval $ac_link) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit "$ac_status"); } &&
8242          { ac_try='test -s "conftest$ac_exeext"'
8243   { (eval echo "$as_me:8243: \"$ac_try\"") >&5
8244   (eval $ac_try) 2>&5
8245   ac_status=$?
8246   echo "$as_me:8246: \$? = $ac_status" >&5
8247   (exit "$ac_status"); }; }; then
8248   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8249                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8250 else
8251   echo "$as_me: failed program was:" >&5
8252 cat "conftest.$ac_ext" >&5
8253 fi
8254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8255
8256                 # If we passed the link-test, but get a "not found" on a given library,
8257                 # this could be due to inept reconfiguration of gcc to make it only
8258                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8259                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8260                 # /usr/local libraries.
8261                 if test -n "$cf_rpath_oops"
8262                 then
8263                         for cf_rpath_src in $cf_rpath_oops
8264                         do
8265                                 for cf_rpath_dir in \
8266                                         /usr/local \
8267                                         /usr/pkg \
8268                                         /opt/sfw
8269                                 do
8270                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8271                                         then
8272                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8273
8274 echo "${as_me:-configure}:8274: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8275
8276                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8277                                                 break
8278                                         fi
8279                                 done
8280                         done
8281                 fi
8282         fi
8283
8284         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8285
8286 echo "${as_me:-configure}:8286: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8287
8288 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8289
8290 echo "${as_me:-configure}:8290: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8291
8292 cf_rpath_dst=
8293 for cf_rpath_src in $LDFLAGS
8294 do
8295         case "$cf_rpath_src" in
8296         (-L*)
8297
8298                 # check if this refers to a directory which we will ignore
8299                 cf_rpath_skip=no
8300                 if test -n "$cf_rpath_list"
8301                 then
8302                         for cf_rpath_item in $cf_rpath_list
8303                         do
8304                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8305                                 then
8306                                         cf_rpath_skip=yes
8307                                         break
8308                                 fi
8309                         done
8310                 fi
8311
8312                 if test "$cf_rpath_skip" = no
8313                 then
8314                         # transform the option
8315                         if test "$LD_RPATH_OPT" = "-R " ; then
8316                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8317                         else
8318                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8319                         fi
8320
8321                         # if we have not already added this, add it now
8322                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8323                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8324                         then
8325                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8326
8327 echo "${as_me:-configure}:8327: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8328
8329                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8330                         fi
8331                 fi
8332                 ;;
8333         esac
8334         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8335 done
8336 LDFLAGS=$cf_rpath_dst
8337
8338 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8339
8340 echo "${as_me:-configure}:8340: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8341
8342 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8343
8344 echo "${as_me:-configure}:8344: testing ...checking LIBS $LIBS ..." 1>&5
8345
8346 cf_rpath_dst=
8347 for cf_rpath_src in $LIBS
8348 do
8349         case "$cf_rpath_src" in
8350         (-L*)
8351
8352                 # check if this refers to a directory which we will ignore
8353                 cf_rpath_skip=no
8354                 if test -n "$cf_rpath_list"
8355                 then
8356                         for cf_rpath_item in $cf_rpath_list
8357                         do
8358                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8359                                 then
8360                                         cf_rpath_skip=yes
8361                                         break
8362                                 fi
8363                         done
8364                 fi
8365
8366                 if test "$cf_rpath_skip" = no
8367                 then
8368                         # transform the option
8369                         if test "$LD_RPATH_OPT" = "-R " ; then
8370                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8371                         else
8372                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8373                         fi
8374
8375                         # if we have not already added this, add it now
8376                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8377                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8378                         then
8379                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8380
8381 echo "${as_me:-configure}:8381: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8382
8383                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8384                         fi
8385                 fi
8386                 ;;
8387         esac
8388         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8389 done
8390 LIBS=$cf_rpath_dst
8391
8392 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8393
8394 echo "${as_me:-configure}:8394: testing ...checked LIBS $LIBS ..." 1>&5
8395
8396         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8397
8398 echo "${as_me:-configure}:8398: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8399
8400 else
8401         echo "$as_me:8401: result: no" >&5
8402 echo "${ECHO_T}no" >&6
8403 fi
8404
8405 fi
8406
8407 fi
8408
8409 ### Depending on the system, someone may use rpath to build ncurses but not
8410 # want users of the package to rely upon that feature.  Give those people an
8411 # option to suppress that detail from EXTRA_LDFLAGS.
8412 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8413 if test -n "$EXTRA_PKG_LDFLAGS"
8414 then
8415         echo "$as_me:8415: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8416 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8417
8418 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8419 if test "${enable_pkg_ldflags+set}" = set; then
8420   enableval="$enable_pkg_ldflags"
8421   test "$enableval" != no && enableval=yes
8422         if test "$enableval" != "yes" ; then
8423     disable_pkg_ldflags=yes
8424         else
8425                 disable_pkg_ldflags=no
8426         fi
8427 else
8428   enableval=yes
8429         disable_pkg_ldflags=no
8430
8431 fi;
8432         echo "$as_me:8432: result: $disable_pkg_ldflags" >&5
8433 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8434         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8435 fi
8436
8437 ###############################################################################
8438
8439 ###     use option --with-extra-suffix to append suffix to headers and libraries
8440 echo "$as_me:8440: checking if you wish to append extra suffix to header/library paths" >&5
8441 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8442 EXTRA_SUFFIX=
8443
8444 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8445 if test "${with_extra_suffix+set}" = set; then
8446   withval="$with_extra_suffix"
8447   case x$withval in
8448         (xno)
8449                 ;;
8450         (xyes|x)
8451                 EXTRA_SUFFIX=$cf_cv_abi_version
8452                 ;;
8453         (*)
8454                 EXTRA_SUFFIX=$withval
8455                 ;;
8456         esac
8457
8458 fi;
8459 echo "$as_me:8459: result: $EXTRA_SUFFIX" >&5
8460 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8461
8462 ###     use option --disable-overwrite to leave out the link to -lcurses
8463 echo "$as_me:8463: checking if you wish to install ncurses overwriting curses" >&5
8464 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8465
8466 # Check whether --enable-overwrite or --disable-overwrite was given.
8467 if test "${enable_overwrite+set}" = set; then
8468   enableval="$enable_overwrite"
8469   with_overwrite=$enableval
8470 else
8471   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8472 fi;
8473 echo "$as_me:8473: result: $with_overwrite" >&5
8474 echo "${ECHO_T}$with_overwrite" >&6
8475
8476 echo "$as_me:8476: checking if external terminfo-database is used" >&5
8477 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8478
8479 # Check whether --enable-database or --disable-database was given.
8480 if test "${enable_database+set}" = set; then
8481   enableval="$enable_database"
8482   use_database=$enableval
8483 else
8484   use_database=yes
8485 fi;
8486 echo "$as_me:8486: result: $use_database" >&5
8487 echo "${ECHO_T}$use_database" >&6
8488
8489 case "$host_os" in
8490 (os2*)
8491         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8492         ;;
8493 (*)
8494         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8495         ;;
8496 esac
8497
8498 NCURSES_USE_DATABASE=0
8499 if test "$use_database" != no ; then
8500         NCURSES_USE_DATABASE=1
8501
8502         echo "$as_me:8502: checking which terminfo source-file will be installed" >&5
8503 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8504
8505 # Check whether --with-database or --without-database was given.
8506 if test "${with_database+set}" = set; then
8507   withval="$with_database"
8508   TERMINFO_SRC=$withval
8509 fi;
8510         echo "$as_me:8510: result: $TERMINFO_SRC" >&5
8511 echo "${ECHO_T}$TERMINFO_SRC" >&6
8512
8513         echo "$as_me:8513: checking whether to use hashed database instead of directory/tree" >&5
8514 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8515
8516 # Check whether --with-hashed-db or --without-hashed-db was given.
8517 if test "${with_hashed_db+set}" = set; then
8518   withval="$with_hashed_db"
8519
8520 else
8521   with_hashed_db=no
8522 fi;
8523         echo "$as_me:8523: result: $with_hashed_db" >&5
8524 echo "${ECHO_T}$with_hashed_db" >&6
8525 else
8526         with_hashed_db=no
8527 fi
8528
8529 echo "$as_me:8529: checking for list of fallback descriptions" >&5
8530 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8531
8532 # Check whether --with-fallbacks or --without-fallbacks was given.
8533 if test "${with_fallbacks+set}" = set; then
8534   withval="$with_fallbacks"
8535   with_fallback=$withval
8536 else
8537   with_fallback=
8538 fi;
8539 echo "$as_me:8539: result: $with_fallback" >&5
8540 echo "${ECHO_T}$with_fallback" >&6
8541
8542 case ".$with_fallback" in
8543 (.|.no)
8544         FALLBACK_LIST=
8545         ;;
8546 (.yes)
8547         { echo "$as_me:8547: WARNING: expected a list of terminal descriptions" >&5
8548 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8549         ;;
8550 (*)
8551         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8552         ;;
8553 esac
8554
8555 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8556 # tree for generating the terminal descriptions that will be compiled into the
8557 # library.  If your toolchain is old, it may not handle current terminal
8558 # databases.  Use configure-options to point to the tools which will be used,
8559 # rather than the first ones found on the $PATH.
8560 if test -n "$ac_tool_prefix"; then
8561   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8562 set dummy ${ac_tool_prefix}tic; ac_word=$2
8563 echo "$as_me:8563: checking for $ac_word" >&5
8564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8565 if test "${ac_cv_prog_TIC+set}" = set; then
8566   echo $ECHO_N "(cached) $ECHO_C" >&6
8567 else
8568   if test -n "$TIC"; then
8569   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8570 else
8571   ac_save_IFS=$IFS; IFS=$ac_path_separator
8572 ac_dummy="$PATH"
8573 for ac_dir in $ac_dummy; do
8574   IFS=$ac_save_IFS
8575   test -z "$ac_dir" && ac_dir=.
8576   $as_executable_p "$ac_dir/$ac_word" || continue
8577 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8578 echo "$as_me:8578: found $ac_dir/$ac_word" >&5
8579 break
8580 done
8581
8582 fi
8583 fi
8584 TIC=$ac_cv_prog_TIC
8585 if test -n "$TIC"; then
8586   echo "$as_me:8586: result: $TIC" >&5
8587 echo "${ECHO_T}$TIC" >&6
8588 else
8589   echo "$as_me:8589: result: no" >&5
8590 echo "${ECHO_T}no" >&6
8591 fi
8592
8593 fi
8594 if test -z "$ac_cv_prog_TIC"; then
8595   ac_ct_TIC=$TIC
8596   # Extract the first word of "tic", so it can be a program name with args.
8597 set dummy tic; ac_word=$2
8598 echo "$as_me:8598: checking for $ac_word" >&5
8599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8600 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8601   echo $ECHO_N "(cached) $ECHO_C" >&6
8602 else
8603   if test -n "$ac_ct_TIC"; then
8604   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8605 else
8606   ac_save_IFS=$IFS; IFS=$ac_path_separator
8607 ac_dummy="$PATH"
8608 for ac_dir in $ac_dummy; do
8609   IFS=$ac_save_IFS
8610   test -z "$ac_dir" && ac_dir=.
8611   $as_executable_p "$ac_dir/$ac_word" || continue
8612 ac_cv_prog_ac_ct_TIC="tic"
8613 echo "$as_me:8613: found $ac_dir/$ac_word" >&5
8614 break
8615 done
8616
8617 fi
8618 fi
8619 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8620 if test -n "$ac_ct_TIC"; then
8621   echo "$as_me:8621: result: $ac_ct_TIC" >&5
8622 echo "${ECHO_T}$ac_ct_TIC" >&6
8623 else
8624   echo "$as_me:8624: result: no" >&5
8625 echo "${ECHO_T}no" >&6
8626 fi
8627
8628   TIC=$ac_ct_TIC
8629 else
8630   TIC="$ac_cv_prog_TIC"
8631 fi
8632
8633 if test -n "$ac_tool_prefix"; then
8634   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8635 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8636 echo "$as_me:8636: checking for $ac_word" >&5
8637 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8638 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8639   echo $ECHO_N "(cached) $ECHO_C" >&6
8640 else
8641   if test -n "$INFOCMP"; then
8642   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8643 else
8644   ac_save_IFS=$IFS; IFS=$ac_path_separator
8645 ac_dummy="$PATH"
8646 for ac_dir in $ac_dummy; do
8647   IFS=$ac_save_IFS
8648   test -z "$ac_dir" && ac_dir=.
8649   $as_executable_p "$ac_dir/$ac_word" || continue
8650 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8651 echo "$as_me:8651: found $ac_dir/$ac_word" >&5
8652 break
8653 done
8654
8655 fi
8656 fi
8657 INFOCMP=$ac_cv_prog_INFOCMP
8658 if test -n "$INFOCMP"; then
8659   echo "$as_me:8659: result: $INFOCMP" >&5
8660 echo "${ECHO_T}$INFOCMP" >&6
8661 else
8662   echo "$as_me:8662: result: no" >&5
8663 echo "${ECHO_T}no" >&6
8664 fi
8665
8666 fi
8667 if test -z "$ac_cv_prog_INFOCMP"; then
8668   ac_ct_INFOCMP=$INFOCMP
8669   # Extract the first word of "infocmp", so it can be a program name with args.
8670 set dummy infocmp; ac_word=$2
8671 echo "$as_me:8671: checking for $ac_word" >&5
8672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8673 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8674   echo $ECHO_N "(cached) $ECHO_C" >&6
8675 else
8676   if test -n "$ac_ct_INFOCMP"; then
8677   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8678 else
8679   ac_save_IFS=$IFS; IFS=$ac_path_separator
8680 ac_dummy="$PATH"
8681 for ac_dir in $ac_dummy; do
8682   IFS=$ac_save_IFS
8683   test -z "$ac_dir" && ac_dir=.
8684   $as_executable_p "$ac_dir/$ac_word" || continue
8685 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8686 echo "$as_me:8686: found $ac_dir/$ac_word" >&5
8687 break
8688 done
8689
8690 fi
8691 fi
8692 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8693 if test -n "$ac_ct_INFOCMP"; then
8694   echo "$as_me:8694: result: $ac_ct_INFOCMP" >&5
8695 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8696 else
8697   echo "$as_me:8697: result: no" >&5
8698 echo "${ECHO_T}no" >&6
8699 fi
8700
8701   INFOCMP=$ac_ct_INFOCMP
8702 else
8703   INFOCMP="$ac_cv_prog_INFOCMP"
8704 fi
8705
8706 if test -n "$FALLBACK_LIST"
8707 then
8708
8709 # Check whether --with-tic-path or --without-tic-path was given.
8710 if test "${with_tic_path+set}" = set; then
8711   withval="$with_tic_path"
8712   echo "$as_me:8712: checking for tic program for fallbacks" >&5
8713 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8714                 TIC=$withval
8715                 echo "$as_me:8715: result: $TIC" >&5
8716 echo "${ECHO_T}$TIC" >&6
8717
8718 if test "x$prefix" != xNONE; then
8719         cf_path_syntax="$prefix"
8720 else
8721         cf_path_syntax="$ac_default_prefix"
8722 fi
8723
8724 case ".$TIC" in
8725 (.\$\(*\)*|.\'*\'*)
8726         ;;
8727 (..|./*|.\\*)
8728         ;;
8729 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8730         ;;
8731 (.\$\{*prefix\}*|.\$\{*dir\}*)
8732         eval TIC="$TIC"
8733         case ".$TIC" in
8734         (.NONE/*)
8735                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8736                 ;;
8737         esac
8738         ;;
8739 (.no|.NONE/*)
8740         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8741         ;;
8742 (*)
8743         { { echo "$as_me:8743: error: expected a pathname, not \"$TIC\"" >&5
8744 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8745    { (exit 1); exit 1; }; }
8746         ;;
8747 esac
8748
8749 else
8750
8751 test -z "$TIC" && TIC="tic"
8752 for ac_prog in $TIC tic
8753 do
8754   # Extract the first word of "$ac_prog", so it can be a program name with args.
8755 set dummy $ac_prog; ac_word=$2
8756 echo "$as_me:8756: checking for $ac_word" >&5
8757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8758 if test "${ac_cv_path_TIC+set}" = set; then
8759   echo $ECHO_N "(cached) $ECHO_C" >&6
8760 else
8761   case $TIC in
8762   [\\/]* | ?:[\\/]*)
8763   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8764   ;;
8765   *)
8766   ac_save_IFS=$IFS; IFS=$ac_path_separator
8767 ac_dummy="$PATH:/usr/local/ncurses/bin"
8768 for ac_dir in $ac_dummy; do
8769   IFS=$ac_save_IFS
8770   test -z "$ac_dir" && ac_dir=.
8771   if $as_executable_p "$ac_dir/$ac_word"; then
8772    ac_cv_path_TIC="$ac_dir/$ac_word"
8773    echo "$as_me:8773: found $ac_dir/$ac_word" >&5
8774    break
8775 fi
8776 done
8777
8778   ;;
8779 esac
8780 fi
8781 TIC=$ac_cv_path_TIC
8782
8783 if test -n "$TIC"; then
8784   echo "$as_me:8784: result: $TIC" >&5
8785 echo "${ECHO_T}$TIC" >&6
8786 else
8787   echo "$as_me:8787: result: no" >&5
8788 echo "${ECHO_T}no" >&6
8789 fi
8790
8791   test -n "$TIC" && break
8792 done
8793 test -n "$TIC" || TIC="$TIC"
8794
8795 cf_path_prog=""
8796 cf_path_args=""
8797 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8798 for cf_temp in $ac_cv_path_TIC
8799 do
8800         if test -z "$cf_path_prog" ; then
8801                 if test "$with_full_paths" = yes ; then
8802
8803 if test "x$prefix" != xNONE; then
8804         cf_path_syntax="$prefix"
8805 else
8806         cf_path_syntax="$ac_default_prefix"
8807 fi
8808
8809 case ".$cf_temp" in
8810 (.\$\(*\)*|.\'*\'*)
8811         ;;
8812 (..|./*|.\\*)
8813         ;;
8814 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8815         ;;
8816 (.\$\{*prefix\}*|.\$\{*dir\}*)
8817         eval cf_temp="$cf_temp"
8818         case ".$cf_temp" in
8819         (.NONE/*)
8820                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8821                 ;;
8822         esac
8823         ;;
8824 (.no|.NONE/*)
8825         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8826         ;;
8827 (*)
8828         break
8829         ;;
8830 esac
8831
8832                         cf_path_prog="$cf_temp"
8833                 else
8834                         cf_path_prog="`basename "$cf_temp"`"
8835                 fi
8836         elif test -z "$cf_path_args" ; then
8837                 cf_path_args="$cf_temp"
8838         else
8839                 cf_path_args="$cf_path_args $cf_temp"
8840         fi
8841 done
8842 IFS="$cf_save_ifs"
8843
8844 if test -n "$cf_path_prog" ; then
8845
8846 echo "${as_me:-configure}:8846: testing defining path for ${cf_path_prog} ..." 1>&5
8847
8848 cat >>confdefs.h <<EOF
8849 #define TIC_PATH "$cf_path_prog"
8850 EOF
8851
8852         test -n "$cf_path_args" &&
8853 cat >>confdefs.h <<EOF
8854 #define TIC_ARGS "$cf_path_args"
8855 EOF
8856
8857 fi
8858
8859                 if test -z "$TIC"
8860                 then
8861                         { echo "$as_me:8861: WARNING: no tic program found for fallbacks" >&5
8862 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8863                 fi
8864
8865 fi;
8866
8867 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8868 if test "${with_infocmp_path+set}" = set; then
8869   withval="$with_infocmp_path"
8870   echo "$as_me:8870: checking for infocmp program for fallbacks" >&5
8871 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8872                 INFOCMP=$withval
8873                 echo "$as_me:8873: result: $INFOCMP" >&5
8874 echo "${ECHO_T}$INFOCMP" >&6
8875
8876 if test "x$prefix" != xNONE; then
8877         cf_path_syntax="$prefix"
8878 else
8879         cf_path_syntax="$ac_default_prefix"
8880 fi
8881
8882 case ".$INFOCMP" in
8883 (.\$\(*\)*|.\'*\'*)
8884         ;;
8885 (..|./*|.\\*)
8886         ;;
8887 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8888         ;;
8889 (.\$\{*prefix\}*|.\$\{*dir\}*)
8890         eval INFOCMP="$INFOCMP"
8891         case ".$INFOCMP" in
8892         (.NONE/*)
8893                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8894                 ;;
8895         esac
8896         ;;
8897 (.no|.NONE/*)
8898         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8899         ;;
8900 (*)
8901         { { echo "$as_me:8901: error: expected a pathname, not \"$INFOCMP\"" >&5
8902 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8903    { (exit 1); exit 1; }; }
8904         ;;
8905 esac
8906
8907 else
8908
8909 test -z "$INFOCMP" && INFOCMP="infocmp"
8910 for ac_prog in $INFOCMP infocmp
8911 do
8912   # Extract the first word of "$ac_prog", so it can be a program name with args.
8913 set dummy $ac_prog; ac_word=$2
8914 echo "$as_me:8914: checking for $ac_word" >&5
8915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8916 if test "${ac_cv_path_INFOCMP+set}" = set; then
8917   echo $ECHO_N "(cached) $ECHO_C" >&6
8918 else
8919   case $INFOCMP in
8920   [\\/]* | ?:[\\/]*)
8921   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8922   ;;
8923   *)
8924   ac_save_IFS=$IFS; IFS=$ac_path_separator
8925 ac_dummy="$PATH:/usr/local/ncurses/bin"
8926 for ac_dir in $ac_dummy; do
8927   IFS=$ac_save_IFS
8928   test -z "$ac_dir" && ac_dir=.
8929   if $as_executable_p "$ac_dir/$ac_word"; then
8930    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8931    echo "$as_me:8931: found $ac_dir/$ac_word" >&5
8932    break
8933 fi
8934 done
8935
8936   ;;
8937 esac
8938 fi
8939 INFOCMP=$ac_cv_path_INFOCMP
8940
8941 if test -n "$INFOCMP"; then
8942   echo "$as_me:8942: result: $INFOCMP" >&5
8943 echo "${ECHO_T}$INFOCMP" >&6
8944 else
8945   echo "$as_me:8945: result: no" >&5
8946 echo "${ECHO_T}no" >&6
8947 fi
8948
8949   test -n "$INFOCMP" && break
8950 done
8951 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8952
8953 cf_path_prog=""
8954 cf_path_args=""
8955 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8956 for cf_temp in $ac_cv_path_INFOCMP
8957 do
8958         if test -z "$cf_path_prog" ; then
8959                 if test "$with_full_paths" = yes ; then
8960
8961 if test "x$prefix" != xNONE; then
8962         cf_path_syntax="$prefix"
8963 else
8964         cf_path_syntax="$ac_default_prefix"
8965 fi
8966
8967 case ".$cf_temp" in
8968 (.\$\(*\)*|.\'*\'*)
8969         ;;
8970 (..|./*|.\\*)
8971         ;;
8972 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8973         ;;
8974 (.\$\{*prefix\}*|.\$\{*dir\}*)
8975         eval cf_temp="$cf_temp"
8976         case ".$cf_temp" in
8977         (.NONE/*)
8978                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8979                 ;;
8980         esac
8981         ;;
8982 (.no|.NONE/*)
8983         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8984         ;;
8985 (*)
8986         break
8987         ;;
8988 esac
8989
8990                         cf_path_prog="$cf_temp"
8991                 else
8992                         cf_path_prog="`basename "$cf_temp"`"
8993                 fi
8994         elif test -z "$cf_path_args" ; then
8995                 cf_path_args="$cf_temp"
8996         else
8997                 cf_path_args="$cf_path_args $cf_temp"
8998         fi
8999 done
9000 IFS="$cf_save_ifs"
9001
9002 if test -n "$cf_path_prog" ; then
9003
9004 echo "${as_me:-configure}:9004: testing defining path for ${cf_path_prog} ..." 1>&5
9005
9006 cat >>confdefs.h <<EOF
9007 #define INFOCMP_PATH "$cf_path_prog"
9008 EOF
9009
9010         test -n "$cf_path_args" &&
9011 cat >>confdefs.h <<EOF
9012 #define INFOCMP_ARGS "$cf_path_args"
9013 EOF
9014
9015 fi
9016
9017                 if test -z "$INFOCMP"
9018                 then
9019                         { echo "$as_me:9019: WARNING: no infocmp program found for fallbacks" >&5
9020 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9021                 fi
9022
9023 fi;
9024
9025         test -z "$TIC" && FALLBACK_LIST=
9026         test -z "$INFOCMP" && FALLBACK_LIST=
9027         if test -z "$FALLBACK_LIST"
9028         then
9029                 { echo "$as_me:9029: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9030 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9031         fi
9032 fi
9033
9034 USE_FALLBACKS=
9035 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9036
9037 echo "$as_me:9037: checking if you want modern xterm or antique" >&5
9038 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9039
9040 # Check whether --with-xterm-new or --without-xterm-new was given.
9041 if test "${with_xterm_new+set}" = set; then
9042   withval="$with_xterm_new"
9043   with_xterm_new=$withval
9044 else
9045   with_xterm_new=yes
9046 fi;
9047 case "$with_xterm_new" in
9048 (no) with_xterm_new=xterm-old;;
9049 (*)      with_xterm_new=xterm-new;;
9050 esac
9051 echo "$as_me:9051: result: $with_xterm_new" >&5
9052 echo "${ECHO_T}$with_xterm_new" >&6
9053 WHICH_XTERM=$with_xterm_new
9054
9055 case $host_os in
9056 (*linux-gnu|*cygwin|*mingw32|*msys)
9057         want_xterm_kbs=DEL
9058         ;;
9059 (*)
9060         want_xterm_kbs=BS
9061         ;;
9062 esac
9063
9064 echo "$as_me:9064: checking if xterm backspace sends BS or DEL" >&5
9065 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9066
9067 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9068 if test "${with_xterm_kbs+set}" = set; then
9069   withval="$with_xterm_kbs"
9070   with_xterm_kbs=$withval
9071 else
9072   with_xterm_kbs=BS
9073 fi;
9074 case x$with_xterm_kbs in
9075 (xyes|xno|xBS|xbs|x8)
9076         with_xterm_kbs=BS
9077         ;;
9078 (xDEL|xdel|x127)
9079         with_xterm_kbs=DEL
9080         ;;
9081 (*)
9082         with_xterm_kbs=$withval
9083         ;;
9084 esac
9085 echo "$as_me:9085: result: $with_xterm_kbs" >&5
9086 echo "${ECHO_T}$with_xterm_kbs" >&6
9087 XTERM_KBS=$with_xterm_kbs
9088
9089 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9090 then
9091         { echo "$as_me:9091: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9092 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9093 fi
9094
9095 MAKE_TERMINFO=
9096 if test "$use_database" = no ; then
9097         TERMINFO="${datadir}/terminfo"
9098         MAKE_TERMINFO="#"
9099 else
9100
9101 echo "$as_me:9101: checking for list of terminfo directories" >&5
9102 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9103
9104 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9105 if test "${with_terminfo_dirs+set}" = set; then
9106   withval="$with_terminfo_dirs"
9107
9108 else
9109   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9110 fi;
9111 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9112 cf_dst_path=
9113 for cf_src_path in $withval
9114 do
9115
9116 if test "x$prefix" != xNONE; then
9117         cf_path_syntax="$prefix"
9118 else
9119         cf_path_syntax="$ac_default_prefix"
9120 fi
9121
9122 case ".$cf_src_path" in
9123 (.\$\(*\)*|.\'*\'*)
9124         ;;
9125 (..|./*|.\\*)
9126         ;;
9127 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9128         ;;
9129 (.\$\{*prefix\}*|.\$\{*dir\}*)
9130         eval cf_src_path="$cf_src_path"
9131         case ".$cf_src_path" in
9132         (.NONE/*)
9133                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9134                 ;;
9135         esac
9136         ;;
9137 (.no|.NONE/*)
9138         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9139         ;;
9140 (*)
9141         { { echo "$as_me:9141: error: expected a pathname, not \"$cf_src_path\"" >&5
9142 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9143    { (exit 1); exit 1; }; }
9144         ;;
9145 esac
9146
9147   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9148   cf_dst_path="${cf_dst_path}${cf_src_path}"
9149 done
9150 IFS="$ac_save_ifs"
9151
9152 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9153 # so we have to check/work around.  We do prefer the result of "eval"...
9154 eval cf_dst_eval="$cf_dst_path"
9155 case "x$cf_dst_eval" in
9156 (xNONE*)
9157         TERMINFO_DIRS=$cf_dst_path
9158         ;;
9159 (*)
9160         TERMINFO_DIRS="$cf_dst_eval"
9161         ;;
9162 esac
9163
9164 echo "$as_me:9164: result: $TERMINFO_DIRS" >&5
9165 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9166 test -n "$TERMINFO_DIRS" &&
9167 cat >>confdefs.h <<EOF
9168 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9169 EOF
9170
9171 case "x$TERMINFO" in
9172 x???:*)
9173         { echo "$as_me:9173: WARNING: ignoring non-directory/file TERMINFO value" >&5
9174 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9175         unset TERMINFO
9176         ;;
9177 esac
9178
9179 echo "$as_me:9179: checking for default terminfo directory" >&5
9180 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9181
9182 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9183 if test "${with_default_terminfo_dir+set}" = set; then
9184   withval="$with_default_terminfo_dir"
9185
9186 else
9187   withval="${TERMINFO:-${datadir}/terminfo}"
9188 fi; if test -n "${datadir}/terminfo" ; then
9189
9190 if test "x$prefix" != xNONE; then
9191         cf_path_syntax="$prefix"
9192 else
9193         cf_path_syntax="$ac_default_prefix"
9194 fi
9195
9196 case ".$withval" in
9197 (.\$\(*\)*|.\'*\'*)
9198         ;;
9199 (..|./*|.\\*)
9200         ;;
9201 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9202         ;;
9203 (.\$\{*prefix\}*|.\$\{*dir\}*)
9204         eval withval="$withval"
9205         case ".$withval" in
9206         (.NONE/*)
9207                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9208                 ;;
9209         esac
9210         ;;
9211 (.no|.NONE/*)
9212         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9213         ;;
9214 (*)
9215         { { echo "$as_me:9215: error: expected a pathname, not \"$withval\"" >&5
9216 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9217    { (exit 1); exit 1; }; }
9218         ;;
9219 esac
9220
9221 fi
9222 eval TERMINFO="$withval"
9223
9224 echo "$as_me:9224: result: $TERMINFO" >&5
9225 echo "${ECHO_T}$TERMINFO" >&6
9226
9227 cat >>confdefs.h <<EOF
9228 #define TERMINFO "$TERMINFO"
9229 EOF
9230
9231 fi
9232
9233 ###     use option --disable-big-core to make tic run on small machines
9234 ###     We need 4Mb, check if we can allocate 50% more than that.
9235 echo "$as_me:9235: checking if big-core option selected" >&5
9236 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9237
9238 # Check whether --enable-big-core or --disable-big-core was given.
9239 if test "${enable_big_core+set}" = set; then
9240   enableval="$enable_big_core"
9241   with_big_core=$enableval
9242 else
9243   if test "$cross_compiling" = yes; then
9244   with_big_core=no
9245 else
9246   cat >"conftest.$ac_ext" <<_ACEOF
9247 #line 9247 "configure"
9248 #include "confdefs.h"
9249
9250 #include <stdlib.h>
9251 #include <string.h>
9252 int main() {
9253         unsigned long n = 6000000L;
9254         char *s = malloc(n);
9255         if (s != 0)
9256                 s[0] = s[n-1] = 0;
9257         ${cf_cv_main_return:-return}(s == 0);
9258 }
9259 _ACEOF
9260 rm -f "conftest$ac_exeext"
9261 if { (eval echo "$as_me:9261: \"$ac_link\"") >&5
9262   (eval $ac_link) 2>&5
9263   ac_status=$?
9264   echo "$as_me:9264: \$? = $ac_status" >&5
9265   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9266   { (eval echo "$as_me:9266: \"$ac_try\"") >&5
9267   (eval $ac_try) 2>&5
9268   ac_status=$?
9269   echo "$as_me:9269: \$? = $ac_status" >&5
9270   (exit "$ac_status"); }; }; then
9271   with_big_core=yes
9272 else
9273   echo "$as_me: program exited with status $ac_status" >&5
9274 echo "$as_me: failed program was:" >&5
9275 cat "conftest.$ac_ext" >&5
9276 with_big_core=no
9277 fi
9278 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9279 fi
9280 fi;
9281 echo "$as_me:9281: result: $with_big_core" >&5
9282 echo "${ECHO_T}$with_big_core" >&6
9283 test "x$with_big_core" = "xyes" &&
9284 cat >>confdefs.h <<\EOF
9285 #define HAVE_BIG_CORE 1
9286 EOF
9287
9288 ### ISO C only guarantees 512-char strings, we have tables which load faster
9289 ### when constructed using "big" strings.  More than the C compiler, the awk
9290 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9291 echo "$as_me:9291: checking if big-strings option selected" >&5
9292 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9293
9294 # Check whether --enable-big-strings or --disable-big-strings was given.
9295 if test "${enable_big_strings+set}" = set; then
9296   enableval="$enable_big_strings"
9297   with_big_strings=$enableval
9298 else
9299
9300         case x$AWK in
9301         (x)
9302                 eval with_big_strings=no
9303                 ;;
9304         (*)
9305                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9306                         | $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
9307                         eval with_big_strings=yes
9308                 else
9309                         eval with_big_strings=no
9310                 fi
9311                 ;;
9312         esac
9313
9314 fi;
9315 echo "$as_me:9315: result: $with_big_strings" >&5
9316 echo "${ECHO_T}$with_big_strings" >&6
9317
9318 USE_BIG_STRINGS=0
9319 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9320
9321 ###     use option --enable-termcap to compile in the termcap fallback support
9322 echo "$as_me:9322: checking if you want termcap-fallback support" >&5
9323 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9324
9325 # Check whether --enable-termcap or --disable-termcap was given.
9326 if test "${enable_termcap+set}" = set; then
9327   enableval="$enable_termcap"
9328   with_termcap=$enableval
9329 else
9330   with_termcap=no
9331 fi;
9332 echo "$as_me:9332: result: $with_termcap" >&5
9333 echo "${ECHO_T}$with_termcap" >&6
9334
9335 NCURSES_USE_TERMCAP=0
9336 if test "x$with_termcap" != "xyes" ; then
9337         if test "$use_database" = no ; then
9338                 if test -z "$with_fallback" ; then
9339                         { { echo "$as_me:9339: error: You have disabled the database w/o specifying fallbacks" >&5
9340 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9341    { (exit 1); exit 1; }; }
9342                 fi
9343         fi
9344
9345 cat >>confdefs.h <<\EOF
9346 #define PURE_TERMINFO 1
9347 EOF
9348
9349 else
9350
9351         if test "$with_ticlib" != no ; then
9352                 { { echo "$as_me:9352: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9353 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9354    { (exit 1); exit 1; }; }
9355         fi
9356
9357         NCURSES_USE_TERMCAP=1
9358         echo "$as_me:9358: checking for list of termcap files" >&5
9359 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9360
9361 # Check whether --with-termpath or --without-termpath was given.
9362 if test "${with_termpath+set}" = set; then
9363   withval="$with_termpath"
9364
9365 else
9366   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9367 fi;
9368 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9369 cf_dst_path=
9370 for cf_src_path in $withval
9371 do
9372
9373 if test "x$prefix" != xNONE; then
9374         cf_path_syntax="$prefix"
9375 else
9376         cf_path_syntax="$ac_default_prefix"
9377 fi
9378
9379 case ".$cf_src_path" in
9380 (.\$\(*\)*|.\'*\'*)
9381         ;;
9382 (..|./*|.\\*)
9383         ;;
9384 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9385         ;;
9386 (.\$\{*prefix\}*|.\$\{*dir\}*)
9387         eval cf_src_path="$cf_src_path"
9388         case ".$cf_src_path" in
9389         (.NONE/*)
9390                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9391                 ;;
9392         esac
9393         ;;
9394 (.no|.NONE/*)
9395         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9396         ;;
9397 (*)
9398         { { echo "$as_me:9398: error: expected a pathname, not \"$cf_src_path\"" >&5
9399 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9400    { (exit 1); exit 1; }; }
9401         ;;
9402 esac
9403
9404   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9405   cf_dst_path="${cf_dst_path}${cf_src_path}"
9406 done
9407 IFS="$ac_save_ifs"
9408
9409 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9410 # so we have to check/work around.  We do prefer the result of "eval"...
9411 eval cf_dst_eval="$cf_dst_path"
9412 case "x$cf_dst_eval" in
9413 (xNONE*)
9414         TERMPATH=$cf_dst_path
9415         ;;
9416 (*)
9417         TERMPATH="$cf_dst_eval"
9418         ;;
9419 esac
9420
9421         echo "$as_me:9421: result: $TERMPATH" >&5
9422 echo "${ECHO_T}$TERMPATH" >&6
9423         test -n "$TERMPATH" &&
9424 cat >>confdefs.h <<EOF
9425 #define TERMPATH "$TERMPATH"
9426 EOF
9427
9428         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9429         echo "$as_me:9429: checking if fast termcap-loader is needed" >&5
9430 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9431
9432 # Check whether --enable-getcap or --disable-getcap was given.
9433 if test "${enable_getcap+set}" = set; then
9434   enableval="$enable_getcap"
9435   with_getcap=$enableval
9436 else
9437   with_getcap=no
9438 fi;
9439         echo "$as_me:9439: result: $with_getcap" >&5
9440 echo "${ECHO_T}$with_getcap" >&6
9441         test "x$with_getcap" = "xyes" &&
9442 cat >>confdefs.h <<\EOF
9443 #define USE_GETCAP 1
9444 EOF
9445
9446         echo "$as_me:9446: checking if translated termcaps will be cached in ~/.terminfo" >&5
9447 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9448
9449 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9450 if test "${enable_getcap_cache+set}" = set; then
9451   enableval="$enable_getcap_cache"
9452   with_getcap_cache=$enableval
9453 else
9454   with_getcap_cache=no
9455 fi;
9456         echo "$as_me:9456: result: $with_getcap_cache" >&5
9457 echo "${ECHO_T}$with_getcap_cache" >&6
9458         test "x$with_getcap_cache" = "xyes" &&
9459 cat >>confdefs.h <<\EOF
9460 #define USE_GETCAP_CACHE 1
9461 EOF
9462
9463 fi
9464
9465 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9466 echo "$as_me:9466: checking if ~/.terminfo is wanted" >&5
9467 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9468
9469 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9470 if test "${enable_home_terminfo+set}" = set; then
9471   enableval="$enable_home_terminfo"
9472   with_home_terminfo=$enableval
9473 else
9474   with_home_terminfo=yes
9475 fi;
9476 echo "$as_me:9476: result: $with_home_terminfo" >&5
9477 echo "${ECHO_T}$with_home_terminfo" >&6
9478 test "x$with_home_terminfo" = "xyes" &&
9479 cat >>confdefs.h <<\EOF
9480 #define USE_HOME_TERMINFO 1
9481 EOF
9482
9483 echo "$as_me:9483: checking if you want to permit root to use ncurses environment variables" >&5
9484 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9485
9486 # Check whether --enable-root-environ or --disable-root-environ was given.
9487 if test "${enable_root_environ+set}" = set; then
9488   enableval="$enable_root_environ"
9489   with_root_environ=$enableval
9490 else
9491   with_root_environ=yes
9492 fi;
9493 echo "$as_me:9493: result: $with_root_environ" >&5
9494 echo "${ECHO_T}$with_root_environ" >&6
9495 test "x$with_root_environ" = xyes &&
9496 cat >>confdefs.h <<\EOF
9497 #define USE_ROOT_ENVIRON 1
9498 EOF
9499
9500 echo "$as_me:9500: checking if you want to permit setuid programs to access all files" >&5
9501 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9502
9503 # Check whether --enable-root-environ or --disable-root-environ was given.
9504 if test "${enable_root_environ+set}" = set; then
9505   enableval="$enable_root_environ"
9506   with_root_access=$enableval
9507 else
9508   with_root_access=yes
9509 fi;
9510 echo "$as_me:9510: result: $with_root_access" >&5
9511 echo "${ECHO_T}$with_root_access" >&6
9512 test "x$with_root_access" = xyes &&
9513 cat >>confdefs.h <<\EOF
9514 #define USE_ROOT_ACCESS 1
9515 EOF
9516
9517 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9518 ###   to reduce storage requirements for the terminfo database.
9519
9520 for ac_header in \
9521 unistd.h \
9522
9523 do
9524 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9525 echo "$as_me:9525: checking for $ac_header" >&5
9526 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9527 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9528   echo $ECHO_N "(cached) $ECHO_C" >&6
9529 else
9530   cat >"conftest.$ac_ext" <<_ACEOF
9531 #line 9531 "configure"
9532 #include "confdefs.h"
9533 #include <$ac_header>
9534 _ACEOF
9535 if { (eval echo "$as_me:9535: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9536   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9537   ac_status=$?
9538   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9539   rm -f conftest.er1
9540   cat conftest.err >&5
9541   echo "$as_me:9541: \$? = $ac_status" >&5
9542   (exit "$ac_status"); } >/dev/null; then
9543   if test -s conftest.err; then
9544     ac_cpp_err=$ac_c_preproc_warn_flag
9545   else
9546     ac_cpp_err=
9547   fi
9548 else
9549   ac_cpp_err=yes
9550 fi
9551 if test -z "$ac_cpp_err"; then
9552   eval "$as_ac_Header=yes"
9553 else
9554   echo "$as_me: failed program was:" >&5
9555   cat "conftest.$ac_ext" >&5
9556   eval "$as_ac_Header=no"
9557 fi
9558 rm -f conftest.err "conftest.$ac_ext"
9559 fi
9560 echo "$as_me:9560: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9561 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9562 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9563   cat >>confdefs.h <<EOF
9564 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9565 EOF
9566
9567 fi
9568 done
9569
9570 for ac_func in \
9571         remove \
9572         unlink
9573 do
9574 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9575 echo "$as_me:9575: checking for $ac_func" >&5
9576 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9577 if eval "test \"\${$as_ac_var+set}\" = set"; then
9578   echo $ECHO_N "(cached) $ECHO_C" >&6
9579 else
9580   cat >"conftest.$ac_ext" <<_ACEOF
9581 #line 9581 "configure"
9582 #include "confdefs.h"
9583 #define $ac_func autoconf_temporary
9584 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9585 #undef $ac_func
9586
9587 #ifdef __cplusplus
9588 extern "C"
9589 #endif
9590
9591 /* We use char because int might match the return type of a gcc2
9592    builtin and then its argument prototype would still apply.  */
9593 char $ac_func (void);
9594
9595 int
9596 main (void)
9597 {
9598
9599 /* The GNU C library defines stubs for functions which it implements
9600     to always fail with ENOSYS.  Some functions are actually named
9601     something starting with __ and the normal name is an alias.  */
9602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9603 #error found stub for $ac_func
9604 #endif
9605
9606         return $ac_func ();
9607   ;
9608   return 0;
9609 }
9610 _ACEOF
9611 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9612 if { (eval echo "$as_me:9612: \"$ac_link\"") >&5
9613   (eval $ac_link) 2>&5
9614   ac_status=$?
9615   echo "$as_me:9615: \$? = $ac_status" >&5
9616   (exit "$ac_status"); } &&
9617          { ac_try='test -s "conftest$ac_exeext"'
9618   { (eval echo "$as_me:9618: \"$ac_try\"") >&5
9619   (eval $ac_try) 2>&5
9620   ac_status=$?
9621   echo "$as_me:9621: \$? = $ac_status" >&5
9622   (exit "$ac_status"); }; }; then
9623   eval "$as_ac_var=yes"
9624 else
9625   echo "$as_me: failed program was:" >&5
9626 cat "conftest.$ac_ext" >&5
9627 eval "$as_ac_var=no"
9628 fi
9629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9630 fi
9631 echo "$as_me:9631: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9632 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9633 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9634   cat >>confdefs.h <<EOF
9635 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9636 EOF
9637
9638 fi
9639 done
9640
9641 if test "$cross_compiling" = yes ; then
9642
9643 for ac_func in \
9644                 link \
9645                 symlink
9646 do
9647 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9648 echo "$as_me:9648: checking for $ac_func" >&5
9649 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9650 if eval "test \"\${$as_ac_var+set}\" = set"; then
9651   echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653   cat >"conftest.$ac_ext" <<_ACEOF
9654 #line 9654 "configure"
9655 #include "confdefs.h"
9656 #define $ac_func autoconf_temporary
9657 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9658 #undef $ac_func
9659
9660 #ifdef __cplusplus
9661 extern "C"
9662 #endif
9663
9664 /* We use char because int might match the return type of a gcc2
9665    builtin and then its argument prototype would still apply.  */
9666 char $ac_func (void);
9667
9668 int
9669 main (void)
9670 {
9671
9672 /* The GNU C library defines stubs for functions which it implements
9673     to always fail with ENOSYS.  Some functions are actually named
9674     something starting with __ and the normal name is an alias.  */
9675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9676 #error found stub for $ac_func
9677 #endif
9678
9679         return $ac_func ();
9680   ;
9681   return 0;
9682 }
9683 _ACEOF
9684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9685 if { (eval echo "$as_me:9685: \"$ac_link\"") >&5
9686   (eval $ac_link) 2>&5
9687   ac_status=$?
9688   echo "$as_me:9688: \$? = $ac_status" >&5
9689   (exit "$ac_status"); } &&
9690          { ac_try='test -s "conftest$ac_exeext"'
9691   { (eval echo "$as_me:9691: \"$ac_try\"") >&5
9692   (eval $ac_try) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit "$ac_status"); }; }; then
9696   eval "$as_ac_var=yes"
9697 else
9698   echo "$as_me: failed program was:" >&5
9699 cat "conftest.$ac_ext" >&5
9700 eval "$as_ac_var=no"
9701 fi
9702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9703 fi
9704 echo "$as_me:9704: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9705 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9706 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9707   cat >>confdefs.h <<EOF
9708 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9709 EOF
9710
9711 fi
9712 done
9713
9714 else
9715         echo "$as_me:9715: checking if link/symlink functions work" >&5
9716 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9717 if test "${cf_cv_link_funcs+set}" = set; then
9718   echo $ECHO_N "(cached) $ECHO_C" >&6
9719 else
9720
9721                 cf_cv_link_funcs=
9722                 for cf_func in link symlink ; do
9723                         if test "$cross_compiling" = yes; then
9724
9725                         eval 'ac_cv_func_'$cf_func'=error'
9726 else
9727   cat >"conftest.$ac_ext" <<_ACEOF
9728 #line 9728 "configure"
9729 #include "confdefs.h"
9730
9731 #include <stdio.h>
9732 #include <sys/types.h>
9733 #include <sys/stat.h>
9734 #ifdef HAVE_UNISTD_H
9735 #include <unistd.h>
9736 #endif
9737 int main(void)
9738 {
9739         int fail = 0;
9740         char *src = "conftest.tmp";
9741         char *dst = "conftest.chk";
9742         struct stat src_sb, dst_sb;
9743         FILE *fp = fopen(src, "w");
9744         if (fp == 0) { fail = 3; } else {
9745                 fclose(fp); stat(src, &src_sb);
9746                 if ($cf_func(src, dst) < 0) {
9747                         fail = 1;
9748                 } else if (stat(dst, &dst_sb) < 0) {
9749                         fail = 2;
9750                 } else {
9751                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9752                         if (diff < 0) diff = -diff;
9753                         if (diff > 2) fail = 3;
9754                 }
9755         }
9756 #ifdef HAVE_UNLINK
9757         unlink(dst); unlink(src);
9758 #else
9759         remove(dst); remove(src);
9760 #endif
9761         ${cf_cv_main_return:-return} (fail);
9762 }
9763
9764 _ACEOF
9765 rm -f "conftest$ac_exeext"
9766 if { (eval echo "$as_me:9766: \"$ac_link\"") >&5
9767   (eval $ac_link) 2>&5
9768   ac_status=$?
9769   echo "$as_me:9769: \$? = $ac_status" >&5
9770   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9771   { (eval echo "$as_me:9771: \"$ac_try\"") >&5
9772   (eval $ac_try) 2>&5
9773   ac_status=$?
9774   echo "$as_me:9774: \$? = $ac_status" >&5
9775   (exit "$ac_status"); }; }; then
9776
9777                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9778                         eval 'ac_cv_func_'$cf_func'=yes'
9779 else
9780   echo "$as_me: program exited with status $ac_status" >&5
9781 echo "$as_me: failed program was:" >&5
9782 cat "conftest.$ac_ext" >&5
9783
9784                         eval 'ac_cv_func_'$cf_func'=no'
9785 fi
9786 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9787 fi
9788                 done
9789                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9790
9791 fi
9792 echo "$as_me:9792: result: $cf_cv_link_funcs" >&5
9793 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9794         test "$ac_cv_func_link"    = yes &&
9795 cat >>confdefs.h <<\EOF
9796 #define HAVE_LINK 1
9797 EOF
9798
9799         test "$ac_cv_func_symlink" = yes &&
9800 cat >>confdefs.h <<\EOF
9801 #define HAVE_SYMLINK 1
9802 EOF
9803
9804 fi
9805
9806 with_links=no
9807 with_symlinks=no
9808
9809 # soft links (symbolic links) are useful for some systems where hard links do
9810 # not work, or to make it simpler to copy terminfo trees around.
9811 if test "x$ac_cv_func_symlink" = xyes ; then
9812         echo "$as_me:9812: checking if tic should use symbolic links" >&5
9813 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9814
9815 # Check whether --enable-symlinks or --disable-symlinks was given.
9816 if test "${enable_symlinks+set}" = set; then
9817   enableval="$enable_symlinks"
9818   with_symlinks=$enableval
9819 else
9820   with_symlinks=no
9821 fi;
9822         echo "$as_me:9822: result: $with_symlinks" >&5
9823 echo "${ECHO_T}$with_symlinks" >&6
9824 fi
9825
9826 # If we have hard links and did not choose to use soft links instead, there is
9827 # no reason to make this choice optional - use the hard links.
9828 if test "$with_symlinks" = no ; then
9829         echo "$as_me:9829: checking if tic should use hard links" >&5
9830 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9831         if test "x$ac_cv_func_link" = xyes ; then
9832                 with_links=yes
9833         else
9834                 with_links=no
9835         fi
9836         echo "$as_me:9836: result: $with_links" >&5
9837 echo "${ECHO_T}$with_links" >&6
9838 fi
9839
9840 test "x$with_links" = xyes &&
9841 cat >>confdefs.h <<\EOF
9842 #define USE_LINKS 1
9843 EOF
9844
9845 test "x$with_symlinks" = xyes &&
9846 cat >>confdefs.h <<\EOF
9847 #define USE_SYMLINKS 1
9848 EOF
9849
9850 ###   use option --enable-broken-linker to force on use of broken-linker support
9851
9852 echo "$as_me:9852: checking if you want broken-linker support code" >&5
9853 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9854
9855 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9856 if test "${enable_broken_linker+set}" = set; then
9857   enableval="$enable_broken_linker"
9858   with_broken_linker=$enableval
9859 else
9860   with_broken_linker=no
9861 fi;
9862 echo "$as_me:9862: result: $with_broken_linker" >&5
9863 echo "${ECHO_T}$with_broken_linker" >&6
9864
9865 : "${BROKEN_LINKER:=0}"
9866 if test "x$with_broken_linker" = xyes ; then
9867
9868 cat >>confdefs.h <<\EOF
9869 #define BROKEN_LINKER 1
9870 EOF
9871
9872         BROKEN_LINKER=1
9873 fi
9874
9875 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9876 echo "$as_me:9876: checking if tputs should process BSD-style prefix padding" >&5
9877 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9878
9879 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9880 if test "${enable_bsdpad+set}" = set; then
9881   enableval="$enable_bsdpad"
9882   with_bsdpad=$enableval
9883 else
9884   with_bsdpad=no
9885 fi;
9886 echo "$as_me:9886: result: $with_bsdpad" >&5
9887 echo "${ECHO_T}$with_bsdpad" >&6
9888 test "x$with_bsdpad" = xyes &&
9889 cat >>confdefs.h <<\EOF
9890 #define BSD_TPUTS 1
9891 EOF
9892
9893 ###   use option --enable-widec to turn on use of wide-character support
9894 NCURSES_CH_T=chtype
9895 NCURSES_LIBUTF8=0
9896
9897 NEED_WCHAR_H=0
9898 NCURSES_MBSTATE_T=0
9899 NCURSES_WCHAR_T=0
9900 NCURSES_WINT_T=0
9901
9902 # Check to define _XOPEN_SOURCE "automatically"
9903 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9904
9905 echo "$as_me:9905: checking if the POSIX test-macros are already defined" >&5
9906 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9907 if test "${cf_cv_posix_visible+set}" = set; then
9908   echo $ECHO_N "(cached) $ECHO_C" >&6
9909 else
9910
9911 cat >"conftest.$ac_ext" <<_ACEOF
9912 #line 9912 "configure"
9913 #include "confdefs.h"
9914 #include <stdio.h>
9915 int
9916 main (void)
9917 {
9918
9919 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9920         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9921         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9922         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9923 #error conflicting symbols found
9924 #endif
9925
9926   ;
9927   return 0;
9928 }
9929 _ACEOF
9930 rm -f "conftest.$ac_objext"
9931 if { (eval echo "$as_me:9931: \"$ac_compile\"") >&5
9932   (eval $ac_compile) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit "$ac_status"); } &&
9936          { ac_try='test -s "conftest.$ac_objext"'
9937   { (eval echo "$as_me:9937: \"$ac_try\"") >&5
9938   (eval $ac_try) 2>&5
9939   ac_status=$?
9940   echo "$as_me:9940: \$? = $ac_status" >&5
9941   (exit "$ac_status"); }; }; then
9942   cf_cv_posix_visible=no
9943 else
9944   echo "$as_me: failed program was:" >&5
9945 cat "conftest.$ac_ext" >&5
9946 cf_cv_posix_visible=yes
9947 fi
9948 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9949
9950 fi
9951 echo "$as_me:9951: result: $cf_cv_posix_visible" >&5
9952 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9953
9954 if test "$cf_cv_posix_visible" = no; then
9955
9956 cf_XOPEN_SOURCE=600
9957 cf_POSIX_C_SOURCE=199506L
9958 cf_xopen_source=
9959
9960 case "$host_os" in
9961 (aix[4-7]*)
9962         cf_xopen_source="-D_ALL_SOURCE"
9963         ;;
9964 (msys)
9965         cf_XOPEN_SOURCE=600
9966         ;;
9967 (darwin[0-8].*)
9968         cf_xopen_source="-D_APPLE_C_SOURCE"
9969         ;;
9970 (darwin*)
9971         cf_xopen_source="-D_DARWIN_C_SOURCE"
9972         cf_XOPEN_SOURCE=
9973         ;;
9974 (freebsd*|dragonfly*|midnightbsd*)
9975         # 5.x headers associate
9976         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9977         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9978         cf_POSIX_C_SOURCE=200112L
9979         cf_XOPEN_SOURCE=600
9980         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9981         ;;
9982 (hpux11*)
9983         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9984         ;;
9985 (hpux*)
9986         cf_xopen_source="-D_HPUX_SOURCE"
9987         ;;
9988 (irix[56].*)
9989         cf_xopen_source="-D_SGI_SOURCE"
9990         cf_XOPEN_SOURCE=
9991         ;;
9992 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9993
9994 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9995
9996 echo "$as_me:9996: checking if this is the GNU C library" >&5
9997 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9998 if test "${cf_cv_gnu_library+set}" = set; then
9999   echo $ECHO_N "(cached) $ECHO_C" >&6
10000 else
10001
10002 cat >"conftest.$ac_ext" <<_ACEOF
10003 #line 10003 "configure"
10004 #include "confdefs.h"
10005 #include <sys/types.h>
10006 int
10007 main (void)
10008 {
10009
10010         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10011                 return 0;
10012         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10013                 return 0;
10014         #else
10015         #       error not GNU C library
10016         #endif
10017   ;
10018   return 0;
10019 }
10020 _ACEOF
10021 rm -f "conftest.$ac_objext"
10022 if { (eval echo "$as_me:10022: \"$ac_compile\"") >&5
10023   (eval $ac_compile) 2>&5
10024   ac_status=$?
10025   echo "$as_me:10025: \$? = $ac_status" >&5
10026   (exit "$ac_status"); } &&
10027          { ac_try='test -s "conftest.$ac_objext"'
10028   { (eval echo "$as_me:10028: \"$ac_try\"") >&5
10029   (eval $ac_try) 2>&5
10030   ac_status=$?
10031   echo "$as_me:10031: \$? = $ac_status" >&5
10032   (exit "$ac_status"); }; }; then
10033   cf_cv_gnu_library=yes
10034 else
10035   echo "$as_me: failed program was:" >&5
10036 cat "conftest.$ac_ext" >&5
10037 cf_cv_gnu_library=no
10038 fi
10039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10040
10041 fi
10042 echo "$as_me:10042: result: $cf_cv_gnu_library" >&5
10043 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10044
10045 if test x$cf_cv_gnu_library = xyes; then
10046
10047         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10048         # was changed to help a little.  newlib incorporated the change about 4
10049         # years later.
10050         echo "$as_me:10050: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10051 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10052 if test "${cf_cv_gnu_library_219+set}" = set; then
10053   echo $ECHO_N "(cached) $ECHO_C" >&6
10054 else
10055
10056                 cf_save="$CPPFLAGS"
10057
10058         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10059         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10060
10061                 cat >"conftest.$ac_ext" <<_ACEOF
10062 #line 10062 "configure"
10063 #include "confdefs.h"
10064 #include <sys/types.h>
10065 int
10066 main (void)
10067 {
10068
10069                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10070                                 return 0;
10071                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10072                                 return 0;
10073                         #else
10074                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10075                         #endif
10076   ;
10077   return 0;
10078 }
10079 _ACEOF
10080 rm -f "conftest.$ac_objext"
10081 if { (eval echo "$as_me:10081: \"$ac_compile\"") >&5
10082   (eval $ac_compile) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit "$ac_status"); } &&
10086          { ac_try='test -s "conftest.$ac_objext"'
10087   { (eval echo "$as_me:10087: \"$ac_try\"") >&5
10088   (eval $ac_try) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit "$ac_status"); }; }; then
10092   cf_cv_gnu_library_219=yes
10093 else
10094   echo "$as_me: failed program was:" >&5
10095 cat "conftest.$ac_ext" >&5
10096 cf_cv_gnu_library_219=no
10097 fi
10098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10099                 CPPFLAGS="$cf_save"
10100
10101 fi
10102 echo "$as_me:10102: result: $cf_cv_gnu_library_219" >&5
10103 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10104
10105         if test "x$cf_cv_gnu_library_219" = xyes; then
10106                 cf_save="$CPPFLAGS"
10107                 echo "$as_me:10107: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10108 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10109 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10110   echo $ECHO_N "(cached) $ECHO_C" >&6
10111 else
10112
10113 cf_fix_cppflags=no
10114 cf_new_cflags=
10115 cf_new_cppflags=
10116 cf_new_extra_cppflags=
10117
10118 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10119 do
10120 case "$cf_fix_cppflags" in
10121 (no)
10122         case "$cf_add_cflags" in
10123         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10124                 case "$cf_add_cflags" in
10125                 (-D*)
10126                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10127
10128                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10129                                 && test -z "${cf_tst_cflags}" \
10130                                 && cf_fix_cppflags=yes
10131
10132                         if test "$cf_fix_cppflags" = yes ; then
10133
10134         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10135         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10136
10137                                 continue
10138                         elif test "${cf_tst_cflags}" = "\"'" ; then
10139
10140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10142
10143                                 continue
10144                         fi
10145                         ;;
10146                 esac
10147                 case "$CPPFLAGS" in
10148                 (*$cf_add_cflags)
10149                         ;;
10150                 (*)
10151                         case "$cf_add_cflags" in
10152                         (-D*)
10153                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10154
10155 CPPFLAGS=`echo "$CPPFLAGS" | \
10156         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10157                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10158
10159                                 ;;
10160                         esac
10161
10162         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10163         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10164
10165                         ;;
10166                 esac
10167                 ;;
10168         (*)
10169
10170         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10171         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10172
10173                 ;;
10174         esac
10175         ;;
10176 (yes)
10177
10178         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10179         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10180
10181         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10182
10183         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10184                 && test -z "${cf_tst_cflags}" \
10185                 && cf_fix_cppflags=no
10186         ;;
10187 esac
10188 done
10189
10190 if test -n "$cf_new_cflags" ; then
10191
10192         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10193         CFLAGS="${CFLAGS}$cf_new_cflags"
10194
10195 fi
10196
10197 if test -n "$cf_new_cppflags" ; then
10198
10199         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10200         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10201
10202 fi
10203
10204 if test -n "$cf_new_extra_cppflags" ; then
10205
10206         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10207         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10208
10209 fi
10210
10211                         cat >"conftest.$ac_ext" <<_ACEOF
10212 #line 10212 "configure"
10213 #include "confdefs.h"
10214
10215                                 #include <limits.h>
10216                                 #include <sys/types.h>
10217
10218 int
10219 main (void)
10220 {
10221
10222                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10223                                         return 0;
10224                                 #else
10225                                 #       error GNU C library is too old
10226                                 #endif
10227   ;
10228   return 0;
10229 }
10230 _ACEOF
10231 rm -f "conftest.$ac_objext"
10232 if { (eval echo "$as_me:10232: \"$ac_compile\"") >&5
10233   (eval $ac_compile) 2>&5
10234   ac_status=$?
10235   echo "$as_me:10235: \$? = $ac_status" >&5
10236   (exit "$ac_status"); } &&
10237          { ac_try='test -s "conftest.$ac_objext"'
10238   { (eval echo "$as_me:10238: \"$ac_try\"") >&5
10239   (eval $ac_try) 2>&5
10240   ac_status=$?
10241   echo "$as_me:10241: \$? = $ac_status" >&5
10242   (exit "$ac_status"); }; }; then
10243   cf_cv_gnu_dftsrc_219=yes
10244 else
10245   echo "$as_me: failed program was:" >&5
10246 cat "conftest.$ac_ext" >&5
10247 cf_cv_gnu_dftsrc_219=no
10248 fi
10249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10250
10251 fi
10252 echo "$as_me:10252: result: $cf_cv_gnu_dftsrc_219" >&5
10253 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10254                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10255         else
10256                 cf_cv_gnu_dftsrc_219=maybe
10257         fi
10258
10259         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10260
10261                 echo "$as_me:10261: checking if we must define _GNU_SOURCE" >&5
10262 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10263 if test "${cf_cv_gnu_source+set}" = set; then
10264   echo $ECHO_N "(cached) $ECHO_C" >&6
10265 else
10266
10267                 cat >"conftest.$ac_ext" <<_ACEOF
10268 #line 10268 "configure"
10269 #include "confdefs.h"
10270 #include <sys/types.h>
10271 int
10272 main (void)
10273 {
10274
10275                         #ifndef _XOPEN_SOURCE
10276                         #error  expected _XOPEN_SOURCE to be defined
10277                         #endif
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f "conftest.$ac_objext"
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit "$ac_status"); } &&
10288          { ac_try='test -s "conftest.$ac_objext"'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit "$ac_status"); }; }; then
10294   cf_cv_gnu_source=no
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat "conftest.$ac_ext" >&5
10298 cf_save="$CPPFLAGS"
10299
10300 cf_fix_cppflags=no
10301 cf_new_cflags=
10302 cf_new_cppflags=
10303 cf_new_extra_cppflags=
10304
10305 for cf_add_cflags in -D_GNU_SOURCE
10306 do
10307 case "$cf_fix_cppflags" in
10308 (no)
10309         case "$cf_add_cflags" in
10310         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10311                 case "$cf_add_cflags" in
10312                 (-D*)
10313                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10314
10315                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10316                                 && test -z "${cf_tst_cflags}" \
10317                                 && cf_fix_cppflags=yes
10318
10319                         if test "$cf_fix_cppflags" = yes ; then
10320
10321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10323
10324                                 continue
10325                         elif test "${cf_tst_cflags}" = "\"'" ; then
10326
10327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10329
10330                                 continue
10331                         fi
10332                         ;;
10333                 esac
10334                 case "$CPPFLAGS" in
10335                 (*$cf_add_cflags)
10336                         ;;
10337                 (*)
10338                         case "$cf_add_cflags" in
10339                         (-D*)
10340                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10341
10342 CPPFLAGS=`echo "$CPPFLAGS" | \
10343         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10344                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10345
10346                                 ;;
10347                         esac
10348
10349         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10350         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10351
10352                         ;;
10353                 esac
10354                 ;;
10355         (*)
10356
10357         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10358         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10359
10360                 ;;
10361         esac
10362         ;;
10363 (yes)
10364
10365         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10366         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10367
10368         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10369
10370         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10371                 && test -z "${cf_tst_cflags}" \
10372                 && cf_fix_cppflags=no
10373         ;;
10374 esac
10375 done
10376
10377 if test -n "$cf_new_cflags" ; then
10378
10379         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10380         CFLAGS="${CFLAGS}$cf_new_cflags"
10381
10382 fi
10383
10384 if test -n "$cf_new_cppflags" ; then
10385
10386         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10387         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10388
10389 fi
10390
10391 if test -n "$cf_new_extra_cppflags" ; then
10392
10393         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10394         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10395
10396 fi
10397
10398                          cat >"conftest.$ac_ext" <<_ACEOF
10399 #line 10399 "configure"
10400 #include "confdefs.h"
10401 #include <sys/types.h>
10402 int
10403 main (void)
10404 {
10405
10406                                 #ifdef _XOPEN_SOURCE
10407                                 #error  expected _XOPEN_SOURCE to be undefined
10408                                 #endif
10409   ;
10410   return 0;
10411 }
10412 _ACEOF
10413 rm -f "conftest.$ac_objext"
10414 if { (eval echo "$as_me:10414: \"$ac_compile\"") >&5
10415   (eval $ac_compile) 2>&5
10416   ac_status=$?
10417   echo "$as_me:10417: \$? = $ac_status" >&5
10418   (exit "$ac_status"); } &&
10419          { ac_try='test -s "conftest.$ac_objext"'
10420   { (eval echo "$as_me:10420: \"$ac_try\"") >&5
10421   (eval $ac_try) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit "$ac_status"); }; }; then
10425   cf_cv_gnu_source=no
10426 else
10427   echo "$as_me: failed program was:" >&5
10428 cat "conftest.$ac_ext" >&5
10429 cf_cv_gnu_source=yes
10430 fi
10431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10432                         CPPFLAGS="$cf_save"
10433
10434 fi
10435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10436
10437 fi
10438 echo "$as_me:10438: result: $cf_cv_gnu_source" >&5
10439 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10440
10441                 if test "$cf_cv_gnu_source" = yes
10442                 then
10443                 echo "$as_me:10443: checking if we should also define _DEFAULT_SOURCE" >&5
10444 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10445 if test "${cf_cv_default_source+set}" = set; then
10446   echo $ECHO_N "(cached) $ECHO_C" >&6
10447 else
10448
10449         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10450         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10451
10452                         cat >"conftest.$ac_ext" <<_ACEOF
10453 #line 10453 "configure"
10454 #include "confdefs.h"
10455 #include <sys/types.h>
10456 int
10457 main (void)
10458 {
10459
10460                                 #ifdef _DEFAULT_SOURCE
10461                                 #error  expected _DEFAULT_SOURCE to be undefined
10462                                 #endif
10463   ;
10464   return 0;
10465 }
10466 _ACEOF
10467 rm -f "conftest.$ac_objext"
10468 if { (eval echo "$as_me:10468: \"$ac_compile\"") >&5
10469   (eval $ac_compile) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit "$ac_status"); } &&
10473          { ac_try='test -s "conftest.$ac_objext"'
10474   { (eval echo "$as_me:10474: \"$ac_try\"") >&5
10475   (eval $ac_try) 2>&5
10476   ac_status=$?
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit "$ac_status"); }; }; then
10479   cf_cv_default_source=no
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 cat "conftest.$ac_ext" >&5
10483 cf_cv_default_source=yes
10484 fi
10485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10486
10487 fi
10488 echo "$as_me:10488: result: $cf_cv_default_source" >&5
10489 echo "${ECHO_T}$cf_cv_default_source" >&6
10490                         if test "$cf_cv_default_source" = yes
10491                         then
10492
10493         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10494         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10495
10496                         fi
10497                 fi
10498         fi
10499
10500 fi
10501
10502         ;;
10503 (minix*)
10504         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10505         ;;
10506 (mirbsd*)
10507         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10508         cf_XOPEN_SOURCE=
10509
10510 if test "$cf_cv_posix_visible" = no; then
10511
10512 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10513
10514 cf_save_CFLAGS="$CFLAGS"
10515 cf_save_CPPFLAGS="$CPPFLAGS"
10516
10517 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10518         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10519                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10520
10521 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10522         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10523                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10524
10525 echo "$as_me:10525: checking if we should define _POSIX_C_SOURCE" >&5
10526 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10527 if test "${cf_cv_posix_c_source+set}" = set; then
10528   echo $ECHO_N "(cached) $ECHO_C" >&6
10529 else
10530
10531 echo "${as_me:-configure}:10531: testing if the symbol is already defined go no further ..." 1>&5
10532
10533         cat >"conftest.$ac_ext" <<_ACEOF
10534 #line 10534 "configure"
10535 #include "confdefs.h"
10536 #include <sys/types.h>
10537 int
10538 main (void)
10539 {
10540
10541 #ifndef _POSIX_C_SOURCE
10542 make an error
10543 #endif
10544   ;
10545   return 0;
10546 }
10547 _ACEOF
10548 rm -f "conftest.$ac_objext"
10549 if { (eval echo "$as_me:10549: \"$ac_compile\"") >&5
10550   (eval $ac_compile) 2>&5
10551   ac_status=$?
10552   echo "$as_me:10552: \$? = $ac_status" >&5
10553   (exit "$ac_status"); } &&
10554          { ac_try='test -s "conftest.$ac_objext"'
10555   { (eval echo "$as_me:10555: \"$ac_try\"") >&5
10556   (eval $ac_try) 2>&5
10557   ac_status=$?
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit "$ac_status"); }; }; then
10560   cf_cv_posix_c_source=no
10561 else
10562   echo "$as_me: failed program was:" >&5
10563 cat "conftest.$ac_ext" >&5
10564 cf_want_posix_source=no
10565          case .$cf_POSIX_C_SOURCE in
10566          (.[12]??*)
10567                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10568                 ;;
10569          (.2)
10570                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10571                 cf_want_posix_source=yes
10572                 ;;
10573          (.*)
10574                 cf_want_posix_source=yes
10575                 ;;
10576          esac
10577          if test "$cf_want_posix_source" = yes ; then
10578                 cat >"conftest.$ac_ext" <<_ACEOF
10579 #line 10579 "configure"
10580 #include "confdefs.h"
10581 #include <sys/types.h>
10582 int
10583 main (void)
10584 {
10585
10586 #ifdef _POSIX_SOURCE
10587 make an error
10588 #endif
10589   ;
10590   return 0;
10591 }
10592 _ACEOF
10593 rm -f "conftest.$ac_objext"
10594 if { (eval echo "$as_me:10594: \"$ac_compile\"") >&5
10595   (eval $ac_compile) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit "$ac_status"); } &&
10599          { ac_try='test -s "conftest.$ac_objext"'
10600   { (eval echo "$as_me:10600: \"$ac_try\"") >&5
10601   (eval $ac_try) 2>&5
10602   ac_status=$?
10603   echo "$as_me:10603: \$? = $ac_status" >&5
10604   (exit "$ac_status"); }; }; then
10605   :
10606 else
10607   echo "$as_me: failed program was:" >&5
10608 cat "conftest.$ac_ext" >&5
10609 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10610 fi
10611 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10612          fi
10613
10614 echo "${as_me:-configure}:10614: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10615
10616          CFLAGS="$cf_trim_CFLAGS"
10617          CPPFLAGS="$cf_trim_CPPFLAGS"
10618
10619         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10620         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10621
10622 echo "${as_me:-configure}:10622: testing if the second compile does not leave our definition intact error ..." 1>&5
10623
10624          cat >"conftest.$ac_ext" <<_ACEOF
10625 #line 10625 "configure"
10626 #include "confdefs.h"
10627 #include <sys/types.h>
10628 int
10629 main (void)
10630 {
10631
10632 #ifndef _POSIX_C_SOURCE
10633 make an error
10634 #endif
10635   ;
10636   return 0;
10637 }
10638 _ACEOF
10639 rm -f "conftest.$ac_objext"
10640 if { (eval echo "$as_me:10640: \"$ac_compile\"") >&5
10641   (eval $ac_compile) 2>&5
10642   ac_status=$?
10643   echo "$as_me:10643: \$? = $ac_status" >&5
10644   (exit "$ac_status"); } &&
10645          { ac_try='test -s "conftest.$ac_objext"'
10646   { (eval echo "$as_me:10646: \"$ac_try\"") >&5
10647   (eval $ac_try) 2>&5
10648   ac_status=$?
10649   echo "$as_me:10649: \$? = $ac_status" >&5
10650   (exit "$ac_status"); }; }; then
10651   :
10652 else
10653   echo "$as_me: failed program was:" >&5
10654 cat "conftest.$ac_ext" >&5
10655 cf_cv_posix_c_source=no
10656 fi
10657 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10658          CFLAGS="$cf_save_CFLAGS"
10659          CPPFLAGS="$cf_save_CPPFLAGS"
10660
10661 fi
10662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10663
10664 fi
10665 echo "$as_me:10665: result: $cf_cv_posix_c_source" >&5
10666 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10667
10668 if test "$cf_cv_posix_c_source" != no ; then
10669         CFLAGS="$cf_trim_CFLAGS"
10670         CPPFLAGS="$cf_trim_CPPFLAGS"
10671
10672 cf_fix_cppflags=no
10673 cf_new_cflags=
10674 cf_new_cppflags=
10675 cf_new_extra_cppflags=
10676
10677 for cf_add_cflags in $cf_cv_posix_c_source
10678 do
10679 case "$cf_fix_cppflags" in
10680 (no)
10681         case "$cf_add_cflags" in
10682         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10683                 case "$cf_add_cflags" in
10684                 (-D*)
10685                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10686
10687                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10688                                 && test -z "${cf_tst_cflags}" \
10689                                 && cf_fix_cppflags=yes
10690
10691                         if test "$cf_fix_cppflags" = yes ; then
10692
10693         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10694         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10695
10696                                 continue
10697                         elif test "${cf_tst_cflags}" = "\"'" ; then
10698
10699         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10700         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10701
10702                                 continue
10703                         fi
10704                         ;;
10705                 esac
10706                 case "$CPPFLAGS" in
10707                 (*$cf_add_cflags)
10708                         ;;
10709                 (*)
10710                         case "$cf_add_cflags" in
10711                         (-D*)
10712                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10713
10714 CPPFLAGS=`echo "$CPPFLAGS" | \
10715         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10716                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10717
10718                                 ;;
10719                         esac
10720
10721         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10722         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10723
10724                         ;;
10725                 esac
10726                 ;;
10727         (*)
10728
10729         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10730         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10731
10732                 ;;
10733         esac
10734         ;;
10735 (yes)
10736
10737         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10738         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10739
10740         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10741
10742         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10743                 && test -z "${cf_tst_cflags}" \
10744                 && cf_fix_cppflags=no
10745         ;;
10746 esac
10747 done
10748
10749 if test -n "$cf_new_cflags" ; then
10750
10751         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10752         CFLAGS="${CFLAGS}$cf_new_cflags"
10753
10754 fi
10755
10756 if test -n "$cf_new_cppflags" ; then
10757
10758         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10759         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10760
10761 fi
10762
10763 if test -n "$cf_new_extra_cppflags" ; then
10764
10765         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10766         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10767
10768 fi
10769
10770 fi
10771
10772 fi # cf_cv_posix_visible
10773
10774         ;;
10775 (netbsd*)
10776         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10777         ;;
10778 (openbsd[6-9]*)
10779         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10780         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10781         # Abusing the conformance level is a workaround.
10782         { echo "$as_me:10782: WARNING: this system does not provide usable locale support" >&5
10783 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10784         cf_xopen_source="-D_BSD_SOURCE"
10785         cf_XOPEN_SOURCE=700
10786         ;;
10787 (openbsd[4-5]*)
10788         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10789         cf_xopen_source="-D_BSD_SOURCE"
10790         cf_XOPEN_SOURCE=600
10791         ;;
10792 (openbsd*)
10793         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10794         ;;
10795 (osf[45]*)
10796         cf_xopen_source="-D_OSF_SOURCE"
10797         ;;
10798 (nto-qnx*)
10799         cf_xopen_source="-D_QNX_SOURCE"
10800         ;;
10801 (sco*)
10802         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10803         ;;
10804 (solaris2.*)
10805         cf_xopen_source="-D__EXTENSIONS__"
10806         cf_cv_xopen_source=broken
10807         ;;
10808 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10809         cf_XOPEN_SOURCE=
10810         cf_POSIX_C_SOURCE=
10811         ;;
10812 (*)
10813
10814 echo "$as_me:10814: checking if we should define _XOPEN_SOURCE" >&5
10815 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10816 if test "${cf_cv_xopen_source+set}" = set; then
10817   echo $ECHO_N "(cached) $ECHO_C" >&6
10818 else
10819
10820         cat >"conftest.$ac_ext" <<_ACEOF
10821 #line 10821 "configure"
10822 #include "confdefs.h"
10823
10824 #include <stdlib.h>
10825 #include <string.h>
10826 #include <sys/types.h>
10827
10828 int
10829 main (void)
10830 {
10831
10832 #ifndef _XOPEN_SOURCE
10833 make an error
10834 #endif
10835
10836   ;
10837   return 0;
10838 }
10839 _ACEOF
10840 rm -f "conftest.$ac_objext"
10841 if { (eval echo "$as_me:10841: \"$ac_compile\"") >&5
10842   (eval $ac_compile) 2>&5
10843   ac_status=$?
10844   echo "$as_me:10844: \$? = $ac_status" >&5
10845   (exit "$ac_status"); } &&
10846          { ac_try='test -s "conftest.$ac_objext"'
10847   { (eval echo "$as_me:10847: \"$ac_try\"") >&5
10848   (eval $ac_try) 2>&5
10849   ac_status=$?
10850   echo "$as_me:10850: \$? = $ac_status" >&5
10851   (exit "$ac_status"); }; }; then
10852   cf_cv_xopen_source=no
10853 else
10854   echo "$as_me: failed program was:" >&5
10855 cat "conftest.$ac_ext" >&5
10856 cf_save="$CPPFLAGS"
10857
10858         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10859         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10860
10861          cat >"conftest.$ac_ext" <<_ACEOF
10862 #line 10862 "configure"
10863 #include "confdefs.h"
10864
10865 #include <stdlib.h>
10866 #include <string.h>
10867 #include <sys/types.h>
10868
10869 int
10870 main (void)
10871 {
10872
10873 #ifndef _XOPEN_SOURCE
10874 make an error
10875 #endif
10876
10877   ;
10878   return 0;
10879 }
10880 _ACEOF
10881 rm -f "conftest.$ac_objext"
10882 if { (eval echo "$as_me:10882: \"$ac_compile\"") >&5
10883   (eval $ac_compile) 2>&5
10884   ac_status=$?
10885   echo "$as_me:10885: \$? = $ac_status" >&5
10886   (exit "$ac_status"); } &&
10887          { ac_try='test -s "conftest.$ac_objext"'
10888   { (eval echo "$as_me:10888: \"$ac_try\"") >&5
10889   (eval $ac_try) 2>&5
10890   ac_status=$?
10891   echo "$as_me:10891: \$? = $ac_status" >&5
10892   (exit "$ac_status"); }; }; then
10893   cf_cv_xopen_source=no
10894 else
10895   echo "$as_me: failed program was:" >&5
10896 cat "conftest.$ac_ext" >&5
10897 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10898 fi
10899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10900                 CPPFLAGS="$cf_save"
10901
10902 fi
10903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10904
10905 fi
10906 echo "$as_me:10906: result: $cf_cv_xopen_source" >&5
10907 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10908
10909 if test "$cf_cv_xopen_source" != no ; then
10910
10911 CFLAGS=`echo "$CFLAGS" | \
10912         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10913                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10914
10915 CPPFLAGS=`echo "$CPPFLAGS" | \
10916         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10917                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10918
10919         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10920
10921 for cf_add_cflags in $cf_temp_xopen_source
10922 do
10923         case "x$cf_add_cflags" in
10924         (x-[DU]*)
10925
10926 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10927 while true
10928 do
10929         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'`
10930         test "$CFLAGS" != "$cf_old_cflag" || break
10931
10932         CFLAGS="$cf_old_cflag"
10933 done
10934
10935 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10936 while true
10937 do
10938         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'`
10939         test "$CPPFLAGS" != "$cf_old_cflag" || break
10940
10941         CPPFLAGS="$cf_old_cflag"
10942 done
10943
10944                 ;;
10945         esac
10946
10947 cf_fix_cppflags=no
10948 cf_new_cflags=
10949 cf_new_cppflags=
10950 cf_new_extra_cppflags=
10951
10952 for cf_add_cflags in $cf_add_cflags
10953 do
10954 case "$cf_fix_cppflags" in
10955 (no)
10956         case "$cf_add_cflags" in
10957         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10958                 case "$cf_add_cflags" in
10959                 (-D*)
10960                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10961
10962                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10963                                 && test -z "${cf_tst_cflags}" \
10964                                 && cf_fix_cppflags=yes
10965
10966                         if test "$cf_fix_cppflags" = yes ; then
10967
10968         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10969         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10970
10971                                 continue
10972                         elif test "${cf_tst_cflags}" = "\"'" ; then
10973
10974         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977                                 continue
10978                         fi
10979                         ;;
10980                 esac
10981                 case "$CPPFLAGS" in
10982                 (*$cf_add_cflags)
10983                         ;;
10984                 (*)
10985                         case "$cf_add_cflags" in
10986                         (-D*)
10987                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10988
10989 CPPFLAGS=`echo "$CPPFLAGS" | \
10990         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10991                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10992
10993                                 ;;
10994                         esac
10995
10996         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10997         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10998
10999                         ;;
11000                 esac
11001                 ;;
11002         (*)
11003
11004         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11005         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11006
11007                 ;;
11008         esac
11009         ;;
11010 (yes)
11011
11012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11014
11015         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11016
11017         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11018                 && test -z "${cf_tst_cflags}" \
11019                 && cf_fix_cppflags=no
11020         ;;
11021 esac
11022 done
11023
11024 if test -n "$cf_new_cflags" ; then
11025
11026         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11027         CFLAGS="${CFLAGS}$cf_new_cflags"
11028
11029 fi
11030
11031 if test -n "$cf_new_cppflags" ; then
11032
11033         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11034         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11035
11036 fi
11037
11038 if test -n "$cf_new_extra_cppflags" ; then
11039
11040         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11041         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11042
11043 fi
11044
11045 done
11046
11047 fi
11048
11049         cf_save_xopen_cppflags="$CPPFLAGS"
11050
11051 if test "$cf_cv_posix_visible" = no; then
11052
11053 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11054
11055 cf_save_CFLAGS="$CFLAGS"
11056 cf_save_CPPFLAGS="$CPPFLAGS"
11057
11058 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11059         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11060                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11061
11062 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11063         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11064                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11065
11066 echo "$as_me:11066: checking if we should define _POSIX_C_SOURCE" >&5
11067 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11068 if test "${cf_cv_posix_c_source+set}" = set; then
11069   echo $ECHO_N "(cached) $ECHO_C" >&6
11070 else
11071
11072 echo "${as_me:-configure}:11072: testing if the symbol is already defined go no further ..." 1>&5
11073
11074         cat >"conftest.$ac_ext" <<_ACEOF
11075 #line 11075 "configure"
11076 #include "confdefs.h"
11077 #include <sys/types.h>
11078 int
11079 main (void)
11080 {
11081
11082 #ifndef _POSIX_C_SOURCE
11083 make an error
11084 #endif
11085   ;
11086   return 0;
11087 }
11088 _ACEOF
11089 rm -f "conftest.$ac_objext"
11090 if { (eval echo "$as_me:11090: \"$ac_compile\"") >&5
11091   (eval $ac_compile) 2>&5
11092   ac_status=$?
11093   echo "$as_me:11093: \$? = $ac_status" >&5
11094   (exit "$ac_status"); } &&
11095          { ac_try='test -s "conftest.$ac_objext"'
11096   { (eval echo "$as_me:11096: \"$ac_try\"") >&5
11097   (eval $ac_try) 2>&5
11098   ac_status=$?
11099   echo "$as_me:11099: \$? = $ac_status" >&5
11100   (exit "$ac_status"); }; }; then
11101   cf_cv_posix_c_source=no
11102 else
11103   echo "$as_me: failed program was:" >&5
11104 cat "conftest.$ac_ext" >&5
11105 cf_want_posix_source=no
11106          case .$cf_POSIX_C_SOURCE in
11107          (.[12]??*)
11108                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11109                 ;;
11110          (.2)
11111                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11112                 cf_want_posix_source=yes
11113                 ;;
11114          (.*)
11115                 cf_want_posix_source=yes
11116                 ;;
11117          esac
11118          if test "$cf_want_posix_source" = yes ; then
11119                 cat >"conftest.$ac_ext" <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122 #include <sys/types.h>
11123 int
11124 main (void)
11125 {
11126
11127 #ifdef _POSIX_SOURCE
11128 make an error
11129 #endif
11130   ;
11131   return 0;
11132 }
11133 _ACEOF
11134 rm -f "conftest.$ac_objext"
11135 if { (eval echo "$as_me:11135: \"$ac_compile\"") >&5
11136   (eval $ac_compile) 2>&5
11137   ac_status=$?
11138   echo "$as_me:11138: \$? = $ac_status" >&5
11139   (exit "$ac_status"); } &&
11140          { ac_try='test -s "conftest.$ac_objext"'
11141   { (eval echo "$as_me:11141: \"$ac_try\"") >&5
11142   (eval $ac_try) 2>&5
11143   ac_status=$?
11144   echo "$as_me:11144: \$? = $ac_status" >&5
11145   (exit "$ac_status"); }; }; then
11146   :
11147 else
11148   echo "$as_me: failed program was:" >&5
11149 cat "conftest.$ac_ext" >&5
11150 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11151 fi
11152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11153          fi
11154
11155 echo "${as_me:-configure}:11155: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11156
11157          CFLAGS="$cf_trim_CFLAGS"
11158          CPPFLAGS="$cf_trim_CPPFLAGS"
11159
11160         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11161         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11162
11163 echo "${as_me:-configure}:11163: testing if the second compile does not leave our definition intact error ..." 1>&5
11164
11165          cat >"conftest.$ac_ext" <<_ACEOF
11166 #line 11166 "configure"
11167 #include "confdefs.h"
11168 #include <sys/types.h>
11169 int
11170 main (void)
11171 {
11172
11173 #ifndef _POSIX_C_SOURCE
11174 make an error
11175 #endif
11176   ;
11177   return 0;
11178 }
11179 _ACEOF
11180 rm -f "conftest.$ac_objext"
11181 if { (eval echo "$as_me:11181: \"$ac_compile\"") >&5
11182   (eval $ac_compile) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit "$ac_status"); } &&
11186          { ac_try='test -s "conftest.$ac_objext"'
11187   { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit "$ac_status"); }; }; then
11192   :
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 cat "conftest.$ac_ext" >&5
11196 cf_cv_posix_c_source=no
11197 fi
11198 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11199          CFLAGS="$cf_save_CFLAGS"
11200          CPPFLAGS="$cf_save_CPPFLAGS"
11201
11202 fi
11203 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11204
11205 fi
11206 echo "$as_me:11206: result: $cf_cv_posix_c_source" >&5
11207 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11208
11209 if test "$cf_cv_posix_c_source" != no ; then
11210         CFLAGS="$cf_trim_CFLAGS"
11211         CPPFLAGS="$cf_trim_CPPFLAGS"
11212
11213 cf_fix_cppflags=no
11214 cf_new_cflags=
11215 cf_new_cppflags=
11216 cf_new_extra_cppflags=
11217
11218 for cf_add_cflags in $cf_cv_posix_c_source
11219 do
11220 case "$cf_fix_cppflags" in
11221 (no)
11222         case "$cf_add_cflags" in
11223         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11224                 case "$cf_add_cflags" in
11225                 (-D*)
11226                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11227
11228                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11229                                 && test -z "${cf_tst_cflags}" \
11230                                 && cf_fix_cppflags=yes
11231
11232                         if test "$cf_fix_cppflags" = yes ; then
11233
11234         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11235         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11236
11237                                 continue
11238                         elif test "${cf_tst_cflags}" = "\"'" ; then
11239
11240         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11241         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11242
11243                                 continue
11244                         fi
11245                         ;;
11246                 esac
11247                 case "$CPPFLAGS" in
11248                 (*$cf_add_cflags)
11249                         ;;
11250                 (*)
11251                         case "$cf_add_cflags" in
11252                         (-D*)
11253                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11254
11255 CPPFLAGS=`echo "$CPPFLAGS" | \
11256         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11257                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11258
11259                                 ;;
11260                         esac
11261
11262         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11263         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11264
11265                         ;;
11266                 esac
11267                 ;;
11268         (*)
11269
11270         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11271         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11272
11273                 ;;
11274         esac
11275         ;;
11276 (yes)
11277
11278         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11279         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11280
11281         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11282
11283         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11284                 && test -z "${cf_tst_cflags}" \
11285                 && cf_fix_cppflags=no
11286         ;;
11287 esac
11288 done
11289
11290 if test -n "$cf_new_cflags" ; then
11291
11292         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11293         CFLAGS="${CFLAGS}$cf_new_cflags"
11294
11295 fi
11296
11297 if test -n "$cf_new_cppflags" ; then
11298
11299         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11300         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11301
11302 fi
11303
11304 if test -n "$cf_new_extra_cppflags" ; then
11305
11306         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11307         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11308
11309 fi
11310
11311 fi
11312
11313 fi # cf_cv_posix_visible
11314
11315         # Some of these niche implementations use copy/paste, double-check...
11316         test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE inteferes" 1>&6
11317
11318 echo "${as_me:-configure}:11318: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
11319
11320         cat >"conftest.$ac_ext" <<_ACEOF
11321 #line 11321 "configure"
11322 #include "confdefs.h"
11323
11324 #include <stdlib.h>
11325 #include <string.h>
11326 #include <sys/types.h>
11327
11328 int
11329 main (void)
11330 {
11331
11332 #ifndef _XOPEN_SOURCE
11333 make an error
11334 #endif
11335
11336   ;
11337   return 0;
11338 }
11339 _ACEOF
11340 rm -f "conftest.$ac_objext"
11341 if { (eval echo "$as_me:11341: \"$ac_compile\"") >&5
11342   (eval $ac_compile) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit "$ac_status"); } &&
11346          { ac_try='test -s "conftest.$ac_objext"'
11347   { (eval echo "$as_me:11347: \"$ac_try\"") >&5
11348   (eval $ac_try) 2>&5
11349   ac_status=$?
11350   echo "$as_me:11350: \$? = $ac_status" >&5
11351   (exit "$ac_status"); }; }; then
11352   :
11353 else
11354   echo "$as_me: failed program was:" >&5
11355 cat "conftest.$ac_ext" >&5
11356
11357                 { echo "$as_me:11357: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11358 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11359                 CPPFLAGS="$cf_save_xopen_cppflags"
11360 fi
11361 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11362         ;;
11363 esac
11364
11365 if test -n "$cf_xopen_source" ; then
11366
11367 for cf_add_cflags in $cf_xopen_source
11368 do
11369         case "x$cf_add_cflags" in
11370         (x-[DU]*)
11371
11372 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11373 while true
11374 do
11375         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'`
11376         test "$CFLAGS" != "$cf_old_cflag" || break
11377         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11378
11379 echo "${as_me:-configure}:11379: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11380
11381         CFLAGS="$cf_old_cflag"
11382 done
11383
11384 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11385 while true
11386 do
11387         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'`
11388         test "$CPPFLAGS" != "$cf_old_cflag" || break
11389         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11390
11391 echo "${as_me:-configure}:11391: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11392
11393         CPPFLAGS="$cf_old_cflag"
11394 done
11395
11396                 ;;
11397         esac
11398
11399 cf_fix_cppflags=no
11400 cf_new_cflags=
11401 cf_new_cppflags=
11402 cf_new_extra_cppflags=
11403
11404 for cf_add_cflags in $cf_add_cflags
11405 do
11406 case "$cf_fix_cppflags" in
11407 (no)
11408         case "$cf_add_cflags" in
11409         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11410                 case "$cf_add_cflags" in
11411                 (-D*)
11412                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11413
11414                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11415                                 && test -z "${cf_tst_cflags}" \
11416                                 && cf_fix_cppflags=yes
11417
11418                         if test "$cf_fix_cppflags" = yes ; then
11419
11420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11422
11423                                 continue
11424                         elif test "${cf_tst_cflags}" = "\"'" ; then
11425
11426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11428
11429                                 continue
11430                         fi
11431                         ;;
11432                 esac
11433                 case "$CPPFLAGS" in
11434                 (*$cf_add_cflags)
11435                         ;;
11436                 (*)
11437                         case "$cf_add_cflags" in
11438                         (-D*)
11439                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11440
11441 CPPFLAGS=`echo "$CPPFLAGS" | \
11442         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11443                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11444
11445                                 ;;
11446                         esac
11447
11448         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11449         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11450
11451                         ;;
11452                 esac
11453                 ;;
11454         (*)
11455
11456         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11457         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11458
11459                 ;;
11460         esac
11461         ;;
11462 (yes)
11463
11464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11466
11467         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11468
11469         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11470                 && test -z "${cf_tst_cflags}" \
11471                 && cf_fix_cppflags=no
11472         ;;
11473 esac
11474 done
11475
11476 if test -n "$cf_new_cflags" ; then
11477         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11478
11479 echo "${as_me:-configure}:11479: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11480
11481         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11482         CFLAGS="${CFLAGS}$cf_new_cflags"
11483
11484 fi
11485
11486 if test -n "$cf_new_cppflags" ; then
11487         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11488
11489 echo "${as_me:-configure}:11489: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11490
11491         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11492         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11493
11494 fi
11495
11496 if test -n "$cf_new_extra_cppflags" ; then
11497         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11498
11499 echo "${as_me:-configure}:11499: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11500
11501         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11502         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11503
11504 fi
11505
11506 done
11507
11508 fi
11509
11510 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11511         echo "$as_me:11511: checking if _XOPEN_SOURCE really is set" >&5
11512 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11513         cat >"conftest.$ac_ext" <<_ACEOF
11514 #line 11514 "configure"
11515 #include "confdefs.h"
11516 #include <stdlib.h>
11517 int
11518 main (void)
11519 {
11520
11521 #ifndef _XOPEN_SOURCE
11522 make an error
11523 #endif
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 rm -f "conftest.$ac_objext"
11529 if { (eval echo "$as_me:11529: \"$ac_compile\"") >&5
11530   (eval $ac_compile) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit "$ac_status"); } &&
11534          { ac_try='test -s "conftest.$ac_objext"'
11535   { (eval echo "$as_me:11535: \"$ac_try\"") >&5
11536   (eval $ac_try) 2>&5
11537   ac_status=$?
11538   echo "$as_me:11538: \$? = $ac_status" >&5
11539   (exit "$ac_status"); }; }; then
11540   cf_XOPEN_SOURCE_set=yes
11541 else
11542   echo "$as_me: failed program was:" >&5
11543 cat "conftest.$ac_ext" >&5
11544 cf_XOPEN_SOURCE_set=no
11545 fi
11546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11547         echo "$as_me:11547: result: $cf_XOPEN_SOURCE_set" >&5
11548 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11549         if test "$cf_XOPEN_SOURCE_set" = yes
11550         then
11551                 cat >"conftest.$ac_ext" <<_ACEOF
11552 #line 11552 "configure"
11553 #include "confdefs.h"
11554 #include <stdlib.h>
11555 int
11556 main (void)
11557 {
11558
11559 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11560 make an error
11561 #endif
11562   ;
11563   return 0;
11564 }
11565 _ACEOF
11566 rm -f "conftest.$ac_objext"
11567 if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
11568   (eval $ac_compile) 2>&5
11569   ac_status=$?
11570   echo "$as_me:11570: \$? = $ac_status" >&5
11571   (exit "$ac_status"); } &&
11572          { ac_try='test -s "conftest.$ac_objext"'
11573   { (eval echo "$as_me:11573: \"$ac_try\"") >&5
11574   (eval $ac_try) 2>&5
11575   ac_status=$?
11576   echo "$as_me:11576: \$? = $ac_status" >&5
11577   (exit "$ac_status"); }; }; then
11578   cf_XOPEN_SOURCE_set_ok=yes
11579 else
11580   echo "$as_me: failed program was:" >&5
11581 cat "conftest.$ac_ext" >&5
11582 cf_XOPEN_SOURCE_set_ok=no
11583 fi
11584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11585                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11586                 then
11587                         { echo "$as_me:11587: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11588 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11589                 fi
11590         else
11591
11592 echo "$as_me:11592: checking if we should define _XOPEN_SOURCE" >&5
11593 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11594 if test "${cf_cv_xopen_source+set}" = set; then
11595   echo $ECHO_N "(cached) $ECHO_C" >&6
11596 else
11597
11598         cat >"conftest.$ac_ext" <<_ACEOF
11599 #line 11599 "configure"
11600 #include "confdefs.h"
11601
11602 #include <stdlib.h>
11603 #include <string.h>
11604 #include <sys/types.h>
11605
11606 int
11607 main (void)
11608 {
11609
11610 #ifndef _XOPEN_SOURCE
11611 make an error
11612 #endif
11613
11614   ;
11615   return 0;
11616 }
11617 _ACEOF
11618 rm -f "conftest.$ac_objext"
11619 if { (eval echo "$as_me:11619: \"$ac_compile\"") >&5
11620   (eval $ac_compile) 2>&5
11621   ac_status=$?
11622   echo "$as_me:11622: \$? = $ac_status" >&5
11623   (exit "$ac_status"); } &&
11624          { ac_try='test -s "conftest.$ac_objext"'
11625   { (eval echo "$as_me:11625: \"$ac_try\"") >&5
11626   (eval $ac_try) 2>&5
11627   ac_status=$?
11628   echo "$as_me:11628: \$? = $ac_status" >&5
11629   (exit "$ac_status"); }; }; then
11630   cf_cv_xopen_source=no
11631 else
11632   echo "$as_me: failed program was:" >&5
11633 cat "conftest.$ac_ext" >&5
11634 cf_save="$CPPFLAGS"
11635
11636         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11637         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11638
11639          cat >"conftest.$ac_ext" <<_ACEOF
11640 #line 11640 "configure"
11641 #include "confdefs.h"
11642
11643 #include <stdlib.h>
11644 #include <string.h>
11645 #include <sys/types.h>
11646
11647 int
11648 main (void)
11649 {
11650
11651 #ifndef _XOPEN_SOURCE
11652 make an error
11653 #endif
11654
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 rm -f "conftest.$ac_objext"
11660 if { (eval echo "$as_me:11660: \"$ac_compile\"") >&5
11661   (eval $ac_compile) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit "$ac_status"); } &&
11665          { ac_try='test -s "conftest.$ac_objext"'
11666   { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit "$ac_status"); }; }; then
11671   cf_cv_xopen_source=no
11672 else
11673   echo "$as_me: failed program was:" >&5
11674 cat "conftest.$ac_ext" >&5
11675 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11676 fi
11677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11678                 CPPFLAGS="$cf_save"
11679
11680 fi
11681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11682
11683 fi
11684 echo "$as_me:11684: result: $cf_cv_xopen_source" >&5
11685 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11686
11687 if test "$cf_cv_xopen_source" != no ; then
11688
11689 CFLAGS=`echo "$CFLAGS" | \
11690         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11691                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11692
11693 CPPFLAGS=`echo "$CPPFLAGS" | \
11694         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11695                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11696
11697         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11698
11699 for cf_add_cflags in $cf_temp_xopen_source
11700 do
11701         case "x$cf_add_cflags" in
11702         (x-[DU]*)
11703
11704 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11705 while true
11706 do
11707         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'`
11708         test "$CFLAGS" != "$cf_old_cflag" || break
11709
11710         CFLAGS="$cf_old_cflag"
11711 done
11712
11713 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11714 while true
11715 do
11716         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'`
11717         test "$CPPFLAGS" != "$cf_old_cflag" || break
11718
11719         CPPFLAGS="$cf_old_cflag"
11720 done
11721
11722                 ;;
11723         esac
11724
11725 cf_fix_cppflags=no
11726 cf_new_cflags=
11727 cf_new_cppflags=
11728 cf_new_extra_cppflags=
11729
11730 for cf_add_cflags in $cf_add_cflags
11731 do
11732 case "$cf_fix_cppflags" in
11733 (no)
11734         case "$cf_add_cflags" in
11735         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11736                 case "$cf_add_cflags" in
11737                 (-D*)
11738                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11739
11740                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11741                                 && test -z "${cf_tst_cflags}" \
11742                                 && cf_fix_cppflags=yes
11743
11744                         if test "$cf_fix_cppflags" = yes ; then
11745
11746         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11747         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11748
11749                                 continue
11750                         elif test "${cf_tst_cflags}" = "\"'" ; then
11751
11752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11754
11755                                 continue
11756                         fi
11757                         ;;
11758                 esac
11759                 case "$CPPFLAGS" in
11760                 (*$cf_add_cflags)
11761                         ;;
11762                 (*)
11763                         case "$cf_add_cflags" in
11764                         (-D*)
11765                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11766
11767 CPPFLAGS=`echo "$CPPFLAGS" | \
11768         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11769                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11770
11771                                 ;;
11772                         esac
11773
11774         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11775         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11776
11777                         ;;
11778                 esac
11779                 ;;
11780         (*)
11781
11782         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11783         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11784
11785                 ;;
11786         esac
11787         ;;
11788 (yes)
11789
11790         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11791         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11792
11793         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11794
11795         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11796                 && test -z "${cf_tst_cflags}" \
11797                 && cf_fix_cppflags=no
11798         ;;
11799 esac
11800 done
11801
11802 if test -n "$cf_new_cflags" ; then
11803
11804         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11805         CFLAGS="${CFLAGS}$cf_new_cflags"
11806
11807 fi
11808
11809 if test -n "$cf_new_cppflags" ; then
11810
11811         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11812         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11813
11814 fi
11815
11816 if test -n "$cf_new_extra_cppflags" ; then
11817
11818         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11819         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11820
11821 fi
11822
11823 done
11824
11825 fi
11826
11827         fi
11828 fi
11829 fi # cf_cv_posix_visible
11830
11831 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11832
11833 # Work around breakage on OS X
11834
11835 echo "$as_me:11835: checking if SIGWINCH is defined" >&5
11836 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11837 if test "${cf_cv_define_sigwinch+set}" = set; then
11838   echo $ECHO_N "(cached) $ECHO_C" >&6
11839 else
11840
11841         cat >"conftest.$ac_ext" <<_ACEOF
11842 #line 11842 "configure"
11843 #include "confdefs.h"
11844
11845 #include <sys/types.h>
11846 #include <sys/signal.h>
11847
11848 int
11849 main (void)
11850 {
11851 int x = SIGWINCH; (void)x
11852   ;
11853   return 0;
11854 }
11855 _ACEOF
11856 rm -f "conftest.$ac_objext"
11857 if { (eval echo "$as_me:11857: \"$ac_compile\"") >&5
11858   (eval $ac_compile) 2>&5
11859   ac_status=$?
11860   echo "$as_me:11860: \$? = $ac_status" >&5
11861   (exit "$ac_status"); } &&
11862          { ac_try='test -s "conftest.$ac_objext"'
11863   { (eval echo "$as_me:11863: \"$ac_try\"") >&5
11864   (eval $ac_try) 2>&5
11865   ac_status=$?
11866   echo "$as_me:11866: \$? = $ac_status" >&5
11867   (exit "$ac_status"); }; }; then
11868   cf_cv_define_sigwinch=yes
11869 else
11870   echo "$as_me: failed program was:" >&5
11871 cat "conftest.$ac_ext" >&5
11872 cat >"conftest.$ac_ext" <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875
11876 #undef _XOPEN_SOURCE
11877 #undef _POSIX_SOURCE
11878 #undef _POSIX_C_SOURCE
11879 #include <sys/types.h>
11880 #include <sys/signal.h>
11881
11882 int
11883 main (void)
11884 {
11885 int x = SIGWINCH; (void)x
11886   ;
11887   return 0;
11888 }
11889 _ACEOF
11890 rm -f "conftest.$ac_objext"
11891 if { (eval echo "$as_me:11891: \"$ac_compile\"") >&5
11892   (eval $ac_compile) 2>&5
11893   ac_status=$?
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit "$ac_status"); } &&
11896          { ac_try='test -s "conftest.$ac_objext"'
11897   { (eval echo "$as_me:11897: \"$ac_try\"") >&5
11898   (eval $ac_try) 2>&5
11899   ac_status=$?
11900   echo "$as_me:11900: \$? = $ac_status" >&5
11901   (exit "$ac_status"); }; }; then
11902   cf_cv_define_sigwinch=maybe
11903 else
11904   echo "$as_me: failed program was:" >&5
11905 cat "conftest.$ac_ext" >&5
11906 cf_cv_define_sigwinch=no
11907 fi
11908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11909
11910 fi
11911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11912
11913 fi
11914 echo "$as_me:11914: result: $cf_cv_define_sigwinch" >&5
11915 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11916
11917 if test "$cf_cv_define_sigwinch" = maybe ; then
11918 echo "$as_me:11918: checking for actual SIGWINCH definition" >&5
11919 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11920 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11921   echo $ECHO_N "(cached) $ECHO_C" >&6
11922 else
11923
11924 cf_cv_fixup_sigwinch=unknown
11925 cf_sigwinch=32
11926 while test "$cf_sigwinch" != 1
11927 do
11928         cat >"conftest.$ac_ext" <<_ACEOF
11929 #line 11929 "configure"
11930 #include "confdefs.h"
11931
11932 #undef _XOPEN_SOURCE
11933 #undef _POSIX_SOURCE
11934 #undef _POSIX_C_SOURCE
11935 #include <sys/types.h>
11936 #include <sys/signal.h>
11937
11938 int
11939 main (void)
11940 {
11941
11942 #if SIGWINCH != $cf_sigwinch
11943 make an error
11944 #endif
11945 int x = SIGWINCH; (void)x
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 rm -f "conftest.$ac_objext"
11951 if { (eval echo "$as_me:11951: \"$ac_compile\"") >&5
11952   (eval $ac_compile) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit "$ac_status"); } &&
11956          { ac_try='test -s "conftest.$ac_objext"'
11957   { (eval echo "$as_me:11957: \"$ac_try\"") >&5
11958   (eval $ac_try) 2>&5
11959   ac_status=$?
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit "$ac_status"); }; }; then
11962   cf_cv_fixup_sigwinch=$cf_sigwinch
11963          break
11964 else
11965   echo "$as_me: failed program was:" >&5
11966 cat "conftest.$ac_ext" >&5
11967 fi
11968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11969
11970 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11971 done
11972
11973 fi
11974 echo "$as_me:11974: result: $cf_cv_fixup_sigwinch" >&5
11975 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11976
11977         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11978                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11979         fi
11980 fi
11981
11982 # Checks for CODESET support.
11983
11984 echo "$as_me:11984: checking for nl_langinfo and CODESET" >&5
11985 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11986 if test "${am_cv_langinfo_codeset+set}" = set; then
11987   echo $ECHO_N "(cached) $ECHO_C" >&6
11988 else
11989   cat >"conftest.$ac_ext" <<_ACEOF
11990 #line 11990 "configure"
11991 #include "confdefs.h"
11992 #include <langinfo.h>
11993 int
11994 main (void)
11995 {
11996 char* cs = nl_langinfo(CODESET); (void)cs
11997   ;
11998   return 0;
11999 }
12000 _ACEOF
12001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12002 if { (eval echo "$as_me:12002: \"$ac_link\"") >&5
12003   (eval $ac_link) 2>&5
12004   ac_status=$?
12005   echo "$as_me:12005: \$? = $ac_status" >&5
12006   (exit "$ac_status"); } &&
12007          { ac_try='test -s "conftest$ac_exeext"'
12008   { (eval echo "$as_me:12008: \"$ac_try\"") >&5
12009   (eval $ac_try) 2>&5
12010   ac_status=$?
12011   echo "$as_me:12011: \$? = $ac_status" >&5
12012   (exit "$ac_status"); }; }; then
12013   am_cv_langinfo_codeset=yes
12014 else
12015   echo "$as_me: failed program was:" >&5
12016 cat "conftest.$ac_ext" >&5
12017 am_cv_langinfo_codeset=no
12018 fi
12019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12020
12021 fi
12022 echo "$as_me:12022: result: $am_cv_langinfo_codeset" >&5
12023 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12024         if test "$am_cv_langinfo_codeset" = yes; then
12025
12026 cat >>confdefs.h <<\EOF
12027 #define HAVE_LANGINFO_CODESET 1
12028 EOF
12029
12030         fi
12031
12032 # use these variables to work around a defect in gcc's fixincludes.
12033 NCURSES_OK_WCHAR_T=
12034 NCURSES_OK_WINT_T=
12035
12036 echo "$as_me:12036: checking if you want wide-character code" >&5
12037 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12038
12039 # Check whether --enable-widec or --disable-widec was given.
12040 if test "${enable_widec+set}" = set; then
12041   enableval="$enable_widec"
12042   with_widec=$enableval
12043 else
12044   with_widec=no
12045 fi;
12046 echo "$as_me:12046: result: $with_widec" >&5
12047 echo "${ECHO_T}$with_widec" >&6
12048
12049 NCURSES_WCWIDTH_GRAPHICS=1
12050
12051 if test "x$with_widec" = xyes ; then
12052         if test "x$disable_lib_suffixes" = xno ; then
12053                 LIB_SUFFIX="w${LIB_SUFFIX}"
12054         fi
12055
12056 cat >>confdefs.h <<\EOF
12057 #define USE_WIDEC_SUPPORT 1
12058 EOF
12059
12060 cat >>confdefs.h <<\EOF
12061 #define NCURSES_WIDECHAR 1
12062 EOF
12063
12064         case "$CPPFLAGS" in
12065         (*_XOPEN_SOURCE=*)
12066                 ;;
12067         (*)
12068                 { echo "$as_me:12068: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12069 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12070                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12071                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12072                 ;;
12073         esac
12074
12075 for ac_header in \
12076 wchar.h \
12077 wctype.h \
12078
12079 do
12080 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12081 echo "$as_me:12081: checking for $ac_header" >&5
12082 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12083 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12084   echo $ECHO_N "(cached) $ECHO_C" >&6
12085 else
12086   cat >"conftest.$ac_ext" <<_ACEOF
12087 #line 12087 "configure"
12088 #include "confdefs.h"
12089 #include <$ac_header>
12090 _ACEOF
12091 if { (eval echo "$as_me:12091: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12092   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12093   ac_status=$?
12094   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12095   rm -f conftest.er1
12096   cat conftest.err >&5
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit "$ac_status"); } >/dev/null; then
12099   if test -s conftest.err; then
12100     ac_cpp_err=$ac_c_preproc_warn_flag
12101   else
12102     ac_cpp_err=
12103   fi
12104 else
12105   ac_cpp_err=yes
12106 fi
12107 if test -z "$ac_cpp_err"; then
12108   eval "$as_ac_Header=yes"
12109 else
12110   echo "$as_me: failed program was:" >&5
12111   cat "conftest.$ac_ext" >&5
12112   eval "$as_ac_Header=no"
12113 fi
12114 rm -f conftest.err "conftest.$ac_ext"
12115 fi
12116 echo "$as_me:12116: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12117 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12118 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12119   cat >>confdefs.h <<EOF
12120 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12121 EOF
12122
12123 fi
12124 done
12125
12126 echo "$as_me:12126: checking if wchar.h can be used as is" >&5
12127 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12128 if test "${cf_cv_wchar_h_okay+set}" = set; then
12129   echo $ECHO_N "(cached) $ECHO_C" >&6
12130 else
12131
12132 cat >"conftest.$ac_ext" <<_ACEOF
12133 #line 12133 "configure"
12134 #include "confdefs.h"
12135
12136 #include <stdlib.h>
12137 #ifdef HAVE_WCHAR_H
12138 #include <wchar.h>
12139 #endif
12140 #ifdef HAVE_WCTYPE_H
12141 #include <wctype.h>
12142 #endif
12143
12144 int
12145 main (void)
12146 {
12147
12148         wint_t foo = 0;
12149         int bar = iswpunct(foo)
12150   ;
12151   return 0;
12152 }
12153 _ACEOF
12154 rm -f "conftest.$ac_objext"
12155 if { (eval echo "$as_me:12155: \"$ac_compile\"") >&5
12156   (eval $ac_compile) 2>&5
12157   ac_status=$?
12158   echo "$as_me:12158: \$? = $ac_status" >&5
12159   (exit "$ac_status"); } &&
12160          { ac_try='test -s "conftest.$ac_objext"'
12161   { (eval echo "$as_me:12161: \"$ac_try\"") >&5
12162   (eval $ac_try) 2>&5
12163   ac_status=$?
12164   echo "$as_me:12164: \$? = $ac_status" >&5
12165   (exit "$ac_status"); }; }; then
12166   cf_cv_wchar_h_okay=yes
12167 else
12168   echo "$as_me: failed program was:" >&5
12169 cat "conftest.$ac_ext" >&5
12170 cf_cv_wchar_h_okay=no
12171 fi
12172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12173 fi
12174 echo "$as_me:12174: result: $cf_cv_wchar_h_okay" >&5
12175 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12176
12177 if test "$cf_cv_wchar_h_okay" = no
12178 then
12179
12180 echo "$as_me:12180: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12181 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12182 cat >"conftest.$ac_ext" <<_ACEOF
12183 #line 12183 "configure"
12184 #include "confdefs.h"
12185 #include <sys/types.h>
12186
12187 int
12188 main (void)
12189 {
12190
12191 #ifndef _XOPEN_SOURCE_EXTENDED
12192 make an error
12193 #endif
12194   ;
12195   return 0;
12196 }
12197 _ACEOF
12198 rm -f "conftest.$ac_objext"
12199 if { (eval echo "$as_me:12199: \"$ac_compile\"") >&5
12200   (eval $ac_compile) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit "$ac_status"); } &&
12204          { ac_try='test -s "conftest.$ac_objext"'
12205   { (eval echo "$as_me:12205: \"$ac_try\"") >&5
12206   (eval $ac_try) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit "$ac_status"); }; }; then
12210   cf_result=no
12211 else
12212   echo "$as_me: failed program was:" >&5
12213 cat "conftest.$ac_ext" >&5
12214 cf_result=yes
12215 fi
12216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12217 echo "$as_me:12217: result: $cf_result" >&5
12218 echo "${ECHO_T}$cf_result" >&6
12219
12220 if test "$cf_result" = yes ; then
12221         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12222 elif test "x" != "x" ; then
12223         echo "$as_me:12223: checking checking for compatible value versus " >&5
12224 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12225         cat >"conftest.$ac_ext" <<_ACEOF
12226 #line 12226 "configure"
12227 #include "confdefs.h"
12228 #include <sys/types.h>
12229
12230 int
12231 main (void)
12232 {
12233
12234 #if _XOPEN_SOURCE_EXTENDED- < 0
12235 make an error
12236 #endif
12237   ;
12238   return 0;
12239 }
12240 _ACEOF
12241 rm -f "conftest.$ac_objext"
12242 if { (eval echo "$as_me:12242: \"$ac_compile\"") >&5
12243   (eval $ac_compile) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit "$ac_status"); } &&
12247          { ac_try='test -s "conftest.$ac_objext"'
12248   { (eval echo "$as_me:12248: \"$ac_try\"") >&5
12249   (eval $ac_try) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit "$ac_status"); }; }; then
12253   cf_result=yes
12254 else
12255   echo "$as_me: failed program was:" >&5
12256 cat "conftest.$ac_ext" >&5
12257 cf_result=no
12258 fi
12259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12260         echo "$as_me:12260: result: $cf_result" >&5
12261 echo "${ECHO_T}$cf_result" >&6
12262         if test "$cf_result" = no ; then
12263                 # perhaps we can override it - try...
12264                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12265         fi
12266 fi
12267
12268 fi
12269
12270 echo "$as_me:12270: checking if wcwidth agrees graphics are single-width" >&5
12271 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12272 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275
12276 cat >conftest.in <<CF_EOF
12277 -       VT100 symbols
12278 0x250c  upper left corner
12279 0x2514  lower left corner
12280 0x2510  upper right corner
12281 0x2518  lower right corner
12282 0x251c  tee pointing left
12283 0x2524  tee pointing right
12284 0x2534  tee pointing up
12285 0x252c  tee pointing down
12286 0x2500  horizontal line
12287 0x2502  vertical line
12288 0x253c  large plus or crossover
12289 0x23ba  scan line 1
12290 0x23bd  scan line 9
12291 0x25c6  diamond
12292 0x2592  checker board (stipple)
12293 0x00b0  degree symbol
12294 0x00b1  plus/minus
12295 0x00b7  bullet
12296 -       Teletype 5410v1 symbols
12297 0x2190  arrow pointing left
12298 0x2192  arrow pointing right
12299 0x2193  arrow pointing down
12300 0x2191  arrow pointing up
12301 0x2592  board of squares
12302 0x2603  lantern symbol
12303 0x25ae  solid square block
12304 -       these defaults were invented for ncurses
12305 0x23bb  scan line 3
12306 0x23bc  scan line 7
12307 0x2264  less-than-or-equal-to
12308 0x2265  greater-than-or-equal-to
12309 0x03c0  greek pi
12310 0x2260  not-equal
12311 0x00a3  pound-sterling symbol
12312 -       thick-line-drawing
12313 0x250f  upper left corner
12314 0x2517  lower left corner
12315 0x2513  upper right corner
12316 0x251b  lower right corner
12317 0x2523  tee pointing left
12318 0x252b  tee pointing right
12319 0x253b  tee pointing up
12320 0x2533  tee pointing down
12321 0x2501  horizontal line
12322 0x2503  vertical line
12323 0x254b  large plus or crossover
12324 -       double-line-drawing
12325 0x2554  upper left corner
12326 0x255a  lower left corner
12327 0x2557  upper right corner
12328 0x255d  lower right corner
12329 0x2563  tee pointing left
12330 0x2560  tee pointing right
12331 0x2569  tee pointing up
12332 0x2566  tee pointing down
12333 0x2550  horizontal line
12334 0x2551  vertical line
12335 0x256c  large plus or crossover
12336 CF_EOF
12337 if test "$cross_compiling" = yes; then
12338   cf_cv_wcwidth_graphics=unknown
12339 else
12340   cat >"conftest.$ac_ext" <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343
12344 #include <locale.h>
12345 #include <stdio.h>
12346 #include <wchar.h>
12347
12348 #define MY_LEN 80
12349
12350 int
12351 main(void)
12352 {
12353         FILE *fp;
12354         int value;
12355         char buffer[MY_LEN + 1];
12356         char notes[MY_LEN + 1];
12357         int totals = 0;
12358         int passed = 0;
12359
12360         if (setlocale(LC_ALL, "en_US.UTF8") ||
12361                 setlocale(LC_ALL, "en_US.UTF-8") ||
12362                 setlocale(LC_ALL, "en_US.utf8") ||
12363                 setlocale(LC_ALL, "en_US.utf-8")) {
12364                 if ((fp = fopen("conftest.in", "r")) != 0) {
12365                         while (fgets(buffer, MY_LEN, fp) != 0) {
12366                                 if (*buffer == '-') {
12367                                         fprintf(stderr, "\\t%s", buffer);
12368                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12369                                         ++totals;
12370                                         if (wcwidth(value) == 1)
12371                                                 ++passed;
12372                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12373                                 } else {
12374                                         fprintf(stderr, "?\\t%s", buffer);
12375                                 }
12376                         }
12377                 }
12378         }
12379         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12380         return (totals == passed) ? 0 : 1;
12381 }
12382
12383 _ACEOF
12384 rm -f "conftest$ac_exeext"
12385 if { (eval echo "$as_me:12385: \"$ac_link\"") >&5
12386   (eval $ac_link) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12390   { (eval echo "$as_me:12390: \"$ac_try\"") >&5
12391   (eval $ac_try) 2>&5
12392   ac_status=$?
12393   echo "$as_me:12393: \$? = $ac_status" >&5
12394   (exit "$ac_status"); }; }; then
12395   cf_cv_wcwidth_graphics=yes
12396 else
12397   echo "$as_me: program exited with status $ac_status" >&5
12398 echo "$as_me: failed program was:" >&5
12399 cat "conftest.$ac_ext" >&5
12400 cf_cv_wcwidth_graphics=no
12401 fi
12402 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12403 fi
12404
12405 fi
12406 echo "$as_me:12406: result: $cf_cv_wcwidth_graphics" >&5
12407 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12408
12409         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12410
12411         # with_overwrite=no
12412         NCURSES_CH_T=cchar_t
12413
12414 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12415 do
12416 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12417 echo "$as_me:12417: checking for $ac_func" >&5
12418 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12419 if eval "test \"\${$as_ac_var+set}\" = set"; then
12420   echo $ECHO_N "(cached) $ECHO_C" >&6
12421 else
12422   cat >"conftest.$ac_ext" <<_ACEOF
12423 #line 12423 "configure"
12424 #include "confdefs.h"
12425 #define $ac_func autoconf_temporary
12426 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12427 #undef $ac_func
12428
12429 #ifdef __cplusplus
12430 extern "C"
12431 #endif
12432
12433 /* We use char because int might match the return type of a gcc2
12434    builtin and then its argument prototype would still apply.  */
12435 char $ac_func (void);
12436
12437 int
12438 main (void)
12439 {
12440
12441 /* The GNU C library defines stubs for functions which it implements
12442     to always fail with ENOSYS.  Some functions are actually named
12443     something starting with __ and the normal name is an alias.  */
12444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12445 #error found stub for $ac_func
12446 #endif
12447
12448         return $ac_func ();
12449   ;
12450   return 0;
12451 }
12452 _ACEOF
12453 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12454 if { (eval echo "$as_me:12454: \"$ac_link\"") >&5
12455   (eval $ac_link) 2>&5
12456   ac_status=$?
12457   echo "$as_me:12457: \$? = $ac_status" >&5
12458   (exit "$ac_status"); } &&
12459          { ac_try='test -s "conftest$ac_exeext"'
12460   { (eval echo "$as_me:12460: \"$ac_try\"") >&5
12461   (eval $ac_try) 2>&5
12462   ac_status=$?
12463   echo "$as_me:12463: \$? = $ac_status" >&5
12464   (exit "$ac_status"); }; }; then
12465   eval "$as_ac_var=yes"
12466 else
12467   echo "$as_me: failed program was:" >&5
12468 cat "conftest.$ac_ext" >&5
12469 eval "$as_ac_var=no"
12470 fi
12471 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12472 fi
12473 echo "$as_me:12473: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12474 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12475 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12476   cat >>confdefs.h <<EOF
12477 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12478 EOF
12479
12480 fi
12481 done
12482
12483         if test "x$ac_cv_func_putwc" != xyes ; then
12484
12485 for ac_header in wchar.h
12486 do
12487 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12488 echo "$as_me:12488: checking for $ac_header" >&5
12489 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12490 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12491   echo $ECHO_N "(cached) $ECHO_C" >&6
12492 else
12493   cat >"conftest.$ac_ext" <<_ACEOF
12494 #line 12494 "configure"
12495 #include "confdefs.h"
12496 #include <$ac_header>
12497 _ACEOF
12498 if { (eval echo "$as_me:12498: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12499   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12500   ac_status=$?
12501   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12502   rm -f conftest.er1
12503   cat conftest.err >&5
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit "$ac_status"); } >/dev/null; then
12506   if test -s conftest.err; then
12507     ac_cpp_err=$ac_c_preproc_warn_flag
12508   else
12509     ac_cpp_err=
12510   fi
12511 else
12512   ac_cpp_err=yes
12513 fi
12514 if test -z "$ac_cpp_err"; then
12515   eval "$as_ac_Header=yes"
12516 else
12517   echo "$as_me: failed program was:" >&5
12518   cat "conftest.$ac_ext" >&5
12519   eval "$as_ac_Header=no"
12520 fi
12521 rm -f conftest.err "conftest.$ac_ext"
12522 fi
12523 echo "$as_me:12523: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12524 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12525 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12526   cat >>confdefs.h <<EOF
12527 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12528 EOF
12529
12530 fi
12531 done
12532
12533 echo "$as_me:12533: checking for multibyte character support" >&5
12534 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12535 if test "${cf_cv_utf8_lib+set}" = set; then
12536   echo $ECHO_N "(cached) $ECHO_C" >&6
12537 else
12538
12539         cf_save_LIBS="$LIBS"
12540         cat >"conftest.$ac_ext" <<_ACEOF
12541 #line 12541 "configure"
12542 #include "confdefs.h"
12543
12544 #include <stdlib.h>
12545 #include <stdio.h>
12546 #ifdef HAVE_WCHAR_H
12547 #include <wchar.h>
12548 #endif
12549
12550 int
12551 main (void)
12552 {
12553 putwc(0,0);
12554   ;
12555   return 0;
12556 }
12557 _ACEOF
12558 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12559 if { (eval echo "$as_me:12559: \"$ac_link\"") >&5
12560   (eval $ac_link) 2>&5
12561   ac_status=$?
12562   echo "$as_me:12562: \$? = $ac_status" >&5
12563   (exit "$ac_status"); } &&
12564          { ac_try='test -s "conftest$ac_exeext"'
12565   { (eval echo "$as_me:12565: \"$ac_try\"") >&5
12566   (eval $ac_try) 2>&5
12567   ac_status=$?
12568   echo "$as_me:12568: \$? = $ac_status" >&5
12569   (exit "$ac_status"); }; }; then
12570   cf_cv_utf8_lib=yes
12571 else
12572   echo "$as_me: failed program was:" >&5
12573 cat "conftest.$ac_ext" >&5
12574
12575 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12576 # will be set on completion of the AC_TRY_LINK below.
12577 cf_cv_header_path_utf8=
12578 cf_cv_library_path_utf8=
12579
12580 echo "${as_me:-configure}:12580: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12581
12582 cf_save_LIBS="$LIBS"
12583
12584 cat >"conftest.$ac_ext" <<_ACEOF
12585 #line 12585 "configure"
12586 #include "confdefs.h"
12587
12588 #include <libutf8.h>
12589 int
12590 main (void)
12591 {
12592 putwc(0,0);
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12598 if { (eval echo "$as_me:12598: \"$ac_link\"") >&5
12599   (eval $ac_link) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit "$ac_status"); } &&
12603          { ac_try='test -s "conftest$ac_exeext"'
12604   { (eval echo "$as_me:12604: \"$ac_try\"") >&5
12605   (eval $ac_try) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit "$ac_status"); }; }; then
12609
12610         cf_cv_find_linkage_utf8=yes
12611         cf_cv_header_path_utf8=/usr/include
12612         cf_cv_library_path_utf8=/usr/lib
12613
12614 else
12615   echo "$as_me: failed program was:" >&5
12616 cat "conftest.$ac_ext" >&5
12617
12618 LIBS="-lutf8  $cf_save_LIBS"
12619
12620 cat >"conftest.$ac_ext" <<_ACEOF
12621 #line 12621 "configure"
12622 #include "confdefs.h"
12623
12624 #include <libutf8.h>
12625 int
12626 main (void)
12627 {
12628 putwc(0,0);
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12634 if { (eval echo "$as_me:12634: \"$ac_link\"") >&5
12635   (eval $ac_link) 2>&5
12636   ac_status=$?
12637   echo "$as_me:12637: \$? = $ac_status" >&5
12638   (exit "$ac_status"); } &&
12639          { ac_try='test -s "conftest$ac_exeext"'
12640   { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641   (eval $ac_try) 2>&5
12642   ac_status=$?
12643   echo "$as_me:12643: \$? = $ac_status" >&5
12644   (exit "$ac_status"); }; }; then
12645
12646         cf_cv_find_linkage_utf8=yes
12647         cf_cv_header_path_utf8=/usr/include
12648         cf_cv_library_path_utf8=/usr/lib
12649         cf_cv_library_file_utf8="-lutf8"
12650
12651 else
12652   echo "$as_me: failed program was:" >&5
12653 cat "conftest.$ac_ext" >&5
12654
12655         cf_cv_find_linkage_utf8=no
12656         LIBS="$cf_save_LIBS"
12657
12658         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12659
12660 echo "${as_me:-configure}:12660: testing find linkage for utf8 library ..." 1>&5
12661
12662 echo "${as_me:-configure}:12662: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12663
12664         cf_save_CPPFLAGS="$CPPFLAGS"
12665         cf_test_CPPFLAGS="$CPPFLAGS"
12666
12667 cf_search=
12668
12669 # collect the current set of include-directories from compiler flags
12670 cf_header_path_list=""
12671 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12672         for cf_header_path in $CPPFLAGS $CFLAGS
12673         do
12674                 case "$cf_header_path" in
12675                 (-I*)
12676                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12677
12678 test "x$cf_header_path" != "xNONE" && \
12679 test -d "$cf_header_path" && \
12680  {
12681         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12682         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12683         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12684         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12685         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12686         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12687 }
12688
12689                         cf_header_path_list="$cf_header_path_list $cf_search"
12690                         ;;
12691                 esac
12692         done
12693 fi
12694
12695 # add the variations for the package we are looking for
12696
12697 cf_search=
12698
12699 test "x$prefix" != "xNONE" && \
12700 test -d "$prefix" && \
12701  {
12702         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12703         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12704         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12705         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12706         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12707         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12708 }
12709
12710 for cf_subdir_prefix in \
12711         /usr \
12712         /usr/local \
12713         /usr/pkg \
12714         /opt \
12715         /opt/local \
12716         $HOME
12717 do
12718
12719 test "x$cf_subdir_prefix" != "x$prefix" && \
12720 test -d "$cf_subdir_prefix" && \
12721 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12722         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12723         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12724         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12725         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12726         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12727         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12728 }
12729
12730 done
12731
12732 test "$includedir" != NONE && \
12733 test "$includedir" != "/usr/include" && \
12734 test -d "$includedir" && {
12735         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12736         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12737 }
12738
12739 test "$oldincludedir" != NONE && \
12740 test "$oldincludedir" != "/usr/include" && \
12741 test -d "$oldincludedir" && {
12742         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12743         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12744 }
12745
12746 cf_search="$cf_search $cf_header_path_list"
12747
12748         for cf_cv_header_path_utf8 in $cf_search
12749         do
12750                 if test -d "$cf_cv_header_path_utf8" ; then
12751                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12752
12753 echo "${as_me:-configure}:12753: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12754
12755                         CPPFLAGS="$cf_save_CPPFLAGS"
12756
12757         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12758         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12759
12760                         cat >"conftest.$ac_ext" <<_ACEOF
12761 #line 12761 "configure"
12762 #include "confdefs.h"
12763
12764 #include <libutf8.h>
12765 int
12766 main (void)
12767 {
12768 putwc(0,0);
12769   ;
12770   return 0;
12771 }
12772 _ACEOF
12773 rm -f "conftest.$ac_objext"
12774 if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5
12775   (eval $ac_compile) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit "$ac_status"); } &&
12779          { ac_try='test -s "conftest.$ac_objext"'
12780   { (eval echo "$as_me:12780: \"$ac_try\"") >&5
12781   (eval $ac_try) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit "$ac_status"); }; }; then
12785
12786                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12787
12788 echo "${as_me:-configure}:12788: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12789
12790                                 cf_cv_find_linkage_utf8=maybe
12791                                 cf_test_CPPFLAGS="$CPPFLAGS"
12792                                 break
12793 else
12794   echo "$as_me: failed program was:" >&5
12795 cat "conftest.$ac_ext" >&5
12796
12797                                 CPPFLAGS="$cf_save_CPPFLAGS"
12798
12799 fi
12800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12801                 fi
12802         done
12803
12804         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12805
12806 echo "${as_me:-configure}:12806: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12807
12808                 cf_save_LIBS="$LIBS"
12809                 cf_save_LDFLAGS="$LDFLAGS"
12810
12811                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12812
12813 cf_search=
12814 cf_library_path_list=""
12815 if test -n "${LDFLAGS}${LIBS}" ; then
12816         for cf_library_path in $LDFLAGS $LIBS
12817         do
12818                 case "$cf_library_path" in
12819                 (-L*)
12820                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12821
12822 test "x$cf_library_path" != "xNONE" && \
12823 test -d "$cf_library_path" && \
12824  {
12825         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12826         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12827         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12828         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12829         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12830         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12831 }
12832
12833                         cf_library_path_list="$cf_library_path_list $cf_search"
12834                         ;;
12835                 esac
12836         done
12837 fi
12838
12839 cf_search=
12840
12841 test "x$prefix" != "xNONE" && \
12842 test -d "$prefix" && \
12843  {
12844         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12845         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12846         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12847         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12848         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12849         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12850 }
12851
12852 for cf_subdir_prefix in \
12853         /usr \
12854         /usr/local \
12855         /usr/pkg \
12856         /opt \
12857         /opt/local \
12858         $HOME
12859 do
12860
12861 test "x$cf_subdir_prefix" != "x$prefix" && \
12862 test -d "$cf_subdir_prefix" && \
12863 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12864         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12865         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12866         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12867         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12868         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12869         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12870 }
12871
12872 done
12873
12874 cf_search="$cf_library_path_list $cf_search"
12875
12876                         for cf_cv_library_path_utf8 in $cf_search
12877                         do
12878                                 if test -d "$cf_cv_library_path_utf8" ; then
12879                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12880
12881 echo "${as_me:-configure}:12881: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12882
12883                                         CPPFLAGS="$cf_test_CPPFLAGS"
12884                                         LIBS="-lutf8  $cf_save_LIBS"
12885                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12886                                         cat >"conftest.$ac_ext" <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889
12890 #include <libutf8.h>
12891 int
12892 main (void)
12893 {
12894 putwc(0,0);
12895   ;
12896   return 0;
12897 }
12898 _ACEOF
12899 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12900 if { (eval echo "$as_me:12900: \"$ac_link\"") >&5
12901   (eval $ac_link) 2>&5
12902   ac_status=$?
12903   echo "$as_me:12903: \$? = $ac_status" >&5
12904   (exit "$ac_status"); } &&
12905          { ac_try='test -s "conftest$ac_exeext"'
12906   { (eval echo "$as_me:12906: \"$ac_try\"") >&5
12907   (eval $ac_try) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit "$ac_status"); }; }; then
12911
12912                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12913
12914 echo "${as_me:-configure}:12914: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12915
12916                                         cf_cv_find_linkage_utf8=yes
12917                                         cf_cv_library_file_utf8="-lutf8"
12918                                         break
12919 else
12920   echo "$as_me: failed program was:" >&5
12921 cat "conftest.$ac_ext" >&5
12922
12923                                         CPPFLAGS="$cf_save_CPPFLAGS"
12924                                         LIBS="$cf_save_LIBS"
12925                                         LDFLAGS="$cf_save_LDFLAGS"
12926
12927 fi
12928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12929                                 fi
12930                         done
12931                         CPPFLAGS="$cf_save_CPPFLAGS"
12932                         LDFLAGS="$cf_save_LDFLAGS"
12933                 fi
12934
12935         else
12936                 cf_cv_find_linkage_utf8=no
12937         fi
12938
12939 fi
12940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12941
12942 fi
12943 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12944
12945 LIBS="$cf_save_LIBS"
12946
12947 if test "$cf_cv_find_linkage_utf8" = yes ; then
12948 cf_cv_utf8_lib=add-on
12949 else
12950 cf_cv_utf8_lib=no
12951 fi
12952
12953 fi
12954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12955 fi
12956 echo "$as_me:12956: result: $cf_cv_utf8_lib" >&5
12957 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12958
12959 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12960 # ncurses/ncursesw:
12961 if test "$cf_cv_utf8_lib" = "add-on" ; then
12962
12963 cat >>confdefs.h <<\EOF
12964 #define HAVE_LIBUTF8_H 1
12965 EOF
12966
12967 if test -n "$cf_cv_header_path_utf8" ; then
12968   for cf_add_incdir in $cf_cv_header_path_utf8
12969   do
12970         while test "$cf_add_incdir" != /usr/include
12971         do
12972           if test -d "$cf_add_incdir"
12973           then
12974                 cf_have_incdir=no
12975                 if test -n "$CFLAGS$CPPFLAGS" ; then
12976                   # a loop is needed to ensure we can add subdirs of existing dirs
12977                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12978                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12979                           cf_have_incdir=yes; break
12980                         fi
12981                   done
12982                 fi
12983
12984                 if test "$cf_have_incdir" = no ; then
12985                   if test "$cf_add_incdir" = /usr/local/include ; then
12986                         if test "$GCC" = yes
12987                         then
12988                           cf_save_CPPFLAGS=$CPPFLAGS
12989
12990         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12991         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12992
12993                           cat >"conftest.$ac_ext" <<_ACEOF
12994 #line 12994 "configure"
12995 #include "confdefs.h"
12996 #include <stdio.h>
12997 int
12998 main (void)
12999 {
13000 printf("Hello")
13001   ;
13002   return 0;
13003 }
13004 _ACEOF
13005 rm -f "conftest.$ac_objext"
13006 if { (eval echo "$as_me:13006: \"$ac_compile\"") >&5
13007   (eval $ac_compile) 2>&5
13008   ac_status=$?
13009   echo "$as_me:13009: \$? = $ac_status" >&5
13010   (exit "$ac_status"); } &&
13011          { ac_try='test -s "conftest.$ac_objext"'
13012   { (eval echo "$as_me:13012: \"$ac_try\"") >&5
13013   (eval $ac_try) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit "$ac_status"); }; }; then
13017   :
13018 else
13019   echo "$as_me: failed program was:" >&5
13020 cat "conftest.$ac_ext" >&5
13021 cf_have_incdir=yes
13022 fi
13023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13024                           CPPFLAGS=$cf_save_CPPFLAGS
13025                         fi
13026                   fi
13027                 fi
13028
13029                 if test "$cf_have_incdir" = no ; then
13030                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13031
13032 echo "${as_me:-configure}:13032: testing adding $cf_add_incdir to include-path ..." 1>&5
13033
13034                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13035
13036                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13037                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13038                   cf_add_incdir="$cf_top_incdir"
13039                 else
13040                   break
13041                 fi
13042           else
13043                 break
13044           fi
13045         done
13046   done
13047 fi
13048
13049 if test -n "$cf_cv_library_path_utf8" ; then
13050         for cf_add_libdir in $cf_cv_library_path_utf8
13051         do
13052                 if test "$cf_add_libdir" = /usr/lib ; then
13053                         :
13054                 elif test -d "$cf_add_libdir"
13055                 then
13056                         cf_have_libdir=no
13057                         if test -n "$LDFLAGS$LIBS" ; then
13058                                 # a loop is needed to ensure we can add subdirs of existing dirs
13059                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13060                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13061                                                 cf_have_libdir=yes; break
13062                                         fi
13063                                 done
13064                         fi
13065                         if test "$cf_have_libdir" = no ; then
13066                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13067
13068 echo "${as_me:-configure}:13068: testing adding $cf_add_libdir to library-path ..." 1>&5
13069
13070                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13071                         fi
13072                 fi
13073         done
13074 fi
13075
13076 cf_add_libs="$LIBS"
13077 # reverse order
13078 cf_add_0lib=
13079 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13080 # filter duplicates
13081 for cf_add_1lib in $cf_add_0lib; do
13082         for cf_add_2lib in $cf_add_libs; do
13083                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13084                         cf_add_1lib=
13085                         break
13086                 fi
13087         done
13088         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13089 done
13090 LIBS="$cf_add_libs"
13091
13092 fi
13093
13094                 if test "$cf_cv_utf8_lib" != no ; then
13095                         NCURSES_LIBUTF8=1
13096                 fi
13097         fi
13098
13099 # This is needed on Tru64 5.0 to declare mbstate_t
13100 echo "$as_me:13100: checking if we must include wchar.h to declare mbstate_t" >&5
13101 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13102 if test "${cf_cv_mbstate_t+set}" = set; then
13103   echo $ECHO_N "(cached) $ECHO_C" >&6
13104 else
13105
13106 cat >"conftest.$ac_ext" <<_ACEOF
13107 #line 13107 "configure"
13108 #include "confdefs.h"
13109
13110 #include <stdlib.h>
13111 #include <stdarg.h>
13112 #include <stdio.h>
13113 #ifdef HAVE_LIBUTF8_H
13114 #include <libutf8.h>
13115 #endif
13116 int
13117 main (void)
13118 {
13119 mbstate_t state
13120   ;
13121   return 0;
13122 }
13123 _ACEOF
13124 rm -f "conftest.$ac_objext"
13125 if { (eval echo "$as_me:13125: \"$ac_compile\"") >&5
13126   (eval $ac_compile) 2>&5
13127   ac_status=$?
13128   echo "$as_me:13128: \$? = $ac_status" >&5
13129   (exit "$ac_status"); } &&
13130          { ac_try='test -s "conftest.$ac_objext"'
13131   { (eval echo "$as_me:13131: \"$ac_try\"") >&5
13132   (eval $ac_try) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit "$ac_status"); }; }; then
13136   cf_cv_mbstate_t=no
13137 else
13138   echo "$as_me: failed program was:" >&5
13139 cat "conftest.$ac_ext" >&5
13140 cat >"conftest.$ac_ext" <<_ACEOF
13141 #line 13141 "configure"
13142 #include "confdefs.h"
13143
13144 #include <stdlib.h>
13145 #include <stdarg.h>
13146 #include <stdio.h>
13147 #include <wchar.h>
13148 #ifdef HAVE_LIBUTF8_H
13149 #include <libutf8.h>
13150 #endif
13151 int
13152 main (void)
13153 {
13154 mbstate_t value
13155   ;
13156   return 0;
13157 }
13158 _ACEOF
13159 rm -f "conftest.$ac_objext"
13160 if { (eval echo "$as_me:13160: \"$ac_compile\"") >&5
13161   (eval $ac_compile) 2>&5
13162   ac_status=$?
13163   echo "$as_me:13163: \$? = $ac_status" >&5
13164   (exit "$ac_status"); } &&
13165          { ac_try='test -s "conftest.$ac_objext"'
13166   { (eval echo "$as_me:13166: \"$ac_try\"") >&5
13167   (eval $ac_try) 2>&5
13168   ac_status=$?
13169   echo "$as_me:13169: \$? = $ac_status" >&5
13170   (exit "$ac_status"); }; }; then
13171   cf_cv_mbstate_t=yes
13172 else
13173   echo "$as_me: failed program was:" >&5
13174 cat "conftest.$ac_ext" >&5
13175 cf_cv_mbstate_t=unknown
13176 fi
13177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13178 fi
13179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13180 fi
13181 echo "$as_me:13181: result: $cf_cv_mbstate_t" >&5
13182 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13183
13184 if test "$cf_cv_mbstate_t" = yes ; then
13185
13186 cat >>confdefs.h <<\EOF
13187 #define NEED_WCHAR_H 1
13188 EOF
13189
13190         NEED_WCHAR_H=1
13191 fi
13192
13193 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13194 if test "$cf_cv_mbstate_t" = unknown ; then
13195         NCURSES_MBSTATE_T=1
13196 fi
13197
13198 # This is needed on Tru64 5.0 to declare wchar_t
13199 echo "$as_me:13199: checking if we must include wchar.h to declare wchar_t" >&5
13200 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13201 if test "${cf_cv_wchar_t+set}" = set; then
13202   echo $ECHO_N "(cached) $ECHO_C" >&6
13203 else
13204
13205 cat >"conftest.$ac_ext" <<_ACEOF
13206 #line 13206 "configure"
13207 #include "confdefs.h"
13208
13209 #include <stdlib.h>
13210 #include <stdarg.h>
13211 #include <stdio.h>
13212 #ifdef HAVE_LIBUTF8_H
13213 #include <libutf8.h>
13214 #endif
13215 int
13216 main (void)
13217 {
13218 wchar_t state
13219   ;
13220   return 0;
13221 }
13222 _ACEOF
13223 rm -f "conftest.$ac_objext"
13224 if { (eval echo "$as_me:13224: \"$ac_compile\"") >&5
13225   (eval $ac_compile) 2>&5
13226   ac_status=$?
13227   echo "$as_me:13227: \$? = $ac_status" >&5
13228   (exit "$ac_status"); } &&
13229          { ac_try='test -s "conftest.$ac_objext"'
13230   { (eval echo "$as_me:13230: \"$ac_try\"") >&5
13231   (eval $ac_try) 2>&5
13232   ac_status=$?
13233   echo "$as_me:13233: \$? = $ac_status" >&5
13234   (exit "$ac_status"); }; }; then
13235   cf_cv_wchar_t=no
13236 else
13237   echo "$as_me: failed program was:" >&5
13238 cat "conftest.$ac_ext" >&5
13239 cat >"conftest.$ac_ext" <<_ACEOF
13240 #line 13240 "configure"
13241 #include "confdefs.h"
13242
13243 #include <stdlib.h>
13244 #include <stdarg.h>
13245 #include <stdio.h>
13246 #include <wchar.h>
13247 #ifdef HAVE_LIBUTF8_H
13248 #include <libutf8.h>
13249 #endif
13250 int
13251 main (void)
13252 {
13253 wchar_t value
13254   ;
13255   return 0;
13256 }
13257 _ACEOF
13258 rm -f "conftest.$ac_objext"
13259 if { (eval echo "$as_me:13259: \"$ac_compile\"") >&5
13260   (eval $ac_compile) 2>&5
13261   ac_status=$?
13262   echo "$as_me:13262: \$? = $ac_status" >&5
13263   (exit "$ac_status"); } &&
13264          { ac_try='test -s "conftest.$ac_objext"'
13265   { (eval echo "$as_me:13265: \"$ac_try\"") >&5
13266   (eval $ac_try) 2>&5
13267   ac_status=$?
13268   echo "$as_me:13268: \$? = $ac_status" >&5
13269   (exit "$ac_status"); }; }; then
13270   cf_cv_wchar_t=yes
13271 else
13272   echo "$as_me: failed program was:" >&5
13273 cat "conftest.$ac_ext" >&5
13274 cf_cv_wchar_t=unknown
13275 fi
13276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13277 fi
13278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13279 fi
13280 echo "$as_me:13280: result: $cf_cv_wchar_t" >&5
13281 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13282
13283 if test "$cf_cv_wchar_t" = yes ; then
13284
13285 cat >>confdefs.h <<\EOF
13286 #define NEED_WCHAR_H 1
13287 EOF
13288
13289         NEED_WCHAR_H=1
13290 fi
13291
13292 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13293 if test "$cf_cv_wchar_t" = unknown ; then
13294         NCURSES_WCHAR_T=1
13295 fi
13296
13297 # if we find wchar_t in either place, use substitution to provide a fallback.
13298 if test "$cf_cv_wchar_t" != unknown ; then
13299         NCURSES_OK_WCHAR_T=1
13300 fi
13301
13302 # This is needed on Tru64 5.0 to declare wint_t
13303 echo "$as_me:13303: checking if we must include wchar.h to declare wint_t" >&5
13304 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13305 if test "${cf_cv_wint_t+set}" = set; then
13306   echo $ECHO_N "(cached) $ECHO_C" >&6
13307 else
13308
13309 cat >"conftest.$ac_ext" <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312
13313 #include <stdlib.h>
13314 #include <stdarg.h>
13315 #include <stdio.h>
13316 #ifdef HAVE_LIBUTF8_H
13317 #include <libutf8.h>
13318 #endif
13319 int
13320 main (void)
13321 {
13322 wint_t state
13323   ;
13324   return 0;
13325 }
13326 _ACEOF
13327 rm -f "conftest.$ac_objext"
13328 if { (eval echo "$as_me:13328: \"$ac_compile\"") >&5
13329   (eval $ac_compile) 2>&5
13330   ac_status=$?
13331   echo "$as_me:13331: \$? = $ac_status" >&5
13332   (exit "$ac_status"); } &&
13333          { ac_try='test -s "conftest.$ac_objext"'
13334   { (eval echo "$as_me:13334: \"$ac_try\"") >&5
13335   (eval $ac_try) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit "$ac_status"); }; }; then
13339   cf_cv_wint_t=no
13340 else
13341   echo "$as_me: failed program was:" >&5
13342 cat "conftest.$ac_ext" >&5
13343 cat >"conftest.$ac_ext" <<_ACEOF
13344 #line 13344 "configure"
13345 #include "confdefs.h"
13346
13347 #include <stdlib.h>
13348 #include <stdarg.h>
13349 #include <stdio.h>
13350 #include <wchar.h>
13351 #ifdef HAVE_LIBUTF8_H
13352 #include <libutf8.h>
13353 #endif
13354 int
13355 main (void)
13356 {
13357 wint_t value
13358   ;
13359   return 0;
13360 }
13361 _ACEOF
13362 rm -f "conftest.$ac_objext"
13363 if { (eval echo "$as_me:13363: \"$ac_compile\"") >&5
13364   (eval $ac_compile) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit "$ac_status"); } &&
13368          { ac_try='test -s "conftest.$ac_objext"'
13369   { (eval echo "$as_me:13369: \"$ac_try\"") >&5
13370   (eval $ac_try) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit "$ac_status"); }; }; then
13374   cf_cv_wint_t=yes
13375 else
13376   echo "$as_me: failed program was:" >&5
13377 cat "conftest.$ac_ext" >&5
13378 cf_cv_wint_t=unknown
13379 fi
13380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13381 fi
13382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13383 fi
13384 echo "$as_me:13384: result: $cf_cv_wint_t" >&5
13385 echo "${ECHO_T}$cf_cv_wint_t" >&6
13386
13387 if test "$cf_cv_wint_t" = yes ; then
13388
13389 cat >>confdefs.h <<\EOF
13390 #define NEED_WCHAR_H 1
13391 EOF
13392
13393         NEED_WCHAR_H=1
13394 fi
13395
13396 # if we do not find wint_t in either place, use substitution to provide a fallback.
13397 if test "$cf_cv_wint_t" = unknown ; then
13398         NCURSES_WINT_T=1
13399 fi
13400
13401 # if we find wint_t in either place, use substitution to provide a fallback.
13402 if test "$cf_cv_wint_t" != unknown ; then
13403         NCURSES_OK_WINT_T=1
13404 fi
13405
13406         if test "$NCURSES_MBSTATE_T" != 0; then
13407
13408 cat >>confdefs.h <<\EOF
13409 #define NEED_MBSTATE_T_DEF 1
13410 EOF
13411
13412         fi
13413 fi
13414
13415 ###   use option --disable-lp64 to allow long chtype
13416 echo "$as_me:13416: checking whether to enable _LP64 definition in curses.h" >&5
13417 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13418
13419 # Check whether --enable-lp64 or --disable-lp64 was given.
13420 if test "${enable_lp64+set}" = set; then
13421   enableval="$enable_lp64"
13422   with_lp64=$enableval
13423 else
13424   with_lp64=$cf_dft_with_lp64
13425 fi;
13426 echo "$as_me:13426: result: $with_lp64" >&5
13427 echo "${ECHO_T}$with_lp64" >&6
13428
13429 if test "x$with_lp64" = xyes ; then
13430         cf_cv_enable_lp64=1
13431 else
13432         cf_cv_enable_lp64=0
13433 fi
13434
13435 # Check whether --enable-largefile or --disable-largefile was given.
13436 if test "${enable_largefile+set}" = set; then
13437   enableval="$enable_largefile"
13438
13439 fi;
13440 if test "$enable_largefile" != no; then
13441
13442   echo "$as_me:13442: checking for special C compiler options needed for large files" >&5
13443 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13444 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13445   echo $ECHO_N "(cached) $ECHO_C" >&6
13446 else
13447   ac_cv_sys_largefile_CC=no
13448      if test "$GCC" != yes; then
13449        ac_save_CC=$CC
13450        while :; do
13451          # IRIX 6.2 and later do not support large files by default,
13452          # so use the C compiler's -n32 option if that helps.
13453          cat >"conftest.$ac_ext" <<_ACEOF
13454 #line 13454 "configure"
13455 #include "confdefs.h"
13456 #include <sys/types.h>
13457  /* Check that off_t can represent 2**63 - 1 correctly.
13458     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13459     since some C++ compilers masquerading as C compilers
13460     incorrectly reject 9223372036854775807.  */
13461 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13462   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13463                        && LARGE_OFF_T % 2147483647 == 1)
13464                       ? 1 : -1];
13465 int
13466 main (void)
13467 {
13468
13469   ;
13470   return 0;
13471 }
13472 _ACEOF
13473          rm -f "conftest.$ac_objext"
13474 if { (eval echo "$as_me:13474: \"$ac_compile\"") >&5
13475   (eval $ac_compile) 2>&5
13476   ac_status=$?
13477   echo "$as_me:13477: \$? = $ac_status" >&5
13478   (exit "$ac_status"); } &&
13479          { ac_try='test -s "conftest.$ac_objext"'
13480   { (eval echo "$as_me:13480: \"$ac_try\"") >&5
13481   (eval $ac_try) 2>&5
13482   ac_status=$?
13483   echo "$as_me:13483: \$? = $ac_status" >&5
13484   (exit "$ac_status"); }; }; then
13485   break
13486 else
13487   echo "$as_me: failed program was:" >&5
13488 cat "conftest.$ac_ext" >&5
13489 fi
13490 rm -f "conftest.$ac_objext"
13491          CC="$CC -n32"
13492          rm -f "conftest.$ac_objext"
13493 if { (eval echo "$as_me:13493: \"$ac_compile\"") >&5
13494   (eval $ac_compile) 2>&5
13495   ac_status=$?
13496   echo "$as_me:13496: \$? = $ac_status" >&5
13497   (exit "$ac_status"); } &&
13498          { ac_try='test -s "conftest.$ac_objext"'
13499   { (eval echo "$as_me:13499: \"$ac_try\"") >&5
13500   (eval $ac_try) 2>&5
13501   ac_status=$?
13502   echo "$as_me:13502: \$? = $ac_status" >&5
13503   (exit "$ac_status"); }; }; then
13504   ac_cv_sys_largefile_CC=' -n32'; break
13505 else
13506   echo "$as_me: failed program was:" >&5
13507 cat "conftest.$ac_ext" >&5
13508 fi
13509 rm -f "conftest.$ac_objext"
13510          break
13511        done
13512        CC=$ac_save_CC
13513        rm -f "conftest.$ac_ext"
13514     fi
13515 fi
13516 echo "$as_me:13516: result: $ac_cv_sys_largefile_CC" >&5
13517 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13518   if test "$ac_cv_sys_largefile_CC" != no; then
13519     CC=$CC$ac_cv_sys_largefile_CC
13520   fi
13521
13522   echo "$as_me:13522: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13523 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13524 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13525   echo $ECHO_N "(cached) $ECHO_C" >&6
13526 else
13527   while :; do
13528   ac_cv_sys_file_offset_bits=no
13529   cat >"conftest.$ac_ext" <<_ACEOF
13530 #line 13530 "configure"
13531 #include "confdefs.h"
13532 #include <sys/types.h>
13533  /* Check that off_t can represent 2**63 - 1 correctly.
13534     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13535     since some C++ compilers masquerading as C compilers
13536     incorrectly reject 9223372036854775807.  */
13537 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13538   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13539                        && LARGE_OFF_T % 2147483647 == 1)
13540                       ? 1 : -1];
13541 int
13542 main (void)
13543 {
13544
13545   ;
13546   return 0;
13547 }
13548 _ACEOF
13549 rm -f "conftest.$ac_objext"
13550 if { (eval echo "$as_me:13550: \"$ac_compile\"") >&5
13551   (eval $ac_compile) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit "$ac_status"); } &&
13555          { ac_try='test -s "conftest.$ac_objext"'
13556   { (eval echo "$as_me:13556: \"$ac_try\"") >&5
13557   (eval $ac_try) 2>&5
13558   ac_status=$?
13559   echo "$as_me:13559: \$? = $ac_status" >&5
13560   (exit "$ac_status"); }; }; then
13561   break
13562 else
13563   echo "$as_me: failed program was:" >&5
13564 cat "conftest.$ac_ext" >&5
13565 fi
13566 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13567   cat >"conftest.$ac_ext" <<_ACEOF
13568 #line 13568 "configure"
13569 #include "confdefs.h"
13570 #define _FILE_OFFSET_BITS 64
13571 #include <sys/types.h>
13572  /* Check that off_t can represent 2**63 - 1 correctly.
13573     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13574     since some C++ compilers masquerading as C compilers
13575     incorrectly reject 9223372036854775807.  */
13576 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13577   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13578                        && LARGE_OFF_T % 2147483647 == 1)
13579                       ? 1 : -1];
13580 int
13581 main (void)
13582 {
13583
13584   ;
13585   return 0;
13586 }
13587 _ACEOF
13588 rm -f "conftest.$ac_objext"
13589 if { (eval echo "$as_me:13589: \"$ac_compile\"") >&5
13590   (eval $ac_compile) 2>&5
13591   ac_status=$?
13592   echo "$as_me:13592: \$? = $ac_status" >&5
13593   (exit "$ac_status"); } &&
13594          { ac_try='test -s "conftest.$ac_objext"'
13595   { (eval echo "$as_me:13595: \"$ac_try\"") >&5
13596   (eval $ac_try) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit "$ac_status"); }; }; then
13600   ac_cv_sys_file_offset_bits=64; break
13601 else
13602   echo "$as_me: failed program was:" >&5
13603 cat "conftest.$ac_ext" >&5
13604 fi
13605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13606   break
13607 done
13608 fi
13609 echo "$as_me:13609: result: $ac_cv_sys_file_offset_bits" >&5
13610 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13611 if test "$ac_cv_sys_file_offset_bits" != no; then
13612
13613 cat >>confdefs.h <<EOF
13614 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13615 EOF
13616
13617 fi
13618 rm -rf conftest*
13619   echo "$as_me:13619: checking for _LARGE_FILES value needed for large files" >&5
13620 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13621 if test "${ac_cv_sys_large_files+set}" = set; then
13622   echo $ECHO_N "(cached) $ECHO_C" >&6
13623 else
13624   while :; do
13625   ac_cv_sys_large_files=no
13626   cat >"conftest.$ac_ext" <<_ACEOF
13627 #line 13627 "configure"
13628 #include "confdefs.h"
13629 #include <sys/types.h>
13630  /* Check that off_t can represent 2**63 - 1 correctly.
13631     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13632     since some C++ compilers masquerading as C compilers
13633     incorrectly reject 9223372036854775807.  */
13634 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13635   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13636                        && LARGE_OFF_T % 2147483647 == 1)
13637                       ? 1 : -1];
13638 int
13639 main (void)
13640 {
13641
13642   ;
13643   return 0;
13644 }
13645 _ACEOF
13646 rm -f "conftest.$ac_objext"
13647 if { (eval echo "$as_me:13647: \"$ac_compile\"") >&5
13648   (eval $ac_compile) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit "$ac_status"); } &&
13652          { ac_try='test -s "conftest.$ac_objext"'
13653   { (eval echo "$as_me:13653: \"$ac_try\"") >&5
13654   (eval $ac_try) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit "$ac_status"); }; }; then
13658   break
13659 else
13660   echo "$as_me: failed program was:" >&5
13661 cat "conftest.$ac_ext" >&5
13662 fi
13663 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13664   cat >"conftest.$ac_ext" <<_ACEOF
13665 #line 13665 "configure"
13666 #include "confdefs.h"
13667 #define _LARGE_FILES 1
13668 #include <sys/types.h>
13669  /* Check that off_t can represent 2**63 - 1 correctly.
13670     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13671     since some C++ compilers masquerading as C compilers
13672     incorrectly reject 9223372036854775807.  */
13673 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13674   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13675                        && LARGE_OFF_T % 2147483647 == 1)
13676                       ? 1 : -1];
13677 int
13678 main (void)
13679 {
13680
13681   ;
13682   return 0;
13683 }
13684 _ACEOF
13685 rm -f "conftest.$ac_objext"
13686 if { (eval echo "$as_me:13686: \"$ac_compile\"") >&5
13687   (eval $ac_compile) 2>&5
13688   ac_status=$?
13689   echo "$as_me:13689: \$? = $ac_status" >&5
13690   (exit "$ac_status"); } &&
13691          { ac_try='test -s "conftest.$ac_objext"'
13692   { (eval echo "$as_me:13692: \"$ac_try\"") >&5
13693   (eval $ac_try) 2>&5
13694   ac_status=$?
13695   echo "$as_me:13695: \$? = $ac_status" >&5
13696   (exit "$ac_status"); }; }; then
13697   ac_cv_sys_large_files=1; break
13698 else
13699   echo "$as_me: failed program was:" >&5
13700 cat "conftest.$ac_ext" >&5
13701 fi
13702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13703   break
13704 done
13705 fi
13706 echo "$as_me:13706: result: $ac_cv_sys_large_files" >&5
13707 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13708 if test "$ac_cv_sys_large_files" != no; then
13709
13710 cat >>confdefs.h <<EOF
13711 #define _LARGE_FILES $ac_cv_sys_large_files
13712 EOF
13713
13714 fi
13715 rm -rf conftest*
13716 fi
13717
13718         if test "$enable_largefile" != no ; then
13719         echo "$as_me:13719: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13720 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13721 if test "${ac_cv_sys_largefile_source+set}" = set; then
13722   echo $ECHO_N "(cached) $ECHO_C" >&6
13723 else
13724   while :; do
13725   ac_cv_sys_largefile_source=no
13726   cat >"conftest.$ac_ext" <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13729 #include <stdio.h>
13730 int
13731 main (void)
13732 {
13733 return !fseeko;
13734   ;
13735   return 0;
13736 }
13737 _ACEOF
13738 rm -f "conftest.$ac_objext"
13739 if { (eval echo "$as_me:13739: \"$ac_compile\"") >&5
13740   (eval $ac_compile) 2>&5
13741   ac_status=$?
13742   echo "$as_me:13742: \$? = $ac_status" >&5
13743   (exit "$ac_status"); } &&
13744          { ac_try='test -s "conftest.$ac_objext"'
13745   { (eval echo "$as_me:13745: \"$ac_try\"") >&5
13746   (eval $ac_try) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit "$ac_status"); }; }; then
13750   break
13751 else
13752   echo "$as_me: failed program was:" >&5
13753 cat "conftest.$ac_ext" >&5
13754 fi
13755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13756   cat >"conftest.$ac_ext" <<_ACEOF
13757 #line 13757 "configure"
13758 #include "confdefs.h"
13759 #define _LARGEFILE_SOURCE 1
13760 #include <stdio.h>
13761 int
13762 main (void)
13763 {
13764 return !fseeko;
13765   ;
13766   return 0;
13767 }
13768 _ACEOF
13769 rm -f "conftest.$ac_objext"
13770 if { (eval echo "$as_me:13770: \"$ac_compile\"") >&5
13771   (eval $ac_compile) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit "$ac_status"); } &&
13775          { ac_try='test -s "conftest.$ac_objext"'
13776   { (eval echo "$as_me:13776: \"$ac_try\"") >&5
13777   (eval $ac_try) 2>&5
13778   ac_status=$?
13779   echo "$as_me:13779: \$? = $ac_status" >&5
13780   (exit "$ac_status"); }; }; then
13781   ac_cv_sys_largefile_source=1; break
13782 else
13783   echo "$as_me: failed program was:" >&5
13784 cat "conftest.$ac_ext" >&5
13785 fi
13786 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13787   break
13788 done
13789 fi
13790 echo "$as_me:13790: result: $ac_cv_sys_largefile_source" >&5
13791 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13792 if test "$ac_cv_sys_largefile_source" != no; then
13793
13794 cat >>confdefs.h <<EOF
13795 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13796 EOF
13797
13798 fi
13799 rm -rf conftest*
13800
13801 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13802 # in glibc 2.1.3, but that breaks too many other things.
13803 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13804 echo "$as_me:13804: checking for fseeko" >&5
13805 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13806 if test "${ac_cv_func_fseeko+set}" = set; then
13807   echo $ECHO_N "(cached) $ECHO_C" >&6
13808 else
13809   cat >"conftest.$ac_ext" <<_ACEOF
13810 #line 13810 "configure"
13811 #include "confdefs.h"
13812 #include <stdio.h>
13813 int
13814 main (void)
13815 {
13816 return fseeko && fseeko (stdin, 0, 0);
13817   ;
13818   return 0;
13819 }
13820 _ACEOF
13821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13822 if { (eval echo "$as_me:13822: \"$ac_link\"") >&5
13823   (eval $ac_link) 2>&5
13824   ac_status=$?
13825   echo "$as_me:13825: \$? = $ac_status" >&5
13826   (exit "$ac_status"); } &&
13827          { ac_try='test -s "conftest$ac_exeext"'
13828   { (eval echo "$as_me:13828: \"$ac_try\"") >&5
13829   (eval $ac_try) 2>&5
13830   ac_status=$?
13831   echo "$as_me:13831: \$? = $ac_status" >&5
13832   (exit "$ac_status"); }; }; then
13833   ac_cv_func_fseeko=yes
13834 else
13835   echo "$as_me: failed program was:" >&5
13836 cat "conftest.$ac_ext" >&5
13837 ac_cv_func_fseeko=no
13838 fi
13839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13840 fi
13841 echo "$as_me:13841: result: $ac_cv_func_fseeko" >&5
13842 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13843 if test $ac_cv_func_fseeko = yes; then
13844
13845 cat >>confdefs.h <<\EOF
13846 #define HAVE_FSEEKO 1
13847 EOF
13848
13849 fi
13850
13851         # Normally we would collect these definitions in the config.h,
13852         # but (like _XOPEN_SOURCE), some environments rely on having these
13853         # defined before any of the system headers are included.  Another
13854         # case comes up with C++, e.g., on AIX the compiler compiles the
13855         # header files by themselves before looking at the body files it is
13856         # told to compile.  For ncurses, those header files do not include
13857         # the config.h
13858         if test "$ac_cv_sys_large_files" != no
13859         then
13860
13861         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13862         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13863
13864         fi
13865         if test "$ac_cv_sys_largefile_source" != no
13866         then
13867
13868         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13869         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13870
13871         fi
13872         if test "$ac_cv_sys_file_offset_bits" != no
13873         then
13874
13875         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13876         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13877
13878         fi
13879
13880         echo "$as_me:13880: checking whether to use struct dirent64" >&5
13881 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13882 if test "${cf_cv_struct_dirent64+set}" = set; then
13883   echo $ECHO_N "(cached) $ECHO_C" >&6
13884 else
13885
13886                 cat >"conftest.$ac_ext" <<_ACEOF
13887 #line 13887 "configure"
13888 #include "confdefs.h"
13889
13890 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13891 #include <sys/types.h>
13892 #include <dirent.h>
13893
13894 int
13895 main (void)
13896 {
13897
13898                 /* if transitional largefile support is setup, this is true */
13899                 extern struct dirent64 * readdir(DIR *);
13900                 struct dirent64 *x = readdir((DIR *)0);
13901                 struct dirent *y = readdir((DIR *)0);
13902                 int z = x - y;
13903                 (void)z;
13904
13905   ;
13906   return 0;
13907 }
13908 _ACEOF
13909 rm -f "conftest.$ac_objext"
13910 if { (eval echo "$as_me:13910: \"$ac_compile\"") >&5
13911   (eval $ac_compile) 2>&5
13912   ac_status=$?
13913   echo "$as_me:13913: \$? = $ac_status" >&5
13914   (exit "$ac_status"); } &&
13915          { ac_try='test -s "conftest.$ac_objext"'
13916   { (eval echo "$as_me:13916: \"$ac_try\"") >&5
13917   (eval $ac_try) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit "$ac_status"); }; }; then
13921   cf_cv_struct_dirent64=yes
13922 else
13923   echo "$as_me: failed program was:" >&5
13924 cat "conftest.$ac_ext" >&5
13925 cf_cv_struct_dirent64=no
13926 fi
13927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13928
13929 fi
13930 echo "$as_me:13930: result: $cf_cv_struct_dirent64" >&5
13931 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13932         test "$cf_cv_struct_dirent64" = yes &&
13933 cat >>confdefs.h <<\EOF
13934 #define HAVE_STRUCT_DIRENT64 1
13935 EOF
13936
13937         fi
13938
13939 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13940 echo "$as_me:13940: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13941 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13942
13943 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13944 if test "${enable_tparm_varargs+set}" = set; then
13945   enableval="$enable_tparm_varargs"
13946   with_tparm_varargs=$enableval
13947 else
13948   with_tparm_varargs=yes
13949 fi;
13950 echo "$as_me:13950: result: $with_tparm_varargs" >&5
13951 echo "${ECHO_T}$with_tparm_varargs" >&6
13952 NCURSES_TPARM_VARARGS=0
13953 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13954
13955 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13956 if test "$with_ticlib" != no ; then
13957 echo "$as_me:13957: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13958 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13959
13960 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13961 if test "${enable_tic_depends+set}" = set; then
13962   enableval="$enable_tic_depends"
13963   with_tic_depends=$enableval
13964 else
13965   with_tic_depends=yes
13966 fi;
13967 echo "$as_me:13967: result: $with_tic_depends" >&5
13968 echo "${ECHO_T}$with_tic_depends" >&6
13969 else
13970         with_tic_depends=no
13971 fi
13972
13973 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13974 echo "$as_me:13974: checking if you want to enable wattr* macros" >&5
13975 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13976
13977 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13978 if test "${enable_wattr_macros+set}" = set; then
13979   enableval="$enable_wattr_macros"
13980   with_wattr_macros=$enableval
13981 else
13982   with_wattr_macros=no
13983 fi;
13984 if [ "x$with_wattr_macros" != xyes ]; then
13985         NCURSES_WATTR_MACROS=0
13986         echo "$as_me:13986: result: no" >&5
13987 echo "${ECHO_T}no" >&6
13988 else
13989         NCURSES_WATTR_MACROS=1
13990         echo "$as_me:13990: result: yes" >&5
13991 echo "${ECHO_T}yes" >&6
13992 fi
13993
13994 echo "$as_me:13994: checking for X11 rgb file" >&5
13995 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13996
13997 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13998 if test "${with_x11_rgb+set}" = set; then
13999   withval="$with_x11_rgb"
14000   RGB_PATH=$withval
14001 else
14002   RGB_PATH=auto
14003 fi;
14004
14005 if test "x$RGB_PATH" = xauto
14006 then
14007         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14008         for cf_path in \
14009                 /opt/local/share/X11/rgb.txt \
14010                 /opt/X11/share/X11/rgb.txt \
14011                 /usr/share/X11/rgb.txt \
14012                 /usr/X11/share/X11/rgb.txt \
14013                 /usr/X11/lib/X11/rgb.txt \
14014                 /usr/lib/X11/rgb.txt \
14015                 /etc/X11/rgb.txt \
14016                 /usr/pkg/lib/X11/rgb.txt \
14017                 /usr/X11R7/lib/X11/rgb.txt \
14018                 /usr/X11R6/lib/X11/rgb.txt \
14019                 /usr/X11R5/lib/X11/rgb.txt \
14020                 /usr/X11R4/lib/X11/rgb.txt \
14021                 /usr/local/lib/X11/rgb.txt \
14022                 /usr/local/share/X11/rgb.txt \
14023                 /usr/lib64/X11/rgb.txt
14024         do
14025                 if test -f "$cf_path" ; then
14026                         RGB_PATH="$cf_path"
14027                         break
14028                 fi
14029         done
14030 else
14031         cf_path=$RGB_PATH
14032
14033 if test "x$prefix" != xNONE; then
14034         cf_path_syntax="$prefix"
14035 else
14036         cf_path_syntax="$ac_default_prefix"
14037 fi
14038
14039 case ".$cf_path" in
14040 (.\$\(*\)*|.\'*\'*)
14041         ;;
14042 (..|./*|.\\*)
14043         ;;
14044 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14045         ;;
14046 (.\$\{*prefix\}*|.\$\{*dir\}*)
14047         eval cf_path="$cf_path"
14048         case ".$cf_path" in
14049         (.NONE/*)
14050                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14051                 ;;
14052         esac
14053         ;;
14054 (.no|.NONE/*)
14055         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14056         ;;
14057 (*)
14058         { { echo "$as_me:14058: error: expected a pathname, not \"$cf_path\"" >&5
14059 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14060    { (exit 1); exit 1; }; }
14061         ;;
14062 esac
14063
14064 fi
14065
14066 echo "$as_me:14066: result: $RGB_PATH" >&5
14067 echo "${ECHO_T}$RGB_PATH" >&6
14068
14069 cat >>confdefs.h <<EOF
14070 #define RGB_PATH "$cf_path"
14071 EOF
14072
14073 no_x11_rgb=
14074 if test "$RGB_PATH" = no
14075 then
14076         no_x11_rgb="#"
14077 fi
14078
14079 ###   use option --with-bool to override bool's type
14080 echo "$as_me:14080: checking for type of bool" >&5
14081 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14082
14083 # Check whether --with-bool or --without-bool was given.
14084 if test "${with_bool+set}" = set; then
14085   withval="$with_bool"
14086   NCURSES_BOOL="$withval"
14087 else
14088   NCURSES_BOOL=auto
14089 fi;
14090 echo "$as_me:14090: result: $NCURSES_BOOL" >&5
14091 echo "${ECHO_T}$NCURSES_BOOL" >&6
14092
14093 echo "$as_me:14093: checking for alternate terminal capabilities file" >&5
14094 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14095
14096 # Check whether --with-caps or --without-caps was given.
14097 if test "${with_caps+set}" = set; then
14098   withval="$with_caps"
14099   TERMINFO_CAPS=Caps.$withval
14100 else
14101   TERMINFO_CAPS=Caps
14102 fi;
14103 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14104 then
14105         { echo "$as_me:14105: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14106 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14107         TERMINFO_CAPS=Caps
14108 fi
14109 echo "$as_me:14109: result: $TERMINFO_CAPS" >&5
14110 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14111
14112 ###   use option --with-chtype to override chtype's type
14113 echo "$as_me:14113: checking for type of chtype" >&5
14114 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14115
14116 # Check whether --with-chtype or --without-chtype was given.
14117 if test "${with_chtype+set}" = set; then
14118   withval="$with_chtype"
14119   NCURSES_CHTYPE="$withval"
14120 else
14121   NCURSES_CHTYPE=$cf_dft_chtype
14122 fi;
14123 echo "$as_me:14123: result: $NCURSES_CHTYPE" >&5
14124 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14125
14126 ###   use option --with-ospeed to override ospeed's type
14127 echo "$as_me:14127: checking for type of ospeed" >&5
14128 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14129
14130 # Check whether --with-ospeed or --without-ospeed was given.
14131 if test "${with_ospeed+set}" = set; then
14132   withval="$with_ospeed"
14133   NCURSES_OSPEED="$withval"
14134 else
14135   NCURSES_OSPEED=short
14136 fi;
14137 echo "$as_me:14137: result: $NCURSES_OSPEED" >&5
14138 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14139
14140 ###   use option --with-mmask-t to override mmask_t's type
14141 echo "$as_me:14141: checking for type of mmask_t" >&5
14142 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14143
14144 # Check whether --with-mmask-t or --without-mmask-t was given.
14145 if test "${with_mmask_t+set}" = set; then
14146   withval="$with_mmask_t"
14147   NCURSES_MMASK_T="$withval"
14148 else
14149   NCURSES_MMASK_T=$cf_dft_mmask_t
14150 fi;
14151 echo "$as_me:14151: result: $NCURSES_MMASK_T" >&5
14152 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14153
14154 ###   use option --with-ccharw-max to override CCHARW_MAX size
14155 echo "$as_me:14155: checking for size CCHARW_MAX" >&5
14156 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14157
14158 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14159 if test "${with_ccharw_max+set}" = set; then
14160   withval="$with_ccharw_max"
14161   NCURSES_CCHARW_MAX="$withval"
14162 else
14163   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14164 fi;
14165 echo "$as_me:14165: result: $NCURSES_CCHARW_MAX" >&5
14166 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14167
14168 echo "$as_me:14168: checking for ANSI C header files" >&5
14169 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14170 if test "${ac_cv_header_stdc+set}" = set; then
14171   echo $ECHO_N "(cached) $ECHO_C" >&6
14172 else
14173   cat >"conftest.$ac_ext" <<_ACEOF
14174 #line 14174 "configure"
14175 #include "confdefs.h"
14176 #include <stdlib.h>
14177 #include <stdarg.h>
14178 #include <string.h>
14179 #include <float.h>
14180
14181 _ACEOF
14182 if { (eval echo "$as_me:14182: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14183   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14184   ac_status=$?
14185   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14186   rm -f conftest.er1
14187   cat conftest.err >&5
14188   echo "$as_me:14188: \$? = $ac_status" >&5
14189   (exit "$ac_status"); } >/dev/null; then
14190   if test -s conftest.err; then
14191     ac_cpp_err=$ac_c_preproc_warn_flag
14192   else
14193     ac_cpp_err=
14194   fi
14195 else
14196   ac_cpp_err=yes
14197 fi
14198 if test -z "$ac_cpp_err"; then
14199   ac_cv_header_stdc=yes
14200 else
14201   echo "$as_me: failed program was:" >&5
14202   cat "conftest.$ac_ext" >&5
14203   ac_cv_header_stdc=no
14204 fi
14205 rm -f conftest.err "conftest.$ac_ext"
14206
14207 if test $ac_cv_header_stdc = yes; then
14208   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14209   cat >"conftest.$ac_ext" <<_ACEOF
14210 #line 14210 "configure"
14211 #include "confdefs.h"
14212 #include <string.h>
14213
14214 _ACEOF
14215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14216   $EGREP "memchr" >/dev/null 2>&1; then
14217   :
14218 else
14219   ac_cv_header_stdc=no
14220 fi
14221 rm -rf conftest*
14222
14223 fi
14224
14225 if test $ac_cv_header_stdc = yes; then
14226   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14227   cat >"conftest.$ac_ext" <<_ACEOF
14228 #line 14228 "configure"
14229 #include "confdefs.h"
14230 #include <stdlib.h>
14231
14232 _ACEOF
14233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14234   $EGREP "free" >/dev/null 2>&1; then
14235   :
14236 else
14237   ac_cv_header_stdc=no
14238 fi
14239 rm -rf conftest*
14240
14241 fi
14242
14243 if test $ac_cv_header_stdc = yes; then
14244   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14245   if test "$cross_compiling" = yes; then
14246   :
14247 else
14248   cat >"conftest.$ac_ext" <<_ACEOF
14249 #line 14249 "configure"
14250 #include "confdefs.h"
14251 #include <ctype.h>
14252 #if ((' ' & 0x0FF) == 0x020)
14253 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14254 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14255 #else
14256 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14257                      || ('j' <= (c) && (c) <= 'r') \
14258                      || ('s' <= (c) && (c) <= 'z'))
14259 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14260 #endif
14261
14262 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14263 int
14264 main (void)
14265 {
14266   int i;
14267   for (i = 0; i < 256; i++)
14268     if (XOR (islower (i), ISLOWER (i))
14269         || toupper (i) != TOUPPER (i))
14270       $ac_main_return(2);
14271   $ac_main_return (0);
14272 }
14273 _ACEOF
14274 rm -f "conftest$ac_exeext"
14275 if { (eval echo "$as_me:14275: \"$ac_link\"") >&5
14276   (eval $ac_link) 2>&5
14277   ac_status=$?
14278   echo "$as_me:14278: \$? = $ac_status" >&5
14279   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14280   { (eval echo "$as_me:14280: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit "$ac_status"); }; }; then
14285   :
14286 else
14287   echo "$as_me: program exited with status $ac_status" >&5
14288 echo "$as_me: failed program was:" >&5
14289 cat "conftest.$ac_ext" >&5
14290 ac_cv_header_stdc=no
14291 fi
14292 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14293 fi
14294 fi
14295 fi
14296 echo "$as_me:14296: result: $ac_cv_header_stdc" >&5
14297 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14298 if test $ac_cv_header_stdc = yes; then
14299
14300 cat >>confdefs.h <<\EOF
14301 #define STDC_HEADERS 1
14302 EOF
14303
14304 fi
14305
14306 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14307
14308 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14309                   inttypes.h stdint.h unistd.h
14310 do
14311 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14312 echo "$as_me:14312: checking for $ac_header" >&5
14313 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14315   echo $ECHO_N "(cached) $ECHO_C" >&6
14316 else
14317   cat >"conftest.$ac_ext" <<_ACEOF
14318 #line 14318 "configure"
14319 #include "confdefs.h"
14320 $ac_includes_default
14321 #include <$ac_header>
14322 _ACEOF
14323 rm -f "conftest.$ac_objext"
14324 if { (eval echo "$as_me:14324: \"$ac_compile\"") >&5
14325   (eval $ac_compile) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit "$ac_status"); } &&
14329          { ac_try='test -s "conftest.$ac_objext"'
14330   { (eval echo "$as_me:14330: \"$ac_try\"") >&5
14331   (eval $ac_try) 2>&5
14332   ac_status=$?
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit "$ac_status"); }; }; then
14335   eval "$as_ac_Header=yes"
14336 else
14337   echo "$as_me: failed program was:" >&5
14338 cat "conftest.$ac_ext" >&5
14339 eval "$as_ac_Header=no"
14340 fi
14341 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14342 fi
14343 echo "$as_me:14343: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14344 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14345 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14346   cat >>confdefs.h <<EOF
14347 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14348 EOF
14349
14350 fi
14351 done
14352
14353 echo "$as_me:14353: checking for signed char" >&5
14354 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14355 if test "${ac_cv_type_signed_char+set}" = set; then
14356   echo $ECHO_N "(cached) $ECHO_C" >&6
14357 else
14358   cat >"conftest.$ac_ext" <<_ACEOF
14359 #line 14359 "configure"
14360 #include "confdefs.h"
14361 $ac_includes_default
14362 int
14363 main (void)
14364 {
14365 if ((signed char *) 0)
14366   return 0;
14367 if (sizeof (signed char))
14368   return 0;
14369   ;
14370   return 0;
14371 }
14372 _ACEOF
14373 rm -f "conftest.$ac_objext"
14374 if { (eval echo "$as_me:14374: \"$ac_compile\"") >&5
14375   (eval $ac_compile) 2>&5
14376   ac_status=$?
14377   echo "$as_me:14377: \$? = $ac_status" >&5
14378   (exit "$ac_status"); } &&
14379          { ac_try='test -s "conftest.$ac_objext"'
14380   { (eval echo "$as_me:14380: \"$ac_try\"") >&5
14381   (eval $ac_try) 2>&5
14382   ac_status=$?
14383   echo "$as_me:14383: \$? = $ac_status" >&5
14384   (exit "$ac_status"); }; }; then
14385   ac_cv_type_signed_char=yes
14386 else
14387   echo "$as_me: failed program was:" >&5
14388 cat "conftest.$ac_ext" >&5
14389 ac_cv_type_signed_char=no
14390 fi
14391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14392 fi
14393 echo "$as_me:14393: result: $ac_cv_type_signed_char" >&5
14394 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14395
14396 echo "$as_me:14396: checking size of signed char" >&5
14397 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14398 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14399   echo $ECHO_N "(cached) $ECHO_C" >&6
14400 else
14401   if test "$ac_cv_type_signed_char" = yes; then
14402   if test "$cross_compiling" = yes; then
14403   # Depending upon the size, compute the lo and hi bounds.
14404 cat >"conftest.$ac_ext" <<_ACEOF
14405 #line 14405 "configure"
14406 #include "confdefs.h"
14407 $ac_includes_default
14408 int
14409 main (void)
14410 {
14411 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14412   ;
14413   return 0;
14414 }
14415 _ACEOF
14416 rm -f "conftest.$ac_objext"
14417 if { (eval echo "$as_me:14417: \"$ac_compile\"") >&5
14418   (eval $ac_compile) 2>&5
14419   ac_status=$?
14420   echo "$as_me:14420: \$? = $ac_status" >&5
14421   (exit "$ac_status"); } &&
14422          { ac_try='test -s "conftest.$ac_objext"'
14423   { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424   (eval $ac_try) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit "$ac_status"); }; }; then
14428   ac_lo=0 ac_mid=0
14429   while :; do
14430     cat >"conftest.$ac_ext" <<_ACEOF
14431 #line 14431 "configure"
14432 #include "confdefs.h"
14433 $ac_includes_default
14434 int
14435 main (void)
14436 {
14437 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14438   ;
14439   return 0;
14440 }
14441 _ACEOF
14442 rm -f "conftest.$ac_objext"
14443 if { (eval echo "$as_me:14443: \"$ac_compile\"") >&5
14444   (eval $ac_compile) 2>&5
14445   ac_status=$?
14446   echo "$as_me:14446: \$? = $ac_status" >&5
14447   (exit "$ac_status"); } &&
14448          { ac_try='test -s "conftest.$ac_objext"'
14449   { (eval echo "$as_me:14449: \"$ac_try\"") >&5
14450   (eval $ac_try) 2>&5
14451   ac_status=$?
14452   echo "$as_me:14452: \$? = $ac_status" >&5
14453   (exit "$ac_status"); }; }; then
14454   ac_hi=$ac_mid; break
14455 else
14456   echo "$as_me: failed program was:" >&5
14457 cat "conftest.$ac_ext" >&5
14458 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14459 fi
14460 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14461   done
14462 else
14463   echo "$as_me: failed program was:" >&5
14464 cat "conftest.$ac_ext" >&5
14465 ac_hi=-1 ac_mid=-1
14466   while :; do
14467     cat >"conftest.$ac_ext" <<_ACEOF
14468 #line 14468 "configure"
14469 #include "confdefs.h"
14470 $ac_includes_default
14471 int
14472 main (void)
14473 {
14474 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14475   ;
14476   return 0;
14477 }
14478 _ACEOF
14479 rm -f "conftest.$ac_objext"
14480 if { (eval echo "$as_me:14480: \"$ac_compile\"") >&5
14481   (eval $ac_compile) 2>&5
14482   ac_status=$?
14483   echo "$as_me:14483: \$? = $ac_status" >&5
14484   (exit "$ac_status"); } &&
14485          { ac_try='test -s "conftest.$ac_objext"'
14486   { (eval echo "$as_me:14486: \"$ac_try\"") >&5
14487   (eval $ac_try) 2>&5
14488   ac_status=$?
14489   echo "$as_me:14489: \$? = $ac_status" >&5
14490   (exit "$ac_status"); }; }; then
14491   ac_lo=$ac_mid; break
14492 else
14493   echo "$as_me: failed program was:" >&5
14494 cat "conftest.$ac_ext" >&5
14495 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14496 fi
14497 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14498   done
14499 fi
14500 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14501 # Binary search between lo and hi bounds.
14502 while test "x$ac_lo" != "x$ac_hi"; do
14503   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14504   cat >"conftest.$ac_ext" <<_ACEOF
14505 #line 14505 "configure"
14506 #include "confdefs.h"
14507 $ac_includes_default
14508 int
14509 main (void)
14510 {
14511 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14512   ;
14513   return 0;
14514 }
14515 _ACEOF
14516 rm -f "conftest.$ac_objext"
14517 if { (eval echo "$as_me:14517: \"$ac_compile\"") >&5
14518   (eval $ac_compile) 2>&5
14519   ac_status=$?
14520   echo "$as_me:14520: \$? = $ac_status" >&5
14521   (exit "$ac_status"); } &&
14522          { ac_try='test -s "conftest.$ac_objext"'
14523   { (eval echo "$as_me:14523: \"$ac_try\"") >&5
14524   (eval $ac_try) 2>&5
14525   ac_status=$?
14526   echo "$as_me:14526: \$? = $ac_status" >&5
14527   (exit "$ac_status"); }; }; then
14528   ac_hi=$ac_mid
14529 else
14530   echo "$as_me: failed program was:" >&5
14531 cat "conftest.$ac_ext" >&5
14532 ac_lo=`expr "$ac_mid" + 1`
14533 fi
14534 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14535 done
14536 ac_cv_sizeof_signed_char=$ac_lo
14537 else
14538   if test "$cross_compiling" = yes; then
14539   { { echo "$as_me:14539: error: cannot run test program while cross compiling" >&5
14540 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14541    { (exit 1); exit 1; }; }
14542 else
14543   cat >"conftest.$ac_ext" <<_ACEOF
14544 #line 14544 "configure"
14545 #include "confdefs.h"
14546 $ac_includes_default
14547 int
14548 main (void)
14549 {
14550 FILE *f = fopen ("conftest.val", "w");
14551 if (!f)
14552   $ac_main_return (1);
14553 fprintf (f, "%ld", (long)(sizeof (signed char)));
14554 fclose (f);
14555   ;
14556   return 0;
14557 }
14558 _ACEOF
14559 rm -f "conftest$ac_exeext"
14560 if { (eval echo "$as_me:14560: \"$ac_link\"") >&5
14561   (eval $ac_link) 2>&5
14562   ac_status=$?
14563   echo "$as_me:14563: \$? = $ac_status" >&5
14564   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14565   { (eval echo "$as_me:14565: \"$ac_try\"") >&5
14566   (eval $ac_try) 2>&5
14567   ac_status=$?
14568   echo "$as_me:14568: \$? = $ac_status" >&5
14569   (exit "$ac_status"); }; }; then
14570   ac_cv_sizeof_signed_char=`cat conftest.val`
14571 else
14572   echo "$as_me: program exited with status $ac_status" >&5
14573 echo "$as_me: failed program was:" >&5
14574 cat "conftest.$ac_ext" >&5
14575 fi
14576 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14577 fi
14578 fi
14579 rm -f conftest.val
14580 else
14581   ac_cv_sizeof_signed_char=0
14582 fi
14583 fi
14584 echo "$as_me:14584: result: $ac_cv_sizeof_signed_char" >&5
14585 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14586 cat >>confdefs.h <<EOF
14587 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14588 EOF
14589
14590 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14591         NCURSES_SBOOL="signed char"
14592 else
14593         NCURSES_SBOOL="char"
14594 fi
14595 echo "$as_me:14595: checking if you want to use signed Boolean array in term.h" >&5
14596 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14597
14598 # Check whether --enable-signed-char or --disable-signed-char was given.
14599 if test "${enable_signed_char+set}" = set; then
14600   enableval="$enable_signed_char"
14601   with_signed_char=$enableval
14602 else
14603   with_signed_char=$cf_dft_signed_char
14604 fi;
14605 echo "$as_me:14605: result: $with_signed_char" >&5
14606 echo "${ECHO_T}$with_signed_char" >&6
14607 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14608
14609 ###   use option --with-tparm-arg to override tparm's argument type
14610 echo "$as_me:14610: checking for type of tparm args" >&5
14611 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14612
14613 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14614 if test "${with_tparm_arg+set}" = set; then
14615   withval="$with_tparm_arg"
14616   NCURSES_TPARM_ARG="$withval"
14617 else
14618   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14619 fi;
14620 echo "$as_me:14620: result: $NCURSES_TPARM_ARG" >&5
14621 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14622
14623 ### Enable compiling-in rcs id's
14624 echo "$as_me:14624: checking if RCS identifiers should be compiled-in" >&5
14625 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14626
14627 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14628 if test "${with_rcs_ids+set}" = set; then
14629   withval="$with_rcs_ids"
14630   with_rcs_ids=$withval
14631 else
14632   with_rcs_ids=no
14633 fi;
14634 echo "$as_me:14634: result: $with_rcs_ids" >&5
14635 echo "${ECHO_T}$with_rcs_ids" >&6
14636 test "x$with_rcs_ids" = xyes &&
14637 cat >>confdefs.h <<\EOF
14638 #define USE_RCS_IDS 1
14639 EOF
14640
14641 ###############################################################################
14642
14643 echo "$as_me:14643: checking format of man-pages" >&5
14644 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14645
14646 # Check whether --with-manpage-format or --without-manpage-format was given.
14647 if test "${with_manpage_format+set}" = set; then
14648   withval="$with_manpage_format"
14649   MANPAGE_FORMAT=$withval
14650 else
14651   MANPAGE_FORMAT=unknown
14652 fi;
14653
14654 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14655 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14656
14657 cf_unknown=
14658
14659 case "$MANPAGE_FORMAT" in
14660 (unknown)
14661         if test -z "$MANPATH" ; then
14662                 MANPATH="/usr/man:/usr/share/man"
14663         fi
14664
14665         # look for the 'date' man-page (it is most likely to be installed!)
14666         MANPAGE_FORMAT=
14667         cf_preform="no"
14668         cf_catonly="yes"
14669         cf_example="date"
14670
14671         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14672         for cf_dir in $MANPATH; do
14673                 test -z "$cf_dir" && cf_dir=/usr/man
14674                 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
14675                 do
14676                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14677                         if test "x$cf_test" = "x$cf_name" ; then
14678
14679                                 case "$cf_name" in
14680                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14681                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14682                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14683                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14684                                 esac
14685
14686                                 case "$cf_name" in
14687                                 ($cf_dir/man*)
14688                                         cf_catonly=no
14689                                         ;;
14690                                 ($cf_dir/cat*)
14691                                         cf_preform=yes
14692                                         ;;
14693                                 esac
14694                                 break
14695                         fi
14696
14697                         # if we found a match in either man* or cat*, stop looking
14698                         if test -n "$MANPAGE_FORMAT" ; then
14699                                 cf_found=no
14700                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14701                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14702                                 case "$cf_name" in
14703                                 ($cf_dir/cat*)
14704                                         cf_found=yes
14705                                         ;;
14706                                 esac
14707                                 test "$cf_found" = yes && break
14708                         fi
14709                 done
14710                 # only check the first directory in $MANPATH where we find manpages
14711                 if test -n "$MANPAGE_FORMAT" ; then
14712                         break
14713                 fi
14714         done
14715         # if we did not find the example, just assume it is normal
14716         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14717         IFS="$ac_save_ifs"
14718         ;;
14719 (*)
14720         for cf_option in $MANPAGE_FORMAT; do
14721         case "$cf_option" in
14722         (gzip|compress|BSDI|normal|formatted|catonly)
14723                 ;;
14724         (*)
14725                 cf_unknown="$cf_unknown $cf_option"
14726                 ;;
14727         esac
14728         done
14729         ;;
14730 esac
14731
14732 echo "$as_me:14732: result: $MANPAGE_FORMAT" >&5
14733 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14734 if test -n "$cf_unknown" ; then
14735         { echo "$as_me:14735: WARNING: Unexpected manpage-format $cf_unknown" >&5
14736 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14737 fi
14738
14739 echo "$as_me:14739: checking for manpage renaming" >&5
14740 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14741
14742 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14743 if test "${with_manpage_renames+set}" = set; then
14744   withval="$with_manpage_renames"
14745   MANPAGE_RENAMES=$withval
14746 else
14747   MANPAGE_RENAMES=yes
14748 fi;
14749
14750 case ".$MANPAGE_RENAMES" in
14751 (.no)
14752         ;;
14753 (.|.yes)
14754         # Debian 'man' program?
14755         if test -f /etc/debian_version ; then
14756                 MANPAGE_RENAMES=man/man_db.renames
14757         else
14758                 MANPAGE_RENAMES=no
14759         fi
14760         ;;
14761 esac
14762
14763 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
14764         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
14765 elif test "$MANPAGE_RENAMES" = no ; then
14766         :
14767 elif test ! -f "$MANPAGE_RENAMES" ; then
14768         { { echo "$as_me:14768: error: not a filename: $MANPAGE_RENAMES" >&5
14769 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14770    { (exit 1); exit 1; }; }
14771 fi
14772
14773 echo "$as_me:14773: result: $MANPAGE_RENAMES" >&5
14774 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14775
14776 echo "$as_me:14776: checking if manpage aliases will be installed" >&5
14777 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14778
14779 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14780 if test "${with_manpage_aliases+set}" = set; then
14781   withval="$with_manpage_aliases"
14782   MANPAGE_ALIASES=$withval
14783 else
14784   MANPAGE_ALIASES=yes
14785 fi;
14786
14787 echo "$as_me:14787: result: $MANPAGE_ALIASES" >&5
14788 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14789
14790 case "x$LN_S" in
14791 (xln*)
14792         cf_use_symlinks=yes
14793         ;;
14794 (*)
14795         cf_use_symlinks=no
14796         ;;
14797 esac
14798
14799 MANPAGE_SYMLINKS=no
14800 if test "$MANPAGE_ALIASES" = yes ; then
14801 echo "$as_me:14801: checking if manpage symlinks should be used" >&5
14802 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14803
14804 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14805 if test "${with_manpage_symlinks+set}" = set; then
14806   withval="$with_manpage_symlinks"
14807   MANPAGE_SYMLINKS=$withval
14808 else
14809   MANPAGE_SYMLINKS=$cf_use_symlinks
14810 fi;
14811
14812 if test "$$cf_use_symlinks" = no; then
14813 if test "$MANPAGE_SYMLINKS" = yes ; then
14814         { echo "$as_me:14814: WARNING: cannot make symlinks" >&5
14815 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14816         MANPAGE_SYMLINKS=no
14817 fi
14818 fi
14819
14820 echo "$as_me:14820: result: $MANPAGE_SYMLINKS" >&5
14821 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14822 fi
14823
14824 echo "$as_me:14824: checking for manpage tbl" >&5
14825 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14826
14827 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14828 if test "${with_manpage_tbl+set}" = set; then
14829   withval="$with_manpage_tbl"
14830   MANPAGE_TBL=$withval
14831 else
14832   MANPAGE_TBL=no
14833 fi;
14834
14835 echo "$as_me:14835: result: $MANPAGE_TBL" >&5
14836 echo "${ECHO_T}$MANPAGE_TBL" >&6
14837
14838 if test "$prefix" = "NONE" ; then
14839         cf_prefix="$ac_default_prefix"
14840 else
14841         cf_prefix="$prefix"
14842 fi
14843
14844 case "$MANPAGE_FORMAT" in
14845 (*catonly*)
14846         cf_format=yes
14847         cf_inboth=no
14848         ;;
14849 (*formatted*)
14850         cf_format=yes
14851         cf_inboth=yes
14852         ;;
14853 (*)
14854         cf_format=no
14855         cf_inboth=no
14856         ;;
14857 esac
14858
14859 test ! -d man && mkdir man
14860
14861 cf_so_strip=
14862 cf_compress=
14863 case "$MANPAGE_FORMAT" in
14864 (*compress*)
14865         cf_so_strip="Z"
14866         cf_compress=compress
14867         ;;
14868 (*gzip*)
14869         cf_so_strip="gz"
14870         cf_compress=gzip
14871         ;;
14872 esac
14873
14874 cf_edit_man=./edit_man.sh
14875 cf_man_alias=`pwd`/man_alias.sed
14876
14877 cat >$cf_edit_man <<CF_EOF
14878 #! $SHELL
14879 # this script is generated by the configure-script CF_MAN_PAGES macro.
14880
14881 prefix="$cf_prefix"
14882 datarootdir="$datarootdir"
14883 datadir="$datadir"
14884
14885 NCURSES_MAJOR="$NCURSES_MAJOR"
14886 NCURSES_MINOR="$NCURSES_MINOR"
14887 NCURSES_PATCH="$NCURSES_PATCH"
14888
14889 NCURSES_OSPEED="$NCURSES_OSPEED"
14890 TERMINFO="$TERMINFO"
14891
14892 INSTALL="$INSTALL"
14893 INSTALL_DATA="$INSTALL_DATA"
14894
14895 transform="$program_transform_name"
14896
14897 TMP=\${TMPDIR:=/tmp}/man\$\$
14898 trap "rm -f \$TMP; exit 1" 1 2 3 15
14899 trap "rm -f \$TMP" 0
14900
14901 form=\$1
14902 shift || exit 1
14903
14904 verb=\$1
14905 shift || exit 1
14906
14907 mandir=\$1
14908 shift || exit 1
14909
14910 srcdir=\$1
14911 top_srcdir=\$srcdir/..
14912 shift || exit 1
14913
14914 if test "\$form" = normal ; then
14915         if test "$cf_format" = yes ; then
14916         if test "$cf_inboth" = no ; then
14917                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14918                 exit $?
14919         fi
14920         fi
14921         cf_subdir=\$mandir/man
14922         cf_tables=$MANPAGE_TBL
14923 else
14924         cf_subdir=\$mandir/cat
14925         cf_tables=yes
14926 fi
14927
14928 # process the list of source-files
14929 for i in "\$@" ; do
14930 case \$i in
14931 (*.orig|*.rej) ;;
14932 (*.[0-9]*)
14933         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14934         if test "\$verb" = installing ; then
14935         if test ! -d "\$cf_subdir\${section}" ; then
14936                 mkdir -p "\$cf_subdir\$section"
14937         fi
14938         fi
14939
14940         # replace variables in man page
14941         if test ! -f "$cf_man_alias" ; then
14942 cat >>$cf_man_alias <<-CF_EOF2
14943                 s,@DATADIR@,\$datadir,g
14944                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14945                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14946                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14947                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14948                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14949                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14950 CF_EOF
14951
14952         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14953         do
14954                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14955                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14956 cat >>$cf_edit_man <<-CF_EOF
14957                 s,@$cf_NAME@,$cf_name,g
14958 CF_EOF
14959         done
14960
14961 cat >>$cf_edit_man <<CF_EOF
14962 CF_EOF2
14963                 echo "...made $cf_man_alias"
14964         fi
14965
14966         aliases=
14967         cf_source=\`basename "\$i"\`
14968         inalias=\$cf_source
14969         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14970         if test ! -f "\$inalias" ; then
14971                 echo ".. skipped \$cf_source"
14972                 continue
14973         fi
14974 CF_EOF
14975
14976 if test "$MANPAGE_ALIASES" != no ; then
14977 cat >>$cf_edit_man <<CF_EOF
14978         nCurses=ignore.3x
14979         test "$with_curses_h" = yes && nCurses=ncurses.3x
14980         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14981 CF_EOF
14982 fi
14983
14984 if test "$MANPAGE_RENAMES" = no ; then
14985 cat >>$cf_edit_man <<CF_EOF
14986         # perform program transformations for section 1 man pages
14987         if test \$section = 1 ; then
14988                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14989         else
14990                 cf_target=\$cf_subdir\${section}/\$cf_source
14991         fi
14992 CF_EOF
14993 else
14994 cat >>$cf_edit_man <<CF_EOF
14995         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14996         if test -z "\$cf_target" ; then
14997                 echo "? missing rename for \$cf_source"
14998                 cf_target="\$cf_source"
14999         fi
15000         cf_target="\$cf_subdir\${section}/\${cf_target}"
15001
15002 CF_EOF
15003 fi
15004
15005 cat >>$cf_edit_man <<CF_EOF
15006         sed     -f "$cf_man_alias" \\
15007 CF_EOF
15008
15009 if test "$MANPAGE_RENAMES" != no ; then
15010 cat >>$cf_edit_man <<CF_EOF
15011                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15012 CF_EOF
15013 else
15014 cat >>$cf_edit_man <<CF_EOF
15015                 < "\$i" >\$TMP
15016 CF_EOF
15017 fi
15018
15019 cat >>$cf_edit_man <<CF_EOF
15020 if test \$cf_tables = yes ; then
15021         tbl \$TMP >\$TMP.out
15022         mv \$TMP.out \$TMP
15023 fi
15024 CF_EOF
15025
15026 if test "$with_overwrite" != yes ; then
15027 cat >>$cf_edit_man <<CF_EOF
15028         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15029         mv \$TMP.out \$TMP
15030 CF_EOF
15031 fi
15032
15033 if test "$with_curses_h" != yes ; then
15034 cat >>$cf_edit_man <<CF_EOF
15035         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15036         mv \$TMP.out \$TMP
15037 CF_EOF
15038 fi
15039
15040 cat >>$cf_edit_man <<CF_EOF
15041         if test "\$form" = format ; then
15042                 nroff -man \$TMP >\$TMP.out
15043                 mv \$TMP.out \$TMP
15044         fi
15045 CF_EOF
15046
15047 if test -n "$cf_compress" ; then
15048 cat >>$cf_edit_man <<CF_EOF
15049         if test "\$verb" = installing ; then
15050         if ( "$cf_compress" -f \$TMP )
15051         then
15052                 mv \$TMP.$cf_so_strip \$TMP
15053         fi
15054         fi
15055         cf_target="\$cf_target.$cf_so_strip"
15056 CF_EOF
15057 fi
15058
15059 case "$MANPAGE_FORMAT" in
15060 (*BSDI*)
15061 cat >>$cf_edit_man <<CF_EOF
15062         if test "\$form" = format ; then
15063                 # BSDI installs only .0 suffixes in the cat directories
15064                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15065         fi
15066 CF_EOF
15067   ;;
15068 esac
15069
15070 cat >>$cf_edit_man <<CF_EOF
15071         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15072         if test "\$verb" = installing ; then
15073                 echo "\$verb \$cf_target"
15074                 \$INSTALL_DATA \$TMP "\$cf_target"
15075                 test -d "\$cf_subdir\${section}" &&
15076                 test -n "\$aliases" && (
15077                         cd "\$cf_subdir\${section}" && (
15078                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15079                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
15080                                 cf_target=\`basename "\$cf_target"\`
15081                                 for cf_alias in \$aliases
15082                                 do
15083                                         if test "\$section" = 1 ; then
15084                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15085                                         fi
15086
15087                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15088                                                 if test -f "\$cf_alias\${suffix}" ; then
15089                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15090                                                         then
15091                                                                 continue
15092                                                         fi
15093                                                 fi
15094                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15095 CF_EOF
15096 case "x$LN_S" in
15097 (*-f)
15098 cat >>$cf_edit_man <<CF_EOF
15099                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15100 CF_EOF
15101         ;;
15102 (*)
15103 cat >>$cf_edit_man <<CF_EOF
15104                                                 rm -f "\$cf_alias\${suffix}"
15105                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15106 CF_EOF
15107         ;;
15108 esac
15109 cat >>$cf_edit_man <<CF_EOF
15110                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15111                                                 echo ".so \$cf_source" >\$TMP
15112 CF_EOF
15113 if test -n "$cf_compress" ; then
15114 cat >>$cf_edit_man <<CF_EOF
15115                                                 if test -n "$cf_so_strip" ; then
15116                                                         "$cf_compress" -f \$TMP
15117                                                         mv \$TMP.$cf_so_strip \$TMP
15118                                                 fi
15119 CF_EOF
15120 fi
15121 cat >>$cf_edit_man <<CF_EOF
15122                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15123                                                 rm -f "\$cf_alias\${suffix}"
15124                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15125                                         fi
15126                                 done
15127                         )
15128                 )
15129         elif test "\$verb" = removing ; then
15130                 test -f "\$cf_target" && (
15131                         echo "\$verb \$cf_target"
15132                         rm -f "\$cf_target"
15133                 )
15134                 test -d "\$cf_subdir\${section}" &&
15135                 test -n "\$aliases" && (
15136                         cd "\$cf_subdir\${section}" && (
15137                                 for cf_alias in \$aliases
15138                                 do
15139                                         if test "\$section" = 1 ; then
15140                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15141                                         fi
15142
15143                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15144                                         rm -f "\$cf_alias\${suffix}"
15145                                 done
15146                         )
15147                 )
15148         else
15149 #               echo ".hy 0"
15150                 cat \$TMP
15151         fi
15152         ;;
15153 esac
15154 done
15155
15156 if test "$cf_inboth" = yes ; then
15157 if test "\$form" != format ; then
15158         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15159 fi
15160 fi
15161
15162 exit 0
15163 CF_EOF
15164 chmod 755 "$cf_edit_man"
15165
15166 ###############################################################################
15167
15168 ### Note that some functions (such as const) are normally disabled anyway.
15169 echo "$as_me:15169: checking if you want to build with function extensions" >&5
15170 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15171
15172 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15173 if test "${enable_ext_funcs+set}" = set; then
15174   enableval="$enable_ext_funcs"
15175   with_ext_funcs=$enableval
15176 else
15177   with_ext_funcs=yes
15178 fi;
15179 echo "$as_me:15179: result: $with_ext_funcs" >&5
15180 echo "${ECHO_T}$with_ext_funcs" >&6
15181 if test "x$with_ext_funcs" = xyes ; then
15182         NCURSES_EXT_FUNCS=1
15183
15184 cat >>confdefs.h <<\EOF
15185 #define NCURSES_EXT_FUNCS 1
15186 EOF
15187
15188 cat >>confdefs.h <<\EOF
15189 #define HAVE_ASSUME_DEFAULT_COLORS 1
15190 EOF
15191
15192 cat >>confdefs.h <<\EOF
15193 #define HAVE_CURSES_VERSION 1
15194 EOF
15195
15196 cat >>confdefs.h <<\EOF
15197 #define HAVE_HAS_KEY 1
15198 EOF
15199
15200 cat >>confdefs.h <<\EOF
15201 #define HAVE_RESIZETERM 1
15202 EOF
15203
15204 cat >>confdefs.h <<\EOF
15205 #define HAVE_RESIZE_TERM 1
15206 EOF
15207
15208 cat >>confdefs.h <<\EOF
15209 #define HAVE_TERM_ENTRY_H 1
15210 EOF
15211
15212 cat >>confdefs.h <<\EOF
15213 #define HAVE_USE_DEFAULT_COLORS 1
15214 EOF
15215
15216 cat >>confdefs.h <<\EOF
15217 #define HAVE_USE_EXTENDED_NAMES 1
15218 EOF
15219
15220 cat >>confdefs.h <<\EOF
15221 #define HAVE_USE_SCREEN 1
15222 EOF
15223
15224 cat >>confdefs.h <<\EOF
15225 #define HAVE_USE_WINDOW 1
15226 EOF
15227
15228 cat >>confdefs.h <<\EOF
15229 #define HAVE_WRESIZE 1
15230 EOF
15231
15232         GENERATED_EXT_FUNCS=generated
15233         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15234 else
15235         NCURSES_EXT_FUNCS=0
15236         GENERATED_EXT_FUNCS=
15237 fi
15238
15239 echo "$as_me:15239: checking if you want to build with SCREEN extensions" >&5
15240 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15241
15242 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15243 if test "${enable_sp_funcs+set}" = set; then
15244   enableval="$enable_sp_funcs"
15245   with_sp_funcs=$enableval
15246 else
15247   with_sp_funcs=$cf_dft_ext_spfuncs
15248 fi;
15249 echo "$as_me:15249: result: $with_sp_funcs" >&5
15250 echo "${ECHO_T}$with_sp_funcs" >&6
15251 if test "x$with_sp_funcs" = xyes ; then
15252         NCURSES_SP_FUNCS=1
15253
15254 cat >>confdefs.h <<\EOF
15255 #define NCURSES_SP_FUNCS 1
15256 EOF
15257
15258 cat >>confdefs.h <<\EOF
15259 #define HAVE_TPUTS_SP 1
15260 EOF
15261
15262         GENERATED_SP_FUNCS=generated
15263 else
15264         NCURSES_SP_FUNCS=0
15265         GENERATED_SP_FUNCS=
15266 fi
15267
15268 echo "$as_me:15268: checking if you want to build with terminal-driver" >&5
15269 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15270
15271 # Check whether --enable-term-driver or --disable-term-driver was given.
15272 if test "${enable_term_driver+set}" = set; then
15273   enableval="$enable_term_driver"
15274   with_term_driver=$enableval
15275 else
15276   with_term_driver=no
15277 fi;
15278 echo "$as_me:15278: result: $with_term_driver" >&5
15279 echo "${ECHO_T}$with_term_driver" >&6
15280 if test "x$with_term_driver" = xyes ; then
15281
15282 cat >>confdefs.h <<\EOF
15283 #define USE_TERM_DRIVER 1
15284 EOF
15285
15286         if test "x$with_termlib" != xno ; then
15287                 { { echo "$as_me:15287: error: The term-driver option conflicts with the termlib option" >&5
15288 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15289    { (exit 1); exit 1; }; }
15290         fi
15291         if test "x$with_sp_funcs" != xyes ; then
15292                 { { echo "$as_me:15292: error: The term-driver option relies upon sp-funcs" >&5
15293 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15294    { (exit 1); exit 1; }; }
15295         fi
15296 fi
15297
15298 ###   use option --enable-const to turn on use of const beyond that in XSI.
15299 echo "$as_me:15299: checking for extended use of const keyword" >&5
15300 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15301
15302 # Check whether --enable-const or --disable-const was given.
15303 if test "${enable_const+set}" = set; then
15304   enableval="$enable_const"
15305   with_ext_const=$enableval
15306 else
15307   with_ext_const=$cf_dft_ext_const
15308 fi;
15309 echo "$as_me:15309: result: $with_ext_const" >&5
15310 echo "${ECHO_T}$with_ext_const" >&6
15311 NCURSES_CONST='/*nothing*/'
15312 if test "x$with_ext_const" = xyes ; then
15313         NCURSES_CONST=const
15314 fi
15315
15316 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15317 echo "$as_me:15317: checking if you want to use extended colors" >&5
15318 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15319
15320 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15321 if test "${enable_ext_colors+set}" = set; then
15322   enableval="$enable_ext_colors"
15323   with_ext_colors=$enableval
15324 else
15325   with_ext_colors=$cf_dft_ext_colors
15326 fi;
15327 echo "$as_me:15327: result: $with_ext_colors" >&5
15328 echo "${ECHO_T}$with_ext_colors" >&6
15329 NCURSES_EXT_COLORS=0
15330 if test "x$with_ext_colors" = xyes ; then
15331         if test "x$with_widec" != xyes ; then
15332                 { echo "$as_me:15332: WARNING: This option applies only to wide-character library" >&5
15333 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15334         else
15335                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15336
15337 if test "${with_abi_version+set}" != set; then
15338         case "$cf_cv_rel_version" in
15339         (5.*)
15340                 cf_cv_rel_version=6.0
15341                 cf_cv_abi_version=6
15342                 { echo "$as_me:15342: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15343 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15344                 ;;
15345         esac
15346 fi
15347
15348                 NCURSES_EXT_COLORS=1
15349
15350 cat >>confdefs.h <<\EOF
15351 #define NCURSES_EXT_COLORS 1
15352 EOF
15353
15354 cat >>confdefs.h <<\EOF
15355 #define HAVE_ALLOC_PAIR 1
15356 EOF
15357
15358 cat >>confdefs.h <<\EOF
15359 #define HAVE_INIT_EXTENDED_COLOR 1
15360 EOF
15361
15362 cat >>confdefs.h <<\EOF
15363 #define HAVE_RESET_COLOR_PAIRS 1
15364 EOF
15365
15366         fi
15367 fi
15368
15369 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15370 echo "$as_me:15370: checking if you want to use extended mouse encoding" >&5
15371 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15372
15373 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15374 if test "${enable_ext_mouse+set}" = set; then
15375   enableval="$enable_ext_mouse"
15376   with_ext_mouse=$enableval
15377 else
15378   with_ext_mouse=$cf_dft_ext_mouse
15379 fi;
15380 echo "$as_me:15380: result: $with_ext_mouse" >&5
15381 echo "${ECHO_T}$with_ext_mouse" >&6
15382 if test "x$with_ext_mouse" = xyes ; then
15383
15384 if test "${with_abi_version+set}" != set; then
15385         case "$cf_cv_rel_version" in
15386         (5.*)
15387                 cf_cv_rel_version=6.0
15388                 cf_cv_abi_version=6
15389                 { echo "$as_me:15389: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15390 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15391                 ;;
15392         esac
15393 fi
15394
15395 fi
15396
15397 case $cf_cv_abi_version in
15398 (5)
15399         NCURSES_MOUSE_VERSION=1
15400         ;;
15401 (6)
15402         NCURSES_MOUSE_VERSION=2
15403         ;;
15404 ([789])
15405         NCURSES_MOUSE_VERSION=3
15406         ;;
15407 esac
15408
15409 ###   use option --enable-ext-putwin to turn on extended screendumps
15410 echo "$as_me:15410: checking if you want to use extended putwin/screendump" >&5
15411 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15412
15413 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15414 if test "${enable_ext_putwin+set}" = set; then
15415   enableval="$enable_ext_putwin"
15416   with_ext_putwin=$enableval
15417 else
15418   with_ext_putwin=$cf_dft_ext_putwin
15419 fi;
15420 echo "$as_me:15420: result: $with_ext_putwin" >&5
15421 echo "${ECHO_T}$with_ext_putwin" >&6
15422 if test "x$with_ext_putwin" = xyes ; then
15423
15424 cat >>confdefs.h <<\EOF
15425 #define NCURSES_EXT_PUTWIN 1
15426 EOF
15427
15428 fi
15429
15430 echo "$as_me:15430: checking if you want \$NCURSES_NO_PADDING code" >&5
15431 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15432
15433 # Check whether --enable-no-padding or --disable-no-padding was given.
15434 if test "${enable_no_padding+set}" = set; then
15435   enableval="$enable_no_padding"
15436   with_no_padding=$enableval
15437 else
15438   with_no_padding=$with_ext_funcs
15439 fi;
15440 echo "$as_me:15440: result: $with_no_padding" >&5
15441 echo "${ECHO_T}$with_no_padding" >&6
15442 test "x$with_no_padding" = xyes &&
15443 cat >>confdefs.h <<\EOF
15444 #define NCURSES_NO_PADDING 1
15445 EOF
15446
15447 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15448 echo "$as_me:15448: checking if you want SIGWINCH handler" >&5
15449 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15450
15451 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15452 if test "${enable_sigwinch+set}" = set; then
15453   enableval="$enable_sigwinch"
15454   with_sigwinch=$enableval
15455 else
15456   with_sigwinch=$with_ext_funcs
15457 fi;
15458 echo "$as_me:15458: result: $with_sigwinch" >&5
15459 echo "${ECHO_T}$with_sigwinch" >&6
15460 test "x$with_sigwinch" = xyes &&
15461 cat >>confdefs.h <<\EOF
15462 #define USE_SIGWINCH 1
15463 EOF
15464
15465 ###   use option --enable-tcap-names to allow user to define new capabilities
15466 echo "$as_me:15466: checking if you want user-definable terminal capabilities like termcap" >&5
15467 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15468
15469 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15470 if test "${enable_tcap_names+set}" = set; then
15471   enableval="$enable_tcap_names"
15472   with_tcap_names=$enableval
15473 else
15474   with_tcap_names=$with_ext_funcs
15475 fi;
15476 echo "$as_me:15476: result: $with_tcap_names" >&5
15477 echo "${ECHO_T}$with_tcap_names" >&6
15478 NCURSES_XNAMES=0
15479 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15480
15481 ##############################################################################
15482
15483 echo "$as_me:15483: checking if you want to link with the pthread library" >&5
15484 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15485
15486 # Check whether --with-pthread or --without-pthread was given.
15487 if test "${with_pthread+set}" = set; then
15488   withval="$with_pthread"
15489   with_pthread=$withval
15490 else
15491   with_pthread=no
15492 fi;
15493 echo "$as_me:15493: result: $with_pthread" >&5
15494 echo "${ECHO_T}$with_pthread" >&6
15495
15496 if test "$with_pthread" != no ; then
15497         echo "$as_me:15497: checking for pthread.h" >&5
15498 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15499 if test "${ac_cv_header_pthread_h+set}" = set; then
15500   echo $ECHO_N "(cached) $ECHO_C" >&6
15501 else
15502   cat >"conftest.$ac_ext" <<_ACEOF
15503 #line 15503 "configure"
15504 #include "confdefs.h"
15505 #include <pthread.h>
15506 _ACEOF
15507 if { (eval echo "$as_me:15507: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15508   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15509   ac_status=$?
15510   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15511   rm -f conftest.er1
15512   cat conftest.err >&5
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit "$ac_status"); } >/dev/null; then
15515   if test -s conftest.err; then
15516     ac_cpp_err=$ac_c_preproc_warn_flag
15517   else
15518     ac_cpp_err=
15519   fi
15520 else
15521   ac_cpp_err=yes
15522 fi
15523 if test -z "$ac_cpp_err"; then
15524   ac_cv_header_pthread_h=yes
15525 else
15526   echo "$as_me: failed program was:" >&5
15527   cat "conftest.$ac_ext" >&5
15528   ac_cv_header_pthread_h=no
15529 fi
15530 rm -f conftest.err "conftest.$ac_ext"
15531 fi
15532 echo "$as_me:15532: result: $ac_cv_header_pthread_h" >&5
15533 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15534 if test "$ac_cv_header_pthread_h" = yes; then
15535
15536 cat >>confdefs.h <<\EOF
15537 #define HAVE_PTHREADS_H 1
15538 EOF
15539
15540         for cf_lib_pthread in pthread c_r
15541         do
15542             echo "$as_me:15542: checking if we can link with the $cf_lib_pthread library" >&5
15543 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15544             cf_save_LIBS="$LIBS"
15545
15546 cf_add_libs="$LIBS"
15547 # reverse order
15548 cf_add_0lib=
15549 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15550 # filter duplicates
15551 for cf_add_1lib in $cf_add_0lib; do
15552         for cf_add_2lib in $cf_add_libs; do
15553                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15554                         cf_add_1lib=
15555                         break
15556                 fi
15557         done
15558         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15559 done
15560 LIBS="$cf_add_libs"
15561
15562             cat >"conftest.$ac_ext" <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565
15566 #include <pthread.h>
15567
15568 int
15569 main (void)
15570 {
15571
15572                 int rc = pthread_create(0,0,0,0);
15573                 int r2 = pthread_mutexattr_settype(0, 0);
15574
15575   ;
15576   return 0;
15577 }
15578 _ACEOF
15579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15580 if { (eval echo "$as_me:15580: \"$ac_link\"") >&5
15581   (eval $ac_link) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit "$ac_status"); } &&
15585          { ac_try='test -s "conftest$ac_exeext"'
15586   { (eval echo "$as_me:15586: \"$ac_try\"") >&5
15587   (eval $ac_try) 2>&5
15588   ac_status=$?
15589   echo "$as_me:15589: \$? = $ac_status" >&5
15590   (exit "$ac_status"); }; }; then
15591   with_pthread=yes
15592 else
15593   echo "$as_me: failed program was:" >&5
15594 cat "conftest.$ac_ext" >&5
15595 with_pthread=no
15596 fi
15597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15598             LIBS="$cf_save_LIBS"
15599             echo "$as_me:15599: result: $with_pthread" >&5
15600 echo "${ECHO_T}$with_pthread" >&6
15601             test "$with_pthread" = yes && break
15602         done
15603
15604         if test "$with_pthread" = yes ; then
15605
15606 cf_add_libs="$LIBS"
15607 # reverse order
15608 cf_add_0lib=
15609 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15610 # filter duplicates
15611 for cf_add_1lib in $cf_add_0lib; do
15612         for cf_add_2lib in $cf_add_libs; do
15613                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15614                         cf_add_1lib=
15615                         break
15616                 fi
15617         done
15618         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15619 done
15620 LIBS="$cf_add_libs"
15621
15622 cat >>confdefs.h <<\EOF
15623 #define HAVE_LIBPTHREADS 1
15624 EOF
15625
15626         else
15627             { { echo "$as_me:15627: error: Cannot link with pthread library" >&5
15628 echo "$as_me: error: Cannot link with pthread library" >&2;}
15629    { (exit 1); exit 1; }; }
15630         fi
15631
15632 fi
15633
15634 fi
15635
15636 if test "x$with_pthread" != xno; then
15637         echo "$as_me:15637: checking for pthread_kill" >&5
15638 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15639 if test "${ac_cv_func_pthread_kill+set}" = set; then
15640   echo $ECHO_N "(cached) $ECHO_C" >&6
15641 else
15642   cat >"conftest.$ac_ext" <<_ACEOF
15643 #line 15643 "configure"
15644 #include "confdefs.h"
15645 #define pthread_kill autoconf_temporary
15646 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15647 #undef pthread_kill
15648
15649 #ifdef __cplusplus
15650 extern "C"
15651 #endif
15652
15653 /* We use char because int might match the return type of a gcc2
15654    builtin and then its argument prototype would still apply.  */
15655 char pthread_kill (void);
15656
15657 int
15658 main (void)
15659 {
15660
15661 /* The GNU C library defines stubs for functions which it implements
15662     to always fail with ENOSYS.  Some functions are actually named
15663     something starting with __ and the normal name is an alias.  */
15664 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15665 #error found stub for pthread_kill
15666 #endif
15667
15668         return pthread_kill ();
15669   ;
15670   return 0;
15671 }
15672 _ACEOF
15673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15674 if { (eval echo "$as_me:15674: \"$ac_link\"") >&5
15675   (eval $ac_link) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit "$ac_status"); } &&
15679          { ac_try='test -s "conftest$ac_exeext"'
15680   { (eval echo "$as_me:15680: \"$ac_try\"") >&5
15681   (eval $ac_try) 2>&5
15682   ac_status=$?
15683   echo "$as_me:15683: \$? = $ac_status" >&5
15684   (exit "$ac_status"); }; }; then
15685   ac_cv_func_pthread_kill=yes
15686 else
15687   echo "$as_me: failed program was:" >&5
15688 cat "conftest.$ac_ext" >&5
15689 ac_cv_func_pthread_kill=no
15690 fi
15691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15692 fi
15693 echo "$as_me:15693: result: $ac_cv_func_pthread_kill" >&5
15694 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15695 if test "$ac_cv_func_pthread_kill" = yes; then
15696
15697                 echo "$as_me:15697: checking if you want to allow EINTR in wgetch with pthreads" >&5
15698 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15699
15700 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15701 if test "${enable_pthreads_eintr+set}" = set; then
15702   enableval="$enable_pthreads_eintr"
15703   use_pthreads_eintr=$enableval
15704 else
15705   use_pthreads_eintr=no
15706 fi;
15707                 echo "$as_me:15707: result: $use_pthreads_eintr" >&5
15708 echo "${ECHO_T}$use_pthreads_eintr" >&6
15709                 if test "x$use_pthreads_eintr" = xyes ; then
15710
15711 cat >>confdefs.h <<\EOF
15712 #define USE_PTHREADS_EINTR 1
15713 EOF
15714
15715                 fi
15716 fi
15717
15718         echo "$as_me:15718: checking if you want to use weak-symbols for pthreads" >&5
15719 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15720
15721 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15722 if test "${enable_weak_symbols+set}" = set; then
15723   enableval="$enable_weak_symbols"
15724   use_weak_symbols=$enableval
15725 else
15726   use_weak_symbols=no
15727 fi;
15728         echo "$as_me:15728: result: $use_weak_symbols" >&5
15729 echo "${ECHO_T}$use_weak_symbols" >&6
15730         if test "x$use_weak_symbols" = xyes ; then
15731
15732 echo "$as_me:15732: checking if $CC supports weak symbols" >&5
15733 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15734 if test "${cf_cv_weak_symbols+set}" = set; then
15735   echo $ECHO_N "(cached) $ECHO_C" >&6
15736 else
15737
15738 cat >"conftest.$ac_ext" <<_ACEOF
15739 #line 15739 "configure"
15740 #include "confdefs.h"
15741
15742 #include <stdio.h>
15743 int
15744 main (void)
15745 {
15746
15747 #if defined(__GNUC__)
15748 #  if defined __USE_ISOC99
15749 #    define _cat_pragma(exp)    _Pragma(#exp)
15750 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15751 #  else
15752 #    define _weak_pragma(exp)
15753 #  endif
15754 #  define _declare(name)        __extension__ extern __typeof__(name) name
15755 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15756 #endif
15757
15758 weak_symbol(fopen);
15759
15760   ;
15761   return 0;
15762 }
15763 _ACEOF
15764 rm -f "conftest.$ac_objext"
15765 if { (eval echo "$as_me:15765: \"$ac_compile\"") >&5
15766   (eval $ac_compile) 2>&5
15767   ac_status=$?
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit "$ac_status"); } &&
15770          { ac_try='test -s "conftest.$ac_objext"'
15771   { (eval echo "$as_me:15771: \"$ac_try\"") >&5
15772   (eval $ac_try) 2>&5
15773   ac_status=$?
15774   echo "$as_me:15774: \$? = $ac_status" >&5
15775   (exit "$ac_status"); }; }; then
15776   cf_cv_weak_symbols=yes
15777 else
15778   echo "$as_me: failed program was:" >&5
15779 cat "conftest.$ac_ext" >&5
15780 cf_cv_weak_symbols=no
15781 fi
15782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15783
15784 fi
15785 echo "$as_me:15785: result: $cf_cv_weak_symbols" >&5
15786 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15787
15788         else
15789                 cf_cv_weak_symbols=no
15790         fi
15791
15792         if test "x$cf_cv_weak_symbols" = xyes ; then
15793
15794 cat >>confdefs.h <<\EOF
15795 #define USE_WEAK_SYMBOLS 1
15796 EOF
15797
15798         fi
15799 fi
15800
15801 PTHREAD=
15802 if test "x$with_pthread" = "xyes" ; then
15803
15804 cat >>confdefs.h <<\EOF
15805 #define USE_PTHREADS 1
15806 EOF
15807
15808         enable_reentrant=yes
15809         if test "x$cf_cv_weak_symbols" = xyes ; then
15810                 PTHREAD=-lpthread
15811
15812 cf_add_libs="$PRIVATE_LIBS"
15813 # reverse order
15814 cf_add_0lib=
15815 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15816 # filter duplicates
15817 for cf_add_1lib in $cf_add_0lib; do
15818         for cf_add_2lib in $cf_add_libs; do
15819                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15820                         cf_add_1lib=
15821                         break
15822                 fi
15823         done
15824         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15825 done
15826 PRIVATE_LIBS="$cf_add_libs"
15827
15828         fi
15829 fi
15830
15831 # Reentrant code has to be opaque; there's little advantage to making ncurses
15832 # opaque outside of that, so there is no --enable-opaque option.  We can use
15833 # this option without --with-pthreads, but this will be always set for
15834 # pthreads.
15835 echo "$as_me:15835: checking if you want reentrant code" >&5
15836 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15837
15838 # Check whether --enable-reentrant or --disable-reentrant was given.
15839 if test "${enable_reentrant+set}" = set; then
15840   enableval="$enable_reentrant"
15841   with_reentrant=$enableval
15842 else
15843   with_reentrant=no
15844 fi;
15845 echo "$as_me:15845: result: $with_reentrant" >&5
15846 echo "${ECHO_T}$with_reentrant" >&6
15847 if test "x$with_reentrant" = xyes ; then
15848         cf_cv_enable_reentrant=1
15849         cf_cv_enable_opaque="NCURSES_INTERNALS"
15850         NCURSES_SIZE_T=int
15851         if test "x$cf_cv_weak_symbols" = xyes ; then
15852
15853 # remove pthread library from $LIBS
15854 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15855
15856 cf_add_libs="$TEST_LIBS"
15857 # reverse order
15858 cf_add_0lib=
15859 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15860 # filter duplicates
15861 for cf_add_1lib in $cf_add_0lib; do
15862         for cf_add_2lib in $cf_add_libs; do
15863                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15864                         cf_add_1lib=
15865                         break
15866                 fi
15867         done
15868         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15869 done
15870 TEST_LIBS="$cf_add_libs"
15871
15872 cf_add_libs="$TEST_LIBS2"
15873 # reverse order
15874 cf_add_0lib=
15875 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15876 # filter duplicates
15877 for cf_add_1lib in $cf_add_0lib; do
15878         for cf_add_2lib in $cf_add_libs; do
15879                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15880                         cf_add_1lib=
15881                         break
15882                 fi
15883         done
15884         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15885 done
15886 TEST_LIBS2="$cf_add_libs"
15887
15888 cf_add_libs="$PRIVATE_LIBS"
15889 # reverse order
15890 cf_add_0lib=
15891 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15892 # filter duplicates
15893 for cf_add_1lib in $cf_add_0lib; do
15894         for cf_add_2lib in $cf_add_libs; do
15895                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15896                         cf_add_1lib=
15897                         break
15898                 fi
15899         done
15900         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15901 done
15902 PRIVATE_LIBS="$cf_add_libs"
15903
15904         else
15905                 # when not using weak symbols but with_reentrant,
15906                 # add 't' to the library suffix on all platforms
15907                 # except cygwin, where we only do that if ALSO
15908                 # compiling with full thread support.
15909                 case "$host" in
15910                 (*cygwin* | *msys*)
15911                         if test "$with_pthread" = "yes" ; then
15912                                 if test "x$disable_lib_suffixes" = "xno" ; then
15913                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15914                                 fi
15915                         fi ;;
15916                 (*)
15917                         if test "x$disable_lib_suffixes" = "xno" ; then
15918                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15919                         fi
15920                         ;;
15921                 esac
15922         fi
15923
15924 cat >>confdefs.h <<\EOF
15925 #define USE_REENTRANT 1
15926 EOF
15927
15928 if test "${with_abi_version+set}" != set; then
15929         case "$cf_cv_rel_version" in
15930         (5.*)
15931                 cf_cv_rel_version=6.0
15932                 cf_cv_abi_version=6
15933                 { echo "$as_me:15933: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15934 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15935                 ;;
15936         esac
15937 fi
15938
15939 else
15940         cf_cv_enable_reentrant=0
15941         cf_cv_enable_opaque="NCURSES_OPAQUE"
15942         NCURSES_SIZE_T=$cf_dft_ordinate_type
15943 fi
15944
15945 echo "$as_me:15945: checking if you want opaque curses-library structures" >&5
15946 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15947
15948 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15949 if test "${enable_opaque_curses+set}" = set; then
15950   enableval="$enable_opaque_curses"
15951   test "$enableval" != yes && enableval=no
15952         if test "$enableval" != "no" ; then
15953     enable_opaque_curses=yes
15954         else
15955
15956          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15957          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15958
15959         fi
15960 else
15961   enableval=no
15962
15963          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15964          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15965
15966 fi;
15967 echo "$as_me:15967: result: $enable_opaque_curses" >&5
15968 echo "${ECHO_T}$enable_opaque_curses" >&6
15969
15970 test "$cf_cv_enable_reentrant" = 1 && \
15971 test "$enable_opaque_curses" = no && \
15972 { { echo "$as_me:15972: error: reentrant configuration requires opaque library" >&5
15973 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15974    { (exit 1); exit 1; }; }
15975
15976 echo "$as_me:15976: checking if you want opaque form-library structures" >&5
15977 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15978
15979 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15980 if test "${enable_opaque_form+set}" = set; then
15981   enableval="$enable_opaque_form"
15982   enable_opaque_form=yes
15983 else
15984   enable_opaque_form=no
15985 fi;
15986 echo "$as_me:15986: result: $enable_opaque_form" >&5
15987 echo "${ECHO_T}$enable_opaque_form" >&6
15988
15989 echo "$as_me:15989: checking if you want opaque menu-library structures" >&5
15990 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15991
15992 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15993 if test "${enable_opaque_menu+set}" = set; then
15994   enableval="$enable_opaque_menu"
15995   enable_opaque_menu=yes
15996 else
15997   enable_opaque_menu=no
15998 fi;
15999 echo "$as_me:15999: result: $enable_opaque_menu" >&5
16000 echo "${ECHO_T}$enable_opaque_menu" >&6
16001
16002 echo "$as_me:16002: checking if you want opaque panel-library structures" >&5
16003 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16004
16005 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16006 if test "${enable_opaque_panel+set}" = set; then
16007   enableval="$enable_opaque_panel"
16008   enable_opaque_panel=yes
16009 else
16010   enable_opaque_panel=no
16011 fi;
16012 echo "$as_me:16012: result: $enable_opaque_panel" >&5
16013 echo "${ECHO_T}$enable_opaque_panel" >&6
16014
16015 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16016 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16017 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16018 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16019
16020 ### Allow using a different wrap-prefix
16021 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16022         echo "$as_me:16022: checking for prefix used to wrap public variables" >&5
16023 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16024
16025 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16026 if test "${with_wrap_prefix+set}" = set; then
16027   withval="$with_wrap_prefix"
16028   NCURSES_WRAP_PREFIX=$withval
16029 else
16030   NCURSES_WRAP_PREFIX=_nc_
16031 fi;
16032         echo "$as_me:16032: result: $NCURSES_WRAP_PREFIX" >&5
16033 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16034 else
16035         NCURSES_WRAP_PREFIX=_nc_
16036 fi
16037
16038 cat >>confdefs.h <<EOF
16039 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16040 EOF
16041
16042 ###############################################################################
16043 # These options are relatively safe to experiment with.
16044
16045 echo "$as_me:16045: checking if you want all development code" >&5
16046 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16047
16048 # Check whether --with-develop or --without-develop was given.
16049 if test "${with_develop+set}" = set; then
16050   withval="$with_develop"
16051   with_develop=$withval
16052 else
16053   with_develop=no
16054 fi;
16055 echo "$as_me:16055: result: $with_develop" >&5
16056 echo "${ECHO_T}$with_develop" >&6
16057
16058 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16059 echo "$as_me:16059: checking if you want hard-tabs code" >&5
16060 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16061
16062 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16063 if test "${enable_hard_tabs+set}" = set; then
16064   enableval="$enable_hard_tabs"
16065
16066 else
16067   enable_hard_tabs=$with_develop
16068 fi;
16069 echo "$as_me:16069: result: $enable_hard_tabs" >&5
16070 echo "${ECHO_T}$enable_hard_tabs" >&6
16071 test "x$enable_hard_tabs" = xyes &&
16072 cat >>confdefs.h <<\EOF
16073 #define USE_HARD_TABS 1
16074 EOF
16075
16076 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16077 echo "$as_me:16077: checking if you want limited support for xmc" >&5
16078 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16079
16080 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16081 if test "${enable_xmc_glitch+set}" = set; then
16082   enableval="$enable_xmc_glitch"
16083
16084 else
16085   enable_xmc_glitch=$with_develop
16086 fi;
16087 echo "$as_me:16087: result: $enable_xmc_glitch" >&5
16088 echo "${ECHO_T}$enable_xmc_glitch" >&6
16089 test "x$enable_xmc_glitch" = xyes &&
16090 cat >>confdefs.h <<\EOF
16091 #define USE_XMC_SUPPORT 1
16092 EOF
16093
16094 ###############################################################################
16095 # These are just experimental, probably should not be in a package:
16096
16097 echo "$as_me:16097: checking if you do not want to assume colors are white-on-black" >&5
16098 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16099
16100 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16101 if test "${enable_assumed_color+set}" = set; then
16102   enableval="$enable_assumed_color"
16103   with_assumed_color=$enableval
16104 else
16105   with_assumed_color=yes
16106 fi;
16107 echo "$as_me:16107: result: $with_assumed_color" >&5
16108 echo "${ECHO_T}$with_assumed_color" >&6
16109 test "x$with_assumed_color" = xyes &&
16110 cat >>confdefs.h <<\EOF
16111 #define USE_ASSUMED_COLOR 1
16112 EOF
16113
16114 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16115 echo "$as_me:16115: checking if you want hashmap scrolling-optimization code" >&5
16116 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16117
16118 # Check whether --enable-hashmap or --disable-hashmap was given.
16119 if test "${enable_hashmap+set}" = set; then
16120   enableval="$enable_hashmap"
16121   with_hashmap=$enableval
16122 else
16123   with_hashmap=yes
16124 fi;
16125 echo "$as_me:16125: result: $with_hashmap" >&5
16126 echo "${ECHO_T}$with_hashmap" >&6
16127 test "x$with_hashmap" = xyes &&
16128 cat >>confdefs.h <<\EOF
16129 #define USE_HASHMAP 1
16130 EOF
16131
16132 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16133 echo "$as_me:16133: checking if you want colorfgbg code" >&5
16134 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16135
16136 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16137 if test "${enable_colorfgbg+set}" = set; then
16138   enableval="$enable_colorfgbg"
16139   with_colorfgbg=$enableval
16140 else
16141   with_colorfgbg=no
16142 fi;
16143 echo "$as_me:16143: result: $with_colorfgbg" >&5
16144 echo "${ECHO_T}$with_colorfgbg" >&6
16145 test "x$with_colorfgbg" = xyes &&
16146 cat >>confdefs.h <<\EOF
16147 #define USE_COLORFGBG 1
16148 EOF
16149
16150 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16151 echo "$as_me:16151: checking if you want to use gcc -fvisibility option" >&5
16152 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16153
16154 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16155 if test "${enable_fvisibility+set}" = set; then
16156   enableval="$enable_fvisibility"
16157   cf_with_fvisibility=$enableval
16158 else
16159   cf_with_fvisibility=no
16160 fi;
16161 echo "$as_me:16161: result: $cf_with_fvisibility" >&5
16162 echo "${ECHO_T}$cf_with_fvisibility" >&6
16163
16164 NCURSES_IMPEXP=
16165 NCURSES_CXX_IMPEXP=
16166 if test "x$cf_with_fvisibility" = xyes; then
16167
16168 echo "$as_me:16168: checking if $CC -fvisibility=hidden option works" >&5
16169 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16170 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16171   echo $ECHO_N "(cached) $ECHO_C" >&6
16172 else
16173
16174     cf_save_cflags="$CFLAGS"
16175     CFLAGS="$CFLAGS -fvisibility=hidden"
16176     cat >"conftest.$ac_ext" <<_ACEOF
16177 #line 16177 "configure"
16178 #include "confdefs.h"
16179
16180 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16181
16182 int
16183 main (void)
16184 {
16185
16186         if (somefunc()) return 1;
16187
16188   ;
16189   return 0;
16190 }
16191 _ACEOF
16192 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16193 if { (eval echo "$as_me:16193: \"$ac_link\"") >&5
16194   (eval $ac_link) 2>&5
16195   ac_status=$?
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit "$ac_status"); } &&
16198          { ac_try='test -s "conftest$ac_exeext"'
16199   { (eval echo "$as_me:16199: \"$ac_try\"") >&5
16200   (eval $ac_try) 2>&5
16201   ac_status=$?
16202   echo "$as_me:16202: \$? = $ac_status" >&5
16203   (exit "$ac_status"); }; }; then
16204   cf_cv_fvisibility_hidden=yes
16205 else
16206   echo "$as_me: failed program was:" >&5
16207 cat "conftest.$ac_ext" >&5
16208 cf_cv_fvisibility_hidden=no
16209 fi
16210 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16211     CFLAGS=$cf_save_cflags
16212
16213 fi
16214 echo "$as_me:16214: result: $cf_cv_fvisibility_hidden" >&5
16215 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16216
16217         if test "x$cf_cv_fvisibility_hidden" = xyes
16218         then
16219
16220 cf_fix_cppflags=no
16221 cf_new_cflags=
16222 cf_new_cppflags=
16223 cf_new_extra_cppflags=
16224
16225 for cf_add_cflags in -fvisibility=hidden
16226 do
16227 case "$cf_fix_cppflags" in
16228 (no)
16229         case "$cf_add_cflags" in
16230         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16231                 case "$cf_add_cflags" in
16232                 (-D*)
16233                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16234
16235                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16236                                 && test -z "${cf_tst_cflags}" \
16237                                 && cf_fix_cppflags=yes
16238
16239                         if test "$cf_fix_cppflags" = yes ; then
16240
16241         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16242         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16243
16244                                 continue
16245                         elif test "${cf_tst_cflags}" = "\"'" ; then
16246
16247         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16248         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16249
16250                                 continue
16251                         fi
16252                         ;;
16253                 esac
16254                 case "$CPPFLAGS" in
16255                 (*$cf_add_cflags)
16256                         ;;
16257                 (*)
16258                         case "$cf_add_cflags" in
16259                         (-D*)
16260                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16261
16262 CPPFLAGS=`echo "$CPPFLAGS" | \
16263         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16264                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16265
16266                                 ;;
16267                         esac
16268
16269         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16270         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16271
16272                         ;;
16273                 esac
16274                 ;;
16275         (*)
16276
16277         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16278         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16279
16280                 ;;
16281         esac
16282         ;;
16283 (yes)
16284
16285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16287
16288         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16289
16290         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16291                 && test -z "${cf_tst_cflags}" \
16292                 && cf_fix_cppflags=no
16293         ;;
16294 esac
16295 done
16296
16297 if test -n "$cf_new_cflags" ; then
16298
16299         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16300         CFLAGS="${CFLAGS}$cf_new_cflags"
16301
16302 fi
16303
16304 if test -n "$cf_new_cppflags" ; then
16305
16306         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16307         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16308
16309 fi
16310
16311 if test -n "$cf_new_extra_cppflags" ; then
16312
16313         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16314         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16315
16316 fi
16317
16318                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16319         fi
16320         if test -n "$CXX"
16321         then
16322                 ac_ext=cc
16323 ac_cpp='$CXXCPP $CPPFLAGS'
16324 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16325 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16326 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16327 ac_main_return="return"
16328
16329 echo "$as_me:16329: checking if $CXX -fvisibility=hidden option works" >&5
16330 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16331 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16332   echo $ECHO_N "(cached) $ECHO_C" >&6
16333 else
16334
16335     cf_save_cflags="$CXXFLAGS"
16336     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16337     cat >"conftest.$ac_ext" <<_ACEOF
16338 #line 16338 "configure"
16339 #include "confdefs.h"
16340
16341 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16342
16343 int
16344 main (void)
16345 {
16346
16347         if (somefunc()) return 1;
16348
16349   ;
16350   return 0;
16351 }
16352 _ACEOF
16353 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16354 if { (eval echo "$as_me:16354: \"$ac_link\"") >&5
16355   (eval $ac_link) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit "$ac_status"); } &&
16359          { ac_try='test -s "conftest$ac_exeext"'
16360   { (eval echo "$as_me:16360: \"$ac_try\"") >&5
16361   (eval $ac_try) 2>&5
16362   ac_status=$?
16363   echo "$as_me:16363: \$? = $ac_status" >&5
16364   (exit "$ac_status"); }; }; then
16365   cf_cv_fvisibility_hidden2=yes
16366 else
16367   echo "$as_me: failed program was:" >&5
16368 cat "conftest.$ac_ext" >&5
16369 cf_cv_fvisibility_hidden2=no
16370 fi
16371 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16372     CXXFLAGS=$cf_save_cflags
16373
16374 fi
16375 echo "$as_me:16375: result: $cf_cv_fvisibility_hidden2" >&5
16376 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16377
16378                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16379                 then
16380
16381 cf_save_CXXFLAGS="$CFLAGS"
16382 CFLAGS="$CXXFLAGS"
16383
16384 cf_fix_cppflags=no
16385 cf_new_cflags=
16386 cf_new_cppflags=
16387 cf_new_extra_cppflags=
16388
16389 for cf_add_cflags in -fvisibility=hidden
16390 do
16391 case "$cf_fix_cppflags" in
16392 (no)
16393         case "$cf_add_cflags" in
16394         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16395                 case "$cf_add_cflags" in
16396                 (-D*)
16397                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16398
16399                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16400                                 && test -z "${cf_tst_cflags}" \
16401                                 && cf_fix_cppflags=yes
16402
16403                         if test "$cf_fix_cppflags" = yes ; then
16404
16405         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16406         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16407
16408                                 continue
16409                         elif test "${cf_tst_cflags}" = "\"'" ; then
16410
16411         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16412         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16413
16414                                 continue
16415                         fi
16416                         ;;
16417                 esac
16418                 case "$CPPFLAGS" in
16419                 (*$cf_add_cflags)
16420                         ;;
16421                 (*)
16422                         case "$cf_add_cflags" in
16423                         (-D*)
16424                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16425
16426 CPPFLAGS=`echo "$CPPFLAGS" | \
16427         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16428                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16429
16430                                 ;;
16431                         esac
16432
16433         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16434         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16435
16436                         ;;
16437                 esac
16438                 ;;
16439         (*)
16440
16441         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16442         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16443
16444                 ;;
16445         esac
16446         ;;
16447 (yes)
16448
16449         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16450         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16451
16452         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16453
16454         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16455                 && test -z "${cf_tst_cflags}" \
16456                 && cf_fix_cppflags=no
16457         ;;
16458 esac
16459 done
16460
16461 if test -n "$cf_new_cflags" ; then
16462
16463         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16464         CFLAGS="${CFLAGS}$cf_new_cflags"
16465
16466 fi
16467
16468 if test -n "$cf_new_cppflags" ; then
16469
16470         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16471         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16472
16473 fi
16474
16475 if test -n "$cf_new_extra_cppflags" ; then
16476
16477         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16478         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16479
16480 fi
16481
16482 CXXFLAGS="$CFLAGS"
16483 CFLAGS="$cf_save_CXXFLAGS"
16484
16485                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16486                 fi
16487                 ac_ext=c
16488 ac_cpp='$CPP $CPPFLAGS'
16489 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16490 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16491 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16492 ac_main_return="return"
16493
16494         fi
16495 fi
16496
16497 ###   use option --enable-interop to turn on use of bindings used for interop
16498 echo "$as_me:16498: checking if you want interop bindings" >&5
16499 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16500
16501 # Check whether --enable-interop or --disable-interop was given.
16502 if test "${enable_interop+set}" = set; then
16503   enableval="$enable_interop"
16504   with_exp_interop=$enableval
16505 else
16506   with_exp_interop=$cf_dft_interop
16507 fi;
16508 echo "$as_me:16508: result: $with_exp_interop" >&5
16509 echo "${ECHO_T}$with_exp_interop" >&6
16510
16511 NCURSES_INTEROP_FUNCS=0
16512 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16513
16514 echo "$as_me:16514: checking if you want experimental safe-sprintf code" >&5
16515 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16516
16517 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16518 if test "${enable_safe_sprintf+set}" = set; then
16519   enableval="$enable_safe_sprintf"
16520   with_safe_sprintf=$enableval
16521 else
16522   with_safe_sprintf=no
16523 fi;
16524 echo "$as_me:16524: result: $with_safe_sprintf" >&5
16525 echo "${ECHO_T}$with_safe_sprintf" >&6
16526
16527 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16528 # when hashmap is used scroll hints are useless
16529 if test "$with_hashmap" = no ; then
16530 echo "$as_me:16530: checking if you want to experiment without scrolling-hints code" >&5
16531 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16532
16533 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16534 if test "${enable_scroll_hints+set}" = set; then
16535   enableval="$enable_scroll_hints"
16536   with_scroll_hints=$enableval
16537 else
16538   with_scroll_hints=yes
16539 fi;
16540 echo "$as_me:16540: result: $with_scroll_hints" >&5
16541 echo "${ECHO_T}$with_scroll_hints" >&6
16542 test "x$with_scroll_hints" = xyes &&
16543 cat >>confdefs.h <<\EOF
16544 #define USE_SCROLL_HINTS 1
16545 EOF
16546
16547 fi
16548
16549 echo "$as_me:16549: checking if you want wgetch-events code" >&5
16550 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16551
16552 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16553 if test "${enable_wgetch_events+set}" = set; then
16554   enableval="$enable_wgetch_events"
16555   with_wgetch_events=$enableval
16556 else
16557   with_wgetch_events=no
16558 fi;
16559 echo "$as_me:16559: result: $with_wgetch_events" >&5
16560 echo "${ECHO_T}$with_wgetch_events" >&6
16561 if test "x$with_wgetch_events" = xyes ; then
16562
16563 cat >>confdefs.h <<\EOF
16564 #define NCURSES_WGETCH_EVENTS 1
16565 EOF
16566
16567         NCURSES_WGETCH_EVENTS=1
16568 else
16569         NCURSES_WGETCH_EVENTS=0
16570 fi
16571
16572 case "$cf_cv_system_name" in
16573 (*mingw32*|*mingw64*|*-msvc*)
16574         echo "$as_me:16574: checking if you want experimental-Windows driver" >&5
16575 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16576
16577 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16578 if test "${enable_exp_win32+set}" = set; then
16579   enableval="$enable_exp_win32"
16580   with_exp_win32=$enableval
16581 else
16582   with_exp_win32=no
16583 fi;
16584         echo "$as_me:16584: result: $with_exp_win32" >&5
16585 echo "${ECHO_T}$with_exp_win32" >&6
16586         if test "x$with_exp_win32" = xyes
16587         then
16588
16589 cat >>confdefs.h <<\EOF
16590 #define EXP_WIN32_DRIVER 1
16591 EOF
16592
16593                 EXP_WIN32_DRIVER=1
16594                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16595         else
16596                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16597                 EXP_WIN32_DRIVER=0
16598         fi
16599         ;;
16600 (*)
16601         EXP_WIN32_DRIVER=0
16602         INTERNALS_HDR=
16603         ;;
16604 esac
16605
16606 ###############################################################################
16607
16608 ###     use option --disable-echo to suppress full display compiling commands
16609
16610 echo "$as_me:16610: checking if you want to see long compiling messages" >&5
16611 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16612
16613 # Check whether --enable-echo or --disable-echo was given.
16614 if test "${enable_echo+set}" = set; then
16615   enableval="$enable_echo"
16616   test "$enableval" != no && enableval=yes
16617         if test "$enableval" != "yes" ; then
16618
16619         ECHO_LT='--silent'
16620         ECHO_LD='@echo linking $@;'
16621         RULE_CC='@echo compiling $<'
16622         SHOW_CC='@echo compiling $@'
16623         ECHO_CC='@'
16624
16625         else
16626
16627         ECHO_LT=''
16628         ECHO_LD=''
16629         RULE_CC=''
16630         SHOW_CC=''
16631         ECHO_CC=''
16632
16633         fi
16634 else
16635   enableval=yes
16636
16637         ECHO_LT=''
16638         ECHO_LD=''
16639         RULE_CC=''
16640         SHOW_CC=''
16641         ECHO_CC=''
16642
16643 fi;
16644 echo "$as_me:16644: result: $enableval" >&5
16645 echo "${ECHO_T}$enableval" >&6
16646
16647 if test "x$enable_echo" = xyes; then
16648         ECHO_LINK=
16649 else
16650         ECHO_LINK='@ echo linking $@ ... ;'
16651         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16652         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16653 fi
16654
16655 # --disable-stripping is used for debugging
16656
16657 echo "$as_me:16657: checking if you want to install stripped executables" >&5
16658 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16659
16660 # Check whether --enable-stripping or --disable-stripping was given.
16661 if test "${enable_stripping+set}" = set; then
16662   enableval="$enable_stripping"
16663   test "$enableval" != no && enableval=yes
16664         if test "$enableval" != "yes" ; then
16665     enable_stripping=no
16666         else
16667                 enable_stripping=yes
16668         fi
16669 else
16670   enableval=yes
16671         enable_stripping=yes
16672
16673 fi;
16674 echo "$as_me:16674: result: $enable_stripping" >&5
16675 echo "${ECHO_T}$enable_stripping" >&6
16676
16677 if test "$enable_stripping" = yes
16678 then
16679         INSTALL_OPT_S="-s"
16680 else
16681         INSTALL_OPT_S=
16682 fi
16683
16684 : "${INSTALL:=install}"
16685 echo "$as_me:16685: checking if install accepts -p option" >&5
16686 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16687 if test "${cf_cv_install_p+set}" = set; then
16688   echo $ECHO_N "(cached) $ECHO_C" >&6
16689 else
16690
16691         rm -rf ./conftest*
16692         date >conftest.in
16693         mkdir conftest.out
16694         sleep 3
16695         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16696         then
16697                 if test -f conftest.out/conftest.in
16698                 then
16699                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16700                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16701                         if test -s conftest.err
16702                         then
16703                                 cf_cv_install_p=no
16704                         else
16705                                 cf_cv_install_p=yes
16706                         fi
16707                 else
16708                         cf_cv_install_p=no
16709                 fi
16710         else
16711                 cf_cv_install_p=no
16712         fi
16713         rm -rf ./conftest*
16714
16715 fi
16716 echo "$as_me:16716: result: $cf_cv_install_p" >&5
16717 echo "${ECHO_T}$cf_cv_install_p" >&6
16718
16719 echo "$as_me:16719: checking if install needs to be told about ownership" >&5
16720 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16721 case `$ac_config_guess` in
16722 (*minix)
16723         with_install_o=yes
16724         ;;
16725 (*)
16726         with_install_o=no
16727         ;;
16728 esac
16729
16730 echo "$as_me:16730: result: $with_install_o" >&5
16731 echo "${ECHO_T}$with_install_o" >&6
16732 if test "x$with_install_o" = xyes
16733 then
16734         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'`"
16735 else
16736         INSTALL_OPT_O=
16737 fi
16738
16739 # If we're avoiding relinking of shared libraries during install, that is to
16740 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16741 # the install program has "-p" (for preserving timestamps).
16742 cf_cv_do_reranlib=yes
16743 if test "x$cf_cv_install_p" = xyes
16744 then
16745         if test "x$cf_cv_do_relink" != xyes
16746         then
16747                 cf_cv_do_reranlib=no
16748                 INSTALL_OPT_P="-p"
16749                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16750         fi
16751 fi
16752
16753 ###     use option --enable-warnings to turn on all gcc warnings
16754
16755 echo "$as_me:16755: checking if you want to use C11 _Noreturn feature" >&5
16756 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16757
16758 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16759 if test "${enable_stdnoreturn+set}" = set; then
16760   enableval="$enable_stdnoreturn"
16761   test "$enableval" != yes && enableval=no
16762         if test "$enableval" != "no" ; then
16763     enable_stdnoreturn=yes
16764         else
16765                 enable_stdnoreturn=no
16766         fi
16767 else
16768   enableval=no
16769         enable_stdnoreturn=no
16770
16771 fi;
16772 echo "$as_me:16772: result: $enable_stdnoreturn" >&5
16773 echo "${ECHO_T}$enable_stdnoreturn" >&6
16774
16775 if test $enable_stdnoreturn = yes; then
16776 echo "$as_me:16776: checking for C11 _Noreturn feature" >&5
16777 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16778 if test "${cf_cv_c11_noreturn+set}" = set; then
16779   echo $ECHO_N "(cached) $ECHO_C" >&6
16780 else
16781   cat >"conftest.$ac_ext" <<_ACEOF
16782 #line 16782 "configure"
16783 #include "confdefs.h"
16784
16785 #include <stdio.h>
16786 #include <stdlib.h>
16787 #include <stdnoreturn.h>
16788 static _Noreturn void giveup(void) { exit(0); }
16789
16790 int
16791 main (void)
16792 {
16793 if (feof(stdin)) giveup()
16794   ;
16795   return 0;
16796 }
16797 _ACEOF
16798 rm -f "conftest.$ac_objext"
16799 if { (eval echo "$as_me:16799: \"$ac_compile\"") >&5
16800   (eval $ac_compile) 2>&5
16801   ac_status=$?
16802   echo "$as_me:16802: \$? = $ac_status" >&5
16803   (exit "$ac_status"); } &&
16804          { ac_try='test -s "conftest.$ac_objext"'
16805   { (eval echo "$as_me:16805: \"$ac_try\"") >&5
16806   (eval $ac_try) 2>&5
16807   ac_status=$?
16808   echo "$as_me:16808: \$? = $ac_status" >&5
16809   (exit "$ac_status"); }; }; then
16810   cf_cv_c11_noreturn=yes
16811 else
16812   echo "$as_me: failed program was:" >&5
16813 cat "conftest.$ac_ext" >&5
16814 cf_cv_c11_noreturn=no
16815 fi
16816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16817
16818 fi
16819 echo "$as_me:16819: result: $cf_cv_c11_noreturn" >&5
16820 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16821 else
16822         cf_cv_c11_noreturn=no,
16823 fi
16824
16825 if test "$cf_cv_c11_noreturn" = yes; then
16826
16827 cat >>confdefs.h <<\EOF
16828 #define HAVE_STDNORETURN_H 1
16829 EOF
16830
16831 cat >>confdefs.h <<EOF
16832 #define STDC_NORETURN _Noreturn
16833 EOF
16834
16835         HAVE_STDNORETURN_H=1
16836 else
16837         HAVE_STDNORETURN_H=0
16838 fi
16839
16840 if test "$GCC" = yes || test "$GXX" = yes
16841 then
16842
16843 if test "$GCC" = yes || test "$GXX" = yes
16844 then
16845         case $CFLAGS in
16846         (*-Werror=*)
16847                 cf_temp_flags=
16848                 for cf_temp_scan in $CFLAGS
16849                 do
16850                         case "x$cf_temp_scan" in
16851                         (x-Werror=format*)
16852
16853         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16854         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16855
16856                                 ;;
16857                         (x-Werror=*)
16858
16859         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16860         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16861
16862                                 ;;
16863                         (*)
16864
16865         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16866         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16867
16868                                 ;;
16869                         esac
16870                 done
16871                 if test "x$CFLAGS" != "x$cf_temp_flags"
16872                 then
16873                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16874
16875 echo "${as_me:-configure}:16875: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16876
16877                         CFLAGS="$cf_temp_flags"
16878                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16879
16880 echo "${as_me:-configure}:16880: testing ... fixed $CFLAGS ..." 1>&5
16881
16882                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16883
16884 echo "${as_me:-configure}:16884: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16885
16886                 fi
16887                 ;;
16888         esac
16889 fi
16890
16891 if test "$GCC" = yes || test "$GXX" = yes
16892 then
16893         case $CPPFLAGS in
16894         (*-Werror=*)
16895                 cf_temp_flags=
16896                 for cf_temp_scan in $CPPFLAGS
16897                 do
16898                         case "x$cf_temp_scan" in
16899                         (x-Werror=format*)
16900
16901         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16902         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16903
16904                                 ;;
16905                         (x-Werror=*)
16906
16907         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16908         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16909
16910                                 ;;
16911                         (*)
16912
16913         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16914         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16915
16916                                 ;;
16917                         esac
16918                 done
16919                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16920                 then
16921                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16922
16923 echo "${as_me:-configure}:16923: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16924
16925                         CPPFLAGS="$cf_temp_flags"
16926                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16927
16928 echo "${as_me:-configure}:16928: testing ... fixed $CPPFLAGS ..." 1>&5
16929
16930                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16931
16932 echo "${as_me:-configure}:16932: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16933
16934                 fi
16935                 ;;
16936         esac
16937 fi
16938
16939 if test "$GCC" = yes || test "$GXX" = yes
16940 then
16941         case $LDFLAGS in
16942         (*-Werror=*)
16943                 cf_temp_flags=
16944                 for cf_temp_scan in $LDFLAGS
16945                 do
16946                         case "x$cf_temp_scan" in
16947                         (x-Werror=format*)
16948
16949         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16950         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16951
16952                                 ;;
16953                         (x-Werror=*)
16954
16955         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16956         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16957
16958                                 ;;
16959                         (*)
16960
16961         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16962         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16963
16964                                 ;;
16965                         esac
16966                 done
16967                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16968                 then
16969                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16970
16971 echo "${as_me:-configure}:16971: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16972
16973                         LDFLAGS="$cf_temp_flags"
16974                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16975
16976 echo "${as_me:-configure}:16976: testing ... fixed $LDFLAGS ..." 1>&5
16977
16978                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16979
16980 echo "${as_me:-configure}:16980: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16981
16982                 fi
16983                 ;;
16984         esac
16985 fi
16986
16987 echo "$as_me:16987: checking if you want to turn on gcc warnings" >&5
16988 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16989
16990 # Check whether --enable-warnings or --disable-warnings was given.
16991 if test "${enable_warnings+set}" = set; then
16992   enableval="$enable_warnings"
16993   test "$enableval" != yes && enableval=no
16994         if test "$enableval" != "no" ; then
16995     enable_warnings=yes
16996         else
16997                 enable_warnings=no
16998         fi
16999 else
17000   enableval=no
17001         enable_warnings=no
17002
17003 fi;
17004 echo "$as_me:17004: result: $enable_warnings" >&5
17005 echo "${ECHO_T}$enable_warnings" >&6
17006 if test "$enable_warnings" = "yes"
17007 then
17008
17009 if test "x$have_x" = xyes; then
17010
17011 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17012 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17013 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17014 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17015 for cf_X_CFLAGS in $X_CFLAGS
17016 do
17017         case "x$cf_X_CFLAGS" in
17018         x-[IUD]*)
17019                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17020                 ;;
17021         *)
17022                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17023                 ;;
17024         esac
17025 done
17026
17027 cat >"conftest.$ac_ext" <<_ACEOF
17028 #line 17028 "configure"
17029 #include "confdefs.h"
17030
17031 #include <stdlib.h>
17032 #include <X11/Intrinsic.h>
17033
17034 int
17035 main (void)
17036 {
17037 String foo = malloc(1); free((void*)foo)
17038   ;
17039   return 0;
17040 }
17041 _ACEOF
17042 rm -f "conftest.$ac_objext"
17043 if { (eval echo "$as_me:17043: \"$ac_compile\"") >&5
17044   (eval $ac_compile) 2>&5
17045   ac_status=$?
17046   echo "$as_me:17046: \$? = $ac_status" >&5
17047   (exit "$ac_status"); } &&
17048          { ac_try='test -s "conftest.$ac_objext"'
17049   { (eval echo "$as_me:17049: \"$ac_try\"") >&5
17050   (eval $ac_try) 2>&5
17051   ac_status=$?
17052   echo "$as_me:17052: \$? = $ac_status" >&5
17053   (exit "$ac_status"); }; }; then
17054
17055 echo "$as_me:17055: checking for X11/Xt const-feature" >&5
17056 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17057 if test "${cf_cv_const_x_string+set}" = set; then
17058   echo $ECHO_N "(cached) $ECHO_C" >&6
17059 else
17060
17061         cat >"conftest.$ac_ext" <<_ACEOF
17062 #line 17062 "configure"
17063 #include "confdefs.h"
17064
17065 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17066 #undef  XTSTRINGDEFINES /* X11R5 and later */
17067 #include <stdlib.h>
17068 #include <X11/Intrinsic.h>
17069
17070 int
17071 main (void)
17072 {
17073 String foo = malloc(1); *foo = 0
17074   ;
17075   return 0;
17076 }
17077 _ACEOF
17078 rm -f "conftest.$ac_objext"
17079 if { (eval echo "$as_me:17079: \"$ac_compile\"") >&5
17080   (eval $ac_compile) 2>&5
17081   ac_status=$?
17082   echo "$as_me:17082: \$? = $ac_status" >&5
17083   (exit "$ac_status"); } &&
17084          { ac_try='test -s "conftest.$ac_objext"'
17085   { (eval echo "$as_me:17085: \"$ac_try\"") >&5
17086   (eval $ac_try) 2>&5
17087   ac_status=$?
17088   echo "$as_me:17088: \$? = $ac_status" >&5
17089   (exit "$ac_status"); }; }; then
17090
17091                         cf_cv_const_x_string=no
17092
17093 else
17094   echo "$as_me: failed program was:" >&5
17095 cat "conftest.$ac_ext" >&5
17096
17097                         cf_cv_const_x_string=yes
17098
17099 fi
17100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17101
17102 fi
17103 echo "$as_me:17103: result: $cf_cv_const_x_string" >&5
17104 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17105
17106 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17107 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17108 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17109
17110 case "$cf_cv_const_x_string" in
17111 (no)
17112
17113         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17114         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17115
17116         ;;
17117 (*)
17118
17119         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17120         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17121
17122         ;;
17123 esac
17124
17125 else
17126   echo "$as_me: failed program was:" >&5
17127 cat "conftest.$ac_ext" >&5
17128 fi
17129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17130  fi
17131 cat > "conftest.$ac_ext" <<EOF
17132 #line 17132 "${as_me:-configure}"
17133 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17134 EOF
17135 if test "$INTEL_COMPILER" = yes
17136 then
17137 # The "-wdXXX" options suppress warnings:
17138 # remark #1419: external declaration in primary source file
17139 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17140 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17141 # remark #193: zero used for undefined preprocessing identifier
17142 # remark #593: variable "curs_sb_left_arrow" was set but never used
17143 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17144 # remark #869: parameter "tw" was never referenced
17145 # remark #981: operands are evaluated in unspecified order
17146 # warning #279: controlling expression is constant
17147
17148         { echo "$as_me:17148: checking for $CC warning options..." >&5
17149 echo "$as_me: checking for $CC warning options..." >&6;}
17150         cf_save_CFLAGS="$CFLAGS"
17151         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17152         for cf_opt in \
17153                 wd1419 \
17154                 wd1683 \
17155                 wd1684 \
17156                 wd193 \
17157                 wd593 \
17158                 wd279 \
17159                 wd810 \
17160                 wd869 \
17161                 wd981
17162         do
17163                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17164                 if { (eval echo "$as_me:17164: \"$ac_compile\"") >&5
17165   (eval $ac_compile) 2>&5
17166   ac_status=$?
17167   echo "$as_me:17167: \$? = $ac_status" >&5
17168   (exit "$ac_status"); }; then
17169                         test -n "$verbose" && echo "$as_me:17169: result: ... -$cf_opt" >&5
17170 echo "${ECHO_T}... -$cf_opt" >&6
17171                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17172                 fi
17173         done
17174         CFLAGS="$cf_save_CFLAGS"
17175 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17176 then
17177         { echo "$as_me:17177: checking for $CC warning options..." >&5
17178 echo "$as_me: checking for $CC warning options..." >&6;}
17179         cf_save_CFLAGS="$CFLAGS"
17180         cf_warn_CONST=""
17181         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17182         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17183         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17184         for cf_opt in W Wall \
17185                 Wbad-function-cast \
17186                 Wcast-align \
17187                 Wcast-qual \
17188                 Wdeclaration-after-statement \
17189                 Wextra \
17190                 Winline \
17191                 Wmissing-declarations \
17192                 Wmissing-prototypes \
17193                 Wnested-externs \
17194                 Wpointer-arith \
17195                 Wshadow \
17196                 Wstrict-prototypes \
17197                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17198         do
17199                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17200                 if { (eval echo "$as_me:17200: \"$ac_compile\"") >&5
17201   (eval $ac_compile) 2>&5
17202   ac_status=$?
17203   echo "$as_me:17203: \$? = $ac_status" >&5
17204   (exit "$ac_status"); }; then
17205                         test -n "$verbose" && echo "$as_me:17205: result: ... -$cf_opt" >&5
17206 echo "${ECHO_T}... -$cf_opt" >&6
17207                         case "$cf_opt" in
17208                         (Winline)
17209                                 case "$GCC_VERSION" in
17210                                 ([34].*)
17211                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17212
17213 echo "${as_me:-configure}:17213: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17214
17215                                         continue;;
17216                                 esac
17217                                 ;;
17218                         (Wpointer-arith)
17219                                 case "$GCC_VERSION" in
17220                                 ([12].*)
17221                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17222
17223 echo "${as_me:-configure}:17223: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17224
17225                                         continue;;
17226                                 esac
17227                                 ;;
17228                         esac
17229                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17230                 fi
17231         done
17232         CFLAGS="$cf_save_CFLAGS"
17233 fi
17234 rm -rf ./conftest*
17235
17236 fi
17237
17238 if test "$GCC" = yes || test "$GXX" = yes
17239 then
17240 cat > conftest.i <<EOF
17241 #ifndef GCC_PRINTF
17242 #define GCC_PRINTF 0
17243 #endif
17244 #ifndef GCC_SCANF
17245 #define GCC_SCANF 0
17246 #endif
17247 #ifndef GCC_NORETURN
17248 #define GCC_NORETURN /* nothing */
17249 #endif
17250 #ifndef GCC_UNUSED
17251 #define GCC_UNUSED /* nothing */
17252 #endif
17253 EOF
17254 if test "$GCC" = yes
17255 then
17256         { echo "$as_me:17256: checking for $CC __attribute__ directives..." >&5
17257 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17258 cat > "conftest.$ac_ext" <<EOF
17259 #line 17259 "${as_me:-configure}"
17260 #include "confdefs.h"
17261 #include "conftest.h"
17262 #include "conftest.i"
17263 #if     GCC_PRINTF
17264 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17265 #else
17266 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17267 #endif
17268 #if     GCC_SCANF
17269 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17270 #else
17271 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17272 #endif
17273 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17274 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17275 extern GCC_NORETURN void foo(void);
17276 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17277 EOF
17278         cf_printf_attribute=no
17279         cf_scanf_attribute=no
17280         for cf_attribute in scanf printf unused noreturn
17281         do
17282
17283 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17284
17285                 cf_directive="__attribute__(($cf_attribute))"
17286                 echo "checking for $CC $cf_directive" 1>&5
17287
17288                 case "$cf_attribute" in
17289                 (printf)
17290                         cf_printf_attribute=yes
17291                         cat >conftest.h <<EOF
17292 #define GCC_$cf_ATTRIBUTE 1
17293 EOF
17294                         ;;
17295                 (scanf)
17296                         cf_scanf_attribute=yes
17297                         cat >conftest.h <<EOF
17298 #define GCC_$cf_ATTRIBUTE 1
17299 EOF
17300                         ;;
17301                 (*)
17302                         cat >conftest.h <<EOF
17303 #define GCC_$cf_ATTRIBUTE $cf_directive
17304 EOF
17305                         ;;
17306                 esac
17307
17308                 if { (eval echo "$as_me:17308: \"$ac_compile\"") >&5
17309   (eval $ac_compile) 2>&5
17310   ac_status=$?
17311   echo "$as_me:17311: \$? = $ac_status" >&5
17312   (exit "$ac_status"); }; then
17313                         test -n "$verbose" && echo "$as_me:17313: result: ... $cf_attribute" >&5
17314 echo "${ECHO_T}... $cf_attribute" >&6
17315                         cat conftest.h >>confdefs.h
17316                         case "$cf_attribute" in
17317                         (noreturn)
17318
17319 cat >>confdefs.h <<EOF
17320 #define GCC_NORETURN $cf_directive
17321 EOF
17322
17323                                 ;;
17324                         (printf)
17325                                 cf_value='/* nothing */'
17326                                 if test "$cf_printf_attribute" != no ; then
17327                                         cf_value='__attribute__((format(printf,fmt,var)))'
17328
17329 cat >>confdefs.h <<\EOF
17330 #define GCC_PRINTF 1
17331 EOF
17332
17333                                 fi
17334
17335 cat >>confdefs.h <<EOF
17336 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17337 EOF
17338
17339                                 ;;
17340                         (scanf)
17341                                 cf_value='/* nothing */'
17342                                 if test "$cf_scanf_attribute" != no ; then
17343                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17344
17345 cat >>confdefs.h <<\EOF
17346 #define GCC_SCANF 1
17347 EOF
17348
17349                                 fi
17350
17351 cat >>confdefs.h <<EOF
17352 #define GCC_SCANFLIKE(fmt,var) $cf_value
17353 EOF
17354
17355                                 ;;
17356                         (unused)
17357
17358 cat >>confdefs.h <<EOF
17359 #define GCC_UNUSED $cf_directive
17360 EOF
17361
17362                                 ;;
17363                         esac
17364                 fi
17365         done
17366 else
17367         ${FGREP-fgrep} define conftest.i >>confdefs.h
17368 fi
17369 rm -rf ./conftest*
17370 fi
17371
17372 fi
17373
17374 if test "x$enable_warnings" = "xyes"; then
17375
17376         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17377
17378         if test "x$cf_with_cxx" = xyes ; then
17379
17380 INTEL_CPLUSPLUS=no
17381
17382 if test "$GCC" = yes ; then
17383         case "$host_os" in
17384         (linux*|gnu*)
17385                 echo "$as_me:17385: checking if this is really Intel C++ compiler" >&5
17386 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17387                 cf_save_CFLAGS="$CXXFLAGS"
17388                 CXXFLAGS="$CXXFLAGS -no-gcc"
17389                 cat >"conftest.$ac_ext" <<_ACEOF
17390 #line 17390 "configure"
17391 #include "confdefs.h"
17392
17393 int
17394 main (void)
17395 {
17396
17397 #ifdef __INTEL_COMPILER
17398 #else
17399 make an error
17400 #endif
17401
17402   ;
17403   return 0;
17404 }
17405 _ACEOF
17406 rm -f "conftest.$ac_objext"
17407 if { (eval echo "$as_me:17407: \"$ac_compile\"") >&5
17408   (eval $ac_compile) 2>&5
17409   ac_status=$?
17410   echo "$as_me:17410: \$? = $ac_status" >&5
17411   (exit "$ac_status"); } &&
17412          { ac_try='test -s "conftest.$ac_objext"'
17413   { (eval echo "$as_me:17413: \"$ac_try\"") >&5
17414   (eval $ac_try) 2>&5
17415   ac_status=$?
17416   echo "$as_me:17416: \$? = $ac_status" >&5
17417   (exit "$ac_status"); }; }; then
17418   INTEL_CPLUSPLUS=yes
17419 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17420
17421 else
17422   echo "$as_me: failed program was:" >&5
17423 cat "conftest.$ac_ext" >&5
17424 fi
17425 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17426                 CXXFLAGS="$cf_save_CFLAGS"
17427                 echo "$as_me:17427: result: $INTEL_CPLUSPLUS" >&5
17428 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17429                 ;;
17430         esac
17431 fi
17432
17433 CLANG_CPLUSPLUS=no
17434
17435 if test "$GCC" = yes ; then
17436         echo "$as_me:17436: checking if this is really Clang C++ compiler" >&5
17437 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17438         cf_save_CFLAGS="$CXXFLAGS"
17439         cat >"conftest.$ac_ext" <<_ACEOF
17440 #line 17440 "configure"
17441 #include "confdefs.h"
17442
17443 int
17444 main (void)
17445 {
17446
17447 #ifdef __clang__
17448 #else
17449 make an error
17450 #endif
17451
17452   ;
17453   return 0;
17454 }
17455 _ACEOF
17456 rm -f "conftest.$ac_objext"
17457 if { (eval echo "$as_me:17457: \"$ac_compile\"") >&5
17458   (eval $ac_compile) 2>&5
17459   ac_status=$?
17460   echo "$as_me:17460: \$? = $ac_status" >&5
17461   (exit "$ac_status"); } &&
17462          { ac_try='test -s "conftest.$ac_objext"'
17463   { (eval echo "$as_me:17463: \"$ac_try\"") >&5
17464   (eval $ac_try) 2>&5
17465   ac_status=$?
17466   echo "$as_me:17466: \$? = $ac_status" >&5
17467   (exit "$ac_status"); }; }; then
17468   CLANG_CPLUSPLUS=yes
17469
17470 else
17471   echo "$as_me: failed program was:" >&5
17472 cat "conftest.$ac_ext" >&5
17473 fi
17474 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17475         CXXFLAGS="$cf_save_CFLAGS"
17476         echo "$as_me:17476: result: $CLANG_CPLUSPLUS" >&5
17477 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17478 fi
17479
17480 CLANG_VERSION=none
17481
17482 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17483         case "$CC" in
17484         (c[1-9][0-9]|*/c[1-9][0-9])
17485                 { echo "$as_me:17485: WARNING: replacing broken compiler alias $CC" >&5
17486 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17487                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17488                 CC=clang
17489                 ;;
17490         esac
17491
17492         echo "$as_me:17492: checking version of $CC" >&5
17493 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17494         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.].*//'`"
17495         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17496         echo "$as_me:17496: result: $CLANG_VERSION" >&5
17497 echo "${ECHO_T}$CLANG_VERSION" >&6
17498
17499         for cf_clang_opt in \
17500                 -Qunused-arguments \
17501                 -Wno-error=implicit-function-declaration
17502         do
17503                 echo "$as_me:17503: checking if option $cf_clang_opt works" >&5
17504 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17505                 cf_save_CFLAGS="$CFLAGS"
17506                 CFLAGS="$CFLAGS $cf_clang_opt"
17507                 cat >"conftest.$ac_ext" <<_ACEOF
17508 #line 17508 "configure"
17509 #include "confdefs.h"
17510
17511                         #include <stdio.h>
17512 int
17513 main (void)
17514 {
17515
17516                         printf("hello!\\n");
17517   ;
17518   return 0;
17519 }
17520 _ACEOF
17521 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17522 if { (eval echo "$as_me:17522: \"$ac_link\"") >&5
17523   (eval $ac_link) 2>&5
17524   ac_status=$?
17525   echo "$as_me:17525: \$? = $ac_status" >&5
17526   (exit "$ac_status"); } &&
17527          { ac_try='test -s "conftest$ac_exeext"'
17528   { (eval echo "$as_me:17528: \"$ac_try\"") >&5
17529   (eval $ac_try) 2>&5
17530   ac_status=$?
17531   echo "$as_me:17531: \$? = $ac_status" >&5
17532   (exit "$ac_status"); }; }; then
17533
17534                         cf_clang_optok=yes
17535 else
17536   echo "$as_me: failed program was:" >&5
17537 cat "conftest.$ac_ext" >&5
17538
17539                         cf_clang_optok=no
17540 fi
17541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17542                 echo "$as_me:17542: result: $cf_clang_optok" >&5
17543 echo "${ECHO_T}$cf_clang_optok" >&6
17544                 CFLAGS="$cf_save_CFLAGS"
17545                 if test "$cf_clang_optok" = yes; then
17546                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17547
17548 echo "${as_me:-configure}:17548: testing adding option $cf_clang_opt ..." 1>&5
17549
17550         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17551         CFLAGS="${CFLAGS}$cf_clang_opt"
17552
17553                 fi
17554         done
17555 fi
17556
17557 ac_ext=cc
17558 ac_cpp='$CXXCPP $CPPFLAGS'
17559 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17560 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17561 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17562 ac_main_return="return"
17563
17564 cat > conftest.$ac_ext <<EOF
17565 #line 17565 "configure"
17566 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17567 EOF
17568
17569 if test "$INTEL_CPLUSPLUS" = yes
17570 then
17571 # The "-wdXXX" options suppress warnings:
17572 # remark #1419: external declaration in primary source file
17573 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17574 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17575 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17576 # remark #193: zero used for undefined preprocessing identifier
17577 # remark #593: variable "curs_sb_left_arrow" was set but never used
17578 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17579 # remark #869: parameter "tw" was never referenced
17580 # remark #981: operands are evaluated in unspecified order
17581 # warning #269: invalid format string conversion
17582
17583         { echo "$as_me:17583: checking for $CC warning options..." >&5
17584 echo "$as_me: checking for $CC warning options..." >&6;}
17585         cf_save_CXXFLAGS="$CXXFLAGS"
17586         EXTRA_CXXFLAGS="-Wall"
17587         for cf_opt in \
17588                 wd1419 \
17589                 wd1682 \
17590                 wd1683 \
17591                 wd1684 \
17592                 wd193 \
17593                 wd279 \
17594                 wd593 \
17595                 wd810 \
17596                 wd869 \
17597                 wd981
17598         do
17599                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17600                 if { (eval echo "$as_me:17600: \"$ac_compile\"") >&5
17601   (eval $ac_compile) 2>&5
17602   ac_status=$?
17603   echo "$as_me:17603: \$? = $ac_status" >&5
17604   (exit "$ac_status"); }; then
17605                         test -n "$verbose" && echo "$as_me:17605: result: ... -$cf_opt" >&5
17606 echo "${ECHO_T}... -$cf_opt" >&6
17607                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17608                 fi
17609         done
17610         CXXFLAGS="$cf_save_CXXFLAGS"
17611
17612 elif test "$GXX" = yes
17613 then
17614         { echo "$as_me:17614: checking for $CXX warning options..." >&5
17615 echo "$as_me: checking for $CXX warning options..." >&6;}
17616         cf_save_CXXFLAGS="$CXXFLAGS"
17617         EXTRA_CXXFLAGS="-W -Wall"
17618         cf_gxx_extra_warnings=""
17619         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17620         case "$GXX_VERSION" in
17621         ([1-2].*)
17622                 ;;
17623         (*)
17624                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17625                 ;;
17626         esac
17627         for cf_opt in \
17628                 Wabi \
17629                 fabi-version=0 \
17630                 Wextra \
17631                 Wignored-qualifiers \
17632                 Wlogical-op \
17633                 Woverloaded-virtual \
17634                 Wsign-promo \
17635                 Wsynth \
17636                 Wold-style-cast \
17637                 Wcast-align \
17638                 Wcast-qual \
17639                 Wpointer-arith \
17640                 Wshadow \
17641                 Wundef $cf_gxx_extra_warnings Wno-unused
17642         do
17643                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17644                 if { (eval echo "$as_me:17644: \"$ac_compile\"") >&5
17645   (eval $ac_compile) 2>&5
17646   ac_status=$?
17647   echo "$as_me:17647: \$? = $ac_status" >&5
17648   (exit "$ac_status"); }; then
17649                         test -n "$verbose" && echo "$as_me:17649: result: ... -$cf_opt" >&5
17650 echo "${ECHO_T}... -$cf_opt" >&6
17651                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17652                 else
17653                         test -n "$verbose" && echo "$as_me:17653: result: ... no -$cf_opt" >&5
17654 echo "${ECHO_T}... no -$cf_opt" >&6
17655                 fi
17656         done
17657         CXXFLAGS="$cf_save_CXXFLAGS"
17658 fi
17659
17660 rm -rf ./conftest*
17661 ac_ext=c
17662 ac_cpp='$CPP $CPPFLAGS'
17663 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17664 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17666 ac_main_return="return"
17667
17668         fi
17669 fi
17670
17671 echo "$as_me:17671: checking if you want to work around bogus compiler/loader warnings" >&5
17672 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17673
17674 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17675 if test "${enable_string_hacks+set}" = set; then
17676   enableval="$enable_string_hacks"
17677   enable_string_hacks=$enableval
17678 else
17679   enable_string_hacks=no
17680 fi;
17681 echo "$as_me:17681: result: $enable_string_hacks" >&5
17682 echo "${ECHO_T}$enable_string_hacks" >&6
17683
17684 if test "x$enable_string_hacks" = "xyes"; then
17685
17686 cat >>confdefs.h <<\EOF
17687 #define USE_STRING_HACKS 1
17688 EOF
17689
17690         { echo "$as_me:17690: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17691 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17692         echo "$as_me:17692: checking for strlcat" >&5
17693 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17694 if test "${ac_cv_func_strlcat+set}" = set; then
17695   echo $ECHO_N "(cached) $ECHO_C" >&6
17696 else
17697   cat >"conftest.$ac_ext" <<_ACEOF
17698 #line 17698 "configure"
17699 #include "confdefs.h"
17700 #define strlcat autoconf_temporary
17701 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17702 #undef strlcat
17703
17704 #ifdef __cplusplus
17705 extern "C"
17706 #endif
17707
17708 /* We use char because int might match the return type of a gcc2
17709    builtin and then its argument prototype would still apply.  */
17710 char strlcat (void);
17711
17712 int
17713 main (void)
17714 {
17715
17716 /* The GNU C library defines stubs for functions which it implements
17717     to always fail with ENOSYS.  Some functions are actually named
17718     something starting with __ and the normal name is an alias.  */
17719 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17720 #error found stub for strlcat
17721 #endif
17722
17723         return strlcat ();
17724   ;
17725   return 0;
17726 }
17727 _ACEOF
17728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17729 if { (eval echo "$as_me:17729: \"$ac_link\"") >&5
17730   (eval $ac_link) 2>&5
17731   ac_status=$?
17732   echo "$as_me:17732: \$? = $ac_status" >&5
17733   (exit "$ac_status"); } &&
17734          { ac_try='test -s "conftest$ac_exeext"'
17735   { (eval echo "$as_me:17735: \"$ac_try\"") >&5
17736   (eval $ac_try) 2>&5
17737   ac_status=$?
17738   echo "$as_me:17738: \$? = $ac_status" >&5
17739   (exit "$ac_status"); }; }; then
17740   ac_cv_func_strlcat=yes
17741 else
17742   echo "$as_me: failed program was:" >&5
17743 cat "conftest.$ac_ext" >&5
17744 ac_cv_func_strlcat=no
17745 fi
17746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17747 fi
17748 echo "$as_me:17748: result: $ac_cv_func_strlcat" >&5
17749 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17750 if test "$ac_cv_func_strlcat" = yes; then
17751
17752 cat >>confdefs.h <<\EOF
17753 #define HAVE_STRLCAT 1
17754 EOF
17755
17756 else
17757
17758                 echo "$as_me:17758: checking for strlcat in -lbsd" >&5
17759 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17760 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17761   echo $ECHO_N "(cached) $ECHO_C" >&6
17762 else
17763   ac_check_lib_save_LIBS=$LIBS
17764 LIBS="-lbsd  $LIBS"
17765 cat >"conftest.$ac_ext" <<_ACEOF
17766 #line 17766 "configure"
17767 #include "confdefs.h"
17768
17769 /* Override any gcc2 internal prototype to avoid an error.  */
17770 #ifdef __cplusplus
17771 extern "C"
17772 #endif
17773 /* We use char because int might match the return type of a gcc2
17774    builtin and then its argument prototype would still apply.  */
17775 char strlcat ();
17776 int
17777 main (void)
17778 {
17779 strlcat ();
17780   ;
17781   return 0;
17782 }
17783 _ACEOF
17784 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17785 if { (eval echo "$as_me:17785: \"$ac_link\"") >&5
17786   (eval $ac_link) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit "$ac_status"); } &&
17790          { ac_try='test -s "conftest$ac_exeext"'
17791   { (eval echo "$as_me:17791: \"$ac_try\"") >&5
17792   (eval $ac_try) 2>&5
17793   ac_status=$?
17794   echo "$as_me:17794: \$? = $ac_status" >&5
17795   (exit "$ac_status"); }; }; then
17796   ac_cv_lib_bsd_strlcat=yes
17797 else
17798   echo "$as_me: failed program was:" >&5
17799 cat "conftest.$ac_ext" >&5
17800 ac_cv_lib_bsd_strlcat=no
17801 fi
17802 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17803 LIBS=$ac_check_lib_save_LIBS
17804 fi
17805 echo "$as_me:17805: result: $ac_cv_lib_bsd_strlcat" >&5
17806 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17807 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17808
17809 cf_add_libs="$LIBS"
17810 # reverse order
17811 cf_add_0lib=
17812 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17813 # filter duplicates
17814 for cf_add_1lib in $cf_add_0lib; do
17815         for cf_add_2lib in $cf_add_libs; do
17816                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17817                         cf_add_1lib=
17818                         break
17819                 fi
17820         done
17821         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17822 done
17823 LIBS="$cf_add_libs"
17824
17825 for ac_header in bsd/string.h
17826 do
17827 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17828 echo "$as_me:17828: checking for $ac_header" >&5
17829 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17830 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17831   echo $ECHO_N "(cached) $ECHO_C" >&6
17832 else
17833   cat >"conftest.$ac_ext" <<_ACEOF
17834 #line 17834 "configure"
17835 #include "confdefs.h"
17836 #include <$ac_header>
17837 _ACEOF
17838 if { (eval echo "$as_me:17838: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17839   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17840   ac_status=$?
17841   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17842   rm -f conftest.er1
17843   cat conftest.err >&5
17844   echo "$as_me:17844: \$? = $ac_status" >&5
17845   (exit "$ac_status"); } >/dev/null; then
17846   if test -s conftest.err; then
17847     ac_cpp_err=$ac_c_preproc_warn_flag
17848   else
17849     ac_cpp_err=
17850   fi
17851 else
17852   ac_cpp_err=yes
17853 fi
17854 if test -z "$ac_cpp_err"; then
17855   eval "$as_ac_Header=yes"
17856 else
17857   echo "$as_me: failed program was:" >&5
17858   cat "conftest.$ac_ext" >&5
17859   eval "$as_ac_Header=no"
17860 fi
17861 rm -f conftest.err "conftest.$ac_ext"
17862 fi
17863 echo "$as_me:17863: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17864 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17865 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17866   cat >>confdefs.h <<EOF
17867 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17868 EOF
17869
17870 fi
17871 done
17872
17873 cat >>confdefs.h <<\EOF
17874 #define HAVE_STRLCAT 1
17875 EOF
17876
17877 fi
17878
17879 fi
17880
17881 for ac_func in strlcpy snprintf
17882 do
17883 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17884 echo "$as_me:17884: checking for $ac_func" >&5
17885 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17886 if eval "test \"\${$as_ac_var+set}\" = set"; then
17887   echo $ECHO_N "(cached) $ECHO_C" >&6
17888 else
17889   cat >"conftest.$ac_ext" <<_ACEOF
17890 #line 17890 "configure"
17891 #include "confdefs.h"
17892 #define $ac_func autoconf_temporary
17893 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17894 #undef $ac_func
17895
17896 #ifdef __cplusplus
17897 extern "C"
17898 #endif
17899
17900 /* We use char because int might match the return type of a gcc2
17901    builtin and then its argument prototype would still apply.  */
17902 char $ac_func (void);
17903
17904 int
17905 main (void)
17906 {
17907
17908 /* The GNU C library defines stubs for functions which it implements
17909     to always fail with ENOSYS.  Some functions are actually named
17910     something starting with __ and the normal name is an alias.  */
17911 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17912 #error found stub for $ac_func
17913 #endif
17914
17915         return $ac_func ();
17916   ;
17917   return 0;
17918 }
17919 _ACEOF
17920 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17921 if { (eval echo "$as_me:17921: \"$ac_link\"") >&5
17922   (eval $ac_link) 2>&5
17923   ac_status=$?
17924   echo "$as_me:17924: \$? = $ac_status" >&5
17925   (exit "$ac_status"); } &&
17926          { ac_try='test -s "conftest$ac_exeext"'
17927   { (eval echo "$as_me:17927: \"$ac_try\"") >&5
17928   (eval $ac_try) 2>&5
17929   ac_status=$?
17930   echo "$as_me:17930: \$? = $ac_status" >&5
17931   (exit "$ac_status"); }; }; then
17932   eval "$as_ac_var=yes"
17933 else
17934   echo "$as_me: failed program was:" >&5
17935 cat "conftest.$ac_ext" >&5
17936 eval "$as_ac_var=no"
17937 fi
17938 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17939 fi
17940 echo "$as_me:17940: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17941 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17942 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17943   cat >>confdefs.h <<EOF
17944 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17945 EOF
17946
17947 fi
17948 done
17949
17950 fi
17951
17952 ###     use option --enable-assertions to turn on generation of assertion code
17953 echo "$as_me:17953: checking if you want to enable runtime assertions" >&5
17954 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17955
17956 # Check whether --enable-assertions or --disable-assertions was given.
17957 if test "${enable_assertions+set}" = set; then
17958   enableval="$enable_assertions"
17959   with_assertions=$enableval
17960 else
17961   with_assertions=no
17962 fi;
17963 echo "$as_me:17963: result: $with_assertions" >&5
17964 echo "${ECHO_T}$with_assertions" >&6
17965 if test -n "$GCC"
17966 then
17967         if test "$with_assertions" = no
17968         then
17969                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17970         else
17971
17972         ADAFLAGS="$ADAFLAGS -gnata"
17973
17974         fi
17975 fi
17976
17977 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17978
17979 echo "$as_me:17979: checking if you want to use dmalloc for testing" >&5
17980 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17981
17982 # Check whether --with-dmalloc or --without-dmalloc was given.
17983 if test "${with_dmalloc+set}" = set; then
17984   withval="$with_dmalloc"
17985   case "x$withval" in
17986         (x|xno) ;;
17987         (*)
17988                 : "${with_cflags:=-g}"
17989                 : "${enable_leaks:=no}"
17990                 with_dmalloc=yes
17991
17992 cat >>confdefs.h <<EOF
17993 #define USE_DMALLOC 1
17994 EOF
17995
17996                 ;;
17997         esac
17998 else
17999   with_dmalloc=
18000 fi;
18001 echo "$as_me:18001: result: ${with_dmalloc:-no}" >&5
18002 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18003
18004 case ".$with_cflags" in
18005 (.*-g*)
18006         case .$CFLAGS in
18007         (.*-g*)
18008                 ;;
18009         (*)
18010
18011 cf_fix_cppflags=no
18012 cf_new_cflags=
18013 cf_new_cppflags=
18014 cf_new_extra_cppflags=
18015
18016 for cf_add_cflags in -g
18017 do
18018 case "$cf_fix_cppflags" in
18019 (no)
18020         case "$cf_add_cflags" in
18021         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18022                 case "$cf_add_cflags" in
18023                 (-D*)
18024                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18025
18026                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18027                                 && test -z "${cf_tst_cflags}" \
18028                                 && cf_fix_cppflags=yes
18029
18030                         if test "$cf_fix_cppflags" = yes ; then
18031
18032         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18033         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18034
18035                                 continue
18036                         elif test "${cf_tst_cflags}" = "\"'" ; then
18037
18038         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18039         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18040
18041                                 continue
18042                         fi
18043                         ;;
18044                 esac
18045                 case "$CPPFLAGS" in
18046                 (*$cf_add_cflags)
18047                         ;;
18048                 (*)
18049                         case "$cf_add_cflags" in
18050                         (-D*)
18051                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18052
18053 CPPFLAGS=`echo "$CPPFLAGS" | \
18054         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18055                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18056
18057                                 ;;
18058                         esac
18059
18060         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18061         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18062
18063                         ;;
18064                 esac
18065                 ;;
18066         (*)
18067
18068         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18069         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18070
18071                 ;;
18072         esac
18073         ;;
18074 (yes)
18075
18076         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18077         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18078
18079         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18080
18081         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18082                 && test -z "${cf_tst_cflags}" \
18083                 && cf_fix_cppflags=no
18084         ;;
18085 esac
18086 done
18087
18088 if test -n "$cf_new_cflags" ; then
18089
18090         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18091         CFLAGS="${CFLAGS}$cf_new_cflags"
18092
18093 fi
18094
18095 if test -n "$cf_new_cppflags" ; then
18096
18097         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18098         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18099
18100 fi
18101
18102 if test -n "$cf_new_extra_cppflags" ; then
18103
18104         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18105         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18106
18107 fi
18108
18109                 ;;
18110         esac
18111         ;;
18112 esac
18113
18114 if test "$with_dmalloc" = yes ; then
18115         echo "$as_me:18115: checking for dmalloc.h" >&5
18116 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18117 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18118   echo $ECHO_N "(cached) $ECHO_C" >&6
18119 else
18120   cat >"conftest.$ac_ext" <<_ACEOF
18121 #line 18121 "configure"
18122 #include "confdefs.h"
18123 #include <dmalloc.h>
18124 _ACEOF
18125 if { (eval echo "$as_me:18125: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18126   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18127   ac_status=$?
18128   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18129   rm -f conftest.er1
18130   cat conftest.err >&5
18131   echo "$as_me:18131: \$? = $ac_status" >&5
18132   (exit "$ac_status"); } >/dev/null; then
18133   if test -s conftest.err; then
18134     ac_cpp_err=$ac_c_preproc_warn_flag
18135   else
18136     ac_cpp_err=
18137   fi
18138 else
18139   ac_cpp_err=yes
18140 fi
18141 if test -z "$ac_cpp_err"; then
18142   ac_cv_header_dmalloc_h=yes
18143 else
18144   echo "$as_me: failed program was:" >&5
18145   cat "conftest.$ac_ext" >&5
18146   ac_cv_header_dmalloc_h=no
18147 fi
18148 rm -f conftest.err "conftest.$ac_ext"
18149 fi
18150 echo "$as_me:18150: result: $ac_cv_header_dmalloc_h" >&5
18151 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18152 if test "$ac_cv_header_dmalloc_h" = yes; then
18153
18154 echo "$as_me:18154: checking for dmalloc_debug in -ldmalloc" >&5
18155 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18156 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18157   echo $ECHO_N "(cached) $ECHO_C" >&6
18158 else
18159   ac_check_lib_save_LIBS=$LIBS
18160 LIBS="-ldmalloc  $LIBS"
18161 cat >"conftest.$ac_ext" <<_ACEOF
18162 #line 18162 "configure"
18163 #include "confdefs.h"
18164
18165 /* Override any gcc2 internal prototype to avoid an error.  */
18166 #ifdef __cplusplus
18167 extern "C"
18168 #endif
18169 /* We use char because int might match the return type of a gcc2
18170    builtin and then its argument prototype would still apply.  */
18171 char dmalloc_debug ();
18172 int
18173 main (void)
18174 {
18175 dmalloc_debug ();
18176   ;
18177   return 0;
18178 }
18179 _ACEOF
18180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18181 if { (eval echo "$as_me:18181: \"$ac_link\"") >&5
18182   (eval $ac_link) 2>&5
18183   ac_status=$?
18184   echo "$as_me:18184: \$? = $ac_status" >&5
18185   (exit "$ac_status"); } &&
18186          { ac_try='test -s "conftest$ac_exeext"'
18187   { (eval echo "$as_me:18187: \"$ac_try\"") >&5
18188   (eval $ac_try) 2>&5
18189   ac_status=$?
18190   echo "$as_me:18190: \$? = $ac_status" >&5
18191   (exit "$ac_status"); }; }; then
18192   ac_cv_lib_dmalloc_dmalloc_debug=yes
18193 else
18194   echo "$as_me: failed program was:" >&5
18195 cat "conftest.$ac_ext" >&5
18196 ac_cv_lib_dmalloc_dmalloc_debug=no
18197 fi
18198 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18199 LIBS=$ac_check_lib_save_LIBS
18200 fi
18201 echo "$as_me:18201: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18202 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18203 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18204   cat >>confdefs.h <<EOF
18205 #define HAVE_LIBDMALLOC 1
18206 EOF
18207
18208   LIBS="-ldmalloc $LIBS"
18209
18210 fi
18211
18212 fi
18213
18214 fi
18215
18216 echo "$as_me:18216: checking if you want to use dbmalloc for testing" >&5
18217 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18218
18219 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18220 if test "${with_dbmalloc+set}" = set; then
18221   withval="$with_dbmalloc"
18222   case "x$withval" in
18223         (x|xno) ;;
18224         (*)
18225                 : "${with_cflags:=-g}"
18226                 : "${enable_leaks:=no}"
18227                 with_dbmalloc=yes
18228
18229 cat >>confdefs.h <<EOF
18230 #define USE_DBMALLOC 1
18231 EOF
18232
18233                 ;;
18234         esac
18235 else
18236   with_dbmalloc=
18237 fi;
18238 echo "$as_me:18238: result: ${with_dbmalloc:-no}" >&5
18239 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18240
18241 case ".$with_cflags" in
18242 (.*-g*)
18243         case .$CFLAGS in
18244         (.*-g*)
18245                 ;;
18246         (*)
18247
18248 cf_fix_cppflags=no
18249 cf_new_cflags=
18250 cf_new_cppflags=
18251 cf_new_extra_cppflags=
18252
18253 for cf_add_cflags in -g
18254 do
18255 case "$cf_fix_cppflags" in
18256 (no)
18257         case "$cf_add_cflags" in
18258         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18259                 case "$cf_add_cflags" in
18260                 (-D*)
18261                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18262
18263                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18264                                 && test -z "${cf_tst_cflags}" \
18265                                 && cf_fix_cppflags=yes
18266
18267                         if test "$cf_fix_cppflags" = yes ; then
18268
18269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18271
18272                                 continue
18273                         elif test "${cf_tst_cflags}" = "\"'" ; then
18274
18275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18277
18278                                 continue
18279                         fi
18280                         ;;
18281                 esac
18282                 case "$CPPFLAGS" in
18283                 (*$cf_add_cflags)
18284                         ;;
18285                 (*)
18286                         case "$cf_add_cflags" in
18287                         (-D*)
18288                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18289
18290 CPPFLAGS=`echo "$CPPFLAGS" | \
18291         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18292                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18293
18294                                 ;;
18295                         esac
18296
18297         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18298         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18299
18300                         ;;
18301                 esac
18302                 ;;
18303         (*)
18304
18305         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18306         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18307
18308                 ;;
18309         esac
18310         ;;
18311 (yes)
18312
18313         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18314         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18315
18316         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18317
18318         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18319                 && test -z "${cf_tst_cflags}" \
18320                 && cf_fix_cppflags=no
18321         ;;
18322 esac
18323 done
18324
18325 if test -n "$cf_new_cflags" ; then
18326
18327         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18328         CFLAGS="${CFLAGS}$cf_new_cflags"
18329
18330 fi
18331
18332 if test -n "$cf_new_cppflags" ; then
18333
18334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18335         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18336
18337 fi
18338
18339 if test -n "$cf_new_extra_cppflags" ; then
18340
18341         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18342         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18343
18344 fi
18345
18346                 ;;
18347         esac
18348         ;;
18349 esac
18350
18351 if test "$with_dbmalloc" = yes ; then
18352         echo "$as_me:18352: checking for dbmalloc.h" >&5
18353 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18354 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18355   echo $ECHO_N "(cached) $ECHO_C" >&6
18356 else
18357   cat >"conftest.$ac_ext" <<_ACEOF
18358 #line 18358 "configure"
18359 #include "confdefs.h"
18360 #include <dbmalloc.h>
18361 _ACEOF
18362 if { (eval echo "$as_me:18362: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18363   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18364   ac_status=$?
18365   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18366   rm -f conftest.er1
18367   cat conftest.err >&5
18368   echo "$as_me:18368: \$? = $ac_status" >&5
18369   (exit "$ac_status"); } >/dev/null; then
18370   if test -s conftest.err; then
18371     ac_cpp_err=$ac_c_preproc_warn_flag
18372   else
18373     ac_cpp_err=
18374   fi
18375 else
18376   ac_cpp_err=yes
18377 fi
18378 if test -z "$ac_cpp_err"; then
18379   ac_cv_header_dbmalloc_h=yes
18380 else
18381   echo "$as_me: failed program was:" >&5
18382   cat "conftest.$ac_ext" >&5
18383   ac_cv_header_dbmalloc_h=no
18384 fi
18385 rm -f conftest.err "conftest.$ac_ext"
18386 fi
18387 echo "$as_me:18387: result: $ac_cv_header_dbmalloc_h" >&5
18388 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18389 if test "$ac_cv_header_dbmalloc_h" = yes; then
18390
18391 echo "$as_me:18391: checking for debug_malloc in -ldbmalloc" >&5
18392 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18393 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18394   echo $ECHO_N "(cached) $ECHO_C" >&6
18395 else
18396   ac_check_lib_save_LIBS=$LIBS
18397 LIBS="-ldbmalloc  $LIBS"
18398 cat >"conftest.$ac_ext" <<_ACEOF
18399 #line 18399 "configure"
18400 #include "confdefs.h"
18401
18402 /* Override any gcc2 internal prototype to avoid an error.  */
18403 #ifdef __cplusplus
18404 extern "C"
18405 #endif
18406 /* We use char because int might match the return type of a gcc2
18407    builtin and then its argument prototype would still apply.  */
18408 char debug_malloc ();
18409 int
18410 main (void)
18411 {
18412 debug_malloc ();
18413   ;
18414   return 0;
18415 }
18416 _ACEOF
18417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18418 if { (eval echo "$as_me:18418: \"$ac_link\"") >&5
18419   (eval $ac_link) 2>&5
18420   ac_status=$?
18421   echo "$as_me:18421: \$? = $ac_status" >&5
18422   (exit "$ac_status"); } &&
18423          { ac_try='test -s "conftest$ac_exeext"'
18424   { (eval echo "$as_me:18424: \"$ac_try\"") >&5
18425   (eval $ac_try) 2>&5
18426   ac_status=$?
18427   echo "$as_me:18427: \$? = $ac_status" >&5
18428   (exit "$ac_status"); }; }; then
18429   ac_cv_lib_dbmalloc_debug_malloc=yes
18430 else
18431   echo "$as_me: failed program was:" >&5
18432 cat "conftest.$ac_ext" >&5
18433 ac_cv_lib_dbmalloc_debug_malloc=no
18434 fi
18435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18436 LIBS=$ac_check_lib_save_LIBS
18437 fi
18438 echo "$as_me:18438: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18439 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18440 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18441   cat >>confdefs.h <<EOF
18442 #define HAVE_LIBDBMALLOC 1
18443 EOF
18444
18445   LIBS="-ldbmalloc $LIBS"
18446
18447 fi
18448
18449 fi
18450
18451 fi
18452
18453 echo "$as_me:18453: checking if you want to use valgrind for testing" >&5
18454 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18455
18456 # Check whether --with-valgrind or --without-valgrind was given.
18457 if test "${with_valgrind+set}" = set; then
18458   withval="$with_valgrind"
18459   case "x$withval" in
18460         (x|xno) ;;
18461         (*)
18462                 : "${with_cflags:=-g}"
18463                 : "${enable_leaks:=no}"
18464                 with_valgrind=yes
18465
18466 cat >>confdefs.h <<EOF
18467 #define USE_VALGRIND 1
18468 EOF
18469
18470                 ;;
18471         esac
18472 else
18473   with_valgrind=
18474 fi;
18475 echo "$as_me:18475: result: ${with_valgrind:-no}" >&5
18476 echo "${ECHO_T}${with_valgrind:-no}" >&6
18477
18478 case ".$with_cflags" in
18479 (.*-g*)
18480         case .$CFLAGS in
18481         (.*-g*)
18482                 ;;
18483         (*)
18484
18485 cf_fix_cppflags=no
18486 cf_new_cflags=
18487 cf_new_cppflags=
18488 cf_new_extra_cppflags=
18489
18490 for cf_add_cflags in -g
18491 do
18492 case "$cf_fix_cppflags" in
18493 (no)
18494         case "$cf_add_cflags" in
18495         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18496                 case "$cf_add_cflags" in
18497                 (-D*)
18498                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18499
18500                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18501                                 && test -z "${cf_tst_cflags}" \
18502                                 && cf_fix_cppflags=yes
18503
18504                         if test "$cf_fix_cppflags" = yes ; then
18505
18506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18508
18509                                 continue
18510                         elif test "${cf_tst_cflags}" = "\"'" ; then
18511
18512         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18513         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18514
18515                                 continue
18516                         fi
18517                         ;;
18518                 esac
18519                 case "$CPPFLAGS" in
18520                 (*$cf_add_cflags)
18521                         ;;
18522                 (*)
18523                         case "$cf_add_cflags" in
18524                         (-D*)
18525                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18526
18527 CPPFLAGS=`echo "$CPPFLAGS" | \
18528         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18529                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18530
18531                                 ;;
18532                         esac
18533
18534         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18535         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18536
18537                         ;;
18538                 esac
18539                 ;;
18540         (*)
18541
18542         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18543         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18544
18545                 ;;
18546         esac
18547         ;;
18548 (yes)
18549
18550         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18551         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18552
18553         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18554
18555         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18556                 && test -z "${cf_tst_cflags}" \
18557                 && cf_fix_cppflags=no
18558         ;;
18559 esac
18560 done
18561
18562 if test -n "$cf_new_cflags" ; then
18563
18564         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18565         CFLAGS="${CFLAGS}$cf_new_cflags"
18566
18567 fi
18568
18569 if test -n "$cf_new_cppflags" ; then
18570
18571         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18572         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18573
18574 fi
18575
18576 if test -n "$cf_new_extra_cppflags" ; then
18577
18578         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18579         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18580
18581 fi
18582
18583                 ;;
18584         esac
18585         ;;
18586 esac
18587
18588 echo "$as_me:18588: checking if you want to perform memory-leak testing" >&5
18589 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18590
18591 # Check whether --enable-leaks or --disable-leaks was given.
18592 if test "${enable_leaks+set}" = set; then
18593   enableval="$enable_leaks"
18594   enable_leaks=$enableval
18595 else
18596   enable_leaks=yes
18597 fi;
18598 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18599 echo "$as_me:18599: result: $with_no_leaks" >&5
18600 echo "${ECHO_T}$with_no_leaks" >&6
18601
18602 if test "$enable_leaks" = no ; then
18603
18604 cat >>confdefs.h <<\EOF
18605 #define NO_LEAKS 1
18606 EOF
18607
18608 cat >>confdefs.h <<\EOF
18609 #define YY_NO_LEAKS 1
18610 EOF
18611
18612 fi
18613
18614 cat >>confdefs.h <<\EOF
18615 #define HAVE_NC_ALLOC_H 1
18616 EOF
18617
18618 ###     use option --enable-expanded to generate certain macros as functions
18619
18620 # Check whether --enable-expanded or --disable-expanded was given.
18621 if test "${enable_expanded+set}" = set; then
18622   enableval="$enable_expanded"
18623   test "x$enableval" = xyes &&
18624 cat >>confdefs.h <<\EOF
18625 #define NCURSES_EXPANDED 1
18626 EOF
18627
18628 fi;
18629
18630 ###     use option --disable-macros to suppress macros in favor of functions
18631
18632 # Check whether --enable-macros or --disable-macros was given.
18633 if test "${enable_macros+set}" = set; then
18634   enableval="$enable_macros"
18635   test "$enableval" = no &&
18636 cat >>confdefs.h <<\EOF
18637 #define NCURSES_NOMACROS 1
18638 EOF
18639
18640 fi;
18641
18642 # Normally we only add trace() to the debug-library.  Allow this to be
18643 # extended to all models of the ncurses library:
18644 cf_all_traces=no
18645 case "$CFLAGS $CPPFLAGS" in
18646 (*-DTRACE*)
18647         cf_all_traces=yes
18648         ;;
18649 esac
18650
18651 echo "$as_me:18651: checking whether to add trace feature to all models" >&5
18652 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18653
18654 # Check whether --with-trace or --without-trace was given.
18655 if test "${with_trace+set}" = set; then
18656   withval="$with_trace"
18657   cf_with_trace=$withval
18658 else
18659   cf_with_trace=$cf_all_traces
18660 fi;
18661 echo "$as_me:18661: result: $cf_with_trace" >&5
18662 echo "${ECHO_T}$cf_with_trace" >&6
18663
18664 if test "x$cf_with_trace" = xyes ; then
18665         LIB_TRACING=all
18666         ADA_TRACE=TRUE
18667
18668 cf_fix_cppflags=no
18669 cf_new_cflags=
18670 cf_new_cppflags=
18671 cf_new_extra_cppflags=
18672
18673 for cf_add_cflags in -DTRACE
18674 do
18675 case "$cf_fix_cppflags" in
18676 (no)
18677         case "$cf_add_cflags" in
18678         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18679                 case "$cf_add_cflags" in
18680                 (-D*)
18681                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18682
18683                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18684                                 && test -z "${cf_tst_cflags}" \
18685                                 && cf_fix_cppflags=yes
18686
18687                         if test "$cf_fix_cppflags" = yes ; then
18688
18689         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18690         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18691
18692                                 continue
18693                         elif test "${cf_tst_cflags}" = "\"'" ; then
18694
18695         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18696         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18697
18698                                 continue
18699                         fi
18700                         ;;
18701                 esac
18702                 case "$CPPFLAGS" in
18703                 (*$cf_add_cflags)
18704                         ;;
18705                 (*)
18706                         case "$cf_add_cflags" in
18707                         (-D*)
18708                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18709
18710 CPPFLAGS=`echo "$CPPFLAGS" | \
18711         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18712                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18713
18714                                 ;;
18715                         esac
18716
18717         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18718         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18719
18720                         ;;
18721                 esac
18722                 ;;
18723         (*)
18724
18725         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18726         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18727
18728                 ;;
18729         esac
18730         ;;
18731 (yes)
18732
18733         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18734         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18735
18736         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18737
18738         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18739                 && test -z "${cf_tst_cflags}" \
18740                 && cf_fix_cppflags=no
18741         ;;
18742 esac
18743 done
18744
18745 if test -n "$cf_new_cflags" ; then
18746
18747         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18748         CFLAGS="${CFLAGS}$cf_new_cflags"
18749
18750 fi
18751
18752 if test -n "$cf_new_cppflags" ; then
18753
18754         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18755         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18756
18757 fi
18758
18759 if test -n "$cf_new_extra_cppflags" ; then
18760
18761         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18762         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18763
18764 fi
18765
18766 cat >>confdefs.h <<\EOF
18767 #define HAVE__TRACEF 1
18768 EOF
18769
18770 else
18771         LIB_TRACING=DEBUG
18772         ADA_TRACE=FALSE
18773 fi
18774
18775 echo "$as_me:18775: checking if we want to use GNAT projects" >&5
18776 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18777
18778 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18779 if test "${enable_gnat_projects+set}" = set; then
18780   enableval="$enable_gnat_projects"
18781   test "$enableval" != no && enableval=yes
18782         if test "$enableval" != "yes" ; then
18783     enable_gnat_projects=no
18784         else
18785                 enable_gnat_projects=yes
18786         fi
18787 else
18788   enableval=yes
18789         enable_gnat_projects=yes
18790
18791 fi;
18792 echo "$as_me:18792: result: $enable_gnat_projects" >&5
18793 echo "${ECHO_T}$enable_gnat_projects" >&6
18794
18795 ###     Checks for libraries.
18796 case "$cf_cv_system_name" in
18797 (*mingw32*|*mingw64*)
18798         # Note: WINVER may be a problem with Windows 10
18799         if test "x$with_exp_win32" = xyes ; then
18800                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18801         else
18802                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18803         fi
18804
18805 echo "$as_me:18805: checking if ssp library is needed" >&5
18806 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18807 if test "${cf_cv_need_libssp+set}" = set; then
18808   echo $ECHO_N "(cached) $ECHO_C" >&6
18809 else
18810
18811 cat >"conftest.$ac_ext" <<_ACEOF
18812 #line 18812 "configure"
18813 #include "confdefs.h"
18814
18815 #include <sys/types.h>
18816 #include <dirent.h>
18817
18818 int
18819 main (void)
18820 {
18821
18822        DIR *dp = opendir(".");
18823
18824   ;
18825   return 0;
18826 }
18827 _ACEOF
18828 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18829 if { (eval echo "$as_me:18829: \"$ac_link\"") >&5
18830   (eval $ac_link) 2>&5
18831   ac_status=$?
18832   echo "$as_me:18832: \$? = $ac_status" >&5
18833   (exit "$ac_status"); } &&
18834          { ac_try='test -s "conftest$ac_exeext"'
18835   { (eval echo "$as_me:18835: \"$ac_try\"") >&5
18836   (eval $ac_try) 2>&5
18837   ac_status=$?
18838   echo "$as_me:18838: \$? = $ac_status" >&5
18839   (exit "$ac_status"); }; }; then
18840   cf_cv_need_libssp=no
18841 else
18842   echo "$as_me: failed program was:" >&5
18843 cat "conftest.$ac_ext" >&5
18844
18845         cf_save_LIBS="$LIBS"
18846         LIBS="$LIBS -lssp"
18847         cat >"conftest.$ac_ext" <<_ACEOF
18848 #line 18848 "configure"
18849 #include "confdefs.h"
18850
18851 #include <sys/types.h>
18852 #include <dirent.h>
18853
18854 int
18855 main (void)
18856 {
18857
18858                    DIR *dp = opendir(".");
18859
18860   ;
18861   return 0;
18862 }
18863 _ACEOF
18864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18865 if { (eval echo "$as_me:18865: \"$ac_link\"") >&5
18866   (eval $ac_link) 2>&5
18867   ac_status=$?
18868   echo "$as_me:18868: \$? = $ac_status" >&5
18869   (exit "$ac_status"); } &&
18870          { ac_try='test -s "conftest$ac_exeext"'
18871   { (eval echo "$as_me:18871: \"$ac_try\"") >&5
18872   (eval $ac_try) 2>&5
18873   ac_status=$?
18874   echo "$as_me:18874: \$? = $ac_status" >&5
18875   (exit "$ac_status"); }; }; then
18876   cf_cv_need_libssp=yes
18877 else
18878   echo "$as_me: failed program was:" >&5
18879 cat "conftest.$ac_ext" >&5
18880 cf_cv_need_libssp=maybe
18881 fi
18882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18883         LIBS="$cf_save_LIBS"
18884
18885 fi
18886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18887 fi
18888 echo "$as_me:18888: result: $cf_cv_need_libssp" >&5
18889 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18890
18891 if test "x$cf_cv_need_libssp" = xyes
18892 then
18893
18894 cf_add_libs="$LIBS"
18895 # reverse order
18896 cf_add_0lib=
18897 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18898 # filter duplicates
18899 for cf_add_1lib in $cf_add_0lib; do
18900         for cf_add_2lib in $cf_add_libs; do
18901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18902                         cf_add_1lib=
18903                         break
18904                 fi
18905         done
18906         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18907 done
18908 LIBS="$cf_add_libs"
18909
18910 fi
18911
18912         ;;
18913 (*)
18914 echo "$as_me:18914: checking for gettimeofday" >&5
18915 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18916 if test "${ac_cv_func_gettimeofday+set}" = set; then
18917   echo $ECHO_N "(cached) $ECHO_C" >&6
18918 else
18919   cat >"conftest.$ac_ext" <<_ACEOF
18920 #line 18920 "configure"
18921 #include "confdefs.h"
18922 #define gettimeofday autoconf_temporary
18923 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18924 #undef gettimeofday
18925
18926 #ifdef __cplusplus
18927 extern "C"
18928 #endif
18929
18930 /* We use char because int might match the return type of a gcc2
18931    builtin and then its argument prototype would still apply.  */
18932 char gettimeofday (void);
18933
18934 int
18935 main (void)
18936 {
18937
18938 /* The GNU C library defines stubs for functions which it implements
18939     to always fail with ENOSYS.  Some functions are actually named
18940     something starting with __ and the normal name is an alias.  */
18941 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18942 #error found stub for gettimeofday
18943 #endif
18944
18945         return gettimeofday ();
18946   ;
18947   return 0;
18948 }
18949 _ACEOF
18950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18951 if { (eval echo "$as_me:18951: \"$ac_link\"") >&5
18952   (eval $ac_link) 2>&5
18953   ac_status=$?
18954   echo "$as_me:18954: \$? = $ac_status" >&5
18955   (exit "$ac_status"); } &&
18956          { ac_try='test -s "conftest$ac_exeext"'
18957   { (eval echo "$as_me:18957: \"$ac_try\"") >&5
18958   (eval $ac_try) 2>&5
18959   ac_status=$?
18960   echo "$as_me:18960: \$? = $ac_status" >&5
18961   (exit "$ac_status"); }; }; then
18962   ac_cv_func_gettimeofday=yes
18963 else
18964   echo "$as_me: failed program was:" >&5
18965 cat "conftest.$ac_ext" >&5
18966 ac_cv_func_gettimeofday=no
18967 fi
18968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18969 fi
18970 echo "$as_me:18970: result: $ac_cv_func_gettimeofday" >&5
18971 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18972 if test "$ac_cv_func_gettimeofday" = yes; then
18973
18974 cat >>confdefs.h <<\EOF
18975 #define HAVE_GETTIMEOFDAY 1
18976 EOF
18977
18978 else
18979
18980 echo "$as_me:18980: checking for gettimeofday in -lbsd" >&5
18981 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18982 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18983   echo $ECHO_N "(cached) $ECHO_C" >&6
18984 else
18985   ac_check_lib_save_LIBS=$LIBS
18986 LIBS="-lbsd  $LIBS"
18987 cat >"conftest.$ac_ext" <<_ACEOF
18988 #line 18988 "configure"
18989 #include "confdefs.h"
18990
18991 /* Override any gcc2 internal prototype to avoid an error.  */
18992 #ifdef __cplusplus
18993 extern "C"
18994 #endif
18995 /* We use char because int might match the return type of a gcc2
18996    builtin and then its argument prototype would still apply.  */
18997 char gettimeofday ();
18998 int
18999 main (void)
19000 {
19001 gettimeofday ();
19002   ;
19003   return 0;
19004 }
19005 _ACEOF
19006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19007 if { (eval echo "$as_me:19007: \"$ac_link\"") >&5
19008   (eval $ac_link) 2>&5
19009   ac_status=$?
19010   echo "$as_me:19010: \$? = $ac_status" >&5
19011   (exit "$ac_status"); } &&
19012          { ac_try='test -s "conftest$ac_exeext"'
19013   { (eval echo "$as_me:19013: \"$ac_try\"") >&5
19014   (eval $ac_try) 2>&5
19015   ac_status=$?
19016   echo "$as_me:19016: \$? = $ac_status" >&5
19017   (exit "$ac_status"); }; }; then
19018   ac_cv_lib_bsd_gettimeofday=yes
19019 else
19020   echo "$as_me: failed program was:" >&5
19021 cat "conftest.$ac_ext" >&5
19022 ac_cv_lib_bsd_gettimeofday=no
19023 fi
19024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19025 LIBS=$ac_check_lib_save_LIBS
19026 fi
19027 echo "$as_me:19027: result: $ac_cv_lib_bsd_gettimeofday" >&5
19028 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19029 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19030
19031 cat >>confdefs.h <<\EOF
19032 #define HAVE_GETTIMEOFDAY 1
19033 EOF
19034
19035 cf_add_libs="$LIBS"
19036 # reverse order
19037 cf_add_0lib=
19038 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19039 # filter duplicates
19040 for cf_add_1lib in $cf_add_0lib; do
19041         for cf_add_2lib in $cf_add_libs; do
19042                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19043                         cf_add_1lib=
19044                         break
19045                 fi
19046         done
19047         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19048 done
19049 LIBS="$cf_add_libs"
19050
19051 fi
19052
19053 fi
19054         ;;
19055 esac
19056
19057 echo "$as_me:19057: checking if -lm needed for math functions" >&5
19058 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19059 if test "${cf_cv_need_libm+set}" = set; then
19060   echo $ECHO_N "(cached) $ECHO_C" >&6
19061 else
19062
19063         cat >"conftest.$ac_ext" <<_ACEOF
19064 #line 19064 "configure"
19065 #include "confdefs.h"
19066
19067                 #include <stdio.h>
19068                 #include <stdlib.h>
19069                 #include <math.h>
19070
19071 int
19072 main (void)
19073 {
19074 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19075   ;
19076   return 0;
19077 }
19078 _ACEOF
19079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19080 if { (eval echo "$as_me:19080: \"$ac_link\"") >&5
19081   (eval $ac_link) 2>&5
19082   ac_status=$?
19083   echo "$as_me:19083: \$? = $ac_status" >&5
19084   (exit "$ac_status"); } &&
19085          { ac_try='test -s "conftest$ac_exeext"'
19086   { (eval echo "$as_me:19086: \"$ac_try\"") >&5
19087   (eval $ac_try) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit "$ac_status"); }; }; then
19091   cf_cv_need_libm=no
19092 else
19093   echo "$as_me: failed program was:" >&5
19094 cat "conftest.$ac_ext" >&5
19095 cf_cv_need_libm=yes
19096 fi
19097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19098 fi
19099 echo "$as_me:19099: result: $cf_cv_need_libm" >&5
19100 echo "${ECHO_T}$cf_cv_need_libm" >&6
19101
19102 if test "$cf_cv_need_libm" = yes
19103 then
19104
19105         cf_save_LIBS="$LIBS"
19106         LIBS="$LIBS -lm"
19107         echo "$as_me:19107: checking if -lm is available for math functions" >&5
19108 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19109 if test "${cf_cv_have_libm+set}" = set; then
19110   echo $ECHO_N "(cached) $ECHO_C" >&6
19111 else
19112
19113         cat >"conftest.$ac_ext" <<_ACEOF
19114 #line 19114 "configure"
19115 #include "confdefs.h"
19116
19117                 #include <stdio.h>
19118                 #include <stdlib.h>
19119                 #include <math.h>
19120
19121 int
19122 main (void)
19123 {
19124 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19125   ;
19126   return 0;
19127 }
19128 _ACEOF
19129 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19130 if { (eval echo "$as_me:19130: \"$ac_link\"") >&5
19131   (eval $ac_link) 2>&5
19132   ac_status=$?
19133   echo "$as_me:19133: \$? = $ac_status" >&5
19134   (exit "$ac_status"); } &&
19135          { ac_try='test -s "conftest$ac_exeext"'
19136   { (eval echo "$as_me:19136: \"$ac_try\"") >&5
19137   (eval $ac_try) 2>&5
19138   ac_status=$?
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit "$ac_status"); }; }; then
19141   cf_cv_have_libm=yes
19142 else
19143   echo "$as_me: failed program was:" >&5
19144 cat "conftest.$ac_ext" >&5
19145 cf_cv_have_libm=no
19146 fi
19147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19148 fi
19149 echo "$as_me:19149: result: $cf_cv_have_libm" >&5
19150 echo "${ECHO_T}$cf_cv_have_libm" >&6
19151         LIBS="$cf_save_LIBS"
19152
19153         if test "$cf_cv_have_libm" = yes
19154         then
19155                 MATH_LIB=-lm
19156         fi
19157 else
19158         cf_cv_have_libm=yes
19159 fi
19160
19161 if test "$cf_cv_have_libm" = yes
19162 then
19163
19164 cat >>confdefs.h <<\EOF
19165 #define HAVE_MATH_FUNCS 1
19166 EOF
19167
19168 fi
19169
19170 ###     Checks for header files.
19171 echo "$as_me:19171: checking for ANSI C header files" >&5
19172 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
19173 if test "${ac_cv_header_stdc+set}" = set; then
19174   echo $ECHO_N "(cached) $ECHO_C" >&6
19175 else
19176   cat >"conftest.$ac_ext" <<_ACEOF
19177 #line 19177 "configure"
19178 #include "confdefs.h"
19179 #include <stdlib.h>
19180 #include <stdarg.h>
19181 #include <string.h>
19182 #include <float.h>
19183
19184 _ACEOF
19185 if { (eval echo "$as_me:19185: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19186   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19187   ac_status=$?
19188   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19189   rm -f conftest.er1
19190   cat conftest.err >&5
19191   echo "$as_me:19191: \$? = $ac_status" >&5
19192   (exit "$ac_status"); } >/dev/null; then
19193   if test -s conftest.err; then
19194     ac_cpp_err=$ac_c_preproc_warn_flag
19195   else
19196     ac_cpp_err=
19197   fi
19198 else
19199   ac_cpp_err=yes
19200 fi
19201 if test -z "$ac_cpp_err"; then
19202   ac_cv_header_stdc=yes
19203 else
19204   echo "$as_me: failed program was:" >&5
19205   cat "conftest.$ac_ext" >&5
19206   ac_cv_header_stdc=no
19207 fi
19208 rm -f conftest.err "conftest.$ac_ext"
19209
19210 if test $ac_cv_header_stdc = yes; then
19211   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19212   cat >"conftest.$ac_ext" <<_ACEOF
19213 #line 19213 "configure"
19214 #include "confdefs.h"
19215 #include <string.h>
19216
19217 _ACEOF
19218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19219   $EGREP "memchr" >/dev/null 2>&1; then
19220   :
19221 else
19222   ac_cv_header_stdc=no
19223 fi
19224 rm -rf conftest*
19225
19226 fi
19227
19228 if test $ac_cv_header_stdc = yes; then
19229   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19230   cat >"conftest.$ac_ext" <<_ACEOF
19231 #line 19231 "configure"
19232 #include "confdefs.h"
19233 #include <stdlib.h>
19234
19235 _ACEOF
19236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19237   $EGREP "free" >/dev/null 2>&1; then
19238   :
19239 else
19240   ac_cv_header_stdc=no
19241 fi
19242 rm -rf conftest*
19243
19244 fi
19245
19246 if test $ac_cv_header_stdc = yes; then
19247   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19248   if test "$cross_compiling" = yes; then
19249   :
19250 else
19251   cat >"conftest.$ac_ext" <<_ACEOF
19252 #line 19252 "configure"
19253 #include "confdefs.h"
19254 #include <ctype.h>
19255 #if ((' ' & 0x0FF) == 0x020)
19256 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19257 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19258 #else
19259 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19260                      || ('j' <= (c) && (c) <= 'r') \
19261                      || ('s' <= (c) && (c) <= 'z'))
19262 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19263 #endif
19264
19265 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19266 int
19267 main (void)
19268 {
19269   int i;
19270   for (i = 0; i < 256; i++)
19271     if (XOR (islower (i), ISLOWER (i))
19272         || toupper (i) != TOUPPER (i))
19273       $ac_main_return(2);
19274   $ac_main_return (0);
19275 }
19276 _ACEOF
19277 rm -f "conftest$ac_exeext"
19278 if { (eval echo "$as_me:19278: \"$ac_link\"") >&5
19279   (eval $ac_link) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19283   { (eval echo "$as_me:19283: \"$ac_try\"") >&5
19284   (eval $ac_try) 2>&5
19285   ac_status=$?
19286   echo "$as_me:19286: \$? = $ac_status" >&5
19287   (exit "$ac_status"); }; }; then
19288   :
19289 else
19290   echo "$as_me: program exited with status $ac_status" >&5
19291 echo "$as_me: failed program was:" >&5
19292 cat "conftest.$ac_ext" >&5
19293 ac_cv_header_stdc=no
19294 fi
19295 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19296 fi
19297 fi
19298 fi
19299 echo "$as_me:19299: result: $ac_cv_header_stdc" >&5
19300 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19301 if test $ac_cv_header_stdc = yes; then
19302
19303 cat >>confdefs.h <<\EOF
19304 #define STDC_HEADERS 1
19305 EOF
19306
19307 fi
19308
19309 ac_header_dirent=no
19310 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19311   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19312 echo "$as_me:19312: checking for $ac_hdr that defines DIR" >&5
19313 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19315   echo $ECHO_N "(cached) $ECHO_C" >&6
19316 else
19317   cat >"conftest.$ac_ext" <<_ACEOF
19318 #line 19318 "configure"
19319 #include "confdefs.h"
19320 #include <sys/types.h>
19321 #include <$ac_hdr>
19322
19323 int
19324 main (void)
19325 {
19326 if ((DIR *) 0)
19327 return 0;
19328   ;
19329   return 0;
19330 }
19331 _ACEOF
19332 rm -f "conftest.$ac_objext"
19333 if { (eval echo "$as_me:19333: \"$ac_compile\"") >&5
19334   (eval $ac_compile) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit "$ac_status"); } &&
19338          { ac_try='test -s "conftest.$ac_objext"'
19339   { (eval echo "$as_me:19339: \"$ac_try\"") >&5
19340   (eval $ac_try) 2>&5
19341   ac_status=$?
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit "$ac_status"); }; }; then
19344   eval "$as_ac_Header=yes"
19345 else
19346   echo "$as_me: failed program was:" >&5
19347 cat "conftest.$ac_ext" >&5
19348 eval "$as_ac_Header=no"
19349 fi
19350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19351 fi
19352 echo "$as_me:19352: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19353 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19354 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19355   cat >>confdefs.h <<EOF
19356 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19357 EOF
19358
19359 ac_header_dirent=$ac_hdr; break
19360 fi
19361
19362 done
19363 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19364 if test $ac_header_dirent = dirent.h; then
19365   echo "$as_me:19365: checking for opendir in -ldir" >&5
19366 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19367 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19368   echo $ECHO_N "(cached) $ECHO_C" >&6
19369 else
19370   ac_check_lib_save_LIBS=$LIBS
19371 LIBS="-ldir  $LIBS"
19372 cat >"conftest.$ac_ext" <<_ACEOF
19373 #line 19373 "configure"
19374 #include "confdefs.h"
19375
19376 /* Override any gcc2 internal prototype to avoid an error.  */
19377 #ifdef __cplusplus
19378 extern "C"
19379 #endif
19380 /* We use char because int might match the return type of a gcc2
19381    builtin and then its argument prototype would still apply.  */
19382 char opendir ();
19383 int
19384 main (void)
19385 {
19386 opendir ();
19387   ;
19388   return 0;
19389 }
19390 _ACEOF
19391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19392 if { (eval echo "$as_me:19392: \"$ac_link\"") >&5
19393   (eval $ac_link) 2>&5
19394   ac_status=$?
19395   echo "$as_me:19395: \$? = $ac_status" >&5
19396   (exit "$ac_status"); } &&
19397          { ac_try='test -s "conftest$ac_exeext"'
19398   { (eval echo "$as_me:19398: \"$ac_try\"") >&5
19399   (eval $ac_try) 2>&5
19400   ac_status=$?
19401   echo "$as_me:19401: \$? = $ac_status" >&5
19402   (exit "$ac_status"); }; }; then
19403   ac_cv_lib_dir_opendir=yes
19404 else
19405   echo "$as_me: failed program was:" >&5
19406 cat "conftest.$ac_ext" >&5
19407 ac_cv_lib_dir_opendir=no
19408 fi
19409 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19410 LIBS=$ac_check_lib_save_LIBS
19411 fi
19412 echo "$as_me:19412: result: $ac_cv_lib_dir_opendir" >&5
19413 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19414 if test "$ac_cv_lib_dir_opendir" = yes; then
19415   LIBS="$LIBS -ldir"
19416 fi
19417
19418 else
19419   echo "$as_me:19419: checking for opendir in -lx" >&5
19420 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19421 if test "${ac_cv_lib_x_opendir+set}" = set; then
19422   echo $ECHO_N "(cached) $ECHO_C" >&6
19423 else
19424   ac_check_lib_save_LIBS=$LIBS
19425 LIBS="-lx  $LIBS"
19426 cat >"conftest.$ac_ext" <<_ACEOF
19427 #line 19427 "configure"
19428 #include "confdefs.h"
19429
19430 /* Override any gcc2 internal prototype to avoid an error.  */
19431 #ifdef __cplusplus
19432 extern "C"
19433 #endif
19434 /* We use char because int might match the return type of a gcc2
19435    builtin and then its argument prototype would still apply.  */
19436 char opendir ();
19437 int
19438 main (void)
19439 {
19440 opendir ();
19441   ;
19442   return 0;
19443 }
19444 _ACEOF
19445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19446 if { (eval echo "$as_me:19446: \"$ac_link\"") >&5
19447   (eval $ac_link) 2>&5
19448   ac_status=$?
19449   echo "$as_me:19449: \$? = $ac_status" >&5
19450   (exit "$ac_status"); } &&
19451          { ac_try='test -s "conftest$ac_exeext"'
19452   { (eval echo "$as_me:19452: \"$ac_try\"") >&5
19453   (eval $ac_try) 2>&5
19454   ac_status=$?
19455   echo "$as_me:19455: \$? = $ac_status" >&5
19456   (exit "$ac_status"); }; }; then
19457   ac_cv_lib_x_opendir=yes
19458 else
19459   echo "$as_me: failed program was:" >&5
19460 cat "conftest.$ac_ext" >&5
19461 ac_cv_lib_x_opendir=no
19462 fi
19463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19464 LIBS=$ac_check_lib_save_LIBS
19465 fi
19466 echo "$as_me:19466: result: $ac_cv_lib_x_opendir" >&5
19467 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19468 if test "$ac_cv_lib_x_opendir" = yes; then
19469   LIBS="$LIBS -lx"
19470 fi
19471
19472 fi
19473
19474 echo "$as_me:19474: checking whether time.h and sys/time.h may both be included" >&5
19475 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19476 if test "${ac_cv_header_time+set}" = set; then
19477   echo $ECHO_N "(cached) $ECHO_C" >&6
19478 else
19479   cat >"conftest.$ac_ext" <<_ACEOF
19480 #line 19480 "configure"
19481 #include "confdefs.h"
19482 #include <sys/types.h>
19483 #include <sys/time.h>
19484 #include <time.h>
19485
19486 int
19487 main (void)
19488 {
19489 if ((struct tm *) 0)
19490 return 0;
19491   ;
19492   return 0;
19493 }
19494 _ACEOF
19495 rm -f "conftest.$ac_objext"
19496 if { (eval echo "$as_me:19496: \"$ac_compile\"") >&5
19497   (eval $ac_compile) 2>&5
19498   ac_status=$?
19499   echo "$as_me:19499: \$? = $ac_status" >&5
19500   (exit "$ac_status"); } &&
19501          { ac_try='test -s "conftest.$ac_objext"'
19502   { (eval echo "$as_me:19502: \"$ac_try\"") >&5
19503   (eval $ac_try) 2>&5
19504   ac_status=$?
19505   echo "$as_me:19505: \$? = $ac_status" >&5
19506   (exit "$ac_status"); }; }; then
19507   ac_cv_header_time=yes
19508 else
19509   echo "$as_me: failed program was:" >&5
19510 cat "conftest.$ac_ext" >&5
19511 ac_cv_header_time=no
19512 fi
19513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19514 fi
19515 echo "$as_me:19515: result: $ac_cv_header_time" >&5
19516 echo "${ECHO_T}$ac_cv_header_time" >&6
19517 if test $ac_cv_header_time = yes; then
19518
19519 cat >>confdefs.h <<\EOF
19520 #define TIME_WITH_SYS_TIME 1
19521 EOF
19522
19523 fi
19524
19525 cf_regex_func=no
19526 cf_regex_libs=
19527 case "$host_os" in
19528 (mingw*)
19529         # -lsystre -ltre -lintl -liconv
19530         echo "$as_me:19530: checking for regcomp in -lsystre" >&5
19531 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19532 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19533   echo $ECHO_N "(cached) $ECHO_C" >&6
19534 else
19535   ac_check_lib_save_LIBS=$LIBS
19536 LIBS="-lsystre  $LIBS"
19537 cat >"conftest.$ac_ext" <<_ACEOF
19538 #line 19538 "configure"
19539 #include "confdefs.h"
19540
19541 /* Override any gcc2 internal prototype to avoid an error.  */
19542 #ifdef __cplusplus
19543 extern "C"
19544 #endif
19545 /* We use char because int might match the return type of a gcc2
19546    builtin and then its argument prototype would still apply.  */
19547 char regcomp ();
19548 int
19549 main (void)
19550 {
19551 regcomp ();
19552   ;
19553   return 0;
19554 }
19555 _ACEOF
19556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19557 if { (eval echo "$as_me:19557: \"$ac_link\"") >&5
19558   (eval $ac_link) 2>&5
19559   ac_status=$?
19560   echo "$as_me:19560: \$? = $ac_status" >&5
19561   (exit "$ac_status"); } &&
19562          { ac_try='test -s "conftest$ac_exeext"'
19563   { (eval echo "$as_me:19563: \"$ac_try\"") >&5
19564   (eval $ac_try) 2>&5
19565   ac_status=$?
19566   echo "$as_me:19566: \$? = $ac_status" >&5
19567   (exit "$ac_status"); }; }; then
19568   ac_cv_lib_systre_regcomp=yes
19569 else
19570   echo "$as_me: failed program was:" >&5
19571 cat "conftest.$ac_ext" >&5
19572 ac_cv_lib_systre_regcomp=no
19573 fi
19574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19575 LIBS=$ac_check_lib_save_LIBS
19576 fi
19577 echo "$as_me:19577: result: $ac_cv_lib_systre_regcomp" >&5
19578 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19579 if test "$ac_cv_lib_systre_regcomp" = yes; then
19580
19581                 echo "$as_me:19581: checking for libiconv_open in -liconv" >&5
19582 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19583 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19584   echo $ECHO_N "(cached) $ECHO_C" >&6
19585 else
19586   ac_check_lib_save_LIBS=$LIBS
19587 LIBS="-liconv  $LIBS"
19588 cat >"conftest.$ac_ext" <<_ACEOF
19589 #line 19589 "configure"
19590 #include "confdefs.h"
19591
19592 /* Override any gcc2 internal prototype to avoid an error.  */
19593 #ifdef __cplusplus
19594 extern "C"
19595 #endif
19596 /* We use char because int might match the return type of a gcc2
19597    builtin and then its argument prototype would still apply.  */
19598 char libiconv_open ();
19599 int
19600 main (void)
19601 {
19602 libiconv_open ();
19603   ;
19604   return 0;
19605 }
19606 _ACEOF
19607 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19608 if { (eval echo "$as_me:19608: \"$ac_link\"") >&5
19609   (eval $ac_link) 2>&5
19610   ac_status=$?
19611   echo "$as_me:19611: \$? = $ac_status" >&5
19612   (exit "$ac_status"); } &&
19613          { ac_try='test -s "conftest$ac_exeext"'
19614   { (eval echo "$as_me:19614: \"$ac_try\"") >&5
19615   (eval $ac_try) 2>&5
19616   ac_status=$?
19617   echo "$as_me:19617: \$? = $ac_status" >&5
19618   (exit "$ac_status"); }; }; then
19619   ac_cv_lib_iconv_libiconv_open=yes
19620 else
19621   echo "$as_me: failed program was:" >&5
19622 cat "conftest.$ac_ext" >&5
19623 ac_cv_lib_iconv_libiconv_open=no
19624 fi
19625 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19626 LIBS=$ac_check_lib_save_LIBS
19627 fi
19628 echo "$as_me:19628: result: $ac_cv_lib_iconv_libiconv_open" >&5
19629 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19630 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19631
19632 cf_add_libs="$LIBS"
19633 # reverse order
19634 cf_add_0lib=
19635 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19636 # filter duplicates
19637 for cf_add_1lib in $cf_add_0lib; do
19638         for cf_add_2lib in $cf_add_libs; do
19639                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19640                         cf_add_1lib=
19641                         break
19642                 fi
19643         done
19644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19645 done
19646 LIBS="$cf_add_libs"
19647
19648 fi
19649
19650                 echo "$as_me:19650: checking for libintl_gettext in -lintl" >&5
19651 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19652 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19653   echo $ECHO_N "(cached) $ECHO_C" >&6
19654 else
19655   ac_check_lib_save_LIBS=$LIBS
19656 LIBS="-lintl  $LIBS"
19657 cat >"conftest.$ac_ext" <<_ACEOF
19658 #line 19658 "configure"
19659 #include "confdefs.h"
19660
19661 /* Override any gcc2 internal prototype to avoid an error.  */
19662 #ifdef __cplusplus
19663 extern "C"
19664 #endif
19665 /* We use char because int might match the return type of a gcc2
19666    builtin and then its argument prototype would still apply.  */
19667 char libintl_gettext ();
19668 int
19669 main (void)
19670 {
19671 libintl_gettext ();
19672   ;
19673   return 0;
19674 }
19675 _ACEOF
19676 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19677 if { (eval echo "$as_me:19677: \"$ac_link\"") >&5
19678   (eval $ac_link) 2>&5
19679   ac_status=$?
19680   echo "$as_me:19680: \$? = $ac_status" >&5
19681   (exit "$ac_status"); } &&
19682          { ac_try='test -s "conftest$ac_exeext"'
19683   { (eval echo "$as_me:19683: \"$ac_try\"") >&5
19684   (eval $ac_try) 2>&5
19685   ac_status=$?
19686   echo "$as_me:19686: \$? = $ac_status" >&5
19687   (exit "$ac_status"); }; }; then
19688   ac_cv_lib_intl_libintl_gettext=yes
19689 else
19690   echo "$as_me: failed program was:" >&5
19691 cat "conftest.$ac_ext" >&5
19692 ac_cv_lib_intl_libintl_gettext=no
19693 fi
19694 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19695 LIBS=$ac_check_lib_save_LIBS
19696 fi
19697 echo "$as_me:19697: result: $ac_cv_lib_intl_libintl_gettext" >&5
19698 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19699 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19700
19701 cf_add_libs="$LIBS"
19702 # reverse order
19703 cf_add_0lib=
19704 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19705 # filter duplicates
19706 for cf_add_1lib in $cf_add_0lib; do
19707         for cf_add_2lib in $cf_add_libs; do
19708                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19709                         cf_add_1lib=
19710                         break
19711                 fi
19712         done
19713         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19714 done
19715 LIBS="$cf_add_libs"
19716
19717 fi
19718
19719                 echo "$as_me:19719: checking for tre_regcomp in -ltre" >&5
19720 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19721 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19722   echo $ECHO_N "(cached) $ECHO_C" >&6
19723 else
19724   ac_check_lib_save_LIBS=$LIBS
19725 LIBS="-ltre  $LIBS"
19726 cat >"conftest.$ac_ext" <<_ACEOF
19727 #line 19727 "configure"
19728 #include "confdefs.h"
19729
19730 /* Override any gcc2 internal prototype to avoid an error.  */
19731 #ifdef __cplusplus
19732 extern "C"
19733 #endif
19734 /* We use char because int might match the return type of a gcc2
19735    builtin and then its argument prototype would still apply.  */
19736 char tre_regcomp ();
19737 int
19738 main (void)
19739 {
19740 tre_regcomp ();
19741   ;
19742   return 0;
19743 }
19744 _ACEOF
19745 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19746 if { (eval echo "$as_me:19746: \"$ac_link\"") >&5
19747   (eval $ac_link) 2>&5
19748   ac_status=$?
19749   echo "$as_me:19749: \$? = $ac_status" >&5
19750   (exit "$ac_status"); } &&
19751          { ac_try='test -s "conftest$ac_exeext"'
19752   { (eval echo "$as_me:19752: \"$ac_try\"") >&5
19753   (eval $ac_try) 2>&5
19754   ac_status=$?
19755   echo "$as_me:19755: \$? = $ac_status" >&5
19756   (exit "$ac_status"); }; }; then
19757   ac_cv_lib_tre_tre_regcomp=yes
19758 else
19759   echo "$as_me: failed program was:" >&5
19760 cat "conftest.$ac_ext" >&5
19761 ac_cv_lib_tre_tre_regcomp=no
19762 fi
19763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19764 LIBS=$ac_check_lib_save_LIBS
19765 fi
19766 echo "$as_me:19766: result: $ac_cv_lib_tre_tre_regcomp" >&5
19767 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19768 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19769
19770 cf_add_libs="$LIBS"
19771 # reverse order
19772 cf_add_0lib=
19773 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19774 # filter duplicates
19775 for cf_add_1lib in $cf_add_0lib; do
19776         for cf_add_2lib in $cf_add_libs; do
19777                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19778                         cf_add_1lib=
19779                         break
19780                 fi
19781         done
19782         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19783 done
19784 LIBS="$cf_add_libs"
19785
19786 fi
19787
19788 cf_add_libs="$LIBS"
19789 # reverse order
19790 cf_add_0lib=
19791 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19792 # filter duplicates
19793 for cf_add_1lib in $cf_add_0lib; do
19794         for cf_add_2lib in $cf_add_libs; do
19795                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19796                         cf_add_1lib=
19797                         break
19798                 fi
19799         done
19800         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19801 done
19802 LIBS="$cf_add_libs"
19803
19804                 cf_regex_func=regcomp
19805
19806 else
19807
19808                 echo "$as_me:19808: checking for regcomp in -lgnurx" >&5
19809 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19810 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19811   echo $ECHO_N "(cached) $ECHO_C" >&6
19812 else
19813   ac_check_lib_save_LIBS=$LIBS
19814 LIBS="-lgnurx  $LIBS"
19815 cat >"conftest.$ac_ext" <<_ACEOF
19816 #line 19816 "configure"
19817 #include "confdefs.h"
19818
19819 /* Override any gcc2 internal prototype to avoid an error.  */
19820 #ifdef __cplusplus
19821 extern "C"
19822 #endif
19823 /* We use char because int might match the return type of a gcc2
19824    builtin and then its argument prototype would still apply.  */
19825 char regcomp ();
19826 int
19827 main (void)
19828 {
19829 regcomp ();
19830   ;
19831   return 0;
19832 }
19833 _ACEOF
19834 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19835 if { (eval echo "$as_me:19835: \"$ac_link\"") >&5
19836   (eval $ac_link) 2>&5
19837   ac_status=$?
19838   echo "$as_me:19838: \$? = $ac_status" >&5
19839   (exit "$ac_status"); } &&
19840          { ac_try='test -s "conftest$ac_exeext"'
19841   { (eval echo "$as_me:19841: \"$ac_try\"") >&5
19842   (eval $ac_try) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit "$ac_status"); }; }; then
19846   ac_cv_lib_gnurx_regcomp=yes
19847 else
19848   echo "$as_me: failed program was:" >&5
19849 cat "conftest.$ac_ext" >&5
19850 ac_cv_lib_gnurx_regcomp=no
19851 fi
19852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19853 LIBS=$ac_check_lib_save_LIBS
19854 fi
19855 echo "$as_me:19855: result: $ac_cv_lib_gnurx_regcomp" >&5
19856 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19857 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19858
19859 cf_add_libs="$LIBS"
19860 # reverse order
19861 cf_add_0lib=
19862 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19863 # filter duplicates
19864 for cf_add_1lib in $cf_add_0lib; do
19865         for cf_add_2lib in $cf_add_libs; do
19866                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19867                         cf_add_1lib=
19868                         break
19869                 fi
19870         done
19871         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19872 done
19873 LIBS="$cf_add_libs"
19874
19875                         cf_regex_func=regcomp
19876 fi
19877
19878 fi
19879
19880         ;;
19881 (*)
19882         cf_regex_libs="regex re"
19883         echo "$as_me:19883: checking for regcomp" >&5
19884 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19885 if test "${ac_cv_func_regcomp+set}" = set; then
19886   echo $ECHO_N "(cached) $ECHO_C" >&6
19887 else
19888   cat >"conftest.$ac_ext" <<_ACEOF
19889 #line 19889 "configure"
19890 #include "confdefs.h"
19891 #define regcomp autoconf_temporary
19892 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19893 #undef regcomp
19894
19895 #ifdef __cplusplus
19896 extern "C"
19897 #endif
19898
19899 /* We use char because int might match the return type of a gcc2
19900    builtin and then its argument prototype would still apply.  */
19901 char regcomp (void);
19902
19903 int
19904 main (void)
19905 {
19906
19907 /* The GNU C library defines stubs for functions which it implements
19908     to always fail with ENOSYS.  Some functions are actually named
19909     something starting with __ and the normal name is an alias.  */
19910 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19911 #error found stub for regcomp
19912 #endif
19913
19914         return regcomp ();
19915   ;
19916   return 0;
19917 }
19918 _ACEOF
19919 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19920 if { (eval echo "$as_me:19920: \"$ac_link\"") >&5
19921   (eval $ac_link) 2>&5
19922   ac_status=$?
19923   echo "$as_me:19923: \$? = $ac_status" >&5
19924   (exit "$ac_status"); } &&
19925          { ac_try='test -s "conftest$ac_exeext"'
19926   { (eval echo "$as_me:19926: \"$ac_try\"") >&5
19927   (eval $ac_try) 2>&5
19928   ac_status=$?
19929   echo "$as_me:19929: \$? = $ac_status" >&5
19930   (exit "$ac_status"); }; }; then
19931   ac_cv_func_regcomp=yes
19932 else
19933   echo "$as_me: failed program was:" >&5
19934 cat "conftest.$ac_ext" >&5
19935 ac_cv_func_regcomp=no
19936 fi
19937 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19938 fi
19939 echo "$as_me:19939: result: $ac_cv_func_regcomp" >&5
19940 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19941 if test "$ac_cv_func_regcomp" = yes; then
19942   cf_regex_func=regcomp
19943 else
19944
19945                 for cf_regex_lib in $cf_regex_libs
19946                 do
19947                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19948 echo "$as_me:19948: checking for regcomp in -l$cf_regex_lib" >&5
19949 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19950 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19951   echo $ECHO_N "(cached) $ECHO_C" >&6
19952 else
19953   ac_check_lib_save_LIBS=$LIBS
19954 LIBS="-l$cf_regex_lib  $LIBS"
19955 cat >"conftest.$ac_ext" <<_ACEOF
19956 #line 19956 "configure"
19957 #include "confdefs.h"
19958
19959 /* Override any gcc2 internal prototype to avoid an error.  */
19960 #ifdef __cplusplus
19961 extern "C"
19962 #endif
19963 /* We use char because int might match the return type of a gcc2
19964    builtin and then its argument prototype would still apply.  */
19965 char regcomp ();
19966 int
19967 main (void)
19968 {
19969 regcomp ();
19970   ;
19971   return 0;
19972 }
19973 _ACEOF
19974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19975 if { (eval echo "$as_me:19975: \"$ac_link\"") >&5
19976   (eval $ac_link) 2>&5
19977   ac_status=$?
19978   echo "$as_me:19978: \$? = $ac_status" >&5
19979   (exit "$ac_status"); } &&
19980          { ac_try='test -s "conftest$ac_exeext"'
19981   { (eval echo "$as_me:19981: \"$ac_try\"") >&5
19982   (eval $ac_try) 2>&5
19983   ac_status=$?
19984   echo "$as_me:19984: \$? = $ac_status" >&5
19985   (exit "$ac_status"); }; }; then
19986   eval "$as_ac_Lib=yes"
19987 else
19988   echo "$as_me: failed program was:" >&5
19989 cat "conftest.$ac_ext" >&5
19990 eval "$as_ac_Lib=no"
19991 fi
19992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19993 LIBS=$ac_check_lib_save_LIBS
19994 fi
19995 echo "$as_me:19995: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19996 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19997 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19998
19999 cf_add_libs="$LIBS"
20000 # reverse order
20001 cf_add_0lib=
20002 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20003 # filter duplicates
20004 for cf_add_1lib in $cf_add_0lib; do
20005         for cf_add_2lib in $cf_add_libs; do
20006                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20007                         cf_add_1lib=
20008                         break
20009                 fi
20010         done
20011         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20012 done
20013 LIBS="$cf_add_libs"
20014
20015                                         cf_regex_func=regcomp
20016                                         break
20017 fi
20018
20019                 done
20020
20021 fi
20022
20023         ;;
20024 esac
20025
20026 if test "$cf_regex_func" = no ; then
20027         echo "$as_me:20027: checking for compile" >&5
20028 echo $ECHO_N "checking for compile... $ECHO_C" >&6
20029 if test "${ac_cv_func_compile+set}" = set; then
20030   echo $ECHO_N "(cached) $ECHO_C" >&6
20031 else
20032   cat >"conftest.$ac_ext" <<_ACEOF
20033 #line 20033 "configure"
20034 #include "confdefs.h"
20035 #define compile autoconf_temporary
20036 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20037 #undef compile
20038
20039 #ifdef __cplusplus
20040 extern "C"
20041 #endif
20042
20043 /* We use char because int might match the return type of a gcc2
20044    builtin and then its argument prototype would still apply.  */
20045 char compile (void);
20046
20047 int
20048 main (void)
20049 {
20050
20051 /* The GNU C library defines stubs for functions which it implements
20052     to always fail with ENOSYS.  Some functions are actually named
20053     something starting with __ and the normal name is an alias.  */
20054 #if defined (__stub_compile) || defined (__stub___compile)
20055 #error found stub for compile
20056 #endif
20057
20058         return compile ();
20059   ;
20060   return 0;
20061 }
20062 _ACEOF
20063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20064 if { (eval echo "$as_me:20064: \"$ac_link\"") >&5
20065   (eval $ac_link) 2>&5
20066   ac_status=$?
20067   echo "$as_me:20067: \$? = $ac_status" >&5
20068   (exit "$ac_status"); } &&
20069          { ac_try='test -s "conftest$ac_exeext"'
20070   { (eval echo "$as_me:20070: \"$ac_try\"") >&5
20071   (eval $ac_try) 2>&5
20072   ac_status=$?
20073   echo "$as_me:20073: \$? = $ac_status" >&5
20074   (exit "$ac_status"); }; }; then
20075   ac_cv_func_compile=yes
20076 else
20077   echo "$as_me: failed program was:" >&5
20078 cat "conftest.$ac_ext" >&5
20079 ac_cv_func_compile=no
20080 fi
20081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20082 fi
20083 echo "$as_me:20083: result: $ac_cv_func_compile" >&5
20084 echo "${ECHO_T}$ac_cv_func_compile" >&6
20085 if test "$ac_cv_func_compile" = yes; then
20086   cf_regex_func=compile
20087 else
20088
20089                 echo "$as_me:20089: checking for compile in -lgen" >&5
20090 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20091 if test "${ac_cv_lib_gen_compile+set}" = set; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094   ac_check_lib_save_LIBS=$LIBS
20095 LIBS="-lgen  $LIBS"
20096 cat >"conftest.$ac_ext" <<_ACEOF
20097 #line 20097 "configure"
20098 #include "confdefs.h"
20099
20100 /* Override any gcc2 internal prototype to avoid an error.  */
20101 #ifdef __cplusplus
20102 extern "C"
20103 #endif
20104 /* We use char because int might match the return type of a gcc2
20105    builtin and then its argument prototype would still apply.  */
20106 char compile ();
20107 int
20108 main (void)
20109 {
20110 compile ();
20111   ;
20112   return 0;
20113 }
20114 _ACEOF
20115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20116 if { (eval echo "$as_me:20116: \"$ac_link\"") >&5
20117   (eval $ac_link) 2>&5
20118   ac_status=$?
20119   echo "$as_me:20119: \$? = $ac_status" >&5
20120   (exit "$ac_status"); } &&
20121          { ac_try='test -s "conftest$ac_exeext"'
20122   { (eval echo "$as_me:20122: \"$ac_try\"") >&5
20123   (eval $ac_try) 2>&5
20124   ac_status=$?
20125   echo "$as_me:20125: \$? = $ac_status" >&5
20126   (exit "$ac_status"); }; }; then
20127   ac_cv_lib_gen_compile=yes
20128 else
20129   echo "$as_me: failed program was:" >&5
20130 cat "conftest.$ac_ext" >&5
20131 ac_cv_lib_gen_compile=no
20132 fi
20133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20134 LIBS=$ac_check_lib_save_LIBS
20135 fi
20136 echo "$as_me:20136: result: $ac_cv_lib_gen_compile" >&5
20137 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20138 if test "$ac_cv_lib_gen_compile" = yes; then
20139
20140 cf_add_libs="$LIBS"
20141 # reverse order
20142 cf_add_0lib=
20143 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20144 # filter duplicates
20145 for cf_add_1lib in $cf_add_0lib; do
20146         for cf_add_2lib in $cf_add_libs; do
20147                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20148                         cf_add_1lib=
20149                         break
20150                 fi
20151         done
20152         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20153 done
20154 LIBS="$cf_add_libs"
20155
20156                                 cf_regex_func=compile
20157 fi
20158
20159 fi
20160
20161 fi
20162
20163 if test "$cf_regex_func" = no ; then
20164         { echo "$as_me:20164: WARNING: cannot find regular expression library" >&5
20165 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20166 fi
20167
20168 echo "$as_me:20168: checking for regular-expression headers" >&5
20169 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20170 if test "${cf_cv_regex_hdrs+set}" = set; then
20171   echo $ECHO_N "(cached) $ECHO_C" >&6
20172 else
20173
20174 cf_cv_regex_hdrs=no
20175 case "$cf_regex_func" in
20176 (compile)
20177         for cf_regex_hdr in regexp.h regexpr.h
20178         do
20179                 cat >"conftest.$ac_ext" <<_ACEOF
20180 #line 20180 "configure"
20181 #include "confdefs.h"
20182 #include <$cf_regex_hdr>
20183 int
20184 main (void)
20185 {
20186
20187                         char *p = compile("", "", "", 0);
20188                         int x = step("", "");
20189                         (void)p;
20190                         (void)x;
20191
20192   ;
20193   return 0;
20194 }
20195 _ACEOF
20196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20197 if { (eval echo "$as_me:20197: \"$ac_link\"") >&5
20198   (eval $ac_link) 2>&5
20199   ac_status=$?
20200   echo "$as_me:20200: \$? = $ac_status" >&5
20201   (exit "$ac_status"); } &&
20202          { ac_try='test -s "conftest$ac_exeext"'
20203   { (eval echo "$as_me:20203: \"$ac_try\"") >&5
20204   (eval $ac_try) 2>&5
20205   ac_status=$?
20206   echo "$as_me:20206: \$? = $ac_status" >&5
20207   (exit "$ac_status"); }; }; then
20208
20209                         cf_cv_regex_hdrs=$cf_regex_hdr
20210                         break
20211
20212 else
20213   echo "$as_me: failed program was:" >&5
20214 cat "conftest.$ac_ext" >&5
20215 fi
20216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20217         done
20218         ;;
20219 (*)
20220         for cf_regex_hdr in regex.h
20221         do
20222                 cat >"conftest.$ac_ext" <<_ACEOF
20223 #line 20223 "configure"
20224 #include "confdefs.h"
20225 #include <sys/types.h>
20226 #include <$cf_regex_hdr>
20227 int
20228 main (void)
20229 {
20230
20231                         regex_t *p = 0;
20232                         int x = regcomp(p, "", 0);
20233                         int y = regexec(p, "", 0, 0, 0);
20234                         (void)x;
20235                         (void)y;
20236                         regfree(p);
20237
20238   ;
20239   return 0;
20240 }
20241 _ACEOF
20242 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20243 if { (eval echo "$as_me:20243: \"$ac_link\"") >&5
20244   (eval $ac_link) 2>&5
20245   ac_status=$?
20246   echo "$as_me:20246: \$? = $ac_status" >&5
20247   (exit "$ac_status"); } &&
20248          { ac_try='test -s "conftest$ac_exeext"'
20249   { (eval echo "$as_me:20249: \"$ac_try\"") >&5
20250   (eval $ac_try) 2>&5
20251   ac_status=$?
20252   echo "$as_me:20252: \$? = $ac_status" >&5
20253   (exit "$ac_status"); }; }; then
20254
20255                         cf_cv_regex_hdrs=$cf_regex_hdr
20256                         break
20257
20258 else
20259   echo "$as_me: failed program was:" >&5
20260 cat "conftest.$ac_ext" >&5
20261 fi
20262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20263         done
20264         ;;
20265 esac
20266
20267 fi
20268 echo "$as_me:20268: result: $cf_cv_regex_hdrs" >&5
20269 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20270
20271 case "$cf_cv_regex_hdrs" in
20272         (no)            { echo "$as_me:20272: WARNING: no regular expression header found" >&5
20273 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20274         (regex.h)
20275 cat >>confdefs.h <<\EOF
20276 #define HAVE_REGEX_H_FUNCS 1
20277 EOF
20278  ;;
20279         (regexp.h)
20280 cat >>confdefs.h <<\EOF
20281 #define HAVE_REGEXP_H_FUNCS 1
20282 EOF
20283  ;;
20284         (regexpr.h)
20285 cat >>confdefs.h <<\EOF
20286 #define HAVE_REGEXPR_H_FUNCS 1
20287 EOF
20288  ;;
20289 esac
20290
20291 for ac_header in \
20292 fcntl.h \
20293 getopt.h \
20294 limits.h \
20295 locale.h \
20296 math.h \
20297 poll.h \
20298 sys/ioctl.h \
20299 sys/param.h \
20300 sys/poll.h \
20301 sys/select.h \
20302 sys/time.h \
20303 sys/times.h \
20304 unistd.h \
20305 wctype.h \
20306
20307 do
20308 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20309 echo "$as_me:20309: checking for $ac_header" >&5
20310 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20311 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20312   echo $ECHO_N "(cached) $ECHO_C" >&6
20313 else
20314   cat >"conftest.$ac_ext" <<_ACEOF
20315 #line 20315 "configure"
20316 #include "confdefs.h"
20317 #include <$ac_header>
20318 _ACEOF
20319 if { (eval echo "$as_me:20319: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20320   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20321   ac_status=$?
20322   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20323   rm -f conftest.er1
20324   cat conftest.err >&5
20325   echo "$as_me:20325: \$? = $ac_status" >&5
20326   (exit "$ac_status"); } >/dev/null; then
20327   if test -s conftest.err; then
20328     ac_cpp_err=$ac_c_preproc_warn_flag
20329   else
20330     ac_cpp_err=
20331   fi
20332 else
20333   ac_cpp_err=yes
20334 fi
20335 if test -z "$ac_cpp_err"; then
20336   eval "$as_ac_Header=yes"
20337 else
20338   echo "$as_me: failed program was:" >&5
20339   cat "conftest.$ac_ext" >&5
20340   eval "$as_ac_Header=no"
20341 fi
20342 rm -f conftest.err "conftest.$ac_ext"
20343 fi
20344 echo "$as_me:20344: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20345 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20346 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20347   cat >>confdefs.h <<EOF
20348 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20349 EOF
20350
20351 fi
20352 done
20353
20354 for ac_header in unistd.h getopt.h
20355 do
20356 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20357 echo "$as_me:20357: checking for $ac_header" >&5
20358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20360   echo $ECHO_N "(cached) $ECHO_C" >&6
20361 else
20362   cat >"conftest.$ac_ext" <<_ACEOF
20363 #line 20363 "configure"
20364 #include "confdefs.h"
20365 #include <$ac_header>
20366 _ACEOF
20367 if { (eval echo "$as_me:20367: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20368   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20369   ac_status=$?
20370   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20371   rm -f conftest.er1
20372   cat conftest.err >&5
20373   echo "$as_me:20373: \$? = $ac_status" >&5
20374   (exit "$ac_status"); } >/dev/null; then
20375   if test -s conftest.err; then
20376     ac_cpp_err=$ac_c_preproc_warn_flag
20377   else
20378     ac_cpp_err=
20379   fi
20380 else
20381   ac_cpp_err=yes
20382 fi
20383 if test -z "$ac_cpp_err"; then
20384   eval "$as_ac_Header=yes"
20385 else
20386   echo "$as_me: failed program was:" >&5
20387   cat "conftest.$ac_ext" >&5
20388   eval "$as_ac_Header=no"
20389 fi
20390 rm -f conftest.err "conftest.$ac_ext"
20391 fi
20392 echo "$as_me:20392: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20393 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20394 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20395   cat >>confdefs.h <<EOF
20396 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20397 EOF
20398
20399 fi
20400 done
20401
20402 echo "$as_me:20402: checking for header declaring getopt variables" >&5
20403 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20404 if test "${cf_cv_getopt_header+set}" = set; then
20405   echo $ECHO_N "(cached) $ECHO_C" >&6
20406 else
20407
20408 cf_cv_getopt_header=none
20409 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20410 do
20411 cat >"conftest.$ac_ext" <<_ACEOF
20412 #line 20412 "configure"
20413 #include "confdefs.h"
20414
20415 #include <$cf_header>
20416 int
20417 main (void)
20418 {
20419 int x = optind; char *y = optarg; (void)x; (void)y
20420   ;
20421   return 0;
20422 }
20423 _ACEOF
20424 rm -f "conftest.$ac_objext"
20425 if { (eval echo "$as_me:20425: \"$ac_compile\"") >&5
20426   (eval $ac_compile) 2>&5
20427   ac_status=$?
20428   echo "$as_me:20428: \$? = $ac_status" >&5
20429   (exit "$ac_status"); } &&
20430          { ac_try='test -s "conftest.$ac_objext"'
20431   { (eval echo "$as_me:20431: \"$ac_try\"") >&5
20432   (eval $ac_try) 2>&5
20433   ac_status=$?
20434   echo "$as_me:20434: \$? = $ac_status" >&5
20435   (exit "$ac_status"); }; }; then
20436   cf_cv_getopt_header=$cf_header
20437  break
20438 else
20439   echo "$as_me: failed program was:" >&5
20440 cat "conftest.$ac_ext" >&5
20441 fi
20442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20443 done
20444
20445 fi
20446 echo "$as_me:20446: result: $cf_cv_getopt_header" >&5
20447 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20448 if test "$cf_cv_getopt_header" != none ; then
20449
20450 cat >>confdefs.h <<\EOF
20451 #define HAVE_GETOPT_HEADER 1
20452 EOF
20453
20454 fi
20455 if test "$cf_cv_getopt_header" = getopt.h ; then
20456
20457 cat >>confdefs.h <<\EOF
20458 #define NEED_GETOPT_H 1
20459 EOF
20460
20461 fi
20462
20463 echo "$as_me:20463: checking if external environ is declared" >&5
20464 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20465 if test "${cf_cv_dcl_environ+set}" = set; then
20466   echo $ECHO_N "(cached) $ECHO_C" >&6
20467 else
20468
20469     cat >"conftest.$ac_ext" <<_ACEOF
20470 #line 20470 "configure"
20471 #include "confdefs.h"
20472
20473 #ifdef HAVE_STDLIB_H
20474 #include <stdlib.h>
20475 #endif
20476 #include <unistd.h>
20477 int
20478 main (void)
20479 {
20480 int x = (int) environ
20481   ;
20482   return 0;
20483 }
20484 _ACEOF
20485 rm -f "conftest.$ac_objext"
20486 if { (eval echo "$as_me:20486: \"$ac_compile\"") >&5
20487   (eval $ac_compile) 2>&5
20488   ac_status=$?
20489   echo "$as_me:20489: \$? = $ac_status" >&5
20490   (exit "$ac_status"); } &&
20491          { ac_try='test -s "conftest.$ac_objext"'
20492   { (eval echo "$as_me:20492: \"$ac_try\"") >&5
20493   (eval $ac_try) 2>&5
20494   ac_status=$?
20495   echo "$as_me:20495: \$? = $ac_status" >&5
20496   (exit "$ac_status"); }; }; then
20497   cf_cv_dcl_environ=yes
20498 else
20499   echo "$as_me: failed program was:" >&5
20500 cat "conftest.$ac_ext" >&5
20501 cf_cv_dcl_environ=no
20502 fi
20503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20504
20505 fi
20506 echo "$as_me:20506: result: $cf_cv_dcl_environ" >&5
20507 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20508
20509 if test "$cf_cv_dcl_environ" = no ; then
20510
20511 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20512
20513     cat >>confdefs.h <<EOF
20514 #define $cf_result 1
20515 EOF
20516
20517 fi
20518
20519 # It's possible (for near-UNIX clones) that the data doesn't exist
20520
20521 echo "$as_me:20521: checking if external environ exists" >&5
20522 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20523 if test "${cf_cv_have_environ+set}" = set; then
20524   echo $ECHO_N "(cached) $ECHO_C" >&6
20525 else
20526
20527         cat >"conftest.$ac_ext" <<_ACEOF
20528 #line 20528 "configure"
20529 #include "confdefs.h"
20530
20531 #undef environ
20532 extern int environ;
20533
20534 int
20535 main (void)
20536 {
20537 environ = 2
20538   ;
20539   return 0;
20540 }
20541 _ACEOF
20542 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20543 if { (eval echo "$as_me:20543: \"$ac_link\"") >&5
20544   (eval $ac_link) 2>&5
20545   ac_status=$?
20546   echo "$as_me:20546: \$? = $ac_status" >&5
20547   (exit "$ac_status"); } &&
20548          { ac_try='test -s "conftest$ac_exeext"'
20549   { (eval echo "$as_me:20549: \"$ac_try\"") >&5
20550   (eval $ac_try) 2>&5
20551   ac_status=$?
20552   echo "$as_me:20552: \$? = $ac_status" >&5
20553   (exit "$ac_status"); }; }; then
20554   cf_cv_have_environ=yes
20555 else
20556   echo "$as_me: failed program was:" >&5
20557 cat "conftest.$ac_ext" >&5
20558 cf_cv_have_environ=no
20559 fi
20560 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20561
20562 fi
20563 echo "$as_me:20563: result: $cf_cv_have_environ" >&5
20564 echo "${ECHO_T}$cf_cv_have_environ" >&6
20565
20566 if test "$cf_cv_have_environ" = yes ; then
20567
20568 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20569
20570         cat >>confdefs.h <<EOF
20571 #define $cf_result 1
20572 EOF
20573
20574 fi
20575
20576 echo "$as_me:20576: checking for getenv" >&5
20577 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20578 if test "${ac_cv_func_getenv+set}" = set; then
20579   echo $ECHO_N "(cached) $ECHO_C" >&6
20580 else
20581   cat >"conftest.$ac_ext" <<_ACEOF
20582 #line 20582 "configure"
20583 #include "confdefs.h"
20584 #define getenv autoconf_temporary
20585 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20586 #undef getenv
20587
20588 #ifdef __cplusplus
20589 extern "C"
20590 #endif
20591
20592 /* We use char because int might match the return type of a gcc2
20593    builtin and then its argument prototype would still apply.  */
20594 char getenv (void);
20595
20596 int
20597 main (void)
20598 {
20599
20600 /* The GNU C library defines stubs for functions which it implements
20601     to always fail with ENOSYS.  Some functions are actually named
20602     something starting with __ and the normal name is an alias.  */
20603 #if defined (__stub_getenv) || defined (__stub___getenv)
20604 #error found stub for getenv
20605 #endif
20606
20607         return getenv ();
20608   ;
20609   return 0;
20610 }
20611 _ACEOF
20612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20613 if { (eval echo "$as_me:20613: \"$ac_link\"") >&5
20614   (eval $ac_link) 2>&5
20615   ac_status=$?
20616   echo "$as_me:20616: \$? = $ac_status" >&5
20617   (exit "$ac_status"); } &&
20618          { ac_try='test -s "conftest$ac_exeext"'
20619   { (eval echo "$as_me:20619: \"$ac_try\"") >&5
20620   (eval $ac_try) 2>&5
20621   ac_status=$?
20622   echo "$as_me:20622: \$? = $ac_status" >&5
20623   (exit "$ac_status"); }; }; then
20624   ac_cv_func_getenv=yes
20625 else
20626   echo "$as_me: failed program was:" >&5
20627 cat "conftest.$ac_ext" >&5
20628 ac_cv_func_getenv=no
20629 fi
20630 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20631 fi
20632 echo "$as_me:20632: result: $ac_cv_func_getenv" >&5
20633 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20634
20635 for ac_func in putenv setenv strdup
20636 do
20637 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20638 echo "$as_me:20638: checking for $ac_func" >&5
20639 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20640 if eval "test \"\${$as_ac_var+set}\" = set"; then
20641   echo $ECHO_N "(cached) $ECHO_C" >&6
20642 else
20643   cat >"conftest.$ac_ext" <<_ACEOF
20644 #line 20644 "configure"
20645 #include "confdefs.h"
20646 #define $ac_func autoconf_temporary
20647 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20648 #undef $ac_func
20649
20650 #ifdef __cplusplus
20651 extern "C"
20652 #endif
20653
20654 /* We use char because int might match the return type of a gcc2
20655    builtin and then its argument prototype would still apply.  */
20656 char $ac_func (void);
20657
20658 int
20659 main (void)
20660 {
20661
20662 /* The GNU C library defines stubs for functions which it implements
20663     to always fail with ENOSYS.  Some functions are actually named
20664     something starting with __ and the normal name is an alias.  */
20665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20666 #error found stub for $ac_func
20667 #endif
20668
20669         return $ac_func ();
20670   ;
20671   return 0;
20672 }
20673 _ACEOF
20674 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20675 if { (eval echo "$as_me:20675: \"$ac_link\"") >&5
20676   (eval $ac_link) 2>&5
20677   ac_status=$?
20678   echo "$as_me:20678: \$? = $ac_status" >&5
20679   (exit "$ac_status"); } &&
20680          { ac_try='test -s "conftest$ac_exeext"'
20681   { (eval echo "$as_me:20681: \"$ac_try\"") >&5
20682   (eval $ac_try) 2>&5
20683   ac_status=$?
20684   echo "$as_me:20684: \$? = $ac_status" >&5
20685   (exit "$ac_status"); }; }; then
20686   eval "$as_ac_var=yes"
20687 else
20688   echo "$as_me: failed program was:" >&5
20689 cat "conftest.$ac_ext" >&5
20690 eval "$as_ac_var=no"
20691 fi
20692 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20693 fi
20694 echo "$as_me:20694: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20695 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20696 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20697   cat >>confdefs.h <<EOF
20698 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20699 EOF
20700
20701 fi
20702 done
20703
20704 echo "$as_me:20704: checking if getenv returns consistent values" >&5
20705 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20706 if test "${cf_cv_consistent_getenv+set}" = set; then
20707   echo $ECHO_N "(cached) $ECHO_C" >&6
20708 else
20709
20710 if test "$cross_compiling" = yes; then
20711   cf_cv_consistent_getenv=unknown
20712 else
20713   cat >"conftest.$ac_ext" <<_ACEOF
20714 #line 20714 "configure"
20715 #include "confdefs.h"
20716
20717 #include <stdlib.h>
20718 #include <unistd.h>
20719 #include <stdio.h>
20720 #include <string.h>
20721 #include <sys/types.h>
20722
20723 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20724 extern char **environ;  /* POSIX, but some systems are not... */
20725 #endif
20726
20727 #if defined(HAVE_STRDUP)
20728 #define str_alloc(s) strdup(s)
20729 #else
20730 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20731 #endif
20732
20733 static void set_value(const char *name, const char *value)
20734 {
20735 #if defined(HAVE_SETENV)
20736         setenv(name, value, 1);
20737 #elif defined(HAVE_PUTENV)
20738         char buffer[1024];
20739         sprintf(buffer, "%s=%s", name, value);
20740         putenv(str_alloc(buffer));
20741 #else
20742 #error neither putenv/setenv found
20743 #endif
20744 }
20745 int main(void)
20746 {
20747         int pass;
20748         size_t numenv, limit, j;
20749         char **mynames;
20750         char **myvalues;
20751         char **mypointer;
20752         char *equals;
20753         for (numenv = 0; environ[numenv]; ++numenv) ;
20754         limit = numenv + 10;
20755         mynames = (char **) calloc(limit + 1, sizeof(char *));
20756         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20757         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20758 #if defined(HAVE_ENVIRON)
20759         for (j = 0; environ[j]; ++j) {
20760                 mynames[j] = str_alloc(environ[j]);
20761                 equals = strchr(mynames[j], '=');
20762                 if (equals != 0) {
20763                         *equals++ = '\\0';
20764                         myvalues[j] = str_alloc(equals);
20765                 } else {
20766                         myvalues[j] = str_alloc("");
20767                 }
20768         }
20769 #endif
20770         for (j = numenv; j < limit; ++j) {
20771                 char name[80];
20772                 char value[80];
20773                 size_t found;
20774                 size_t k = 0;
20775                 do {
20776                         size_t jk;
20777                         found = 0;
20778                         sprintf(name, "TERM%lu", (unsigned long) k);
20779                         for (jk = 0; jk < j; ++jk) {
20780                                 if (!strcmp(name, mynames[jk])) {
20781                                         found = 1;
20782                                         ++k;
20783                                         break;
20784                                 }
20785                         }
20786                 } while (found);
20787                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20788                 set_value(name, value);
20789                 mynames[j] = str_alloc(name);
20790                 myvalues[j] = str_alloc(value);
20791         }
20792         for (pass = 0; pass < 3; ++pass) {
20793                 for (j = 0; j < limit; ++j) {
20794                         char *value = getenv(mynames[j]);
20795                         if (pass) {
20796                                 if (value == 0) {
20797                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20798                                         ${cf_cv_main_return:-return}(1);
20799                                 } else if (value != mypointer[j]) {
20800                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20801                                         ${cf_cv_main_return:-return}(1);
20802                                 } else if (strcmp(value, myvalues[j])) {
20803                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20804                                         ${cf_cv_main_return:-return}(1);
20805                                 }
20806                         } else {
20807                                 size_t k;
20808                                 mypointer[j] = value;
20809                                 for (k = 0; k < j; ++k) {
20810                                         if (mypointer[j] == mypointer[k]) {
20811                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20812                                                 ${cf_cv_main_return:-return}(1);
20813                                         }
20814                                 }
20815                         }
20816                 }
20817         }
20818         ${cf_cv_main_return:-return}(0);
20819 }
20820
20821 _ACEOF
20822 rm -f "conftest$ac_exeext"
20823 if { (eval echo "$as_me:20823: \"$ac_link\"") >&5
20824   (eval $ac_link) 2>&5
20825   ac_status=$?
20826   echo "$as_me:20826: \$? = $ac_status" >&5
20827   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20828   { (eval echo "$as_me:20828: \"$ac_try\"") >&5
20829   (eval $ac_try) 2>&5
20830   ac_status=$?
20831   echo "$as_me:20831: \$? = $ac_status" >&5
20832   (exit "$ac_status"); }; }; then
20833   cf_cv_consistent_getenv=yes
20834 else
20835   echo "$as_me: program exited with status $ac_status" >&5
20836 echo "$as_me: failed program was:" >&5
20837 cat "conftest.$ac_ext" >&5
20838 cf_cv_consistent_getenv=no
20839 fi
20840 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20841 fi
20842
20843 fi
20844 echo "$as_me:20844: result: $cf_cv_consistent_getenv" >&5
20845 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20846
20847 if test "x$cf_cv_consistent_getenv" = xno
20848 then
20849
20850 cat >>confdefs.h <<\EOF
20851 #define HAVE_CONSISTENT_GETENV 1
20852 EOF
20853
20854 fi
20855
20856 if test "x$cf_cv_consistent_getenv" = xno && \
20857         test "x$cf_with_trace" = xyes
20858 then
20859         { echo "$as_me:20859: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20860 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20861 fi
20862
20863 echo "$as_me:20863: checking if sys/time.h works with sys/select.h" >&5
20864 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20865 if test "${cf_cv_sys_time_select+set}" = set; then
20866   echo $ECHO_N "(cached) $ECHO_C" >&6
20867 else
20868
20869 cat >"conftest.$ac_ext" <<_ACEOF
20870 #line 20870 "configure"
20871 #include "confdefs.h"
20872
20873 #include <sys/types.h>
20874 #ifdef HAVE_SYS_TIME_H
20875 #include <sys/time.h>
20876 #endif
20877 #ifdef HAVE_SYS_SELECT_H
20878 #include <sys/select.h>
20879 #endif
20880
20881 int
20882 main (void)
20883 {
20884
20885   ;
20886   return 0;
20887 }
20888 _ACEOF
20889 rm -f "conftest.$ac_objext"
20890 if { (eval echo "$as_me:20890: \"$ac_compile\"") >&5
20891   (eval $ac_compile) 2>&5
20892   ac_status=$?
20893   echo "$as_me:20893: \$? = $ac_status" >&5
20894   (exit "$ac_status"); } &&
20895          { ac_try='test -s "conftest.$ac_objext"'
20896   { (eval echo "$as_me:20896: \"$ac_try\"") >&5
20897   (eval $ac_try) 2>&5
20898   ac_status=$?
20899   echo "$as_me:20899: \$? = $ac_status" >&5
20900   (exit "$ac_status"); }; }; then
20901   cf_cv_sys_time_select=yes
20902 else
20903   echo "$as_me: failed program was:" >&5
20904 cat "conftest.$ac_ext" >&5
20905 cf_cv_sys_time_select=no
20906 fi
20907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20908
20909 fi
20910
20911 echo "$as_me:20911: result: $cf_cv_sys_time_select" >&5
20912 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20913 test "$cf_cv_sys_time_select" = yes &&
20914 cat >>confdefs.h <<\EOF
20915 #define HAVE_SYS_TIME_SELECT 1
20916 EOF
20917
20918 ###     checks for compiler characteristics
20919 ac_ext=c
20920 ac_cpp='$CPP $CPPFLAGS'
20921 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20922 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20924 ac_main_return="return"
20925
20926 echo "$as_me:20926: checking for an ANSI C-conforming const" >&5
20927 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20928 if test "${ac_cv_c_const+set}" = set; then
20929   echo $ECHO_N "(cached) $ECHO_C" >&6
20930 else
20931   cat >"conftest.$ac_ext" <<_ACEOF
20932 #line 20932 "configure"
20933 #include "confdefs.h"
20934
20935 int
20936 main (void)
20937 {
20938 /* FIXME: Include the comments suggested by Paul. */
20939 #ifndef __cplusplus
20940   /* Ultrix mips cc rejects this.  */
20941   typedef int charset[2];
20942   const charset x;
20943   /* SunOS 4.1.1 cc rejects this.  */
20944   char const *const *ccp;
20945   char **p;
20946   /* NEC SVR4.0.2 mips cc rejects this.  */
20947   struct point {int x, y;};
20948   static struct point const zero = {0,0};
20949   /* AIX XL C 1.02.0.0 rejects this.
20950      It does not let you subtract one const X* pointer from another in
20951      an arm of an if-expression whose if-part is not a constant
20952      expression */
20953   const char *g = "string";
20954   ccp = &g + (g ? g-g : 0);
20955   /* HPUX 7.0 cc rejects these. */
20956   ++ccp;
20957   p = (char**) ccp;
20958   ccp = (char const *const *) p;
20959   { /* SCO 3.2v4 cc rejects this.  */
20960     char *t;
20961     char const *s = 0 ? (char *) 0 : (char const *) 0;
20962
20963     *t++ = 0;
20964   }
20965   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20966     int x[] = {25, 17};
20967     const int *foo = &x[0];
20968     ++foo;
20969   }
20970   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20971     typedef const int *iptr;
20972     iptr p = 0;
20973     ++p;
20974   }
20975   { /* AIX XL C 1.02.0.0 rejects this saying
20976        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20977     struct s { int j; const int *ap[3]; };
20978     struct s *b; b->j = 5;
20979   }
20980   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20981     const int foo = 10;
20982   }
20983 #endif
20984
20985   ;
20986   return 0;
20987 }
20988 _ACEOF
20989 rm -f "conftest.$ac_objext"
20990 if { (eval echo "$as_me:20990: \"$ac_compile\"") >&5
20991   (eval $ac_compile) 2>&5
20992   ac_status=$?
20993   echo "$as_me:20993: \$? = $ac_status" >&5
20994   (exit "$ac_status"); } &&
20995          { ac_try='test -s "conftest.$ac_objext"'
20996   { (eval echo "$as_me:20996: \"$ac_try\"") >&5
20997   (eval $ac_try) 2>&5
20998   ac_status=$?
20999   echo "$as_me:20999: \$? = $ac_status" >&5
21000   (exit "$ac_status"); }; }; then
21001   ac_cv_c_const=yes
21002 else
21003   echo "$as_me: failed program was:" >&5
21004 cat "conftest.$ac_ext" >&5
21005 ac_cv_c_const=no
21006 fi
21007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21008 fi
21009 echo "$as_me:21009: result: $ac_cv_c_const" >&5
21010 echo "${ECHO_T}$ac_cv_c_const" >&6
21011 if test $ac_cv_c_const = no; then
21012
21013 cat >>confdefs.h <<\EOF
21014 #define const
21015 EOF
21016
21017 fi
21018
21019 echo "$as_me:21019: checking for inline" >&5
21020 echo $ECHO_N "checking for inline... $ECHO_C" >&6
21021 if test "${ac_cv_c_inline+set}" = set; then
21022   echo $ECHO_N "(cached) $ECHO_C" >&6
21023 else
21024   ac_cv_c_inline=no
21025 for ac_kw in inline __inline__ __inline; do
21026   cat >"conftest.$ac_ext" <<_ACEOF
21027 #line 21027 "configure"
21028 #include "confdefs.h"
21029 #ifndef __cplusplus
21030 static $ac_kw int static_foo () {return 0; }
21031 $ac_kw int foo () {return 0; }
21032 #endif
21033
21034 _ACEOF
21035 rm -f "conftest.$ac_objext"
21036 if { (eval echo "$as_me:21036: \"$ac_compile\"") >&5
21037   (eval $ac_compile) 2>&5
21038   ac_status=$?
21039   echo "$as_me:21039: \$? = $ac_status" >&5
21040   (exit "$ac_status"); } &&
21041          { ac_try='test -s "conftest.$ac_objext"'
21042   { (eval echo "$as_me:21042: \"$ac_try\"") >&5
21043   (eval $ac_try) 2>&5
21044   ac_status=$?
21045   echo "$as_me:21045: \$? = $ac_status" >&5
21046   (exit "$ac_status"); }; }; then
21047   ac_cv_c_inline=$ac_kw; break
21048 else
21049   echo "$as_me: failed program was:" >&5
21050 cat "conftest.$ac_ext" >&5
21051 fi
21052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21053 done
21054
21055 fi
21056 echo "$as_me:21056: result: $ac_cv_c_inline" >&5
21057 echo "${ECHO_T}$ac_cv_c_inline" >&6
21058 case $ac_cv_c_inline in
21059   inline | yes) ;;
21060   no)
21061 cat >>confdefs.h <<\EOF
21062 #define inline
21063 EOF
21064  ;;
21065   *)  cat >>confdefs.h <<EOF
21066 #define inline $ac_cv_c_inline
21067 EOF
21068  ;;
21069 esac
21070
21071 NCURSES_INLINE=
21072 if test "$ac_cv_c_inline" != no ; then
21073         NCURSES_INLINE=inline
21074         if test "$INTEL_COMPILER" = yes
21075         then
21076                 :
21077         elif test "$CLANG_COMPILER" = yes
21078         then
21079                 :
21080         elif test "$GCC" = yes
21081         then
21082                 echo "$as_me:21082: checking if $CC supports options to tune inlining" >&5
21083 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21084 if test "${cf_cv_gcc_inline+set}" = set; then
21085   echo $ECHO_N "(cached) $ECHO_C" >&6
21086 else
21087
21088                 cf_save_CFLAGS=$CFLAGS
21089                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21090                 cat >"conftest.$ac_ext" <<_ACEOF
21091 #line 21091 "configure"
21092 #include "confdefs.h"
21093 inline int foo(void) { return 1; }
21094 int
21095 main (void)
21096 {
21097 ${cf_cv_main_return:-return} foo()
21098   ;
21099   return 0;
21100 }
21101 _ACEOF
21102 rm -f "conftest.$ac_objext"
21103 if { (eval echo "$as_me:21103: \"$ac_compile\"") >&5
21104   (eval $ac_compile) 2>&5
21105   ac_status=$?
21106   echo "$as_me:21106: \$? = $ac_status" >&5
21107   (exit "$ac_status"); } &&
21108          { ac_try='test -s "conftest.$ac_objext"'
21109   { (eval echo "$as_me:21109: \"$ac_try\"") >&5
21110   (eval $ac_try) 2>&5
21111   ac_status=$?
21112   echo "$as_me:21112: \$? = $ac_status" >&5
21113   (exit "$ac_status"); }; }; then
21114   cf_cv_gcc_inline=yes
21115 else
21116   echo "$as_me: failed program was:" >&5
21117 cat "conftest.$ac_ext" >&5
21118 cf_cv_gcc_inline=no
21119 fi
21120 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21121                 CFLAGS=$cf_save_CFLAGS
21122
21123 fi
21124 echo "$as_me:21124: result: $cf_cv_gcc_inline" >&5
21125 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21126                 if test "$cf_cv_gcc_inline" = yes ; then
21127
21128 cf_fix_cppflags=no
21129 cf_new_cflags=
21130 cf_new_cppflags=
21131 cf_new_extra_cppflags=
21132
21133 for cf_add_cflags in --param max-inline-insns-single=1200
21134 do
21135 case "$cf_fix_cppflags" in
21136 (no)
21137         case "$cf_add_cflags" in
21138         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21139                 case "$cf_add_cflags" in
21140                 (-D*)
21141                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21142
21143                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21144                                 && test -z "${cf_tst_cflags}" \
21145                                 && cf_fix_cppflags=yes
21146
21147                         if test "$cf_fix_cppflags" = yes ; then
21148
21149         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21150         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21151
21152                                 continue
21153                         elif test "${cf_tst_cflags}" = "\"'" ; then
21154
21155         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21156         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21157
21158                                 continue
21159                         fi
21160                         ;;
21161                 esac
21162                 case "$CPPFLAGS" in
21163                 (*$cf_add_cflags)
21164                         ;;
21165                 (*)
21166                         case "$cf_add_cflags" in
21167                         (-D*)
21168                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21169
21170 CPPFLAGS=`echo "$CPPFLAGS" | \
21171         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21172                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21173
21174                                 ;;
21175                         esac
21176
21177         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21178         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21179
21180                         ;;
21181                 esac
21182                 ;;
21183         (*)
21184
21185         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21186         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21187
21188                 ;;
21189         esac
21190         ;;
21191 (yes)
21192
21193         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21194         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21195
21196         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21197
21198         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21199                 && test -z "${cf_tst_cflags}" \
21200                 && cf_fix_cppflags=no
21201         ;;
21202 esac
21203 done
21204
21205 if test -n "$cf_new_cflags" ; then
21206
21207         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21208         CFLAGS="${CFLAGS}$cf_new_cflags"
21209
21210 fi
21211
21212 if test -n "$cf_new_cppflags" ; then
21213
21214         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21215         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21216
21217 fi
21218
21219 if test -n "$cf_new_extra_cppflags" ; then
21220
21221         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21222         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21223
21224 fi
21225
21226                 fi
21227         fi
21228 fi
21229
21230 echo "$as_me:21230: checking for signal global datatype" >&5
21231 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21232 if test "${cf_cv_sig_atomic_t+set}" = set; then
21233   echo $ECHO_N "(cached) $ECHO_C" >&6
21234 else
21235
21236         for cf_type in \
21237                 "volatile sig_atomic_t" \
21238                 "sig_atomic_t" \
21239                 "int"
21240         do
21241         cat >"conftest.$ac_ext" <<_ACEOF
21242 #line 21242 "configure"
21243 #include "confdefs.h"
21244
21245 #include <sys/types.h>
21246 #include <signal.h>
21247 #include <stdio.h>
21248
21249 extern $cf_type x;
21250 $cf_type x;
21251 static void handler(int sig)
21252 {
21253         (void)sig;
21254         x = 5;
21255 }
21256 int
21257 main (void)
21258 {
21259 signal(SIGINT, handler);
21260                  x = 1
21261   ;
21262   return 0;
21263 }
21264 _ACEOF
21265 rm -f "conftest.$ac_objext"
21266 if { (eval echo "$as_me:21266: \"$ac_compile\"") >&5
21267   (eval $ac_compile) 2>&5
21268   ac_status=$?
21269   echo "$as_me:21269: \$? = $ac_status" >&5
21270   (exit "$ac_status"); } &&
21271          { ac_try='test -s "conftest.$ac_objext"'
21272   { (eval echo "$as_me:21272: \"$ac_try\"") >&5
21273   (eval $ac_try) 2>&5
21274   ac_status=$?
21275   echo "$as_me:21275: \$? = $ac_status" >&5
21276   (exit "$ac_status"); }; }; then
21277   cf_cv_sig_atomic_t=$cf_type
21278 else
21279   echo "$as_me: failed program was:" >&5
21280 cat "conftest.$ac_ext" >&5
21281 cf_cv_sig_atomic_t=no
21282 fi
21283 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21284                 test "$cf_cv_sig_atomic_t" != no && break
21285         done
21286
21287 fi
21288
21289 echo "$as_me:21289: result: $cf_cv_sig_atomic_t" >&5
21290 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21291 test "$cf_cv_sig_atomic_t" != no &&
21292 cat >>confdefs.h <<EOF
21293 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21294 EOF
21295
21296 if test "$NCURSES_CHTYPE" = auto ; then
21297
21298 echo "$as_me:21298: checking for type of chtype" >&5
21299 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21300 if test "${cf_cv_typeof_chtype+set}" = set; then
21301   echo $ECHO_N "(cached) $ECHO_C" >&6
21302 else
21303
21304                 if test "$cross_compiling" = yes; then
21305   cf_cv_typeof_chtype=long
21306 else
21307   cat >"conftest.$ac_ext" <<_ACEOF
21308 #line 21308 "configure"
21309 #include "confdefs.h"
21310
21311 #define WANT_BITS 31
21312 #include <stdio.h>
21313 int main(void)
21314 {
21315         FILE *fp = fopen("cf_test.out", "w");
21316         if (fp != 0) {
21317                 char *result = "long";
21318                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21319                         int n;
21320                         unsigned int x, y;
21321                         for (n = 0; n < WANT_BITS; n++) {
21322                                 x = (1 << n);
21323                                 y = (x >> n);
21324                                 if (y != 1 || x == 0) {
21325                                         x = 0;
21326                                         break;
21327                                 }
21328                         }
21329                         /*
21330                          * If x is nonzero, an int is big enough for the bits
21331                          * that we want.
21332                          */
21333                         result = (x != 0) ? "int" : "long";
21334                 }
21335                 fputs(result, fp);
21336                 fclose(fp);
21337         }
21338         ${cf_cv_main_return:-return}(0);
21339 }
21340
21341 _ACEOF
21342 rm -f "conftest$ac_exeext"
21343 if { (eval echo "$as_me:21343: \"$ac_link\"") >&5
21344   (eval $ac_link) 2>&5
21345   ac_status=$?
21346   echo "$as_me:21346: \$? = $ac_status" >&5
21347   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21348   { (eval echo "$as_me:21348: \"$ac_try\"") >&5
21349   (eval $ac_try) 2>&5
21350   ac_status=$?
21351   echo "$as_me:21351: \$? = $ac_status" >&5
21352   (exit "$ac_status"); }; }; then
21353   cf_cv_typeof_chtype=`cat cf_test.out`
21354 else
21355   echo "$as_me: program exited with status $ac_status" >&5
21356 echo "$as_me: failed program was:" >&5
21357 cat "conftest.$ac_ext" >&5
21358 cf_cv_typeof_chtype=long
21359 fi
21360 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21361 fi
21362                 rm -f cf_test.out
21363
21364 fi
21365
21366 echo "$as_me:21366: result: $cf_cv_typeof_chtype" >&5
21367 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21368
21369 cat >>confdefs.h <<EOF
21370 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21371 EOF
21372
21373 else
21374         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21375 fi
21376 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21377
21378 echo "$as_me:21378: checking if unsigned literals are legal" >&5
21379 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21380 if test "${cf_cv_unsigned_literals+set}" = set; then
21381   echo $ECHO_N "(cached) $ECHO_C" >&6
21382 else
21383
21384         cat >"conftest.$ac_ext" <<_ACEOF
21385 #line 21385 "configure"
21386 #include "confdefs.h"
21387
21388 int
21389 main (void)
21390 {
21391 long x = 1L + 1UL + 1U + 1
21392   ;
21393   return 0;
21394 }
21395 _ACEOF
21396 rm -f "conftest.$ac_objext"
21397 if { (eval echo "$as_me:21397: \"$ac_compile\"") >&5
21398   (eval $ac_compile) 2>&5
21399   ac_status=$?
21400   echo "$as_me:21400: \$? = $ac_status" >&5
21401   (exit "$ac_status"); } &&
21402          { ac_try='test -s "conftest.$ac_objext"'
21403   { (eval echo "$as_me:21403: \"$ac_try\"") >&5
21404   (eval $ac_try) 2>&5
21405   ac_status=$?
21406   echo "$as_me:21406: \$? = $ac_status" >&5
21407   (exit "$ac_status"); }; }; then
21408   cf_cv_unsigned_literals=yes
21409 else
21410   echo "$as_me: failed program was:" >&5
21411 cat "conftest.$ac_ext" >&5
21412 cf_cv_unsigned_literals=no
21413 fi
21414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21415
21416 fi
21417
21418 echo "$as_me:21418: result: $cf_cv_unsigned_literals" >&5
21419 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21420
21421 cf_cv_1UL="1"
21422 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21423 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21424
21425 if test "$NCURSES_MMASK_T" = auto ; then
21426         cf_cv_typeof_mmask_t=long
21427 else
21428         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21429 fi
21430 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21431
21432 ###     Checks for external-data
21433
21434 echo "$as_me:21434: checking if external errno is declared" >&5
21435 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21436 if test "${cf_cv_dcl_errno+set}" = set; then
21437   echo $ECHO_N "(cached) $ECHO_C" >&6
21438 else
21439
21440         cat >"conftest.$ac_ext" <<_ACEOF
21441 #line 21441 "configure"
21442 #include "confdefs.h"
21443
21444 #ifdef HAVE_STDLIB_H
21445 #include <stdlib.h>
21446 #endif
21447 #include <stdio.h>
21448 #include <sys/types.h>
21449 #include <errno.h>
21450 int
21451 main (void)
21452 {
21453 int x = (int) errno; (void)x
21454   ;
21455   return 0;
21456 }
21457 _ACEOF
21458 rm -f "conftest.$ac_objext"
21459 if { (eval echo "$as_me:21459: \"$ac_compile\"") >&5
21460   (eval $ac_compile) 2>&5
21461   ac_status=$?
21462   echo "$as_me:21462: \$? = $ac_status" >&5
21463   (exit "$ac_status"); } &&
21464          { ac_try='test -s "conftest.$ac_objext"'
21465   { (eval echo "$as_me:21465: \"$ac_try\"") >&5
21466   (eval $ac_try) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit "$ac_status"); }; }; then
21470   cf_cv_dcl_errno=yes
21471 else
21472   echo "$as_me: failed program was:" >&5
21473 cat "conftest.$ac_ext" >&5
21474 cf_cv_dcl_errno=no
21475 fi
21476 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21477
21478 fi
21479 echo "$as_me:21479: result: $cf_cv_dcl_errno" >&5
21480 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21481
21482 if test "$cf_cv_dcl_errno" = no ; then
21483
21484 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21485
21486         cat >>confdefs.h <<EOF
21487 #define $cf_result 1
21488 EOF
21489
21490 fi
21491
21492 # It's possible (for near-UNIX clones) that the data doesn't exist
21493
21494 echo "$as_me:21494: checking if external errno exists" >&5
21495 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21496 if test "${cf_cv_have_errno+set}" = set; then
21497   echo $ECHO_N "(cached) $ECHO_C" >&6
21498 else
21499
21500         cat >"conftest.$ac_ext" <<_ACEOF
21501 #line 21501 "configure"
21502 #include "confdefs.h"
21503
21504 #undef errno
21505 extern int errno;
21506
21507 int
21508 main (void)
21509 {
21510 errno = 2
21511   ;
21512   return 0;
21513 }
21514 _ACEOF
21515 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21516 if { (eval echo "$as_me:21516: \"$ac_link\"") >&5
21517   (eval $ac_link) 2>&5
21518   ac_status=$?
21519   echo "$as_me:21519: \$? = $ac_status" >&5
21520   (exit "$ac_status"); } &&
21521          { ac_try='test -s "conftest$ac_exeext"'
21522   { (eval echo "$as_me:21522: \"$ac_try\"") >&5
21523   (eval $ac_try) 2>&5
21524   ac_status=$?
21525   echo "$as_me:21525: \$? = $ac_status" >&5
21526   (exit "$ac_status"); }; }; then
21527   cf_cv_have_errno=yes
21528 else
21529   echo "$as_me: failed program was:" >&5
21530 cat "conftest.$ac_ext" >&5
21531 cf_cv_have_errno=no
21532 fi
21533 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21534
21535 fi
21536 echo "$as_me:21536: result: $cf_cv_have_errno" >&5
21537 echo "${ECHO_T}$cf_cv_have_errno" >&6
21538
21539 if test "$cf_cv_have_errno" = yes ; then
21540
21541 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21542
21543         cat >>confdefs.h <<EOF
21544 #define $cf_result 1
21545 EOF
21546
21547 fi
21548
21549 echo "$as_me:21549: checking if data-only library module links" >&5
21550 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21551 if test "${cf_cv_link_dataonly+set}" = set; then
21552   echo $ECHO_N "(cached) $ECHO_C" >&6
21553 else
21554
21555         rm -f conftest.a
21556         cat >conftest.$ac_ext <<EOF
21557 #line 21557 "configure"
21558 int     testdata[3] = { 123, 456, 789 };
21559 EOF
21560         if { (eval echo "$as_me:21560: \"$ac_compile\"") >&5
21561   (eval $ac_compile) 2>&5
21562   ac_status=$?
21563   echo "$as_me:21563: \$? = $ac_status" >&5
21564   (exit "$ac_status"); } ; then
21565                 mv conftest.o data.o && \
21566                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21567         fi
21568         rm -f conftest.$ac_ext data.o
21569         cat >conftest.$ac_ext <<EOF
21570 #line 21570 "configure"
21571 int     testfunc(void)
21572 {
21573 #if defined(NeXT)
21574         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21575 #else
21576         extern int testdata[3];
21577         return testdata[0] == 123
21578            &&  testdata[1] == 456
21579            &&  testdata[2] == 789;
21580 #endif
21581 }
21582 EOF
21583         if { (eval echo "$as_me:21583: \"$ac_compile\"") >&5
21584   (eval $ac_compile) 2>&5
21585   ac_status=$?
21586   echo "$as_me:21586: \$? = $ac_status" >&5
21587   (exit "$ac_status"); }; then
21588                 mv conftest.o func.o && \
21589                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21590         fi
21591         rm -f conftest.$ac_ext func.o
21592         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21593         cf_saveLIBS="$LIBS"
21594         LIBS="conftest.a $LIBS"
21595         if test "$cross_compiling" = yes; then
21596   cf_cv_link_dataonly=unknown
21597 else
21598   cat >"conftest.$ac_ext" <<_ACEOF
21599 #line 21599 "configure"
21600 #include "confdefs.h"
21601
21602         int main(void)
21603         {
21604                 extern int testfunc();
21605                 ${cf_cv_main_return:-return} (!testfunc());
21606         }
21607
21608 _ACEOF
21609 rm -f "conftest$ac_exeext"
21610 if { (eval echo "$as_me:21610: \"$ac_link\"") >&5
21611   (eval $ac_link) 2>&5
21612   ac_status=$?
21613   echo "$as_me:21613: \$? = $ac_status" >&5
21614   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21615   { (eval echo "$as_me:21615: \"$ac_try\"") >&5
21616   (eval $ac_try) 2>&5
21617   ac_status=$?
21618   echo "$as_me:21618: \$? = $ac_status" >&5
21619   (exit "$ac_status"); }; }; then
21620   cf_cv_link_dataonly=yes
21621 else
21622   echo "$as_me: program exited with status $ac_status" >&5
21623 echo "$as_me: failed program was:" >&5
21624 cat "conftest.$ac_ext" >&5
21625 cf_cv_link_dataonly=no
21626 fi
21627 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21628 fi
21629         LIBS="$cf_saveLIBS"
21630
21631 fi
21632
21633 echo "$as_me:21633: result: $cf_cv_link_dataonly" >&5
21634 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21635
21636 if test "$cf_cv_link_dataonly" = no ; then
21637
21638 cat >>confdefs.h <<\EOF
21639 #define BROKEN_LINKER 1
21640 EOF
21641
21642         BROKEN_LINKER=1
21643 fi
21644
21645 ###     Checks for library functions.
21646
21647 for ac_func in \
21648 fpathconf \
21649 getcwd \
21650 getegid \
21651 geteuid \
21652 getopt \
21653 issetugid \
21654 localeconv \
21655 poll \
21656 putenv \
21657 remove \
21658 select \
21659 setbuf \
21660 setbuffer \
21661 setenv \
21662 setfsuid \
21663 setvbuf \
21664 sigaction \
21665 sigvec \
21666 snprintf \
21667 strdup \
21668 strstr \
21669 sysconf \
21670 tcgetpgrp \
21671 times \
21672 tsearch \
21673 vsnprintf \
21674
21675 do
21676 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21677 echo "$as_me:21677: checking for $ac_func" >&5
21678 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21679 if eval "test \"\${$as_ac_var+set}\" = set"; then
21680   echo $ECHO_N "(cached) $ECHO_C" >&6
21681 else
21682   cat >"conftest.$ac_ext" <<_ACEOF
21683 #line 21683 "configure"
21684 #include "confdefs.h"
21685 #define $ac_func autoconf_temporary
21686 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21687 #undef $ac_func
21688
21689 #ifdef __cplusplus
21690 extern "C"
21691 #endif
21692
21693 /* We use char because int might match the return type of a gcc2
21694    builtin and then its argument prototype would still apply.  */
21695 char $ac_func (void);
21696
21697 int
21698 main (void)
21699 {
21700
21701 /* The GNU C library defines stubs for functions which it implements
21702     to always fail with ENOSYS.  Some functions are actually named
21703     something starting with __ and the normal name is an alias.  */
21704 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21705 #error found stub for $ac_func
21706 #endif
21707
21708         return $ac_func ();
21709   ;
21710   return 0;
21711 }
21712 _ACEOF
21713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21714 if { (eval echo "$as_me:21714: \"$ac_link\"") >&5
21715   (eval $ac_link) 2>&5
21716   ac_status=$?
21717   echo "$as_me:21717: \$? = $ac_status" >&5
21718   (exit "$ac_status"); } &&
21719          { ac_try='test -s "conftest$ac_exeext"'
21720   { (eval echo "$as_me:21720: \"$ac_try\"") >&5
21721   (eval $ac_try) 2>&5
21722   ac_status=$?
21723   echo "$as_me:21723: \$? = $ac_status" >&5
21724   (exit "$ac_status"); }; }; then
21725   eval "$as_ac_var=yes"
21726 else
21727   echo "$as_me: failed program was:" >&5
21728 cat "conftest.$ac_ext" >&5
21729 eval "$as_ac_var=no"
21730 fi
21731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21732 fi
21733 echo "$as_me:21733: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21734 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21735 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21736   cat >>confdefs.h <<EOF
21737 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21738 EOF
21739
21740 fi
21741 done
21742
21743 echo "$as_me:21743: checking if _PATH_TTYS is defined in ttyent.h" >&5
21744 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21745 if test "${cf_cv_PATH_TTYS+set}" = set; then
21746   echo $ECHO_N "(cached) $ECHO_C" >&6
21747 else
21748
21749 cat >"conftest.$ac_ext" <<_ACEOF
21750 #line 21750 "configure"
21751 #include "confdefs.h"
21752
21753 #include <stdio.h>
21754 #include <ttyent.h>
21755 int
21756 main (void)
21757 {
21758
21759 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21760   ;
21761   return 0;
21762 }
21763 _ACEOF
21764 rm -f "conftest.$ac_objext"
21765 if { (eval echo "$as_me:21765: \"$ac_compile\"") >&5
21766   (eval $ac_compile) 2>&5
21767   ac_status=$?
21768   echo "$as_me:21768: \$? = $ac_status" >&5
21769   (exit "$ac_status"); } &&
21770          { ac_try='test -s "conftest.$ac_objext"'
21771   { (eval echo "$as_me:21771: \"$ac_try\"") >&5
21772   (eval $ac_try) 2>&5
21773   ac_status=$?
21774   echo "$as_me:21774: \$? = $ac_status" >&5
21775   (exit "$ac_status"); }; }; then
21776   cf_cv_PATH_TTYS=yes
21777 else
21778   echo "$as_me: failed program was:" >&5
21779 cat "conftest.$ac_ext" >&5
21780 cf_cv_PATH_TTYS=no
21781 fi
21782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21783 fi
21784 echo "$as_me:21784: result: $cf_cv_PATH_TTYS" >&5
21785 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21786
21787 if test $cf_cv_PATH_TTYS = no
21788 then
21789         for cf_ttys in /etc/ttytype /etc/ttys
21790         do
21791                 if test -f $cf_ttys
21792                 then
21793                         cf_cv_PATH_TTYS=maybe
21794
21795 cat >>confdefs.h <<\EOF
21796 #define _PATH_TTYS $cf_ttys
21797 EOF
21798
21799                         break
21800                 fi
21801         done
21802 fi
21803
21804 if test $cf_cv_PATH_TTYS != no
21805 then
21806         echo "$as_me:21806: checking if _PATH_TTYS file exists" >&5
21807 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21808 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21809   echo $ECHO_N "(cached) $ECHO_C" >&6
21810 else
21811
21812                 if test "$cross_compiling" = yes; then
21813   cf_cv_have_PATH_TTYS=unknown
21814 else
21815   cat >"conftest.$ac_ext" <<_ACEOF
21816 #line 21816 "configure"
21817 #include "confdefs.h"
21818
21819 #include <stdio.h>
21820 #include <ttyent.h>
21821 int main(void) {
21822         FILE *fp = fopen(_PATH_TTYS, "r");
21823         ${cf_cv_main_return:-return} (fp == 0);
21824 }
21825 _ACEOF
21826 rm -f "conftest$ac_exeext"
21827 if { (eval echo "$as_me:21827: \"$ac_link\"") >&5
21828   (eval $ac_link) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21832   { (eval echo "$as_me:21832: \"$ac_try\"") >&5
21833   (eval $ac_try) 2>&5
21834   ac_status=$?
21835   echo "$as_me:21835: \$? = $ac_status" >&5
21836   (exit "$ac_status"); }; }; then
21837   cf_cv_have_PATH_TTYS=yes
21838 else
21839   echo "$as_me: program exited with status $ac_status" >&5
21840 echo "$as_me: failed program was:" >&5
21841 cat "conftest.$ac_ext" >&5
21842 cf_cv_have_PATH_TTYS=no
21843 fi
21844 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21845 fi
21846 fi
21847 echo "$as_me:21847: result: $cf_cv_have_PATH_TTYS" >&5
21848 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21849         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21850 fi
21851
21852 if test $cf_cv_PATH_TTYS != no
21853 then
21854
21855 cat >>confdefs.h <<\EOF
21856 #define HAVE_PATH_TTYS 1
21857 EOF
21858
21859         echo "$as_me:21859: checking for getttynam" >&5
21860 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21861 if test "${cf_cv_func_getttynam+set}" = set; then
21862   echo $ECHO_N "(cached) $ECHO_C" >&6
21863 else
21864
21865                 cat >"conftest.$ac_ext" <<_ACEOF
21866 #line 21866 "configure"
21867 #include "confdefs.h"
21868 #include <ttyent.h>
21869 int
21870 main (void)
21871 {
21872 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21873   ;
21874   return 0;
21875 }
21876 _ACEOF
21877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21878 if { (eval echo "$as_me:21878: \"$ac_link\"") >&5
21879   (eval $ac_link) 2>&5
21880   ac_status=$?
21881   echo "$as_me:21881: \$? = $ac_status" >&5
21882   (exit "$ac_status"); } &&
21883          { ac_try='test -s "conftest$ac_exeext"'
21884   { (eval echo "$as_me:21884: \"$ac_try\"") >&5
21885   (eval $ac_try) 2>&5
21886   ac_status=$?
21887   echo "$as_me:21887: \$? = $ac_status" >&5
21888   (exit "$ac_status"); }; }; then
21889   cf_cv_func_getttynam=yes
21890 else
21891   echo "$as_me: failed program was:" >&5
21892 cat "conftest.$ac_ext" >&5
21893 cf_cv_func_getttynam=no
21894 fi
21895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21896 fi
21897 echo "$as_me:21897: result: $cf_cv_func_getttynam" >&5
21898 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21899         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21900 #define HAVE_GETTTYNAM 1
21901 EOF
21902
21903 fi
21904
21905 if test "x$ac_cv_func_getopt" = xno && \
21906    test "x$cf_with_progs$cf_with_tests" != xnono; then
21907         { { echo "$as_me:21907: error: getopt is required for building programs" >&5
21908 echo "$as_me: error: getopt is required for building programs" >&2;}
21909    { (exit 1); exit 1; }; }
21910 fi
21911
21912 if test "x$with_safe_sprintf" = xyes
21913 then
21914         if test "x$ac_cv_func_vsnprintf" = xyes
21915         then
21916                 { echo "$as_me:21916: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21917 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21918         else
21919
21920 cat >>confdefs.h <<\EOF
21921 #define USE_SAFE_SPRINTF 1
21922 EOF
21923
21924         fi
21925 fi
21926
21927 if test "x$with_getcap" = "xyes" ; then
21928
21929 echo "$as_me:21929: checking for terminal-capability database functions" >&5
21930 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21931 if test "${cf_cv_cgetent+set}" = set; then
21932   echo $ECHO_N "(cached) $ECHO_C" >&6
21933 else
21934
21935 cat >"conftest.$ac_ext" <<_ACEOF
21936 #line 21936 "configure"
21937 #include "confdefs.h"
21938
21939 #include <stdlib.h>
21940 int
21941 main (void)
21942 {
21943
21944         char temp[128];
21945         char *buf = temp;
21946         char *db_array = temp;
21947         cgetent(&buf, &db_array, "vt100");
21948         cgetcap(buf, "tc", '=');
21949         cgetmatch(buf, "tc");
21950
21951   ;
21952   return 0;
21953 }
21954 _ACEOF
21955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21956 if { (eval echo "$as_me:21956: \"$ac_link\"") >&5
21957   (eval $ac_link) 2>&5
21958   ac_status=$?
21959   echo "$as_me:21959: \$? = $ac_status" >&5
21960   (exit "$ac_status"); } &&
21961          { ac_try='test -s "conftest$ac_exeext"'
21962   { (eval echo "$as_me:21962: \"$ac_try\"") >&5
21963   (eval $ac_try) 2>&5
21964   ac_status=$?
21965   echo "$as_me:21965: \$? = $ac_status" >&5
21966   (exit "$ac_status"); }; }; then
21967   cf_cv_cgetent=yes
21968 else
21969   echo "$as_me: failed program was:" >&5
21970 cat "conftest.$ac_ext" >&5
21971 cf_cv_cgetent=no
21972 fi
21973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21974
21975 fi
21976 echo "$as_me:21976: result: $cf_cv_cgetent" >&5
21977 echo "${ECHO_T}$cf_cv_cgetent" >&6
21978
21979 if test "$cf_cv_cgetent" = yes
21980 then
21981
21982 cat >>confdefs.h <<\EOF
21983 #define HAVE_BSD_CGETENT 1
21984 EOF
21985
21986 echo "$as_me:21986: checking if cgetent uses const parameter" >&5
21987 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21988 if test "${cf_cv_cgetent_const+set}" = set; then
21989   echo $ECHO_N "(cached) $ECHO_C" >&6
21990 else
21991
21992 cat >"conftest.$ac_ext" <<_ACEOF
21993 #line 21993 "configure"
21994 #include "confdefs.h"
21995
21996 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21997 #include <stdlib.h>
21998 int
21999 main (void)
22000 {
22001
22002         char temp[128];
22003         char *buf = temp;
22004 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22005         const char *db_array = temp;
22006         cgetent(&buf, &db_array, "vt100");
22007 #endif
22008         cgetcap(buf, "tc", '=');
22009         cgetmatch(buf, "tc");
22010
22011   ;
22012   return 0;
22013 }
22014 _ACEOF
22015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22016 if { (eval echo "$as_me:22016: \"$ac_link\"") >&5
22017   (eval $ac_link) 2>&5
22018   ac_status=$?
22019   echo "$as_me:22019: \$? = $ac_status" >&5
22020   (exit "$ac_status"); } &&
22021          { ac_try='test -s "conftest$ac_exeext"'
22022   { (eval echo "$as_me:22022: \"$ac_try\"") >&5
22023   (eval $ac_try) 2>&5
22024   ac_status=$?
22025   echo "$as_me:22025: \$? = $ac_status" >&5
22026   (exit "$ac_status"); }; }; then
22027   cf_cv_cgetent_const=yes
22028 else
22029   echo "$as_me: failed program was:" >&5
22030 cat "conftest.$ac_ext" >&5
22031 cf_cv_cgetent_const=no
22032 fi
22033 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22034
22035 fi
22036 echo "$as_me:22036: result: $cf_cv_cgetent_const" >&5
22037 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22038         if test "$cf_cv_cgetent_const" = yes
22039         then
22040
22041 cat >>confdefs.h <<EOF
22042 #define CGETENT_CONST const
22043 EOF
22044
22045         fi
22046 fi
22047
22048 fi
22049
22050 echo "$as_me:22050: checking for isascii" >&5
22051 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22052 if test "${cf_cv_have_isascii+set}" = set; then
22053   echo $ECHO_N "(cached) $ECHO_C" >&6
22054 else
22055
22056         cat >"conftest.$ac_ext" <<_ACEOF
22057 #line 22057 "configure"
22058 #include "confdefs.h"
22059 #include <ctype.h>
22060 int
22061 main (void)
22062 {
22063 int x = isascii(' ')
22064   ;
22065   return 0;
22066 }
22067 _ACEOF
22068 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22069 if { (eval echo "$as_me:22069: \"$ac_link\"") >&5
22070   (eval $ac_link) 2>&5
22071   ac_status=$?
22072   echo "$as_me:22072: \$? = $ac_status" >&5
22073   (exit "$ac_status"); } &&
22074          { ac_try='test -s "conftest$ac_exeext"'
22075   { (eval echo "$as_me:22075: \"$ac_try\"") >&5
22076   (eval $ac_try) 2>&5
22077   ac_status=$?
22078   echo "$as_me:22078: \$? = $ac_status" >&5
22079   (exit "$ac_status"); }; }; then
22080   cf_cv_have_isascii=yes
22081 else
22082   echo "$as_me: failed program was:" >&5
22083 cat "conftest.$ac_ext" >&5
22084 cf_cv_have_isascii=no
22085 fi
22086 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22087
22088 fi
22089 echo "$as_me:22089: result: $cf_cv_have_isascii" >&5
22090 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22091 test "$cf_cv_have_isascii" = yes &&
22092 cat >>confdefs.h <<\EOF
22093 #define HAVE_ISASCII 1
22094 EOF
22095
22096 if test "$ac_cv_func_sigaction" = yes; then
22097 echo "$as_me:22097: checking whether sigaction needs _POSIX_SOURCE" >&5
22098 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22099 cat >"conftest.$ac_ext" <<_ACEOF
22100 #line 22100 "configure"
22101 #include "confdefs.h"
22102
22103 #include <sys/types.h>
22104 #include <signal.h>
22105 int
22106 main (void)
22107 {
22108 struct sigaction act
22109   ;
22110   return 0;
22111 }
22112 _ACEOF
22113 rm -f "conftest.$ac_objext"
22114 if { (eval echo "$as_me:22114: \"$ac_compile\"") >&5
22115   (eval $ac_compile) 2>&5
22116   ac_status=$?
22117   echo "$as_me:22117: \$? = $ac_status" >&5
22118   (exit "$ac_status"); } &&
22119          { ac_try='test -s "conftest.$ac_objext"'
22120   { (eval echo "$as_me:22120: \"$ac_try\"") >&5
22121   (eval $ac_try) 2>&5
22122   ac_status=$?
22123   echo "$as_me:22123: \$? = $ac_status" >&5
22124   (exit "$ac_status"); }; }; then
22125   sigact_bad=no
22126 else
22127   echo "$as_me: failed program was:" >&5
22128 cat "conftest.$ac_ext" >&5
22129
22130 cat >"conftest.$ac_ext" <<_ACEOF
22131 #line 22131 "configure"
22132 #include "confdefs.h"
22133
22134 #define _POSIX_SOURCE
22135 #include <sys/types.h>
22136 #include <signal.h>
22137 int
22138 main (void)
22139 {
22140 struct sigaction act
22141   ;
22142   return 0;
22143 }
22144 _ACEOF
22145 rm -f "conftest.$ac_objext"
22146 if { (eval echo "$as_me:22146: \"$ac_compile\"") >&5
22147   (eval $ac_compile) 2>&5
22148   ac_status=$?
22149   echo "$as_me:22149: \$? = $ac_status" >&5
22150   (exit "$ac_status"); } &&
22151          { ac_try='test -s "conftest.$ac_objext"'
22152   { (eval echo "$as_me:22152: \"$ac_try\"") >&5
22153   (eval $ac_try) 2>&5
22154   ac_status=$?
22155   echo "$as_me:22155: \$? = $ac_status" >&5
22156   (exit "$ac_status"); }; }; then
22157   sigact_bad=yes
22158
22159 cat >>confdefs.h <<\EOF
22160 #define _POSIX_SOURCE 1
22161 EOF
22162
22163 else
22164   echo "$as_me: failed program was:" >&5
22165 cat "conftest.$ac_ext" >&5
22166 sigact_bad=unknown
22167 fi
22168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22169 fi
22170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22171 echo "$as_me:22171: result: $sigact_bad" >&5
22172 echo "${ECHO_T}$sigact_bad" >&6
22173 fi
22174
22175 echo "$as_me:22175: checking if nanosleep really works" >&5
22176 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22177 if test "${cf_cv_func_nanosleep+set}" = set; then
22178   echo $ECHO_N "(cached) $ECHO_C" >&6
22179 else
22180
22181 if test "$cross_compiling" = yes; then
22182   cf_cv_func_nanosleep=unknown
22183 else
22184   cat >"conftest.$ac_ext" <<_ACEOF
22185 #line 22185 "configure"
22186 #include "confdefs.h"
22187
22188 #include <stdio.h>
22189 #include <errno.h>
22190 #include <time.h>
22191
22192 #ifdef HAVE_SYS_TIME_H
22193 #include <sys/time.h>
22194 #endif
22195
22196 int main(void) {
22197         struct timespec ts1, ts2;
22198         int code;
22199         ts1.tv_sec  = 0;
22200         ts1.tv_nsec = 750000000;
22201         ts2.tv_sec  = 0;
22202         ts2.tv_nsec = 0;
22203         errno = 0;
22204         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22205         ${cf_cv_main_return:-return}(code != 0);
22206 }
22207
22208 _ACEOF
22209 rm -f "conftest$ac_exeext"
22210 if { (eval echo "$as_me:22210: \"$ac_link\"") >&5
22211   (eval $ac_link) 2>&5
22212   ac_status=$?
22213   echo "$as_me:22213: \$? = $ac_status" >&5
22214   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22215   { (eval echo "$as_me:22215: \"$ac_try\"") >&5
22216   (eval $ac_try) 2>&5
22217   ac_status=$?
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit "$ac_status"); }; }; then
22220   cf_cv_func_nanosleep=yes
22221 else
22222   echo "$as_me: program exited with status $ac_status" >&5
22223 echo "$as_me: failed program was:" >&5
22224 cat "conftest.$ac_ext" >&5
22225 cf_cv_func_nanosleep=no
22226 fi
22227 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22228 fi
22229 fi
22230 echo "$as_me:22230: result: $cf_cv_func_nanosleep" >&5
22231 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22232
22233 test "$cf_cv_func_nanosleep" = "yes" &&
22234 cat >>confdefs.h <<\EOF
22235 #define HAVE_NANOSLEEP 1
22236 EOF
22237
22238 for ac_header in \
22239 termio.h \
22240 termios.h \
22241 unistd.h \
22242 sys/ioctl.h \
22243 sys/termio.h \
22244
22245 do
22246 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22247 echo "$as_me:22247: checking for $ac_header" >&5
22248 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22249 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22250   echo $ECHO_N "(cached) $ECHO_C" >&6
22251 else
22252   cat >"conftest.$ac_ext" <<_ACEOF
22253 #line 22253 "configure"
22254 #include "confdefs.h"
22255 #include <$ac_header>
22256 _ACEOF
22257 if { (eval echo "$as_me:22257: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22258   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22259   ac_status=$?
22260   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22261   rm -f conftest.er1
22262   cat conftest.err >&5
22263   echo "$as_me:22263: \$? = $ac_status" >&5
22264   (exit "$ac_status"); } >/dev/null; then
22265   if test -s conftest.err; then
22266     ac_cpp_err=$ac_c_preproc_warn_flag
22267   else
22268     ac_cpp_err=
22269   fi
22270 else
22271   ac_cpp_err=yes
22272 fi
22273 if test -z "$ac_cpp_err"; then
22274   eval "$as_ac_Header=yes"
22275 else
22276   echo "$as_me: failed program was:" >&5
22277   cat "conftest.$ac_ext" >&5
22278   eval "$as_ac_Header=no"
22279 fi
22280 rm -f conftest.err "conftest.$ac_ext"
22281 fi
22282 echo "$as_me:22282: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22283 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22284 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22285   cat >>confdefs.h <<EOF
22286 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22287 EOF
22288
22289 fi
22290 done
22291
22292 if test "$ac_cv_header_termios_h" = yes ; then
22293         case "$CFLAGS $CPPFLAGS" in
22294         (*-D_POSIX_SOURCE*)
22295                 termios_bad=dunno ;;
22296         (*)     termios_bad=maybe ;;
22297         esac
22298         if test "$termios_bad" = maybe ; then
22299         echo "$as_me:22299: checking whether termios.h needs _POSIX_SOURCE" >&5
22300 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22301         cat >"conftest.$ac_ext" <<_ACEOF
22302 #line 22302 "configure"
22303 #include "confdefs.h"
22304 #include <termios.h>
22305 int
22306 main (void)
22307 {
22308 struct termios foo; int x = foo.c_iflag = 1; (void)x
22309   ;
22310   return 0;
22311 }
22312 _ACEOF
22313 rm -f "conftest.$ac_objext"
22314 if { (eval echo "$as_me:22314: \"$ac_compile\"") >&5
22315   (eval $ac_compile) 2>&5
22316   ac_status=$?
22317   echo "$as_me:22317: \$? = $ac_status" >&5
22318   (exit "$ac_status"); } &&
22319          { ac_try='test -s "conftest.$ac_objext"'
22320   { (eval echo "$as_me:22320: \"$ac_try\"") >&5
22321   (eval $ac_try) 2>&5
22322   ac_status=$?
22323   echo "$as_me:22323: \$? = $ac_status" >&5
22324   (exit "$ac_status"); }; }; then
22325   termios_bad=no
22326 else
22327   echo "$as_me: failed program was:" >&5
22328 cat "conftest.$ac_ext" >&5
22329
22330                 cat >"conftest.$ac_ext" <<_ACEOF
22331 #line 22331 "configure"
22332 #include "confdefs.h"
22333
22334 #define _POSIX_SOURCE
22335 #include <termios.h>
22336 int
22337 main (void)
22338 {
22339 struct termios foo; int x = foo.c_iflag = 2; (void)x
22340   ;
22341   return 0;
22342 }
22343 _ACEOF
22344 rm -f "conftest.$ac_objext"
22345 if { (eval echo "$as_me:22345: \"$ac_compile\"") >&5
22346   (eval $ac_compile) 2>&5
22347   ac_status=$?
22348   echo "$as_me:22348: \$? = $ac_status" >&5
22349   (exit "$ac_status"); } &&
22350          { ac_try='test -s "conftest.$ac_objext"'
22351   { (eval echo "$as_me:22351: \"$ac_try\"") >&5
22352   (eval $ac_try) 2>&5
22353   ac_status=$?
22354   echo "$as_me:22354: \$? = $ac_status" >&5
22355   (exit "$ac_status"); }; }; then
22356   termios_bad=unknown
22357 else
22358   echo "$as_me: failed program was:" >&5
22359 cat "conftest.$ac_ext" >&5
22360 termios_bad=yes
22361 cat >>confdefs.h <<\EOF
22362 #define _POSIX_SOURCE 1
22363 EOF
22364
22365 fi
22366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22367
22368 fi
22369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22370         echo "$as_me:22370: result: $termios_bad" >&5
22371 echo "${ECHO_T}$termios_bad" >&6
22372         fi
22373 fi
22374
22375 echo "$as_me:22375: checking for tcgetattr" >&5
22376 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22377 if test "${cf_cv_have_tcgetattr+set}" = set; then
22378   echo $ECHO_N "(cached) $ECHO_C" >&6
22379 else
22380
22381 cat >"conftest.$ac_ext" <<_ACEOF
22382 #line 22382 "configure"
22383 #include "confdefs.h"
22384
22385 #include <sys/types.h>
22386 #ifdef HAVE_UNISTD_H
22387 #include <unistd.h>
22388 #endif
22389 #ifdef HAVE_TERMIOS_H
22390 #include <termios.h>
22391 #define TTY struct termios
22392 #else
22393 #ifdef HAVE_TERMIO_H
22394 #include <termio.h>
22395 #define TTY struct termio
22396 #endif
22397 #endif
22398
22399 int
22400 main (void)
22401 {
22402
22403 TTY foo;
22404 tcgetattr(1, &foo);
22405   ;
22406   return 0;
22407 }
22408 _ACEOF
22409 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22410 if { (eval echo "$as_me:22410: \"$ac_link\"") >&5
22411   (eval $ac_link) 2>&5
22412   ac_status=$?
22413   echo "$as_me:22413: \$? = $ac_status" >&5
22414   (exit "$ac_status"); } &&
22415          { ac_try='test -s "conftest$ac_exeext"'
22416   { (eval echo "$as_me:22416: \"$ac_try\"") >&5
22417   (eval $ac_try) 2>&5
22418   ac_status=$?
22419   echo "$as_me:22419: \$? = $ac_status" >&5
22420   (exit "$ac_status"); }; }; then
22421   cf_cv_have_tcgetattr=yes
22422 else
22423   echo "$as_me: failed program was:" >&5
22424 cat "conftest.$ac_ext" >&5
22425 cf_cv_have_tcgetattr=no
22426 fi
22427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22428 fi
22429 echo "$as_me:22429: result: $cf_cv_have_tcgetattr" >&5
22430 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22431 test "$cf_cv_have_tcgetattr" = yes &&
22432 cat >>confdefs.h <<\EOF
22433 #define HAVE_TCGETATTR 1
22434 EOF
22435
22436 echo "$as_me:22436: checking for vsscanf function or workaround" >&5
22437 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22438 if test "${cf_cv_func_vsscanf+set}" = set; then
22439   echo $ECHO_N "(cached) $ECHO_C" >&6
22440 else
22441
22442 cat >"conftest.$ac_ext" <<_ACEOF
22443 #line 22443 "configure"
22444 #include "confdefs.h"
22445
22446 #include <stdarg.h>
22447 #include <stdio.h>
22448 int
22449 main (void)
22450 {
22451
22452         va_list ap;
22453         vsscanf("from", "%d", ap)
22454   ;
22455   return 0;
22456 }
22457 _ACEOF
22458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22459 if { (eval echo "$as_me:22459: \"$ac_link\"") >&5
22460   (eval $ac_link) 2>&5
22461   ac_status=$?
22462   echo "$as_me:22462: \$? = $ac_status" >&5
22463   (exit "$ac_status"); } &&
22464          { ac_try='test -s "conftest$ac_exeext"'
22465   { (eval echo "$as_me:22465: \"$ac_try\"") >&5
22466   (eval $ac_try) 2>&5
22467   ac_status=$?
22468   echo "$as_me:22468: \$? = $ac_status" >&5
22469   (exit "$ac_status"); }; }; then
22470   cf_cv_func_vsscanf=vsscanf
22471 else
22472   echo "$as_me: failed program was:" >&5
22473 cat "conftest.$ac_ext" >&5
22474
22475 cat >"conftest.$ac_ext" <<_ACEOF
22476 #line 22476 "configure"
22477 #include "confdefs.h"
22478
22479 #include <stdarg.h>
22480 #include <stdio.h>
22481 int
22482 main (void)
22483 {
22484
22485         FILE strbuf;
22486         char *str = "from";
22487
22488         strbuf._flag = _IOREAD;
22489         strbuf._ptr = strbuf._base = (unsigned char *) str;
22490         strbuf._cnt = strlen(str);
22491         strbuf._file = _NFILE;
22492         return (vfscanf(&strbuf, "%d", ap))
22493   ;
22494   return 0;
22495 }
22496 _ACEOF
22497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22498 if { (eval echo "$as_me:22498: \"$ac_link\"") >&5
22499   (eval $ac_link) 2>&5
22500   ac_status=$?
22501   echo "$as_me:22501: \$? = $ac_status" >&5
22502   (exit "$ac_status"); } &&
22503          { ac_try='test -s "conftest$ac_exeext"'
22504   { (eval echo "$as_me:22504: \"$ac_try\"") >&5
22505   (eval $ac_try) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit "$ac_status"); }; }; then
22509   cf_cv_func_vsscanf=vfscanf
22510 else
22511   echo "$as_me: failed program was:" >&5
22512 cat "conftest.$ac_ext" >&5
22513
22514 cat >"conftest.$ac_ext" <<_ACEOF
22515 #line 22515 "configure"
22516 #include "confdefs.h"
22517
22518 #include <stdarg.h>
22519 #include <stdio.h>
22520 int
22521 main (void)
22522 {
22523
22524         FILE strbuf;
22525         char *str = "from";
22526
22527         strbuf._flag = _IOREAD;
22528         strbuf._ptr = strbuf._base = (unsigned char *) str;
22529         strbuf._cnt = strlen(str);
22530         strbuf._file = _NFILE;
22531         return (_doscan(&strbuf, "%d", ap))
22532   ;
22533   return 0;
22534 }
22535 _ACEOF
22536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22537 if { (eval echo "$as_me:22537: \"$ac_link\"") >&5
22538   (eval $ac_link) 2>&5
22539   ac_status=$?
22540   echo "$as_me:22540: \$? = $ac_status" >&5
22541   (exit "$ac_status"); } &&
22542          { ac_try='test -s "conftest$ac_exeext"'
22543   { (eval echo "$as_me:22543: \"$ac_try\"") >&5
22544   (eval $ac_try) 2>&5
22545   ac_status=$?
22546   echo "$as_me:22546: \$? = $ac_status" >&5
22547   (exit "$ac_status"); }; }; then
22548   cf_cv_func_vsscanf=_doscan
22549 else
22550   echo "$as_me: failed program was:" >&5
22551 cat "conftest.$ac_ext" >&5
22552
22553 cf_cv_func_vsscanf=no
22554 fi
22555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22556 fi
22557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22558 fi
22559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22560 fi
22561 echo "$as_me:22561: result: $cf_cv_func_vsscanf" >&5
22562 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22563
22564 case "$cf_cv_func_vsscanf" in
22565 (vsscanf)
22566 cat >>confdefs.h <<\EOF
22567 #define HAVE_VSSCANF 1
22568 EOF
22569 ;;
22570 (vfscanf)
22571 cat >>confdefs.h <<\EOF
22572 #define HAVE_VFSCANF 1
22573 EOF
22574 ;;
22575 (_doscan)
22576 cat >>confdefs.h <<\EOF
22577 #define HAVE__DOSCAN 1
22578 EOF
22579 ;;
22580 esac
22581
22582 for ac_header in \
22583 unistd.h \
22584
22585 do
22586 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22587 echo "$as_me:22587: checking for $ac_header" >&5
22588 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22589 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22590   echo $ECHO_N "(cached) $ECHO_C" >&6
22591 else
22592   cat >"conftest.$ac_ext" <<_ACEOF
22593 #line 22593 "configure"
22594 #include "confdefs.h"
22595 #include <$ac_header>
22596 _ACEOF
22597 if { (eval echo "$as_me:22597: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22598   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22599   ac_status=$?
22600   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22601   rm -f conftest.er1
22602   cat conftest.err >&5
22603   echo "$as_me:22603: \$? = $ac_status" >&5
22604   (exit "$ac_status"); } >/dev/null; then
22605   if test -s conftest.err; then
22606     ac_cpp_err=$ac_c_preproc_warn_flag
22607   else
22608     ac_cpp_err=
22609   fi
22610 else
22611   ac_cpp_err=yes
22612 fi
22613 if test -z "$ac_cpp_err"; then
22614   eval "$as_ac_Header=yes"
22615 else
22616   echo "$as_me: failed program was:" >&5
22617   cat "conftest.$ac_ext" >&5
22618   eval "$as_ac_Header=no"
22619 fi
22620 rm -f conftest.err "conftest.$ac_ext"
22621 fi
22622 echo "$as_me:22622: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22623 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22624 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22625   cat >>confdefs.h <<EOF
22626 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22627 EOF
22628
22629 fi
22630 done
22631
22632 echo "$as_me:22632: checking for working mkstemp" >&5
22633 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22634 if test "${cf_cv_func_mkstemp+set}" = set; then
22635   echo $ECHO_N "(cached) $ECHO_C" >&6
22636 else
22637
22638 rm -rf ./conftest*
22639 if test "$cross_compiling" = yes; then
22640   cf_cv_func_mkstemp=maybe
22641 else
22642   cat >"conftest.$ac_ext" <<_ACEOF
22643 #line 22643 "configure"
22644 #include "confdefs.h"
22645
22646 #include <sys/types.h>
22647 #ifdef HAVE_UNISTD_H
22648 #include <unistd.h>
22649 #endif
22650 #include <stdlib.h>
22651 #include <stdio.h>
22652 #include <string.h>
22653 #include <sys/stat.h>
22654 int main(void)
22655 {
22656         char *tmpl = "conftestXXXXXX";
22657         char name[2][80];
22658         int n;
22659         int result = 0;
22660         int fd;
22661         struct stat sb;
22662
22663         umask(077);
22664         for (n = 0; n < 2; ++n) {
22665                 strcpy(name[n], tmpl);
22666                 if ((fd = mkstemp(name[n])) >= 0) {
22667                         if (!strcmp(name[n], tmpl)
22668                          || stat(name[n], &sb) != 0
22669                          || (sb.st_mode & S_IFMT) != S_IFREG
22670                          || (sb.st_mode & 077) != 0) {
22671                                 result = 1;
22672                         }
22673                         close(fd);
22674                 }
22675         }
22676         if (result == 0
22677          && !strcmp(name[0], name[1]))
22678                 result = 1;
22679         ${cf_cv_main_return:-return}(result);
22680 }
22681
22682 _ACEOF
22683 rm -f "conftest$ac_exeext"
22684 if { (eval echo "$as_me:22684: \"$ac_link\"") >&5
22685   (eval $ac_link) 2>&5
22686   ac_status=$?
22687   echo "$as_me:22687: \$? = $ac_status" >&5
22688   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22689   { (eval echo "$as_me:22689: \"$ac_try\"") >&5
22690   (eval $ac_try) 2>&5
22691   ac_status=$?
22692   echo "$as_me:22692: \$? = $ac_status" >&5
22693   (exit "$ac_status"); }; }; then
22694   cf_cv_func_mkstemp=yes
22695
22696 else
22697   echo "$as_me: program exited with status $ac_status" >&5
22698 echo "$as_me: failed program was:" >&5
22699 cat "conftest.$ac_ext" >&5
22700 cf_cv_func_mkstemp=no
22701
22702 fi
22703 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22704 fi
22705
22706 fi
22707 echo "$as_me:22707: result: $cf_cv_func_mkstemp" >&5
22708 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22709 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22710         echo "$as_me:22710: checking for mkstemp" >&5
22711 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22712 if test "${ac_cv_func_mkstemp+set}" = set; then
22713   echo $ECHO_N "(cached) $ECHO_C" >&6
22714 else
22715   cat >"conftest.$ac_ext" <<_ACEOF
22716 #line 22716 "configure"
22717 #include "confdefs.h"
22718 #define mkstemp autoconf_temporary
22719 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22720 #undef mkstemp
22721
22722 #ifdef __cplusplus
22723 extern "C"
22724 #endif
22725
22726 /* We use char because int might match the return type of a gcc2
22727    builtin and then its argument prototype would still apply.  */
22728 char mkstemp (void);
22729
22730 int
22731 main (void)
22732 {
22733
22734 /* The GNU C library defines stubs for functions which it implements
22735     to always fail with ENOSYS.  Some functions are actually named
22736     something starting with __ and the normal name is an alias.  */
22737 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22738 #error found stub for mkstemp
22739 #endif
22740
22741         return mkstemp ();
22742   ;
22743   return 0;
22744 }
22745 _ACEOF
22746 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22747 if { (eval echo "$as_me:22747: \"$ac_link\"") >&5
22748   (eval $ac_link) 2>&5
22749   ac_status=$?
22750   echo "$as_me:22750: \$? = $ac_status" >&5
22751   (exit "$ac_status"); } &&
22752          { ac_try='test -s "conftest$ac_exeext"'
22753   { (eval echo "$as_me:22753: \"$ac_try\"") >&5
22754   (eval $ac_try) 2>&5
22755   ac_status=$?
22756   echo "$as_me:22756: \$? = $ac_status" >&5
22757   (exit "$ac_status"); }; }; then
22758   ac_cv_func_mkstemp=yes
22759 else
22760   echo "$as_me: failed program was:" >&5
22761 cat "conftest.$ac_ext" >&5
22762 ac_cv_func_mkstemp=no
22763 fi
22764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22765 fi
22766 echo "$as_me:22766: result: $ac_cv_func_mkstemp" >&5
22767 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22768
22769 fi
22770 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22771
22772 cat >>confdefs.h <<\EOF
22773 #define HAVE_MKSTEMP 1
22774 EOF
22775
22776 fi
22777
22778 # setup for prototype of fallback for vsscanf()
22779
22780 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22781         HAVE_VSSCANF=1
22782 else
22783         HAVE_VSSCANF=0
22784 fi
22785
22786 if test "x$cross_compiling" = xyes ; then
22787         { echo "$as_me:22787: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22788 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22789 else
22790         echo "$as_me:22790: checking whether setvbuf arguments are reversed" >&5
22791 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22792 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22793   echo $ECHO_N "(cached) $ECHO_C" >&6
22794 else
22795   if test "$cross_compiling" = yes; then
22796   { { echo "$as_me:22796: error: cannot run test program while cross compiling" >&5
22797 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22798    { (exit 1); exit 1; }; }
22799 else
22800   cat >"conftest.$ac_ext" <<_ACEOF
22801 #line 22801 "configure"
22802 #include "confdefs.h"
22803 #include <stdio.h>
22804 /* If setvbuf has the reversed format, exit 0. */
22805 int
22806 main (void)
22807 {
22808   /* This call has the arguments reversed.
22809      A reversed system may check and see that the address of main
22810      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22811   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22812     $ac_main_return(1);
22813   putc('\r', stdout);
22814   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22815 }
22816 _ACEOF
22817 rm -f "conftest$ac_exeext"
22818 if { (eval echo "$as_me:22818: \"$ac_link\"") >&5
22819   (eval $ac_link) 2>&5
22820   ac_status=$?
22821   echo "$as_me:22821: \$? = $ac_status" >&5
22822   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22823   { (eval echo "$as_me:22823: \"$ac_try\"") >&5
22824   (eval $ac_try) 2>&5
22825   ac_status=$?
22826   echo "$as_me:22826: \$? = $ac_status" >&5
22827   (exit "$ac_status"); }; }; then
22828   ac_cv_func_setvbuf_reversed=yes
22829 else
22830   echo "$as_me: program exited with status $ac_status" >&5
22831 echo "$as_me: failed program was:" >&5
22832 cat "conftest.$ac_ext" >&5
22833 ac_cv_func_setvbuf_reversed=no
22834 fi
22835 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22836 fi
22837 rm -f core ./core.* ./*.core
22838 fi
22839 echo "$as_me:22839: result: $ac_cv_func_setvbuf_reversed" >&5
22840 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22841 if test $ac_cv_func_setvbuf_reversed = yes; then
22842
22843 cat >>confdefs.h <<\EOF
22844 #define SETVBUF_REVERSED 1
22845 EOF
22846
22847 fi
22848
22849 fi
22850 echo "$as_me:22850: checking for intptr_t" >&5
22851 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22852 if test "${ac_cv_type_intptr_t+set}" = set; then
22853   echo $ECHO_N "(cached) $ECHO_C" >&6
22854 else
22855   cat >"conftest.$ac_ext" <<_ACEOF
22856 #line 22856 "configure"
22857 #include "confdefs.h"
22858 $ac_includes_default
22859 int
22860 main (void)
22861 {
22862 if ((intptr_t *) 0)
22863   return 0;
22864 if (sizeof (intptr_t))
22865   return 0;
22866   ;
22867   return 0;
22868 }
22869 _ACEOF
22870 rm -f "conftest.$ac_objext"
22871 if { (eval echo "$as_me:22871: \"$ac_compile\"") >&5
22872   (eval $ac_compile) 2>&5
22873   ac_status=$?
22874   echo "$as_me:22874: \$? = $ac_status" >&5
22875   (exit "$ac_status"); } &&
22876          { ac_try='test -s "conftest.$ac_objext"'
22877   { (eval echo "$as_me:22877: \"$ac_try\"") >&5
22878   (eval $ac_try) 2>&5
22879   ac_status=$?
22880   echo "$as_me:22880: \$? = $ac_status" >&5
22881   (exit "$ac_status"); }; }; then
22882   ac_cv_type_intptr_t=yes
22883 else
22884   echo "$as_me: failed program was:" >&5
22885 cat "conftest.$ac_ext" >&5
22886 ac_cv_type_intptr_t=no
22887 fi
22888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22889 fi
22890 echo "$as_me:22890: result: $ac_cv_type_intptr_t" >&5
22891 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22892 if test "$ac_cv_type_intptr_t" = yes; then
22893   :
22894 else
22895
22896 cat >>confdefs.h <<EOF
22897 #define intptr_t long
22898 EOF
22899
22900 fi
22901
22902 echo "$as_me:22902: checking for ssize_t" >&5
22903 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22904 if test "${ac_cv_type_ssize_t+set}" = set; then
22905   echo $ECHO_N "(cached) $ECHO_C" >&6
22906 else
22907   cat >"conftest.$ac_ext" <<_ACEOF
22908 #line 22908 "configure"
22909 #include "confdefs.h"
22910 $ac_includes_default
22911 int
22912 main (void)
22913 {
22914 if ((ssize_t *) 0)
22915   return 0;
22916 if (sizeof (ssize_t))
22917   return 0;
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   ac_cv_type_ssize_t=yes
22935 else
22936   echo "$as_me: failed program was:" >&5
22937 cat "conftest.$ac_ext" >&5
22938 ac_cv_type_ssize_t=no
22939 fi
22940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22941 fi
22942 echo "$as_me:22942: result: $ac_cv_type_ssize_t" >&5
22943 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22944 if test "$ac_cv_type_ssize_t" = yes; then
22945   :
22946 else
22947
22948 cat >>confdefs.h <<EOF
22949 #define ssize_t int
22950 EOF
22951
22952 fi
22953
22954 echo "$as_me:22954: checking for type sigaction_t" >&5
22955 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22956 if test "${cf_cv_type_sigaction+set}" = set; then
22957   echo $ECHO_N "(cached) $ECHO_C" >&6
22958 else
22959
22960         cat >"conftest.$ac_ext" <<_ACEOF
22961 #line 22961 "configure"
22962 #include "confdefs.h"
22963
22964 #include <signal.h>
22965 int
22966 main (void)
22967 {
22968 sigaction_t x
22969   ;
22970   return 0;
22971 }
22972 _ACEOF
22973 rm -f "conftest.$ac_objext"
22974 if { (eval echo "$as_me:22974: \"$ac_compile\"") >&5
22975   (eval $ac_compile) 2>&5
22976   ac_status=$?
22977   echo "$as_me:22977: \$? = $ac_status" >&5
22978   (exit "$ac_status"); } &&
22979          { ac_try='test -s "conftest.$ac_objext"'
22980   { (eval echo "$as_me:22980: \"$ac_try\"") >&5
22981   (eval $ac_try) 2>&5
22982   ac_status=$?
22983   echo "$as_me:22983: \$? = $ac_status" >&5
22984   (exit "$ac_status"); }; }; then
22985   cf_cv_type_sigaction=yes
22986 else
22987   echo "$as_me: failed program was:" >&5
22988 cat "conftest.$ac_ext" >&5
22989 cf_cv_type_sigaction=no
22990 fi
22991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22992 fi
22993
22994 echo "$as_me:22994: result: $cf_cv_type_sigaction" >&5
22995 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22996 test "$cf_cv_type_sigaction" = yes &&
22997 cat >>confdefs.h <<\EOF
22998 #define HAVE_TYPE_SIGACTION 1
22999 EOF
23000
23001 echo "$as_me:23001: checking declaration of size-change" >&5
23002 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23003 if test "${cf_cv_sizechange+set}" = set; then
23004   echo $ECHO_N "(cached) $ECHO_C" >&6
23005 else
23006
23007         cf_cv_sizechange=unknown
23008         cf_save_CPPFLAGS="$CPPFLAGS"
23009
23010 for cf_opts in "" "NEED_PTEM_H"
23011 do
23012
23013         CPPFLAGS="$cf_save_CPPFLAGS"
23014         if test -n "$cf_opts"
23015         then
23016
23017         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23018         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23019
23020         fi
23021         cat >"conftest.$ac_ext" <<_ACEOF
23022 #line 23022 "configure"
23023 #include "confdefs.h"
23024 #include <sys/types.h>
23025 #ifdef HAVE_TERMIOS_H
23026 #include <termios.h>
23027 #else
23028 #ifdef HAVE_TERMIO_H
23029 #include <termio.h>
23030 #endif
23031 #endif
23032
23033 #ifdef NEED_PTEM_H
23034 /* This is a workaround for SCO:  they neglected to define struct winsize in
23035  * termios.h -- it is only in termio.h and ptem.h
23036  */
23037 #include <sys/stream.h>
23038 #include <sys/ptem.h>
23039 #endif
23040
23041 #ifdef HAVE_SYS_IOCTL_H
23042 #include <sys/ioctl.h>
23043 #endif
23044
23045 int
23046 main (void)
23047 {
23048
23049 #ifdef TIOCGSIZE
23050         struct ttysize win;     /* SunOS 3.0... */
23051         int y = win.ts_lines = 2;
23052         int x = win.ts_cols = 1;
23053         (void)y;
23054         (void)x;
23055 #else
23056 #ifdef TIOCGWINSZ
23057         struct winsize win;     /* everything else */
23058         int y = win.ws_row = 2;
23059         int x = win.ws_col = 1;
23060         (void)y;
23061         (void)x;
23062 #else
23063         no TIOCGSIZE or TIOCGWINSZ
23064 #endif /* TIOCGWINSZ */
23065 #endif /* TIOCGSIZE */
23066
23067   ;
23068   return 0;
23069 }
23070 _ACEOF
23071 rm -f "conftest.$ac_objext"
23072 if { (eval echo "$as_me:23072: \"$ac_compile\"") >&5
23073   (eval $ac_compile) 2>&5
23074   ac_status=$?
23075   echo "$as_me:23075: \$? = $ac_status" >&5
23076   (exit "$ac_status"); } &&
23077          { ac_try='test -s "conftest.$ac_objext"'
23078   { (eval echo "$as_me:23078: \"$ac_try\"") >&5
23079   (eval $ac_try) 2>&5
23080   ac_status=$?
23081   echo "$as_me:23081: \$? = $ac_status" >&5
23082   (exit "$ac_status"); }; }; then
23083   cf_cv_sizechange=yes
23084 else
23085   echo "$as_me: failed program was:" >&5
23086 cat "conftest.$ac_ext" >&5
23087 cf_cv_sizechange=no
23088 fi
23089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23090
23091         CPPFLAGS="$cf_save_CPPFLAGS"
23092         if test "$cf_cv_sizechange" = yes ; then
23093                 echo "size-change succeeded ($cf_opts)" >&5
23094                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23095                 break
23096         fi
23097 done
23098
23099 fi
23100 echo "$as_me:23100: result: $cf_cv_sizechange" >&5
23101 echo "${ECHO_T}$cf_cv_sizechange" >&6
23102 if test "$cf_cv_sizechange" != no ; then
23103
23104 cat >>confdefs.h <<\EOF
23105 #define HAVE_SIZECHANGE 1
23106 EOF
23107
23108         case "$cf_cv_sizechange" in
23109         (NEED*)
23110                 cat >>confdefs.h <<EOF
23111 #define $cf_cv_sizechange  1
23112 EOF
23113
23114                 ;;
23115         esac
23116 fi
23117
23118 echo "$as_me:23118: checking for memmove" >&5
23119 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23120 if test "${ac_cv_func_memmove+set}" = set; then
23121   echo $ECHO_N "(cached) $ECHO_C" >&6
23122 else
23123   cat >"conftest.$ac_ext" <<_ACEOF
23124 #line 23124 "configure"
23125 #include "confdefs.h"
23126 #define memmove autoconf_temporary
23127 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23128 #undef memmove
23129
23130 #ifdef __cplusplus
23131 extern "C"
23132 #endif
23133
23134 /* We use char because int might match the return type of a gcc2
23135    builtin and then its argument prototype would still apply.  */
23136 char memmove (void);
23137
23138 int
23139 main (void)
23140 {
23141
23142 /* The GNU C library defines stubs for functions which it implements
23143     to always fail with ENOSYS.  Some functions are actually named
23144     something starting with __ and the normal name is an alias.  */
23145 #if defined (__stub_memmove) || defined (__stub___memmove)
23146 #error found stub for memmove
23147 #endif
23148
23149         return memmove ();
23150   ;
23151   return 0;
23152 }
23153 _ACEOF
23154 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23155 if { (eval echo "$as_me:23155: \"$ac_link\"") >&5
23156   (eval $ac_link) 2>&5
23157   ac_status=$?
23158   echo "$as_me:23158: \$? = $ac_status" >&5
23159   (exit "$ac_status"); } &&
23160          { ac_try='test -s "conftest$ac_exeext"'
23161   { (eval echo "$as_me:23161: \"$ac_try\"") >&5
23162   (eval $ac_try) 2>&5
23163   ac_status=$?
23164   echo "$as_me:23164: \$? = $ac_status" >&5
23165   (exit "$ac_status"); }; }; then
23166   ac_cv_func_memmove=yes
23167 else
23168   echo "$as_me: failed program was:" >&5
23169 cat "conftest.$ac_ext" >&5
23170 ac_cv_func_memmove=no
23171 fi
23172 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23173 fi
23174 echo "$as_me:23174: result: $ac_cv_func_memmove" >&5
23175 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23176 if test "$ac_cv_func_memmove" = yes; then
23177   :
23178 else
23179
23180 echo "$as_me:23180: checking for bcopy" >&5
23181 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23182 if test "${ac_cv_func_bcopy+set}" = set; then
23183   echo $ECHO_N "(cached) $ECHO_C" >&6
23184 else
23185   cat >"conftest.$ac_ext" <<_ACEOF
23186 #line 23186 "configure"
23187 #include "confdefs.h"
23188 #define bcopy autoconf_temporary
23189 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23190 #undef bcopy
23191
23192 #ifdef __cplusplus
23193 extern "C"
23194 #endif
23195
23196 /* We use char because int might match the return type of a gcc2
23197    builtin and then its argument prototype would still apply.  */
23198 char bcopy (void);
23199
23200 int
23201 main (void)
23202 {
23203
23204 /* The GNU C library defines stubs for functions which it implements
23205     to always fail with ENOSYS.  Some functions are actually named
23206     something starting with __ and the normal name is an alias.  */
23207 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23208 #error found stub for bcopy
23209 #endif
23210
23211         return bcopy ();
23212   ;
23213   return 0;
23214 }
23215 _ACEOF
23216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23217 if { (eval echo "$as_me:23217: \"$ac_link\"") >&5
23218   (eval $ac_link) 2>&5
23219   ac_status=$?
23220   echo "$as_me:23220: \$? = $ac_status" >&5
23221   (exit "$ac_status"); } &&
23222          { ac_try='test -s "conftest$ac_exeext"'
23223   { (eval echo "$as_me:23223: \"$ac_try\"") >&5
23224   (eval $ac_try) 2>&5
23225   ac_status=$?
23226   echo "$as_me:23226: \$? = $ac_status" >&5
23227   (exit "$ac_status"); }; }; then
23228   ac_cv_func_bcopy=yes
23229 else
23230   echo "$as_me: failed program was:" >&5
23231 cat "conftest.$ac_ext" >&5
23232 ac_cv_func_bcopy=no
23233 fi
23234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23235 fi
23236 echo "$as_me:23236: result: $ac_cv_func_bcopy" >&5
23237 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23238 if test "$ac_cv_func_bcopy" = yes; then
23239
23240         echo "$as_me:23240: checking if bcopy does overlapping moves" >&5
23241 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23242 if test "${cf_cv_good_bcopy+set}" = set; then
23243   echo $ECHO_N "(cached) $ECHO_C" >&6
23244 else
23245
23246                 if test "$cross_compiling" = yes; then
23247   cf_cv_good_bcopy=unknown
23248 else
23249   cat >"conftest.$ac_ext" <<_ACEOF
23250 #line 23250 "configure"
23251 #include "confdefs.h"
23252
23253 int main(void) {
23254         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23255         char temp[40];
23256         bcopy(data, temp, sizeof(data));
23257         bcopy(temp+10, temp, 15);
23258         bcopy(temp+5, temp+15, 10);
23259         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23260 }
23261
23262 _ACEOF
23263 rm -f "conftest$ac_exeext"
23264 if { (eval echo "$as_me:23264: \"$ac_link\"") >&5
23265   (eval $ac_link) 2>&5
23266   ac_status=$?
23267   echo "$as_me:23267: \$? = $ac_status" >&5
23268   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23269   { (eval echo "$as_me:23269: \"$ac_try\"") >&5
23270   (eval $ac_try) 2>&5
23271   ac_status=$?
23272   echo "$as_me:23272: \$? = $ac_status" >&5
23273   (exit "$ac_status"); }; }; then
23274   cf_cv_good_bcopy=yes
23275 else
23276   echo "$as_me: program exited with status $ac_status" >&5
23277 echo "$as_me: failed program was:" >&5
23278 cat "conftest.$ac_ext" >&5
23279 cf_cv_good_bcopy=no
23280 fi
23281 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23282 fi
23283
23284 fi
23285 echo "$as_me:23285: result: $cf_cv_good_bcopy" >&5
23286 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23287
23288 else
23289   cf_cv_good_bcopy=no
23290 fi
23291
23292         if test "$cf_cv_good_bcopy" = yes ; then
23293
23294 cat >>confdefs.h <<\EOF
23295 #define USE_OK_BCOPY 1
23296 EOF
23297
23298         else
23299
23300 cat >>confdefs.h <<\EOF
23301 #define USE_MY_MEMMOVE 1
23302 EOF
23303
23304         fi
23305
23306 fi
23307
23308 tty >/dev/null 2>&1 || {
23309 for ac_func in posix_openpt
23310 do
23311 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23312 echo "$as_me:23312: checking for $ac_func" >&5
23313 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23314 if eval "test \"\${$as_ac_var+set}\" = set"; then
23315   echo $ECHO_N "(cached) $ECHO_C" >&6
23316 else
23317   cat >"conftest.$ac_ext" <<_ACEOF
23318 #line 23318 "configure"
23319 #include "confdefs.h"
23320 #define $ac_func autoconf_temporary
23321 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23322 #undef $ac_func
23323
23324 #ifdef __cplusplus
23325 extern "C"
23326 #endif
23327
23328 /* We use char because int might match the return type of a gcc2
23329    builtin and then its argument prototype would still apply.  */
23330 char $ac_func (void);
23331
23332 int
23333 main (void)
23334 {
23335
23336 /* The GNU C library defines stubs for functions which it implements
23337     to always fail with ENOSYS.  Some functions are actually named
23338     something starting with __ and the normal name is an alias.  */
23339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23340 #error found stub for $ac_func
23341 #endif
23342
23343         return $ac_func ();
23344   ;
23345   return 0;
23346 }
23347 _ACEOF
23348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23349 if { (eval echo "$as_me:23349: \"$ac_link\"") >&5
23350   (eval $ac_link) 2>&5
23351   ac_status=$?
23352   echo "$as_me:23352: \$? = $ac_status" >&5
23353   (exit "$ac_status"); } &&
23354          { ac_try='test -s "conftest$ac_exeext"'
23355   { (eval echo "$as_me:23355: \"$ac_try\"") >&5
23356   (eval $ac_try) 2>&5
23357   ac_status=$?
23358   echo "$as_me:23358: \$? = $ac_status" >&5
23359   (exit "$ac_status"); }; }; then
23360   eval "$as_ac_var=yes"
23361 else
23362   echo "$as_me: failed program was:" >&5
23363 cat "conftest.$ac_ext" >&5
23364 eval "$as_ac_var=no"
23365 fi
23366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23367 fi
23368 echo "$as_me:23368: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23369 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23370 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23371   cat >>confdefs.h <<EOF
23372 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23373 EOF
23374
23375 fi
23376 done
23377  }
23378 echo "$as_me:23378: checking if poll really works" >&5
23379 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23380 if test "${cf_cv_working_poll+set}" = set; then
23381   echo $ECHO_N "(cached) $ECHO_C" >&6
23382 else
23383
23384 if test "$cross_compiling" = yes; then
23385   cf_cv_working_poll=unknown
23386 else
23387   cat >"conftest.$ac_ext" <<_ACEOF
23388 #line 23388 "configure"
23389 #include "confdefs.h"
23390
23391 #include <stdlib.h>
23392 #include <stdio.h>
23393 #include <unistd.h>
23394 #include <fcntl.h>
23395 #ifdef HAVE_POLL_H
23396 #include <poll.h>
23397 #else
23398 #include <sys/poll.h>
23399 #endif
23400 int main(void) {
23401         struct pollfd myfds;
23402         int ret;
23403
23404         /* check for Darwin bug with respect to "devices" */
23405         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23406         if (myfds.fd < 0)
23407                 myfds.fd = 0;
23408         myfds.events = POLLIN;
23409         myfds.revents = 0;
23410
23411         ret = poll(&myfds, 1, 100);
23412
23413         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23414                 ret = -1;
23415         } else {
23416                 int fd = 0;
23417                 if (!isatty(fd)) {
23418                         fd = open("/dev/tty", 2);       /* O_RDWR */
23419                 }
23420 #ifdef HAVE_POSIX_OPENPT
23421                 if (fd < 0) {
23422                         fd = posix_openpt(O_RDWR);
23423                 }
23424 #endif
23425
23426                 if (fd >= 0) {
23427                         /* also check with standard input */
23428                         myfds.fd = fd;
23429                         myfds.events = POLLIN;
23430                         myfds.revents = 0;
23431                         ret = poll(&myfds, 1, 100);
23432                 } else {
23433                         ret = -1;
23434                 }
23435         }
23436         ${cf_cv_main_return:-return}(ret < 0);
23437 }
23438 _ACEOF
23439 rm -f "conftest$ac_exeext"
23440 if { (eval echo "$as_me:23440: \"$ac_link\"") >&5
23441   (eval $ac_link) 2>&5
23442   ac_status=$?
23443   echo "$as_me:23443: \$? = $ac_status" >&5
23444   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23445   { (eval echo "$as_me:23445: \"$ac_try\"") >&5
23446   (eval $ac_try) 2>&5
23447   ac_status=$?
23448   echo "$as_me:23448: \$? = $ac_status" >&5
23449   (exit "$ac_status"); }; }; then
23450   cf_cv_working_poll=yes
23451 else
23452   echo "$as_me: program exited with status $ac_status" >&5
23453 echo "$as_me: failed program was:" >&5
23454 cat "conftest.$ac_ext" >&5
23455 cf_cv_working_poll=no
23456 fi
23457 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23458 fi
23459 fi
23460 echo "$as_me:23460: result: $cf_cv_working_poll" >&5
23461 echo "${ECHO_T}$cf_cv_working_poll" >&6
23462 test "$cf_cv_working_poll" = "yes" &&
23463 cat >>confdefs.h <<\EOF
23464 #define HAVE_WORKING_POLL 1
23465 EOF
23466
23467 echo "$as_me:23467: checking for va_copy" >&5
23468 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23469 if test "${cf_cv_have_va_copy+set}" = set; then
23470   echo $ECHO_N "(cached) $ECHO_C" >&6
23471 else
23472
23473 cat >"conftest.$ac_ext" <<_ACEOF
23474 #line 23474 "configure"
23475 #include "confdefs.h"
23476
23477 #include <stdarg.h>
23478
23479 int
23480 main (void)
23481 {
23482
23483         static va_list dst;
23484         static va_list src;
23485         va_copy(dst, src)
23486   ;
23487   return 0;
23488 }
23489 _ACEOF
23490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23491 if { (eval echo "$as_me:23491: \"$ac_link\"") >&5
23492   (eval $ac_link) 2>&5
23493   ac_status=$?
23494   echo "$as_me:23494: \$? = $ac_status" >&5
23495   (exit "$ac_status"); } &&
23496          { ac_try='test -s "conftest$ac_exeext"'
23497   { (eval echo "$as_me:23497: \"$ac_try\"") >&5
23498   (eval $ac_try) 2>&5
23499   ac_status=$?
23500   echo "$as_me:23500: \$? = $ac_status" >&5
23501   (exit "$ac_status"); }; }; then
23502   cf_cv_have_va_copy=yes
23503 else
23504   echo "$as_me: failed program was:" >&5
23505 cat "conftest.$ac_ext" >&5
23506 cf_cv_have_va_copy=no
23507 fi
23508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23509 fi
23510 echo "$as_me:23510: result: $cf_cv_have_va_copy" >&5
23511 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23512
23513 if test "$cf_cv_have_va_copy" = yes;
23514 then
23515
23516 cat >>confdefs.h <<\EOF
23517 #define HAVE_VA_COPY 1
23518 EOF
23519
23520 else # !cf_cv_have_va_copy
23521
23522 echo "$as_me:23522: checking for __va_copy" >&5
23523 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23524 if test "${cf_cv_have___va_copy+set}" = set; then
23525   echo $ECHO_N "(cached) $ECHO_C" >&6
23526 else
23527
23528 cat >"conftest.$ac_ext" <<_ACEOF
23529 #line 23529 "configure"
23530 #include "confdefs.h"
23531
23532 #include <stdarg.h>
23533
23534 int
23535 main (void)
23536 {
23537
23538         static va_list dst;
23539         static va_list src;
23540         __va_copy(dst, src)
23541   ;
23542   return 0;
23543 }
23544 _ACEOF
23545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23546 if { (eval echo "$as_me:23546: \"$ac_link\"") >&5
23547   (eval $ac_link) 2>&5
23548   ac_status=$?
23549   echo "$as_me:23549: \$? = $ac_status" >&5
23550   (exit "$ac_status"); } &&
23551          { ac_try='test -s "conftest$ac_exeext"'
23552   { (eval echo "$as_me:23552: \"$ac_try\"") >&5
23553   (eval $ac_try) 2>&5
23554   ac_status=$?
23555   echo "$as_me:23555: \$? = $ac_status" >&5
23556   (exit "$ac_status"); }; }; then
23557   cf_cv_have___va_copy=yes
23558 else
23559   echo "$as_me: failed program was:" >&5
23560 cat "conftest.$ac_ext" >&5
23561 cf_cv_have___va_copy=no
23562 fi
23563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23564 fi
23565 echo "$as_me:23565: result: $cf_cv_have___va_copy" >&5
23566 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23567
23568 if test "$cf_cv_have___va_copy" = yes
23569 then
23570
23571 cat >>confdefs.h <<\EOF
23572 #define HAVE___VA_COPY 1
23573 EOF
23574
23575 else # !cf_cv_have___va_copy
23576
23577 echo "$as_me:23577: checking for __builtin_va_copy" >&5
23578 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23579 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23580   echo $ECHO_N "(cached) $ECHO_C" >&6
23581 else
23582
23583 cat >"conftest.$ac_ext" <<_ACEOF
23584 #line 23584 "configure"
23585 #include "confdefs.h"
23586
23587 #include <stdarg.h>
23588
23589 int
23590 main (void)
23591 {
23592
23593         static va_list dst;
23594         static va_list src;
23595         __builtin_va_copy(dst, src)
23596   ;
23597   return 0;
23598 }
23599 _ACEOF
23600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23601 if { (eval echo "$as_me:23601: \"$ac_link\"") >&5
23602   (eval $ac_link) 2>&5
23603   ac_status=$?
23604   echo "$as_me:23604: \$? = $ac_status" >&5
23605   (exit "$ac_status"); } &&
23606          { ac_try='test -s "conftest$ac_exeext"'
23607   { (eval echo "$as_me:23607: \"$ac_try\"") >&5
23608   (eval $ac_try) 2>&5
23609   ac_status=$?
23610   echo "$as_me:23610: \$? = $ac_status" >&5
23611   (exit "$ac_status"); }; }; then
23612   cf_cv_have___builtin_va_copy=yes
23613 else
23614   echo "$as_me: failed program was:" >&5
23615 cat "conftest.$ac_ext" >&5
23616 cf_cv_have___builtin_va_copy=no
23617 fi
23618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23619 fi
23620 echo "$as_me:23620: result: $cf_cv_have___builtin_va_copy" >&5
23621 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23622
23623 test "$cf_cv_have___builtin_va_copy" = yes &&
23624
23625 cat >>confdefs.h <<\EOF
23626 #define HAVE___BUILTIN_VA_COPY 1
23627 EOF
23628
23629 fi # cf_cv_have___va_copy
23630
23631 fi # cf_cv_have_va_copy
23632
23633 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23634 (*yes*)
23635         ;;
23636
23637 (*)
23638         echo "$as_me:23638: checking if we can simply copy va_list" >&5
23639 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23640 if test "${cf_cv_pointer_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_pointer_va_list=yes
23674 else
23675   echo "$as_me: failed program was:" >&5
23676 cat "conftest.$ac_ext" >&5
23677 cf_cv_pointer_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_pointer_va_list" >&5
23682 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23683
23684         if test "$cf_cv_pointer_va_list" = no
23685         then
23686                 echo "$as_me:23686: checking if we can copy va_list indirectly" >&5
23687 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23688 if test "${cf_cv_array_va_list+set}" = set; then
23689   echo $ECHO_N "(cached) $ECHO_C" >&6
23690 else
23691
23692 cat >"conftest.$ac_ext" <<_ACEOF
23693 #line 23693 "configure"
23694 #include "confdefs.h"
23695
23696 #include <stdarg.h>
23697
23698 int
23699 main (void)
23700 {
23701
23702         va_list dst;
23703         va_list src;
23704         *dst = *src
23705   ;
23706   return 0;
23707 }
23708 _ACEOF
23709 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23710 if { (eval echo "$as_me:23710: \"$ac_link\"") >&5
23711   (eval $ac_link) 2>&5
23712   ac_status=$?
23713   echo "$as_me:23713: \$? = $ac_status" >&5
23714   (exit "$ac_status"); } &&
23715          { ac_try='test -s "conftest$ac_exeext"'
23716   { (eval echo "$as_me:23716: \"$ac_try\"") >&5
23717   (eval $ac_try) 2>&5
23718   ac_status=$?
23719   echo "$as_me:23719: \$? = $ac_status" >&5
23720   (exit "$ac_status"); }; }; then
23721   cf_cv_array_va_list=yes
23722 else
23723   echo "$as_me: failed program was:" >&5
23724 cat "conftest.$ac_ext" >&5
23725 cf_cv_array_va_list=no
23726 fi
23727 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23728 fi
23729 echo "$as_me:23729: result: $cf_cv_array_va_list" >&5
23730 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23731                 test "$cf_cv_array_va_list" = yes &&
23732 cat >>confdefs.h <<\EOF
23733 #define ARRAY_VA_LIST 1
23734 EOF
23735
23736         fi
23737         ;;
23738 esac
23739
23740 echo "$as_me:23740: checking for pid_t" >&5
23741 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23742 if test "${ac_cv_type_pid_t+set}" = set; then
23743   echo $ECHO_N "(cached) $ECHO_C" >&6
23744 else
23745   cat >"conftest.$ac_ext" <<_ACEOF
23746 #line 23746 "configure"
23747 #include "confdefs.h"
23748 $ac_includes_default
23749 int
23750 main (void)
23751 {
23752 if ((pid_t *) 0)
23753   return 0;
23754 if (sizeof (pid_t))
23755   return 0;
23756   ;
23757   return 0;
23758 }
23759 _ACEOF
23760 rm -f "conftest.$ac_objext"
23761 if { (eval echo "$as_me:23761: \"$ac_compile\"") >&5
23762   (eval $ac_compile) 2>&5
23763   ac_status=$?
23764   echo "$as_me:23764: \$? = $ac_status" >&5
23765   (exit "$ac_status"); } &&
23766          { ac_try='test -s "conftest.$ac_objext"'
23767   { (eval echo "$as_me:23767: \"$ac_try\"") >&5
23768   (eval $ac_try) 2>&5
23769   ac_status=$?
23770   echo "$as_me:23770: \$? = $ac_status" >&5
23771   (exit "$ac_status"); }; }; then
23772   ac_cv_type_pid_t=yes
23773 else
23774   echo "$as_me: failed program was:" >&5
23775 cat "conftest.$ac_ext" >&5
23776 ac_cv_type_pid_t=no
23777 fi
23778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23779 fi
23780 echo "$as_me:23780: result: $ac_cv_type_pid_t" >&5
23781 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23782 if test "$ac_cv_type_pid_t" = yes; then
23783   :
23784 else
23785
23786 cat >>confdefs.h <<EOF
23787 #define pid_t int
23788 EOF
23789
23790 fi
23791
23792 for ac_header in unistd.h vfork.h
23793 do
23794 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23795 echo "$as_me:23795: checking for $ac_header" >&5
23796 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23797 if eval "test \"\${$as_ac_Header+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 #include <$ac_header>
23804 _ACEOF
23805 if { (eval echo "$as_me:23805: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23806   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23807   ac_status=$?
23808   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23809   rm -f conftest.er1
23810   cat conftest.err >&5
23811   echo "$as_me:23811: \$? = $ac_status" >&5
23812   (exit "$ac_status"); } >/dev/null; then
23813   if test -s conftest.err; then
23814     ac_cpp_err=$ac_c_preproc_warn_flag
23815   else
23816     ac_cpp_err=
23817   fi
23818 else
23819   ac_cpp_err=yes
23820 fi
23821 if test -z "$ac_cpp_err"; then
23822   eval "$as_ac_Header=yes"
23823 else
23824   echo "$as_me: failed program was:" >&5
23825   cat "conftest.$ac_ext" >&5
23826   eval "$as_ac_Header=no"
23827 fi
23828 rm -f conftest.err "conftest.$ac_ext"
23829 fi
23830 echo "$as_me:23830: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23831 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23832 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23833   cat >>confdefs.h <<EOF
23834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23835 EOF
23836
23837 fi
23838 done
23839
23840 for ac_func in fork vfork
23841 do
23842 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23843 echo "$as_me:23843: checking for $ac_func" >&5
23844 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23845 if eval "test \"\${$as_ac_var+set}\" = set"; then
23846   echo $ECHO_N "(cached) $ECHO_C" >&6
23847 else
23848   cat >"conftest.$ac_ext" <<_ACEOF
23849 #line 23849 "configure"
23850 #include "confdefs.h"
23851 #define $ac_func autoconf_temporary
23852 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23853 #undef $ac_func
23854
23855 #ifdef __cplusplus
23856 extern "C"
23857 #endif
23858
23859 /* We use char because int might match the return type of a gcc2
23860    builtin and then its argument prototype would still apply.  */
23861 char $ac_func (void);
23862
23863 int
23864 main (void)
23865 {
23866
23867 /* The GNU C library defines stubs for functions which it implements
23868     to always fail with ENOSYS.  Some functions are actually named
23869     something starting with __ and the normal name is an alias.  */
23870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23871 #error found stub for $ac_func
23872 #endif
23873
23874         return $ac_func ();
23875   ;
23876   return 0;
23877 }
23878 _ACEOF
23879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23880 if { (eval echo "$as_me:23880: \"$ac_link\"") >&5
23881   (eval $ac_link) 2>&5
23882   ac_status=$?
23883   echo "$as_me:23883: \$? = $ac_status" >&5
23884   (exit "$ac_status"); } &&
23885          { ac_try='test -s "conftest$ac_exeext"'
23886   { (eval echo "$as_me:23886: \"$ac_try\"") >&5
23887   (eval $ac_try) 2>&5
23888   ac_status=$?
23889   echo "$as_me:23889: \$? = $ac_status" >&5
23890   (exit "$ac_status"); }; }; then
23891   eval "$as_ac_var=yes"
23892 else
23893   echo "$as_me: failed program was:" >&5
23894 cat "conftest.$ac_ext" >&5
23895 eval "$as_ac_var=no"
23896 fi
23897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23898 fi
23899 echo "$as_me:23899: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23900 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23901 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23902   cat >>confdefs.h <<EOF
23903 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23904 EOF
23905
23906 fi
23907 done
23908
23909 ac_cv_func_fork_works=$ac_cv_func_fork
23910 if test "x$ac_cv_func_fork" = xyes; then
23911   echo "$as_me:23911: checking for working fork" >&5
23912 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23913 if test "${ac_cv_func_fork_works+set}" = set; then
23914   echo $ECHO_N "(cached) $ECHO_C" >&6
23915 else
23916   if test "$cross_compiling" = yes; then
23917   ac_cv_func_fork_works=cross
23918 else
23919   cat >"conftest.$ac_ext" <<_ACEOF
23920 /* By Rüdiger Kuhlmann. */
23921       #include <sys/types.h>
23922       #if HAVE_UNISTD_H
23923       # include <unistd.h>
23924       #endif
23925       /* Some systems only have a dummy stub for fork() */
23926       int main (void)
23927       {
23928         if (fork() < 0)
23929           $ac_main_return (1);
23930         $ac_main_return (0);
23931       }
23932 _ACEOF
23933 rm -f "conftest$ac_exeext"
23934 if { (eval echo "$as_me:23934: \"$ac_link\"") >&5
23935   (eval $ac_link) 2>&5
23936   ac_status=$?
23937   echo "$as_me:23937: \$? = $ac_status" >&5
23938   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23939   { (eval echo "$as_me:23939: \"$ac_try\"") >&5
23940   (eval $ac_try) 2>&5
23941   ac_status=$?
23942   echo "$as_me:23942: \$? = $ac_status" >&5
23943   (exit "$ac_status"); }; }; then
23944   ac_cv_func_fork_works=yes
23945 else
23946   echo "$as_me: program exited with status $ac_status" >&5
23947 echo "$as_me: failed program was:" >&5
23948 cat "conftest.$ac_ext" >&5
23949 ac_cv_func_fork_works=no
23950 fi
23951 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23952 fi
23953 fi
23954 echo "$as_me:23954: result: $ac_cv_func_fork_works" >&5
23955 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23956
23957 fi
23958 if test "x$ac_cv_func_fork_works" = xcross; then
23959   case $host in
23960     *-*-amigaos* | *-*-msdosdjgpp*)
23961       # Override, as these systems have only a dummy fork() stub
23962       ac_cv_func_fork_works=no
23963       ;;
23964     *)
23965       ac_cv_func_fork_works=yes
23966       ;;
23967   esac
23968   { echo "$as_me:23968: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23969 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23970 fi
23971 ac_cv_func_vfork_works=$ac_cv_func_vfork
23972 if test "x$ac_cv_func_vfork" = xyes; then
23973   echo "$as_me:23973: checking for working vfork" >&5
23974 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23975 if test "${ac_cv_func_vfork_works+set}" = set; then
23976   echo $ECHO_N "(cached) $ECHO_C" >&6
23977 else
23978   if test "$cross_compiling" = yes; then
23979   ac_cv_func_vfork_works=cross
23980 else
23981   cat >"conftest.$ac_ext" <<_ACEOF
23982 #line 23982 "configure"
23983 #include "confdefs.h"
23984 /* Thanks to Paul Eggert for this test.  */
23985 #include <stdio.h>
23986 #include <sys/types.h>
23987 #include <sys/stat.h>
23988 #if HAVE_UNISTD_H
23989 # include <unistd.h>
23990 #endif
23991 #if HAVE_VFORK_H
23992 # include <vfork.h>
23993 #endif
23994 /* On some sparc systems, changes by the child to local and incoming
23995    argument registers are propagated back to the parent.  The compiler
23996    is told about this with #include <vfork.h>, but some compilers
23997    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23998    static variable whose address is put into a register that is
23999    clobbered by the vfork.  */
24000 static
24001 #ifdef __cplusplus
24002 sparc_address_test (int arg)
24003 # else
24004 sparc_address_test (arg) int arg;
24005 #endif
24006 {
24007   static pid_t child;
24008   if (!child) {
24009     child = vfork ();
24010     if (child < 0) {
24011       perror ("vfork");
24012       _exit(2);
24013     }
24014     if (!child) {
24015       arg = getpid();
24016       write(-1, "", 0);
24017       _exit (arg);
24018     }
24019   }
24020 }
24021
24022 int
24023 main (void)
24024 {
24025   pid_t parent = getpid ();
24026   pid_t child;
24027
24028   sparc_address_test ();
24029
24030   child = vfork ();
24031
24032   if (child == 0) {
24033     /* Here is another test for sparc vfork register problems.  This
24034        test uses lots of local variables, at least as many local
24035        variables as main has allocated so far including compiler
24036        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24037        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24038        reuse the register of parent for one of the local variables,
24039        since it will think that parent can't possibly be used any more
24040        in this routine.  Assigning to the local variable will thus
24041        munge parent in the parent process.  */
24042     pid_t
24043       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24044       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24045     /* Convince the compiler that p..p7 are live; otherwise, it might
24046        use the same hardware register for all 8 local variables.  */
24047     if (p != p1 || p != p2 || p != p3 || p != p4
24048         || p != p5 || p != p6 || p != p7)
24049       _exit(1);
24050
24051     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24052        from child file descriptors.  If the child closes a descriptor
24053        before it execs or exits, this munges the parent's descriptor
24054        as well.  Test for this by closing stdout in the child.  */
24055     _exit(close(fileno(stdout)) != 0);
24056   } else {
24057     int status;
24058     struct stat st;
24059
24060     while (wait(&status) != child)
24061       ;
24062     $ac_main_return(
24063          /* Was there some problem with vforking?  */
24064          child < 0
24065
24066          /* Did the child fail?  (This shouldn't happen.)  */
24067          || status
24068
24069          /* Did the vfork/compiler bug occur?  */
24070          || parent != getpid()
24071
24072          /* Did the file descriptor bug occur?  */
24073          || fstat(fileno(stdout), &st) != 0
24074          );
24075   }
24076 }
24077 _ACEOF
24078 rm -f "conftest$ac_exeext"
24079 if { (eval echo "$as_me:24079: \"$ac_link\"") >&5
24080   (eval $ac_link) 2>&5
24081   ac_status=$?
24082   echo "$as_me:24082: \$? = $ac_status" >&5
24083   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24084   { (eval echo "$as_me:24084: \"$ac_try\"") >&5
24085   (eval $ac_try) 2>&5
24086   ac_status=$?
24087   echo "$as_me:24087: \$? = $ac_status" >&5
24088   (exit "$ac_status"); }; }; then
24089   ac_cv_func_vfork_works=yes
24090 else
24091   echo "$as_me: program exited with status $ac_status" >&5
24092 echo "$as_me: failed program was:" >&5
24093 cat "conftest.$ac_ext" >&5
24094 ac_cv_func_vfork_works=no
24095 fi
24096 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24097 fi
24098 fi
24099 echo "$as_me:24099: result: $ac_cv_func_vfork_works" >&5
24100 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24101
24102 fi;
24103 if test "x$ac_cv_func_fork_works" = xcross; then
24104   ac_cv_func_vfork_works=ac_cv_func_vfork
24105   { echo "$as_me:24105: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24106 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24107 fi
24108
24109 if test "x$ac_cv_func_vfork_works" = xyes; then
24110
24111 cat >>confdefs.h <<\EOF
24112 #define HAVE_WORKING_VFORK 1
24113 EOF
24114
24115 else
24116
24117 cat >>confdefs.h <<\EOF
24118 #define vfork fork
24119 EOF
24120
24121 fi
24122 if test "x$ac_cv_func_fork_works" = xyes; then
24123
24124 cat >>confdefs.h <<\EOF
24125 #define HAVE_WORKING_FORK 1
24126 EOF
24127
24128 fi
24129
24130 echo "$as_me:24130: checking if fopen accepts explicit binary mode" >&5
24131 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24132 if test "${cf_cv_fopen_bin_r+set}" = set; then
24133   echo $ECHO_N "(cached) $ECHO_C" >&6
24134 else
24135
24136         if test "$cross_compiling" = yes; then
24137   cf_cv_fopen_bin_r=unknown
24138 else
24139   cat >"conftest.$ac_ext" <<_ACEOF
24140 #line 24140 "configure"
24141 #include "confdefs.h"
24142
24143 #include <stdio.h>
24144 int main(void) {
24145         FILE *fp = fopen("conftest.tmp", "wb");
24146         int rc = 0;
24147         if (fp != 0) {
24148                 int p, q;
24149                 for (p = 0; p < 256; ++p) {
24150                         fputc(p, fp);
24151                 }
24152                 fclose(fp);
24153                 fp = fopen("conftest.tmp", "rb");
24154                 if (fp != 0) {
24155                         for (p = 0; p < 256; ++p) {
24156                                 q = fgetc(fp);
24157                                 if (q != p) {
24158                                         rc = 1;
24159                                         break;
24160                                 }
24161                         }
24162                 } else {
24163                         rc = 1;
24164                 }
24165         } else {
24166                 rc = 1;
24167         }
24168         ${cf_cv_main_return:-return} (rc);
24169 }
24170
24171 _ACEOF
24172 rm -f "conftest$ac_exeext"
24173 if { (eval echo "$as_me:24173: \"$ac_link\"") >&5
24174   (eval $ac_link) 2>&5
24175   ac_status=$?
24176   echo "$as_me:24176: \$? = $ac_status" >&5
24177   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24178   { (eval echo "$as_me:24178: \"$ac_try\"") >&5
24179   (eval $ac_try) 2>&5
24180   ac_status=$?
24181   echo "$as_me:24181: \$? = $ac_status" >&5
24182   (exit "$ac_status"); }; }; then
24183   cf_cv_fopen_bin_r=yes
24184 else
24185   echo "$as_me: program exited with status $ac_status" >&5
24186 echo "$as_me: failed program was:" >&5
24187 cat "conftest.$ac_ext" >&5
24188 cf_cv_fopen_bin_r=no
24189 fi
24190 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24191 fi
24192
24193 fi
24194 echo "$as_me:24194: result: $cf_cv_fopen_bin_r" >&5
24195 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24196 test "x$cf_cv_fopen_bin_r" != xno &&
24197 cat >>confdefs.h <<\EOF
24198 #define USE_FOPEN_BIN_R 1
24199 EOF
24200
24201 # special check for test/ditto.c
24202
24203 echo "$as_me:24203: checking for openpty in -lutil" >&5
24204 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24205 if test "${ac_cv_lib_util_openpty+set}" = set; then
24206   echo $ECHO_N "(cached) $ECHO_C" >&6
24207 else
24208   ac_check_lib_save_LIBS=$LIBS
24209 LIBS="-lutil  $LIBS"
24210 cat >"conftest.$ac_ext" <<_ACEOF
24211 #line 24211 "configure"
24212 #include "confdefs.h"
24213
24214 /* Override any gcc2 internal prototype to avoid an error.  */
24215 #ifdef __cplusplus
24216 extern "C"
24217 #endif
24218 /* We use char because int might match the return type of a gcc2
24219    builtin and then its argument prototype would still apply.  */
24220 char openpty ();
24221 int
24222 main (void)
24223 {
24224 openpty ();
24225   ;
24226   return 0;
24227 }
24228 _ACEOF
24229 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24230 if { (eval echo "$as_me:24230: \"$ac_link\"") >&5
24231   (eval $ac_link) 2>&5
24232   ac_status=$?
24233   echo "$as_me:24233: \$? = $ac_status" >&5
24234   (exit "$ac_status"); } &&
24235          { ac_try='test -s "conftest$ac_exeext"'
24236   { (eval echo "$as_me:24236: \"$ac_try\"") >&5
24237   (eval $ac_try) 2>&5
24238   ac_status=$?
24239   echo "$as_me:24239: \$? = $ac_status" >&5
24240   (exit "$ac_status"); }; }; then
24241   ac_cv_lib_util_openpty=yes
24242 else
24243   echo "$as_me: failed program was:" >&5
24244 cat "conftest.$ac_ext" >&5
24245 ac_cv_lib_util_openpty=no
24246 fi
24247 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24248 LIBS=$ac_check_lib_save_LIBS
24249 fi
24250 echo "$as_me:24250: result: $ac_cv_lib_util_openpty" >&5
24251 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24252 if test "$ac_cv_lib_util_openpty" = yes; then
24253   cf_cv_lib_util=yes
24254 else
24255   cf_cv_lib_util=no
24256 fi
24257
24258 echo "$as_me:24258: checking for openpty header" >&5
24259 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24260 if test "${cf_cv_func_openpty+set}" = set; then
24261   echo $ECHO_N "(cached) $ECHO_C" >&6
24262 else
24263
24264         cf_save_LIBS="$LIBS"
24265         test "$cf_cv_lib_util" = yes && {
24266 cf_add_libs="$LIBS"
24267 # reverse order
24268 cf_add_0lib=
24269 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24270 # filter duplicates
24271 for cf_add_1lib in $cf_add_0lib; do
24272         for cf_add_2lib in $cf_add_libs; do
24273                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24274                         cf_add_1lib=
24275                         break
24276                 fi
24277         done
24278         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24279 done
24280 LIBS="$cf_add_libs"
24281  }
24282         for cf_header in pty.h libutil.h util.h
24283         do
24284         cat >"conftest.$ac_ext" <<_ACEOF
24285 #line 24285 "configure"
24286 #include "confdefs.h"
24287
24288 #include <$cf_header>
24289
24290 int
24291 main (void)
24292 {
24293
24294         int x = openpty((int *)0, (int *)0, (char *)0,
24295                                    (struct termios *)0, (struct winsize *)0);
24296
24297   ;
24298   return 0;
24299 }
24300 _ACEOF
24301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24302 if { (eval echo "$as_me:24302: \"$ac_link\"") >&5
24303   (eval $ac_link) 2>&5
24304   ac_status=$?
24305   echo "$as_me:24305: \$? = $ac_status" >&5
24306   (exit "$ac_status"); } &&
24307          { ac_try='test -s "conftest$ac_exeext"'
24308   { (eval echo "$as_me:24308: \"$ac_try\"") >&5
24309   (eval $ac_try) 2>&5
24310   ac_status=$?
24311   echo "$as_me:24311: \$? = $ac_status" >&5
24312   (exit "$ac_status"); }; }; then
24313
24314                 cf_cv_func_openpty=$cf_header
24315                 break
24316
24317 else
24318   echo "$as_me: failed program was:" >&5
24319 cat "conftest.$ac_ext" >&5
24320
24321                 cf_cv_func_openpty=no
24322
24323 fi
24324 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24325         done
24326         LIBS="$cf_save_LIBS"
24327
24328 fi
24329 echo "$as_me:24329: result: $cf_cv_func_openpty" >&5
24330 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24331
24332 if test "$cf_cv_func_openpty" != no ; then
24333
24334 cat >>confdefs.h <<EOF
24335 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24336 EOF
24337
24338 cat >>confdefs.h <<\EOF
24339 #define USE_XTERM_PTY 1
24340 EOF
24341
24342         if test "x$cf_cv_lib_util" = xyes ; then
24343
24344 cf_add_libs="$TEST_LIBS"
24345 # reverse order
24346 cf_add_0lib=
24347 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24348 # filter duplicates
24349 for cf_add_1lib in $cf_add_0lib; do
24350         for cf_add_2lib in $cf_add_libs; do
24351                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24352                         cf_add_1lib=
24353                         break
24354                 fi
24355         done
24356         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24357 done
24358 TEST_LIBS="$cf_add_libs"
24359
24360         fi
24361 fi
24362
24363 if test "$with_hashed_db" != no ; then
24364
24365 cat >>confdefs.h <<\EOF
24366 #define USE_HASHED_DB 1
24367 EOF
24368
24369 case $with_hashed_db in
24370 (yes|*able*)
24371         ;;
24372 (*)
24373         if test -d "$with_hashed_db" ; then
24374
24375 if test -n "$with_hashed_db/include" ; then
24376   for cf_add_incdir in $with_hashed_db/include
24377   do
24378         while test "$cf_add_incdir" != /usr/include
24379         do
24380           if test -d "$cf_add_incdir"
24381           then
24382                 cf_have_incdir=no
24383                 if test -n "$CFLAGS$CPPFLAGS" ; then
24384                   # a loop is needed to ensure we can add subdirs of existing dirs
24385                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24386                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24387                           cf_have_incdir=yes; break
24388                         fi
24389                   done
24390                 fi
24391
24392                 if test "$cf_have_incdir" = no ; then
24393                   if test "$cf_add_incdir" = /usr/local/include ; then
24394                         if test "$GCC" = yes
24395                         then
24396                           cf_save_CPPFLAGS=$CPPFLAGS
24397
24398         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24399         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24400
24401                           cat >"conftest.$ac_ext" <<_ACEOF
24402 #line 24402 "configure"
24403 #include "confdefs.h"
24404 #include <stdio.h>
24405 int
24406 main (void)
24407 {
24408 printf("Hello")
24409   ;
24410   return 0;
24411 }
24412 _ACEOF
24413 rm -f "conftest.$ac_objext"
24414 if { (eval echo "$as_me:24414: \"$ac_compile\"") >&5
24415   (eval $ac_compile) 2>&5
24416   ac_status=$?
24417   echo "$as_me:24417: \$? = $ac_status" >&5
24418   (exit "$ac_status"); } &&
24419          { ac_try='test -s "conftest.$ac_objext"'
24420   { (eval echo "$as_me:24420: \"$ac_try\"") >&5
24421   (eval $ac_try) 2>&5
24422   ac_status=$?
24423   echo "$as_me:24423: \$? = $ac_status" >&5
24424   (exit "$ac_status"); }; }; then
24425   :
24426 else
24427   echo "$as_me: failed program was:" >&5
24428 cat "conftest.$ac_ext" >&5
24429 cf_have_incdir=yes
24430 fi
24431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24432                           CPPFLAGS=$cf_save_CPPFLAGS
24433                         fi
24434                   fi
24435                 fi
24436
24437                 if test "$cf_have_incdir" = no ; then
24438                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24439
24440 echo "${as_me:-configure}:24440: testing adding $cf_add_incdir to include-path ..." 1>&5
24441
24442                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24443
24444                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24445                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24446                   cf_add_incdir="$cf_top_incdir"
24447                 else
24448                   break
24449                 fi
24450           else
24451                 break
24452           fi
24453         done
24454   done
24455 fi
24456
24457 if test -n "$with_hashed_db/lib" ; then
24458         for cf_add_libdir in $with_hashed_db/lib
24459         do
24460                 if test "$cf_add_libdir" = /usr/lib ; then
24461                         :
24462                 elif test -d "$cf_add_libdir"
24463                 then
24464                         cf_have_libdir=no
24465                         if test -n "$LDFLAGS$LIBS" ; then
24466                                 # a loop is needed to ensure we can add subdirs of existing dirs
24467                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24468                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24469                                                 cf_have_libdir=yes; break
24470                                         fi
24471                                 done
24472                         fi
24473                         if test "$cf_have_libdir" = no ; then
24474                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24475
24476 echo "${as_me:-configure}:24476: testing adding $cf_add_libdir to library-path ..." 1>&5
24477
24478                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24479                         fi
24480                 fi
24481         done
24482 fi
24483
24484         else
24485                 case "$with_hashed_db" in
24486                 (./*|../*|/*)
24487                         { echo "$as_me:24487: WARNING: no such directory $with_hashed_db" >&5
24488 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24489                         ;;
24490                 (*)
24491
24492 cf_search=
24493
24494 test "x$prefix" != "xNONE" && \
24495 test -d "$prefix" && \
24496  {
24497         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24498         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24499         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24500         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24501         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24502         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24503 }
24504
24505 for cf_subdir_prefix in \
24506         /usr \
24507         /usr/local \
24508         /usr/pkg \
24509         /opt \
24510         /opt/local \
24511         $HOME
24512 do
24513
24514 test "x$cf_subdir_prefix" != "x$prefix" && \
24515 test -d "$cf_subdir_prefix" && \
24516 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24517         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24518         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24519         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24520         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24521         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24522         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"
24523 }
24524
24525 done
24526
24527         for cf_item in $cf_search
24528         do
24529                 case "$cf_item" in
24530                 (*/$with_hashed_db)
24531
24532 if test -n "$cf_item" ; then
24533   for cf_add_incdir in $cf_item
24534   do
24535         while test "$cf_add_incdir" != /usr/include
24536         do
24537           if test -d "$cf_add_incdir"
24538           then
24539                 cf_have_incdir=no
24540                 if test -n "$CFLAGS$CPPFLAGS" ; then
24541                   # a loop is needed to ensure we can add subdirs of existing dirs
24542                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24543                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24544                           cf_have_incdir=yes; break
24545                         fi
24546                   done
24547                 fi
24548
24549                 if test "$cf_have_incdir" = no ; then
24550                   if test "$cf_add_incdir" = /usr/local/include ; then
24551                         if test "$GCC" = yes
24552                         then
24553                           cf_save_CPPFLAGS=$CPPFLAGS
24554
24555         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24556         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24557
24558                           cat >"conftest.$ac_ext" <<_ACEOF
24559 #line 24559 "configure"
24560 #include "confdefs.h"
24561 #include <stdio.h>
24562 int
24563 main (void)
24564 {
24565 printf("Hello")
24566   ;
24567   return 0;
24568 }
24569 _ACEOF
24570 rm -f "conftest.$ac_objext"
24571 if { (eval echo "$as_me:24571: \"$ac_compile\"") >&5
24572   (eval $ac_compile) 2>&5
24573   ac_status=$?
24574   echo "$as_me:24574: \$? = $ac_status" >&5
24575   (exit "$ac_status"); } &&
24576          { ac_try='test -s "conftest.$ac_objext"'
24577   { (eval echo "$as_me:24577: \"$ac_try\"") >&5
24578   (eval $ac_try) 2>&5
24579   ac_status=$?
24580   echo "$as_me:24580: \$? = $ac_status" >&5
24581   (exit "$ac_status"); }; }; then
24582   :
24583 else
24584   echo "$as_me: failed program was:" >&5
24585 cat "conftest.$ac_ext" >&5
24586 cf_have_incdir=yes
24587 fi
24588 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24589                           CPPFLAGS=$cf_save_CPPFLAGS
24590                         fi
24591                   fi
24592                 fi
24593
24594                 if test "$cf_have_incdir" = no ; then
24595                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24596
24597 echo "${as_me:-configure}:24597: testing adding $cf_add_incdir to include-path ..." 1>&5
24598
24599                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24600
24601                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24602                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24603                   cf_add_incdir="$cf_top_incdir"
24604                 else
24605                   break
24606                 fi
24607           else
24608                 break
24609           fi
24610         done
24611   done
24612 fi
24613
24614                         ;;
24615                 esac
24616         done
24617
24618 cf_search=
24619
24620 test "x$prefix" != "xNONE" && \
24621 test -d "$prefix" && \
24622  {
24623         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24624         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24625         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24626         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24627         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24628         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24629 }
24630
24631 for cf_subdir_prefix in \
24632         /usr \
24633         /usr/local \
24634         /usr/pkg \
24635         /opt \
24636         /opt/local \
24637         $HOME
24638 do
24639
24640 test "x$cf_subdir_prefix" != "x$prefix" && \
24641 test -d "$cf_subdir_prefix" && \
24642 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24643         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24644         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24645         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24646         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24647         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24648         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"
24649 }
24650
24651 done
24652
24653         for cf_item in $cf_search
24654         do
24655                 case "$cf_item" in
24656                 (*/$with_hashed_db)
24657
24658 if test -n "$cf_item" ; then
24659         for cf_add_libdir in $cf_item
24660         do
24661                 if test "$cf_add_libdir" = /usr/lib ; then
24662                         :
24663                 elif test -d "$cf_add_libdir"
24664                 then
24665                         cf_have_libdir=no
24666                         if test -n "$LDFLAGS$LIBS" ; then
24667                                 # a loop is needed to ensure we can add subdirs of existing dirs
24668                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24669                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24670                                                 cf_have_libdir=yes; break
24671                                         fi
24672                                 done
24673                         fi
24674                         if test "$cf_have_libdir" = no ; then
24675                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24676
24677 echo "${as_me:-configure}:24677: testing adding $cf_add_libdir to library-path ..." 1>&5
24678
24679                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24680                         fi
24681                 fi
24682         done
24683 fi
24684
24685                         ;;
24686                 esac
24687         done
24688
24689                         ;;
24690                 esac
24691         fi
24692 esac
24693
24694 echo "$as_me:24694: checking for db.h" >&5
24695 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24696 if test "${ac_cv_header_db_h+set}" = set; then
24697   echo $ECHO_N "(cached) $ECHO_C" >&6
24698 else
24699   cat >"conftest.$ac_ext" <<_ACEOF
24700 #line 24700 "configure"
24701 #include "confdefs.h"
24702 #include <db.h>
24703 _ACEOF
24704 if { (eval echo "$as_me:24704: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24705   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24706   ac_status=$?
24707   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24708   rm -f conftest.er1
24709   cat conftest.err >&5
24710   echo "$as_me:24710: \$? = $ac_status" >&5
24711   (exit "$ac_status"); } >/dev/null; then
24712   if test -s conftest.err; then
24713     ac_cpp_err=$ac_c_preproc_warn_flag
24714   else
24715     ac_cpp_err=
24716   fi
24717 else
24718   ac_cpp_err=yes
24719 fi
24720 if test -z "$ac_cpp_err"; then
24721   ac_cv_header_db_h=yes
24722 else
24723   echo "$as_me: failed program was:" >&5
24724   cat "conftest.$ac_ext" >&5
24725   ac_cv_header_db_h=no
24726 fi
24727 rm -f conftest.err "conftest.$ac_ext"
24728 fi
24729 echo "$as_me:24729: result: $ac_cv_header_db_h" >&5
24730 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24731 if test "$ac_cv_header_db_h" = yes; then
24732
24733 echo "$as_me:24733: checking for version of db" >&5
24734 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24735 if test "${cf_cv_hashed_db_version+set}" = set; then
24736   echo $ECHO_N "(cached) $ECHO_C" >&6
24737 else
24738
24739 cf_cv_hashed_db_version=unknown
24740
24741 for cf_db_version in 1 2 3 4 5 6
24742 do
24743
24744 echo "${as_me:-configure}:24744: testing checking for db version $cf_db_version ..." 1>&5
24745
24746         cat >"conftest.$ac_ext" <<_ACEOF
24747 #line 24747 "configure"
24748 #include "confdefs.h"
24749
24750 $ac_includes_default
24751 #include <db.h>
24752
24753 #ifdef DB_VERSION_MAJOR
24754         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24755 #if $cf_db_version == DB_VERSION_MAJOR
24756         /* ok */
24757 #else
24758         make an error
24759 #endif
24760 #else
24761 #if $cf_db_version == 1
24762         /* ok: assuming this is DB 1.8.5 */
24763 #else
24764         make an error
24765 #endif
24766 #endif
24767
24768 int
24769 main (void)
24770 {
24771 DBT *foo = 0
24772   ;
24773   return 0;
24774 }
24775 _ACEOF
24776 rm -f "conftest.$ac_objext"
24777 if { (eval echo "$as_me:24777: \"$ac_compile\"") >&5
24778   (eval $ac_compile) 2>&5
24779   ac_status=$?
24780   echo "$as_me:24780: \$? = $ac_status" >&5
24781   (exit "$ac_status"); } &&
24782          { ac_try='test -s "conftest.$ac_objext"'
24783   { (eval echo "$as_me:24783: \"$ac_try\"") >&5
24784   (eval $ac_try) 2>&5
24785   ac_status=$?
24786   echo "$as_me:24786: \$? = $ac_status" >&5
24787   (exit "$ac_status"); }; }; then
24788
24789         cf_cv_hashed_db_version=$cf_db_version
24790         break
24791
24792 else
24793   echo "$as_me: failed program was:" >&5
24794 cat "conftest.$ac_ext" >&5
24795 fi
24796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24797 done
24798
24799 fi
24800 echo "$as_me:24800: result: $cf_cv_hashed_db_version" >&5
24801 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24802
24803 if test "$cf_cv_hashed_db_version" = unknown ; then
24804         { { echo "$as_me:24804: error: Cannot determine version of db" >&5
24805 echo "$as_me: error: Cannot determine version of db" >&2;}
24806    { (exit 1); exit 1; }; }
24807 else
24808
24809 echo "$as_me:24809: checking for db libraries" >&5
24810 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24811 if test "${cf_cv_hashed_db_libs+set}" = set; then
24812   echo $ECHO_N "(cached) $ECHO_C" >&6
24813 else
24814
24815 cf_cv_hashed_db_libs=unknown
24816 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24817 do
24818         cf_save_libs="$LIBS"
24819         if test -n "$cf_db_libs"; then
24820
24821 cf_add_libs="$LIBS"
24822 # reverse order
24823 cf_add_0lib=
24824 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24825 # filter duplicates
24826 for cf_add_1lib in $cf_add_0lib; do
24827         for cf_add_2lib in $cf_add_libs; do
24828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24829                         cf_add_1lib=
24830                         break
24831                 fi
24832         done
24833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24834 done
24835 LIBS="$cf_add_libs"
24836
24837         fi
24838
24839 echo "${as_me:-configure}:24839: testing checking for library $cf_db_libs ..." 1>&5
24840
24841         cat >"conftest.$ac_ext" <<_ACEOF
24842 #line 24842 "configure"
24843 #include "confdefs.h"
24844
24845 $ac_includes_default
24846 #include <db.h>
24847
24848 int
24849 main (void)
24850 {
24851
24852         char *path = "/tmp/foo";
24853 #ifdef DB_VERSION_MAJOR
24854 #if DB_VERSION_MAJOR >= 4
24855         DB *result = 0;
24856         db_create(&result, NULL, 0);
24857         result->open(result,
24858                 NULL,
24859                 path,
24860                 path,
24861                 DB_HASH,
24862                 DB_CREATE,
24863                 0644);
24864 #elif DB_VERSION_MAJOR >= 3
24865         DB *result = 0;
24866         db_create(&result, NULL, 0);
24867         result->open(result,
24868                 path,
24869                 path,
24870                 DB_HASH,
24871                 DB_CREATE,
24872                 0644);
24873 #elif DB_VERSION_MAJOR >= 2
24874         DB *result = 0;
24875         db_open(path,
24876                 DB_HASH,
24877                 DB_CREATE,
24878                 0644,
24879                 (DB_ENV *) 0,
24880                 (DB_INFO *) 0,
24881                 &result);
24882 #endif /* DB_VERSION_MAJOR */
24883 #else
24884         DB *result = dbopen(path,
24885                      2,
24886                      0644,
24887                      DB_HASH,
24888                      0);
24889 #endif
24890         ${cf_cv_main_return:-return}(result != 0)
24891
24892   ;
24893   return 0;
24894 }
24895 _ACEOF
24896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24897 if { (eval echo "$as_me:24897: \"$ac_link\"") >&5
24898   (eval $ac_link) 2>&5
24899   ac_status=$?
24900   echo "$as_me:24900: \$? = $ac_status" >&5
24901   (exit "$ac_status"); } &&
24902          { ac_try='test -s "conftest$ac_exeext"'
24903   { (eval echo "$as_me:24903: \"$ac_try\"") >&5
24904   (eval $ac_try) 2>&5
24905   ac_status=$?
24906   echo "$as_me:24906: \$? = $ac_status" >&5
24907   (exit "$ac_status"); }; }; then
24908
24909         if test -n "$cf_db_libs" ; then
24910                 cf_cv_hashed_db_libs=$cf_db_libs
24911         else
24912                 cf_cv_hashed_db_libs=default
24913         fi
24914         LIBS="$cf_save_libs"
24915         break
24916
24917 else
24918   echo "$as_me: failed program was:" >&5
24919 cat "conftest.$ac_ext" >&5
24920 fi
24921 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24922         LIBS="$cf_save_libs"
24923 done
24924
24925 fi
24926 echo "$as_me:24926: result: $cf_cv_hashed_db_libs" >&5
24927 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24928
24929         if test "$cf_cv_hashed_db_libs" = unknown ; then
24930                 { { echo "$as_me:24930: error: Cannot determine library for db" >&5
24931 echo "$as_me: error: Cannot determine library for db" >&2;}
24932    { (exit 1); exit 1; }; }
24933         elif test "$cf_cv_hashed_db_libs" != default ; then
24934
24935 cf_add_libs="$LIBS"
24936 # reverse order
24937 cf_add_0lib=
24938 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24939 # filter duplicates
24940 for cf_add_1lib in $cf_add_0lib; do
24941         for cf_add_2lib in $cf_add_libs; do
24942                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24943                         cf_add_1lib=
24944                         break
24945                 fi
24946         done
24947         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24948 done
24949 LIBS="$cf_add_libs"
24950
24951         fi
24952 fi
24953
24954 else
24955
24956         { { echo "$as_me:24956: error: Cannot find db.h" >&5
24957 echo "$as_me: error: Cannot find db.h" >&2;}
24958    { (exit 1); exit 1; }; }
24959
24960 fi
24961
24962 fi
24963
24964 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24965         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24966         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24967 fi
24968
24969 # Just in case, check if the C compiler has a bool type.
24970
24971 echo "$as_me:24971: checking if we should include stdbool.h" >&5
24972 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24973
24974 if test "${cf_cv_header_stdbool_h+set}" = set; then
24975   echo $ECHO_N "(cached) $ECHO_C" >&6
24976 else
24977
24978         cat >"conftest.$ac_ext" <<_ACEOF
24979 #line 24979 "configure"
24980 #include "confdefs.h"
24981
24982 int
24983 main (void)
24984 {
24985 bool foo = false
24986   ;
24987   return 0;
24988 }
24989 _ACEOF
24990 rm -f "conftest.$ac_objext"
24991 if { (eval echo "$as_me:24991: \"$ac_compile\"") >&5
24992   (eval $ac_compile) 2>&5
24993   ac_status=$?
24994   echo "$as_me:24994: \$? = $ac_status" >&5
24995   (exit "$ac_status"); } &&
24996          { ac_try='test -s "conftest.$ac_objext"'
24997   { (eval echo "$as_me:24997: \"$ac_try\"") >&5
24998   (eval $ac_try) 2>&5
24999   ac_status=$?
25000   echo "$as_me:25000: \$? = $ac_status" >&5
25001   (exit "$ac_status"); }; }; then
25002   cf_cv_header_stdbool_h=0
25003 else
25004   echo "$as_me: failed program was:" >&5
25005 cat "conftest.$ac_ext" >&5
25006 cat >"conftest.$ac_ext" <<_ACEOF
25007 #line 25007 "configure"
25008 #include "confdefs.h"
25009
25010 #ifndef __BEOS__
25011 #include <stdbool.h>
25012 #endif
25013
25014 int
25015 main (void)
25016 {
25017 bool foo = false
25018   ;
25019   return 0;
25020 }
25021 _ACEOF
25022 rm -f "conftest.$ac_objext"
25023 if { (eval echo "$as_me:25023: \"$ac_compile\"") >&5
25024   (eval $ac_compile) 2>&5
25025   ac_status=$?
25026   echo "$as_me:25026: \$? = $ac_status" >&5
25027   (exit "$ac_status"); } &&
25028          { ac_try='test -s "conftest.$ac_objext"'
25029   { (eval echo "$as_me:25029: \"$ac_try\"") >&5
25030   (eval $ac_try) 2>&5
25031   ac_status=$?
25032   echo "$as_me:25032: \$? = $ac_status" >&5
25033   (exit "$ac_status"); }; }; then
25034   cf_cv_header_stdbool_h=1
25035 else
25036   echo "$as_me: failed program was:" >&5
25037 cat "conftest.$ac_ext" >&5
25038 cf_cv_header_stdbool_h=0
25039 fi
25040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25041 fi
25042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25043 fi
25044
25045 if test "$cf_cv_header_stdbool_h" = 1
25046 then    echo "$as_me:25046: result: yes" >&5
25047 echo "${ECHO_T}yes" >&6
25048 else    echo "$as_me:25048: result: no" >&5
25049 echo "${ECHO_T}no" >&6
25050 fi
25051
25052 echo "$as_me:25052: checking for builtin bool type" >&5
25053 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25054
25055 if test "${cf_cv_cc_bool_type+set}" = set; then
25056   echo $ECHO_N "(cached) $ECHO_C" >&6
25057 else
25058
25059         cat >"conftest.$ac_ext" <<_ACEOF
25060 #line 25060 "configure"
25061 #include "confdefs.h"
25062
25063 #include <stdio.h>
25064 #include <sys/types.h>
25065
25066 int
25067 main (void)
25068 {
25069 bool x = false
25070   ;
25071   return 0;
25072 }
25073 _ACEOF
25074 rm -f "conftest.$ac_objext"
25075 if { (eval echo "$as_me:25075: \"$ac_compile\"") >&5
25076   (eval $ac_compile) 2>&5
25077   ac_status=$?
25078   echo "$as_me:25078: \$? = $ac_status" >&5
25079   (exit "$ac_status"); } &&
25080          { ac_try='test -s "conftest.$ac_objext"'
25081   { (eval echo "$as_me:25081: \"$ac_try\"") >&5
25082   (eval $ac_try) 2>&5
25083   ac_status=$?
25084   echo "$as_me:25084: \$? = $ac_status" >&5
25085   (exit "$ac_status"); }; }; then
25086   cf_cv_cc_bool_type=1
25087 else
25088   echo "$as_me: failed program was:" >&5
25089 cat "conftest.$ac_ext" >&5
25090 cf_cv_cc_bool_type=0
25091 fi
25092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25093
25094 fi
25095
25096 if test "$cf_cv_cc_bool_type" = 1
25097 then    echo "$as_me:25097: result: yes" >&5
25098 echo "${ECHO_T}yes" >&6
25099 else    echo "$as_me:25099: result: no" >&5
25100 echo "${ECHO_T}no" >&6
25101 fi
25102
25103 # Check for C++ compiler characteristics (and ensure that it's there!)
25104 if test -n "$CXX" ; then
25105         ac_ext=cc
25106 ac_cpp='$CXXCPP $CPPFLAGS'
25107 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25108 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25109 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25110 ac_main_return="return"
25111
25112 if test -n "$GXX" ; then
25113
25114         cf_save="$LIBS"
25115         LIBS="$LIBS $CXXLIBS"
25116         echo "$as_me:25116: checking if we already have C++ library" >&5
25117 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25118         cat >"conftest.$ac_ext" <<_ACEOF
25119 #line 25119 "configure"
25120 #include "confdefs.h"
25121
25122                         #include <iostream>
25123 int
25124 main (void)
25125 {
25126
25127                         std::cout << "Hello World!" << std::endl;
25128   ;
25129   return 0;
25130 }
25131 _ACEOF
25132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25133 if { (eval echo "$as_me:25133: \"$ac_link\"") >&5
25134   (eval $ac_link) 2>&5
25135   ac_status=$?
25136   echo "$as_me:25136: \$? = $ac_status" >&5
25137   (exit "$ac_status"); } &&
25138          { ac_try='test -s "conftest$ac_exeext"'
25139   { (eval echo "$as_me:25139: \"$ac_try\"") >&5
25140   (eval $ac_try) 2>&5
25141   ac_status=$?
25142   echo "$as_me:25142: \$? = $ac_status" >&5
25143   (exit "$ac_status"); }; }; then
25144   cf_have_libstdcpp=yes
25145 else
25146   echo "$as_me: failed program was:" >&5
25147 cat "conftest.$ac_ext" >&5
25148 cf_have_libstdcpp=no
25149 fi
25150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25151         echo "$as_me:25151: result: $cf_have_libstdcpp" >&5
25152 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25153         LIBS="$cf_save"
25154
25155         if test "$cf_have_libstdcpp" != yes
25156         then
25157                 case "$cf_cv_system_name" in
25158                 (os2*)
25159                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25160                                 cf_stdcpp_libname=stdcpp
25161                         else
25162                                 cf_stdcpp_libname=stdc++
25163                         fi
25164                         ;;
25165                 (*)
25166                         cf_stdcpp_libname=stdc++
25167                         ;;
25168                 esac
25169
25170                 echo "$as_me:25170: checking for library $cf_stdcpp_libname" >&5
25171 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25172 if test "${cf_cv_libstdcpp+set}" = set; then
25173   echo $ECHO_N "(cached) $ECHO_C" >&6
25174 else
25175
25176                         cf_save="$LIBS"
25177                         LIBS="$LIBS $CXXLIBS"
25178
25179 cf_add_libs="$LIBS"
25180 # reverse order
25181 cf_add_0lib=
25182 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25183 # filter duplicates
25184 for cf_add_1lib in $cf_add_0lib; do
25185         for cf_add_2lib in $cf_add_libs; do
25186                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25187                         cf_add_1lib=
25188                         break
25189                 fi
25190         done
25191         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25192 done
25193 LIBS="$cf_add_libs"
25194
25195                 cat >"conftest.$ac_ext" <<_ACEOF
25196 #line 25196 "configure"
25197 #include "confdefs.h"
25198
25199                                 #include <iostream>
25200 int
25201 main (void)
25202 {
25203
25204                                 std::cout << "Hello World!" << std::endl;
25205   ;
25206   return 0;
25207 }
25208 _ACEOF
25209 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25210 if { (eval echo "$as_me:25210: \"$ac_link\"") >&5
25211   (eval $ac_link) 2>&5
25212   ac_status=$?
25213   echo "$as_me:25213: \$? = $ac_status" >&5
25214   (exit "$ac_status"); } &&
25215          { ac_try='test -s "conftest$ac_exeext"'
25216   { (eval echo "$as_me:25216: \"$ac_try\"") >&5
25217   (eval $ac_try) 2>&5
25218   ac_status=$?
25219   echo "$as_me:25219: \$? = $ac_status" >&5
25220   (exit "$ac_status"); }; }; then
25221   cf_cv_libstdcpp=yes
25222 else
25223   echo "$as_me: failed program was:" >&5
25224 cat "conftest.$ac_ext" >&5
25225 cf_cv_libstdcpp=no
25226 fi
25227 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25228                         LIBS="$cf_save"
25229
25230 fi
25231 echo "$as_me:25231: result: $cf_cv_libstdcpp" >&5
25232 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25233                 test "$cf_cv_libstdcpp" = yes && {
25234 cf_add_libs="$CXXLIBS"
25235 # reverse order
25236 cf_add_0lib=
25237 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25238 # filter duplicates
25239 for cf_add_1lib in $cf_add_0lib; do
25240         for cf_add_2lib in $cf_add_libs; do
25241                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25242                         cf_add_1lib=
25243                         break
25244                 fi
25245         done
25246         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25247 done
25248 CXXLIBS="$cf_add_libs"
25249  }
25250         fi
25251 fi
25252
25253         echo "$as_me:25253: checking whether $CXX understands -c and -o together" >&5
25254 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25255 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25256   echo $ECHO_N "(cached) $ECHO_C" >&6
25257 else
25258
25259 cat > conftest.$ac_ext <<CF_EOF
25260 int main(void)
25261 {
25262         ${cf_cv_main_return:-return}(0);
25263 }
25264 CF_EOF
25265 # We do the test twice because some compilers refuse to overwrite an
25266 # existing .o file with -o, though they will create one.
25267 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25268 if { (eval echo "$as_me:25268: \"$ac_try\"") >&5
25269   (eval $ac_try) 2>&5
25270   ac_status=$?
25271   echo "$as_me:25271: \$? = $ac_status" >&5
25272   (exit "$ac_status"); } &&
25273   test -f conftest2.$ac_objext && { (eval echo "$as_me:25273: \"$ac_try\"") >&5
25274   (eval $ac_try) 2>&5
25275   ac_status=$?
25276   echo "$as_me:25276: \$? = $ac_status" >&5
25277   (exit "$ac_status"); };
25278 then
25279   eval cf_cv_prog_CXX_c_o=yes
25280 else
25281   eval cf_cv_prog_CXX_c_o=no
25282 fi
25283 rm -rf ./conftest*
25284
25285 fi
25286 if test "$cf_cv_prog_CXX_c_o" = yes; then
25287   echo "$as_me:25287: result: yes" >&5
25288 echo "${ECHO_T}yes" >&6
25289 else
25290   echo "$as_me:25290: result: no" >&5
25291 echo "${ECHO_T}no" >&6
25292 fi
25293
25294         case "$GXX_VERSION" in
25295         (1.*|2.[0-6]*|[1-9][0-9].*)
25296                 cf_cxx_library=yes
25297                 ;;
25298         (*-2.7*|2.7*)
25299
25300 cf_cxx_library=unknown
25301 case "$cf_cv_system_name" in
25302 (os2*)
25303         cf_gpp_libname=gpp
25304         ;;
25305 (*)
25306         cf_gpp_libname=g++
25307         ;;
25308 esac
25309 if test "$GXX" = yes; then
25310         echo "$as_me:25310: checking for lib$cf_gpp_libname" >&5
25311 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25312         cf_save="$LIBS"
25313
25314 cf_add_libs="$LIBS"
25315 # reverse order
25316 cf_add_0lib=
25317 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25318 # filter duplicates
25319 for cf_add_1lib in $cf_add_0lib; do
25320         for cf_add_2lib in $cf_add_libs; do
25321                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25322                         cf_add_1lib=
25323                         break
25324                 fi
25325         done
25326         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25327 done
25328 LIBS="$cf_add_libs"
25329
25330         cat >"conftest.$ac_ext" <<_ACEOF
25331 #line 25331 "configure"
25332 #include "confdefs.h"
25333
25334 #include <$cf_gpp_libname/builtin.h>
25335
25336 int
25337 main (void)
25338 {
25339 two_arg_error_handler_t foo2 = lib_error_handler
25340   ;
25341   return 0;
25342 }
25343 _ACEOF
25344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25345 if { (eval echo "$as_me:25345: \"$ac_link\"") >&5
25346   (eval $ac_link) 2>&5
25347   ac_status=$?
25348   echo "$as_me:25348: \$? = $ac_status" >&5
25349   (exit "$ac_status"); } &&
25350          { ac_try='test -s "conftest$ac_exeext"'
25351   { (eval echo "$as_me:25351: \"$ac_try\"") >&5
25352   (eval $ac_try) 2>&5
25353   ac_status=$?
25354   echo "$as_me:25354: \$? = $ac_status" >&5
25355   (exit "$ac_status"); }; }; then
25356   cf_cxx_library=yes
25357
25358 cf_add_libs="$CXXLIBS"
25359 # reverse order
25360 cf_add_0lib=
25361 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25362 # filter duplicates
25363 for cf_add_1lib in $cf_add_0lib; do
25364         for cf_add_2lib in $cf_add_libs; do
25365                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25366                         cf_add_1lib=
25367                         break
25368                 fi
25369         done
25370         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25371 done
25372 CXXLIBS="$cf_add_libs"
25373
25374          if test "$cf_gpp_libname" = cpp ; then
25375
25376 cat >>confdefs.h <<\EOF
25377 #define HAVE_GPP_BUILTIN_H 1
25378 EOF
25379
25380          else
25381
25382 cat >>confdefs.h <<\EOF
25383 #define HAVE_GXX_BUILTIN_H 1
25384 EOF
25385
25386          fi
25387 else
25388   echo "$as_me: failed program was:" >&5
25389 cat "conftest.$ac_ext" >&5
25390 cat >"conftest.$ac_ext" <<_ACEOF
25391 #line 25391 "configure"
25392 #include "confdefs.h"
25393
25394 #include <builtin.h>
25395
25396 int
25397 main (void)
25398 {
25399 two_arg_error_handler_t foo2 = lib_error_handler
25400   ;
25401   return 0;
25402 }
25403 _ACEOF
25404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25405 if { (eval echo "$as_me:25405: \"$ac_link\"") >&5
25406   (eval $ac_link) 2>&5
25407   ac_status=$?
25408   echo "$as_me:25408: \$? = $ac_status" >&5
25409   (exit "$ac_status"); } &&
25410          { ac_try='test -s "conftest$ac_exeext"'
25411   { (eval echo "$as_me:25411: \"$ac_try\"") >&5
25412   (eval $ac_try) 2>&5
25413   ac_status=$?
25414   echo "$as_me:25414: \$? = $ac_status" >&5
25415   (exit "$ac_status"); }; }; then
25416   cf_cxx_library=yes
25417
25418 cf_add_libs="$CXXLIBS"
25419 # reverse order
25420 cf_add_0lib=
25421 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25422 # filter duplicates
25423 for cf_add_1lib in $cf_add_0lib; do
25424         for cf_add_2lib in $cf_add_libs; do
25425                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25426                         cf_add_1lib=
25427                         break
25428                 fi
25429         done
25430         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25431 done
25432 CXXLIBS="$cf_add_libs"
25433
25434 cat >>confdefs.h <<\EOF
25435 #define HAVE_BUILTIN_H 1
25436 EOF
25437
25438 else
25439   echo "$as_me: failed program was:" >&5
25440 cat "conftest.$ac_ext" >&5
25441 cf_cxx_library=no
25442 fi
25443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25444 fi
25445 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25446         LIBS="$cf_save"
25447         echo "$as_me:25447: result: $cf_cxx_library" >&5
25448 echo "${ECHO_T}$cf_cxx_library" >&6
25449 fi
25450
25451                 ;;
25452         (*)
25453                 cf_cxx_library=no
25454                 ;;
25455         esac
25456
25457         ac_ext=cc
25458 ac_cpp='$CXXCPP $CPPFLAGS'
25459 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25460 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25461 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25462 ac_main_return="return"
25463 echo "$as_me:25463: checking how to run the C++ preprocessor" >&5
25464 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25465 if test -z "$CXXCPP"; then
25466   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25467   echo $ECHO_N "(cached) $ECHO_C" >&6
25468 else
25469       # Double quotes because CXXCPP needs to be expanded
25470     for CXXCPP in "$CXX -E" "/lib/cpp"
25471     do
25472       ac_preproc_ok=false
25473 for ac_cxx_preproc_warn_flag in '' yes
25474 do
25475   # Use a header file that comes with gcc, so configuring glibc
25476   # with a fresh cross-compiler works.
25477   # On the NeXT, cc -E runs the code through the compiler's parser,
25478   # not just through cpp. "Syntax error" is here to catch this case.
25479   cat >"conftest.$ac_ext" <<_ACEOF
25480 #line 25480 "configure"
25481 #include "confdefs.h"
25482 #include <assert.h>
25483                      Syntax error
25484 _ACEOF
25485 if { (eval echo "$as_me:25485: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25486   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25487   ac_status=$?
25488   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25489   rm -f conftest.er1
25490   cat conftest.err >&5
25491   echo "$as_me:25491: \$? = $ac_status" >&5
25492   (exit "$ac_status"); } >/dev/null; then
25493   if test -s conftest.err; then
25494     ac_cpp_err=$ac_cxx_preproc_warn_flag
25495   else
25496     ac_cpp_err=
25497   fi
25498 else
25499   ac_cpp_err=yes
25500 fi
25501 if test -z "$ac_cpp_err"; then
25502   :
25503 else
25504   echo "$as_me: failed program was:" >&5
25505   cat "conftest.$ac_ext" >&5
25506   # Broken: fails on valid input.
25507 continue
25508 fi
25509 rm -f conftest.err "conftest.$ac_ext"
25510
25511   # OK, works on sane cases.  Now check whether non-existent headers
25512   # can be detected and how.
25513   cat >"conftest.$ac_ext" <<_ACEOF
25514 #line 25514 "configure"
25515 #include "confdefs.h"
25516 #include <ac_nonexistent.h>
25517 _ACEOF
25518 if { (eval echo "$as_me:25518: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25519   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25520   ac_status=$?
25521   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25522   rm -f conftest.er1
25523   cat conftest.err >&5
25524   echo "$as_me:25524: \$? = $ac_status" >&5
25525   (exit "$ac_status"); } >/dev/null; then
25526   if test -s conftest.err; then
25527     ac_cpp_err=$ac_cxx_preproc_warn_flag
25528   else
25529     ac_cpp_err=
25530   fi
25531 else
25532   ac_cpp_err=yes
25533 fi
25534 if test -z "$ac_cpp_err"; then
25535   # Broken: success on invalid input.
25536 continue
25537 else
25538   echo "$as_me: failed program was:" >&5
25539   cat "conftest.$ac_ext" >&5
25540   # Passes both tests.
25541 ac_preproc_ok=:
25542 break
25543 fi
25544 rm -f conftest.err "conftest.$ac_ext"
25545
25546 done
25547 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25548 rm -f conftest.err "conftest.$ac_ext"
25549 if $ac_preproc_ok; then
25550   break
25551 fi
25552
25553     done
25554     ac_cv_prog_CXXCPP=$CXXCPP
25555
25556 fi
25557   CXXCPP=$ac_cv_prog_CXXCPP
25558 else
25559   ac_cv_prog_CXXCPP=$CXXCPP
25560 fi
25561 echo "$as_me:25561: result: $CXXCPP" >&5
25562 echo "${ECHO_T}$CXXCPP" >&6
25563 ac_preproc_ok=false
25564 for ac_cxx_preproc_warn_flag in '' yes
25565 do
25566   # Use a header file that comes with gcc, so configuring glibc
25567   # with a fresh cross-compiler works.
25568   # On the NeXT, cc -E runs the code through the compiler's parser,
25569   # not just through cpp. "Syntax error" is here to catch this case.
25570   cat >"conftest.$ac_ext" <<_ACEOF
25571 #line 25571 "configure"
25572 #include "confdefs.h"
25573 #include <assert.h>
25574                      Syntax error
25575 _ACEOF
25576 if { (eval echo "$as_me:25576: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25577   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25578   ac_status=$?
25579   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25580   rm -f conftest.er1
25581   cat conftest.err >&5
25582   echo "$as_me:25582: \$? = $ac_status" >&5
25583   (exit "$ac_status"); } >/dev/null; then
25584   if test -s conftest.err; then
25585     ac_cpp_err=$ac_cxx_preproc_warn_flag
25586   else
25587     ac_cpp_err=
25588   fi
25589 else
25590   ac_cpp_err=yes
25591 fi
25592 if test -z "$ac_cpp_err"; then
25593   :
25594 else
25595   echo "$as_me: failed program was:" >&5
25596   cat "conftest.$ac_ext" >&5
25597   # Broken: fails on valid input.
25598 continue
25599 fi
25600 rm -f conftest.err "conftest.$ac_ext"
25601
25602   # OK, works on sane cases.  Now check whether non-existent headers
25603   # can be detected and how.
25604   cat >"conftest.$ac_ext" <<_ACEOF
25605 #line 25605 "configure"
25606 #include "confdefs.h"
25607 #include <ac_nonexistent.h>
25608 _ACEOF
25609 if { (eval echo "$as_me:25609: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25610   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25611   ac_status=$?
25612   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25613   rm -f conftest.er1
25614   cat conftest.err >&5
25615   echo "$as_me:25615: \$? = $ac_status" >&5
25616   (exit "$ac_status"); } >/dev/null; then
25617   if test -s conftest.err; then
25618     ac_cpp_err=$ac_cxx_preproc_warn_flag
25619   else
25620     ac_cpp_err=
25621   fi
25622 else
25623   ac_cpp_err=yes
25624 fi
25625 if test -z "$ac_cpp_err"; then
25626   # Broken: success on invalid input.
25627 continue
25628 else
25629   echo "$as_me: failed program was:" >&5
25630   cat "conftest.$ac_ext" >&5
25631   # Passes both tests.
25632 ac_preproc_ok=:
25633 break
25634 fi
25635 rm -f conftest.err "conftest.$ac_ext"
25636
25637 done
25638 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25639 rm -f conftest.err "conftest.$ac_ext"
25640 if $ac_preproc_ok; then
25641   :
25642 else
25643   { { echo "$as_me:25643: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25644 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25645    { (exit 1); exit 1; }; }
25646 fi
25647
25648 ac_ext=cc
25649 ac_cpp='$CXXCPP $CPPFLAGS'
25650 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25651 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25652 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25653 ac_main_return="return"
25654
25655 for ac_header in typeinfo
25656 do
25657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25658 echo "$as_me:25658: checking for $ac_header" >&5
25659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25661   echo $ECHO_N "(cached) $ECHO_C" >&6
25662 else
25663   cat >"conftest.$ac_ext" <<_ACEOF
25664 #line 25664 "configure"
25665 #include "confdefs.h"
25666 #include <$ac_header>
25667 _ACEOF
25668 if { (eval echo "$as_me:25668: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25669   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25670   ac_status=$?
25671   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25672   rm -f conftest.er1
25673   cat conftest.err >&5
25674   echo "$as_me:25674: \$? = $ac_status" >&5
25675   (exit "$ac_status"); } >/dev/null; then
25676   if test -s conftest.err; then
25677     ac_cpp_err=$ac_cxx_preproc_warn_flag
25678   else
25679     ac_cpp_err=
25680   fi
25681 else
25682   ac_cpp_err=yes
25683 fi
25684 if test -z "$ac_cpp_err"; then
25685   eval "$as_ac_Header=yes"
25686 else
25687   echo "$as_me: failed program was:" >&5
25688   cat "conftest.$ac_ext" >&5
25689   eval "$as_ac_Header=no"
25690 fi
25691 rm -f conftest.err "conftest.$ac_ext"
25692 fi
25693 echo "$as_me:25693: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25694 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25695 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25696   cat >>confdefs.h <<EOF
25697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25698 EOF
25699
25700 fi
25701 done
25702
25703 for ac_header in iostream
25704 do
25705 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25706 echo "$as_me:25706: checking for $ac_header" >&5
25707 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25709   echo $ECHO_N "(cached) $ECHO_C" >&6
25710 else
25711   cat >"conftest.$ac_ext" <<_ACEOF
25712 #line 25712 "configure"
25713 #include "confdefs.h"
25714 #include <$ac_header>
25715 _ACEOF
25716 if { (eval echo "$as_me:25716: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25717   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25718   ac_status=$?
25719   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25720   rm -f conftest.er1
25721   cat conftest.err >&5
25722   echo "$as_me:25722: \$? = $ac_status" >&5
25723   (exit "$ac_status"); } >/dev/null; then
25724   if test -s conftest.err; then
25725     ac_cpp_err=$ac_cxx_preproc_warn_flag
25726   else
25727     ac_cpp_err=
25728   fi
25729 else
25730   ac_cpp_err=yes
25731 fi
25732 if test -z "$ac_cpp_err"; then
25733   eval "$as_ac_Header=yes"
25734 else
25735   echo "$as_me: failed program was:" >&5
25736   cat "conftest.$ac_ext" >&5
25737   eval "$as_ac_Header=no"
25738 fi
25739 rm -f conftest.err "conftest.$ac_ext"
25740 fi
25741 echo "$as_me:25741: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25742 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25743 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25744   cat >>confdefs.h <<EOF
25745 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25746 EOF
25747
25748 fi
25749 done
25750
25751 if test x"$ac_cv_header_iostream" = xyes ; then
25752         echo "$as_me:25752: checking if iostream uses std-namespace" >&5
25753 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25754         cat >"conftest.$ac_ext" <<_ACEOF
25755 #line 25755 "configure"
25756 #include "confdefs.h"
25757
25758 #include <iostream>
25759 using std::endl;
25760 using std::cerr;
25761 int
25762 main (void)
25763 {
25764
25765 cerr << "testing" << endl;
25766
25767   ;
25768   return 0;
25769 }
25770 _ACEOF
25771 rm -f "conftest.$ac_objext"
25772 if { (eval echo "$as_me:25772: \"$ac_compile\"") >&5
25773   (eval $ac_compile) 2>&5
25774   ac_status=$?
25775   echo "$as_me:25775: \$? = $ac_status" >&5
25776   (exit "$ac_status"); } &&
25777          { ac_try='test -s "conftest.$ac_objext"'
25778   { (eval echo "$as_me:25778: \"$ac_try\"") >&5
25779   (eval $ac_try) 2>&5
25780   ac_status=$?
25781   echo "$as_me:25781: \$? = $ac_status" >&5
25782   (exit "$ac_status"); }; }; then
25783   cf_iostream_namespace=yes
25784 else
25785   echo "$as_me: failed program was:" >&5
25786 cat "conftest.$ac_ext" >&5
25787 cf_iostream_namespace=no
25788 fi
25789 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25790         echo "$as_me:25790: result: $cf_iostream_namespace" >&5
25791 echo "${ECHO_T}$cf_iostream_namespace" >&6
25792         if test "$cf_iostream_namespace" = yes ; then
25793
25794 cat >>confdefs.h <<\EOF
25795 #define IOSTREAM_NAMESPACE 1
25796 EOF
25797
25798         fi
25799 fi
25800
25801 echo "$as_me:25801: checking if we should include stdbool.h" >&5
25802 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25803
25804 if test "${cf_cv_header_stdbool_h+set}" = set; then
25805   echo $ECHO_N "(cached) $ECHO_C" >&6
25806 else
25807
25808         cat >"conftest.$ac_ext" <<_ACEOF
25809 #line 25809 "configure"
25810 #include "confdefs.h"
25811
25812 int
25813 main (void)
25814 {
25815 bool foo = false
25816   ;
25817   return 0;
25818 }
25819 _ACEOF
25820 rm -f "conftest.$ac_objext"
25821 if { (eval echo "$as_me:25821: \"$ac_compile\"") >&5
25822   (eval $ac_compile) 2>&5
25823   ac_status=$?
25824   echo "$as_me:25824: \$? = $ac_status" >&5
25825   (exit "$ac_status"); } &&
25826          { ac_try='test -s "conftest.$ac_objext"'
25827   { (eval echo "$as_me:25827: \"$ac_try\"") >&5
25828   (eval $ac_try) 2>&5
25829   ac_status=$?
25830   echo "$as_me:25830: \$? = $ac_status" >&5
25831   (exit "$ac_status"); }; }; then
25832   cf_cv_header_stdbool_h=0
25833 else
25834   echo "$as_me: failed program was:" >&5
25835 cat "conftest.$ac_ext" >&5
25836 cat >"conftest.$ac_ext" <<_ACEOF
25837 #line 25837 "configure"
25838 #include "confdefs.h"
25839
25840 #ifndef __BEOS__
25841 #include <stdbool.h>
25842 #endif
25843
25844 int
25845 main (void)
25846 {
25847 bool foo = false
25848   ;
25849   return 0;
25850 }
25851 _ACEOF
25852 rm -f "conftest.$ac_objext"
25853 if { (eval echo "$as_me:25853: \"$ac_compile\"") >&5
25854   (eval $ac_compile) 2>&5
25855   ac_status=$?
25856   echo "$as_me:25856: \$? = $ac_status" >&5
25857   (exit "$ac_status"); } &&
25858          { ac_try='test -s "conftest.$ac_objext"'
25859   { (eval echo "$as_me:25859: \"$ac_try\"") >&5
25860   (eval $ac_try) 2>&5
25861   ac_status=$?
25862   echo "$as_me:25862: \$? = $ac_status" >&5
25863   (exit "$ac_status"); }; }; then
25864   cf_cv_header_stdbool_h=1
25865 else
25866   echo "$as_me: failed program was:" >&5
25867 cat "conftest.$ac_ext" >&5
25868 cf_cv_header_stdbool_h=0
25869 fi
25870 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25871 fi
25872 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25873 fi
25874
25875 if test "$cf_cv_header_stdbool_h" = 1
25876 then    echo "$as_me:25876: result: yes" >&5
25877 echo "${ECHO_T}yes" >&6
25878 else    echo "$as_me:25878: result: no" >&5
25879 echo "${ECHO_T}no" >&6
25880 fi
25881
25882 echo "$as_me:25882: checking for builtin bool type" >&5
25883 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25884
25885 if test "${cf_cv_builtin_bool+set}" = set; then
25886   echo $ECHO_N "(cached) $ECHO_C" >&6
25887 else
25888
25889         cat >"conftest.$ac_ext" <<_ACEOF
25890 #line 25890 "configure"
25891 #include "confdefs.h"
25892
25893 #include <stdio.h>
25894 #include <sys/types.h>
25895
25896 int
25897 main (void)
25898 {
25899 bool x = false
25900   ;
25901   return 0;
25902 }
25903 _ACEOF
25904 rm -f "conftest.$ac_objext"
25905 if { (eval echo "$as_me:25905: \"$ac_compile\"") >&5
25906   (eval $ac_compile) 2>&5
25907   ac_status=$?
25908   echo "$as_me:25908: \$? = $ac_status" >&5
25909   (exit "$ac_status"); } &&
25910          { ac_try='test -s "conftest.$ac_objext"'
25911   { (eval echo "$as_me:25911: \"$ac_try\"") >&5
25912   (eval $ac_try) 2>&5
25913   ac_status=$?
25914   echo "$as_me:25914: \$? = $ac_status" >&5
25915   (exit "$ac_status"); }; }; then
25916   cf_cv_builtin_bool=1
25917 else
25918   echo "$as_me: failed program was:" >&5
25919 cat "conftest.$ac_ext" >&5
25920 cf_cv_builtin_bool=0
25921 fi
25922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25923
25924 fi
25925
25926 if test "$cf_cv_builtin_bool" = 1
25927 then    echo "$as_me:25927: result: yes" >&5
25928 echo "${ECHO_T}yes" >&6
25929 else    echo "$as_me:25929: result: no" >&5
25930 echo "${ECHO_T}no" >&6
25931 fi
25932
25933 echo "$as_me:25933: checking for bool" >&5
25934 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25935 if test "${ac_cv_type_bool+set}" = set; then
25936   echo $ECHO_N "(cached) $ECHO_C" >&6
25937 else
25938   cat >"conftest.$ac_ext" <<_ACEOF
25939 #line 25939 "configure"
25940 #include "confdefs.h"
25941
25942 #include <stdlib.h>
25943 #include <stdio.h>
25944
25945 #if defined(__cplusplus)
25946
25947 #ifdef HAVE_GXX_BUILTIN_H
25948 #include <g++/builtin.h>
25949 #elif HAVE_GPP_BUILTIN_H
25950 #include <gpp/builtin.h>
25951 #elif HAVE_BUILTIN_H
25952 #include <builtin.h>
25953 #endif
25954
25955 #else
25956
25957 #if $cf_cv_header_stdbool_h
25958 #include <stdbool.h>
25959 #endif
25960
25961 #endif
25962
25963 int
25964 main (void)
25965 {
25966 if ((bool *) 0)
25967   return 0;
25968 if (sizeof (bool))
25969   return 0;
25970   ;
25971   return 0;
25972 }
25973 _ACEOF
25974 rm -f "conftest.$ac_objext"
25975 if { (eval echo "$as_me:25975: \"$ac_compile\"") >&5
25976   (eval $ac_compile) 2>&5
25977   ac_status=$?
25978   echo "$as_me:25978: \$? = $ac_status" >&5
25979   (exit "$ac_status"); } &&
25980          { ac_try='test -s "conftest.$ac_objext"'
25981   { (eval echo "$as_me:25981: \"$ac_try\"") >&5
25982   (eval $ac_try) 2>&5
25983   ac_status=$?
25984   echo "$as_me:25984: \$? = $ac_status" >&5
25985   (exit "$ac_status"); }; }; then
25986   ac_cv_type_bool=yes
25987 else
25988   echo "$as_me: failed program was:" >&5
25989 cat "conftest.$ac_ext" >&5
25990 ac_cv_type_bool=no
25991 fi
25992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25993 fi
25994 echo "$as_me:25994: result: $ac_cv_type_bool" >&5
25995 echo "${ECHO_T}$ac_cv_type_bool" >&6
25996
25997 echo "$as_me:25997: checking size of bool" >&5
25998 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25999 if test "${ac_cv_sizeof_bool+set}" = set; then
26000   echo $ECHO_N "(cached) $ECHO_C" >&6
26001 else
26002   if test "$ac_cv_type_bool" = yes; then
26003   if test "$cross_compiling" = yes; then
26004   # Depending upon the size, compute the lo and hi bounds.
26005 cat >"conftest.$ac_ext" <<_ACEOF
26006 #line 26006 "configure"
26007 #include "confdefs.h"
26008
26009 #include <stdlib.h>
26010 #include <stdio.h>
26011
26012 #if defined(__cplusplus)
26013
26014 #ifdef HAVE_GXX_BUILTIN_H
26015 #include <g++/builtin.h>
26016 #elif HAVE_GPP_BUILTIN_H
26017 #include <gpp/builtin.h>
26018 #elif HAVE_BUILTIN_H
26019 #include <builtin.h>
26020 #endif
26021
26022 #else
26023
26024 #if $cf_cv_header_stdbool_h
26025 #include <stdbool.h>
26026 #endif
26027
26028 #endif
26029
26030 int
26031 main (void)
26032 {
26033 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26034   ;
26035   return 0;
26036 }
26037 _ACEOF
26038 rm -f "conftest.$ac_objext"
26039 if { (eval echo "$as_me:26039: \"$ac_compile\"") >&5
26040   (eval $ac_compile) 2>&5
26041   ac_status=$?
26042   echo "$as_me:26042: \$? = $ac_status" >&5
26043   (exit "$ac_status"); } &&
26044          { ac_try='test -s "conftest.$ac_objext"'
26045   { (eval echo "$as_me:26045: \"$ac_try\"") >&5
26046   (eval $ac_try) 2>&5
26047   ac_status=$?
26048   echo "$as_me:26048: \$? = $ac_status" >&5
26049   (exit "$ac_status"); }; }; then
26050   ac_lo=0 ac_mid=0
26051   while :; do
26052     cat >"conftest.$ac_ext" <<_ACEOF
26053 #line 26053 "configure"
26054 #include "confdefs.h"
26055
26056 #include <stdlib.h>
26057 #include <stdio.h>
26058
26059 #if defined(__cplusplus)
26060
26061 #ifdef HAVE_GXX_BUILTIN_H
26062 #include <g++/builtin.h>
26063 #elif HAVE_GPP_BUILTIN_H
26064 #include <gpp/builtin.h>
26065 #elif HAVE_BUILTIN_H
26066 #include <builtin.h>
26067 #endif
26068
26069 #else
26070
26071 #if $cf_cv_header_stdbool_h
26072 #include <stdbool.h>
26073 #endif
26074
26075 #endif
26076
26077 int
26078 main (void)
26079 {
26080 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26081   ;
26082   return 0;
26083 }
26084 _ACEOF
26085 rm -f "conftest.$ac_objext"
26086 if { (eval echo "$as_me:26086: \"$ac_compile\"") >&5
26087   (eval $ac_compile) 2>&5
26088   ac_status=$?
26089   echo "$as_me:26089: \$? = $ac_status" >&5
26090   (exit "$ac_status"); } &&
26091          { ac_try='test -s "conftest.$ac_objext"'
26092   { (eval echo "$as_me:26092: \"$ac_try\"") >&5
26093   (eval $ac_try) 2>&5
26094   ac_status=$?
26095   echo "$as_me:26095: \$? = $ac_status" >&5
26096   (exit "$ac_status"); }; }; then
26097   ac_hi=$ac_mid; break
26098 else
26099   echo "$as_me: failed program was:" >&5
26100 cat "conftest.$ac_ext" >&5
26101 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26102 fi
26103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26104   done
26105 else
26106   echo "$as_me: failed program was:" >&5
26107 cat "conftest.$ac_ext" >&5
26108 ac_hi=-1 ac_mid=-1
26109   while :; do
26110     cat >"conftest.$ac_ext" <<_ACEOF
26111 #line 26111 "configure"
26112 #include "confdefs.h"
26113
26114 #include <stdlib.h>
26115 #include <stdio.h>
26116
26117 #if defined(__cplusplus)
26118
26119 #ifdef HAVE_GXX_BUILTIN_H
26120 #include <g++/builtin.h>
26121 #elif HAVE_GPP_BUILTIN_H
26122 #include <gpp/builtin.h>
26123 #elif HAVE_BUILTIN_H
26124 #include <builtin.h>
26125 #endif
26126
26127 #else
26128
26129 #if $cf_cv_header_stdbool_h
26130 #include <stdbool.h>
26131 #endif
26132
26133 #endif
26134
26135 int
26136 main (void)
26137 {
26138 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26139   ;
26140   return 0;
26141 }
26142 _ACEOF
26143 rm -f "conftest.$ac_objext"
26144 if { (eval echo "$as_me:26144: \"$ac_compile\"") >&5
26145   (eval $ac_compile) 2>&5
26146   ac_status=$?
26147   echo "$as_me:26147: \$? = $ac_status" >&5
26148   (exit "$ac_status"); } &&
26149          { ac_try='test -s "conftest.$ac_objext"'
26150   { (eval echo "$as_me:26150: \"$ac_try\"") >&5
26151   (eval $ac_try) 2>&5
26152   ac_status=$?
26153   echo "$as_me:26153: \$? = $ac_status" >&5
26154   (exit "$ac_status"); }; }; then
26155   ac_lo=$ac_mid; break
26156 else
26157   echo "$as_me: failed program was:" >&5
26158 cat "conftest.$ac_ext" >&5
26159 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26160 fi
26161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26162   done
26163 fi
26164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26165 # Binary search between lo and hi bounds.
26166 while test "x$ac_lo" != "x$ac_hi"; do
26167   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26168   cat >"conftest.$ac_ext" <<_ACEOF
26169 #line 26169 "configure"
26170 #include "confdefs.h"
26171
26172 #include <stdlib.h>
26173 #include <stdio.h>
26174
26175 #if defined(__cplusplus)
26176
26177 #ifdef HAVE_GXX_BUILTIN_H
26178 #include <g++/builtin.h>
26179 #elif HAVE_GPP_BUILTIN_H
26180 #include <gpp/builtin.h>
26181 #elif HAVE_BUILTIN_H
26182 #include <builtin.h>
26183 #endif
26184
26185 #else
26186
26187 #if $cf_cv_header_stdbool_h
26188 #include <stdbool.h>
26189 #endif
26190
26191 #endif
26192
26193 int
26194 main (void)
26195 {
26196 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26197   ;
26198   return 0;
26199 }
26200 _ACEOF
26201 rm -f "conftest.$ac_objext"
26202 if { (eval echo "$as_me:26202: \"$ac_compile\"") >&5
26203   (eval $ac_compile) 2>&5
26204   ac_status=$?
26205   echo "$as_me:26205: \$? = $ac_status" >&5
26206   (exit "$ac_status"); } &&
26207          { ac_try='test -s "conftest.$ac_objext"'
26208   { (eval echo "$as_me:26208: \"$ac_try\"") >&5
26209   (eval $ac_try) 2>&5
26210   ac_status=$?
26211   echo "$as_me:26211: \$? = $ac_status" >&5
26212   (exit "$ac_status"); }; }; then
26213   ac_hi=$ac_mid
26214 else
26215   echo "$as_me: failed program was:" >&5
26216 cat "conftest.$ac_ext" >&5
26217 ac_lo=`expr "$ac_mid" + 1`
26218 fi
26219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26220 done
26221 ac_cv_sizeof_bool=$ac_lo
26222 else
26223   if test "$cross_compiling" = yes; then
26224   { { echo "$as_me:26224: error: cannot run test program while cross compiling" >&5
26225 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26226    { (exit 1); exit 1; }; }
26227 else
26228   cat >"conftest.$ac_ext" <<_ACEOF
26229 #line 26229 "configure"
26230 #include "confdefs.h"
26231
26232 #include <stdlib.h>
26233 #include <stdio.h>
26234
26235 #if defined(__cplusplus)
26236
26237 #ifdef HAVE_GXX_BUILTIN_H
26238 #include <g++/builtin.h>
26239 #elif HAVE_GPP_BUILTIN_H
26240 #include <gpp/builtin.h>
26241 #elif HAVE_BUILTIN_H
26242 #include <builtin.h>
26243 #endif
26244
26245 #else
26246
26247 #if $cf_cv_header_stdbool_h
26248 #include <stdbool.h>
26249 #endif
26250
26251 #endif
26252
26253 int
26254 main (void)
26255 {
26256 FILE *f = fopen ("conftest.val", "w");
26257 if (!f)
26258   $ac_main_return (1);
26259 fprintf (f, "%ld", (long)(sizeof (bool)));
26260 fclose (f);
26261   ;
26262   return 0;
26263 }
26264 _ACEOF
26265 rm -f "conftest$ac_exeext"
26266 if { (eval echo "$as_me:26266: \"$ac_link\"") >&5
26267   (eval $ac_link) 2>&5
26268   ac_status=$?
26269   echo "$as_me:26269: \$? = $ac_status" >&5
26270   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26271   { (eval echo "$as_me:26271: \"$ac_try\"") >&5
26272   (eval $ac_try) 2>&5
26273   ac_status=$?
26274   echo "$as_me:26274: \$? = $ac_status" >&5
26275   (exit "$ac_status"); }; }; then
26276   ac_cv_sizeof_bool=`cat conftest.val`
26277 else
26278   echo "$as_me: program exited with status $ac_status" >&5
26279 echo "$as_me: failed program was:" >&5
26280 cat "conftest.$ac_ext" >&5
26281 fi
26282 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26283 fi
26284 fi
26285 rm -f conftest.val
26286 else
26287   ac_cv_sizeof_bool=0
26288 fi
26289 fi
26290 echo "$as_me:26290: result: $ac_cv_sizeof_bool" >&5
26291 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26292 cat >>confdefs.h <<EOF
26293 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26294 EOF
26295
26296 echo "$as_me:26296: checking for type of bool" >&5
26297 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26298 if test "${cf_cv_type_of_bool+set}" = set; then
26299   echo $ECHO_N "(cached) $ECHO_C" >&6
26300 else
26301
26302         rm -f cf_test.out
26303         if test "$cross_compiling" = yes; then
26304
26305                 case x$ac_cv_sizeof_bool in
26306                 (x1) cf_cv_type_of_bool="unsigned char";;
26307                 (x2) cf_cv_type_of_bool="unsigned short";;
26308                 (x4) cf_cv_type_of_bool="unsigned int";;
26309                 (x8) cf_cv_type_of_bool="unsigned long";;
26310                 (*)  cf_cv_type_of_bool=unknown;;
26311                 esac
26312
26313 else
26314   cat >"conftest.$ac_ext" <<_ACEOF
26315 #line 26315 "configure"
26316 #include "confdefs.h"
26317
26318 #include <stdlib.h>
26319 #include <stdio.h>
26320
26321 #if defined(__cplusplus)
26322
26323 #ifdef HAVE_GXX_BUILTIN_H
26324 #include <g++/builtin.h>
26325 #elif HAVE_GPP_BUILTIN_H
26326 #include <gpp/builtin.h>
26327 #elif HAVE_BUILTIN_H
26328 #include <builtin.h>
26329 #endif
26330
26331 #else
26332
26333 #if $cf_cv_header_stdbool_h
26334 #include <stdbool.h>
26335 #endif
26336
26337 #endif
26338
26339 int main(void)
26340 {
26341         FILE *fp = fopen("cf_test.out", "w");
26342         if (fp != 0) {
26343                 bool x = true;
26344                 if ((bool)(-x) >= 0)
26345                         fputs("unsigned ", fp);
26346                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26347                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26348                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26349                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26350                 fclose(fp);
26351         }
26352         ${cf_cv_main_return:-return}(0);
26353 }
26354
26355 _ACEOF
26356 rm -f "conftest$ac_exeext"
26357 if { (eval echo "$as_me:26357: \"$ac_link\"") >&5
26358   (eval $ac_link) 2>&5
26359   ac_status=$?
26360   echo "$as_me:26360: \$? = $ac_status" >&5
26361   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26362   { (eval echo "$as_me:26362: \"$ac_try\"") >&5
26363   (eval $ac_try) 2>&5
26364   ac_status=$?
26365   echo "$as_me:26365: \$? = $ac_status" >&5
26366   (exit "$ac_status"); }; }; then
26367   cf_cv_type_of_bool=`cat cf_test.out`
26368                  if test -z "$cf_cv_type_of_bool"; then
26369                    cf_cv_type_of_bool=unknown
26370                  fi
26371 else
26372   echo "$as_me: program exited with status $ac_status" >&5
26373 echo "$as_me: failed program was:" >&5
26374 cat "conftest.$ac_ext" >&5
26375 cf_cv_type_of_bool=unknown
26376 fi
26377 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26378 fi
26379         rm -f cf_test.out
26380
26381 fi
26382 echo "$as_me:26382: result: $cf_cv_type_of_bool" >&5
26383 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26384
26385 if test "$cf_cv_type_of_bool" = unknown ; then
26386         case .$NCURSES_BOOL in
26387         (.auto|.) NCURSES_BOOL=unsigned;;
26388         esac
26389         { echo "$as_me:26389: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26390 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26391         cf_cv_type_of_bool=$NCURSES_BOOL
26392 fi
26393
26394 echo "$as_me:26394: checking for special defines needed for etip.h" >&5
26395 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26396 cf_save_CXXFLAGS="$CXXFLAGS"
26397 cf_result="none"
26398
26399 # etip.h includes ncurses.h which includes ncurses_dll.h
26400 # But ncurses_dll.h is generated - fix here.
26401 test -d include || mkdir include
26402 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
26403
26404 for cf_math in "" MATH_H
26405 do
26406 for cf_excp in "" MATH_EXCEPTION
26407 do
26408         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26409         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26410         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26411 cat >"conftest.$ac_ext" <<_ACEOF
26412 #line 26412 "configure"
26413 #include "confdefs.h"
26414
26415 #include <etip.h.in>
26416
26417 int
26418 main (void)
26419 {
26420
26421   ;
26422   return 0;
26423 }
26424 _ACEOF
26425 rm -f "conftest.$ac_objext"
26426 if { (eval echo "$as_me:26426: \"$ac_compile\"") >&5
26427   (eval $ac_compile) 2>&5
26428   ac_status=$?
26429   echo "$as_me:26429: \$? = $ac_status" >&5
26430   (exit "$ac_status"); } &&
26431          { ac_try='test -s "conftest.$ac_objext"'
26432   { (eval echo "$as_me:26432: \"$ac_try\"") >&5
26433   (eval $ac_try) 2>&5
26434   ac_status=$?
26435   echo "$as_me:26435: \$? = $ac_status" >&5
26436   (exit "$ac_status"); }; }; then
26437
26438         test -n "$cf_math" && cat >>confdefs.h <<EOF
26439 #define ETIP_NEEDS_${cf_math} 1
26440 EOF
26441
26442         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26443 #define ETIP_NEEDS_${cf_excp} 1
26444 EOF
26445
26446         cf_result="$cf_math $cf_excp"
26447         break 2
26448
26449 else
26450   echo "$as_me: failed program was:" >&5
26451 cat "conftest.$ac_ext" >&5
26452 fi
26453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26454 done
26455 done
26456 echo "$as_me:26456: result: $cf_result" >&5
26457 echo "${ECHO_T}$cf_result" >&6
26458 CXXFLAGS="$cf_save_CXXFLAGS"
26459
26460 if test -n "$CXX"; then
26461 echo "$as_me:26461: checking if $CXX accepts override keyword" >&5
26462 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26463 if test "${cf_cv_cpp_override+set}" = set; then
26464   echo $ECHO_N "(cached) $ECHO_C" >&6
26465 else
26466
26467         ac_ext=cc
26468 ac_cpp='$CXXCPP $CPPFLAGS'
26469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26470 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26472 ac_main_return="return"
26473
26474         if test "$cross_compiling" = yes; then
26475   cf_cv_cpp_override=unknown
26476 else
26477   cat >"conftest.$ac_ext" <<_ACEOF
26478 #line 26478 "configure"
26479 #include "confdefs.h"
26480
26481 class base
26482 {
26483 public:
26484         virtual int foo(float x) = 0;
26485 };
26486
26487 class derived: public base
26488 {
26489 public:
26490         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26491 };
26492
26493 int main(void) { }
26494
26495 _ACEOF
26496 rm -f "conftest$ac_exeext"
26497 if { (eval echo "$as_me:26497: \"$ac_link\"") >&5
26498   (eval $ac_link) 2>&5
26499   ac_status=$?
26500   echo "$as_me:26500: \$? = $ac_status" >&5
26501   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26502   { (eval echo "$as_me:26502: \"$ac_try\"") >&5
26503   (eval $ac_try) 2>&5
26504   ac_status=$?
26505   echo "$as_me:26505: \$? = $ac_status" >&5
26506   (exit "$ac_status"); }; }; then
26507   cf_cv_cpp_override=yes
26508 else
26509   echo "$as_me: program exited with status $ac_status" >&5
26510 echo "$as_me: failed program was:" >&5
26511 cat "conftest.$ac_ext" >&5
26512 cf_cv_cpp_override=no
26513 fi
26514 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26515 fi
26516         ac_ext=cc
26517 ac_cpp='$CXXCPP $CPPFLAGS'
26518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26519 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26521 ac_main_return="return"
26522
26523 fi
26524 echo "$as_me:26524: result: $cf_cv_cpp_override" >&5
26525 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26526 fi
26527 test "$cf_cv_cpp_override" = yes &&
26528 cat >>confdefs.h <<\EOF
26529 #define CPP_HAS_OVERRIDE 1
26530 EOF
26531
26532 if test -n "$CXX"; then
26533 echo "$as_me:26533: checking if $CXX accepts parameter initialization" >&5
26534 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26535 if test "${cf_cv_cpp_param_init+set}" = set; then
26536   echo $ECHO_N "(cached) $ECHO_C" >&6
26537 else
26538
26539         ac_ext=cc
26540 ac_cpp='$CXXCPP $CPPFLAGS'
26541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26542 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26544 ac_main_return="return"
26545
26546         if test "$cross_compiling" = yes; then
26547   cf_cv_cpp_param_init=unknown
26548 else
26549   cat >"conftest.$ac_ext" <<_ACEOF
26550 #line 26550 "configure"
26551 #include "confdefs.h"
26552
26553 class TEST {
26554 private:
26555         int value;
26556 public:
26557         TEST(int x = 1);
26558         ~TEST();
26559 };
26560
26561 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26562 {
26563         value = x;
26564 }
26565 int main(void) { }
26566
26567 _ACEOF
26568 rm -f "conftest$ac_exeext"
26569 if { (eval echo "$as_me:26569: \"$ac_link\"") >&5
26570   (eval $ac_link) 2>&5
26571   ac_status=$?
26572   echo "$as_me:26572: \$? = $ac_status" >&5
26573   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26574   { (eval echo "$as_me:26574: \"$ac_try\"") >&5
26575   (eval $ac_try) 2>&5
26576   ac_status=$?
26577   echo "$as_me:26577: \$? = $ac_status" >&5
26578   (exit "$ac_status"); }; }; then
26579   cf_cv_cpp_param_init=yes
26580 else
26581   echo "$as_me: program exited with status $ac_status" >&5
26582 echo "$as_me: failed program was:" >&5
26583 cat "conftest.$ac_ext" >&5
26584 cf_cv_cpp_param_init=no
26585 fi
26586 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26587 fi
26588         ac_ext=cc
26589 ac_cpp='$CXXCPP $CPPFLAGS'
26590 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26591 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26592 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26593 ac_main_return="return"
26594
26595 fi
26596 echo "$as_me:26596: result: $cf_cv_cpp_param_init" >&5
26597 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26598 fi
26599 test "$cf_cv_cpp_param_init" = yes &&
26600 cat >>confdefs.h <<\EOF
26601 #define CPP_HAS_PARAM_INIT 1
26602 EOF
26603
26604 if test -n "$CXX"; then
26605
26606 echo "$as_me:26606: checking if $CXX accepts static_cast" >&5
26607 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26608 if test "${cf_cv_cpp_static_cast+set}" = set; then
26609   echo $ECHO_N "(cached) $ECHO_C" >&6
26610 else
26611
26612         ac_ext=cc
26613 ac_cpp='$CXXCPP $CPPFLAGS'
26614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26615 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26617 ac_main_return="return"
26618
26619         cat >"conftest.$ac_ext" <<_ACEOF
26620 #line 26620 "configure"
26621 #include "confdefs.h"
26622
26623 class NCursesPanel
26624 {
26625 public:
26626   NCursesPanel(int nlines,
26627                int ncols,
26628                int begin_y = 0,
26629                int begin_x = 0)
26630   {
26631   }
26632   NCursesPanel();
26633   ~NCursesPanel();
26634 };
26635
26636 template<class T> class NCursesUserPanel : public NCursesPanel
26637 {
26638 public:
26639   NCursesUserPanel (int nlines,
26640                     int ncols,
26641                     int begin_y = 0,
26642                     int begin_x = 0,
26643                     const T* p_UserData = static_cast<T*>(0))
26644     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26645   {
26646   };
26647   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26648   {
26649   };
26650
26651   virtual ~NCursesUserPanel() {};
26652 };
26653
26654 int
26655 main (void)
26656 {
26657
26658         const char* p_UserData = static_cast<char*>(0)
26659   ;
26660   return 0;
26661 }
26662 _ACEOF
26663 rm -f "conftest.$ac_objext"
26664 if { (eval echo "$as_me:26664: \"$ac_compile\"") >&5
26665   (eval $ac_compile) 2>&5
26666   ac_status=$?
26667   echo "$as_me:26667: \$? = $ac_status" >&5
26668   (exit "$ac_status"); } &&
26669          { ac_try='test -s "conftest.$ac_objext"'
26670   { (eval echo "$as_me:26670: \"$ac_try\"") >&5
26671   (eval $ac_try) 2>&5
26672   ac_status=$?
26673   echo "$as_me:26673: \$? = $ac_status" >&5
26674   (exit "$ac_status"); }; }; then
26675   cf_cv_cpp_static_cast=yes
26676 else
26677   echo "$as_me: failed program was:" >&5
26678 cat "conftest.$ac_ext" >&5
26679 cf_cv_cpp_static_cast=no
26680 fi
26681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26682
26683         ac_ext=cc
26684 ac_cpp='$CXXCPP $CPPFLAGS'
26685 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26686 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26687 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26688 ac_main_return="return"
26689
26690 fi
26691 echo "$as_me:26691: result: $cf_cv_cpp_static_cast" >&5
26692 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26693
26694 fi
26695
26696 test "$cf_cv_cpp_static_cast" = yes &&
26697 cat >>confdefs.h <<\EOF
26698 #define CPP_HAS_STATIC_CAST 1
26699 EOF
26700
26701         CXX_AR='$(AR)'
26702         CXX_ARFLAGS='$(ARFLAGS)'
26703         case "$cf_cv_system_name" in
26704         (irix*)
26705             if test "$GXX" != yes ; then
26706                 CXX_AR='$(CXX)'
26707                 CXX_ARFLAGS='-ar -o'
26708             fi
26709             ;;
26710         (sco3.2v5*)
26711             CXXLDFLAGS="-u main"
26712             ;;
26713         (solaris2*)
26714             if test "$GXX" != yes ; then
26715                 CXX_AR='$(CXX)'
26716                 CXX_ARFLAGS='-xar -o'
26717             fi
26718             ;;
26719         esac
26720
26721 else
26722         cf_cxx_library=no
26723         cf_cv_builtin_bool=1
26724
26725         # Just because we are not configuring against C++ right now does not
26726         # mean that a user will not want to use C++.  Some distributors disable
26727         # the C++ portion of this configuration as a shortcut (or just to avoid
26728         # compiling the demo in the c++ directory).  So we need a reasonable
26729         # default for the 'bool' type.
26730         #
26731         # Caveat: since the storage of the bool type is not standardized, it
26732         # may change.
26733
26734         if test "$NCURSES_BOOL" != auto ; then
26735                 cf_cv_type_of_bool=$NCURSES_BOOL
26736                 cf_cv_header_stdbool_h=0
26737         else
26738                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26739
26740 echo "$as_me:26740: checking for bool" >&5
26741 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26742 if test "${ac_cv_type_bool+set}" = set; then
26743   echo $ECHO_N "(cached) $ECHO_C" >&6
26744 else
26745   cat >"conftest.$ac_ext" <<_ACEOF
26746 #line 26746 "configure"
26747 #include "confdefs.h"
26748
26749 #include <stdlib.h>
26750 #include <stdio.h>
26751
26752 #if defined(__cplusplus)
26753
26754 #ifdef HAVE_GXX_BUILTIN_H
26755 #include <g++/builtin.h>
26756 #elif HAVE_GPP_BUILTIN_H
26757 #include <gpp/builtin.h>
26758 #elif HAVE_BUILTIN_H
26759 #include <builtin.h>
26760 #endif
26761
26762 #else
26763
26764 #if $cf_cv_header_stdbool_h
26765 #include <stdbool.h>
26766 #endif
26767
26768 #endif
26769
26770 int
26771 main (void)
26772 {
26773 if ((bool *) 0)
26774   return 0;
26775 if (sizeof (bool))
26776   return 0;
26777   ;
26778   return 0;
26779 }
26780 _ACEOF
26781 rm -f "conftest.$ac_objext"
26782 if { (eval echo "$as_me:26782: \"$ac_compile\"") >&5
26783   (eval $ac_compile) 2>&5
26784   ac_status=$?
26785   echo "$as_me:26785: \$? = $ac_status" >&5
26786   (exit "$ac_status"); } &&
26787          { ac_try='test -s "conftest.$ac_objext"'
26788   { (eval echo "$as_me:26788: \"$ac_try\"") >&5
26789   (eval $ac_try) 2>&5
26790   ac_status=$?
26791   echo "$as_me:26791: \$? = $ac_status" >&5
26792   (exit "$ac_status"); }; }; then
26793   ac_cv_type_bool=yes
26794 else
26795   echo "$as_me: failed program was:" >&5
26796 cat "conftest.$ac_ext" >&5
26797 ac_cv_type_bool=no
26798 fi
26799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26800 fi
26801 echo "$as_me:26801: result: $ac_cv_type_bool" >&5
26802 echo "${ECHO_T}$ac_cv_type_bool" >&6
26803
26804 echo "$as_me:26804: checking size of bool" >&5
26805 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26806 if test "${ac_cv_sizeof_bool+set}" = set; then
26807   echo $ECHO_N "(cached) $ECHO_C" >&6
26808 else
26809   if test "$ac_cv_type_bool" = yes; then
26810   if test "$cross_compiling" = yes; then
26811   # Depending upon the size, compute the lo and hi bounds.
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)) >= 0)]
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_lo=0 ac_mid=0
26858   while :; do
26859     cat >"conftest.$ac_ext" <<_ACEOF
26860 #line 26860 "configure"
26861 #include "confdefs.h"
26862
26863 #include <stdlib.h>
26864 #include <stdio.h>
26865
26866 #if defined(__cplusplus)
26867
26868 #ifdef HAVE_GXX_BUILTIN_H
26869 #include <g++/builtin.h>
26870 #elif HAVE_GPP_BUILTIN_H
26871 #include <gpp/builtin.h>
26872 #elif HAVE_BUILTIN_H
26873 #include <builtin.h>
26874 #endif
26875
26876 #else
26877
26878 #if $cf_cv_header_stdbool_h
26879 #include <stdbool.h>
26880 #endif
26881
26882 #endif
26883
26884 int
26885 main (void)
26886 {
26887 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26888   ;
26889   return 0;
26890 }
26891 _ACEOF
26892 rm -f "conftest.$ac_objext"
26893 if { (eval echo "$as_me:26893: \"$ac_compile\"") >&5
26894   (eval $ac_compile) 2>&5
26895   ac_status=$?
26896   echo "$as_me:26896: \$? = $ac_status" >&5
26897   (exit "$ac_status"); } &&
26898          { ac_try='test -s "conftest.$ac_objext"'
26899   { (eval echo "$as_me:26899: \"$ac_try\"") >&5
26900   (eval $ac_try) 2>&5
26901   ac_status=$?
26902   echo "$as_me:26902: \$? = $ac_status" >&5
26903   (exit "$ac_status"); }; }; then
26904   ac_hi=$ac_mid; break
26905 else
26906   echo "$as_me: failed program was:" >&5
26907 cat "conftest.$ac_ext" >&5
26908 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26909 fi
26910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26911   done
26912 else
26913   echo "$as_me: failed program was:" >&5
26914 cat "conftest.$ac_ext" >&5
26915 ac_hi=-1 ac_mid=-1
26916   while :; do
26917     cat >"conftest.$ac_ext" <<_ACEOF
26918 #line 26918 "configure"
26919 #include "confdefs.h"
26920
26921 #include <stdlib.h>
26922 #include <stdio.h>
26923
26924 #if defined(__cplusplus)
26925
26926 #ifdef HAVE_GXX_BUILTIN_H
26927 #include <g++/builtin.h>
26928 #elif HAVE_GPP_BUILTIN_H
26929 #include <gpp/builtin.h>
26930 #elif HAVE_BUILTIN_H
26931 #include <builtin.h>
26932 #endif
26933
26934 #else
26935
26936 #if $cf_cv_header_stdbool_h
26937 #include <stdbool.h>
26938 #endif
26939
26940 #endif
26941
26942 int
26943 main (void)
26944 {
26945 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26946   ;
26947   return 0;
26948 }
26949 _ACEOF
26950 rm -f "conftest.$ac_objext"
26951 if { (eval echo "$as_me:26951: \"$ac_compile\"") >&5
26952   (eval $ac_compile) 2>&5
26953   ac_status=$?
26954   echo "$as_me:26954: \$? = $ac_status" >&5
26955   (exit "$ac_status"); } &&
26956          { ac_try='test -s "conftest.$ac_objext"'
26957   { (eval echo "$as_me:26957: \"$ac_try\"") >&5
26958   (eval $ac_try) 2>&5
26959   ac_status=$?
26960   echo "$as_me:26960: \$? = $ac_status" >&5
26961   (exit "$ac_status"); }; }; then
26962   ac_lo=$ac_mid; break
26963 else
26964   echo "$as_me: failed program was:" >&5
26965 cat "conftest.$ac_ext" >&5
26966 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26967 fi
26968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26969   done
26970 fi
26971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26972 # Binary search between lo and hi bounds.
26973 while test "x$ac_lo" != "x$ac_hi"; do
26974   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26975   cat >"conftest.$ac_ext" <<_ACEOF
26976 #line 26976 "configure"
26977 #include "confdefs.h"
26978
26979 #include <stdlib.h>
26980 #include <stdio.h>
26981
26982 #if defined(__cplusplus)
26983
26984 #ifdef HAVE_GXX_BUILTIN_H
26985 #include <g++/builtin.h>
26986 #elif HAVE_GPP_BUILTIN_H
26987 #include <gpp/builtin.h>
26988 #elif HAVE_BUILTIN_H
26989 #include <builtin.h>
26990 #endif
26991
26992 #else
26993
26994 #if $cf_cv_header_stdbool_h
26995 #include <stdbool.h>
26996 #endif
26997
26998 #endif
26999
27000 int
27001 main (void)
27002 {
27003 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27004   ;
27005   return 0;
27006 }
27007 _ACEOF
27008 rm -f "conftest.$ac_objext"
27009 if { (eval echo "$as_me:27009: \"$ac_compile\"") >&5
27010   (eval $ac_compile) 2>&5
27011   ac_status=$?
27012   echo "$as_me:27012: \$? = $ac_status" >&5
27013   (exit "$ac_status"); } &&
27014          { ac_try='test -s "conftest.$ac_objext"'
27015   { (eval echo "$as_me:27015: \"$ac_try\"") >&5
27016   (eval $ac_try) 2>&5
27017   ac_status=$?
27018   echo "$as_me:27018: \$? = $ac_status" >&5
27019   (exit "$ac_status"); }; }; then
27020   ac_hi=$ac_mid
27021 else
27022   echo "$as_me: failed program was:" >&5
27023 cat "conftest.$ac_ext" >&5
27024 ac_lo=`expr "$ac_mid" + 1`
27025 fi
27026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27027 done
27028 ac_cv_sizeof_bool=$ac_lo
27029 else
27030   if test "$cross_compiling" = yes; then
27031   { { echo "$as_me:27031: error: cannot run test program while cross compiling" >&5
27032 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27033    { (exit 1); exit 1; }; }
27034 else
27035   cat >"conftest.$ac_ext" <<_ACEOF
27036 #line 27036 "configure"
27037 #include "confdefs.h"
27038
27039 #include <stdlib.h>
27040 #include <stdio.h>
27041
27042 #if defined(__cplusplus)
27043
27044 #ifdef HAVE_GXX_BUILTIN_H
27045 #include <g++/builtin.h>
27046 #elif HAVE_GPP_BUILTIN_H
27047 #include <gpp/builtin.h>
27048 #elif HAVE_BUILTIN_H
27049 #include <builtin.h>
27050 #endif
27051
27052 #else
27053
27054 #if $cf_cv_header_stdbool_h
27055 #include <stdbool.h>
27056 #endif
27057
27058 #endif
27059
27060 int
27061 main (void)
27062 {
27063 FILE *f = fopen ("conftest.val", "w");
27064 if (!f)
27065   $ac_main_return (1);
27066 fprintf (f, "%ld", (long)(sizeof (bool)));
27067 fclose (f);
27068   ;
27069   return 0;
27070 }
27071 _ACEOF
27072 rm -f "conftest$ac_exeext"
27073 if { (eval echo "$as_me:27073: \"$ac_link\"") >&5
27074   (eval $ac_link) 2>&5
27075   ac_status=$?
27076   echo "$as_me:27076: \$? = $ac_status" >&5
27077   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27078   { (eval echo "$as_me:27078: \"$ac_try\"") >&5
27079   (eval $ac_try) 2>&5
27080   ac_status=$?
27081   echo "$as_me:27081: \$? = $ac_status" >&5
27082   (exit "$ac_status"); }; }; then
27083   ac_cv_sizeof_bool=`cat conftest.val`
27084 else
27085   echo "$as_me: program exited with status $ac_status" >&5
27086 echo "$as_me: failed program was:" >&5
27087 cat "conftest.$ac_ext" >&5
27088 fi
27089 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27090 fi
27091 fi
27092 rm -f conftest.val
27093 else
27094   ac_cv_sizeof_bool=0
27095 fi
27096 fi
27097 echo "$as_me:27097: result: $ac_cv_sizeof_bool" >&5
27098 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27099 cat >>confdefs.h <<EOF
27100 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27101 EOF
27102
27103 echo "$as_me:27103: checking for type of bool" >&5
27104 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27105 if test "${cf_cv_type_of_bool+set}" = set; then
27106   echo $ECHO_N "(cached) $ECHO_C" >&6
27107 else
27108
27109         rm -f cf_test.out
27110         if test "$cross_compiling" = yes; then
27111
27112                 case x$ac_cv_sizeof_bool in
27113                 (x1) cf_cv_type_of_bool="unsigned char";;
27114                 (x2) cf_cv_type_of_bool="unsigned short";;
27115                 (x4) cf_cv_type_of_bool="unsigned int";;
27116                 (x8) cf_cv_type_of_bool="unsigned long";;
27117                 (*)  cf_cv_type_of_bool=unknown;;
27118                 esac
27119
27120 else
27121   cat >"conftest.$ac_ext" <<_ACEOF
27122 #line 27122 "configure"
27123 #include "confdefs.h"
27124
27125 #include <stdlib.h>
27126 #include <stdio.h>
27127
27128 #if defined(__cplusplus)
27129
27130 #ifdef HAVE_GXX_BUILTIN_H
27131 #include <g++/builtin.h>
27132 #elif HAVE_GPP_BUILTIN_H
27133 #include <gpp/builtin.h>
27134 #elif HAVE_BUILTIN_H
27135 #include <builtin.h>
27136 #endif
27137
27138 #else
27139
27140 #if $cf_cv_header_stdbool_h
27141 #include <stdbool.h>
27142 #endif
27143
27144 #endif
27145
27146 int main(void)
27147 {
27148         FILE *fp = fopen("cf_test.out", "w");
27149         if (fp != 0) {
27150                 bool x = true;
27151                 if ((bool)(-x) >= 0)
27152                         fputs("unsigned ", fp);
27153                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27154                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27155                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27156                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27157                 fclose(fp);
27158         }
27159         ${cf_cv_main_return:-return}(0);
27160 }
27161
27162 _ACEOF
27163 rm -f "conftest$ac_exeext"
27164 if { (eval echo "$as_me:27164: \"$ac_link\"") >&5
27165   (eval $ac_link) 2>&5
27166   ac_status=$?
27167   echo "$as_me:27167: \$? = $ac_status" >&5
27168   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27169   { (eval echo "$as_me:27169: \"$ac_try\"") >&5
27170   (eval $ac_try) 2>&5
27171   ac_status=$?
27172   echo "$as_me:27172: \$? = $ac_status" >&5
27173   (exit "$ac_status"); }; }; then
27174   cf_cv_type_of_bool=`cat cf_test.out`
27175                  if test -z "$cf_cv_type_of_bool"; then
27176                    cf_cv_type_of_bool=unknown
27177                  fi
27178 else
27179   echo "$as_me: program exited with status $ac_status" >&5
27180 echo "$as_me: failed program was:" >&5
27181 cat "conftest.$ac_ext" >&5
27182 cf_cv_type_of_bool=unknown
27183 fi
27184 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27185 fi
27186         rm -f cf_test.out
27187
27188 fi
27189 echo "$as_me:27189: result: $cf_cv_type_of_bool" >&5
27190 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27191
27192 if test "$cf_cv_type_of_bool" = unknown ; then
27193         case .$NCURSES_BOOL in
27194         (.auto|.) NCURSES_BOOL=unsigned;;
27195         esac
27196         { echo "$as_me:27196: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27197 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27198         cf_cv_type_of_bool=$NCURSES_BOOL
27199 fi
27200
27201                 else
27202                         echo "$as_me:27202: checking for fallback type of bool" >&5
27203 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27204                         case "$host_cpu" in
27205                         (i?86)  cf_cv_type_of_bool=char ;;
27206                         (*)     cf_cv_type_of_bool=int  ;;
27207                         esac
27208                         echo "$as_me:27208: result: $cf_cv_type_of_bool" >&5
27209 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27210                 fi
27211         fi
27212 fi
27213
27214 # If the C compiler did not declare bool, and we did not determine that the C++
27215 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27216 # ncurses library use the same type as C++ bool.  Note that this allows one to
27217 # specify the type of bool in a configure-script option and postpone
27218 # integration with the C++ compiler provided that the types are compatible.
27219 USE_CXX_BOOL=1
27220 if test "$cf_cv_cc_bool_type" = 1
27221 then
27222         # oops: C has a bool.  Unlikely, but C++ could differ.
27223         USE_CXX_BOOL=0
27224 elif test "$cf_cv_builtin_bool" = 0
27225 then
27226         # C++ has no bool
27227         USE_CXX_BOOL=0
27228 else
27229         # this is the normal case
27230         USE_CXX_BOOL='defined(__cplusplus)'
27231 fi
27232
27233 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27234
27235         if test "$cf_with_ada" != "no" ; then
27236                 if test "$with_libtool" != "no"; then
27237                         { echo "$as_me:27237: WARNING: libtool does not support Ada - disabling feature" >&5
27238 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27239                         cf_with_ada=no
27240                 fi
27241         fi
27242
27243         if test "$cf_with_ada" != "no" ; then
27244
27245 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27246 do
27247
27248 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27249
27250         unset ac_cv_path_cf_TEMP_gnat
27251         unset cf_TEMP_gnat
27252         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27253 set dummy $cf_prog_gnat; ac_word=$2
27254 echo "$as_me:27254: checking for $ac_word" >&5
27255 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27256 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27257   echo $ECHO_N "(cached) $ECHO_C" >&6
27258 else
27259   case $cf_TEMP_gnat in
27260   [\\/]* | ?:[\\/]*)
27261   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27262   ;;
27263   *)
27264   ac_save_IFS=$IFS; IFS=$ac_path_separator
27265 ac_dummy="$PATH"
27266 for ac_dir in $ac_dummy; do
27267   IFS=$ac_save_IFS
27268   test -z "$ac_dir" && ac_dir=.
27269   if $as_executable_p "$ac_dir/$ac_word"; then
27270    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27271    echo "$as_me:27271: found $ac_dir/$ac_word" >&5
27272    break
27273 fi
27274 done
27275
27276   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27277   ;;
27278 esac
27279 fi
27280 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27281
27282 if test -n "$cf_TEMP_gnat"; then
27283   echo "$as_me:27283: result: $cf_TEMP_gnat" >&5
27284 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27285 else
27286   echo "$as_me:27286: result: no" >&5
27287 echo "${ECHO_T}no" >&6
27288 fi
27289
27290         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27291
27292         if test "x$cf_TEMP_gnat" != xno; then
27293                 unset cf_cv_gnat_version
27294                 unset cf_TEMP_gnat
27295
27296 echo "$as_me:27296: checking for $cf_prog_gnat version" >&5
27297 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27298 if test "${cf_cv_gnat_version+set}" = set; then
27299   echo $ECHO_N "(cached) $ECHO_C" >&6
27300 else
27301
27302 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27303         grep '[0-9].[0-9][0-9]*' |\
27304         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27305
27306 fi
27307 echo "$as_me:27307: result: $cf_cv_gnat_version" >&5
27308 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27309 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27310 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27311
27312         fi
27313         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27314
27315         unset cf_TEMP_gnat
27316         unset cf_cv_gnat_version
27317         unset ac_cv_path_cf_TEMP_gnat
27318 done
27319
27320 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27321         cf_ada_make=
27322         cf_cv_prog_gnat_correct=no
27323 else
27324         cf_ada_make=gnatmake
27325         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27326                 # gprconfig is newer than gnatmake; we can continue...
27327                 cf_ada_config="##"
27328         else
27329                 rm -rf ./conftest* ./*~conftest*
27330                 if mkdir conftest.src
27331                 then
27332                         cf_ada_config=""
27333                         cd conftest.src
27334                         for cf_gprconfig in Ada C
27335                         do
27336                                 echo "$as_me:27336: checking for gprconfig name for $cf_gprconfig" >&5
27337 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27338                                 if test "$cf_gprconfig" = C
27339                                 then
27340                                         for cf_gprconfig_param in \
27341                                                 "$cf_gprconfig,,,,GNATGCC" \
27342                                                 "$cf_gprconfig,,,,GCC" \
27343                                                 "$cf_gprconfig"
27344                                         do
27345                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27346                                                 test -n "$cf_gprconfig_value" && break
27347                                         done
27348                                 else
27349                                         cf_gprconfig_param=$cf_gprconfig
27350                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27351                                 fi
27352                                 if test -n "$cf_gprconfig_value"
27353                                 then
27354                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27355                                         echo "$as_me:27355: result: $cf_gprconfig_value" >&5
27356 echo "${ECHO_T}$cf_gprconfig_value" >&6
27357                                 else
27358                                         echo "$as_me:27358: result: missing" >&5
27359 echo "${ECHO_T}missing" >&6
27360                                         cf_ada_config="#"
27361                                         break
27362                                 fi
27363                         done
27364                         cd ..
27365                         rm -rf ./conftest* ./*~conftest*
27366                 fi
27367         fi
27368         if test "x$cf_ada_config" != "x#"
27369         then
27370
27371 echo "$as_me:27371: checking for gnat version" >&5
27372 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27373 if test "${cf_cv_gnat_version+set}" = set; then
27374   echo $ECHO_N "(cached) $ECHO_C" >&6
27375 else
27376
27377 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27378         grep '[0-9].[0-9][0-9]*' |\
27379         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27380
27381 fi
27382 echo "$as_me:27382: result: $cf_cv_gnat_version" >&5
27383 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27384 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27385
27386 case "$cf_cv_gnat_version" in
27387 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27388         cf_cv_prog_gnat_correct=yes
27389         ;;
27390 (*)
27391         { echo "$as_me:27391: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27392 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27393         cf_cv_prog_gnat_correct=no
27394         ;;
27395 esac
27396
27397                 # Extract the first word of "m4", so it can be a program name with args.
27398 set dummy m4; ac_word=$2
27399 echo "$as_me:27399: checking for $ac_word" >&5
27400 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27401 if test "${ac_cv_prog_M4_exists+set}" = set; then
27402   echo $ECHO_N "(cached) $ECHO_C" >&6
27403 else
27404   if test -n "$M4_exists"; then
27405   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27406 else
27407   ac_save_IFS=$IFS; IFS=$ac_path_separator
27408 ac_dummy="$PATH"
27409 for ac_dir in $ac_dummy; do
27410   IFS=$ac_save_IFS
27411   test -z "$ac_dir" && ac_dir=.
27412   $as_executable_p "$ac_dir/$ac_word" || continue
27413 ac_cv_prog_M4_exists="yes"
27414 echo "$as_me:27414: found $ac_dir/$ac_word" >&5
27415 break
27416 done
27417
27418   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27419 fi
27420 fi
27421 M4_exists=$ac_cv_prog_M4_exists
27422 if test -n "$M4_exists"; then
27423   echo "$as_me:27423: result: $M4_exists" >&5
27424 echo "${ECHO_T}$M4_exists" >&6
27425 else
27426   echo "$as_me:27426: result: no" >&5
27427 echo "${ECHO_T}no" >&6
27428 fi
27429
27430                 if test "$ac_cv_prog_M4_exists" = no; then
27431                         cf_cv_prog_gnat_correct=no
27432                         { echo "$as_me:27432: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27433 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27434                 fi
27435                 if test "$cf_cv_prog_gnat_correct" = yes; then
27436                         echo "$as_me:27436: checking if GNAT works" >&5
27437 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27438
27439 rm -rf ./conftest* ./*~conftest*
27440 cat >>conftest.ads <<CF_EOF
27441 procedure conftest;
27442 CF_EOF
27443 cat >>conftest.adb <<CF_EOF
27444 with Text_IO;
27445 with GNAT.OS_Lib;
27446 procedure conftest is
27447 begin
27448    Text_IO.Put ("Hello World");
27449    Text_IO.New_Line;
27450    GNAT.OS_Lib.OS_Exit (0);
27451 end conftest;
27452 CF_EOF
27453 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27454    if ( ./conftest 1>&5 2>&1 ) ; then
27455       cf_cv_prog_gnat_correct=yes
27456    else
27457       cf_cv_prog_gnat_correct=no
27458    fi
27459 else
27460    cf_cv_prog_gnat_correct=no
27461 fi
27462 rm -rf ./conftest* ./*~conftest*
27463
27464                         echo "$as_me:27464: result: $cf_cv_prog_gnat_correct" >&5
27465 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27466                 fi
27467         else
27468                 cf_cv_prog_gnat_correct=no
27469         fi
27470 fi
27471
27472                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27473
27474         ADAFLAGS="$ADAFLAGS -gnatpn"
27475
27476         echo "$as_me:27476: checking optimization options for ADAFLAGS" >&5
27477 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27478         case "$CFLAGS" in
27479         (*-g*)
27480
27481         ADAFLAGS="$ADAFLAGS -g"
27482
27483                 ;;
27484         esac
27485         case "$CFLAGS" in
27486         (*-O*)
27487                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27488
27489         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27490
27491                 ;;
27492         esac
27493         echo "$as_me:27493: result: $ADAFLAGS" >&5
27494 echo "${ECHO_T}$ADAFLAGS" >&6
27495
27496 echo "$as_me:27496: checking if GNATPREP supports -T option" >&5
27497 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27498 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27499   echo $ECHO_N "(cached) $ECHO_C" >&6
27500 else
27501
27502 cf_cv_gnatprep_opt_t=no
27503 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27504
27505 fi
27506 echo "$as_me:27506: result: $cf_cv_gnatprep_opt_t" >&5
27507 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27508 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27509
27510 echo "$as_me:27510: checking if GNAT supports generics" >&5
27511 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27512 case "$cf_cv_gnat_version" in
27513 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27514         cf_gnat_generics=yes
27515         ;;
27516 (*)
27517         cf_gnat_generics=no
27518         ;;
27519 esac
27520 echo "$as_me:27520: result: $cf_gnat_generics" >&5
27521 echo "${ECHO_T}$cf_gnat_generics" >&6
27522
27523 if test "$cf_gnat_generics" = yes
27524 then
27525         cf_compile_generics=generics
27526         cf_generic_objects="\${GENOBJS}"
27527 else
27528         cf_compile_generics=
27529         cf_generic_objects=
27530 fi
27531
27532 echo "$as_me:27532: checking if GNAT supports SIGINT" >&5
27533 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27534 if test "${cf_cv_gnat_sigint+set}" = set; then
27535   echo $ECHO_N "(cached) $ECHO_C" >&6
27536 else
27537
27538 rm -rf ./conftest* ./*~conftest*
27539 cat >>conftest.ads <<CF_EOF
27540 with Ada.Interrupts.Names;
27541
27542 package ConfTest is
27543
27544    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27545    pragma Unreserve_All_Interrupts;
27546    pragma Warnings (On);
27547
27548    protected Process is
27549       procedure Stop;
27550       function Continue return Boolean;
27551       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27552    private
27553       Done : Boolean := False;
27554    end Process;
27555
27556 end ConfTest;
27557 CF_EOF
27558 cat >>conftest.adb <<CF_EOF
27559 package body ConfTest is
27560    protected body Process is
27561       procedure Stop is
27562       begin
27563          Done := True;
27564       end Stop;
27565       function Continue return Boolean is
27566       begin
27567          return not Done;
27568       end Continue;
27569    end Process;
27570 end ConfTest;
27571 CF_EOF
27572 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27573       cf_cv_gnat_sigint=yes
27574 else
27575    cf_cv_gnat_sigint=no
27576 fi
27577 rm -rf ./conftest* ./*~conftest*
27578
27579 fi
27580 echo "$as_me:27580: result: $cf_cv_gnat_sigint" >&5
27581 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27582
27583 if test "$cf_cv_gnat_sigint" = yes ; then
27584         USE_GNAT_SIGINT=""
27585 else
27586         USE_GNAT_SIGINT="#"
27587 fi
27588
27589 cf_gnat_libraries=no
27590 cf_gnat_projects=no
27591
27592 if test "$enable_gnat_projects" != no ; then
27593 echo "$as_me:27593: checking if GNAT supports project files" >&5
27594 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27595 case "$cf_cv_gnat_version" in
27596 (3.[0-9]*)
27597         ;;
27598 (*)
27599         case "$cf_cv_system_name" in
27600         (cygwin*|msys*)
27601                 ;;
27602         (*)
27603                 rm -rf ./conftest* ./*~conftest*
27604                 if mkdir conftest.src conftest.bin conftest.lib
27605                 then
27606                         cd conftest.src
27607                         rm -rf ./conftest* ./*~conftest*
27608                         cat >>library.gpr <<CF_EOF
27609 project Library is
27610   Kind := External ("LIB_KIND");
27611   for Library_Name use "ConfTest";
27612   for Object_Dir use ".";
27613   for Library_ALI_Dir use External("LIBRARY_DIR");
27614   for Library_Version use External ("SONAME");
27615   for Library_Kind use Kind;
27616   for Library_Dir use External("BUILD_DIR");
27617   Source_Dir := External ("SOURCE_DIR");
27618   for Source_Dirs use (Source_Dir);
27619 end Library;
27620 CF_EOF
27621                         cat >>confpackage.ads <<CF_EOF
27622 package ConfPackage is
27623    procedure conftest;
27624 end ConfPackage;
27625 CF_EOF
27626                         cat >>confpackage.adb <<CF_EOF
27627 with Text_IO;
27628 package body ConfPackage is
27629    procedure conftest is
27630    begin
27631       Text_IO.Put ("Hello World");
27632       Text_IO.New_Line;
27633    end conftest;
27634 end ConfPackage;
27635 CF_EOF
27636                         if ( "$cf_ada_make" $ADAFLAGS \
27637                                         -Plibrary.gpr \
27638                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27639                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27640                                         -XSOURCE_DIR="`pwd`" \
27641                                         -XSONAME=libConfTest.so.1 \
27642                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27643                                 cf_gnat_projects=yes
27644                         fi
27645                         cd ..
27646                 fi
27647                 if test -f conftest.lib/confpackage.ali
27648                 then
27649                         cf_gnat_libraries=yes
27650                 fi
27651                 rm -rf ./conftest* ./*~conftest*
27652                 ;;
27653         esac
27654         ;;
27655 esac
27656 echo "$as_me:27656: result: $cf_gnat_projects" >&5
27657 echo "${ECHO_T}$cf_gnat_projects" >&6
27658 fi # enable_gnat_projects
27659
27660 if test "$cf_gnat_projects" = yes
27661 then
27662         echo "$as_me:27662: checking if GNAT supports libraries" >&5
27663 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27664         echo "$as_me:27664: result: $cf_gnat_libraries" >&5
27665 echo "${ECHO_T}$cf_gnat_libraries" >&6
27666 fi
27667
27668 USE_OLD_MAKERULES=""
27669 USE_GNAT_PROJECTS="#"
27670 USE_GNAT_MAKE_GPR="#"
27671 USE_GNAT_GPRBUILD="#"
27672
27673 if test "$cf_gnat_projects" = yes
27674 then
27675         USE_OLD_MAKERULES="#"
27676         USE_GNAT_PROJECTS=""
27677         if test "$cf_cv_VERSION_GPRBUILD" != no
27678         then
27679                 USE_GNAT_GPRBUILD=""
27680         elif test "$cf_cv_VERSION_GNATMAKE" != no
27681         then
27682                 USE_GNAT_MAKE_GPR=""
27683         else
27684                 { echo "$as_me:27684: WARNING: use old makefile rules since tools are missing" >&5
27685 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27686         fi
27687 fi
27688
27689 if test "$cf_gnat_libraries" = yes
27690 then
27691         USE_GNAT_LIBRARIES=""
27692 else
27693         USE_GNAT_LIBRARIES="#"
27694 fi
27695
27696 echo "$as_me:27696: checking for ada-compiler" >&5
27697 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27698
27699 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27700 if test "${with_ada_compiler+set}" = set; then
27701   withval="$with_ada_compiler"
27702   cf_ada_compiler=$withval
27703 else
27704   cf_ada_compiler=gnatmake
27705 fi;
27706
27707 echo "$as_me:27707: result: $cf_ada_compiler" >&5
27708 echo "${ECHO_T}$cf_ada_compiler" >&6
27709
27710                         cf_ada_package=terminal_interface
27711
27712 echo "$as_me:27712: checking for ada-include" >&5
27713 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27714
27715 # Check whether --with-ada-include or --without-ada-include was given.
27716 if test "${with_ada_include+set}" = set; then
27717   withval="$with_ada_include"
27718
27719 else
27720   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27721 fi; if test -n "$prefix/share/ada/adainclude" ; 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_INCLUDE="$withval"
27756
27757 echo "$as_me:27757: result: $ADA_INCLUDE" >&5
27758 echo "${ECHO_T}$ADA_INCLUDE" >&6
27759
27760 echo "$as_me:27760: checking for ada-objects" >&5
27761 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27762
27763 # Check whether --with-ada-objects or --without-ada-objects was given.
27764 if test "${with_ada_objects+set}" = set; then
27765   withval="$with_ada_objects"
27766
27767 else
27768   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27769 fi; if test -n "$prefix/lib/ada/adalib" ; then
27770
27771 if test "x$prefix" != xNONE; then
27772         cf_path_syntax="$prefix"
27773 else
27774         cf_path_syntax="$ac_default_prefix"
27775 fi
27776
27777 case ".$withval" in
27778 (.\$\(*\)*|.\'*\'*)
27779         ;;
27780 (..|./*|.\\*)
27781         ;;
27782 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27783         ;;
27784 (.\$\{*prefix\}*|.\$\{*dir\}*)
27785         eval withval="$withval"
27786         case ".$withval" in
27787         (.NONE/*)
27788                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27789                 ;;
27790         esac
27791         ;;
27792 (.no|.NONE/*)
27793         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27794         ;;
27795 (*)
27796         { { echo "$as_me:27796: error: expected a pathname, not \"$withval\"" >&5
27797 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27798    { (exit 1); exit 1; }; }
27799         ;;
27800 esac
27801
27802 fi
27803 eval ADA_OBJECTS="$withval"
27804
27805 echo "$as_me:27805: result: $ADA_OBJECTS" >&5
27806 echo "${ECHO_T}$ADA_OBJECTS" >&6
27807
27808 echo "$as_me:27808: checking if an Ada95 shared-library should be built" >&5
27809 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27810
27811 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27812 if test "${with_ada_sharedlib+set}" = set; then
27813   withval="$with_ada_sharedlib"
27814   with_ada_sharedlib=$withval
27815 else
27816   with_ada_sharedlib=no
27817 fi;
27818 echo "$as_me:27818: result: $with_ada_sharedlib" >&5
27819 echo "${ECHO_T}$with_ada_sharedlib" >&6
27820
27821 if test "x$with_ada_sharedlib" != xno
27822 then
27823         if test "x$cf_gnat_projects" != xyes
27824         then
27825                 { echo "$as_me:27825: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27826 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27827                 with_ada_sharedlib=no
27828         fi
27829 fi
27830
27831 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27832 MAKE_ADA_SHAREDLIB="#"
27833
27834 if test "x$with_ada_sharedlib" != xno
27835 then
27836         MAKE_ADA_SHAREDLIB=
27837         if test "x$with_ada_sharedlib" != xyes
27838         then
27839                 ADA_SHAREDLIB="$with_ada_sharedlib"
27840         fi
27841 fi
27842
27843                         # allow the Ada binding to be renamed
27844
27845 echo "$as_me:27845: checking for ada-libname" >&5
27846 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27847
27848 # Check whether --with-ada-libname or --without-ada-libname was given.
27849 if test "${with_ada_libname+set}" = set; then
27850   withval="$with_ada_libname"
27851   ADA_LIBNAME=$withval
27852 else
27853   ADA_LIBNAME=AdaCurses
27854 fi;
27855 case "x$ADA_LIBNAME" in
27856 (x|xyes|xno)
27857         ADA_LIBNAME=AdaCurses
27858         ;;
27859 esac
27860
27861 echo "$as_me:27861: result: $ADA_LIBNAME" >&5
27862 echo "${ECHO_T}$ADA_LIBNAME" >&6
27863
27864                 fi
27865         fi
27866 else
27867         cf_with_ada=no
27868 fi
27869
27870 # do this "late" to avoid conflict with header-checks
27871 if test "x$with_widec" = xyes ; then
27872         echo "$as_me:27872: checking for wchar_t" >&5
27873 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27874 if test "${ac_cv_type_wchar_t+set}" = set; then
27875   echo $ECHO_N "(cached) $ECHO_C" >&6
27876 else
27877   cat >"conftest.$ac_ext" <<_ACEOF
27878 #line 27878 "configure"
27879 #include "confdefs.h"
27880 $ac_includes_default
27881 int
27882 main (void)
27883 {
27884 if ((wchar_t *) 0)
27885   return 0;
27886 if (sizeof (wchar_t))
27887   return 0;
27888   ;
27889   return 0;
27890 }
27891 _ACEOF
27892 rm -f "conftest.$ac_objext"
27893 if { (eval echo "$as_me:27893: \"$ac_compile\"") >&5
27894   (eval $ac_compile) 2>&5
27895   ac_status=$?
27896   echo "$as_me:27896: \$? = $ac_status" >&5
27897   (exit "$ac_status"); } &&
27898          { ac_try='test -s "conftest.$ac_objext"'
27899   { (eval echo "$as_me:27899: \"$ac_try\"") >&5
27900   (eval $ac_try) 2>&5
27901   ac_status=$?
27902   echo "$as_me:27902: \$? = $ac_status" >&5
27903   (exit "$ac_status"); }; }; then
27904   ac_cv_type_wchar_t=yes
27905 else
27906   echo "$as_me: failed program was:" >&5
27907 cat "conftest.$ac_ext" >&5
27908 ac_cv_type_wchar_t=no
27909 fi
27910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27911 fi
27912 echo "$as_me:27912: result: $ac_cv_type_wchar_t" >&5
27913 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27914
27915 echo "$as_me:27915: checking size of wchar_t" >&5
27916 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27917 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27918   echo $ECHO_N "(cached) $ECHO_C" >&6
27919 else
27920   if test "$ac_cv_type_wchar_t" = yes; then
27921   if test "$cross_compiling" = yes; then
27922   # Depending upon the size, compute the lo and hi bounds.
27923 cat >"conftest.$ac_ext" <<_ACEOF
27924 #line 27924 "configure"
27925 #include "confdefs.h"
27926 $ac_includes_default
27927 int
27928 main (void)
27929 {
27930 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27931   ;
27932   return 0;
27933 }
27934 _ACEOF
27935 rm -f "conftest.$ac_objext"
27936 if { (eval echo "$as_me:27936: \"$ac_compile\"") >&5
27937   (eval $ac_compile) 2>&5
27938   ac_status=$?
27939   echo "$as_me:27939: \$? = $ac_status" >&5
27940   (exit "$ac_status"); } &&
27941          { ac_try='test -s "conftest.$ac_objext"'
27942   { (eval echo "$as_me:27942: \"$ac_try\"") >&5
27943   (eval $ac_try) 2>&5
27944   ac_status=$?
27945   echo "$as_me:27945: \$? = $ac_status" >&5
27946   (exit "$ac_status"); }; }; then
27947   ac_lo=0 ac_mid=0
27948   while :; do
27949     cat >"conftest.$ac_ext" <<_ACEOF
27950 #line 27950 "configure"
27951 #include "confdefs.h"
27952 $ac_includes_default
27953 int
27954 main (void)
27955 {
27956 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27957   ;
27958   return 0;
27959 }
27960 _ACEOF
27961 rm -f "conftest.$ac_objext"
27962 if { (eval echo "$as_me:27962: \"$ac_compile\"") >&5
27963   (eval $ac_compile) 2>&5
27964   ac_status=$?
27965   echo "$as_me:27965: \$? = $ac_status" >&5
27966   (exit "$ac_status"); } &&
27967          { ac_try='test -s "conftest.$ac_objext"'
27968   { (eval echo "$as_me:27968: \"$ac_try\"") >&5
27969   (eval $ac_try) 2>&5
27970   ac_status=$?
27971   echo "$as_me:27971: \$? = $ac_status" >&5
27972   (exit "$ac_status"); }; }; then
27973   ac_hi=$ac_mid; break
27974 else
27975   echo "$as_me: failed program was:" >&5
27976 cat "conftest.$ac_ext" >&5
27977 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27978 fi
27979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27980   done
27981 else
27982   echo "$as_me: failed program was:" >&5
27983 cat "conftest.$ac_ext" >&5
27984 ac_hi=-1 ac_mid=-1
27985   while :; do
27986     cat >"conftest.$ac_ext" <<_ACEOF
27987 #line 27987 "configure"
27988 #include "confdefs.h"
27989 $ac_includes_default
27990 int
27991 main (void)
27992 {
27993 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27994   ;
27995   return 0;
27996 }
27997 _ACEOF
27998 rm -f "conftest.$ac_objext"
27999 if { (eval echo "$as_me:27999: \"$ac_compile\"") >&5
28000   (eval $ac_compile) 2>&5
28001   ac_status=$?
28002   echo "$as_me:28002: \$? = $ac_status" >&5
28003   (exit "$ac_status"); } &&
28004          { ac_try='test -s "conftest.$ac_objext"'
28005   { (eval echo "$as_me:28005: \"$ac_try\"") >&5
28006   (eval $ac_try) 2>&5
28007   ac_status=$?
28008   echo "$as_me:28008: \$? = $ac_status" >&5
28009   (exit "$ac_status"); }; }; then
28010   ac_lo=$ac_mid; break
28011 else
28012   echo "$as_me: failed program was:" >&5
28013 cat "conftest.$ac_ext" >&5
28014 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28015 fi
28016 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28017   done
28018 fi
28019 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28020 # Binary search between lo and hi bounds.
28021 while test "x$ac_lo" != "x$ac_hi"; do
28022   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28023   cat >"conftest.$ac_ext" <<_ACEOF
28024 #line 28024 "configure"
28025 #include "confdefs.h"
28026 $ac_includes_default
28027 int
28028 main (void)
28029 {
28030 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28031   ;
28032   return 0;
28033 }
28034 _ACEOF
28035 rm -f "conftest.$ac_objext"
28036 if { (eval echo "$as_me:28036: \"$ac_compile\"") >&5
28037   (eval $ac_compile) 2>&5
28038   ac_status=$?
28039   echo "$as_me:28039: \$? = $ac_status" >&5
28040   (exit "$ac_status"); } &&
28041          { ac_try='test -s "conftest.$ac_objext"'
28042   { (eval echo "$as_me:28042: \"$ac_try\"") >&5
28043   (eval $ac_try) 2>&5
28044   ac_status=$?
28045   echo "$as_me:28045: \$? = $ac_status" >&5
28046   (exit "$ac_status"); }; }; then
28047   ac_hi=$ac_mid
28048 else
28049   echo "$as_me: failed program was:" >&5
28050 cat "conftest.$ac_ext" >&5
28051 ac_lo=`expr "$ac_mid" + 1`
28052 fi
28053 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28054 done
28055 ac_cv_sizeof_wchar_t=$ac_lo
28056 else
28057   if test "$cross_compiling" = yes; then
28058   { { echo "$as_me:28058: error: cannot run test program while cross compiling" >&5
28059 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28060    { (exit 1); exit 1; }; }
28061 else
28062   cat >"conftest.$ac_ext" <<_ACEOF
28063 #line 28063 "configure"
28064 #include "confdefs.h"
28065 $ac_includes_default
28066 int
28067 main (void)
28068 {
28069 FILE *f = fopen ("conftest.val", "w");
28070 if (!f)
28071   $ac_main_return (1);
28072 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28073 fclose (f);
28074   ;
28075   return 0;
28076 }
28077 _ACEOF
28078 rm -f "conftest$ac_exeext"
28079 if { (eval echo "$as_me:28079: \"$ac_link\"") >&5
28080   (eval $ac_link) 2>&5
28081   ac_status=$?
28082   echo "$as_me:28082: \$? = $ac_status" >&5
28083   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28084   { (eval echo "$as_me:28084: \"$ac_try\"") >&5
28085   (eval $ac_try) 2>&5
28086   ac_status=$?
28087   echo "$as_me:28087: \$? = $ac_status" >&5
28088   (exit "$ac_status"); }; }; then
28089   ac_cv_sizeof_wchar_t=`cat conftest.val`
28090 else
28091   echo "$as_me: program exited with status $ac_status" >&5
28092 echo "$as_me: failed program was:" >&5
28093 cat "conftest.$ac_ext" >&5
28094 fi
28095 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28096 fi
28097 fi
28098 rm -f conftest.val
28099 else
28100   ac_cv_sizeof_wchar_t=0
28101 fi
28102 fi
28103 echo "$as_me:28103: result: $ac_cv_sizeof_wchar_t" >&5
28104 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28105 cat >>confdefs.h <<EOF
28106 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28107 EOF
28108
28109         # cross-compiling to mingw can run into the problem that attempting to
28110         # link with the regex library fails, causing the test to not set this to
28111         # a number.  "recent" autoconf does not address this problem either -TD
28112         if test -z "$ac_cv_sizeof_wchar_t"
28113         then
28114                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28115
28116 echo "${as_me:-configure}:28116: testing test failed (assume 2) ..." 1>&5
28117
28118                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28119                 mv confdefs.tmp confdefs.h
28120                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28121         fi
28122 fi
28123
28124 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28125 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28126 ###
28127 ### ticlib modules may be a separate library, otherwise contained in termlib.
28128 ### termlib modules may be a separate library, otherwise contained in ncurses.
28129 ###
28130 ### The of "+" or " " between the tokens controls the way the script
28131 ### chooses to split module lists into libraries.
28132 ###
28133 ### (see CF_LIB_RULES).
28134 echo "$as_me:28134: checking for library subsets" >&5
28135 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28136 LIB_SUBSETS=
28137
28138 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28139         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28140         if test "$with_ticlib" != no ; then
28141                 LIB_SUBSETS="${LIB_SUBSETS} "
28142         else
28143                 LIB_SUBSETS="${LIB_SUBSETS}+"
28144         fi
28145 fi
28146
28147 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28148 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28149
28150 if test "$with_termlib" != no ; then
28151         LIB_SUBSETS="${LIB_SUBSETS} "
28152 else
28153         LIB_SUBSETS="${LIB_SUBSETS}+"
28154 fi
28155
28156 LIB_SUBSETS="${LIB_SUBSETS}base"
28157
28158 # Most term-driver calls are to tinfo, but some like init_pair are to the
28159 # base library (so it resides in base).
28160 if test "$with_term_driver" != no ; then
28161         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28162         case "$cf_cv_system_name" in
28163         (*mingw32*|*mingw64*)
28164                 if test "x$with_exp_win32" = xyes ; then
28165                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28166                 else
28167                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28168                 fi
28169                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28170                 ;;
28171         (*)
28172                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28173                 ;;
28174         esac
28175 elif test "x$with_exp_win32" = xyes ; then
28176         case "$cf_cv_system_name" in
28177         (*mingw32*|*mingw64*)
28178                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28179                 ;;
28180         (*)
28181                 ;;
28182         esac
28183 fi
28184
28185 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28186 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28187
28188 echo "$as_me:28188: result: $LIB_SUBSETS" >&5
28189 echo "${ECHO_T}$LIB_SUBSETS" >&6
28190
28191 ### Construct the list of include-directories to be generated
28192
28193 if test "$srcdir" != "."; then
28194         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28195 fi
28196 CPPFLAGS="-I../include $CPPFLAGS"
28197 if test "$srcdir" != "."; then
28198         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28199 fi
28200 CPPFLAGS="-I. $CPPFLAGS"
28201
28202 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28203 if test "$srcdir" != "."; then
28204         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28205 fi
28206 if test "$GCC" != yes; then
28207         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28208 elif test "$includedir" != "/usr/include"; then
28209         if test "$includedir" = '${prefix}/include' ; then
28210                 if test x$prefix != x/usr ; then
28211                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28212                 fi
28213         else
28214                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28215         fi
28216 fi
28217
28218 ### Build up pieces for makefile rules
28219 echo "$as_me:28219: checking default library suffix" >&5
28220 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28221
28222         case $DFT_LWR_MODEL in
28223         (libtool) DFT_ARG_SUFFIX=''   ;;
28224         (normal)  DFT_ARG_SUFFIX=''   ;;
28225         (debug)   DFT_ARG_SUFFIX='_g' ;;
28226         (profile) DFT_ARG_SUFFIX='_p' ;;
28227         (shared)  DFT_ARG_SUFFIX=''   ;;
28228         esac
28229         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28230 echo "$as_me:28230: result: $DFT_ARG_SUFFIX" >&5
28231 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28232
28233 echo "$as_me:28233: checking default library-dependency suffix" >&5
28234 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28235
28236         case X$DFT_LWR_MODEL in
28237         (Xlibtool)
28238                 DFT_LIB_SUFFIX='.la'
28239                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28240                 ;;
28241         (Xdebug)
28242                 case "$cf_cv_system_name" in
28243                 (*-msvc*)
28244                         DFT_LIB_SUFFIX='_g.lib'
28245                         ;;
28246                 (*)
28247                         DFT_LIB_SUFFIX='_g.a'
28248                         ;;
28249                 esac
28250                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28251                 ;;
28252         (Xprofile)
28253                 case "$cf_cv_system_name" in
28254                 (*-msvc*)
28255                         DFT_LIB_SUFFIX='_p.lib'
28256                         ;;
28257                 (*)
28258                         DFT_LIB_SUFFIX='_p.a'
28259                         ;;
28260                 esac
28261                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28262                 ;;
28263         (Xshared)
28264                 case "$cf_cv_system_name" in
28265                 (aix[5-7]*)
28266                         DFT_LIB_SUFFIX='.so'
28267                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28268                         ;;
28269                 (*-msvc*)
28270                         DFT_LIB_SUFFIX='.dll'
28271                         DFT_DEP_SUFFIX='.dll.lib'
28272                         ;;
28273                 (cygwin*|msys*|mingw*)
28274                         DFT_LIB_SUFFIX='.dll'
28275                         DFT_DEP_SUFFIX='.dll.a'
28276                         ;;
28277                 (darwin*)
28278                         DFT_LIB_SUFFIX='.dylib'
28279                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28280                         ;;
28281                 (hpux*)
28282                         case "$target" in
28283                         (ia64*)
28284                                 DFT_LIB_SUFFIX='.so'
28285                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28286                                 ;;
28287                         (*)
28288                                 DFT_LIB_SUFFIX='.sl'
28289                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28290                                 ;;
28291                         esac
28292                         ;;
28293                 (*)
28294                         DFT_LIB_SUFFIX='.so'
28295                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28296                         ;;
28297                 esac
28298                 ;;
28299         (*)
28300                 case "$target" in
28301                 (*-msvc*)
28302                         DFT_LIB_SUFFIX='.lib'
28303                         ;;
28304                 (*)
28305                         DFT_LIB_SUFFIX='.a'
28306                         ;;
28307                 esac
28308                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28309                 ;;
28310         esac
28311         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28312         then
28313                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28314                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28315         fi
28316 echo "$as_me:28316: result: $DFT_DEP_SUFFIX" >&5
28317 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28318
28319 echo "$as_me:28319: checking default object directory" >&5
28320 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28321
28322         case $DFT_LWR_MODEL in
28323         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28324         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28325         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28326         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28327         (shared)
28328                 case "$cf_cv_system_name" in
28329                 (cygwin|msys)
28330                         DFT_OBJ_SUBDIR='objects' ;;
28331                 (*)
28332                         DFT_OBJ_SUBDIR='obj_s' ;;
28333                 esac
28334         esac
28335 echo "$as_me:28335: result: $DFT_OBJ_SUBDIR" >&5
28336 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28337
28338 if test "x$cf_with_cxx" = xyes ; then
28339 echo "$as_me:28339: checking c++ library-dependency suffix" >&5
28340 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28341 if test "$with_libtool" != "no"; then
28342         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28343         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28344 elif test "$with_shared_cxx" != "no"; then
28345         # also for g++ users...
28346         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28347 else
28348         # we normally make a static library because C/C++ library rules differ
28349
28350         case Xnormal in
28351         (Xlibtool)
28352                 CXX_LIB_SUFFIX='.la'
28353                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28354                 ;;
28355         (Xdebug)
28356                 case "$cf_cv_system_name" in
28357                 (*-msvc*)
28358                         CXX_LIB_SUFFIX='_g.lib'
28359                         ;;
28360                 (*)
28361                         CXX_LIB_SUFFIX='_g.a'
28362                         ;;
28363                 esac
28364                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28365                 ;;
28366         (Xprofile)
28367                 case "$cf_cv_system_name" in
28368                 (*-msvc*)
28369                         CXX_LIB_SUFFIX='_p.lib'
28370                         ;;
28371                 (*)
28372                         CXX_LIB_SUFFIX='_p.a'
28373                         ;;
28374                 esac
28375                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28376                 ;;
28377         (Xshared)
28378                 case "$cf_cv_system_name" in
28379                 (aix[5-7]*)
28380                         CXX_LIB_SUFFIX='.so'
28381                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28382                         ;;
28383                 (*-msvc*)
28384                         CXX_LIB_SUFFIX='.dll'
28385                         CXX_DEP_SUFFIX='.dll.lib'
28386                         ;;
28387                 (cygwin*|msys*|mingw*)
28388                         CXX_LIB_SUFFIX='.dll'
28389                         CXX_DEP_SUFFIX='.dll.a'
28390                         ;;
28391                 (darwin*)
28392                         CXX_LIB_SUFFIX='.dylib'
28393                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28394                         ;;
28395                 (hpux*)
28396                         case "$target" in
28397                         (ia64*)
28398                                 CXX_LIB_SUFFIX='.so'
28399                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28400                                 ;;
28401                         (*)
28402                                 CXX_LIB_SUFFIX='.sl'
28403                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28404                                 ;;
28405                         esac
28406                         ;;
28407                 (*)
28408                         CXX_LIB_SUFFIX='.so'
28409                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28410                         ;;
28411                 esac
28412                 ;;
28413         (*)
28414                 case "$target" in
28415                 (*-msvc*)
28416                         CXX_LIB_SUFFIX='.lib'
28417                         ;;
28418                 (*)
28419                         CXX_LIB_SUFFIX='.a'
28420                         ;;
28421                 esac
28422                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28423                 ;;
28424         esac
28425         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28426         then
28427                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28428                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28429         fi
28430
28431 fi
28432 echo "$as_me:28432: result: $CXX_LIB_SUFFIX" >&5
28433 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28434
28435 fi
28436
28437 # do not want -ldl in build except as needed for -lncurses dependency
28438 if test "x$with_dlsym" = xyes ; then
28439 if test "$DFT_LWR_MODEL" = shared || \
28440    test "$DFT_LWR_MODEL" = libtool ; then
28441
28442 # remove dl library from $LIBS
28443 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28444
28445 fi
28446 fi
28447 ### Set up low-level terminfo dependencies for makefiles.
28448
28449 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28450 # do not need libdl
28451 TICS_LIST=
28452 if test "x$with_dlsym" = xyes ; then
28453
28454 # remove dl library from $SHLIB_LIST
28455 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28456
28457 fi
28458
28459 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28460 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28461 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28462 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28463 then
28464         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28465 fi
28466
28467 if test "$with_ticlib" != no ; then
28468
28469         if test "x$with_ticlib" != xyes ; then
28470                 TICS_NAME=$with_ticlib
28471                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28472                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28473                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28474                 TICS_LIB_SUFFIX="${with_ticlib}"
28475         else
28476                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28477                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28478                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28479                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28480         fi
28481         TICS_LDFLAGS="-L${LIB_DIR}"
28482         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28483 else
28484         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28485         TICS_LDFLAGS="-L${LIB_DIR}"
28486         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28487 fi
28488
28489 if test "$with_termlib" != no ; then
28490
28491         if test "x$with_termlib" != xyes ; then
28492                 TINFO_NAME=$with_termlib
28493                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28494                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28495                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28496                 TINFO_LIB_SUFFIX="${with_termlib}"
28497         else
28498                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28499                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28500                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28501                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28502         fi
28503
28504         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28505         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28506         if test "$DFT_LWR_MODEL" = "libtool"; then
28507                 TEST_ARGS="${TEST_DEPS}"
28508                 TEST_ARG2="${TEST_DEP2}"
28509                 TINFO_LDFLAGS="-L${LIB_DIR}"
28510                 TINFO_LIBS="$TEST_ARGS"
28511                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28512                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28513         else
28514                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28515                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28516                 if test "x$with_term_driver" != xno ; then
28517                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28518                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28519                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28520                 else
28521                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28522                         TINFO_LIBS="$TEST_ARGS"
28523                 fi
28524                 TINFO_LDFLAGS="-L${LIB_DIR}"
28525                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28526         fi
28527 else
28528         # the next lines are needed for linking libtic over libncurses
28529         TINFO_NAME=${LIB_NAME}
28530         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28531         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28532         if test "x$with_tic_depends" = xyes ; then
28533                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28534         else
28535                 TICS_LIST="$SHLIB_LIST"
28536         fi
28537
28538         TINFO_LDFLAGS="-L${LIB_DIR}"
28539         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28540 fi
28541
28542 if test "$DFT_LWR_MODEL" = shared ; then
28543         case "$cf_cv_system_name" in
28544         (cygwin*|msys*)
28545                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28546                 TINFO_SUFFIX=.dll
28547                 ;;
28548         esac
28549 fi
28550
28551 if test "x$with_dlsym" = xyes ; then
28552
28553 # remove dl library from $TICS_LIST
28554 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28555
28556 fi
28557
28558 if test "$DFT_LWR_MODEL" = "libtool"; then
28559         OBJEXT=lo
28560 fi
28561
28562 # needed for Ada95
28563 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28564
28565 case "$DFT_LWR_MODEL" in
28566 (normal|debug|profile)
28567
28568 if test "$GCC" = yes ; then
28569         case "$cf_cv_system_name" in
28570         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28571                 LDFLAGS_STATIC=
28572                 LDFLAGS_SHARED=
28573                 ;;
28574         (*)     # normally, except when broken
28575                 LDFLAGS_STATIC=-static
28576                 LDFLAGS_SHARED=-dynamic
28577                 ;;
28578         esac
28579 else
28580         case "$cf_cv_system_name" in
28581         (aix[4-7]*)     # from ld manpage
28582                 LDFLAGS_STATIC=-bstatic
28583                 LDFLAGS_SHARED=-bdynamic
28584                 ;;
28585         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28586                 # We could also use just "archive" and "shared".
28587                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28588                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28589                 ;;
28590         (irix*)         # from ld manpage IRIX64
28591                 LDFLAGS_STATIC=-Bstatic
28592                 LDFLAGS_SHARED=-Bdynamic
28593                 ;;
28594         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28595                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28596                 LDFLAGS_STATIC=-noso
28597                 LDFLAGS_SHARED=-so_archive
28598                 ;;
28599         (solaris2*)
28600                 LDFLAGS_STATIC=-Bstatic
28601                 LDFLAGS_SHARED=-Bdynamic
28602                 ;;
28603         esac
28604 fi
28605
28606 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28607 then
28608         echo "$as_me:28608: checking if linker supports switching between static/dynamic" >&5
28609 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28610
28611         rm -f libconftest.a
28612         cat >conftest.$ac_ext <<EOF
28613 #line 28613 "configure"
28614 #include <stdio.h>
28615 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28616 EOF
28617         if { (eval echo "$as_me:28617: \"$ac_compile\"") >&5
28618   (eval $ac_compile) 2>&5
28619   ac_status=$?
28620   echo "$as_me:28620: \$? = $ac_status" >&5
28621   (exit "$ac_status"); } ; then
28622                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28623                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28624         fi
28625         rm -f conftest.*
28626
28627         cf_save_LIBS="$LIBS"
28628
28629         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28630         cat >"conftest.$ac_ext" <<_ACEOF
28631 #line 28631 "configure"
28632 #include "confdefs.h"
28633
28634 #line 28634 "configure"
28635 #include <stdio.h>
28636 int cf_ldflags_static(FILE *fp);
28637
28638 int
28639 main (void)
28640 {
28641
28642         return cf_ldflags_static(stdin);
28643
28644   ;
28645   return 0;
28646 }
28647 _ACEOF
28648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28649 if { (eval echo "$as_me:28649: \"$ac_link\"") >&5
28650   (eval $ac_link) 2>&5
28651   ac_status=$?
28652   echo "$as_me:28652: \$? = $ac_status" >&5
28653   (exit "$ac_status"); } &&
28654          { ac_try='test -s "conftest$ac_exeext"'
28655   { (eval echo "$as_me:28655: \"$ac_try\"") >&5
28656   (eval $ac_try) 2>&5
28657   ac_status=$?
28658   echo "$as_me:28658: \$? = $ac_status" >&5
28659   (exit "$ac_status"); }; }; then
28660
28661         # some linkers simply ignore the -dynamic
28662         case x`file "conftest$ac_exeext" 2>/dev/null` in
28663         (*static*)
28664                 cf_ldflags_static=no
28665                 ;;
28666         (*)
28667                 cf_ldflags_static=yes
28668                 ;;
28669         esac
28670
28671 else
28672   echo "$as_me: failed program was:" >&5
28673 cat "conftest.$ac_ext" >&5
28674 cf_ldflags_static=no
28675 fi
28676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28677
28678         rm -f libconftest.*
28679         LIBS="$cf_save_LIBS"
28680
28681         echo "$as_me:28681: result: $cf_ldflags_static" >&5
28682 echo "${ECHO_T}$cf_ldflags_static" >&6
28683
28684         if test "$cf_ldflags_static" != yes
28685         then
28686                 LDFLAGS_STATIC=
28687                 LDFLAGS_SHARED=
28688         fi
28689 else
28690         LDFLAGS_STATIC=
28691         LDFLAGS_SHARED=
28692 fi
28693
28694         ;;
28695 esac
28696
28697 echo "$as_me:28697: checking where we will install curses.h" >&5
28698 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28699
28700 includesubdir=
28701 if test "$with_overwrite" = no && \
28702  { test "x$includedir" = 'x${prefix}/include' || \
28703    test "x$includedir" = "x${prefix}/include"; }
28704 then
28705         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28706 fi
28707 echo "$as_me:28707: result: ${includedir}${includesubdir}" >&5
28708 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28709
28710 ### Resolve a conflict between normal and wide-curses by forcing applications
28711 ### that will need libutf8 to add it to their configure script.
28712 if test "$with_overwrite" != no ; then
28713 if test "$NCURSES_LIBUTF8" = 1 ; then
28714         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28715         { echo "$as_me:28715: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28716 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28717 fi
28718 fi
28719 WITH_OVERWRITE=$with_overwrite
28720
28721 ### At least on MinGW a shared library build without libtool
28722 ### requires adding the additional libs to the link list.
28723 case "$cf_cv_system_name" in
28724 (*mingw32*|*mingw64*)
28725         if test "$DFT_LWR_MODEL" != "libtool"; then
28726            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28727         fi
28728         ;;
28729 *)      ;;
28730 esac
28731
28732 # used to separate tack out of the tree
28733 NCURSES_TREE=
28734
28735 ### predefined stuff for the test programs
28736
28737 cat >>confdefs.h <<\EOF
28738 #define HAVE_SLK_COLOR 1
28739 EOF
28740
28741 # pkgsrc uses these
28742
28743 echo "$as_me:28743: checking for desired basename for form library" >&5
28744 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28745
28746 # Check whether --with-form-libname or --without-form-libname was given.
28747 if test "${with_form_libname+set}" = set; then
28748   withval="$with_form_libname"
28749   with_lib_basename=$withval
28750 else
28751   with_lib_basename=form
28752 fi;
28753 FORM_NAME="$with_lib_basename"
28754
28755 case "x$FORM_NAME" in
28756 (x|xno|xnone|xyes)
28757         FORM_NAME=form
28758         ;;
28759 (*)
28760         ;;
28761 esac
28762
28763 echo "$as_me:28763: result: $FORM_NAME" >&5
28764 echo "${ECHO_T}$FORM_NAME" >&6
28765
28766 echo "$as_me:28766: checking for desired basename for menu library" >&5
28767 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28768
28769 # Check whether --with-menu-libname or --without-menu-libname was given.
28770 if test "${with_menu_libname+set}" = set; then
28771   withval="$with_menu_libname"
28772   with_lib_basename=$withval
28773 else
28774   with_lib_basename=menu
28775 fi;
28776 MENU_NAME="$with_lib_basename"
28777
28778 case "x$MENU_NAME" in
28779 (x|xno|xnone|xyes)
28780         MENU_NAME=menu
28781         ;;
28782 (*)
28783         ;;
28784 esac
28785
28786 echo "$as_me:28786: result: $MENU_NAME" >&5
28787 echo "${ECHO_T}$MENU_NAME" >&6
28788
28789 echo "$as_me:28789: checking for desired basename for panel library" >&5
28790 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28791
28792 # Check whether --with-panel-libname or --without-panel-libname was given.
28793 if test "${with_panel_libname+set}" = set; then
28794   withval="$with_panel_libname"
28795   with_lib_basename=$withval
28796 else
28797   with_lib_basename=panel
28798 fi;
28799 PANEL_NAME="$with_lib_basename"
28800
28801 case "x$PANEL_NAME" in
28802 (x|xno|xnone|xyes)
28803         PANEL_NAME=panel
28804         ;;
28805 (*)
28806         ;;
28807 esac
28808
28809 echo "$as_me:28809: result: $PANEL_NAME" >&5
28810 echo "${ECHO_T}$PANEL_NAME" >&6
28811
28812 echo "$as_me:28812: checking for desired basename for cxx library" >&5
28813 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28814
28815 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28816 if test "${with_cxx_libname+set}" = set; then
28817   withval="$with_cxx_libname"
28818   with_lib_basename=$withval
28819 else
28820   with_lib_basename=ncurses++
28821 fi;
28822 CXX_NAME="$with_lib_basename"
28823
28824 case "x$CXX_NAME" in
28825 (x|xno|xnone|xyes)
28826         CXX_NAME=ncurses++
28827         ;;
28828 (*)
28829         ;;
28830 esac
28831
28832 echo "$as_me:28832: result: $CXX_NAME" >&5
28833 echo "${ECHO_T}$CXX_NAME" >&6
28834
28835 ### Construct the list of subdirectories for which we'll customize makefiles
28836 ### with the appropriate compile-rules.
28837
28838 echo "$as_me:28838: checking for src modules" >&5
28839 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28840
28841 # dependencies and linker-arguments for test-programs
28842 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28843 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28844 if test "$DFT_LWR_MODEL" = "libtool"; then
28845         TEST_ARGS="${TEST_DEPS}"
28846         TEST_ARG2="${TEST_DEP2}"
28847 else
28848         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28849         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28850 fi
28851
28852 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28853 cf_cv_src_modules=
28854 for cf_dir in $modules_to_build
28855 do
28856         if test -f "$srcdir/$cf_dir/modules" ; then
28857
28858                 # We may/may not have tack in the distribution, though the
28859                 # makefile is.
28860                 if test "$cf_dir" = tack ; then
28861                         if test "x$cf_with_tack" != "xyes"; then
28862                                 continue
28863                         fi
28864                 fi
28865
28866                 if test -z "$cf_cv_src_modules"; then
28867                         cf_cv_src_modules=$cf_dir
28868                 else
28869                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28870                 fi
28871
28872                 # Make the ncurses_cfg.h file record the library interface files as
28873                 # well.  These are header files that are the same name as their
28874                 # directory.  Ncurses is the only library that does not follow
28875                 # that pattern.
28876                 if test "$cf_dir" = tack ; then
28877                         continue
28878                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28879
28880 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28881
28882                         cat >>confdefs.h <<EOF
28883 #define HAVE_${cf_have_include}_H 1
28884 EOF
28885
28886                         cat >>confdefs.h <<EOF
28887 #define HAVE_LIB${cf_have_include} 1
28888 EOF
28889
28890 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28891
28892 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28893
28894                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28895                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28896                         if test "$DFT_LWR_MODEL" = "libtool"; then
28897                                 TEST_ARGS="${TEST_DEPS}"
28898                                 TEST_ARG2="${TEST_DEP2}"
28899                         else
28900                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28901                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28902                         fi
28903                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28904                 fi
28905         fi
28906 done
28907 echo "$as_me:28907: result: $cf_cv_src_modules" >&5
28908 echo "${ECHO_T}$cf_cv_src_modules" >&6
28909
28910 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28911 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28912
28913 SRC_SUBDIRS=
28914 if test "x$cf_with_manpages" != xno ; then
28915         SRC_SUBDIRS="$SRC_SUBDIRS man"
28916 fi
28917 SRC_SUBDIRS="$SRC_SUBDIRS include"
28918 for cf_dir in $cf_cv_src_modules
28919 do
28920         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28921 done
28922 if test "x$cf_with_tests" != "xno" ; then
28923         SRC_SUBDIRS="$SRC_SUBDIRS test"
28924 fi
28925 # always make this, to install the ncurses-config script
28926 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28927 if test "$cf_with_cxx_binding" != no; then
28928         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28929         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28930 fi
28931
28932 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28933 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28934
28935 ADA_SUBDIRS=
28936 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28937         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28938         ADA_SUBDIRS="gen src"
28939         if test "x$cf_with_tests" != "xno" ; then
28940                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28941         fi
28942 fi
28943
28944 SUB_MAKEFILES=
28945 for cf_dir in $SRC_SUBDIRS
28946 do
28947         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28948 done
28949
28950 if test -n "$ADA_SUBDIRS"; then
28951         for cf_dir in $ADA_SUBDIRS
28952         do
28953                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28954         done
28955
28956 fi
28957
28958 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28959    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28960    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28961    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28962 fi
28963
28964 DIRS_TO_MAKE="lib"
28965 for cf_item in $cf_list_models
28966 do
28967
28968         case $cf_item in
28969         (libtool) cf_subdir='obj_lo'  ;;
28970         (normal)  cf_subdir='objects' ;;
28971         (debug)   cf_subdir='obj_g' ;;
28972         (profile) cf_subdir='obj_p' ;;
28973         (shared)
28974                 case "$cf_cv_system_name" in
28975                 (cygwin|msys)
28976                         cf_subdir='objects' ;;
28977                 (*)
28978                         cf_subdir='obj_s' ;;
28979                 esac
28980         esac
28981
28982         for cf_item2 in $DIRS_TO_MAKE
28983         do
28984                 test "$cf_item2" = "$cf_subdir" && break
28985         done
28986         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28987 done
28988 for cf_dir in $DIRS_TO_MAKE
28989 do
28990         test ! -d "$cf_dir" && mkdir "$cf_dir"
28991 done
28992
28993 # symbols that differ when compiling Ada95 by itself.
28994 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28995
28996 # values to use as strings
28997
28998 cat >>confdefs.h <<EOF
28999 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29000 EOF
29001
29002 cat >>confdefs.h <<EOF
29003 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29004 EOF
29005
29006 ### Define substitutions for header files to avoid name-pollution
29007
29008 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29009         HAVE_TCGETATTR=1
29010 else
29011         HAVE_TCGETATTR=0
29012 fi
29013
29014 if test "x$ac_cv_header_stdint_h" = xyes ; then
29015         HAVE_STDINT_H=1
29016 else
29017         HAVE_STDINT_H=0
29018 fi
29019
29020 if test "x$ac_cv_header_termio_h" = xyes ; then
29021         HAVE_TERMIO_H=1
29022 else
29023         HAVE_TERMIO_H=0
29024 fi
29025
29026 if test "x$ac_cv_header_termios_h" = xyes ; then
29027         HAVE_TERMIOS_H=1
29028 else
29029         HAVE_TERMIOS_H=0
29030 fi
29031
29032 ################################################################################
29033 test "x$use_database" = xyes && \
29034 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29035
29036 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29037 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29038
29039 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29040 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29041 fi
29042
29043 if test "x$cf_with_tests" != xno ; then
29044         MAKE_TESTS=
29045 else
29046         MAKE_TESTS="#"
29047 fi
29048
29049 ADAHTML_DIR=../../doc/html/ada
29050
29051 # workaround for OS/2 (20151017)
29052 case "$cf_cv_system_name" in
29053 (os2*)
29054         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29055         ;;
29056 (*)
29057         LIBTOOL_OPTS_CXX=
29058         ;;
29059 esac
29060
29061 # workaround for g++ versus Solaris (20131116)
29062 case "$cf_cv_system_name" in
29063 (solaris2*)
29064         case "x$CPPFLAGS" in
29065         (*-D_XOPEN_SOURCE_EXTENDED*)
29066                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29067
29068 echo "${as_me:-configure}:29068: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29069
29070                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29071                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29072                 ;;
29073         esac
29074         ;;
29075 esac
29076
29077 # Help to automatically enable the extended curses features when using either
29078 # the *-config or the ".pc" files by adding defines.
29079 echo "$as_me:29079: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29080 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29081 PKG_CFLAGS=
29082 for cf_loop1 in $CPPFLAGS_after_XOPEN
29083 do
29084         cf_found=no
29085         for cf_loop2 in $CPPFLAGS_before_XOPEN
29086         do
29087                 if test "x$cf_loop1" = "x$cf_loop2"
29088                 then
29089                         cf_found=yes
29090                         break
29091                 fi
29092         done
29093         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29094 done
29095 echo "$as_me:29095: result: $PKG_CFLAGS" >&5
29096 echo "${ECHO_T}$PKG_CFLAGS" >&6
29097
29098 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29099 case "x$NCURSES_OSPEED" in
29100 (*short*)
29101         cf_compatible=1
29102         ;;
29103 (*)
29104         cf_compatible=0
29105         ;;
29106 esac
29107
29108 cat >>confdefs.h <<EOF
29109 #define NCURSES_OSPEED_COMPAT $cf_compatible
29110 EOF
29111
29112 case "x$cf_cv_typeof_chtype" in
29113 (xshort|xint|xlong)
29114         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29115         ;;
29116 esac
29117
29118 case "x$cf_cv_typeof_mmask_t" in
29119 (xshort|xint|xlong)
29120         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29121         ;;
29122 esac
29123
29124 # substitute into misc/Makefile to suppress
29125 # (un)install.data from the
29126 # (un)install rules.
29127 if test "x$cf_with_db_install" = "xno"; then
29128         MISC_INSTALL_DATA=
29129         MISC_UNINSTALL_DATA=
29130 else
29131         MISC_INSTALL_DATA=install.data
29132         MISC_UNINSTALL_DATA=uninstall.data
29133 fi
29134
29135 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29136         MAKE_DATABASE="#"
29137 else
29138         MAKE_DATABASE="$MAKE_TERMINFO"
29139 fi
29140
29141 if test -n "$PACKAGE"
29142 then
29143         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29144         export PACKAGE
29145         echo "package: $PACKAGE"
29146 fi
29147
29148 UNALTERED_SYMS=
29149 cf_filter_syms=no
29150
29151 if test -n "$RESULTING_SYMS"
29152 then
29153         cf_filter_syms=$cf_dft_filter_syms
29154         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
29155
29156 echo "${as_me:-configure}:29156: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
29157
29158 fi
29159
29160 if test "x$WILDCARD_SYMS" = xno
29161 then
29162         cf_filter_syms=yes
29163 fi
29164
29165 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29166
29167 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29168 if test "$cf_filter_syms" = yes
29169 then
29170         RESULTING_SYMS=resulting.map
29171 fi
29172
29173 if test "x$cross_compiling" = xyes ; then
29174         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29175         CHECK_BUILD="#"
29176 else
29177         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29178         CHECK_BUILD=
29179 fi
29180
29181 # This is used for the *-config script and *.pc data files.
29182
29183 echo "$as_me:29183: checking for linker search path" >&5
29184 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29185 if test "${cf_cv_ld_searchpath+set}" = set; then
29186   echo $ECHO_N "(cached) $ECHO_C" >&6
29187 else
29188
29189 if test "$cross_compiling" != yes ; then
29190
29191 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29192 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29193
29194 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29195 # update the cache, which makes it run faster.
29196 test -z "$cf_pathlist" && \
29197         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29198
29199 test -z "$cf_pathlist" &&
29200         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29201
29202 # This works with OpenBSD 6.5, which lists only filenames
29203 test -z "$cf_pathlist" &&
29204         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29205
29206 if test -z "$cf_pathlist"
29207 then
29208         # dyld default path with MacOS
29209         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29210         then
29211                 # do this to bypass check
29212                 cf_cv_ld_searchpath='$HOME/lib'
29213                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29214         fi
29215 fi
29216
29217 if test -z "$cf_pathlist"
29218 then
29219         # Solaris is "SunOS"
29220         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29221         then
29222                 case x`(isainfo -b)` in
29223                 (x64)
29224                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29225                         ;;
29226                 (x32)
29227                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29228                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29229                         ;;
29230                 (*)
29231                         { echo "$as_me:29231: WARNING: problem with Solaris architecture" >&5
29232 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29233                         ;;
29234                 esac
29235         fi
29236 fi
29237
29238 if test -z "$cf_pathlist"
29239 then
29240         # HP-UX
29241         if test x"`uname -s`" = xHP-UX
29242         then
29243                 case x`getconf LONG_BIT` in
29244                 (x64)
29245                         cf_pathlist="/usr/lib/hpux64"
29246                         ;;
29247                 (x*)
29248                         cf_pathlist="/usr/lib/hpux32"
29249                         ;;
29250                 esac
29251         fi
29252 fi
29253
29254 fi
29255
29256 # If nothing else, assume it is conventional
29257 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29258
29259 # Finally, check that this is only directories
29260 for cf_path in $0 $cf_pathlist
29261 do
29262         if test -d "$cf_path"; then
29263                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29264                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29265         fi
29266 done
29267
29268 # Ensure that it is nonempty
29269 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29270
29271 fi
29272 echo "$as_me:29272: result: $cf_cv_ld_searchpath" >&5
29273 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29274
29275 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29276
29277 cat >>confdefs.h <<\EOF
29278 #define HAVE_CURSES_DATA_BOOLNAMES 1
29279 EOF
29280
29281 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"
29282 ac_config_commands="$ac_config_commands default"
29283 cat >confcache <<\_ACEOF
29284 # This file is a shell script that caches the results of configure
29285 # tests run on this system so they can be shared between configure
29286 # scripts and configure runs, see configure's option --config-cache.
29287 # It is not useful on other systems.  If it contains results you don't
29288 # want to keep, you may remove or edit it.
29289 #
29290 # config.status only pays attention to the cache file if you give it
29291 # the --recheck option to rerun configure.
29292 #
29293 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29294 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29295 # following values.
29296
29297 _ACEOF
29298
29299 # The following way of writing the cache mishandles newlines in values,
29300 # but we know of no workaround that is simple, portable, and efficient.
29301 # So, don't put newlines in cache variables' values.
29302 # Ultrix sh set writes to stderr and can't be redirected directly,
29303 # and sets the high bit in the cache file unless we assign to the vars.
29304 {
29305   (set) 2>&1 |
29306     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29307     *ac_space=\ *)
29308       # `set' does not quote correctly, so add quotes (double-quote
29309       # substitution turns \\\\ into \\, and sed turns \\ into \).
29310       sed -n \
29311         "s/'/'\\\\''/g;
29312           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29313       ;;
29314     *)
29315       # `set' quotes correctly as required by POSIX, so do not add quotes.
29316       sed -n \
29317         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29318       ;;
29319     esac;
29320 } |
29321   sed '
29322      t clear
29323      : clear
29324      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29325      t end
29326      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29327      : end' >>confcache
29328 if cmp -s $cache_file confcache; then :; else
29329   if test -w $cache_file; then
29330     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29331     cat confcache >$cache_file
29332   else
29333     echo "not updating unwritable cache $cache_file"
29334   fi
29335 fi
29336 rm -f confcache
29337
29338 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29339 # Let make expand exec_prefix.
29340 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29341
29342 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29343 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29344 # trailing colons and then remove the whole line if VPATH becomes empty
29345 # (actually we leave an empty line to preserve line numbers).
29346 if test "x$srcdir" = x.; then
29347   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29348 s/:*\$(srcdir):*/:/;
29349 s/:*\${srcdir}:*/:/;
29350 s/:*@srcdir@:*/:/;
29351 s/^\([^=]*=[    ]*\):*/\1/;
29352 s/:*$//;
29353 s/^[^=]*=[      ]*$//;
29354 }'
29355 fi
29356
29357 DEFS=-DHAVE_CONFIG_H
29358
29359 : "${CONFIG_STATUS=./config.status}"
29360 ac_clean_files_save=$ac_clean_files
29361 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29362 { echo "$as_me:29362: creating $CONFIG_STATUS" >&5
29363 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29364 cat >"$CONFIG_STATUS" <<_ACEOF
29365 #! $SHELL
29366 # Generated automatically by configure.
29367 # Run this file to recreate the current configuration.
29368 # Compiler output produced by configure, useful for debugging
29369 # configure, is in config.log if it exists.
29370
29371 debug=false
29372 SHELL=\${CONFIG_SHELL-$SHELL}
29373 ac_cs_invocation="\$0 \$@"
29374
29375 CLICOLOR_FORCE= GREP_OPTIONS=
29376 unset CLICOLOR_FORCE GREP_OPTIONS
29377 _ACEOF
29378
29379 cat >>"$CONFIG_STATUS" <<\_ACEOF
29380 # Be Bourne compatible
29381 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29382   emulate sh
29383   NULLCMD=:
29384 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29385   set -o posix
29386 fi
29387
29388 # Name of the executable.
29389 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29390
29391 if expr a : '\(a\)' >/dev/null 2>&1; then
29392   as_expr=expr
29393 else
29394   as_expr=false
29395 fi
29396
29397 rm -f conf$$ conf$$.exe conf$$.file
29398 echo >conf$$.file
29399 if ln -s conf$$.file conf$$ 2>/dev/null; then
29400   # We could just check for DJGPP; but this test a) works b) is more generic
29401   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29402   if test -f conf$$.exe; then
29403     # Don't use ln at all; we don't have any links
29404     as_ln_s='cp -p'
29405   else
29406     as_ln_s='ln -s'
29407   fi
29408 elif ln conf$$.file conf$$ 2>/dev/null; then
29409   as_ln_s=ln
29410 else
29411   as_ln_s='cp -p'
29412 fi
29413 rm -f conf$$ conf$$.exe conf$$.file
29414
29415 as_executable_p="test -f"
29416
29417 # Support unset when possible.
29418 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29419   as_unset="unset"
29420 else
29421   as_unset="false"
29422 fi
29423
29424 # NLS nuisances.
29425 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29426 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29427 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29428 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29429 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29430 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29431 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29432 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29433
29434 # IFS
29435 # We need space, tab and new line, in precisely that order.
29436 as_nl='
29437 '
29438 IFS="   $as_nl"
29439
29440 # CDPATH.
29441 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29442
29443 exec 6>&1
29444
29445 _ACEOF
29446
29447 # Files that config.status was made for.
29448 if test -n "$ac_config_files"; then
29449   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29450 fi
29451
29452 if test -n "$ac_config_headers"; then
29453   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29454 fi
29455
29456 if test -n "$ac_config_links"; then
29457   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29458 fi
29459
29460 if test -n "$ac_config_commands"; then
29461   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29462 fi
29463
29464 cat >>"$CONFIG_STATUS" <<\EOF
29465
29466 ac_cs_usage="\
29467 \`$as_me' instantiates files from templates according to the
29468 current configuration.
29469
29470 Usage: $0 [OPTIONS] [FILE]...
29471
29472   -h, --help       print this help, then exit
29473   -V, --version    print version number, then exit
29474   -d, --debug      don't remove temporary files
29475       --recheck    update $as_me by reconfiguring in the same conditions
29476   --file=FILE[:TEMPLATE]
29477                    instantiate the configuration file FILE
29478   --header=FILE[:TEMPLATE]
29479                    instantiate the configuration header FILE
29480
29481 Configuration files:
29482 $config_files
29483
29484 Configuration headers:
29485 $config_headers
29486
29487 Configuration commands:
29488 $config_commands
29489
29490 Report bugs to <dickey@invisible-island.net>."
29491 EOF
29492
29493 cat >>"$CONFIG_STATUS" <<EOF
29494 ac_cs_version="\\
29495 config.status
29496 configured by $0, generated by GNU Autoconf 2.52.20210509,
29497   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29498
29499 Copyright 2003-2020,2021        Thomas E. Dickey
29500 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29501 Free Software Foundation, Inc.
29502 This config.status script is free software; the Free Software Foundation
29503 gives unlimited permission to copy, distribute and modify it."
29504 srcdir="$srcdir"
29505 INSTALL="$INSTALL"
29506 EOF
29507
29508 cat >>"$CONFIG_STATUS" <<\EOF
29509 # If no file are specified by the user, then we need to provide default
29510 # value.  By we need to know if files were specified by the user.
29511 ac_need_defaults=:
29512 while test $# != 0
29513 do
29514   case $1 in
29515   --*=*)
29516     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29517     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29518     shift
29519     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29520     shift
29521     ;;
29522   -*);;
29523   *) # This is not an option, so the user has probably given explicit
29524      # arguments.
29525      ac_need_defaults=false;;
29526   esac
29527
29528   case $1 in
29529   # Handling of the options.
29530 EOF
29531 cat >>"$CONFIG_STATUS" <<EOF
29532   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29533     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29534     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29535 EOF
29536 cat >>"$CONFIG_STATUS" <<\EOF
29537   --version | --vers* | -V )
29538     echo "$ac_cs_version"; exit 0 ;;
29539   --he | --h)
29540     # Conflict between --help and --header
29541     { { echo "$as_me:29541: error: ambiguous option: $1
29542 Try \`$0 --help' for more information." >&5
29543 echo "$as_me: error: ambiguous option: $1
29544 Try \`$0 --help' for more information." >&2;}
29545    { (exit 1); exit 1; }; };;
29546   --help | --hel | -h )
29547     echo "$ac_cs_usage"; exit 0 ;;
29548   --debug | --d* | -d )
29549     debug=: ;;
29550   --file | --fil | --fi | --f )
29551     shift
29552     CONFIG_FILES="$CONFIG_FILES $1"
29553     ac_need_defaults=false;;
29554   --header | --heade | --head | --hea )
29555     shift
29556     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29557     ac_need_defaults=false;;
29558
29559   # This is an error.
29560   -*) { { echo "$as_me:29560: error: unrecognized option: $1
29561 Try \`$0 --help' for more information." >&5
29562 echo "$as_me: error: unrecognized option: $1
29563 Try \`$0 --help' for more information." >&2;}
29564    { (exit 1); exit 1; }; } ;;
29565
29566   *) ac_config_targets="$ac_config_targets $1" ;;
29567
29568   esac
29569   shift
29570 done
29571
29572 exec 5>>config.log
29573 cat >&5 << _ACEOF
29574
29575 ## ----------------------- ##
29576 ## Running config.status.  ##
29577 ## ----------------------- ##
29578
29579 This file was extended by $as_me 2.52.20210509, executed with
29580   CONFIG_FILES    = $CONFIG_FILES
29581   CONFIG_HEADERS  = $CONFIG_HEADERS
29582   CONFIG_LINKS    = $CONFIG_LINKS
29583   CONFIG_COMMANDS = $CONFIG_COMMANDS
29584   > "$ac_cs_invocation"
29585 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29586
29587 _ACEOF
29588 EOF
29589
29590 cat >>"$CONFIG_STATUS" <<EOF
29591 #
29592 # INIT-COMMANDS section.
29593 #
29594
29595 ### Special initialization commands, used to pass information from the
29596 ### configuration-run into config.status
29597
29598 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29599 AWK="$AWK"
29600 CXX_NAME="$CXX_NAME"
29601 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29602 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29603 ECHO_LD="$ECHO_LD"
29604 EGREP="${EGREP-grep -E}"
29605 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29606 FGREP="${FGREP-grep -F}"
29607 FORM_NAME="$FORM_NAME"
29608 LDCONFIG="$LDCONFIG"
29609 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29610 LIB_NAME="$LIB_NAME"
29611 LIB_PREFIX="$LIB_PREFIX"
29612 LIB_SUBSETS="$LIB_SUBSETS"
29613 LIB_SUFFIX="$LIB_SUFFIX"
29614 LIB_TRACING="$LIB_TRACING"
29615 LN_S="$LN_S"
29616 MAKE_TERMINFO="$MAKE_TERMINFO"
29617 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29618 MENU_NAME="$MENU_NAME"
29619 NCURSES_MAJOR="$NCURSES_MAJOR"
29620 NCURSES_MINOR="$NCURSES_MINOR"
29621 NCURSES_OSPEED="$NCURSES_OSPEED"
29622 NCURSES_PATCH="$NCURSES_PATCH"
29623 PANEL_NAME="$PANEL_NAME"
29624 SRC_SUBDIRS="$SRC_SUBDIRS"
29625 TERMINFO="$TERMINFO"
29626 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29627 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29628 TICS_NAME="$TICS_NAME"
29629 TICS_SUFFIX="$TICS_SUFFIX"
29630 TIC_PATH="$TIC_PATH"
29631 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29632 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29633 TINFO_NAME="$TINFO_NAME"
29634 TINFO_SUFFIX="$TINFO_SUFFIX"
29635 UNALTERED_SYMS="$UNALTERED_SYMS"
29636 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29637 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29638 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29639 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29640 WILDCARD_SYMS="$WILDCARD_SYMS"
29641 WITH_CURSES_H="$with_curses_h"
29642 WITH_ECHO="${enable_echo:=yes}"
29643 WITH_OVERWRITE="$with_overwrite"
29644 cf_LIST_MODELS="$cf_list_models"
29645 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29646 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29647 cf_cv_abi_version="$cf_cv_abi_version"
29648 cf_cv_do_relink="$cf_cv_do_relink"
29649 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29650 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29651 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29652 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29653 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29654 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29655 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29656 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29657 cf_cv_rel_version="$cf_cv_rel_version"
29658 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29659 cf_cv_shared_soname='$cf_cv_shared_soname'
29660 cf_cv_shlib_version="$cf_cv_shlib_version"
29661 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29662 cf_cv_system_name="$cf_cv_system_name"
29663 cf_cv_term_driver="$with_term_driver"
29664 cf_with_ada="$cf_with_ada"
29665 cf_with_cxx_binding="$cf_with_cxx_binding"
29666 cf_with_db_install="$cf_with_db_install"
29667 cf_with_manpages="$cf_with_manpages"
29668 cf_with_tests="$cf_with_tests"
29669 host="$host"
29670 target="$target"
29671 verbose="$verbose"
29672 with_shared_cxx="$with_shared_cxx"
29673
29674 EOF
29675
29676 cat >>"$CONFIG_STATUS" <<\EOF
29677 for ac_config_target in $ac_config_targets
29678 do
29679   case "$ac_config_target" in
29680   # Handling of arguments.
29681   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29682   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29683   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29684   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29685   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29686   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29687   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29688   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29689   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29690   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29691   *) { { echo "$as_me:29691: error: invalid argument: $ac_config_target" >&5
29692 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29693    { (exit 1); exit 1; }; };;
29694   esac
29695 done
29696
29697 # If the user did not use the arguments to specify the items to instantiate,
29698 # then the envvar interface is used.  Set only those that are not.
29699 # We use the long form for the default assignment because of an extremely
29700 # bizarre bug on SunOS 4.1.3.
29701 if "$ac_need_defaults"; then
29702   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29703   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29704   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29705 fi
29706
29707 # Create a temporary directory, and hook for its removal unless debugging.
29708 $debug ||
29709 {
29710   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29711   trap '{ (exit 1); exit 1; }' 1 2 13 15
29712 }
29713
29714 # Create a (secure) tmp directory for tmp files.
29715 : ${TMPDIR=/tmp}
29716 {
29717   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29718   test -n "$tmp" && test -d "$tmp"
29719 }  ||
29720 {
29721   tmp=$TMPDIR/cs$$-$RANDOM
29722   (umask 077 && mkdir $tmp)
29723 } ||
29724 {
29725    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29726    { (exit 1); exit 1; }
29727 }
29728
29729 EOF
29730
29731 cat >>"$CONFIG_STATUS" <<EOF
29732
29733 #
29734 # CONFIG_FILES section.
29735 #
29736
29737 # No need to generate the scripts if there are no CONFIG_FILES.
29738 # This happens for instance when ./config.status config.h
29739 if test -n "\$CONFIG_FILES"; then
29740   # Protect against being on the right side of a sed subst in config.status.
29741   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29742    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29743 s,@SHELL@,$SHELL,;t t
29744 s,@exec_prefix@,$exec_prefix,;t t
29745 s,@prefix@,$prefix,;t t
29746 s,@program_transform_name@,$program_transform_name,;t t
29747 s,@bindir@,$bindir,;t t
29748 s,@sbindir@,$sbindir,;t t
29749 s,@libexecdir@,$libexecdir,;t t
29750 s,@datarootdir@,$datarootdir,;t t
29751 s,@datadir@,$datadir,;t t
29752 s,@sysconfdir@,$sysconfdir,;t t
29753 s,@sharedstatedir@,$sharedstatedir,;t t
29754 s,@localstatedir@,$localstatedir,;t t
29755 s,@runstatedir@,$runstatedir,;t t
29756 s,@libdir@,$libdir,;t t
29757 s,@includedir@,$includedir,;t t
29758 s,@oldincludedir@,$oldincludedir,;t t
29759 s,@infodir@,$infodir,;t t
29760 s,@mandir@,$mandir,;t t
29761 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29762 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29763 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29764 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29765 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29766 s,@build_alias@,$build_alias,;t t
29767 s,@host_alias@,$host_alias,;t t
29768 s,@target_alias@,$target_alias,;t t
29769 s,@ECHO_C@,$ECHO_C,;t t
29770 s,@ECHO_N@,$ECHO_N,;t t
29771 s,@ECHO_T@,$ECHO_T,;t t
29772 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29773 s,@DEFS@,$DEFS,;t t
29774 s,@LIBS@,$LIBS,;t t
29775 s,@top_builddir@,$top_builddir,;t t
29776 s,@GREP@,$GREP,;t t
29777 s,@EGREP@,$EGREP,;t t
29778 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29779 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29780 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29781 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29782 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29783 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29784 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29785 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29786 s,@VERSION@,$VERSION,;t t
29787 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29788 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29789 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29790 s,@PACKAGE@,$PACKAGE,;t t
29791 s,@build@,$build,;t t
29792 s,@build_cpu@,$build_cpu,;t t
29793 s,@build_vendor@,$build_vendor,;t t
29794 s,@build_os@,$build_os,;t t
29795 s,@host@,$host,;t t
29796 s,@host_cpu@,$host_cpu,;t t
29797 s,@host_vendor@,$host_vendor,;t t
29798 s,@host_os@,$host_os,;t t
29799 s,@target@,$target,;t t
29800 s,@target_cpu@,$target_cpu,;t t
29801 s,@target_vendor@,$target_vendor,;t t
29802 s,@target_os@,$target_os,;t t
29803 s,@FGREP@,$FGREP,;t t
29804 s,@CC@,$CC,;t t
29805 s,@CFLAGS@,$CFLAGS,;t t
29806 s,@LDFLAGS@,$LDFLAGS,;t t
29807 s,@CPPFLAGS@,$CPPFLAGS,;t t
29808 s,@ac_ct_CC@,$ac_ct_CC,;t t
29809 s,@EXEEXT@,$EXEEXT,;t t
29810 s,@OBJEXT@,$OBJEXT,;t t
29811 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29812 s,@CPP@,$CPP,;t t
29813 s,@LDCONFIG@,$LDCONFIG,;t t
29814 s,@CXX@,$CXX,;t t
29815 s,@CXXFLAGS@,$CXXFLAGS,;t t
29816 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29817 s,@AWK@,$AWK,;t t
29818 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29819 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29820 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29821 s,@LINT@,$LINT,;t t
29822 s,@LINT_OPTS@,$LINT_OPTS,;t t
29823 s,@LINT_LIBS@,$LINT_LIBS,;t t
29824 s,@LN_S@,$LN_S,;t t
29825 s,@cf_config_suffix@,$cf_config_suffix,;t t
29826 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29827 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29828 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29829 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29830 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29831 s,@SET_MAKE@,$SET_MAKE,;t t
29832 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29833 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29834 s,@CTAGS@,$CTAGS,;t t
29835 s,@ETAGS@,$ETAGS,;t t
29836 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29837 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29838 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29839 s,@RANLIB@,$RANLIB,;t t
29840 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29841 s,@LD@,$LD,;t t
29842 s,@ac_ct_LD@,$ac_ct_LD,;t t
29843 s,@AR@,$AR,;t t
29844 s,@ac_ct_AR@,$ac_ct_AR,;t t
29845 s,@NM@,$NM,;t t
29846 s,@ac_ct_NM@,$ac_ct_NM,;t t
29847 s,@ARFLAGS@,$ARFLAGS,;t t
29848 s,@DESTDIR@,$DESTDIR,;t t
29849 s,@BUILD_CC@,$BUILD_CC,;t t
29850 s,@BUILD_CPP@,$BUILD_CPP,;t t
29851 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29852 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29853 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29854 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29855 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29856 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29857 s,@cf_list_models@,$cf_list_models,;t t
29858 s,@ABI_VERSION@,$ABI_VERSION,;t t
29859 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29860 s,@LIBTOOL@,$LIBTOOL,;t t
29861 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29862 s,@LT_UNDEF@,$LT_UNDEF,;t t
29863 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29864 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29865 s,@LIB_CREATE@,$LIB_CREATE,;t t
29866 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29867 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29868 s,@LIB_PREP@,$LIB_PREP,;t t
29869 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29870 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29871 s,@LIB_LINK@,$LIB_LINK,;t t
29872 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29873 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29874 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29875 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29876 s,@TICS_NAME@,$TICS_NAME,;t t
29877 s,@TINFO_NAME@,$TINFO_NAME,;t t
29878 s,@LIB_NAME@,$LIB_NAME,;t t
29879 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29880 s,@CC_G_OPT@,$CC_G_OPT,;t t
29881 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29882 s,@LD_MODEL@,$LD_MODEL,;t t
29883 s,@shlibdir@,$shlibdir,;t t
29884 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29885 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29886 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29887 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29888 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29889 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29890 s,@LINK_PROGS@,$LINK_PROGS,;t t
29891 s,@LINK_TESTS@,$LINK_TESTS,;t t
29892 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29893 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29894 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29895 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29896 s,@RPATH_LIST@,$RPATH_LIST,;t t
29897 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29898 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29899 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29900 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29901 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29902 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29903 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29904 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29905 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29906 s,@TIC@,$TIC,;t t
29907 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29908 s,@INFOCMP@,$INFOCMP,;t t
29909 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29910 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29911 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29912 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29913 s,@XTERM_KBS@,$XTERM_KBS,;t t
29914 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29915 s,@TERMINFO@,$TERMINFO,;t t
29916 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29917 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29918 s,@TERMPATH@,$TERMPATH,;t t
29919 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29920 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29921 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29922 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29923 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29924 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29925 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29926 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29927 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29928 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29929 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29930 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29931 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29932 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29933 s,@RGB_PATH@,$RGB_PATH,;t t
29934 s,@no_x11_rgb@,$no_x11_rgb,;t t
29935 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29936 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29937 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29938 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29939 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29940 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29941 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29942 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29943 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29944 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29945 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29946 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29947 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29948 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29949 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29950 s,@PTHREAD@,$PTHREAD,;t t
29951 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29952 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29953 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29954 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29955 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29956 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29957 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29958 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29959 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29960 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29961 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29962 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29963 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29964 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29965 s,@ECHO_LT@,$ECHO_LT,;t t
29966 s,@ECHO_LD@,$ECHO_LD,;t t
29967 s,@RULE_CC@,$RULE_CC,;t t
29968 s,@SHOW_CC@,$SHOW_CC,;t t
29969 s,@ECHO_CC@,$ECHO_CC,;t t
29970 s,@ECHO_LINK@,$ECHO_LINK,;t t
29971 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29972 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29973 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29974 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29975 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29976 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29977 s,@ADAFLAGS@,$ADAFLAGS,;t t
29978 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29979 s,@ADA_TRACE@,$ADA_TRACE,;t t
29980 s,@MATH_LIB@,$MATH_LIB,;t t
29981 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29982 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29983 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29984 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29985 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29986 s,@TEST_LIBS@,$TEST_LIBS,;t t
29987 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29988 s,@CXXCPP@,$CXXCPP,;t t
29989 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29990 s,@CXX_AR@,$CXX_AR,;t t
29991 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29992 s,@CXXLIBS@,$CXXLIBS,;t t
29993 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29994 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29995 s,@M4_exists@,$M4_exists,;t t
29996 s,@cf_ada_make@,$cf_ada_make,;t t
29997 s,@cf_ada_config@,$cf_ada_config,;t t
29998 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29999 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30000 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30001 s,@cf_compile_generics@,$cf_compile_generics,;t t
30002 s,@cf_generic_objects@,$cf_generic_objects,;t t
30003 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30004 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30005 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30006 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30007 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30008 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30009 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30010 s,@cf_ada_package@,$cf_ada_package,;t t
30011 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30012 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30013 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30014 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30015 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30016 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30017 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30018 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30019 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30020 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30021 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30022 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30023 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30024 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30025 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30026 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30027 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30028 s,@TICS_LIBS@,$TICS_LIBS,;t t
30029 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30030 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30031 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30032 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30033 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30034 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30035 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30036 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30037 s,@includesubdir@,$includesubdir,;t t
30038 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30039 s,@TICS_LIST@,$TICS_LIST,;t t
30040 s,@TINFO_LIST@,$TINFO_LIST,;t t
30041 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30042 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
30043 s,@FORM_NAME@,$FORM_NAME,;t t
30044 s,@MENU_NAME@,$MENU_NAME,;t t
30045 s,@PANEL_NAME@,$PANEL_NAME,;t t
30046 s,@CXX_NAME@,$CXX_NAME,;t t
30047 s,@TEST_ARGS@,$TEST_ARGS,;t t
30048 s,@TEST_DEPS@,$TEST_DEPS,;t t
30049 s,@TEST_ARG2@,$TEST_ARG2,;t t
30050 s,@TEST_DEP2@,$TEST_DEP2,;t t
30051 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30052 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30053 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30054 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30055 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30056 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30057 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30058 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30059 s,@cross_compiling@,$cross_compiling,;t t
30060 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30061 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30062 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30063 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30064 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30065 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30066 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30067 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30068 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30069 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30070 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30071 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30072 CEOF
30073
30074 EOF
30075
30076   cat >>"$CONFIG_STATUS" <<\EOF
30077   # Split the substitutions into bite-sized pieces for seds with
30078   # small command number limits, like on Digital OSF/1 and HP-UX.
30079   ac_max_sed_lines=48
30080   ac_sed_frag=1 # Number of current file.
30081   ac_beg=1 # First line for current file.
30082   ac_end=$ac_max_sed_lines # Line after last line for current file.
30083   ac_more_lines=:
30084   ac_sed_cmds=
30085   while "$ac_more_lines"; do
30086     if test "$ac_beg" -gt 1; then
30087       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30088     else
30089       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30090     fi
30091     if test ! -s $tmp/subs.frag; then
30092       ac_more_lines=false
30093     else
30094       # The purpose of the label and of the branching condition is to
30095       # speed up the sed processing (if there are no `@' at all, there
30096       # is no need to browse any of the substitutions).
30097       # These are the two extra sed commands mentioned above.
30098       (echo ':t
30099   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
30100       # It is possible to make a multiline substitution using escaped newlines.
30101       # Ensure that we do not split the substitution between script fragments.
30102       ac_BEG=$ac_end
30103       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30104       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
30105       if test -s $tmp/subs.next; then
30106         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
30107         if test ! -s $tmp/subs.edit; then
30108           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
30109           if test ! -s $tmp/subs.edit; then
30110             if test "$ac_beg" -gt 1; then
30111               ac_end=`expr "$ac_end" - 1`
30112               continue
30113             fi
30114           fi
30115         fi
30116       fi
30117
30118       if test -z "$ac_sed_cmds"; then
30119         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
30120       else
30121         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
30122       fi
30123       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30124       ac_beg=$ac_end
30125       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30126     fi
30127   done
30128   if test -z "$ac_sed_cmds"; then
30129     ac_sed_cmds=cat
30130   fi
30131 fi # test -n "$CONFIG_FILES"
30132
30133 EOF
30134 cat >>"$CONFIG_STATUS" <<\EOF
30135 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30136   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30137   case "$ac_file" in
30138   - | *:- | *:-:* ) # input from stdin
30139         cat >$tmp/stdin
30140         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30141         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30142   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30143         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30144   * )   ac_file_in=$ac_file.in ;;
30145   esac
30146
30147   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30148   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30149          X"$ac_file" : 'X\(//\)[^/]' \| \
30150          X"$ac_file" : 'X\(//\)$' \| \
30151          X"$ac_file" : 'X\(/\)' \| \
30152          .     : '\(.\)' 2>/dev/null ||
30153 echo X"$ac_file" |
30154     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30155           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30156           /^X\(\/\/\)$/{ s//\1/; q; }
30157           /^X\(\/\).*/{ s//\1/; q; }
30158           s/.*/./; q'`
30159   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30160     { case "$ac_dir" in
30161   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30162   *)                      as_incr_dir=.;;
30163 esac
30164 as_dummy="$ac_dir"
30165 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30166   case $as_mkdir_dir in
30167     # Skip DOS drivespec
30168     ?:) as_incr_dir=$as_mkdir_dir ;;
30169     *)
30170       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30171       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30172     ;;
30173   esac
30174 done; }
30175
30176     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
30177     # A "../" for each directory in $ac_dir_suffix.
30178     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30179   else
30180     ac_dir_suffix= ac_dots=
30181   fi
30182
30183   case "$srcdir" in
30184   .)  ac_srcdir=.
30185       if test -z "$ac_dots"; then
30186          ac_top_srcdir=.
30187       else
30188          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30189       fi ;;
30190   [\\/]* | ?:[\\/]* )
30191       ac_srcdir="$srcdir$ac_dir_suffix";
30192       ac_top_srcdir="$srcdir" ;;
30193   *) # Relative path.
30194     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30195     ac_top_srcdir="$ac_dots$srcdir" ;;
30196   esac
30197
30198   case $INSTALL in
30199   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30200   *) ac_INSTALL=$ac_dots$INSTALL ;;
30201   esac
30202
30203   if test x"$ac_file" != x-; then
30204     { echo "$as_me:30204: creating $ac_file" >&5
30205 echo "$as_me: creating $ac_file" >&6;}
30206     rm -f "$ac_file"
30207   fi
30208   # Let's still pretend it is `configure' which instantiates (i.e., don't
30209   # use $as_me), people would be surprised to read:
30210   #    /* config.h.  Generated automatically by config.status.  */
30211   configure_input="Generated automatically from `echo $ac_file_in |
30212                                                  sed 's,.*/,,'` by configure."
30213
30214   # First look for the input files in the build tree, otherwise in the
30215   # src tree.
30216   ac_file_inputs=`IFS=:
30217     for f in $ac_file_in; do
30218       case $f in
30219       -) echo $tmp/stdin ;;
30220       [\\/$]*)
30221          # Absolute (can't be DOS-style, as IFS=:)
30222          test -f "$f" || { { echo "$as_me:30222: error: cannot find input file: $f" >&5
30223 echo "$as_me: error: cannot find input file: $f" >&2;}
30224    { (exit 1); exit 1; }; }
30225          echo $f;;
30226       *) # Relative
30227          if test -f "$f"; then
30228            # Build tree
30229            echo $f
30230          elif test -f "$srcdir/$f"; then
30231            # Source tree
30232            echo "$srcdir/$f"
30233          else
30234            # /dev/null tree
30235            { { echo "$as_me:30235: error: cannot find input file: $f" >&5
30236 echo "$as_me: error: cannot find input file: $f" >&2;}
30237    { (exit 1); exit 1; }; }
30238          fi;;
30239       esac
30240     done` || { (exit 1); exit 1; }
30241 EOF
30242 cat >>"$CONFIG_STATUS" <<\EOF
30243   ac_warn_datarootdir=no
30244   if test x"$ac_file" != x-; then
30245     for ac_item in $ac_file_inputs
30246     do
30247       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30248       if test -n "$ac_seen"; then
30249         ac_used=`grep '@datarootdir@' "$ac_item"`
30250         if test -z "$ac_used"; then
30251           { echo "$as_me:30251: WARNING: datarootdir was used implicitly but not set:
30252 $ac_seen" >&5
30253 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30254 $ac_seen" >&2;}
30255           ac_warn_datarootdir=yes
30256         fi
30257       fi
30258       ac_seen=`grep '${datarootdir}' "$ac_item"`
30259       if test -n "$ac_seen"; then
30260         { echo "$as_me:30260: WARNING: datarootdir was used explicitly but not set:
30261 $ac_seen" >&5
30262 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30263 $ac_seen" >&2;}
30264         ac_warn_datarootdir=yes
30265       fi
30266     done
30267   fi
30268
30269 if test "x$ac_warn_datarootdir" = xyes; then
30270   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30271 fi
30272
30273 EOF
30274 cat >>"$CONFIG_STATUS" <<EOF
30275   sed "$ac_vpsub
30276 $extrasub
30277 EOF
30278 cat >>"$CONFIG_STATUS" <<\EOF
30279 :t
30280 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30281 s,@configure_input@,$configure_input,;t t
30282 s,@srcdir@,$ac_srcdir,;t t
30283 s,@top_srcdir@,$ac_top_srcdir,;t t
30284 s,@INSTALL@,$ac_INSTALL,;t t
30285 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30286   rm -f $tmp/stdin
30287   if test x"$ac_file" != x-; then
30288     cp "$tmp/out" "$ac_file"
30289
30290     for ac_name in prefix exec_prefix datarootdir
30291     do
30292         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30293         if test -n "$ac_seen"; then
30294             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30295             if test -z "$ac_init"; then
30296               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30297               { echo "$as_me:30297: WARNING: Variable $ac_name is used but was not set:
30298 $ac_seen" >&5
30299 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30300 $ac_seen" >&2;}
30301             fi
30302         fi
30303     done
30304     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30305     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30306     if test -s $tmp/out; then
30307       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30308       { echo "$as_me:30308: WARNING: Some variables may not be substituted:
30309 $ac_seen" >&5
30310 echo "$as_me: WARNING: Some variables may not be substituted:
30311 $ac_seen" >&2;}
30312     fi
30313   else
30314     cat $tmp/out
30315   fi
30316   rm -f $tmp/out
30317
30318 done
30319 EOF
30320 cat >>"$CONFIG_STATUS" <<\EOF
30321
30322 #
30323 # CONFIG_HEADER section.
30324 #
30325
30326 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30327 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30328 #
30329 # ac_d sets the value in "#define NAME VALUE" lines.
30330 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30331 ac_dB='[        ].*$,\1#\2'
30332 ac_dC=' '
30333 ac_dD=',;t'
30334 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30335 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30336 ac_iB='\([      ]\),\1#\2define\3'
30337 ac_iC=' '
30338 ac_iD='\4,;t'
30339 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30340 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30341 ac_uB='$,\1#\2define\3'
30342 ac_uC=' '
30343 ac_uD=',;t'
30344
30345 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30346   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30347   case "$ac_file" in
30348   - | *:- | *:-:* ) # input from stdin
30349         cat >$tmp/stdin
30350         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30351         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30352   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30353         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30354   * )   ac_file_in=$ac_file.in ;;
30355   esac
30356
30357   test x"$ac_file" != x- && { echo "$as_me:30357: creating $ac_file" >&5
30358 echo "$as_me: creating $ac_file" >&6;}
30359
30360   # First look for the input files in the build tree, otherwise in the
30361   # src tree.
30362   ac_file_inputs=`IFS=:
30363     for f in $ac_file_in; do
30364       case $f in
30365       -) echo $tmp/stdin ;;
30366       [\\/$]*)
30367          # Absolute (can't be DOS-style, as IFS=:)
30368          test -f "$f" || { { echo "$as_me:30368: error: cannot find input file: $f" >&5
30369 echo "$as_me: error: cannot find input file: $f" >&2;}
30370    { (exit 1); exit 1; }; }
30371          echo $f;;
30372       *) # Relative
30373          if test -f "$f"; then
30374            # Build tree
30375            echo $f
30376          elif test -f "$srcdir/$f"; then
30377            # Source tree
30378            echo "$srcdir/$f"
30379          else
30380            # /dev/null tree
30381            { { echo "$as_me:30381: error: cannot find input file: $f" >&5
30382 echo "$as_me: error: cannot find input file: $f" >&2;}
30383    { (exit 1); exit 1; }; }
30384          fi;;
30385       esac
30386     done` || { (exit 1); exit 1; }
30387   # Remove the trailing spaces.
30388   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30389
30390 EOF
30391
30392 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30393 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30394 # be either 'cat' or 'sort'.
30395 cat confdefs.h | uniq >conftest.vals
30396
30397 # Break up conftest.vals because some shells have a limit on
30398 # the size of here documents, and old seds have small limits too.
30399
30400 rm -f conftest.tail
30401 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30402 while grep . conftest.vals >/dev/null
30403 do
30404   # Write chunks of a limited-size here document to conftest.frag.
30405   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30406   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30407   echo 'CEOF' >> "$CONFIG_STATUS"
30408   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30409   rm -f conftest.vals
30410   mv conftest.tail conftest.vals
30411 done
30412 rm -f conftest.vals
30413
30414 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30415 # marker @DEFS@.
30416 echo '  cat >> conftest.edit <<CEOF
30417 /@DEFS@/r conftest.frag
30418 /@DEFS@/d
30419 CEOF
30420 sed -f conftest.edit $tmp/in > $tmp/out
30421 rm -f $tmp/in
30422 mv $tmp/out $tmp/in
30423 rm -f conftest.edit conftest.frag
30424 ' >> "$CONFIG_STATUS"
30425
30426 cat >>"$CONFIG_STATUS" <<\EOF
30427   # Let's still pretend it is `configure' which instantiates (i.e., don't
30428   # use $as_me), people would be surprised to read:
30429   #    /* config.h.  Generated automatically by config.status.  */
30430   if test x"$ac_file" = x-; then
30431     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30432   else
30433     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30434   fi
30435   cat $tmp/in >>$tmp/config.h
30436   rm -f $tmp/in
30437   if test x"$ac_file" != x-; then
30438     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30439       { echo "$as_me:30439: $ac_file is unchanged" >&5
30440 echo "$as_me: $ac_file is unchanged" >&6;}
30441     else
30442       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30443          X"$ac_file" : 'X\(//\)[^/]' \| \
30444          X"$ac_file" : 'X\(//\)$' \| \
30445          X"$ac_file" : 'X\(/\)' \| \
30446          .     : '\(.\)' 2>/dev/null ||
30447 echo X"$ac_file" |
30448     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30449           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30450           /^X\(\/\/\)$/{ s//\1/; q; }
30451           /^X\(\/\).*/{ s//\1/; q; }
30452           s/.*/./; q'`
30453       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30454         { case "$ac_dir" in
30455   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30456   *)                      as_incr_dir=.;;
30457 esac
30458 as_dummy="$ac_dir"
30459 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30460   case $as_mkdir_dir in
30461     # Skip DOS drivespec
30462     ?:) as_incr_dir=$as_mkdir_dir ;;
30463     *)
30464       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30465       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30466     ;;
30467   esac
30468 done; }
30469
30470       fi
30471       rm -f "$ac_file"
30472       mv "$tmp/config.h" "$ac_file"
30473     fi
30474   else
30475     cat $tmp/config.h
30476     rm -f $tmp/config.h
30477   fi
30478 done
30479 EOF
30480 cat >>"$CONFIG_STATUS" <<\EOF
30481 #
30482 # CONFIG_COMMANDS section.
30483 #
30484 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30485   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30486   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30487
30488   case "$ac_dest" in
30489     default )
30490 if test "x$cf_with_tests" != xno ; then
30491
30492 for cf_dir in test
30493 do
30494         if test ! -d "$srcdir/$cf_dir" ; then
30495                 continue
30496         elif test -f "$srcdir/$cf_dir/programs" ; then
30497                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30498         fi
30499 done
30500
30501 fi
30502
30503 cf_prefix=$LIB_PREFIX
30504
30505 case "$cf_cv_shlib_version" in
30506 (cygdll|msysdll|mingw|msvcdll)
30507         TINFO_NAME=$TINFO_ARG_SUFFIX
30508         TINFO_SUFFIX=.dll
30509         ;;
30510 esac
30511
30512 if test -n "$TINFO_SUFFIX" ; then
30513         case "$TINFO_SUFFIX" in
30514         (tw*)
30515                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30516                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30517                 ;;
30518         (t*)
30519                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30520                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30521                 ;;
30522         (w*)
30523                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30524                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30525                 ;;
30526         esac
30527 fi
30528
30529 for cf_dir in $SRC_SUBDIRS
30530 do
30531         if test ! -d "$srcdir/$cf_dir" ; then
30532                 continue
30533         elif test -f "$srcdir/$cf_dir/modules" ; then
30534
30535                 SHARED_LIB=
30536                 Libs_To_Make=
30537                 cf_awk_program=
30538                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30539                 then
30540                         cf_awk_program="$cf_awk_program\
30541 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30542 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30543 "
30544                 fi
30545
30546                 if test "x$WILDCARD_SYMS" = xno
30547                 then
30548                         cf_awk_program="$cf_awk_program\
30549 /[      ]_\\*;/ { skip=1; next; }\
30550 "
30551                 fi
30552
30553                 if test "x$cf_awk_program" != "x"
30554                 then
30555                         cat >>$cf_dir/Makefile <<CF_EOF
30556
30557 # Generated by CF_LIB_RULES
30558 resulting.map: $UNALTERED_SYMS
30559         $AWK 'BEGIN { skip = 1; last=""; } \
30560 $cf_awk_program \
30561 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30562  skip = 0; last = \$\$0; } \
30563 END { print last; }' < "$UNALTERED_SYMS" >\$@
30564
30565 distclean::
30566         rm -f resulting.map
30567 CF_EOF
30568                 fi
30569
30570                 for cf_item in $cf_LIST_MODELS
30571                 do
30572
30573         case X$cf_item in
30574         (Xlibtool)
30575                 cf_suffix='.la'
30576                 cf_depsuf=$cf_suffix
30577                 ;;
30578         (Xdebug)
30579                 case "$cf_cv_system_name" in
30580                 (*-msvc*)
30581                         cf_suffix='_g.lib'
30582                         ;;
30583                 (*)
30584                         cf_suffix='_g.a'
30585                         ;;
30586                 esac
30587                 cf_depsuf=$cf_suffix
30588                 ;;
30589         (Xprofile)
30590                 case "$cf_cv_system_name" in
30591                 (*-msvc*)
30592                         cf_suffix='_p.lib'
30593                         ;;
30594                 (*)
30595                         cf_suffix='_p.a'
30596                         ;;
30597                 esac
30598                 cf_depsuf=$cf_suffix
30599                 ;;
30600         (Xshared)
30601                 case "$cf_cv_system_name" in
30602                 (aix[5-7]*)
30603                         cf_suffix='.so'
30604                         cf_depsuf=$cf_suffix
30605                         ;;
30606                 (*-msvc*)
30607                         cf_suffix='.dll'
30608                         cf_depsuf='.dll.lib'
30609                         ;;
30610                 (cygwin*|msys*|mingw*)
30611                         cf_suffix='.dll'
30612                         cf_depsuf='.dll.a'
30613                         ;;
30614                 (darwin*)
30615                         cf_suffix='.dylib'
30616                         cf_depsuf=$cf_suffix
30617                         ;;
30618                 (hpux*)
30619                         case "$target" in
30620                         (ia64*)
30621                                 cf_suffix='.so'
30622                                 cf_depsuf=$cf_suffix
30623                                 ;;
30624                         (*)
30625                                 cf_suffix='.sl'
30626                                 cf_depsuf=$cf_suffix
30627                                 ;;
30628                         esac
30629                         ;;
30630                 (*)
30631                         cf_suffix='.so'
30632                         cf_depsuf=$cf_suffix
30633                         ;;
30634                 esac
30635                 ;;
30636         (*)
30637                 case "$target" in
30638                 (*-msvc*)
30639                         cf_suffix='.lib'
30640                         ;;
30641                 (*)
30642                         cf_suffix='.a'
30643                         ;;
30644                 esac
30645                 cf_depsuf=$cf_suffix
30646                 ;;
30647         esac
30648         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30649         then
30650                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30651                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30652         fi
30653
30654                         if test "$cf_dir" = "c++"
30655                         then
30656
30657 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30658
30659 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30660
30661                         else
30662
30663 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30664
30665 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30666
30667                         fi
30668                         test -z "$cf_libname" && cf_libname="$cf_dir"
30669                         if test "$cf_item" = shared ; then
30670                                 if test -n "${LIB_SUFFIX}"
30671                                 then
30672                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30673                                 else
30674                                         cf_shared_suffix="$cf_suffix"
30675                                 fi
30676                                 if test "$cf_cv_do_symlinks" = yes ; then
30677                                         cf_version_name=
30678
30679                                         case "$cf_cv_shlib_version" in
30680                                         (rel)
30681                                                 cf_version_name=REL_VERSION
30682                                                 ;;
30683                                         (abi)
30684                                                 cf_version_name=ABI_VERSION
30685                                                 ;;
30686                                         esac
30687
30688                                         if test -n "$cf_version_name"
30689                                         then
30690                                                 case "$cf_cv_system_name" in
30691                                                 (darwin*)
30692                                                         # "w", etc?
30693                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30694                                                         ;;
30695                                                 (*)
30696                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30697                                                         ;;
30698                                                 esac
30699                                         fi
30700                                         if test -n "${USE_LIB_SUFFIX}"
30701                                         then
30702                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30703                                         else
30704                                                 cf_shared_suffix="$cf_suffix"
30705                                         fi
30706                                 fi
30707                                 # cygwin needs import library, and has unique naming convention
30708                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30709                                 # use 'cyg' prefix for shared lib.
30710                                 case "$cf_cv_shlib_version" in
30711                                 (cygdll)
30712                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30713                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30714                                         ;;
30715                                 (msysdll)
30716                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30717                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30718                                         ;;
30719                                 (mingw)
30720                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30721                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30722                                         ;;
30723                                 (msvcdll)
30724                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30725                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30726                                         ;;
30727                                 (*)
30728                                         cf_add_lib=
30729                                         ;;
30730                                 esac
30731                                 if test -n "$cf_add_lib"
30732                                 then
30733                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30734                                         continue
30735                                 fi
30736                         fi
30737                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30738                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30739                 done
30740
30741                 if test "$cf_dir" = ncurses ; then
30742                         cf_subsets="$LIB_SUBSETS"
30743                         cf_r_parts="$cf_subsets"
30744                         cf_liblist="$Libs_To_Make"
30745
30746                         while test -n "$cf_r_parts"
30747                         do
30748                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30749                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30750                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30751                                         cf_add_lib=
30752                                         case "$cf_l_parts" in
30753                                         (*termlib*)
30754                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30755                                                 ;;
30756                                         (*ticlib*)
30757                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30758                                                 ;;
30759                                         (*)
30760                                                 break
30761                                                 ;;
30762                                         esac
30763                                         if test -n "$cf_add_lib"; then
30764                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30765                                         fi
30766                                 else
30767                                         break
30768                                 fi
30769                         done
30770                 else
30771                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30772                 fi
30773
30774                 if test "$cf_dir" = c++; then
30775                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30776                                 cf_list=
30777                                 for cf_item in $Libs_To_Make
30778                                 do
30779                                         case "$cf_item" in
30780                                         (*.a)
30781                                                 ;;
30782                                         (*)
30783                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30784                                                 ;;
30785                                         esac
30786                                         for cf_test in $cf_list
30787                                         do
30788                                                 if test "$cf_test" = "$cf_item"
30789                                                 then
30790                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30791                                                         cf_item=
30792                                                         break
30793                                                 fi
30794                                         done
30795                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30796                                 done
30797                                 Libs_To_Make="$cf_list"
30798                         fi
30799                 fi
30800
30801                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30802                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30803                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30804                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30805
30806                 $AWK -f "$srcdir/mk-0th.awk" \
30807                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30808                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30809
30810                 for cf_subset in $cf_subsets
30811                 do
30812                         cf_subdirs=
30813                         for cf_item in $cf_LIST_MODELS
30814                         do
30815
30816                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30817
30818 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30819
30820                         CXX_MODEL=$cf_ITEM
30821                         if test "$CXX_MODEL" = SHARED; then
30822                                 case "$cf_cv_shlib_version" in
30823                                 (cygdll|msysdll|mingw|msvcdll)
30824                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30825
30826 echo "${as_me:-configure}:30826: testing overriding CXX_MODEL to SHARED ..." 1>&5
30827
30828                                         with_shared_cxx=yes
30829                                         ;;
30830                                 (*)
30831                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30832                                         ;;
30833                                 esac
30834                         fi
30835
30836         case X$cf_item in
30837         (Xlibtool)
30838                 cf_suffix='.la'
30839                 cf_depsuf=$cf_suffix
30840                 ;;
30841         (Xdebug)
30842                 case "$cf_cv_system_name" in
30843                 (*-msvc*)
30844                         cf_suffix='_g.lib'
30845                         ;;
30846                 (*)
30847                         cf_suffix='_g.a'
30848                         ;;
30849                 esac
30850                 cf_depsuf=$cf_suffix
30851                 ;;
30852         (Xprofile)
30853                 case "$cf_cv_system_name" in
30854                 (*-msvc*)
30855                         cf_suffix='_p.lib'
30856                         ;;
30857                 (*)
30858                         cf_suffix='_p.a'
30859                         ;;
30860                 esac
30861                 cf_depsuf=$cf_suffix
30862                 ;;
30863         (Xshared)
30864                 case "$cf_cv_system_name" in
30865                 (aix[5-7]*)
30866                         cf_suffix='.so'
30867                         cf_depsuf=$cf_suffix
30868                         ;;
30869                 (*-msvc*)
30870                         cf_suffix='.dll'
30871                         cf_depsuf='.dll.lib'
30872                         ;;
30873                 (cygwin*|msys*|mingw*)
30874                         cf_suffix='.dll'
30875                         cf_depsuf='.dll.a'
30876                         ;;
30877                 (darwin*)
30878                         cf_suffix='.dylib'
30879                         cf_depsuf=$cf_suffix
30880                         ;;
30881                 (hpux*)
30882                         case "$target" in
30883                         (ia64*)
30884                                 cf_suffix='.so'
30885                                 cf_depsuf=$cf_suffix
30886                                 ;;
30887                         (*)
30888                                 cf_suffix='.sl'
30889                                 cf_depsuf=$cf_suffix
30890                                 ;;
30891                         esac
30892                         ;;
30893                 (*)
30894                         cf_suffix='.so'
30895                         cf_depsuf=$cf_suffix
30896                         ;;
30897                 esac
30898                 ;;
30899         (*)
30900                 case "$target" in
30901                 (*-msvc*)
30902                         cf_suffix='.lib'
30903                         ;;
30904                 (*)
30905                         cf_suffix='.a'
30906                         ;;
30907                 esac
30908                 cf_depsuf=$cf_suffix
30909                 ;;
30910         esac
30911         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30912         then
30913                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30914                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30915         fi
30916
30917         case $cf_item in
30918         (libtool) cf_subdir='obj_lo'  ;;
30919         (normal)  cf_subdir='objects' ;;
30920         (debug)   cf_subdir='obj_g' ;;
30921         (profile) cf_subdir='obj_p' ;;
30922         (shared)
30923                 case "$cf_cv_system_name" in
30924                 (cygwin|msys)
30925                         cf_subdir='objects' ;;
30926                 (*)
30927                         cf_subdir='obj_s' ;;
30928                 esac
30929         esac
30930
30931                         # Test for case where we build libtinfo with a different name.
30932                         cf_libname=$cf_dir
30933                         if test "$cf_dir" = ncurses ; then
30934                                 case "$cf_subset" in
30935                                 (*base*)
30936                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30937                                         ;;
30938                                 (*termlib*)
30939                                         cf_libname=$TINFO_LIB_SUFFIX
30940                                         ;;
30941                                 (ticlib*)
30942                                         cf_libname=$TICS_LIB_SUFFIX
30943                                         ;;
30944                                 esac
30945                         elif test "$cf_dir" = c++ ; then
30946
30947 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30948
30949 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30950
30951                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30952                         else
30953
30954 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30955
30956 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30957
30958                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30959                         fi
30960                         if test -n "${USE_ARG_SUFFIX}" ; then
30961                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30962                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30963                         fi
30964
30965                         # These dependencies really are for development, not
30966                         # builds, but they are useful in porting, too.
30967                         cf_depend="../include/ncurses_cfg.h"
30968                         if test "$srcdir" = "."; then
30969                                 cf_reldir="."
30970                         else
30971                                 cf_reldir="\${srcdir}"
30972                         fi
30973
30974                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30975                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30976                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30977                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30978                         fi
30979
30980                         cf_dir_suffix=
30981                         old_cf_suffix="$cf_suffix"
30982                         if test "$cf_cv_shlib_version_infix" = yes ; then
30983                         if test -n "$USE_LIB_SUFFIX" ; then
30984                                 case "$USE_LIB_SUFFIX" in
30985                                 (tw*)
30986                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30987                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30988                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30989                                         ;;
30990                                 (t*)
30991                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30992                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30993                                         cf_dir_suffix=t$EXTRA_SUFFIX
30994                                         ;;
30995                                 (w*)
30996                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30997                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30998                                         cf_dir_suffix=w$EXTRA_SUFFIX
30999                                         ;;
31000                                 (*)
31001                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31002                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31003                                         cf_dir_suffix=$EXTRA_SUFFIX
31004                                         ;;
31005                                 esac
31006                         fi
31007                         fi
31008
31009                         $AWK -f "$srcdir/mk-1st.awk" \
31010                                 name=${cf_libname}${cf_dir_suffix} \
31011                                 traces=$LIB_TRACING \
31012                                 MODEL=$cf_ITEM \
31013                                 CXX_MODEL=$CXX_MODEL \
31014                                 LIB_SUFFIX=$LIB_SUFFIX \
31015                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31016                                 make_phony="${cf_cv_make_PHONY:-no}" \
31017                                 model=$cf_subdir \
31018                                 prefix=$cf_prefix \
31019                                 suffix=$cf_suffix \
31020                                 subset=$cf_subset \
31021                                 driver=$cf_cv_term_driver \
31022                                 SymLink="$LN_S" \
31023                                 TermlibRoot=$TINFO_NAME \
31024                                 TermlibSuffix=$TINFO_SUFFIX \
31025                                 ShlibVer=$cf_cv_shlib_version \
31026                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31027                                 ReLink=${cf_cv_do_relink:-no} \
31028                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31029                                 DoLinks=$cf_cv_do_symlinks \
31030                                 rmSoLocs=$cf_cv_rm_so_locs \
31031                                 ldconfig="$LDCONFIG" \
31032                                 overwrite=$WITH_OVERWRITE \
31033                                 depend="$cf_depend" \
31034                                 host="$host" \
31035                                 libtool_version="$LIBTOOL_VERSION" \
31036                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31037
31038                         cf_suffix="$old_cf_suffix"
31039
31040                         for cf_subdir2 in $cf_subdirs lib
31041                         do
31042                                 test "$cf_subdir" = "$cf_subdir2" && break
31043                         done
31044                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31045                         $AWK -f "$srcdir/mk-2nd.awk" \
31046                                 name=$cf_dir \
31047                                 traces=$LIB_TRACING \
31048                                 MODEL=$cf_ITEM \
31049                                 model=$cf_subdir \
31050                                 subset=$cf_subset \
31051                                 srcdir=$srcdir \
31052                                 echo=$WITH_ECHO \
31053                                 crenames=$cf_cv_prog_CC_c_o \
31054                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31055                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31056                         cf_subdirs="$cf_subdirs $cf_subdir"
31057                         done
31058                 done
31059         fi
31060
31061         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31062 done
31063
31064 echo >> Makefile
31065 echo '# generated by CF_LIB_RULES' >> Makefile
31066
31067 if test "x$cf_cv_make_PHONY" = xyes ; then
31068         cat >> Makefile <<-CF_EOF
31069
31070         .PHONY :        libs
31071         .PHONY :        lintlib
31072         .PHONY :        install.includes
31073         .PHONY :        uninstall.includes
31074         .PHONY :        install.libs
31075         .PHONY :        uninstall.libs
31076 CF_EOF
31077 fi
31078
31079 for cf_dir in $SRC_SUBDIRS
31080 do
31081         if test ! -d "$srcdir/$cf_dir" ; then
31082                 continue
31083         fi
31084
31085         if test -f "$cf_dir/Makefile" ; then
31086                 case "$cf_dir" in
31087                 (Ada95)
31088                         echo 'libs \' >> Makefile
31089                         echo 'install.libs \' >> Makefile
31090                         echo 'uninstall.libs ::' >> Makefile
31091                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31092                         ;;
31093                 esac
31094         fi
31095
31096         if test -f "$srcdir/$cf_dir/modules" ; then
31097
31098                 if test "x$cf_cv_make_PHONY" = xyes ; then
31099                         cat >> Makefile <<-CF_EOF
31100
31101                         .PHONY :        install.$cf_dir
31102                         .PHONY :        uninstall.$cf_dir
31103 CF_EOF
31104                 fi
31105
31106                 echo >> Makefile
31107                 if test -f "$srcdir/$cf_dir/headers" ; then
31108 cat >> Makefile <<CF_EOF
31109 install.includes \\
31110 uninstall.includes \\
31111 CF_EOF
31112                 fi
31113
31114 cat >> Makefile <<CF_EOF
31115 lint \\
31116 libs \\
31117 lintlib \\
31118 install.libs \\
31119 uninstall.libs \\
31120 install.$cf_dir \\
31121 uninstall.$cf_dir ::
31122         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31123 CF_EOF
31124         elif test -f "$srcdir/$cf_dir/headers" ; then
31125 cat >> Makefile <<CF_EOF
31126
31127 libs \\
31128 install.libs \\
31129 uninstall.libs \\
31130 install.includes \\
31131 uninstall.includes ::
31132         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31133 CF_EOF
31134 fi
31135 done
31136
31137 if test "x$cf_cv_make_PHONY" = xyes ; then
31138         cat >> Makefile <<-CF_EOF
31139
31140         .PHONY :        install.data
31141         .PHONY :        uninstall.data
31142 CF_EOF
31143 fi
31144
31145 if test "x$cf_with_db_install" = xyes; then
31146 cat >> Makefile <<CF_EOF
31147
31148 install.libs uninstall.libs \\
31149 install.data uninstall.data ::
31150 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31151 CF_EOF
31152 else
31153 cat >> Makefile <<CF_EOF
31154
31155 install.libs uninstall.libs ::
31156         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31157 CF_EOF
31158 fi
31159
31160 if test "x$cf_with_manpages" = xyes; then
31161
31162 if test "x$cf_cv_make_PHONY" = xyes ; then
31163         cat >> Makefile <<-CF_EOF
31164
31165         .PHONY :        install.man
31166         .PHONY :        uninstall.man
31167 CF_EOF
31168 fi
31169
31170 cat >> Makefile <<CF_EOF
31171
31172 install.man \\
31173 uninstall.man ::
31174         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31175 CF_EOF
31176 fi
31177
31178 cat >> Makefile <<CF_EOF
31179
31180 distclean ::
31181         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31182         rm -f headers.sh headers.sed mk_shared_lib.sh
31183         rm -f edit_man.* man_alias.*
31184         rm -rf \${DIRS_TO_MAKE}
31185 CF_EOF
31186
31187 # Special case: tack's manpage lives in its own directory.
31188 if test "x$cf_with_manpages" = xyes; then
31189 if test "x$cf_with_tack" = "xyes"; then
31190 cat >> Makefile <<CF_EOF
31191
31192 install.man \\
31193 uninstall.man ::
31194         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31195 CF_EOF
31196 fi
31197 fi
31198
31199 rm -f headers.sed headers.sh
31200
31201 echo creating headers.sh
31202 cat >headers.sh <<CF_EOF
31203 #! $SHELL
31204 # This shell script is generated by the 'configure' script.  It is invoked in a
31205 # subdirectory of the build tree.  It generates a sed-script in the parent
31206 # directory that is used to adjust includes for header files that reside in a
31207 # subdirectory of /usr/include, etc.
31208 PRG=""
31209 while test \$# != 3
31210 do
31211 PRG="\$PRG \$1"; shift
31212 done
31213 DST=\$1
31214 REF=\$2
31215 SRC=\$3
31216 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31217 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31218 echo installing \$SRC in \$DST
31219 CF_EOF
31220
31221 if test "$WITH_CURSES_H" = yes; then
31222         cat >>headers.sh <<CF_EOF
31223 case \$DST in
31224 (/*/include/*)
31225         END=\`basename \$DST\`
31226         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31227         do
31228                 NAME=\`basename \$i\`
31229                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31230         done
31231         ;;
31232 (*)
31233         echo "" >> \$TMPSED
31234         ;;
31235 esac
31236 CF_EOF
31237
31238 else
31239         cat >>headers.sh <<CF_EOF
31240 case \$DST in
31241 (/*/include/*)
31242         END=\`basename \$DST\`
31243         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31244         do
31245                 NAME=\`basename \$i\`
31246                 if test "\$NAME" = "curses.h"
31247                 then
31248                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31249                         NAME=ncurses.h
31250                 fi
31251                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31252         done
31253         ;;
31254 (*)
31255         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31256         ;;
31257 esac
31258 CF_EOF
31259 fi
31260 cat >>headers.sh <<CF_EOF
31261 rm -f \$TMPSRC
31262 sed -f \$TMPSED \$SRC > \$TMPSRC
31263 NAME=\`basename \$SRC\`
31264 CF_EOF
31265 if test "$WITH_CURSES_H" != yes; then
31266         cat >>headers.sh <<CF_EOF
31267 test "\$NAME" = "curses.h" && NAME=ncurses.h
31268 CF_EOF
31269 fi
31270 cat >>headers.sh <<CF_EOF
31271 # Just in case someone gzip'd manpages, remove the conflicting copy.
31272 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31273
31274 eval \$PRG \$TMPSRC \$DST/\$NAME
31275 rm -f \$TMPSRC \$TMPSED
31276 CF_EOF
31277
31278 chmod 0755 headers.sh
31279
31280 for cf_dir in $SRC_SUBDIRS
31281 do
31282         if test ! -d "$srcdir/$cf_dir" ; then
31283                 continue
31284         fi
31285
31286         if test -f "$srcdir/$cf_dir/headers" ; then
31287                 $AWK -f "$srcdir/mk-hdr.awk" \
31288                         subset="$LIB_SUBSETS" \
31289                         compat="$WITH_CURSES_H" \
31290                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31291         fi
31292
31293         if test -f "$srcdir/$cf_dir/modules" ; then
31294                 if test "$cf_dir" != "c++" ; then
31295                         if test "x$cf_cv_make_PHONY" = xyes ; then
31296                                 cat >> $cf_dir/Makefile <<-CF_EOF
31297
31298                                 .PHONY :        depend
31299 CF_EOF
31300                         fi
31301
31302                         cat >>$cf_dir/Makefile <<"CF_EOF"
31303 depend : ${AUTO_SRC}
31304         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31305
31306 # DO NOT DELETE THIS LINE -- make depend depends on it.
31307 CF_EOF
31308                 fi
31309         fi
31310 done
31311
31312 if test "$MANPAGE_RENAMES" != no ; then
31313         # Construct a sed-script to perform renaming within man-pages
31314         test -n "$verbose" && echo "creating edit_man.sed"
31315         test ! -d man && mkdir man
31316         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31317 fi
31318
31319 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31320 if test -z "$USE_OLD_MAKERULES" ; then
31321         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31322 fi
31323 fi
31324  ;;
31325   esac
31326 done
31327 EOF
31328
31329 cat >>"$CONFIG_STATUS" <<\EOF
31330
31331 { (exit 0); exit 0; }
31332 EOF
31333 chmod +x "$CONFIG_STATUS"
31334 ac_clean_files=$ac_clean_files_save
31335
31336 # configure is writing to config.log, and then calls config.status.
31337 # config.status does its own redirection, appending to config.log.
31338 # Unfortunately, on DOS this fails, as config.log is still kept open
31339 # by configure, so config.status won't be able to write to it; its
31340 # output is simply discarded.  So we exec the FD to /dev/null,
31341 # effectively closing config.log, so it can be properly (re)opened and
31342 # appended to by config.status.  When coming back to configure, we
31343 # need to make the FD available again.
31344 if test "$no_create" != yes; then
31345   ac_cs_success=:
31346   exec 5>/dev/null
31347   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31348   exec 5>>config.log
31349   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31350   # would make configure fail if this is the last instruction.
31351   "$ac_cs_success" || { (exit 1); exit 1; }
31352 fi
31353 ${MAKE:-make} preinstall