]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20221001
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.749 .
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*gnueabi|linux*gnueabihf|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=`cd "$srcdir" && pwd`/man/man_db.renames
14757         else
14758                 MANPAGE_RENAMES=no
14759         fi
14760         ;;
14761 esac
14762
14763 if test "$MANPAGE_RENAMES" != no ; then
14764         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14765                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14766         elif test ! -f "$MANPAGE_RENAMES" ; then
14767                 { { echo "$as_me:14767: error: not a filename: $MANPAGE_RENAMES" >&5
14768 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14769    { (exit 1); exit 1; }; }
14770         fi
14771
14772         test ! -d man && mkdir man
14773
14774         # Construct a sed-script to perform renaming within man-pages
14775         if test -n "$MANPAGE_RENAMES" ; then
14776                 test ! -d man && mkdir man
14777                 FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14778         fi
14779 fi
14780
14781 echo "$as_me:14781: result: $MANPAGE_RENAMES" >&5
14782 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14783
14784 echo "$as_me:14784: checking if manpage aliases will be installed" >&5
14785 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14786
14787 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14788 if test "${with_manpage_aliases+set}" = set; then
14789   withval="$with_manpage_aliases"
14790   MANPAGE_ALIASES=$withval
14791 else
14792   MANPAGE_ALIASES=yes
14793 fi;
14794
14795 echo "$as_me:14795: result: $MANPAGE_ALIASES" >&5
14796 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14797
14798 case "x$LN_S" in
14799 (xln*)
14800         cf_use_symlinks=yes
14801         ;;
14802 (*)
14803         cf_use_symlinks=no
14804         ;;
14805 esac
14806
14807 MANPAGE_SYMLINKS=no
14808 if test "$MANPAGE_ALIASES" = yes ; then
14809 echo "$as_me:14809: checking if manpage symlinks should be used" >&5
14810 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14811
14812 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14813 if test "${with_manpage_symlinks+set}" = set; then
14814   withval="$with_manpage_symlinks"
14815   MANPAGE_SYMLINKS=$withval
14816 else
14817   MANPAGE_SYMLINKS=$cf_use_symlinks
14818 fi;
14819
14820 if test "$$cf_use_symlinks" = no; then
14821 if test "$MANPAGE_SYMLINKS" = yes ; then
14822         { echo "$as_me:14822: WARNING: cannot make symlinks" >&5
14823 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14824         MANPAGE_SYMLINKS=no
14825 fi
14826 fi
14827
14828 echo "$as_me:14828: result: $MANPAGE_SYMLINKS" >&5
14829 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14830 fi
14831
14832 echo "$as_me:14832: checking for manpage tbl" >&5
14833 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14834
14835 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14836 if test "${with_manpage_tbl+set}" = set; then
14837   withval="$with_manpage_tbl"
14838   MANPAGE_TBL=$withval
14839 else
14840   MANPAGE_TBL=no
14841 fi;
14842
14843 echo "$as_me:14843: result: $MANPAGE_TBL" >&5
14844 echo "${ECHO_T}$MANPAGE_TBL" >&6
14845
14846 if test "$prefix" = "NONE" ; then
14847         cf_prefix="$ac_default_prefix"
14848 else
14849         cf_prefix="$prefix"
14850 fi
14851
14852 case "$MANPAGE_FORMAT" in
14853 (*catonly*)
14854         cf_format=yes
14855         cf_inboth=no
14856         ;;
14857 (*formatted*)
14858         cf_format=yes
14859         cf_inboth=yes
14860         ;;
14861 (*)
14862         cf_format=no
14863         cf_inboth=no
14864         ;;
14865 esac
14866
14867 test ! -d man && mkdir man
14868
14869 cf_so_strip=
14870 cf_compress=
14871 case "$MANPAGE_FORMAT" in
14872 (*compress*)
14873         cf_so_strip="Z"
14874         cf_compress=compress
14875         ;;
14876 (*gzip*)
14877         cf_so_strip="gz"
14878         cf_compress=gzip
14879         ;;
14880 esac
14881
14882 cf_edit_man=./edit_man.sh
14883 cf_man_alias=`pwd`/man_alias.sed
14884
14885 cat >$cf_edit_man <<CF_EOF
14886 #! $SHELL
14887 # this script is generated by the configure-script CF_MAN_PAGES macro.
14888
14889 prefix="$cf_prefix"
14890 datarootdir="$datarootdir"
14891 datadir="$datadir"
14892
14893 NCURSES_MAJOR="$NCURSES_MAJOR"
14894 NCURSES_MINOR="$NCURSES_MINOR"
14895 NCURSES_PATCH="$NCURSES_PATCH"
14896
14897 NCURSES_OSPEED="$NCURSES_OSPEED"
14898 TERMINFO="$TERMINFO"
14899
14900 INSTALL="$INSTALL"
14901 INSTALL_DATA="$INSTALL_DATA"
14902
14903 transform="$program_transform_name"
14904
14905 TMP=\${TMPDIR:=/tmp}/man\$\$
14906 trap "rm -f \$TMP; exit 1" 1 2 3 15
14907 trap "rm -f \$TMP" 0
14908
14909 form=\$1
14910 shift || exit 1
14911
14912 verb=\$1
14913 shift || exit 1
14914
14915 mandir=\$1
14916 shift || exit 1
14917
14918 srcdir=\$1
14919 top_srcdir=\$srcdir/..
14920 shift || exit 1
14921
14922 if test "\$form" = normal ; then
14923         if test "$cf_format" = yes ; then
14924         if test "$cf_inboth" = no ; then
14925                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14926                 exit $?
14927         fi
14928         fi
14929         cf_subdir=\$mandir/man
14930         cf_tables=$MANPAGE_TBL
14931 else
14932         cf_subdir=\$mandir/cat
14933         cf_tables=yes
14934 fi
14935
14936 # process the list of source-files
14937 for i in "\$@" ; do
14938 case \$i in
14939 (*.orig|*.rej) ;;
14940 (*.[0-9]*)
14941         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14942         if test "\$verb" = installing ; then
14943         if test ! -d "\$cf_subdir\${section}" ; then
14944                 mkdir -p "\$cf_subdir\$section"
14945         fi
14946         fi
14947
14948         # replace variables in man page
14949         if test ! -f "$cf_man_alias" ; then
14950 cat >>$cf_man_alias <<-CF_EOF2
14951                 s,@DATADIR@,\$datadir,g
14952                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14953                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14954                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14955                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14956                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14957                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14958 CF_EOF
14959
14960         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14961         do
14962                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14963                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14964 cat >>$cf_edit_man <<-CF_EOF
14965                 s,@$cf_NAME@,$cf_name,g
14966 CF_EOF
14967         done
14968
14969 cat >>$cf_edit_man <<CF_EOF
14970 CF_EOF2
14971                 echo "...made $cf_man_alias"
14972         fi
14973
14974         aliases=
14975         cf_source=\`basename "\$i"\`
14976         inalias=\$cf_source
14977         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14978         if test ! -f "\$inalias" ; then
14979                 echo ".. skipped \$cf_source"
14980                 continue
14981         fi
14982 CF_EOF
14983
14984 if test "$MANPAGE_ALIASES" != no ; then
14985 cat >>$cf_edit_man <<CF_EOF
14986         nCurses=ignore.3x
14987         test "$with_curses_h" = yes && nCurses=ncurses.3x
14988         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14989 CF_EOF
14990 fi
14991
14992 if test "$MANPAGE_RENAMES" = no ; then
14993 cat >>$cf_edit_man <<CF_EOF
14994         # perform program transformations for section 1 man pages
14995         if test \$section = 1 ; then
14996                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14997         else
14998                 cf_target=\$cf_subdir\${section}/\$cf_source
14999         fi
15000 CF_EOF
15001 else
15002 cat >>$cf_edit_man <<CF_EOF
15003         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15004         if test -z "\$cf_target" ; then
15005                 echo "? missing rename for \$cf_source"
15006                 cf_target="\$cf_source"
15007         fi
15008         cf_target="\$cf_subdir\${section}/\${cf_target}"
15009
15010 CF_EOF
15011 fi
15012
15013 cat >>$cf_edit_man <<CF_EOF
15014         sed     -f "$cf_man_alias" \\
15015 CF_EOF
15016
15017 if test -f "$MANPAGE_RENAMES" ; then
15018 cat >>$cf_edit_man <<CF_EOF
15019                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15020 CF_EOF
15021 else
15022 cat >>$cf_edit_man <<CF_EOF
15023                 < "\$i" >\$TMP
15024 CF_EOF
15025 fi
15026
15027 cat >>$cf_edit_man <<CF_EOF
15028 if test \$cf_tables = yes ; then
15029         tbl \$TMP >\$TMP.out
15030         mv \$TMP.out \$TMP
15031 fi
15032 CF_EOF
15033
15034 if test "$with_overwrite" != yes ; then
15035 cat >>$cf_edit_man <<CF_EOF
15036         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15037         mv \$TMP.out \$TMP
15038 CF_EOF
15039 fi
15040
15041 if test "$with_curses_h" != yes ; then
15042 cat >>$cf_edit_man <<CF_EOF
15043         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15044         mv \$TMP.out \$TMP
15045 CF_EOF
15046 fi
15047
15048 cat >>$cf_edit_man <<CF_EOF
15049         if test "\$form" = format ; then
15050                 nroff -man \$TMP >\$TMP.out
15051                 mv \$TMP.out \$TMP
15052         fi
15053 CF_EOF
15054
15055 if test -n "$cf_compress" ; then
15056 cat >>$cf_edit_man <<CF_EOF
15057         if test "\$verb" = installing ; then
15058         if ( "$cf_compress" -f \$TMP )
15059         then
15060                 mv \$TMP.$cf_so_strip \$TMP
15061         fi
15062         fi
15063         cf_target="\$cf_target.$cf_so_strip"
15064 CF_EOF
15065 fi
15066
15067 case "$MANPAGE_FORMAT" in
15068 (*BSDI*)
15069 cat >>$cf_edit_man <<CF_EOF
15070         if test "\$form" = format ; then
15071                 # BSDI installs only .0 suffixes in the cat directories
15072                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15073         fi
15074 CF_EOF
15075   ;;
15076 esac
15077
15078 cat >>$cf_edit_man <<CF_EOF
15079         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15080         if test "\$verb" = installing ; then
15081                 echo "\$verb \$cf_target"
15082                 \$INSTALL_DATA \$TMP "\$cf_target"
15083                 test -d "\$cf_subdir\${section}" &&
15084                 test -n "\$aliases" && (
15085                         cd "\$cf_subdir\${section}" && (
15086                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15087                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
15088                                 cf_target=\`basename "\$cf_target"\`
15089                                 for cf_alias in \$aliases
15090                                 do
15091                                         if test "\$section" = 1 ; then
15092                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15093                                         fi
15094
15095                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15096                                                 if test -f "\$cf_alias\${suffix}" ; then
15097                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15098                                                         then
15099                                                                 continue
15100                                                         fi
15101                                                 fi
15102                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15103 CF_EOF
15104 case "x$LN_S" in
15105 (*-f)
15106 cat >>$cf_edit_man <<CF_EOF
15107                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15108 CF_EOF
15109         ;;
15110 (*)
15111 cat >>$cf_edit_man <<CF_EOF
15112                                                 rm -f "\$cf_alias\${suffix}"
15113                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15114 CF_EOF
15115         ;;
15116 esac
15117 cat >>$cf_edit_man <<CF_EOF
15118                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15119                                                 echo ".so \$cf_source" >\$TMP
15120 CF_EOF
15121 if test -n "$cf_compress" ; then
15122 cat >>$cf_edit_man <<CF_EOF
15123                                                 if test -n "$cf_so_strip" ; then
15124                                                         "$cf_compress" -f \$TMP
15125                                                         mv \$TMP.$cf_so_strip \$TMP
15126                                                 fi
15127 CF_EOF
15128 fi
15129 cat >>$cf_edit_man <<CF_EOF
15130                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15131                                                 rm -f "\$cf_alias\${suffix}"
15132                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15133                                         fi
15134                                 done
15135                         )
15136                 )
15137         elif test "\$verb" = removing ; then
15138                 test -f "\$cf_target" && (
15139                         echo "\$verb \$cf_target"
15140                         rm -f "\$cf_target"
15141                 )
15142                 test -d "\$cf_subdir\${section}" &&
15143                 test -n "\$aliases" && (
15144                         cd "\$cf_subdir\${section}" && (
15145                                 for cf_alias in \$aliases
15146                                 do
15147                                         if test "\$section" = 1 ; then
15148                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15149                                         fi
15150
15151                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15152                                         rm -f "\$cf_alias\${suffix}"
15153                                 done
15154                         )
15155                 )
15156         else
15157 #               echo ".hy 0"
15158                 cat \$TMP
15159         fi
15160         ;;
15161 esac
15162 done
15163
15164 if test "$cf_inboth" = yes ; then
15165 if test "\$form" != format ; then
15166         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15167 fi
15168 fi
15169
15170 exit 0
15171 CF_EOF
15172 chmod 755 "$cf_edit_man"
15173
15174 ###############################################################################
15175
15176 ### Note that some functions (such as const) are normally disabled anyway.
15177 echo "$as_me:15177: checking if you want to build with function extensions" >&5
15178 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15179
15180 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15181 if test "${enable_ext_funcs+set}" = set; then
15182   enableval="$enable_ext_funcs"
15183   with_ext_funcs=$enableval
15184 else
15185   with_ext_funcs=yes
15186 fi;
15187 echo "$as_me:15187: result: $with_ext_funcs" >&5
15188 echo "${ECHO_T}$with_ext_funcs" >&6
15189 if test "x$with_ext_funcs" = xyes ; then
15190         NCURSES_EXT_FUNCS=1
15191
15192 cat >>confdefs.h <<\EOF
15193 #define NCURSES_EXT_FUNCS 1
15194 EOF
15195
15196 cat >>confdefs.h <<\EOF
15197 #define HAVE_ASSUME_DEFAULT_COLORS 1
15198 EOF
15199
15200 cat >>confdefs.h <<\EOF
15201 #define HAVE_CURSES_VERSION 1
15202 EOF
15203
15204 cat >>confdefs.h <<\EOF
15205 #define HAVE_HAS_KEY 1
15206 EOF
15207
15208 cat >>confdefs.h <<\EOF
15209 #define HAVE_RESIZETERM 1
15210 EOF
15211
15212 cat >>confdefs.h <<\EOF
15213 #define HAVE_RESIZE_TERM 1
15214 EOF
15215
15216 cat >>confdefs.h <<\EOF
15217 #define HAVE_TERM_ENTRY_H 1
15218 EOF
15219
15220 cat >>confdefs.h <<\EOF
15221 #define HAVE_USE_DEFAULT_COLORS 1
15222 EOF
15223
15224 cat >>confdefs.h <<\EOF
15225 #define HAVE_USE_EXTENDED_NAMES 1
15226 EOF
15227
15228 cat >>confdefs.h <<\EOF
15229 #define HAVE_USE_SCREEN 1
15230 EOF
15231
15232 cat >>confdefs.h <<\EOF
15233 #define HAVE_USE_WINDOW 1
15234 EOF
15235
15236 cat >>confdefs.h <<\EOF
15237 #define HAVE_WRESIZE 1
15238 EOF
15239
15240         GENERATED_EXT_FUNCS=generated
15241         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15242 else
15243         NCURSES_EXT_FUNCS=0
15244         GENERATED_EXT_FUNCS=
15245 fi
15246
15247 echo "$as_me:15247: checking if you want to build with SCREEN extensions" >&5
15248 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15249
15250 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15251 if test "${enable_sp_funcs+set}" = set; then
15252   enableval="$enable_sp_funcs"
15253   with_sp_funcs=$enableval
15254 else
15255   with_sp_funcs=$cf_dft_ext_spfuncs
15256 fi;
15257 echo "$as_me:15257: result: $with_sp_funcs" >&5
15258 echo "${ECHO_T}$with_sp_funcs" >&6
15259 if test "x$with_sp_funcs" = xyes ; then
15260         NCURSES_SP_FUNCS=1
15261
15262 cat >>confdefs.h <<\EOF
15263 #define NCURSES_SP_FUNCS 1
15264 EOF
15265
15266 cat >>confdefs.h <<\EOF
15267 #define HAVE_TPUTS_SP 1
15268 EOF
15269
15270         GENERATED_SP_FUNCS=generated
15271 else
15272         NCURSES_SP_FUNCS=0
15273         GENERATED_SP_FUNCS=
15274 fi
15275
15276 echo "$as_me:15276: checking if you want to build with terminal-driver" >&5
15277 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15278
15279 # Check whether --enable-term-driver or --disable-term-driver was given.
15280 if test "${enable_term_driver+set}" = set; then
15281   enableval="$enable_term_driver"
15282   with_term_driver=$enableval
15283 else
15284   with_term_driver=no
15285 fi;
15286 echo "$as_me:15286: result: $with_term_driver" >&5
15287 echo "${ECHO_T}$with_term_driver" >&6
15288 if test "x$with_term_driver" = xyes ; then
15289
15290 cat >>confdefs.h <<\EOF
15291 #define USE_TERM_DRIVER 1
15292 EOF
15293
15294         if test "x$with_termlib" != xno ; then
15295                 { { echo "$as_me:15295: error: The term-driver option conflicts with the termlib option" >&5
15296 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15297    { (exit 1); exit 1; }; }
15298         fi
15299         if test "x$with_sp_funcs" != xyes ; then
15300                 { { echo "$as_me:15300: error: The term-driver option relies upon sp-funcs" >&5
15301 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15302    { (exit 1); exit 1; }; }
15303         fi
15304 fi
15305
15306 ###   use option --enable-const to turn on use of const beyond that in XSI.
15307 echo "$as_me:15307: checking for extended use of const keyword" >&5
15308 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15309
15310 # Check whether --enable-const or --disable-const was given.
15311 if test "${enable_const+set}" = set; then
15312   enableval="$enable_const"
15313   with_ext_const=$enableval
15314 else
15315   with_ext_const=$cf_dft_ext_const
15316 fi;
15317 echo "$as_me:15317: result: $with_ext_const" >&5
15318 echo "${ECHO_T}$with_ext_const" >&6
15319 NCURSES_CONST='/*nothing*/'
15320 if test "x$with_ext_const" = xyes ; then
15321         NCURSES_CONST=const
15322 fi
15323
15324 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15325 echo "$as_me:15325: checking if you want to use extended colors" >&5
15326 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15327
15328 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15329 if test "${enable_ext_colors+set}" = set; then
15330   enableval="$enable_ext_colors"
15331   with_ext_colors=$enableval
15332 else
15333   with_ext_colors=$cf_dft_ext_colors
15334 fi;
15335 echo "$as_me:15335: result: $with_ext_colors" >&5
15336 echo "${ECHO_T}$with_ext_colors" >&6
15337 NCURSES_EXT_COLORS=0
15338 if test "x$with_ext_colors" = xyes ; then
15339         if test "x$with_widec" != xyes ; then
15340                 { echo "$as_me:15340: WARNING: This option applies only to wide-character library" >&5
15341 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15342         else
15343                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15344
15345 if test "${with_abi_version+set}" != set; then
15346         case "$cf_cv_rel_version" in
15347         (5.*)
15348                 cf_cv_rel_version=6.0
15349                 cf_cv_abi_version=6
15350                 { echo "$as_me:15350: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15351 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15352                 ;;
15353         esac
15354 fi
15355
15356                 NCURSES_EXT_COLORS=1
15357
15358 cat >>confdefs.h <<\EOF
15359 #define NCURSES_EXT_COLORS 1
15360 EOF
15361
15362 cat >>confdefs.h <<\EOF
15363 #define HAVE_ALLOC_PAIR 1
15364 EOF
15365
15366 cat >>confdefs.h <<\EOF
15367 #define HAVE_INIT_EXTENDED_COLOR 1
15368 EOF
15369
15370 cat >>confdefs.h <<\EOF
15371 #define HAVE_RESET_COLOR_PAIRS 1
15372 EOF
15373
15374         fi
15375 fi
15376
15377 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15378 echo "$as_me:15378: checking if you want to use extended mouse encoding" >&5
15379 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15380
15381 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15382 if test "${enable_ext_mouse+set}" = set; then
15383   enableval="$enable_ext_mouse"
15384   with_ext_mouse=$enableval
15385 else
15386   with_ext_mouse=$cf_dft_ext_mouse
15387 fi;
15388 echo "$as_me:15388: result: $with_ext_mouse" >&5
15389 echo "${ECHO_T}$with_ext_mouse" >&6
15390 if test "x$with_ext_mouse" = xyes ; then
15391
15392 if test "${with_abi_version+set}" != set; then
15393         case "$cf_cv_rel_version" in
15394         (5.*)
15395                 cf_cv_rel_version=6.0
15396                 cf_cv_abi_version=6
15397                 { echo "$as_me:15397: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15398 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15399                 ;;
15400         esac
15401 fi
15402
15403 fi
15404
15405 case $cf_cv_abi_version in
15406 (5)
15407         NCURSES_MOUSE_VERSION=1
15408         ;;
15409 (6)
15410         NCURSES_MOUSE_VERSION=2
15411         ;;
15412 (789)
15413         NCURSES_MOUSE_VERSION=3
15414         ;;
15415 esac
15416
15417 ###   use option --enable-ext-putwin to turn on extended screendumps
15418 echo "$as_me:15418: checking if you want to use extended putwin/screendump" >&5
15419 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15420
15421 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15422 if test "${enable_ext_putwin+set}" = set; then
15423   enableval="$enable_ext_putwin"
15424   with_ext_putwin=$enableval
15425 else
15426   with_ext_putwin=$cf_dft_ext_putwin
15427 fi;
15428 echo "$as_me:15428: result: $with_ext_putwin" >&5
15429 echo "${ECHO_T}$with_ext_putwin" >&6
15430 if test "x$with_ext_putwin" = xyes ; then
15431
15432 cat >>confdefs.h <<\EOF
15433 #define NCURSES_EXT_PUTWIN 1
15434 EOF
15435
15436 fi
15437
15438 echo "$as_me:15438: checking if you want \$NCURSES_NO_PADDING code" >&5
15439 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15440
15441 # Check whether --enable-no-padding or --disable-no-padding was given.
15442 if test "${enable_no_padding+set}" = set; then
15443   enableval="$enable_no_padding"
15444   with_no_padding=$enableval
15445 else
15446   with_no_padding=$with_ext_funcs
15447 fi;
15448 echo "$as_me:15448: result: $with_no_padding" >&5
15449 echo "${ECHO_T}$with_no_padding" >&6
15450 test "x$with_no_padding" = xyes &&
15451 cat >>confdefs.h <<\EOF
15452 #define NCURSES_NO_PADDING 1
15453 EOF
15454
15455 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15456 echo "$as_me:15456: checking if you want SIGWINCH handler" >&5
15457 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15458
15459 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15460 if test "${enable_sigwinch+set}" = set; then
15461   enableval="$enable_sigwinch"
15462   with_sigwinch=$enableval
15463 else
15464   with_sigwinch=$with_ext_funcs
15465 fi;
15466 echo "$as_me:15466: result: $with_sigwinch" >&5
15467 echo "${ECHO_T}$with_sigwinch" >&6
15468 test "x$with_sigwinch" = xyes &&
15469 cat >>confdefs.h <<\EOF
15470 #define USE_SIGWINCH 1
15471 EOF
15472
15473 ###   use option --enable-tcap-names to allow user to define new capabilities
15474 echo "$as_me:15474: checking if you want user-definable terminal capabilities like termcap" >&5
15475 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15476
15477 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15478 if test "${enable_tcap_names+set}" = set; then
15479   enableval="$enable_tcap_names"
15480   with_tcap_names=$enableval
15481 else
15482   with_tcap_names=$with_ext_funcs
15483 fi;
15484 echo "$as_me:15484: result: $with_tcap_names" >&5
15485 echo "${ECHO_T}$with_tcap_names" >&6
15486 NCURSES_XNAMES=0
15487 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15488
15489 ##############################################################################
15490
15491 echo "$as_me:15491: checking if you want to link with the pthread library" >&5
15492 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15493
15494 # Check whether --with-pthread or --without-pthread was given.
15495 if test "${with_pthread+set}" = set; then
15496   withval="$with_pthread"
15497   with_pthread=$withval
15498 else
15499   with_pthread=no
15500 fi;
15501 echo "$as_me:15501: result: $with_pthread" >&5
15502 echo "${ECHO_T}$with_pthread" >&6
15503
15504 if test "$with_pthread" != no ; then
15505         echo "$as_me:15505: checking for pthread.h" >&5
15506 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15507 if test "${ac_cv_header_pthread_h+set}" = set; then
15508   echo $ECHO_N "(cached) $ECHO_C" >&6
15509 else
15510   cat >"conftest.$ac_ext" <<_ACEOF
15511 #line 15511 "configure"
15512 #include "confdefs.h"
15513 #include <pthread.h>
15514 _ACEOF
15515 if { (eval echo "$as_me:15515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15516   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15517   ac_status=$?
15518   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15519   rm -f conftest.er1
15520   cat conftest.err >&5
15521   echo "$as_me:15521: \$? = $ac_status" >&5
15522   (exit "$ac_status"); } >/dev/null; then
15523   if test -s conftest.err; then
15524     ac_cpp_err=$ac_c_preproc_warn_flag
15525   else
15526     ac_cpp_err=
15527   fi
15528 else
15529   ac_cpp_err=yes
15530 fi
15531 if test -z "$ac_cpp_err"; then
15532   ac_cv_header_pthread_h=yes
15533 else
15534   echo "$as_me: failed program was:" >&5
15535   cat "conftest.$ac_ext" >&5
15536   ac_cv_header_pthread_h=no
15537 fi
15538 rm -f conftest.err "conftest.$ac_ext"
15539 fi
15540 echo "$as_me:15540: result: $ac_cv_header_pthread_h" >&5
15541 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15542 if test "$ac_cv_header_pthread_h" = yes; then
15543
15544 cat >>confdefs.h <<\EOF
15545 #define HAVE_PTHREADS_H 1
15546 EOF
15547
15548         for cf_lib_pthread in pthread c_r
15549         do
15550             echo "$as_me:15550: checking if we can link with the $cf_lib_pthread library" >&5
15551 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15552             cf_save_LIBS="$LIBS"
15553
15554 cf_add_libs="$LIBS"
15555 # reverse order
15556 cf_add_0lib=
15557 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15558 # filter duplicates
15559 for cf_add_1lib in $cf_add_0lib; do
15560         for cf_add_2lib in $cf_add_libs; do
15561                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15562                         cf_add_1lib=
15563                         break
15564                 fi
15565         done
15566         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15567 done
15568 LIBS="$cf_add_libs"
15569
15570             cat >"conftest.$ac_ext" <<_ACEOF
15571 #line 15571 "configure"
15572 #include "confdefs.h"
15573
15574 #include <pthread.h>
15575
15576 int
15577 main (void)
15578 {
15579
15580                 int rc = pthread_create(0,0,0,0);
15581                 int r2 = pthread_mutexattr_settype(0, 0);
15582
15583   ;
15584   return 0;
15585 }
15586 _ACEOF
15587 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15588 if { (eval echo "$as_me:15588: \"$ac_link\"") >&5
15589   (eval $ac_link) 2>&5
15590   ac_status=$?
15591   echo "$as_me:15591: \$? = $ac_status" >&5
15592   (exit "$ac_status"); } &&
15593          { ac_try='test -s "conftest$ac_exeext"'
15594   { (eval echo "$as_me:15594: \"$ac_try\"") >&5
15595   (eval $ac_try) 2>&5
15596   ac_status=$?
15597   echo "$as_me:15597: \$? = $ac_status" >&5
15598   (exit "$ac_status"); }; }; then
15599   with_pthread=yes
15600 else
15601   echo "$as_me: failed program was:" >&5
15602 cat "conftest.$ac_ext" >&5
15603 with_pthread=no
15604 fi
15605 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15606             LIBS="$cf_save_LIBS"
15607             echo "$as_me:15607: result: $with_pthread" >&5
15608 echo "${ECHO_T}$with_pthread" >&6
15609             test "$with_pthread" = yes && break
15610         done
15611
15612         if test "$with_pthread" = yes ; then
15613
15614 cf_add_libs="$LIBS"
15615 # reverse order
15616 cf_add_0lib=
15617 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15618 # filter duplicates
15619 for cf_add_1lib in $cf_add_0lib; do
15620         for cf_add_2lib in $cf_add_libs; do
15621                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15622                         cf_add_1lib=
15623                         break
15624                 fi
15625         done
15626         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15627 done
15628 LIBS="$cf_add_libs"
15629
15630 cat >>confdefs.h <<\EOF
15631 #define HAVE_LIBPTHREADS 1
15632 EOF
15633
15634         else
15635             { { echo "$as_me:15635: error: Cannot link with pthread library" >&5
15636 echo "$as_me: error: Cannot link with pthread library" >&2;}
15637    { (exit 1); exit 1; }; }
15638         fi
15639
15640 fi
15641
15642 fi
15643
15644 if test "x$with_pthread" != xno; then
15645         echo "$as_me:15645: checking for pthread_kill" >&5
15646 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15647 if test "${ac_cv_func_pthread_kill+set}" = set; then
15648   echo $ECHO_N "(cached) $ECHO_C" >&6
15649 else
15650   cat >"conftest.$ac_ext" <<_ACEOF
15651 #line 15651 "configure"
15652 #include "confdefs.h"
15653 #define pthread_kill autoconf_temporary
15654 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15655 #undef pthread_kill
15656
15657 #ifdef __cplusplus
15658 extern "C"
15659 #endif
15660
15661 /* We use char because int might match the return type of a gcc2
15662    builtin and then its argument prototype would still apply.  */
15663 char pthread_kill (void);
15664
15665 int
15666 main (void)
15667 {
15668
15669 /* The GNU C library defines stubs for functions which it implements
15670     to always fail with ENOSYS.  Some functions are actually named
15671     something starting with __ and the normal name is an alias.  */
15672 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15673 #error found stub for pthread_kill
15674 #endif
15675
15676         return pthread_kill ();
15677   ;
15678   return 0;
15679 }
15680 _ACEOF
15681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15682 if { (eval echo "$as_me:15682: \"$ac_link\"") >&5
15683   (eval $ac_link) 2>&5
15684   ac_status=$?
15685   echo "$as_me:15685: \$? = $ac_status" >&5
15686   (exit "$ac_status"); } &&
15687          { ac_try='test -s "conftest$ac_exeext"'
15688   { (eval echo "$as_me:15688: \"$ac_try\"") >&5
15689   (eval $ac_try) 2>&5
15690   ac_status=$?
15691   echo "$as_me:15691: \$? = $ac_status" >&5
15692   (exit "$ac_status"); }; }; then
15693   ac_cv_func_pthread_kill=yes
15694 else
15695   echo "$as_me: failed program was:" >&5
15696 cat "conftest.$ac_ext" >&5
15697 ac_cv_func_pthread_kill=no
15698 fi
15699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15700 fi
15701 echo "$as_me:15701: result: $ac_cv_func_pthread_kill" >&5
15702 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15703 if test "$ac_cv_func_pthread_kill" = yes; then
15704
15705                 echo "$as_me:15705: checking if you want to allow EINTR in wgetch with pthreads" >&5
15706 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15707
15708 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15709 if test "${enable_pthreads_eintr+set}" = set; then
15710   enableval="$enable_pthreads_eintr"
15711   use_pthreads_eintr=$enableval
15712 else
15713   use_pthreads_eintr=no
15714 fi;
15715                 echo "$as_me:15715: result: $use_pthreads_eintr" >&5
15716 echo "${ECHO_T}$use_pthreads_eintr" >&6
15717                 if test "x$use_pthreads_eintr" = xyes ; then
15718
15719 cat >>confdefs.h <<\EOF
15720 #define USE_PTHREADS_EINTR 1
15721 EOF
15722
15723                 fi
15724 fi
15725
15726         echo "$as_me:15726: checking if you want to use weak-symbols for pthreads" >&5
15727 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15728
15729 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15730 if test "${enable_weak_symbols+set}" = set; then
15731   enableval="$enable_weak_symbols"
15732   use_weak_symbols=$enableval
15733 else
15734   use_weak_symbols=no
15735 fi;
15736         echo "$as_me:15736: result: $use_weak_symbols" >&5
15737 echo "${ECHO_T}$use_weak_symbols" >&6
15738         if test "x$use_weak_symbols" = xyes ; then
15739
15740 echo "$as_me:15740: checking if $CC supports weak symbols" >&5
15741 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15742 if test "${cf_cv_weak_symbols+set}" = set; then
15743   echo $ECHO_N "(cached) $ECHO_C" >&6
15744 else
15745
15746 cat >"conftest.$ac_ext" <<_ACEOF
15747 #line 15747 "configure"
15748 #include "confdefs.h"
15749
15750 #include <stdio.h>
15751 int
15752 main (void)
15753 {
15754
15755 #if defined(__GNUC__)
15756 #  if defined __USE_ISOC99
15757 #    define _cat_pragma(exp)    _Pragma(#exp)
15758 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15759 #  else
15760 #    define _weak_pragma(exp)
15761 #  endif
15762 #  define _declare(name)        __extension__ extern __typeof__(name) name
15763 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15764 #endif
15765
15766 weak_symbol(fopen);
15767
15768   ;
15769   return 0;
15770 }
15771 _ACEOF
15772 rm -f "conftest.$ac_objext"
15773 if { (eval echo "$as_me:15773: \"$ac_compile\"") >&5
15774   (eval $ac_compile) 2>&5
15775   ac_status=$?
15776   echo "$as_me:15776: \$? = $ac_status" >&5
15777   (exit "$ac_status"); } &&
15778          { ac_try='test -s "conftest.$ac_objext"'
15779   { (eval echo "$as_me:15779: \"$ac_try\"") >&5
15780   (eval $ac_try) 2>&5
15781   ac_status=$?
15782   echo "$as_me:15782: \$? = $ac_status" >&5
15783   (exit "$ac_status"); }; }; then
15784   cf_cv_weak_symbols=yes
15785 else
15786   echo "$as_me: failed program was:" >&5
15787 cat "conftest.$ac_ext" >&5
15788 cf_cv_weak_symbols=no
15789 fi
15790 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15791
15792 fi
15793 echo "$as_me:15793: result: $cf_cv_weak_symbols" >&5
15794 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15795
15796         else
15797                 cf_cv_weak_symbols=no
15798         fi
15799
15800         if test "x$cf_cv_weak_symbols" = xyes ; then
15801
15802 cat >>confdefs.h <<\EOF
15803 #define USE_WEAK_SYMBOLS 1
15804 EOF
15805
15806         fi
15807 fi
15808
15809 PTHREAD=
15810 if test "x$with_pthread" = "xyes" ; then
15811
15812 cat >>confdefs.h <<\EOF
15813 #define USE_PTHREADS 1
15814 EOF
15815
15816         enable_reentrant=yes
15817         if test "x$cf_cv_weak_symbols" = xyes ; then
15818                 PTHREAD=-lpthread
15819
15820 cf_add_libs="$PRIVATE_LIBS"
15821 # reverse order
15822 cf_add_0lib=
15823 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15824 # filter duplicates
15825 for cf_add_1lib in $cf_add_0lib; do
15826         for cf_add_2lib in $cf_add_libs; do
15827                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15828                         cf_add_1lib=
15829                         break
15830                 fi
15831         done
15832         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15833 done
15834 PRIVATE_LIBS="$cf_add_libs"
15835
15836         fi
15837 fi
15838
15839 # Reentrant code has to be opaque; there's little advantage to making ncurses
15840 # opaque outside of that, so there is no --enable-opaque option.  We can use
15841 # this option without --with-pthreads, but this will be always set for
15842 # pthreads.
15843 echo "$as_me:15843: checking if you want reentrant code" >&5
15844 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15845
15846 # Check whether --enable-reentrant or --disable-reentrant was given.
15847 if test "${enable_reentrant+set}" = set; then
15848   enableval="$enable_reentrant"
15849   with_reentrant=$enableval
15850 else
15851   with_reentrant=no
15852 fi;
15853 echo "$as_me:15853: result: $with_reentrant" >&5
15854 echo "${ECHO_T}$with_reentrant" >&6
15855 if test "x$with_reentrant" = xyes ; then
15856         cf_cv_enable_reentrant=1
15857         cf_cv_enable_opaque="NCURSES_INTERNALS"
15858         NCURSES_SIZE_T=int
15859         if test "x$cf_cv_weak_symbols" = xyes ; then
15860
15861 # remove pthread library from $LIBS
15862 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15863
15864 cf_add_libs="$TEST_LIBS"
15865 # reverse order
15866 cf_add_0lib=
15867 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15868 # filter duplicates
15869 for cf_add_1lib in $cf_add_0lib; do
15870         for cf_add_2lib in $cf_add_libs; do
15871                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15872                         cf_add_1lib=
15873                         break
15874                 fi
15875         done
15876         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15877 done
15878 TEST_LIBS="$cf_add_libs"
15879
15880 cf_add_libs="$TEST_LIBS2"
15881 # reverse order
15882 cf_add_0lib=
15883 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15884 # filter duplicates
15885 for cf_add_1lib in $cf_add_0lib; do
15886         for cf_add_2lib in $cf_add_libs; do
15887                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15888                         cf_add_1lib=
15889                         break
15890                 fi
15891         done
15892         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15893 done
15894 TEST_LIBS2="$cf_add_libs"
15895
15896 cf_add_libs="$PRIVATE_LIBS"
15897 # reverse order
15898 cf_add_0lib=
15899 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15900 # filter duplicates
15901 for cf_add_1lib in $cf_add_0lib; do
15902         for cf_add_2lib in $cf_add_libs; do
15903                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15904                         cf_add_1lib=
15905                         break
15906                 fi
15907         done
15908         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15909 done
15910 PRIVATE_LIBS="$cf_add_libs"
15911
15912         else
15913                 # when not using weak symbols but with_reentrant,
15914                 # add 't' to the library suffix on all platforms
15915                 # except cygwin, where we only do that if ALSO
15916                 # compiling with full thread support.
15917                 case "$host" in
15918                 (*cygwin* | *msys*)
15919                         if test "$with_pthread" = "yes" ; then
15920                                 if test "x$disable_lib_suffixes" = "xno" ; then
15921                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15922                                 fi
15923                         fi ;;
15924                 (*)
15925                         if test "x$disable_lib_suffixes" = "xno" ; then
15926                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15927                         fi
15928                         ;;
15929                 esac
15930         fi
15931
15932 cat >>confdefs.h <<\EOF
15933 #define USE_REENTRANT 1
15934 EOF
15935
15936 if test "${with_abi_version+set}" != set; then
15937         case "$cf_cv_rel_version" in
15938         (5.*)
15939                 cf_cv_rel_version=6.0
15940                 cf_cv_abi_version=6
15941                 { echo "$as_me:15941: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15942 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15943                 ;;
15944         esac
15945 fi
15946
15947 else
15948         cf_cv_enable_reentrant=0
15949         cf_cv_enable_opaque="NCURSES_OPAQUE"
15950         NCURSES_SIZE_T=$cf_dft_ordinate_type
15951 fi
15952
15953 echo "$as_me:15953: checking if you want opaque curses-library structures" >&5
15954 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15955
15956 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15957 if test "${enable_opaque_curses+set}" = set; then
15958   enableval="$enable_opaque_curses"
15959   test "$enableval" != yes && enableval=no
15960         if test "$enableval" != "no" ; then
15961     enable_opaque_curses=yes
15962         else
15963
15964          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15965          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15966
15967         fi
15968 else
15969   enableval=no
15970
15971          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15972          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15973
15974 fi;
15975 echo "$as_me:15975: result: $enable_opaque_curses" >&5
15976 echo "${ECHO_T}$enable_opaque_curses" >&6
15977
15978 test "$cf_cv_enable_reentrant" = 1 && \
15979 test "$enable_opaque_curses" = no && \
15980 { { echo "$as_me:15980: error: reentrant configuration requires opaque library" >&5
15981 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15982    { (exit 1); exit 1; }; }
15983
15984 echo "$as_me:15984: checking if you want opaque form-library structures" >&5
15985 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15986
15987 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15988 if test "${enable_opaque_form+set}" = set; then
15989   enableval="$enable_opaque_form"
15990   enable_opaque_form=yes
15991 else
15992   enable_opaque_form=no
15993 fi;
15994 echo "$as_me:15994: result: $enable_opaque_form" >&5
15995 echo "${ECHO_T}$enable_opaque_form" >&6
15996
15997 echo "$as_me:15997: checking if you want opaque menu-library structures" >&5
15998 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15999
16000 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16001 if test "${enable_opaque_menu+set}" = set; then
16002   enableval="$enable_opaque_menu"
16003   enable_opaque_menu=yes
16004 else
16005   enable_opaque_menu=no
16006 fi;
16007 echo "$as_me:16007: result: $enable_opaque_menu" >&5
16008 echo "${ECHO_T}$enable_opaque_menu" >&6
16009
16010 echo "$as_me:16010: checking if you want opaque panel-library structures" >&5
16011 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16012
16013 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16014 if test "${enable_opaque_panel+set}" = set; then
16015   enableval="$enable_opaque_panel"
16016   enable_opaque_panel=yes
16017 else
16018   enable_opaque_panel=no
16019 fi;
16020 echo "$as_me:16020: result: $enable_opaque_panel" >&5
16021 echo "${ECHO_T}$enable_opaque_panel" >&6
16022
16023 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16024 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16025 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16026 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16027
16028 ### Allow using a different wrap-prefix
16029 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16030         echo "$as_me:16030: checking for prefix used to wrap public variables" >&5
16031 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16032
16033 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16034 if test "${with_wrap_prefix+set}" = set; then
16035   withval="$with_wrap_prefix"
16036   NCURSES_WRAP_PREFIX=$withval
16037 else
16038   NCURSES_WRAP_PREFIX=_nc_
16039 fi;
16040         echo "$as_me:16040: result: $NCURSES_WRAP_PREFIX" >&5
16041 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16042 else
16043         NCURSES_WRAP_PREFIX=_nc_
16044 fi
16045
16046 cat >>confdefs.h <<EOF
16047 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16048 EOF
16049
16050 ###############################################################################
16051 # These options are relatively safe to experiment with.
16052
16053 echo "$as_me:16053: checking if you want all development code" >&5
16054 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16055
16056 # Check whether --with-develop or --without-develop was given.
16057 if test "${with_develop+set}" = set; then
16058   withval="$with_develop"
16059   with_develop=$withval
16060 else
16061   with_develop=no
16062 fi;
16063 echo "$as_me:16063: result: $with_develop" >&5
16064 echo "${ECHO_T}$with_develop" >&6
16065
16066 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16067 echo "$as_me:16067: checking if you want hard-tabs code" >&5
16068 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16069
16070 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16071 if test "${enable_hard_tabs+set}" = set; then
16072   enableval="$enable_hard_tabs"
16073
16074 else
16075   enable_hard_tabs=$with_develop
16076 fi;
16077 echo "$as_me:16077: result: $enable_hard_tabs" >&5
16078 echo "${ECHO_T}$enable_hard_tabs" >&6
16079 test "x$enable_hard_tabs" = xyes &&
16080 cat >>confdefs.h <<\EOF
16081 #define USE_HARD_TABS 1
16082 EOF
16083
16084 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16085 echo "$as_me:16085: checking if you want limited support for xmc" >&5
16086 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16087
16088 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16089 if test "${enable_xmc_glitch+set}" = set; then
16090   enableval="$enable_xmc_glitch"
16091
16092 else
16093   enable_xmc_glitch=$with_develop
16094 fi;
16095 echo "$as_me:16095: result: $enable_xmc_glitch" >&5
16096 echo "${ECHO_T}$enable_xmc_glitch" >&6
16097 test "x$enable_xmc_glitch" = xyes &&
16098 cat >>confdefs.h <<\EOF
16099 #define USE_XMC_SUPPORT 1
16100 EOF
16101
16102 ###############################################################################
16103 # These are just experimental, probably should not be in a package:
16104
16105 echo "$as_me:16105: checking if you do not want to assume colors are white-on-black" >&5
16106 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16107
16108 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16109 if test "${enable_assumed_color+set}" = set; then
16110   enableval="$enable_assumed_color"
16111   with_assumed_color=$enableval
16112 else
16113   with_assumed_color=yes
16114 fi;
16115 echo "$as_me:16115: result: $with_assumed_color" >&5
16116 echo "${ECHO_T}$with_assumed_color" >&6
16117 test "x$with_assumed_color" = xyes &&
16118 cat >>confdefs.h <<\EOF
16119 #define USE_ASSUMED_COLOR 1
16120 EOF
16121
16122 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16123 echo "$as_me:16123: checking if you want hashmap scrolling-optimization code" >&5
16124 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16125
16126 # Check whether --enable-hashmap or --disable-hashmap was given.
16127 if test "${enable_hashmap+set}" = set; then
16128   enableval="$enable_hashmap"
16129   with_hashmap=$enableval
16130 else
16131   with_hashmap=yes
16132 fi;
16133 echo "$as_me:16133: result: $with_hashmap" >&5
16134 echo "${ECHO_T}$with_hashmap" >&6
16135 test "x$with_hashmap" = xyes &&
16136 cat >>confdefs.h <<\EOF
16137 #define USE_HASHMAP 1
16138 EOF
16139
16140 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16141 echo "$as_me:16141: checking if you want colorfgbg code" >&5
16142 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16143
16144 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16145 if test "${enable_colorfgbg+set}" = set; then
16146   enableval="$enable_colorfgbg"
16147   with_colorfgbg=$enableval
16148 else
16149   with_colorfgbg=no
16150 fi;
16151 echo "$as_me:16151: result: $with_colorfgbg" >&5
16152 echo "${ECHO_T}$with_colorfgbg" >&6
16153 test "x$with_colorfgbg" = xyes &&
16154 cat >>confdefs.h <<\EOF
16155 #define USE_COLORFGBG 1
16156 EOF
16157
16158 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16159 echo "$as_me:16159: checking if you want to use gcc -fvisibility option" >&5
16160 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16161
16162 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16163 if test "${enable_fvisibility+set}" = set; then
16164   enableval="$enable_fvisibility"
16165   cf_with_fvisibility=$enableval
16166 else
16167   cf_with_fvisibility=no
16168 fi;
16169 echo "$as_me:16169: result: $cf_with_fvisibility" >&5
16170 echo "${ECHO_T}$cf_with_fvisibility" >&6
16171
16172 NCURSES_IMPEXP=
16173 NCURSES_CXX_IMPEXP=
16174 if test "x$cf_with_fvisibility" = xyes; then
16175
16176 echo "$as_me:16176: checking if $CC -fvisibility=hidden option works" >&5
16177 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16178 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16179   echo $ECHO_N "(cached) $ECHO_C" >&6
16180 else
16181
16182     cf_save_cflags="$CFLAGS"
16183     CFLAGS="$CFLAGS -fvisibility=hidden"
16184     cat >"conftest.$ac_ext" <<_ACEOF
16185 #line 16185 "configure"
16186 #include "confdefs.h"
16187
16188 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16189
16190 int
16191 main (void)
16192 {
16193
16194         if (somefunc()) return 1;
16195
16196   ;
16197   return 0;
16198 }
16199 _ACEOF
16200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16201 if { (eval echo "$as_me:16201: \"$ac_link\"") >&5
16202   (eval $ac_link) 2>&5
16203   ac_status=$?
16204   echo "$as_me:16204: \$? = $ac_status" >&5
16205   (exit "$ac_status"); } &&
16206          { ac_try='test -s "conftest$ac_exeext"'
16207   { (eval echo "$as_me:16207: \"$ac_try\"") >&5
16208   (eval $ac_try) 2>&5
16209   ac_status=$?
16210   echo "$as_me:16210: \$? = $ac_status" >&5
16211   (exit "$ac_status"); }; }; then
16212   cf_cv_fvisibility_hidden=yes
16213 else
16214   echo "$as_me: failed program was:" >&5
16215 cat "conftest.$ac_ext" >&5
16216 cf_cv_fvisibility_hidden=no
16217 fi
16218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16219     CFLAGS=$cf_save_cflags
16220
16221 fi
16222 echo "$as_me:16222: result: $cf_cv_fvisibility_hidden" >&5
16223 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16224
16225         if test "x$cf_cv_fvisibility_hidden" = xyes
16226         then
16227
16228 cf_fix_cppflags=no
16229 cf_new_cflags=
16230 cf_new_cppflags=
16231 cf_new_extra_cppflags=
16232
16233 for cf_add_cflags in -fvisibility=hidden
16234 do
16235 case "$cf_fix_cppflags" in
16236 (no)
16237         case "$cf_add_cflags" in
16238         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16239                 case "$cf_add_cflags" in
16240                 (-D*)
16241                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16242
16243                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16244                                 && test -z "${cf_tst_cflags}" \
16245                                 && cf_fix_cppflags=yes
16246
16247                         if test "$cf_fix_cppflags" = yes ; then
16248
16249         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16250         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16251
16252                                 continue
16253                         elif test "${cf_tst_cflags}" = "\"'" ; then
16254
16255         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16256         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16257
16258                                 continue
16259                         fi
16260                         ;;
16261                 esac
16262                 case "$CPPFLAGS" in
16263                 (*$cf_add_cflags)
16264                         ;;
16265                 (*)
16266                         case "$cf_add_cflags" in
16267                         (-D*)
16268                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16269
16270 CPPFLAGS=`echo "$CPPFLAGS" | \
16271         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16272                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16273
16274                                 ;;
16275                         esac
16276
16277         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16278         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16279
16280                         ;;
16281                 esac
16282                 ;;
16283         (*)
16284
16285         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16286         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16287
16288                 ;;
16289         esac
16290         ;;
16291 (yes)
16292
16293         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16294         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16295
16296         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16297
16298         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16299                 && test -z "${cf_tst_cflags}" \
16300                 && cf_fix_cppflags=no
16301         ;;
16302 esac
16303 done
16304
16305 if test -n "$cf_new_cflags" ; then
16306
16307         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16308         CFLAGS="${CFLAGS}$cf_new_cflags"
16309
16310 fi
16311
16312 if test -n "$cf_new_cppflags" ; then
16313
16314         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16315         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16316
16317 fi
16318
16319 if test -n "$cf_new_extra_cppflags" ; then
16320
16321         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16322         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16323
16324 fi
16325
16326                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16327         fi
16328         if test -n "$CXX"
16329         then
16330                 ac_ext=cc
16331 ac_cpp='$CXXCPP $CPPFLAGS'
16332 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16333 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16334 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16335 ac_main_return="return"
16336
16337 echo "$as_me:16337: checking if $CXX -fvisibility=hidden option works" >&5
16338 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16339 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16340   echo $ECHO_N "(cached) $ECHO_C" >&6
16341 else
16342
16343     cf_save_cflags="$CXXFLAGS"
16344     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16345     cat >"conftest.$ac_ext" <<_ACEOF
16346 #line 16346 "configure"
16347 #include "confdefs.h"
16348
16349 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16350
16351 int
16352 main (void)
16353 {
16354
16355         if (somefunc()) return 1;
16356
16357   ;
16358   return 0;
16359 }
16360 _ACEOF
16361 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16362 if { (eval echo "$as_me:16362: \"$ac_link\"") >&5
16363   (eval $ac_link) 2>&5
16364   ac_status=$?
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit "$ac_status"); } &&
16367          { ac_try='test -s "conftest$ac_exeext"'
16368   { (eval echo "$as_me:16368: \"$ac_try\"") >&5
16369   (eval $ac_try) 2>&5
16370   ac_status=$?
16371   echo "$as_me:16371: \$? = $ac_status" >&5
16372   (exit "$ac_status"); }; }; then
16373   cf_cv_fvisibility_hidden2=yes
16374 else
16375   echo "$as_me: failed program was:" >&5
16376 cat "conftest.$ac_ext" >&5
16377 cf_cv_fvisibility_hidden2=no
16378 fi
16379 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16380     CXXFLAGS=$cf_save_cflags
16381
16382 fi
16383 echo "$as_me:16383: result: $cf_cv_fvisibility_hidden2" >&5
16384 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16385
16386                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16387                 then
16388
16389 cf_save_CXXFLAGS="$CFLAGS"
16390 CFLAGS="$CXXFLAGS"
16391
16392 cf_fix_cppflags=no
16393 cf_new_cflags=
16394 cf_new_cppflags=
16395 cf_new_extra_cppflags=
16396
16397 for cf_add_cflags in -fvisibility=hidden
16398 do
16399 case "$cf_fix_cppflags" in
16400 (no)
16401         case "$cf_add_cflags" in
16402         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16403                 case "$cf_add_cflags" in
16404                 (-D*)
16405                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16406
16407                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16408                                 && test -z "${cf_tst_cflags}" \
16409                                 && cf_fix_cppflags=yes
16410
16411                         if test "$cf_fix_cppflags" = yes ; then
16412
16413         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16414         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16415
16416                                 continue
16417                         elif test "${cf_tst_cflags}" = "\"'" ; then
16418
16419         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16420         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16421
16422                                 continue
16423                         fi
16424                         ;;
16425                 esac
16426                 case "$CPPFLAGS" in
16427                 (*$cf_add_cflags)
16428                         ;;
16429                 (*)
16430                         case "$cf_add_cflags" in
16431                         (-D*)
16432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16433
16434 CPPFLAGS=`echo "$CPPFLAGS" | \
16435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16437
16438                                 ;;
16439                         esac
16440
16441         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16442         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16443
16444                         ;;
16445                 esac
16446                 ;;
16447         (*)
16448
16449         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16450         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16451
16452                 ;;
16453         esac
16454         ;;
16455 (yes)
16456
16457         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16458         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16459
16460         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16461
16462         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16463                 && test -z "${cf_tst_cflags}" \
16464                 && cf_fix_cppflags=no
16465         ;;
16466 esac
16467 done
16468
16469 if test -n "$cf_new_cflags" ; then
16470
16471         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16472         CFLAGS="${CFLAGS}$cf_new_cflags"
16473
16474 fi
16475
16476 if test -n "$cf_new_cppflags" ; then
16477
16478         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16479         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16480
16481 fi
16482
16483 if test -n "$cf_new_extra_cppflags" ; then
16484
16485         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16486         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16487
16488 fi
16489
16490 CXXFLAGS="$CFLAGS"
16491 CFLAGS="$cf_save_CXXFLAGS"
16492
16493                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16494                 fi
16495                 ac_ext=c
16496 ac_cpp='$CPP $CPPFLAGS'
16497 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16498 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16500 ac_main_return="return"
16501
16502         fi
16503 fi
16504
16505 ###   use option --enable-interop to turn on use of bindings used for interop
16506 echo "$as_me:16506: checking if you want interop bindings" >&5
16507 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16508
16509 # Check whether --enable-interop or --disable-interop was given.
16510 if test "${enable_interop+set}" = set; then
16511   enableval="$enable_interop"
16512   with_exp_interop=$enableval
16513 else
16514   with_exp_interop=$cf_dft_interop
16515 fi;
16516 echo "$as_me:16516: result: $with_exp_interop" >&5
16517 echo "${ECHO_T}$with_exp_interop" >&6
16518
16519 NCURSES_INTEROP_FUNCS=0
16520 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16521
16522 echo "$as_me:16522: checking if you want experimental safe-sprintf code" >&5
16523 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16524
16525 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16526 if test "${enable_safe_sprintf+set}" = set; then
16527   enableval="$enable_safe_sprintf"
16528   with_safe_sprintf=$enableval
16529 else
16530   with_safe_sprintf=no
16531 fi;
16532 echo "$as_me:16532: result: $with_safe_sprintf" >&5
16533 echo "${ECHO_T}$with_safe_sprintf" >&6
16534
16535 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16536 # when hashmap is used scroll hints are useless
16537 if test "$with_hashmap" = no ; then
16538 echo "$as_me:16538: checking if you want to experiment without scrolling-hints code" >&5
16539 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16540
16541 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16542 if test "${enable_scroll_hints+set}" = set; then
16543   enableval="$enable_scroll_hints"
16544   with_scroll_hints=$enableval
16545 else
16546   with_scroll_hints=yes
16547 fi;
16548 echo "$as_me:16548: result: $with_scroll_hints" >&5
16549 echo "${ECHO_T}$with_scroll_hints" >&6
16550 test "x$with_scroll_hints" = xyes &&
16551 cat >>confdefs.h <<\EOF
16552 #define USE_SCROLL_HINTS 1
16553 EOF
16554
16555 fi
16556
16557 echo "$as_me:16557: checking if you want wgetch-events code" >&5
16558 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16559
16560 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16561 if test "${enable_wgetch_events+set}" = set; then
16562   enableval="$enable_wgetch_events"
16563   with_wgetch_events=$enableval
16564 else
16565   with_wgetch_events=no
16566 fi;
16567 echo "$as_me:16567: result: $with_wgetch_events" >&5
16568 echo "${ECHO_T}$with_wgetch_events" >&6
16569 if test "x$with_wgetch_events" = xyes ; then
16570
16571 cat >>confdefs.h <<\EOF
16572 #define NCURSES_WGETCH_EVENTS 1
16573 EOF
16574
16575         NCURSES_WGETCH_EVENTS=1
16576 else
16577         NCURSES_WGETCH_EVENTS=0
16578 fi
16579
16580 case "$cf_cv_system_name" in
16581 (*mingw32*|*mingw64*|*-msvc*)
16582         echo "$as_me:16582: checking if you want experimental-Windows driver" >&5
16583 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16584
16585 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16586 if test "${enable_exp_win32+set}" = set; then
16587   enableval="$enable_exp_win32"
16588   with_exp_win32=$enableval
16589 else
16590   with_exp_win32=no
16591 fi;
16592         echo "$as_me:16592: result: $with_exp_win32" >&5
16593 echo "${ECHO_T}$with_exp_win32" >&6
16594         if test "x$with_exp_win32" = xyes
16595         then
16596
16597 cat >>confdefs.h <<\EOF
16598 #define EXP_WIN32_DRIVER 1
16599 EOF
16600
16601                 EXP_WIN32_DRIVER=1
16602                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16603         else
16604                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16605                 EXP_WIN32_DRIVER=0
16606         fi
16607         ;;
16608 (*)
16609         EXP_WIN32_DRIVER=0
16610         INTERNALS_HDR=
16611         ;;
16612 esac
16613
16614 ###############################################################################
16615
16616 ###     use option --disable-echo to suppress full display compiling commands
16617
16618 echo "$as_me:16618: checking if you want to see long compiling messages" >&5
16619 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16620
16621 # Check whether --enable-echo or --disable-echo was given.
16622 if test "${enable_echo+set}" = set; then
16623   enableval="$enable_echo"
16624   test "$enableval" != no && enableval=yes
16625         if test "$enableval" != "yes" ; then
16626
16627         ECHO_LT='--silent'
16628         ECHO_LD='@echo linking $@;'
16629         RULE_CC='@echo compiling $<'
16630         SHOW_CC='@echo compiling $@'
16631         ECHO_CC='@'
16632
16633         else
16634
16635         ECHO_LT=''
16636         ECHO_LD=''
16637         RULE_CC=''
16638         SHOW_CC=''
16639         ECHO_CC=''
16640
16641         fi
16642 else
16643   enableval=yes
16644
16645         ECHO_LT=''
16646         ECHO_LD=''
16647         RULE_CC=''
16648         SHOW_CC=''
16649         ECHO_CC=''
16650
16651 fi;
16652 echo "$as_me:16652: result: $enableval" >&5
16653 echo "${ECHO_T}$enableval" >&6
16654
16655 if test "x$enable_echo" = xyes; then
16656         ECHO_LINK=
16657 else
16658         ECHO_LINK='@ echo linking $@ ... ;'
16659         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16660         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16661 fi
16662
16663 # --disable-stripping is used for debugging
16664
16665 echo "$as_me:16665: checking if you want to install stripped executables" >&5
16666 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16667
16668 # Check whether --enable-stripping or --disable-stripping was given.
16669 if test "${enable_stripping+set}" = set; then
16670   enableval="$enable_stripping"
16671   test "$enableval" != no && enableval=yes
16672         if test "$enableval" != "yes" ; then
16673     enable_stripping=no
16674         else
16675                 enable_stripping=yes
16676         fi
16677 else
16678   enableval=yes
16679         enable_stripping=yes
16680
16681 fi;
16682 echo "$as_me:16682: result: $enable_stripping" >&5
16683 echo "${ECHO_T}$enable_stripping" >&6
16684
16685 if test "$enable_stripping" = yes
16686 then
16687         INSTALL_OPT_S="-s"
16688 else
16689         INSTALL_OPT_S=
16690 fi
16691
16692 : "${INSTALL:=install}"
16693 echo "$as_me:16693: checking if install accepts -p option" >&5
16694 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16695 if test "${cf_cv_install_p+set}" = set; then
16696   echo $ECHO_N "(cached) $ECHO_C" >&6
16697 else
16698
16699         rm -rf ./conftest*
16700         date >conftest.in
16701         mkdir conftest.out
16702         sleep 3
16703         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16704         then
16705                 if test -f conftest.out/conftest.in
16706                 then
16707                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16708                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16709                         if test -s conftest.err
16710                         then
16711                                 cf_cv_install_p=no
16712                         else
16713                                 cf_cv_install_p=yes
16714                         fi
16715                 else
16716                         cf_cv_install_p=no
16717                 fi
16718         else
16719                 cf_cv_install_p=no
16720         fi
16721         rm -rf ./conftest*
16722
16723 fi
16724 echo "$as_me:16724: result: $cf_cv_install_p" >&5
16725 echo "${ECHO_T}$cf_cv_install_p" >&6
16726
16727 echo "$as_me:16727: checking if install needs to be told about ownership" >&5
16728 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16729 case `$ac_config_guess` in
16730 (*minix)
16731         with_install_o=yes
16732         ;;
16733 (*)
16734         with_install_o=no
16735         ;;
16736 esac
16737
16738 echo "$as_me:16738: result: $with_install_o" >&5
16739 echo "${ECHO_T}$with_install_o" >&6
16740 if test "x$with_install_o" = xyes
16741 then
16742         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'`"
16743 else
16744         INSTALL_OPT_O=
16745 fi
16746
16747 # If we're avoiding relinking of shared libraries during install, that is to
16748 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16749 # the install program has "-p" (for preserving timestamps).
16750 cf_cv_do_reranlib=yes
16751 if test "x$cf_cv_install_p" = xyes
16752 then
16753         if test "x$cf_cv_do_relink" != xyes
16754         then
16755                 cf_cv_do_reranlib=no
16756                 INSTALL_OPT_P="-p"
16757                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16758         fi
16759 fi
16760
16761 ###     use option --enable-warnings to turn on all gcc warnings
16762
16763 echo "$as_me:16763: checking if you want to use C11 _Noreturn feature" >&5
16764 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16765
16766 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16767 if test "${enable_stdnoreturn+set}" = set; then
16768   enableval="$enable_stdnoreturn"
16769   test "$enableval" != yes && enableval=no
16770         if test "$enableval" != "no" ; then
16771     enable_stdnoreturn=yes
16772         else
16773                 enable_stdnoreturn=no
16774         fi
16775 else
16776   enableval=no
16777         enable_stdnoreturn=no
16778
16779 fi;
16780 echo "$as_me:16780: result: $enable_stdnoreturn" >&5
16781 echo "${ECHO_T}$enable_stdnoreturn" >&6
16782
16783 if test $enable_stdnoreturn = yes; then
16784 echo "$as_me:16784: checking for C11 _Noreturn feature" >&5
16785 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16786 if test "${cf_cv_c11_noreturn+set}" = set; then
16787   echo $ECHO_N "(cached) $ECHO_C" >&6
16788 else
16789   cat >"conftest.$ac_ext" <<_ACEOF
16790 #line 16790 "configure"
16791 #include "confdefs.h"
16792
16793 #include <stdio.h>
16794 #include <stdlib.h>
16795 #include <stdnoreturn.h>
16796 static _Noreturn void giveup(void) { exit(0); }
16797
16798 int
16799 main (void)
16800 {
16801 if (feof(stdin)) giveup()
16802   ;
16803   return 0;
16804 }
16805 _ACEOF
16806 rm -f "conftest.$ac_objext"
16807 if { (eval echo "$as_me:16807: \"$ac_compile\"") >&5
16808   (eval $ac_compile) 2>&5
16809   ac_status=$?
16810   echo "$as_me:16810: \$? = $ac_status" >&5
16811   (exit "$ac_status"); } &&
16812          { ac_try='test -s "conftest.$ac_objext"'
16813   { (eval echo "$as_me:16813: \"$ac_try\"") >&5
16814   (eval $ac_try) 2>&5
16815   ac_status=$?
16816   echo "$as_me:16816: \$? = $ac_status" >&5
16817   (exit "$ac_status"); }; }; then
16818   cf_cv_c11_noreturn=yes
16819 else
16820   echo "$as_me: failed program was:" >&5
16821 cat "conftest.$ac_ext" >&5
16822 cf_cv_c11_noreturn=no
16823 fi
16824 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16825
16826 fi
16827 echo "$as_me:16827: result: $cf_cv_c11_noreturn" >&5
16828 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16829 else
16830         cf_cv_c11_noreturn=no,
16831 fi
16832
16833 if test "$cf_cv_c11_noreturn" = yes; then
16834
16835 cat >>confdefs.h <<\EOF
16836 #define HAVE_STDNORETURN_H 1
16837 EOF
16838
16839 cat >>confdefs.h <<EOF
16840 #define STDC_NORETURN _Noreturn
16841 EOF
16842
16843         HAVE_STDNORETURN_H=1
16844 else
16845         HAVE_STDNORETURN_H=0
16846 fi
16847
16848 if test "$GCC" = yes || test "$GXX" = yes
16849 then
16850
16851 if test "$GCC" = yes || test "$GXX" = yes
16852 then
16853         case $CFLAGS in
16854         (*-Werror=*)
16855                 cf_temp_flags=
16856                 for cf_temp_scan in $CFLAGS
16857                 do
16858                         case "x$cf_temp_scan" in
16859                         (x-Werror=format*)
16860
16861         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16862         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16863
16864                                 ;;
16865                         (x-Werror=*)
16866
16867         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16868         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16869
16870                                 ;;
16871                         (*)
16872
16873         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16874         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16875
16876                                 ;;
16877                         esac
16878                 done
16879                 if test "x$CFLAGS" != "x$cf_temp_flags"
16880                 then
16881                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16882
16883 echo "${as_me:-configure}:16883: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16884
16885                         CFLAGS="$cf_temp_flags"
16886                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16887
16888 echo "${as_me:-configure}:16888: testing ... fixed $CFLAGS ..." 1>&5
16889
16890                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16891
16892 echo "${as_me:-configure}:16892: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16893
16894                 fi
16895                 ;;
16896         esac
16897 fi
16898
16899 if test "$GCC" = yes || test "$GXX" = yes
16900 then
16901         case $CPPFLAGS in
16902         (*-Werror=*)
16903                 cf_temp_flags=
16904                 for cf_temp_scan in $CPPFLAGS
16905                 do
16906                         case "x$cf_temp_scan" in
16907                         (x-Werror=format*)
16908
16909         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16910         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16911
16912                                 ;;
16913                         (x-Werror=*)
16914
16915         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16916         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16917
16918                                 ;;
16919                         (*)
16920
16921         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16922         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16923
16924                                 ;;
16925                         esac
16926                 done
16927                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16928                 then
16929                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16930
16931 echo "${as_me:-configure}:16931: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16932
16933                         CPPFLAGS="$cf_temp_flags"
16934                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16935
16936 echo "${as_me:-configure}:16936: testing ... fixed $CPPFLAGS ..." 1>&5
16937
16938                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16939
16940 echo "${as_me:-configure}:16940: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16941
16942                 fi
16943                 ;;
16944         esac
16945 fi
16946
16947 if test "$GCC" = yes || test "$GXX" = yes
16948 then
16949         case $LDFLAGS in
16950         (*-Werror=*)
16951                 cf_temp_flags=
16952                 for cf_temp_scan in $LDFLAGS
16953                 do
16954                         case "x$cf_temp_scan" in
16955                         (x-Werror=format*)
16956
16957         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16958         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16959
16960                                 ;;
16961                         (x-Werror=*)
16962
16963         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16964         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16965
16966                                 ;;
16967                         (*)
16968
16969         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16970         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16971
16972                                 ;;
16973                         esac
16974                 done
16975                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16976                 then
16977                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16978
16979 echo "${as_me:-configure}:16979: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16980
16981                         LDFLAGS="$cf_temp_flags"
16982                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16983
16984 echo "${as_me:-configure}:16984: testing ... fixed $LDFLAGS ..." 1>&5
16985
16986                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16987
16988 echo "${as_me:-configure}:16988: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16989
16990                 fi
16991                 ;;
16992         esac
16993 fi
16994
16995 echo "$as_me:16995: checking if you want to turn on gcc warnings" >&5
16996 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16997
16998 # Check whether --enable-warnings or --disable-warnings was given.
16999 if test "${enable_warnings+set}" = set; then
17000   enableval="$enable_warnings"
17001   test "$enableval" != yes && enableval=no
17002         if test "$enableval" != "no" ; then
17003     enable_warnings=yes
17004         else
17005                 enable_warnings=no
17006         fi
17007 else
17008   enableval=no
17009         enable_warnings=no
17010
17011 fi;
17012 echo "$as_me:17012: result: $enable_warnings" >&5
17013 echo "${ECHO_T}$enable_warnings" >&6
17014 if test "$enable_warnings" = "yes"
17015 then
17016
17017 if test "x$have_x" = xyes; then
17018
17019 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17020 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17021 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17022 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17023 for cf_X_CFLAGS in $X_CFLAGS
17024 do
17025         case "x$cf_X_CFLAGS" in
17026         x-[IUD]*)
17027                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17028                 ;;
17029         *)
17030                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17031                 ;;
17032         esac
17033 done
17034
17035 cat >"conftest.$ac_ext" <<_ACEOF
17036 #line 17036 "configure"
17037 #include "confdefs.h"
17038
17039 #include <stdlib.h>
17040 #include <X11/Intrinsic.h>
17041
17042 int
17043 main (void)
17044 {
17045 String foo = malloc(1); free((void*)foo)
17046   ;
17047   return 0;
17048 }
17049 _ACEOF
17050 rm -f "conftest.$ac_objext"
17051 if { (eval echo "$as_me:17051: \"$ac_compile\"") >&5
17052   (eval $ac_compile) 2>&5
17053   ac_status=$?
17054   echo "$as_me:17054: \$? = $ac_status" >&5
17055   (exit "$ac_status"); } &&
17056          { ac_try='test -s "conftest.$ac_objext"'
17057   { (eval echo "$as_me:17057: \"$ac_try\"") >&5
17058   (eval $ac_try) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit "$ac_status"); }; }; then
17062
17063 echo "$as_me:17063: checking for X11/Xt const-feature" >&5
17064 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17065 if test "${cf_cv_const_x_string+set}" = set; then
17066   echo $ECHO_N "(cached) $ECHO_C" >&6
17067 else
17068
17069         cat >"conftest.$ac_ext" <<_ACEOF
17070 #line 17070 "configure"
17071 #include "confdefs.h"
17072
17073 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17074 #undef  XTSTRINGDEFINES /* X11R5 and later */
17075 #include <stdlib.h>
17076 #include <X11/Intrinsic.h>
17077
17078 int
17079 main (void)
17080 {
17081 String foo = malloc(1); *foo = 0
17082   ;
17083   return 0;
17084 }
17085 _ACEOF
17086 rm -f "conftest.$ac_objext"
17087 if { (eval echo "$as_me:17087: \"$ac_compile\"") >&5
17088   (eval $ac_compile) 2>&5
17089   ac_status=$?
17090   echo "$as_me:17090: \$? = $ac_status" >&5
17091   (exit "$ac_status"); } &&
17092          { ac_try='test -s "conftest.$ac_objext"'
17093   { (eval echo "$as_me:17093: \"$ac_try\"") >&5
17094   (eval $ac_try) 2>&5
17095   ac_status=$?
17096   echo "$as_me:17096: \$? = $ac_status" >&5
17097   (exit "$ac_status"); }; }; then
17098
17099                         cf_cv_const_x_string=no
17100
17101 else
17102   echo "$as_me: failed program was:" >&5
17103 cat "conftest.$ac_ext" >&5
17104
17105                         cf_cv_const_x_string=yes
17106
17107 fi
17108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17109
17110 fi
17111 echo "$as_me:17111: result: $cf_cv_const_x_string" >&5
17112 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17113
17114 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17115 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17116 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17117
17118 case "$cf_cv_const_x_string" in
17119 (no)
17120
17121         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17122         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17123
17124         ;;
17125 (*)
17126
17127         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17128         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17129
17130         ;;
17131 esac
17132
17133 else
17134   echo "$as_me: failed program was:" >&5
17135 cat "conftest.$ac_ext" >&5
17136 fi
17137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17138  fi
17139 cat > "conftest.$ac_ext" <<EOF
17140 #line 17140 "${as_me:-configure}"
17141 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17142 EOF
17143 if test "$INTEL_COMPILER" = yes
17144 then
17145 # The "-wdXXX" options suppress warnings:
17146 # remark #1419: external declaration in primary source file
17147 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17148 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17149 # remark #193: zero used for undefined preprocessing identifier
17150 # remark #593: variable "curs_sb_left_arrow" was set but never used
17151 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17152 # remark #869: parameter "tw" was never referenced
17153 # remark #981: operands are evaluated in unspecified order
17154 # warning #279: controlling expression is constant
17155
17156         { echo "$as_me:17156: checking for $CC warning options..." >&5
17157 echo "$as_me: checking for $CC warning options..." >&6;}
17158         cf_save_CFLAGS="$CFLAGS"
17159         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17160         for cf_opt in \
17161                 wd1419 \
17162                 wd1683 \
17163                 wd1684 \
17164                 wd193 \
17165                 wd593 \
17166                 wd279 \
17167                 wd810 \
17168                 wd869 \
17169                 wd981
17170         do
17171                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17172                 if { (eval echo "$as_me:17172: \"$ac_compile\"") >&5
17173   (eval $ac_compile) 2>&5
17174   ac_status=$?
17175   echo "$as_me:17175: \$? = $ac_status" >&5
17176   (exit "$ac_status"); }; then
17177                         test -n "$verbose" && echo "$as_me:17177: result: ... -$cf_opt" >&5
17178 echo "${ECHO_T}... -$cf_opt" >&6
17179                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17180                 fi
17181         done
17182         CFLAGS="$cf_save_CFLAGS"
17183 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17184 then
17185         { echo "$as_me:17185: checking for $CC warning options..." >&5
17186 echo "$as_me: checking for $CC warning options..." >&6;}
17187         cf_save_CFLAGS="$CFLAGS"
17188         cf_warn_CONST=""
17189         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17190         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17191         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17192         for cf_opt in W Wall \
17193                 Wbad-function-cast \
17194                 Wcast-align \
17195                 Wcast-qual \
17196                 Wdeclaration-after-statement \
17197                 Wextra \
17198                 Winline \
17199                 Wmissing-declarations \
17200                 Wmissing-prototypes \
17201                 Wnested-externs \
17202                 Wpointer-arith \
17203                 Wshadow \
17204                 Wstrict-prototypes \
17205                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17206         do
17207                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17208                 if { (eval echo "$as_me:17208: \"$ac_compile\"") >&5
17209   (eval $ac_compile) 2>&5
17210   ac_status=$?
17211   echo "$as_me:17211: \$? = $ac_status" >&5
17212   (exit "$ac_status"); }; then
17213                         test -n "$verbose" && echo "$as_me:17213: result: ... -$cf_opt" >&5
17214 echo "${ECHO_T}... -$cf_opt" >&6
17215                         case "$cf_opt" in
17216                         (Winline)
17217                                 case "$GCC_VERSION" in
17218                                 ([34].*)
17219                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17220
17221 echo "${as_me:-configure}:17221: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17222
17223                                         continue;;
17224                                 esac
17225                                 ;;
17226                         (Wpointer-arith)
17227                                 case "$GCC_VERSION" in
17228                                 ([12].*)
17229                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17230
17231 echo "${as_me:-configure}:17231: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17232
17233                                         continue;;
17234                                 esac
17235                                 ;;
17236                         esac
17237                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17238                 fi
17239         done
17240         CFLAGS="$cf_save_CFLAGS"
17241 fi
17242 rm -rf ./conftest*
17243
17244 fi
17245
17246 if test "$GCC" = yes || test "$GXX" = yes
17247 then
17248 cat > conftest.i <<EOF
17249 #ifndef GCC_PRINTF
17250 #define GCC_PRINTF 0
17251 #endif
17252 #ifndef GCC_SCANF
17253 #define GCC_SCANF 0
17254 #endif
17255 #ifndef GCC_NORETURN
17256 #define GCC_NORETURN /* nothing */
17257 #endif
17258 #ifndef GCC_UNUSED
17259 #define GCC_UNUSED /* nothing */
17260 #endif
17261 EOF
17262 if test "$GCC" = yes
17263 then
17264         { echo "$as_me:17264: checking for $CC __attribute__ directives..." >&5
17265 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17266 cat > "conftest.$ac_ext" <<EOF
17267 #line 17267 "${as_me:-configure}"
17268 #include "confdefs.h"
17269 #include "conftest.h"
17270 #include "conftest.i"
17271 #if     GCC_PRINTF
17272 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17273 #else
17274 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17275 #endif
17276 #if     GCC_SCANF
17277 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17278 #else
17279 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17280 #endif
17281 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17282 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17283 extern GCC_NORETURN void foo(void);
17284 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17285 EOF
17286         cf_printf_attribute=no
17287         cf_scanf_attribute=no
17288         for cf_attribute in scanf printf unused noreturn
17289         do
17290
17291 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17292
17293                 cf_directive="__attribute__(($cf_attribute))"
17294                 echo "checking for $CC $cf_directive" 1>&5
17295
17296                 case "$cf_attribute" in
17297                 (printf)
17298                         cf_printf_attribute=yes
17299                         cat >conftest.h <<EOF
17300 #define GCC_$cf_ATTRIBUTE 1
17301 EOF
17302                         ;;
17303                 (scanf)
17304                         cf_scanf_attribute=yes
17305                         cat >conftest.h <<EOF
17306 #define GCC_$cf_ATTRIBUTE 1
17307 EOF
17308                         ;;
17309                 (*)
17310                         cat >conftest.h <<EOF
17311 #define GCC_$cf_ATTRIBUTE $cf_directive
17312 EOF
17313                         ;;
17314                 esac
17315
17316                 if { (eval echo "$as_me:17316: \"$ac_compile\"") >&5
17317   (eval $ac_compile) 2>&5
17318   ac_status=$?
17319   echo "$as_me:17319: \$? = $ac_status" >&5
17320   (exit "$ac_status"); }; then
17321                         test -n "$verbose" && echo "$as_me:17321: result: ... $cf_attribute" >&5
17322 echo "${ECHO_T}... $cf_attribute" >&6
17323                         cat conftest.h >>confdefs.h
17324                         case "$cf_attribute" in
17325                         (noreturn)
17326
17327 cat >>confdefs.h <<EOF
17328 #define GCC_NORETURN $cf_directive
17329 EOF
17330
17331                                 ;;
17332                         (printf)
17333                                 cf_value='/* nothing */'
17334                                 if test "$cf_printf_attribute" != no ; then
17335                                         cf_value='__attribute__((format(printf,fmt,var)))'
17336
17337 cat >>confdefs.h <<\EOF
17338 #define GCC_PRINTF 1
17339 EOF
17340
17341                                 fi
17342
17343 cat >>confdefs.h <<EOF
17344 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17345 EOF
17346
17347                                 ;;
17348                         (scanf)
17349                                 cf_value='/* nothing */'
17350                                 if test "$cf_scanf_attribute" != no ; then
17351                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17352
17353 cat >>confdefs.h <<\EOF
17354 #define GCC_SCANF 1
17355 EOF
17356
17357                                 fi
17358
17359 cat >>confdefs.h <<EOF
17360 #define GCC_SCANFLIKE(fmt,var) $cf_value
17361 EOF
17362
17363                                 ;;
17364                         (unused)
17365
17366 cat >>confdefs.h <<EOF
17367 #define GCC_UNUSED $cf_directive
17368 EOF
17369
17370                                 ;;
17371                         esac
17372                 fi
17373         done
17374 else
17375         ${FGREP-fgrep} define conftest.i >>confdefs.h
17376 fi
17377 rm -rf ./conftest*
17378 fi
17379
17380 fi
17381
17382 if test "x$enable_warnings" = "xyes"; then
17383
17384         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17385
17386         if test "x$cf_with_cxx" = xyes ; then
17387
17388 INTEL_CPLUSPLUS=no
17389
17390 if test "$GCC" = yes ; then
17391         case "$host_os" in
17392         (linux*|gnu*)
17393                 echo "$as_me:17393: checking if this is really Intel C++ compiler" >&5
17394 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17395                 cf_save_CFLAGS="$CXXFLAGS"
17396                 CXXFLAGS="$CXXFLAGS -no-gcc"
17397                 cat >"conftest.$ac_ext" <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17400
17401 int
17402 main (void)
17403 {
17404
17405 #ifdef __INTEL_COMPILER
17406 #else
17407 make an error
17408 #endif
17409
17410   ;
17411   return 0;
17412 }
17413 _ACEOF
17414 rm -f "conftest.$ac_objext"
17415 if { (eval echo "$as_me:17415: \"$ac_compile\"") >&5
17416   (eval $ac_compile) 2>&5
17417   ac_status=$?
17418   echo "$as_me:17418: \$? = $ac_status" >&5
17419   (exit "$ac_status"); } &&
17420          { ac_try='test -s "conftest.$ac_objext"'
17421   { (eval echo "$as_me:17421: \"$ac_try\"") >&5
17422   (eval $ac_try) 2>&5
17423   ac_status=$?
17424   echo "$as_me:17424: \$? = $ac_status" >&5
17425   (exit "$ac_status"); }; }; then
17426   INTEL_CPLUSPLUS=yes
17427 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17428
17429 else
17430   echo "$as_me: failed program was:" >&5
17431 cat "conftest.$ac_ext" >&5
17432 fi
17433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17434                 CXXFLAGS="$cf_save_CFLAGS"
17435                 echo "$as_me:17435: result: $INTEL_CPLUSPLUS" >&5
17436 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17437                 ;;
17438         esac
17439 fi
17440
17441 CLANG_CPLUSPLUS=no
17442
17443 if test "$GCC" = yes ; then
17444         echo "$as_me:17444: checking if this is really Clang C++ compiler" >&5
17445 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17446         cf_save_CFLAGS="$CXXFLAGS"
17447         cat >"conftest.$ac_ext" <<_ACEOF
17448 #line 17448 "configure"
17449 #include "confdefs.h"
17450
17451 int
17452 main (void)
17453 {
17454
17455 #ifdef __clang__
17456 #else
17457 make an error
17458 #endif
17459
17460   ;
17461   return 0;
17462 }
17463 _ACEOF
17464 rm -f "conftest.$ac_objext"
17465 if { (eval echo "$as_me:17465: \"$ac_compile\"") >&5
17466   (eval $ac_compile) 2>&5
17467   ac_status=$?
17468   echo "$as_me:17468: \$? = $ac_status" >&5
17469   (exit "$ac_status"); } &&
17470          { ac_try='test -s "conftest.$ac_objext"'
17471   { (eval echo "$as_me:17471: \"$ac_try\"") >&5
17472   (eval $ac_try) 2>&5
17473   ac_status=$?
17474   echo "$as_me:17474: \$? = $ac_status" >&5
17475   (exit "$ac_status"); }; }; then
17476   CLANG_CPLUSPLUS=yes
17477
17478 else
17479   echo "$as_me: failed program was:" >&5
17480 cat "conftest.$ac_ext" >&5
17481 fi
17482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17483         CXXFLAGS="$cf_save_CFLAGS"
17484         echo "$as_me:17484: result: $CLANG_CPLUSPLUS" >&5
17485 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17486 fi
17487
17488 CLANG_VERSION=none
17489
17490 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17491         case "$CC" in
17492         (c[1-9][0-9]|*/c[1-9][0-9])
17493                 { echo "$as_me:17493: WARNING: replacing broken compiler alias $CC" >&5
17494 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17495                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17496                 CC=clang
17497                 ;;
17498         esac
17499
17500         echo "$as_me:17500: checking version of $CC" >&5
17501 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17502         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.].*//'`"
17503         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17504         echo "$as_me:17504: result: $CLANG_VERSION" >&5
17505 echo "${ECHO_T}$CLANG_VERSION" >&6
17506
17507         for cf_clang_opt in \
17508                 -Qunused-arguments \
17509                 -Wno-error=implicit-function-declaration
17510         do
17511                 echo "$as_me:17511: checking if option $cf_clang_opt works" >&5
17512 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17513                 cf_save_CFLAGS="$CFLAGS"
17514                 CFLAGS="$CFLAGS $cf_clang_opt"
17515                 cat >"conftest.$ac_ext" <<_ACEOF
17516 #line 17516 "configure"
17517 #include "confdefs.h"
17518
17519                         #include <stdio.h>
17520 int
17521 main (void)
17522 {
17523
17524                         printf("hello!\\n");
17525   ;
17526   return 0;
17527 }
17528 _ACEOF
17529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17530 if { (eval echo "$as_me:17530: \"$ac_link\"") >&5
17531   (eval $ac_link) 2>&5
17532   ac_status=$?
17533   echo "$as_me:17533: \$? = $ac_status" >&5
17534   (exit "$ac_status"); } &&
17535          { ac_try='test -s "conftest$ac_exeext"'
17536   { (eval echo "$as_me:17536: \"$ac_try\"") >&5
17537   (eval $ac_try) 2>&5
17538   ac_status=$?
17539   echo "$as_me:17539: \$? = $ac_status" >&5
17540   (exit "$ac_status"); }; }; then
17541
17542                         cf_clang_optok=yes
17543 else
17544   echo "$as_me: failed program was:" >&5
17545 cat "conftest.$ac_ext" >&5
17546
17547                         cf_clang_optok=no
17548 fi
17549 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17550                 echo "$as_me:17550: result: $cf_clang_optok" >&5
17551 echo "${ECHO_T}$cf_clang_optok" >&6
17552                 CFLAGS="$cf_save_CFLAGS"
17553                 if test "$cf_clang_optok" = yes; then
17554                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17555
17556 echo "${as_me:-configure}:17556: testing adding option $cf_clang_opt ..." 1>&5
17557
17558         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17559         CFLAGS="${CFLAGS}$cf_clang_opt"
17560
17561                 fi
17562         done
17563 fi
17564
17565 ac_ext=cc
17566 ac_cpp='$CXXCPP $CPPFLAGS'
17567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17568 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17570 ac_main_return="return"
17571
17572 cat > conftest.$ac_ext <<EOF
17573 #line 17573 "configure"
17574 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17575 EOF
17576
17577 if test "$INTEL_CPLUSPLUS" = yes
17578 then
17579 # The "-wdXXX" options suppress warnings:
17580 # remark #1419: external declaration in primary source file
17581 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17582 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17583 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17584 # remark #193: zero used for undefined preprocessing identifier
17585 # remark #593: variable "curs_sb_left_arrow" was set but never used
17586 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17587 # remark #869: parameter "tw" was never referenced
17588 # remark #981: operands are evaluated in unspecified order
17589 # warning #269: invalid format string conversion
17590
17591         { echo "$as_me:17591: checking for $CC warning options..." >&5
17592 echo "$as_me: checking for $CC warning options..." >&6;}
17593         cf_save_CXXFLAGS="$CXXFLAGS"
17594         EXTRA_CXXFLAGS="-Wall"
17595         for cf_opt in \
17596                 wd1419 \
17597                 wd1682 \
17598                 wd1683 \
17599                 wd1684 \
17600                 wd193 \
17601                 wd279 \
17602                 wd593 \
17603                 wd810 \
17604                 wd869 \
17605                 wd981
17606         do
17607                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17608                 if { (eval echo "$as_me:17608: \"$ac_compile\"") >&5
17609   (eval $ac_compile) 2>&5
17610   ac_status=$?
17611   echo "$as_me:17611: \$? = $ac_status" >&5
17612   (exit "$ac_status"); }; then
17613                         test -n "$verbose" && echo "$as_me:17613: result: ... -$cf_opt" >&5
17614 echo "${ECHO_T}... -$cf_opt" >&6
17615                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17616                 fi
17617         done
17618         CXXFLAGS="$cf_save_CXXFLAGS"
17619
17620 elif test "$GXX" = yes
17621 then
17622         { echo "$as_me:17622: checking for $CXX warning options..." >&5
17623 echo "$as_me: checking for $CXX warning options..." >&6;}
17624         cf_save_CXXFLAGS="$CXXFLAGS"
17625         EXTRA_CXXFLAGS="-W -Wall"
17626         cf_gxx_extra_warnings=""
17627         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17628         case "$GXX_VERSION" in
17629         ([1-2].*)
17630                 ;;
17631         (*)
17632                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17633                 ;;
17634         esac
17635         for cf_opt in \
17636                 Wabi \
17637                 fabi-version=0 \
17638                 Wextra \
17639                 Wignored-qualifiers \
17640                 Wlogical-op \
17641                 Woverloaded-virtual \
17642                 Wsign-promo \
17643                 Wsynth \
17644                 Wold-style-cast \
17645                 Wcast-align \
17646                 Wcast-qual \
17647                 Wpointer-arith \
17648                 Wshadow \
17649                 Wundef $cf_gxx_extra_warnings Wno-unused
17650         do
17651                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17652                 if { (eval echo "$as_me:17652: \"$ac_compile\"") >&5
17653   (eval $ac_compile) 2>&5
17654   ac_status=$?
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit "$ac_status"); }; then
17657                         test -n "$verbose" && echo "$as_me:17657: result: ... -$cf_opt" >&5
17658 echo "${ECHO_T}... -$cf_opt" >&6
17659                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17660                 else
17661                         test -n "$verbose" && echo "$as_me:17661: result: ... no -$cf_opt" >&5
17662 echo "${ECHO_T}... no -$cf_opt" >&6
17663                 fi
17664         done
17665         CXXFLAGS="$cf_save_CXXFLAGS"
17666 fi
17667
17668 rm -rf ./conftest*
17669 ac_ext=c
17670 ac_cpp='$CPP $CPPFLAGS'
17671 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17672 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17673 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17674 ac_main_return="return"
17675
17676         fi
17677 fi
17678
17679 echo "$as_me:17679: checking if you want to work around bogus compiler/loader warnings" >&5
17680 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17681
17682 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17683 if test "${enable_string_hacks+set}" = set; then
17684   enableval="$enable_string_hacks"
17685   enable_string_hacks=$enableval
17686 else
17687   enable_string_hacks=no
17688 fi;
17689 echo "$as_me:17689: result: $enable_string_hacks" >&5
17690 echo "${ECHO_T}$enable_string_hacks" >&6
17691
17692 if test "x$enable_string_hacks" = "xyes"; then
17693
17694 cat >>confdefs.h <<\EOF
17695 #define USE_STRING_HACKS 1
17696 EOF
17697
17698         { echo "$as_me:17698: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17699 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17700         echo "$as_me:17700: checking for strlcat" >&5
17701 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17702 if test "${ac_cv_func_strlcat+set}" = set; then
17703   echo $ECHO_N "(cached) $ECHO_C" >&6
17704 else
17705   cat >"conftest.$ac_ext" <<_ACEOF
17706 #line 17706 "configure"
17707 #include "confdefs.h"
17708 #define strlcat autoconf_temporary
17709 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17710 #undef strlcat
17711
17712 #ifdef __cplusplus
17713 extern "C"
17714 #endif
17715
17716 /* We use char because int might match the return type of a gcc2
17717    builtin and then its argument prototype would still apply.  */
17718 char strlcat (void);
17719
17720 int
17721 main (void)
17722 {
17723
17724 /* The GNU C library defines stubs for functions which it implements
17725     to always fail with ENOSYS.  Some functions are actually named
17726     something starting with __ and the normal name is an alias.  */
17727 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17728 #error found stub for strlcat
17729 #endif
17730
17731         return strlcat ();
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17737 if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
17738   (eval $ac_link) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit "$ac_status"); } &&
17742          { ac_try='test -s "conftest$ac_exeext"'
17743   { (eval echo "$as_me:17743: \"$ac_try\"") >&5
17744   (eval $ac_try) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit "$ac_status"); }; }; then
17748   ac_cv_func_strlcat=yes
17749 else
17750   echo "$as_me: failed program was:" >&5
17751 cat "conftest.$ac_ext" >&5
17752 ac_cv_func_strlcat=no
17753 fi
17754 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17755 fi
17756 echo "$as_me:17756: result: $ac_cv_func_strlcat" >&5
17757 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17758 if test "$ac_cv_func_strlcat" = yes; then
17759
17760 cat >>confdefs.h <<\EOF
17761 #define HAVE_STRLCAT 1
17762 EOF
17763
17764 else
17765
17766                 echo "$as_me:17766: checking for strlcat in -lbsd" >&5
17767 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17768 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17769   echo $ECHO_N "(cached) $ECHO_C" >&6
17770 else
17771   ac_check_lib_save_LIBS=$LIBS
17772 LIBS="-lbsd  $LIBS"
17773 cat >"conftest.$ac_ext" <<_ACEOF
17774 #line 17774 "configure"
17775 #include "confdefs.h"
17776
17777 /* Override any gcc2 internal prototype to avoid an error.  */
17778 #ifdef __cplusplus
17779 extern "C"
17780 #endif
17781 /* We use char because int might match the return type of a gcc2
17782    builtin and then its argument prototype would still apply.  */
17783 char strlcat ();
17784 int
17785 main (void)
17786 {
17787 strlcat ();
17788   ;
17789   return 0;
17790 }
17791 _ACEOF
17792 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17793 if { (eval echo "$as_me:17793: \"$ac_link\"") >&5
17794   (eval $ac_link) 2>&5
17795   ac_status=$?
17796   echo "$as_me:17796: \$? = $ac_status" >&5
17797   (exit "$ac_status"); } &&
17798          { ac_try='test -s "conftest$ac_exeext"'
17799   { (eval echo "$as_me:17799: \"$ac_try\"") >&5
17800   (eval $ac_try) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit "$ac_status"); }; }; then
17804   ac_cv_lib_bsd_strlcat=yes
17805 else
17806   echo "$as_me: failed program was:" >&5
17807 cat "conftest.$ac_ext" >&5
17808 ac_cv_lib_bsd_strlcat=no
17809 fi
17810 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17811 LIBS=$ac_check_lib_save_LIBS
17812 fi
17813 echo "$as_me:17813: result: $ac_cv_lib_bsd_strlcat" >&5
17814 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17815 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17816
17817 cf_add_libs="$LIBS"
17818 # reverse order
17819 cf_add_0lib=
17820 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17821 # filter duplicates
17822 for cf_add_1lib in $cf_add_0lib; do
17823         for cf_add_2lib in $cf_add_libs; do
17824                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17825                         cf_add_1lib=
17826                         break
17827                 fi
17828         done
17829         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17830 done
17831 LIBS="$cf_add_libs"
17832
17833 for ac_header in bsd/string.h
17834 do
17835 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17836 echo "$as_me:17836: checking for $ac_header" >&5
17837 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17838 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17839   echo $ECHO_N "(cached) $ECHO_C" >&6
17840 else
17841   cat >"conftest.$ac_ext" <<_ACEOF
17842 #line 17842 "configure"
17843 #include "confdefs.h"
17844 #include <$ac_header>
17845 _ACEOF
17846 if { (eval echo "$as_me:17846: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17847   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17848   ac_status=$?
17849   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17850   rm -f conftest.er1
17851   cat conftest.err >&5
17852   echo "$as_me:17852: \$? = $ac_status" >&5
17853   (exit "$ac_status"); } >/dev/null; then
17854   if test -s conftest.err; then
17855     ac_cpp_err=$ac_c_preproc_warn_flag
17856   else
17857     ac_cpp_err=
17858   fi
17859 else
17860   ac_cpp_err=yes
17861 fi
17862 if test -z "$ac_cpp_err"; then
17863   eval "$as_ac_Header=yes"
17864 else
17865   echo "$as_me: failed program was:" >&5
17866   cat "conftest.$ac_ext" >&5
17867   eval "$as_ac_Header=no"
17868 fi
17869 rm -f conftest.err "conftest.$ac_ext"
17870 fi
17871 echo "$as_me:17871: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17872 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17873 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17874   cat >>confdefs.h <<EOF
17875 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17876 EOF
17877
17878 fi
17879 done
17880
17881 cat >>confdefs.h <<\EOF
17882 #define HAVE_STRLCAT 1
17883 EOF
17884
17885 fi
17886
17887 fi
17888
17889 for ac_func in strlcpy snprintf
17890 do
17891 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17892 echo "$as_me:17892: checking for $ac_func" >&5
17893 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17894 if eval "test \"\${$as_ac_var+set}\" = set"; then
17895   echo $ECHO_N "(cached) $ECHO_C" >&6
17896 else
17897   cat >"conftest.$ac_ext" <<_ACEOF
17898 #line 17898 "configure"
17899 #include "confdefs.h"
17900 #define $ac_func autoconf_temporary
17901 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17902 #undef $ac_func
17903
17904 #ifdef __cplusplus
17905 extern "C"
17906 #endif
17907
17908 /* We use char because int might match the return type of a gcc2
17909    builtin and then its argument prototype would still apply.  */
17910 char $ac_func (void);
17911
17912 int
17913 main (void)
17914 {
17915
17916 /* The GNU C library defines stubs for functions which it implements
17917     to always fail with ENOSYS.  Some functions are actually named
17918     something starting with __ and the normal name is an alias.  */
17919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17920 #error found stub for $ac_func
17921 #endif
17922
17923         return $ac_func ();
17924   ;
17925   return 0;
17926 }
17927 _ACEOF
17928 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17929 if { (eval echo "$as_me:17929: \"$ac_link\"") >&5
17930   (eval $ac_link) 2>&5
17931   ac_status=$?
17932   echo "$as_me:17932: \$? = $ac_status" >&5
17933   (exit "$ac_status"); } &&
17934          { ac_try='test -s "conftest$ac_exeext"'
17935   { (eval echo "$as_me:17935: \"$ac_try\"") >&5
17936   (eval $ac_try) 2>&5
17937   ac_status=$?
17938   echo "$as_me:17938: \$? = $ac_status" >&5
17939   (exit "$ac_status"); }; }; then
17940   eval "$as_ac_var=yes"
17941 else
17942   echo "$as_me: failed program was:" >&5
17943 cat "conftest.$ac_ext" >&5
17944 eval "$as_ac_var=no"
17945 fi
17946 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17947 fi
17948 echo "$as_me:17948: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17949 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17950 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17951   cat >>confdefs.h <<EOF
17952 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17953 EOF
17954
17955 fi
17956 done
17957
17958 fi
17959
17960 ###     use option --enable-assertions to turn on generation of assertion code
17961 echo "$as_me:17961: checking if you want to enable runtime assertions" >&5
17962 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17963
17964 # Check whether --enable-assertions or --disable-assertions was given.
17965 if test "${enable_assertions+set}" = set; then
17966   enableval="$enable_assertions"
17967   with_assertions=$enableval
17968 else
17969   with_assertions=no
17970 fi;
17971 echo "$as_me:17971: result: $with_assertions" >&5
17972 echo "${ECHO_T}$with_assertions" >&6
17973 if test -n "$GCC"
17974 then
17975         if test "$with_assertions" = no
17976         then
17977                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17978         else
17979
17980         ADAFLAGS="$ADAFLAGS -gnata"
17981
17982         fi
17983 fi
17984
17985 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17986
17987 echo "$as_me:17987: checking if you want to use dmalloc for testing" >&5
17988 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17989
17990 # Check whether --with-dmalloc or --without-dmalloc was given.
17991 if test "${with_dmalloc+set}" = set; then
17992   withval="$with_dmalloc"
17993   case "x$withval" in
17994         (x|xno) ;;
17995         (*)
17996                 : "${with_cflags:=-g}"
17997                 : "${enable_leaks:=no}"
17998                 with_dmalloc=yes
17999
18000 cat >>confdefs.h <<EOF
18001 #define USE_DMALLOC 1
18002 EOF
18003
18004                 ;;
18005         esac
18006 else
18007   with_dmalloc=
18008 fi;
18009 echo "$as_me:18009: result: ${with_dmalloc:-no}" >&5
18010 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18011
18012 case ".$with_cflags" in
18013 (.*-g*)
18014         case .$CFLAGS in
18015         (.*-g*)
18016                 ;;
18017         (*)
18018
18019 cf_fix_cppflags=no
18020 cf_new_cflags=
18021 cf_new_cppflags=
18022 cf_new_extra_cppflags=
18023
18024 for cf_add_cflags in -g
18025 do
18026 case "$cf_fix_cppflags" in
18027 (no)
18028         case "$cf_add_cflags" in
18029         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18030                 case "$cf_add_cflags" in
18031                 (-D*)
18032                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18033
18034                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18035                                 && test -z "${cf_tst_cflags}" \
18036                                 && cf_fix_cppflags=yes
18037
18038                         if test "$cf_fix_cppflags" = yes ; then
18039
18040         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18041         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18042
18043                                 continue
18044                         elif test "${cf_tst_cflags}" = "\"'" ; then
18045
18046         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18047         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18048
18049                                 continue
18050                         fi
18051                         ;;
18052                 esac
18053                 case "$CPPFLAGS" in
18054                 (*$cf_add_cflags)
18055                         ;;
18056                 (*)
18057                         case "$cf_add_cflags" in
18058                         (-D*)
18059                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18060
18061 CPPFLAGS=`echo "$CPPFLAGS" | \
18062         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18063                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18064
18065                                 ;;
18066                         esac
18067
18068         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18069         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18070
18071                         ;;
18072                 esac
18073                 ;;
18074         (*)
18075
18076         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18077         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18078
18079                 ;;
18080         esac
18081         ;;
18082 (yes)
18083
18084         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18085         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18086
18087         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18088
18089         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18090                 && test -z "${cf_tst_cflags}" \
18091                 && cf_fix_cppflags=no
18092         ;;
18093 esac
18094 done
18095
18096 if test -n "$cf_new_cflags" ; then
18097
18098         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18099         CFLAGS="${CFLAGS}$cf_new_cflags"
18100
18101 fi
18102
18103 if test -n "$cf_new_cppflags" ; then
18104
18105         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18106         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18107
18108 fi
18109
18110 if test -n "$cf_new_extra_cppflags" ; then
18111
18112         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18113         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18114
18115 fi
18116
18117                 ;;
18118         esac
18119         ;;
18120 esac
18121
18122 if test "$with_dmalloc" = yes ; then
18123         echo "$as_me:18123: checking for dmalloc.h" >&5
18124 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18125 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18126   echo $ECHO_N "(cached) $ECHO_C" >&6
18127 else
18128   cat >"conftest.$ac_ext" <<_ACEOF
18129 #line 18129 "configure"
18130 #include "confdefs.h"
18131 #include <dmalloc.h>
18132 _ACEOF
18133 if { (eval echo "$as_me:18133: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18134   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18135   ac_status=$?
18136   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18137   rm -f conftest.er1
18138   cat conftest.err >&5
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit "$ac_status"); } >/dev/null; then
18141   if test -s conftest.err; then
18142     ac_cpp_err=$ac_c_preproc_warn_flag
18143   else
18144     ac_cpp_err=
18145   fi
18146 else
18147   ac_cpp_err=yes
18148 fi
18149 if test -z "$ac_cpp_err"; then
18150   ac_cv_header_dmalloc_h=yes
18151 else
18152   echo "$as_me: failed program was:" >&5
18153   cat "conftest.$ac_ext" >&5
18154   ac_cv_header_dmalloc_h=no
18155 fi
18156 rm -f conftest.err "conftest.$ac_ext"
18157 fi
18158 echo "$as_me:18158: result: $ac_cv_header_dmalloc_h" >&5
18159 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18160 if test "$ac_cv_header_dmalloc_h" = yes; then
18161
18162 echo "$as_me:18162: checking for dmalloc_debug in -ldmalloc" >&5
18163 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18164 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18165   echo $ECHO_N "(cached) $ECHO_C" >&6
18166 else
18167   ac_check_lib_save_LIBS=$LIBS
18168 LIBS="-ldmalloc  $LIBS"
18169 cat >"conftest.$ac_ext" <<_ACEOF
18170 #line 18170 "configure"
18171 #include "confdefs.h"
18172
18173 /* Override any gcc2 internal prototype to avoid an error.  */
18174 #ifdef __cplusplus
18175 extern "C"
18176 #endif
18177 /* We use char because int might match the return type of a gcc2
18178    builtin and then its argument prototype would still apply.  */
18179 char dmalloc_debug ();
18180 int
18181 main (void)
18182 {
18183 dmalloc_debug ();
18184   ;
18185   return 0;
18186 }
18187 _ACEOF
18188 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18189 if { (eval echo "$as_me:18189: \"$ac_link\"") >&5
18190   (eval $ac_link) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit "$ac_status"); } &&
18194          { ac_try='test -s "conftest$ac_exeext"'
18195   { (eval echo "$as_me:18195: \"$ac_try\"") >&5
18196   (eval $ac_try) 2>&5
18197   ac_status=$?
18198   echo "$as_me:18198: \$? = $ac_status" >&5
18199   (exit "$ac_status"); }; }; then
18200   ac_cv_lib_dmalloc_dmalloc_debug=yes
18201 else
18202   echo "$as_me: failed program was:" >&5
18203 cat "conftest.$ac_ext" >&5
18204 ac_cv_lib_dmalloc_dmalloc_debug=no
18205 fi
18206 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18207 LIBS=$ac_check_lib_save_LIBS
18208 fi
18209 echo "$as_me:18209: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18210 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18211 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18212   cat >>confdefs.h <<EOF
18213 #define HAVE_LIBDMALLOC 1
18214 EOF
18215
18216   LIBS="-ldmalloc $LIBS"
18217
18218 fi
18219
18220 fi
18221
18222 fi
18223
18224 echo "$as_me:18224: checking if you want to use dbmalloc for testing" >&5
18225 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18226
18227 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18228 if test "${with_dbmalloc+set}" = set; then
18229   withval="$with_dbmalloc"
18230   case "x$withval" in
18231         (x|xno) ;;
18232         (*)
18233                 : "${with_cflags:=-g}"
18234                 : "${enable_leaks:=no}"
18235                 with_dbmalloc=yes
18236
18237 cat >>confdefs.h <<EOF
18238 #define USE_DBMALLOC 1
18239 EOF
18240
18241                 ;;
18242         esac
18243 else
18244   with_dbmalloc=
18245 fi;
18246 echo "$as_me:18246: result: ${with_dbmalloc:-no}" >&5
18247 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18248
18249 case ".$with_cflags" in
18250 (.*-g*)
18251         case .$CFLAGS in
18252         (.*-g*)
18253                 ;;
18254         (*)
18255
18256 cf_fix_cppflags=no
18257 cf_new_cflags=
18258 cf_new_cppflags=
18259 cf_new_extra_cppflags=
18260
18261 for cf_add_cflags in -g
18262 do
18263 case "$cf_fix_cppflags" in
18264 (no)
18265         case "$cf_add_cflags" in
18266         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18267                 case "$cf_add_cflags" in
18268                 (-D*)
18269                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18270
18271                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18272                                 && test -z "${cf_tst_cflags}" \
18273                                 && cf_fix_cppflags=yes
18274
18275                         if test "$cf_fix_cppflags" = yes ; then
18276
18277         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18278         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18279
18280                                 continue
18281                         elif test "${cf_tst_cflags}" = "\"'" ; then
18282
18283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18285
18286                                 continue
18287                         fi
18288                         ;;
18289                 esac
18290                 case "$CPPFLAGS" in
18291                 (*$cf_add_cflags)
18292                         ;;
18293                 (*)
18294                         case "$cf_add_cflags" in
18295                         (-D*)
18296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18297
18298 CPPFLAGS=`echo "$CPPFLAGS" | \
18299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18301
18302                                 ;;
18303                         esac
18304
18305         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18306         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18307
18308                         ;;
18309                 esac
18310                 ;;
18311         (*)
18312
18313         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18314         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18315
18316                 ;;
18317         esac
18318         ;;
18319 (yes)
18320
18321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18323
18324         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18325
18326         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18327                 && test -z "${cf_tst_cflags}" \
18328                 && cf_fix_cppflags=no
18329         ;;
18330 esac
18331 done
18332
18333 if test -n "$cf_new_cflags" ; then
18334
18335         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18336         CFLAGS="${CFLAGS}$cf_new_cflags"
18337
18338 fi
18339
18340 if test -n "$cf_new_cppflags" ; then
18341
18342         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18343         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18344
18345 fi
18346
18347 if test -n "$cf_new_extra_cppflags" ; then
18348
18349         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18350         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18351
18352 fi
18353
18354                 ;;
18355         esac
18356         ;;
18357 esac
18358
18359 if test "$with_dbmalloc" = yes ; then
18360         echo "$as_me:18360: checking for dbmalloc.h" >&5
18361 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18362 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18363   echo $ECHO_N "(cached) $ECHO_C" >&6
18364 else
18365   cat >"conftest.$ac_ext" <<_ACEOF
18366 #line 18366 "configure"
18367 #include "confdefs.h"
18368 #include <dbmalloc.h>
18369 _ACEOF
18370 if { (eval echo "$as_me:18370: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18371   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18372   ac_status=$?
18373   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18374   rm -f conftest.er1
18375   cat conftest.err >&5
18376   echo "$as_me:18376: \$? = $ac_status" >&5
18377   (exit "$ac_status"); } >/dev/null; then
18378   if test -s conftest.err; then
18379     ac_cpp_err=$ac_c_preproc_warn_flag
18380   else
18381     ac_cpp_err=
18382   fi
18383 else
18384   ac_cpp_err=yes
18385 fi
18386 if test -z "$ac_cpp_err"; then
18387   ac_cv_header_dbmalloc_h=yes
18388 else
18389   echo "$as_me: failed program was:" >&5
18390   cat "conftest.$ac_ext" >&5
18391   ac_cv_header_dbmalloc_h=no
18392 fi
18393 rm -f conftest.err "conftest.$ac_ext"
18394 fi
18395 echo "$as_me:18395: result: $ac_cv_header_dbmalloc_h" >&5
18396 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18397 if test "$ac_cv_header_dbmalloc_h" = yes; then
18398
18399 echo "$as_me:18399: checking for debug_malloc in -ldbmalloc" >&5
18400 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18401 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18402   echo $ECHO_N "(cached) $ECHO_C" >&6
18403 else
18404   ac_check_lib_save_LIBS=$LIBS
18405 LIBS="-ldbmalloc  $LIBS"
18406 cat >"conftest.$ac_ext" <<_ACEOF
18407 #line 18407 "configure"
18408 #include "confdefs.h"
18409
18410 /* Override any gcc2 internal prototype to avoid an error.  */
18411 #ifdef __cplusplus
18412 extern "C"
18413 #endif
18414 /* We use char because int might match the return type of a gcc2
18415    builtin and then its argument prototype would still apply.  */
18416 char debug_malloc ();
18417 int
18418 main (void)
18419 {
18420 debug_malloc ();
18421   ;
18422   return 0;
18423 }
18424 _ACEOF
18425 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18426 if { (eval echo "$as_me:18426: \"$ac_link\"") >&5
18427   (eval $ac_link) 2>&5
18428   ac_status=$?
18429   echo "$as_me:18429: \$? = $ac_status" >&5
18430   (exit "$ac_status"); } &&
18431          { ac_try='test -s "conftest$ac_exeext"'
18432   { (eval echo "$as_me:18432: \"$ac_try\"") >&5
18433   (eval $ac_try) 2>&5
18434   ac_status=$?
18435   echo "$as_me:18435: \$? = $ac_status" >&5
18436   (exit "$ac_status"); }; }; then
18437   ac_cv_lib_dbmalloc_debug_malloc=yes
18438 else
18439   echo "$as_me: failed program was:" >&5
18440 cat "conftest.$ac_ext" >&5
18441 ac_cv_lib_dbmalloc_debug_malloc=no
18442 fi
18443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18444 LIBS=$ac_check_lib_save_LIBS
18445 fi
18446 echo "$as_me:18446: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18447 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18448 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18449   cat >>confdefs.h <<EOF
18450 #define HAVE_LIBDBMALLOC 1
18451 EOF
18452
18453   LIBS="-ldbmalloc $LIBS"
18454
18455 fi
18456
18457 fi
18458
18459 fi
18460
18461 echo "$as_me:18461: checking if you want to use valgrind for testing" >&5
18462 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18463
18464 # Check whether --with-valgrind or --without-valgrind was given.
18465 if test "${with_valgrind+set}" = set; then
18466   withval="$with_valgrind"
18467   case "x$withval" in
18468         (x|xno) ;;
18469         (*)
18470                 : "${with_cflags:=-g}"
18471                 : "${enable_leaks:=no}"
18472                 with_valgrind=yes
18473
18474 cat >>confdefs.h <<EOF
18475 #define USE_VALGRIND 1
18476 EOF
18477
18478                 ;;
18479         esac
18480 else
18481   with_valgrind=
18482 fi;
18483 echo "$as_me:18483: result: ${with_valgrind:-no}" >&5
18484 echo "${ECHO_T}${with_valgrind:-no}" >&6
18485
18486 case ".$with_cflags" in
18487 (.*-g*)
18488         case .$CFLAGS in
18489         (.*-g*)
18490                 ;;
18491         (*)
18492
18493 cf_fix_cppflags=no
18494 cf_new_cflags=
18495 cf_new_cppflags=
18496 cf_new_extra_cppflags=
18497
18498 for cf_add_cflags in -g
18499 do
18500 case "$cf_fix_cppflags" in
18501 (no)
18502         case "$cf_add_cflags" in
18503         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18504                 case "$cf_add_cflags" in
18505                 (-D*)
18506                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18507
18508                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18509                                 && test -z "${cf_tst_cflags}" \
18510                                 && cf_fix_cppflags=yes
18511
18512                         if test "$cf_fix_cppflags" = yes ; then
18513
18514         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18515         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18516
18517                                 continue
18518                         elif test "${cf_tst_cflags}" = "\"'" ; then
18519
18520         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18521         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18522
18523                                 continue
18524                         fi
18525                         ;;
18526                 esac
18527                 case "$CPPFLAGS" in
18528                 (*$cf_add_cflags)
18529                         ;;
18530                 (*)
18531                         case "$cf_add_cflags" in
18532                         (-D*)
18533                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18534
18535 CPPFLAGS=`echo "$CPPFLAGS" | \
18536         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18537                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18538
18539                                 ;;
18540                         esac
18541
18542         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18543         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18544
18545                         ;;
18546                 esac
18547                 ;;
18548         (*)
18549
18550         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18551         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18552
18553                 ;;
18554         esac
18555         ;;
18556 (yes)
18557
18558         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18559         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18560
18561         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18562
18563         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18564                 && test -z "${cf_tst_cflags}" \
18565                 && cf_fix_cppflags=no
18566         ;;
18567 esac
18568 done
18569
18570 if test -n "$cf_new_cflags" ; then
18571
18572         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18573         CFLAGS="${CFLAGS}$cf_new_cflags"
18574
18575 fi
18576
18577 if test -n "$cf_new_cppflags" ; then
18578
18579         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18580         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18581
18582 fi
18583
18584 if test -n "$cf_new_extra_cppflags" ; then
18585
18586         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18587         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18588
18589 fi
18590
18591                 ;;
18592         esac
18593         ;;
18594 esac
18595
18596 echo "$as_me:18596: checking if you want to perform memory-leak testing" >&5
18597 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18598
18599 # Check whether --enable-leaks or --disable-leaks was given.
18600 if test "${enable_leaks+set}" = set; then
18601   enableval="$enable_leaks"
18602   enable_leaks=$enableval
18603 else
18604   enable_leaks=yes
18605 fi;
18606 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18607 echo "$as_me:18607: result: $with_no_leaks" >&5
18608 echo "${ECHO_T}$with_no_leaks" >&6
18609
18610 if test "$enable_leaks" = no ; then
18611
18612 cat >>confdefs.h <<\EOF
18613 #define NO_LEAKS 1
18614 EOF
18615
18616 cat >>confdefs.h <<\EOF
18617 #define YY_NO_LEAKS 1
18618 EOF
18619
18620 fi
18621
18622 cat >>confdefs.h <<\EOF
18623 #define HAVE_NC_ALLOC_H 1
18624 EOF
18625
18626 ###     use option --enable-expanded to generate certain macros as functions
18627
18628 # Check whether --enable-expanded or --disable-expanded was given.
18629 if test "${enable_expanded+set}" = set; then
18630   enableval="$enable_expanded"
18631   test "x$enableval" = xyes &&
18632 cat >>confdefs.h <<\EOF
18633 #define NCURSES_EXPANDED 1
18634 EOF
18635
18636 fi;
18637
18638 ###     use option --disable-macros to suppress macros in favor of functions
18639
18640 # Check whether --enable-macros or --disable-macros was given.
18641 if test "${enable_macros+set}" = set; then
18642   enableval="$enable_macros"
18643   test "$enableval" = no &&
18644 cat >>confdefs.h <<\EOF
18645 #define NCURSES_NOMACROS 1
18646 EOF
18647
18648 fi;
18649
18650 # Normally we only add trace() to the debug-library.  Allow this to be
18651 # extended to all models of the ncurses library:
18652 cf_all_traces=no
18653 case "$CFLAGS $CPPFLAGS" in
18654 (*-DTRACE*)
18655         cf_all_traces=yes
18656         ;;
18657 esac
18658
18659 echo "$as_me:18659: checking whether to add trace feature to all models" >&5
18660 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18661
18662 # Check whether --with-trace or --without-trace was given.
18663 if test "${with_trace+set}" = set; then
18664   withval="$with_trace"
18665   cf_with_trace=$withval
18666 else
18667   cf_with_trace=$cf_all_traces
18668 fi;
18669 echo "$as_me:18669: result: $cf_with_trace" >&5
18670 echo "${ECHO_T}$cf_with_trace" >&6
18671
18672 if test "x$cf_with_trace" = xyes ; then
18673         LIB_TRACING=all
18674         ADA_TRACE=TRUE
18675
18676 cf_fix_cppflags=no
18677 cf_new_cflags=
18678 cf_new_cppflags=
18679 cf_new_extra_cppflags=
18680
18681 for cf_add_cflags in -DTRACE
18682 do
18683 case "$cf_fix_cppflags" in
18684 (no)
18685         case "$cf_add_cflags" in
18686         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18687                 case "$cf_add_cflags" in
18688                 (-D*)
18689                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18690
18691                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18692                                 && test -z "${cf_tst_cflags}" \
18693                                 && cf_fix_cppflags=yes
18694
18695                         if test "$cf_fix_cppflags" = yes ; then
18696
18697         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18698         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18699
18700                                 continue
18701                         elif test "${cf_tst_cflags}" = "\"'" ; then
18702
18703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18705
18706                                 continue
18707                         fi
18708                         ;;
18709                 esac
18710                 case "$CPPFLAGS" in
18711                 (*$cf_add_cflags)
18712                         ;;
18713                 (*)
18714                         case "$cf_add_cflags" in
18715                         (-D*)
18716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18717
18718 CPPFLAGS=`echo "$CPPFLAGS" | \
18719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18721
18722                                 ;;
18723                         esac
18724
18725         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18726         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18727
18728                         ;;
18729                 esac
18730                 ;;
18731         (*)
18732
18733         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18734         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18735
18736                 ;;
18737         esac
18738         ;;
18739 (yes)
18740
18741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18743
18744         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18745
18746         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18747                 && test -z "${cf_tst_cflags}" \
18748                 && cf_fix_cppflags=no
18749         ;;
18750 esac
18751 done
18752
18753 if test -n "$cf_new_cflags" ; then
18754
18755         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18756         CFLAGS="${CFLAGS}$cf_new_cflags"
18757
18758 fi
18759
18760 if test -n "$cf_new_cppflags" ; then
18761
18762         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18763         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18764
18765 fi
18766
18767 if test -n "$cf_new_extra_cppflags" ; then
18768
18769         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18770         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18771
18772 fi
18773
18774 cat >>confdefs.h <<\EOF
18775 #define HAVE__TRACEF 1
18776 EOF
18777
18778 else
18779         LIB_TRACING=DEBUG
18780         ADA_TRACE=FALSE
18781 fi
18782
18783 echo "$as_me:18783: checking if we want to use GNAT projects" >&5
18784 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18785
18786 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18787 if test "${enable_gnat_projects+set}" = set; then
18788   enableval="$enable_gnat_projects"
18789   test "$enableval" != no && enableval=yes
18790         if test "$enableval" != "yes" ; then
18791     enable_gnat_projects=no
18792         else
18793                 enable_gnat_projects=yes
18794         fi
18795 else
18796   enableval=yes
18797         enable_gnat_projects=yes
18798
18799 fi;
18800 echo "$as_me:18800: result: $enable_gnat_projects" >&5
18801 echo "${ECHO_T}$enable_gnat_projects" >&6
18802
18803 ###     Checks for libraries.
18804 case "$cf_cv_system_name" in
18805 (*mingw32*|*mingw64*)
18806         # Note: WINVER may be a problem with Windows 10
18807         if test "x$with_exp_win32" = xyes ; then
18808                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18809         else
18810                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18811         fi
18812
18813 echo "$as_me:18813: checking if ssp library is needed" >&5
18814 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18815 if test "${cf_cv_need_libssp+set}" = set; then
18816   echo $ECHO_N "(cached) $ECHO_C" >&6
18817 else
18818
18819 cat >"conftest.$ac_ext" <<_ACEOF
18820 #line 18820 "configure"
18821 #include "confdefs.h"
18822
18823 #include <sys/types.h>
18824 #include <dirent.h>
18825
18826 int
18827 main (void)
18828 {
18829
18830        DIR *dp = opendir(".");
18831
18832   ;
18833   return 0;
18834 }
18835 _ACEOF
18836 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18837 if { (eval echo "$as_me:18837: \"$ac_link\"") >&5
18838   (eval $ac_link) 2>&5
18839   ac_status=$?
18840   echo "$as_me:18840: \$? = $ac_status" >&5
18841   (exit "$ac_status"); } &&
18842          { ac_try='test -s "conftest$ac_exeext"'
18843   { (eval echo "$as_me:18843: \"$ac_try\"") >&5
18844   (eval $ac_try) 2>&5
18845   ac_status=$?
18846   echo "$as_me:18846: \$? = $ac_status" >&5
18847   (exit "$ac_status"); }; }; then
18848   cf_cv_need_libssp=no
18849 else
18850   echo "$as_me: failed program was:" >&5
18851 cat "conftest.$ac_ext" >&5
18852
18853         cf_save_LIBS="$LIBS"
18854         LIBS="$LIBS -lssp"
18855         cat >"conftest.$ac_ext" <<_ACEOF
18856 #line 18856 "configure"
18857 #include "confdefs.h"
18858
18859 #include <sys/types.h>
18860 #include <dirent.h>
18861
18862 int
18863 main (void)
18864 {
18865
18866                    DIR *dp = opendir(".");
18867
18868   ;
18869   return 0;
18870 }
18871 _ACEOF
18872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18873 if { (eval echo "$as_me:18873: \"$ac_link\"") >&5
18874   (eval $ac_link) 2>&5
18875   ac_status=$?
18876   echo "$as_me:18876: \$? = $ac_status" >&5
18877   (exit "$ac_status"); } &&
18878          { ac_try='test -s "conftest$ac_exeext"'
18879   { (eval echo "$as_me:18879: \"$ac_try\"") >&5
18880   (eval $ac_try) 2>&5
18881   ac_status=$?
18882   echo "$as_me:18882: \$? = $ac_status" >&5
18883   (exit "$ac_status"); }; }; then
18884   cf_cv_need_libssp=yes
18885 else
18886   echo "$as_me: failed program was:" >&5
18887 cat "conftest.$ac_ext" >&5
18888 cf_cv_need_libssp=maybe
18889 fi
18890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18891         LIBS="$cf_save_LIBS"
18892
18893 fi
18894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18895 fi
18896 echo "$as_me:18896: result: $cf_cv_need_libssp" >&5
18897 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18898
18899 if test "x$cf_cv_need_libssp" = xyes
18900 then
18901
18902 cf_add_libs="$LIBS"
18903 # reverse order
18904 cf_add_0lib=
18905 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18906 # filter duplicates
18907 for cf_add_1lib in $cf_add_0lib; do
18908         for cf_add_2lib in $cf_add_libs; do
18909                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18910                         cf_add_1lib=
18911                         break
18912                 fi
18913         done
18914         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18915 done
18916 LIBS="$cf_add_libs"
18917
18918 fi
18919
18920         ;;
18921 (*)
18922 echo "$as_me:18922: checking for gettimeofday" >&5
18923 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18924 if test "${ac_cv_func_gettimeofday+set}" = set; then
18925   echo $ECHO_N "(cached) $ECHO_C" >&6
18926 else
18927   cat >"conftest.$ac_ext" <<_ACEOF
18928 #line 18928 "configure"
18929 #include "confdefs.h"
18930 #define gettimeofday autoconf_temporary
18931 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18932 #undef gettimeofday
18933
18934 #ifdef __cplusplus
18935 extern "C"
18936 #endif
18937
18938 /* We use char because int might match the return type of a gcc2
18939    builtin and then its argument prototype would still apply.  */
18940 char gettimeofday (void);
18941
18942 int
18943 main (void)
18944 {
18945
18946 /* The GNU C library defines stubs for functions which it implements
18947     to always fail with ENOSYS.  Some functions are actually named
18948     something starting with __ and the normal name is an alias.  */
18949 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18950 #error found stub for gettimeofday
18951 #endif
18952
18953         return gettimeofday ();
18954   ;
18955   return 0;
18956 }
18957 _ACEOF
18958 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18959 if { (eval echo "$as_me:18959: \"$ac_link\"") >&5
18960   (eval $ac_link) 2>&5
18961   ac_status=$?
18962   echo "$as_me:18962: \$? = $ac_status" >&5
18963   (exit "$ac_status"); } &&
18964          { ac_try='test -s "conftest$ac_exeext"'
18965   { (eval echo "$as_me:18965: \"$ac_try\"") >&5
18966   (eval $ac_try) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit "$ac_status"); }; }; then
18970   ac_cv_func_gettimeofday=yes
18971 else
18972   echo "$as_me: failed program was:" >&5
18973 cat "conftest.$ac_ext" >&5
18974 ac_cv_func_gettimeofday=no
18975 fi
18976 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18977 fi
18978 echo "$as_me:18978: result: $ac_cv_func_gettimeofday" >&5
18979 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18980 if test "$ac_cv_func_gettimeofday" = yes; then
18981
18982 cat >>confdefs.h <<\EOF
18983 #define HAVE_GETTIMEOFDAY 1
18984 EOF
18985
18986 else
18987
18988 echo "$as_me:18988: checking for gettimeofday in -lbsd" >&5
18989 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18990 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18991   echo $ECHO_N "(cached) $ECHO_C" >&6
18992 else
18993   ac_check_lib_save_LIBS=$LIBS
18994 LIBS="-lbsd  $LIBS"
18995 cat >"conftest.$ac_ext" <<_ACEOF
18996 #line 18996 "configure"
18997 #include "confdefs.h"
18998
18999 /* Override any gcc2 internal prototype to avoid an error.  */
19000 #ifdef __cplusplus
19001 extern "C"
19002 #endif
19003 /* We use char because int might match the return type of a gcc2
19004    builtin and then its argument prototype would still apply.  */
19005 char gettimeofday ();
19006 int
19007 main (void)
19008 {
19009 gettimeofday ();
19010   ;
19011   return 0;
19012 }
19013 _ACEOF
19014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19015 if { (eval echo "$as_me:19015: \"$ac_link\"") >&5
19016   (eval $ac_link) 2>&5
19017   ac_status=$?
19018   echo "$as_me:19018: \$? = $ac_status" >&5
19019   (exit "$ac_status"); } &&
19020          { ac_try='test -s "conftest$ac_exeext"'
19021   { (eval echo "$as_me:19021: \"$ac_try\"") >&5
19022   (eval $ac_try) 2>&5
19023   ac_status=$?
19024   echo "$as_me:19024: \$? = $ac_status" >&5
19025   (exit "$ac_status"); }; }; then
19026   ac_cv_lib_bsd_gettimeofday=yes
19027 else
19028   echo "$as_me: failed program was:" >&5
19029 cat "conftest.$ac_ext" >&5
19030 ac_cv_lib_bsd_gettimeofday=no
19031 fi
19032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19033 LIBS=$ac_check_lib_save_LIBS
19034 fi
19035 echo "$as_me:19035: result: $ac_cv_lib_bsd_gettimeofday" >&5
19036 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19037 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19038
19039 cat >>confdefs.h <<\EOF
19040 #define HAVE_GETTIMEOFDAY 1
19041 EOF
19042
19043 cf_add_libs="$LIBS"
19044 # reverse order
19045 cf_add_0lib=
19046 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19047 # filter duplicates
19048 for cf_add_1lib in $cf_add_0lib; do
19049         for cf_add_2lib in $cf_add_libs; do
19050                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19051                         cf_add_1lib=
19052                         break
19053                 fi
19054         done
19055         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19056 done
19057 LIBS="$cf_add_libs"
19058
19059 fi
19060
19061 fi
19062         ;;
19063 esac
19064
19065 echo "$as_me:19065: checking if -lm needed for math functions" >&5
19066 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19067 if test "${cf_cv_need_libm+set}" = set; then
19068   echo $ECHO_N "(cached) $ECHO_C" >&6
19069 else
19070
19071         cat >"conftest.$ac_ext" <<_ACEOF
19072 #line 19072 "configure"
19073 #include "confdefs.h"
19074
19075                 #include <stdio.h>
19076                 #include <stdlib.h>
19077                 #include <math.h>
19078
19079 int
19080 main (void)
19081 {
19082 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19083   ;
19084   return 0;
19085 }
19086 _ACEOF
19087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19088 if { (eval echo "$as_me:19088: \"$ac_link\"") >&5
19089   (eval $ac_link) 2>&5
19090   ac_status=$?
19091   echo "$as_me:19091: \$? = $ac_status" >&5
19092   (exit "$ac_status"); } &&
19093          { ac_try='test -s "conftest$ac_exeext"'
19094   { (eval echo "$as_me:19094: \"$ac_try\"") >&5
19095   (eval $ac_try) 2>&5
19096   ac_status=$?
19097   echo "$as_me:19097: \$? = $ac_status" >&5
19098   (exit "$ac_status"); }; }; then
19099   cf_cv_need_libm=no
19100 else
19101   echo "$as_me: failed program was:" >&5
19102 cat "conftest.$ac_ext" >&5
19103 cf_cv_need_libm=yes
19104 fi
19105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19106 fi
19107 echo "$as_me:19107: result: $cf_cv_need_libm" >&5
19108 echo "${ECHO_T}$cf_cv_need_libm" >&6
19109
19110 if test "$cf_cv_need_libm" = yes
19111 then
19112
19113         cf_save_LIBS="$LIBS"
19114         LIBS="$LIBS -lm"
19115         echo "$as_me:19115: checking if -lm is available for math functions" >&5
19116 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19117 if test "${cf_cv_have_libm+set}" = set; then
19118   echo $ECHO_N "(cached) $ECHO_C" >&6
19119 else
19120
19121         cat >"conftest.$ac_ext" <<_ACEOF
19122 #line 19122 "configure"
19123 #include "confdefs.h"
19124
19125                 #include <stdio.h>
19126                 #include <stdlib.h>
19127                 #include <math.h>
19128
19129 int
19130 main (void)
19131 {
19132 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19133   ;
19134   return 0;
19135 }
19136 _ACEOF
19137 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19138 if { (eval echo "$as_me:19138: \"$ac_link\"") >&5
19139   (eval $ac_link) 2>&5
19140   ac_status=$?
19141   echo "$as_me:19141: \$? = $ac_status" >&5
19142   (exit "$ac_status"); } &&
19143          { ac_try='test -s "conftest$ac_exeext"'
19144   { (eval echo "$as_me:19144: \"$ac_try\"") >&5
19145   (eval $ac_try) 2>&5
19146   ac_status=$?
19147   echo "$as_me:19147: \$? = $ac_status" >&5
19148   (exit "$ac_status"); }; }; then
19149   cf_cv_have_libm=yes
19150 else
19151   echo "$as_me: failed program was:" >&5
19152 cat "conftest.$ac_ext" >&5
19153 cf_cv_have_libm=no
19154 fi
19155 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19156 fi
19157 echo "$as_me:19157: result: $cf_cv_have_libm" >&5
19158 echo "${ECHO_T}$cf_cv_have_libm" >&6
19159         LIBS="$cf_save_LIBS"
19160
19161         if test "$cf_cv_have_libm" = yes
19162         then
19163                 MATH_LIB=-lm
19164         fi
19165 else
19166         cf_cv_have_libm=yes
19167 fi
19168
19169 if test "$cf_cv_have_libm" = yes
19170 then
19171
19172 cat >>confdefs.h <<\EOF
19173 #define HAVE_MATH_FUNCS 1
19174 EOF
19175
19176 fi
19177
19178 ###     Checks for header files.
19179 echo "$as_me:19179: checking for ANSI C header files" >&5
19180 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
19181 if test "${ac_cv_header_stdc+set}" = set; then
19182   echo $ECHO_N "(cached) $ECHO_C" >&6
19183 else
19184   cat >"conftest.$ac_ext" <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19187 #include <stdlib.h>
19188 #include <stdarg.h>
19189 #include <string.h>
19190 #include <float.h>
19191
19192 _ACEOF
19193 if { (eval echo "$as_me:19193: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19194   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19195   ac_status=$?
19196   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19197   rm -f conftest.er1
19198   cat conftest.err >&5
19199   echo "$as_me:19199: \$? = $ac_status" >&5
19200   (exit "$ac_status"); } >/dev/null; then
19201   if test -s conftest.err; then
19202     ac_cpp_err=$ac_c_preproc_warn_flag
19203   else
19204     ac_cpp_err=
19205   fi
19206 else
19207   ac_cpp_err=yes
19208 fi
19209 if test -z "$ac_cpp_err"; then
19210   ac_cv_header_stdc=yes
19211 else
19212   echo "$as_me: failed program was:" >&5
19213   cat "conftest.$ac_ext" >&5
19214   ac_cv_header_stdc=no
19215 fi
19216 rm -f conftest.err "conftest.$ac_ext"
19217
19218 if test $ac_cv_header_stdc = yes; then
19219   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19220   cat >"conftest.$ac_ext" <<_ACEOF
19221 #line 19221 "configure"
19222 #include "confdefs.h"
19223 #include <string.h>
19224
19225 _ACEOF
19226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19227   $EGREP "memchr" >/dev/null 2>&1; then
19228   :
19229 else
19230   ac_cv_header_stdc=no
19231 fi
19232 rm -rf conftest*
19233
19234 fi
19235
19236 if test $ac_cv_header_stdc = yes; then
19237   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19238   cat >"conftest.$ac_ext" <<_ACEOF
19239 #line 19239 "configure"
19240 #include "confdefs.h"
19241 #include <stdlib.h>
19242
19243 _ACEOF
19244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19245   $EGREP "free" >/dev/null 2>&1; then
19246   :
19247 else
19248   ac_cv_header_stdc=no
19249 fi
19250 rm -rf conftest*
19251
19252 fi
19253
19254 if test $ac_cv_header_stdc = yes; then
19255   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19256   if test "$cross_compiling" = yes; then
19257   :
19258 else
19259   cat >"conftest.$ac_ext" <<_ACEOF
19260 #line 19260 "configure"
19261 #include "confdefs.h"
19262 #include <ctype.h>
19263 #if ((' ' & 0x0FF) == 0x020)
19264 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19265 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19266 #else
19267 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19268                      || ('j' <= (c) && (c) <= 'r') \
19269                      || ('s' <= (c) && (c) <= 'z'))
19270 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19271 #endif
19272
19273 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19274 int
19275 main (void)
19276 {
19277   int i;
19278   for (i = 0; i < 256; i++)
19279     if (XOR (islower (i), ISLOWER (i))
19280         || toupper (i) != TOUPPER (i))
19281       $ac_main_return(2);
19282   $ac_main_return (0);
19283 }
19284 _ACEOF
19285 rm -f "conftest$ac_exeext"
19286 if { (eval echo "$as_me:19286: \"$ac_link\"") >&5
19287   (eval $ac_link) 2>&5
19288   ac_status=$?
19289   echo "$as_me:19289: \$? = $ac_status" >&5
19290   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19291   { (eval echo "$as_me:19291: \"$ac_try\"") >&5
19292   (eval $ac_try) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit "$ac_status"); }; }; then
19296   :
19297 else
19298   echo "$as_me: program exited with status $ac_status" >&5
19299 echo "$as_me: failed program was:" >&5
19300 cat "conftest.$ac_ext" >&5
19301 ac_cv_header_stdc=no
19302 fi
19303 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19304 fi
19305 fi
19306 fi
19307 echo "$as_me:19307: result: $ac_cv_header_stdc" >&5
19308 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19309 if test $ac_cv_header_stdc = yes; then
19310
19311 cat >>confdefs.h <<\EOF
19312 #define STDC_HEADERS 1
19313 EOF
19314
19315 fi
19316
19317 ac_header_dirent=no
19318 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19319   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19320 echo "$as_me:19320: checking for $ac_hdr that defines DIR" >&5
19321 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19322 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19323   echo $ECHO_N "(cached) $ECHO_C" >&6
19324 else
19325   cat >"conftest.$ac_ext" <<_ACEOF
19326 #line 19326 "configure"
19327 #include "confdefs.h"
19328 #include <sys/types.h>
19329 #include <$ac_hdr>
19330
19331 int
19332 main (void)
19333 {
19334 if ((DIR *) 0)
19335 return 0;
19336   ;
19337   return 0;
19338 }
19339 _ACEOF
19340 rm -f "conftest.$ac_objext"
19341 if { (eval echo "$as_me:19341: \"$ac_compile\"") >&5
19342   (eval $ac_compile) 2>&5
19343   ac_status=$?
19344   echo "$as_me:19344: \$? = $ac_status" >&5
19345   (exit "$ac_status"); } &&
19346          { ac_try='test -s "conftest.$ac_objext"'
19347   { (eval echo "$as_me:19347: \"$ac_try\"") >&5
19348   (eval $ac_try) 2>&5
19349   ac_status=$?
19350   echo "$as_me:19350: \$? = $ac_status" >&5
19351   (exit "$ac_status"); }; }; then
19352   eval "$as_ac_Header=yes"
19353 else
19354   echo "$as_me: failed program was:" >&5
19355 cat "conftest.$ac_ext" >&5
19356 eval "$as_ac_Header=no"
19357 fi
19358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19359 fi
19360 echo "$as_me:19360: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19361 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19362 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19363   cat >>confdefs.h <<EOF
19364 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19365 EOF
19366
19367 ac_header_dirent=$ac_hdr; break
19368 fi
19369
19370 done
19371 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19372 if test $ac_header_dirent = dirent.h; then
19373   echo "$as_me:19373: checking for opendir in -ldir" >&5
19374 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19375 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19376   echo $ECHO_N "(cached) $ECHO_C" >&6
19377 else
19378   ac_check_lib_save_LIBS=$LIBS
19379 LIBS="-ldir  $LIBS"
19380 cat >"conftest.$ac_ext" <<_ACEOF
19381 #line 19381 "configure"
19382 #include "confdefs.h"
19383
19384 /* Override any gcc2 internal prototype to avoid an error.  */
19385 #ifdef __cplusplus
19386 extern "C"
19387 #endif
19388 /* We use char because int might match the return type of a gcc2
19389    builtin and then its argument prototype would still apply.  */
19390 char opendir ();
19391 int
19392 main (void)
19393 {
19394 opendir ();
19395   ;
19396   return 0;
19397 }
19398 _ACEOF
19399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19400 if { (eval echo "$as_me:19400: \"$ac_link\"") >&5
19401   (eval $ac_link) 2>&5
19402   ac_status=$?
19403   echo "$as_me:19403: \$? = $ac_status" >&5
19404   (exit "$ac_status"); } &&
19405          { ac_try='test -s "conftest$ac_exeext"'
19406   { (eval echo "$as_me:19406: \"$ac_try\"") >&5
19407   (eval $ac_try) 2>&5
19408   ac_status=$?
19409   echo "$as_me:19409: \$? = $ac_status" >&5
19410   (exit "$ac_status"); }; }; then
19411   ac_cv_lib_dir_opendir=yes
19412 else
19413   echo "$as_me: failed program was:" >&5
19414 cat "conftest.$ac_ext" >&5
19415 ac_cv_lib_dir_opendir=no
19416 fi
19417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19418 LIBS=$ac_check_lib_save_LIBS
19419 fi
19420 echo "$as_me:19420: result: $ac_cv_lib_dir_opendir" >&5
19421 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19422 if test "$ac_cv_lib_dir_opendir" = yes; then
19423   LIBS="$LIBS -ldir"
19424 fi
19425
19426 else
19427   echo "$as_me:19427: checking for opendir in -lx" >&5
19428 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19429 if test "${ac_cv_lib_x_opendir+set}" = set; then
19430   echo $ECHO_N "(cached) $ECHO_C" >&6
19431 else
19432   ac_check_lib_save_LIBS=$LIBS
19433 LIBS="-lx  $LIBS"
19434 cat >"conftest.$ac_ext" <<_ACEOF
19435 #line 19435 "configure"
19436 #include "confdefs.h"
19437
19438 /* Override any gcc2 internal prototype to avoid an error.  */
19439 #ifdef __cplusplus
19440 extern "C"
19441 #endif
19442 /* We use char because int might match the return type of a gcc2
19443    builtin and then its argument prototype would still apply.  */
19444 char opendir ();
19445 int
19446 main (void)
19447 {
19448 opendir ();
19449   ;
19450   return 0;
19451 }
19452 _ACEOF
19453 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19454 if { (eval echo "$as_me:19454: \"$ac_link\"") >&5
19455   (eval $ac_link) 2>&5
19456   ac_status=$?
19457   echo "$as_me:19457: \$? = $ac_status" >&5
19458   (exit "$ac_status"); } &&
19459          { ac_try='test -s "conftest$ac_exeext"'
19460   { (eval echo "$as_me:19460: \"$ac_try\"") >&5
19461   (eval $ac_try) 2>&5
19462   ac_status=$?
19463   echo "$as_me:19463: \$? = $ac_status" >&5
19464   (exit "$ac_status"); }; }; then
19465   ac_cv_lib_x_opendir=yes
19466 else
19467   echo "$as_me: failed program was:" >&5
19468 cat "conftest.$ac_ext" >&5
19469 ac_cv_lib_x_opendir=no
19470 fi
19471 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19472 LIBS=$ac_check_lib_save_LIBS
19473 fi
19474 echo "$as_me:19474: result: $ac_cv_lib_x_opendir" >&5
19475 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19476 if test "$ac_cv_lib_x_opendir" = yes; then
19477   LIBS="$LIBS -lx"
19478 fi
19479
19480 fi
19481
19482 echo "$as_me:19482: checking whether time.h and sys/time.h may both be included" >&5
19483 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19484 if test "${ac_cv_header_time+set}" = set; then
19485   echo $ECHO_N "(cached) $ECHO_C" >&6
19486 else
19487   cat >"conftest.$ac_ext" <<_ACEOF
19488 #line 19488 "configure"
19489 #include "confdefs.h"
19490 #include <sys/types.h>
19491 #include <sys/time.h>
19492 #include <time.h>
19493
19494 int
19495 main (void)
19496 {
19497 if ((struct tm *) 0)
19498 return 0;
19499   ;
19500   return 0;
19501 }
19502 _ACEOF
19503 rm -f "conftest.$ac_objext"
19504 if { (eval echo "$as_me:19504: \"$ac_compile\"") >&5
19505   (eval $ac_compile) 2>&5
19506   ac_status=$?
19507   echo "$as_me:19507: \$? = $ac_status" >&5
19508   (exit "$ac_status"); } &&
19509          { ac_try='test -s "conftest.$ac_objext"'
19510   { (eval echo "$as_me:19510: \"$ac_try\"") >&5
19511   (eval $ac_try) 2>&5
19512   ac_status=$?
19513   echo "$as_me:19513: \$? = $ac_status" >&5
19514   (exit "$ac_status"); }; }; then
19515   ac_cv_header_time=yes
19516 else
19517   echo "$as_me: failed program was:" >&5
19518 cat "conftest.$ac_ext" >&5
19519 ac_cv_header_time=no
19520 fi
19521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19522 fi
19523 echo "$as_me:19523: result: $ac_cv_header_time" >&5
19524 echo "${ECHO_T}$ac_cv_header_time" >&6
19525 if test $ac_cv_header_time = yes; then
19526
19527 cat >>confdefs.h <<\EOF
19528 #define TIME_WITH_SYS_TIME 1
19529 EOF
19530
19531 fi
19532
19533 cf_regex_func=no
19534 cf_regex_libs=
19535 case "$host_os" in
19536 (mingw*)
19537         # -lsystre -ltre -lintl -liconv
19538         echo "$as_me:19538: checking for regcomp in -lsystre" >&5
19539 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19540 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19541   echo $ECHO_N "(cached) $ECHO_C" >&6
19542 else
19543   ac_check_lib_save_LIBS=$LIBS
19544 LIBS="-lsystre  $LIBS"
19545 cat >"conftest.$ac_ext" <<_ACEOF
19546 #line 19546 "configure"
19547 #include "confdefs.h"
19548
19549 /* Override any gcc2 internal prototype to avoid an error.  */
19550 #ifdef __cplusplus
19551 extern "C"
19552 #endif
19553 /* We use char because int might match the return type of a gcc2
19554    builtin and then its argument prototype would still apply.  */
19555 char regcomp ();
19556 int
19557 main (void)
19558 {
19559 regcomp ();
19560   ;
19561   return 0;
19562 }
19563 _ACEOF
19564 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19565 if { (eval echo "$as_me:19565: \"$ac_link\"") >&5
19566   (eval $ac_link) 2>&5
19567   ac_status=$?
19568   echo "$as_me:19568: \$? = $ac_status" >&5
19569   (exit "$ac_status"); } &&
19570          { ac_try='test -s "conftest$ac_exeext"'
19571   { (eval echo "$as_me:19571: \"$ac_try\"") >&5
19572   (eval $ac_try) 2>&5
19573   ac_status=$?
19574   echo "$as_me:19574: \$? = $ac_status" >&5
19575   (exit "$ac_status"); }; }; then
19576   ac_cv_lib_systre_regcomp=yes
19577 else
19578   echo "$as_me: failed program was:" >&5
19579 cat "conftest.$ac_ext" >&5
19580 ac_cv_lib_systre_regcomp=no
19581 fi
19582 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19583 LIBS=$ac_check_lib_save_LIBS
19584 fi
19585 echo "$as_me:19585: result: $ac_cv_lib_systre_regcomp" >&5
19586 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19587 if test "$ac_cv_lib_systre_regcomp" = yes; then
19588
19589                 echo "$as_me:19589: checking for libiconv_open in -liconv" >&5
19590 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19591 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19592   echo $ECHO_N "(cached) $ECHO_C" >&6
19593 else
19594   ac_check_lib_save_LIBS=$LIBS
19595 LIBS="-liconv  $LIBS"
19596 cat >"conftest.$ac_ext" <<_ACEOF
19597 #line 19597 "configure"
19598 #include "confdefs.h"
19599
19600 /* Override any gcc2 internal prototype to avoid an error.  */
19601 #ifdef __cplusplus
19602 extern "C"
19603 #endif
19604 /* We use char because int might match the return type of a gcc2
19605    builtin and then its argument prototype would still apply.  */
19606 char libiconv_open ();
19607 int
19608 main (void)
19609 {
19610 libiconv_open ();
19611   ;
19612   return 0;
19613 }
19614 _ACEOF
19615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19616 if { (eval echo "$as_me:19616: \"$ac_link\"") >&5
19617   (eval $ac_link) 2>&5
19618   ac_status=$?
19619   echo "$as_me:19619: \$? = $ac_status" >&5
19620   (exit "$ac_status"); } &&
19621          { ac_try='test -s "conftest$ac_exeext"'
19622   { (eval echo "$as_me:19622: \"$ac_try\"") >&5
19623   (eval $ac_try) 2>&5
19624   ac_status=$?
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit "$ac_status"); }; }; then
19627   ac_cv_lib_iconv_libiconv_open=yes
19628 else
19629   echo "$as_me: failed program was:" >&5
19630 cat "conftest.$ac_ext" >&5
19631 ac_cv_lib_iconv_libiconv_open=no
19632 fi
19633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19634 LIBS=$ac_check_lib_save_LIBS
19635 fi
19636 echo "$as_me:19636: result: $ac_cv_lib_iconv_libiconv_open" >&5
19637 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19638 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19639
19640 cf_add_libs="$LIBS"
19641 # reverse order
19642 cf_add_0lib=
19643 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19644 # filter duplicates
19645 for cf_add_1lib in $cf_add_0lib; do
19646         for cf_add_2lib in $cf_add_libs; do
19647                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19648                         cf_add_1lib=
19649                         break
19650                 fi
19651         done
19652         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19653 done
19654 LIBS="$cf_add_libs"
19655
19656 fi
19657
19658                 echo "$as_me:19658: checking for libintl_gettext in -lintl" >&5
19659 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19660 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19661   echo $ECHO_N "(cached) $ECHO_C" >&6
19662 else
19663   ac_check_lib_save_LIBS=$LIBS
19664 LIBS="-lintl  $LIBS"
19665 cat >"conftest.$ac_ext" <<_ACEOF
19666 #line 19666 "configure"
19667 #include "confdefs.h"
19668
19669 /* Override any gcc2 internal prototype to avoid an error.  */
19670 #ifdef __cplusplus
19671 extern "C"
19672 #endif
19673 /* We use char because int might match the return type of a gcc2
19674    builtin and then its argument prototype would still apply.  */
19675 char libintl_gettext ();
19676 int
19677 main (void)
19678 {
19679 libintl_gettext ();
19680   ;
19681   return 0;
19682 }
19683 _ACEOF
19684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19685 if { (eval echo "$as_me:19685: \"$ac_link\"") >&5
19686   (eval $ac_link) 2>&5
19687   ac_status=$?
19688   echo "$as_me:19688: \$? = $ac_status" >&5
19689   (exit "$ac_status"); } &&
19690          { ac_try='test -s "conftest$ac_exeext"'
19691   { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692   (eval $ac_try) 2>&5
19693   ac_status=$?
19694   echo "$as_me:19694: \$? = $ac_status" >&5
19695   (exit "$ac_status"); }; }; then
19696   ac_cv_lib_intl_libintl_gettext=yes
19697 else
19698   echo "$as_me: failed program was:" >&5
19699 cat "conftest.$ac_ext" >&5
19700 ac_cv_lib_intl_libintl_gettext=no
19701 fi
19702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19703 LIBS=$ac_check_lib_save_LIBS
19704 fi
19705 echo "$as_me:19705: result: $ac_cv_lib_intl_libintl_gettext" >&5
19706 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19707 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19708
19709 cf_add_libs="$LIBS"
19710 # reverse order
19711 cf_add_0lib=
19712 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19713 # filter duplicates
19714 for cf_add_1lib in $cf_add_0lib; do
19715         for cf_add_2lib in $cf_add_libs; do
19716                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19717                         cf_add_1lib=
19718                         break
19719                 fi
19720         done
19721         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19722 done
19723 LIBS="$cf_add_libs"
19724
19725 fi
19726
19727                 echo "$as_me:19727: checking for tre_regcomp in -ltre" >&5
19728 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19729 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19730   echo $ECHO_N "(cached) $ECHO_C" >&6
19731 else
19732   ac_check_lib_save_LIBS=$LIBS
19733 LIBS="-ltre  $LIBS"
19734 cat >"conftest.$ac_ext" <<_ACEOF
19735 #line 19735 "configure"
19736 #include "confdefs.h"
19737
19738 /* Override any gcc2 internal prototype to avoid an error.  */
19739 #ifdef __cplusplus
19740 extern "C"
19741 #endif
19742 /* We use char because int might match the return type of a gcc2
19743    builtin and then its argument prototype would still apply.  */
19744 char tre_regcomp ();
19745 int
19746 main (void)
19747 {
19748 tre_regcomp ();
19749   ;
19750   return 0;
19751 }
19752 _ACEOF
19753 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19754 if { (eval echo "$as_me:19754: \"$ac_link\"") >&5
19755   (eval $ac_link) 2>&5
19756   ac_status=$?
19757   echo "$as_me:19757: \$? = $ac_status" >&5
19758   (exit "$ac_status"); } &&
19759          { ac_try='test -s "conftest$ac_exeext"'
19760   { (eval echo "$as_me:19760: \"$ac_try\"") >&5
19761   (eval $ac_try) 2>&5
19762   ac_status=$?
19763   echo "$as_me:19763: \$? = $ac_status" >&5
19764   (exit "$ac_status"); }; }; then
19765   ac_cv_lib_tre_tre_regcomp=yes
19766 else
19767   echo "$as_me: failed program was:" >&5
19768 cat "conftest.$ac_ext" >&5
19769 ac_cv_lib_tre_tre_regcomp=no
19770 fi
19771 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19772 LIBS=$ac_check_lib_save_LIBS
19773 fi
19774 echo "$as_me:19774: result: $ac_cv_lib_tre_tre_regcomp" >&5
19775 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19776 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19777
19778 cf_add_libs="$LIBS"
19779 # reverse order
19780 cf_add_0lib=
19781 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19782 # filter duplicates
19783 for cf_add_1lib in $cf_add_0lib; do
19784         for cf_add_2lib in $cf_add_libs; do
19785                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19786                         cf_add_1lib=
19787                         break
19788                 fi
19789         done
19790         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19791 done
19792 LIBS="$cf_add_libs"
19793
19794 fi
19795
19796 cf_add_libs="$LIBS"
19797 # reverse order
19798 cf_add_0lib=
19799 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19800 # filter duplicates
19801 for cf_add_1lib in $cf_add_0lib; do
19802         for cf_add_2lib in $cf_add_libs; do
19803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19804                         cf_add_1lib=
19805                         break
19806                 fi
19807         done
19808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19809 done
19810 LIBS="$cf_add_libs"
19811
19812                 cf_regex_func=regcomp
19813
19814 else
19815
19816                 echo "$as_me:19816: checking for regcomp in -lgnurx" >&5
19817 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19818 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19819   echo $ECHO_N "(cached) $ECHO_C" >&6
19820 else
19821   ac_check_lib_save_LIBS=$LIBS
19822 LIBS="-lgnurx  $LIBS"
19823 cat >"conftest.$ac_ext" <<_ACEOF
19824 #line 19824 "configure"
19825 #include "confdefs.h"
19826
19827 /* Override any gcc2 internal prototype to avoid an error.  */
19828 #ifdef __cplusplus
19829 extern "C"
19830 #endif
19831 /* We use char because int might match the return type of a gcc2
19832    builtin and then its argument prototype would still apply.  */
19833 char regcomp ();
19834 int
19835 main (void)
19836 {
19837 regcomp ();
19838   ;
19839   return 0;
19840 }
19841 _ACEOF
19842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19843 if { (eval echo "$as_me:19843: \"$ac_link\"") >&5
19844   (eval $ac_link) 2>&5
19845   ac_status=$?
19846   echo "$as_me:19846: \$? = $ac_status" >&5
19847   (exit "$ac_status"); } &&
19848          { ac_try='test -s "conftest$ac_exeext"'
19849   { (eval echo "$as_me:19849: \"$ac_try\"") >&5
19850   (eval $ac_try) 2>&5
19851   ac_status=$?
19852   echo "$as_me:19852: \$? = $ac_status" >&5
19853   (exit "$ac_status"); }; }; then
19854   ac_cv_lib_gnurx_regcomp=yes
19855 else
19856   echo "$as_me: failed program was:" >&5
19857 cat "conftest.$ac_ext" >&5
19858 ac_cv_lib_gnurx_regcomp=no
19859 fi
19860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19861 LIBS=$ac_check_lib_save_LIBS
19862 fi
19863 echo "$as_me:19863: result: $ac_cv_lib_gnurx_regcomp" >&5
19864 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19865 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19866
19867 cf_add_libs="$LIBS"
19868 # reverse order
19869 cf_add_0lib=
19870 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19871 # filter duplicates
19872 for cf_add_1lib in $cf_add_0lib; do
19873         for cf_add_2lib in $cf_add_libs; do
19874                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19875                         cf_add_1lib=
19876                         break
19877                 fi
19878         done
19879         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19880 done
19881 LIBS="$cf_add_libs"
19882
19883                         cf_regex_func=regcomp
19884 fi
19885
19886 fi
19887
19888         ;;
19889 (*)
19890         cf_regex_libs="regex re"
19891         echo "$as_me:19891: checking for regcomp" >&5
19892 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19893 if test "${ac_cv_func_regcomp+set}" = set; then
19894   echo $ECHO_N "(cached) $ECHO_C" >&6
19895 else
19896   cat >"conftest.$ac_ext" <<_ACEOF
19897 #line 19897 "configure"
19898 #include "confdefs.h"
19899 #define regcomp autoconf_temporary
19900 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19901 #undef regcomp
19902
19903 #ifdef __cplusplus
19904 extern "C"
19905 #endif
19906
19907 /* We use char because int might match the return type of a gcc2
19908    builtin and then its argument prototype would still apply.  */
19909 char regcomp (void);
19910
19911 int
19912 main (void)
19913 {
19914
19915 /* The GNU C library defines stubs for functions which it implements
19916     to always fail with ENOSYS.  Some functions are actually named
19917     something starting with __ and the normal name is an alias.  */
19918 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19919 #error found stub for regcomp
19920 #endif
19921
19922         return regcomp ();
19923   ;
19924   return 0;
19925 }
19926 _ACEOF
19927 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19928 if { (eval echo "$as_me:19928: \"$ac_link\"") >&5
19929   (eval $ac_link) 2>&5
19930   ac_status=$?
19931   echo "$as_me:19931: \$? = $ac_status" >&5
19932   (exit "$ac_status"); } &&
19933          { ac_try='test -s "conftest$ac_exeext"'
19934   { (eval echo "$as_me:19934: \"$ac_try\"") >&5
19935   (eval $ac_try) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit "$ac_status"); }; }; then
19939   ac_cv_func_regcomp=yes
19940 else
19941   echo "$as_me: failed program was:" >&5
19942 cat "conftest.$ac_ext" >&5
19943 ac_cv_func_regcomp=no
19944 fi
19945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19946 fi
19947 echo "$as_me:19947: result: $ac_cv_func_regcomp" >&5
19948 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19949 if test "$ac_cv_func_regcomp" = yes; then
19950   cf_regex_func=regcomp
19951 else
19952
19953                 for cf_regex_lib in $cf_regex_libs
19954                 do
19955                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19956 echo "$as_me:19956: checking for regcomp in -l$cf_regex_lib" >&5
19957 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19958 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19959   echo $ECHO_N "(cached) $ECHO_C" >&6
19960 else
19961   ac_check_lib_save_LIBS=$LIBS
19962 LIBS="-l$cf_regex_lib  $LIBS"
19963 cat >"conftest.$ac_ext" <<_ACEOF
19964 #line 19964 "configure"
19965 #include "confdefs.h"
19966
19967 /* Override any gcc2 internal prototype to avoid an error.  */
19968 #ifdef __cplusplus
19969 extern "C"
19970 #endif
19971 /* We use char because int might match the return type of a gcc2
19972    builtin and then its argument prototype would still apply.  */
19973 char regcomp ();
19974 int
19975 main (void)
19976 {
19977 regcomp ();
19978   ;
19979   return 0;
19980 }
19981 _ACEOF
19982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19983 if { (eval echo "$as_me:19983: \"$ac_link\"") >&5
19984   (eval $ac_link) 2>&5
19985   ac_status=$?
19986   echo "$as_me:19986: \$? = $ac_status" >&5
19987   (exit "$ac_status"); } &&
19988          { ac_try='test -s "conftest$ac_exeext"'
19989   { (eval echo "$as_me:19989: \"$ac_try\"") >&5
19990   (eval $ac_try) 2>&5
19991   ac_status=$?
19992   echo "$as_me:19992: \$? = $ac_status" >&5
19993   (exit "$ac_status"); }; }; then
19994   eval "$as_ac_Lib=yes"
19995 else
19996   echo "$as_me: failed program was:" >&5
19997 cat "conftest.$ac_ext" >&5
19998 eval "$as_ac_Lib=no"
19999 fi
20000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20001 LIBS=$ac_check_lib_save_LIBS
20002 fi
20003 echo "$as_me:20003: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
20004 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
20005 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
20006
20007 cf_add_libs="$LIBS"
20008 # reverse order
20009 cf_add_0lib=
20010 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20011 # filter duplicates
20012 for cf_add_1lib in $cf_add_0lib; do
20013         for cf_add_2lib in $cf_add_libs; do
20014                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20015                         cf_add_1lib=
20016                         break
20017                 fi
20018         done
20019         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20020 done
20021 LIBS="$cf_add_libs"
20022
20023                                         cf_regex_func=regcomp
20024                                         break
20025 fi
20026
20027                 done
20028
20029 fi
20030
20031         ;;
20032 esac
20033
20034 if test "$cf_regex_func" = no ; then
20035         echo "$as_me:20035: checking for compile" >&5
20036 echo $ECHO_N "checking for compile... $ECHO_C" >&6
20037 if test "${ac_cv_func_compile+set}" = set; then
20038   echo $ECHO_N "(cached) $ECHO_C" >&6
20039 else
20040   cat >"conftest.$ac_ext" <<_ACEOF
20041 #line 20041 "configure"
20042 #include "confdefs.h"
20043 #define compile autoconf_temporary
20044 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20045 #undef compile
20046
20047 #ifdef __cplusplus
20048 extern "C"
20049 #endif
20050
20051 /* We use char because int might match the return type of a gcc2
20052    builtin and then its argument prototype would still apply.  */
20053 char compile (void);
20054
20055 int
20056 main (void)
20057 {
20058
20059 /* The GNU C library defines stubs for functions which it implements
20060     to always fail with ENOSYS.  Some functions are actually named
20061     something starting with __ and the normal name is an alias.  */
20062 #if defined (__stub_compile) || defined (__stub___compile)
20063 #error found stub for compile
20064 #endif
20065
20066         return compile ();
20067   ;
20068   return 0;
20069 }
20070 _ACEOF
20071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20072 if { (eval echo "$as_me:20072: \"$ac_link\"") >&5
20073   (eval $ac_link) 2>&5
20074   ac_status=$?
20075   echo "$as_me:20075: \$? = $ac_status" >&5
20076   (exit "$ac_status"); } &&
20077          { ac_try='test -s "conftest$ac_exeext"'
20078   { (eval echo "$as_me:20078: \"$ac_try\"") >&5
20079   (eval $ac_try) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit "$ac_status"); }; }; then
20083   ac_cv_func_compile=yes
20084 else
20085   echo "$as_me: failed program was:" >&5
20086 cat "conftest.$ac_ext" >&5
20087 ac_cv_func_compile=no
20088 fi
20089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20090 fi
20091 echo "$as_me:20091: result: $ac_cv_func_compile" >&5
20092 echo "${ECHO_T}$ac_cv_func_compile" >&6
20093 if test "$ac_cv_func_compile" = yes; then
20094   cf_regex_func=compile
20095 else
20096
20097                 echo "$as_me:20097: checking for compile in -lgen" >&5
20098 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20099 if test "${ac_cv_lib_gen_compile+set}" = set; then
20100   echo $ECHO_N "(cached) $ECHO_C" >&6
20101 else
20102   ac_check_lib_save_LIBS=$LIBS
20103 LIBS="-lgen  $LIBS"
20104 cat >"conftest.$ac_ext" <<_ACEOF
20105 #line 20105 "configure"
20106 #include "confdefs.h"
20107
20108 /* Override any gcc2 internal prototype to avoid an error.  */
20109 #ifdef __cplusplus
20110 extern "C"
20111 #endif
20112 /* We use char because int might match the return type of a gcc2
20113    builtin and then its argument prototype would still apply.  */
20114 char compile ();
20115 int
20116 main (void)
20117 {
20118 compile ();
20119   ;
20120   return 0;
20121 }
20122 _ACEOF
20123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20124 if { (eval echo "$as_me:20124: \"$ac_link\"") >&5
20125   (eval $ac_link) 2>&5
20126   ac_status=$?
20127   echo "$as_me:20127: \$? = $ac_status" >&5
20128   (exit "$ac_status"); } &&
20129          { ac_try='test -s "conftest$ac_exeext"'
20130   { (eval echo "$as_me:20130: \"$ac_try\"") >&5
20131   (eval $ac_try) 2>&5
20132   ac_status=$?
20133   echo "$as_me:20133: \$? = $ac_status" >&5
20134   (exit "$ac_status"); }; }; then
20135   ac_cv_lib_gen_compile=yes
20136 else
20137   echo "$as_me: failed program was:" >&5
20138 cat "conftest.$ac_ext" >&5
20139 ac_cv_lib_gen_compile=no
20140 fi
20141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20142 LIBS=$ac_check_lib_save_LIBS
20143 fi
20144 echo "$as_me:20144: result: $ac_cv_lib_gen_compile" >&5
20145 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20146 if test "$ac_cv_lib_gen_compile" = yes; then
20147
20148 cf_add_libs="$LIBS"
20149 # reverse order
20150 cf_add_0lib=
20151 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20152 # filter duplicates
20153 for cf_add_1lib in $cf_add_0lib; do
20154         for cf_add_2lib in $cf_add_libs; do
20155                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20156                         cf_add_1lib=
20157                         break
20158                 fi
20159         done
20160         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20161 done
20162 LIBS="$cf_add_libs"
20163
20164                                 cf_regex_func=compile
20165 fi
20166
20167 fi
20168
20169 fi
20170
20171 if test "$cf_regex_func" = no ; then
20172         { echo "$as_me:20172: WARNING: cannot find regular expression library" >&5
20173 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20174 fi
20175
20176 echo "$as_me:20176: checking for regular-expression headers" >&5
20177 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20178 if test "${cf_cv_regex_hdrs+set}" = set; then
20179   echo $ECHO_N "(cached) $ECHO_C" >&6
20180 else
20181
20182 cf_cv_regex_hdrs=no
20183 case "$cf_regex_func" in
20184 (compile)
20185         for cf_regex_hdr in regexp.h regexpr.h
20186         do
20187                 cat >"conftest.$ac_ext" <<_ACEOF
20188 #line 20188 "configure"
20189 #include "confdefs.h"
20190 #include <$cf_regex_hdr>
20191 int
20192 main (void)
20193 {
20194
20195                         char *p = compile("", "", "", 0);
20196                         int x = step("", "");
20197                         (void)p;
20198                         (void)x;
20199
20200   ;
20201   return 0;
20202 }
20203 _ACEOF
20204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20205 if { (eval echo "$as_me:20205: \"$ac_link\"") >&5
20206   (eval $ac_link) 2>&5
20207   ac_status=$?
20208   echo "$as_me:20208: \$? = $ac_status" >&5
20209   (exit "$ac_status"); } &&
20210          { ac_try='test -s "conftest$ac_exeext"'
20211   { (eval echo "$as_me:20211: \"$ac_try\"") >&5
20212   (eval $ac_try) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit "$ac_status"); }; }; then
20216
20217                         cf_cv_regex_hdrs=$cf_regex_hdr
20218                         break
20219
20220 else
20221   echo "$as_me: failed program was:" >&5
20222 cat "conftest.$ac_ext" >&5
20223 fi
20224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20225         done
20226         ;;
20227 (*)
20228         for cf_regex_hdr in regex.h
20229         do
20230                 cat >"conftest.$ac_ext" <<_ACEOF
20231 #line 20231 "configure"
20232 #include "confdefs.h"
20233 #include <sys/types.h>
20234 #include <$cf_regex_hdr>
20235 int
20236 main (void)
20237 {
20238
20239                         regex_t *p = 0;
20240                         int x = regcomp(p, "", 0);
20241                         int y = regexec(p, "", 0, 0, 0);
20242                         (void)x;
20243                         (void)y;
20244                         regfree(p);
20245
20246   ;
20247   return 0;
20248 }
20249 _ACEOF
20250 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20251 if { (eval echo "$as_me:20251: \"$ac_link\"") >&5
20252   (eval $ac_link) 2>&5
20253   ac_status=$?
20254   echo "$as_me:20254: \$? = $ac_status" >&5
20255   (exit "$ac_status"); } &&
20256          { ac_try='test -s "conftest$ac_exeext"'
20257   { (eval echo "$as_me:20257: \"$ac_try\"") >&5
20258   (eval $ac_try) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit "$ac_status"); }; }; then
20262
20263                         cf_cv_regex_hdrs=$cf_regex_hdr
20264                         break
20265
20266 else
20267   echo "$as_me: failed program was:" >&5
20268 cat "conftest.$ac_ext" >&5
20269 fi
20270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20271         done
20272         ;;
20273 esac
20274
20275 fi
20276 echo "$as_me:20276: result: $cf_cv_regex_hdrs" >&5
20277 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20278
20279 case "$cf_cv_regex_hdrs" in
20280         (no)            { echo "$as_me:20280: WARNING: no regular expression header found" >&5
20281 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20282         (regex.h)
20283 cat >>confdefs.h <<\EOF
20284 #define HAVE_REGEX_H_FUNCS 1
20285 EOF
20286  ;;
20287         (regexp.h)
20288 cat >>confdefs.h <<\EOF
20289 #define HAVE_REGEXP_H_FUNCS 1
20290 EOF
20291  ;;
20292         (regexpr.h)
20293 cat >>confdefs.h <<\EOF
20294 #define HAVE_REGEXPR_H_FUNCS 1
20295 EOF
20296  ;;
20297 esac
20298
20299 for ac_header in \
20300 fcntl.h \
20301 getopt.h \
20302 limits.h \
20303 locale.h \
20304 math.h \
20305 poll.h \
20306 sys/ioctl.h \
20307 sys/param.h \
20308 sys/poll.h \
20309 sys/select.h \
20310 sys/time.h \
20311 sys/times.h \
20312 unistd.h \
20313 wctype.h \
20314
20315 do
20316 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20317 echo "$as_me:20317: checking for $ac_header" >&5
20318 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20319 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20320   echo $ECHO_N "(cached) $ECHO_C" >&6
20321 else
20322   cat >"conftest.$ac_ext" <<_ACEOF
20323 #line 20323 "configure"
20324 #include "confdefs.h"
20325 #include <$ac_header>
20326 _ACEOF
20327 if { (eval echo "$as_me:20327: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20328   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20329   ac_status=$?
20330   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20331   rm -f conftest.er1
20332   cat conftest.err >&5
20333   echo "$as_me:20333: \$? = $ac_status" >&5
20334   (exit "$ac_status"); } >/dev/null; then
20335   if test -s conftest.err; then
20336     ac_cpp_err=$ac_c_preproc_warn_flag
20337   else
20338     ac_cpp_err=
20339   fi
20340 else
20341   ac_cpp_err=yes
20342 fi
20343 if test -z "$ac_cpp_err"; then
20344   eval "$as_ac_Header=yes"
20345 else
20346   echo "$as_me: failed program was:" >&5
20347   cat "conftest.$ac_ext" >&5
20348   eval "$as_ac_Header=no"
20349 fi
20350 rm -f conftest.err "conftest.$ac_ext"
20351 fi
20352 echo "$as_me:20352: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20353 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20354 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20355   cat >>confdefs.h <<EOF
20356 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20357 EOF
20358
20359 fi
20360 done
20361
20362 for ac_header in unistd.h getopt.h
20363 do
20364 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20365 echo "$as_me:20365: checking for $ac_header" >&5
20366 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20367 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20368   echo $ECHO_N "(cached) $ECHO_C" >&6
20369 else
20370   cat >"conftest.$ac_ext" <<_ACEOF
20371 #line 20371 "configure"
20372 #include "confdefs.h"
20373 #include <$ac_header>
20374 _ACEOF
20375 if { (eval echo "$as_me:20375: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20376   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20377   ac_status=$?
20378   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20379   rm -f conftest.er1
20380   cat conftest.err >&5
20381   echo "$as_me:20381: \$? = $ac_status" >&5
20382   (exit "$ac_status"); } >/dev/null; then
20383   if test -s conftest.err; then
20384     ac_cpp_err=$ac_c_preproc_warn_flag
20385   else
20386     ac_cpp_err=
20387   fi
20388 else
20389   ac_cpp_err=yes
20390 fi
20391 if test -z "$ac_cpp_err"; then
20392   eval "$as_ac_Header=yes"
20393 else
20394   echo "$as_me: failed program was:" >&5
20395   cat "conftest.$ac_ext" >&5
20396   eval "$as_ac_Header=no"
20397 fi
20398 rm -f conftest.err "conftest.$ac_ext"
20399 fi
20400 echo "$as_me:20400: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20401 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20402 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20403   cat >>confdefs.h <<EOF
20404 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20405 EOF
20406
20407 fi
20408 done
20409
20410 echo "$as_me:20410: checking for header declaring getopt variables" >&5
20411 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20412 if test "${cf_cv_getopt_header+set}" = set; then
20413   echo $ECHO_N "(cached) $ECHO_C" >&6
20414 else
20415
20416 cf_cv_getopt_header=none
20417 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20418 do
20419 cat >"conftest.$ac_ext" <<_ACEOF
20420 #line 20420 "configure"
20421 #include "confdefs.h"
20422
20423 #include <$cf_header>
20424 int
20425 main (void)
20426 {
20427 int x = optind; char *y = optarg; (void)x; (void)y
20428   ;
20429   return 0;
20430 }
20431 _ACEOF
20432 rm -f "conftest.$ac_objext"
20433 if { (eval echo "$as_me:20433: \"$ac_compile\"") >&5
20434   (eval $ac_compile) 2>&5
20435   ac_status=$?
20436   echo "$as_me:20436: \$? = $ac_status" >&5
20437   (exit "$ac_status"); } &&
20438          { ac_try='test -s "conftest.$ac_objext"'
20439   { (eval echo "$as_me:20439: \"$ac_try\"") >&5
20440   (eval $ac_try) 2>&5
20441   ac_status=$?
20442   echo "$as_me:20442: \$? = $ac_status" >&5
20443   (exit "$ac_status"); }; }; then
20444   cf_cv_getopt_header=$cf_header
20445  break
20446 else
20447   echo "$as_me: failed program was:" >&5
20448 cat "conftest.$ac_ext" >&5
20449 fi
20450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20451 done
20452
20453 fi
20454 echo "$as_me:20454: result: $cf_cv_getopt_header" >&5
20455 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20456 if test "$cf_cv_getopt_header" != none ; then
20457
20458 cat >>confdefs.h <<\EOF
20459 #define HAVE_GETOPT_HEADER 1
20460 EOF
20461
20462 fi
20463 if test "$cf_cv_getopt_header" = getopt.h ; then
20464
20465 cat >>confdefs.h <<\EOF
20466 #define NEED_GETOPT_H 1
20467 EOF
20468
20469 fi
20470
20471 echo "$as_me:20471: checking if external environ is declared" >&5
20472 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20473 if test "${cf_cv_dcl_environ+set}" = set; then
20474   echo $ECHO_N "(cached) $ECHO_C" >&6
20475 else
20476
20477     cat >"conftest.$ac_ext" <<_ACEOF
20478 #line 20478 "configure"
20479 #include "confdefs.h"
20480
20481 #ifdef HAVE_STDLIB_H
20482 #include <stdlib.h>
20483 #endif
20484 #include <unistd.h>
20485 int
20486 main (void)
20487 {
20488 int x = (int) environ
20489   ;
20490   return 0;
20491 }
20492 _ACEOF
20493 rm -f "conftest.$ac_objext"
20494 if { (eval echo "$as_me:20494: \"$ac_compile\"") >&5
20495   (eval $ac_compile) 2>&5
20496   ac_status=$?
20497   echo "$as_me:20497: \$? = $ac_status" >&5
20498   (exit "$ac_status"); } &&
20499          { ac_try='test -s "conftest.$ac_objext"'
20500   { (eval echo "$as_me:20500: \"$ac_try\"") >&5
20501   (eval $ac_try) 2>&5
20502   ac_status=$?
20503   echo "$as_me:20503: \$? = $ac_status" >&5
20504   (exit "$ac_status"); }; }; then
20505   cf_cv_dcl_environ=yes
20506 else
20507   echo "$as_me: failed program was:" >&5
20508 cat "conftest.$ac_ext" >&5
20509 cf_cv_dcl_environ=no
20510 fi
20511 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20512
20513 fi
20514 echo "$as_me:20514: result: $cf_cv_dcl_environ" >&5
20515 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20516
20517 if test "$cf_cv_dcl_environ" = no ; then
20518
20519 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20520
20521     cat >>confdefs.h <<EOF
20522 #define $cf_result 1
20523 EOF
20524
20525 fi
20526
20527 # It's possible (for near-UNIX clones) that the data doesn't exist
20528
20529 echo "$as_me:20529: checking if external environ exists" >&5
20530 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20531 if test "${cf_cv_have_environ+set}" = set; then
20532   echo $ECHO_N "(cached) $ECHO_C" >&6
20533 else
20534
20535         cat >"conftest.$ac_ext" <<_ACEOF
20536 #line 20536 "configure"
20537 #include "confdefs.h"
20538
20539 #undef environ
20540 extern int environ;
20541
20542 int
20543 main (void)
20544 {
20545 environ = 2
20546   ;
20547   return 0;
20548 }
20549 _ACEOF
20550 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20551 if { (eval echo "$as_me:20551: \"$ac_link\"") >&5
20552   (eval $ac_link) 2>&5
20553   ac_status=$?
20554   echo "$as_me:20554: \$? = $ac_status" >&5
20555   (exit "$ac_status"); } &&
20556          { ac_try='test -s "conftest$ac_exeext"'
20557   { (eval echo "$as_me:20557: \"$ac_try\"") >&5
20558   (eval $ac_try) 2>&5
20559   ac_status=$?
20560   echo "$as_me:20560: \$? = $ac_status" >&5
20561   (exit "$ac_status"); }; }; then
20562   cf_cv_have_environ=yes
20563 else
20564   echo "$as_me: failed program was:" >&5
20565 cat "conftest.$ac_ext" >&5
20566 cf_cv_have_environ=no
20567 fi
20568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20569
20570 fi
20571 echo "$as_me:20571: result: $cf_cv_have_environ" >&5
20572 echo "${ECHO_T}$cf_cv_have_environ" >&6
20573
20574 if test "$cf_cv_have_environ" = yes ; then
20575
20576 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20577
20578         cat >>confdefs.h <<EOF
20579 #define $cf_result 1
20580 EOF
20581
20582 fi
20583
20584 echo "$as_me:20584: checking for getenv" >&5
20585 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20586 if test "${ac_cv_func_getenv+set}" = set; then
20587   echo $ECHO_N "(cached) $ECHO_C" >&6
20588 else
20589   cat >"conftest.$ac_ext" <<_ACEOF
20590 #line 20590 "configure"
20591 #include "confdefs.h"
20592 #define getenv autoconf_temporary
20593 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20594 #undef getenv
20595
20596 #ifdef __cplusplus
20597 extern "C"
20598 #endif
20599
20600 /* We use char because int might match the return type of a gcc2
20601    builtin and then its argument prototype would still apply.  */
20602 char getenv (void);
20603
20604 int
20605 main (void)
20606 {
20607
20608 /* The GNU C library defines stubs for functions which it implements
20609     to always fail with ENOSYS.  Some functions are actually named
20610     something starting with __ and the normal name is an alias.  */
20611 #if defined (__stub_getenv) || defined (__stub___getenv)
20612 #error found stub for getenv
20613 #endif
20614
20615         return getenv ();
20616   ;
20617   return 0;
20618 }
20619 _ACEOF
20620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20621 if { (eval echo "$as_me:20621: \"$ac_link\"") >&5
20622   (eval $ac_link) 2>&5
20623   ac_status=$?
20624   echo "$as_me:20624: \$? = $ac_status" >&5
20625   (exit "$ac_status"); } &&
20626          { ac_try='test -s "conftest$ac_exeext"'
20627   { (eval echo "$as_me:20627: \"$ac_try\"") >&5
20628   (eval $ac_try) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit "$ac_status"); }; }; then
20632   ac_cv_func_getenv=yes
20633 else
20634   echo "$as_me: failed program was:" >&5
20635 cat "conftest.$ac_ext" >&5
20636 ac_cv_func_getenv=no
20637 fi
20638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20639 fi
20640 echo "$as_me:20640: result: $ac_cv_func_getenv" >&5
20641 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20642
20643 for ac_func in putenv setenv strdup
20644 do
20645 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20646 echo "$as_me:20646: checking for $ac_func" >&5
20647 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20648 if eval "test \"\${$as_ac_var+set}\" = set"; then
20649   echo $ECHO_N "(cached) $ECHO_C" >&6
20650 else
20651   cat >"conftest.$ac_ext" <<_ACEOF
20652 #line 20652 "configure"
20653 #include "confdefs.h"
20654 #define $ac_func autoconf_temporary
20655 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20656 #undef $ac_func
20657
20658 #ifdef __cplusplus
20659 extern "C"
20660 #endif
20661
20662 /* We use char because int might match the return type of a gcc2
20663    builtin and then its argument prototype would still apply.  */
20664 char $ac_func (void);
20665
20666 int
20667 main (void)
20668 {
20669
20670 /* The GNU C library defines stubs for functions which it implements
20671     to always fail with ENOSYS.  Some functions are actually named
20672     something starting with __ and the normal name is an alias.  */
20673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20674 #error found stub for $ac_func
20675 #endif
20676
20677         return $ac_func ();
20678   ;
20679   return 0;
20680 }
20681 _ACEOF
20682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20683 if { (eval echo "$as_me:20683: \"$ac_link\"") >&5
20684   (eval $ac_link) 2>&5
20685   ac_status=$?
20686   echo "$as_me:20686: \$? = $ac_status" >&5
20687   (exit "$ac_status"); } &&
20688          { ac_try='test -s "conftest$ac_exeext"'
20689   { (eval echo "$as_me:20689: \"$ac_try\"") >&5
20690   (eval $ac_try) 2>&5
20691   ac_status=$?
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit "$ac_status"); }; }; then
20694   eval "$as_ac_var=yes"
20695 else
20696   echo "$as_me: failed program was:" >&5
20697 cat "conftest.$ac_ext" >&5
20698 eval "$as_ac_var=no"
20699 fi
20700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20701 fi
20702 echo "$as_me:20702: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20703 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20704 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20705   cat >>confdefs.h <<EOF
20706 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20707 EOF
20708
20709 fi
20710 done
20711
20712 echo "$as_me:20712: checking if getenv returns consistent values" >&5
20713 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20714 if test "${cf_cv_consistent_getenv+set}" = set; then
20715   echo $ECHO_N "(cached) $ECHO_C" >&6
20716 else
20717
20718 if test "$cross_compiling" = yes; then
20719   cf_cv_consistent_getenv=unknown
20720 else
20721   cat >"conftest.$ac_ext" <<_ACEOF
20722 #line 20722 "configure"
20723 #include "confdefs.h"
20724
20725 #include <stdlib.h>
20726 #include <unistd.h>
20727 #include <stdio.h>
20728 #include <string.h>
20729 #include <sys/types.h>
20730
20731 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20732 extern char **environ;  /* POSIX, but some systems are not... */
20733 #endif
20734
20735 #if defined(HAVE_STRDUP)
20736 #define str_alloc(s) strdup(s)
20737 #else
20738 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20739 #endif
20740
20741 static void set_value(const char *name, const char *value)
20742 {
20743 #if defined(HAVE_SETENV)
20744         setenv(name, value, 1);
20745 #elif defined(HAVE_PUTENV)
20746         char buffer[1024];
20747         sprintf(buffer, "%s=%s", name, value);
20748         putenv(str_alloc(buffer));
20749 #else
20750 #error neither putenv/setenv found
20751 #endif
20752 }
20753 int main(void)
20754 {
20755         int pass;
20756         size_t numenv, limit, j;
20757         char **mynames;
20758         char **myvalues;
20759         char **mypointer;
20760         char *equals;
20761         for (numenv = 0; environ[numenv]; ++numenv) ;
20762         limit = numenv + 10;
20763         mynames = (char **) calloc(limit + 1, sizeof(char *));
20764         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20765         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20766 #if defined(HAVE_ENVIRON)
20767         for (j = 0; environ[j]; ++j) {
20768                 mynames[j] = str_alloc(environ[j]);
20769                 equals = strchr(mynames[j], '=');
20770                 if (equals != 0) {
20771                         *equals++ = '\\0';
20772                         myvalues[j] = str_alloc(equals);
20773                 } else {
20774                         myvalues[j] = str_alloc("");
20775                 }
20776         }
20777 #endif
20778         for (j = numenv; j < limit; ++j) {
20779                 char name[80];
20780                 char value[80];
20781                 size_t found;
20782                 size_t k = 0;
20783                 do {
20784                         size_t jk;
20785                         found = 0;
20786                         sprintf(name, "TERM%lu", (unsigned long) k);
20787                         for (jk = 0; jk < j; ++jk) {
20788                                 if (!strcmp(name, mynames[jk])) {
20789                                         found = 1;
20790                                         ++k;
20791                                         break;
20792                                 }
20793                         }
20794                 } while (found);
20795                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20796                 set_value(name, value);
20797                 mynames[j] = str_alloc(name);
20798                 myvalues[j] = str_alloc(value);
20799         }
20800         for (pass = 0; pass < 3; ++pass) {
20801                 for (j = 0; j < limit; ++j) {
20802                         char *value = getenv(mynames[j]);
20803                         if (pass) {
20804                                 if (value == 0) {
20805                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20806                                         ${cf_cv_main_return:-return}(1);
20807                                 } else if (value != mypointer[j]) {
20808                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20809                                         ${cf_cv_main_return:-return}(1);
20810                                 } else if (strcmp(value, myvalues[j])) {
20811                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20812                                         ${cf_cv_main_return:-return}(1);
20813                                 }
20814                         } else {
20815                                 size_t k;
20816                                 mypointer[j] = value;
20817                                 for (k = 0; k < j; ++k) {
20818                                         if (mypointer[j] == mypointer[k]) {
20819                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20820                                                 ${cf_cv_main_return:-return}(1);
20821                                         }
20822                                 }
20823                         }
20824                 }
20825         }
20826         ${cf_cv_main_return:-return}(0);
20827 }
20828
20829 _ACEOF
20830 rm -f "conftest$ac_exeext"
20831 if { (eval echo "$as_me:20831: \"$ac_link\"") >&5
20832   (eval $ac_link) 2>&5
20833   ac_status=$?
20834   echo "$as_me:20834: \$? = $ac_status" >&5
20835   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20836   { (eval echo "$as_me:20836: \"$ac_try\"") >&5
20837   (eval $ac_try) 2>&5
20838   ac_status=$?
20839   echo "$as_me:20839: \$? = $ac_status" >&5
20840   (exit "$ac_status"); }; }; then
20841   cf_cv_consistent_getenv=yes
20842 else
20843   echo "$as_me: program exited with status $ac_status" >&5
20844 echo "$as_me: failed program was:" >&5
20845 cat "conftest.$ac_ext" >&5
20846 cf_cv_consistent_getenv=no
20847 fi
20848 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20849 fi
20850
20851 fi
20852 echo "$as_me:20852: result: $cf_cv_consistent_getenv" >&5
20853 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20854
20855 if test "x$cf_cv_consistent_getenv" = xno
20856 then
20857
20858 cat >>confdefs.h <<\EOF
20859 #define HAVE_CONSISTENT_GETENV 1
20860 EOF
20861
20862 fi
20863
20864 if test "x$cf_cv_consistent_getenv" = xno && \
20865         test "x$cf_with_trace" = xyes
20866 then
20867         { echo "$as_me:20867: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20868 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20869 fi
20870
20871 echo "$as_me:20871: checking if sys/time.h works with sys/select.h" >&5
20872 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20873 if test "${cf_cv_sys_time_select+set}" = set; then
20874   echo $ECHO_N "(cached) $ECHO_C" >&6
20875 else
20876
20877 cat >"conftest.$ac_ext" <<_ACEOF
20878 #line 20878 "configure"
20879 #include "confdefs.h"
20880
20881 #include <sys/types.h>
20882 #ifdef HAVE_SYS_TIME_H
20883 #include <sys/time.h>
20884 #endif
20885 #ifdef HAVE_SYS_SELECT_H
20886 #include <sys/select.h>
20887 #endif
20888
20889 int
20890 main (void)
20891 {
20892
20893   ;
20894   return 0;
20895 }
20896 _ACEOF
20897 rm -f "conftest.$ac_objext"
20898 if { (eval echo "$as_me:20898: \"$ac_compile\"") >&5
20899   (eval $ac_compile) 2>&5
20900   ac_status=$?
20901   echo "$as_me:20901: \$? = $ac_status" >&5
20902   (exit "$ac_status"); } &&
20903          { ac_try='test -s "conftest.$ac_objext"'
20904   { (eval echo "$as_me:20904: \"$ac_try\"") >&5
20905   (eval $ac_try) 2>&5
20906   ac_status=$?
20907   echo "$as_me:20907: \$? = $ac_status" >&5
20908   (exit "$ac_status"); }; }; then
20909   cf_cv_sys_time_select=yes
20910 else
20911   echo "$as_me: failed program was:" >&5
20912 cat "conftest.$ac_ext" >&5
20913 cf_cv_sys_time_select=no
20914 fi
20915 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20916
20917 fi
20918
20919 echo "$as_me:20919: result: $cf_cv_sys_time_select" >&5
20920 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20921 test "$cf_cv_sys_time_select" = yes &&
20922 cat >>confdefs.h <<\EOF
20923 #define HAVE_SYS_TIME_SELECT 1
20924 EOF
20925
20926 ###     checks for compiler characteristics
20927 ac_ext=c
20928 ac_cpp='$CPP $CPPFLAGS'
20929 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20930 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20932 ac_main_return="return"
20933
20934 echo "$as_me:20934: checking for an ANSI C-conforming const" >&5
20935 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20936 if test "${ac_cv_c_const+set}" = set; then
20937   echo $ECHO_N "(cached) $ECHO_C" >&6
20938 else
20939   cat >"conftest.$ac_ext" <<_ACEOF
20940 #line 20940 "configure"
20941 #include "confdefs.h"
20942
20943 int
20944 main (void)
20945 {
20946 /* FIXME: Include the comments suggested by Paul. */
20947 #ifndef __cplusplus
20948   /* Ultrix mips cc rejects this.  */
20949   typedef int charset[2];
20950   const charset x;
20951   /* SunOS 4.1.1 cc rejects this.  */
20952   char const *const *ccp;
20953   char **p;
20954   /* NEC SVR4.0.2 mips cc rejects this.  */
20955   struct point {int x, y;};
20956   static struct point const zero = {0,0};
20957   /* AIX XL C 1.02.0.0 rejects this.
20958      It does not let you subtract one const X* pointer from another in
20959      an arm of an if-expression whose if-part is not a constant
20960      expression */
20961   const char *g = "string";
20962   ccp = &g + (g ? g-g : 0);
20963   /* HPUX 7.0 cc rejects these. */
20964   ++ccp;
20965   p = (char**) ccp;
20966   ccp = (char const *const *) p;
20967   { /* SCO 3.2v4 cc rejects this.  */
20968     char *t;
20969     char const *s = 0 ? (char *) 0 : (char const *) 0;
20970
20971     *t++ = 0;
20972   }
20973   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20974     int x[] = {25, 17};
20975     const int *foo = &x[0];
20976     ++foo;
20977   }
20978   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20979     typedef const int *iptr;
20980     iptr p = 0;
20981     ++p;
20982   }
20983   { /* AIX XL C 1.02.0.0 rejects this saying
20984        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20985     struct s { int j; const int *ap[3]; };
20986     struct s *b; b->j = 5;
20987   }
20988   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20989     const int foo = 10;
20990   }
20991 #endif
20992
20993   ;
20994   return 0;
20995 }
20996 _ACEOF
20997 rm -f "conftest.$ac_objext"
20998 if { (eval echo "$as_me:20998: \"$ac_compile\"") >&5
20999   (eval $ac_compile) 2>&5
21000   ac_status=$?
21001   echo "$as_me:21001: \$? = $ac_status" >&5
21002   (exit "$ac_status"); } &&
21003          { ac_try='test -s "conftest.$ac_objext"'
21004   { (eval echo "$as_me:21004: \"$ac_try\"") >&5
21005   (eval $ac_try) 2>&5
21006   ac_status=$?
21007   echo "$as_me:21007: \$? = $ac_status" >&5
21008   (exit "$ac_status"); }; }; then
21009   ac_cv_c_const=yes
21010 else
21011   echo "$as_me: failed program was:" >&5
21012 cat "conftest.$ac_ext" >&5
21013 ac_cv_c_const=no
21014 fi
21015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21016 fi
21017 echo "$as_me:21017: result: $ac_cv_c_const" >&5
21018 echo "${ECHO_T}$ac_cv_c_const" >&6
21019 if test $ac_cv_c_const = no; then
21020
21021 cat >>confdefs.h <<\EOF
21022 #define const
21023 EOF
21024
21025 fi
21026
21027 echo "$as_me:21027: checking for inline" >&5
21028 echo $ECHO_N "checking for inline... $ECHO_C" >&6
21029 if test "${ac_cv_c_inline+set}" = set; then
21030   echo $ECHO_N "(cached) $ECHO_C" >&6
21031 else
21032   ac_cv_c_inline=no
21033 for ac_kw in inline __inline__ __inline; do
21034   cat >"conftest.$ac_ext" <<_ACEOF
21035 #line 21035 "configure"
21036 #include "confdefs.h"
21037 #ifndef __cplusplus
21038 static $ac_kw int static_foo () {return 0; }
21039 $ac_kw int foo () {return 0; }
21040 #endif
21041
21042 _ACEOF
21043 rm -f "conftest.$ac_objext"
21044 if { (eval echo "$as_me:21044: \"$ac_compile\"") >&5
21045   (eval $ac_compile) 2>&5
21046   ac_status=$?
21047   echo "$as_me:21047: \$? = $ac_status" >&5
21048   (exit "$ac_status"); } &&
21049          { ac_try='test -s "conftest.$ac_objext"'
21050   { (eval echo "$as_me:21050: \"$ac_try\"") >&5
21051   (eval $ac_try) 2>&5
21052   ac_status=$?
21053   echo "$as_me:21053: \$? = $ac_status" >&5
21054   (exit "$ac_status"); }; }; then
21055   ac_cv_c_inline=$ac_kw; break
21056 else
21057   echo "$as_me: failed program was:" >&5
21058 cat "conftest.$ac_ext" >&5
21059 fi
21060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21061 done
21062
21063 fi
21064 echo "$as_me:21064: result: $ac_cv_c_inline" >&5
21065 echo "${ECHO_T}$ac_cv_c_inline" >&6
21066 case $ac_cv_c_inline in
21067   inline | yes) ;;
21068   no)
21069 cat >>confdefs.h <<\EOF
21070 #define inline
21071 EOF
21072  ;;
21073   *)  cat >>confdefs.h <<EOF
21074 #define inline $ac_cv_c_inline
21075 EOF
21076  ;;
21077 esac
21078
21079 NCURSES_INLINE=
21080 if test "$ac_cv_c_inline" != no ; then
21081         NCURSES_INLINE=inline
21082         if test "$INTEL_COMPILER" = yes
21083         then
21084                 :
21085         elif test "$CLANG_COMPILER" = yes
21086         then
21087                 :
21088         elif test "$GCC" = yes
21089         then
21090                 echo "$as_me:21090: checking if $CC supports options to tune inlining" >&5
21091 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21092 if test "${cf_cv_gcc_inline+set}" = set; then
21093   echo $ECHO_N "(cached) $ECHO_C" >&6
21094 else
21095
21096                 cf_save_CFLAGS=$CFLAGS
21097                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21098                 cat >"conftest.$ac_ext" <<_ACEOF
21099 #line 21099 "configure"
21100 #include "confdefs.h"
21101 inline int foo(void) { return 1; }
21102 int
21103 main (void)
21104 {
21105 ${cf_cv_main_return:-return} foo()
21106   ;
21107   return 0;
21108 }
21109 _ACEOF
21110 rm -f "conftest.$ac_objext"
21111 if { (eval echo "$as_me:21111: \"$ac_compile\"") >&5
21112   (eval $ac_compile) 2>&5
21113   ac_status=$?
21114   echo "$as_me:21114: \$? = $ac_status" >&5
21115   (exit "$ac_status"); } &&
21116          { ac_try='test -s "conftest.$ac_objext"'
21117   { (eval echo "$as_me:21117: \"$ac_try\"") >&5
21118   (eval $ac_try) 2>&5
21119   ac_status=$?
21120   echo "$as_me:21120: \$? = $ac_status" >&5
21121   (exit "$ac_status"); }; }; then
21122   cf_cv_gcc_inline=yes
21123 else
21124   echo "$as_me: failed program was:" >&5
21125 cat "conftest.$ac_ext" >&5
21126 cf_cv_gcc_inline=no
21127 fi
21128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21129                 CFLAGS=$cf_save_CFLAGS
21130
21131 fi
21132 echo "$as_me:21132: result: $cf_cv_gcc_inline" >&5
21133 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21134                 if test "$cf_cv_gcc_inline" = yes ; then
21135
21136 cf_fix_cppflags=no
21137 cf_new_cflags=
21138 cf_new_cppflags=
21139 cf_new_extra_cppflags=
21140
21141 for cf_add_cflags in --param max-inline-insns-single=1200
21142 do
21143 case "$cf_fix_cppflags" in
21144 (no)
21145         case "$cf_add_cflags" in
21146         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21147                 case "$cf_add_cflags" in
21148                 (-D*)
21149                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21150
21151                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21152                                 && test -z "${cf_tst_cflags}" \
21153                                 && cf_fix_cppflags=yes
21154
21155                         if test "$cf_fix_cppflags" = yes ; then
21156
21157         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21158         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21159
21160                                 continue
21161                         elif test "${cf_tst_cflags}" = "\"'" ; then
21162
21163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21165
21166                                 continue
21167                         fi
21168                         ;;
21169                 esac
21170                 case "$CPPFLAGS" in
21171                 (*$cf_add_cflags)
21172                         ;;
21173                 (*)
21174                         case "$cf_add_cflags" in
21175                         (-D*)
21176                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21177
21178 CPPFLAGS=`echo "$CPPFLAGS" | \
21179         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21180                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21181
21182                                 ;;
21183                         esac
21184
21185         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21186         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21187
21188                         ;;
21189                 esac
21190                 ;;
21191         (*)
21192
21193         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21194         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21195
21196                 ;;
21197         esac
21198         ;;
21199 (yes)
21200
21201         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21202         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21203
21204         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21205
21206         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21207                 && test -z "${cf_tst_cflags}" \
21208                 && cf_fix_cppflags=no
21209         ;;
21210 esac
21211 done
21212
21213 if test -n "$cf_new_cflags" ; then
21214
21215         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21216         CFLAGS="${CFLAGS}$cf_new_cflags"
21217
21218 fi
21219
21220 if test -n "$cf_new_cppflags" ; then
21221
21222         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21223         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21224
21225 fi
21226
21227 if test -n "$cf_new_extra_cppflags" ; then
21228
21229         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21230         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21231
21232 fi
21233
21234                 fi
21235         fi
21236 fi
21237
21238 echo "$as_me:21238: checking for signal global datatype" >&5
21239 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21240 if test "${cf_cv_sig_atomic_t+set}" = set; then
21241   echo $ECHO_N "(cached) $ECHO_C" >&6
21242 else
21243
21244         for cf_type in \
21245                 "volatile sig_atomic_t" \
21246                 "sig_atomic_t" \
21247                 "int"
21248         do
21249         cat >"conftest.$ac_ext" <<_ACEOF
21250 #line 21250 "configure"
21251 #include "confdefs.h"
21252
21253 #include <sys/types.h>
21254 #include <signal.h>
21255 #include <stdio.h>
21256
21257 extern $cf_type x;
21258 $cf_type x;
21259 static void handler(int sig)
21260 {
21261         (void)sig;
21262         x = 5;
21263 }
21264 int
21265 main (void)
21266 {
21267 signal(SIGINT, handler);
21268                  x = 1
21269   ;
21270   return 0;
21271 }
21272 _ACEOF
21273 rm -f "conftest.$ac_objext"
21274 if { (eval echo "$as_me:21274: \"$ac_compile\"") >&5
21275   (eval $ac_compile) 2>&5
21276   ac_status=$?
21277   echo "$as_me:21277: \$? = $ac_status" >&5
21278   (exit "$ac_status"); } &&
21279          { ac_try='test -s "conftest.$ac_objext"'
21280   { (eval echo "$as_me:21280: \"$ac_try\"") >&5
21281   (eval $ac_try) 2>&5
21282   ac_status=$?
21283   echo "$as_me:21283: \$? = $ac_status" >&5
21284   (exit "$ac_status"); }; }; then
21285   cf_cv_sig_atomic_t=$cf_type
21286 else
21287   echo "$as_me: failed program was:" >&5
21288 cat "conftest.$ac_ext" >&5
21289 cf_cv_sig_atomic_t=no
21290 fi
21291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21292                 test "$cf_cv_sig_atomic_t" != no && break
21293         done
21294
21295 fi
21296
21297 echo "$as_me:21297: result: $cf_cv_sig_atomic_t" >&5
21298 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21299 test "$cf_cv_sig_atomic_t" != no &&
21300 cat >>confdefs.h <<EOF
21301 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21302 EOF
21303
21304 if test "$NCURSES_CHTYPE" = auto ; then
21305
21306 echo "$as_me:21306: checking for type of chtype" >&5
21307 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21308 if test "${cf_cv_typeof_chtype+set}" = set; then
21309   echo $ECHO_N "(cached) $ECHO_C" >&6
21310 else
21311
21312                 if test "$cross_compiling" = yes; then
21313   cf_cv_typeof_chtype=long
21314 else
21315   cat >"conftest.$ac_ext" <<_ACEOF
21316 #line 21316 "configure"
21317 #include "confdefs.h"
21318
21319 #define WANT_BITS 31
21320 #include <stdio.h>
21321 int main(void)
21322 {
21323         FILE *fp = fopen("cf_test.out", "w");
21324         if (fp != 0) {
21325                 char *result = "long";
21326                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21327                         int n;
21328                         unsigned int x, y;
21329                         for (n = 0; n < WANT_BITS; n++) {
21330                                 x = (1 << n);
21331                                 y = (x >> n);
21332                                 if (y != 1 || x == 0) {
21333                                         x = 0;
21334                                         break;
21335                                 }
21336                         }
21337                         /*
21338                          * If x is nonzero, an int is big enough for the bits
21339                          * that we want.
21340                          */
21341                         result = (x != 0) ? "int" : "long";
21342                 }
21343                 fputs(result, fp);
21344                 fclose(fp);
21345         }
21346         ${cf_cv_main_return:-return}(0);
21347 }
21348
21349 _ACEOF
21350 rm -f "conftest$ac_exeext"
21351 if { (eval echo "$as_me:21351: \"$ac_link\"") >&5
21352   (eval $ac_link) 2>&5
21353   ac_status=$?
21354   echo "$as_me:21354: \$? = $ac_status" >&5
21355   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21356   { (eval echo "$as_me:21356: \"$ac_try\"") >&5
21357   (eval $ac_try) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit "$ac_status"); }; }; then
21361   cf_cv_typeof_chtype=`cat cf_test.out`
21362 else
21363   echo "$as_me: program exited with status $ac_status" >&5
21364 echo "$as_me: failed program was:" >&5
21365 cat "conftest.$ac_ext" >&5
21366 cf_cv_typeof_chtype=long
21367 fi
21368 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21369 fi
21370                 rm -f cf_test.out
21371
21372 fi
21373
21374 echo "$as_me:21374: result: $cf_cv_typeof_chtype" >&5
21375 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21376
21377 cat >>confdefs.h <<EOF
21378 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21379 EOF
21380
21381 else
21382         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21383 fi
21384 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21385
21386 echo "$as_me:21386: checking if unsigned literals are legal" >&5
21387 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21388 if test "${cf_cv_unsigned_literals+set}" = set; then
21389   echo $ECHO_N "(cached) $ECHO_C" >&6
21390 else
21391
21392         cat >"conftest.$ac_ext" <<_ACEOF
21393 #line 21393 "configure"
21394 #include "confdefs.h"
21395
21396 int
21397 main (void)
21398 {
21399 long x = 1L + 1UL + 1U + 1
21400   ;
21401   return 0;
21402 }
21403 _ACEOF
21404 rm -f "conftest.$ac_objext"
21405 if { (eval echo "$as_me:21405: \"$ac_compile\"") >&5
21406   (eval $ac_compile) 2>&5
21407   ac_status=$?
21408   echo "$as_me:21408: \$? = $ac_status" >&5
21409   (exit "$ac_status"); } &&
21410          { ac_try='test -s "conftest.$ac_objext"'
21411   { (eval echo "$as_me:21411: \"$ac_try\"") >&5
21412   (eval $ac_try) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit "$ac_status"); }; }; then
21416   cf_cv_unsigned_literals=yes
21417 else
21418   echo "$as_me: failed program was:" >&5
21419 cat "conftest.$ac_ext" >&5
21420 cf_cv_unsigned_literals=no
21421 fi
21422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21423
21424 fi
21425
21426 echo "$as_me:21426: result: $cf_cv_unsigned_literals" >&5
21427 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21428
21429 cf_cv_1UL="1"
21430 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21431 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21432
21433 if test "$NCURSES_MMASK_T" = auto ; then
21434         cf_cv_typeof_mmask_t=long
21435 else
21436         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21437 fi
21438 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21439
21440 ###     Checks for external-data
21441
21442 echo "$as_me:21442: checking if external errno is declared" >&5
21443 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21444 if test "${cf_cv_dcl_errno+set}" = set; then
21445   echo $ECHO_N "(cached) $ECHO_C" >&6
21446 else
21447
21448         cat >"conftest.$ac_ext" <<_ACEOF
21449 #line 21449 "configure"
21450 #include "confdefs.h"
21451
21452 #ifdef HAVE_STDLIB_H
21453 #include <stdlib.h>
21454 #endif
21455 #include <stdio.h>
21456 #include <sys/types.h>
21457 #include <errno.h>
21458 int
21459 main (void)
21460 {
21461 int x = (int) errno; (void)x
21462   ;
21463   return 0;
21464 }
21465 _ACEOF
21466 rm -f "conftest.$ac_objext"
21467 if { (eval echo "$as_me:21467: \"$ac_compile\"") >&5
21468   (eval $ac_compile) 2>&5
21469   ac_status=$?
21470   echo "$as_me:21470: \$? = $ac_status" >&5
21471   (exit "$ac_status"); } &&
21472          { ac_try='test -s "conftest.$ac_objext"'
21473   { (eval echo "$as_me:21473: \"$ac_try\"") >&5
21474   (eval $ac_try) 2>&5
21475   ac_status=$?
21476   echo "$as_me:21476: \$? = $ac_status" >&5
21477   (exit "$ac_status"); }; }; then
21478   cf_cv_dcl_errno=yes
21479 else
21480   echo "$as_me: failed program was:" >&5
21481 cat "conftest.$ac_ext" >&5
21482 cf_cv_dcl_errno=no
21483 fi
21484 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21485
21486 fi
21487 echo "$as_me:21487: result: $cf_cv_dcl_errno" >&5
21488 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21489
21490 if test "$cf_cv_dcl_errno" = no ; then
21491
21492 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21493
21494         cat >>confdefs.h <<EOF
21495 #define $cf_result 1
21496 EOF
21497
21498 fi
21499
21500 # It's possible (for near-UNIX clones) that the data doesn't exist
21501
21502 echo "$as_me:21502: checking if external errno exists" >&5
21503 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21504 if test "${cf_cv_have_errno+set}" = set; then
21505   echo $ECHO_N "(cached) $ECHO_C" >&6
21506 else
21507
21508         cat >"conftest.$ac_ext" <<_ACEOF
21509 #line 21509 "configure"
21510 #include "confdefs.h"
21511
21512 #undef errno
21513 extern int errno;
21514
21515 int
21516 main (void)
21517 {
21518 errno = 2
21519   ;
21520   return 0;
21521 }
21522 _ACEOF
21523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21524 if { (eval echo "$as_me:21524: \"$ac_link\"") >&5
21525   (eval $ac_link) 2>&5
21526   ac_status=$?
21527   echo "$as_me:21527: \$? = $ac_status" >&5
21528   (exit "$ac_status"); } &&
21529          { ac_try='test -s "conftest$ac_exeext"'
21530   { (eval echo "$as_me:21530: \"$ac_try\"") >&5
21531   (eval $ac_try) 2>&5
21532   ac_status=$?
21533   echo "$as_me:21533: \$? = $ac_status" >&5
21534   (exit "$ac_status"); }; }; then
21535   cf_cv_have_errno=yes
21536 else
21537   echo "$as_me: failed program was:" >&5
21538 cat "conftest.$ac_ext" >&5
21539 cf_cv_have_errno=no
21540 fi
21541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21542
21543 fi
21544 echo "$as_me:21544: result: $cf_cv_have_errno" >&5
21545 echo "${ECHO_T}$cf_cv_have_errno" >&6
21546
21547 if test "$cf_cv_have_errno" = yes ; then
21548
21549 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21550
21551         cat >>confdefs.h <<EOF
21552 #define $cf_result 1
21553 EOF
21554
21555 fi
21556
21557 echo "$as_me:21557: checking if data-only library module links" >&5
21558 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21559 if test "${cf_cv_link_dataonly+set}" = set; then
21560   echo $ECHO_N "(cached) $ECHO_C" >&6
21561 else
21562
21563         rm -f conftest.a
21564         cat >conftest.$ac_ext <<EOF
21565 #line 21565 "configure"
21566 int     testdata[3] = { 123, 456, 789 };
21567 EOF
21568         if { (eval echo "$as_me:21568: \"$ac_compile\"") >&5
21569   (eval $ac_compile) 2>&5
21570   ac_status=$?
21571   echo "$as_me:21571: \$? = $ac_status" >&5
21572   (exit "$ac_status"); } ; then
21573                 mv conftest.o data.o && \
21574                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21575         fi
21576         rm -f conftest.$ac_ext data.o
21577         cat >conftest.$ac_ext <<EOF
21578 #line 21578 "configure"
21579 int     testfunc(void)
21580 {
21581 #if defined(NeXT)
21582         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21583 #else
21584         extern int testdata[3];
21585         return testdata[0] == 123
21586            &&  testdata[1] == 456
21587            &&  testdata[2] == 789;
21588 #endif
21589 }
21590 EOF
21591         if { (eval echo "$as_me:21591: \"$ac_compile\"") >&5
21592   (eval $ac_compile) 2>&5
21593   ac_status=$?
21594   echo "$as_me:21594: \$? = $ac_status" >&5
21595   (exit "$ac_status"); }; then
21596                 mv conftest.o func.o && \
21597                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21598         fi
21599         rm -f conftest.$ac_ext func.o
21600         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21601         cf_saveLIBS="$LIBS"
21602         LIBS="conftest.a $LIBS"
21603         if test "$cross_compiling" = yes; then
21604   cf_cv_link_dataonly=unknown
21605 else
21606   cat >"conftest.$ac_ext" <<_ACEOF
21607 #line 21607 "configure"
21608 #include "confdefs.h"
21609
21610         int main(void)
21611         {
21612                 extern int testfunc();
21613                 ${cf_cv_main_return:-return} (!testfunc());
21614         }
21615
21616 _ACEOF
21617 rm -f "conftest$ac_exeext"
21618 if { (eval echo "$as_me:21618: \"$ac_link\"") >&5
21619   (eval $ac_link) 2>&5
21620   ac_status=$?
21621   echo "$as_me:21621: \$? = $ac_status" >&5
21622   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21623   { (eval echo "$as_me:21623: \"$ac_try\"") >&5
21624   (eval $ac_try) 2>&5
21625   ac_status=$?
21626   echo "$as_me:21626: \$? = $ac_status" >&5
21627   (exit "$ac_status"); }; }; then
21628   cf_cv_link_dataonly=yes
21629 else
21630   echo "$as_me: program exited with status $ac_status" >&5
21631 echo "$as_me: failed program was:" >&5
21632 cat "conftest.$ac_ext" >&5
21633 cf_cv_link_dataonly=no
21634 fi
21635 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21636 fi
21637         LIBS="$cf_saveLIBS"
21638
21639 fi
21640
21641 echo "$as_me:21641: result: $cf_cv_link_dataonly" >&5
21642 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21643
21644 if test "$cf_cv_link_dataonly" = no ; then
21645
21646 cat >>confdefs.h <<\EOF
21647 #define BROKEN_LINKER 1
21648 EOF
21649
21650         BROKEN_LINKER=1
21651 fi
21652
21653 ###     Checks for library functions.
21654
21655 for ac_func in \
21656 fpathconf \
21657 getcwd \
21658 getegid \
21659 geteuid \
21660 getopt \
21661 issetugid \
21662 localeconv \
21663 poll \
21664 putenv \
21665 remove \
21666 select \
21667 setbuf \
21668 setbuffer \
21669 setenv \
21670 setfsuid \
21671 setvbuf \
21672 sigaction \
21673 sigvec \
21674 snprintf \
21675 strdup \
21676 strstr \
21677 sysconf \
21678 tcgetpgrp \
21679 times \
21680 tsearch \
21681 vsnprintf \
21682
21683 do
21684 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21685 echo "$as_me:21685: checking for $ac_func" >&5
21686 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21687 if eval "test \"\${$as_ac_var+set}\" = set"; then
21688   echo $ECHO_N "(cached) $ECHO_C" >&6
21689 else
21690   cat >"conftest.$ac_ext" <<_ACEOF
21691 #line 21691 "configure"
21692 #include "confdefs.h"
21693 #define $ac_func autoconf_temporary
21694 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21695 #undef $ac_func
21696
21697 #ifdef __cplusplus
21698 extern "C"
21699 #endif
21700
21701 /* We use char because int might match the return type of a gcc2
21702    builtin and then its argument prototype would still apply.  */
21703 char $ac_func (void);
21704
21705 int
21706 main (void)
21707 {
21708
21709 /* The GNU C library defines stubs for functions which it implements
21710     to always fail with ENOSYS.  Some functions are actually named
21711     something starting with __ and the normal name is an alias.  */
21712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21713 #error found stub for $ac_func
21714 #endif
21715
21716         return $ac_func ();
21717   ;
21718   return 0;
21719 }
21720 _ACEOF
21721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21722 if { (eval echo "$as_me:21722: \"$ac_link\"") >&5
21723   (eval $ac_link) 2>&5
21724   ac_status=$?
21725   echo "$as_me:21725: \$? = $ac_status" >&5
21726   (exit "$ac_status"); } &&
21727          { ac_try='test -s "conftest$ac_exeext"'
21728   { (eval echo "$as_me:21728: \"$ac_try\"") >&5
21729   (eval $ac_try) 2>&5
21730   ac_status=$?
21731   echo "$as_me:21731: \$? = $ac_status" >&5
21732   (exit "$ac_status"); }; }; then
21733   eval "$as_ac_var=yes"
21734 else
21735   echo "$as_me: failed program was:" >&5
21736 cat "conftest.$ac_ext" >&5
21737 eval "$as_ac_var=no"
21738 fi
21739 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21740 fi
21741 echo "$as_me:21741: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21742 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21743 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21744   cat >>confdefs.h <<EOF
21745 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21746 EOF
21747
21748 fi
21749 done
21750
21751 echo "$as_me:21751: checking if _PATH_TTYS is defined in ttyent.h" >&5
21752 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21753 if test "${cf_cv_PATH_TTYS+set}" = set; then
21754   echo $ECHO_N "(cached) $ECHO_C" >&6
21755 else
21756
21757 cat >"conftest.$ac_ext" <<_ACEOF
21758 #line 21758 "configure"
21759 #include "confdefs.h"
21760
21761 #include <stdio.h>
21762 #include <ttyent.h>
21763 int
21764 main (void)
21765 {
21766
21767 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21768   ;
21769   return 0;
21770 }
21771 _ACEOF
21772 rm -f "conftest.$ac_objext"
21773 if { (eval echo "$as_me:21773: \"$ac_compile\"") >&5
21774   (eval $ac_compile) 2>&5
21775   ac_status=$?
21776   echo "$as_me:21776: \$? = $ac_status" >&5
21777   (exit "$ac_status"); } &&
21778          { ac_try='test -s "conftest.$ac_objext"'
21779   { (eval echo "$as_me:21779: \"$ac_try\"") >&5
21780   (eval $ac_try) 2>&5
21781   ac_status=$?
21782   echo "$as_me:21782: \$? = $ac_status" >&5
21783   (exit "$ac_status"); }; }; then
21784   cf_cv_PATH_TTYS=yes
21785 else
21786   echo "$as_me: failed program was:" >&5
21787 cat "conftest.$ac_ext" >&5
21788 cf_cv_PATH_TTYS=no
21789 fi
21790 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21791 fi
21792 echo "$as_me:21792: result: $cf_cv_PATH_TTYS" >&5
21793 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21794
21795 if test $cf_cv_PATH_TTYS = no
21796 then
21797         for cf_ttys in /etc/ttytype /etc/ttys
21798         do
21799                 if test -f $cf_ttys
21800                 then
21801                         cf_cv_PATH_TTYS=maybe
21802
21803 cat >>confdefs.h <<\EOF
21804 #define _PATH_TTYS $cf_ttys
21805 EOF
21806
21807                         break
21808                 fi
21809         done
21810 fi
21811
21812 if test $cf_cv_PATH_TTYS != no
21813 then
21814         echo "$as_me:21814: checking if _PATH_TTYS file exists" >&5
21815 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21816 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21817   echo $ECHO_N "(cached) $ECHO_C" >&6
21818 else
21819
21820                 if test "$cross_compiling" = yes; then
21821   cf_cv_have_PATH_TTYS=unknown
21822 else
21823   cat >"conftest.$ac_ext" <<_ACEOF
21824 #line 21824 "configure"
21825 #include "confdefs.h"
21826
21827 #include <stdio.h>
21828 #include <ttyent.h>
21829 int main(void) {
21830         FILE *fp = fopen(_PATH_TTYS, "r");
21831         ${cf_cv_main_return:-return} (fp == 0);
21832 }
21833 _ACEOF
21834 rm -f "conftest$ac_exeext"
21835 if { (eval echo "$as_me:21835: \"$ac_link\"") >&5
21836   (eval $ac_link) 2>&5
21837   ac_status=$?
21838   echo "$as_me:21838: \$? = $ac_status" >&5
21839   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21840   { (eval echo "$as_me:21840: \"$ac_try\"") >&5
21841   (eval $ac_try) 2>&5
21842   ac_status=$?
21843   echo "$as_me:21843: \$? = $ac_status" >&5
21844   (exit "$ac_status"); }; }; then
21845   cf_cv_have_PATH_TTYS=yes
21846 else
21847   echo "$as_me: program exited with status $ac_status" >&5
21848 echo "$as_me: failed program was:" >&5
21849 cat "conftest.$ac_ext" >&5
21850 cf_cv_have_PATH_TTYS=no
21851 fi
21852 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21853 fi
21854 fi
21855 echo "$as_me:21855: result: $cf_cv_have_PATH_TTYS" >&5
21856 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21857         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21858 fi
21859
21860 if test $cf_cv_PATH_TTYS != no
21861 then
21862
21863 cat >>confdefs.h <<\EOF
21864 #define HAVE_PATH_TTYS 1
21865 EOF
21866
21867         echo "$as_me:21867: checking for getttynam" >&5
21868 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21869 if test "${cf_cv_func_getttynam+set}" = set; then
21870   echo $ECHO_N "(cached) $ECHO_C" >&6
21871 else
21872
21873                 cat >"conftest.$ac_ext" <<_ACEOF
21874 #line 21874 "configure"
21875 #include "confdefs.h"
21876 #include <ttyent.h>
21877 int
21878 main (void)
21879 {
21880 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21881   ;
21882   return 0;
21883 }
21884 _ACEOF
21885 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21886 if { (eval echo "$as_me:21886: \"$ac_link\"") >&5
21887   (eval $ac_link) 2>&5
21888   ac_status=$?
21889   echo "$as_me:21889: \$? = $ac_status" >&5
21890   (exit "$ac_status"); } &&
21891          { ac_try='test -s "conftest$ac_exeext"'
21892   { (eval echo "$as_me:21892: \"$ac_try\"") >&5
21893   (eval $ac_try) 2>&5
21894   ac_status=$?
21895   echo "$as_me:21895: \$? = $ac_status" >&5
21896   (exit "$ac_status"); }; }; then
21897   cf_cv_func_getttynam=yes
21898 else
21899   echo "$as_me: failed program was:" >&5
21900 cat "conftest.$ac_ext" >&5
21901 cf_cv_func_getttynam=no
21902 fi
21903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21904 fi
21905 echo "$as_me:21905: result: $cf_cv_func_getttynam" >&5
21906 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21907         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21908 #define HAVE_GETTTYNAM 1
21909 EOF
21910
21911 fi
21912
21913 if test "x$ac_cv_func_getopt" = xno && \
21914    test "x$cf_with_progs$cf_with_tests" != xnono; then
21915         { { echo "$as_me:21915: error: getopt is required for building programs" >&5
21916 echo "$as_me: error: getopt is required for building programs" >&2;}
21917    { (exit 1); exit 1; }; }
21918 fi
21919
21920 if test "x$with_safe_sprintf" = xyes
21921 then
21922         if test "x$ac_cv_func_vsnprintf" = xyes
21923         then
21924                 { echo "$as_me:21924: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21925 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21926         else
21927
21928 cat >>confdefs.h <<\EOF
21929 #define USE_SAFE_SPRINTF 1
21930 EOF
21931
21932         fi
21933 fi
21934
21935 if test "x$with_getcap" = "xyes" ; then
21936
21937 echo "$as_me:21937: checking for terminal-capability database functions" >&5
21938 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21939 if test "${cf_cv_cgetent+set}" = set; then
21940   echo $ECHO_N "(cached) $ECHO_C" >&6
21941 else
21942
21943 cat >"conftest.$ac_ext" <<_ACEOF
21944 #line 21944 "configure"
21945 #include "confdefs.h"
21946
21947 #include <stdlib.h>
21948 int
21949 main (void)
21950 {
21951
21952         char temp[128];
21953         char *buf = temp;
21954         char *db_array = temp;
21955         cgetent(&buf, &db_array, "vt100");
21956         cgetcap(buf, "tc", '=');
21957         cgetmatch(buf, "tc");
21958
21959   ;
21960   return 0;
21961 }
21962 _ACEOF
21963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21964 if { (eval echo "$as_me:21964: \"$ac_link\"") >&5
21965   (eval $ac_link) 2>&5
21966   ac_status=$?
21967   echo "$as_me:21967: \$? = $ac_status" >&5
21968   (exit "$ac_status"); } &&
21969          { ac_try='test -s "conftest$ac_exeext"'
21970   { (eval echo "$as_me:21970: \"$ac_try\"") >&5
21971   (eval $ac_try) 2>&5
21972   ac_status=$?
21973   echo "$as_me:21973: \$? = $ac_status" >&5
21974   (exit "$ac_status"); }; }; then
21975   cf_cv_cgetent=yes
21976 else
21977   echo "$as_me: failed program was:" >&5
21978 cat "conftest.$ac_ext" >&5
21979 cf_cv_cgetent=no
21980 fi
21981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21982
21983 fi
21984 echo "$as_me:21984: result: $cf_cv_cgetent" >&5
21985 echo "${ECHO_T}$cf_cv_cgetent" >&6
21986
21987 if test "$cf_cv_cgetent" = yes
21988 then
21989
21990 cat >>confdefs.h <<\EOF
21991 #define HAVE_BSD_CGETENT 1
21992 EOF
21993
21994 echo "$as_me:21994: checking if cgetent uses const parameter" >&5
21995 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21996 if test "${cf_cv_cgetent_const+set}" = set; then
21997   echo $ECHO_N "(cached) $ECHO_C" >&6
21998 else
21999
22000 cat >"conftest.$ac_ext" <<_ACEOF
22001 #line 22001 "configure"
22002 #include "confdefs.h"
22003
22004 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22005 #include <stdlib.h>
22006 int
22007 main (void)
22008 {
22009
22010         char temp[128];
22011         char *buf = temp;
22012 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22013         const char *db_array = temp;
22014         cgetent(&buf, &db_array, "vt100");
22015 #endif
22016         cgetcap(buf, "tc", '=');
22017         cgetmatch(buf, "tc");
22018
22019   ;
22020   return 0;
22021 }
22022 _ACEOF
22023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22024 if { (eval echo "$as_me:22024: \"$ac_link\"") >&5
22025   (eval $ac_link) 2>&5
22026   ac_status=$?
22027   echo "$as_me:22027: \$? = $ac_status" >&5
22028   (exit "$ac_status"); } &&
22029          { ac_try='test -s "conftest$ac_exeext"'
22030   { (eval echo "$as_me:22030: \"$ac_try\"") >&5
22031   (eval $ac_try) 2>&5
22032   ac_status=$?
22033   echo "$as_me:22033: \$? = $ac_status" >&5
22034   (exit "$ac_status"); }; }; then
22035   cf_cv_cgetent_const=yes
22036 else
22037   echo "$as_me: failed program was:" >&5
22038 cat "conftest.$ac_ext" >&5
22039 cf_cv_cgetent_const=no
22040 fi
22041 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22042
22043 fi
22044 echo "$as_me:22044: result: $cf_cv_cgetent_const" >&5
22045 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22046         if test "$cf_cv_cgetent_const" = yes
22047         then
22048
22049 cat >>confdefs.h <<EOF
22050 #define CGETENT_CONST const
22051 EOF
22052
22053         fi
22054 fi
22055
22056 fi
22057
22058 echo "$as_me:22058: checking for isascii" >&5
22059 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22060 if test "${cf_cv_have_isascii+set}" = set; then
22061   echo $ECHO_N "(cached) $ECHO_C" >&6
22062 else
22063
22064         cat >"conftest.$ac_ext" <<_ACEOF
22065 #line 22065 "configure"
22066 #include "confdefs.h"
22067 #include <ctype.h>
22068 int
22069 main (void)
22070 {
22071 int x = isascii(' ')
22072   ;
22073   return 0;
22074 }
22075 _ACEOF
22076 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22077 if { (eval echo "$as_me:22077: \"$ac_link\"") >&5
22078   (eval $ac_link) 2>&5
22079   ac_status=$?
22080   echo "$as_me:22080: \$? = $ac_status" >&5
22081   (exit "$ac_status"); } &&
22082          { ac_try='test -s "conftest$ac_exeext"'
22083   { (eval echo "$as_me:22083: \"$ac_try\"") >&5
22084   (eval $ac_try) 2>&5
22085   ac_status=$?
22086   echo "$as_me:22086: \$? = $ac_status" >&5
22087   (exit "$ac_status"); }; }; then
22088   cf_cv_have_isascii=yes
22089 else
22090   echo "$as_me: failed program was:" >&5
22091 cat "conftest.$ac_ext" >&5
22092 cf_cv_have_isascii=no
22093 fi
22094 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22095
22096 fi
22097 echo "$as_me:22097: result: $cf_cv_have_isascii" >&5
22098 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22099 test "$cf_cv_have_isascii" = yes &&
22100 cat >>confdefs.h <<\EOF
22101 #define HAVE_ISASCII 1
22102 EOF
22103
22104 if test "$ac_cv_func_sigaction" = yes; then
22105 echo "$as_me:22105: checking whether sigaction needs _POSIX_SOURCE" >&5
22106 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22107 cat >"conftest.$ac_ext" <<_ACEOF
22108 #line 22108 "configure"
22109 #include "confdefs.h"
22110
22111 #include <sys/types.h>
22112 #include <signal.h>
22113 int
22114 main (void)
22115 {
22116 struct sigaction act
22117   ;
22118   return 0;
22119 }
22120 _ACEOF
22121 rm -f "conftest.$ac_objext"
22122 if { (eval echo "$as_me:22122: \"$ac_compile\"") >&5
22123   (eval $ac_compile) 2>&5
22124   ac_status=$?
22125   echo "$as_me:22125: \$? = $ac_status" >&5
22126   (exit "$ac_status"); } &&
22127          { ac_try='test -s "conftest.$ac_objext"'
22128   { (eval echo "$as_me:22128: \"$ac_try\"") >&5
22129   (eval $ac_try) 2>&5
22130   ac_status=$?
22131   echo "$as_me:22131: \$? = $ac_status" >&5
22132   (exit "$ac_status"); }; }; then
22133   sigact_bad=no
22134 else
22135   echo "$as_me: failed program was:" >&5
22136 cat "conftest.$ac_ext" >&5
22137
22138 cat >"conftest.$ac_ext" <<_ACEOF
22139 #line 22139 "configure"
22140 #include "confdefs.h"
22141
22142 #define _POSIX_SOURCE
22143 #include <sys/types.h>
22144 #include <signal.h>
22145 int
22146 main (void)
22147 {
22148 struct sigaction act
22149   ;
22150   return 0;
22151 }
22152 _ACEOF
22153 rm -f "conftest.$ac_objext"
22154 if { (eval echo "$as_me:22154: \"$ac_compile\"") >&5
22155   (eval $ac_compile) 2>&5
22156   ac_status=$?
22157   echo "$as_me:22157: \$? = $ac_status" >&5
22158   (exit "$ac_status"); } &&
22159          { ac_try='test -s "conftest.$ac_objext"'
22160   { (eval echo "$as_me:22160: \"$ac_try\"") >&5
22161   (eval $ac_try) 2>&5
22162   ac_status=$?
22163   echo "$as_me:22163: \$? = $ac_status" >&5
22164   (exit "$ac_status"); }; }; then
22165   sigact_bad=yes
22166
22167 cat >>confdefs.h <<\EOF
22168 #define _POSIX_SOURCE 1
22169 EOF
22170
22171 else
22172   echo "$as_me: failed program was:" >&5
22173 cat "conftest.$ac_ext" >&5
22174 sigact_bad=unknown
22175 fi
22176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22177 fi
22178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22179 echo "$as_me:22179: result: $sigact_bad" >&5
22180 echo "${ECHO_T}$sigact_bad" >&6
22181 fi
22182
22183 echo "$as_me:22183: checking if nanosleep really works" >&5
22184 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22185 if test "${cf_cv_func_nanosleep+set}" = set; then
22186   echo $ECHO_N "(cached) $ECHO_C" >&6
22187 else
22188
22189 if test "$cross_compiling" = yes; then
22190   cf_cv_func_nanosleep=unknown
22191 else
22192   cat >"conftest.$ac_ext" <<_ACEOF
22193 #line 22193 "configure"
22194 #include "confdefs.h"
22195
22196 #include <stdio.h>
22197 #include <errno.h>
22198 #include <time.h>
22199
22200 #ifdef HAVE_SYS_TIME_H
22201 #include <sys/time.h>
22202 #endif
22203
22204 int main(void) {
22205         struct timespec ts1, ts2;
22206         int code;
22207         ts1.tv_sec  = 0;
22208         ts1.tv_nsec = 750000000;
22209         ts2.tv_sec  = 0;
22210         ts2.tv_nsec = 0;
22211         errno = 0;
22212         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22213         ${cf_cv_main_return:-return}(code != 0);
22214 }
22215
22216 _ACEOF
22217 rm -f "conftest$ac_exeext"
22218 if { (eval echo "$as_me:22218: \"$ac_link\"") >&5
22219   (eval $ac_link) 2>&5
22220   ac_status=$?
22221   echo "$as_me:22221: \$? = $ac_status" >&5
22222   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22223   { (eval echo "$as_me:22223: \"$ac_try\"") >&5
22224   (eval $ac_try) 2>&5
22225   ac_status=$?
22226   echo "$as_me:22226: \$? = $ac_status" >&5
22227   (exit "$ac_status"); }; }; then
22228   cf_cv_func_nanosleep=yes
22229 else
22230   echo "$as_me: program exited with status $ac_status" >&5
22231 echo "$as_me: failed program was:" >&5
22232 cat "conftest.$ac_ext" >&5
22233 cf_cv_func_nanosleep=no
22234 fi
22235 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22236 fi
22237 fi
22238 echo "$as_me:22238: result: $cf_cv_func_nanosleep" >&5
22239 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22240
22241 test "$cf_cv_func_nanosleep" = "yes" &&
22242 cat >>confdefs.h <<\EOF
22243 #define HAVE_NANOSLEEP 1
22244 EOF
22245
22246 for ac_header in \
22247 termio.h \
22248 termios.h \
22249 unistd.h \
22250 sys/ioctl.h \
22251 sys/termio.h \
22252
22253 do
22254 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22255 echo "$as_me:22255: checking for $ac_header" >&5
22256 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22257 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22258   echo $ECHO_N "(cached) $ECHO_C" >&6
22259 else
22260   cat >"conftest.$ac_ext" <<_ACEOF
22261 #line 22261 "configure"
22262 #include "confdefs.h"
22263 #include <$ac_header>
22264 _ACEOF
22265 if { (eval echo "$as_me:22265: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22266   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22267   ac_status=$?
22268   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22269   rm -f conftest.er1
22270   cat conftest.err >&5
22271   echo "$as_me:22271: \$? = $ac_status" >&5
22272   (exit "$ac_status"); } >/dev/null; then
22273   if test -s conftest.err; then
22274     ac_cpp_err=$ac_c_preproc_warn_flag
22275   else
22276     ac_cpp_err=
22277   fi
22278 else
22279   ac_cpp_err=yes
22280 fi
22281 if test -z "$ac_cpp_err"; then
22282   eval "$as_ac_Header=yes"
22283 else
22284   echo "$as_me: failed program was:" >&5
22285   cat "conftest.$ac_ext" >&5
22286   eval "$as_ac_Header=no"
22287 fi
22288 rm -f conftest.err "conftest.$ac_ext"
22289 fi
22290 echo "$as_me:22290: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22291 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22292 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22293   cat >>confdefs.h <<EOF
22294 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22295 EOF
22296
22297 fi
22298 done
22299
22300 if test "$ac_cv_header_termios_h" = yes ; then
22301         case "$CFLAGS $CPPFLAGS" in
22302         (*-D_POSIX_SOURCE*)
22303                 termios_bad=dunno ;;
22304         (*)     termios_bad=maybe ;;
22305         esac
22306         if test "$termios_bad" = maybe ; then
22307         echo "$as_me:22307: checking whether termios.h needs _POSIX_SOURCE" >&5
22308 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22309         cat >"conftest.$ac_ext" <<_ACEOF
22310 #line 22310 "configure"
22311 #include "confdefs.h"
22312 #include <termios.h>
22313 int
22314 main (void)
22315 {
22316 struct termios foo; int x = foo.c_iflag = 1; (void)x
22317   ;
22318   return 0;
22319 }
22320 _ACEOF
22321 rm -f "conftest.$ac_objext"
22322 if { (eval echo "$as_me:22322: \"$ac_compile\"") >&5
22323   (eval $ac_compile) 2>&5
22324   ac_status=$?
22325   echo "$as_me:22325: \$? = $ac_status" >&5
22326   (exit "$ac_status"); } &&
22327          { ac_try='test -s "conftest.$ac_objext"'
22328   { (eval echo "$as_me:22328: \"$ac_try\"") >&5
22329   (eval $ac_try) 2>&5
22330   ac_status=$?
22331   echo "$as_me:22331: \$? = $ac_status" >&5
22332   (exit "$ac_status"); }; }; then
22333   termios_bad=no
22334 else
22335   echo "$as_me: failed program was:" >&5
22336 cat "conftest.$ac_ext" >&5
22337
22338                 cat >"conftest.$ac_ext" <<_ACEOF
22339 #line 22339 "configure"
22340 #include "confdefs.h"
22341
22342 #define _POSIX_SOURCE
22343 #include <termios.h>
22344 int
22345 main (void)
22346 {
22347 struct termios foo; int x = foo.c_iflag = 2; (void)x
22348   ;
22349   return 0;
22350 }
22351 _ACEOF
22352 rm -f "conftest.$ac_objext"
22353 if { (eval echo "$as_me:22353: \"$ac_compile\"") >&5
22354   (eval $ac_compile) 2>&5
22355   ac_status=$?
22356   echo "$as_me:22356: \$? = $ac_status" >&5
22357   (exit "$ac_status"); } &&
22358          { ac_try='test -s "conftest.$ac_objext"'
22359   { (eval echo "$as_me:22359: \"$ac_try\"") >&5
22360   (eval $ac_try) 2>&5
22361   ac_status=$?
22362   echo "$as_me:22362: \$? = $ac_status" >&5
22363   (exit "$ac_status"); }; }; then
22364   termios_bad=unknown
22365 else
22366   echo "$as_me: failed program was:" >&5
22367 cat "conftest.$ac_ext" >&5
22368 termios_bad=yes
22369 cat >>confdefs.h <<\EOF
22370 #define _POSIX_SOURCE 1
22371 EOF
22372
22373 fi
22374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22375
22376 fi
22377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22378         echo "$as_me:22378: result: $termios_bad" >&5
22379 echo "${ECHO_T}$termios_bad" >&6
22380         fi
22381 fi
22382
22383 echo "$as_me:22383: checking for tcgetattr" >&5
22384 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22385 if test "${cf_cv_have_tcgetattr+set}" = set; then
22386   echo $ECHO_N "(cached) $ECHO_C" >&6
22387 else
22388
22389 cat >"conftest.$ac_ext" <<_ACEOF
22390 #line 22390 "configure"
22391 #include "confdefs.h"
22392
22393 #include <sys/types.h>
22394 #ifdef HAVE_UNISTD_H
22395 #include <unistd.h>
22396 #endif
22397 #ifdef HAVE_TERMIOS_H
22398 #include <termios.h>
22399 #define TTY struct termios
22400 #else
22401 #ifdef HAVE_TERMIO_H
22402 #include <termio.h>
22403 #define TTY struct termio
22404 #endif
22405 #endif
22406
22407 int
22408 main (void)
22409 {
22410
22411 TTY foo;
22412 tcgetattr(1, &foo);
22413   ;
22414   return 0;
22415 }
22416 _ACEOF
22417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22418 if { (eval echo "$as_me:22418: \"$ac_link\"") >&5
22419   (eval $ac_link) 2>&5
22420   ac_status=$?
22421   echo "$as_me:22421: \$? = $ac_status" >&5
22422   (exit "$ac_status"); } &&
22423          { ac_try='test -s "conftest$ac_exeext"'
22424   { (eval echo "$as_me:22424: \"$ac_try\"") >&5
22425   (eval $ac_try) 2>&5
22426   ac_status=$?
22427   echo "$as_me:22427: \$? = $ac_status" >&5
22428   (exit "$ac_status"); }; }; then
22429   cf_cv_have_tcgetattr=yes
22430 else
22431   echo "$as_me: failed program was:" >&5
22432 cat "conftest.$ac_ext" >&5
22433 cf_cv_have_tcgetattr=no
22434 fi
22435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22436 fi
22437 echo "$as_me:22437: result: $cf_cv_have_tcgetattr" >&5
22438 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22439 test "$cf_cv_have_tcgetattr" = yes &&
22440 cat >>confdefs.h <<\EOF
22441 #define HAVE_TCGETATTR 1
22442 EOF
22443
22444 echo "$as_me:22444: checking for vsscanf function or workaround" >&5
22445 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22446 if test "${cf_cv_func_vsscanf+set}" = set; then
22447   echo $ECHO_N "(cached) $ECHO_C" >&6
22448 else
22449
22450 cat >"conftest.$ac_ext" <<_ACEOF
22451 #line 22451 "configure"
22452 #include "confdefs.h"
22453
22454 #include <stdarg.h>
22455 #include <stdio.h>
22456 int
22457 main (void)
22458 {
22459
22460         va_list ap;
22461         vsscanf("from", "%d", ap)
22462   ;
22463   return 0;
22464 }
22465 _ACEOF
22466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22467 if { (eval echo "$as_me:22467: \"$ac_link\"") >&5
22468   (eval $ac_link) 2>&5
22469   ac_status=$?
22470   echo "$as_me:22470: \$? = $ac_status" >&5
22471   (exit "$ac_status"); } &&
22472          { ac_try='test -s "conftest$ac_exeext"'
22473   { (eval echo "$as_me:22473: \"$ac_try\"") >&5
22474   (eval $ac_try) 2>&5
22475   ac_status=$?
22476   echo "$as_me:22476: \$? = $ac_status" >&5
22477   (exit "$ac_status"); }; }; then
22478   cf_cv_func_vsscanf=vsscanf
22479 else
22480   echo "$as_me: failed program was:" >&5
22481 cat "conftest.$ac_ext" >&5
22482
22483 cat >"conftest.$ac_ext" <<_ACEOF
22484 #line 22484 "configure"
22485 #include "confdefs.h"
22486
22487 #include <stdarg.h>
22488 #include <stdio.h>
22489 int
22490 main (void)
22491 {
22492
22493         FILE strbuf;
22494         char *str = "from";
22495
22496         strbuf._flag = _IOREAD;
22497         strbuf._ptr = strbuf._base = (unsigned char *) str;
22498         strbuf._cnt = strlen(str);
22499         strbuf._file = _NFILE;
22500         return (vfscanf(&strbuf, "%d", ap))
22501   ;
22502   return 0;
22503 }
22504 _ACEOF
22505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22506 if { (eval echo "$as_me:22506: \"$ac_link\"") >&5
22507   (eval $ac_link) 2>&5
22508   ac_status=$?
22509   echo "$as_me:22509: \$? = $ac_status" >&5
22510   (exit "$ac_status"); } &&
22511          { ac_try='test -s "conftest$ac_exeext"'
22512   { (eval echo "$as_me:22512: \"$ac_try\"") >&5
22513   (eval $ac_try) 2>&5
22514   ac_status=$?
22515   echo "$as_me:22515: \$? = $ac_status" >&5
22516   (exit "$ac_status"); }; }; then
22517   cf_cv_func_vsscanf=vfscanf
22518 else
22519   echo "$as_me: failed program was:" >&5
22520 cat "conftest.$ac_ext" >&5
22521
22522 cat >"conftest.$ac_ext" <<_ACEOF
22523 #line 22523 "configure"
22524 #include "confdefs.h"
22525
22526 #include <stdarg.h>
22527 #include <stdio.h>
22528 int
22529 main (void)
22530 {
22531
22532         FILE strbuf;
22533         char *str = "from";
22534
22535         strbuf._flag = _IOREAD;
22536         strbuf._ptr = strbuf._base = (unsigned char *) str;
22537         strbuf._cnt = strlen(str);
22538         strbuf._file = _NFILE;
22539         return (_doscan(&strbuf, "%d", ap))
22540   ;
22541   return 0;
22542 }
22543 _ACEOF
22544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22545 if { (eval echo "$as_me:22545: \"$ac_link\"") >&5
22546   (eval $ac_link) 2>&5
22547   ac_status=$?
22548   echo "$as_me:22548: \$? = $ac_status" >&5
22549   (exit "$ac_status"); } &&
22550          { ac_try='test -s "conftest$ac_exeext"'
22551   { (eval echo "$as_me:22551: \"$ac_try\"") >&5
22552   (eval $ac_try) 2>&5
22553   ac_status=$?
22554   echo "$as_me:22554: \$? = $ac_status" >&5
22555   (exit "$ac_status"); }; }; then
22556   cf_cv_func_vsscanf=_doscan
22557 else
22558   echo "$as_me: failed program was:" >&5
22559 cat "conftest.$ac_ext" >&5
22560
22561 cf_cv_func_vsscanf=no
22562 fi
22563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22564 fi
22565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22566 fi
22567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22568 fi
22569 echo "$as_me:22569: result: $cf_cv_func_vsscanf" >&5
22570 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22571
22572 case "$cf_cv_func_vsscanf" in
22573 (vsscanf)
22574 cat >>confdefs.h <<\EOF
22575 #define HAVE_VSSCANF 1
22576 EOF
22577 ;;
22578 (vfscanf)
22579 cat >>confdefs.h <<\EOF
22580 #define HAVE_VFSCANF 1
22581 EOF
22582 ;;
22583 (_doscan)
22584 cat >>confdefs.h <<\EOF
22585 #define HAVE__DOSCAN 1
22586 EOF
22587 ;;
22588 esac
22589
22590 for ac_header in \
22591 unistd.h \
22592
22593 do
22594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22595 echo "$as_me:22595: checking for $ac_header" >&5
22596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22598   echo $ECHO_N "(cached) $ECHO_C" >&6
22599 else
22600   cat >"conftest.$ac_ext" <<_ACEOF
22601 #line 22601 "configure"
22602 #include "confdefs.h"
22603 #include <$ac_header>
22604 _ACEOF
22605 if { (eval echo "$as_me:22605: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22606   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22607   ac_status=$?
22608   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22609   rm -f conftest.er1
22610   cat conftest.err >&5
22611   echo "$as_me:22611: \$? = $ac_status" >&5
22612   (exit "$ac_status"); } >/dev/null; then
22613   if test -s conftest.err; then
22614     ac_cpp_err=$ac_c_preproc_warn_flag
22615   else
22616     ac_cpp_err=
22617   fi
22618 else
22619   ac_cpp_err=yes
22620 fi
22621 if test -z "$ac_cpp_err"; then
22622   eval "$as_ac_Header=yes"
22623 else
22624   echo "$as_me: failed program was:" >&5
22625   cat "conftest.$ac_ext" >&5
22626   eval "$as_ac_Header=no"
22627 fi
22628 rm -f conftest.err "conftest.$ac_ext"
22629 fi
22630 echo "$as_me:22630: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22631 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22632 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22633   cat >>confdefs.h <<EOF
22634 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22635 EOF
22636
22637 fi
22638 done
22639
22640 echo "$as_me:22640: checking for working mkstemp" >&5
22641 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22642 if test "${cf_cv_func_mkstemp+set}" = set; then
22643   echo $ECHO_N "(cached) $ECHO_C" >&6
22644 else
22645
22646 rm -rf ./conftest*
22647 if test "$cross_compiling" = yes; then
22648   cf_cv_func_mkstemp=maybe
22649 else
22650   cat >"conftest.$ac_ext" <<_ACEOF
22651 #line 22651 "configure"
22652 #include "confdefs.h"
22653
22654 #include <sys/types.h>
22655 #ifdef HAVE_UNISTD_H
22656 #include <unistd.h>
22657 #endif
22658 #include <stdlib.h>
22659 #include <stdio.h>
22660 #include <string.h>
22661 #include <sys/stat.h>
22662 int main(void)
22663 {
22664         char *tmpl = "conftestXXXXXX";
22665         char name[2][80];
22666         int n;
22667         int result = 0;
22668         int fd;
22669         struct stat sb;
22670
22671         umask(077);
22672         for (n = 0; n < 2; ++n) {
22673                 strcpy(name[n], tmpl);
22674                 if ((fd = mkstemp(name[n])) >= 0) {
22675                         if (!strcmp(name[n], tmpl)
22676                          || stat(name[n], &sb) != 0
22677                          || (sb.st_mode & S_IFMT) != S_IFREG
22678                          || (sb.st_mode & 077) != 0) {
22679                                 result = 1;
22680                         }
22681                         close(fd);
22682                 }
22683         }
22684         if (result == 0
22685          && !strcmp(name[0], name[1]))
22686                 result = 1;
22687         ${cf_cv_main_return:-return}(result);
22688 }
22689
22690 _ACEOF
22691 rm -f "conftest$ac_exeext"
22692 if { (eval echo "$as_me:22692: \"$ac_link\"") >&5
22693   (eval $ac_link) 2>&5
22694   ac_status=$?
22695   echo "$as_me:22695: \$? = $ac_status" >&5
22696   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22697   { (eval echo "$as_me:22697: \"$ac_try\"") >&5
22698   (eval $ac_try) 2>&5
22699   ac_status=$?
22700   echo "$as_me:22700: \$? = $ac_status" >&5
22701   (exit "$ac_status"); }; }; then
22702   cf_cv_func_mkstemp=yes
22703
22704 else
22705   echo "$as_me: program exited with status $ac_status" >&5
22706 echo "$as_me: failed program was:" >&5
22707 cat "conftest.$ac_ext" >&5
22708 cf_cv_func_mkstemp=no
22709
22710 fi
22711 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22712 fi
22713
22714 fi
22715 echo "$as_me:22715: result: $cf_cv_func_mkstemp" >&5
22716 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22717 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22718         echo "$as_me:22718: checking for mkstemp" >&5
22719 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22720 if test "${ac_cv_func_mkstemp+set}" = set; then
22721   echo $ECHO_N "(cached) $ECHO_C" >&6
22722 else
22723   cat >"conftest.$ac_ext" <<_ACEOF
22724 #line 22724 "configure"
22725 #include "confdefs.h"
22726 #define mkstemp autoconf_temporary
22727 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22728 #undef mkstemp
22729
22730 #ifdef __cplusplus
22731 extern "C"
22732 #endif
22733
22734 /* We use char because int might match the return type of a gcc2
22735    builtin and then its argument prototype would still apply.  */
22736 char mkstemp (void);
22737
22738 int
22739 main (void)
22740 {
22741
22742 /* The GNU C library defines stubs for functions which it implements
22743     to always fail with ENOSYS.  Some functions are actually named
22744     something starting with __ and the normal name is an alias.  */
22745 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22746 #error found stub for mkstemp
22747 #endif
22748
22749         return mkstemp ();
22750   ;
22751   return 0;
22752 }
22753 _ACEOF
22754 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22755 if { (eval echo "$as_me:22755: \"$ac_link\"") >&5
22756   (eval $ac_link) 2>&5
22757   ac_status=$?
22758   echo "$as_me:22758: \$? = $ac_status" >&5
22759   (exit "$ac_status"); } &&
22760          { ac_try='test -s "conftest$ac_exeext"'
22761   { (eval echo "$as_me:22761: \"$ac_try\"") >&5
22762   (eval $ac_try) 2>&5
22763   ac_status=$?
22764   echo "$as_me:22764: \$? = $ac_status" >&5
22765   (exit "$ac_status"); }; }; then
22766   ac_cv_func_mkstemp=yes
22767 else
22768   echo "$as_me: failed program was:" >&5
22769 cat "conftest.$ac_ext" >&5
22770 ac_cv_func_mkstemp=no
22771 fi
22772 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22773 fi
22774 echo "$as_me:22774: result: $ac_cv_func_mkstemp" >&5
22775 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22776
22777 fi
22778 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22779
22780 cat >>confdefs.h <<\EOF
22781 #define HAVE_MKSTEMP 1
22782 EOF
22783
22784 fi
22785
22786 # setup for prototype of fallback for vsscanf()
22787
22788 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22789         HAVE_VSSCANF=1
22790 else
22791         HAVE_VSSCANF=0
22792 fi
22793
22794 if test "x$cross_compiling" = xyes ; then
22795         { echo "$as_me:22795: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22796 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22797 else
22798         echo "$as_me:22798: checking whether setvbuf arguments are reversed" >&5
22799 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22800 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22801   echo $ECHO_N "(cached) $ECHO_C" >&6
22802 else
22803   if test "$cross_compiling" = yes; then
22804   { { echo "$as_me:22804: error: cannot run test program while cross compiling" >&5
22805 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22806    { (exit 1); exit 1; }; }
22807 else
22808   cat >"conftest.$ac_ext" <<_ACEOF
22809 #line 22809 "configure"
22810 #include "confdefs.h"
22811 #include <stdio.h>
22812 /* If setvbuf has the reversed format, exit 0. */
22813 int
22814 main (void)
22815 {
22816   /* This call has the arguments reversed.
22817      A reversed system may check and see that the address of main
22818      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22819   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22820     $ac_main_return(1);
22821   putc('\r', stdout);
22822   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22823 }
22824 _ACEOF
22825 rm -f "conftest$ac_exeext"
22826 if { (eval echo "$as_me:22826: \"$ac_link\"") >&5
22827   (eval $ac_link) 2>&5
22828   ac_status=$?
22829   echo "$as_me:22829: \$? = $ac_status" >&5
22830   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22831   { (eval echo "$as_me:22831: \"$ac_try\"") >&5
22832   (eval $ac_try) 2>&5
22833   ac_status=$?
22834   echo "$as_me:22834: \$? = $ac_status" >&5
22835   (exit "$ac_status"); }; }; then
22836   ac_cv_func_setvbuf_reversed=yes
22837 else
22838   echo "$as_me: program exited with status $ac_status" >&5
22839 echo "$as_me: failed program was:" >&5
22840 cat "conftest.$ac_ext" >&5
22841 ac_cv_func_setvbuf_reversed=no
22842 fi
22843 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22844 fi
22845 rm -f core ./core.* ./*.core
22846 fi
22847 echo "$as_me:22847: result: $ac_cv_func_setvbuf_reversed" >&5
22848 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22849 if test $ac_cv_func_setvbuf_reversed = yes; then
22850
22851 cat >>confdefs.h <<\EOF
22852 #define SETVBUF_REVERSED 1
22853 EOF
22854
22855 fi
22856
22857 fi
22858 echo "$as_me:22858: checking for intptr_t" >&5
22859 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22860 if test "${ac_cv_type_intptr_t+set}" = set; then
22861   echo $ECHO_N "(cached) $ECHO_C" >&6
22862 else
22863   cat >"conftest.$ac_ext" <<_ACEOF
22864 #line 22864 "configure"
22865 #include "confdefs.h"
22866 $ac_includes_default
22867 int
22868 main (void)
22869 {
22870 if ((intptr_t *) 0)
22871   return 0;
22872 if (sizeof (intptr_t))
22873   return 0;
22874   ;
22875   return 0;
22876 }
22877 _ACEOF
22878 rm -f "conftest.$ac_objext"
22879 if { (eval echo "$as_me:22879: \"$ac_compile\"") >&5
22880   (eval $ac_compile) 2>&5
22881   ac_status=$?
22882   echo "$as_me:22882: \$? = $ac_status" >&5
22883   (exit "$ac_status"); } &&
22884          { ac_try='test -s "conftest.$ac_objext"'
22885   { (eval echo "$as_me:22885: \"$ac_try\"") >&5
22886   (eval $ac_try) 2>&5
22887   ac_status=$?
22888   echo "$as_me:22888: \$? = $ac_status" >&5
22889   (exit "$ac_status"); }; }; then
22890   ac_cv_type_intptr_t=yes
22891 else
22892   echo "$as_me: failed program was:" >&5
22893 cat "conftest.$ac_ext" >&5
22894 ac_cv_type_intptr_t=no
22895 fi
22896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22897 fi
22898 echo "$as_me:22898: result: $ac_cv_type_intptr_t" >&5
22899 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22900 if test "$ac_cv_type_intptr_t" = yes; then
22901   :
22902 else
22903
22904 cat >>confdefs.h <<EOF
22905 #define intptr_t long
22906 EOF
22907
22908 fi
22909
22910 echo "$as_me:22910: checking for ssize_t" >&5
22911 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22912 if test "${ac_cv_type_ssize_t+set}" = set; then
22913   echo $ECHO_N "(cached) $ECHO_C" >&6
22914 else
22915   cat >"conftest.$ac_ext" <<_ACEOF
22916 #line 22916 "configure"
22917 #include "confdefs.h"
22918 $ac_includes_default
22919 int
22920 main (void)
22921 {
22922 if ((ssize_t *) 0)
22923   return 0;
22924 if (sizeof (ssize_t))
22925   return 0;
22926   ;
22927   return 0;
22928 }
22929 _ACEOF
22930 rm -f "conftest.$ac_objext"
22931 if { (eval echo "$as_me:22931: \"$ac_compile\"") >&5
22932   (eval $ac_compile) 2>&5
22933   ac_status=$?
22934   echo "$as_me:22934: \$? = $ac_status" >&5
22935   (exit "$ac_status"); } &&
22936          { ac_try='test -s "conftest.$ac_objext"'
22937   { (eval echo "$as_me:22937: \"$ac_try\"") >&5
22938   (eval $ac_try) 2>&5
22939   ac_status=$?
22940   echo "$as_me:22940: \$? = $ac_status" >&5
22941   (exit "$ac_status"); }; }; then
22942   ac_cv_type_ssize_t=yes
22943 else
22944   echo "$as_me: failed program was:" >&5
22945 cat "conftest.$ac_ext" >&5
22946 ac_cv_type_ssize_t=no
22947 fi
22948 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22949 fi
22950 echo "$as_me:22950: result: $ac_cv_type_ssize_t" >&5
22951 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22952 if test "$ac_cv_type_ssize_t" = yes; then
22953   :
22954 else
22955
22956 cat >>confdefs.h <<EOF
22957 #define ssize_t int
22958 EOF
22959
22960 fi
22961
22962 echo "$as_me:22962: checking for type sigaction_t" >&5
22963 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22964 if test "${cf_cv_type_sigaction+set}" = set; then
22965   echo $ECHO_N "(cached) $ECHO_C" >&6
22966 else
22967
22968         cat >"conftest.$ac_ext" <<_ACEOF
22969 #line 22969 "configure"
22970 #include "confdefs.h"
22971
22972 #include <signal.h>
22973 int
22974 main (void)
22975 {
22976 sigaction_t x
22977   ;
22978   return 0;
22979 }
22980 _ACEOF
22981 rm -f "conftest.$ac_objext"
22982 if { (eval echo "$as_me:22982: \"$ac_compile\"") >&5
22983   (eval $ac_compile) 2>&5
22984   ac_status=$?
22985   echo "$as_me:22985: \$? = $ac_status" >&5
22986   (exit "$ac_status"); } &&
22987          { ac_try='test -s "conftest.$ac_objext"'
22988   { (eval echo "$as_me:22988: \"$ac_try\"") >&5
22989   (eval $ac_try) 2>&5
22990   ac_status=$?
22991   echo "$as_me:22991: \$? = $ac_status" >&5
22992   (exit "$ac_status"); }; }; then
22993   cf_cv_type_sigaction=yes
22994 else
22995   echo "$as_me: failed program was:" >&5
22996 cat "conftest.$ac_ext" >&5
22997 cf_cv_type_sigaction=no
22998 fi
22999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23000 fi
23001
23002 echo "$as_me:23002: result: $cf_cv_type_sigaction" >&5
23003 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23004 test "$cf_cv_type_sigaction" = yes &&
23005 cat >>confdefs.h <<\EOF
23006 #define HAVE_TYPE_SIGACTION 1
23007 EOF
23008
23009 echo "$as_me:23009: checking declaration of size-change" >&5
23010 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23011 if test "${cf_cv_sizechange+set}" = set; then
23012   echo $ECHO_N "(cached) $ECHO_C" >&6
23013 else
23014
23015         cf_cv_sizechange=unknown
23016         cf_save_CPPFLAGS="$CPPFLAGS"
23017
23018 for cf_opts in "" "NEED_PTEM_H"
23019 do
23020
23021         CPPFLAGS="$cf_save_CPPFLAGS"
23022         if test -n "$cf_opts"
23023         then
23024
23025         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23026         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23027
23028         fi
23029         cat >"conftest.$ac_ext" <<_ACEOF
23030 #line 23030 "configure"
23031 #include "confdefs.h"
23032 #include <sys/types.h>
23033 #ifdef HAVE_TERMIOS_H
23034 #include <termios.h>
23035 #else
23036 #ifdef HAVE_TERMIO_H
23037 #include <termio.h>
23038 #endif
23039 #endif
23040
23041 #ifdef NEED_PTEM_H
23042 /* This is a workaround for SCO:  they neglected to define struct winsize in
23043  * termios.h -- it is only in termio.h and ptem.h
23044  */
23045 #include <sys/stream.h>
23046 #include <sys/ptem.h>
23047 #endif
23048
23049 #ifdef HAVE_SYS_IOCTL_H
23050 #include <sys/ioctl.h>
23051 #endif
23052
23053 int
23054 main (void)
23055 {
23056
23057 #ifdef TIOCGSIZE
23058         struct ttysize win;     /* SunOS 3.0... */
23059         int y = win.ts_lines = 2;
23060         int x = win.ts_cols = 1;
23061         (void)y;
23062         (void)x;
23063 #else
23064 #ifdef TIOCGWINSZ
23065         struct winsize win;     /* everything else */
23066         int y = win.ws_row = 2;
23067         int x = win.ws_col = 1;
23068         (void)y;
23069         (void)x;
23070 #else
23071         no TIOCGSIZE or TIOCGWINSZ
23072 #endif /* TIOCGWINSZ */
23073 #endif /* TIOCGSIZE */
23074
23075   ;
23076   return 0;
23077 }
23078 _ACEOF
23079 rm -f "conftest.$ac_objext"
23080 if { (eval echo "$as_me:23080: \"$ac_compile\"") >&5
23081   (eval $ac_compile) 2>&5
23082   ac_status=$?
23083   echo "$as_me:23083: \$? = $ac_status" >&5
23084   (exit "$ac_status"); } &&
23085          { ac_try='test -s "conftest.$ac_objext"'
23086   { (eval echo "$as_me:23086: \"$ac_try\"") >&5
23087   (eval $ac_try) 2>&5
23088   ac_status=$?
23089   echo "$as_me:23089: \$? = $ac_status" >&5
23090   (exit "$ac_status"); }; }; then
23091   cf_cv_sizechange=yes
23092 else
23093   echo "$as_me: failed program was:" >&5
23094 cat "conftest.$ac_ext" >&5
23095 cf_cv_sizechange=no
23096 fi
23097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23098
23099         CPPFLAGS="$cf_save_CPPFLAGS"
23100         if test "$cf_cv_sizechange" = yes ; then
23101                 echo "size-change succeeded ($cf_opts)" >&5
23102                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23103                 break
23104         fi
23105 done
23106
23107 fi
23108 echo "$as_me:23108: result: $cf_cv_sizechange" >&5
23109 echo "${ECHO_T}$cf_cv_sizechange" >&6
23110 if test "$cf_cv_sizechange" != no ; then
23111
23112 cat >>confdefs.h <<\EOF
23113 #define HAVE_SIZECHANGE 1
23114 EOF
23115
23116         case "$cf_cv_sizechange" in
23117         (NEED*)
23118                 cat >>confdefs.h <<EOF
23119 #define $cf_cv_sizechange  1
23120 EOF
23121
23122                 ;;
23123         esac
23124 fi
23125
23126 echo "$as_me:23126: checking for memmove" >&5
23127 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23128 if test "${ac_cv_func_memmove+set}" = set; then
23129   echo $ECHO_N "(cached) $ECHO_C" >&6
23130 else
23131   cat >"conftest.$ac_ext" <<_ACEOF
23132 #line 23132 "configure"
23133 #include "confdefs.h"
23134 #define memmove autoconf_temporary
23135 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23136 #undef memmove
23137
23138 #ifdef __cplusplus
23139 extern "C"
23140 #endif
23141
23142 /* We use char because int might match the return type of a gcc2
23143    builtin and then its argument prototype would still apply.  */
23144 char memmove (void);
23145
23146 int
23147 main (void)
23148 {
23149
23150 /* The GNU C library defines stubs for functions which it implements
23151     to always fail with ENOSYS.  Some functions are actually named
23152     something starting with __ and the normal name is an alias.  */
23153 #if defined (__stub_memmove) || defined (__stub___memmove)
23154 #error found stub for memmove
23155 #endif
23156
23157         return memmove ();
23158   ;
23159   return 0;
23160 }
23161 _ACEOF
23162 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23163 if { (eval echo "$as_me:23163: \"$ac_link\"") >&5
23164   (eval $ac_link) 2>&5
23165   ac_status=$?
23166   echo "$as_me:23166: \$? = $ac_status" >&5
23167   (exit "$ac_status"); } &&
23168          { ac_try='test -s "conftest$ac_exeext"'
23169   { (eval echo "$as_me:23169: \"$ac_try\"") >&5
23170   (eval $ac_try) 2>&5
23171   ac_status=$?
23172   echo "$as_me:23172: \$? = $ac_status" >&5
23173   (exit "$ac_status"); }; }; then
23174   ac_cv_func_memmove=yes
23175 else
23176   echo "$as_me: failed program was:" >&5
23177 cat "conftest.$ac_ext" >&5
23178 ac_cv_func_memmove=no
23179 fi
23180 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23181 fi
23182 echo "$as_me:23182: result: $ac_cv_func_memmove" >&5
23183 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23184 if test "$ac_cv_func_memmove" = yes; then
23185   :
23186 else
23187
23188 echo "$as_me:23188: checking for bcopy" >&5
23189 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23190 if test "${ac_cv_func_bcopy+set}" = set; then
23191   echo $ECHO_N "(cached) $ECHO_C" >&6
23192 else
23193   cat >"conftest.$ac_ext" <<_ACEOF
23194 #line 23194 "configure"
23195 #include "confdefs.h"
23196 #define bcopy autoconf_temporary
23197 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23198 #undef bcopy
23199
23200 #ifdef __cplusplus
23201 extern "C"
23202 #endif
23203
23204 /* We use char because int might match the return type of a gcc2
23205    builtin and then its argument prototype would still apply.  */
23206 char bcopy (void);
23207
23208 int
23209 main (void)
23210 {
23211
23212 /* The GNU C library defines stubs for functions which it implements
23213     to always fail with ENOSYS.  Some functions are actually named
23214     something starting with __ and the normal name is an alias.  */
23215 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23216 #error found stub for bcopy
23217 #endif
23218
23219         return bcopy ();
23220   ;
23221   return 0;
23222 }
23223 _ACEOF
23224 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23225 if { (eval echo "$as_me:23225: \"$ac_link\"") >&5
23226   (eval $ac_link) 2>&5
23227   ac_status=$?
23228   echo "$as_me:23228: \$? = $ac_status" >&5
23229   (exit "$ac_status"); } &&
23230          { ac_try='test -s "conftest$ac_exeext"'
23231   { (eval echo "$as_me:23231: \"$ac_try\"") >&5
23232   (eval $ac_try) 2>&5
23233   ac_status=$?
23234   echo "$as_me:23234: \$? = $ac_status" >&5
23235   (exit "$ac_status"); }; }; then
23236   ac_cv_func_bcopy=yes
23237 else
23238   echo "$as_me: failed program was:" >&5
23239 cat "conftest.$ac_ext" >&5
23240 ac_cv_func_bcopy=no
23241 fi
23242 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23243 fi
23244 echo "$as_me:23244: result: $ac_cv_func_bcopy" >&5
23245 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23246 if test "$ac_cv_func_bcopy" = yes; then
23247
23248         echo "$as_me:23248: checking if bcopy does overlapping moves" >&5
23249 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23250 if test "${cf_cv_good_bcopy+set}" = set; then
23251   echo $ECHO_N "(cached) $ECHO_C" >&6
23252 else
23253
23254                 if test "$cross_compiling" = yes; then
23255   cf_cv_good_bcopy=unknown
23256 else
23257   cat >"conftest.$ac_ext" <<_ACEOF
23258 #line 23258 "configure"
23259 #include "confdefs.h"
23260
23261 int main(void) {
23262         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23263         char temp[40];
23264         bcopy(data, temp, sizeof(data));
23265         bcopy(temp+10, temp, 15);
23266         bcopy(temp+5, temp+15, 10);
23267         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23268 }
23269
23270 _ACEOF
23271 rm -f "conftest$ac_exeext"
23272 if { (eval echo "$as_me:23272: \"$ac_link\"") >&5
23273   (eval $ac_link) 2>&5
23274   ac_status=$?
23275   echo "$as_me:23275: \$? = $ac_status" >&5
23276   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23277   { (eval echo "$as_me:23277: \"$ac_try\"") >&5
23278   (eval $ac_try) 2>&5
23279   ac_status=$?
23280   echo "$as_me:23280: \$? = $ac_status" >&5
23281   (exit "$ac_status"); }; }; then
23282   cf_cv_good_bcopy=yes
23283 else
23284   echo "$as_me: program exited with status $ac_status" >&5
23285 echo "$as_me: failed program was:" >&5
23286 cat "conftest.$ac_ext" >&5
23287 cf_cv_good_bcopy=no
23288 fi
23289 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23290 fi
23291
23292 fi
23293 echo "$as_me:23293: result: $cf_cv_good_bcopy" >&5
23294 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23295
23296 else
23297   cf_cv_good_bcopy=no
23298 fi
23299
23300         if test "$cf_cv_good_bcopy" = yes ; then
23301
23302 cat >>confdefs.h <<\EOF
23303 #define USE_OK_BCOPY 1
23304 EOF
23305
23306         else
23307
23308 cat >>confdefs.h <<\EOF
23309 #define USE_MY_MEMMOVE 1
23310 EOF
23311
23312         fi
23313
23314 fi
23315
23316 tty >/dev/null 2>&1 || {
23317 for ac_func in posix_openpt
23318 do
23319 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23320 echo "$as_me:23320: checking for $ac_func" >&5
23321 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23322 if eval "test \"\${$as_ac_var+set}\" = set"; then
23323   echo $ECHO_N "(cached) $ECHO_C" >&6
23324 else
23325   cat >"conftest.$ac_ext" <<_ACEOF
23326 #line 23326 "configure"
23327 #include "confdefs.h"
23328 #define $ac_func autoconf_temporary
23329 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23330 #undef $ac_func
23331
23332 #ifdef __cplusplus
23333 extern "C"
23334 #endif
23335
23336 /* We use char because int might match the return type of a gcc2
23337    builtin and then its argument prototype would still apply.  */
23338 char $ac_func (void);
23339
23340 int
23341 main (void)
23342 {
23343
23344 /* The GNU C library defines stubs for functions which it implements
23345     to always fail with ENOSYS.  Some functions are actually named
23346     something starting with __ and the normal name is an alias.  */
23347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23348 #error found stub for $ac_func
23349 #endif
23350
23351         return $ac_func ();
23352   ;
23353   return 0;
23354 }
23355 _ACEOF
23356 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23357 if { (eval echo "$as_me:23357: \"$ac_link\"") >&5
23358   (eval $ac_link) 2>&5
23359   ac_status=$?
23360   echo "$as_me:23360: \$? = $ac_status" >&5
23361   (exit "$ac_status"); } &&
23362          { ac_try='test -s "conftest$ac_exeext"'
23363   { (eval echo "$as_me:23363: \"$ac_try\"") >&5
23364   (eval $ac_try) 2>&5
23365   ac_status=$?
23366   echo "$as_me:23366: \$? = $ac_status" >&5
23367   (exit "$ac_status"); }; }; then
23368   eval "$as_ac_var=yes"
23369 else
23370   echo "$as_me: failed program was:" >&5
23371 cat "conftest.$ac_ext" >&5
23372 eval "$as_ac_var=no"
23373 fi
23374 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23375 fi
23376 echo "$as_me:23376: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23377 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23378 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23379   cat >>confdefs.h <<EOF
23380 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23381 EOF
23382
23383 fi
23384 done
23385  }
23386 echo "$as_me:23386: checking if poll really works" >&5
23387 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23388 if test "${cf_cv_working_poll+set}" = set; then
23389   echo $ECHO_N "(cached) $ECHO_C" >&6
23390 else
23391
23392 if test "$cross_compiling" = yes; then
23393   cf_cv_working_poll=unknown
23394 else
23395   cat >"conftest.$ac_ext" <<_ACEOF
23396 #line 23396 "configure"
23397 #include "confdefs.h"
23398
23399 #include <stdlib.h>
23400 #include <stdio.h>
23401 #include <unistd.h>
23402 #include <fcntl.h>
23403 #ifdef HAVE_POLL_H
23404 #include <poll.h>
23405 #else
23406 #include <sys/poll.h>
23407 #endif
23408 int main(void) {
23409         struct pollfd myfds;
23410         int ret;
23411
23412         /* check for Darwin bug with respect to "devices" */
23413         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23414         if (myfds.fd < 0)
23415                 myfds.fd = 0;
23416         myfds.events = POLLIN;
23417         myfds.revents = 0;
23418
23419         ret = poll(&myfds, 1, 100);
23420
23421         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23422                 ret = -1;
23423         } else {
23424                 int fd = 0;
23425                 if (!isatty(fd)) {
23426                         fd = open("/dev/tty", 2);       /* O_RDWR */
23427                 }
23428 #ifdef HAVE_POSIX_OPENPT
23429                 if (fd < 0) {
23430                         fd = posix_openpt(O_RDWR);
23431                 }
23432 #endif
23433
23434                 if (fd >= 0) {
23435                         /* also check with standard input */
23436                         myfds.fd = fd;
23437                         myfds.events = POLLIN;
23438                         myfds.revents = 0;
23439                         ret = poll(&myfds, 1, 100);
23440                 } else {
23441                         ret = -1;
23442                 }
23443         }
23444         ${cf_cv_main_return:-return}(ret < 0);
23445 }
23446 _ACEOF
23447 rm -f "conftest$ac_exeext"
23448 if { (eval echo "$as_me:23448: \"$ac_link\"") >&5
23449   (eval $ac_link) 2>&5
23450   ac_status=$?
23451   echo "$as_me:23451: \$? = $ac_status" >&5
23452   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23453   { (eval echo "$as_me:23453: \"$ac_try\"") >&5
23454   (eval $ac_try) 2>&5
23455   ac_status=$?
23456   echo "$as_me:23456: \$? = $ac_status" >&5
23457   (exit "$ac_status"); }; }; then
23458   cf_cv_working_poll=yes
23459 else
23460   echo "$as_me: program exited with status $ac_status" >&5
23461 echo "$as_me: failed program was:" >&5
23462 cat "conftest.$ac_ext" >&5
23463 cf_cv_working_poll=no
23464 fi
23465 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23466 fi
23467 fi
23468 echo "$as_me:23468: result: $cf_cv_working_poll" >&5
23469 echo "${ECHO_T}$cf_cv_working_poll" >&6
23470 test "$cf_cv_working_poll" = "yes" &&
23471 cat >>confdefs.h <<\EOF
23472 #define HAVE_WORKING_POLL 1
23473 EOF
23474
23475 echo "$as_me:23475: checking for va_copy" >&5
23476 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23477 if test "${cf_cv_have_va_copy+set}" = set; then
23478   echo $ECHO_N "(cached) $ECHO_C" >&6
23479 else
23480
23481 cat >"conftest.$ac_ext" <<_ACEOF
23482 #line 23482 "configure"
23483 #include "confdefs.h"
23484
23485 #include <stdarg.h>
23486
23487 int
23488 main (void)
23489 {
23490
23491         static va_list dst;
23492         static va_list src;
23493         va_copy(dst, src)
23494   ;
23495   return 0;
23496 }
23497 _ACEOF
23498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23499 if { (eval echo "$as_me:23499: \"$ac_link\"") >&5
23500   (eval $ac_link) 2>&5
23501   ac_status=$?
23502   echo "$as_me:23502: \$? = $ac_status" >&5
23503   (exit "$ac_status"); } &&
23504          { ac_try='test -s "conftest$ac_exeext"'
23505   { (eval echo "$as_me:23505: \"$ac_try\"") >&5
23506   (eval $ac_try) 2>&5
23507   ac_status=$?
23508   echo "$as_me:23508: \$? = $ac_status" >&5
23509   (exit "$ac_status"); }; }; then
23510   cf_cv_have_va_copy=yes
23511 else
23512   echo "$as_me: failed program was:" >&5
23513 cat "conftest.$ac_ext" >&5
23514 cf_cv_have_va_copy=no
23515 fi
23516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23517 fi
23518 echo "$as_me:23518: result: $cf_cv_have_va_copy" >&5
23519 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23520
23521 if test "$cf_cv_have_va_copy" = yes;
23522 then
23523
23524 cat >>confdefs.h <<\EOF
23525 #define HAVE_VA_COPY 1
23526 EOF
23527
23528 else # !cf_cv_have_va_copy
23529
23530 echo "$as_me:23530: checking for __va_copy" >&5
23531 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23532 if test "${cf_cv_have___va_copy+set}" = set; then
23533   echo $ECHO_N "(cached) $ECHO_C" >&6
23534 else
23535
23536 cat >"conftest.$ac_ext" <<_ACEOF
23537 #line 23537 "configure"
23538 #include "confdefs.h"
23539
23540 #include <stdarg.h>
23541
23542 int
23543 main (void)
23544 {
23545
23546         static va_list dst;
23547         static va_list src;
23548         __va_copy(dst, src)
23549   ;
23550   return 0;
23551 }
23552 _ACEOF
23553 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23554 if { (eval echo "$as_me:23554: \"$ac_link\"") >&5
23555   (eval $ac_link) 2>&5
23556   ac_status=$?
23557   echo "$as_me:23557: \$? = $ac_status" >&5
23558   (exit "$ac_status"); } &&
23559          { ac_try='test -s "conftest$ac_exeext"'
23560   { (eval echo "$as_me:23560: \"$ac_try\"") >&5
23561   (eval $ac_try) 2>&5
23562   ac_status=$?
23563   echo "$as_me:23563: \$? = $ac_status" >&5
23564   (exit "$ac_status"); }; }; then
23565   cf_cv_have___va_copy=yes
23566 else
23567   echo "$as_me: failed program was:" >&5
23568 cat "conftest.$ac_ext" >&5
23569 cf_cv_have___va_copy=no
23570 fi
23571 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23572 fi
23573 echo "$as_me:23573: result: $cf_cv_have___va_copy" >&5
23574 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23575
23576 if test "$cf_cv_have___va_copy" = yes
23577 then
23578
23579 cat >>confdefs.h <<\EOF
23580 #define HAVE___VA_COPY 1
23581 EOF
23582
23583 else # !cf_cv_have___va_copy
23584
23585 echo "$as_me:23585: checking for __builtin_va_copy" >&5
23586 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23587 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23588   echo $ECHO_N "(cached) $ECHO_C" >&6
23589 else
23590
23591 cat >"conftest.$ac_ext" <<_ACEOF
23592 #line 23592 "configure"
23593 #include "confdefs.h"
23594
23595 #include <stdarg.h>
23596
23597 int
23598 main (void)
23599 {
23600
23601         static va_list dst;
23602         static va_list src;
23603         __builtin_va_copy(dst, src)
23604   ;
23605   return 0;
23606 }
23607 _ACEOF
23608 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23609 if { (eval echo "$as_me:23609: \"$ac_link\"") >&5
23610   (eval $ac_link) 2>&5
23611   ac_status=$?
23612   echo "$as_me:23612: \$? = $ac_status" >&5
23613   (exit "$ac_status"); } &&
23614          { ac_try='test -s "conftest$ac_exeext"'
23615   { (eval echo "$as_me:23615: \"$ac_try\"") >&5
23616   (eval $ac_try) 2>&5
23617   ac_status=$?
23618   echo "$as_me:23618: \$? = $ac_status" >&5
23619   (exit "$ac_status"); }; }; then
23620   cf_cv_have___builtin_va_copy=yes
23621 else
23622   echo "$as_me: failed program was:" >&5
23623 cat "conftest.$ac_ext" >&5
23624 cf_cv_have___builtin_va_copy=no
23625 fi
23626 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23627 fi
23628 echo "$as_me:23628: result: $cf_cv_have___builtin_va_copy" >&5
23629 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23630
23631 test "$cf_cv_have___builtin_va_copy" = yes &&
23632
23633 cat >>confdefs.h <<\EOF
23634 #define HAVE___BUILTIN_VA_COPY 1
23635 EOF
23636
23637 fi # cf_cv_have___va_copy
23638
23639 fi # cf_cv_have_va_copy
23640
23641 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23642 (*yes*)
23643         ;;
23644
23645 (*)
23646         echo "$as_me:23646: checking if we can simply copy va_list" >&5
23647 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23648 if test "${cf_cv_pointer_va_list+set}" = set; then
23649   echo $ECHO_N "(cached) $ECHO_C" >&6
23650 else
23651
23652 cat >"conftest.$ac_ext" <<_ACEOF
23653 #line 23653 "configure"
23654 #include "confdefs.h"
23655
23656 #include <stdarg.h>
23657
23658 int
23659 main (void)
23660 {
23661
23662         va_list dst;
23663         va_list src;
23664         dst = src
23665   ;
23666   return 0;
23667 }
23668 _ACEOF
23669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23670 if { (eval echo "$as_me:23670: \"$ac_link\"") >&5
23671   (eval $ac_link) 2>&5
23672   ac_status=$?
23673   echo "$as_me:23673: \$? = $ac_status" >&5
23674   (exit "$ac_status"); } &&
23675          { ac_try='test -s "conftest$ac_exeext"'
23676   { (eval echo "$as_me:23676: \"$ac_try\"") >&5
23677   (eval $ac_try) 2>&5
23678   ac_status=$?
23679   echo "$as_me:23679: \$? = $ac_status" >&5
23680   (exit "$ac_status"); }; }; then
23681   cf_cv_pointer_va_list=yes
23682 else
23683   echo "$as_me: failed program was:" >&5
23684 cat "conftest.$ac_ext" >&5
23685 cf_cv_pointer_va_list=no
23686 fi
23687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23688 fi
23689 echo "$as_me:23689: result: $cf_cv_pointer_va_list" >&5
23690 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23691
23692         if test "$cf_cv_pointer_va_list" = no
23693         then
23694                 echo "$as_me:23694: checking if we can copy va_list indirectly" >&5
23695 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23696 if test "${cf_cv_array_va_list+set}" = set; then
23697   echo $ECHO_N "(cached) $ECHO_C" >&6
23698 else
23699
23700 cat >"conftest.$ac_ext" <<_ACEOF
23701 #line 23701 "configure"
23702 #include "confdefs.h"
23703
23704 #include <stdarg.h>
23705
23706 int
23707 main (void)
23708 {
23709
23710         va_list dst;
23711         va_list src;
23712         *dst = *src
23713   ;
23714   return 0;
23715 }
23716 _ACEOF
23717 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23718 if { (eval echo "$as_me:23718: \"$ac_link\"") >&5
23719   (eval $ac_link) 2>&5
23720   ac_status=$?
23721   echo "$as_me:23721: \$? = $ac_status" >&5
23722   (exit "$ac_status"); } &&
23723          { ac_try='test -s "conftest$ac_exeext"'
23724   { (eval echo "$as_me:23724: \"$ac_try\"") >&5
23725   (eval $ac_try) 2>&5
23726   ac_status=$?
23727   echo "$as_me:23727: \$? = $ac_status" >&5
23728   (exit "$ac_status"); }; }; then
23729   cf_cv_array_va_list=yes
23730 else
23731   echo "$as_me: failed program was:" >&5
23732 cat "conftest.$ac_ext" >&5
23733 cf_cv_array_va_list=no
23734 fi
23735 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23736 fi
23737 echo "$as_me:23737: result: $cf_cv_array_va_list" >&5
23738 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23739                 test "$cf_cv_array_va_list" = yes &&
23740 cat >>confdefs.h <<\EOF
23741 #define ARRAY_VA_LIST 1
23742 EOF
23743
23744         fi
23745         ;;
23746 esac
23747
23748 echo "$as_me:23748: checking for pid_t" >&5
23749 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23750 if test "${ac_cv_type_pid_t+set}" = set; then
23751   echo $ECHO_N "(cached) $ECHO_C" >&6
23752 else
23753   cat >"conftest.$ac_ext" <<_ACEOF
23754 #line 23754 "configure"
23755 #include "confdefs.h"
23756 $ac_includes_default
23757 int
23758 main (void)
23759 {
23760 if ((pid_t *) 0)
23761   return 0;
23762 if (sizeof (pid_t))
23763   return 0;
23764   ;
23765   return 0;
23766 }
23767 _ACEOF
23768 rm -f "conftest.$ac_objext"
23769 if { (eval echo "$as_me:23769: \"$ac_compile\"") >&5
23770   (eval $ac_compile) 2>&5
23771   ac_status=$?
23772   echo "$as_me:23772: \$? = $ac_status" >&5
23773   (exit "$ac_status"); } &&
23774          { ac_try='test -s "conftest.$ac_objext"'
23775   { (eval echo "$as_me:23775: \"$ac_try\"") >&5
23776   (eval $ac_try) 2>&5
23777   ac_status=$?
23778   echo "$as_me:23778: \$? = $ac_status" >&5
23779   (exit "$ac_status"); }; }; then
23780   ac_cv_type_pid_t=yes
23781 else
23782   echo "$as_me: failed program was:" >&5
23783 cat "conftest.$ac_ext" >&5
23784 ac_cv_type_pid_t=no
23785 fi
23786 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23787 fi
23788 echo "$as_me:23788: result: $ac_cv_type_pid_t" >&5
23789 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23790 if test "$ac_cv_type_pid_t" = yes; then
23791   :
23792 else
23793
23794 cat >>confdefs.h <<EOF
23795 #define pid_t int
23796 EOF
23797
23798 fi
23799
23800 for ac_header in unistd.h vfork.h
23801 do
23802 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23803 echo "$as_me:23803: checking for $ac_header" >&5
23804 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23805 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23806   echo $ECHO_N "(cached) $ECHO_C" >&6
23807 else
23808   cat >"conftest.$ac_ext" <<_ACEOF
23809 #line 23809 "configure"
23810 #include "confdefs.h"
23811 #include <$ac_header>
23812 _ACEOF
23813 if { (eval echo "$as_me:23813: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23814   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23815   ac_status=$?
23816   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23817   rm -f conftest.er1
23818   cat conftest.err >&5
23819   echo "$as_me:23819: \$? = $ac_status" >&5
23820   (exit "$ac_status"); } >/dev/null; then
23821   if test -s conftest.err; then
23822     ac_cpp_err=$ac_c_preproc_warn_flag
23823   else
23824     ac_cpp_err=
23825   fi
23826 else
23827   ac_cpp_err=yes
23828 fi
23829 if test -z "$ac_cpp_err"; then
23830   eval "$as_ac_Header=yes"
23831 else
23832   echo "$as_me: failed program was:" >&5
23833   cat "conftest.$ac_ext" >&5
23834   eval "$as_ac_Header=no"
23835 fi
23836 rm -f conftest.err "conftest.$ac_ext"
23837 fi
23838 echo "$as_me:23838: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23839 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23840 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23841   cat >>confdefs.h <<EOF
23842 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23843 EOF
23844
23845 fi
23846 done
23847
23848 for ac_func in fork vfork
23849 do
23850 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23851 echo "$as_me:23851: checking for $ac_func" >&5
23852 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23853 if eval "test \"\${$as_ac_var+set}\" = set"; then
23854   echo $ECHO_N "(cached) $ECHO_C" >&6
23855 else
23856   cat >"conftest.$ac_ext" <<_ACEOF
23857 #line 23857 "configure"
23858 #include "confdefs.h"
23859 #define $ac_func autoconf_temporary
23860 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23861 #undef $ac_func
23862
23863 #ifdef __cplusplus
23864 extern "C"
23865 #endif
23866
23867 /* We use char because int might match the return type of a gcc2
23868    builtin and then its argument prototype would still apply.  */
23869 char $ac_func (void);
23870
23871 int
23872 main (void)
23873 {
23874
23875 /* The GNU C library defines stubs for functions which it implements
23876     to always fail with ENOSYS.  Some functions are actually named
23877     something starting with __ and the normal name is an alias.  */
23878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23879 #error found stub for $ac_func
23880 #endif
23881
23882         return $ac_func ();
23883   ;
23884   return 0;
23885 }
23886 _ACEOF
23887 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23888 if { (eval echo "$as_me:23888: \"$ac_link\"") >&5
23889   (eval $ac_link) 2>&5
23890   ac_status=$?
23891   echo "$as_me:23891: \$? = $ac_status" >&5
23892   (exit "$ac_status"); } &&
23893          { ac_try='test -s "conftest$ac_exeext"'
23894   { (eval echo "$as_me:23894: \"$ac_try\"") >&5
23895   (eval $ac_try) 2>&5
23896   ac_status=$?
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); }; }; then
23899   eval "$as_ac_var=yes"
23900 else
23901   echo "$as_me: failed program was:" >&5
23902 cat "conftest.$ac_ext" >&5
23903 eval "$as_ac_var=no"
23904 fi
23905 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23906 fi
23907 echo "$as_me:23907: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23908 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23909 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23910   cat >>confdefs.h <<EOF
23911 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23912 EOF
23913
23914 fi
23915 done
23916
23917 ac_cv_func_fork_works=$ac_cv_func_fork
23918 if test "x$ac_cv_func_fork" = xyes; then
23919   echo "$as_me:23919: checking for working fork" >&5
23920 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23921 if test "${ac_cv_func_fork_works+set}" = set; then
23922   echo $ECHO_N "(cached) $ECHO_C" >&6
23923 else
23924   if test "$cross_compiling" = yes; then
23925   ac_cv_func_fork_works=cross
23926 else
23927   cat >"conftest.$ac_ext" <<_ACEOF
23928 /* By Rüdiger Kuhlmann. */
23929       #include <sys/types.h>
23930       #if HAVE_UNISTD_H
23931       # include <unistd.h>
23932       #endif
23933       /* Some systems only have a dummy stub for fork() */
23934       int main (void)
23935       {
23936         if (fork() < 0)
23937           $ac_main_return (1);
23938         $ac_main_return (0);
23939       }
23940 _ACEOF
23941 rm -f "conftest$ac_exeext"
23942 if { (eval echo "$as_me:23942: \"$ac_link\"") >&5
23943   (eval $ac_link) 2>&5
23944   ac_status=$?
23945   echo "$as_me:23945: \$? = $ac_status" >&5
23946   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23947   { (eval echo "$as_me:23947: \"$ac_try\"") >&5
23948   (eval $ac_try) 2>&5
23949   ac_status=$?
23950   echo "$as_me:23950: \$? = $ac_status" >&5
23951   (exit "$ac_status"); }; }; then
23952   ac_cv_func_fork_works=yes
23953 else
23954   echo "$as_me: program exited with status $ac_status" >&5
23955 echo "$as_me: failed program was:" >&5
23956 cat "conftest.$ac_ext" >&5
23957 ac_cv_func_fork_works=no
23958 fi
23959 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23960 fi
23961 fi
23962 echo "$as_me:23962: result: $ac_cv_func_fork_works" >&5
23963 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23964
23965 fi
23966 if test "x$ac_cv_func_fork_works" = xcross; then
23967   case $host in
23968     *-*-amigaos* | *-*-msdosdjgpp*)
23969       # Override, as these systems have only a dummy fork() stub
23970       ac_cv_func_fork_works=no
23971       ;;
23972     *)
23973       ac_cv_func_fork_works=yes
23974       ;;
23975   esac
23976   { echo "$as_me:23976: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23977 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23978 fi
23979 ac_cv_func_vfork_works=$ac_cv_func_vfork
23980 if test "x$ac_cv_func_vfork" = xyes; then
23981   echo "$as_me:23981: checking for working vfork" >&5
23982 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23983 if test "${ac_cv_func_vfork_works+set}" = set; then
23984   echo $ECHO_N "(cached) $ECHO_C" >&6
23985 else
23986   if test "$cross_compiling" = yes; then
23987   ac_cv_func_vfork_works=cross
23988 else
23989   cat >"conftest.$ac_ext" <<_ACEOF
23990 #line 23990 "configure"
23991 #include "confdefs.h"
23992 /* Thanks to Paul Eggert for this test.  */
23993 #include <stdio.h>
23994 #include <sys/types.h>
23995 #include <sys/stat.h>
23996 #if HAVE_UNISTD_H
23997 # include <unistd.h>
23998 #endif
23999 #if HAVE_VFORK_H
24000 # include <vfork.h>
24001 #endif
24002 /* On some sparc systems, changes by the child to local and incoming
24003    argument registers are propagated back to the parent.  The compiler
24004    is told about this with #include <vfork.h>, but some compilers
24005    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24006    static variable whose address is put into a register that is
24007    clobbered by the vfork.  */
24008 static
24009 #ifdef __cplusplus
24010 sparc_address_test (int arg)
24011 # else
24012 sparc_address_test (arg) int arg;
24013 #endif
24014 {
24015   static pid_t child;
24016   if (!child) {
24017     child = vfork ();
24018     if (child < 0) {
24019       perror ("vfork");
24020       _exit(2);
24021     }
24022     if (!child) {
24023       arg = getpid();
24024       write(-1, "", 0);
24025       _exit (arg);
24026     }
24027   }
24028 }
24029
24030 int
24031 main (void)
24032 {
24033   pid_t parent = getpid ();
24034   pid_t child;
24035
24036   sparc_address_test ();
24037
24038   child = vfork ();
24039
24040   if (child == 0) {
24041     /* Here is another test for sparc vfork register problems.  This
24042        test uses lots of local variables, at least as many local
24043        variables as main has allocated so far including compiler
24044        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24045        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24046        reuse the register of parent for one of the local variables,
24047        since it will think that parent can't possibly be used any more
24048        in this routine.  Assigning to the local variable will thus
24049        munge parent in the parent process.  */
24050     pid_t
24051       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24052       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24053     /* Convince the compiler that p..p7 are live; otherwise, it might
24054        use the same hardware register for all 8 local variables.  */
24055     if (p != p1 || p != p2 || p != p3 || p != p4
24056         || p != p5 || p != p6 || p != p7)
24057       _exit(1);
24058
24059     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24060        from child file descriptors.  If the child closes a descriptor
24061        before it execs or exits, this munges the parent's descriptor
24062        as well.  Test for this by closing stdout in the child.  */
24063     _exit(close(fileno(stdout)) != 0);
24064   } else {
24065     int status;
24066     struct stat st;
24067
24068     while (wait(&status) != child)
24069       ;
24070     $ac_main_return(
24071          /* Was there some problem with vforking?  */
24072          child < 0
24073
24074          /* Did the child fail?  (This shouldn't happen.)  */
24075          || status
24076
24077          /* Did the vfork/compiler bug occur?  */
24078          || parent != getpid()
24079
24080          /* Did the file descriptor bug occur?  */
24081          || fstat(fileno(stdout), &st) != 0
24082          );
24083   }
24084 }
24085 _ACEOF
24086 rm -f "conftest$ac_exeext"
24087 if { (eval echo "$as_me:24087: \"$ac_link\"") >&5
24088   (eval $ac_link) 2>&5
24089   ac_status=$?
24090   echo "$as_me:24090: \$? = $ac_status" >&5
24091   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24092   { (eval echo "$as_me:24092: \"$ac_try\"") >&5
24093   (eval $ac_try) 2>&5
24094   ac_status=$?
24095   echo "$as_me:24095: \$? = $ac_status" >&5
24096   (exit "$ac_status"); }; }; then
24097   ac_cv_func_vfork_works=yes
24098 else
24099   echo "$as_me: program exited with status $ac_status" >&5
24100 echo "$as_me: failed program was:" >&5
24101 cat "conftest.$ac_ext" >&5
24102 ac_cv_func_vfork_works=no
24103 fi
24104 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24105 fi
24106 fi
24107 echo "$as_me:24107: result: $ac_cv_func_vfork_works" >&5
24108 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24109
24110 fi;
24111 if test "x$ac_cv_func_fork_works" = xcross; then
24112   ac_cv_func_vfork_works=ac_cv_func_vfork
24113   { echo "$as_me:24113: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24114 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24115 fi
24116
24117 if test "x$ac_cv_func_vfork_works" = xyes; then
24118
24119 cat >>confdefs.h <<\EOF
24120 #define HAVE_WORKING_VFORK 1
24121 EOF
24122
24123 else
24124
24125 cat >>confdefs.h <<\EOF
24126 #define vfork fork
24127 EOF
24128
24129 fi
24130 if test "x$ac_cv_func_fork_works" = xyes; then
24131
24132 cat >>confdefs.h <<\EOF
24133 #define HAVE_WORKING_FORK 1
24134 EOF
24135
24136 fi
24137
24138 echo "$as_me:24138: checking if fopen accepts explicit binary mode" >&5
24139 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24140 if test "${cf_cv_fopen_bin_r+set}" = set; then
24141   echo $ECHO_N "(cached) $ECHO_C" >&6
24142 else
24143
24144         if test "$cross_compiling" = yes; then
24145   cf_cv_fopen_bin_r=unknown
24146 else
24147   cat >"conftest.$ac_ext" <<_ACEOF
24148 #line 24148 "configure"
24149 #include "confdefs.h"
24150
24151 #include <stdio.h>
24152 int main(void) {
24153         FILE *fp = fopen("conftest.tmp", "wb");
24154         int rc = 0;
24155         if (fp != 0) {
24156                 int p, q;
24157                 for (p = 0; p < 256; ++p) {
24158                         fputc(p, fp);
24159                 }
24160                 fclose(fp);
24161                 fp = fopen("conftest.tmp", "rb");
24162                 if (fp != 0) {
24163                         for (p = 0; p < 256; ++p) {
24164                                 q = fgetc(fp);
24165                                 if (q != p) {
24166                                         rc = 1;
24167                                         break;
24168                                 }
24169                         }
24170                 } else {
24171                         rc = 1;
24172                 }
24173         } else {
24174                 rc = 1;
24175         }
24176         ${cf_cv_main_return:-return} (rc);
24177 }
24178
24179 _ACEOF
24180 rm -f "conftest$ac_exeext"
24181 if { (eval echo "$as_me:24181: \"$ac_link\"") >&5
24182   (eval $ac_link) 2>&5
24183   ac_status=$?
24184   echo "$as_me:24184: \$? = $ac_status" >&5
24185   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24186   { (eval echo "$as_me:24186: \"$ac_try\"") >&5
24187   (eval $ac_try) 2>&5
24188   ac_status=$?
24189   echo "$as_me:24189: \$? = $ac_status" >&5
24190   (exit "$ac_status"); }; }; then
24191   cf_cv_fopen_bin_r=yes
24192 else
24193   echo "$as_me: program exited with status $ac_status" >&5
24194 echo "$as_me: failed program was:" >&5
24195 cat "conftest.$ac_ext" >&5
24196 cf_cv_fopen_bin_r=no
24197 fi
24198 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24199 fi
24200
24201 fi
24202 echo "$as_me:24202: result: $cf_cv_fopen_bin_r" >&5
24203 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24204 test "x$cf_cv_fopen_bin_r" != xno &&
24205 cat >>confdefs.h <<\EOF
24206 #define USE_FOPEN_BIN_R 1
24207 EOF
24208
24209 # special check for test/ditto.c
24210
24211 echo "$as_me:24211: checking for openpty in -lutil" >&5
24212 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24213 if test "${ac_cv_lib_util_openpty+set}" = set; then
24214   echo $ECHO_N "(cached) $ECHO_C" >&6
24215 else
24216   ac_check_lib_save_LIBS=$LIBS
24217 LIBS="-lutil  $LIBS"
24218 cat >"conftest.$ac_ext" <<_ACEOF
24219 #line 24219 "configure"
24220 #include "confdefs.h"
24221
24222 /* Override any gcc2 internal prototype to avoid an error.  */
24223 #ifdef __cplusplus
24224 extern "C"
24225 #endif
24226 /* We use char because int might match the return type of a gcc2
24227    builtin and then its argument prototype would still apply.  */
24228 char openpty ();
24229 int
24230 main (void)
24231 {
24232 openpty ();
24233   ;
24234   return 0;
24235 }
24236 _ACEOF
24237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24238 if { (eval echo "$as_me:24238: \"$ac_link\"") >&5
24239   (eval $ac_link) 2>&5
24240   ac_status=$?
24241   echo "$as_me:24241: \$? = $ac_status" >&5
24242   (exit "$ac_status"); } &&
24243          { ac_try='test -s "conftest$ac_exeext"'
24244   { (eval echo "$as_me:24244: \"$ac_try\"") >&5
24245   (eval $ac_try) 2>&5
24246   ac_status=$?
24247   echo "$as_me:24247: \$? = $ac_status" >&5
24248   (exit "$ac_status"); }; }; then
24249   ac_cv_lib_util_openpty=yes
24250 else
24251   echo "$as_me: failed program was:" >&5
24252 cat "conftest.$ac_ext" >&5
24253 ac_cv_lib_util_openpty=no
24254 fi
24255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24256 LIBS=$ac_check_lib_save_LIBS
24257 fi
24258 echo "$as_me:24258: result: $ac_cv_lib_util_openpty" >&5
24259 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24260 if test "$ac_cv_lib_util_openpty" = yes; then
24261   cf_cv_lib_util=yes
24262 else
24263   cf_cv_lib_util=no
24264 fi
24265
24266 echo "$as_me:24266: checking for openpty header" >&5
24267 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24268 if test "${cf_cv_func_openpty+set}" = set; then
24269   echo $ECHO_N "(cached) $ECHO_C" >&6
24270 else
24271
24272         cf_save_LIBS="$LIBS"
24273         test "$cf_cv_lib_util" = yes && {
24274 cf_add_libs="$LIBS"
24275 # reverse order
24276 cf_add_0lib=
24277 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24278 # filter duplicates
24279 for cf_add_1lib in $cf_add_0lib; do
24280         for cf_add_2lib in $cf_add_libs; do
24281                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24282                         cf_add_1lib=
24283                         break
24284                 fi
24285         done
24286         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24287 done
24288 LIBS="$cf_add_libs"
24289  }
24290         for cf_header in pty.h libutil.h util.h
24291         do
24292         cat >"conftest.$ac_ext" <<_ACEOF
24293 #line 24293 "configure"
24294 #include "confdefs.h"
24295
24296 #include <$cf_header>
24297
24298 int
24299 main (void)
24300 {
24301
24302         int x = openpty((int *)0, (int *)0, (char *)0,
24303                                    (struct termios *)0, (struct winsize *)0);
24304
24305   ;
24306   return 0;
24307 }
24308 _ACEOF
24309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24310 if { (eval echo "$as_me:24310: \"$ac_link\"") >&5
24311   (eval $ac_link) 2>&5
24312   ac_status=$?
24313   echo "$as_me:24313: \$? = $ac_status" >&5
24314   (exit "$ac_status"); } &&
24315          { ac_try='test -s "conftest$ac_exeext"'
24316   { (eval echo "$as_me:24316: \"$ac_try\"") >&5
24317   (eval $ac_try) 2>&5
24318   ac_status=$?
24319   echo "$as_me:24319: \$? = $ac_status" >&5
24320   (exit "$ac_status"); }; }; then
24321
24322                 cf_cv_func_openpty=$cf_header
24323                 break
24324
24325 else
24326   echo "$as_me: failed program was:" >&5
24327 cat "conftest.$ac_ext" >&5
24328
24329                 cf_cv_func_openpty=no
24330
24331 fi
24332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24333         done
24334         LIBS="$cf_save_LIBS"
24335
24336 fi
24337 echo "$as_me:24337: result: $cf_cv_func_openpty" >&5
24338 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24339
24340 if test "$cf_cv_func_openpty" != no ; then
24341
24342 cat >>confdefs.h <<EOF
24343 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24344 EOF
24345
24346 cat >>confdefs.h <<\EOF
24347 #define USE_XTERM_PTY 1
24348 EOF
24349
24350         if test "x$cf_cv_lib_util" = xyes ; then
24351
24352 cf_add_libs="$TEST_LIBS"
24353 # reverse order
24354 cf_add_0lib=
24355 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24356 # filter duplicates
24357 for cf_add_1lib in $cf_add_0lib; do
24358         for cf_add_2lib in $cf_add_libs; do
24359                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24360                         cf_add_1lib=
24361                         break
24362                 fi
24363         done
24364         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24365 done
24366 TEST_LIBS="$cf_add_libs"
24367
24368         fi
24369 fi
24370
24371 if test "$with_hashed_db" != no ; then
24372
24373 cat >>confdefs.h <<\EOF
24374 #define USE_HASHED_DB 1
24375 EOF
24376
24377 case $with_hashed_db in
24378 (yes|*able*)
24379         ;;
24380 (*)
24381         if test -d "$with_hashed_db" ; then
24382
24383 if test -n "$with_hashed_db/include" ; then
24384   for cf_add_incdir in $with_hashed_db/include
24385   do
24386         while test "$cf_add_incdir" != /usr/include
24387         do
24388           if test -d "$cf_add_incdir"
24389           then
24390                 cf_have_incdir=no
24391                 if test -n "$CFLAGS$CPPFLAGS" ; then
24392                   # a loop is needed to ensure we can add subdirs of existing dirs
24393                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24394                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24395                           cf_have_incdir=yes; break
24396                         fi
24397                   done
24398                 fi
24399
24400                 if test "$cf_have_incdir" = no ; then
24401                   if test "$cf_add_incdir" = /usr/local/include ; then
24402                         if test "$GCC" = yes
24403                         then
24404                           cf_save_CPPFLAGS=$CPPFLAGS
24405
24406         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24407         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24408
24409                           cat >"conftest.$ac_ext" <<_ACEOF
24410 #line 24410 "configure"
24411 #include "confdefs.h"
24412 #include <stdio.h>
24413 int
24414 main (void)
24415 {
24416 printf("Hello")
24417   ;
24418   return 0;
24419 }
24420 _ACEOF
24421 rm -f "conftest.$ac_objext"
24422 if { (eval echo "$as_me:24422: \"$ac_compile\"") >&5
24423   (eval $ac_compile) 2>&5
24424   ac_status=$?
24425   echo "$as_me:24425: \$? = $ac_status" >&5
24426   (exit "$ac_status"); } &&
24427          { ac_try='test -s "conftest.$ac_objext"'
24428   { (eval echo "$as_me:24428: \"$ac_try\"") >&5
24429   (eval $ac_try) 2>&5
24430   ac_status=$?
24431   echo "$as_me:24431: \$? = $ac_status" >&5
24432   (exit "$ac_status"); }; }; then
24433   :
24434 else
24435   echo "$as_me: failed program was:" >&5
24436 cat "conftest.$ac_ext" >&5
24437 cf_have_incdir=yes
24438 fi
24439 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24440                           CPPFLAGS=$cf_save_CPPFLAGS
24441                         fi
24442                   fi
24443                 fi
24444
24445                 if test "$cf_have_incdir" = no ; then
24446                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24447
24448 echo "${as_me:-configure}:24448: testing adding $cf_add_incdir to include-path ..." 1>&5
24449
24450                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24451
24452                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24453                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24454                   cf_add_incdir="$cf_top_incdir"
24455                 else
24456                   break
24457                 fi
24458           else
24459                 break
24460           fi
24461         done
24462   done
24463 fi
24464
24465 if test -n "$with_hashed_db/lib" ; then
24466         for cf_add_libdir in $with_hashed_db/lib
24467         do
24468                 if test "$cf_add_libdir" = /usr/lib ; then
24469                         :
24470                 elif test -d "$cf_add_libdir"
24471                 then
24472                         cf_have_libdir=no
24473                         if test -n "$LDFLAGS$LIBS" ; then
24474                                 # a loop is needed to ensure we can add subdirs of existing dirs
24475                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24476                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24477                                                 cf_have_libdir=yes; break
24478                                         fi
24479                                 done
24480                         fi
24481                         if test "$cf_have_libdir" = no ; then
24482                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24483
24484 echo "${as_me:-configure}:24484: testing adding $cf_add_libdir to library-path ..." 1>&5
24485
24486                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24487                         fi
24488                 fi
24489         done
24490 fi
24491
24492         else
24493                 case "$with_hashed_db" in
24494                 (./*|../*|/*)
24495                         { echo "$as_me:24495: WARNING: no such directory $with_hashed_db" >&5
24496 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24497                         ;;
24498                 (*)
24499
24500 cf_search=
24501
24502 test "x$prefix" != "xNONE" && \
24503 test -d "$prefix" && \
24504  {
24505         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24506         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24507         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24508         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24509         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24510         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24511 }
24512
24513 for cf_subdir_prefix in \
24514         /usr \
24515         /usr/local \
24516         /usr/pkg \
24517         /opt \
24518         /opt/local \
24519         $HOME
24520 do
24521
24522 test "x$cf_subdir_prefix" != "x$prefix" && \
24523 test -d "$cf_subdir_prefix" && \
24524 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24525         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24526         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24527         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24528         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24529         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24530         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"
24531 }
24532
24533 done
24534
24535         for cf_item in $cf_search
24536         do
24537                 case "$cf_item" in
24538                 (*/$with_hashed_db)
24539
24540 if test -n "$cf_item" ; then
24541   for cf_add_incdir in $cf_item
24542   do
24543         while test "$cf_add_incdir" != /usr/include
24544         do
24545           if test -d "$cf_add_incdir"
24546           then
24547                 cf_have_incdir=no
24548                 if test -n "$CFLAGS$CPPFLAGS" ; then
24549                   # a loop is needed to ensure we can add subdirs of existing dirs
24550                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24551                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24552                           cf_have_incdir=yes; break
24553                         fi
24554                   done
24555                 fi
24556
24557                 if test "$cf_have_incdir" = no ; then
24558                   if test "$cf_add_incdir" = /usr/local/include ; then
24559                         if test "$GCC" = yes
24560                         then
24561                           cf_save_CPPFLAGS=$CPPFLAGS
24562
24563         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24564         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24565
24566                           cat >"conftest.$ac_ext" <<_ACEOF
24567 #line 24567 "configure"
24568 #include "confdefs.h"
24569 #include <stdio.h>
24570 int
24571 main (void)
24572 {
24573 printf("Hello")
24574   ;
24575   return 0;
24576 }
24577 _ACEOF
24578 rm -f "conftest.$ac_objext"
24579 if { (eval echo "$as_me:24579: \"$ac_compile\"") >&5
24580   (eval $ac_compile) 2>&5
24581   ac_status=$?
24582   echo "$as_me:24582: \$? = $ac_status" >&5
24583   (exit "$ac_status"); } &&
24584          { ac_try='test -s "conftest.$ac_objext"'
24585   { (eval echo "$as_me:24585: \"$ac_try\"") >&5
24586   (eval $ac_try) 2>&5
24587   ac_status=$?
24588   echo "$as_me:24588: \$? = $ac_status" >&5
24589   (exit "$ac_status"); }; }; then
24590   :
24591 else
24592   echo "$as_me: failed program was:" >&5
24593 cat "conftest.$ac_ext" >&5
24594 cf_have_incdir=yes
24595 fi
24596 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24597                           CPPFLAGS=$cf_save_CPPFLAGS
24598                         fi
24599                   fi
24600                 fi
24601
24602                 if test "$cf_have_incdir" = no ; then
24603                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24604
24605 echo "${as_me:-configure}:24605: testing adding $cf_add_incdir to include-path ..." 1>&5
24606
24607                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24608
24609                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24610                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24611                   cf_add_incdir="$cf_top_incdir"
24612                 else
24613                   break
24614                 fi
24615           else
24616                 break
24617           fi
24618         done
24619   done
24620 fi
24621
24622                         ;;
24623                 esac
24624         done
24625
24626 cf_search=
24627
24628 test "x$prefix" != "xNONE" && \
24629 test -d "$prefix" && \
24630  {
24631         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24632         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24633         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24634         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24635         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24636         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24637 }
24638
24639 for cf_subdir_prefix in \
24640         /usr \
24641         /usr/local \
24642         /usr/pkg \
24643         /opt \
24644         /opt/local \
24645         $HOME
24646 do
24647
24648 test "x$cf_subdir_prefix" != "x$prefix" && \
24649 test -d "$cf_subdir_prefix" && \
24650 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24651         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24652         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24653         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24654         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24655         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24656         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"
24657 }
24658
24659 done
24660
24661         for cf_item in $cf_search
24662         do
24663                 case "$cf_item" in
24664                 (*/$with_hashed_db)
24665
24666 if test -n "$cf_item" ; then
24667         for cf_add_libdir in $cf_item
24668         do
24669                 if test "$cf_add_libdir" = /usr/lib ; then
24670                         :
24671                 elif test -d "$cf_add_libdir"
24672                 then
24673                         cf_have_libdir=no
24674                         if test -n "$LDFLAGS$LIBS" ; then
24675                                 # a loop is needed to ensure we can add subdirs of existing dirs
24676                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24677                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24678                                                 cf_have_libdir=yes; break
24679                                         fi
24680                                 done
24681                         fi
24682                         if test "$cf_have_libdir" = no ; then
24683                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24684
24685 echo "${as_me:-configure}:24685: testing adding $cf_add_libdir to library-path ..." 1>&5
24686
24687                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24688                         fi
24689                 fi
24690         done
24691 fi
24692
24693                         ;;
24694                 esac
24695         done
24696
24697                         ;;
24698                 esac
24699         fi
24700 esac
24701
24702 echo "$as_me:24702: checking for db.h" >&5
24703 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24704 if test "${ac_cv_header_db_h+set}" = set; then
24705   echo $ECHO_N "(cached) $ECHO_C" >&6
24706 else
24707   cat >"conftest.$ac_ext" <<_ACEOF
24708 #line 24708 "configure"
24709 #include "confdefs.h"
24710 #include <db.h>
24711 _ACEOF
24712 if { (eval echo "$as_me:24712: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24713   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24714   ac_status=$?
24715   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24716   rm -f conftest.er1
24717   cat conftest.err >&5
24718   echo "$as_me:24718: \$? = $ac_status" >&5
24719   (exit "$ac_status"); } >/dev/null; then
24720   if test -s conftest.err; then
24721     ac_cpp_err=$ac_c_preproc_warn_flag
24722   else
24723     ac_cpp_err=
24724   fi
24725 else
24726   ac_cpp_err=yes
24727 fi
24728 if test -z "$ac_cpp_err"; then
24729   ac_cv_header_db_h=yes
24730 else
24731   echo "$as_me: failed program was:" >&5
24732   cat "conftest.$ac_ext" >&5
24733   ac_cv_header_db_h=no
24734 fi
24735 rm -f conftest.err "conftest.$ac_ext"
24736 fi
24737 echo "$as_me:24737: result: $ac_cv_header_db_h" >&5
24738 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24739 if test "$ac_cv_header_db_h" = yes; then
24740
24741 echo "$as_me:24741: checking for version of db" >&5
24742 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24743 if test "${cf_cv_hashed_db_version+set}" = set; then
24744   echo $ECHO_N "(cached) $ECHO_C" >&6
24745 else
24746
24747 cf_cv_hashed_db_version=unknown
24748
24749 for cf_db_version in 1 2 3 4 5 6
24750 do
24751
24752 echo "${as_me:-configure}:24752: testing checking for db version $cf_db_version ..." 1>&5
24753
24754         cat >"conftest.$ac_ext" <<_ACEOF
24755 #line 24755 "configure"
24756 #include "confdefs.h"
24757
24758 $ac_includes_default
24759 #include <db.h>
24760
24761 #ifdef DB_VERSION_MAJOR
24762         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24763 #if $cf_db_version == DB_VERSION_MAJOR
24764         /* ok */
24765 #else
24766         make an error
24767 #endif
24768 #else
24769 #if $cf_db_version == 1
24770         /* ok: assuming this is DB 1.8.5 */
24771 #else
24772         make an error
24773 #endif
24774 #endif
24775
24776 int
24777 main (void)
24778 {
24779 DBT *foo = 0
24780   ;
24781   return 0;
24782 }
24783 _ACEOF
24784 rm -f "conftest.$ac_objext"
24785 if { (eval echo "$as_me:24785: \"$ac_compile\"") >&5
24786   (eval $ac_compile) 2>&5
24787   ac_status=$?
24788   echo "$as_me:24788: \$? = $ac_status" >&5
24789   (exit "$ac_status"); } &&
24790          { ac_try='test -s "conftest.$ac_objext"'
24791   { (eval echo "$as_me:24791: \"$ac_try\"") >&5
24792   (eval $ac_try) 2>&5
24793   ac_status=$?
24794   echo "$as_me:24794: \$? = $ac_status" >&5
24795   (exit "$ac_status"); }; }; then
24796
24797         cf_cv_hashed_db_version=$cf_db_version
24798         break
24799
24800 else
24801   echo "$as_me: failed program was:" >&5
24802 cat "conftest.$ac_ext" >&5
24803 fi
24804 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24805 done
24806
24807 fi
24808 echo "$as_me:24808: result: $cf_cv_hashed_db_version" >&5
24809 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24810
24811 if test "$cf_cv_hashed_db_version" = unknown ; then
24812         { { echo "$as_me:24812: error: Cannot determine version of db" >&5
24813 echo "$as_me: error: Cannot determine version of db" >&2;}
24814    { (exit 1); exit 1; }; }
24815 else
24816
24817 echo "$as_me:24817: checking for db libraries" >&5
24818 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24819 if test "${cf_cv_hashed_db_libs+set}" = set; then
24820   echo $ECHO_N "(cached) $ECHO_C" >&6
24821 else
24822
24823 cf_cv_hashed_db_libs=unknown
24824 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24825 do
24826         cf_save_libs="$LIBS"
24827         if test -n "$cf_db_libs"; then
24828
24829 cf_add_libs="$LIBS"
24830 # reverse order
24831 cf_add_0lib=
24832 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24833 # filter duplicates
24834 for cf_add_1lib in $cf_add_0lib; do
24835         for cf_add_2lib in $cf_add_libs; do
24836                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24837                         cf_add_1lib=
24838                         break
24839                 fi
24840         done
24841         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24842 done
24843 LIBS="$cf_add_libs"
24844
24845         fi
24846
24847 echo "${as_me:-configure}:24847: testing checking for library $cf_db_libs ..." 1>&5
24848
24849         cat >"conftest.$ac_ext" <<_ACEOF
24850 #line 24850 "configure"
24851 #include "confdefs.h"
24852
24853 $ac_includes_default
24854 #include <db.h>
24855
24856 int
24857 main (void)
24858 {
24859
24860         char *path = "/tmp/foo";
24861 #ifdef DB_VERSION_MAJOR
24862 #if DB_VERSION_MAJOR >= 4
24863         DB *result = 0;
24864         db_create(&result, NULL, 0);
24865         result->open(result,
24866                 NULL,
24867                 path,
24868                 path,
24869                 DB_HASH,
24870                 DB_CREATE,
24871                 0644);
24872 #elif DB_VERSION_MAJOR >= 3
24873         DB *result = 0;
24874         db_create(&result, NULL, 0);
24875         result->open(result,
24876                 path,
24877                 path,
24878                 DB_HASH,
24879                 DB_CREATE,
24880                 0644);
24881 #elif DB_VERSION_MAJOR >= 2
24882         DB *result = 0;
24883         db_open(path,
24884                 DB_HASH,
24885                 DB_CREATE,
24886                 0644,
24887                 (DB_ENV *) 0,
24888                 (DB_INFO *) 0,
24889                 &result);
24890 #endif /* DB_VERSION_MAJOR */
24891 #else
24892         DB *result = dbopen(path,
24893                      2,
24894                      0644,
24895                      DB_HASH,
24896                      0);
24897 #endif
24898         ${cf_cv_main_return:-return}(result != 0)
24899
24900   ;
24901   return 0;
24902 }
24903 _ACEOF
24904 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24905 if { (eval echo "$as_me:24905: \"$ac_link\"") >&5
24906   (eval $ac_link) 2>&5
24907   ac_status=$?
24908   echo "$as_me:24908: \$? = $ac_status" >&5
24909   (exit "$ac_status"); } &&
24910          { ac_try='test -s "conftest$ac_exeext"'
24911   { (eval echo "$as_me:24911: \"$ac_try\"") >&5
24912   (eval $ac_try) 2>&5
24913   ac_status=$?
24914   echo "$as_me:24914: \$? = $ac_status" >&5
24915   (exit "$ac_status"); }; }; then
24916
24917         if test -n "$cf_db_libs" ; then
24918                 cf_cv_hashed_db_libs=$cf_db_libs
24919         else
24920                 cf_cv_hashed_db_libs=default
24921         fi
24922         LIBS="$cf_save_libs"
24923         break
24924
24925 else
24926   echo "$as_me: failed program was:" >&5
24927 cat "conftest.$ac_ext" >&5
24928 fi
24929 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24930         LIBS="$cf_save_libs"
24931 done
24932
24933 fi
24934 echo "$as_me:24934: result: $cf_cv_hashed_db_libs" >&5
24935 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24936
24937         if test "$cf_cv_hashed_db_libs" = unknown ; then
24938                 { { echo "$as_me:24938: error: Cannot determine library for db" >&5
24939 echo "$as_me: error: Cannot determine library for db" >&2;}
24940    { (exit 1); exit 1; }; }
24941         elif test "$cf_cv_hashed_db_libs" != default ; then
24942
24943 cf_add_libs="$LIBS"
24944 # reverse order
24945 cf_add_0lib=
24946 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24947 # filter duplicates
24948 for cf_add_1lib in $cf_add_0lib; do
24949         for cf_add_2lib in $cf_add_libs; do
24950                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24951                         cf_add_1lib=
24952                         break
24953                 fi
24954         done
24955         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24956 done
24957 LIBS="$cf_add_libs"
24958
24959         fi
24960 fi
24961
24962 else
24963
24964         { { echo "$as_me:24964: error: Cannot find db.h" >&5
24965 echo "$as_me: error: Cannot find db.h" >&2;}
24966    { (exit 1); exit 1; }; }
24967
24968 fi
24969
24970 fi
24971
24972 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24973         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24974         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24975 fi
24976
24977 # Just in case, check if the C compiler has a bool type.
24978
24979 echo "$as_me:24979: checking if we should include stdbool.h" >&5
24980 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24981
24982 if test "${cf_cv_header_stdbool_h+set}" = set; then
24983   echo $ECHO_N "(cached) $ECHO_C" >&6
24984 else
24985
24986         cat >"conftest.$ac_ext" <<_ACEOF
24987 #line 24987 "configure"
24988 #include "confdefs.h"
24989
24990 int
24991 main (void)
24992 {
24993 bool foo = false
24994   ;
24995   return 0;
24996 }
24997 _ACEOF
24998 rm -f "conftest.$ac_objext"
24999 if { (eval echo "$as_me:24999: \"$ac_compile\"") >&5
25000   (eval $ac_compile) 2>&5
25001   ac_status=$?
25002   echo "$as_me:25002: \$? = $ac_status" >&5
25003   (exit "$ac_status"); } &&
25004          { ac_try='test -s "conftest.$ac_objext"'
25005   { (eval echo "$as_me:25005: \"$ac_try\"") >&5
25006   (eval $ac_try) 2>&5
25007   ac_status=$?
25008   echo "$as_me:25008: \$? = $ac_status" >&5
25009   (exit "$ac_status"); }; }; then
25010   cf_cv_header_stdbool_h=0
25011 else
25012   echo "$as_me: failed program was:" >&5
25013 cat "conftest.$ac_ext" >&5
25014 cat >"conftest.$ac_ext" <<_ACEOF
25015 #line 25015 "configure"
25016 #include "confdefs.h"
25017
25018 #ifndef __BEOS__
25019 #include <stdbool.h>
25020 #endif
25021
25022 int
25023 main (void)
25024 {
25025 bool foo = false
25026   ;
25027   return 0;
25028 }
25029 _ACEOF
25030 rm -f "conftest.$ac_objext"
25031 if { (eval echo "$as_me:25031: \"$ac_compile\"") >&5
25032   (eval $ac_compile) 2>&5
25033   ac_status=$?
25034   echo "$as_me:25034: \$? = $ac_status" >&5
25035   (exit "$ac_status"); } &&
25036          { ac_try='test -s "conftest.$ac_objext"'
25037   { (eval echo "$as_me:25037: \"$ac_try\"") >&5
25038   (eval $ac_try) 2>&5
25039   ac_status=$?
25040   echo "$as_me:25040: \$? = $ac_status" >&5
25041   (exit "$ac_status"); }; }; then
25042   cf_cv_header_stdbool_h=1
25043 else
25044   echo "$as_me: failed program was:" >&5
25045 cat "conftest.$ac_ext" >&5
25046 cf_cv_header_stdbool_h=0
25047 fi
25048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25049 fi
25050 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25051 fi
25052
25053 if test "$cf_cv_header_stdbool_h" = 1
25054 then    echo "$as_me:25054: result: yes" >&5
25055 echo "${ECHO_T}yes" >&6
25056 else    echo "$as_me:25056: result: no" >&5
25057 echo "${ECHO_T}no" >&6
25058 fi
25059
25060 echo "$as_me:25060: checking for builtin bool type" >&5
25061 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25062
25063 if test "${cf_cv_cc_bool_type+set}" = set; then
25064   echo $ECHO_N "(cached) $ECHO_C" >&6
25065 else
25066
25067         cat >"conftest.$ac_ext" <<_ACEOF
25068 #line 25068 "configure"
25069 #include "confdefs.h"
25070
25071 #include <stdio.h>
25072 #include <sys/types.h>
25073
25074 int
25075 main (void)
25076 {
25077 bool x = false
25078   ;
25079   return 0;
25080 }
25081 _ACEOF
25082 rm -f "conftest.$ac_objext"
25083 if { (eval echo "$as_me:25083: \"$ac_compile\"") >&5
25084   (eval $ac_compile) 2>&5
25085   ac_status=$?
25086   echo "$as_me:25086: \$? = $ac_status" >&5
25087   (exit "$ac_status"); } &&
25088          { ac_try='test -s "conftest.$ac_objext"'
25089   { (eval echo "$as_me:25089: \"$ac_try\"") >&5
25090   (eval $ac_try) 2>&5
25091   ac_status=$?
25092   echo "$as_me:25092: \$? = $ac_status" >&5
25093   (exit "$ac_status"); }; }; then
25094   cf_cv_cc_bool_type=1
25095 else
25096   echo "$as_me: failed program was:" >&5
25097 cat "conftest.$ac_ext" >&5
25098 cf_cv_cc_bool_type=0
25099 fi
25100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25101
25102 fi
25103
25104 if test "$cf_cv_cc_bool_type" = 1
25105 then    echo "$as_me:25105: result: yes" >&5
25106 echo "${ECHO_T}yes" >&6
25107 else    echo "$as_me:25107: result: no" >&5
25108 echo "${ECHO_T}no" >&6
25109 fi
25110
25111 # Check for C++ compiler characteristics (and ensure that it's there!)
25112 if test -n "$CXX" ; then
25113         ac_ext=cc
25114 ac_cpp='$CXXCPP $CPPFLAGS'
25115 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25116 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25117 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25118 ac_main_return="return"
25119
25120 if test -n "$GXX" ; then
25121
25122         cf_save="$LIBS"
25123         LIBS="$LIBS $CXXLIBS"
25124         echo "$as_me:25124: checking if we already have C++ library" >&5
25125 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25126         cat >"conftest.$ac_ext" <<_ACEOF
25127 #line 25127 "configure"
25128 #include "confdefs.h"
25129
25130                         #include <iostream>
25131 int
25132 main (void)
25133 {
25134
25135                         std::cout << "Hello World!" << std::endl;
25136   ;
25137   return 0;
25138 }
25139 _ACEOF
25140 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25141 if { (eval echo "$as_me:25141: \"$ac_link\"") >&5
25142   (eval $ac_link) 2>&5
25143   ac_status=$?
25144   echo "$as_me:25144: \$? = $ac_status" >&5
25145   (exit "$ac_status"); } &&
25146          { ac_try='test -s "conftest$ac_exeext"'
25147   { (eval echo "$as_me:25147: \"$ac_try\"") >&5
25148   (eval $ac_try) 2>&5
25149   ac_status=$?
25150   echo "$as_me:25150: \$? = $ac_status" >&5
25151   (exit "$ac_status"); }; }; then
25152   cf_have_libstdcpp=yes
25153 else
25154   echo "$as_me: failed program was:" >&5
25155 cat "conftest.$ac_ext" >&5
25156 cf_have_libstdcpp=no
25157 fi
25158 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25159         echo "$as_me:25159: result: $cf_have_libstdcpp" >&5
25160 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25161         LIBS="$cf_save"
25162
25163         if test "$cf_have_libstdcpp" != yes
25164         then
25165                 case "$cf_cv_system_name" in
25166                 (os2*)
25167                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25168                                 cf_stdcpp_libname=stdcpp
25169                         else
25170                                 cf_stdcpp_libname=stdc++
25171                         fi
25172                         ;;
25173                 (*)
25174                         cf_stdcpp_libname=stdc++
25175                         ;;
25176                 esac
25177
25178                 echo "$as_me:25178: checking for library $cf_stdcpp_libname" >&5
25179 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25180 if test "${cf_cv_libstdcpp+set}" = set; then
25181   echo $ECHO_N "(cached) $ECHO_C" >&6
25182 else
25183
25184                         cf_save="$LIBS"
25185                         LIBS="$LIBS $CXXLIBS"
25186
25187 cf_add_libs="$LIBS"
25188 # reverse order
25189 cf_add_0lib=
25190 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25191 # filter duplicates
25192 for cf_add_1lib in $cf_add_0lib; do
25193         for cf_add_2lib in $cf_add_libs; do
25194                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25195                         cf_add_1lib=
25196                         break
25197                 fi
25198         done
25199         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25200 done
25201 LIBS="$cf_add_libs"
25202
25203                 cat >"conftest.$ac_ext" <<_ACEOF
25204 #line 25204 "configure"
25205 #include "confdefs.h"
25206
25207                                 #include <iostream>
25208 int
25209 main (void)
25210 {
25211
25212                                 std::cout << "Hello World!" << std::endl;
25213   ;
25214   return 0;
25215 }
25216 _ACEOF
25217 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25218 if { (eval echo "$as_me:25218: \"$ac_link\"") >&5
25219   (eval $ac_link) 2>&5
25220   ac_status=$?
25221   echo "$as_me:25221: \$? = $ac_status" >&5
25222   (exit "$ac_status"); } &&
25223          { ac_try='test -s "conftest$ac_exeext"'
25224   { (eval echo "$as_me:25224: \"$ac_try\"") >&5
25225   (eval $ac_try) 2>&5
25226   ac_status=$?
25227   echo "$as_me:25227: \$? = $ac_status" >&5
25228   (exit "$ac_status"); }; }; then
25229   cf_cv_libstdcpp=yes
25230 else
25231   echo "$as_me: failed program was:" >&5
25232 cat "conftest.$ac_ext" >&5
25233 cf_cv_libstdcpp=no
25234 fi
25235 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25236                         LIBS="$cf_save"
25237
25238 fi
25239 echo "$as_me:25239: result: $cf_cv_libstdcpp" >&5
25240 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25241                 test "$cf_cv_libstdcpp" = yes && {
25242 cf_add_libs="$CXXLIBS"
25243 # reverse order
25244 cf_add_0lib=
25245 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25246 # filter duplicates
25247 for cf_add_1lib in $cf_add_0lib; do
25248         for cf_add_2lib in $cf_add_libs; do
25249                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25250                         cf_add_1lib=
25251                         break
25252                 fi
25253         done
25254         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25255 done
25256 CXXLIBS="$cf_add_libs"
25257  }
25258         fi
25259 fi
25260
25261         echo "$as_me:25261: checking whether $CXX understands -c and -o together" >&5
25262 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25263 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25264   echo $ECHO_N "(cached) $ECHO_C" >&6
25265 else
25266
25267 cat > conftest.$ac_ext <<CF_EOF
25268 int main(void)
25269 {
25270         ${cf_cv_main_return:-return}(0);
25271 }
25272 CF_EOF
25273 # We do the test twice because some compilers refuse to overwrite an
25274 # existing .o file with -o, though they will create one.
25275 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25276 if { (eval echo "$as_me:25276: \"$ac_try\"") >&5
25277   (eval $ac_try) 2>&5
25278   ac_status=$?
25279   echo "$as_me:25279: \$? = $ac_status" >&5
25280   (exit "$ac_status"); } &&
25281   test -f conftest2.$ac_objext && { (eval echo "$as_me:25281: \"$ac_try\"") >&5
25282   (eval $ac_try) 2>&5
25283   ac_status=$?
25284   echo "$as_me:25284: \$? = $ac_status" >&5
25285   (exit "$ac_status"); };
25286 then
25287   eval cf_cv_prog_CXX_c_o=yes
25288 else
25289   eval cf_cv_prog_CXX_c_o=no
25290 fi
25291 rm -rf ./conftest*
25292
25293 fi
25294 if test "$cf_cv_prog_CXX_c_o" = yes; then
25295   echo "$as_me:25295: result: yes" >&5
25296 echo "${ECHO_T}yes" >&6
25297 else
25298   echo "$as_me:25298: result: no" >&5
25299 echo "${ECHO_T}no" >&6
25300 fi
25301
25302         case "$GXX_VERSION" in
25303         (1.*|2.[0-6]*|[1-9][0-9].*)
25304                 cf_cxx_library=yes
25305                 ;;
25306         (*-2.7*|2.7*)
25307
25308 cf_cxx_library=unknown
25309 case "$cf_cv_system_name" in
25310 (os2*)
25311         cf_gpp_libname=gpp
25312         ;;
25313 (*)
25314         cf_gpp_libname=g++
25315         ;;
25316 esac
25317 if test "$GXX" = yes; then
25318         echo "$as_me:25318: checking for lib$cf_gpp_libname" >&5
25319 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25320         cf_save="$LIBS"
25321
25322 cf_add_libs="$LIBS"
25323 # reverse order
25324 cf_add_0lib=
25325 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25326 # filter duplicates
25327 for cf_add_1lib in $cf_add_0lib; do
25328         for cf_add_2lib in $cf_add_libs; do
25329                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25330                         cf_add_1lib=
25331                         break
25332                 fi
25333         done
25334         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25335 done
25336 LIBS="$cf_add_libs"
25337
25338         cat >"conftest.$ac_ext" <<_ACEOF
25339 #line 25339 "configure"
25340 #include "confdefs.h"
25341
25342 #include <$cf_gpp_libname/builtin.h>
25343
25344 int
25345 main (void)
25346 {
25347 two_arg_error_handler_t foo2 = lib_error_handler
25348   ;
25349   return 0;
25350 }
25351 _ACEOF
25352 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25353 if { (eval echo "$as_me:25353: \"$ac_link\"") >&5
25354   (eval $ac_link) 2>&5
25355   ac_status=$?
25356   echo "$as_me:25356: \$? = $ac_status" >&5
25357   (exit "$ac_status"); } &&
25358          { ac_try='test -s "conftest$ac_exeext"'
25359   { (eval echo "$as_me:25359: \"$ac_try\"") >&5
25360   (eval $ac_try) 2>&5
25361   ac_status=$?
25362   echo "$as_me:25362: \$? = $ac_status" >&5
25363   (exit "$ac_status"); }; }; then
25364   cf_cxx_library=yes
25365
25366 cf_add_libs="$CXXLIBS"
25367 # reverse order
25368 cf_add_0lib=
25369 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25370 # filter duplicates
25371 for cf_add_1lib in $cf_add_0lib; do
25372         for cf_add_2lib in $cf_add_libs; do
25373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25374                         cf_add_1lib=
25375                         break
25376                 fi
25377         done
25378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25379 done
25380 CXXLIBS="$cf_add_libs"
25381
25382          if test "$cf_gpp_libname" = cpp ; then
25383
25384 cat >>confdefs.h <<\EOF
25385 #define HAVE_GPP_BUILTIN_H 1
25386 EOF
25387
25388          else
25389
25390 cat >>confdefs.h <<\EOF
25391 #define HAVE_GXX_BUILTIN_H 1
25392 EOF
25393
25394          fi
25395 else
25396   echo "$as_me: failed program was:" >&5
25397 cat "conftest.$ac_ext" >&5
25398 cat >"conftest.$ac_ext" <<_ACEOF
25399 #line 25399 "configure"
25400 #include "confdefs.h"
25401
25402 #include <builtin.h>
25403
25404 int
25405 main (void)
25406 {
25407 two_arg_error_handler_t foo2 = lib_error_handler
25408   ;
25409   return 0;
25410 }
25411 _ACEOF
25412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25413 if { (eval echo "$as_me:25413: \"$ac_link\"") >&5
25414   (eval $ac_link) 2>&5
25415   ac_status=$?
25416   echo "$as_me:25416: \$? = $ac_status" >&5
25417   (exit "$ac_status"); } &&
25418          { ac_try='test -s "conftest$ac_exeext"'
25419   { (eval echo "$as_me:25419: \"$ac_try\"") >&5
25420   (eval $ac_try) 2>&5
25421   ac_status=$?
25422   echo "$as_me:25422: \$? = $ac_status" >&5
25423   (exit "$ac_status"); }; }; then
25424   cf_cxx_library=yes
25425
25426 cf_add_libs="$CXXLIBS"
25427 # reverse order
25428 cf_add_0lib=
25429 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25430 # filter duplicates
25431 for cf_add_1lib in $cf_add_0lib; do
25432         for cf_add_2lib in $cf_add_libs; do
25433                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25434                         cf_add_1lib=
25435                         break
25436                 fi
25437         done
25438         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25439 done
25440 CXXLIBS="$cf_add_libs"
25441
25442 cat >>confdefs.h <<\EOF
25443 #define HAVE_BUILTIN_H 1
25444 EOF
25445
25446 else
25447   echo "$as_me: failed program was:" >&5
25448 cat "conftest.$ac_ext" >&5
25449 cf_cxx_library=no
25450 fi
25451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25452 fi
25453 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25454         LIBS="$cf_save"
25455         echo "$as_me:25455: result: $cf_cxx_library" >&5
25456 echo "${ECHO_T}$cf_cxx_library" >&6
25457 fi
25458
25459                 ;;
25460         (*)
25461                 cf_cxx_library=no
25462                 ;;
25463         esac
25464
25465         ac_ext=cc
25466 ac_cpp='$CXXCPP $CPPFLAGS'
25467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25468 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25470 ac_main_return="return"
25471 echo "$as_me:25471: checking how to run the C++ preprocessor" >&5
25472 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25473 if test -z "$CXXCPP"; then
25474   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25475   echo $ECHO_N "(cached) $ECHO_C" >&6
25476 else
25477       # Double quotes because CXXCPP needs to be expanded
25478     for CXXCPP in "$CXX -E" "/lib/cpp"
25479     do
25480       ac_preproc_ok=false
25481 for ac_cxx_preproc_warn_flag in '' yes
25482 do
25483   # Use a header file that comes with gcc, so configuring glibc
25484   # with a fresh cross-compiler works.
25485   # On the NeXT, cc -E runs the code through the compiler's parser,
25486   # not just through cpp. "Syntax error" is here to catch this case.
25487   cat >"conftest.$ac_ext" <<_ACEOF
25488 #line 25488 "configure"
25489 #include "confdefs.h"
25490 #include <assert.h>
25491                      Syntax error
25492 _ACEOF
25493 if { (eval echo "$as_me:25493: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25494   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25495   ac_status=$?
25496   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25497   rm -f conftest.er1
25498   cat conftest.err >&5
25499   echo "$as_me:25499: \$? = $ac_status" >&5
25500   (exit "$ac_status"); } >/dev/null; then
25501   if test -s conftest.err; then
25502     ac_cpp_err=$ac_cxx_preproc_warn_flag
25503   else
25504     ac_cpp_err=
25505   fi
25506 else
25507   ac_cpp_err=yes
25508 fi
25509 if test -z "$ac_cpp_err"; then
25510   :
25511 else
25512   echo "$as_me: failed program was:" >&5
25513   cat "conftest.$ac_ext" >&5
25514   # Broken: fails on valid input.
25515 continue
25516 fi
25517 rm -f conftest.err "conftest.$ac_ext"
25518
25519   # OK, works on sane cases.  Now check whether non-existent headers
25520   # can be detected and how.
25521   cat >"conftest.$ac_ext" <<_ACEOF
25522 #line 25522 "configure"
25523 #include "confdefs.h"
25524 #include <ac_nonexistent.h>
25525 _ACEOF
25526 if { (eval echo "$as_me:25526: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25527   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25528   ac_status=$?
25529   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25530   rm -f conftest.er1
25531   cat conftest.err >&5
25532   echo "$as_me:25532: \$? = $ac_status" >&5
25533   (exit "$ac_status"); } >/dev/null; then
25534   if test -s conftest.err; then
25535     ac_cpp_err=$ac_cxx_preproc_warn_flag
25536   else
25537     ac_cpp_err=
25538   fi
25539 else
25540   ac_cpp_err=yes
25541 fi
25542 if test -z "$ac_cpp_err"; then
25543   # Broken: success on invalid input.
25544 continue
25545 else
25546   echo "$as_me: failed program was:" >&5
25547   cat "conftest.$ac_ext" >&5
25548   # Passes both tests.
25549 ac_preproc_ok=:
25550 break
25551 fi
25552 rm -f conftest.err "conftest.$ac_ext"
25553
25554 done
25555 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25556 rm -f conftest.err "conftest.$ac_ext"
25557 if $ac_preproc_ok; then
25558   break
25559 fi
25560
25561     done
25562     ac_cv_prog_CXXCPP=$CXXCPP
25563
25564 fi
25565   CXXCPP=$ac_cv_prog_CXXCPP
25566 else
25567   ac_cv_prog_CXXCPP=$CXXCPP
25568 fi
25569 echo "$as_me:25569: result: $CXXCPP" >&5
25570 echo "${ECHO_T}$CXXCPP" >&6
25571 ac_preproc_ok=false
25572 for ac_cxx_preproc_warn_flag in '' yes
25573 do
25574   # Use a header file that comes with gcc, so configuring glibc
25575   # with a fresh cross-compiler works.
25576   # On the NeXT, cc -E runs the code through the compiler's parser,
25577   # not just through cpp. "Syntax error" is here to catch this case.
25578   cat >"conftest.$ac_ext" <<_ACEOF
25579 #line 25579 "configure"
25580 #include "confdefs.h"
25581 #include <assert.h>
25582                      Syntax error
25583 _ACEOF
25584 if { (eval echo "$as_me:25584: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25585   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25586   ac_status=$?
25587   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25588   rm -f conftest.er1
25589   cat conftest.err >&5
25590   echo "$as_me:25590: \$? = $ac_status" >&5
25591   (exit "$ac_status"); } >/dev/null; then
25592   if test -s conftest.err; then
25593     ac_cpp_err=$ac_cxx_preproc_warn_flag
25594   else
25595     ac_cpp_err=
25596   fi
25597 else
25598   ac_cpp_err=yes
25599 fi
25600 if test -z "$ac_cpp_err"; then
25601   :
25602 else
25603   echo "$as_me: failed program was:" >&5
25604   cat "conftest.$ac_ext" >&5
25605   # Broken: fails on valid input.
25606 continue
25607 fi
25608 rm -f conftest.err "conftest.$ac_ext"
25609
25610   # OK, works on sane cases.  Now check whether non-existent headers
25611   # can be detected and how.
25612   cat >"conftest.$ac_ext" <<_ACEOF
25613 #line 25613 "configure"
25614 #include "confdefs.h"
25615 #include <ac_nonexistent.h>
25616 _ACEOF
25617 if { (eval echo "$as_me:25617: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25618   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25619   ac_status=$?
25620   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25621   rm -f conftest.er1
25622   cat conftest.err >&5
25623   echo "$as_me:25623: \$? = $ac_status" >&5
25624   (exit "$ac_status"); } >/dev/null; then
25625   if test -s conftest.err; then
25626     ac_cpp_err=$ac_cxx_preproc_warn_flag
25627   else
25628     ac_cpp_err=
25629   fi
25630 else
25631   ac_cpp_err=yes
25632 fi
25633 if test -z "$ac_cpp_err"; then
25634   # Broken: success on invalid input.
25635 continue
25636 else
25637   echo "$as_me: failed program was:" >&5
25638   cat "conftest.$ac_ext" >&5
25639   # Passes both tests.
25640 ac_preproc_ok=:
25641 break
25642 fi
25643 rm -f conftest.err "conftest.$ac_ext"
25644
25645 done
25646 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25647 rm -f conftest.err "conftest.$ac_ext"
25648 if $ac_preproc_ok; then
25649   :
25650 else
25651   { { echo "$as_me:25651: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25652 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25653    { (exit 1); exit 1; }; }
25654 fi
25655
25656 ac_ext=cc
25657 ac_cpp='$CXXCPP $CPPFLAGS'
25658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25659 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25661 ac_main_return="return"
25662
25663 for ac_header in typeinfo
25664 do
25665 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25666 echo "$as_me:25666: checking for $ac_header" >&5
25667 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25668 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25669   echo $ECHO_N "(cached) $ECHO_C" >&6
25670 else
25671   cat >"conftest.$ac_ext" <<_ACEOF
25672 #line 25672 "configure"
25673 #include "confdefs.h"
25674 #include <$ac_header>
25675 _ACEOF
25676 if { (eval echo "$as_me:25676: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25677   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25678   ac_status=$?
25679   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25680   rm -f conftest.er1
25681   cat conftest.err >&5
25682   echo "$as_me:25682: \$? = $ac_status" >&5
25683   (exit "$ac_status"); } >/dev/null; then
25684   if test -s conftest.err; then
25685     ac_cpp_err=$ac_cxx_preproc_warn_flag
25686   else
25687     ac_cpp_err=
25688   fi
25689 else
25690   ac_cpp_err=yes
25691 fi
25692 if test -z "$ac_cpp_err"; then
25693   eval "$as_ac_Header=yes"
25694 else
25695   echo "$as_me: failed program was:" >&5
25696   cat "conftest.$ac_ext" >&5
25697   eval "$as_ac_Header=no"
25698 fi
25699 rm -f conftest.err "conftest.$ac_ext"
25700 fi
25701 echo "$as_me:25701: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25702 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25703 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25704   cat >>confdefs.h <<EOF
25705 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25706 EOF
25707
25708 fi
25709 done
25710
25711 for ac_header in iostream
25712 do
25713 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25714 echo "$as_me:25714: checking for $ac_header" >&5
25715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25717   echo $ECHO_N "(cached) $ECHO_C" >&6
25718 else
25719   cat >"conftest.$ac_ext" <<_ACEOF
25720 #line 25720 "configure"
25721 #include "confdefs.h"
25722 #include <$ac_header>
25723 _ACEOF
25724 if { (eval echo "$as_me:25724: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25725   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25726   ac_status=$?
25727   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25728   rm -f conftest.er1
25729   cat conftest.err >&5
25730   echo "$as_me:25730: \$? = $ac_status" >&5
25731   (exit "$ac_status"); } >/dev/null; then
25732   if test -s conftest.err; then
25733     ac_cpp_err=$ac_cxx_preproc_warn_flag
25734   else
25735     ac_cpp_err=
25736   fi
25737 else
25738   ac_cpp_err=yes
25739 fi
25740 if test -z "$ac_cpp_err"; then
25741   eval "$as_ac_Header=yes"
25742 else
25743   echo "$as_me: failed program was:" >&5
25744   cat "conftest.$ac_ext" >&5
25745   eval "$as_ac_Header=no"
25746 fi
25747 rm -f conftest.err "conftest.$ac_ext"
25748 fi
25749 echo "$as_me:25749: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25750 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25751 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25752   cat >>confdefs.h <<EOF
25753 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25754 EOF
25755
25756 fi
25757 done
25758
25759 if test x"$ac_cv_header_iostream" = xyes ; then
25760         echo "$as_me:25760: checking if iostream uses std-namespace" >&5
25761 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25762         cat >"conftest.$ac_ext" <<_ACEOF
25763 #line 25763 "configure"
25764 #include "confdefs.h"
25765
25766 #include <iostream>
25767 using std::endl;
25768 using std::cerr;
25769 int
25770 main (void)
25771 {
25772
25773 cerr << "testing" << endl;
25774
25775   ;
25776   return 0;
25777 }
25778 _ACEOF
25779 rm -f "conftest.$ac_objext"
25780 if { (eval echo "$as_me:25780: \"$ac_compile\"") >&5
25781   (eval $ac_compile) 2>&5
25782   ac_status=$?
25783   echo "$as_me:25783: \$? = $ac_status" >&5
25784   (exit "$ac_status"); } &&
25785          { ac_try='test -s "conftest.$ac_objext"'
25786   { (eval echo "$as_me:25786: \"$ac_try\"") >&5
25787   (eval $ac_try) 2>&5
25788   ac_status=$?
25789   echo "$as_me:25789: \$? = $ac_status" >&5
25790   (exit "$ac_status"); }; }; then
25791   cf_iostream_namespace=yes
25792 else
25793   echo "$as_me: failed program was:" >&5
25794 cat "conftest.$ac_ext" >&5
25795 cf_iostream_namespace=no
25796 fi
25797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25798         echo "$as_me:25798: result: $cf_iostream_namespace" >&5
25799 echo "${ECHO_T}$cf_iostream_namespace" >&6
25800         if test "$cf_iostream_namespace" = yes ; then
25801
25802 cat >>confdefs.h <<\EOF
25803 #define IOSTREAM_NAMESPACE 1
25804 EOF
25805
25806         fi
25807 fi
25808
25809 echo "$as_me:25809: checking if we should include stdbool.h" >&5
25810 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25811
25812 if test "${cf_cv_header_stdbool_h+set}" = set; then
25813   echo $ECHO_N "(cached) $ECHO_C" >&6
25814 else
25815
25816         cat >"conftest.$ac_ext" <<_ACEOF
25817 #line 25817 "configure"
25818 #include "confdefs.h"
25819
25820 int
25821 main (void)
25822 {
25823 bool foo = false
25824   ;
25825   return 0;
25826 }
25827 _ACEOF
25828 rm -f "conftest.$ac_objext"
25829 if { (eval echo "$as_me:25829: \"$ac_compile\"") >&5
25830   (eval $ac_compile) 2>&5
25831   ac_status=$?
25832   echo "$as_me:25832: \$? = $ac_status" >&5
25833   (exit "$ac_status"); } &&
25834          { ac_try='test -s "conftest.$ac_objext"'
25835   { (eval echo "$as_me:25835: \"$ac_try\"") >&5
25836   (eval $ac_try) 2>&5
25837   ac_status=$?
25838   echo "$as_me:25838: \$? = $ac_status" >&5
25839   (exit "$ac_status"); }; }; then
25840   cf_cv_header_stdbool_h=0
25841 else
25842   echo "$as_me: failed program was:" >&5
25843 cat "conftest.$ac_ext" >&5
25844 cat >"conftest.$ac_ext" <<_ACEOF
25845 #line 25845 "configure"
25846 #include "confdefs.h"
25847
25848 #ifndef __BEOS__
25849 #include <stdbool.h>
25850 #endif
25851
25852 int
25853 main (void)
25854 {
25855 bool foo = false
25856   ;
25857   return 0;
25858 }
25859 _ACEOF
25860 rm -f "conftest.$ac_objext"
25861 if { (eval echo "$as_me:25861: \"$ac_compile\"") >&5
25862   (eval $ac_compile) 2>&5
25863   ac_status=$?
25864   echo "$as_me:25864: \$? = $ac_status" >&5
25865   (exit "$ac_status"); } &&
25866          { ac_try='test -s "conftest.$ac_objext"'
25867   { (eval echo "$as_me:25867: \"$ac_try\"") >&5
25868   (eval $ac_try) 2>&5
25869   ac_status=$?
25870   echo "$as_me:25870: \$? = $ac_status" >&5
25871   (exit "$ac_status"); }; }; then
25872   cf_cv_header_stdbool_h=1
25873 else
25874   echo "$as_me: failed program was:" >&5
25875 cat "conftest.$ac_ext" >&5
25876 cf_cv_header_stdbool_h=0
25877 fi
25878 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25879 fi
25880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25881 fi
25882
25883 if test "$cf_cv_header_stdbool_h" = 1
25884 then    echo "$as_me:25884: result: yes" >&5
25885 echo "${ECHO_T}yes" >&6
25886 else    echo "$as_me:25886: result: no" >&5
25887 echo "${ECHO_T}no" >&6
25888 fi
25889
25890 echo "$as_me:25890: checking for builtin bool type" >&5
25891 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25892
25893 if test "${cf_cv_builtin_bool+set}" = set; then
25894   echo $ECHO_N "(cached) $ECHO_C" >&6
25895 else
25896
25897         cat >"conftest.$ac_ext" <<_ACEOF
25898 #line 25898 "configure"
25899 #include "confdefs.h"
25900
25901 #include <stdio.h>
25902 #include <sys/types.h>
25903
25904 int
25905 main (void)
25906 {
25907 bool x = false
25908   ;
25909   return 0;
25910 }
25911 _ACEOF
25912 rm -f "conftest.$ac_objext"
25913 if { (eval echo "$as_me:25913: \"$ac_compile\"") >&5
25914   (eval $ac_compile) 2>&5
25915   ac_status=$?
25916   echo "$as_me:25916: \$? = $ac_status" >&5
25917   (exit "$ac_status"); } &&
25918          { ac_try='test -s "conftest.$ac_objext"'
25919   { (eval echo "$as_me:25919: \"$ac_try\"") >&5
25920   (eval $ac_try) 2>&5
25921   ac_status=$?
25922   echo "$as_me:25922: \$? = $ac_status" >&5
25923   (exit "$ac_status"); }; }; then
25924   cf_cv_builtin_bool=1
25925 else
25926   echo "$as_me: failed program was:" >&5
25927 cat "conftest.$ac_ext" >&5
25928 cf_cv_builtin_bool=0
25929 fi
25930 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25931
25932 fi
25933
25934 if test "$cf_cv_builtin_bool" = 1
25935 then    echo "$as_me:25935: result: yes" >&5
25936 echo "${ECHO_T}yes" >&6
25937 else    echo "$as_me:25937: result: no" >&5
25938 echo "${ECHO_T}no" >&6
25939 fi
25940
25941 echo "$as_me:25941: checking for bool" >&5
25942 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25943 if test "${ac_cv_type_bool+set}" = set; then
25944   echo $ECHO_N "(cached) $ECHO_C" >&6
25945 else
25946   cat >"conftest.$ac_ext" <<_ACEOF
25947 #line 25947 "configure"
25948 #include "confdefs.h"
25949
25950 #include <stdlib.h>
25951 #include <stdio.h>
25952
25953 #if defined(__cplusplus)
25954
25955 #ifdef HAVE_GXX_BUILTIN_H
25956 #include <g++/builtin.h>
25957 #elif HAVE_GPP_BUILTIN_H
25958 #include <gpp/builtin.h>
25959 #elif HAVE_BUILTIN_H
25960 #include <builtin.h>
25961 #endif
25962
25963 #else
25964
25965 #if $cf_cv_header_stdbool_h
25966 #include <stdbool.h>
25967 #endif
25968
25969 #endif
25970
25971 int
25972 main (void)
25973 {
25974 if ((bool *) 0)
25975   return 0;
25976 if (sizeof (bool))
25977   return 0;
25978   ;
25979   return 0;
25980 }
25981 _ACEOF
25982 rm -f "conftest.$ac_objext"
25983 if { (eval echo "$as_me:25983: \"$ac_compile\"") >&5
25984   (eval $ac_compile) 2>&5
25985   ac_status=$?
25986   echo "$as_me:25986: \$? = $ac_status" >&5
25987   (exit "$ac_status"); } &&
25988          { ac_try='test -s "conftest.$ac_objext"'
25989   { (eval echo "$as_me:25989: \"$ac_try\"") >&5
25990   (eval $ac_try) 2>&5
25991   ac_status=$?
25992   echo "$as_me:25992: \$? = $ac_status" >&5
25993   (exit "$ac_status"); }; }; then
25994   ac_cv_type_bool=yes
25995 else
25996   echo "$as_me: failed program was:" >&5
25997 cat "conftest.$ac_ext" >&5
25998 ac_cv_type_bool=no
25999 fi
26000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26001 fi
26002 echo "$as_me:26002: result: $ac_cv_type_bool" >&5
26003 echo "${ECHO_T}$ac_cv_type_bool" >&6
26004
26005 echo "$as_me:26005: checking size of bool" >&5
26006 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26007 if test "${ac_cv_sizeof_bool+set}" = set; then
26008   echo $ECHO_N "(cached) $ECHO_C" >&6
26009 else
26010   if test "$ac_cv_type_bool" = yes; then
26011   if test "$cross_compiling" = yes; then
26012   # Depending upon the size, compute the lo and hi bounds.
26013 cat >"conftest.$ac_ext" <<_ACEOF
26014 #line 26014 "configure"
26015 #include "confdefs.h"
26016
26017 #include <stdlib.h>
26018 #include <stdio.h>
26019
26020 #if defined(__cplusplus)
26021
26022 #ifdef HAVE_GXX_BUILTIN_H
26023 #include <g++/builtin.h>
26024 #elif HAVE_GPP_BUILTIN_H
26025 #include <gpp/builtin.h>
26026 #elif HAVE_BUILTIN_H
26027 #include <builtin.h>
26028 #endif
26029
26030 #else
26031
26032 #if $cf_cv_header_stdbool_h
26033 #include <stdbool.h>
26034 #endif
26035
26036 #endif
26037
26038 int
26039 main (void)
26040 {
26041 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26042   ;
26043   return 0;
26044 }
26045 _ACEOF
26046 rm -f "conftest.$ac_objext"
26047 if { (eval echo "$as_me:26047: \"$ac_compile\"") >&5
26048   (eval $ac_compile) 2>&5
26049   ac_status=$?
26050   echo "$as_me:26050: \$? = $ac_status" >&5
26051   (exit "$ac_status"); } &&
26052          { ac_try='test -s "conftest.$ac_objext"'
26053   { (eval echo "$as_me:26053: \"$ac_try\"") >&5
26054   (eval $ac_try) 2>&5
26055   ac_status=$?
26056   echo "$as_me:26056: \$? = $ac_status" >&5
26057   (exit "$ac_status"); }; }; then
26058   ac_lo=0 ac_mid=0
26059   while :; do
26060     cat >"conftest.$ac_ext" <<_ACEOF
26061 #line 26061 "configure"
26062 #include "confdefs.h"
26063
26064 #include <stdlib.h>
26065 #include <stdio.h>
26066
26067 #if defined(__cplusplus)
26068
26069 #ifdef HAVE_GXX_BUILTIN_H
26070 #include <g++/builtin.h>
26071 #elif HAVE_GPP_BUILTIN_H
26072 #include <gpp/builtin.h>
26073 #elif HAVE_BUILTIN_H
26074 #include <builtin.h>
26075 #endif
26076
26077 #else
26078
26079 #if $cf_cv_header_stdbool_h
26080 #include <stdbool.h>
26081 #endif
26082
26083 #endif
26084
26085 int
26086 main (void)
26087 {
26088 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26089   ;
26090   return 0;
26091 }
26092 _ACEOF
26093 rm -f "conftest.$ac_objext"
26094 if { (eval echo "$as_me:26094: \"$ac_compile\"") >&5
26095   (eval $ac_compile) 2>&5
26096   ac_status=$?
26097   echo "$as_me:26097: \$? = $ac_status" >&5
26098   (exit "$ac_status"); } &&
26099          { ac_try='test -s "conftest.$ac_objext"'
26100   { (eval echo "$as_me:26100: \"$ac_try\"") >&5
26101   (eval $ac_try) 2>&5
26102   ac_status=$?
26103   echo "$as_me:26103: \$? = $ac_status" >&5
26104   (exit "$ac_status"); }; }; then
26105   ac_hi=$ac_mid; break
26106 else
26107   echo "$as_me: failed program was:" >&5
26108 cat "conftest.$ac_ext" >&5
26109 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26110 fi
26111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26112   done
26113 else
26114   echo "$as_me: failed program was:" >&5
26115 cat "conftest.$ac_ext" >&5
26116 ac_hi=-1 ac_mid=-1
26117   while :; do
26118     cat >"conftest.$ac_ext" <<_ACEOF
26119 #line 26119 "configure"
26120 #include "confdefs.h"
26121
26122 #include <stdlib.h>
26123 #include <stdio.h>
26124
26125 #if defined(__cplusplus)
26126
26127 #ifdef HAVE_GXX_BUILTIN_H
26128 #include <g++/builtin.h>
26129 #elif HAVE_GPP_BUILTIN_H
26130 #include <gpp/builtin.h>
26131 #elif HAVE_BUILTIN_H
26132 #include <builtin.h>
26133 #endif
26134
26135 #else
26136
26137 #if $cf_cv_header_stdbool_h
26138 #include <stdbool.h>
26139 #endif
26140
26141 #endif
26142
26143 int
26144 main (void)
26145 {
26146 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26147   ;
26148   return 0;
26149 }
26150 _ACEOF
26151 rm -f "conftest.$ac_objext"
26152 if { (eval echo "$as_me:26152: \"$ac_compile\"") >&5
26153   (eval $ac_compile) 2>&5
26154   ac_status=$?
26155   echo "$as_me:26155: \$? = $ac_status" >&5
26156   (exit "$ac_status"); } &&
26157          { ac_try='test -s "conftest.$ac_objext"'
26158   { (eval echo "$as_me:26158: \"$ac_try\"") >&5
26159   (eval $ac_try) 2>&5
26160   ac_status=$?
26161   echo "$as_me:26161: \$? = $ac_status" >&5
26162   (exit "$ac_status"); }; }; then
26163   ac_lo=$ac_mid; break
26164 else
26165   echo "$as_me: failed program was:" >&5
26166 cat "conftest.$ac_ext" >&5
26167 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26168 fi
26169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26170   done
26171 fi
26172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26173 # Binary search between lo and hi bounds.
26174 while test "x$ac_lo" != "x$ac_hi"; do
26175   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26176   cat >"conftest.$ac_ext" <<_ACEOF
26177 #line 26177 "configure"
26178 #include "confdefs.h"
26179
26180 #include <stdlib.h>
26181 #include <stdio.h>
26182
26183 #if defined(__cplusplus)
26184
26185 #ifdef HAVE_GXX_BUILTIN_H
26186 #include <g++/builtin.h>
26187 #elif HAVE_GPP_BUILTIN_H
26188 #include <gpp/builtin.h>
26189 #elif HAVE_BUILTIN_H
26190 #include <builtin.h>
26191 #endif
26192
26193 #else
26194
26195 #if $cf_cv_header_stdbool_h
26196 #include <stdbool.h>
26197 #endif
26198
26199 #endif
26200
26201 int
26202 main (void)
26203 {
26204 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26205   ;
26206   return 0;
26207 }
26208 _ACEOF
26209 rm -f "conftest.$ac_objext"
26210 if { (eval echo "$as_me:26210: \"$ac_compile\"") >&5
26211   (eval $ac_compile) 2>&5
26212   ac_status=$?
26213   echo "$as_me:26213: \$? = $ac_status" >&5
26214   (exit "$ac_status"); } &&
26215          { ac_try='test -s "conftest.$ac_objext"'
26216   { (eval echo "$as_me:26216: \"$ac_try\"") >&5
26217   (eval $ac_try) 2>&5
26218   ac_status=$?
26219   echo "$as_me:26219: \$? = $ac_status" >&5
26220   (exit "$ac_status"); }; }; then
26221   ac_hi=$ac_mid
26222 else
26223   echo "$as_me: failed program was:" >&5
26224 cat "conftest.$ac_ext" >&5
26225 ac_lo=`expr "$ac_mid" + 1`
26226 fi
26227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26228 done
26229 ac_cv_sizeof_bool=$ac_lo
26230 else
26231   if test "$cross_compiling" = yes; then
26232   { { echo "$as_me:26232: error: cannot run test program while cross compiling" >&5
26233 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26234    { (exit 1); exit 1; }; }
26235 else
26236   cat >"conftest.$ac_ext" <<_ACEOF
26237 #line 26237 "configure"
26238 #include "confdefs.h"
26239
26240 #include <stdlib.h>
26241 #include <stdio.h>
26242
26243 #if defined(__cplusplus)
26244
26245 #ifdef HAVE_GXX_BUILTIN_H
26246 #include <g++/builtin.h>
26247 #elif HAVE_GPP_BUILTIN_H
26248 #include <gpp/builtin.h>
26249 #elif HAVE_BUILTIN_H
26250 #include <builtin.h>
26251 #endif
26252
26253 #else
26254
26255 #if $cf_cv_header_stdbool_h
26256 #include <stdbool.h>
26257 #endif
26258
26259 #endif
26260
26261 int
26262 main (void)
26263 {
26264 FILE *f = fopen ("conftest.val", "w");
26265 if (!f)
26266   $ac_main_return (1);
26267 fprintf (f, "%ld", (long)(sizeof (bool)));
26268 fclose (f);
26269   ;
26270   return 0;
26271 }
26272 _ACEOF
26273 rm -f "conftest$ac_exeext"
26274 if { (eval echo "$as_me:26274: \"$ac_link\"") >&5
26275   (eval $ac_link) 2>&5
26276   ac_status=$?
26277   echo "$as_me:26277: \$? = $ac_status" >&5
26278   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26279   { (eval echo "$as_me:26279: \"$ac_try\"") >&5
26280   (eval $ac_try) 2>&5
26281   ac_status=$?
26282   echo "$as_me:26282: \$? = $ac_status" >&5
26283   (exit "$ac_status"); }; }; then
26284   ac_cv_sizeof_bool=`cat conftest.val`
26285 else
26286   echo "$as_me: program exited with status $ac_status" >&5
26287 echo "$as_me: failed program was:" >&5
26288 cat "conftest.$ac_ext" >&5
26289 fi
26290 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26291 fi
26292 fi
26293 rm -f conftest.val
26294 else
26295   ac_cv_sizeof_bool=0
26296 fi
26297 fi
26298 echo "$as_me:26298: result: $ac_cv_sizeof_bool" >&5
26299 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26300 cat >>confdefs.h <<EOF
26301 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26302 EOF
26303
26304 echo "$as_me:26304: checking for type of bool" >&5
26305 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26306 if test "${cf_cv_type_of_bool+set}" = set; then
26307   echo $ECHO_N "(cached) $ECHO_C" >&6
26308 else
26309
26310         rm -f cf_test.out
26311         if test "$cross_compiling" = yes; then
26312
26313                 case x$ac_cv_sizeof_bool in
26314                 (x1) cf_cv_type_of_bool="unsigned char";;
26315                 (x2) cf_cv_type_of_bool="unsigned short";;
26316                 (x4) cf_cv_type_of_bool="unsigned int";;
26317                 (x8) cf_cv_type_of_bool="unsigned long";;
26318                 (*)  cf_cv_type_of_bool=unknown;;
26319                 esac
26320
26321 else
26322   cat >"conftest.$ac_ext" <<_ACEOF
26323 #line 26323 "configure"
26324 #include "confdefs.h"
26325
26326 #include <stdlib.h>
26327 #include <stdio.h>
26328
26329 #if defined(__cplusplus)
26330
26331 #ifdef HAVE_GXX_BUILTIN_H
26332 #include <g++/builtin.h>
26333 #elif HAVE_GPP_BUILTIN_H
26334 #include <gpp/builtin.h>
26335 #elif HAVE_BUILTIN_H
26336 #include <builtin.h>
26337 #endif
26338
26339 #else
26340
26341 #if $cf_cv_header_stdbool_h
26342 #include <stdbool.h>
26343 #endif
26344
26345 #endif
26346
26347 int main(void)
26348 {
26349         FILE *fp = fopen("cf_test.out", "w");
26350         if (fp != 0) {
26351                 bool x = true;
26352                 if ((bool)(-x) >= 0)
26353                         fputs("unsigned ", fp);
26354                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26355                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26356                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26357                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26358                 fclose(fp);
26359         }
26360         ${cf_cv_main_return:-return}(0);
26361 }
26362
26363 _ACEOF
26364 rm -f "conftest$ac_exeext"
26365 if { (eval echo "$as_me:26365: \"$ac_link\"") >&5
26366   (eval $ac_link) 2>&5
26367   ac_status=$?
26368   echo "$as_me:26368: \$? = $ac_status" >&5
26369   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26370   { (eval echo "$as_me:26370: \"$ac_try\"") >&5
26371   (eval $ac_try) 2>&5
26372   ac_status=$?
26373   echo "$as_me:26373: \$? = $ac_status" >&5
26374   (exit "$ac_status"); }; }; then
26375   cf_cv_type_of_bool=`cat cf_test.out`
26376                  if test -z "$cf_cv_type_of_bool"; then
26377                    cf_cv_type_of_bool=unknown
26378                  fi
26379 else
26380   echo "$as_me: program exited with status $ac_status" >&5
26381 echo "$as_me: failed program was:" >&5
26382 cat "conftest.$ac_ext" >&5
26383 cf_cv_type_of_bool=unknown
26384 fi
26385 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26386 fi
26387         rm -f cf_test.out
26388
26389 fi
26390 echo "$as_me:26390: result: $cf_cv_type_of_bool" >&5
26391 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26392
26393 if test "$cf_cv_type_of_bool" = unknown ; then
26394         case .$NCURSES_BOOL in
26395         (.auto|.) NCURSES_BOOL=unsigned;;
26396         esac
26397         { echo "$as_me:26397: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26398 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26399         cf_cv_type_of_bool=$NCURSES_BOOL
26400 fi
26401
26402 echo "$as_me:26402: checking for special defines needed for etip.h" >&5
26403 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26404 cf_save_CXXFLAGS="$CXXFLAGS"
26405 cf_result="none"
26406
26407 # etip.h includes ncurses.h which includes ncurses_dll.h
26408 # But ncurses_dll.h is generated - fix here.
26409 test -d include || mkdir include
26410 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
26411
26412 for cf_math in "" MATH_H
26413 do
26414 for cf_excp in "" MATH_EXCEPTION
26415 do
26416         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26417         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26418         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26419 cat >"conftest.$ac_ext" <<_ACEOF
26420 #line 26420 "configure"
26421 #include "confdefs.h"
26422
26423 #include <etip.h.in>
26424
26425 int
26426 main (void)
26427 {
26428
26429   ;
26430   return 0;
26431 }
26432 _ACEOF
26433 rm -f "conftest.$ac_objext"
26434 if { (eval echo "$as_me:26434: \"$ac_compile\"") >&5
26435   (eval $ac_compile) 2>&5
26436   ac_status=$?
26437   echo "$as_me:26437: \$? = $ac_status" >&5
26438   (exit "$ac_status"); } &&
26439          { ac_try='test -s "conftest.$ac_objext"'
26440   { (eval echo "$as_me:26440: \"$ac_try\"") >&5
26441   (eval $ac_try) 2>&5
26442   ac_status=$?
26443   echo "$as_me:26443: \$? = $ac_status" >&5
26444   (exit "$ac_status"); }; }; then
26445
26446         test -n "$cf_math" && cat >>confdefs.h <<EOF
26447 #define ETIP_NEEDS_${cf_math} 1
26448 EOF
26449
26450         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26451 #define ETIP_NEEDS_${cf_excp} 1
26452 EOF
26453
26454         cf_result="$cf_math $cf_excp"
26455         break 2
26456
26457 else
26458   echo "$as_me: failed program was:" >&5
26459 cat "conftest.$ac_ext" >&5
26460 fi
26461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26462 done
26463 done
26464 echo "$as_me:26464: result: $cf_result" >&5
26465 echo "${ECHO_T}$cf_result" >&6
26466 CXXFLAGS="$cf_save_CXXFLAGS"
26467
26468 if test -n "$CXX"; then
26469 echo "$as_me:26469: checking if $CXX accepts override keyword" >&5
26470 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26471 if test "${cf_cv_cpp_override+set}" = set; then
26472   echo $ECHO_N "(cached) $ECHO_C" >&6
26473 else
26474
26475         ac_ext=cc
26476 ac_cpp='$CXXCPP $CPPFLAGS'
26477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26478 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26480 ac_main_return="return"
26481
26482         if test "$cross_compiling" = yes; then
26483   cf_cv_cpp_override=unknown
26484 else
26485   cat >"conftest.$ac_ext" <<_ACEOF
26486 #line 26486 "configure"
26487 #include "confdefs.h"
26488
26489 class base
26490 {
26491 public:
26492         virtual int foo(float x) = 0;
26493 };
26494
26495 class derived: public base
26496 {
26497 public:
26498         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26499 };
26500
26501 int main(void) { }
26502
26503 _ACEOF
26504 rm -f "conftest$ac_exeext"
26505 if { (eval echo "$as_me:26505: \"$ac_link\"") >&5
26506   (eval $ac_link) 2>&5
26507   ac_status=$?
26508   echo "$as_me:26508: \$? = $ac_status" >&5
26509   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26510   { (eval echo "$as_me:26510: \"$ac_try\"") >&5
26511   (eval $ac_try) 2>&5
26512   ac_status=$?
26513   echo "$as_me:26513: \$? = $ac_status" >&5
26514   (exit "$ac_status"); }; }; then
26515   cf_cv_cpp_override=yes
26516 else
26517   echo "$as_me: program exited with status $ac_status" >&5
26518 echo "$as_me: failed program was:" >&5
26519 cat "conftest.$ac_ext" >&5
26520 cf_cv_cpp_override=no
26521 fi
26522 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26523 fi
26524         ac_ext=cc
26525 ac_cpp='$CXXCPP $CPPFLAGS'
26526 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26527 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26528 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26529 ac_main_return="return"
26530
26531 fi
26532 echo "$as_me:26532: result: $cf_cv_cpp_override" >&5
26533 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26534 fi
26535 test "$cf_cv_cpp_override" = yes &&
26536 cat >>confdefs.h <<\EOF
26537 #define CPP_HAS_OVERRIDE 1
26538 EOF
26539
26540 if test -n "$CXX"; then
26541 echo "$as_me:26541: checking if $CXX accepts parameter initialization" >&5
26542 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26543 if test "${cf_cv_cpp_param_init+set}" = set; then
26544   echo $ECHO_N "(cached) $ECHO_C" >&6
26545 else
26546
26547         ac_ext=cc
26548 ac_cpp='$CXXCPP $CPPFLAGS'
26549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26550 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26552 ac_main_return="return"
26553
26554         if test "$cross_compiling" = yes; then
26555   cf_cv_cpp_param_init=unknown
26556 else
26557   cat >"conftest.$ac_ext" <<_ACEOF
26558 #line 26558 "configure"
26559 #include "confdefs.h"
26560
26561 class TEST {
26562 private:
26563         int value;
26564 public:
26565         TEST(int x = 1);
26566         ~TEST();
26567 };
26568
26569 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26570 {
26571         value = x;
26572 }
26573 int main(void) { }
26574
26575 _ACEOF
26576 rm -f "conftest$ac_exeext"
26577 if { (eval echo "$as_me:26577: \"$ac_link\"") >&5
26578   (eval $ac_link) 2>&5
26579   ac_status=$?
26580   echo "$as_me:26580: \$? = $ac_status" >&5
26581   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26582   { (eval echo "$as_me:26582: \"$ac_try\"") >&5
26583   (eval $ac_try) 2>&5
26584   ac_status=$?
26585   echo "$as_me:26585: \$? = $ac_status" >&5
26586   (exit "$ac_status"); }; }; then
26587   cf_cv_cpp_param_init=yes
26588 else
26589   echo "$as_me: program exited with status $ac_status" >&5
26590 echo "$as_me: failed program was:" >&5
26591 cat "conftest.$ac_ext" >&5
26592 cf_cv_cpp_param_init=no
26593 fi
26594 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26595 fi
26596         ac_ext=cc
26597 ac_cpp='$CXXCPP $CPPFLAGS'
26598 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26599 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26600 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26601 ac_main_return="return"
26602
26603 fi
26604 echo "$as_me:26604: result: $cf_cv_cpp_param_init" >&5
26605 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26606 fi
26607 test "$cf_cv_cpp_param_init" = yes &&
26608 cat >>confdefs.h <<\EOF
26609 #define CPP_HAS_PARAM_INIT 1
26610 EOF
26611
26612 if test -n "$CXX"; then
26613
26614 echo "$as_me:26614: checking if $CXX accepts static_cast" >&5
26615 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26616 if test "${cf_cv_cpp_static_cast+set}" = set; then
26617   echo $ECHO_N "(cached) $ECHO_C" >&6
26618 else
26619
26620         ac_ext=cc
26621 ac_cpp='$CXXCPP $CPPFLAGS'
26622 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26623 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26624 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26625 ac_main_return="return"
26626
26627         cat >"conftest.$ac_ext" <<_ACEOF
26628 #line 26628 "configure"
26629 #include "confdefs.h"
26630
26631 class NCursesPanel
26632 {
26633 public:
26634   NCursesPanel(int nlines,
26635                int ncols,
26636                int begin_y = 0,
26637                int begin_x = 0)
26638   {
26639   }
26640   NCursesPanel();
26641   ~NCursesPanel();
26642 };
26643
26644 template<class T> class NCursesUserPanel : public NCursesPanel
26645 {
26646 public:
26647   NCursesUserPanel (int nlines,
26648                     int ncols,
26649                     int begin_y = 0,
26650                     int begin_x = 0,
26651                     const T* p_UserData = static_cast<T*>(0))
26652     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26653   {
26654   };
26655   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26656   {
26657   };
26658
26659   virtual ~NCursesUserPanel() {};
26660 };
26661
26662 int
26663 main (void)
26664 {
26665
26666         const char* p_UserData = static_cast<char*>(0)
26667   ;
26668   return 0;
26669 }
26670 _ACEOF
26671 rm -f "conftest.$ac_objext"
26672 if { (eval echo "$as_me:26672: \"$ac_compile\"") >&5
26673   (eval $ac_compile) 2>&5
26674   ac_status=$?
26675   echo "$as_me:26675: \$? = $ac_status" >&5
26676   (exit "$ac_status"); } &&
26677          { ac_try='test -s "conftest.$ac_objext"'
26678   { (eval echo "$as_me:26678: \"$ac_try\"") >&5
26679   (eval $ac_try) 2>&5
26680   ac_status=$?
26681   echo "$as_me:26681: \$? = $ac_status" >&5
26682   (exit "$ac_status"); }; }; then
26683   cf_cv_cpp_static_cast=yes
26684 else
26685   echo "$as_me: failed program was:" >&5
26686 cat "conftest.$ac_ext" >&5
26687 cf_cv_cpp_static_cast=no
26688 fi
26689 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26690
26691         ac_ext=cc
26692 ac_cpp='$CXXCPP $CPPFLAGS'
26693 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26694 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26695 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26696 ac_main_return="return"
26697
26698 fi
26699 echo "$as_me:26699: result: $cf_cv_cpp_static_cast" >&5
26700 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26701
26702 fi
26703
26704 test "$cf_cv_cpp_static_cast" = yes &&
26705 cat >>confdefs.h <<\EOF
26706 #define CPP_HAS_STATIC_CAST 1
26707 EOF
26708
26709         CXX_AR='$(AR)'
26710         CXX_ARFLAGS='$(ARFLAGS)'
26711         case "$cf_cv_system_name" in
26712         (irix*)
26713             if test "$GXX" != yes ; then
26714                 CXX_AR='$(CXX)'
26715                 CXX_ARFLAGS='-ar -o'
26716             fi
26717             ;;
26718         (sco3.2v5*)
26719             CXXLDFLAGS="-u main"
26720             ;;
26721         (solaris2*)
26722             if test "$GXX" != yes ; then
26723                 CXX_AR='$(CXX)'
26724                 CXX_ARFLAGS='-xar -o'
26725             fi
26726             ;;
26727         esac
26728
26729 else
26730         cf_cxx_library=no
26731         cf_cv_builtin_bool=1
26732
26733         # Just because we are not configuring against C++ right now does not
26734         # mean that a user will not want to use C++.  Some distributors disable
26735         # the C++ portion of this configuration as a shortcut (or just to avoid
26736         # compiling the demo in the c++ directory).  So we need a reasonable
26737         # default for the 'bool' type.
26738         #
26739         # Caveat: since the storage of the bool type is not standardized, it
26740         # may change.
26741
26742         if test "$NCURSES_BOOL" != auto ; then
26743                 cf_cv_type_of_bool=$NCURSES_BOOL
26744                 cf_cv_header_stdbool_h=0
26745         else
26746                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26747
26748 echo "$as_me:26748: checking for bool" >&5
26749 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26750 if test "${ac_cv_type_bool+set}" = set; then
26751   echo $ECHO_N "(cached) $ECHO_C" >&6
26752 else
26753   cat >"conftest.$ac_ext" <<_ACEOF
26754 #line 26754 "configure"
26755 #include "confdefs.h"
26756
26757 #include <stdlib.h>
26758 #include <stdio.h>
26759
26760 #if defined(__cplusplus)
26761
26762 #ifdef HAVE_GXX_BUILTIN_H
26763 #include <g++/builtin.h>
26764 #elif HAVE_GPP_BUILTIN_H
26765 #include <gpp/builtin.h>
26766 #elif HAVE_BUILTIN_H
26767 #include <builtin.h>
26768 #endif
26769
26770 #else
26771
26772 #if $cf_cv_header_stdbool_h
26773 #include <stdbool.h>
26774 #endif
26775
26776 #endif
26777
26778 int
26779 main (void)
26780 {
26781 if ((bool *) 0)
26782   return 0;
26783 if (sizeof (bool))
26784   return 0;
26785   ;
26786   return 0;
26787 }
26788 _ACEOF
26789 rm -f "conftest.$ac_objext"
26790 if { (eval echo "$as_me:26790: \"$ac_compile\"") >&5
26791   (eval $ac_compile) 2>&5
26792   ac_status=$?
26793   echo "$as_me:26793: \$? = $ac_status" >&5
26794   (exit "$ac_status"); } &&
26795          { ac_try='test -s "conftest.$ac_objext"'
26796   { (eval echo "$as_me:26796: \"$ac_try\"") >&5
26797   (eval $ac_try) 2>&5
26798   ac_status=$?
26799   echo "$as_me:26799: \$? = $ac_status" >&5
26800   (exit "$ac_status"); }; }; then
26801   ac_cv_type_bool=yes
26802 else
26803   echo "$as_me: failed program was:" >&5
26804 cat "conftest.$ac_ext" >&5
26805 ac_cv_type_bool=no
26806 fi
26807 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26808 fi
26809 echo "$as_me:26809: result: $ac_cv_type_bool" >&5
26810 echo "${ECHO_T}$ac_cv_type_bool" >&6
26811
26812 echo "$as_me:26812: checking size of bool" >&5
26813 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26814 if test "${ac_cv_sizeof_bool+set}" = set; then
26815   echo $ECHO_N "(cached) $ECHO_C" >&6
26816 else
26817   if test "$ac_cv_type_bool" = yes; then
26818   if test "$cross_compiling" = yes; then
26819   # Depending upon the size, compute the lo and hi bounds.
26820 cat >"conftest.$ac_ext" <<_ACEOF
26821 #line 26821 "configure"
26822 #include "confdefs.h"
26823
26824 #include <stdlib.h>
26825 #include <stdio.h>
26826
26827 #if defined(__cplusplus)
26828
26829 #ifdef HAVE_GXX_BUILTIN_H
26830 #include <g++/builtin.h>
26831 #elif HAVE_GPP_BUILTIN_H
26832 #include <gpp/builtin.h>
26833 #elif HAVE_BUILTIN_H
26834 #include <builtin.h>
26835 #endif
26836
26837 #else
26838
26839 #if $cf_cv_header_stdbool_h
26840 #include <stdbool.h>
26841 #endif
26842
26843 #endif
26844
26845 int
26846 main (void)
26847 {
26848 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26849   ;
26850   return 0;
26851 }
26852 _ACEOF
26853 rm -f "conftest.$ac_objext"
26854 if { (eval echo "$as_me:26854: \"$ac_compile\"") >&5
26855   (eval $ac_compile) 2>&5
26856   ac_status=$?
26857   echo "$as_me:26857: \$? = $ac_status" >&5
26858   (exit "$ac_status"); } &&
26859          { ac_try='test -s "conftest.$ac_objext"'
26860   { (eval echo "$as_me:26860: \"$ac_try\"") >&5
26861   (eval $ac_try) 2>&5
26862   ac_status=$?
26863   echo "$as_me:26863: \$? = $ac_status" >&5
26864   (exit "$ac_status"); }; }; then
26865   ac_lo=0 ac_mid=0
26866   while :; do
26867     cat >"conftest.$ac_ext" <<_ACEOF
26868 #line 26868 "configure"
26869 #include "confdefs.h"
26870
26871 #include <stdlib.h>
26872 #include <stdio.h>
26873
26874 #if defined(__cplusplus)
26875
26876 #ifdef HAVE_GXX_BUILTIN_H
26877 #include <g++/builtin.h>
26878 #elif HAVE_GPP_BUILTIN_H
26879 #include <gpp/builtin.h>
26880 #elif HAVE_BUILTIN_H
26881 #include <builtin.h>
26882 #endif
26883
26884 #else
26885
26886 #if $cf_cv_header_stdbool_h
26887 #include <stdbool.h>
26888 #endif
26889
26890 #endif
26891
26892 int
26893 main (void)
26894 {
26895 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26896   ;
26897   return 0;
26898 }
26899 _ACEOF
26900 rm -f "conftest.$ac_objext"
26901 if { (eval echo "$as_me:26901: \"$ac_compile\"") >&5
26902   (eval $ac_compile) 2>&5
26903   ac_status=$?
26904   echo "$as_me:26904: \$? = $ac_status" >&5
26905   (exit "$ac_status"); } &&
26906          { ac_try='test -s "conftest.$ac_objext"'
26907   { (eval echo "$as_me:26907: \"$ac_try\"") >&5
26908   (eval $ac_try) 2>&5
26909   ac_status=$?
26910   echo "$as_me:26910: \$? = $ac_status" >&5
26911   (exit "$ac_status"); }; }; then
26912   ac_hi=$ac_mid; break
26913 else
26914   echo "$as_me: failed program was:" >&5
26915 cat "conftest.$ac_ext" >&5
26916 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26917 fi
26918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26919   done
26920 else
26921   echo "$as_me: failed program was:" >&5
26922 cat "conftest.$ac_ext" >&5
26923 ac_hi=-1 ac_mid=-1
26924   while :; do
26925     cat >"conftest.$ac_ext" <<_ACEOF
26926 #line 26926 "configure"
26927 #include "confdefs.h"
26928
26929 #include <stdlib.h>
26930 #include <stdio.h>
26931
26932 #if defined(__cplusplus)
26933
26934 #ifdef HAVE_GXX_BUILTIN_H
26935 #include <g++/builtin.h>
26936 #elif HAVE_GPP_BUILTIN_H
26937 #include <gpp/builtin.h>
26938 #elif HAVE_BUILTIN_H
26939 #include <builtin.h>
26940 #endif
26941
26942 #else
26943
26944 #if $cf_cv_header_stdbool_h
26945 #include <stdbool.h>
26946 #endif
26947
26948 #endif
26949
26950 int
26951 main (void)
26952 {
26953 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26954   ;
26955   return 0;
26956 }
26957 _ACEOF
26958 rm -f "conftest.$ac_objext"
26959 if { (eval echo "$as_me:26959: \"$ac_compile\"") >&5
26960   (eval $ac_compile) 2>&5
26961   ac_status=$?
26962   echo "$as_me:26962: \$? = $ac_status" >&5
26963   (exit "$ac_status"); } &&
26964          { ac_try='test -s "conftest.$ac_objext"'
26965   { (eval echo "$as_me:26965: \"$ac_try\"") >&5
26966   (eval $ac_try) 2>&5
26967   ac_status=$?
26968   echo "$as_me:26968: \$? = $ac_status" >&5
26969   (exit "$ac_status"); }; }; then
26970   ac_lo=$ac_mid; break
26971 else
26972   echo "$as_me: failed program was:" >&5
26973 cat "conftest.$ac_ext" >&5
26974 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26975 fi
26976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26977   done
26978 fi
26979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26980 # Binary search between lo and hi bounds.
26981 while test "x$ac_lo" != "x$ac_hi"; do
26982   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26983   cat >"conftest.$ac_ext" <<_ACEOF
26984 #line 26984 "configure"
26985 #include "confdefs.h"
26986
26987 #include <stdlib.h>
26988 #include <stdio.h>
26989
26990 #if defined(__cplusplus)
26991
26992 #ifdef HAVE_GXX_BUILTIN_H
26993 #include <g++/builtin.h>
26994 #elif HAVE_GPP_BUILTIN_H
26995 #include <gpp/builtin.h>
26996 #elif HAVE_BUILTIN_H
26997 #include <builtin.h>
26998 #endif
26999
27000 #else
27001
27002 #if $cf_cv_header_stdbool_h
27003 #include <stdbool.h>
27004 #endif
27005
27006 #endif
27007
27008 int
27009 main (void)
27010 {
27011 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27012   ;
27013   return 0;
27014 }
27015 _ACEOF
27016 rm -f "conftest.$ac_objext"
27017 if { (eval echo "$as_me:27017: \"$ac_compile\"") >&5
27018   (eval $ac_compile) 2>&5
27019   ac_status=$?
27020   echo "$as_me:27020: \$? = $ac_status" >&5
27021   (exit "$ac_status"); } &&
27022          { ac_try='test -s "conftest.$ac_objext"'
27023   { (eval echo "$as_me:27023: \"$ac_try\"") >&5
27024   (eval $ac_try) 2>&5
27025   ac_status=$?
27026   echo "$as_me:27026: \$? = $ac_status" >&5
27027   (exit "$ac_status"); }; }; then
27028   ac_hi=$ac_mid
27029 else
27030   echo "$as_me: failed program was:" >&5
27031 cat "conftest.$ac_ext" >&5
27032 ac_lo=`expr "$ac_mid" + 1`
27033 fi
27034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27035 done
27036 ac_cv_sizeof_bool=$ac_lo
27037 else
27038   if test "$cross_compiling" = yes; then
27039   { { echo "$as_me:27039: error: cannot run test program while cross compiling" >&5
27040 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27041    { (exit 1); exit 1; }; }
27042 else
27043   cat >"conftest.$ac_ext" <<_ACEOF
27044 #line 27044 "configure"
27045 #include "confdefs.h"
27046
27047 #include <stdlib.h>
27048 #include <stdio.h>
27049
27050 #if defined(__cplusplus)
27051
27052 #ifdef HAVE_GXX_BUILTIN_H
27053 #include <g++/builtin.h>
27054 #elif HAVE_GPP_BUILTIN_H
27055 #include <gpp/builtin.h>
27056 #elif HAVE_BUILTIN_H
27057 #include <builtin.h>
27058 #endif
27059
27060 #else
27061
27062 #if $cf_cv_header_stdbool_h
27063 #include <stdbool.h>
27064 #endif
27065
27066 #endif
27067
27068 int
27069 main (void)
27070 {
27071 FILE *f = fopen ("conftest.val", "w");
27072 if (!f)
27073   $ac_main_return (1);
27074 fprintf (f, "%ld", (long)(sizeof (bool)));
27075 fclose (f);
27076   ;
27077   return 0;
27078 }
27079 _ACEOF
27080 rm -f "conftest$ac_exeext"
27081 if { (eval echo "$as_me:27081: \"$ac_link\"") >&5
27082   (eval $ac_link) 2>&5
27083   ac_status=$?
27084   echo "$as_me:27084: \$? = $ac_status" >&5
27085   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27086   { (eval echo "$as_me:27086: \"$ac_try\"") >&5
27087   (eval $ac_try) 2>&5
27088   ac_status=$?
27089   echo "$as_me:27089: \$? = $ac_status" >&5
27090   (exit "$ac_status"); }; }; then
27091   ac_cv_sizeof_bool=`cat conftest.val`
27092 else
27093   echo "$as_me: program exited with status $ac_status" >&5
27094 echo "$as_me: failed program was:" >&5
27095 cat "conftest.$ac_ext" >&5
27096 fi
27097 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27098 fi
27099 fi
27100 rm -f conftest.val
27101 else
27102   ac_cv_sizeof_bool=0
27103 fi
27104 fi
27105 echo "$as_me:27105: result: $ac_cv_sizeof_bool" >&5
27106 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27107 cat >>confdefs.h <<EOF
27108 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27109 EOF
27110
27111 echo "$as_me:27111: checking for type of bool" >&5
27112 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27113 if test "${cf_cv_type_of_bool+set}" = set; then
27114   echo $ECHO_N "(cached) $ECHO_C" >&6
27115 else
27116
27117         rm -f cf_test.out
27118         if test "$cross_compiling" = yes; then
27119
27120                 case x$ac_cv_sizeof_bool in
27121                 (x1) cf_cv_type_of_bool="unsigned char";;
27122                 (x2) cf_cv_type_of_bool="unsigned short";;
27123                 (x4) cf_cv_type_of_bool="unsigned int";;
27124                 (x8) cf_cv_type_of_bool="unsigned long";;
27125                 (*)  cf_cv_type_of_bool=unknown;;
27126                 esac
27127
27128 else
27129   cat >"conftest.$ac_ext" <<_ACEOF
27130 #line 27130 "configure"
27131 #include "confdefs.h"
27132
27133 #include <stdlib.h>
27134 #include <stdio.h>
27135
27136 #if defined(__cplusplus)
27137
27138 #ifdef HAVE_GXX_BUILTIN_H
27139 #include <g++/builtin.h>
27140 #elif HAVE_GPP_BUILTIN_H
27141 #include <gpp/builtin.h>
27142 #elif HAVE_BUILTIN_H
27143 #include <builtin.h>
27144 #endif
27145
27146 #else
27147
27148 #if $cf_cv_header_stdbool_h
27149 #include <stdbool.h>
27150 #endif
27151
27152 #endif
27153
27154 int main(void)
27155 {
27156         FILE *fp = fopen("cf_test.out", "w");
27157         if (fp != 0) {
27158                 bool x = true;
27159                 if ((bool)(-x) >= 0)
27160                         fputs("unsigned ", fp);
27161                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27162                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27163                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27164                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27165                 fclose(fp);
27166         }
27167         ${cf_cv_main_return:-return}(0);
27168 }
27169
27170 _ACEOF
27171 rm -f "conftest$ac_exeext"
27172 if { (eval echo "$as_me:27172: \"$ac_link\"") >&5
27173   (eval $ac_link) 2>&5
27174   ac_status=$?
27175   echo "$as_me:27175: \$? = $ac_status" >&5
27176   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27177   { (eval echo "$as_me:27177: \"$ac_try\"") >&5
27178   (eval $ac_try) 2>&5
27179   ac_status=$?
27180   echo "$as_me:27180: \$? = $ac_status" >&5
27181   (exit "$ac_status"); }; }; then
27182   cf_cv_type_of_bool=`cat cf_test.out`
27183                  if test -z "$cf_cv_type_of_bool"; then
27184                    cf_cv_type_of_bool=unknown
27185                  fi
27186 else
27187   echo "$as_me: program exited with status $ac_status" >&5
27188 echo "$as_me: failed program was:" >&5
27189 cat "conftest.$ac_ext" >&5
27190 cf_cv_type_of_bool=unknown
27191 fi
27192 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27193 fi
27194         rm -f cf_test.out
27195
27196 fi
27197 echo "$as_me:27197: result: $cf_cv_type_of_bool" >&5
27198 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27199
27200 if test "$cf_cv_type_of_bool" = unknown ; then
27201         case .$NCURSES_BOOL in
27202         (.auto|.) NCURSES_BOOL=unsigned;;
27203         esac
27204         { echo "$as_me:27204: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27205 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27206         cf_cv_type_of_bool=$NCURSES_BOOL
27207 fi
27208
27209                 else
27210                         echo "$as_me:27210: checking for fallback type of bool" >&5
27211 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27212                         case "$host_cpu" in
27213                         (i?86)  cf_cv_type_of_bool=char ;;
27214                         (*)     cf_cv_type_of_bool=int  ;;
27215                         esac
27216                         echo "$as_me:27216: result: $cf_cv_type_of_bool" >&5
27217 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27218                 fi
27219         fi
27220 fi
27221
27222 # If the C compiler did not declare bool, and we did not determine that the C++
27223 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27224 # ncurses library use the same type as C++ bool.  Note that this allows one to
27225 # specify the type of bool in a configure-script option and postpone
27226 # integration with the C++ compiler provided that the types are compatible.
27227 USE_CXX_BOOL=1
27228 if test "$cf_cv_cc_bool_type" = 1
27229 then
27230         # oops: C has a bool.  Unlikely, but C++ could differ.
27231         USE_CXX_BOOL=0
27232 elif test "$cf_cv_builtin_bool" = 0
27233 then
27234         # C++ has no bool
27235         USE_CXX_BOOL=0
27236 else
27237         # this is the normal case
27238         USE_CXX_BOOL='defined(__cplusplus)'
27239 fi
27240
27241 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27242
27243         if test "$cf_with_ada" != "no" ; then
27244                 if test "$with_libtool" != "no"; then
27245                         { echo "$as_me:27245: WARNING: libtool does not support Ada - disabling feature" >&5
27246 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27247                         cf_with_ada=no
27248                 fi
27249         fi
27250
27251         if test "$cf_with_ada" != "no" ; then
27252
27253 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27254 do
27255
27256 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27257
27258         unset ac_cv_path_cf_TEMP_gnat
27259         unset cf_TEMP_gnat
27260         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27261 set dummy $cf_prog_gnat; ac_word=$2
27262 echo "$as_me:27262: checking for $ac_word" >&5
27263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27264 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27265   echo $ECHO_N "(cached) $ECHO_C" >&6
27266 else
27267   case $cf_TEMP_gnat in
27268   [\\/]* | ?:[\\/]*)
27269   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27270   ;;
27271   *)
27272   ac_save_IFS=$IFS; IFS=$ac_path_separator
27273 ac_dummy="$PATH"
27274 for ac_dir in $ac_dummy; do
27275   IFS=$ac_save_IFS
27276   test -z "$ac_dir" && ac_dir=.
27277   if $as_executable_p "$ac_dir/$ac_word"; then
27278    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27279    echo "$as_me:27279: found $ac_dir/$ac_word" >&5
27280    break
27281 fi
27282 done
27283
27284   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27285   ;;
27286 esac
27287 fi
27288 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27289
27290 if test -n "$cf_TEMP_gnat"; then
27291   echo "$as_me:27291: result: $cf_TEMP_gnat" >&5
27292 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27293 else
27294   echo "$as_me:27294: result: no" >&5
27295 echo "${ECHO_T}no" >&6
27296 fi
27297
27298         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27299
27300         if test "x$cf_TEMP_gnat" != xno; then
27301                 unset cf_cv_gnat_version
27302                 unset cf_TEMP_gnat
27303
27304 echo "$as_me:27304: checking for $cf_prog_gnat version" >&5
27305 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27306 if test "${cf_cv_gnat_version+set}" = set; then
27307   echo $ECHO_N "(cached) $ECHO_C" >&6
27308 else
27309
27310 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27311         grep '[0-9].[0-9][0-9]*' |\
27312         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27313
27314 fi
27315 echo "$as_me:27315: result: $cf_cv_gnat_version" >&5
27316 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27317 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27318 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27319
27320         fi
27321         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27322
27323         unset cf_TEMP_gnat
27324         unset cf_cv_gnat_version
27325         unset ac_cv_path_cf_TEMP_gnat
27326 done
27327
27328 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27329         cf_ada_make=
27330         cf_cv_prog_gnat_correct=no
27331 else
27332         cf_ada_make=gnatmake
27333         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27334                 # gprconfig is newer than gnatmake; we can continue...
27335                 cf_ada_config="##"
27336         else
27337                 rm -rf ./conftest* ./*~conftest*
27338                 if mkdir conftest.src
27339                 then
27340                         cf_ada_config=""
27341                         cd conftest.src
27342                         for cf_gprconfig in Ada C
27343                         do
27344                                 echo "$as_me:27344: checking for gprconfig name for $cf_gprconfig" >&5
27345 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27346                                 if test "$cf_gprconfig" = C
27347                                 then
27348                                         for cf_gprconfig_param in \
27349                                                 "$cf_gprconfig,,,,GNATGCC" \
27350                                                 "$cf_gprconfig,,,,GCC" \
27351                                                 "$cf_gprconfig"
27352                                         do
27353                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27354                                                 test -n "$cf_gprconfig_value" && break
27355                                         done
27356                                 else
27357                                         cf_gprconfig_param=$cf_gprconfig
27358                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27359                                 fi
27360                                 if test -n "$cf_gprconfig_value"
27361                                 then
27362                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27363                                         echo "$as_me:27363: result: $cf_gprconfig_value" >&5
27364 echo "${ECHO_T}$cf_gprconfig_value" >&6
27365                                 else
27366                                         echo "$as_me:27366: result: missing" >&5
27367 echo "${ECHO_T}missing" >&6
27368                                         cf_ada_config="#"
27369                                         break
27370                                 fi
27371                         done
27372                         cd ..
27373                         rm -rf ./conftest* ./*~conftest*
27374                 fi
27375         fi
27376         if test "x$cf_ada_config" != "x#"
27377         then
27378
27379 echo "$as_me:27379: checking for gnat version" >&5
27380 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27381 if test "${cf_cv_gnat_version+set}" = set; then
27382   echo $ECHO_N "(cached) $ECHO_C" >&6
27383 else
27384
27385 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27386         grep '[0-9].[0-9][0-9]*' |\
27387         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27388
27389 fi
27390 echo "$as_me:27390: result: $cf_cv_gnat_version" >&5
27391 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27392 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27393
27394 case "$cf_cv_gnat_version" in
27395 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27396         cf_cv_prog_gnat_correct=yes
27397         ;;
27398 (*)
27399         { echo "$as_me:27399: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27400 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27401         cf_cv_prog_gnat_correct=no
27402         ;;
27403 esac
27404
27405                 # Extract the first word of "m4", so it can be a program name with args.
27406 set dummy m4; ac_word=$2
27407 echo "$as_me:27407: checking for $ac_word" >&5
27408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27409 if test "${ac_cv_prog_M4_exists+set}" = set; then
27410   echo $ECHO_N "(cached) $ECHO_C" >&6
27411 else
27412   if test -n "$M4_exists"; then
27413   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27414 else
27415   ac_save_IFS=$IFS; IFS=$ac_path_separator
27416 ac_dummy="$PATH"
27417 for ac_dir in $ac_dummy; do
27418   IFS=$ac_save_IFS
27419   test -z "$ac_dir" && ac_dir=.
27420   $as_executable_p "$ac_dir/$ac_word" || continue
27421 ac_cv_prog_M4_exists="yes"
27422 echo "$as_me:27422: found $ac_dir/$ac_word" >&5
27423 break
27424 done
27425
27426   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27427 fi
27428 fi
27429 M4_exists=$ac_cv_prog_M4_exists
27430 if test -n "$M4_exists"; then
27431   echo "$as_me:27431: result: $M4_exists" >&5
27432 echo "${ECHO_T}$M4_exists" >&6
27433 else
27434   echo "$as_me:27434: result: no" >&5
27435 echo "${ECHO_T}no" >&6
27436 fi
27437
27438                 if test "$ac_cv_prog_M4_exists" = no; then
27439                         cf_cv_prog_gnat_correct=no
27440                         { echo "$as_me:27440: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27441 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27442                 fi
27443                 if test "$cf_cv_prog_gnat_correct" = yes; then
27444                         echo "$as_me:27444: checking if GNAT works" >&5
27445 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27446
27447 rm -rf ./conftest* ./*~conftest*
27448 cat >>conftest.ads <<CF_EOF
27449 procedure conftest;
27450 CF_EOF
27451 cat >>conftest.adb <<CF_EOF
27452 with Text_IO;
27453 with GNAT.OS_Lib;
27454 procedure conftest is
27455 begin
27456    Text_IO.Put ("Hello World");
27457    Text_IO.New_Line;
27458    GNAT.OS_Lib.OS_Exit (0);
27459 end conftest;
27460 CF_EOF
27461 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27462    if ( ./conftest 1>&5 2>&1 ) ; then
27463       cf_cv_prog_gnat_correct=yes
27464    else
27465       cf_cv_prog_gnat_correct=no
27466    fi
27467 else
27468    cf_cv_prog_gnat_correct=no
27469 fi
27470 rm -rf ./conftest* ./*~conftest*
27471
27472                         echo "$as_me:27472: result: $cf_cv_prog_gnat_correct" >&5
27473 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27474                 fi
27475         else
27476                 cf_cv_prog_gnat_correct=no
27477         fi
27478 fi
27479
27480                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27481
27482         ADAFLAGS="$ADAFLAGS -gnatpn"
27483
27484         echo "$as_me:27484: checking optimization options for ADAFLAGS" >&5
27485 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27486         case "$CFLAGS" in
27487         (*-g*)
27488
27489         ADAFLAGS="$ADAFLAGS -g"
27490
27491                 ;;
27492         esac
27493         case "$CFLAGS" in
27494         (*-O*)
27495                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27496
27497         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27498
27499                 ;;
27500         esac
27501         echo "$as_me:27501: result: $ADAFLAGS" >&5
27502 echo "${ECHO_T}$ADAFLAGS" >&6
27503
27504 echo "$as_me:27504: checking if GNATPREP supports -T option" >&5
27505 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27506 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27507   echo $ECHO_N "(cached) $ECHO_C" >&6
27508 else
27509
27510 cf_cv_gnatprep_opt_t=no
27511 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27512
27513 fi
27514 echo "$as_me:27514: result: $cf_cv_gnatprep_opt_t" >&5
27515 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27516 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27517
27518 echo "$as_me:27518: checking if GNAT supports generics" >&5
27519 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27520 case "$cf_cv_gnat_version" in
27521 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27522         cf_gnat_generics=yes
27523         ;;
27524 (*)
27525         cf_gnat_generics=no
27526         ;;
27527 esac
27528 echo "$as_me:27528: result: $cf_gnat_generics" >&5
27529 echo "${ECHO_T}$cf_gnat_generics" >&6
27530
27531 if test "$cf_gnat_generics" = yes
27532 then
27533         cf_compile_generics=generics
27534         cf_generic_objects="\${GENOBJS}"
27535 else
27536         cf_compile_generics=
27537         cf_generic_objects=
27538 fi
27539
27540 echo "$as_me:27540: checking if GNAT supports SIGINT" >&5
27541 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27542 if test "${cf_cv_gnat_sigint+set}" = set; then
27543   echo $ECHO_N "(cached) $ECHO_C" >&6
27544 else
27545
27546 rm -rf ./conftest* ./*~conftest*
27547 cat >>conftest.ads <<CF_EOF
27548 with Ada.Interrupts.Names;
27549
27550 package ConfTest is
27551
27552    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27553    pragma Unreserve_All_Interrupts;
27554    pragma Warnings (On);
27555
27556    protected Process is
27557       procedure Stop;
27558       function Continue return Boolean;
27559       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27560    private
27561       Done : Boolean := False;
27562    end Process;
27563
27564 end ConfTest;
27565 CF_EOF
27566 cat >>conftest.adb <<CF_EOF
27567 package body ConfTest is
27568    protected body Process is
27569       procedure Stop is
27570       begin
27571          Done := True;
27572       end Stop;
27573       function Continue return Boolean is
27574       begin
27575          return not Done;
27576       end Continue;
27577    end Process;
27578 end ConfTest;
27579 CF_EOF
27580 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27581       cf_cv_gnat_sigint=yes
27582 else
27583    cf_cv_gnat_sigint=no
27584 fi
27585 rm -rf ./conftest* ./*~conftest*
27586
27587 fi
27588 echo "$as_me:27588: result: $cf_cv_gnat_sigint" >&5
27589 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27590
27591 if test "$cf_cv_gnat_sigint" = yes ; then
27592         USE_GNAT_SIGINT=""
27593 else
27594         USE_GNAT_SIGINT="#"
27595 fi
27596
27597 cf_gnat_libraries=no
27598 cf_gnat_projects=no
27599
27600 if test "$enable_gnat_projects" != no ; then
27601 echo "$as_me:27601: checking if GNAT supports project files" >&5
27602 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27603 case "$cf_cv_gnat_version" in
27604 (3.[0-9]*)
27605         ;;
27606 (*)
27607         case "$cf_cv_system_name" in
27608         (cygwin*|msys*)
27609                 ;;
27610         (*)
27611                 rm -rf ./conftest* ./*~conftest*
27612                 if mkdir conftest.src conftest.bin conftest.lib
27613                 then
27614                         cd conftest.src
27615                         rm -rf ./conftest* ./*~conftest*
27616                         cat >>library.gpr <<CF_EOF
27617 project Library is
27618   Kind := External ("LIB_KIND");
27619   for Library_Name use "ConfTest";
27620   for Object_Dir use ".";
27621   for Library_ALI_Dir use External("LIBRARY_DIR");
27622   for Library_Version use External ("SONAME");
27623   for Library_Kind use Kind;
27624   for Library_Dir use External("BUILD_DIR");
27625   Source_Dir := External ("SOURCE_DIR");
27626   for Source_Dirs use (Source_Dir);
27627 end Library;
27628 CF_EOF
27629                         cat >>confpackage.ads <<CF_EOF
27630 package ConfPackage is
27631    procedure conftest;
27632 end ConfPackage;
27633 CF_EOF
27634                         cat >>confpackage.adb <<CF_EOF
27635 with Text_IO;
27636 package body ConfPackage is
27637    procedure conftest is
27638    begin
27639       Text_IO.Put ("Hello World");
27640       Text_IO.New_Line;
27641    end conftest;
27642 end ConfPackage;
27643 CF_EOF
27644                         if ( "$cf_ada_make" $ADAFLAGS \
27645                                         -Plibrary.gpr \
27646                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27647                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27648                                         -XSOURCE_DIR="`pwd`" \
27649                                         -XSONAME=libConfTest.so.1 \
27650                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27651                                 cf_gnat_projects=yes
27652                         fi
27653                         cd ..
27654                 fi
27655                 if test -f conftest.lib/confpackage.ali
27656                 then
27657                         cf_gnat_libraries=yes
27658                 fi
27659                 rm -rf ./conftest* ./*~conftest*
27660                 ;;
27661         esac
27662         ;;
27663 esac
27664 echo "$as_me:27664: result: $cf_gnat_projects" >&5
27665 echo "${ECHO_T}$cf_gnat_projects" >&6
27666 fi # enable_gnat_projects
27667
27668 if test "$cf_gnat_projects" = yes
27669 then
27670         echo "$as_me:27670: checking if GNAT supports libraries" >&5
27671 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27672         echo "$as_me:27672: result: $cf_gnat_libraries" >&5
27673 echo "${ECHO_T}$cf_gnat_libraries" >&6
27674 fi
27675
27676 USE_OLD_MAKERULES=""
27677 USE_GNAT_PROJECTS="#"
27678 USE_GNAT_MAKE_GPR="#"
27679 USE_GNAT_GPRBUILD="#"
27680
27681 if test "$cf_gnat_projects" = yes
27682 then
27683         USE_OLD_MAKERULES="#"
27684         USE_GNAT_PROJECTS=""
27685         if test "$cf_cv_VERSION_GPRBUILD" != no
27686         then
27687                 USE_GNAT_GPRBUILD=""
27688         elif test "$cf_cv_VERSION_GNATMAKE" != no
27689         then
27690                 USE_GNAT_MAKE_GPR=""
27691         else
27692                 { echo "$as_me:27692: WARNING: use old makefile rules since tools are missing" >&5
27693 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27694         fi
27695 fi
27696
27697 if test "$cf_gnat_libraries" = yes
27698 then
27699         USE_GNAT_LIBRARIES=""
27700 else
27701         USE_GNAT_LIBRARIES="#"
27702 fi
27703
27704 echo "$as_me:27704: checking for ada-compiler" >&5
27705 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27706
27707 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27708 if test "${with_ada_compiler+set}" = set; then
27709   withval="$with_ada_compiler"
27710   cf_ada_compiler=$withval
27711 else
27712   cf_ada_compiler=gnatmake
27713 fi;
27714
27715 echo "$as_me:27715: result: $cf_ada_compiler" >&5
27716 echo "${ECHO_T}$cf_ada_compiler" >&6
27717
27718                         cf_ada_package=terminal_interface
27719
27720 echo "$as_me:27720: checking for ada-include" >&5
27721 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27722
27723 # Check whether --with-ada-include or --without-ada-include was given.
27724 if test "${with_ada_include+set}" = set; then
27725   withval="$with_ada_include"
27726
27727 else
27728   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27729 fi; if test -n "$prefix/share/ada/adainclude" ; then
27730
27731 if test "x$prefix" != xNONE; then
27732         cf_path_syntax="$prefix"
27733 else
27734         cf_path_syntax="$ac_default_prefix"
27735 fi
27736
27737 case ".$withval" in
27738 (.\$\(*\)*|.\'*\'*)
27739         ;;
27740 (..|./*|.\\*)
27741         ;;
27742 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27743         ;;
27744 (.\$\{*prefix\}*|.\$\{*dir\}*)
27745         eval withval="$withval"
27746         case ".$withval" in
27747         (.NONE/*)
27748                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27749                 ;;
27750         esac
27751         ;;
27752 (.no|.NONE/*)
27753         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27754         ;;
27755 (*)
27756         { { echo "$as_me:27756: error: expected a pathname, not \"$withval\"" >&5
27757 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27758    { (exit 1); exit 1; }; }
27759         ;;
27760 esac
27761
27762 fi
27763 eval ADA_INCLUDE="$withval"
27764
27765 echo "$as_me:27765: result: $ADA_INCLUDE" >&5
27766 echo "${ECHO_T}$ADA_INCLUDE" >&6
27767
27768 echo "$as_me:27768: checking for ada-objects" >&5
27769 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27770
27771 # Check whether --with-ada-objects or --without-ada-objects was given.
27772 if test "${with_ada_objects+set}" = set; then
27773   withval="$with_ada_objects"
27774
27775 else
27776   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27777 fi; if test -n "$prefix/lib/ada/adalib" ; then
27778
27779 if test "x$prefix" != xNONE; then
27780         cf_path_syntax="$prefix"
27781 else
27782         cf_path_syntax="$ac_default_prefix"
27783 fi
27784
27785 case ".$withval" in
27786 (.\$\(*\)*|.\'*\'*)
27787         ;;
27788 (..|./*|.\\*)
27789         ;;
27790 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27791         ;;
27792 (.\$\{*prefix\}*|.\$\{*dir\}*)
27793         eval withval="$withval"
27794         case ".$withval" in
27795         (.NONE/*)
27796                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27797                 ;;
27798         esac
27799         ;;
27800 (.no|.NONE/*)
27801         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27802         ;;
27803 (*)
27804         { { echo "$as_me:27804: error: expected a pathname, not \"$withval\"" >&5
27805 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27806    { (exit 1); exit 1; }; }
27807         ;;
27808 esac
27809
27810 fi
27811 eval ADA_OBJECTS="$withval"
27812
27813 echo "$as_me:27813: result: $ADA_OBJECTS" >&5
27814 echo "${ECHO_T}$ADA_OBJECTS" >&6
27815
27816 echo "$as_me:27816: checking if an Ada95 shared-library should be built" >&5
27817 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27818
27819 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27820 if test "${with_ada_sharedlib+set}" = set; then
27821   withval="$with_ada_sharedlib"
27822   with_ada_sharedlib=$withval
27823 else
27824   with_ada_sharedlib=no
27825 fi;
27826 echo "$as_me:27826: result: $with_ada_sharedlib" >&5
27827 echo "${ECHO_T}$with_ada_sharedlib" >&6
27828
27829 if test "x$with_ada_sharedlib" != xno
27830 then
27831         if test "x$cf_gnat_projects" != xyes
27832         then
27833                 { echo "$as_me:27833: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27834 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27835                 with_ada_sharedlib=no
27836         fi
27837 fi
27838
27839 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27840 MAKE_ADA_SHAREDLIB="#"
27841
27842 if test "x$with_ada_sharedlib" != xno
27843 then
27844         MAKE_ADA_SHAREDLIB=
27845         if test "x$with_ada_sharedlib" != xyes
27846         then
27847                 ADA_SHAREDLIB="$with_ada_sharedlib"
27848         fi
27849 fi
27850
27851                         # allow the Ada binding to be renamed
27852
27853 echo "$as_me:27853: checking for ada-libname" >&5
27854 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27855
27856 # Check whether --with-ada-libname or --without-ada-libname was given.
27857 if test "${with_ada_libname+set}" = set; then
27858   withval="$with_ada_libname"
27859   ADA_LIBNAME=$withval
27860 else
27861   ADA_LIBNAME=AdaCurses
27862 fi;
27863 case "x$ADA_LIBNAME" in
27864 (x|xyes|xno)
27865         ADA_LIBNAME=AdaCurses
27866         ;;
27867 esac
27868
27869 echo "$as_me:27869: result: $ADA_LIBNAME" >&5
27870 echo "${ECHO_T}$ADA_LIBNAME" >&6
27871
27872                 fi
27873         fi
27874 else
27875         cf_with_ada=no
27876 fi
27877
27878 # do this "late" to avoid conflict with header-checks
27879 if test "x$with_widec" = xyes ; then
27880         echo "$as_me:27880: checking for wchar_t" >&5
27881 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27882 if test "${ac_cv_type_wchar_t+set}" = set; then
27883   echo $ECHO_N "(cached) $ECHO_C" >&6
27884 else
27885   cat >"conftest.$ac_ext" <<_ACEOF
27886 #line 27886 "configure"
27887 #include "confdefs.h"
27888 $ac_includes_default
27889 int
27890 main (void)
27891 {
27892 if ((wchar_t *) 0)
27893   return 0;
27894 if (sizeof (wchar_t))
27895   return 0;
27896   ;
27897   return 0;
27898 }
27899 _ACEOF
27900 rm -f "conftest.$ac_objext"
27901 if { (eval echo "$as_me:27901: \"$ac_compile\"") >&5
27902   (eval $ac_compile) 2>&5
27903   ac_status=$?
27904   echo "$as_me:27904: \$? = $ac_status" >&5
27905   (exit "$ac_status"); } &&
27906          { ac_try='test -s "conftest.$ac_objext"'
27907   { (eval echo "$as_me:27907: \"$ac_try\"") >&5
27908   (eval $ac_try) 2>&5
27909   ac_status=$?
27910   echo "$as_me:27910: \$? = $ac_status" >&5
27911   (exit "$ac_status"); }; }; then
27912   ac_cv_type_wchar_t=yes
27913 else
27914   echo "$as_me: failed program was:" >&5
27915 cat "conftest.$ac_ext" >&5
27916 ac_cv_type_wchar_t=no
27917 fi
27918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27919 fi
27920 echo "$as_me:27920: result: $ac_cv_type_wchar_t" >&5
27921 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27922
27923 echo "$as_me:27923: checking size of wchar_t" >&5
27924 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27925 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27926   echo $ECHO_N "(cached) $ECHO_C" >&6
27927 else
27928   if test "$ac_cv_type_wchar_t" = yes; then
27929   if test "$cross_compiling" = yes; then
27930   # Depending upon the size, compute the lo and hi bounds.
27931 cat >"conftest.$ac_ext" <<_ACEOF
27932 #line 27932 "configure"
27933 #include "confdefs.h"
27934 $ac_includes_default
27935 int
27936 main (void)
27937 {
27938 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27939   ;
27940   return 0;
27941 }
27942 _ACEOF
27943 rm -f "conftest.$ac_objext"
27944 if { (eval echo "$as_me:27944: \"$ac_compile\"") >&5
27945   (eval $ac_compile) 2>&5
27946   ac_status=$?
27947   echo "$as_me:27947: \$? = $ac_status" >&5
27948   (exit "$ac_status"); } &&
27949          { ac_try='test -s "conftest.$ac_objext"'
27950   { (eval echo "$as_me:27950: \"$ac_try\"") >&5
27951   (eval $ac_try) 2>&5
27952   ac_status=$?
27953   echo "$as_me:27953: \$? = $ac_status" >&5
27954   (exit "$ac_status"); }; }; then
27955   ac_lo=0 ac_mid=0
27956   while :; do
27957     cat >"conftest.$ac_ext" <<_ACEOF
27958 #line 27958 "configure"
27959 #include "confdefs.h"
27960 $ac_includes_default
27961 int
27962 main (void)
27963 {
27964 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27965   ;
27966   return 0;
27967 }
27968 _ACEOF
27969 rm -f "conftest.$ac_objext"
27970 if { (eval echo "$as_me:27970: \"$ac_compile\"") >&5
27971   (eval $ac_compile) 2>&5
27972   ac_status=$?
27973   echo "$as_me:27973: \$? = $ac_status" >&5
27974   (exit "$ac_status"); } &&
27975          { ac_try='test -s "conftest.$ac_objext"'
27976   { (eval echo "$as_me:27976: \"$ac_try\"") >&5
27977   (eval $ac_try) 2>&5
27978   ac_status=$?
27979   echo "$as_me:27979: \$? = $ac_status" >&5
27980   (exit "$ac_status"); }; }; then
27981   ac_hi=$ac_mid; break
27982 else
27983   echo "$as_me: failed program was:" >&5
27984 cat "conftest.$ac_ext" >&5
27985 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27986 fi
27987 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27988   done
27989 else
27990   echo "$as_me: failed program was:" >&5
27991 cat "conftest.$ac_ext" >&5
27992 ac_hi=-1 ac_mid=-1
27993   while :; do
27994     cat >"conftest.$ac_ext" <<_ACEOF
27995 #line 27995 "configure"
27996 #include "confdefs.h"
27997 $ac_includes_default
27998 int
27999 main (void)
28000 {
28001 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28002   ;
28003   return 0;
28004 }
28005 _ACEOF
28006 rm -f "conftest.$ac_objext"
28007 if { (eval echo "$as_me:28007: \"$ac_compile\"") >&5
28008   (eval $ac_compile) 2>&5
28009   ac_status=$?
28010   echo "$as_me:28010: \$? = $ac_status" >&5
28011   (exit "$ac_status"); } &&
28012          { ac_try='test -s "conftest.$ac_objext"'
28013   { (eval echo "$as_me:28013: \"$ac_try\"") >&5
28014   (eval $ac_try) 2>&5
28015   ac_status=$?
28016   echo "$as_me:28016: \$? = $ac_status" >&5
28017   (exit "$ac_status"); }; }; then
28018   ac_lo=$ac_mid; break
28019 else
28020   echo "$as_me: failed program was:" >&5
28021 cat "conftest.$ac_ext" >&5
28022 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28023 fi
28024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28025   done
28026 fi
28027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28028 # Binary search between lo and hi bounds.
28029 while test "x$ac_lo" != "x$ac_hi"; do
28030   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28031   cat >"conftest.$ac_ext" <<_ACEOF
28032 #line 28032 "configure"
28033 #include "confdefs.h"
28034 $ac_includes_default
28035 int
28036 main (void)
28037 {
28038 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28039   ;
28040   return 0;
28041 }
28042 _ACEOF
28043 rm -f "conftest.$ac_objext"
28044 if { (eval echo "$as_me:28044: \"$ac_compile\"") >&5
28045   (eval $ac_compile) 2>&5
28046   ac_status=$?
28047   echo "$as_me:28047: \$? = $ac_status" >&5
28048   (exit "$ac_status"); } &&
28049          { ac_try='test -s "conftest.$ac_objext"'
28050   { (eval echo "$as_me:28050: \"$ac_try\"") >&5
28051   (eval $ac_try) 2>&5
28052   ac_status=$?
28053   echo "$as_me:28053: \$? = $ac_status" >&5
28054   (exit "$ac_status"); }; }; then
28055   ac_hi=$ac_mid
28056 else
28057   echo "$as_me: failed program was:" >&5
28058 cat "conftest.$ac_ext" >&5
28059 ac_lo=`expr "$ac_mid" + 1`
28060 fi
28061 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28062 done
28063 ac_cv_sizeof_wchar_t=$ac_lo
28064 else
28065   if test "$cross_compiling" = yes; then
28066   { { echo "$as_me:28066: error: cannot run test program while cross compiling" >&5
28067 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28068    { (exit 1); exit 1; }; }
28069 else
28070   cat >"conftest.$ac_ext" <<_ACEOF
28071 #line 28071 "configure"
28072 #include "confdefs.h"
28073 $ac_includes_default
28074 int
28075 main (void)
28076 {
28077 FILE *f = fopen ("conftest.val", "w");
28078 if (!f)
28079   $ac_main_return (1);
28080 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28081 fclose (f);
28082   ;
28083   return 0;
28084 }
28085 _ACEOF
28086 rm -f "conftest$ac_exeext"
28087 if { (eval echo "$as_me:28087: \"$ac_link\"") >&5
28088   (eval $ac_link) 2>&5
28089   ac_status=$?
28090   echo "$as_me:28090: \$? = $ac_status" >&5
28091   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28092   { (eval echo "$as_me:28092: \"$ac_try\"") >&5
28093   (eval $ac_try) 2>&5
28094   ac_status=$?
28095   echo "$as_me:28095: \$? = $ac_status" >&5
28096   (exit "$ac_status"); }; }; then
28097   ac_cv_sizeof_wchar_t=`cat conftest.val`
28098 else
28099   echo "$as_me: program exited with status $ac_status" >&5
28100 echo "$as_me: failed program was:" >&5
28101 cat "conftest.$ac_ext" >&5
28102 fi
28103 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28104 fi
28105 fi
28106 rm -f conftest.val
28107 else
28108   ac_cv_sizeof_wchar_t=0
28109 fi
28110 fi
28111 echo "$as_me:28111: result: $ac_cv_sizeof_wchar_t" >&5
28112 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28113 cat >>confdefs.h <<EOF
28114 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28115 EOF
28116
28117         # cross-compiling to mingw can run into the problem that attempting to
28118         # link with the regex library fails, causing the test to not set this to
28119         # a number.  "recent" autoconf does not address this problem either -TD
28120         if test -z "$ac_cv_sizeof_wchar_t"
28121         then
28122                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28123
28124 echo "${as_me:-configure}:28124: testing test failed (assume 2) ..." 1>&5
28125
28126                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28127                 mv confdefs.tmp confdefs.h
28128                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28129         fi
28130 fi
28131
28132 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28133 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28134 ###
28135 ### ticlib modules may be a separate library, otherwise contained in termlib.
28136 ### termlib modules may be a separate library, otherwise contained in ncurses.
28137 ###
28138 ### The of "+" or " " between the tokens controls the way the script
28139 ### chooses to split module lists into libraries.
28140 ###
28141 ### (see CF_LIB_RULES).
28142 echo "$as_me:28142: checking for library subsets" >&5
28143 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28144 LIB_SUBSETS=
28145
28146 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28147         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28148         if test "$with_ticlib" != no ; then
28149                 LIB_SUBSETS="${LIB_SUBSETS} "
28150         else
28151                 LIB_SUBSETS="${LIB_SUBSETS}+"
28152         fi
28153 fi
28154
28155 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28156 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28157
28158 if test "$with_termlib" != no ; then
28159         LIB_SUBSETS="${LIB_SUBSETS} "
28160 else
28161         LIB_SUBSETS="${LIB_SUBSETS}+"
28162 fi
28163
28164 LIB_SUBSETS="${LIB_SUBSETS}base"
28165
28166 # Most term-driver calls are to tinfo, but some like init_pair are to the
28167 # base library (so it resides in base).
28168 if test "$with_term_driver" != no ; then
28169         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28170         case "$cf_cv_system_name" in
28171         (*mingw32*|*mingw64*)
28172                 if test "x$with_exp_win32" = xyes ; then
28173                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28174                 else
28175                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28176                 fi
28177                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28178                 ;;
28179         (*)
28180                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28181                 ;;
28182         esac
28183 elif test "x$with_exp_win32" = xyes ; then
28184         case "$cf_cv_system_name" in
28185         (*mingw32*|*mingw64*)
28186                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28187                 ;;
28188         (*)
28189                 ;;
28190         esac
28191 fi
28192
28193 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28194 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28195
28196 echo "$as_me:28196: result: $LIB_SUBSETS" >&5
28197 echo "${ECHO_T}$LIB_SUBSETS" >&6
28198
28199 ### Construct the list of include-directories to be generated
28200
28201 if test "$srcdir" != "."; then
28202         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28203 fi
28204 CPPFLAGS="-I../include $CPPFLAGS"
28205 if test "$srcdir" != "."; then
28206         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28207 fi
28208 CPPFLAGS="-I. $CPPFLAGS"
28209
28210 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28211 if test "$srcdir" != "."; then
28212         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28213 fi
28214 if test "$GCC" != yes; then
28215         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28216 elif test "$includedir" != "/usr/include"; then
28217         if test "$includedir" = '${prefix}/include' ; then
28218                 if test x$prefix != x/usr ; then
28219                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28220                 fi
28221         else
28222                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28223         fi
28224 fi
28225
28226 ### Build up pieces for makefile rules
28227 echo "$as_me:28227: checking default library suffix" >&5
28228 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28229
28230         case $DFT_LWR_MODEL in
28231         (libtool) DFT_ARG_SUFFIX=''   ;;
28232         (normal)  DFT_ARG_SUFFIX=''   ;;
28233         (debug)   DFT_ARG_SUFFIX='_g' ;;
28234         (profile) DFT_ARG_SUFFIX='_p' ;;
28235         (shared)  DFT_ARG_SUFFIX=''   ;;
28236         esac
28237         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28238 echo "$as_me:28238: result: $DFT_ARG_SUFFIX" >&5
28239 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28240
28241 echo "$as_me:28241: checking default library-dependency suffix" >&5
28242 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28243
28244         case X$DFT_LWR_MODEL in
28245         (Xlibtool)
28246                 DFT_LIB_SUFFIX='.la'
28247                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28248                 ;;
28249         (Xdebug)
28250                 case "$cf_cv_system_name" in
28251                 (*-msvc*)
28252                         DFT_LIB_SUFFIX='_g.lib'
28253                         ;;
28254                 (*)
28255                         DFT_LIB_SUFFIX='_g.a'
28256                         ;;
28257                 esac
28258                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28259                 ;;
28260         (Xprofile)
28261                 case "$cf_cv_system_name" in
28262                 (*-msvc*)
28263                         DFT_LIB_SUFFIX='_p.lib'
28264                         ;;
28265                 (*)
28266                         DFT_LIB_SUFFIX='_p.a'
28267                         ;;
28268                 esac
28269                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28270                 ;;
28271         (Xshared)
28272                 case "$cf_cv_system_name" in
28273                 (aix[5-7]*)
28274                         DFT_LIB_SUFFIX='.so'
28275                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28276                         ;;
28277                 (*-msvc*)
28278                         DFT_LIB_SUFFIX='.dll'
28279                         DFT_DEP_SUFFIX='.dll.lib'
28280                         ;;
28281                 (cygwin*|msys*|mingw*)
28282                         DFT_LIB_SUFFIX='.dll'
28283                         DFT_DEP_SUFFIX='.dll.a'
28284                         ;;
28285                 (darwin*)
28286                         DFT_LIB_SUFFIX='.dylib'
28287                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28288                         ;;
28289                 (hpux*)
28290                         case "$target" in
28291                         (ia64*)
28292                                 DFT_LIB_SUFFIX='.so'
28293                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28294                                 ;;
28295                         (*)
28296                                 DFT_LIB_SUFFIX='.sl'
28297                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28298                                 ;;
28299                         esac
28300                         ;;
28301                 (*)
28302                         DFT_LIB_SUFFIX='.so'
28303                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28304                         ;;
28305                 esac
28306                 ;;
28307         (*)
28308                 case "$target" in
28309                 (*-msvc*)
28310                         DFT_LIB_SUFFIX='.lib'
28311                         ;;
28312                 (*)
28313                         DFT_LIB_SUFFIX='.a'
28314                         ;;
28315                 esac
28316                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28317                 ;;
28318         esac
28319         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28320         then
28321                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28322                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28323         fi
28324 echo "$as_me:28324: result: $DFT_DEP_SUFFIX" >&5
28325 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28326
28327 echo "$as_me:28327: checking default object directory" >&5
28328 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28329
28330         case $DFT_LWR_MODEL in
28331         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28332         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28333         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28334         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28335         (shared)
28336                 case "$cf_cv_system_name" in
28337                 (cygwin|msys)
28338                         DFT_OBJ_SUBDIR='objects' ;;
28339                 (*)
28340                         DFT_OBJ_SUBDIR='obj_s' ;;
28341                 esac
28342         esac
28343 echo "$as_me:28343: result: $DFT_OBJ_SUBDIR" >&5
28344 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28345
28346 if test "x$cf_with_cxx" = xyes ; then
28347 echo "$as_me:28347: checking c++ library-dependency suffix" >&5
28348 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28349 if test "$with_libtool" != "no"; then
28350         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28351         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28352 elif test "$with_shared_cxx" != "no"; then
28353         # also for g++ users...
28354         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28355 else
28356         # we normally make a static library because C/C++ library rules differ
28357
28358         case Xnormal in
28359         (Xlibtool)
28360                 CXX_LIB_SUFFIX='.la'
28361                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28362                 ;;
28363         (Xdebug)
28364                 case "$cf_cv_system_name" in
28365                 (*-msvc*)
28366                         CXX_LIB_SUFFIX='_g.lib'
28367                         ;;
28368                 (*)
28369                         CXX_LIB_SUFFIX='_g.a'
28370                         ;;
28371                 esac
28372                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28373                 ;;
28374         (Xprofile)
28375                 case "$cf_cv_system_name" in
28376                 (*-msvc*)
28377                         CXX_LIB_SUFFIX='_p.lib'
28378                         ;;
28379                 (*)
28380                         CXX_LIB_SUFFIX='_p.a'
28381                         ;;
28382                 esac
28383                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28384                 ;;
28385         (Xshared)
28386                 case "$cf_cv_system_name" in
28387                 (aix[5-7]*)
28388                         CXX_LIB_SUFFIX='.so'
28389                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28390                         ;;
28391                 (*-msvc*)
28392                         CXX_LIB_SUFFIX='.dll'
28393                         CXX_DEP_SUFFIX='.dll.lib'
28394                         ;;
28395                 (cygwin*|msys*|mingw*)
28396                         CXX_LIB_SUFFIX='.dll'
28397                         CXX_DEP_SUFFIX='.dll.a'
28398                         ;;
28399                 (darwin*)
28400                         CXX_LIB_SUFFIX='.dylib'
28401                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28402                         ;;
28403                 (hpux*)
28404                         case "$target" in
28405                         (ia64*)
28406                                 CXX_LIB_SUFFIX='.so'
28407                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28408                                 ;;
28409                         (*)
28410                                 CXX_LIB_SUFFIX='.sl'
28411                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28412                                 ;;
28413                         esac
28414                         ;;
28415                 (*)
28416                         CXX_LIB_SUFFIX='.so'
28417                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28418                         ;;
28419                 esac
28420                 ;;
28421         (*)
28422                 case "$target" in
28423                 (*-msvc*)
28424                         CXX_LIB_SUFFIX='.lib'
28425                         ;;
28426                 (*)
28427                         CXX_LIB_SUFFIX='.a'
28428                         ;;
28429                 esac
28430                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28431                 ;;
28432         esac
28433         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28434         then
28435                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28436                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28437         fi
28438
28439 fi
28440 echo "$as_me:28440: result: $CXX_LIB_SUFFIX" >&5
28441 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28442
28443 fi
28444
28445 # do not want -ldl in build except as needed for -lncurses dependency
28446 if test "x$with_dlsym" = xyes ; then
28447 if test "$DFT_LWR_MODEL" = shared || \
28448    test "$DFT_LWR_MODEL" = libtool ; then
28449
28450 # remove dl library from $LIBS
28451 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28452
28453 fi
28454 fi
28455 ### Set up low-level terminfo dependencies for makefiles.
28456
28457 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28458 # do not need libdl
28459 TICS_LIST=
28460 if test "x$with_dlsym" = xyes ; then
28461
28462 # remove dl library from $SHLIB_LIST
28463 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28464
28465 fi
28466
28467 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28468 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28469 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28470 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28471 then
28472         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28473 fi
28474
28475 if test "$with_ticlib" != no ; then
28476
28477         if test "x$with_ticlib" != xyes ; then
28478                 TICS_NAME=$with_ticlib
28479                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28480                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28481                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28482                 TICS_LIB_SUFFIX="${with_ticlib}"
28483         else
28484                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28485                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28486                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28487                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28488         fi
28489         TICS_LDFLAGS="-L${LIB_DIR}"
28490         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28491 else
28492         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28493         TICS_LDFLAGS="-L${LIB_DIR}"
28494         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28495 fi
28496
28497 if test "$with_termlib" != no ; then
28498
28499         if test "x$with_termlib" != xyes ; then
28500                 TINFO_NAME=$with_termlib
28501                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28502                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28503                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28504                 TINFO_LIB_SUFFIX="${with_termlib}"
28505         else
28506                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28507                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28508                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28509                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28510         fi
28511
28512         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28513         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28514         if test "$DFT_LWR_MODEL" = "libtool"; then
28515                 TEST_ARGS="${TEST_DEPS}"
28516                 TEST_ARG2="${TEST_DEP2}"
28517                 TINFO_LDFLAGS="-L${LIB_DIR}"
28518                 TINFO_LIBS="$TEST_ARGS"
28519                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28520                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28521         else
28522                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28523                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28524                 if test "x$with_term_driver" != xno ; then
28525                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28526                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28527                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28528                 else
28529                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28530                         TINFO_LIBS="$TEST_ARGS"
28531                 fi
28532                 TINFO_LDFLAGS="-L${LIB_DIR}"
28533                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28534         fi
28535 else
28536         # the next lines are needed for linking libtic over libncurses
28537         TINFO_NAME=${LIB_NAME}
28538         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28539         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28540         if test "x$with_tic_depends" = xyes ; then
28541                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28542         else
28543                 TICS_LIST="$SHLIB_LIST"
28544         fi
28545
28546         TINFO_LDFLAGS="-L${LIB_DIR}"
28547         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28548 fi
28549
28550 if test "$DFT_LWR_MODEL" = shared ; then
28551         case "$cf_cv_system_name" in
28552         (cygwin*|msys*)
28553                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28554                 TINFO_SUFFIX=.dll
28555                 ;;
28556         esac
28557 fi
28558
28559 if test "x$with_dlsym" = xyes ; then
28560
28561 # remove dl library from $TICS_LIST
28562 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28563
28564 fi
28565
28566 if test "$DFT_LWR_MODEL" = "libtool"; then
28567         OBJEXT=lo
28568 fi
28569
28570 # needed for Ada95
28571 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28572
28573 case "$DFT_LWR_MODEL" in
28574 (normal|debug|profile)
28575
28576 if test "$GCC" = yes ; then
28577         case "$cf_cv_system_name" in
28578         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28579                 LDFLAGS_STATIC=
28580                 LDFLAGS_SHARED=
28581                 ;;
28582         (*)     # normally, except when broken
28583                 LDFLAGS_STATIC=-static
28584                 LDFLAGS_SHARED=-dynamic
28585                 ;;
28586         esac
28587 else
28588         case "$cf_cv_system_name" in
28589         (aix[4-7]*)     # from ld manpage
28590                 LDFLAGS_STATIC=-bstatic
28591                 LDFLAGS_SHARED=-bdynamic
28592                 ;;
28593         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28594                 # We could also use just "archive" and "shared".
28595                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28596                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28597                 ;;
28598         (irix*)         # from ld manpage IRIX64
28599                 LDFLAGS_STATIC=-Bstatic
28600                 LDFLAGS_SHARED=-Bdynamic
28601                 ;;
28602         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28603                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28604                 LDFLAGS_STATIC=-noso
28605                 LDFLAGS_SHARED=-so_archive
28606                 ;;
28607         (solaris2*)
28608                 LDFLAGS_STATIC=-Bstatic
28609                 LDFLAGS_SHARED=-Bdynamic
28610                 ;;
28611         esac
28612 fi
28613
28614 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28615 then
28616         echo "$as_me:28616: checking if linker supports switching between static/dynamic" >&5
28617 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28618
28619         rm -f libconftest.a
28620         cat >conftest.$ac_ext <<EOF
28621 #line 28621 "configure"
28622 #include <stdio.h>
28623 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28624 EOF
28625         if { (eval echo "$as_me:28625: \"$ac_compile\"") >&5
28626   (eval $ac_compile) 2>&5
28627   ac_status=$?
28628   echo "$as_me:28628: \$? = $ac_status" >&5
28629   (exit "$ac_status"); } ; then
28630                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28631                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28632         fi
28633         rm -f conftest.*
28634
28635         cf_save_LIBS="$LIBS"
28636
28637         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28638         cat >"conftest.$ac_ext" <<_ACEOF
28639 #line 28639 "configure"
28640 #include "confdefs.h"
28641
28642 #line 28642 "configure"
28643 #include <stdio.h>
28644 int cf_ldflags_static(FILE *fp);
28645
28646 int
28647 main (void)
28648 {
28649
28650         return cf_ldflags_static(stdin);
28651
28652   ;
28653   return 0;
28654 }
28655 _ACEOF
28656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28657 if { (eval echo "$as_me:28657: \"$ac_link\"") >&5
28658   (eval $ac_link) 2>&5
28659   ac_status=$?
28660   echo "$as_me:28660: \$? = $ac_status" >&5
28661   (exit "$ac_status"); } &&
28662          { ac_try='test -s "conftest$ac_exeext"'
28663   { (eval echo "$as_me:28663: \"$ac_try\"") >&5
28664   (eval $ac_try) 2>&5
28665   ac_status=$?
28666   echo "$as_me:28666: \$? = $ac_status" >&5
28667   (exit "$ac_status"); }; }; then
28668
28669         # some linkers simply ignore the -dynamic
28670         case x`file "conftest$ac_exeext" 2>/dev/null` in
28671         (*static*)
28672                 cf_ldflags_static=no
28673                 ;;
28674         (*)
28675                 cf_ldflags_static=yes
28676                 ;;
28677         esac
28678
28679 else
28680   echo "$as_me: failed program was:" >&5
28681 cat "conftest.$ac_ext" >&5
28682 cf_ldflags_static=no
28683 fi
28684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28685
28686         rm -f libconftest.*
28687         LIBS="$cf_save_LIBS"
28688
28689         echo "$as_me:28689: result: $cf_ldflags_static" >&5
28690 echo "${ECHO_T}$cf_ldflags_static" >&6
28691
28692         if test "$cf_ldflags_static" != yes
28693         then
28694                 LDFLAGS_STATIC=
28695                 LDFLAGS_SHARED=
28696         fi
28697 else
28698         LDFLAGS_STATIC=
28699         LDFLAGS_SHARED=
28700 fi
28701
28702         ;;
28703 esac
28704
28705 echo "$as_me:28705: checking where we will install curses.h" >&5
28706 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28707
28708 includesubdir=
28709 if test "$with_overwrite" = no && \
28710  { test "x$includedir" = 'x${prefix}/include' || \
28711    test "x$includedir" = "x${prefix}/include"; }
28712 then
28713         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28714 fi
28715 echo "$as_me:28715: result: ${includedir}${includesubdir}" >&5
28716 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28717
28718 ### Resolve a conflict between normal and wide-curses by forcing applications
28719 ### that will need libutf8 to add it to their configure script.
28720 if test "$with_overwrite" != no ; then
28721 if test "$NCURSES_LIBUTF8" = 1 ; then
28722         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28723         { echo "$as_me:28723: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28724 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28725 fi
28726 fi
28727 WITH_OVERWRITE=$with_overwrite
28728
28729 ### At least on MinGW a shared library build without libtool
28730 ### requires adding the additional libs to the link list.
28731 case "$cf_cv_system_name" in
28732 (*mingw32*|*mingw64*)
28733         if test "$DFT_LWR_MODEL" != "libtool"; then
28734            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28735         fi
28736         ;;
28737 *)      ;;
28738 esac
28739
28740 # used to separate tack out of the tree
28741 NCURSES_TREE=
28742
28743 ### predefined stuff for the test programs
28744
28745 cat >>confdefs.h <<\EOF
28746 #define HAVE_SLK_COLOR 1
28747 EOF
28748
28749 # pkgsrc uses these
28750
28751 echo "$as_me:28751: checking for desired basename for form library" >&5
28752 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28753
28754 # Check whether --with-form-libname or --without-form-libname was given.
28755 if test "${with_form_libname+set}" = set; then
28756   withval="$with_form_libname"
28757   with_lib_basename=$withval
28758 else
28759   with_lib_basename=form
28760 fi;
28761 FORM_NAME="$with_lib_basename"
28762
28763 case "x$FORM_NAME" in
28764 (x|xno|xnone|xyes)
28765         FORM_NAME=form
28766         ;;
28767 (*)
28768         ;;
28769 esac
28770
28771 echo "$as_me:28771: result: $FORM_NAME" >&5
28772 echo "${ECHO_T}$FORM_NAME" >&6
28773
28774 echo "$as_me:28774: checking for desired basename for menu library" >&5
28775 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28776
28777 # Check whether --with-menu-libname or --without-menu-libname was given.
28778 if test "${with_menu_libname+set}" = set; then
28779   withval="$with_menu_libname"
28780   with_lib_basename=$withval
28781 else
28782   with_lib_basename=menu
28783 fi;
28784 MENU_NAME="$with_lib_basename"
28785
28786 case "x$MENU_NAME" in
28787 (x|xno|xnone|xyes)
28788         MENU_NAME=menu
28789         ;;
28790 (*)
28791         ;;
28792 esac
28793
28794 echo "$as_me:28794: result: $MENU_NAME" >&5
28795 echo "${ECHO_T}$MENU_NAME" >&6
28796
28797 echo "$as_me:28797: checking for desired basename for panel library" >&5
28798 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28799
28800 # Check whether --with-panel-libname or --without-panel-libname was given.
28801 if test "${with_panel_libname+set}" = set; then
28802   withval="$with_panel_libname"
28803   with_lib_basename=$withval
28804 else
28805   with_lib_basename=panel
28806 fi;
28807 PANEL_NAME="$with_lib_basename"
28808
28809 case "x$PANEL_NAME" in
28810 (x|xno|xnone|xyes)
28811         PANEL_NAME=panel
28812         ;;
28813 (*)
28814         ;;
28815 esac
28816
28817 echo "$as_me:28817: result: $PANEL_NAME" >&5
28818 echo "${ECHO_T}$PANEL_NAME" >&6
28819
28820 echo "$as_me:28820: checking for desired basename for cxx library" >&5
28821 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28822
28823 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28824 if test "${with_cxx_libname+set}" = set; then
28825   withval="$with_cxx_libname"
28826   with_lib_basename=$withval
28827 else
28828   with_lib_basename=ncurses++
28829 fi;
28830 CXX_NAME="$with_lib_basename"
28831
28832 case "x$CXX_NAME" in
28833 (x|xno|xnone|xyes)
28834         CXX_NAME=ncurses++
28835         ;;
28836 (*)
28837         ;;
28838 esac
28839
28840 echo "$as_me:28840: result: $CXX_NAME" >&5
28841 echo "${ECHO_T}$CXX_NAME" >&6
28842
28843 ### Construct the list of subdirectories for which we'll customize makefiles
28844 ### with the appropriate compile-rules.
28845
28846 echo "$as_me:28846: checking for src modules" >&5
28847 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28848
28849 # dependencies and linker-arguments for test-programs
28850 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28851 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28852 if test "$DFT_LWR_MODEL" = "libtool"; then
28853         TEST_ARGS="${TEST_DEPS}"
28854         TEST_ARG2="${TEST_DEP2}"
28855 else
28856         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28857         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28858 fi
28859
28860 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28861 cf_cv_src_modules=
28862 for cf_dir in $modules_to_build
28863 do
28864         if test -f "$srcdir/$cf_dir/modules" ; then
28865
28866                 # We may/may not have tack in the distribution, though the
28867                 # makefile is.
28868                 if test "$cf_dir" = tack ; then
28869                         if test "x$cf_with_tack" != "xyes"; then
28870                                 continue
28871                         fi
28872                 fi
28873
28874                 if test -z "$cf_cv_src_modules"; then
28875                         cf_cv_src_modules=$cf_dir
28876                 else
28877                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28878                 fi
28879
28880                 # Make the ncurses_cfg.h file record the library interface files as
28881                 # well.  These are header files that are the same name as their
28882                 # directory.  Ncurses is the only library that does not follow
28883                 # that pattern.
28884                 if test "$cf_dir" = tack ; then
28885                         continue
28886                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28887
28888 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28889
28890                         cat >>confdefs.h <<EOF
28891 #define HAVE_${cf_have_include}_H 1
28892 EOF
28893
28894                         cat >>confdefs.h <<EOF
28895 #define HAVE_LIB${cf_have_include} 1
28896 EOF
28897
28898 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28899
28900 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28901
28902                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28903                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28904                         if test "$DFT_LWR_MODEL" = "libtool"; then
28905                                 TEST_ARGS="${TEST_DEPS}"
28906                                 TEST_ARG2="${TEST_DEP2}"
28907                         else
28908                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28909                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28910                         fi
28911                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28912                 fi
28913         fi
28914 done
28915 echo "$as_me:28915: result: $cf_cv_src_modules" >&5
28916 echo "${ECHO_T}$cf_cv_src_modules" >&6
28917
28918 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28919 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28920
28921 SRC_SUBDIRS=
28922 if test "x$cf_with_manpages" != xno ; then
28923         SRC_SUBDIRS="$SRC_SUBDIRS man"
28924 fi
28925 SRC_SUBDIRS="$SRC_SUBDIRS include"
28926 for cf_dir in $cf_cv_src_modules
28927 do
28928         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28929 done
28930 if test "x$cf_with_tests" != "xno" ; then
28931         SRC_SUBDIRS="$SRC_SUBDIRS test"
28932 fi
28933 # always make this, to install the ncurses-config script
28934 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28935 if test "$cf_with_cxx_binding" != no; then
28936         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28937         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28938 fi
28939
28940 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28941 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28942
28943 ADA_SUBDIRS=
28944 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28945         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28946         ADA_SUBDIRS="gen src"
28947         if test "x$cf_with_tests" != "xno" ; then
28948                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28949         fi
28950 fi
28951
28952 SUB_MAKEFILES=
28953 for cf_dir in $SRC_SUBDIRS
28954 do
28955         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28956 done
28957
28958 if test -n "$ADA_SUBDIRS"; then
28959         for cf_dir in $ADA_SUBDIRS
28960         do
28961                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28962         done
28963
28964 fi
28965
28966 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28967    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28968    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28969    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28970 fi
28971
28972 DIRS_TO_MAKE="lib"
28973 for cf_item in $cf_list_models
28974 do
28975
28976         case $cf_item in
28977         (libtool) cf_subdir='obj_lo'  ;;
28978         (normal)  cf_subdir='objects' ;;
28979         (debug)   cf_subdir='obj_g' ;;
28980         (profile) cf_subdir='obj_p' ;;
28981         (shared)
28982                 case "$cf_cv_system_name" in
28983                 (cygwin|msys)
28984                         cf_subdir='objects' ;;
28985                 (*)
28986                         cf_subdir='obj_s' ;;
28987                 esac
28988         esac
28989
28990         for cf_item2 in $DIRS_TO_MAKE
28991         do
28992                 test "$cf_item2" = "$cf_subdir" && break
28993         done
28994         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28995 done
28996 for cf_dir in $DIRS_TO_MAKE
28997 do
28998         test ! -d "$cf_dir" && mkdir "$cf_dir"
28999 done
29000
29001 # symbols that differ when compiling Ada95 by itself.
29002 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29003
29004 # values to use as strings
29005
29006 cat >>confdefs.h <<EOF
29007 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29008 EOF
29009
29010 cat >>confdefs.h <<EOF
29011 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29012 EOF
29013
29014 ### Define substitutions for header files to avoid name-pollution
29015
29016 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29017         HAVE_TCGETATTR=1
29018 else
29019         HAVE_TCGETATTR=0
29020 fi
29021
29022 if test "x$ac_cv_header_stdint_h" = xyes ; then
29023         HAVE_STDINT_H=1
29024 else
29025         HAVE_STDINT_H=0
29026 fi
29027
29028 if test "x$ac_cv_header_termio_h" = xyes ; then
29029         HAVE_TERMIO_H=1
29030 else
29031         HAVE_TERMIO_H=0
29032 fi
29033
29034 if test "x$ac_cv_header_termios_h" = xyes ; then
29035         HAVE_TERMIOS_H=1
29036 else
29037         HAVE_TERMIOS_H=0
29038 fi
29039
29040 ################################################################################
29041 test "x$use_database" = xyes && \
29042 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29043
29044 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29045 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29046
29047 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29048 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29049 fi
29050
29051 if test "x$cf_with_tests" != xno ; then
29052         MAKE_TESTS=
29053 else
29054         MAKE_TESTS="#"
29055 fi
29056
29057 ADAHTML_DIR=../../doc/html/ada
29058
29059 # workaround for OS/2 (20151017)
29060 case "$cf_cv_system_name" in
29061 (os2*)
29062         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29063         ;;
29064 (*)
29065         LIBTOOL_OPTS_CXX=
29066         ;;
29067 esac
29068
29069 # workaround for g++ versus Solaris (20131116)
29070 case "$cf_cv_system_name" in
29071 (solaris2*)
29072         case "x$CPPFLAGS" in
29073         (*-D_XOPEN_SOURCE_EXTENDED*)
29074                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29075
29076 echo "${as_me:-configure}:29076: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29077
29078                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29079                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29080                 ;;
29081         esac
29082         ;;
29083 esac
29084
29085 # Help to automatically enable the extended curses features when using either
29086 # the *-config or the ".pc" files by adding defines.
29087 echo "$as_me:29087: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29088 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29089 PKG_CFLAGS=
29090 for cf_loop1 in $CPPFLAGS_after_XOPEN
29091 do
29092         cf_found=no
29093         for cf_loop2 in $CPPFLAGS_before_XOPEN
29094         do
29095                 if test "x$cf_loop1" = "x$cf_loop2"
29096                 then
29097                         cf_found=yes
29098                         break
29099                 fi
29100         done
29101         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29102 done
29103 echo "$as_me:29103: result: $PKG_CFLAGS" >&5
29104 echo "${ECHO_T}$PKG_CFLAGS" >&6
29105
29106 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29107 case "x$NCURSES_OSPEED" in
29108 (*short*)
29109         cf_compatible=1
29110         ;;
29111 (*)
29112         cf_compatible=0
29113         ;;
29114 esac
29115
29116 cat >>confdefs.h <<EOF
29117 #define NCURSES_OSPEED_COMPAT $cf_compatible
29118 EOF
29119
29120 case "x$cf_cv_typeof_chtype" in
29121 (xshort|xint|xlong)
29122         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29123         ;;
29124 esac
29125
29126 case "x$cf_cv_typeof_mmask_t" in
29127 (xshort|xint|xlong)
29128         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29129         ;;
29130 esac
29131
29132 # substitute into misc/Makefile to suppress
29133 # (un)install.data from the
29134 # (un)install rules.
29135 if test "x$cf_with_db_install" = "xno"; then
29136         MISC_INSTALL_DATA=
29137         MISC_UNINSTALL_DATA=
29138 else
29139         MISC_INSTALL_DATA=install.data
29140         MISC_UNINSTALL_DATA=uninstall.data
29141 fi
29142
29143 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29144         MAKE_DATABASE="#"
29145 else
29146         MAKE_DATABASE="$MAKE_TERMINFO"
29147 fi
29148
29149 if test -n "$PACKAGE"
29150 then
29151         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29152         export PACKAGE
29153         echo "package: $PACKAGE"
29154 fi
29155
29156 UNALTERED_SYMS=
29157 cf_filter_syms=no
29158
29159 if test -n "$RESULTING_SYMS"
29160 then
29161         cf_filter_syms=$cf_dft_filter_syms
29162         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
29163
29164 echo "${as_me:-configure}:29164: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
29165
29166 fi
29167
29168 if test "x$WILDCARD_SYMS" = xno
29169 then
29170         cf_filter_syms=yes
29171 fi
29172
29173 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29174
29175 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29176 if test "$cf_filter_syms" = yes
29177 then
29178         RESULTING_SYMS=resulting.map
29179 fi
29180
29181 if test "x$cross_compiling" = xyes ; then
29182         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29183         CHECK_BUILD="#"
29184 else
29185         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29186         CHECK_BUILD=
29187 fi
29188
29189 # This is used for the *-config script and *.pc data files.
29190
29191 echo "$as_me:29191: checking for linker search path" >&5
29192 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29193 if test "${cf_cv_ld_searchpath+set}" = set; then
29194   echo $ECHO_N "(cached) $ECHO_C" >&6
29195 else
29196
29197 if test "$cross_compiling" != yes ; then
29198
29199 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29200 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29201
29202 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29203 # update the cache, which makes it run faster.
29204 test -z "$cf_pathlist" && \
29205         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29206
29207 test -z "$cf_pathlist" &&
29208         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29209
29210 # This works with OpenBSD 6.5, which lists only filenames
29211 test -z "$cf_pathlist" &&
29212         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29213
29214 if test -z "$cf_pathlist"
29215 then
29216         # dyld default path with MacOS
29217         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29218         then
29219                 # do this to bypass check
29220                 cf_cv_ld_searchpath='$HOME/lib'
29221                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29222         fi
29223 fi
29224
29225 if test -z "$cf_pathlist"
29226 then
29227         # Solaris is "SunOS"
29228         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29229         then
29230                 case x`(isainfo -b)` in
29231                 (x64)
29232                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29233                         ;;
29234                 (x32)
29235                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29236                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29237                         ;;
29238                 (*)
29239                         { echo "$as_me:29239: WARNING: problem with Solaris architecture" >&5
29240 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29241                         ;;
29242                 esac
29243         fi
29244 fi
29245
29246 if test -z "$cf_pathlist"
29247 then
29248         # HP-UX
29249         if test x"`uname -s`" = xHP-UX
29250         then
29251                 case x`getconf LONG_BIT` in
29252                 (x64)
29253                         cf_pathlist="/usr/lib/hpux64"
29254                         ;;
29255                 (x*)
29256                         cf_pathlist="/usr/lib/hpux32"
29257                         ;;
29258                 esac
29259         fi
29260 fi
29261
29262 fi
29263
29264 # If nothing else, assume it is conventional
29265 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29266
29267 # Finally, check that this is only directories
29268 for cf_path in $0 $cf_pathlist
29269 do
29270         if test -d "$cf_path"; then
29271                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29272                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29273         fi
29274 done
29275
29276 # Ensure that it is nonempty
29277 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29278
29279 fi
29280 echo "$as_me:29280: result: $cf_cv_ld_searchpath" >&5
29281 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29282
29283 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29284
29285 cat >>confdefs.h <<\EOF
29286 #define HAVE_CURSES_DATA_BOOLNAMES 1
29287 EOF
29288
29289 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 $SUB_MAKEFILES Makefile"
29290 ac_config_commands="$ac_config_commands default"
29291 cat >confcache <<\_ACEOF
29292 # This file is a shell script that caches the results of configure
29293 # tests run on this system so they can be shared between configure
29294 # scripts and configure runs, see configure's option --config-cache.
29295 # It is not useful on other systems.  If it contains results you don't
29296 # want to keep, you may remove or edit it.
29297 #
29298 # config.status only pays attention to the cache file if you give it
29299 # the --recheck option to rerun configure.
29300 #
29301 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29302 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29303 # following values.
29304
29305 _ACEOF
29306
29307 # The following way of writing the cache mishandles newlines in values,
29308 # but we know of no workaround that is simple, portable, and efficient.
29309 # So, don't put newlines in cache variables' values.
29310 # Ultrix sh set writes to stderr and can't be redirected directly,
29311 # and sets the high bit in the cache file unless we assign to the vars.
29312 {
29313   (set) 2>&1 |
29314     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29315     *ac_space=\ *)
29316       # `set' does not quote correctly, so add quotes (double-quote
29317       # substitution turns \\\\ into \\, and sed turns \\ into \).
29318       sed -n \
29319         "s/'/'\\\\''/g;
29320           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29321       ;;
29322     *)
29323       # `set' quotes correctly as required by POSIX, so do not add quotes.
29324       sed -n \
29325         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29326       ;;
29327     esac;
29328 } |
29329   sed '
29330      t clear
29331      : clear
29332      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29333      t end
29334      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29335      : end' >>confcache
29336 if cmp -s $cache_file confcache; then :; else
29337   if test -w $cache_file; then
29338     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29339     cat confcache >$cache_file
29340   else
29341     echo "not updating unwritable cache $cache_file"
29342   fi
29343 fi
29344 rm -f confcache
29345
29346 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29347 # Let make expand exec_prefix.
29348 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29349
29350 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29351 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29352 # trailing colons and then remove the whole line if VPATH becomes empty
29353 # (actually we leave an empty line to preserve line numbers).
29354 if test "x$srcdir" = x.; then
29355   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29356 s/:*\$(srcdir):*/:/;
29357 s/:*\${srcdir}:*/:/;
29358 s/:*@srcdir@:*/:/;
29359 s/^\([^=]*=[    ]*\):*/\1/;
29360 s/:*$//;
29361 s/^[^=]*=[      ]*$//;
29362 }'
29363 fi
29364
29365 DEFS=-DHAVE_CONFIG_H
29366
29367 : "${CONFIG_STATUS=./config.status}"
29368 ac_clean_files_save=$ac_clean_files
29369 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29370 { echo "$as_me:29370: creating $CONFIG_STATUS" >&5
29371 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29372 cat >"$CONFIG_STATUS" <<_ACEOF
29373 #! $SHELL
29374 # Generated automatically by configure.
29375 # Run this file to recreate the current configuration.
29376 # Compiler output produced by configure, useful for debugging
29377 # configure, is in config.log if it exists.
29378
29379 debug=false
29380 SHELL=\${CONFIG_SHELL-$SHELL}
29381 ac_cs_invocation="\$0 \$@"
29382
29383 CLICOLOR_FORCE= GREP_OPTIONS=
29384 unset CLICOLOR_FORCE GREP_OPTIONS
29385 _ACEOF
29386
29387 cat >>"$CONFIG_STATUS" <<\_ACEOF
29388 # Be Bourne compatible
29389 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29390   emulate sh
29391   NULLCMD=:
29392 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29393   set -o posix
29394 fi
29395
29396 # Name of the executable.
29397 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29398
29399 if expr a : '\(a\)' >/dev/null 2>&1; then
29400   as_expr=expr
29401 else
29402   as_expr=false
29403 fi
29404
29405 rm -f conf$$ conf$$.exe conf$$.file
29406 echo >conf$$.file
29407 if ln -s conf$$.file conf$$ 2>/dev/null; then
29408   # We could just check for DJGPP; but this test a) works b) is more generic
29409   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29410   if test -f conf$$.exe; then
29411     # Don't use ln at all; we don't have any links
29412     as_ln_s='cp -p'
29413   else
29414     as_ln_s='ln -s'
29415   fi
29416 elif ln conf$$.file conf$$ 2>/dev/null; then
29417   as_ln_s=ln
29418 else
29419   as_ln_s='cp -p'
29420 fi
29421 rm -f conf$$ conf$$.exe conf$$.file
29422
29423 as_executable_p="test -f"
29424
29425 # Support unset when possible.
29426 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29427   as_unset="unset"
29428 else
29429   as_unset="false"
29430 fi
29431
29432 # NLS nuisances.
29433 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29434 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29435 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29436 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29437 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29438 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29439 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29440 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29441
29442 # IFS
29443 # We need space, tab and new line, in precisely that order.
29444 as_nl='
29445 '
29446 IFS="   $as_nl"
29447
29448 # CDPATH.
29449 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29450
29451 exec 6>&1
29452
29453 _ACEOF
29454
29455 # Files that config.status was made for.
29456 if test -n "$ac_config_files"; then
29457   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29458 fi
29459
29460 if test -n "$ac_config_headers"; then
29461   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29462 fi
29463
29464 if test -n "$ac_config_links"; then
29465   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29466 fi
29467
29468 if test -n "$ac_config_commands"; then
29469   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29470 fi
29471
29472 cat >>"$CONFIG_STATUS" <<\EOF
29473
29474 ac_cs_usage="\
29475 \`$as_me' instantiates files from templates according to the
29476 current configuration.
29477
29478 Usage: $0 [OPTIONS] [FILE]...
29479
29480   -h, --help       print this help, then exit
29481   -V, --version    print version number, then exit
29482   -d, --debug      don't remove temporary files
29483       --recheck    update $as_me by reconfiguring in the same conditions
29484   --file=FILE[:TEMPLATE]
29485                    instantiate the configuration file FILE
29486   --header=FILE[:TEMPLATE]
29487                    instantiate the configuration header FILE
29488
29489 Configuration files:
29490 $config_files
29491
29492 Configuration headers:
29493 $config_headers
29494
29495 Configuration commands:
29496 $config_commands
29497
29498 Report bugs to <dickey@invisible-island.net>."
29499 EOF
29500
29501 cat >>"$CONFIG_STATUS" <<EOF
29502 ac_cs_version="\\
29503 config.status
29504 configured by $0, generated by GNU Autoconf 2.52.20210509,
29505   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29506
29507 Copyright 2003-2020,2021        Thomas E. Dickey
29508 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29509 Free Software Foundation, Inc.
29510 This config.status script is free software; the Free Software Foundation
29511 gives unlimited permission to copy, distribute and modify it."
29512 srcdir="$srcdir"
29513 INSTALL="$INSTALL"
29514 EOF
29515
29516 cat >>"$CONFIG_STATUS" <<\EOF
29517 # If no file are specified by the user, then we need to provide default
29518 # value.  By we need to know if files were specified by the user.
29519 ac_need_defaults=:
29520 while test $# != 0
29521 do
29522   case $1 in
29523   --*=*)
29524     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29525     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29526     shift
29527     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29528     shift
29529     ;;
29530   -*);;
29531   *) # This is not an option, so the user has probably given explicit
29532      # arguments.
29533      ac_need_defaults=false;;
29534   esac
29535
29536   case $1 in
29537   # Handling of the options.
29538 EOF
29539 cat >>"$CONFIG_STATUS" <<EOF
29540   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29541     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29542     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29543 EOF
29544 cat >>"$CONFIG_STATUS" <<\EOF
29545   --version | --vers* | -V )
29546     echo "$ac_cs_version"; exit 0 ;;
29547   --he | --h)
29548     # Conflict between --help and --header
29549     { { echo "$as_me:29549: error: ambiguous option: $1
29550 Try \`$0 --help' for more information." >&5
29551 echo "$as_me: error: ambiguous option: $1
29552 Try \`$0 --help' for more information." >&2;}
29553    { (exit 1); exit 1; }; };;
29554   --help | --hel | -h )
29555     echo "$ac_cs_usage"; exit 0 ;;
29556   --debug | --d* | -d )
29557     debug=: ;;
29558   --file | --fil | --fi | --f )
29559     shift
29560     CONFIG_FILES="$CONFIG_FILES $1"
29561     ac_need_defaults=false;;
29562   --header | --heade | --head | --hea )
29563     shift
29564     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29565     ac_need_defaults=false;;
29566
29567   # This is an error.
29568   -*) { { echo "$as_me:29568: error: unrecognized option: $1
29569 Try \`$0 --help' for more information." >&5
29570 echo "$as_me: error: unrecognized option: $1
29571 Try \`$0 --help' for more information." >&2;}
29572    { (exit 1); exit 1; }; } ;;
29573
29574   *) ac_config_targets="$ac_config_targets $1" ;;
29575
29576   esac
29577   shift
29578 done
29579
29580 exec 5>>config.log
29581 cat >&5 << _ACEOF
29582
29583 ## ----------------------- ##
29584 ## Running config.status.  ##
29585 ## ----------------------- ##
29586
29587 This file was extended by $as_me 2.52.20210509, executed with
29588   CONFIG_FILES    = $CONFIG_FILES
29589   CONFIG_HEADERS  = $CONFIG_HEADERS
29590   CONFIG_LINKS    = $CONFIG_LINKS
29591   CONFIG_COMMANDS = $CONFIG_COMMANDS
29592   > "$ac_cs_invocation"
29593 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29594
29595 _ACEOF
29596 EOF
29597
29598 cat >>"$CONFIG_STATUS" <<EOF
29599 #
29600 # INIT-COMMANDS section.
29601 #
29602
29603 ### Special initialization commands, used to pass information from the
29604 ### configuration-run into config.status
29605
29606 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29607 AWK="$AWK"
29608 CXX_NAME="$CXX_NAME"
29609 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29610 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29611 ECHO_LD="$ECHO_LD"
29612 EGREP="${EGREP-grep -E}"
29613 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29614 FGREP="${FGREP-grep -F}"
29615 FORM_NAME="$FORM_NAME"
29616 LDCONFIG="$LDCONFIG"
29617 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29618 LIB_NAME="$LIB_NAME"
29619 LIB_PREFIX="$LIB_PREFIX"
29620 LIB_SUBSETS="$LIB_SUBSETS"
29621 LIB_SUFFIX="$LIB_SUFFIX"
29622 LIB_TRACING="$LIB_TRACING"
29623 LN_S="$LN_S"
29624 MAKE_TERMINFO="$MAKE_TERMINFO"
29625 MENU_NAME="$MENU_NAME"
29626 NCURSES_MAJOR="$NCURSES_MAJOR"
29627 NCURSES_MINOR="$NCURSES_MINOR"
29628 NCURSES_OSPEED="$NCURSES_OSPEED"
29629 NCURSES_PATCH="$NCURSES_PATCH"
29630 PANEL_NAME="$PANEL_NAME"
29631 SRC_SUBDIRS="$SRC_SUBDIRS"
29632 TERMINFO="$TERMINFO"
29633 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29634 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29635 TICS_NAME="$TICS_NAME"
29636 TICS_SUFFIX="$TICS_SUFFIX"
29637 TIC_PATH="$TIC_PATH"
29638 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29639 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29640 TINFO_NAME="$TINFO_NAME"
29641 TINFO_SUFFIX="$TINFO_SUFFIX"
29642 UNALTERED_SYMS="$UNALTERED_SYMS"
29643 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29644 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29645 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29646 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29647 WILDCARD_SYMS="$WILDCARD_SYMS"
29648 WITH_CURSES_H="$with_curses_h"
29649 WITH_ECHO="${enable_echo:=yes}"
29650 WITH_OVERWRITE="$with_overwrite"
29651 cf_LIST_MODELS="$cf_list_models"
29652 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29653 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29654 cf_cv_abi_version="$cf_cv_abi_version"
29655 cf_cv_do_relink="$cf_cv_do_relink"
29656 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29657 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29658 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29659 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29660 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29661 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29662 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29663 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29664 cf_cv_rel_version="$cf_cv_rel_version"
29665 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29666 cf_cv_shared_soname='$cf_cv_shared_soname'
29667 cf_cv_shlib_version="$cf_cv_shlib_version"
29668 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29669 cf_cv_system_name="$cf_cv_system_name"
29670 cf_cv_term_driver="$with_term_driver"
29671 cf_with_ada="$cf_with_ada"
29672 cf_with_cxx_binding="$cf_with_cxx_binding"
29673 cf_with_db_install="$cf_with_db_install"
29674 cf_with_manpages="$cf_with_manpages"
29675 cf_with_tests="$cf_with_tests"
29676 host="$host"
29677 target="$target"
29678 with_shared_cxx="$with_shared_cxx"
29679
29680 EOF
29681
29682 cat >>"$CONFIG_STATUS" <<\EOF
29683 for ac_config_target in $ac_config_targets
29684 do
29685   case "$ac_config_target" in
29686   # Handling of arguments.
29687   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29688   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29689   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29690   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29691   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29692   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29693   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29694   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29695   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29696   *) { { echo "$as_me:29696: error: invalid argument: $ac_config_target" >&5
29697 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29698    { (exit 1); exit 1; }; };;
29699   esac
29700 done
29701
29702 # If the user did not use the arguments to specify the items to instantiate,
29703 # then the envvar interface is used.  Set only those that are not.
29704 # We use the long form for the default assignment because of an extremely
29705 # bizarre bug on SunOS 4.1.3.
29706 if "$ac_need_defaults"; then
29707   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29708   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29709   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29710 fi
29711
29712 # Create a temporary directory, and hook for its removal unless debugging.
29713 $debug ||
29714 {
29715   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29716   trap '{ (exit 1); exit 1; }' 1 2 13 15
29717 }
29718
29719 # Create a (secure) tmp directory for tmp files.
29720 : ${TMPDIR=/tmp}
29721 {
29722   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29723   test -n "$tmp" && test -d "$tmp"
29724 }  ||
29725 {
29726   tmp=$TMPDIR/cs$$-$RANDOM
29727   (umask 077 && mkdir $tmp)
29728 } ||
29729 {
29730    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29731    { (exit 1); exit 1; }
29732 }
29733
29734 EOF
29735
29736 cat >>"$CONFIG_STATUS" <<EOF
29737
29738 #
29739 # CONFIG_FILES section.
29740 #
29741
29742 # No need to generate the scripts if there are no CONFIG_FILES.
29743 # This happens for instance when ./config.status config.h
29744 if test -n "\$CONFIG_FILES"; then
29745   # Protect against being on the right side of a sed subst in config.status.
29746   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29747    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29748 s,@SHELL@,$SHELL,;t t
29749 s,@exec_prefix@,$exec_prefix,;t t
29750 s,@prefix@,$prefix,;t t
29751 s,@program_transform_name@,$program_transform_name,;t t
29752 s,@bindir@,$bindir,;t t
29753 s,@sbindir@,$sbindir,;t t
29754 s,@libexecdir@,$libexecdir,;t t
29755 s,@datarootdir@,$datarootdir,;t t
29756 s,@datadir@,$datadir,;t t
29757 s,@sysconfdir@,$sysconfdir,;t t
29758 s,@sharedstatedir@,$sharedstatedir,;t t
29759 s,@localstatedir@,$localstatedir,;t t
29760 s,@runstatedir@,$runstatedir,;t t
29761 s,@libdir@,$libdir,;t t
29762 s,@includedir@,$includedir,;t t
29763 s,@oldincludedir@,$oldincludedir,;t t
29764 s,@infodir@,$infodir,;t t
29765 s,@mandir@,$mandir,;t t
29766 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29767 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29768 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29769 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29770 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29771 s,@build_alias@,$build_alias,;t t
29772 s,@host_alias@,$host_alias,;t t
29773 s,@target_alias@,$target_alias,;t t
29774 s,@ECHO_C@,$ECHO_C,;t t
29775 s,@ECHO_N@,$ECHO_N,;t t
29776 s,@ECHO_T@,$ECHO_T,;t t
29777 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29778 s,@DEFS@,$DEFS,;t t
29779 s,@LIBS@,$LIBS,;t t
29780 s,@top_builddir@,$top_builddir,;t t
29781 s,@GREP@,$GREP,;t t
29782 s,@EGREP@,$EGREP,;t t
29783 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29784 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29785 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29786 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29787 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29788 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29789 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29790 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29791 s,@VERSION@,$VERSION,;t t
29792 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29793 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29794 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29795 s,@PACKAGE@,$PACKAGE,;t t
29796 s,@build@,$build,;t t
29797 s,@build_cpu@,$build_cpu,;t t
29798 s,@build_vendor@,$build_vendor,;t t
29799 s,@build_os@,$build_os,;t t
29800 s,@host@,$host,;t t
29801 s,@host_cpu@,$host_cpu,;t t
29802 s,@host_vendor@,$host_vendor,;t t
29803 s,@host_os@,$host_os,;t t
29804 s,@target@,$target,;t t
29805 s,@target_cpu@,$target_cpu,;t t
29806 s,@target_vendor@,$target_vendor,;t t
29807 s,@target_os@,$target_os,;t t
29808 s,@FGREP@,$FGREP,;t t
29809 s,@CC@,$CC,;t t
29810 s,@CFLAGS@,$CFLAGS,;t t
29811 s,@LDFLAGS@,$LDFLAGS,;t t
29812 s,@CPPFLAGS@,$CPPFLAGS,;t t
29813 s,@ac_ct_CC@,$ac_ct_CC,;t t
29814 s,@EXEEXT@,$EXEEXT,;t t
29815 s,@OBJEXT@,$OBJEXT,;t t
29816 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29817 s,@CPP@,$CPP,;t t
29818 s,@LDCONFIG@,$LDCONFIG,;t t
29819 s,@CXX@,$CXX,;t t
29820 s,@CXXFLAGS@,$CXXFLAGS,;t t
29821 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29822 s,@AWK@,$AWK,;t t
29823 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29824 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29825 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29826 s,@LINT@,$LINT,;t t
29827 s,@LINT_OPTS@,$LINT_OPTS,;t t
29828 s,@LINT_LIBS@,$LINT_LIBS,;t t
29829 s,@LN_S@,$LN_S,;t t
29830 s,@cf_config_suffix@,$cf_config_suffix,;t t
29831 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29832 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29833 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29834 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29835 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29836 s,@SET_MAKE@,$SET_MAKE,;t t
29837 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29838 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29839 s,@CTAGS@,$CTAGS,;t t
29840 s,@ETAGS@,$ETAGS,;t t
29841 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29842 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29843 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29844 s,@RANLIB@,$RANLIB,;t t
29845 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29846 s,@LD@,$LD,;t t
29847 s,@ac_ct_LD@,$ac_ct_LD,;t t
29848 s,@AR@,$AR,;t t
29849 s,@ac_ct_AR@,$ac_ct_AR,;t t
29850 s,@NM@,$NM,;t t
29851 s,@ac_ct_NM@,$ac_ct_NM,;t t
29852 s,@ARFLAGS@,$ARFLAGS,;t t
29853 s,@DESTDIR@,$DESTDIR,;t t
29854 s,@BUILD_CC@,$BUILD_CC,;t t
29855 s,@BUILD_CPP@,$BUILD_CPP,;t t
29856 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29857 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29858 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29859 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29860 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29861 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29862 s,@cf_list_models@,$cf_list_models,;t t
29863 s,@ABI_VERSION@,$ABI_VERSION,;t t
29864 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29865 s,@LIBTOOL@,$LIBTOOL,;t t
29866 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29867 s,@LT_UNDEF@,$LT_UNDEF,;t t
29868 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29869 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29870 s,@LIB_CREATE@,$LIB_CREATE,;t t
29871 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29872 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29873 s,@LIB_PREP@,$LIB_PREP,;t t
29874 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29875 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29876 s,@LIB_LINK@,$LIB_LINK,;t t
29877 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29878 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29879 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29880 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29881 s,@TICS_NAME@,$TICS_NAME,;t t
29882 s,@TINFO_NAME@,$TINFO_NAME,;t t
29883 s,@LIB_NAME@,$LIB_NAME,;t t
29884 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29885 s,@CC_G_OPT@,$CC_G_OPT,;t t
29886 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29887 s,@LD_MODEL@,$LD_MODEL,;t t
29888 s,@shlibdir@,$shlibdir,;t t
29889 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29890 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29891 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29892 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29893 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29894 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29895 s,@LINK_PROGS@,$LINK_PROGS,;t t
29896 s,@LINK_TESTS@,$LINK_TESTS,;t t
29897 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29898 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29899 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29900 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29901 s,@RPATH_LIST@,$RPATH_LIST,;t t
29902 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29903 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29904 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29905 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29906 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29907 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29908 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29909 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29910 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29911 s,@TIC@,$TIC,;t t
29912 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29913 s,@INFOCMP@,$INFOCMP,;t t
29914 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29915 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29916 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29917 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29918 s,@XTERM_KBS@,$XTERM_KBS,;t t
29919 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29920 s,@TERMINFO@,$TERMINFO,;t t
29921 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29922 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29923 s,@TERMPATH@,$TERMPATH,;t t
29924 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29925 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29926 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29927 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29928 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29929 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29930 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29931 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29932 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29933 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29934 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29935 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29936 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29937 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29938 s,@RGB_PATH@,$RGB_PATH,;t t
29939 s,@no_x11_rgb@,$no_x11_rgb,;t t
29940 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29941 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29942 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29943 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29944 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29945 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29946 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29947 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29948 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29949 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29950 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29951 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29952 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29953 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29954 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29955 s,@PTHREAD@,$PTHREAD,;t t
29956 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29957 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29958 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29959 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29960 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29961 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29962 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29963 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29964 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29965 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29966 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29967 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29968 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29969 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29970 s,@ECHO_LT@,$ECHO_LT,;t t
29971 s,@ECHO_LD@,$ECHO_LD,;t t
29972 s,@RULE_CC@,$RULE_CC,;t t
29973 s,@SHOW_CC@,$SHOW_CC,;t t
29974 s,@ECHO_CC@,$ECHO_CC,;t t
29975 s,@ECHO_LINK@,$ECHO_LINK,;t t
29976 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29977 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29978 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29979 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29980 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29981 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29982 s,@ADAFLAGS@,$ADAFLAGS,;t t
29983 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29984 s,@ADA_TRACE@,$ADA_TRACE,;t t
29985 s,@MATH_LIB@,$MATH_LIB,;t t
29986 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29987 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29988 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29989 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29990 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29991 s,@TEST_LIBS@,$TEST_LIBS,;t t
29992 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29993 s,@CXXCPP@,$CXXCPP,;t t
29994 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29995 s,@CXX_AR@,$CXX_AR,;t t
29996 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29997 s,@CXXLIBS@,$CXXLIBS,;t t
29998 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29999 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30000 s,@M4_exists@,$M4_exists,;t t
30001 s,@cf_ada_make@,$cf_ada_make,;t t
30002 s,@cf_ada_config@,$cf_ada_config,;t t
30003 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30004 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30005 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30006 s,@cf_compile_generics@,$cf_compile_generics,;t t
30007 s,@cf_generic_objects@,$cf_generic_objects,;t t
30008 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30009 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30010 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30011 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30012 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30013 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30014 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30015 s,@cf_ada_package@,$cf_ada_package,;t t
30016 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30017 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30018 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30019 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30020 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30021 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30022 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30023 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30024 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30025 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30026 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30027 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30028 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30029 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30030 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30031 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30032 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30033 s,@TICS_LIBS@,$TICS_LIBS,;t t
30034 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30035 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30036 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30037 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30038 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30039 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30040 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30041 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30042 s,@includesubdir@,$includesubdir,;t t
30043 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30044 s,@TICS_LIST@,$TICS_LIST,;t t
30045 s,@TINFO_LIST@,$TINFO_LIST,;t t
30046 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30047 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
30048 s,@FORM_NAME@,$FORM_NAME,;t t
30049 s,@MENU_NAME@,$MENU_NAME,;t t
30050 s,@PANEL_NAME@,$PANEL_NAME,;t t
30051 s,@CXX_NAME@,$CXX_NAME,;t t
30052 s,@TEST_ARGS@,$TEST_ARGS,;t t
30053 s,@TEST_DEPS@,$TEST_DEPS,;t t
30054 s,@TEST_ARG2@,$TEST_ARG2,;t t
30055 s,@TEST_DEP2@,$TEST_DEP2,;t t
30056 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30057 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30058 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30059 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30060 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30061 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30062 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30063 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30064 s,@cross_compiling@,$cross_compiling,;t t
30065 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30066 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30067 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30068 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30069 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30070 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30071 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30072 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30073 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30074 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30075 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30076 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30077 CEOF
30078
30079 EOF
30080
30081   cat >>"$CONFIG_STATUS" <<\EOF
30082   # Split the substitutions into bite-sized pieces for seds with
30083   # small command number limits, like on Digital OSF/1 and HP-UX.
30084   ac_max_sed_lines=48
30085   ac_sed_frag=1 # Number of current file.
30086   ac_beg=1 # First line for current file.
30087   ac_end=$ac_max_sed_lines # Line after last line for current file.
30088   ac_more_lines=:
30089   ac_sed_cmds=
30090   while "$ac_more_lines"; do
30091     if test "$ac_beg" -gt 1; then
30092       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30093     else
30094       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30095     fi
30096     if test ! -s $tmp/subs.frag; then
30097       ac_more_lines=false
30098     else
30099       # The purpose of the label and of the branching condition is to
30100       # speed up the sed processing (if there are no `@' at all, there
30101       # is no need to browse any of the substitutions).
30102       # These are the two extra sed commands mentioned above.
30103       (echo ':t
30104   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
30105       # It is possible to make a multiline substitution using escaped newlines.
30106       # Ensure that we do not split the substitution between script fragments.
30107       ac_BEG=$ac_end
30108       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30109       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
30110       if test -s $tmp/subs.next; then
30111         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
30112         if test ! -s $tmp/subs.edit; then
30113           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
30114           if test ! -s $tmp/subs.edit; then
30115             if test "$ac_beg" -gt 1; then
30116               ac_end=`expr "$ac_end" - 1`
30117               continue
30118             fi
30119           fi
30120         fi
30121       fi
30122
30123       if test -z "$ac_sed_cmds"; then
30124         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
30125       else
30126         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
30127       fi
30128       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30129       ac_beg=$ac_end
30130       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30131     fi
30132   done
30133   if test -z "$ac_sed_cmds"; then
30134     ac_sed_cmds=cat
30135   fi
30136 fi # test -n "$CONFIG_FILES"
30137
30138 EOF
30139 cat >>"$CONFIG_STATUS" <<\EOF
30140 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30141   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30142   case "$ac_file" in
30143   - | *:- | *:-:* ) # input from stdin
30144         cat >$tmp/stdin
30145         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30146         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30147   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30148         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30149   * )   ac_file_in=$ac_file.in ;;
30150   esac
30151
30152   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30153   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30154          X"$ac_file" : 'X\(//\)[^/]' \| \
30155          X"$ac_file" : 'X\(//\)$' \| \
30156          X"$ac_file" : 'X\(/\)' \| \
30157          .     : '\(.\)' 2>/dev/null ||
30158 echo X"$ac_file" |
30159     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30160           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30161           /^X\(\/\/\)$/{ s//\1/; q; }
30162           /^X\(\/\).*/{ s//\1/; q; }
30163           s/.*/./; q'`
30164   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30165     { case "$ac_dir" in
30166   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30167   *)                      as_incr_dir=.;;
30168 esac
30169 as_dummy="$ac_dir"
30170 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30171   case $as_mkdir_dir in
30172     # Skip DOS drivespec
30173     ?:) as_incr_dir=$as_mkdir_dir ;;
30174     *)
30175       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30176       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30177     ;;
30178   esac
30179 done; }
30180
30181     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
30182     # A "../" for each directory in $ac_dir_suffix.
30183     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30184   else
30185     ac_dir_suffix= ac_dots=
30186   fi
30187
30188   case "$srcdir" in
30189   .)  ac_srcdir=.
30190       if test -z "$ac_dots"; then
30191          ac_top_srcdir=.
30192       else
30193          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30194       fi ;;
30195   [\\/]* | ?:[\\/]* )
30196       ac_srcdir="$srcdir$ac_dir_suffix";
30197       ac_top_srcdir="$srcdir" ;;
30198   *) # Relative path.
30199     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30200     ac_top_srcdir="$ac_dots$srcdir" ;;
30201   esac
30202
30203   case $INSTALL in
30204   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30205   *) ac_INSTALL=$ac_dots$INSTALL ;;
30206   esac
30207
30208   if test x"$ac_file" != x-; then
30209     { echo "$as_me:30209: creating $ac_file" >&5
30210 echo "$as_me: creating $ac_file" >&6;}
30211     rm -f "$ac_file"
30212   fi
30213   # Let's still pretend it is `configure' which instantiates (i.e., don't
30214   # use $as_me), people would be surprised to read:
30215   #    /* config.h.  Generated automatically by config.status.  */
30216   configure_input="Generated automatically from `echo $ac_file_in |
30217                                                  sed 's,.*/,,'` by configure."
30218
30219   # First look for the input files in the build tree, otherwise in the
30220   # src tree.
30221   ac_file_inputs=`IFS=:
30222     for f in $ac_file_in; do
30223       case $f in
30224       -) echo $tmp/stdin ;;
30225       [\\/$]*)
30226          # Absolute (can't be DOS-style, as IFS=:)
30227          test -f "$f" || { { echo "$as_me:30227: error: cannot find input file: $f" >&5
30228 echo "$as_me: error: cannot find input file: $f" >&2;}
30229    { (exit 1); exit 1; }; }
30230          echo $f;;
30231       *) # Relative
30232          if test -f "$f"; then
30233            # Build tree
30234            echo $f
30235          elif test -f "$srcdir/$f"; then
30236            # Source tree
30237            echo "$srcdir/$f"
30238          else
30239            # /dev/null tree
30240            { { echo "$as_me:30240: error: cannot find input file: $f" >&5
30241 echo "$as_me: error: cannot find input file: $f" >&2;}
30242    { (exit 1); exit 1; }; }
30243          fi;;
30244       esac
30245     done` || { (exit 1); exit 1; }
30246 EOF
30247 cat >>"$CONFIG_STATUS" <<\EOF
30248   ac_warn_datarootdir=no
30249   if test x"$ac_file" != x-; then
30250     for ac_item in $ac_file_inputs
30251     do
30252       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30253       if test -n "$ac_seen"; then
30254         ac_used=`grep '@datarootdir@' "$ac_item"`
30255         if test -z "$ac_used"; then
30256           { echo "$as_me:30256: WARNING: datarootdir was used implicitly but not set:
30257 $ac_seen" >&5
30258 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30259 $ac_seen" >&2;}
30260           ac_warn_datarootdir=yes
30261         fi
30262       fi
30263       ac_seen=`grep '${datarootdir}' "$ac_item"`
30264       if test -n "$ac_seen"; then
30265         { echo "$as_me:30265: WARNING: datarootdir was used explicitly but not set:
30266 $ac_seen" >&5
30267 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30268 $ac_seen" >&2;}
30269         ac_warn_datarootdir=yes
30270       fi
30271     done
30272   fi
30273
30274 if test "x$ac_warn_datarootdir" = xyes; then
30275   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30276 fi
30277
30278 EOF
30279 cat >>"$CONFIG_STATUS" <<EOF
30280   sed "$ac_vpsub
30281 $extrasub
30282 EOF
30283 cat >>"$CONFIG_STATUS" <<\EOF
30284 :t
30285 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30286 s,@configure_input@,$configure_input,;t t
30287 s,@srcdir@,$ac_srcdir,;t t
30288 s,@top_srcdir@,$ac_top_srcdir,;t t
30289 s,@INSTALL@,$ac_INSTALL,;t t
30290 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30291   rm -f $tmp/stdin
30292   if test x"$ac_file" != x-; then
30293     cp "$tmp/out" "$ac_file"
30294
30295     for ac_name in prefix exec_prefix datarootdir
30296     do
30297         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30298         if test -n "$ac_seen"; then
30299             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30300             if test -z "$ac_init"; then
30301               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30302               { echo "$as_me:30302: WARNING: Variable $ac_name is used but was not set:
30303 $ac_seen" >&5
30304 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30305 $ac_seen" >&2;}
30306             fi
30307         fi
30308     done
30309     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30310     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30311     if test -s $tmp/out; then
30312       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30313       { echo "$as_me:30313: WARNING: Some variables may not be substituted:
30314 $ac_seen" >&5
30315 echo "$as_me: WARNING: Some variables may not be substituted:
30316 $ac_seen" >&2;}
30317     fi
30318   else
30319     cat $tmp/out
30320   fi
30321   rm -f $tmp/out
30322
30323 done
30324 EOF
30325 cat >>"$CONFIG_STATUS" <<\EOF
30326
30327 #
30328 # CONFIG_HEADER section.
30329 #
30330
30331 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30332 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30333 #
30334 # ac_d sets the value in "#define NAME VALUE" lines.
30335 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30336 ac_dB='[        ].*$,\1#\2'
30337 ac_dC=' '
30338 ac_dD=',;t'
30339 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30340 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30341 ac_iB='\([      ]\),\1#\2define\3'
30342 ac_iC=' '
30343 ac_iD='\4,;t'
30344 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30345 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30346 ac_uB='$,\1#\2define\3'
30347 ac_uC=' '
30348 ac_uD=',;t'
30349
30350 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30351   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30352   case "$ac_file" in
30353   - | *:- | *:-:* ) # input from stdin
30354         cat >$tmp/stdin
30355         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30356         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30357   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30358         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30359   * )   ac_file_in=$ac_file.in ;;
30360   esac
30361
30362   test x"$ac_file" != x- && { echo "$as_me:30362: creating $ac_file" >&5
30363 echo "$as_me: creating $ac_file" >&6;}
30364
30365   # First look for the input files in the build tree, otherwise in the
30366   # src tree.
30367   ac_file_inputs=`IFS=:
30368     for f in $ac_file_in; do
30369       case $f in
30370       -) echo $tmp/stdin ;;
30371       [\\/$]*)
30372          # Absolute (can't be DOS-style, as IFS=:)
30373          test -f "$f" || { { echo "$as_me:30373: error: cannot find input file: $f" >&5
30374 echo "$as_me: error: cannot find input file: $f" >&2;}
30375    { (exit 1); exit 1; }; }
30376          echo $f;;
30377       *) # Relative
30378          if test -f "$f"; then
30379            # Build tree
30380            echo $f
30381          elif test -f "$srcdir/$f"; then
30382            # Source tree
30383            echo "$srcdir/$f"
30384          else
30385            # /dev/null tree
30386            { { echo "$as_me:30386: error: cannot find input file: $f" >&5
30387 echo "$as_me: error: cannot find input file: $f" >&2;}
30388    { (exit 1); exit 1; }; }
30389          fi;;
30390       esac
30391     done` || { (exit 1); exit 1; }
30392   # Remove the trailing spaces.
30393   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30394
30395 EOF
30396
30397 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30398 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30399 # be either 'cat' or 'sort'.
30400 cat confdefs.h | uniq >conftest.vals
30401
30402 # Break up conftest.vals because some shells have a limit on
30403 # the size of here documents, and old seds have small limits too.
30404
30405 rm -f conftest.tail
30406 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30407 while grep . conftest.vals >/dev/null
30408 do
30409   # Write chunks of a limited-size here document to conftest.frag.
30410   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30411   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30412   echo 'CEOF' >> "$CONFIG_STATUS"
30413   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30414   rm -f conftest.vals
30415   mv conftest.tail conftest.vals
30416 done
30417 rm -f conftest.vals
30418
30419 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30420 # marker @DEFS@.
30421 echo '  cat >> conftest.edit <<CEOF
30422 /@DEFS@/r conftest.frag
30423 /@DEFS@/d
30424 CEOF
30425 sed -f conftest.edit $tmp/in > $tmp/out
30426 rm -f $tmp/in
30427 mv $tmp/out $tmp/in
30428 rm -f conftest.edit conftest.frag
30429 ' >> "$CONFIG_STATUS"
30430
30431 cat >>"$CONFIG_STATUS" <<\EOF
30432   # Let's still pretend it is `configure' which instantiates (i.e., don't
30433   # use $as_me), people would be surprised to read:
30434   #    /* config.h.  Generated automatically by config.status.  */
30435   if test x"$ac_file" = x-; then
30436     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30437   else
30438     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30439   fi
30440   cat $tmp/in >>$tmp/config.h
30441   rm -f $tmp/in
30442   if test x"$ac_file" != x-; then
30443     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30444       { echo "$as_me:30444: $ac_file is unchanged" >&5
30445 echo "$as_me: $ac_file is unchanged" >&6;}
30446     else
30447       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30448          X"$ac_file" : 'X\(//\)[^/]' \| \
30449          X"$ac_file" : 'X\(//\)$' \| \
30450          X"$ac_file" : 'X\(/\)' \| \
30451          .     : '\(.\)' 2>/dev/null ||
30452 echo X"$ac_file" |
30453     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30454           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30455           /^X\(\/\/\)$/{ s//\1/; q; }
30456           /^X\(\/\).*/{ s//\1/; q; }
30457           s/.*/./; q'`
30458       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30459         { case "$ac_dir" in
30460   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30461   *)                      as_incr_dir=.;;
30462 esac
30463 as_dummy="$ac_dir"
30464 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30465   case $as_mkdir_dir in
30466     # Skip DOS drivespec
30467     ?:) as_incr_dir=$as_mkdir_dir ;;
30468     *)
30469       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30470       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30471     ;;
30472   esac
30473 done; }
30474
30475       fi
30476       rm -f "$ac_file"
30477       mv "$tmp/config.h" "$ac_file"
30478     fi
30479   else
30480     cat $tmp/config.h
30481     rm -f $tmp/config.h
30482   fi
30483 done
30484 EOF
30485 cat >>"$CONFIG_STATUS" <<\EOF
30486 #
30487 # CONFIG_COMMANDS section.
30488 #
30489 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30490   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30491   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30492
30493   case "$ac_dest" in
30494     default )
30495 if test "x$cf_with_tests" != xno ; then
30496
30497 for cf_dir in test
30498 do
30499         if test ! -d "$srcdir/$cf_dir" ; then
30500                 continue
30501         elif test -f "$srcdir/$cf_dir/programs" ; then
30502                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30503         fi
30504 done
30505
30506 fi
30507
30508 cf_prefix=$LIB_PREFIX
30509
30510 case "$cf_cv_shlib_version" in
30511 (cygdll|msysdll|mingw|msvcdll)
30512         TINFO_NAME=$TINFO_ARG_SUFFIX
30513         TINFO_SUFFIX=.dll
30514         ;;
30515 esac
30516
30517 if test -n "$TINFO_SUFFIX" ; then
30518         case "$TINFO_SUFFIX" in
30519         (tw*)
30520                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30521                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30522                 ;;
30523         (t*)
30524                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30525                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30526                 ;;
30527         (w*)
30528                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30529                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30530                 ;;
30531         esac
30532 fi
30533
30534 for cf_dir in $SRC_SUBDIRS
30535 do
30536         if test ! -d "$srcdir/$cf_dir" ; then
30537                 continue
30538         elif test -f "$srcdir/$cf_dir/modules" ; then
30539
30540                 SHARED_LIB=
30541                 Libs_To_Make=
30542                 cf_awk_program=
30543                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30544                 then
30545                         cf_awk_program="$cf_awk_program\
30546 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30547 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30548 "
30549                 fi
30550
30551                 if test "x$WILDCARD_SYMS" = xno
30552                 then
30553                         cf_awk_program="$cf_awk_program\
30554 /[      ]_\\*;/ { skip=1; next; }\
30555 "
30556                 fi
30557
30558                 if test "x$cf_awk_program" != "x"
30559                 then
30560                         cat >>$cf_dir/Makefile <<CF_EOF
30561
30562 # Generated by CF_LIB_RULES
30563 resulting.map: $UNALTERED_SYMS
30564         $AWK 'BEGIN { skip = 1; last=""; } \
30565 $cf_awk_program \
30566 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30567  skip = 0; last = \$\$0; } \
30568 END { print last; }' < "$UNALTERED_SYMS" >\$@
30569
30570 distclean::
30571         rm -f resulting.map
30572 CF_EOF
30573                 fi
30574
30575                 for cf_item in $cf_LIST_MODELS
30576                 do
30577
30578         case X$cf_item in
30579         (Xlibtool)
30580                 cf_suffix='.la'
30581                 cf_depsuf=$cf_suffix
30582                 ;;
30583         (Xdebug)
30584                 case "$cf_cv_system_name" in
30585                 (*-msvc*)
30586                         cf_suffix='_g.lib'
30587                         ;;
30588                 (*)
30589                         cf_suffix='_g.a'
30590                         ;;
30591                 esac
30592                 cf_depsuf=$cf_suffix
30593                 ;;
30594         (Xprofile)
30595                 case "$cf_cv_system_name" in
30596                 (*-msvc*)
30597                         cf_suffix='_p.lib'
30598                         ;;
30599                 (*)
30600                         cf_suffix='_p.a'
30601                         ;;
30602                 esac
30603                 cf_depsuf=$cf_suffix
30604                 ;;
30605         (Xshared)
30606                 case "$cf_cv_system_name" in
30607                 (aix[5-7]*)
30608                         cf_suffix='.so'
30609                         cf_depsuf=$cf_suffix
30610                         ;;
30611                 (*-msvc*)
30612                         cf_suffix='.dll'
30613                         cf_depsuf='.dll.lib'
30614                         ;;
30615                 (cygwin*|msys*|mingw*)
30616                         cf_suffix='.dll'
30617                         cf_depsuf='.dll.a'
30618                         ;;
30619                 (darwin*)
30620                         cf_suffix='.dylib'
30621                         cf_depsuf=$cf_suffix
30622                         ;;
30623                 (hpux*)
30624                         case "$target" in
30625                         (ia64*)
30626                                 cf_suffix='.so'
30627                                 cf_depsuf=$cf_suffix
30628                                 ;;
30629                         (*)
30630                                 cf_suffix='.sl'
30631                                 cf_depsuf=$cf_suffix
30632                                 ;;
30633                         esac
30634                         ;;
30635                 (*)
30636                         cf_suffix='.so'
30637                         cf_depsuf=$cf_suffix
30638                         ;;
30639                 esac
30640                 ;;
30641         (*)
30642                 case "$target" in
30643                 (*-msvc*)
30644                         cf_suffix='.lib'
30645                         ;;
30646                 (*)
30647                         cf_suffix='.a'
30648                         ;;
30649                 esac
30650                 cf_depsuf=$cf_suffix
30651                 ;;
30652         esac
30653         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30654         then
30655                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30656                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30657         fi
30658
30659                         if test "$cf_dir" = "c++"
30660                         then
30661
30662 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30663
30664 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30665
30666                         else
30667
30668 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30669
30670 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30671
30672                         fi
30673                         test -z "$cf_libname" && cf_libname="$cf_dir"
30674                         if test "$cf_item" = shared ; then
30675                                 if test -n "${LIB_SUFFIX}"
30676                                 then
30677                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30678                                 else
30679                                         cf_shared_suffix="$cf_suffix"
30680                                 fi
30681                                 if test "$cf_cv_do_symlinks" = yes ; then
30682                                         cf_version_name=
30683
30684                                         case "$cf_cv_shlib_version" in
30685                                         (rel)
30686                                                 cf_version_name=REL_VERSION
30687                                                 ;;
30688                                         (abi)
30689                                                 cf_version_name=ABI_VERSION
30690                                                 ;;
30691                                         esac
30692
30693                                         if test -n "$cf_version_name"
30694                                         then
30695                                                 case "$cf_cv_system_name" in
30696                                                 (darwin*)
30697                                                         # "w", etc?
30698                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30699                                                         ;;
30700                                                 (*)
30701                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30702                                                         ;;
30703                                                 esac
30704                                         fi
30705                                         if test -n "${USE_LIB_SUFFIX}"
30706                                         then
30707                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30708                                         else
30709                                                 cf_shared_suffix="$cf_suffix"
30710                                         fi
30711                                 fi
30712                                 # cygwin needs import library, and has unique naming convention
30713                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30714                                 # use 'cyg' prefix for shared lib.
30715                                 case "$cf_cv_shlib_version" in
30716                                 (cygdll)
30717                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30718                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30719                                         ;;
30720                                 (msysdll)
30721                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30722                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30723                                         ;;
30724                                 (mingw)
30725                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30726                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30727                                         ;;
30728                                 (msvcdll)
30729                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30730                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30731                                         ;;
30732                                 (*)
30733                                         cf_add_lib=
30734                                         ;;
30735                                 esac
30736                                 if test -n "$cf_add_lib"
30737                                 then
30738                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30739                                         continue
30740                                 fi
30741                         fi
30742                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30743                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30744                 done
30745
30746                 if test "$cf_dir" = ncurses ; then
30747                         cf_subsets="$LIB_SUBSETS"
30748                         cf_r_parts="$cf_subsets"
30749                         cf_liblist="$Libs_To_Make"
30750
30751                         while test -n "$cf_r_parts"
30752                         do
30753                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30754                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30755                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30756                                         cf_add_lib=
30757                                         case "$cf_l_parts" in
30758                                         (*termlib*)
30759                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30760                                                 ;;
30761                                         (*ticlib*)
30762                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30763                                                 ;;
30764                                         (*)
30765                                                 break
30766                                                 ;;
30767                                         esac
30768                                         if test -n "$cf_add_lib"; then
30769                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30770                                         fi
30771                                 else
30772                                         break
30773                                 fi
30774                         done
30775                 else
30776                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30777                 fi
30778
30779                 if test "$cf_dir" = c++; then
30780                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30781                                 cf_list=
30782                                 for cf_item in $Libs_To_Make
30783                                 do
30784                                         case "$cf_item" in
30785                                         (*.a)
30786                                                 ;;
30787                                         (*)
30788                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30789                                                 ;;
30790                                         esac
30791                                         for cf_test in $cf_list
30792                                         do
30793                                                 if test "$cf_test" = "$cf_item"
30794                                                 then
30795                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30796                                                         cf_item=
30797                                                         break
30798                                                 fi
30799                                         done
30800                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30801                                 done
30802                                 Libs_To_Make="$cf_list"
30803                         fi
30804                 fi
30805
30806                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30807                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30808                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30809                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30810
30811                 $AWK -f "$srcdir/mk-0th.awk" \
30812                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30813                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30814
30815                 for cf_subset in $cf_subsets
30816                 do
30817                         cf_subdirs=
30818                         for cf_item in $cf_LIST_MODELS
30819                         do
30820
30821                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30822
30823 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30824
30825                         CXX_MODEL=$cf_ITEM
30826                         if test "$CXX_MODEL" = SHARED; then
30827                                 case "$cf_cv_shlib_version" in
30828                                 (cygdll|msysdll|mingw|msvcdll)
30829                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30830
30831 echo "${as_me:-configure}:30831: testing overriding CXX_MODEL to SHARED ..." 1>&5
30832
30833                                         with_shared_cxx=yes
30834                                         ;;
30835                                 (*)
30836                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30837                                         ;;
30838                                 esac
30839                         fi
30840
30841         case X$cf_item in
30842         (Xlibtool)
30843                 cf_suffix='.la'
30844                 cf_depsuf=$cf_suffix
30845                 ;;
30846         (Xdebug)
30847                 case "$cf_cv_system_name" in
30848                 (*-msvc*)
30849                         cf_suffix='_g.lib'
30850                         ;;
30851                 (*)
30852                         cf_suffix='_g.a'
30853                         ;;
30854                 esac
30855                 cf_depsuf=$cf_suffix
30856                 ;;
30857         (Xprofile)
30858                 case "$cf_cv_system_name" in
30859                 (*-msvc*)
30860                         cf_suffix='_p.lib'
30861                         ;;
30862                 (*)
30863                         cf_suffix='_p.a'
30864                         ;;
30865                 esac
30866                 cf_depsuf=$cf_suffix
30867                 ;;
30868         (Xshared)
30869                 case "$cf_cv_system_name" in
30870                 (aix[5-7]*)
30871                         cf_suffix='.so'
30872                         cf_depsuf=$cf_suffix
30873                         ;;
30874                 (*-msvc*)
30875                         cf_suffix='.dll'
30876                         cf_depsuf='.dll.lib'
30877                         ;;
30878                 (cygwin*|msys*|mingw*)
30879                         cf_suffix='.dll'
30880                         cf_depsuf='.dll.a'
30881                         ;;
30882                 (darwin*)
30883                         cf_suffix='.dylib'
30884                         cf_depsuf=$cf_suffix
30885                         ;;
30886                 (hpux*)
30887                         case "$target" in
30888                         (ia64*)
30889                                 cf_suffix='.so'
30890                                 cf_depsuf=$cf_suffix
30891                                 ;;
30892                         (*)
30893                                 cf_suffix='.sl'
30894                                 cf_depsuf=$cf_suffix
30895                                 ;;
30896                         esac
30897                         ;;
30898                 (*)
30899                         cf_suffix='.so'
30900                         cf_depsuf=$cf_suffix
30901                         ;;
30902                 esac
30903                 ;;
30904         (*)
30905                 case "$target" in
30906                 (*-msvc*)
30907                         cf_suffix='.lib'
30908                         ;;
30909                 (*)
30910                         cf_suffix='.a'
30911                         ;;
30912                 esac
30913                 cf_depsuf=$cf_suffix
30914                 ;;
30915         esac
30916         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30917         then
30918                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30919                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30920         fi
30921
30922         case $cf_item in
30923         (libtool) cf_subdir='obj_lo'  ;;
30924         (normal)  cf_subdir='objects' ;;
30925         (debug)   cf_subdir='obj_g' ;;
30926         (profile) cf_subdir='obj_p' ;;
30927         (shared)
30928                 case "$cf_cv_system_name" in
30929                 (cygwin|msys)
30930                         cf_subdir='objects' ;;
30931                 (*)
30932                         cf_subdir='obj_s' ;;
30933                 esac
30934         esac
30935
30936                         # Test for case where we build libtinfo with a different name.
30937                         cf_libname=$cf_dir
30938                         if test "$cf_dir" = ncurses ; then
30939                                 case "$cf_subset" in
30940                                 (*base*)
30941                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30942                                         ;;
30943                                 (*termlib*)
30944                                         cf_libname=$TINFO_LIB_SUFFIX
30945                                         ;;
30946                                 (ticlib*)
30947                                         cf_libname=$TICS_LIB_SUFFIX
30948                                         ;;
30949                                 esac
30950                         elif test "$cf_dir" = c++ ; then
30951
30952 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30953
30954 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30955
30956                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30957                         else
30958
30959 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30960
30961 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30962
30963                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30964                         fi
30965                         if test -n "${USE_ARG_SUFFIX}" ; then
30966                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30967                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30968                         fi
30969
30970                         # These dependencies really are for development, not
30971                         # builds, but they are useful in porting, too.
30972                         cf_depend="../include/ncurses_cfg.h"
30973                         if test "$srcdir" = "."; then
30974                                 cf_reldir="."
30975                         else
30976                                 cf_reldir="\${srcdir}"
30977                         fi
30978
30979                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30980                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30981                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30982                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30983                         fi
30984
30985                         cf_dir_suffix=
30986                         old_cf_suffix="$cf_suffix"
30987                         if test "$cf_cv_shlib_version_infix" = yes ; then
30988                         if test -n "$USE_LIB_SUFFIX" ; then
30989                                 case "$USE_LIB_SUFFIX" in
30990                                 (tw*)
30991                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30992                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30993                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30994                                         ;;
30995                                 (t*)
30996                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30997                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30998                                         cf_dir_suffix=t$EXTRA_SUFFIX
30999                                         ;;
31000                                 (w*)
31001                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31002                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31003                                         cf_dir_suffix=w$EXTRA_SUFFIX
31004                                         ;;
31005                                 (*)
31006                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31007                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31008                                         cf_dir_suffix=$EXTRA_SUFFIX
31009                                         ;;
31010                                 esac
31011                         fi
31012                         fi
31013
31014                         $AWK -f "$srcdir/mk-1st.awk" \
31015                                 name=${cf_libname}${cf_dir_suffix} \
31016                                 traces=$LIB_TRACING \
31017                                 MODEL=$cf_ITEM \
31018                                 CXX_MODEL=$CXX_MODEL \
31019                                 LIB_SUFFIX=$LIB_SUFFIX \
31020                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31021                                 make_phony="${cf_cv_make_PHONY:-no}" \
31022                                 model=$cf_subdir \
31023                                 prefix=$cf_prefix \
31024                                 suffix=$cf_suffix \
31025                                 subset=$cf_subset \
31026                                 driver=$cf_cv_term_driver \
31027                                 SymLink="$LN_S" \
31028                                 TermlibRoot=$TINFO_NAME \
31029                                 TermlibSuffix=$TINFO_SUFFIX \
31030                                 ShlibVer=$cf_cv_shlib_version \
31031                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31032                                 ReLink=${cf_cv_do_relink:-no} \
31033                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31034                                 DoLinks=$cf_cv_do_symlinks \
31035                                 rmSoLocs=$cf_cv_rm_so_locs \
31036                                 ldconfig="$LDCONFIG" \
31037                                 overwrite=$WITH_OVERWRITE \
31038                                 depend="$cf_depend" \
31039                                 host="$host" \
31040                                 libtool_version="$LIBTOOL_VERSION" \
31041                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31042
31043                         cf_suffix="$old_cf_suffix"
31044
31045                         for cf_subdir2 in $cf_subdirs lib
31046                         do
31047                                 test "$cf_subdir" = "$cf_subdir2" && break
31048                         done
31049                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31050                         $AWK -f "$srcdir/mk-2nd.awk" \
31051                                 name=$cf_dir \
31052                                 traces=$LIB_TRACING \
31053                                 MODEL=$cf_ITEM \
31054                                 model=$cf_subdir \
31055                                 subset=$cf_subset \
31056                                 srcdir=$srcdir \
31057                                 echo=$WITH_ECHO \
31058                                 crenames=$cf_cv_prog_CC_c_o \
31059                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31060                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31061                         cf_subdirs="$cf_subdirs $cf_subdir"
31062                         done
31063                 done
31064         fi
31065
31066         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31067 done
31068
31069 echo >> Makefile
31070 echo '# generated by CF_LIB_RULES' >> Makefile
31071
31072 if test "x$cf_cv_make_PHONY" = xyes ; then
31073         cat >> Makefile <<-CF_EOF
31074
31075         .PHONY :        libs
31076         .PHONY :        lintlib
31077         .PHONY :        install.includes
31078         .PHONY :        uninstall.includes
31079         .PHONY :        install.libs
31080         .PHONY :        uninstall.libs
31081 CF_EOF
31082 fi
31083
31084 for cf_dir in $SRC_SUBDIRS
31085 do
31086         if test ! -d "$srcdir/$cf_dir" ; then
31087                 continue
31088         fi
31089
31090         if test -f "$cf_dir/Makefile" ; then
31091                 case "$cf_dir" in
31092                 (Ada95)
31093                         echo 'libs \' >> Makefile
31094                         echo 'install.libs \' >> Makefile
31095                         echo 'uninstall.libs ::' >> Makefile
31096                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31097                         ;;
31098                 esac
31099         fi
31100
31101         if test -f "$srcdir/$cf_dir/modules" ; then
31102
31103                 if test "x$cf_cv_make_PHONY" = xyes ; then
31104                         cat >> Makefile <<-CF_EOF
31105
31106                         .PHONY :        install.$cf_dir
31107                         .PHONY :        uninstall.$cf_dir
31108 CF_EOF
31109                 fi
31110
31111                 echo >> Makefile
31112                 if test -f "$srcdir/$cf_dir/headers" ; then
31113 cat >> Makefile <<CF_EOF
31114 install.includes \\
31115 uninstall.includes \\
31116 CF_EOF
31117                 fi
31118
31119 cat >> Makefile <<CF_EOF
31120 lint \\
31121 libs \\
31122 lintlib \\
31123 install.libs \\
31124 uninstall.libs \\
31125 install.$cf_dir \\
31126 uninstall.$cf_dir ::
31127         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31128 CF_EOF
31129         elif test -f "$srcdir/$cf_dir/headers" ; then
31130 cat >> Makefile <<CF_EOF
31131
31132 libs \\
31133 install.libs \\
31134 uninstall.libs \\
31135 install.includes \\
31136 uninstall.includes ::
31137         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31138 CF_EOF
31139 fi
31140 done
31141
31142 if test "x$cf_cv_make_PHONY" = xyes ; then
31143         cat >> Makefile <<-CF_EOF
31144
31145         .PHONY :        install.data
31146         .PHONY :        uninstall.data
31147 CF_EOF
31148 fi
31149
31150 if test "x$cf_with_db_install" = xyes; then
31151 cat >> Makefile <<CF_EOF
31152
31153 install.libs uninstall.libs \\
31154 install.data uninstall.data ::
31155 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31156 CF_EOF
31157 else
31158 cat >> Makefile <<CF_EOF
31159
31160 install.libs uninstall.libs ::
31161         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31162 CF_EOF
31163 fi
31164
31165 if test "x$cf_with_manpages" = xyes; then
31166
31167 if test "x$cf_cv_make_PHONY" = xyes ; then
31168         cat >> Makefile <<-CF_EOF
31169
31170         .PHONY :        install.man
31171         .PHONY :        uninstall.man
31172 CF_EOF
31173 fi
31174
31175 cat >> Makefile <<CF_EOF
31176
31177 install.man \\
31178 uninstall.man ::
31179         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31180 CF_EOF
31181 fi
31182
31183 cat >> Makefile <<CF_EOF
31184
31185 distclean ::
31186         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31187         rm -f headers.sh headers.sed mk_shared_lib.sh
31188         rm -f edit_man.* man_alias.*
31189         rm -rf \${DIRS_TO_MAKE}
31190 CF_EOF
31191
31192 # Special case: tack's manpage lives in its own directory.
31193 if test "x$cf_with_manpages" = xyes; then
31194 if test "x$cf_with_tack" = "xyes"; then
31195 cat >> Makefile <<CF_EOF
31196
31197 install.man \\
31198 uninstall.man ::
31199         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31200 CF_EOF
31201 fi
31202 fi
31203
31204 rm -f headers.sed headers.sh
31205
31206 echo creating headers.sh
31207 cat >headers.sh <<CF_EOF
31208 #! $SHELL
31209 # This shell script is generated by the 'configure' script.  It is invoked in a
31210 # subdirectory of the build tree.  It generates a sed-script in the parent
31211 # directory that is used to adjust includes for header files that reside in a
31212 # subdirectory of /usr/include, etc.
31213 PRG=""
31214 while test \$# != 3
31215 do
31216 PRG="\$PRG \$1"; shift
31217 done
31218 DST=\$1
31219 REF=\$2
31220 SRC=\$3
31221 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31222 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31223 echo installing \$SRC in \$DST
31224 CF_EOF
31225
31226 if test "$WITH_CURSES_H" = yes; then
31227         cat >>headers.sh <<CF_EOF
31228 case \$DST in
31229 (/*/include/*)
31230         END=\`basename \$DST\`
31231         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31232         do
31233                 NAME=\`basename \$i\`
31234                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31235         done
31236         ;;
31237 (*)
31238         echo "" >> \$TMPSED
31239         ;;
31240 esac
31241 CF_EOF
31242
31243 else
31244         cat >>headers.sh <<CF_EOF
31245 case \$DST in
31246 (/*/include/*)
31247         END=\`basename \$DST\`
31248         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31249         do
31250                 NAME=\`basename \$i\`
31251                 if test "\$NAME" = "curses.h"
31252                 then
31253                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31254                         NAME=ncurses.h
31255                 fi
31256                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31257         done
31258         ;;
31259 (*)
31260         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31261         ;;
31262 esac
31263 CF_EOF
31264 fi
31265 cat >>headers.sh <<CF_EOF
31266 rm -f \$TMPSRC
31267 sed -f \$TMPSED \$SRC > \$TMPSRC
31268 NAME=\`basename \$SRC\`
31269 CF_EOF
31270 if test "$WITH_CURSES_H" != yes; then
31271         cat >>headers.sh <<CF_EOF
31272 test "\$NAME" = "curses.h" && NAME=ncurses.h
31273 CF_EOF
31274 fi
31275 cat >>headers.sh <<CF_EOF
31276 # Just in case someone gzip'd manpages, remove the conflicting copy.
31277 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31278
31279 eval \$PRG \$TMPSRC \$DST/\$NAME
31280 rm -f \$TMPSRC \$TMPSED
31281 CF_EOF
31282
31283 chmod 0755 headers.sh
31284
31285 for cf_dir in $SRC_SUBDIRS
31286 do
31287         if test ! -d "$srcdir/$cf_dir" ; then
31288                 continue
31289         fi
31290
31291         if test -f "$srcdir/$cf_dir/headers" ; then
31292                 $AWK -f "$srcdir/mk-hdr.awk" \
31293                         subset="$LIB_SUBSETS" \
31294                         compat="$WITH_CURSES_H" \
31295                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31296         fi
31297
31298         if test -f "$srcdir/$cf_dir/modules" ; then
31299                 if test "$cf_dir" != "c++" ; then
31300                         if test "x$cf_cv_make_PHONY" = xyes ; then
31301                                 cat >> $cf_dir/Makefile <<-CF_EOF
31302
31303                                 .PHONY :        depend
31304 CF_EOF
31305                         fi
31306
31307                         cat >>$cf_dir/Makefile <<"CF_EOF"
31308 depend : ${AUTO_SRC}
31309         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31310
31311 # DO NOT DELETE THIS LINE -- make depend depends on it.
31312 CF_EOF
31313                 fi
31314         fi
31315 done
31316
31317 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31318 if test -z "$USE_OLD_MAKERULES" ; then
31319         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31320 fi
31321 fi
31322  ;;
31323   esac
31324 done
31325 EOF
31326
31327 cat >>"$CONFIG_STATUS" <<\EOF
31328
31329 { (exit 0); exit 0; }
31330 EOF
31331 chmod +x "$CONFIG_STATUS"
31332 ac_clean_files=$ac_clean_files_save
31333
31334 # configure is writing to config.log, and then calls config.status.
31335 # config.status does its own redirection, appending to config.log.
31336 # Unfortunately, on DOS this fails, as config.log is still kept open
31337 # by configure, so config.status won't be able to write to it; its
31338 # output is simply discarded.  So we exec the FD to /dev/null,
31339 # effectively closing config.log, so it can be properly (re)opened and
31340 # appended to by config.status.  When coming back to configure, we
31341 # need to make the FD available again.
31342 if test "$no_create" != yes; then
31343   ac_cs_success=:
31344   exec 5>/dev/null
31345   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31346   exec 5>>config.log
31347   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31348   # would make configure fail if this is the last instruction.
31349   "$ac_cs_success" || { (exit 1); exit 1; }
31350 fi
31351 ${MAKE:-make} preinstall