]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210718
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.736 .
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 case x$cf_cv_abi_version in
1724 (x[6789])
1725         cf_dft_ext_colors=yes
1726         cf_dft_ext_const=yes
1727         cf_dft_ext_mouse=yes
1728         cf_dft_ext_putwin=yes
1729         cf_dft_ext_spfuncs=yes
1730         cf_dft_filter_syms=yes
1731         cf_dft_chtype=uint32_t
1732         cf_dft_mmask_t=uint32_t
1733         cf_dft_interop=yes
1734         cf_dft_tparm_arg=intptr_t
1735         cf_dft_with_lp64=yes
1736         ;;
1737 (*)
1738         cf_dft_ext_colors=no
1739         cf_dft_ext_const=no
1740         cf_dft_ext_mouse=no
1741         cf_dft_ext_putwin=no
1742         cf_dft_ext_spfuncs=no
1743         cf_dft_filter_syms=no
1744         cf_dft_chtype=auto
1745         cf_dft_mmask_t=auto
1746         cf_dft_interop=no
1747         cf_dft_tparm_arg=long
1748         cf_dft_with_lp64=no
1749         ;;
1750 esac
1751
1752 ###     Checks for programs.
1753
1754 # Check whether --with-ada or --without-ada was given.
1755 if test "${with_ada+set}" = set; then
1756   withval="$with_ada"
1757   cf_with_ada=$withval
1758 else
1759   cf_with_ada=yes
1760 fi;
1761
1762 if test "x$cf_with_ada" = xyes
1763 then
1764         cf_prog_cc="gnatgcc gcc cc"
1765 else
1766         cf_prog_cc="gcc cc"
1767 fi
1768
1769 ac_ext=c
1770 ac_cpp='$CPP $CPPFLAGS'
1771 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1772 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1774 ac_main_return="return"
1775 if test -n "$ac_tool_prefix"; then
1776   for ac_prog in $cf_prog_cc
1777   do
1778     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1779 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1780 echo "$as_me:1780: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   ac_save_IFS=$IFS; IFS=$ac_path_separator
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791   IFS=$ac_save_IFS
1792   test -z "$ac_dir" && ac_dir=.
1793   $as_executable_p "$ac_dir/$ac_word" || continue
1794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1795 echo "$as_me:1795: found $ac_dir/$ac_word" >&5
1796 break
1797 done
1798
1799 fi
1800 fi
1801 CC=$ac_cv_prog_CC
1802 if test -n "$CC"; then
1803   echo "$as_me:1803: result: $CC" >&5
1804 echo "${ECHO_T}$CC" >&6
1805 else
1806   echo "$as_me:1806: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1808 fi
1809
1810     test -n "$CC" && break
1811   done
1812 fi
1813 if test -z "$CC"; then
1814   ac_ct_CC=$CC
1815   for ac_prog in $cf_prog_cc
1816 do
1817   # Extract the first word of "$ac_prog", so it can be a program name with args.
1818 set dummy $ac_prog; ac_word=$2
1819 echo "$as_me:1819: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1822   echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824   if test -n "$ac_ct_CC"; then
1825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1826 else
1827   ac_save_IFS=$IFS; IFS=$ac_path_separator
1828 ac_dummy="$PATH"
1829 for ac_dir in $ac_dummy; do
1830   IFS=$ac_save_IFS
1831   test -z "$ac_dir" && ac_dir=.
1832   $as_executable_p "$ac_dir/$ac_word" || continue
1833 ac_cv_prog_ac_ct_CC="$ac_prog"
1834 echo "$as_me:1834: found $ac_dir/$ac_word" >&5
1835 break
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:1842: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:1845: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 test -z "$CC" && { { echo "$as_me:1855: error: no acceptable cc found in \$PATH" >&5
1856 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1857    { (exit 1); exit 1; }; }
1858
1859 # Provide some information about the compiler.
1860 echo "$as_me:1860:" \
1861      "checking for C compiler version" >&5
1862 ac_compiler=`set X $ac_compile; echo "$2"`
1863 { (eval echo "$as_me:1863: \"$ac_compiler --version </dev/null >&5\"") >&5
1864   (eval $ac_compiler --version </dev/null >&5) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit "$ac_status"); }
1868 { (eval echo "$as_me:1868: \"$ac_compiler -v </dev/null >&5\"") >&5
1869   (eval $ac_compiler -v </dev/null >&5) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit "$ac_status"); }
1873 { (eval echo "$as_me:1873: \"$ac_compiler -V </dev/null >&5\"") >&5
1874   (eval $ac_compiler -V </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit "$ac_status"); }
1878
1879 cat >"conftest.$ac_ext" <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 ac_clean_files_save=$ac_clean_files
1892 ac_clean_files="$ac_clean_files a.out a.exe"
1893 # Try to create an executable without -o first, disregard a.out.
1894 # It will help us diagnose broken compilers, and finding out an intuition
1895 # of exeext.
1896 echo "$as_me:1896: checking for C compiler default output" >&5
1897 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1898 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1899 if { (eval echo "$as_me:1899: \"$ac_link_default\"") >&5
1900   (eval $ac_link_default) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit "$ac_status"); }; then
1904   # Find the output, starting from the most likely.  This scheme is
1905 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1906 # resort.
1907 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1908                 ls a.out conftest 2>/dev/null;
1909                 ls a.* conftest.* 2>/dev/null`; do
1910   case $ac_file in
1911     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1912     a.out ) # We found the default executable, but exeext='' is most
1913             # certainly right.
1914             break;;
1915     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1916           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1917           export ac_cv_exeext
1918           break;;
1919     * ) break;;
1920   esac
1921 done
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat "conftest.$ac_ext" >&5
1925 { { echo "$as_me:1925: error: C compiler cannot create executables" >&5
1926 echo "$as_me: error: C compiler cannot create executables" >&2;}
1927    { (exit 77); exit 77; }; }
1928 fi
1929
1930 ac_exeext=$ac_cv_exeext
1931 echo "$as_me:1931: result: $ac_file" >&5
1932 echo "${ECHO_T}$ac_file" >&6
1933
1934 # Check the compiler produces executables we can run.  If not, either
1935 # the compiler is broken, or we cross compile.
1936 echo "$as_me:1936: checking whether the C compiler works" >&5
1937 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1938 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1939 # If not cross compiling, check that we can run a simple program.
1940 if test "$cross_compiling" != yes; then
1941   if { ac_try='./$ac_file'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit "$ac_status"); }; }; then
1947     cross_compiling=no
1948   else
1949     if test "$cross_compiling" = maybe; then
1950         cross_compiling=yes
1951     else
1952         { { echo "$as_me:1952: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&5
1954 echo "$as_me: error: cannot run C compiled programs.
1955 If you meant to cross compile, use \`--host'." >&2;}
1956    { (exit 1); exit 1; }; }
1957     fi
1958   fi
1959 fi
1960 echo "$as_me:1960: result: yes" >&5
1961 echo "${ECHO_T}yes" >&6
1962
1963 rm -f a.out a.exe "conftest$ac_cv_exeext"
1964 ac_clean_files=$ac_clean_files_save
1965 # Check the compiler produces executables we can run.  If not, either
1966 # the compiler is broken, or we cross compile.
1967 echo "$as_me:1967: checking whether we are cross compiling" >&5
1968 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1969 echo "$as_me:1969: result: $cross_compiling" >&5
1970 echo "${ECHO_T}$cross_compiling" >&6
1971
1972 echo "$as_me:1972: checking for executable suffix" >&5
1973 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1974 if { (eval echo "$as_me:1974: \"$ac_link\"") >&5
1975   (eval $ac_link) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit "$ac_status"); }; then
1979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1981 # work properly (i.e., refer to `conftest.exe'), while it won't with
1982 # `rm'.
1983 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1984   case $ac_file in
1985     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1987           export ac_cv_exeext
1988           break;;
1989     * ) break;;
1990   esac
1991 done
1992 else
1993   { { echo "$as_me:1993: error: cannot compute EXEEXT: cannot compile and link" >&5
1994 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1995    { (exit 1); exit 1; }; }
1996 fi
1997
1998 rm -f "conftest$ac_cv_exeext"
1999 echo "$as_me:1999: result: $ac_cv_exeext" >&5
2000 echo "${ECHO_T}$ac_cv_exeext" >&6
2001
2002 rm -f "conftest.$ac_ext"
2003 EXEEXT=$ac_cv_exeext
2004 ac_exeext=$EXEEXT
2005 echo "$as_me:2005: checking for object suffix" >&5
2006 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2007 if test "${ac_cv_objext+set}" = set; then
2008   echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010   cat >"conftest.$ac_ext" <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013
2014 int
2015 main (void)
2016 {
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.o conftest.obj
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit "$ac_status"); }; then
2028   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2029   case $ac_file in
2030     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2032        break;;
2033   esac
2034 done
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat "conftest.$ac_ext" >&5
2038 { { echo "$as_me:2038: error: cannot compute OBJEXT: cannot compile" >&5
2039 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2040    { (exit 1); exit 1; }; }
2041 fi
2042
2043 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2044 fi
2045 echo "$as_me:2045: result: $ac_cv_objext" >&5
2046 echo "${ECHO_T}$ac_cv_objext" >&6
2047 OBJEXT=$ac_cv_objext
2048 ac_objext=$OBJEXT
2049 echo "$as_me:2049: checking whether we are using the GNU C compiler" >&5
2050 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2051 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2052   echo $ECHO_N "(cached) $ECHO_C" >&6
2053 else
2054   cat >"conftest.$ac_ext" <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057
2058 int
2059 main (void)
2060 {
2061 #ifndef __GNUC__
2062        choke me
2063 #endif
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f "conftest.$ac_objext"
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit "$ac_status"); } &&
2075          { ac_try='test -s "conftest.$ac_objext"'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; }; then
2081   ac_compiler_gnu=yes
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat "conftest.$ac_ext" >&5
2085 ac_compiler_gnu=no
2086 fi
2087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2088 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2089
2090 fi
2091 echo "$as_me:2091: result: $ac_cv_c_compiler_gnu" >&5
2092 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2093 GCC=`test $ac_compiler_gnu = yes && echo yes`
2094 ac_test_CFLAGS=${CFLAGS+set}
2095 ac_save_CFLAGS=$CFLAGS
2096 CFLAGS="-g"
2097 echo "$as_me:2097: checking whether $CC accepts -g" >&5
2098 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_g+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   cat >"conftest.$ac_ext" <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105
2106 int
2107 main (void)
2108 {
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 rm -f "conftest.$ac_objext"
2115 if { (eval echo "$as_me:2115: \"$ac_compile\"") >&5
2116   (eval $ac_compile) 2>&5
2117   ac_status=$?
2118   echo "$as_me:2118: \$? = $ac_status" >&5
2119   (exit "$ac_status"); } &&
2120          { ac_try='test -s "conftest.$ac_objext"'
2121   { (eval echo "$as_me:2121: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:2124: \$? = $ac_status" >&5
2125   (exit "$ac_status"); }; }; then
2126   ac_cv_prog_cc_g=yes
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 cat "conftest.$ac_ext" >&5
2130 ac_cv_prog_cc_g=no
2131 fi
2132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2133 fi
2134 echo "$as_me:2134: result: $ac_cv_prog_cc_g" >&5
2135 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2136 if test "$ac_test_CFLAGS" = set; then
2137   CFLAGS=$ac_save_CFLAGS
2138 elif test $ac_cv_prog_cc_g = yes; then
2139   if test "$GCC" = yes; then
2140     CFLAGS="-g -O2"
2141   else
2142     CFLAGS="-g"
2143   fi
2144 else
2145   if test "$GCC" = yes; then
2146     CFLAGS="-O2"
2147   else
2148     CFLAGS=
2149   fi
2150 fi
2151 # Some people use a C++ compiler to compile C.  Since we use `exit',
2152 # in C++ we need to declare it.  In case someone uses the same compiler
2153 # for both compiling C and C++ we need to have the C++ compiler decide
2154 # the declaration of exit, since it's the most demanding environment.
2155 cat >"conftest.$ac_ext" <<_ACEOF
2156 #ifndef __cplusplus
2157   choke me
2158 #endif
2159 _ACEOF
2160 rm -f "conftest.$ac_objext"
2161 if { (eval echo "$as_me:2161: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit "$ac_status"); } &&
2166          { ac_try='test -s "conftest.$ac_objext"'
2167   { (eval echo "$as_me:2167: \"$ac_try\"") >&5
2168   (eval $ac_try) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit "$ac_status"); }; }; then
2172   for ac_declaration in \
2173    ''\
2174    '#include <stdlib.h>' \
2175    'extern "C" void std::exit (int) throw (); using std::exit;' \
2176    'extern "C" void std::exit (int); using std::exit;' \
2177    'extern "C" void exit (int) throw ();' \
2178    'extern "C" void exit (int);' \
2179    'void exit (int);'
2180 do
2181   cat >"conftest.$ac_ext" <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184 #include <stdlib.h>
2185 $ac_declaration
2186 int
2187 main (void)
2188 {
2189 exit (42);
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f "conftest.$ac_objext"
2195 if { (eval echo "$as_me:2195: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:2198: \$? = $ac_status" >&5
2199   (exit "$ac_status"); } &&
2200          { ac_try='test -s "conftest.$ac_objext"'
2201   { (eval echo "$as_me:2201: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit "$ac_status"); }; }; then
2206   :
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 continue
2211 fi
2212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2213   cat >"conftest.$ac_ext" <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 $ac_declaration
2217 int
2218 main (void)
2219 {
2220 exit (42);
2221   ;
2222   return 0;
2223 }
2224 _ACEOF
2225 rm -f "conftest.$ac_objext"
2226 if { (eval echo "$as_me:2226: \"$ac_compile\"") >&5
2227   (eval $ac_compile) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); } &&
2231          { ac_try='test -s "conftest.$ac_objext"'
2232   { (eval echo "$as_me:2232: \"$ac_try\"") >&5
2233   (eval $ac_try) 2>&5
2234   ac_status=$?
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit "$ac_status"); }; }; then
2237   break
2238 else
2239   echo "$as_me: failed program was:" >&5
2240 cat "conftest.$ac_ext" >&5
2241 fi
2242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2243 done
2244 rm -rf conftest*
2245 if test -n "$ac_declaration"; then
2246   echo '#ifdef __cplusplus' >>confdefs.h
2247   echo "$ac_declaration"    >>confdefs.h
2248   echo '#endif'             >>confdefs.h
2249 fi
2250
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat "conftest.$ac_ext" >&5
2254 fi
2255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2256 ac_ext=c
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2259 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2261 ac_main_return="return"
2262
2263 GCC_VERSION=none
2264 if test "$GCC" = yes ; then
2265         echo "$as_me:2265: checking version of $CC" >&5
2266 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2267         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.].*//'`"
2268         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2269         echo "$as_me:2269: result: $GCC_VERSION" >&5
2270 echo "${ECHO_T}$GCC_VERSION" >&6
2271 fi
2272
2273 INTEL_COMPILER=no
2274
2275 if test "$GCC" = yes ; then
2276         case "$host_os" in
2277         (linux*|gnu*)
2278                 echo "$as_me:2278: checking if this is really Intel C compiler" >&5
2279 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2280                 cf_save_CFLAGS="$CFLAGS"
2281                 CFLAGS="$CFLAGS -no-gcc"
2282                 cat >"conftest.$ac_ext" <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285
2286 int
2287 main (void)
2288 {
2289
2290 #ifdef __INTEL_COMPILER
2291 #else
2292 make an error
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f "conftest.$ac_objext"
2300 if { (eval echo "$as_me:2300: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>&5
2302   ac_status=$?
2303   echo "$as_me:2303: \$? = $ac_status" >&5
2304   (exit "$ac_status"); } &&
2305          { ac_try='test -s "conftest.$ac_objext"'
2306   { (eval echo "$as_me:2306: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:2309: \$? = $ac_status" >&5
2310   (exit "$ac_status"); }; }; then
2311   INTEL_COMPILER=yes
2312 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2313
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat "conftest.$ac_ext" >&5
2317 fi
2318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2319                 CFLAGS="$cf_save_CFLAGS"
2320                 echo "$as_me:2320: result: $INTEL_COMPILER" >&5
2321 echo "${ECHO_T}$INTEL_COMPILER" >&6
2322                 ;;
2323         esac
2324 fi
2325
2326 CLANG_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         echo "$as_me:2329: checking if this is really Clang C compiler" >&5
2330 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2331         cf_save_CFLAGS="$CFLAGS"
2332         cat >"conftest.$ac_ext" <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335
2336 int
2337 main (void)
2338 {
2339
2340 #ifdef __clang__
2341 #else
2342 make an error
2343 #endif
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f "conftest.$ac_objext"
2350 if { (eval echo "$as_me:2350: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit "$ac_status"); } &&
2355          { ac_try='test -s "conftest.$ac_objext"'
2356   { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); }; }; then
2361   CLANG_COMPILER=yes
2362
2363 else
2364   echo "$as_me: failed program was:" >&5
2365 cat "conftest.$ac_ext" >&5
2366 fi
2367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2368         CFLAGS="$cf_save_CFLAGS"
2369         echo "$as_me:2369: result: $CLANG_COMPILER" >&5
2370 echo "${ECHO_T}$CLANG_COMPILER" >&6
2371 fi
2372
2373 CLANG_VERSION=none
2374
2375 if test "x$CLANG_COMPILER" = "xyes" ; then
2376         case "$CC" in
2377         (c[1-9][0-9]|*/c[1-9][0-9])
2378                 { echo "$as_me:2378: WARNING: replacing broken compiler alias $CC" >&5
2379 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2380                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2381                 CC=clang
2382                 ;;
2383         esac
2384
2385         echo "$as_me:2385: checking version of $CC" >&5
2386 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2387         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.].*//'`"
2388         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2389         echo "$as_me:2389: result: $CLANG_VERSION" >&5
2390 echo "${ECHO_T}$CLANG_VERSION" >&6
2391
2392         for cf_clang_opt in \
2393                 -Qunused-arguments \
2394                 -Wno-error=implicit-function-declaration
2395         do
2396                 echo "$as_me:2396: checking if option $cf_clang_opt works" >&5
2397 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2398                 cf_save_CFLAGS="$CFLAGS"
2399                 CFLAGS="$CFLAGS $cf_clang_opt"
2400                 cat >"conftest.$ac_ext" <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404                         #include <stdio.h>
2405 int
2406 main (void)
2407 {
2408
2409                         printf("hello!\\n");
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2415 if { (eval echo "$as_me:2415: \"$ac_link\"") >&5
2416   (eval $ac_link) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); } &&
2420          { ac_try='test -s "conftest$ac_exeext"'
2421   { (eval echo "$as_me:2421: \"$ac_try\"") >&5
2422   (eval $ac_try) 2>&5
2423   ac_status=$?
2424   echo "$as_me:2424: \$? = $ac_status" >&5
2425   (exit "$ac_status"); }; }; then
2426
2427                         cf_clang_optok=yes
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat "conftest.$ac_ext" >&5
2431
2432                         cf_clang_optok=no
2433 fi
2434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2435                 echo "$as_me:2435: result: $cf_clang_optok" >&5
2436 echo "${ECHO_T}$cf_clang_optok" >&6
2437                 CFLAGS="$cf_save_CFLAGS"
2438                 if test "$cf_clang_optok" = yes; then
2439                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2440
2441 echo "${as_me:-configure}:2441: testing adding option $cf_clang_opt ..." 1>&5
2442
2443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2444         CFLAGS="${CFLAGS}$cf_clang_opt"
2445
2446                 fi
2447         done
2448 fi
2449
2450 echo "$as_me:2450: checking for $CC option to accept ANSI C" >&5
2451 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2452 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2453   echo $ECHO_N "(cached) $ECHO_C" >&6
2454 else
2455   ac_cv_prog_cc_stdc=no
2456 ac_save_CC=$CC
2457 cat >"conftest.$ac_ext" <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <stdarg.h>
2461 #include <stdio.h>
2462 #include <sys/types.h>
2463 #include <sys/stat.h>
2464 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2465 struct buf { int x; };
2466 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2467 static char *e (p, i)
2468      char **p;
2469      int i;
2470 {
2471   return p[i];
2472 }
2473 static char *f (char * (*g) (char **, int), char **p, ...)
2474 {
2475   char *s;
2476   va_list v;
2477   va_start (v,p);
2478   s = g (p, va_arg (v,int));
2479   va_end (v);
2480   return s;
2481 }
2482 int test (int i, double x);
2483 struct s1 {int (*f) (int a);};
2484 struct s2 {int (*f) (double a);};
2485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2486 int argc;
2487 char **argv;
2488 int
2489 main (void)
2490 {
2491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2492   ;
2493   return 0;
2494 }
2495 _ACEOF
2496 # Don't try gcc -ansi; that turns off useful extensions and
2497 # breaks some systems' header files.
2498 # AIX                   -qlanglvl=ansi
2499 # Ultrix and OSF/1      -std1
2500 # HP-UX 10.20 and later -Ae
2501 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2502 # SVR4                  -Xc -D__EXTENSIONS__
2503 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2504 do
2505   CC="$ac_save_CC $ac_arg"
2506   rm -f "conftest.$ac_objext"
2507 if { (eval echo "$as_me:2507: \"$ac_compile\"") >&5
2508   (eval $ac_compile) 2>&5
2509   ac_status=$?
2510   echo "$as_me:2510: \$? = $ac_status" >&5
2511   (exit "$ac_status"); } &&
2512          { ac_try='test -s "conftest.$ac_objext"'
2513   { (eval echo "$as_me:2513: \"$ac_try\"") >&5
2514   (eval $ac_try) 2>&5
2515   ac_status=$?
2516   echo "$as_me:2516: \$? = $ac_status" >&5
2517   (exit "$ac_status"); }; }; then
2518   ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521   echo "$as_me: failed program was:" >&5
2522 cat "conftest.$ac_ext" >&5
2523 fi
2524 rm -f "conftest.$ac_objext"
2525 done
2526 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:2533: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:2536: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # This should have been defined by AC_PROG_CC
2542 : "${CC:=cc}"
2543
2544 echo "$as_me:2544: checking \$CFLAGS variable" >&5
2545 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2546 case "x$CFLAGS" in
2547 (*-[IUD]*)
2548         echo "$as_me:2548: result: broken" >&5
2549 echo "${ECHO_T}broken" >&6
2550         { echo "$as_me:2550: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2551 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2552         cf_flags="$CFLAGS"
2553         CFLAGS=
2554         for cf_arg in $cf_flags
2555         do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566         case "$cf_add_cflags" in
2567         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568                 case "$cf_add_cflags" in
2569                 (-D*)
2570                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test "$cf_fix_cppflags" = yes ; then
2577
2578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 (*$cf_add_cflags)
2593                         ;;
2594                 (*)
2595                         case "$cf_add_cflags" in
2596                         (-D*)
2597                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2601                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2602
2603                                 ;;
2604                         esac
2605
2606         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609                         ;;
2610                 esac
2611                 ;;
2612         (*)
2613
2614         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617                 ;;
2618         esac
2619         ;;
2620 (yes)
2621
2622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637         CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655         done
2656         ;;
2657 (*)
2658         echo "$as_me:2658: result: ok" >&5
2659 echo "${ECHO_T}ok" >&6
2660         ;;
2661 esac
2662
2663 echo "$as_me:2663: checking \$CC variable" >&5
2664 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2665 case "$CC" in
2666 (*[\ \  ]-*)
2667         echo "$as_me:2667: result: broken" >&5
2668 echo "${ECHO_T}broken" >&6
2669         { echo "$as_me:2669: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2670 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2671         # humor him...
2672         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2673         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2674         CC="$cf_prog"
2675         for cf_arg in $cf_flags
2676         do
2677                 case "x$cf_arg" in
2678                 (x-[IUDfgOW]*)
2679
2680 cf_fix_cppflags=no
2681 cf_new_cflags=
2682 cf_new_cppflags=
2683 cf_new_extra_cppflags=
2684
2685 for cf_add_cflags in $cf_arg
2686 do
2687 case "$cf_fix_cppflags" in
2688 (no)
2689         case "$cf_add_cflags" in
2690         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2691                 case "$cf_add_cflags" in
2692                 (-D*)
2693                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2694
2695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2696                                 && test -z "${cf_tst_cflags}" \
2697                                 && cf_fix_cppflags=yes
2698
2699                         if test "$cf_fix_cppflags" = yes ; then
2700
2701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2703
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706
2707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2709
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 (*$cf_add_cflags)
2716                         ;;
2717                 (*)
2718                         case "$cf_add_cflags" in
2719                         (-D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728
2729         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2730         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2731
2732                         ;;
2733                 esac
2734                 ;;
2735         (*)
2736
2737         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2738         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2739
2740                 ;;
2741         esac
2742         ;;
2743 (yes)
2744
2745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2747
2748         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2749
2750         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2751                 && test -z "${cf_tst_cflags}" \
2752                 && cf_fix_cppflags=no
2753         ;;
2754 esac
2755 done
2756
2757 if test -n "$cf_new_cflags" ; then
2758
2759         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2760         CFLAGS="${CFLAGS}$cf_new_cflags"
2761
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2767         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2768
2769 fi
2770
2771 if test -n "$cf_new_extra_cppflags" ; then
2772
2773         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2774         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2775
2776 fi
2777
2778                         ;;
2779                 (*)
2780                         CC="$CC $cf_arg"
2781                         ;;
2782                 esac
2783         done
2784         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2785
2786 echo "${as_me:-configure}:2786: testing resulting CC: '$CC' ..." 1>&5
2787
2788         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2789
2790 echo "${as_me:-configure}:2790: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2791
2792         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2793
2794 echo "${as_me:-configure}:2794: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2795
2796         ;;
2797 (*)
2798         echo "$as_me:2798: result: ok" >&5
2799 echo "${ECHO_T}ok" >&6
2800         ;;
2801 esac
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2806 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808 ac_main_return="return"
2809 echo "$as_me:2809: checking how to run the C preprocessor" >&5
2810 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2811 # On Suns, sometimes $CPP names a directory.
2812 if test -n "$CPP" && test -d "$CPP"; then
2813   CPP=
2814 fi
2815 if test -z "$CPP"; then
2816   if test "${ac_cv_prog_CPP+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819       # Double quotes because CPP needs to be expanded
2820     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2821     do
2822       ac_preproc_ok=false
2823 for ac_c_preproc_warn_flag in '' yes
2824 do
2825   # Use a header file that comes with gcc, so configuring glibc
2826   # with a fresh cross-compiler works.
2827   # On the NeXT, cc -E runs the code through the compiler's parser,
2828   # not just through cpp. "Syntax error" is here to catch this case.
2829   cat >"conftest.$ac_ext" <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 #include <assert.h>
2833                      Syntax error
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837   ac_status=$?
2838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839   rm -f conftest.er1
2840   cat conftest.err >&5
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit "$ac_status"); } >/dev/null; then
2843   if test -s conftest.err; then
2844     ac_cpp_err=$ac_c_preproc_warn_flag
2845   else
2846     ac_cpp_err=
2847   fi
2848 else
2849   ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852   :
2853 else
2854   echo "$as_me: failed program was:" >&5
2855   cat "conftest.$ac_ext" >&5
2856   # Broken: fails on valid input.
2857 continue
2858 fi
2859 rm -f conftest.err "conftest.$ac_ext"
2860
2861   # OK, works on sane cases.  Now check whether non-existent headers
2862   # can be detected and how.
2863   cat >"conftest.$ac_ext" <<_ACEOF
2864 #line 2864 "configure"
2865 #include "confdefs.h"
2866 #include <ac_nonexistent.h>
2867 _ACEOF
2868 if { (eval echo "$as_me:2868: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2869   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2870   ac_status=$?
2871   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:2874: \$? = $ac_status" >&5
2875   (exit "$ac_status"); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878   else
2879     ac_cpp_err=
2880   fi
2881 else
2882   ac_cpp_err=yes
2883 fi
2884 if test -z "$ac_cpp_err"; then
2885   # Broken: success on invalid input.
2886 continue
2887 else
2888   echo "$as_me: failed program was:" >&5
2889   cat "conftest.$ac_ext" >&5
2890   # Passes both tests.
2891 ac_preproc_ok=:
2892 break
2893 fi
2894 rm -f conftest.err "conftest.$ac_ext"
2895
2896 done
2897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2898 rm -f conftest.err "conftest.$ac_ext"
2899 if $ac_preproc_ok; then
2900   break
2901 fi
2902
2903     done
2904     ac_cv_prog_CPP=$CPP
2905
2906 fi
2907   CPP=$ac_cv_prog_CPP
2908 else
2909   ac_cv_prog_CPP=$CPP
2910 fi
2911 echo "$as_me:2911: result: $CPP" >&5
2912 echo "${ECHO_T}$CPP" >&6
2913 ac_preproc_ok=false
2914 for ac_c_preproc_warn_flag in '' yes
2915 do
2916   # Use a header file that comes with gcc, so configuring glibc
2917   # with a fresh cross-compiler works.
2918   # On the NeXT, cc -E runs the code through the compiler's parser,
2919   # not just through cpp. "Syntax error" is here to catch this case.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <assert.h>
2924                      Syntax error
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928   ac_status=$?
2929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930   rm -f conftest.er1
2931   cat conftest.err >&5
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit "$ac_status"); } >/dev/null; then
2934   if test -s conftest.err; then
2935     ac_cpp_err=$ac_c_preproc_warn_flag
2936   else
2937     ac_cpp_err=
2938   fi
2939 else
2940   ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943   :
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Broken: fails on valid input.
2948 continue
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952   # OK, works on sane cases.  Now check whether non-existent headers
2953   # can be detected and how.
2954   cat >"conftest.$ac_ext" <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <ac_nonexistent.h>
2958 _ACEOF
2959 if { (eval echo "$as_me:2959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2960   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2961   ac_status=$?
2962   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2963   rm -f conftest.er1
2964   cat conftest.err >&5
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit "$ac_status"); } >/dev/null; then
2967   if test -s conftest.err; then
2968     ac_cpp_err=$ac_c_preproc_warn_flag
2969   else
2970     ac_cpp_err=
2971   fi
2972 else
2973   ac_cpp_err=yes
2974 fi
2975 if test -z "$ac_cpp_err"; then
2976   # Broken: success on invalid input.
2977 continue
2978 else
2979   echo "$as_me: failed program was:" >&5
2980   cat "conftest.$ac_ext" >&5
2981   # Passes both tests.
2982 ac_preproc_ok=:
2983 break
2984 fi
2985 rm -f conftest.err "conftest.$ac_ext"
2986
2987 done
2988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2989 rm -f conftest.err "conftest.$ac_ext"
2990 if $ac_preproc_ok; then
2991   :
2992 else
2993   { { echo "$as_me:2993: error: C preprocessor \"$CPP\" fails sanity check" >&5
2994 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 ac_ext=c
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3001 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3003 ac_main_return="return"
3004
3005 if test $ac_cv_c_compiler_gnu = yes; then
3006     echo "$as_me:3006: checking whether $CC needs -traditional" >&5
3007 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3008 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011     ac_pattern="Autoconf.*'x'"
3012   cat >"conftest.$ac_ext" <<_ACEOF
3013 #line 3013 "configure"
3014 #include "confdefs.h"
3015 #include <sgtty.h>
3016 int Autoconf = TIOCGETP;
3017 _ACEOF
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3020   ac_cv_prog_gcc_traditional=yes
3021 else
3022   ac_cv_prog_gcc_traditional=no
3023 fi
3024 rm -rf conftest*
3025
3026   if test $ac_cv_prog_gcc_traditional = no; then
3027     cat >"conftest.$ac_ext" <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030 #include <termio.h>
3031 int Autoconf = TCGETA;
3032 _ACEOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3035   ac_cv_prog_gcc_traditional=yes
3036 fi
3037 rm -rf conftest*
3038
3039   fi
3040 fi
3041 echo "$as_me:3041: result: $ac_cv_prog_gcc_traditional" >&5
3042 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3043   if test $ac_cv_prog_gcc_traditional = yes; then
3044     CC="$CC -traditional"
3045   fi
3046 fi
3047
3048 echo "$as_me:3048: checking whether $CC understands -c and -o together" >&5
3049 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3050 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3051   echo $ECHO_N "(cached) $ECHO_C" >&6
3052 else
3053
3054 cat > conftest.$ac_ext <<CF_EOF
3055 int main(void)
3056 {
3057         ${cf_cv_main_return:-return}(0);
3058 }
3059 CF_EOF
3060 # We do the test twice because some compilers refuse to overwrite an
3061 # existing .o file with -o, though they will create one.
3062 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3063 if { (eval echo "$as_me:3063: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit "$ac_status"); } &&
3068   test -f conftest2.$ac_objext && { (eval echo "$as_me:3068: \"$ac_try\"") >&5
3069   (eval $ac_try) 2>&5
3070   ac_status=$?
3071   echo "$as_me:3071: \$? = $ac_status" >&5
3072   (exit "$ac_status"); };
3073 then
3074   eval cf_cv_prog_CC_c_o=yes
3075 else
3076   eval cf_cv_prog_CC_c_o=no
3077 fi
3078 rm -rf ./conftest*
3079
3080 fi
3081 if test "$cf_cv_prog_CC_c_o" = yes; then
3082   echo "$as_me:3082: result: yes" >&5
3083 echo "${ECHO_T}yes" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089 if test "$cross_compiling" = yes ; then
3090         LDCONFIG=:
3091 else
3092         case "$cf_cv_system_name" in
3093         (dragonfly*|mirbsd*|freebsd*)
3094                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3095                 ;;
3096         (*) LDPATH=$PATH:/sbin:/usr/sbin
3097                 # Extract the first word of "ldconfig", so it can be a program name with args.
3098 set dummy ldconfig; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   case $LDCONFIG in
3105   [\\/]* | ?:[\\/]*)
3106   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3107   ;;
3108   *)
3109   ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 ac_dummy="$LDPATH"
3111 for ac_dir in $ac_dummy; do
3112   IFS=$ac_save_IFS
3113   test -z "$ac_dir" && ac_dir=.
3114   if $as_executable_p "$ac_dir/$ac_word"; then
3115    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3116    echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3117    break
3118 fi
3119 done
3120
3121   ;;
3122 esac
3123 fi
3124 LDCONFIG=$ac_cv_path_LDCONFIG
3125
3126 if test -n "$LDCONFIG"; then
3127   echo "$as_me:3127: result: $LDCONFIG" >&5
3128 echo "${ECHO_T}$LDCONFIG" >&6
3129 else
3130   echo "$as_me:3130: result: no" >&5
3131 echo "${ECHO_T}no" >&6
3132 fi
3133
3134                 ;;
3135         esac
3136 fi
3137
3138 echo "$as_me:3138: checking if you want to ensure bool is consistent with C++" >&5
3139 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3140
3141 # Check whether --with-cxx or --without-cxx was given.
3142 if test "${with_cxx+set}" = set; then
3143   withval="$with_cxx"
3144   cf_with_cxx=$withval
3145 else
3146   cf_with_cxx=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_cxx" >&5
3149 echo "${ECHO_T}$cf_with_cxx" >&6
3150 if test "X$cf_with_cxx" = Xno ; then
3151         CXX=""
3152         GXX=""
3153 else
3154         # with autoconf 2.13, we can change the error to a warning:
3155                 ac_ext=cc
3156 ac_cpp='$CXXCPP $CPPFLAGS'
3157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3158 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3160 ac_main_return="return"
3161 if test -n "$ac_tool_prefix"; then
3162   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$CXX"; then
3172   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185 fi
3186 fi
3187 CXX=$ac_cv_prog_CXX
3188 if test -n "$CXX"; then
3189   echo "$as_me:3189: result: $CXX" >&5
3190 echo "${ECHO_T}$CXX" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196     test -n "$CXX" && break
3197   done
3198 fi
3199 if test -z "$CXX"; then
3200   ac_ct_CXX=$CXX
3201   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_CXX"; then
3211   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_CXX="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3227 if test -n "$ac_ct_CXX"; then
3228   echo "$as_me:3228: result: $ac_ct_CXX" >&5
3229 echo "${ECHO_T}$ac_ct_CXX" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$ac_ct_CXX" && break
3236 done
3237 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3238
3239   CXX=$ac_ct_CXX
3240 fi
3241
3242 # Provide some information about the compiler.
3243 echo "$as_me:3243:" \
3244      "checking for C++ compiler version" >&5
3245 ac_compiler=`set X $ac_compile; echo $2`
3246 { (eval echo "$as_me:3246: \"$ac_compiler --version </dev/null >&5\"") >&5
3247   (eval $ac_compiler --version </dev/null >&5) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit "$ac_status"); }
3251 { (eval echo "$as_me:3251: \"$ac_compiler -v </dev/null >&5\"") >&5
3252   (eval $ac_compiler -v </dev/null >&5) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit "$ac_status"); }
3256 { (eval echo "$as_me:3256: \"$ac_compiler -V </dev/null >&5\"") >&5
3257   (eval $ac_compiler -V </dev/null >&5) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit "$ac_status"); }
3261
3262 echo "$as_me:3262: checking whether we are using the GNU C++ compiler" >&5
3263 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3264 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   cat >"conftest.$ac_ext" <<_ACEOF
3268 #line 3268 "configure"
3269 #include "confdefs.h"
3270
3271 int
3272 main (void)
3273 {
3274 #ifndef __GNUC__
3275        choke me
3276 #endif
3277
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f "conftest.$ac_objext"
3283 if { (eval echo "$as_me:3283: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>&5
3285   ac_status=$?
3286   echo "$as_me:3286: \$? = $ac_status" >&5
3287   (exit "$ac_status"); } &&
3288          { ac_try='test -s "conftest.$ac_objext"'
3289   { (eval echo "$as_me:3289: \"$ac_try\"") >&5
3290   (eval $ac_try) 2>&5
3291   ac_status=$?
3292   echo "$as_me:3292: \$? = $ac_status" >&5
3293   (exit "$ac_status"); }; }; then
3294   ac_compiler_gnu=yes
3295 else
3296   echo "$as_me: failed program was:" >&5
3297 cat "conftest.$ac_ext" >&5
3298 ac_compiler_gnu=no
3299 fi
3300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3301 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3302
3303 fi
3304 echo "$as_me:3304: result: $ac_cv_cxx_compiler_gnu" >&5
3305 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3306 GXX=`test $ac_compiler_gnu = yes && echo yes`
3307 ac_test_CXXFLAGS=${CXXFLAGS+set}
3308 ac_save_CXXFLAGS=$CXXFLAGS
3309 CXXFLAGS="-g"
3310 echo "$as_me:3310: checking whether $CXX accepts -g" >&5
3311 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3312 if test "${ac_cv_prog_cxx_g+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   cat >"conftest.$ac_ext" <<_ACEOF
3316 #line 3316 "configure"
3317 #include "confdefs.h"
3318
3319 int
3320 main (void)
3321 {
3322
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 rm -f "conftest.$ac_objext"
3328 if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
3329   (eval $ac_compile) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit "$ac_status"); } &&
3333          { ac_try='test -s "conftest.$ac_objext"'
3334   { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3335   (eval $ac_try) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); }; }; then
3339   ac_cv_prog_cxx_g=yes
3340 else
3341   echo "$as_me: failed program was:" >&5
3342 cat "conftest.$ac_ext" >&5
3343 ac_cv_prog_cxx_g=no
3344 fi
3345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3346 fi
3347 echo "$as_me:3347: result: $ac_cv_prog_cxx_g" >&5
3348 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3349 if test "$ac_test_CXXFLAGS" = set; then
3350   CXXFLAGS=$ac_save_CXXFLAGS
3351 elif test $ac_cv_prog_cxx_g = yes; then
3352   if test "$GXX" = yes; then
3353     CXXFLAGS="-g -O2"
3354   else
3355     CXXFLAGS="-g"
3356   fi
3357 else
3358   if test "$GXX" = yes; then
3359     CXXFLAGS="-O2"
3360   else
3361     CXXFLAGS=
3362   fi
3363 fi
3364 for ac_declaration in \
3365    ''\
3366    '#include <stdlib.h>' \
3367    'extern "C" void std::exit (int) throw (); using std::exit;' \
3368    'extern "C" void std::exit (int); using std::exit;' \
3369    'extern "C" void exit (int) throw ();' \
3370    'extern "C" void exit (int);' \
3371    'void exit (int);'
3372 do
3373   cat >"conftest.$ac_ext" <<_ACEOF
3374 #line 3374 "configure"
3375 #include "confdefs.h"
3376 #include <stdlib.h>
3377 $ac_declaration
3378 int
3379 main (void)
3380 {
3381 exit (42);
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f "conftest.$ac_objext"
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388   (eval $ac_compile) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); } &&
3392          { ac_try='test -s "conftest.$ac_objext"'
3393   { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:3396: \$? = $ac_status" >&5
3397   (exit "$ac_status"); }; }; then
3398   :
3399 else
3400   echo "$as_me: failed program was:" >&5
3401 cat "conftest.$ac_ext" >&5
3402 continue
3403 fi
3404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3405   cat >"conftest.$ac_ext" <<_ACEOF
3406 #line 3406 "configure"
3407 #include "confdefs.h"
3408 $ac_declaration
3409 int
3410 main (void)
3411 {
3412 exit (42);
3413   ;
3414   return 0;
3415 }
3416 _ACEOF
3417 rm -f "conftest.$ac_objext"
3418 if { (eval echo "$as_me:3418: \"$ac_compile\"") >&5
3419   (eval $ac_compile) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423          { ac_try='test -s "conftest.$ac_objext"'
3424   { (eval echo "$as_me:3424: \"$ac_try\"") >&5
3425   (eval $ac_try) 2>&5
3426   ac_status=$?
3427   echo "$as_me:3427: \$? = $ac_status" >&5
3428   (exit "$ac_status"); }; }; then
3429   break
3430 else
3431   echo "$as_me: failed program was:" >&5
3432 cat "conftest.$ac_ext" >&5
3433 fi
3434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3435 done
3436 rm -rf conftest*
3437 if test -n "$ac_declaration"; then
3438   echo '#ifdef __cplusplus' >>confdefs.h
3439   echo "$ac_declaration"    >>confdefs.h
3440   echo '#endif'             >>confdefs.h
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3446 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448 ac_main_return="return"
3449
3450         ac_ext=cc
3451 ac_cpp='$CXXCPP $CPPFLAGS'
3452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3453 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3455 ac_main_return="return"
3456
3457         if test "x$cf_with_cxx" != xno
3458         then
3459                 # Several of the C++ configurations do not work, particularly when
3460                 # cross-compiling (20140913 -TD)
3461                 echo "$as_me:3461: checking if $CXX works" >&5
3462 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3463
3464                 save_CPPFLAGS="$CPPFLAGS"
3465                 eval cf_includedir=${includedir}
3466                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3467
3468 cat >"conftest.$ac_ext" <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdlib.h>
3473 #include <stdio.h>
3474
3475 int
3476 main (void)
3477 {
3478
3479                 printf("Hello world!\n")
3480
3481   ;
3482   return 0;
3483 }
3484 _ACEOF
3485 rm -f "conftest.$ac_objext"
3486 if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487   (eval $ac_compile) 2>&5
3488   ac_status=$?
3489   echo "$as_me:3489: \$? = $ac_status" >&5
3490   (exit "$ac_status"); } &&
3491          { ac_try='test -s "conftest.$ac_objext"'
3492   { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493   (eval $ac_try) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit "$ac_status"); }; }; then
3497   cf_cxx_works=yes
3498 else
3499   echo "$as_me: failed program was:" >&5
3500 cat "conftest.$ac_ext" >&5
3501 cf_cxx_works=no
3502 fi
3503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3504                 CPPFLAGS="$save_CPPFLAGS"
3505
3506                 echo "$as_me:3506: result: $cf_cxx_works" >&5
3507 echo "${ECHO_T}$cf_cxx_works" >&6
3508                 if test "x$cf_cxx_works" = xno
3509                 then
3510                         { echo "$as_me:3510: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3511 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3512                         cf_with_cxx=no; CXX=""; GXX="";
3513                 fi
3514         fi
3515         ac_ext=c
3516 ac_cpp='$CPP $CPPFLAGS'
3517 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3518 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3520 ac_main_return="return"
3521
3522         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3523         if test "$CXX" = "g++" ; then
3524                 # Extract the first word of "g++", so it can be a program name with args.
3525 set dummy g++; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_CXX+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   case $CXX in
3532   [\\/]* | ?:[\\/]*)
3533   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3534   ;;
3535   *)
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   if $as_executable_p "$ac_dir/$ac_word"; then
3542    ac_cv_path_CXX="$ac_dir/$ac_word"
3543    echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544    break
3545 fi
3546 done
3547
3548   ;;
3549 esac
3550 fi
3551 CXX=$ac_cv_path_CXX
3552
3553 if test -n "$CXX"; then
3554   echo "$as_me:3554: result: $CXX" >&5
3555 echo "${ECHO_T}$CXX" >&6
3556 else
3557   echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3559 fi
3560
3561         fi
3562         case "x$CXX" in
3563         (x|xg++)
3564                 { echo "$as_me:3564: WARNING: You don't have any C++ compiler, too bad" >&5
3565 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3566                 cf_with_cxx=no; CXX=""; GXX="";
3567                 ;;
3568         esac
3569 fi
3570
3571 GXX_VERSION=none
3572 if test "$GXX" = yes; then
3573         echo "$as_me:3573: checking version of ${CXX:-g++}" >&5
3574 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3575         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3576         if test -z "$GXX_VERSION"
3577         then
3578                 GXX_VERSION=unknown
3579                 GXX=no
3580         fi
3581         echo "$as_me:3581: result: $GXX_VERSION" >&5
3582 echo "${ECHO_T}$GXX_VERSION" >&6
3583 fi
3584
3585 case "$GXX_VERSION" in
3586 ([1-9][0-9].*)
3587         ;;
3588 (1.*|2.[0-6]*)
3589         { echo "$as_me:3589: WARNING: templates do not work" >&5
3590 echo "$as_me: WARNING: templates do not work" >&2;}
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: checking if you want to build C++ binding and demo" >&5
3595 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3596
3597 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3598 if test "${with_cxx_binding+set}" = set; then
3599   withval="$with_cxx_binding"
3600   cf_with_cxx_binding=$withval
3601 else
3602   cf_with_cxx_binding=$cf_with_cxx
3603 fi;
3604 echo "$as_me:3604: result: $cf_with_cxx_binding" >&5
3605 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3606
3607 echo "$as_me:3607: checking if you want to build with Ada" >&5
3608 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3609 echo "$as_me:3609: result: $cf_with_ada" >&5
3610 echo "${ECHO_T}$cf_with_ada" >&6
3611
3612 echo "$as_me:3612: checking if you want to install terminal database" >&5
3613 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3614
3615 # Check whether --enable-db-install or --disable-db-install was given.
3616 if test "${enable_db_install+set}" = set; then
3617   enableval="$enable_db_install"
3618   cf_with_db_install=$enableval
3619 else
3620   cf_with_db_install=yes
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_db_install" >&5
3623 echo "${ECHO_T}$cf_with_db_install" >&6
3624
3625 echo "$as_me:3625: checking if you want to install manpages" >&5
3626 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3627
3628 # Check whether --with-manpages or --without-manpages was given.
3629 if test "${with_manpages+set}" = set; then
3630   withval="$with_manpages"
3631   cf_with_manpages=$withval
3632 else
3633   cf_with_manpages=yes
3634 fi;
3635 echo "$as_me:3635: result: $cf_with_manpages" >&5
3636 echo "${ECHO_T}$cf_with_manpages" >&6
3637
3638 echo "$as_me:3638: checking if you want to build programs such as tic" >&5
3639 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3640
3641 # Check whether --with-progs or --without-progs was given.
3642 if test "${with_progs+set}" = set; then
3643   withval="$with_progs"
3644   cf_with_progs=$withval
3645 else
3646   cf_with_progs=yes
3647 fi;
3648 echo "$as_me:3648: result: $cf_with_progs" >&5
3649 echo "${ECHO_T}$cf_with_progs" >&6
3650
3651 if test -f "$srcdir/tack/tack.h" ; then
3652         if test "x$cross_compiling" = xyes ; then
3653                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3654
3655 echo "${as_me:-configure}:3655: testing ignoring tack because we are cross-compiling ..." 1>&5
3656
3657                 cf_with_tack=no
3658         else
3659                 echo "$as_me:3659: checking if you want to build the tack program" >&5
3660 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3661
3662 # Check whether --with-tack or --without-tack was given.
3663 if test "${with_tack+set}" = set; then
3664   withval="$with_tack"
3665   cf_with_tack=$withval
3666 else
3667   cf_with_tack=$cf_with_progs
3668 fi;
3669                 echo "$as_me:3669: result: $cf_with_tack" >&5
3670 echo "${ECHO_T}$cf_with_tack" >&6
3671         fi
3672 else
3673         cf_with_tack=no
3674 fi
3675
3676 echo "$as_me:3676: checking if you want to build test-programs" >&5
3677 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3678
3679 # Check whether --with-tests or --without-tests was given.
3680 if test "${with_tests+set}" = set; then
3681   withval="$with_tests"
3682   cf_with_tests=$withval
3683 else
3684   cf_with_tests=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_tests" >&5
3687 echo "${ECHO_T}$cf_with_tests" >&6
3688
3689 echo "$as_me:3689: checking if you wish to install curses.h" >&5
3690 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3691
3692 # Check whether --with-curses-h or --without-curses-h was given.
3693 if test "${with_curses_h+set}" = set; then
3694   withval="$with_curses_h"
3695   with_curses_h=$withval
3696 else
3697   with_curses_h=yes
3698 fi;
3699 echo "$as_me:3699: result: $with_curses_h" >&5
3700 echo "${ECHO_T}$with_curses_h" >&6
3701
3702 modules_to_build="ncurses"
3703 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3704 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3705 modules_to_build="$modules_to_build panel menu form"
3706
3707 test "$program_prefix" != NONE &&
3708   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3709 # Use a double $ so make ignores it.
3710 test "$program_suffix" != NONE &&
3711   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3712 # Double any \ or $.  echo might interpret backslashes.
3713 # By default was `s,x,x', remove it if useless.
3714 cat <<\_ACEOF >conftest.sed
3715 s/[\\$]/&&/g;s/;s,x,x,$//
3716 _ACEOF
3717 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3718 rm conftest.sed
3719
3720 for ac_prog in mawk gawk nawk awk
3721 do
3722   # Extract the first word of "$ac_prog", so it can be a program name with args.
3723 set dummy $ac_prog; ac_word=$2
3724 echo "$as_me:3724: checking for $ac_word" >&5
3725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3726 if test "${ac_cv_prog_AWK+set}" = set; then
3727   echo $ECHO_N "(cached) $ECHO_C" >&6
3728 else
3729   if test -n "$AWK"; then
3730   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3731 else
3732   ac_save_IFS=$IFS; IFS=$ac_path_separator
3733 ac_dummy="$PATH"
3734 for ac_dir in $ac_dummy; do
3735   IFS=$ac_save_IFS
3736   test -z "$ac_dir" && ac_dir=.
3737   $as_executable_p "$ac_dir/$ac_word" || continue
3738 ac_cv_prog_AWK="$ac_prog"
3739 echo "$as_me:3739: found $ac_dir/$ac_word" >&5
3740 break
3741 done
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   echo "$as_me:3747: result: $AWK" >&5
3748 echo "${ECHO_T}$AWK" >&6
3749 else
3750   echo "$as_me:3750: result: no" >&5
3751 echo "${ECHO_T}no" >&6
3752 fi
3753
3754   test -n "$AWK" && break
3755 done
3756
3757 test -z "$AWK" && { { echo "$as_me:3757: error: No awk program found" >&5
3758 echo "$as_me: error: No awk program found" >&2;}
3759    { (exit 1); exit 1; }; }
3760
3761 # Find a good install program.  We prefer a C program (faster),
3762 # so one script is as good as another.  But avoid the broken or
3763 # incompatible versions:
3764 # SysV /etc/install, /usr/sbin/install
3765 # SunOS /usr/etc/install
3766 # IRIX /sbin/install
3767 # AIX /bin/install
3768 # AmigaOS /C/install, which installs bootblocks on floppy discs
3769 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3770 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3771 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3772 # ./install, which can be erroneously created by make from ./install.sh.
3773 echo "$as_me:3773: checking for a BSD compatible install" >&5
3774 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3775 if test -z "$INSTALL"; then
3776 if test "${ac_cv_path_install+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779     ac_save_IFS=$IFS; IFS=$ac_path_separator
3780   for ac_dir in $PATH; do
3781     IFS=$ac_save_IFS
3782     # Account for people who put trailing slashes in PATH elements.
3783     case $ac_dir/ in
3784     / | ./ | .// | /cC/* \
3785     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3786     | /usr/ucb/* ) ;;
3787     *)
3788       # OSF1 and SCO ODT 3.0 have their own names for install.
3789       # Don't use installbsd from OSF since it installs stuff as root
3790       # by default.
3791       for ac_prog in ginstall scoinst install; do
3792         if $as_executable_p "$ac_dir/$ac_prog"; then
3793           if test $ac_prog = install &&
3794             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3795             # AIX install.  It has an incompatible calling convention.
3796             :
3797           elif test $ac_prog = install &&
3798             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3799             # program-specific install script used by HP pwplus--don't use.
3800             :
3801           else
3802             ac_cv_path_install="$ac_dir/$ac_prog -c"
3803             break 2
3804           fi
3805         fi
3806       done
3807       ;;
3808     esac
3809   done
3810
3811 fi
3812   if test "${ac_cv_path_install+set}" = set; then
3813     INSTALL=$ac_cv_path_install
3814   else
3815     # As a last resort, use the slow shell script.  We don't cache a
3816     # path for INSTALL within a source directory, because that will
3817     # break other packages using the cache if that directory is
3818     # removed, or if the path is relative.
3819     INSTALL=$ac_install_sh
3820   fi
3821 fi
3822 echo "$as_me:3822: result: $INSTALL" >&5
3823 echo "${ECHO_T}$INSTALL" >&6
3824
3825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3826 # It thinks the first close brace ends the variable substitution.
3827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3828
3829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3830
3831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3832
3833 case $INSTALL in
3834 (/*)
3835         ;;
3836 (*)
3837         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3838         test -z "$cf_dir" && cf_dir=.
3839         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3840         ;;
3841 esac
3842
3843 for ac_prog in lint cppcheck splint
3844 do
3845   # Extract the first word of "$ac_prog", so it can be a program name with args.
3846 set dummy $ac_prog; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_LINT+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$LINT"; then
3853   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_LINT="$ac_prog"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866 fi
3867 fi
3868 LINT=$ac_cv_prog_LINT
3869 if test -n "$LINT"; then
3870   echo "$as_me:3870: result: $LINT" >&5
3871 echo "${ECHO_T}$LINT" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   test -n "$LINT" && break
3878 done
3879
3880 case "x$LINT" in
3881 (xcppcheck|x*/cppcheck)
3882         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3883         ;;
3884 esac
3885
3886 echo "$as_me:3886: checking whether ln -s works" >&5
3887 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3888 LN_S=$as_ln_s
3889 if test "$LN_S" = "ln -s"; then
3890   echo "$as_me:3890: result: yes" >&5
3891 echo "${ECHO_T}yes" >&6
3892 else
3893   echo "$as_me:3893: result: no, using $LN_S" >&5
3894 echo "${ECHO_T}no, using $LN_S" >&6
3895 fi
3896
3897 echo "$as_me:3897: checking if $LN_S -f options work" >&5
3898 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3899
3900 rm -f conf$$.src conf$$dst
3901 echo >conf$$.dst
3902 echo first >conf$$.src
3903 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3904         cf_prog_ln_sf=yes
3905 else
3906         cf_prog_ln_sf=no
3907 fi
3908 rm -f conf$$.dst conf$$src
3909 echo "$as_me:3909: result: $cf_prog_ln_sf" >&5
3910 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3911
3912 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3913
3914 echo "$as_me:3914: checking for long file names" >&5
3915 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3916 if test "${ac_cv_sys_long_file_names+set}" = set; then
3917   echo $ECHO_N "(cached) $ECHO_C" >&6
3918 else
3919   ac_cv_sys_long_file_names=yes
3920 # Test for long file names in all the places we know might matter:
3921 #      .                the current directory, where building will happen
3922 #      $prefix/lib      where we will be installing things
3923 #      $exec_prefix/lib likewise
3924 # eval it to expand exec_prefix.
3925 #      $TMPDIR          if set, where it might want to write temporary files
3926 # if $TMPDIR is not set:
3927 #      /tmp             where it might want to write temporary files
3928 #      /var/tmp         likewise
3929 #      /usr/tmp         likewise
3930 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3931   ac_tmpdirs=$TMPDIR
3932 else
3933   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3934 fi
3935 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3936   test -d "$ac_dir" || continue
3937   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3938   ac_xdir=$ac_dir/cf$$
3939   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3940   ac_tf1=$ac_xdir/conftest9012345
3941   ac_tf2=$ac_xdir/conftest9012346
3942   (echo 1 >"$ac_tf1") 2>/dev/null
3943   (echo 2 >"$ac_tf2") 2>/dev/null
3944   ac_val=`cat "$ac_tf1" 2>/dev/null`
3945   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3946     ac_cv_sys_long_file_names=no
3947     rm -rf "$ac_xdir" 2>/dev/null
3948     break
3949   fi
3950   rm -rf "$ac_xdir" 2>/dev/null
3951 done
3952 fi
3953 echo "$as_me:3953: result: $ac_cv_sys_long_file_names" >&5
3954 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3955 if test "$ac_cv_sys_long_file_names" = yes; then
3956
3957 cat >>confdefs.h <<\EOF
3958 #define HAVE_LONG_FILE_NAMES 1
3959 EOF
3960
3961 fi
3962
3963 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3964 # of package conflict.
3965 cf_config_suffix=
3966
3967 # Check whether --with-config-suffix or --without-config-suffix was given.
3968 if test "${with_config_suffix+set}" = set; then
3969   withval="$with_config_suffix"
3970   case "x$withval" in
3971         (xyes|xno)
3972                 { echo "$as_me:3972: WARNING: expected a value for config-suffix option" >&5
3973 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3974                 ;;
3975         (*)     cf_config_suffix="$withval"
3976                 ;;
3977         esac
3978 fi;
3979
3980 # If we find pkg-config, check if we should install the ".pc" files.
3981
3982 echo "$as_me:3982: checking if you want to use pkg-config" >&5
3983 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3984
3985 # Check whether --with-pkg-config or --without-pkg-config was given.
3986 if test "${with_pkg_config+set}" = set; then
3987   withval="$with_pkg_config"
3988   cf_pkg_config=$withval
3989 else
3990   cf_pkg_config=yes
3991 fi;
3992 echo "$as_me:3992: result: $cf_pkg_config" >&5
3993 echo "${ECHO_T}$cf_pkg_config" >&6
3994
3995 case "$cf_pkg_config" in
3996 (no)
3997         PKG_CONFIG=none
3998         ;;
3999 (yes)
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $PKG_CONFIG in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   if $as_executable_p "$ac_dir/$ac_word"; then
4020    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4021    echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022    break
4023 fi
4024 done
4025
4026   ;;
4027 esac
4028 fi
4029 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4030
4031 if test -n "$PKG_CONFIG"; then
4032   echo "$as_me:4032: result: $PKG_CONFIG" >&5
4033 echo "${ECHO_T}$PKG_CONFIG" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039 fi
4040 if test -z "$ac_cv_path_PKG_CONFIG"; then
4041   ac_pt_PKG_CONFIG=$PKG_CONFIG
4042   # Extract the first word of "pkg-config", so it can be a program name with args.
4043 set dummy pkg-config; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   case $ac_pt_PKG_CONFIG in
4050   [\\/]* | ?:[\\/]*)
4051   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   *)
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   if $as_executable_p "$ac_dir/$ac_word"; then
4060    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4061    echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062    break
4063 fi
4064 done
4065
4066   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4067   ;;
4068 esac
4069 fi
4070 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4071
4072 if test -n "$ac_pt_PKG_CONFIG"; then
4073   echo "$as_me:4073: result: $ac_pt_PKG_CONFIG" >&5
4074 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   PKG_CONFIG=$ac_pt_PKG_CONFIG
4081 else
4082   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4083 fi
4084
4085         ;;
4086 (*)
4087         PKG_CONFIG=$withval
4088         ;;
4089 esac
4090
4091 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4092 if test "$PKG_CONFIG" != none ; then
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\$\{*prefix\}*|.\$\{*dir\}*)
4108         eval PKG_CONFIG="$PKG_CONFIG"
4109         case ".$PKG_CONFIG" in
4110         (.NONE/*)
4111                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125 elif test "x$cf_pkg_config" != xno ; then
4126         { echo "$as_me:4126: WARNING: pkg-config is not installed" >&5
4127 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4128 fi
4129
4130 case "$PKG_CONFIG" in
4131 (no|none|yes)
4132         echo "$as_me:4132: checking for pkg-config library directory" >&5
4133 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4134         ;;
4135 (*)
4136         echo "$as_me:4136: checking for $PKG_CONFIG library directory" >&5
4137 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4138         ;;
4139 esac
4140
4141 PKG_CONFIG_LIBDIR=no
4142
4143 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4144 if test "${with_pkg_config_libdir+set}" = set; then
4145   withval="$with_pkg_config_libdir"
4146   PKG_CONFIG_LIBDIR=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4149 fi;
4150
4151 case x$PKG_CONFIG_LIBDIR in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         # Look for the library directory using the same prefix as the executable
4156         if test "x$PKG_CONFIG" = xnone
4157         then
4158                 cf_path=$prefix
4159         else
4160                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4161         fi
4162
4163         # If you don't like using the default architecture, you have to specify the
4164         # intended library directory and corresponding compiler/linker options.
4165         #
4166         # This case allows for Debian's 2014-flavor of multiarch, along with the
4167         # most common variations before that point.  Some other variants spell the
4168         # directory differently, e.g., "pkg-config", and put it in unusual places.
4169         # pkg-config has always been poorly standardized, which is ironic...
4170         case x`(arch) 2>/dev/null` in
4171         (*64)
4172                 cf_search_path="\
4173                         $cf_path/lib/*64-linux-gnu \
4174                         $cf_path/share \
4175                         $cf_path/lib64 \
4176                         $cf_path/lib32 \
4177                         $cf_path/lib"
4178                 ;;
4179         (*)
4180                 cf_search_path="\
4181                         $cf_path/lib/*-linux-gnu \
4182                         $cf_path/share \
4183                         $cf_path/lib32 \
4184                         $cf_path/lib \
4185                         $cf_path/libdata"
4186                 ;;
4187         esac
4188
4189         test -n "$verbose" && echo "    list..." 1>&6
4190
4191 echo "${as_me:-configure}:4191: testing list... ..." 1>&5
4192
4193         for cf_config in $cf_search_path
4194         do
4195                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4196
4197 echo "${as_me:-configure}:4197: testing checking $cf_config/pkgconfig ..." 1>&5
4198
4199                 if test -d "$cf_config/pkgconfig"
4200                 then
4201                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4202                         echo "$as_me:4202: checking done" >&5
4203 echo $ECHO_N "checking done... $ECHO_C" >&6
4204                         break
4205                 fi
4206         done
4207         ;;
4208 (*)
4209         ;;
4210 esac
4211
4212 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4213         echo "$as_me:4213: result: $PKG_CONFIG_LIBDIR" >&5
4214 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4215 fi
4216
4217 if test "x$PKG_CONFIG" != xnone
4218 then
4219         echo "$as_me:4219: checking if we should install .pc files for $PKG_CONFIG" >&5
4220 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4221 else
4222         echo "$as_me:4222: checking if we should install .pc files" >&5
4223 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4224 fi
4225
4226 # Check whether --enable-pc-files or --disable-pc-files was given.
4227 if test "${enable_pc_files+set}" = set; then
4228   enableval="$enable_pc_files"
4229   enable_pc_files=$enableval
4230 else
4231   enable_pc_files=no
4232 fi;
4233 echo "$as_me:4233: result: $enable_pc_files" >&5
4234 echo "${ECHO_T}$enable_pc_files" >&6
4235
4236 if test "x$enable_pc_files" != xno
4237 then
4238         MAKE_PC_FILES=
4239         case "x$PKG_CONFIG_LIBDIR" in
4240         (xno|xyes)
4241                 { echo "$as_me:4241: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4242 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4243                 ;;
4244         (*)
4245
4246 if test "x$prefix" != xNONE; then
4247         cf_path_syntax="$prefix"
4248 else
4249         cf_path_syntax="$ac_default_prefix"
4250 fi
4251
4252 case ".$PKG_CONFIG_LIBDIR" in
4253 (.\$\(*\)*|.\'*\'*)
4254         ;;
4255 (..|./*|.\\*)
4256         ;;
4257 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4258         ;;
4259 (.\$\{*prefix\}*|.\$\{*dir\}*)
4260         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4261         case ".$PKG_CONFIG_LIBDIR" in
4262         (.NONE/*)
4263                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4264                 ;;
4265         esac
4266         ;;
4267 (.no|.NONE/*)
4268         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4269         ;;
4270 (*)
4271         { { echo "$as_me:4271: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4272 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4273    { (exit 1); exit 1; }; }
4274         ;;
4275 esac
4276
4277                 ;;
4278         esac
4279 else
4280         MAKE_PC_FILES="#"
4281 fi
4282
4283 if test -z "$MAKE_PC_FILES"
4284 then
4285         echo "$as_me:4285: checking for suffix to add to pc-files" >&5
4286 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4287
4288 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4289 if test "${with_pc_suffix+set}" = set; then
4290   withval="$with_pc_suffix"
4291   case "x$withval" in
4292         (xyes|xno)
4293                 PC_MODULE_SUFFIX=
4294                 ;;
4295         (*)     PC_MODULE_SUFFIX="$withval"
4296                 ;;
4297         esac
4298 fi;
4299         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4300         echo "$as_me:4300: result: $PC_MODULE_SUFFIX" >&5
4301 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4302         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4303
4304 fi
4305
4306 echo "$as_me:4306: checking if we should assume mixed-case filenames" >&5
4307 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4308
4309 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4310 if test "${enable_mixed_case+set}" = set; then
4311   enableval="$enable_mixed_case"
4312   enable_mixedcase=$enableval
4313 else
4314   enable_mixedcase=auto
4315 fi;
4316 echo "$as_me:4316: result: $enable_mixedcase" >&5
4317 echo "${ECHO_T}$enable_mixedcase" >&6
4318 if test "$enable_mixedcase" = "auto" ; then
4319
4320 echo "$as_me:4320: checking if filesystem supports mixed-case filenames" >&5
4321 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4322 if test "${cf_cv_mixedcase+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325
4326 if test "$cross_compiling" = yes ; then
4327         case "$target_alias" in
4328         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4329                 cf_cv_mixedcase=no
4330                 ;;
4331         (*)
4332                 cf_cv_mixedcase=yes
4333                 ;;
4334         esac
4335 else
4336         rm -f conftest CONFTEST
4337         echo test >conftest
4338         if test -f CONFTEST ; then
4339                 cf_cv_mixedcase=no
4340         else
4341                 cf_cv_mixedcase=yes
4342         fi
4343         rm -f conftest CONFTEST
4344 fi
4345
4346 fi
4347 echo "$as_me:4347: result: $cf_cv_mixedcase" >&5
4348 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4349 test "$cf_cv_mixedcase" = yes &&
4350 cat >>confdefs.h <<\EOF
4351 #define MIXEDCASE_FILENAMES 1
4352 EOF
4353
4354 else
4355         cf_cv_mixedcase=$enable_mixedcase
4356         if test "x$enable_mixedcase" = "xyes" ; then
4357
4358 cat >>confdefs.h <<\EOF
4359 #define MIXEDCASE_FILENAMES 1
4360 EOF
4361
4362         fi
4363 fi
4364
4365 # do this after mixed-case option (tags/TAGS is not as important as tic).
4366 echo "$as_me:4366: checking whether ${MAKE-make} sets \${MAKE}" >&5
4367 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4368 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4369 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   cat >conftest.make <<\EOF
4373 all:
4374         @echo 'ac_maketemp="${MAKE}"'
4375 EOF
4376 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4377 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4378 if test -n "$ac_maketemp"; then
4379   eval ac_cv_prog_make_${ac_make}_set=yes
4380 else
4381   eval ac_cv_prog_make_${ac_make}_set=no
4382 fi
4383 rm -f conftest.make
4384 fi
4385 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4386   echo "$as_me:4386: result: yes" >&5
4387 echo "${ECHO_T}yes" >&6
4388   SET_MAKE=
4389 else
4390   echo "$as_me:4390: result: no" >&5
4391 echo "${ECHO_T}no" >&6
4392   SET_MAKE="MAKE=${MAKE-make}"
4393 fi
4394
4395 echo "$as_me:4395: checking for \".PHONY\" make-support" >&5
4396 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4397 if test "${cf_cv_make_PHONY+set}" = set; then
4398   echo $ECHO_N "(cached) $ECHO_C" >&6
4399 else
4400
4401         rm -rf conftest*
4402         (
4403                 mkdir conftest || exit 1
4404                 cd conftest
4405                 cat >makefile <<'CF_EOF'
4406 .PHONY: always
4407 DATA=0
4408 always: always.out
4409         @echo "** making $@ $(DATA)"
4410 once: once.out
4411         @echo "** making $@ $(DATA)"
4412 always.out:
4413         @echo "** making $@ $(DATA)"
4414         echo $(DATA) > $@
4415 once.out:
4416         @echo "** making $@ $(DATA)"
4417         echo $(DATA) > $@
4418 CF_EOF
4419                 for cf_data in 1 2 3
4420                 do
4421                         ${MAKE:-make} always DATA=$cf_data
4422                         ${MAKE:-make} once   DATA=$cf_data
4423                         ${MAKE:-make} -t always once
4424                         if test -f always ; then
4425                                 echo "no (case 1)" > ../conftest.tmp
4426                         elif test ! -f always.out ; then
4427                                 echo "no (case 2)" > ../conftest.tmp
4428                         elif test ! -f once.out ; then
4429                                 echo "no (case 3)" > ../conftest.tmp
4430                         elif ! cmp -s always.out once.out ; then
4431                                 echo "no (case 4)" > ../conftest.tmp
4432                                 diff always.out once.out
4433                         else
4434                                 cf_check="`cat always.out`"
4435                                 if test "x$cf_check" != "x$cf_data" ; then
4436                                         echo "no (case 5)" > ../conftest.tmp
4437                                 else
4438                                         echo yes > ../conftest.tmp
4439                                         rm -f ./*.out
4440                                         continue
4441                                 fi
4442                         fi
4443                         break
4444                 done
4445         ) >&5 2>&1
4446         cf_cv_make_PHONY="`cat conftest.tmp`"
4447         rm -rf conftest*
4448
4449 fi
4450 echo "$as_me:4450: result: $cf_cv_make_PHONY" >&5
4451 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4452 MAKE_NO_PHONY="#"
4453 MAKE_PHONY="#"
4454 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4455 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4456
4457 for ac_prog in exctags ctags
4458 do
4459   # Extract the first word of "$ac_prog", so it can be a program name with args.
4460 set dummy $ac_prog; ac_word=$2
4461 echo "$as_me:4461: checking for $ac_word" >&5
4462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4463 if test "${ac_cv_prog_CTAGS+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466   if test -n "$CTAGS"; then
4467   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4468 else
4469   ac_save_IFS=$IFS; IFS=$ac_path_separator
4470 ac_dummy="$PATH"
4471 for ac_dir in $ac_dummy; do
4472   IFS=$ac_save_IFS
4473   test -z "$ac_dir" && ac_dir=.
4474   $as_executable_p "$ac_dir/$ac_word" || continue
4475 ac_cv_prog_CTAGS="$ac_prog"
4476 echo "$as_me:4476: found $ac_dir/$ac_word" >&5
4477 break
4478 done
4479
4480 fi
4481 fi
4482 CTAGS=$ac_cv_prog_CTAGS
4483 if test -n "$CTAGS"; then
4484   echo "$as_me:4484: result: $CTAGS" >&5
4485 echo "${ECHO_T}$CTAGS" >&6
4486 else
4487   echo "$as_me:4487: result: no" >&5
4488 echo "${ECHO_T}no" >&6
4489 fi
4490
4491   test -n "$CTAGS" && break
4492 done
4493
4494 for ac_prog in exetags etags
4495 do
4496   # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 echo "$as_me:4498: checking for $ac_word" >&5
4499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500 if test "${ac_cv_prog_ETAGS+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503   if test -n "$ETAGS"; then
4504   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4505 else
4506   ac_save_IFS=$IFS; IFS=$ac_path_separator
4507 ac_dummy="$PATH"
4508 for ac_dir in $ac_dummy; do
4509   IFS=$ac_save_IFS
4510   test -z "$ac_dir" && ac_dir=.
4511   $as_executable_p "$ac_dir/$ac_word" || continue
4512 ac_cv_prog_ETAGS="$ac_prog"
4513 echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514 break
4515 done
4516
4517 fi
4518 fi
4519 ETAGS=$ac_cv_prog_ETAGS
4520 if test -n "$ETAGS"; then
4521   echo "$as_me:4521: result: $ETAGS" >&5
4522 echo "${ECHO_T}$ETAGS" >&6
4523 else
4524   echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$ETAGS" && break
4529 done
4530
4531 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4532 set dummy ${CTAGS:-ctags}; ac_word=$2
4533 echo "$as_me:4533: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   if test -n "$MAKE_LOWER_TAGS"; then
4539   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4540 else
4541   ac_save_IFS=$IFS; IFS=$ac_path_separator
4542 ac_dummy="$PATH"
4543 for ac_dir in $ac_dummy; do
4544   IFS=$ac_save_IFS
4545   test -z "$ac_dir" && ac_dir=.
4546   $as_executable_p "$ac_dir/$ac_word" || continue
4547 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4548 echo "$as_me:4548: found $ac_dir/$ac_word" >&5
4549 break
4550 done
4551
4552   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4553 fi
4554 fi
4555 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4556 if test -n "$MAKE_LOWER_TAGS"; then
4557   echo "$as_me:4557: result: $MAKE_LOWER_TAGS" >&5
4558 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 if test "$cf_cv_mixedcase" = yes ; then
4565         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4566 set dummy ${ETAGS:-etags}; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$MAKE_UPPER_TAGS"; then
4573   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4587 fi
4588 fi
4589 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4590 if test -n "$MAKE_UPPER_TAGS"; then
4591   echo "$as_me:4591: result: $MAKE_UPPER_TAGS" >&5
4592 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4593 else
4594   echo "$as_me:4594: result: no" >&5
4595 echo "${ECHO_T}no" >&6
4596 fi
4597
4598 else
4599         MAKE_UPPER_TAGS=no
4600 fi
4601
4602 if test "$MAKE_UPPER_TAGS" = yes ; then
4603         MAKE_UPPER_TAGS=
4604 else
4605         MAKE_UPPER_TAGS="#"
4606 fi
4607
4608 if test "$MAKE_LOWER_TAGS" = yes ; then
4609         MAKE_LOWER_TAGS=
4610 else
4611         MAKE_LOWER_TAGS="#"
4612 fi
4613
4614 echo "$as_me:4614: checking for makeflags variable" >&5
4615 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4616 if test "${cf_cv_makeflags+set}" = set; then
4617   echo $ECHO_N "(cached) $ECHO_C" >&6
4618 else
4619
4620         cf_cv_makeflags=''
4621         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4622         do
4623                 cat >cf_makeflags.tmp <<CF_EOF
4624 SHELL = $SHELL
4625 all :
4626         @ echo '.$cf_option'
4627 CF_EOF
4628                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4629                 case "$cf_result" in
4630                 (.*k|.*kw)
4631                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4632                         case "$cf_result" in
4633                         (.*CC=*)        cf_cv_makeflags=
4634                                 ;;
4635                         (*)     cf_cv_makeflags=$cf_option
4636                                 ;;
4637                         esac
4638                         break
4639                         ;;
4640                 (.-)
4641                         ;;
4642                 (*)
4643
4644 echo "${as_me:-configure}:4644: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4645
4646                         ;;
4647                 esac
4648         done
4649         rm -f cf_makeflags.tmp
4650
4651 fi
4652 echo "$as_me:4652: result: $cf_cv_makeflags" >&5
4653 echo "${ECHO_T}$cf_cv_makeflags" >&6
4654
4655 if test -n "$ac_tool_prefix"; then
4656   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4657 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4658 echo "$as_me:4658: checking for $ac_word" >&5
4659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4660 if test "${ac_cv_prog_RANLIB+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   if test -n "$RANLIB"; then
4664   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4665 else
4666   ac_save_IFS=$IFS; IFS=$ac_path_separator
4667 ac_dummy="$PATH"
4668 for ac_dir in $ac_dummy; do
4669   IFS=$ac_save_IFS
4670   test -z "$ac_dir" && ac_dir=.
4671   $as_executable_p "$ac_dir/$ac_word" || continue
4672 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4673 echo "$as_me:4673: found $ac_dir/$ac_word" >&5
4674 break
4675 done
4676
4677 fi
4678 fi
4679 RANLIB=$ac_cv_prog_RANLIB
4680 if test -n "$RANLIB"; then
4681   echo "$as_me:4681: result: $RANLIB" >&5
4682 echo "${ECHO_T}$RANLIB" >&6
4683 else
4684   echo "$as_me:4684: result: no" >&5
4685 echo "${ECHO_T}no" >&6
4686 fi
4687
4688 fi
4689 if test -z "$ac_cv_prog_RANLIB"; then
4690   ac_ct_RANLIB=$RANLIB
4691   # Extract the first word of "ranlib", so it can be a program name with args.
4692 set dummy ranlib; ac_word=$2
4693 echo "$as_me:4693: checking for $ac_word" >&5
4694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4695 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   if test -n "$ac_ct_RANLIB"; then
4699   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4700 else
4701   ac_save_IFS=$IFS; IFS=$ac_path_separator
4702 ac_dummy="$PATH"
4703 for ac_dir in $ac_dummy; do
4704   IFS=$ac_save_IFS
4705   test -z "$ac_dir" && ac_dir=.
4706   $as_executable_p "$ac_dir/$ac_word" || continue
4707 ac_cv_prog_ac_ct_RANLIB="ranlib"
4708 echo "$as_me:4708: found $ac_dir/$ac_word" >&5
4709 break
4710 done
4711
4712   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4713 fi
4714 fi
4715 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4716 if test -n "$ac_ct_RANLIB"; then
4717   echo "$as_me:4717: result: $ac_ct_RANLIB" >&5
4718 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4719 else
4720   echo "$as_me:4720: result: no" >&5
4721 echo "${ECHO_T}no" >&6
4722 fi
4723
4724   RANLIB=$ac_ct_RANLIB
4725 else
4726   RANLIB="$ac_cv_prog_RANLIB"
4727 fi
4728
4729 if test -n "$ac_tool_prefix"; then
4730   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4731 set dummy ${ac_tool_prefix}ld; ac_word=$2
4732 echo "$as_me:4732: checking for $ac_word" >&5
4733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4734 if test "${ac_cv_prog_LD+set}" = set; then
4735   echo $ECHO_N "(cached) $ECHO_C" >&6
4736 else
4737   if test -n "$LD"; then
4738   ac_cv_prog_LD="$LD" # Let the user override the test.
4739 else
4740   ac_save_IFS=$IFS; IFS=$ac_path_separator
4741 ac_dummy="$PATH"
4742 for ac_dir in $ac_dummy; do
4743   IFS=$ac_save_IFS
4744   test -z "$ac_dir" && ac_dir=.
4745   $as_executable_p "$ac_dir/$ac_word" || continue
4746 ac_cv_prog_LD="${ac_tool_prefix}ld"
4747 echo "$as_me:4747: found $ac_dir/$ac_word" >&5
4748 break
4749 done
4750
4751 fi
4752 fi
4753 LD=$ac_cv_prog_LD
4754 if test -n "$LD"; then
4755   echo "$as_me:4755: result: $LD" >&5
4756 echo "${ECHO_T}$LD" >&6
4757 else
4758   echo "$as_me:4758: result: no" >&5
4759 echo "${ECHO_T}no" >&6
4760 fi
4761
4762 fi
4763 if test -z "$ac_cv_prog_LD"; then
4764   ac_ct_LD=$LD
4765   # Extract the first word of "ld", so it can be a program name with args.
4766 set dummy ld; ac_word=$2
4767 echo "$as_me:4767: checking for $ac_word" >&5
4768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4769 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4770   echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772   if test -n "$ac_ct_LD"; then
4773   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4774 else
4775   ac_save_IFS=$IFS; IFS=$ac_path_separator
4776 ac_dummy="$PATH"
4777 for ac_dir in $ac_dummy; do
4778   IFS=$ac_save_IFS
4779   test -z "$ac_dir" && ac_dir=.
4780   $as_executable_p "$ac_dir/$ac_word" || continue
4781 ac_cv_prog_ac_ct_LD="ld"
4782 echo "$as_me:4782: found $ac_dir/$ac_word" >&5
4783 break
4784 done
4785
4786   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4787 fi
4788 fi
4789 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4790 if test -n "$ac_ct_LD"; then
4791   echo "$as_me:4791: result: $ac_ct_LD" >&5
4792 echo "${ECHO_T}$ac_ct_LD" >&6
4793 else
4794   echo "$as_me:4794: result: no" >&5
4795 echo "${ECHO_T}no" >&6
4796 fi
4797
4798   LD=$ac_ct_LD
4799 else
4800   LD="$ac_cv_prog_LD"
4801 fi
4802
4803 if test -n "$ac_tool_prefix"; then
4804   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4805 set dummy ${ac_tool_prefix}ar; ac_word=$2
4806 echo "$as_me:4806: checking for $ac_word" >&5
4807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4808 if test "${ac_cv_prog_AR+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   if test -n "$AR"; then
4812   ac_cv_prog_AR="$AR" # Let the user override the test.
4813 else
4814   ac_save_IFS=$IFS; IFS=$ac_path_separator
4815 ac_dummy="$PATH"
4816 for ac_dir in $ac_dummy; do
4817   IFS=$ac_save_IFS
4818   test -z "$ac_dir" && ac_dir=.
4819   $as_executable_p "$ac_dir/$ac_word" || continue
4820 ac_cv_prog_AR="${ac_tool_prefix}ar"
4821 echo "$as_me:4821: found $ac_dir/$ac_word" >&5
4822 break
4823 done
4824
4825 fi
4826 fi
4827 AR=$ac_cv_prog_AR
4828 if test -n "$AR"; then
4829   echo "$as_me:4829: result: $AR" >&5
4830 echo "${ECHO_T}$AR" >&6
4831 else
4832   echo "$as_me:4832: result: no" >&5
4833 echo "${ECHO_T}no" >&6
4834 fi
4835
4836 fi
4837 if test -z "$ac_cv_prog_AR"; then
4838   ac_ct_AR=$AR
4839   # Extract the first word of "ar", so it can be a program name with args.
4840 set dummy ar; ac_word=$2
4841 echo "$as_me:4841: checking for $ac_word" >&5
4842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4843 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4844   echo $ECHO_N "(cached) $ECHO_C" >&6
4845 else
4846   if test -n "$ac_ct_AR"; then
4847   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4848 else
4849   ac_save_IFS=$IFS; IFS=$ac_path_separator
4850 ac_dummy="$PATH"
4851 for ac_dir in $ac_dummy; do
4852   IFS=$ac_save_IFS
4853   test -z "$ac_dir" && ac_dir=.
4854   $as_executable_p "$ac_dir/$ac_word" || continue
4855 ac_cv_prog_ac_ct_AR="ar"
4856 echo "$as_me:4856: found $ac_dir/$ac_word" >&5
4857 break
4858 done
4859
4860   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4861 fi
4862 fi
4863 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4864 if test -n "$ac_ct_AR"; then
4865   echo "$as_me:4865: result: $ac_ct_AR" >&5
4866 echo "${ECHO_T}$ac_ct_AR" >&6
4867 else
4868   echo "$as_me:4868: result: no" >&5
4869 echo "${ECHO_T}no" >&6
4870 fi
4871
4872   AR=$ac_ct_AR
4873 else
4874   AR="$ac_cv_prog_AR"
4875 fi
4876
4877 if test -n "$ac_tool_prefix"; then
4878   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4879 set dummy ${ac_tool_prefix}nm; ac_word=$2
4880 echo "$as_me:4880: checking for $ac_word" >&5
4881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4882 if test "${ac_cv_prog_NM+set}" = set; then
4883   echo $ECHO_N "(cached) $ECHO_C" >&6
4884 else
4885   if test -n "$NM"; then
4886   ac_cv_prog_NM="$NM" # Let the user override the test.
4887 else
4888   ac_save_IFS=$IFS; IFS=$ac_path_separator
4889 ac_dummy="$PATH"
4890 for ac_dir in $ac_dummy; do
4891   IFS=$ac_save_IFS
4892   test -z "$ac_dir" && ac_dir=.
4893   $as_executable_p "$ac_dir/$ac_word" || continue
4894 ac_cv_prog_NM="${ac_tool_prefix}nm"
4895 echo "$as_me:4895: found $ac_dir/$ac_word" >&5
4896 break
4897 done
4898
4899 fi
4900 fi
4901 NM=$ac_cv_prog_NM
4902 if test -n "$NM"; then
4903   echo "$as_me:4903: result: $NM" >&5
4904 echo "${ECHO_T}$NM" >&6
4905 else
4906   echo "$as_me:4906: result: no" >&5
4907 echo "${ECHO_T}no" >&6
4908 fi
4909
4910 fi
4911 if test -z "$ac_cv_prog_NM"; then
4912   ac_ct_NM=$NM
4913   # Extract the first word of "nm", so it can be a program name with args.
4914 set dummy nm; ac_word=$2
4915 echo "$as_me:4915: checking for $ac_word" >&5
4916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4917 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4918   echo $ECHO_N "(cached) $ECHO_C" >&6
4919 else
4920   if test -n "$ac_ct_NM"; then
4921   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4922 else
4923   ac_save_IFS=$IFS; IFS=$ac_path_separator
4924 ac_dummy="$PATH"
4925 for ac_dir in $ac_dummy; do
4926   IFS=$ac_save_IFS
4927   test -z "$ac_dir" && ac_dir=.
4928   $as_executable_p "$ac_dir/$ac_word" || continue
4929 ac_cv_prog_ac_ct_NM="nm"
4930 echo "$as_me:4930: found $ac_dir/$ac_word" >&5
4931 break
4932 done
4933
4934   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4935 fi
4936 fi
4937 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4938 if test -n "$ac_ct_NM"; then
4939   echo "$as_me:4939: result: $ac_ct_NM" >&5
4940 echo "${ECHO_T}$ac_ct_NM" >&6
4941 else
4942   echo "$as_me:4942: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946   NM=$ac_ct_NM
4947 else
4948   NM="$ac_cv_prog_NM"
4949 fi
4950
4951 if test -n "$ac_tool_prefix"; then
4952   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4953 set dummy ${ac_tool_prefix}ar; ac_word=$2
4954 echo "$as_me:4954: checking for $ac_word" >&5
4955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4956 if test "${ac_cv_prog_AR+set}" = set; then
4957   echo $ECHO_N "(cached) $ECHO_C" >&6
4958 else
4959   if test -n "$AR"; then
4960   ac_cv_prog_AR="$AR" # Let the user override the test.
4961 else
4962   ac_save_IFS=$IFS; IFS=$ac_path_separator
4963 ac_dummy="$PATH"
4964 for ac_dir in $ac_dummy; do
4965   IFS=$ac_save_IFS
4966   test -z "$ac_dir" && ac_dir=.
4967   $as_executable_p "$ac_dir/$ac_word" || continue
4968 ac_cv_prog_AR="${ac_tool_prefix}ar"
4969 echo "$as_me:4969: found $ac_dir/$ac_word" >&5
4970 break
4971 done
4972
4973 fi
4974 fi
4975 AR=$ac_cv_prog_AR
4976 if test -n "$AR"; then
4977   echo "$as_me:4977: result: $AR" >&5
4978 echo "${ECHO_T}$AR" >&6
4979 else
4980   echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4982 fi
4983
4984 fi
4985 if test -z "$ac_cv_prog_AR"; then
4986   ac_ct_AR=$AR
4987   # Extract the first word of "ar", so it can be a program name with args.
4988 set dummy ar; ac_word=$2
4989 echo "$as_me:4989: checking for $ac_word" >&5
4990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4991 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4992   echo $ECHO_N "(cached) $ECHO_C" >&6
4993 else
4994   if test -n "$ac_ct_AR"; then
4995   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4996 else
4997   ac_save_IFS=$IFS; IFS=$ac_path_separator
4998 ac_dummy="$PATH"
4999 for ac_dir in $ac_dummy; do
5000   IFS=$ac_save_IFS
5001   test -z "$ac_dir" && ac_dir=.
5002   $as_executable_p "$ac_dir/$ac_word" || continue
5003 ac_cv_prog_ac_ct_AR="ar"
5004 echo "$as_me:5004: found $ac_dir/$ac_word" >&5
5005 break
5006 done
5007
5008   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5009 fi
5010 fi
5011 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5012 if test -n "$ac_ct_AR"; then
5013   echo "$as_me:5013: result: $ac_ct_AR" >&5
5014 echo "${ECHO_T}$ac_ct_AR" >&6
5015 else
5016   echo "$as_me:5016: result: no" >&5
5017 echo "${ECHO_T}no" >&6
5018 fi
5019
5020   AR=$ac_ct_AR
5021 else
5022   AR="$ac_cv_prog_AR"
5023 fi
5024
5025 echo "$as_me:5025: checking for options to update archives" >&5
5026 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5027 if test "${cf_cv_ar_flags+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030
5031         case "$cf_cv_system_name" in
5032         (*-msvc*)
5033                 cf_cv_ar_flags=''
5034                 cat >mk_static_lib.sh <<-EOF
5035                 #!$SHELL
5036                 MSVC_BIN="$AR"
5037                 out="\$1"
5038                 shift
5039                 exec \$MSVC_BIN -out:"\$out" \$@
5040                 EOF
5041                 chmod +x mk_static_lib.sh
5042                 AR=`pwd`/mk_static_lib.sh
5043                 ;;
5044         (*)
5045                 cf_cv_ar_flags=unknown
5046                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5047                 do
5048
5049                         # check if $ARFLAGS already contains this choice
5050                         if test "x$ARFLAGS" != "x" ; then
5051                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5052                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5053                                         cf_cv_ar_flags=
5054                                         break
5055                                 fi
5056                         fi
5057
5058                         rm -f "conftest.$ac_cv_objext"
5059                         rm -f conftest.a
5060
5061                         cat >"conftest.$ac_ext" <<EOF
5062 #line 5062 "configure"
5063 int     testdata[3] = { 123, 456, 789 };
5064 EOF
5065                         if { (eval echo "$as_me:5065: \"$ac_compile\"") >&5
5066   (eval $ac_compile) 2>&5
5067   ac_status=$?
5068   echo "$as_me:5068: \$? = $ac_status" >&5
5069   (exit "$ac_status"); } ; then
5070                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5071                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5072                                 if test -f conftest.a ; then
5073                                         cf_cv_ar_flags="$cf_ar_flags"
5074                                         break
5075                                 fi
5076                         else
5077                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5078
5079 echo "${as_me:-configure}:5079: testing cannot compile test-program ..." 1>&5
5080
5081                                 break
5082                         fi
5083                 done
5084                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5085                 ;;
5086         esac
5087
5088 fi
5089 echo "$as_me:5089: result: $cf_cv_ar_flags" >&5
5090 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5091
5092 if test -n "$ARFLAGS" ; then
5093         if test -n "$cf_cv_ar_flags" ; then
5094                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5095         fi
5096 else
5097         ARFLAGS=$cf_cv_ar_flags
5098 fi
5099
5100 echo "$as_me:5100: checking if you have specified an install-prefix" >&5
5101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5102
5103 # Check whether --with-install-prefix or --without-install-prefix was given.
5104 if test "${with_install_prefix+set}" = set; then
5105   withval="$with_install_prefix"
5106   case "x$withval" in
5107         (xyes|xno)
5108                 ;;
5109         (*)     DESTDIR="$withval"
5110                 ;;
5111         esac
5112 fi;
5113 echo "$as_me:5113: result: $DESTDIR" >&5
5114 echo "${ECHO_T}$DESTDIR" >&6
5115
5116 ###############################################################################
5117
5118 # If we're cross-compiling, allow the user to override the tools and their
5119 # options.  The configure script is oriented toward identifying the host
5120 # compiler, etc., but we need a build compiler to generate parts of the source.
5121
5122 case "$cf_cv_system_name" in
5123 (*-msvc*)
5124         LDFLAGS="$LDFLAGS user32.lib"
5125         export LDFLAGS
5126         ;;
5127 esac
5128
5129 if test "$cross_compiling" = yes ; then
5130
5131         # defaults that we might want to override
5132         : ${BUILD_CFLAGS:=''}
5133         : ${BUILD_CPPFLAGS:=''}
5134         : ${BUILD_LDFLAGS:=''}
5135         : ${BUILD_LIBS:=''}
5136         : ${BUILD_EXEEXT:='$x'}
5137         : ${BUILD_OBJEXT:='o'}
5138
5139 # Check whether --with-build-cc or --without-build-cc was given.
5140 if test "${with_build_cc+set}" = set; then
5141   withval="$with_build_cc"
5142   BUILD_CC="$withval"
5143 else
5144   for ac_prog in gcc clang c99 c89 cc cl
5145 do
5146   # Extract the first word of "$ac_prog", so it can be a program name with args.
5147 set dummy $ac_prog; ac_word=$2
5148 echo "$as_me:5148: checking for $ac_word" >&5
5149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5150 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5151   echo $ECHO_N "(cached) $ECHO_C" >&6
5152 else
5153   if test -n "$BUILD_CC"; then
5154   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5155 else
5156   ac_save_IFS=$IFS; IFS=$ac_path_separator
5157 ac_dummy="$PATH"
5158 for ac_dir in $ac_dummy; do
5159   IFS=$ac_save_IFS
5160   test -z "$ac_dir" && ac_dir=.
5161   $as_executable_p "$ac_dir/$ac_word" || continue
5162 ac_cv_prog_BUILD_CC="$ac_prog"
5163 echo "$as_me:5163: found $ac_dir/$ac_word" >&5
5164 break
5165 done
5166
5167 fi
5168 fi
5169 BUILD_CC=$ac_cv_prog_BUILD_CC
5170 if test -n "$BUILD_CC"; then
5171   echo "$as_me:5171: result: $BUILD_CC" >&5
5172 echo "${ECHO_T}$BUILD_CC" >&6
5173 else
5174   echo "$as_me:5174: result: no" >&5
5175 echo "${ECHO_T}no" >&6
5176 fi
5177
5178   test -n "$BUILD_CC" && break
5179 done
5180 test -n "$BUILD_CC" || BUILD_CC="none"
5181
5182 fi;
5183         echo "$as_me:5183: checking for native build C compiler" >&5
5184 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5185         echo "$as_me:5185: result: $BUILD_CC" >&5
5186 echo "${ECHO_T}$BUILD_CC" >&6
5187
5188         echo "$as_me:5188: checking for native build C preprocessor" >&5
5189 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5190
5191 # Check whether --with-build-cpp or --without-build-cpp was given.
5192 if test "${with_build_cpp+set}" = set; then
5193   withval="$with_build_cpp"
5194   BUILD_CPP="$withval"
5195 else
5196   BUILD_CPP='${BUILD_CC} -E'
5197 fi;
5198         echo "$as_me:5198: result: $BUILD_CPP" >&5
5199 echo "${ECHO_T}$BUILD_CPP" >&6
5200
5201         echo "$as_me:5201: checking for native build C flags" >&5
5202 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5203
5204 # Check whether --with-build-cflags or --without-build-cflags was given.
5205 if test "${with_build_cflags+set}" = set; then
5206   withval="$with_build_cflags"
5207   BUILD_CFLAGS="$withval"
5208 fi;
5209         echo "$as_me:5209: result: $BUILD_CFLAGS" >&5
5210 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5211
5212         echo "$as_me:5212: checking for native build C preprocessor-flags" >&5
5213 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5214
5215 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5216 if test "${with_build_cppflags+set}" = set; then
5217   withval="$with_build_cppflags"
5218   BUILD_CPPFLAGS="$withval"
5219 fi;
5220         echo "$as_me:5220: result: $BUILD_CPPFLAGS" >&5
5221 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5222
5223         echo "$as_me:5223: checking for native build linker-flags" >&5
5224 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5225
5226 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5227 if test "${with_build_ldflags+set}" = set; then
5228   withval="$with_build_ldflags"
5229   BUILD_LDFLAGS="$withval"
5230 fi;
5231         echo "$as_me:5231: result: $BUILD_LDFLAGS" >&5
5232 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5233
5234         echo "$as_me:5234: checking for native build linker-libraries" >&5
5235 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5236
5237 # Check whether --with-build-libs or --without-build-libs was given.
5238 if test "${with_build_libs+set}" = set; then
5239   withval="$with_build_libs"
5240   BUILD_LIBS="$withval"
5241 fi;
5242         echo "$as_me:5242: result: $BUILD_LIBS" >&5
5243 echo "${ECHO_T}$BUILD_LIBS" >&6
5244
5245         # this assumes we're on Unix.
5246         BUILD_EXEEXT=
5247         BUILD_OBJEXT=o
5248
5249         : ${BUILD_CC:='${CC}'}
5250
5251         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5252                 { { echo "$as_me:5252: error: Cross-build requires two compilers.
5253 Use --with-build-cc to specify the native compiler." >&5
5254 echo "$as_me: error: Cross-build requires two compilers.
5255 Use --with-build-cc to specify the native compiler." >&2;}
5256    { (exit 1); exit 1; }; }
5257         fi
5258
5259 else
5260         : ${BUILD_CC:='${CC}'}
5261         : ${BUILD_CPP:='${CPP}'}
5262         : ${BUILD_CFLAGS:='${CFLAGS}'}
5263         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5264         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5265         : ${BUILD_LIBS:='${LIBS}'}
5266         : ${BUILD_EXEEXT:='$x'}
5267         : ${BUILD_OBJEXT:='o'}
5268 fi
5269
5270 ###############################################################################
5271
5272 ### Options to allow the user to specify the set of libraries which are used.
5273 ### Use "--without-normal --with-shared" to allow the default model to be
5274 ### shared, for example.
5275 cf_list_models=""
5276
5277 echo "$as_me:5277: checking if libtool -version-number should be used" >&5
5278 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5279
5280 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5281 if test "${enable_libtool_version+set}" = set; then
5282   enableval="$enable_libtool_version"
5283   test "$enableval" != no && enableval=yes
5284         if test "$enableval" != "yes" ; then
5285     cf_libtool_version=no
5286         else
5287                 cf_libtool_version=yes
5288         fi
5289 else
5290   enableval=yes
5291         cf_libtool_version=yes
5292
5293 fi;
5294 echo "$as_me:5294: result: $cf_libtool_version" >&5
5295 echo "${ECHO_T}$cf_libtool_version" >&6
5296
5297 if test "$cf_libtool_version" = yes ; then
5298         LIBTOOL_VERSION="-version-number"
5299 else
5300         LIBTOOL_VERSION="-version-info"
5301         case "x$VERSION" in
5302         (x)
5303                 { echo "$as_me:5303: WARNING: VERSION was not set" >&5
5304 echo "$as_me: WARNING: VERSION was not set" >&2;}
5305                 ;;
5306         (x*.*.*)
5307                 ABI_VERSION="$VERSION"
5308                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5309
5310 echo "${as_me:-configure}:5310: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5311
5312                 ;;
5313         (x*:*:*)
5314                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5315                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5316
5317 echo "${as_me:-configure}:5317: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5318
5319                 ;;
5320         (*)
5321                 { echo "$as_me:5321: WARNING: unexpected VERSION value: $VERSION" >&5
5322 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5323                 ;;
5324         esac
5325 fi
5326
5327 LIBTOOL=
5328
5329 # common library maintenance symbols that are convenient for libtool scripts:
5330 LIB_CREATE='${AR} -cr'
5331 LIB_OBJECT='${OBJECTS}'
5332 LIB_SUFFIX=.a
5333 LIB_PREP="$RANLIB"
5334
5335 # symbols used to prop libtool up to enable it to determine what it should be
5336 # doing:
5337 LIB_CLEAN=
5338 LIB_COMPILE=
5339 LIB_LINK='${CC}'
5340 LIB_INSTALL=
5341 LIB_UNINSTALL=
5342
5343 echo "$as_me:5343: checking if you want to build libraries with libtool" >&5
5344 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5345
5346 # Check whether --with-libtool or --without-libtool was given.
5347 if test "${with_libtool+set}" = set; then
5348   withval="$with_libtool"
5349   with_libtool=$withval
5350 else
5351   with_libtool=no
5352 fi;
5353 echo "$as_me:5353: result: $with_libtool" >&5
5354 echo "${ECHO_T}$with_libtool" >&6
5355 if test "$with_libtool" != "no"; then
5356
5357         if test "$with_libtool" != "yes" ; then
5358
5359 if test "x$prefix" != xNONE; then
5360         cf_path_syntax="$prefix"
5361 else
5362         cf_path_syntax="$ac_default_prefix"
5363 fi
5364
5365 case ".$with_libtool" in
5366 (.\$\(*\)*|.\'*\'*)
5367         ;;
5368 (..|./*|.\\*)
5369         ;;
5370 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5371         ;;
5372 (.\$\{*prefix\}*|.\$\{*dir\}*)
5373         eval with_libtool="$with_libtool"
5374         case ".$with_libtool" in
5375         (.NONE/*)
5376                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5377                 ;;
5378         esac
5379         ;;
5380 (.no|.NONE/*)
5381         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5382         ;;
5383 (*)
5384         { { echo "$as_me:5384: error: expected a pathname, not \"$with_libtool\"" >&5
5385 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5386    { (exit 1); exit 1; }; }
5387         ;;
5388 esac
5389
5390                 LIBTOOL=$with_libtool
5391         else
5392                 if test -n "$ac_tool_prefix"; then
5393   for ac_prog in libtool glibtool
5394   do
5395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5397 echo "$as_me:5397: checking for $ac_word" >&5
5398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5399 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   if test -n "$LIBTOOL"; then
5403   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5404 else
5405   ac_save_IFS=$IFS; IFS=$ac_path_separator
5406 ac_dummy="$PATH"
5407 for ac_dir in $ac_dummy; do
5408   IFS=$ac_save_IFS
5409   test -z "$ac_dir" && ac_dir=.
5410   $as_executable_p "$ac_dir/$ac_word" || continue
5411 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5412 echo "$as_me:5412: found $ac_dir/$ac_word" >&5
5413 break
5414 done
5415
5416 fi
5417 fi
5418 LIBTOOL=$ac_cv_prog_LIBTOOL
5419 if test -n "$LIBTOOL"; then
5420   echo "$as_me:5420: result: $LIBTOOL" >&5
5421 echo "${ECHO_T}$LIBTOOL" >&6
5422 else
5423   echo "$as_me:5423: result: no" >&5
5424 echo "${ECHO_T}no" >&6
5425 fi
5426
5427     test -n "$LIBTOOL" && break
5428   done
5429 fi
5430 if test -z "$LIBTOOL"; then
5431   ac_ct_LIBTOOL=$LIBTOOL
5432   for ac_prog in libtool glibtool
5433 do
5434   # Extract the first word of "$ac_prog", so it can be a program name with args.
5435 set dummy $ac_prog; ac_word=$2
5436 echo "$as_me:5436: checking for $ac_word" >&5
5437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5438 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5439   echo $ECHO_N "(cached) $ECHO_C" >&6
5440 else
5441   if test -n "$ac_ct_LIBTOOL"; then
5442   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5443 else
5444   ac_save_IFS=$IFS; IFS=$ac_path_separator
5445 ac_dummy="$PATH"
5446 for ac_dir in $ac_dummy; do
5447   IFS=$ac_save_IFS
5448   test -z "$ac_dir" && ac_dir=.
5449   $as_executable_p "$ac_dir/$ac_word" || continue
5450 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5451 echo "$as_me:5451: found $ac_dir/$ac_word" >&5
5452 break
5453 done
5454
5455 fi
5456 fi
5457 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5458 if test -n "$ac_ct_LIBTOOL"; then
5459   echo "$as_me:5459: result: $ac_ct_LIBTOOL" >&5
5460 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5461 else
5462   echo "$as_me:5462: result: no" >&5
5463 echo "${ECHO_T}no" >&6
5464 fi
5465
5466   test -n "$ac_ct_LIBTOOL" && break
5467 done
5468 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5469
5470   LIBTOOL=$ac_ct_LIBTOOL
5471 fi
5472
5473 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5474 then
5475         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.].*//'`
5476 else
5477         cf_cv_libtool_version=
5478 fi
5479 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5480
5481                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5482                 then
5483
5484 unset ac_cv_prog_ac_ct_LIBTOOL
5485 unset ac_ct_LIBTOOL
5486 unset LIBTOOL
5487
5488                         if test -n "$ac_tool_prefix"; then
5489   for ac_prog in glibtool
5490   do
5491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5493 echo "$as_me:5493: checking for $ac_word" >&5
5494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5495 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5496   echo $ECHO_N "(cached) $ECHO_C" >&6
5497 else
5498   if test -n "$LIBTOOL"; then
5499   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5500 else
5501   ac_save_IFS=$IFS; IFS=$ac_path_separator
5502 ac_dummy="$PATH"
5503 for ac_dir in $ac_dummy; do
5504   IFS=$ac_save_IFS
5505   test -z "$ac_dir" && ac_dir=.
5506   $as_executable_p "$ac_dir/$ac_word" || continue
5507 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5508 echo "$as_me:5508: found $ac_dir/$ac_word" >&5
5509 break
5510 done
5511
5512 fi
5513 fi
5514 LIBTOOL=$ac_cv_prog_LIBTOOL
5515 if test -n "$LIBTOOL"; then
5516   echo "$as_me:5516: result: $LIBTOOL" >&5
5517 echo "${ECHO_T}$LIBTOOL" >&6
5518 else
5519   echo "$as_me:5519: result: no" >&5
5520 echo "${ECHO_T}no" >&6
5521 fi
5522
5523     test -n "$LIBTOOL" && break
5524   done
5525 fi
5526 if test -z "$LIBTOOL"; then
5527   ac_ct_LIBTOOL=$LIBTOOL
5528   for ac_prog in glibtool
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 echo "$as_me:5532: checking for $ac_word" >&5
5533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5534 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   if test -n "$ac_ct_LIBTOOL"; then
5538   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5539 else
5540   ac_save_IFS=$IFS; IFS=$ac_path_separator
5541 ac_dummy="$PATH"
5542 for ac_dir in $ac_dummy; do
5543   IFS=$ac_save_IFS
5544   test -z "$ac_dir" && ac_dir=.
5545   $as_executable_p "$ac_dir/$ac_word" || continue
5546 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5547 echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548 break
5549 done
5550
5551 fi
5552 fi
5553 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5554 if test -n "$ac_ct_LIBTOOL"; then
5555   echo "$as_me:5555: result: $ac_ct_LIBTOOL" >&5
5556 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5557 else
5558   echo "$as_me:5558: result: no" >&5
5559 echo "${ECHO_T}no" >&6
5560 fi
5561
5562   test -n "$ac_ct_LIBTOOL" && break
5563 done
5564 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5565
5566   LIBTOOL=$ac_ct_LIBTOOL
5567 fi
5568
5569 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5570 then
5571         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.].*//'`
5572 else
5573         cf_cv_libtool_version=
5574 fi
5575 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5576
5577                 fi
5578         fi
5579         if test -z "$LIBTOOL" ; then
5580                 { { echo "$as_me:5580: error: Cannot find libtool" >&5
5581 echo "$as_me: error: Cannot find libtool" >&2;}
5582    { (exit 1); exit 1; }; }
5583         fi
5584         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5585         LIB_OBJECT='${OBJECTS:.o=.lo}'
5586         LIB_SUFFIX=.la
5587         LIB_CLEAN='${LIBTOOL} --mode=clean'
5588         LIB_COMPILE='${LIBTOOL} --mode=compile'
5589         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5590         LIB_INSTALL='${LIBTOOL} --mode=install'
5591         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5592         LIB_PREP=:
5593
5594 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5595 then
5596         echo "$as_me:5596: checking version of $LIBTOOL" >&5
5597 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5598
5599 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5600 then
5601         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.].*//'`
5602 else
5603         cf_cv_libtool_version=
5604 fi
5605 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5606
5607         echo "$as_me:5607: result: $cf_cv_libtool_version" >&5
5608 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5609         if test -n "$cf_cv_libtool_version"
5610         then
5611                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5612                 case "x$cf_check_libtool_version" in
5613                 (*...GNU-libtool...*)
5614                         ;;
5615                 (*)
5616                         { { echo "$as_me:5616: error: This is not GNU libtool" >&5
5617 echo "$as_me: error: This is not GNU libtool" >&2;}
5618    { (exit 1); exit 1; }; }
5619                         ;;
5620                 esac
5621         else
5622                 { { echo "$as_me:5622: error: No version found for $LIBTOOL" >&5
5623 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5624    { (exit 1); exit 1; }; }
5625         fi
5626 else
5627         { { echo "$as_me:5627: error: GNU libtool has not been found" >&5
5628 echo "$as_me: error: GNU libtool has not been found" >&2;}
5629    { (exit 1); exit 1; }; }
5630 fi
5631
5632         # special hack to add -no-undefined (which libtool should do for itself)
5633         LT_UNDEF=
5634         case "$cf_cv_system_name" in
5635         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5636                 LT_UNDEF=-no-undefined
5637                 ;;
5638         esac
5639
5640         # special hack to add --tag option for C++ compiler
5641         case "$cf_cv_libtool_version" in
5642         (1.[5-9]*|[2-9].[0-9.a-z]*)
5643                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5644                 LIBTOOL="$LIBTOOL --tag=CC"
5645                 ;;
5646         (*)
5647                 LIBTOOL_CXX="$LIBTOOL"
5648                 ;;
5649         esac
5650 else
5651         LIBTOOL=""
5652         LIBTOOL_CXX=""
5653 fi
5654
5655 test -z "$LIBTOOL" && ECHO_LT=
5656
5657 if test "$with_libtool" != "no" ; then
5658
5659 cf_list_models="$cf_list_models libtool"
5660
5661 else
5662
5663 echo "$as_me:5663: checking if you want to build shared libraries" >&5
5664 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5665
5666 # Check whether --with-shared or --without-shared was given.
5667 if test "${with_shared+set}" = set; then
5668   withval="$with_shared"
5669   with_shared=$withval
5670 else
5671   with_shared=no
5672 fi;
5673 echo "$as_me:5673: result: $with_shared" >&5
5674 echo "${ECHO_T}$with_shared" >&6
5675 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5676
5677 echo "$as_me:5677: checking if you want to build static libraries" >&5
5678 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5679
5680 # Check whether --with-normal or --without-normal was given.
5681 if test "${with_normal+set}" = set; then
5682   withval="$with_normal"
5683   with_normal=$withval
5684 else
5685   with_normal=yes
5686 fi;
5687 echo "$as_me:5687: result: $with_normal" >&5
5688 echo "${ECHO_T}$with_normal" >&6
5689 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5690
5691 echo "$as_me:5691: checking if you want to build debug libraries" >&5
5692 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5693
5694 # Check whether --with-debug or --without-debug was given.
5695 if test "${with_debug+set}" = set; then
5696   withval="$with_debug"
5697   with_debug=$withval
5698 else
5699   with_debug=yes
5700 fi;
5701 echo "$as_me:5701: result: $with_debug" >&5
5702 echo "${ECHO_T}$with_debug" >&6
5703 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5704
5705 echo "$as_me:5705: checking if you want to build profiling libraries" >&5
5706 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5707
5708 # Check whether --with-profile or --without-profile was given.
5709 if test "${with_profile+set}" = set; then
5710   withval="$with_profile"
5711   with_profile=$withval
5712 else
5713   with_profile=no
5714 fi;
5715 echo "$as_me:5715: result: $with_profile" >&5
5716 echo "${ECHO_T}$with_profile" >&6
5717 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5718
5719 fi
5720
5721 if test "X$cf_with_cxx_binding" != Xno; then
5722 if test "x$with_shared" = "xyes"; then
5723 echo "$as_me:5723: checking if you want to build C++ shared libraries" >&5
5724 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5725
5726 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5727 if test "${with_cxx_shared+set}" = set; then
5728   withval="$with_cxx_shared"
5729   with_shared_cxx=$withval
5730 else
5731   with_shared_cxx=no
5732 fi;
5733 echo "$as_me:5733: result: $with_shared_cxx" >&5
5734 echo "${ECHO_T}$with_shared_cxx" >&6
5735 fi
5736 fi
5737
5738 ###############################################################################
5739
5740 echo "$as_me:5740: checking for specified models" >&5
5741 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5742 test -z "$cf_list_models" && cf_list_models=normal
5743 test "$with_libtool" != "no" && cf_list_models=libtool
5744 echo "$as_me:5744: result: $cf_list_models" >&5
5745 echo "${ECHO_T}$cf_list_models" >&6
5746
5747 ### Use the first model as the default, and save its suffix for use in building
5748 ### up test-applications.
5749 echo "$as_me:5749: checking for default model" >&5
5750 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5751 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5752 echo "$as_me:5752: result: $DFT_LWR_MODEL" >&5
5753 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5754
5755 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5756
5757 TICS_NAME=tic
5758
5759 TINFO_NAME=tinfo
5760
5761 LIB_NAME=ncurses
5762
5763 LIB_DIR=../lib
5764 LIB_2ND=../../lib
5765
5766 echo "$as_me:5766: checking if you want to have a library-prefix" >&5
5767 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5768
5769 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5770 if test "${with_lib_prefix+set}" = set; then
5771   withval="$with_lib_prefix"
5772   with_lib_prefix=$withval
5773 else
5774   with_lib_prefix=auto
5775 fi;
5776 echo "$as_me:5776: result: $with_lib_prefix" >&5
5777 echo "${ECHO_T}$with_lib_prefix" >&6
5778
5779 if test "$with_lib_prefix" = auto
5780 then
5781
5782         case "$cf_cv_system_name" in
5783         (OS/2*|os2*)
5784                 if test "$DFT_LWR_MODEL" = libtool; then
5785                         LIB_PREFIX='lib'
5786                 else
5787                         LIB_PREFIX=''
5788                 fi
5789                 ;;
5790         (*-msvc*)
5791                 LIB_PREFIX=''
5792                 ;;
5793         (*)     LIB_PREFIX='lib'
5794                 ;;
5795         esac
5796 cf_prefix=$LIB_PREFIX
5797
5798 elif test "$with_lib_prefix" = no
5799 then
5800         LIB_PREFIX=
5801 else
5802         LIB_PREFIX=$with_lib_prefix
5803 fi
5804
5805 LIB_SUFFIX=
5806
5807         echo "$as_me:5807: checking for PATH separator" >&5
5808 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5809         case "$cf_cv_system_name" in
5810         (os2*)  PATH_SEPARATOR=';'  ;;
5811         (*)     ${PATH_SEPARATOR:=':'}  ;;
5812         esac
5813
5814         echo "$as_me:5814: result: $PATH_SEPARATOR" >&5
5815 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5816
5817 ###############################################################################
5818
5819 echo "$as_me:5819: checking if you want to build a separate terminfo library" >&5
5820 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5821
5822 # Check whether --with-termlib or --without-termlib was given.
5823 if test "${with_termlib+set}" = set; then
5824   withval="$with_termlib"
5825   with_termlib=$withval
5826 else
5827   with_termlib=no
5828 fi;
5829 echo "$as_me:5829: result: $with_termlib" >&5
5830 echo "${ECHO_T}$with_termlib" >&6
5831
5832 echo "$as_me:5832: checking if you want to build a separate tic library" >&5
5833 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5834
5835 # Check whether --with-ticlib or --without-ticlib was given.
5836 if test "${with_ticlib+set}" = set; then
5837   withval="$with_ticlib"
5838   with_ticlib=$withval
5839 else
5840   with_ticlib=no
5841 fi;
5842 echo "$as_me:5842: result: $with_ticlib" >&5
5843 echo "${ECHO_T}$with_ticlib" >&6
5844
5845 if test X"$CC_G_OPT" = X"" ; then
5846         CC_G_OPT='-g'
5847         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5848 fi
5849
5850 if test X"$CXX_G_OPT" = X"" ; then
5851         CXX_G_OPT='-g'
5852         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5853 fi
5854
5855 echo "$as_me:5855: checking for default loader flags" >&5
5856 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5857 case "$DFT_LWR_MODEL" in
5858 (libtool) LD_MODEL=''   ;;
5859 (normal)  LD_MODEL=''   ;;
5860 (debug)   LD_MODEL=$CC_G_OPT ;;
5861 (profile) LD_MODEL='-pg';;
5862 (shared)  LD_MODEL=''   ;;
5863 esac
5864 echo "$as_me:5864: result: $LD_MODEL" >&5
5865 echo "${ECHO_T}$LD_MODEL" >&6
5866
5867 case "$DFT_LWR_MODEL" in
5868 (shared)
5869
5870 echo "$as_me:5870: checking if rpath option should be used" >&5
5871 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5872
5873 # Check whether --enable-rpath or --disable-rpath was given.
5874 if test "${enable_rpath+set}" = set; then
5875   enableval="$enable_rpath"
5876   cf_cv_enable_rpath=$enableval
5877 else
5878   cf_cv_enable_rpath=no
5879 fi;
5880 echo "$as_me:5880: result: $cf_cv_enable_rpath" >&5
5881 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5882
5883 echo "$as_me:5883: checking if shared libraries should be relinked during install" >&5
5884 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5885
5886 # Check whether --enable-relink or --disable-relink was given.
5887 if test "${enable_relink+set}" = set; then
5888   enableval="$enable_relink"
5889   cf_cv_do_relink=$enableval
5890 else
5891   cf_cv_do_relink=yes
5892 fi;
5893 echo "$as_me:5893: result: $cf_cv_do_relink" >&5
5894 echo "${ECHO_T}$cf_cv_do_relink" >&6
5895         ;;
5896 esac
5897
5898 # we will build libraries one-level down.
5899 rel_builddir=..
5900
5901 LD_RPATH_OPT=
5902 if test "x$cf_cv_enable_rpath" != xno
5903 then
5904         echo "$as_me:5904: checking for an rpath option" >&5
5905 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5906         case "$cf_cv_system_name" in
5907         (irix*)
5908                 if test "$GCC" = yes; then
5909                         LD_RPATH_OPT="-Wl,-rpath,"
5910                 else
5911                         LD_RPATH_OPT="-rpath "
5912                 fi
5913                 ;;
5914         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5915                 LD_RPATH_OPT="-Wl,-rpath,"
5916                 ;;
5917         (openbsd[2-9].*|mirbsd*)
5918                 LD_RPATH_OPT="-Wl,-rpath,"
5919                 ;;
5920         (dragonfly*)
5921                 LD_RPATH_OPT="-rpath "
5922                 ;;
5923         (netbsd*)
5924                 LD_RPATH_OPT="-Wl,-rpath,"
5925                 ;;
5926         (osf*|mls+*)
5927                 LD_RPATH_OPT="-rpath "
5928                 ;;
5929         (solaris2*)
5930                 LD_RPATH_OPT="-R"
5931                 ;;
5932         (*)
5933                 ;;
5934         esac
5935         echo "$as_me:5935: result: $LD_RPATH_OPT" >&5
5936 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5937
5938         case "x$LD_RPATH_OPT" in
5939         (x-R*)
5940                 echo "$as_me:5940: checking if we need a space after rpath option" >&5
5941 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5942                 cf_save_LIBS="$LIBS"
5943
5944 cf_add_libs="$LIBS"
5945 # reverse order
5946 cf_add_0lib=
5947 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5948 # filter duplicates
5949 for cf_add_1lib in $cf_add_0lib; do
5950         for cf_add_2lib in $cf_add_libs; do
5951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5952                         cf_add_1lib=
5953                         break
5954                 fi
5955         done
5956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5957 done
5958 LIBS="$cf_add_libs"
5959
5960                 cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5963
5964 int
5965 main (void)
5966 {
5967
5968   ;
5969   return 0;
5970 }
5971 _ACEOF
5972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5973 if { (eval echo "$as_me:5973: \"$ac_link\"") >&5
5974   (eval $ac_link) 2>&5
5975   ac_status=$?
5976   echo "$as_me:5976: \$? = $ac_status" >&5
5977   (exit "$ac_status"); } &&
5978          { ac_try='test -s "conftest$ac_exeext"'
5979   { (eval echo "$as_me:5979: \"$ac_try\"") >&5
5980   (eval $ac_try) 2>&5
5981   ac_status=$?
5982   echo "$as_me:5982: \$? = $ac_status" >&5
5983   (exit "$ac_status"); }; }; then
5984   cf_rpath_space=no
5985 else
5986   echo "$as_me: failed program was:" >&5
5987 cat "conftest.$ac_ext" >&5
5988 cf_rpath_space=yes
5989 fi
5990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5991                 LIBS="$cf_save_LIBS"
5992                 echo "$as_me:5992: result: $cf_rpath_space" >&5
5993 echo "${ECHO_T}$cf_rpath_space" >&6
5994                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5995                 ;;
5996         esac
5997 fi
5998
5999         RM_SHARED_OPTS=
6000         LOCAL_LDFLAGS=
6001         LOCAL_LDFLAGS2=
6002         LD_SHARED_OPTS=
6003         INSTALL_LIB="-m 644"
6004         : ${rel_builddir:=.}
6005
6006         shlibdir=$libdir
6007
6008         MAKE_DLLS="#"
6009
6010         cf_cv_do_symlinks=no
6011         cf_ld_rpath_opt=
6012         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6013
6014         echo "$as_me:6014: checking if release/abi version should be used for shared libs" >&5
6015 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6016
6017 # Check whether --with-shlib-version or --without-shlib-version was given.
6018 if test "${with_shlib_version+set}" = set; then
6019   withval="$with_shlib_version"
6020   test -z "$withval" && withval=auto
6021         case "$withval" in
6022         (yes)
6023                 cf_cv_shlib_version=auto
6024                 ;;
6025         (rel|abi|auto)
6026                 cf_cv_shlib_version=$withval
6027                 ;;
6028         (*)
6029                 echo "$as_me:6029: result: $withval" >&5
6030 echo "${ECHO_T}$withval" >&6
6031                 { { echo "$as_me:6031: error: option value must be one of: rel, abi, or auto" >&5
6032 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6033    { (exit 1); exit 1; }; }
6034                 ;;
6035         esac
6036
6037 else
6038   cf_cv_shlib_version=auto
6039 fi;
6040         echo "$as_me:6040: result: $cf_cv_shlib_version" >&5
6041 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6042
6043         cf_cv_rm_so_locs=no
6044         cf_try_cflags=
6045
6046         # Some less-capable ports of gcc support only -fpic
6047         CC_SHARED_OPTS=
6048
6049         cf_try_fPIC=no
6050         if test "$GCC" = yes
6051         then
6052                 cf_try_fPIC=yes
6053         else
6054                 case "$cf_cv_system_name" in
6055                 (*linux*)       # e.g., PGI compiler
6056                         cf_try_fPIC=yes
6057                         ;;
6058                 esac
6059         fi
6060
6061         if test "$cf_try_fPIC" = yes
6062         then
6063                 echo "$as_me:6063: checking which $CC option to use" >&5
6064 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6065                 cf_save_CFLAGS="$CFLAGS"
6066                 for CC_SHARED_OPTS in -fPIC -fpic ''
6067                 do
6068                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6069                         cat >"conftest.$ac_ext" <<_ACEOF
6070 #line 6070 "configure"
6071 #include "confdefs.h"
6072 #include <stdio.h>
6073 int
6074 main (void)
6075 {
6076 int x = 1
6077   ;
6078   return 0;
6079 }
6080 _ACEOF
6081 rm -f "conftest.$ac_objext"
6082 if { (eval echo "$as_me:6082: \"$ac_compile\"") >&5
6083   (eval $ac_compile) 2>&5
6084   ac_status=$?
6085   echo "$as_me:6085: \$? = $ac_status" >&5
6086   (exit "$ac_status"); } &&
6087          { ac_try='test -s "conftest.$ac_objext"'
6088   { (eval echo "$as_me:6088: \"$ac_try\"") >&5
6089   (eval $ac_try) 2>&5
6090   ac_status=$?
6091   echo "$as_me:6091: \$? = $ac_status" >&5
6092   (exit "$ac_status"); }; }; then
6093   break
6094 else
6095   echo "$as_me: failed program was:" >&5
6096 cat "conftest.$ac_ext" >&5
6097 fi
6098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6099                 done
6100                 echo "$as_me:6100: result: $CC_SHARED_OPTS" >&5
6101 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6102                 CFLAGS="$cf_save_CFLAGS"
6103         fi
6104
6105         cf_cv_shlib_version_infix=no
6106
6107         case "$cf_cv_system_name" in
6108         (aix4.3-9*|aix[5-7]*)
6109                 if test "$GCC" = yes; then
6110                         CC_SHARED_OPTS='-Wl,-brtl'
6111                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6112                 else
6113                         CC_SHARED_OPTS='-brtl'
6114                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6115                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6116                 fi
6117                 ;;
6118         (beos*)
6119                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6120                 ;;
6121         (cygwin*)
6122                 CC_SHARED_OPTS=
6123                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6124                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6125                 cf_cv_shlib_version=cygdll
6126                 cf_cv_shlib_version_infix=cygdll
6127                 shlibdir=$bindir
6128                 MAKE_DLLS=
6129                 cat >mk_shared_lib.sh <<-CF_EOF
6130                 #!$SHELL
6131                 SHARED_LIB=\$1
6132                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6133                 shift
6134                 cat <<-EOF
6135                 Linking shared library
6136                 ** SHARED_LIB \$SHARED_LIB
6137                 ** IMPORT_LIB \$IMPORT_LIB
6138 EOF
6139                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6140 CF_EOF
6141                 chmod +x mk_shared_lib.sh
6142                 ;;
6143         (msys*)
6144                 CC_SHARED_OPTS=
6145                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6146                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6147                 cf_cv_shlib_version=msysdll
6148                 cf_cv_shlib_version_infix=msysdll
6149                 shlibdir=$bindir
6150                 MAKE_DLLS=
6151                 cat >mk_shared_lib.sh <<-CF_EOF
6152                 #!$SHELL
6153                 SHARED_LIB=\$1
6154                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6155                 shift
6156                 cat <<-EOF
6157                 Linking shared library
6158                 ** SHARED_LIB \$SHARED_LIB
6159                 ** IMPORT_LIB \$IMPORT_LIB
6160 EOF
6161                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6162 CF_EOF
6163                 chmod +x mk_shared_lib.sh
6164                 ;;
6165         (darwin*)
6166                 cf_try_cflags="no-cpp-precomp"
6167                 CC_SHARED_OPTS="-dynamic"
6168                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6169                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6170                 cf_cv_shlib_version_infix=yes
6171                 echo "$as_me:6171: checking if ld -search_paths_first works" >&5
6172 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6173 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6174   echo $ECHO_N "(cached) $ECHO_C" >&6
6175 else
6176
6177                         cf_save_LDFLAGS=$LDFLAGS
6178                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6179                         cat >"conftest.$ac_ext" <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182
6183 int
6184 main (void)
6185 {
6186 int i;
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit "$ac_status"); } &&
6197          { ac_try='test -s "conftest$ac_exeext"'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit "$ac_status"); }; }; then
6203   cf_cv_ldflags_search_paths_first=yes
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat "conftest.$ac_ext" >&5
6207 cf_cv_ldflags_search_paths_first=no
6208 fi
6209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6210                                 LDFLAGS=$cf_save_LDFLAGS
6211 fi
6212 echo "$as_me:6212: result: $cf_cv_ldflags_search_paths_first" >&5
6213 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6214                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6215                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6216                 fi
6217                 ;;
6218         (hpux[7-8]*)
6219                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6220                 if test "$GCC" != yes; then
6221                         CC_SHARED_OPTS='+Z'
6222                 fi
6223                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6224                 INSTALL_LIB="-m 555"
6225                 ;;
6226         (hpux*)
6227                 # (tested with gcc 2.7.2 -- I don't have c89)
6228                 if test "$GCC" = yes; then
6229                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6230                 else
6231                         CC_SHARED_OPTS='+Z'
6232                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6233                 fi
6234                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6235                 # HP-UX shared libraries must be executable, and should be
6236                 # readonly to exploit a quirk in the memory manager.
6237                 INSTALL_LIB="-m 555"
6238                 ;;
6239         (interix*)
6240                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6241                 if test "$cf_cv_shlib_version" = rel; then
6242                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6243                 else
6244                         cf_shared_soname='`basename $@`'
6245                 fi
6246                 CC_SHARED_OPTS=
6247                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6248                 ;;
6249         (irix*)
6250                 if test "$cf_cv_enable_rpath" = yes ; then
6251                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6252                 fi
6253                 # tested with IRIX 5.2 and 'cc'.
6254                 if test "$GCC" != yes; then
6255                         CC_SHARED_OPTS='-KPIC'
6256                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6257                 else
6258                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6259                 fi
6260                 cf_cv_rm_so_locs=yes
6261                 ;;
6262         (linux*|gnu*|k*bsd*-gnu)
6263                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6264                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6265                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6266                 fi
6267                 if test "$cf_cv_enable_rpath" = yes ; then
6268                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6269                 fi
6270
6271         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6272         if test "$cf_cv_shlib_version" = rel; then
6273                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6274         else
6275                 cf_cv_shared_soname='`basename $@`'
6276         fi
6277
6278                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6279                 ;;
6280         (mingw*msvc*)
6281                 cf_cv_shlib_version=msvcdll
6282                 cf_cv_shlib_version_infix=msvcdll
6283                 shlibdir=$bindir
6284                 MAKE_DLLS=
6285                 if test "$DFT_LWR_MODEL" = "shared" ; then
6286                         LOCAL_LDFLAGS="-link -dll"
6287                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6288                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6289                 fi
6290                 CC_SHARED_OPTS=
6291                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6292                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6293                 cat >mk_shared_lib.sh <<-CF_EOF
6294                 #!$SHELL
6295                 SHARED_LIB=\$1
6296                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6297                 shift
6298                 my_ld=\$1
6299                 shift
6300                 cat <<-EOF
6301                 Linking shared library
6302                 ** SHARED LIB \$SHARED_LIB
6303                 ** IMPORT_LIB \$IMPORT_LIB
6304 EOF
6305                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6306                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6307                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6308 CF_EOF
6309                 chmod +x mk_shared_lib.sh
6310                 cat >mk_prog.sh <<-CF_EOF
6311                 #!$SHELL
6312                 shift
6313                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6314                 LD="$LD"
6315                 clopts=()
6316                 ldopts=("/subsystem:console")
6317                 libs=()
6318                 isdll=0
6319                 while test \$# -gt 0; do
6320                         case "\$1" in
6321                                 -link)
6322                                         # ignore -link argument
6323                                         ;;
6324                                 -M[TD] | -M[TD]d)
6325                                         # ignore runtime-library option
6326                                         ;;
6327                                 -dll)
6328                                         isdll=1
6329                                         ;;
6330                                 -W* | -w*)
6331                                         # ignore warnings
6332                                         ;;
6333                                 -D*)
6334                                         clopts+=("\$1")
6335                                         ;;
6336                                 -I*)
6337                                         clopts+=("\$1")
6338                                         ;;
6339                                 -l*)
6340                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6341                                         ;;
6342                                 -L*)
6343                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6344                                         ;;
6345                                 *.obj | *.o)
6346                                         ldopts+=("\$1")
6347                                         ;;
6348                                 -Wl,*)
6349                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6350                                                 ldopts+=("\${linkarg}")
6351                                         done
6352                                         ;;
6353                                 *.lib)
6354                                         ldopts+=("\$1")
6355                                         ;;
6356                                 -o)
6357                                         shift
6358                                         ldopts+=("-out:\$1")
6359                                         ;;
6360                                 *)
6361                                         clopts+=("\$1")
6362                                         ldopts+=("\$1")
6363                                         ;;
6364                         esac
6365                         shift
6366                 done
6367                 if [ "\$isdll" -ne 0 ]; then
6368                         for lib in \${libs[*]}; do
6369                                 ldopts+=("\$lib.dll.lib")
6370                         done
6371                 else
6372                         for lib in \${libs[*]}; do
6373                                 ldopts+=("\$lib.lib")
6374                         done
6375                 fi
6376                 cat <<-EOF
6377                 Creating program
6378                 ** ld options:   "\${ldopts[@]}"
6379 EOF
6380                 exec \$LD \${ldopts[@]}
6381 CF_EOF
6382                 chmod +x mk_prog.sh
6383                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6384                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6385                 ;;
6386         (mingw*)
6387                 cf_cv_shlib_version=mingw
6388                 cf_cv_shlib_version_infix=mingw
6389                 shlibdir=$bindir
6390                 MAKE_DLLS=
6391                 if test "$DFT_LWR_MODEL" = "shared" ; then
6392                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6393                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6394                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6395                 fi
6396                 CC_SHARED_OPTS=
6397                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6398                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6399                 cat >mk_shared_lib.sh <<-CF_EOF
6400                 #!$SHELL
6401                 SHARED_LIB=\$1
6402                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6403                 shift
6404                 cat <<-EOF
6405                 Linking shared library
6406                 ** SHARED_LIB \$SHARED_LIB
6407                 ** IMPORT_LIB \$IMPORT_LIB
6408 EOF
6409                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6410 CF_EOF
6411                 chmod +x mk_shared_lib.sh
6412                 ;;
6413         (openbsd[2-9].*|mirbsd*)
6414                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6415                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6416                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6417                 fi
6418                 if test "$cf_cv_enable_rpath" = yes ; then
6419                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6420                 fi
6421                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6422
6423         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6424         if test "$cf_cv_shlib_version" = rel; then
6425                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6426         else
6427                 cf_cv_shared_soname='`basename $@`'
6428         fi
6429
6430                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6431                 ;;
6432         (nskJ*)
6433                 CC_SHARED_OPTS=
6434                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6435                 ;;
6436         (nskL*)
6437                 CC_SHARED_OPTS=
6438                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6439                 ;;
6440         (nto-qnx*|openbsd*|freebsd[12].*)
6441                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6442                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6443                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6444                 ;;
6445         (dragonfly*|freebsd*)
6446                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6447                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6448                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6449                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6450                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6451                 fi
6452
6453         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6454         if test "$cf_cv_shlib_version" = rel; then
6455                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6456         else
6457                 cf_cv_shared_soname='`basename $@`'
6458         fi
6459
6460                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6461                 ;;
6462         (netbsd*)
6463                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6464                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6465                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6466                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6467                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6468                         if test "$cf_cv_shlib_version" = auto; then
6469                         if test -f /usr/libexec/ld.elf_so; then
6470                                 cf_cv_shlib_version=abi
6471                         else
6472                                 cf_cv_shlib_version=rel
6473                         fi
6474                         fi
6475
6476         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6477         if test "$cf_cv_shlib_version" = rel; then
6478                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6479         else
6480                 cf_cv_shared_soname='`basename $@`'
6481         fi
6482
6483                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6484                 else
6485                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6486                 fi
6487                 ;;
6488         (osf*|mls+*)
6489                 # tested with OSF/1 V3.2 and 'cc'
6490                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6491                 # link with shared libs).
6492                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6493                 case "$host_os" in
6494                 (osf4*)
6495                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6496                         ;;
6497                 esac
6498                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6499                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6500                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6501                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6502                 fi
6503                 cf_cv_rm_so_locs=yes
6504                 ;;
6505         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6506                 # tested with osr5.0.5
6507                 if test "$GCC" != yes; then
6508                         CC_SHARED_OPTS='-belf -KPIC'
6509                 fi
6510                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6511                 if test "$cf_cv_enable_rpath" = yes ; then
6512                         # only way is to set LD_RUN_PATH but no switch for it
6513                         RUN_PATH=$libdir
6514                 fi
6515                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6516                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6517                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6518                 ;;
6519         (sunos4*)
6520                 # tested with SunOS 4.1.1 and gcc 2.7.0
6521                 if test "$GCC" != yes; then
6522                         CC_SHARED_OPTS='-KPIC'
6523                 fi
6524                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6525                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6526                 ;;
6527         (solaris2*)
6528                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6529                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6530                 if test "$DFT_LWR_MODEL" = "shared" ; then
6531                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6532                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6533                 fi
6534                 if test "$cf_cv_enable_rpath" = yes ; then
6535                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6536                 fi
6537
6538         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6539         if test "$cf_cv_shlib_version" = rel; then
6540                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6541         else
6542                 cf_cv_shared_soname='`basename $@`'
6543         fi
6544
6545                 if test "$GCC" != yes; then
6546                         cf_save_CFLAGS="$CFLAGS"
6547                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6548                         do
6549                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6550                                 cat >"conftest.$ac_ext" <<_ACEOF
6551 #line 6551 "configure"
6552 #include "confdefs.h"
6553 #include <stdio.h>
6554 int
6555 main (void)
6556 {
6557 printf("Hello\\n");
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f "conftest.$ac_objext"
6563 if { (eval echo "$as_me:6563: \"$ac_compile\"") >&5
6564   (eval $ac_compile) 2>&5
6565   ac_status=$?
6566   echo "$as_me:6566: \$? = $ac_status" >&5
6567   (exit "$ac_status"); } &&
6568          { ac_try='test -s "conftest.$ac_objext"'
6569   { (eval echo "$as_me:6569: \"$ac_try\"") >&5
6570   (eval $ac_try) 2>&5
6571   ac_status=$?
6572   echo "$as_me:6572: \$? = $ac_status" >&5
6573   (exit "$ac_status"); }; }; then
6574   break
6575 else
6576   echo "$as_me: failed program was:" >&5
6577 cat "conftest.$ac_ext" >&5
6578 fi
6579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6580                         done
6581                         CFLAGS="$cf_save_CFLAGS"
6582                         CC_SHARED_OPTS=$cf_shared_opts
6583                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6584                 else
6585                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6586                 fi
6587                 ;;
6588         (sysv5uw7*|unix_sv*)
6589                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6590                 if test "$GCC" != yes; then
6591                         CC_SHARED_OPTS='-KPIC'
6592                 fi
6593                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6594                 ;;
6595         (*)
6596                 CC_SHARED_OPTS='unknown'
6597                 MK_SHARED_LIB='echo unknown'
6598                 ;;
6599         esac
6600
6601         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6602         case "$cf_cv_shlib_version" in
6603         (rel|abi)
6604                 case "$MK_SHARED_LIB" in
6605                 (*'-o $@')
6606                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6607                         ;;
6608                 (*)
6609                         { echo "$as_me:6609: WARNING: ignored --with-shlib-version" >&5
6610 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6611                         ;;
6612                 esac
6613                 ;;
6614         esac
6615
6616         if test -n "$cf_try_cflags"
6617         then
6618 cat > conftest.$ac_ext <<EOF
6619 #line 6619 "${as_me:-configure}"
6620 #include <stdio.h>
6621 int main(int argc, char *argv[])
6622 {
6623         printf("hello\\n");
6624         return (argv[argc-1] == 0) ;
6625 }
6626 EOF
6627                 cf_save_CFLAGS="$CFLAGS"
6628                 for cf_opt in $cf_try_cflags
6629                 do
6630                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6631                         echo "$as_me:6631: checking if CFLAGS option -$cf_opt works" >&5
6632 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6633                         if { (eval echo "$as_me:6633: \"$ac_compile\"") >&5
6634   (eval $ac_compile) 2>&5
6635   ac_status=$?
6636   echo "$as_me:6636: \$? = $ac_status" >&5
6637   (exit "$ac_status"); }; then
6638                                 echo "$as_me:6638: result: yes" >&5
6639 echo "${ECHO_T}yes" >&6
6640                                 cf_save_CFLAGS="$CFLAGS"
6641                         else
6642                                 echo "$as_me:6642: result: no" >&5
6643 echo "${ECHO_T}no" >&6
6644                         fi
6645                 done
6646                 CFLAGS="$cf_save_CFLAGS"
6647         fi
6648
6649         # RPATH_LIST is a colon-separated list of directories
6650         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6651         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6652
6653         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6654
6655         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6656
6657 echo "${as_me:-configure}:6657: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6658
6659         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6660
6661 echo "${as_me:-configure}:6661: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6662
6663 for model in $cf_list_models ; do
6664         case "$model" in
6665         (libtool)
6666
6667 echo "$as_me:6667: checking for additional libtool options" >&5
6668 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6669
6670 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6671 if test "${with_libtool_opts+set}" = set; then
6672   withval="$with_libtool_opts"
6673   with_libtool_opts=$withval
6674 else
6675   with_libtool_opts=no
6676 fi;
6677 echo "$as_me:6677: result: $with_libtool_opts" >&5
6678 echo "${ECHO_T}$with_libtool_opts" >&6
6679
6680 case .$with_libtool_opts in
6681 (.yes|.no|.)
6682         ;;
6683 (*)
6684         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6685         ;;
6686 esac
6687
6688 echo "$as_me:6688: checking if exported-symbols file should be used" >&5
6689 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6690
6691 # Check whether --with-export-syms or --without-export-syms was given.
6692 if test "${with_export_syms+set}" = set; then
6693   withval="$with_export_syms"
6694   with_export_syms=$withval
6695 else
6696   with_export_syms=no
6697 fi;
6698 if test "x$with_export_syms" = xyes
6699 then
6700         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6701
6702 fi
6703 echo "$as_me:6703: result: $with_export_syms" >&5
6704 echo "${ECHO_T}$with_export_syms" >&6
6705 if test "x$with_export_syms" != xno
6706 then
6707         EXPORT_SYMS="-export-symbols $with_export_syms"
6708
6709 fi
6710
6711                 ;;
6712         (shared)
6713                 if test "$CC_SHARED_OPTS" = "unknown"; then
6714                         { { echo "$as_me:6714: error: Shared libraries are not supported in this version" >&5
6715 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6716    { (exit 1); exit 1; }; }
6717                 fi
6718                 # workaround for inept transition to PIE vs PIC...
6719                 echo "$as_me:6719: checking if current CFLAGS link properly" >&5
6720 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6721                 cat >"conftest.$ac_ext" <<_ACEOF
6722 #line 6722 "configure"
6723 #include "confdefs.h"
6724 #include <stdio.h>
6725 int
6726 main (void)
6727 {
6728 printf("Hello work\\n");
6729   ;
6730   return 0;
6731 }
6732 _ACEOF
6733 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735   (eval $ac_link) 2>&5
6736   ac_status=$?
6737   echo "$as_me:6737: \$? = $ac_status" >&5
6738   (exit "$ac_status"); } &&
6739          { ac_try='test -s "conftest$ac_exeext"'
6740   { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit "$ac_status"); }; }; then
6745   cf_cflags_work=yes
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 cat "conftest.$ac_ext" >&5
6749 cf_cflags_work=no
6750 fi
6751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6752                 echo "$as_me:6752: result: $cf_cflags_work" >&5
6753 echo "${ECHO_T}$cf_cflags_work" >&6
6754                 if test "$cf_cflags_work" = no
6755                 then
6756                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6757
6758 echo "${as_me:-configure}:6758: testing try to work around by appending shared-options ..." 1>&5
6759
6760                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6761                 fi
6762
6763 echo "$as_me:6763: checking if versioned-symbols file should be used" >&5
6764 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6765
6766 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6767 if test "${with_versioned_syms+set}" = set; then
6768   withval="$with_versioned_syms"
6769   with_versioned_syms=$withval
6770 else
6771   with_versioned_syms=no
6772 fi;
6773 case "x$with_versioned_syms" in
6774 (xyes)
6775         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6776
6777         ;;
6778 (xno)
6779         ;;
6780 (x/*)
6781         test -f "$with_versioned_syms" || { { echo "$as_me:6781: error: expected a filename: $with_versioned_syms" >&5
6782 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6783    { (exit 1); exit 1; }; }
6784         ;;
6785 (*)
6786         test -f "$with_versioned_syms" || { { echo "$as_me:6786: error: expected a filename: $with_versioned_syms" >&5
6787 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6788    { (exit 1); exit 1; }; }
6789         with_versioned_syms=`pwd`/"$with_versioned_syms"
6790         ;;
6791 esac
6792 echo "$as_me:6792: result: $with_versioned_syms" >&5
6793 echo "${ECHO_T}$with_versioned_syms" >&6
6794
6795 RESULTING_SYMS=
6796 VERSIONED_SYMS=
6797 WILDCARD_SYMS=
6798
6799 if test "x$with_versioned_syms" != xno
6800 then
6801         RESULTING_SYMS=$with_versioned_syms
6802         case "x$MK_SHARED_LIB" in
6803         (*-Wl,*)
6804                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6805                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6806                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6807
6808 echo "${as_me:-configure}:6808: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6809
6810                 ;;
6811         (*-dy\ *)
6812                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6813                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6814                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6815
6816 echo "${as_me:-configure}:6816: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6817
6818                 ;;
6819         (*)
6820                 { echo "$as_me:6820: WARNING: this system does not support versioned-symbols" >&5
6821 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6822                 ;;
6823         esac
6824
6825         # Linux ld can selectively override scope, e.g., of symbols beginning with
6826         # "_" by first declaring some as global, and then using a wildcard to
6827         # declare the others as local.  Some other loaders cannot do this.  Check
6828         # by constructing a (very) simple shared library and inspecting its
6829         # symbols.
6830         if test "x$VERSIONED_SYMS" != "x"
6831         then
6832                 echo "$as_me:6832: checking if wildcards can be used to selectively omit symbols" >&5
6833 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6834                 WILDCARD_SYMS=no
6835
6836                 # make sources
6837                 rm -f conftest.*
6838
6839                 cat >conftest.ver <<EOF
6840 module_1.0 {
6841 global:
6842         globalf1;
6843 local:
6844         localf1;
6845 };
6846 module_2.0 {
6847 global:
6848         globalf2;
6849 local:
6850         localf2;
6851         _*;
6852 } module_1.0;
6853 submodule_1.0 {
6854 global:
6855         subglobalf1;
6856         _ismissing;
6857 local:
6858         sublocalf1;
6859 };
6860 submodule_2.0 {
6861 global:
6862         subglobalf2;
6863 local:
6864         sublocalf2;
6865         _*;
6866 } submodule_1.0;
6867 EOF
6868                 cat >conftest.$ac_ext <<EOF
6869 #line 6869 "configure"
6870 int     _ismissing(void) { return 1; }
6871 int     _localf1(void) { return 1; }
6872 int     _localf2(void) { return 2; }
6873 int     globalf1(void) { return 1; }
6874 int     globalf2(void) { return 2; }
6875 int     _sublocalf1(void) { return 1; }
6876 int     _sublocalf2(void) { return 2; }
6877 int     subglobalf1(void) { return 1; }
6878 int     subglobalf2(void) { return 2; }
6879 EOF
6880                 cat >conftest.mk <<EOF
6881 CC=${CC}
6882 CFLAGS=${CFLAGS}
6883 CPPFLAGS=${CPPFLAGS}
6884 LDFLAGS=${LDFLAGS}
6885 LIBS=${LIBS}
6886 VERSIONED_SYMS=${VERSIONED_SYMS}
6887 RESULTING_SYMS=conftest.ver
6888 MK_SHARED_LIB=${MK_SHARED_LIB}
6889 conftest.so: conftest.$ac_cv_objext
6890                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6891 EOF
6892
6893                 # compile source, make library
6894                 if make -f conftest.mk 2>&5 >/dev/null
6895                 then
6896                         # test for missing symbol in either Data or Text section
6897                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6898                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6899                 fi
6900                 echo "$as_me:6900: result: $WILDCARD_SYMS" >&5
6901 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6902                 rm -f conftest.*
6903         fi
6904 fi
6905
6906                 ;;
6907         esac
6908 done
6909
6910 ### Checks for special libraries, must be done up-front.
6911 SHLIB_LIST=""
6912
6913 echo "$as_me:6913: checking if you want to link with the GPM mouse library" >&5
6914 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6915
6916 # Check whether --with-gpm or --without-gpm was given.
6917 if test "${with_gpm+set}" = set; then
6918   withval="$with_gpm"
6919   with_gpm=$withval
6920 else
6921   with_gpm=maybe
6922 fi;
6923 echo "$as_me:6923: result: $with_gpm" >&5
6924 echo "${ECHO_T}$with_gpm" >&6
6925
6926 if test "$with_gpm" != no ; then
6927         echo "$as_me:6927: checking for gpm.h" >&5
6928 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6929 if test "${ac_cv_header_gpm_h+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932   cat >"conftest.$ac_ext" <<_ACEOF
6933 #line 6933 "configure"
6934 #include "confdefs.h"
6935 #include <gpm.h>
6936 _ACEOF
6937 if { (eval echo "$as_me:6937: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6938   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6939   ac_status=$?
6940   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6941   rm -f conftest.er1
6942   cat conftest.err >&5
6943   echo "$as_me:6943: \$? = $ac_status" >&5
6944   (exit "$ac_status"); } >/dev/null; then
6945   if test -s conftest.err; then
6946     ac_cpp_err=$ac_c_preproc_warn_flag
6947   else
6948     ac_cpp_err=
6949   fi
6950 else
6951   ac_cpp_err=yes
6952 fi
6953 if test -z "$ac_cpp_err"; then
6954   ac_cv_header_gpm_h=yes
6955 else
6956   echo "$as_me: failed program was:" >&5
6957   cat "conftest.$ac_ext" >&5
6958   ac_cv_header_gpm_h=no
6959 fi
6960 rm -f conftest.err "conftest.$ac_ext"
6961 fi
6962 echo "$as_me:6962: result: $ac_cv_header_gpm_h" >&5
6963 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6964 if test "$ac_cv_header_gpm_h" = yes; then
6965
6966 cat >>confdefs.h <<\EOF
6967 #define HAVE_GPM_H 1
6968 EOF
6969
6970                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6971                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6972
6973 echo "${as_me:-configure}:6973: testing assuming we really have GPM library ..." 1>&5
6974
6975 cat >>confdefs.h <<\EOF
6976 #define HAVE_LIBGPM 1
6977 EOF
6978
6979                         with_gpm=yes
6980                 else
6981                         echo "$as_me:6981: checking for Gpm_Open in -lgpm" >&5
6982 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6983 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6984   echo $ECHO_N "(cached) $ECHO_C" >&6
6985 else
6986   ac_check_lib_save_LIBS=$LIBS
6987 LIBS="-lgpm  $LIBS"
6988 cat >"conftest.$ac_ext" <<_ACEOF
6989 #line 6989 "configure"
6990 #include "confdefs.h"
6991
6992 /* Override any gcc2 internal prototype to avoid an error.  */
6993 #ifdef __cplusplus
6994 extern "C"
6995 #endif
6996 /* We use char because int might match the return type of a gcc2
6997    builtin and then its argument prototype would still apply.  */
6998 char Gpm_Open ();
6999 int
7000 main (void)
7001 {
7002 Gpm_Open ();
7003   ;
7004   return 0;
7005 }
7006 _ACEOF
7007 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7008 if { (eval echo "$as_me:7008: \"$ac_link\"") >&5
7009   (eval $ac_link) 2>&5
7010   ac_status=$?
7011   echo "$as_me:7011: \$? = $ac_status" >&5
7012   (exit "$ac_status"); } &&
7013          { ac_try='test -s "conftest$ac_exeext"'
7014   { (eval echo "$as_me:7014: \"$ac_try\"") >&5
7015   (eval $ac_try) 2>&5
7016   ac_status=$?
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit "$ac_status"); }; }; then
7019   ac_cv_lib_gpm_Gpm_Open=yes
7020 else
7021   echo "$as_me: failed program was:" >&5
7022 cat "conftest.$ac_ext" >&5
7023 ac_cv_lib_gpm_Gpm_Open=no
7024 fi
7025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7026 LIBS=$ac_check_lib_save_LIBS
7027 fi
7028 echo "$as_me:7028: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7029 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7030 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7031   with_gpm=yes
7032 else
7033
7034                                 if test "$with_gpm" = maybe; then
7035                                         { echo "$as_me:7035: WARNING: Cannot link with GPM library" >&5
7036 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7037                                         with_gpm=no
7038                                 else
7039                                         { { echo "$as_me:7039: error: Cannot link with GPM library" >&5
7040 echo "$as_me: error: Cannot link with GPM library" >&2;}
7041    { (exit 1); exit 1; }; }
7042                                 fi
7043
7044 fi
7045
7046                 fi
7047
7048 else
7049
7050                 test "$with_gpm" != maybe && { echo "$as_me:7050: WARNING: Cannot find GPM header" >&5
7051 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7052                 with_gpm=no
7053
7054 fi
7055
7056 fi
7057
7058 if test "$with_gpm" != no ; then
7059         echo "$as_me:7059: checking if you want to load GPM dynamically" >&5
7060 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7061
7062 # Check whether --with-dlsym or --without-dlsym was given.
7063 if test "${with_dlsym+set}" = set; then
7064   withval="$with_dlsym"
7065   with_dlsym=$withval
7066 else
7067   with_dlsym=yes
7068 fi;
7069         echo "$as_me:7069: result: $with_dlsym" >&5
7070 echo "${ECHO_T}$with_dlsym" >&6
7071         if test "x$with_dlsym" = xyes ; then
7072
7073 cf_have_dlsym=no
7074 echo "$as_me:7074: checking for dlsym" >&5
7075 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7076 if test "${ac_cv_func_dlsym+set}" = set; then
7077   echo $ECHO_N "(cached) $ECHO_C" >&6
7078 else
7079   cat >"conftest.$ac_ext" <<_ACEOF
7080 #line 7080 "configure"
7081 #include "confdefs.h"
7082 #define dlsym autoconf_temporary
7083 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7084 #undef dlsym
7085
7086 #ifdef __cplusplus
7087 extern "C"
7088 #endif
7089
7090 /* We use char because int might match the return type of a gcc2
7091    builtin and then its argument prototype would still apply.  */
7092 char dlsym (void);
7093
7094 int
7095 main (void)
7096 {
7097
7098 /* The GNU C library defines stubs for functions which it implements
7099     to always fail with ENOSYS.  Some functions are actually named
7100     something starting with __ and the normal name is an alias.  */
7101 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7102 #error found stub for dlsym
7103 #endif
7104
7105         return dlsym ();
7106   ;
7107   return 0;
7108 }
7109 _ACEOF
7110 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7111 if { (eval echo "$as_me:7111: \"$ac_link\"") >&5
7112   (eval $ac_link) 2>&5
7113   ac_status=$?
7114   echo "$as_me:7114: \$? = $ac_status" >&5
7115   (exit "$ac_status"); } &&
7116          { ac_try='test -s "conftest$ac_exeext"'
7117   { (eval echo "$as_me:7117: \"$ac_try\"") >&5
7118   (eval $ac_try) 2>&5
7119   ac_status=$?
7120   echo "$as_me:7120: \$? = $ac_status" >&5
7121   (exit "$ac_status"); }; }; then
7122   ac_cv_func_dlsym=yes
7123 else
7124   echo "$as_me: failed program was:" >&5
7125 cat "conftest.$ac_ext" >&5
7126 ac_cv_func_dlsym=no
7127 fi
7128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7129 fi
7130 echo "$as_me:7130: result: $ac_cv_func_dlsym" >&5
7131 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7132 if test "$ac_cv_func_dlsym" = yes; then
7133   cf_have_dlsym=yes
7134 else
7135
7136 cf_have_libdl=no
7137 echo "$as_me:7137: checking for dlsym in -ldl" >&5
7138 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7139 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7140   echo $ECHO_N "(cached) $ECHO_C" >&6
7141 else
7142   ac_check_lib_save_LIBS=$LIBS
7143 LIBS="-ldl  $LIBS"
7144 cat >"conftest.$ac_ext" <<_ACEOF
7145 #line 7145 "configure"
7146 #include "confdefs.h"
7147
7148 /* Override any gcc2 internal prototype to avoid an error.  */
7149 #ifdef __cplusplus
7150 extern "C"
7151 #endif
7152 /* We use char because int might match the return type of a gcc2
7153    builtin and then its argument prototype would still apply.  */
7154 char dlsym ();
7155 int
7156 main (void)
7157 {
7158 dlsym ();
7159   ;
7160   return 0;
7161 }
7162 _ACEOF
7163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7164 if { (eval echo "$as_me:7164: \"$ac_link\"") >&5
7165   (eval $ac_link) 2>&5
7166   ac_status=$?
7167   echo "$as_me:7167: \$? = $ac_status" >&5
7168   (exit "$ac_status"); } &&
7169          { ac_try='test -s "conftest$ac_exeext"'
7170   { (eval echo "$as_me:7170: \"$ac_try\"") >&5
7171   (eval $ac_try) 2>&5
7172   ac_status=$?
7173   echo "$as_me:7173: \$? = $ac_status" >&5
7174   (exit "$ac_status"); }; }; then
7175   ac_cv_lib_dl_dlsym=yes
7176 else
7177   echo "$as_me: failed program was:" >&5
7178 cat "conftest.$ac_ext" >&5
7179 ac_cv_lib_dl_dlsym=no
7180 fi
7181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7182 LIBS=$ac_check_lib_save_LIBS
7183 fi
7184 echo "$as_me:7184: result: $ac_cv_lib_dl_dlsym" >&5
7185 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7186 if test "$ac_cv_lib_dl_dlsym" = yes; then
7187
7188         cf_have_dlsym=yes
7189         cf_have_libdl=yes
7190 fi
7191
7192 fi
7193
7194 if test "$cf_have_dlsym" = yes ; then
7195         test "$cf_have_libdl" = yes && {
7196 cf_add_libs="$LIBS"
7197 # reverse order
7198 cf_add_0lib=
7199 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7200 # filter duplicates
7201 for cf_add_1lib in $cf_add_0lib; do
7202         for cf_add_2lib in $cf_add_libs; do
7203                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7204                         cf_add_1lib=
7205                         break
7206                 fi
7207         done
7208         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7209 done
7210 LIBS="$cf_add_libs"
7211  }
7212
7213         echo "$as_me:7213: checking whether able to link to dl*() functions" >&5
7214 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7215         cat >"conftest.$ac_ext" <<_ACEOF
7216 #line 7216 "configure"
7217 #include "confdefs.h"
7218 #include <dlfcn.h>
7219 int
7220 main (void)
7221 {
7222
7223                 void *obj;
7224                 if ((obj = dlopen("filename", 0)) != 0) {
7225                         if (dlsym(obj, "symbolname") == 0) {
7226                         dlclose(obj);
7227                         }
7228                 }
7229   ;
7230   return 0;
7231 }
7232 _ACEOF
7233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7234 if { (eval echo "$as_me:7234: \"$ac_link\"") >&5
7235   (eval $ac_link) 2>&5
7236   ac_status=$?
7237   echo "$as_me:7237: \$? = $ac_status" >&5
7238   (exit "$ac_status"); } &&
7239          { ac_try='test -s "conftest$ac_exeext"'
7240   { (eval echo "$as_me:7240: \"$ac_try\"") >&5
7241   (eval $ac_try) 2>&5
7242   ac_status=$?
7243   echo "$as_me:7243: \$? = $ac_status" >&5
7244   (exit "$ac_status"); }; }; then
7245
7246 cat >>confdefs.h <<\EOF
7247 #define HAVE_LIBDL 1
7248 EOF
7249
7250 else
7251   echo "$as_me: failed program was:" >&5
7252 cat "conftest.$ac_ext" >&5
7253
7254                 { { echo "$as_me:7254: error: Cannot link test program for libdl" >&5
7255 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7256    { (exit 1); exit 1; }; }
7257 fi
7258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7259         echo "$as_me:7259: result: ok" >&5
7260 echo "${ECHO_T}ok" >&6
7261 else
7262         { { echo "$as_me:7262: error: Cannot find dlsym function" >&5
7263 echo "$as_me: error: Cannot find dlsym function" >&2;}
7264    { (exit 1); exit 1; }; }
7265 fi
7266
7267                 if test "x$with_gpm" != xyes ; then
7268                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7269
7270 echo "${as_me:-configure}:7270: testing assuming soname for gpm is $with_gpm ..." 1>&5
7271
7272                         cf_cv_gpm_soname="$with_gpm"
7273                 else
7274
7275 echo "$as_me:7275: checking for soname of gpm library" >&5
7276 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7277 if test "${cf_cv_gpm_soname+set}" = set; then
7278   echo $ECHO_N "(cached) $ECHO_C" >&6
7279 else
7280
7281 cf_cv_gpm_soname=unknown
7282 if test "$cross_compiling" != yes ; then
7283 cat >conftest.$ac_ext <<CF_EOF
7284 #include <gpm.h>
7285 int main(void)
7286 {
7287 if (Gpm_Open(0,0)) Gpm_Close();
7288         ${cf_cv_main_return:-return}(0);
7289 }
7290 CF_EOF
7291 cf_save_LIBS="$LIBS"
7292
7293 cf_add_libs="$LIBS"
7294 # reverse order
7295 cf_add_0lib=
7296 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7297 # filter duplicates
7298 for cf_add_1lib in $cf_add_0lib; do
7299         for cf_add_2lib in $cf_add_libs; do
7300                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7301                         cf_add_1lib=
7302                         break
7303                 fi
7304         done
7305         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7306 done
7307 LIBS="$cf_add_libs"
7308
7309         if { (eval echo "$as_me:7309: \"$ac_compile\"") >&5
7310   (eval $ac_compile) 2>&5
7311   ac_status=$?
7312   echo "$as_me:7312: \$? = $ac_status" >&5
7313   (exit "$ac_status"); } ; then
7314                 if { (eval echo "$as_me:7314: \"$ac_link\"") >&5
7315   (eval $ac_link) 2>&5
7316   ac_status=$?
7317   echo "$as_me:7317: \$? = $ac_status" >&5
7318   (exit "$ac_status"); } ; then
7319                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7320                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7321                 fi
7322         fi
7323 rm -rf ./conftest*
7324 LIBS="$cf_save_LIBS"
7325 fi
7326
7327 fi
7328 echo "$as_me:7328: result: $cf_cv_gpm_soname" >&5
7329 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7330
7331                 fi
7332                 test "$cf_cv_gpm_soname" != "unknown" &&
7333 cat >>confdefs.h <<EOF
7334 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7335 EOF
7336
7337                 SHLIB_LIST="-ldl $SHLIB_LIST"
7338
7339 cf_add_libs="$PRIVATE_LIBS"
7340 # reverse order
7341 cf_add_0lib=
7342 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7343 # filter duplicates
7344 for cf_add_1lib in $cf_add_0lib; do
7345         for cf_add_2lib in $cf_add_libs; do
7346                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7347                         cf_add_1lib=
7348                         break
7349                 fi
7350         done
7351         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7352 done
7353 PRIVATE_LIBS="$cf_add_libs"
7354
7355         else
7356                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7357
7358 cf_add_libs="$TEST_LIBS"
7359 # reverse order
7360 cf_add_0lib=
7361 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7362 # filter duplicates
7363 for cf_add_1lib in $cf_add_0lib; do
7364         for cf_add_2lib in $cf_add_libs; do
7365                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7366                         cf_add_1lib=
7367                         break
7368                 fi
7369         done
7370         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7371 done
7372 TEST_LIBS="$cf_add_libs"
7373
7374 cf_add_libs="$PRIVATE_LIBS"
7375 # reverse order
7376 cf_add_0lib=
7377 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7378 # filter duplicates
7379 for cf_add_1lib in $cf_add_0lib; do
7380         for cf_add_2lib in $cf_add_libs; do
7381                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7382                         cf_add_1lib=
7383                         break
7384                 fi
7385         done
7386         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7387 done
7388 PRIVATE_LIBS="$cf_add_libs"
7389
7390         fi
7391
7392 cat >>confdefs.h <<\EOF
7393 #define HAVE_LIBGPM 1
7394 EOF
7395
7396 echo "$as_me:7396: checking for Gpm_Wgetch in -lgpm" >&5
7397 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7398 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7399   echo $ECHO_N "(cached) $ECHO_C" >&6
7400 else
7401   ac_check_lib_save_LIBS=$LIBS
7402 LIBS="-lgpm  $LIBS"
7403 cat >"conftest.$ac_ext" <<_ACEOF
7404 #line 7404 "configure"
7405 #include "confdefs.h"
7406
7407 /* Override any gcc2 internal prototype to avoid an error.  */
7408 #ifdef __cplusplus
7409 extern "C"
7410 #endif
7411 /* We use char because int might match the return type of a gcc2
7412    builtin and then its argument prototype would still apply.  */
7413 char Gpm_Wgetch ();
7414 int
7415 main (void)
7416 {
7417 Gpm_Wgetch ();
7418   ;
7419   return 0;
7420 }
7421 _ACEOF
7422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7423 if { (eval echo "$as_me:7423: \"$ac_link\"") >&5
7424   (eval $ac_link) 2>&5
7425   ac_status=$?
7426   echo "$as_me:7426: \$? = $ac_status" >&5
7427   (exit "$ac_status"); } &&
7428          { ac_try='test -s "conftest$ac_exeext"'
7429   { (eval echo "$as_me:7429: \"$ac_try\"") >&5
7430   (eval $ac_try) 2>&5
7431   ac_status=$?
7432   echo "$as_me:7432: \$? = $ac_status" >&5
7433   (exit "$ac_status"); }; }; then
7434   ac_cv_lib_gpm_Gpm_Wgetch=yes
7435 else
7436   echo "$as_me: failed program was:" >&5
7437 cat "conftest.$ac_ext" >&5
7438 ac_cv_lib_gpm_Gpm_Wgetch=no
7439 fi
7440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7441 LIBS=$ac_check_lib_save_LIBS
7442 fi
7443 echo "$as_me:7443: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7444 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7445 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7446
7447 echo "$as_me:7447: checking if GPM is weakly bound to curses library" >&5
7448 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7449 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7450   echo $ECHO_N "(cached) $ECHO_C" >&6
7451 else
7452
7453 cf_cv_check_gpm_wgetch=unknown
7454 if test "$cross_compiling" != yes ; then
7455
7456 cat >conftest.$ac_ext <<CF_EOF
7457 #include <gpm.h>
7458 int main(void)
7459 {
7460         Gpm_Wgetch();
7461         ${cf_cv_main_return:-return}(0);
7462 }
7463 CF_EOF
7464
7465         cf_save_LIBS="$LIBS"
7466         # This only works if we can look at the symbol table.  If a shared
7467         # library is stripped for install, we cannot use that.  So we're forced
7468         # to rely on the static library, noting that some packagers may not
7469         # include it.
7470         LIBS="-static -lgpm -dynamic $LIBS"
7471         if { (eval echo "$as_me:7471: \"$ac_compile\"") >&5
7472   (eval $ac_compile) 2>&5
7473   ac_status=$?
7474   echo "$as_me:7474: \$? = $ac_status" >&5
7475   (exit "$ac_status"); } ; then
7476                 if { (eval echo "$as_me:7476: \"$ac_link\"") >&5
7477   (eval $ac_link) 2>&5
7478   ac_status=$?
7479   echo "$as_me:7479: \$? = $ac_status" >&5
7480   (exit "$ac_status"); } ; then
7481                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7482                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7483                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7484                 fi
7485         fi
7486         rm -rf ./conftest*
7487         LIBS="$cf_save_LIBS"
7488 fi
7489
7490 fi
7491 echo "$as_me:7491: result: $cf_cv_check_gpm_wgetch" >&5
7492 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7493
7494 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7495         { echo "$as_me:7495: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7496 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7497 fi
7498
7499 fi
7500
7501 fi
7502
7503 echo "$as_me:7503: checking if you want to use PCRE2 for regular-expressions" >&5
7504 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7505
7506 # Check whether --with-pcre2 or --without-pcre2 was given.
7507 if test "${with_pcre2+set}" = set; then
7508   withval="$with_pcre2"
7509
7510 fi;
7511 test -z "$with_pcre2" && with_pcre2=no
7512 echo "$as_me:7512: result: $with_pcre2" >&5
7513 echo "${ECHO_T}$with_pcre2" >&6
7514
7515 if test "x$with_pcre2" != xno ; then
7516         cf_with_pcre2_ok=no
7517         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7518         do
7519
7520 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7521         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7522
7523 echo "${as_me:-configure}:7523: testing found package $cf_with_pcre2 ..." 1>&5
7524
7525         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7526         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7527         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7528
7529 echo "${as_me:-configure}:7529: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7530
7531         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7532
7533 echo "${as_me:-configure}:7533: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7534
7535 cf_fix_cppflags=no
7536 cf_new_cflags=
7537 cf_new_cppflags=
7538 cf_new_extra_cppflags=
7539
7540 for cf_add_cflags in $cf_pkgconfig_incs
7541 do
7542 case "$cf_fix_cppflags" in
7543 (no)
7544         case "$cf_add_cflags" in
7545         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7546                 case "$cf_add_cflags" in
7547                 (-D*)
7548                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7549
7550                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7551                                 && test -z "${cf_tst_cflags}" \
7552                                 && cf_fix_cppflags=yes
7553
7554                         if test "$cf_fix_cppflags" = yes ; then
7555
7556         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7557         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7558
7559                                 continue
7560                         elif test "${cf_tst_cflags}" = "\"'" ; then
7561
7562         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7563         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7564
7565                                 continue
7566                         fi
7567                         ;;
7568                 esac
7569                 case "$CPPFLAGS" in
7570                 (*$cf_add_cflags)
7571                         ;;
7572                 (*)
7573                         case "$cf_add_cflags" in
7574                         (-D*)
7575                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7576
7577 CPPFLAGS=`echo "$CPPFLAGS" | \
7578         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7579                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7580
7581                                 ;;
7582                         esac
7583
7584         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7585         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7586
7587                         ;;
7588                 esac
7589                 ;;
7590         (*)
7591
7592         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7593         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7594
7595                 ;;
7596         esac
7597         ;;
7598 (yes)
7599
7600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7602
7603         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7604
7605         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7606                 && test -z "${cf_tst_cflags}" \
7607                 && cf_fix_cppflags=no
7608         ;;
7609 esac
7610 done
7611
7612 if test -n "$cf_new_cflags" ; then
7613
7614         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7615         CFLAGS="${CFLAGS}$cf_new_cflags"
7616
7617 fi
7618
7619 if test -n "$cf_new_cppflags" ; then
7620
7621         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7622         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7623
7624 fi
7625
7626 if test -n "$cf_new_extra_cppflags" ; then
7627
7628         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7629         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7630
7631 fi
7632
7633 cf_add_libs="$LIBS"
7634 # reverse order
7635 cf_add_0lib=
7636 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7637 # filter duplicates
7638 for cf_add_1lib in $cf_add_0lib; do
7639         for cf_add_2lib in $cf_add_libs; do
7640                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7641                         cf_add_1lib=
7642                         break
7643                 fi
7644         done
7645         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7646 done
7647 LIBS="$cf_add_libs"
7648
7649         cf_with_pcre2_ok=yes; break
7650 else
7651         cf_pkgconfig_incs=
7652         cf_pkgconfig_libs=
7653         :
7654 fi
7655
7656         done
7657         cf_with_pcre2_ok=yes || { { echo "$as_me:7657: error: Cannot find PCRE2 library" >&5
7658 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7659    { (exit 1); exit 1; }; }
7660
7661 cat >>confdefs.h <<\EOF
7662 #define HAVE_LIB_PCRE2 1
7663 EOF
7664
7665         # if pkgconfig gave no results, look for the libraries directly
7666         case "$LIBS" in
7667         (*pcre2-posix*|*pcreposix*)
7668                 ;;
7669         (*)
7670                 echo "$as_me:7670: checking for regcomp in -lpcre2-posix" >&5
7671 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7672 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7673   echo $ECHO_N "(cached) $ECHO_C" >&6
7674 else
7675   ac_check_lib_save_LIBS=$LIBS
7676 LIBS="-lpcre2-posix  $LIBS"
7677 cat >"conftest.$ac_ext" <<_ACEOF
7678 #line 7678 "configure"
7679 #include "confdefs.h"
7680
7681 /* Override any gcc2 internal prototype to avoid an error.  */
7682 #ifdef __cplusplus
7683 extern "C"
7684 #endif
7685 /* We use char because int might match the return type of a gcc2
7686    builtin and then its argument prototype would still apply.  */
7687 char regcomp ();
7688 int
7689 main (void)
7690 {
7691 regcomp ();
7692   ;
7693   return 0;
7694 }
7695 _ACEOF
7696 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7697 if { (eval echo "$as_me:7697: \"$ac_link\"") >&5
7698   (eval $ac_link) 2>&5
7699   ac_status=$?
7700   echo "$as_me:7700: \$? = $ac_status" >&5
7701   (exit "$ac_status"); } &&
7702          { ac_try='test -s "conftest$ac_exeext"'
7703   { (eval echo "$as_me:7703: \"$ac_try\"") >&5
7704   (eval $ac_try) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit "$ac_status"); }; }; then
7708   ac_cv_lib_pcre2_posix_regcomp=yes
7709 else
7710   echo "$as_me: failed program was:" >&5
7711 cat "conftest.$ac_ext" >&5
7712 ac_cv_lib_pcre2_posix_regcomp=no
7713 fi
7714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7715 LIBS=$ac_check_lib_save_LIBS
7716 fi
7717 echo "$as_me:7717: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7718 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7719 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7720
7721 cf_add_libs="$LIBS"
7722 # reverse order
7723 cf_add_0lib=
7724 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7725 # filter duplicates
7726 for cf_add_1lib in $cf_add_0lib; do
7727         for cf_add_2lib in $cf_add_libs; do
7728                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7729                         cf_add_1lib=
7730                         break
7731                 fi
7732         done
7733         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7734 done
7735 LIBS="$cf_add_libs"
7736
7737 else
7738   echo "$as_me:7738: checking for regcomp in -lpcreposix" >&5
7739 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7740 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7741   echo $ECHO_N "(cached) $ECHO_C" >&6
7742 else
7743   ac_check_lib_save_LIBS=$LIBS
7744 LIBS="-lpcreposix  $LIBS"
7745 cat >"conftest.$ac_ext" <<_ACEOF
7746 #line 7746 "configure"
7747 #include "confdefs.h"
7748
7749 /* Override any gcc2 internal prototype to avoid an error.  */
7750 #ifdef __cplusplus
7751 extern "C"
7752 #endif
7753 /* We use char because int might match the return type of a gcc2
7754    builtin and then its argument prototype would still apply.  */
7755 char regcomp ();
7756 int
7757 main (void)
7758 {
7759 regcomp ();
7760   ;
7761   return 0;
7762 }
7763 _ACEOF
7764 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7765 if { (eval echo "$as_me:7765: \"$ac_link\"") >&5
7766   (eval $ac_link) 2>&5
7767   ac_status=$?
7768   echo "$as_me:7768: \$? = $ac_status" >&5
7769   (exit "$ac_status"); } &&
7770          { ac_try='test -s "conftest$ac_exeext"'
7771   { (eval echo "$as_me:7771: \"$ac_try\"") >&5
7772   (eval $ac_try) 2>&5
7773   ac_status=$?
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit "$ac_status"); }; }; then
7776   ac_cv_lib_pcreposix_regcomp=yes
7777 else
7778   echo "$as_me: failed program was:" >&5
7779 cat "conftest.$ac_ext" >&5
7780 ac_cv_lib_pcreposix_regcomp=no
7781 fi
7782 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7783 LIBS=$ac_check_lib_save_LIBS
7784 fi
7785 echo "$as_me:7785: result: $ac_cv_lib_pcreposix_regcomp" >&5
7786 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7787 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7788
7789 cf_add_libs="$LIBS"
7790 # reverse order
7791 cf_add_0lib=
7792 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7793 # filter duplicates
7794 for cf_add_1lib in $cf_add_0lib; do
7795         for cf_add_2lib in $cf_add_libs; do
7796                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7797                         cf_add_1lib=
7798                         break
7799                 fi
7800         done
7801         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7802 done
7803 LIBS="$cf_add_libs"
7804
7805 else
7806   { { echo "$as_me:7806: error: Cannot find PCRE2 POSIX library" >&5
7807 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7808    { (exit 1); exit 1; }; }
7809 fi
7810
7811 fi
7812
7813                 ;;
7814         esac
7815
7816         # either way, check for the library header files
7817
7818 for ac_header in pcre2posix.h pcreposix.h
7819 do
7820 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7821 echo "$as_me:7821: checking for $ac_header" >&5
7822 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7823 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7824   echo $ECHO_N "(cached) $ECHO_C" >&6
7825 else
7826   cat >"conftest.$ac_ext" <<_ACEOF
7827 #line 7827 "configure"
7828 #include "confdefs.h"
7829 #include <$ac_header>
7830 _ACEOF
7831 if { (eval echo "$as_me:7831: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7832   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7833   ac_status=$?
7834   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7835   rm -f conftest.er1
7836   cat conftest.err >&5
7837   echo "$as_me:7837: \$? = $ac_status" >&5
7838   (exit "$ac_status"); } >/dev/null; then
7839   if test -s conftest.err; then
7840     ac_cpp_err=$ac_c_preproc_warn_flag
7841   else
7842     ac_cpp_err=
7843   fi
7844 else
7845   ac_cpp_err=yes
7846 fi
7847 if test -z "$ac_cpp_err"; then
7848   eval "$as_ac_Header=yes"
7849 else
7850   echo "$as_me: failed program was:" >&5
7851   cat "conftest.$ac_ext" >&5
7852   eval "$as_ac_Header=no"
7853 fi
7854 rm -f conftest.err "conftest.$ac_ext"
7855 fi
7856 echo "$as_me:7856: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7857 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7858 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7859   cat >>confdefs.h <<EOF
7860 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7861 EOF
7862
7863 fi
7864 done
7865
7866 fi
7867
7868 # not everyone has "test -c"
7869 if test -c /dev/sysmouse 2>/dev/null ; then
7870 echo "$as_me:7870: checking if you want to use sysmouse" >&5
7871 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7872
7873 # Check whether --with-sysmouse or --without-sysmouse was given.
7874 if test "${with_sysmouse+set}" = set; then
7875   withval="$with_sysmouse"
7876   cf_with_sysmouse=$withval
7877 else
7878   cf_with_sysmouse=maybe
7879 fi;
7880         if test "$cf_with_sysmouse" != no ; then
7881         cat >"conftest.$ac_ext" <<_ACEOF
7882 #line 7882 "configure"
7883 #include "confdefs.h"
7884
7885 #include <osreldate.h>
7886 #if (__FreeBSD_version >= 400017)
7887 #include <sys/consio.h>
7888 #include <sys/fbio.h>
7889 #else
7890 #include <machine/console.h>
7891 #endif
7892
7893 int
7894 main (void)
7895 {
7896
7897         struct mouse_info the_mouse;
7898         ioctl(0, CONS_MOUSECTL, &the_mouse);
7899
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 rm -f "conftest.$ac_objext"
7905 if { (eval echo "$as_me:7905: \"$ac_compile\"") >&5
7906   (eval $ac_compile) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit "$ac_status"); } &&
7910          { ac_try='test -s "conftest.$ac_objext"'
7911   { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7912   (eval $ac_try) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit "$ac_status"); }; }; then
7916   cf_with_sysmouse=yes
7917 else
7918   echo "$as_me: failed program was:" >&5
7919 cat "conftest.$ac_ext" >&5
7920 cf_with_sysmouse=no
7921 fi
7922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7923         fi
7924 echo "$as_me:7924: result: $cf_with_sysmouse" >&5
7925 echo "${ECHO_T}$cf_with_sysmouse" >&6
7926 test "$cf_with_sysmouse" = yes &&
7927 cat >>confdefs.h <<\EOF
7928 #define USE_SYSMOUSE 1
7929 EOF
7930
7931 fi
7932
7933 # pretend that ncurses==ncursesw==ncursest
7934 echo "$as_me:7934: checking if you want to disable library suffixes" >&5
7935 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7936
7937 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7938 if test "${enable_lib_suffixes+set}" = set; then
7939   enableval="$enable_lib_suffixes"
7940   test "$enableval" != no && enableval=yes
7941         if test "$enableval" != "yes" ; then
7942     disable_lib_suffixes=yes
7943         else
7944                 disable_lib_suffixes=no
7945         fi
7946 else
7947   enableval=yes
7948         disable_lib_suffixes=no
7949
7950 fi;
7951 echo "$as_me:7951: result: $disable_lib_suffixes" >&5
7952 echo "${ECHO_T}$disable_lib_suffixes" >&6
7953
7954 ### If we're building with rpath, try to link non-standard libs that way too.
7955 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7956
7957 echo "$as_me:7957: checking if rpath-hack should be disabled" >&5
7958 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7959
7960 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7961 if test "${enable_rpath_hack+set}" = set; then
7962   enableval="$enable_rpath_hack"
7963   test "$enableval" != no && enableval=yes
7964         if test "$enableval" != "yes" ; then
7965     enable_rpath_hack=no
7966         else
7967                 enable_rpath_hack=yes
7968         fi
7969 else
7970   enableval=yes
7971         enable_rpath_hack=yes
7972
7973 fi;
7974 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7975 echo "$as_me:7975: result: $cf_disable_rpath_hack" >&5
7976 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7977
7978 if test "$enable_rpath_hack" = yes ; then
7979
7980 echo "$as_me:7980: checking for updated LDFLAGS" >&5
7981 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7982 if test -n "$LD_RPATH_OPT" ; then
7983         echo "$as_me:7983: result: maybe" >&5
7984 echo "${ECHO_T}maybe" >&6
7985
7986         for ac_prog in ldd
7987 do
7988   # Extract the first word of "$ac_prog", so it can be a program name with args.
7989 set dummy $ac_prog; ac_word=$2
7990 echo "$as_me:7990: checking for $ac_word" >&5
7991 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7992 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7993   echo $ECHO_N "(cached) $ECHO_C" >&6
7994 else
7995   if test -n "$cf_ldd_prog"; then
7996   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7997 else
7998   ac_save_IFS=$IFS; IFS=$ac_path_separator
7999 ac_dummy="$PATH"
8000 for ac_dir in $ac_dummy; do
8001   IFS=$ac_save_IFS
8002   test -z "$ac_dir" && ac_dir=.
8003   $as_executable_p "$ac_dir/$ac_word" || continue
8004 ac_cv_prog_cf_ldd_prog="$ac_prog"
8005 echo "$as_me:8005: found $ac_dir/$ac_word" >&5
8006 break
8007 done
8008
8009 fi
8010 fi
8011 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8012 if test -n "$cf_ldd_prog"; then
8013   echo "$as_me:8013: result: $cf_ldd_prog" >&5
8014 echo "${ECHO_T}$cf_ldd_prog" >&6
8015 else
8016   echo "$as_me:8016: result: no" >&5
8017 echo "${ECHO_T}no" >&6
8018 fi
8019
8020   test -n "$cf_ldd_prog" && break
8021 done
8022 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8023
8024         cf_rpath_list="/usr/lib /lib"
8025         if test "$cf_ldd_prog" != no
8026         then
8027                 cf_rpath_oops=
8028
8029 cat >"conftest.$ac_ext" <<_ACEOF
8030 #line 8030 "configure"
8031 #include "confdefs.h"
8032 #include <stdio.h>
8033 int
8034 main (void)
8035 {
8036 printf("Hello");
8037   ;
8038   return 0;
8039 }
8040 _ACEOF
8041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8042 if { (eval echo "$as_me:8042: \"$ac_link\"") >&5
8043   (eval $ac_link) 2>&5
8044   ac_status=$?
8045   echo "$as_me:8045: \$? = $ac_status" >&5
8046   (exit "$ac_status"); } &&
8047          { ac_try='test -s "conftest$ac_exeext"'
8048   { (eval echo "$as_me:8048: \"$ac_try\"") >&5
8049   (eval $ac_try) 2>&5
8050   ac_status=$?
8051   echo "$as_me:8051: \$? = $ac_status" >&5
8052   (exit "$ac_status"); }; }; then
8053   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8054                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8055 else
8056   echo "$as_me: failed program was:" >&5
8057 cat "conftest.$ac_ext" >&5
8058 fi
8059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8060
8061                 # If we passed the link-test, but get a "not found" on a given library,
8062                 # this could be due to inept reconfiguration of gcc to make it only
8063                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8064                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8065                 # /usr/local libraries.
8066                 if test -n "$cf_rpath_oops"
8067                 then
8068                         for cf_rpath_src in $cf_rpath_oops
8069                         do
8070                                 for cf_rpath_dir in \
8071                                         /usr/local \
8072                                         /usr/pkg \
8073                                         /opt/sfw
8074                                 do
8075                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8076                                         then
8077                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8078
8079 echo "${as_me:-configure}:8079: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8080
8081                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8082                                                 break
8083                                         fi
8084                                 done
8085                         done
8086                 fi
8087         fi
8088
8089         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8090
8091 echo "${as_me:-configure}:8091: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8092
8093 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8094
8095 echo "${as_me:-configure}:8095: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8096
8097 cf_rpath_dst=
8098 for cf_rpath_src in $LDFLAGS
8099 do
8100         case "$cf_rpath_src" in
8101         (-L*)
8102
8103                 # check if this refers to a directory which we will ignore
8104                 cf_rpath_skip=no
8105                 if test -n "$cf_rpath_list"
8106                 then
8107                         for cf_rpath_item in $cf_rpath_list
8108                         do
8109                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8110                                 then
8111                                         cf_rpath_skip=yes
8112                                         break
8113                                 fi
8114                         done
8115                 fi
8116
8117                 if test "$cf_rpath_skip" = no
8118                 then
8119                         # transform the option
8120                         if test "$LD_RPATH_OPT" = "-R " ; then
8121                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8122                         else
8123                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8124                         fi
8125
8126                         # if we have not already added this, add it now
8127                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8128                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8129                         then
8130                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8131
8132 echo "${as_me:-configure}:8132: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8133
8134                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8135                         fi
8136                 fi
8137                 ;;
8138         esac
8139         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8140 done
8141 LDFLAGS=$cf_rpath_dst
8142
8143 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8144
8145 echo "${as_me:-configure}:8145: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8146
8147 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8148
8149 echo "${as_me:-configure}:8149: testing ...checking LIBS $LIBS ..." 1>&5
8150
8151 cf_rpath_dst=
8152 for cf_rpath_src in $LIBS
8153 do
8154         case "$cf_rpath_src" in
8155         (-L*)
8156
8157                 # check if this refers to a directory which we will ignore
8158                 cf_rpath_skip=no
8159                 if test -n "$cf_rpath_list"
8160                 then
8161                         for cf_rpath_item in $cf_rpath_list
8162                         do
8163                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8164                                 then
8165                                         cf_rpath_skip=yes
8166                                         break
8167                                 fi
8168                         done
8169                 fi
8170
8171                 if test "$cf_rpath_skip" = no
8172                 then
8173                         # transform the option
8174                         if test "$LD_RPATH_OPT" = "-R " ; then
8175                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8176                         else
8177                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8178                         fi
8179
8180                         # if we have not already added this, add it now
8181                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8182                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8183                         then
8184                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8185
8186 echo "${as_me:-configure}:8186: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8187
8188                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8189                         fi
8190                 fi
8191                 ;;
8192         esac
8193         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8194 done
8195 LIBS=$cf_rpath_dst
8196
8197 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8198
8199 echo "${as_me:-configure}:8199: testing ...checked LIBS $LIBS ..." 1>&5
8200
8201         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8202
8203 echo "${as_me:-configure}:8203: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8204
8205 else
8206         echo "$as_me:8206: result: no" >&5
8207 echo "${ECHO_T}no" >&6
8208 fi
8209
8210 fi
8211
8212 fi
8213
8214 ### Depending on the system, someone may use rpath to build ncurses but not
8215 # want users of the package to rely upon that feature.  Give those people an
8216 # option to suppress that detail from EXTRA_LDFLAGS.
8217 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8218 if test -n "$EXTRA_PKG_LDFLAGS"
8219 then
8220         echo "$as_me:8220: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8221 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8222
8223 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8224 if test "${enable_pkg_ldflags+set}" = set; then
8225   enableval="$enable_pkg_ldflags"
8226   test "$enableval" != no && enableval=yes
8227         if test "$enableval" != "yes" ; then
8228     disable_pkg_ldflags=yes
8229         else
8230                 disable_pkg_ldflags=no
8231         fi
8232 else
8233   enableval=yes
8234         disable_pkg_ldflags=no
8235
8236 fi;
8237         echo "$as_me:8237: result: $disable_pkg_ldflags" >&5
8238 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8239         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8240 fi
8241
8242 ###############################################################################
8243
8244 ###     use option --with-extra-suffix to append suffix to headers and libraries
8245 echo "$as_me:8245: checking if you wish to append extra suffix to header/library paths" >&5
8246 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8247 EXTRA_SUFFIX=
8248
8249 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8250 if test "${with_extra_suffix+set}" = set; then
8251   withval="$with_extra_suffix"
8252   case x$withval in
8253         (xno)
8254                 ;;
8255         (xyes|x)
8256                 EXTRA_SUFFIX=$cf_cv_abi_version
8257                 ;;
8258         (*)
8259                 EXTRA_SUFFIX=$withval
8260                 ;;
8261         esac
8262
8263 fi;
8264 echo "$as_me:8264: result: $EXTRA_SUFFIX" >&5
8265 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8266
8267 ###     use option --disable-overwrite to leave out the link to -lcurses
8268 echo "$as_me:8268: checking if you wish to install ncurses overwriting curses" >&5
8269 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8270
8271 # Check whether --enable-overwrite or --disable-overwrite was given.
8272 if test "${enable_overwrite+set}" = set; then
8273   enableval="$enable_overwrite"
8274   with_overwrite=$enableval
8275 else
8276   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8277 fi;
8278 echo "$as_me:8278: result: $with_overwrite" >&5
8279 echo "${ECHO_T}$with_overwrite" >&6
8280
8281 echo "$as_me:8281: checking if external terminfo-database is used" >&5
8282 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8283
8284 # Check whether --enable-database or --disable-database was given.
8285 if test "${enable_database+set}" = set; then
8286   enableval="$enable_database"
8287   use_database=$enableval
8288 else
8289   use_database=yes
8290 fi;
8291 echo "$as_me:8291: result: $use_database" >&5
8292 echo "${ECHO_T}$use_database" >&6
8293
8294 case "$host_os" in
8295 (os2*)
8296         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8297         ;;
8298 (*)
8299         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8300         ;;
8301 esac
8302
8303 NCURSES_USE_DATABASE=0
8304 if test "$use_database" != no ; then
8305         NCURSES_USE_DATABASE=1
8306
8307         echo "$as_me:8307: checking which terminfo source-file will be installed" >&5
8308 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8309
8310 # Check whether --with-database or --without-database was given.
8311 if test "${with_database+set}" = set; then
8312   withval="$with_database"
8313   TERMINFO_SRC=$withval
8314 fi;
8315         echo "$as_me:8315: result: $TERMINFO_SRC" >&5
8316 echo "${ECHO_T}$TERMINFO_SRC" >&6
8317
8318         echo "$as_me:8318: checking whether to use hashed database instead of directory/tree" >&5
8319 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8320
8321 # Check whether --with-hashed-db or --without-hashed-db was given.
8322 if test "${with_hashed_db+set}" = set; then
8323   withval="$with_hashed_db"
8324
8325 else
8326   with_hashed_db=no
8327 fi;
8328         echo "$as_me:8328: result: $with_hashed_db" >&5
8329 echo "${ECHO_T}$with_hashed_db" >&6
8330 else
8331         with_hashed_db=no
8332 fi
8333
8334 echo "$as_me:8334: checking for list of fallback descriptions" >&5
8335 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8336
8337 # Check whether --with-fallbacks or --without-fallbacks was given.
8338 if test "${with_fallbacks+set}" = set; then
8339   withval="$with_fallbacks"
8340   with_fallback=$withval
8341 else
8342   with_fallback=
8343 fi;
8344 echo "$as_me:8344: result: $with_fallback" >&5
8345 echo "${ECHO_T}$with_fallback" >&6
8346
8347 case ".$with_fallback" in
8348 (.|.no)
8349         FALLBACK_LIST=
8350         ;;
8351 (.yes)
8352         { echo "$as_me:8352: WARNING: expected a list of terminal descriptions" >&5
8353 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8354         ;;
8355 (*)
8356         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8357         ;;
8358 esac
8359
8360 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8361 # tree for generating the terminal descriptions that will be compiled into the
8362 # library.  If your toolchain is old, it may not handle current terminal
8363 # databases.  Use configure-options to point to the tools which will be used,
8364 # rather than the first ones found on the $PATH.
8365 if test -n "$ac_tool_prefix"; then
8366   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8367 set dummy ${ac_tool_prefix}tic; ac_word=$2
8368 echo "$as_me:8368: checking for $ac_word" >&5
8369 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8370 if test "${ac_cv_prog_TIC+set}" = set; then
8371   echo $ECHO_N "(cached) $ECHO_C" >&6
8372 else
8373   if test -n "$TIC"; then
8374   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8375 else
8376   ac_save_IFS=$IFS; IFS=$ac_path_separator
8377 ac_dummy="$PATH"
8378 for ac_dir in $ac_dummy; do
8379   IFS=$ac_save_IFS
8380   test -z "$ac_dir" && ac_dir=.
8381   $as_executable_p "$ac_dir/$ac_word" || continue
8382 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8383 echo "$as_me:8383: found $ac_dir/$ac_word" >&5
8384 break
8385 done
8386
8387 fi
8388 fi
8389 TIC=$ac_cv_prog_TIC
8390 if test -n "$TIC"; then
8391   echo "$as_me:8391: result: $TIC" >&5
8392 echo "${ECHO_T}$TIC" >&6
8393 else
8394   echo "$as_me:8394: result: no" >&5
8395 echo "${ECHO_T}no" >&6
8396 fi
8397
8398 fi
8399 if test -z "$ac_cv_prog_TIC"; then
8400   ac_ct_TIC=$TIC
8401   # Extract the first word of "tic", so it can be a program name with args.
8402 set dummy tic; ac_word=$2
8403 echo "$as_me:8403: checking for $ac_word" >&5
8404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8405 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8406   echo $ECHO_N "(cached) $ECHO_C" >&6
8407 else
8408   if test -n "$ac_ct_TIC"; then
8409   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8410 else
8411   ac_save_IFS=$IFS; IFS=$ac_path_separator
8412 ac_dummy="$PATH"
8413 for ac_dir in $ac_dummy; do
8414   IFS=$ac_save_IFS
8415   test -z "$ac_dir" && ac_dir=.
8416   $as_executable_p "$ac_dir/$ac_word" || continue
8417 ac_cv_prog_ac_ct_TIC="tic"
8418 echo "$as_me:8418: found $ac_dir/$ac_word" >&5
8419 break
8420 done
8421
8422 fi
8423 fi
8424 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8425 if test -n "$ac_ct_TIC"; then
8426   echo "$as_me:8426: result: $ac_ct_TIC" >&5
8427 echo "${ECHO_T}$ac_ct_TIC" >&6
8428 else
8429   echo "$as_me:8429: result: no" >&5
8430 echo "${ECHO_T}no" >&6
8431 fi
8432
8433   TIC=$ac_ct_TIC
8434 else
8435   TIC="$ac_cv_prog_TIC"
8436 fi
8437
8438 if test -n "$ac_tool_prefix"; then
8439   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8440 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8441 echo "$as_me:8441: checking for $ac_word" >&5
8442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8443 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8444   echo $ECHO_N "(cached) $ECHO_C" >&6
8445 else
8446   if test -n "$INFOCMP"; then
8447   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8448 else
8449   ac_save_IFS=$IFS; IFS=$ac_path_separator
8450 ac_dummy="$PATH"
8451 for ac_dir in $ac_dummy; do
8452   IFS=$ac_save_IFS
8453   test -z "$ac_dir" && ac_dir=.
8454   $as_executable_p "$ac_dir/$ac_word" || continue
8455 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8456 echo "$as_me:8456: found $ac_dir/$ac_word" >&5
8457 break
8458 done
8459
8460 fi
8461 fi
8462 INFOCMP=$ac_cv_prog_INFOCMP
8463 if test -n "$INFOCMP"; then
8464   echo "$as_me:8464: result: $INFOCMP" >&5
8465 echo "${ECHO_T}$INFOCMP" >&6
8466 else
8467   echo "$as_me:8467: result: no" >&5
8468 echo "${ECHO_T}no" >&6
8469 fi
8470
8471 fi
8472 if test -z "$ac_cv_prog_INFOCMP"; then
8473   ac_ct_INFOCMP=$INFOCMP
8474   # Extract the first word of "infocmp", so it can be a program name with args.
8475 set dummy infocmp; ac_word=$2
8476 echo "$as_me:8476: checking for $ac_word" >&5
8477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8478 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8479   echo $ECHO_N "(cached) $ECHO_C" >&6
8480 else
8481   if test -n "$ac_ct_INFOCMP"; then
8482   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8483 else
8484   ac_save_IFS=$IFS; IFS=$ac_path_separator
8485 ac_dummy="$PATH"
8486 for ac_dir in $ac_dummy; do
8487   IFS=$ac_save_IFS
8488   test -z "$ac_dir" && ac_dir=.
8489   $as_executable_p "$ac_dir/$ac_word" || continue
8490 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8491 echo "$as_me:8491: found $ac_dir/$ac_word" >&5
8492 break
8493 done
8494
8495 fi
8496 fi
8497 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8498 if test -n "$ac_ct_INFOCMP"; then
8499   echo "$as_me:8499: result: $ac_ct_INFOCMP" >&5
8500 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8501 else
8502   echo "$as_me:8502: result: no" >&5
8503 echo "${ECHO_T}no" >&6
8504 fi
8505
8506   INFOCMP=$ac_ct_INFOCMP
8507 else
8508   INFOCMP="$ac_cv_prog_INFOCMP"
8509 fi
8510
8511 if test -n "$FALLBACK_LIST"
8512 then
8513
8514 # Check whether --with-tic-path or --without-tic-path was given.
8515 if test "${with_tic_path+set}" = set; then
8516   withval="$with_tic_path"
8517   echo "$as_me:8517: checking for tic program for fallbacks" >&5
8518 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8519                 TIC=$withval
8520                 echo "$as_me:8520: result: $TIC" >&5
8521 echo "${ECHO_T}$TIC" >&6
8522
8523 if test "x$prefix" != xNONE; then
8524         cf_path_syntax="$prefix"
8525 else
8526         cf_path_syntax="$ac_default_prefix"
8527 fi
8528
8529 case ".$TIC" in
8530 (.\$\(*\)*|.\'*\'*)
8531         ;;
8532 (..|./*|.\\*)
8533         ;;
8534 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8535         ;;
8536 (.\$\{*prefix\}*|.\$\{*dir\}*)
8537         eval TIC="$TIC"
8538         case ".$TIC" in
8539         (.NONE/*)
8540                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8541                 ;;
8542         esac
8543         ;;
8544 (.no|.NONE/*)
8545         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8546         ;;
8547 (*)
8548         { { echo "$as_me:8548: error: expected a pathname, not \"$TIC\"" >&5
8549 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8550    { (exit 1); exit 1; }; }
8551         ;;
8552 esac
8553
8554 else
8555
8556 test -z "$TIC" && TIC="tic"
8557 for ac_prog in $TIC tic
8558 do
8559   # Extract the first word of "$ac_prog", so it can be a program name with args.
8560 set dummy $ac_prog; ac_word=$2
8561 echo "$as_me:8561: checking for $ac_word" >&5
8562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8563 if test "${ac_cv_path_TIC+set}" = set; then
8564   echo $ECHO_N "(cached) $ECHO_C" >&6
8565 else
8566   case $TIC in
8567   [\\/]* | ?:[\\/]*)
8568   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8569   ;;
8570   *)
8571   ac_save_IFS=$IFS; IFS=$ac_path_separator
8572 ac_dummy="$PATH:/usr/local/ncurses/bin"
8573 for ac_dir in $ac_dummy; do
8574   IFS=$ac_save_IFS
8575   test -z "$ac_dir" && ac_dir=.
8576   if $as_executable_p "$ac_dir/$ac_word"; then
8577    ac_cv_path_TIC="$ac_dir/$ac_word"
8578    echo "$as_me:8578: found $ac_dir/$ac_word" >&5
8579    break
8580 fi
8581 done
8582
8583   ;;
8584 esac
8585 fi
8586 TIC=$ac_cv_path_TIC
8587
8588 if test -n "$TIC"; then
8589   echo "$as_me:8589: result: $TIC" >&5
8590 echo "${ECHO_T}$TIC" >&6
8591 else
8592   echo "$as_me:8592: result: no" >&5
8593 echo "${ECHO_T}no" >&6
8594 fi
8595
8596   test -n "$TIC" && break
8597 done
8598 test -n "$TIC" || TIC="$TIC"
8599
8600 cf_path_prog=""
8601 cf_path_args=""
8602 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8603 for cf_temp in $ac_cv_path_TIC
8604 do
8605         if test -z "$cf_path_prog" ; then
8606                 if test "$with_full_paths" = yes ; then
8607
8608 if test "x$prefix" != xNONE; then
8609         cf_path_syntax="$prefix"
8610 else
8611         cf_path_syntax="$ac_default_prefix"
8612 fi
8613
8614 case ".$cf_temp" in
8615 (.\$\(*\)*|.\'*\'*)
8616         ;;
8617 (..|./*|.\\*)
8618         ;;
8619 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8620         ;;
8621 (.\$\{*prefix\}*|.\$\{*dir\}*)
8622         eval cf_temp="$cf_temp"
8623         case ".$cf_temp" in
8624         (.NONE/*)
8625                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8626                 ;;
8627         esac
8628         ;;
8629 (.no|.NONE/*)
8630         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8631         ;;
8632 (*)
8633         break
8634         ;;
8635 esac
8636
8637                         cf_path_prog="$cf_temp"
8638                 else
8639                         cf_path_prog="`basename "$cf_temp"`"
8640                 fi
8641         elif test -z "$cf_path_args" ; then
8642                 cf_path_args="$cf_temp"
8643         else
8644                 cf_path_args="$cf_path_args $cf_temp"
8645         fi
8646 done
8647 IFS="$cf_save_ifs"
8648
8649 if test -n "$cf_path_prog" ; then
8650
8651 echo "${as_me:-configure}:8651: testing defining path for ${cf_path_prog} ..." 1>&5
8652
8653 cat >>confdefs.h <<EOF
8654 #define TIC_PATH "$cf_path_prog"
8655 EOF
8656
8657         test -n "$cf_path_args" &&
8658 cat >>confdefs.h <<EOF
8659 #define TIC_ARGS "$cf_path_args"
8660 EOF
8661
8662 fi
8663
8664                 if test -z "$TIC"
8665                 then
8666                         { echo "$as_me:8666: WARNING: no tic program found for fallbacks" >&5
8667 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8668                 fi
8669
8670 fi;
8671
8672 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8673 if test "${with_infocmp_path+set}" = set; then
8674   withval="$with_infocmp_path"
8675   echo "$as_me:8675: checking for infocmp program for fallbacks" >&5
8676 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8677                 INFOCMP=$withval
8678                 echo "$as_me:8678: result: $INFOCMP" >&5
8679 echo "${ECHO_T}$INFOCMP" >&6
8680
8681 if test "x$prefix" != xNONE; then
8682         cf_path_syntax="$prefix"
8683 else
8684         cf_path_syntax="$ac_default_prefix"
8685 fi
8686
8687 case ".$INFOCMP" in
8688 (.\$\(*\)*|.\'*\'*)
8689         ;;
8690 (..|./*|.\\*)
8691         ;;
8692 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8693         ;;
8694 (.\$\{*prefix\}*|.\$\{*dir\}*)
8695         eval INFOCMP="$INFOCMP"
8696         case ".$INFOCMP" in
8697         (.NONE/*)
8698                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8699                 ;;
8700         esac
8701         ;;
8702 (.no|.NONE/*)
8703         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8704         ;;
8705 (*)
8706         { { echo "$as_me:8706: error: expected a pathname, not \"$INFOCMP\"" >&5
8707 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8708    { (exit 1); exit 1; }; }
8709         ;;
8710 esac
8711
8712 else
8713
8714 test -z "$INFOCMP" && INFOCMP="infocmp"
8715 for ac_prog in $INFOCMP infocmp
8716 do
8717   # Extract the first word of "$ac_prog", so it can be a program name with args.
8718 set dummy $ac_prog; ac_word=$2
8719 echo "$as_me:8719: checking for $ac_word" >&5
8720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8721 if test "${ac_cv_path_INFOCMP+set}" = set; then
8722   echo $ECHO_N "(cached) $ECHO_C" >&6
8723 else
8724   case $INFOCMP in
8725   [\\/]* | ?:[\\/]*)
8726   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8727   ;;
8728   *)
8729   ac_save_IFS=$IFS; IFS=$ac_path_separator
8730 ac_dummy="$PATH:/usr/local/ncurses/bin"
8731 for ac_dir in $ac_dummy; do
8732   IFS=$ac_save_IFS
8733   test -z "$ac_dir" && ac_dir=.
8734   if $as_executable_p "$ac_dir/$ac_word"; then
8735    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8736    echo "$as_me:8736: found $ac_dir/$ac_word" >&5
8737    break
8738 fi
8739 done
8740
8741   ;;
8742 esac
8743 fi
8744 INFOCMP=$ac_cv_path_INFOCMP
8745
8746 if test -n "$INFOCMP"; then
8747   echo "$as_me:8747: result: $INFOCMP" >&5
8748 echo "${ECHO_T}$INFOCMP" >&6
8749 else
8750   echo "$as_me:8750: result: no" >&5
8751 echo "${ECHO_T}no" >&6
8752 fi
8753
8754   test -n "$INFOCMP" && break
8755 done
8756 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8757
8758 cf_path_prog=""
8759 cf_path_args=""
8760 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8761 for cf_temp in $ac_cv_path_INFOCMP
8762 do
8763         if test -z "$cf_path_prog" ; then
8764                 if test "$with_full_paths" = yes ; then
8765
8766 if test "x$prefix" != xNONE; then
8767         cf_path_syntax="$prefix"
8768 else
8769         cf_path_syntax="$ac_default_prefix"
8770 fi
8771
8772 case ".$cf_temp" in
8773 (.\$\(*\)*|.\'*\'*)
8774         ;;
8775 (..|./*|.\\*)
8776         ;;
8777 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8778         ;;
8779 (.\$\{*prefix\}*|.\$\{*dir\}*)
8780         eval cf_temp="$cf_temp"
8781         case ".$cf_temp" in
8782         (.NONE/*)
8783                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8784                 ;;
8785         esac
8786         ;;
8787 (.no|.NONE/*)
8788         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8789         ;;
8790 (*)
8791         break
8792         ;;
8793 esac
8794
8795                         cf_path_prog="$cf_temp"
8796                 else
8797                         cf_path_prog="`basename "$cf_temp"`"
8798                 fi
8799         elif test -z "$cf_path_args" ; then
8800                 cf_path_args="$cf_temp"
8801         else
8802                 cf_path_args="$cf_path_args $cf_temp"
8803         fi
8804 done
8805 IFS="$cf_save_ifs"
8806
8807 if test -n "$cf_path_prog" ; then
8808
8809 echo "${as_me:-configure}:8809: testing defining path for ${cf_path_prog} ..." 1>&5
8810
8811 cat >>confdefs.h <<EOF
8812 #define INFOCMP_PATH "$cf_path_prog"
8813 EOF
8814
8815         test -n "$cf_path_args" &&
8816 cat >>confdefs.h <<EOF
8817 #define INFOCMP_ARGS "$cf_path_args"
8818 EOF
8819
8820 fi
8821
8822                 if test -z "$INFOCMP"
8823                 then
8824                         { echo "$as_me:8824: WARNING: no infocmp program found for fallbacks" >&5
8825 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8826                 fi
8827
8828 fi;
8829
8830         test -z "$TIC" && FALLBACK_LIST=
8831         test -z "$INFOCMP" && FALLBACK_LIST=
8832         if test -z "$FALLBACK_LIST"
8833         then
8834                 { echo "$as_me:8834: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8835 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8836         fi
8837 fi
8838
8839 USE_FALLBACKS=
8840 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8841
8842 echo "$as_me:8842: checking if you want modern xterm or antique" >&5
8843 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8844
8845 # Check whether --with-xterm-new or --without-xterm-new was given.
8846 if test "${with_xterm_new+set}" = set; then
8847   withval="$with_xterm_new"
8848   with_xterm_new=$withval
8849 else
8850   with_xterm_new=yes
8851 fi;
8852 case "$with_xterm_new" in
8853 (no) with_xterm_new=xterm-old;;
8854 (*)      with_xterm_new=xterm-new;;
8855 esac
8856 echo "$as_me:8856: result: $with_xterm_new" >&5
8857 echo "${ECHO_T}$with_xterm_new" >&6
8858 WHICH_XTERM=$with_xterm_new
8859
8860 echo "$as_me:8860: checking if xterm backspace sends BS or DEL" >&5
8861 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8862
8863 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8864 if test "${with_xterm_kbs+set}" = set; then
8865   withval="$with_xterm_kbs"
8866   with_xterm_kbs=$withval
8867 else
8868   with_xterm_kbs=BS
8869 fi;
8870 case x$with_xterm_kbs in
8871 (xyes|xno|xBS|xbs|x8)
8872         with_xterm_kbs=BS
8873         ;;
8874 (xDEL|xdel|x127)
8875         with_xterm_kbs=DEL
8876         ;;
8877 (*)
8878         with_xterm_kbs=$withval
8879         ;;
8880 esac
8881 echo "$as_me:8881: result: $with_xterm_kbs" >&5
8882 echo "${ECHO_T}$with_xterm_kbs" >&6
8883 XTERM_KBS=$with_xterm_kbs
8884
8885 MAKE_TERMINFO=
8886 if test "$use_database" = no ; then
8887         TERMINFO="${datadir}/terminfo"
8888         MAKE_TERMINFO="#"
8889 else
8890
8891 echo "$as_me:8891: checking for list of terminfo directories" >&5
8892 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8893
8894 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8895 if test "${with_terminfo_dirs+set}" = set; then
8896   withval="$with_terminfo_dirs"
8897
8898 else
8899   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8900 fi;
8901 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8902 cf_dst_path=
8903 for cf_src_path in $withval
8904 do
8905
8906 if test "x$prefix" != xNONE; then
8907         cf_path_syntax="$prefix"
8908 else
8909         cf_path_syntax="$ac_default_prefix"
8910 fi
8911
8912 case ".$cf_src_path" in
8913 (.\$\(*\)*|.\'*\'*)
8914         ;;
8915 (..|./*|.\\*)
8916         ;;
8917 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8918         ;;
8919 (.\$\{*prefix\}*|.\$\{*dir\}*)
8920         eval cf_src_path="$cf_src_path"
8921         case ".$cf_src_path" in
8922         (.NONE/*)
8923                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8924                 ;;
8925         esac
8926         ;;
8927 (.no|.NONE/*)
8928         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8929         ;;
8930 (*)
8931         { { echo "$as_me:8931: error: expected a pathname, not \"$cf_src_path\"" >&5
8932 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8933    { (exit 1); exit 1; }; }
8934         ;;
8935 esac
8936
8937   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8938   cf_dst_path="${cf_dst_path}${cf_src_path}"
8939 done
8940 IFS="$ac_save_ifs"
8941
8942 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8943 # so we have to check/work around.  We do prefer the result of "eval"...
8944 eval cf_dst_eval="$cf_dst_path"
8945 case "x$cf_dst_eval" in
8946 (xNONE*)
8947         TERMINFO_DIRS=$cf_dst_path
8948         ;;
8949 (*)
8950         TERMINFO_DIRS="$cf_dst_eval"
8951         ;;
8952 esac
8953
8954 echo "$as_me:8954: result: $TERMINFO_DIRS" >&5
8955 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8956 test -n "$TERMINFO_DIRS" &&
8957 cat >>confdefs.h <<EOF
8958 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8959 EOF
8960
8961 case "x$TERMINFO" in
8962 x???:*)
8963         { echo "$as_me:8963: WARNING: ignoring non-directory/file TERMINFO value" >&5
8964 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8965         unset TERMINFO
8966         ;;
8967 esac
8968
8969 echo "$as_me:8969: checking for default terminfo directory" >&5
8970 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8971
8972 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8973 if test "${with_default_terminfo_dir+set}" = set; then
8974   withval="$with_default_terminfo_dir"
8975
8976 else
8977   withval="${TERMINFO:-${datadir}/terminfo}"
8978 fi; if test -n "${datadir}/terminfo" ; then
8979
8980 if test "x$prefix" != xNONE; then
8981         cf_path_syntax="$prefix"
8982 else
8983         cf_path_syntax="$ac_default_prefix"
8984 fi
8985
8986 case ".$withval" in
8987 (.\$\(*\)*|.\'*\'*)
8988         ;;
8989 (..|./*|.\\*)
8990         ;;
8991 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8992         ;;
8993 (.\$\{*prefix\}*|.\$\{*dir\}*)
8994         eval withval="$withval"
8995         case ".$withval" in
8996         (.NONE/*)
8997                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8998                 ;;
8999         esac
9000         ;;
9001 (.no|.NONE/*)
9002         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9003         ;;
9004 (*)
9005         { { echo "$as_me:9005: error: expected a pathname, not \"$withval\"" >&5
9006 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9007    { (exit 1); exit 1; }; }
9008         ;;
9009 esac
9010
9011 fi
9012 eval TERMINFO="$withval"
9013
9014 echo "$as_me:9014: result: $TERMINFO" >&5
9015 echo "${ECHO_T}$TERMINFO" >&6
9016
9017 cat >>confdefs.h <<EOF
9018 #define TERMINFO "$TERMINFO"
9019 EOF
9020
9021 fi
9022
9023 ###     use option --disable-big-core to make tic run on small machines
9024 ###     We need 4Mb, check if we can allocate 50% more than that.
9025 echo "$as_me:9025: checking if big-core option selected" >&5
9026 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9027
9028 # Check whether --enable-big-core or --disable-big-core was given.
9029 if test "${enable_big_core+set}" = set; then
9030   enableval="$enable_big_core"
9031   with_big_core=$enableval
9032 else
9033   if test "$cross_compiling" = yes; then
9034   with_big_core=no
9035 else
9036   cat >"conftest.$ac_ext" <<_ACEOF
9037 #line 9037 "configure"
9038 #include "confdefs.h"
9039
9040 #include <stdlib.h>
9041 #include <string.h>
9042 int main() {
9043         unsigned long n = 6000000L;
9044         char *s = malloc(n);
9045         if (s != 0)
9046                 s[0] = s[n-1] = 0;
9047         ${cf_cv_main_return:-return}(s == 0);
9048 }
9049 _ACEOF
9050 rm -f "conftest$ac_exeext"
9051 if { (eval echo "$as_me:9051: \"$ac_link\"") >&5
9052   (eval $ac_link) 2>&5
9053   ac_status=$?
9054   echo "$as_me:9054: \$? = $ac_status" >&5
9055   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9056   { (eval echo "$as_me:9056: \"$ac_try\"") >&5
9057   (eval $ac_try) 2>&5
9058   ac_status=$?
9059   echo "$as_me:9059: \$? = $ac_status" >&5
9060   (exit "$ac_status"); }; }; then
9061   with_big_core=yes
9062 else
9063   echo "$as_me: program exited with status $ac_status" >&5
9064 echo "$as_me: failed program was:" >&5
9065 cat "conftest.$ac_ext" >&5
9066 with_big_core=no
9067 fi
9068 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9069 fi
9070 fi;
9071 echo "$as_me:9071: result: $with_big_core" >&5
9072 echo "${ECHO_T}$with_big_core" >&6
9073 test "x$with_big_core" = "xyes" &&
9074 cat >>confdefs.h <<\EOF
9075 #define HAVE_BIG_CORE 1
9076 EOF
9077
9078 ### ISO C only guarantees 512-char strings, we have tables which load faster
9079 ### when constructed using "big" strings.  More than the C compiler, the awk
9080 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9081 echo "$as_me:9081: checking if big-strings option selected" >&5
9082 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9083
9084 # Check whether --enable-big-strings or --disable-big-strings was given.
9085 if test "${enable_big_strings+set}" = set; then
9086   enableval="$enable_big_strings"
9087   with_big_strings=$enableval
9088 else
9089
9090         case x$AWK in
9091         (x)
9092                 eval with_big_strings=no
9093                 ;;
9094         (*)
9095                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9096                         | $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
9097                         eval with_big_strings=yes
9098                 else
9099                         eval with_big_strings=no
9100                 fi
9101                 ;;
9102         esac
9103
9104 fi;
9105 echo "$as_me:9105: result: $with_big_strings" >&5
9106 echo "${ECHO_T}$with_big_strings" >&6
9107
9108 USE_BIG_STRINGS=0
9109 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9110
9111 ###     use option --enable-termcap to compile in the termcap fallback support
9112 echo "$as_me:9112: checking if you want termcap-fallback support" >&5
9113 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9114
9115 # Check whether --enable-termcap or --disable-termcap was given.
9116 if test "${enable_termcap+set}" = set; then
9117   enableval="$enable_termcap"
9118   with_termcap=$enableval
9119 else
9120   with_termcap=no
9121 fi;
9122 echo "$as_me:9122: result: $with_termcap" >&5
9123 echo "${ECHO_T}$with_termcap" >&6
9124
9125 NCURSES_USE_TERMCAP=0
9126 if test "x$with_termcap" != "xyes" ; then
9127         if test "$use_database" = no ; then
9128                 if test -z "$with_fallback" ; then
9129                         { { echo "$as_me:9129: error: You have disabled the database w/o specifying fallbacks" >&5
9130 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9131    { (exit 1); exit 1; }; }
9132                 fi
9133         fi
9134
9135 cat >>confdefs.h <<\EOF
9136 #define PURE_TERMINFO 1
9137 EOF
9138
9139 else
9140
9141         if test "$with_ticlib" != no ; then
9142                 { { echo "$as_me:9142: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9143 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9144    { (exit 1); exit 1; }; }
9145         fi
9146
9147         NCURSES_USE_TERMCAP=1
9148         echo "$as_me:9148: checking for list of termcap files" >&5
9149 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9150
9151 # Check whether --with-termpath or --without-termpath was given.
9152 if test "${with_termpath+set}" = set; then
9153   withval="$with_termpath"
9154
9155 else
9156   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9157 fi;
9158 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9159 cf_dst_path=
9160 for cf_src_path in $withval
9161 do
9162
9163 if test "x$prefix" != xNONE; then
9164         cf_path_syntax="$prefix"
9165 else
9166         cf_path_syntax="$ac_default_prefix"
9167 fi
9168
9169 case ".$cf_src_path" in
9170 (.\$\(*\)*|.\'*\'*)
9171         ;;
9172 (..|./*|.\\*)
9173         ;;
9174 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9175         ;;
9176 (.\$\{*prefix\}*|.\$\{*dir\}*)
9177         eval cf_src_path="$cf_src_path"
9178         case ".$cf_src_path" in
9179         (.NONE/*)
9180                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9181                 ;;
9182         esac
9183         ;;
9184 (.no|.NONE/*)
9185         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9186         ;;
9187 (*)
9188         { { echo "$as_me:9188: error: expected a pathname, not \"$cf_src_path\"" >&5
9189 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9190    { (exit 1); exit 1; }; }
9191         ;;
9192 esac
9193
9194   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9195   cf_dst_path="${cf_dst_path}${cf_src_path}"
9196 done
9197 IFS="$ac_save_ifs"
9198
9199 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9200 # so we have to check/work around.  We do prefer the result of "eval"...
9201 eval cf_dst_eval="$cf_dst_path"
9202 case "x$cf_dst_eval" in
9203 (xNONE*)
9204         TERMPATH=$cf_dst_path
9205         ;;
9206 (*)
9207         TERMPATH="$cf_dst_eval"
9208         ;;
9209 esac
9210
9211         echo "$as_me:9211: result: $TERMPATH" >&5
9212 echo "${ECHO_T}$TERMPATH" >&6
9213         test -n "$TERMPATH" &&
9214 cat >>confdefs.h <<EOF
9215 #define TERMPATH "$TERMPATH"
9216 EOF
9217
9218         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9219         echo "$as_me:9219: checking if fast termcap-loader is needed" >&5
9220 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9221
9222 # Check whether --enable-getcap or --disable-getcap was given.
9223 if test "${enable_getcap+set}" = set; then
9224   enableval="$enable_getcap"
9225   with_getcap=$enableval
9226 else
9227   with_getcap=no
9228 fi;
9229         echo "$as_me:9229: result: $with_getcap" >&5
9230 echo "${ECHO_T}$with_getcap" >&6
9231         test "x$with_getcap" = "xyes" &&
9232 cat >>confdefs.h <<\EOF
9233 #define USE_GETCAP 1
9234 EOF
9235
9236         echo "$as_me:9236: checking if translated termcaps will be cached in ~/.terminfo" >&5
9237 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9238
9239 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9240 if test "${enable_getcap_cache+set}" = set; then
9241   enableval="$enable_getcap_cache"
9242   with_getcap_cache=$enableval
9243 else
9244   with_getcap_cache=no
9245 fi;
9246         echo "$as_me:9246: result: $with_getcap_cache" >&5
9247 echo "${ECHO_T}$with_getcap_cache" >&6
9248         test "x$with_getcap_cache" = "xyes" &&
9249 cat >>confdefs.h <<\EOF
9250 #define USE_GETCAP_CACHE 1
9251 EOF
9252
9253 fi
9254
9255 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9256 echo "$as_me:9256: checking if ~/.terminfo is wanted" >&5
9257 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9258
9259 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9260 if test "${enable_home_terminfo+set}" = set; then
9261   enableval="$enable_home_terminfo"
9262   with_home_terminfo=$enableval
9263 else
9264   with_home_terminfo=yes
9265 fi;
9266 echo "$as_me:9266: result: $with_home_terminfo" >&5
9267 echo "${ECHO_T}$with_home_terminfo" >&6
9268 test "x$with_home_terminfo" = "xyes" &&
9269 cat >>confdefs.h <<\EOF
9270 #define USE_HOME_TERMINFO 1
9271 EOF
9272
9273 echo "$as_me:9273: checking if you want to permit root to use ncurses environment variables" >&5
9274 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9275
9276 # Check whether --enable-root-environ or --disable-root-environ was given.
9277 if test "${enable_root_environ+set}" = set; then
9278   enableval="$enable_root_environ"
9279   with_root_environ=$enableval
9280 else
9281   with_root_environ=yes
9282 fi;
9283 echo "$as_me:9283: result: $with_root_environ" >&5
9284 echo "${ECHO_T}$with_root_environ" >&6
9285 test "x$with_root_environ" = xyes &&
9286 cat >>confdefs.h <<\EOF
9287 #define USE_ROOT_ENVIRON 1
9288 EOF
9289
9290 echo "$as_me:9290: checking if you want to permit setuid programs to access all files" >&5
9291 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9292
9293 # Check whether --enable-root-environ or --disable-root-environ was given.
9294 if test "${enable_root_environ+set}" = set; then
9295   enableval="$enable_root_environ"
9296   with_root_access=$enableval
9297 else
9298   with_root_access=yes
9299 fi;
9300 echo "$as_me:9300: result: $with_root_access" >&5
9301 echo "${ECHO_T}$with_root_access" >&6
9302 test "x$with_root_access" = xyes &&
9303 cat >>confdefs.h <<\EOF
9304 #define USE_ROOT_ACCESS 1
9305 EOF
9306
9307 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9308 ###   to reduce storage requirements for the terminfo database.
9309
9310 for ac_header in \
9311 unistd.h \
9312
9313 do
9314 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9315 echo "$as_me:9315: checking for $ac_header" >&5
9316 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9317 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9318   echo $ECHO_N "(cached) $ECHO_C" >&6
9319 else
9320   cat >"conftest.$ac_ext" <<_ACEOF
9321 #line 9321 "configure"
9322 #include "confdefs.h"
9323 #include <$ac_header>
9324 _ACEOF
9325 if { (eval echo "$as_me:9325: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9326   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9327   ac_status=$?
9328   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9329   rm -f conftest.er1
9330   cat conftest.err >&5
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit "$ac_status"); } >/dev/null; then
9333   if test -s conftest.err; then
9334     ac_cpp_err=$ac_c_preproc_warn_flag
9335   else
9336     ac_cpp_err=
9337   fi
9338 else
9339   ac_cpp_err=yes
9340 fi
9341 if test -z "$ac_cpp_err"; then
9342   eval "$as_ac_Header=yes"
9343 else
9344   echo "$as_me: failed program was:" >&5
9345   cat "conftest.$ac_ext" >&5
9346   eval "$as_ac_Header=no"
9347 fi
9348 rm -f conftest.err "conftest.$ac_ext"
9349 fi
9350 echo "$as_me:9350: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9351 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9352 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9353   cat >>confdefs.h <<EOF
9354 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9355 EOF
9356
9357 fi
9358 done
9359
9360 for ac_func in \
9361         remove \
9362         unlink
9363 do
9364 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9365 echo "$as_me:9365: checking for $ac_func" >&5
9366 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9367 if eval "test \"\${$as_ac_var+set}\" = set"; then
9368   echo $ECHO_N "(cached) $ECHO_C" >&6
9369 else
9370   cat >"conftest.$ac_ext" <<_ACEOF
9371 #line 9371 "configure"
9372 #include "confdefs.h"
9373 #define $ac_func autoconf_temporary
9374 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9375 #undef $ac_func
9376
9377 #ifdef __cplusplus
9378 extern "C"
9379 #endif
9380
9381 /* We use char because int might match the return type of a gcc2
9382    builtin and then its argument prototype would still apply.  */
9383 char $ac_func (void);
9384
9385 int
9386 main (void)
9387 {
9388
9389 /* The GNU C library defines stubs for functions which it implements
9390     to always fail with ENOSYS.  Some functions are actually named
9391     something starting with __ and the normal name is an alias.  */
9392 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9393 #error found stub for $ac_func
9394 #endif
9395
9396         return $ac_func ();
9397   ;
9398   return 0;
9399 }
9400 _ACEOF
9401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9402 if { (eval echo "$as_me:9402: \"$ac_link\"") >&5
9403   (eval $ac_link) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit "$ac_status"); } &&
9407          { ac_try='test -s "conftest$ac_exeext"'
9408   { (eval echo "$as_me:9408: \"$ac_try\"") >&5
9409   (eval $ac_try) 2>&5
9410   ac_status=$?
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit "$ac_status"); }; }; then
9413   eval "$as_ac_var=yes"
9414 else
9415   echo "$as_me: failed program was:" >&5
9416 cat "conftest.$ac_ext" >&5
9417 eval "$as_ac_var=no"
9418 fi
9419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9420 fi
9421 echo "$as_me:9421: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9422 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9423 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9424   cat >>confdefs.h <<EOF
9425 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9426 EOF
9427
9428 fi
9429 done
9430
9431 if test "$cross_compiling" = yes ; then
9432
9433 for ac_func in \
9434                 link \
9435                 symlink
9436 do
9437 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9438 echo "$as_me:9438: checking for $ac_func" >&5
9439 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9440 if eval "test \"\${$as_ac_var+set}\" = set"; then
9441   echo $ECHO_N "(cached) $ECHO_C" >&6
9442 else
9443   cat >"conftest.$ac_ext" <<_ACEOF
9444 #line 9444 "configure"
9445 #include "confdefs.h"
9446 #define $ac_func autoconf_temporary
9447 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9448 #undef $ac_func
9449
9450 #ifdef __cplusplus
9451 extern "C"
9452 #endif
9453
9454 /* We use char because int might match the return type of a gcc2
9455    builtin and then its argument prototype would still apply.  */
9456 char $ac_func (void);
9457
9458 int
9459 main (void)
9460 {
9461
9462 /* The GNU C library defines stubs for functions which it implements
9463     to always fail with ENOSYS.  Some functions are actually named
9464     something starting with __ and the normal name is an alias.  */
9465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9466 #error found stub for $ac_func
9467 #endif
9468
9469         return $ac_func ();
9470   ;
9471   return 0;
9472 }
9473 _ACEOF
9474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9475 if { (eval echo "$as_me:9475: \"$ac_link\"") >&5
9476   (eval $ac_link) 2>&5
9477   ac_status=$?
9478   echo "$as_me:9478: \$? = $ac_status" >&5
9479   (exit "$ac_status"); } &&
9480          { ac_try='test -s "conftest$ac_exeext"'
9481   { (eval echo "$as_me:9481: \"$ac_try\"") >&5
9482   (eval $ac_try) 2>&5
9483   ac_status=$?
9484   echo "$as_me:9484: \$? = $ac_status" >&5
9485   (exit "$ac_status"); }; }; then
9486   eval "$as_ac_var=yes"
9487 else
9488   echo "$as_me: failed program was:" >&5
9489 cat "conftest.$ac_ext" >&5
9490 eval "$as_ac_var=no"
9491 fi
9492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9493 fi
9494 echo "$as_me:9494: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9495 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9496 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9497   cat >>confdefs.h <<EOF
9498 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9499 EOF
9500
9501 fi
9502 done
9503
9504 else
9505         echo "$as_me:9505: checking if link/symlink functions work" >&5
9506 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9507 if test "${cf_cv_link_funcs+set}" = set; then
9508   echo $ECHO_N "(cached) $ECHO_C" >&6
9509 else
9510
9511                 cf_cv_link_funcs=
9512                 for cf_func in link symlink ; do
9513                         if test "$cross_compiling" = yes; then
9514
9515                         eval 'ac_cv_func_'$cf_func'=error'
9516 else
9517   cat >"conftest.$ac_ext" <<_ACEOF
9518 #line 9518 "configure"
9519 #include "confdefs.h"
9520
9521 #include <stdio.h>
9522 #include <sys/types.h>
9523 #include <sys/stat.h>
9524 #ifdef HAVE_UNISTD_H
9525 #include <unistd.h>
9526 #endif
9527 int main(void)
9528 {
9529         int fail = 0;
9530         char *src = "conftest.tmp";
9531         char *dst = "conftest.chk";
9532         struct stat src_sb, dst_sb;
9533         FILE *fp = fopen(src, "w");
9534         if (fp == 0) { fail = 3; } else {
9535                 fclose(fp); stat(src, &src_sb);
9536                 if ($cf_func(src, dst) < 0) {
9537                         fail = 1;
9538                 } else if (stat(dst, &dst_sb) < 0) {
9539                         fail = 2;
9540                 } else {
9541                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9542                         if (diff < 0) diff = -diff;
9543                         if (diff > 2) fail = 3;
9544                 }
9545         }
9546 #ifdef HAVE_UNLINK
9547         unlink(dst); unlink(src);
9548 #else
9549         remove(dst); remove(src);
9550 #endif
9551         ${cf_cv_main_return:-return} (fail);
9552 }
9553
9554 _ACEOF
9555 rm -f "conftest$ac_exeext"
9556 if { (eval echo "$as_me:9556: \"$ac_link\"") >&5
9557   (eval $ac_link) 2>&5
9558   ac_status=$?
9559   echo "$as_me:9559: \$? = $ac_status" >&5
9560   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9561   { (eval echo "$as_me:9561: \"$ac_try\"") >&5
9562   (eval $ac_try) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit "$ac_status"); }; }; then
9566
9567                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9568                         eval 'ac_cv_func_'$cf_func'=yes'
9569 else
9570   echo "$as_me: program exited with status $ac_status" >&5
9571 echo "$as_me: failed program was:" >&5
9572 cat "conftest.$ac_ext" >&5
9573
9574                         eval 'ac_cv_func_'$cf_func'=no'
9575 fi
9576 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9577 fi
9578                 done
9579                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9580
9581 fi
9582 echo "$as_me:9582: result: $cf_cv_link_funcs" >&5
9583 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9584         test "$ac_cv_func_link"    = yes &&
9585 cat >>confdefs.h <<\EOF
9586 #define HAVE_LINK 1
9587 EOF
9588
9589         test "$ac_cv_func_symlink" = yes &&
9590 cat >>confdefs.h <<\EOF
9591 #define HAVE_SYMLINK 1
9592 EOF
9593
9594 fi
9595
9596 with_links=no
9597 with_symlinks=no
9598
9599 # soft links (symbolic links) are useful for some systems where hard links do
9600 # not work, or to make it simpler to copy terminfo trees around.
9601 if test "x$ac_cv_func_symlink" = xyes ; then
9602         echo "$as_me:9602: checking if tic should use symbolic links" >&5
9603 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9604
9605 # Check whether --enable-symlinks or --disable-symlinks was given.
9606 if test "${enable_symlinks+set}" = set; then
9607   enableval="$enable_symlinks"
9608   with_symlinks=$enableval
9609 else
9610   with_symlinks=no
9611 fi;
9612         echo "$as_me:9612: result: $with_symlinks" >&5
9613 echo "${ECHO_T}$with_symlinks" >&6
9614 fi
9615
9616 # If we have hard links and did not choose to use soft links instead, there is
9617 # no reason to make this choice optional - use the hard links.
9618 if test "$with_symlinks" = no ; then
9619         echo "$as_me:9619: checking if tic should use hard links" >&5
9620 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9621         if test "x$ac_cv_func_link" = xyes ; then
9622                 with_links=yes
9623         else
9624                 with_links=no
9625         fi
9626         echo "$as_me:9626: result: $with_links" >&5
9627 echo "${ECHO_T}$with_links" >&6
9628 fi
9629
9630 test "x$with_links" = xyes &&
9631 cat >>confdefs.h <<\EOF
9632 #define USE_LINKS 1
9633 EOF
9634
9635 test "x$with_symlinks" = xyes &&
9636 cat >>confdefs.h <<\EOF
9637 #define USE_SYMLINKS 1
9638 EOF
9639
9640 ###   use option --enable-broken-linker to force on use of broken-linker support
9641
9642 echo "$as_me:9642: checking if you want broken-linker support code" >&5
9643 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9644
9645 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9646 if test "${enable_broken_linker+set}" = set; then
9647   enableval="$enable_broken_linker"
9648   with_broken_linker=$enableval
9649 else
9650   with_broken_linker=no
9651 fi;
9652 echo "$as_me:9652: result: $with_broken_linker" >&5
9653 echo "${ECHO_T}$with_broken_linker" >&6
9654
9655 : "${BROKEN_LINKER:=0}"
9656 if test "x$with_broken_linker" = xyes ; then
9657
9658 cat >>confdefs.h <<\EOF
9659 #define BROKEN_LINKER 1
9660 EOF
9661
9662         BROKEN_LINKER=1
9663 fi
9664
9665 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9666 echo "$as_me:9666: checking if tputs should process BSD-style prefix padding" >&5
9667 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9668
9669 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9670 if test "${enable_bsdpad+set}" = set; then
9671   enableval="$enable_bsdpad"
9672   with_bsdpad=$enableval
9673 else
9674   with_bsdpad=no
9675 fi;
9676 echo "$as_me:9676: result: $with_bsdpad" >&5
9677 echo "${ECHO_T}$with_bsdpad" >&6
9678 test "x$with_bsdpad" = xyes &&
9679 cat >>confdefs.h <<\EOF
9680 #define BSD_TPUTS 1
9681 EOF
9682
9683 ###   use option --enable-widec to turn on use of wide-character support
9684 NCURSES_CH_T=chtype
9685 NCURSES_LIBUTF8=0
9686
9687 NEED_WCHAR_H=0
9688 NCURSES_MBSTATE_T=0
9689 NCURSES_WCHAR_T=0
9690 NCURSES_WINT_T=0
9691
9692 # Check to define _XOPEN_SOURCE "automatically"
9693 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9694
9695 echo "$as_me:9695: checking if the POSIX test-macros are already defined" >&5
9696 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9697 if test "${cf_cv_posix_visible+set}" = set; then
9698   echo $ECHO_N "(cached) $ECHO_C" >&6
9699 else
9700
9701 cat >"conftest.$ac_ext" <<_ACEOF
9702 #line 9702 "configure"
9703 #include "confdefs.h"
9704 #include <stdio.h>
9705 int
9706 main (void)
9707 {
9708
9709 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9710         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9711         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9712         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9713 #error conflicting symbols found
9714 #endif
9715
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f "conftest.$ac_objext"
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit "$ac_status"); } &&
9726          { ac_try='test -s "conftest.$ac_objext"'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit "$ac_status"); }; }; then
9732   cf_cv_posix_visible=no
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat "conftest.$ac_ext" >&5
9736 cf_cv_posix_visible=yes
9737 fi
9738 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9739
9740 fi
9741 echo "$as_me:9741: result: $cf_cv_posix_visible" >&5
9742 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9743
9744 if test "$cf_cv_posix_visible" = no; then
9745
9746 cf_XOPEN_SOURCE=600
9747 cf_POSIX_C_SOURCE=199506L
9748 cf_xopen_source=
9749
9750 case "$host_os" in
9751 (aix[4-7]*)
9752         cf_xopen_source="-D_ALL_SOURCE"
9753         ;;
9754 (msys)
9755         cf_XOPEN_SOURCE=600
9756         ;;
9757 (darwin[0-8].*)
9758         cf_xopen_source="-D_APPLE_C_SOURCE"
9759         ;;
9760 (darwin*)
9761         cf_xopen_source="-D_DARWIN_C_SOURCE"
9762         cf_XOPEN_SOURCE=
9763         ;;
9764 (freebsd*|dragonfly*|midnightbsd*)
9765         # 5.x headers associate
9766         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9767         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9768         cf_POSIX_C_SOURCE=200112L
9769         cf_XOPEN_SOURCE=600
9770         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9771         ;;
9772 (hpux11*)
9773         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9774         ;;
9775 (hpux*)
9776         cf_xopen_source="-D_HPUX_SOURCE"
9777         ;;
9778 (irix[56].*)
9779         cf_xopen_source="-D_SGI_SOURCE"
9780         cf_XOPEN_SOURCE=
9781         ;;
9782 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9783
9784 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9785
9786 echo "$as_me:9786: checking if this is the GNU C library" >&5
9787 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9788 if test "${cf_cv_gnu_library+set}" = set; then
9789   echo $ECHO_N "(cached) $ECHO_C" >&6
9790 else
9791
9792 cat >"conftest.$ac_ext" <<_ACEOF
9793 #line 9793 "configure"
9794 #include "confdefs.h"
9795 #include <sys/types.h>
9796 int
9797 main (void)
9798 {
9799
9800         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9801                 return 0;
9802         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9803                 return 0;
9804         #else
9805         #       error not GNU C library
9806         #endif
9807   ;
9808   return 0;
9809 }
9810 _ACEOF
9811 rm -f "conftest.$ac_objext"
9812 if { (eval echo "$as_me:9812: \"$ac_compile\"") >&5
9813   (eval $ac_compile) 2>&5
9814   ac_status=$?
9815   echo "$as_me:9815: \$? = $ac_status" >&5
9816   (exit "$ac_status"); } &&
9817          { ac_try='test -s "conftest.$ac_objext"'
9818   { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819   (eval $ac_try) 2>&5
9820   ac_status=$?
9821   echo "$as_me:9821: \$? = $ac_status" >&5
9822   (exit "$ac_status"); }; }; then
9823   cf_cv_gnu_library=yes
9824 else
9825   echo "$as_me: failed program was:" >&5
9826 cat "conftest.$ac_ext" >&5
9827 cf_cv_gnu_library=no
9828 fi
9829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9830
9831 fi
9832 echo "$as_me:9832: result: $cf_cv_gnu_library" >&5
9833 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9834
9835 if test x$cf_cv_gnu_library = xyes; then
9836
9837         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9838         # was changed to help a little.  newlib incorporated the change about 4
9839         # years later.
9840         echo "$as_me:9840: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9841 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9842 if test "${cf_cv_gnu_library_219+set}" = set; then
9843   echo $ECHO_N "(cached) $ECHO_C" >&6
9844 else
9845
9846                 cf_save="$CPPFLAGS"
9847
9848         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9849         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9850
9851                 cat >"conftest.$ac_ext" <<_ACEOF
9852 #line 9852 "configure"
9853 #include "confdefs.h"
9854 #include <sys/types.h>
9855 int
9856 main (void)
9857 {
9858
9859                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9860                                 return 0;
9861                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9862                                 return 0;
9863                         #else
9864                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9865                         #endif
9866   ;
9867   return 0;
9868 }
9869 _ACEOF
9870 rm -f "conftest.$ac_objext"
9871 if { (eval echo "$as_me:9871: \"$ac_compile\"") >&5
9872   (eval $ac_compile) 2>&5
9873   ac_status=$?
9874   echo "$as_me:9874: \$? = $ac_status" >&5
9875   (exit "$ac_status"); } &&
9876          { ac_try='test -s "conftest.$ac_objext"'
9877   { (eval echo "$as_me:9877: \"$ac_try\"") >&5
9878   (eval $ac_try) 2>&5
9879   ac_status=$?
9880   echo "$as_me:9880: \$? = $ac_status" >&5
9881   (exit "$ac_status"); }; }; then
9882   cf_cv_gnu_library_219=yes
9883 else
9884   echo "$as_me: failed program was:" >&5
9885 cat "conftest.$ac_ext" >&5
9886 cf_cv_gnu_library_219=no
9887 fi
9888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9889                 CPPFLAGS="$cf_save"
9890
9891 fi
9892 echo "$as_me:9892: result: $cf_cv_gnu_library_219" >&5
9893 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9894
9895         if test "x$cf_cv_gnu_library_219" = xyes; then
9896                 cf_save="$CPPFLAGS"
9897                 echo "$as_me:9897: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9898 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9899 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9900   echo $ECHO_N "(cached) $ECHO_C" >&6
9901 else
9902
9903 cf_fix_cppflags=no
9904 cf_new_cflags=
9905 cf_new_cppflags=
9906 cf_new_extra_cppflags=
9907
9908 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9909 do
9910 case "$cf_fix_cppflags" in
9911 (no)
9912         case "$cf_add_cflags" in
9913         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9914                 case "$cf_add_cflags" in
9915                 (-D*)
9916                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9917
9918                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9919                                 && test -z "${cf_tst_cflags}" \
9920                                 && cf_fix_cppflags=yes
9921
9922                         if test "$cf_fix_cppflags" = yes ; then
9923
9924         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9925         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9926
9927                                 continue
9928                         elif test "${cf_tst_cflags}" = "\"'" ; then
9929
9930         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9931         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9932
9933                                 continue
9934                         fi
9935                         ;;
9936                 esac
9937                 case "$CPPFLAGS" in
9938                 (*$cf_add_cflags)
9939                         ;;
9940                 (*)
9941                         case "$cf_add_cflags" in
9942                         (-D*)
9943                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9944
9945 CPPFLAGS=`echo "$CPPFLAGS" | \
9946         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9947                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9948
9949                                 ;;
9950                         esac
9951
9952         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9953         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9954
9955                         ;;
9956                 esac
9957                 ;;
9958         (*)
9959
9960         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9961         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9962
9963                 ;;
9964         esac
9965         ;;
9966 (yes)
9967
9968         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9969         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9970
9971         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9972
9973         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9974                 && test -z "${cf_tst_cflags}" \
9975                 && cf_fix_cppflags=no
9976         ;;
9977 esac
9978 done
9979
9980 if test -n "$cf_new_cflags" ; then
9981
9982         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9983         CFLAGS="${CFLAGS}$cf_new_cflags"
9984
9985 fi
9986
9987 if test -n "$cf_new_cppflags" ; then
9988
9989         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9990         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9991
9992 fi
9993
9994 if test -n "$cf_new_extra_cppflags" ; then
9995
9996         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9997         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9998
9999 fi
10000
10001                         cat >"conftest.$ac_ext" <<_ACEOF
10002 #line 10002 "configure"
10003 #include "confdefs.h"
10004
10005                                 #include <limits.h>
10006                                 #include <sys/types.h>
10007
10008 int
10009 main (void)
10010 {
10011
10012                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10013                                         return 0;
10014                                 #else
10015                                 #       error GNU C library is too old
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_dftsrc_219=yes
10034 else
10035   echo "$as_me: failed program was:" >&5
10036 cat "conftest.$ac_ext" >&5
10037 cf_cv_gnu_dftsrc_219=no
10038 fi
10039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10040
10041 fi
10042 echo "$as_me:10042: result: $cf_cv_gnu_dftsrc_219" >&5
10043 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10044                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10045         else
10046                 cf_cv_gnu_dftsrc_219=maybe
10047         fi
10048
10049         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10050
10051                 echo "$as_me:10051: checking if we must define _GNU_SOURCE" >&5
10052 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10053 if test "${cf_cv_gnu_source+set}" = set; then
10054   echo $ECHO_N "(cached) $ECHO_C" >&6
10055 else
10056
10057                 cat >"conftest.$ac_ext" <<_ACEOF
10058 #line 10058 "configure"
10059 #include "confdefs.h"
10060 #include <sys/types.h>
10061 int
10062 main (void)
10063 {
10064
10065                         #ifndef _XOPEN_SOURCE
10066                         #error  expected _XOPEN_SOURCE to be defined
10067                         #endif
10068   ;
10069   return 0;
10070 }
10071 _ACEOF
10072 rm -f "conftest.$ac_objext"
10073 if { (eval echo "$as_me:10073: \"$ac_compile\"") >&5
10074   (eval $ac_compile) 2>&5
10075   ac_status=$?
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit "$ac_status"); } &&
10078          { ac_try='test -s "conftest.$ac_objext"'
10079   { (eval echo "$as_me:10079: \"$ac_try\"") >&5
10080   (eval $ac_try) 2>&5
10081   ac_status=$?
10082   echo "$as_me:10082: \$? = $ac_status" >&5
10083   (exit "$ac_status"); }; }; then
10084   cf_cv_gnu_source=no
10085 else
10086   echo "$as_me: failed program was:" >&5
10087 cat "conftest.$ac_ext" >&5
10088 cf_save="$CPPFLAGS"
10089
10090 cf_fix_cppflags=no
10091 cf_new_cflags=
10092 cf_new_cppflags=
10093 cf_new_extra_cppflags=
10094
10095 for cf_add_cflags in -D_GNU_SOURCE
10096 do
10097 case "$cf_fix_cppflags" in
10098 (no)
10099         case "$cf_add_cflags" in
10100         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10101                 case "$cf_add_cflags" in
10102                 (-D*)
10103                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10104
10105                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10106                                 && test -z "${cf_tst_cflags}" \
10107                                 && cf_fix_cppflags=yes
10108
10109                         if test "$cf_fix_cppflags" = yes ; then
10110
10111         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10112         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10113
10114                                 continue
10115                         elif test "${cf_tst_cflags}" = "\"'" ; then
10116
10117         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10118         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10119
10120                                 continue
10121                         fi
10122                         ;;
10123                 esac
10124                 case "$CPPFLAGS" in
10125                 (*$cf_add_cflags)
10126                         ;;
10127                 (*)
10128                         case "$cf_add_cflags" in
10129                         (-D*)
10130                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10131
10132 CPPFLAGS=`echo "$CPPFLAGS" | \
10133         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10134                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10135
10136                                 ;;
10137                         esac
10138
10139         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10140         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10141
10142                         ;;
10143                 esac
10144                 ;;
10145         (*)
10146
10147         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10148         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10149
10150                 ;;
10151         esac
10152         ;;
10153 (yes)
10154
10155         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10156         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10157
10158         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10159
10160         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10161                 && test -z "${cf_tst_cflags}" \
10162                 && cf_fix_cppflags=no
10163         ;;
10164 esac
10165 done
10166
10167 if test -n "$cf_new_cflags" ; then
10168
10169         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10170         CFLAGS="${CFLAGS}$cf_new_cflags"
10171
10172 fi
10173
10174 if test -n "$cf_new_cppflags" ; then
10175
10176         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10177         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10178
10179 fi
10180
10181 if test -n "$cf_new_extra_cppflags" ; then
10182
10183         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10184         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10185
10186 fi
10187
10188                          cat >"conftest.$ac_ext" <<_ACEOF
10189 #line 10189 "configure"
10190 #include "confdefs.h"
10191 #include <sys/types.h>
10192 int
10193 main (void)
10194 {
10195
10196                                 #ifdef _XOPEN_SOURCE
10197                                 #error  expected _XOPEN_SOURCE to be undefined
10198                                 #endif
10199   ;
10200   return 0;
10201 }
10202 _ACEOF
10203 rm -f "conftest.$ac_objext"
10204 if { (eval echo "$as_me:10204: \"$ac_compile\"") >&5
10205   (eval $ac_compile) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit "$ac_status"); } &&
10209          { ac_try='test -s "conftest.$ac_objext"'
10210   { (eval echo "$as_me:10210: \"$ac_try\"") >&5
10211   (eval $ac_try) 2>&5
10212   ac_status=$?
10213   echo "$as_me:10213: \$? = $ac_status" >&5
10214   (exit "$ac_status"); }; }; then
10215   cf_cv_gnu_source=no
10216 else
10217   echo "$as_me: failed program was:" >&5
10218 cat "conftest.$ac_ext" >&5
10219 cf_cv_gnu_source=yes
10220 fi
10221 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10222                         CPPFLAGS="$cf_save"
10223
10224 fi
10225 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10226
10227 fi
10228 echo "$as_me:10228: result: $cf_cv_gnu_source" >&5
10229 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10230
10231                 if test "$cf_cv_gnu_source" = yes
10232                 then
10233                 echo "$as_me:10233: checking if we should also define _DEFAULT_SOURCE" >&5
10234 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10235 if test "${cf_cv_default_source+set}" = set; then
10236   echo $ECHO_N "(cached) $ECHO_C" >&6
10237 else
10238
10239         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10240         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10241
10242                         cat >"conftest.$ac_ext" <<_ACEOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245 #include <sys/types.h>
10246 int
10247 main (void)
10248 {
10249
10250                                 #ifdef _DEFAULT_SOURCE
10251                                 #error  expected _DEFAULT_SOURCE to be undefined
10252                                 #endif
10253   ;
10254   return 0;
10255 }
10256 _ACEOF
10257 rm -f "conftest.$ac_objext"
10258 if { (eval echo "$as_me:10258: \"$ac_compile\"") >&5
10259   (eval $ac_compile) 2>&5
10260   ac_status=$?
10261   echo "$as_me:10261: \$? = $ac_status" >&5
10262   (exit "$ac_status"); } &&
10263          { ac_try='test -s "conftest.$ac_objext"'
10264   { (eval echo "$as_me:10264: \"$ac_try\"") >&5
10265   (eval $ac_try) 2>&5
10266   ac_status=$?
10267   echo "$as_me:10267: \$? = $ac_status" >&5
10268   (exit "$ac_status"); }; }; then
10269   cf_cv_default_source=no
10270 else
10271   echo "$as_me: failed program was:" >&5
10272 cat "conftest.$ac_ext" >&5
10273 cf_cv_default_source=yes
10274 fi
10275 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10276
10277 fi
10278 echo "$as_me:10278: result: $cf_cv_default_source" >&5
10279 echo "${ECHO_T}$cf_cv_default_source" >&6
10280                         if test "$cf_cv_default_source" = yes
10281                         then
10282
10283         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10284         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10285
10286                         fi
10287                 fi
10288         fi
10289
10290 fi
10291
10292         ;;
10293 (minix*)
10294         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10295         ;;
10296 (mirbsd*)
10297         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10298         cf_XOPEN_SOURCE=
10299
10300 if test "$cf_cv_posix_visible" = no; then
10301
10302 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10303
10304 cf_save_CFLAGS="$CFLAGS"
10305 cf_save_CPPFLAGS="$CPPFLAGS"
10306
10307 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10308         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10309                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10310
10311 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10312         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10313                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10314
10315 echo "$as_me:10315: checking if we should define _POSIX_C_SOURCE" >&5
10316 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10317 if test "${cf_cv_posix_c_source+set}" = set; then
10318   echo $ECHO_N "(cached) $ECHO_C" >&6
10319 else
10320
10321 echo "${as_me:-configure}:10321: testing if the symbol is already defined go no further ..." 1>&5
10322
10323         cat >"conftest.$ac_ext" <<_ACEOF
10324 #line 10324 "configure"
10325 #include "confdefs.h"
10326 #include <sys/types.h>
10327 int
10328 main (void)
10329 {
10330
10331 #ifndef _POSIX_C_SOURCE
10332 make an error
10333 #endif
10334   ;
10335   return 0;
10336 }
10337 _ACEOF
10338 rm -f "conftest.$ac_objext"
10339 if { (eval echo "$as_me:10339: \"$ac_compile\"") >&5
10340   (eval $ac_compile) 2>&5
10341   ac_status=$?
10342   echo "$as_me:10342: \$? = $ac_status" >&5
10343   (exit "$ac_status"); } &&
10344          { ac_try='test -s "conftest.$ac_objext"'
10345   { (eval echo "$as_me:10345: \"$ac_try\"") >&5
10346   (eval $ac_try) 2>&5
10347   ac_status=$?
10348   echo "$as_me:10348: \$? = $ac_status" >&5
10349   (exit "$ac_status"); }; }; then
10350   cf_cv_posix_c_source=no
10351 else
10352   echo "$as_me: failed program was:" >&5
10353 cat "conftest.$ac_ext" >&5
10354 cf_want_posix_source=no
10355          case .$cf_POSIX_C_SOURCE in
10356          (.[12]??*)
10357                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10358                 ;;
10359          (.2)
10360                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10361                 cf_want_posix_source=yes
10362                 ;;
10363          (.*)
10364                 cf_want_posix_source=yes
10365                 ;;
10366          esac
10367          if test "$cf_want_posix_source" = yes ; then
10368                 cat >"conftest.$ac_ext" <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10371 #include <sys/types.h>
10372 int
10373 main (void)
10374 {
10375
10376 #ifdef _POSIX_SOURCE
10377 make an error
10378 #endif
10379   ;
10380   return 0;
10381 }
10382 _ACEOF
10383 rm -f "conftest.$ac_objext"
10384 if { (eval echo "$as_me:10384: \"$ac_compile\"") >&5
10385   (eval $ac_compile) 2>&5
10386   ac_status=$?
10387   echo "$as_me:10387: \$? = $ac_status" >&5
10388   (exit "$ac_status"); } &&
10389          { ac_try='test -s "conftest.$ac_objext"'
10390   { (eval echo "$as_me:10390: \"$ac_try\"") >&5
10391   (eval $ac_try) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit "$ac_status"); }; }; then
10395   :
10396 else
10397   echo "$as_me: failed program was:" >&5
10398 cat "conftest.$ac_ext" >&5
10399 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10400 fi
10401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10402          fi
10403
10404 echo "${as_me:-configure}:10404: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10405
10406          CFLAGS="$cf_trim_CFLAGS"
10407          CPPFLAGS="$cf_trim_CPPFLAGS"
10408
10409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10410         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10411
10412 echo "${as_me:-configure}:10412: testing if the second compile does not leave our definition intact error ..." 1>&5
10413
10414          cat >"conftest.$ac_ext" <<_ACEOF
10415 #line 10415 "configure"
10416 #include "confdefs.h"
10417 #include <sys/types.h>
10418 int
10419 main (void)
10420 {
10421
10422 #ifndef _POSIX_C_SOURCE
10423 make an error
10424 #endif
10425   ;
10426   return 0;
10427 }
10428 _ACEOF
10429 rm -f "conftest.$ac_objext"
10430 if { (eval echo "$as_me:10430: \"$ac_compile\"") >&5
10431   (eval $ac_compile) 2>&5
10432   ac_status=$?
10433   echo "$as_me:10433: \$? = $ac_status" >&5
10434   (exit "$ac_status"); } &&
10435          { ac_try='test -s "conftest.$ac_objext"'
10436   { (eval echo "$as_me:10436: \"$ac_try\"") >&5
10437   (eval $ac_try) 2>&5
10438   ac_status=$?
10439   echo "$as_me:10439: \$? = $ac_status" >&5
10440   (exit "$ac_status"); }; }; then
10441   :
10442 else
10443   echo "$as_me: failed program was:" >&5
10444 cat "conftest.$ac_ext" >&5
10445 cf_cv_posix_c_source=no
10446 fi
10447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10448          CFLAGS="$cf_save_CFLAGS"
10449          CPPFLAGS="$cf_save_CPPFLAGS"
10450
10451 fi
10452 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10453
10454 fi
10455 echo "$as_me:10455: result: $cf_cv_posix_c_source" >&5
10456 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10457
10458 if test "$cf_cv_posix_c_source" != no ; then
10459         CFLAGS="$cf_trim_CFLAGS"
10460         CPPFLAGS="$cf_trim_CPPFLAGS"
10461
10462 cf_fix_cppflags=no
10463 cf_new_cflags=
10464 cf_new_cppflags=
10465 cf_new_extra_cppflags=
10466
10467 for cf_add_cflags in $cf_cv_posix_c_source
10468 do
10469 case "$cf_fix_cppflags" in
10470 (no)
10471         case "$cf_add_cflags" in
10472         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10473                 case "$cf_add_cflags" in
10474                 (-D*)
10475                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10476
10477                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10478                                 && test -z "${cf_tst_cflags}" \
10479                                 && cf_fix_cppflags=yes
10480
10481                         if test "$cf_fix_cppflags" = yes ; then
10482
10483         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10484         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10485
10486                                 continue
10487                         elif test "${cf_tst_cflags}" = "\"'" ; then
10488
10489         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10490         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10491
10492                                 continue
10493                         fi
10494                         ;;
10495                 esac
10496                 case "$CPPFLAGS" in
10497                 (*$cf_add_cflags)
10498                         ;;
10499                 (*)
10500                         case "$cf_add_cflags" in
10501                         (-D*)
10502                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10503
10504 CPPFLAGS=`echo "$CPPFLAGS" | \
10505         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10506                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10507
10508                                 ;;
10509                         esac
10510
10511         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10512         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10513
10514                         ;;
10515                 esac
10516                 ;;
10517         (*)
10518
10519         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10520         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10521
10522                 ;;
10523         esac
10524         ;;
10525 (yes)
10526
10527         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10528         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10529
10530         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10531
10532         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10533                 && test -z "${cf_tst_cflags}" \
10534                 && cf_fix_cppflags=no
10535         ;;
10536 esac
10537 done
10538
10539 if test -n "$cf_new_cflags" ; then
10540
10541         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10542         CFLAGS="${CFLAGS}$cf_new_cflags"
10543
10544 fi
10545
10546 if test -n "$cf_new_cppflags" ; then
10547
10548         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10549         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10550
10551 fi
10552
10553 if test -n "$cf_new_extra_cppflags" ; then
10554
10555         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10556         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10557
10558 fi
10559
10560 fi
10561
10562 fi # cf_cv_posix_visible
10563
10564         ;;
10565 (netbsd*)
10566         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10567         ;;
10568 (openbsd[6-9]*)
10569         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10570         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10571         # Abusing the conformance level is a workaround.
10572         { echo "$as_me:10572: WARNING: this system does not provide usable locale support" >&5
10573 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10574         cf_xopen_source="-D_BSD_SOURCE"
10575         cf_XOPEN_SOURCE=700
10576         ;;
10577 (openbsd[4-5]*)
10578         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10579         cf_xopen_source="-D_BSD_SOURCE"
10580         cf_XOPEN_SOURCE=600
10581         ;;
10582 (openbsd*)
10583         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10584         ;;
10585 (osf[45]*)
10586         cf_xopen_source="-D_OSF_SOURCE"
10587         ;;
10588 (nto-qnx*)
10589         cf_xopen_source="-D_QNX_SOURCE"
10590         ;;
10591 (sco*)
10592         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10593         ;;
10594 (solaris2.*)
10595         cf_xopen_source="-D__EXTENSIONS__"
10596         cf_cv_xopen_source=broken
10597         ;;
10598 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10599         cf_XOPEN_SOURCE=
10600         cf_POSIX_C_SOURCE=
10601         ;;
10602 (*)
10603
10604 echo "$as_me:10604: checking if we should define _XOPEN_SOURCE" >&5
10605 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10606 if test "${cf_cv_xopen_source+set}" = set; then
10607   echo $ECHO_N "(cached) $ECHO_C" >&6
10608 else
10609
10610         cat >"conftest.$ac_ext" <<_ACEOF
10611 #line 10611 "configure"
10612 #include "confdefs.h"
10613
10614 #include <stdlib.h>
10615 #include <string.h>
10616 #include <sys/types.h>
10617
10618 int
10619 main (void)
10620 {
10621
10622 #ifndef _XOPEN_SOURCE
10623 make an error
10624 #endif
10625   ;
10626   return 0;
10627 }
10628 _ACEOF
10629 rm -f "conftest.$ac_objext"
10630 if { (eval echo "$as_me:10630: \"$ac_compile\"") >&5
10631   (eval $ac_compile) 2>&5
10632   ac_status=$?
10633   echo "$as_me:10633: \$? = $ac_status" >&5
10634   (exit "$ac_status"); } &&
10635          { ac_try='test -s "conftest.$ac_objext"'
10636   { (eval echo "$as_me:10636: \"$ac_try\"") >&5
10637   (eval $ac_try) 2>&5
10638   ac_status=$?
10639   echo "$as_me:10639: \$? = $ac_status" >&5
10640   (exit "$ac_status"); }; }; then
10641   cf_cv_xopen_source=no
10642 else
10643   echo "$as_me: failed program was:" >&5
10644 cat "conftest.$ac_ext" >&5
10645 cf_save="$CPPFLAGS"
10646
10647         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10648         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10649
10650          cat >"conftest.$ac_ext" <<_ACEOF
10651 #line 10651 "configure"
10652 #include "confdefs.h"
10653
10654 #include <stdlib.h>
10655 #include <string.h>
10656 #include <sys/types.h>
10657
10658 int
10659 main (void)
10660 {
10661
10662 #ifdef _XOPEN_SOURCE
10663 make an error
10664 #endif
10665   ;
10666   return 0;
10667 }
10668 _ACEOF
10669 rm -f "conftest.$ac_objext"
10670 if { (eval echo "$as_me:10670: \"$ac_compile\"") >&5
10671   (eval $ac_compile) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit "$ac_status"); } &&
10675          { ac_try='test -s "conftest.$ac_objext"'
10676   { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677   (eval $ac_try) 2>&5
10678   ac_status=$?
10679   echo "$as_me:10679: \$? = $ac_status" >&5
10680   (exit "$ac_status"); }; }; then
10681   cf_cv_xopen_source=no
10682 else
10683   echo "$as_me: failed program was:" >&5
10684 cat "conftest.$ac_ext" >&5
10685 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10686 fi
10687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10688         CPPFLAGS="$cf_save"
10689
10690 fi
10691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10692
10693 fi
10694 echo "$as_me:10694: result: $cf_cv_xopen_source" >&5
10695 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10696
10697 if test "$cf_cv_xopen_source" != no ; then
10698
10699 CFLAGS=`echo "$CFLAGS" | \
10700         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10701                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10702
10703 CPPFLAGS=`echo "$CPPFLAGS" | \
10704         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10705                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10706
10707         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10708
10709 cf_fix_cppflags=no
10710 cf_new_cflags=
10711 cf_new_cppflags=
10712 cf_new_extra_cppflags=
10713
10714 for cf_add_cflags in $cf_temp_xopen_source
10715 do
10716 case "$cf_fix_cppflags" in
10717 (no)
10718         case "$cf_add_cflags" in
10719         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10720                 case "$cf_add_cflags" in
10721                 (-D*)
10722                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10723
10724                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10725                                 && test -z "${cf_tst_cflags}" \
10726                                 && cf_fix_cppflags=yes
10727
10728                         if test "$cf_fix_cppflags" = yes ; then
10729
10730         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10731         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10732
10733                                 continue
10734                         elif test "${cf_tst_cflags}" = "\"'" ; then
10735
10736         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10737         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10738
10739                                 continue
10740                         fi
10741                         ;;
10742                 esac
10743                 case "$CPPFLAGS" in
10744                 (*$cf_add_cflags)
10745                         ;;
10746                 (*)
10747                         case "$cf_add_cflags" in
10748                         (-D*)
10749                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10750
10751 CPPFLAGS=`echo "$CPPFLAGS" | \
10752         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10753                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10754
10755                                 ;;
10756                         esac
10757
10758         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10759         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10760
10761                         ;;
10762                 esac
10763                 ;;
10764         (*)
10765
10766         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10767         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10768
10769                 ;;
10770         esac
10771         ;;
10772 (yes)
10773
10774         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10775         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10776
10777         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10778
10779         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10780                 && test -z "${cf_tst_cflags}" \
10781                 && cf_fix_cppflags=no
10782         ;;
10783 esac
10784 done
10785
10786 if test -n "$cf_new_cflags" ; then
10787
10788         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10789         CFLAGS="${CFLAGS}$cf_new_cflags"
10790
10791 fi
10792
10793 if test -n "$cf_new_cppflags" ; then
10794
10795         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10796         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10797
10798 fi
10799
10800 if test -n "$cf_new_extra_cppflags" ; then
10801
10802         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10803         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10804
10805 fi
10806
10807 fi
10808
10809 if test "$cf_cv_posix_visible" = no; then
10810
10811 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10812
10813 cf_save_CFLAGS="$CFLAGS"
10814 cf_save_CPPFLAGS="$CPPFLAGS"
10815
10816 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10817         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10818                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10819
10820 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10821         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10822                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10823
10824 echo "$as_me:10824: checking if we should define _POSIX_C_SOURCE" >&5
10825 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10826 if test "${cf_cv_posix_c_source+set}" = set; then
10827   echo $ECHO_N "(cached) $ECHO_C" >&6
10828 else
10829
10830 echo "${as_me:-configure}:10830: testing if the symbol is already defined go no further ..." 1>&5
10831
10832         cat >"conftest.$ac_ext" <<_ACEOF
10833 #line 10833 "configure"
10834 #include "confdefs.h"
10835 #include <sys/types.h>
10836 int
10837 main (void)
10838 {
10839
10840 #ifndef _POSIX_C_SOURCE
10841 make an error
10842 #endif
10843   ;
10844   return 0;
10845 }
10846 _ACEOF
10847 rm -f "conftest.$ac_objext"
10848 if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
10849   (eval $ac_compile) 2>&5
10850   ac_status=$?
10851   echo "$as_me:10851: \$? = $ac_status" >&5
10852   (exit "$ac_status"); } &&
10853          { ac_try='test -s "conftest.$ac_objext"'
10854   { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855   (eval $ac_try) 2>&5
10856   ac_status=$?
10857   echo "$as_me:10857: \$? = $ac_status" >&5
10858   (exit "$ac_status"); }; }; then
10859   cf_cv_posix_c_source=no
10860 else
10861   echo "$as_me: failed program was:" >&5
10862 cat "conftest.$ac_ext" >&5
10863 cf_want_posix_source=no
10864          case .$cf_POSIX_C_SOURCE in
10865          (.[12]??*)
10866                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10867                 ;;
10868          (.2)
10869                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10870                 cf_want_posix_source=yes
10871                 ;;
10872          (.*)
10873                 cf_want_posix_source=yes
10874                 ;;
10875          esac
10876          if test "$cf_want_posix_source" = yes ; then
10877                 cat >"conftest.$ac_ext" <<_ACEOF
10878 #line 10878 "configure"
10879 #include "confdefs.h"
10880 #include <sys/types.h>
10881 int
10882 main (void)
10883 {
10884
10885 #ifdef _POSIX_SOURCE
10886 make an error
10887 #endif
10888   ;
10889   return 0;
10890 }
10891 _ACEOF
10892 rm -f "conftest.$ac_objext"
10893 if { (eval echo "$as_me:10893: \"$ac_compile\"") >&5
10894   (eval $ac_compile) 2>&5
10895   ac_status=$?
10896   echo "$as_me:10896: \$? = $ac_status" >&5
10897   (exit "$ac_status"); } &&
10898          { ac_try='test -s "conftest.$ac_objext"'
10899   { (eval echo "$as_me:10899: \"$ac_try\"") >&5
10900   (eval $ac_try) 2>&5
10901   ac_status=$?
10902   echo "$as_me:10902: \$? = $ac_status" >&5
10903   (exit "$ac_status"); }; }; then
10904   :
10905 else
10906   echo "$as_me: failed program was:" >&5
10907 cat "conftest.$ac_ext" >&5
10908 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10909 fi
10910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10911          fi
10912
10913 echo "${as_me:-configure}:10913: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10914
10915          CFLAGS="$cf_trim_CFLAGS"
10916          CPPFLAGS="$cf_trim_CPPFLAGS"
10917
10918         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10919         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10920
10921 echo "${as_me:-configure}:10921: testing if the second compile does not leave our definition intact error ..." 1>&5
10922
10923          cat >"conftest.$ac_ext" <<_ACEOF
10924 #line 10924 "configure"
10925 #include "confdefs.h"
10926 #include <sys/types.h>
10927 int
10928 main (void)
10929 {
10930
10931 #ifndef _POSIX_C_SOURCE
10932 make an error
10933 #endif
10934   ;
10935   return 0;
10936 }
10937 _ACEOF
10938 rm -f "conftest.$ac_objext"
10939 if { (eval echo "$as_me:10939: \"$ac_compile\"") >&5
10940   (eval $ac_compile) 2>&5
10941   ac_status=$?
10942   echo "$as_me:10942: \$? = $ac_status" >&5
10943   (exit "$ac_status"); } &&
10944          { ac_try='test -s "conftest.$ac_objext"'
10945   { (eval echo "$as_me:10945: \"$ac_try\"") >&5
10946   (eval $ac_try) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit "$ac_status"); }; }; then
10950   :
10951 else
10952   echo "$as_me: failed program was:" >&5
10953 cat "conftest.$ac_ext" >&5
10954 cf_cv_posix_c_source=no
10955 fi
10956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10957          CFLAGS="$cf_save_CFLAGS"
10958          CPPFLAGS="$cf_save_CPPFLAGS"
10959
10960 fi
10961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10962
10963 fi
10964 echo "$as_me:10964: result: $cf_cv_posix_c_source" >&5
10965 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10966
10967 if test "$cf_cv_posix_c_source" != no ; then
10968         CFLAGS="$cf_trim_CFLAGS"
10969         CPPFLAGS="$cf_trim_CPPFLAGS"
10970
10971 cf_fix_cppflags=no
10972 cf_new_cflags=
10973 cf_new_cppflags=
10974 cf_new_extra_cppflags=
10975
10976 for cf_add_cflags in $cf_cv_posix_c_source
10977 do
10978 case "$cf_fix_cppflags" in
10979 (no)
10980         case "$cf_add_cflags" in
10981         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10982                 case "$cf_add_cflags" in
10983                 (-D*)
10984                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10985
10986                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10987                                 && test -z "${cf_tst_cflags}" \
10988                                 && cf_fix_cppflags=yes
10989
10990                         if test "$cf_fix_cppflags" = yes ; then
10991
10992         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10993         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10994
10995                                 continue
10996                         elif test "${cf_tst_cflags}" = "\"'" ; then
10997
10998         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10999         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11000
11001                                 continue
11002                         fi
11003                         ;;
11004                 esac
11005                 case "$CPPFLAGS" in
11006                 (*$cf_add_cflags)
11007                         ;;
11008                 (*)
11009                         case "$cf_add_cflags" in
11010                         (-D*)
11011                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11012
11013 CPPFLAGS=`echo "$CPPFLAGS" | \
11014         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11015                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11016
11017                                 ;;
11018                         esac
11019
11020         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11021         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11022
11023                         ;;
11024                 esac
11025                 ;;
11026         (*)
11027
11028         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11029         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11030
11031                 ;;
11032         esac
11033         ;;
11034 (yes)
11035
11036         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11037         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11038
11039         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11040
11041         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11042                 && test -z "${cf_tst_cflags}" \
11043                 && cf_fix_cppflags=no
11044         ;;
11045 esac
11046 done
11047
11048 if test -n "$cf_new_cflags" ; then
11049
11050         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11051         CFLAGS="${CFLAGS}$cf_new_cflags"
11052
11053 fi
11054
11055 if test -n "$cf_new_cppflags" ; then
11056
11057         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11058         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11059
11060 fi
11061
11062 if test -n "$cf_new_extra_cppflags" ; then
11063
11064         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11065         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11066
11067 fi
11068
11069 fi
11070
11071 fi # cf_cv_posix_visible
11072
11073         ;;
11074 esac
11075
11076 if test -n "$cf_xopen_source" ; then
11077
11078 cf_fix_cppflags=no
11079 cf_new_cflags=
11080 cf_new_cppflags=
11081 cf_new_extra_cppflags=
11082
11083 for cf_add_cflags in $cf_xopen_source
11084 do
11085 case "$cf_fix_cppflags" in
11086 (no)
11087         case "$cf_add_cflags" in
11088         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11089                 case "$cf_add_cflags" in
11090                 (-D*)
11091                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11092
11093                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11094                                 && test -z "${cf_tst_cflags}" \
11095                                 && cf_fix_cppflags=yes
11096
11097                         if test "$cf_fix_cppflags" = yes ; then
11098
11099         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11100         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11101
11102                                 continue
11103                         elif test "${cf_tst_cflags}" = "\"'" ; then
11104
11105         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11106         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11107
11108                                 continue
11109                         fi
11110                         ;;
11111                 esac
11112                 case "$CPPFLAGS" in
11113                 (*$cf_add_cflags)
11114                         ;;
11115                 (*)
11116                         case "$cf_add_cflags" in
11117                         (-D*)
11118                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11119
11120 CPPFLAGS=`echo "$CPPFLAGS" | \
11121         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11122                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11123
11124                                 ;;
11125                         esac
11126
11127         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11128         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11129
11130                         ;;
11131                 esac
11132                 ;;
11133         (*)
11134
11135         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11136         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11137
11138                 ;;
11139         esac
11140         ;;
11141 (yes)
11142
11143         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11144         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11145
11146         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11147
11148         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11149                 && test -z "${cf_tst_cflags}" \
11150                 && cf_fix_cppflags=no
11151         ;;
11152 esac
11153 done
11154
11155 if test -n "$cf_new_cflags" ; then
11156         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11157
11158 echo "${as_me:-configure}:11158: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11159
11160         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11161         CFLAGS="${CFLAGS}$cf_new_cflags"
11162
11163 fi
11164
11165 if test -n "$cf_new_cppflags" ; then
11166         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11167
11168 echo "${as_me:-configure}:11168: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11169
11170         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11171         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11172
11173 fi
11174
11175 if test -n "$cf_new_extra_cppflags" ; then
11176         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11177
11178 echo "${as_me:-configure}:11178: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11179
11180         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11181         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11182
11183 fi
11184
11185 fi
11186
11187 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11188         echo "$as_me:11188: checking if _XOPEN_SOURCE really is set" >&5
11189 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11190         cat >"conftest.$ac_ext" <<_ACEOF
11191 #line 11191 "configure"
11192 #include "confdefs.h"
11193 #include <stdlib.h>
11194 int
11195 main (void)
11196 {
11197
11198 #ifndef _XOPEN_SOURCE
11199 make an error
11200 #endif
11201   ;
11202   return 0;
11203 }
11204 _ACEOF
11205 rm -f "conftest.$ac_objext"
11206 if { (eval echo "$as_me:11206: \"$ac_compile\"") >&5
11207   (eval $ac_compile) 2>&5
11208   ac_status=$?
11209   echo "$as_me:11209: \$? = $ac_status" >&5
11210   (exit "$ac_status"); } &&
11211          { ac_try='test -s "conftest.$ac_objext"'
11212   { (eval echo "$as_me:11212: \"$ac_try\"") >&5
11213   (eval $ac_try) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit "$ac_status"); }; }; then
11217   cf_XOPEN_SOURCE_set=yes
11218 else
11219   echo "$as_me: failed program was:" >&5
11220 cat "conftest.$ac_ext" >&5
11221 cf_XOPEN_SOURCE_set=no
11222 fi
11223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11224         echo "$as_me:11224: result: $cf_XOPEN_SOURCE_set" >&5
11225 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11226         if test "$cf_XOPEN_SOURCE_set" = yes
11227         then
11228                 cat >"conftest.$ac_ext" <<_ACEOF
11229 #line 11229 "configure"
11230 #include "confdefs.h"
11231 #include <stdlib.h>
11232 int
11233 main (void)
11234 {
11235
11236 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11237 make an error
11238 #endif
11239   ;
11240   return 0;
11241 }
11242 _ACEOF
11243 rm -f "conftest.$ac_objext"
11244 if { (eval echo "$as_me:11244: \"$ac_compile\"") >&5
11245   (eval $ac_compile) 2>&5
11246   ac_status=$?
11247   echo "$as_me:11247: \$? = $ac_status" >&5
11248   (exit "$ac_status"); } &&
11249          { ac_try='test -s "conftest.$ac_objext"'
11250   { (eval echo "$as_me:11250: \"$ac_try\"") >&5
11251   (eval $ac_try) 2>&5
11252   ac_status=$?
11253   echo "$as_me:11253: \$? = $ac_status" >&5
11254   (exit "$ac_status"); }; }; then
11255   cf_XOPEN_SOURCE_set_ok=yes
11256 else
11257   echo "$as_me: failed program was:" >&5
11258 cat "conftest.$ac_ext" >&5
11259 cf_XOPEN_SOURCE_set_ok=no
11260 fi
11261 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11262                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11263                 then
11264                         { echo "$as_me:11264: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11265 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11266                 fi
11267         else
11268
11269 echo "$as_me:11269: checking if we should define _XOPEN_SOURCE" >&5
11270 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11271 if test "${cf_cv_xopen_source+set}" = set; then
11272   echo $ECHO_N "(cached) $ECHO_C" >&6
11273 else
11274
11275         cat >"conftest.$ac_ext" <<_ACEOF
11276 #line 11276 "configure"
11277 #include "confdefs.h"
11278
11279 #include <stdlib.h>
11280 #include <string.h>
11281 #include <sys/types.h>
11282
11283 int
11284 main (void)
11285 {
11286
11287 #ifndef _XOPEN_SOURCE
11288 make an error
11289 #endif
11290   ;
11291   return 0;
11292 }
11293 _ACEOF
11294 rm -f "conftest.$ac_objext"
11295 if { (eval echo "$as_me:11295: \"$ac_compile\"") >&5
11296   (eval $ac_compile) 2>&5
11297   ac_status=$?
11298   echo "$as_me:11298: \$? = $ac_status" >&5
11299   (exit "$ac_status"); } &&
11300          { ac_try='test -s "conftest.$ac_objext"'
11301   { (eval echo "$as_me:11301: \"$ac_try\"") >&5
11302   (eval $ac_try) 2>&5
11303   ac_status=$?
11304   echo "$as_me:11304: \$? = $ac_status" >&5
11305   (exit "$ac_status"); }; }; then
11306   cf_cv_xopen_source=no
11307 else
11308   echo "$as_me: failed program was:" >&5
11309 cat "conftest.$ac_ext" >&5
11310 cf_save="$CPPFLAGS"
11311
11312         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11313         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11314
11315          cat >"conftest.$ac_ext" <<_ACEOF
11316 #line 11316 "configure"
11317 #include "confdefs.h"
11318
11319 #include <stdlib.h>
11320 #include <string.h>
11321 #include <sys/types.h>
11322
11323 int
11324 main (void)
11325 {
11326
11327 #ifdef _XOPEN_SOURCE
11328 make an error
11329 #endif
11330   ;
11331   return 0;
11332 }
11333 _ACEOF
11334 rm -f "conftest.$ac_objext"
11335 if { (eval echo "$as_me:11335: \"$ac_compile\"") >&5
11336   (eval $ac_compile) 2>&5
11337   ac_status=$?
11338   echo "$as_me:11338: \$? = $ac_status" >&5
11339   (exit "$ac_status"); } &&
11340          { ac_try='test -s "conftest.$ac_objext"'
11341   { (eval echo "$as_me:11341: \"$ac_try\"") >&5
11342   (eval $ac_try) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit "$ac_status"); }; }; then
11346   cf_cv_xopen_source=no
11347 else
11348   echo "$as_me: failed program was:" >&5
11349 cat "conftest.$ac_ext" >&5
11350 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11351 fi
11352 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11353         CPPFLAGS="$cf_save"
11354
11355 fi
11356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11357
11358 fi
11359 echo "$as_me:11359: result: $cf_cv_xopen_source" >&5
11360 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11361
11362 if test "$cf_cv_xopen_source" != no ; then
11363
11364 CFLAGS=`echo "$CFLAGS" | \
11365         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11366                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11367
11368 CPPFLAGS=`echo "$CPPFLAGS" | \
11369         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11370                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11371
11372         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11373
11374 cf_fix_cppflags=no
11375 cf_new_cflags=
11376 cf_new_cppflags=
11377 cf_new_extra_cppflags=
11378
11379 for cf_add_cflags in $cf_temp_xopen_source
11380 do
11381 case "$cf_fix_cppflags" in
11382 (no)
11383         case "$cf_add_cflags" in
11384         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11385                 case "$cf_add_cflags" in
11386                 (-D*)
11387                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11388
11389                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11390                                 && test -z "${cf_tst_cflags}" \
11391                                 && cf_fix_cppflags=yes
11392
11393                         if test "$cf_fix_cppflags" = yes ; then
11394
11395         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11396         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11397
11398                                 continue
11399                         elif test "${cf_tst_cflags}" = "\"'" ; then
11400
11401         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11402         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11403
11404                                 continue
11405                         fi
11406                         ;;
11407                 esac
11408                 case "$CPPFLAGS" in
11409                 (*$cf_add_cflags)
11410                         ;;
11411                 (*)
11412                         case "$cf_add_cflags" in
11413                         (-D*)
11414                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11415
11416 CPPFLAGS=`echo "$CPPFLAGS" | \
11417         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11418                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11419
11420                                 ;;
11421                         esac
11422
11423         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11424         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11425
11426                         ;;
11427                 esac
11428                 ;;
11429         (*)
11430
11431         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11432         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11433
11434                 ;;
11435         esac
11436         ;;
11437 (yes)
11438
11439         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11440         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11441
11442         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11443
11444         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11445                 && test -z "${cf_tst_cflags}" \
11446                 && cf_fix_cppflags=no
11447         ;;
11448 esac
11449 done
11450
11451 if test -n "$cf_new_cflags" ; then
11452
11453         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11454         CFLAGS="${CFLAGS}$cf_new_cflags"
11455
11456 fi
11457
11458 if test -n "$cf_new_cppflags" ; then
11459
11460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11461         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11462
11463 fi
11464
11465 if test -n "$cf_new_extra_cppflags" ; then
11466
11467         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11468         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11469
11470 fi
11471
11472 fi
11473
11474         fi
11475 fi
11476 fi # cf_cv_posix_visible
11477
11478 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11479
11480 # Work around breakage on OS X
11481
11482 echo "$as_me:11482: checking if SIGWINCH is defined" >&5
11483 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11484 if test "${cf_cv_define_sigwinch+set}" = set; then
11485   echo $ECHO_N "(cached) $ECHO_C" >&6
11486 else
11487
11488         cat >"conftest.$ac_ext" <<_ACEOF
11489 #line 11489 "configure"
11490 #include "confdefs.h"
11491
11492 #include <sys/types.h>
11493 #include <sys/signal.h>
11494
11495 int
11496 main (void)
11497 {
11498 int x = SIGWINCH; (void)x
11499   ;
11500   return 0;
11501 }
11502 _ACEOF
11503 rm -f "conftest.$ac_objext"
11504 if { (eval echo "$as_me:11504: \"$ac_compile\"") >&5
11505   (eval $ac_compile) 2>&5
11506   ac_status=$?
11507   echo "$as_me:11507: \$? = $ac_status" >&5
11508   (exit "$ac_status"); } &&
11509          { ac_try='test -s "conftest.$ac_objext"'
11510   { (eval echo "$as_me:11510: \"$ac_try\"") >&5
11511   (eval $ac_try) 2>&5
11512   ac_status=$?
11513   echo "$as_me:11513: \$? = $ac_status" >&5
11514   (exit "$ac_status"); }; }; then
11515   cf_cv_define_sigwinch=yes
11516 else
11517   echo "$as_me: failed program was:" >&5
11518 cat "conftest.$ac_ext" >&5
11519 cat >"conftest.$ac_ext" <<_ACEOF
11520 #line 11520 "configure"
11521 #include "confdefs.h"
11522
11523 #undef _XOPEN_SOURCE
11524 #undef _POSIX_SOURCE
11525 #undef _POSIX_C_SOURCE
11526 #include <sys/types.h>
11527 #include <sys/signal.h>
11528
11529 int
11530 main (void)
11531 {
11532 int x = SIGWINCH; (void)x
11533   ;
11534   return 0;
11535 }
11536 _ACEOF
11537 rm -f "conftest.$ac_objext"
11538 if { (eval echo "$as_me:11538: \"$ac_compile\"") >&5
11539   (eval $ac_compile) 2>&5
11540   ac_status=$?
11541   echo "$as_me:11541: \$? = $ac_status" >&5
11542   (exit "$ac_status"); } &&
11543          { ac_try='test -s "conftest.$ac_objext"'
11544   { (eval echo "$as_me:11544: \"$ac_try\"") >&5
11545   (eval $ac_try) 2>&5
11546   ac_status=$?
11547   echo "$as_me:11547: \$? = $ac_status" >&5
11548   (exit "$ac_status"); }; }; then
11549   cf_cv_define_sigwinch=maybe
11550 else
11551   echo "$as_me: failed program was:" >&5
11552 cat "conftest.$ac_ext" >&5
11553 cf_cv_define_sigwinch=no
11554 fi
11555 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11556
11557 fi
11558 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11559
11560 fi
11561 echo "$as_me:11561: result: $cf_cv_define_sigwinch" >&5
11562 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11563
11564 if test "$cf_cv_define_sigwinch" = maybe ; then
11565 echo "$as_me:11565: checking for actual SIGWINCH definition" >&5
11566 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11567 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11568   echo $ECHO_N "(cached) $ECHO_C" >&6
11569 else
11570
11571 cf_cv_fixup_sigwinch=unknown
11572 cf_sigwinch=32
11573 while test "$cf_sigwinch" != 1
11574 do
11575         cat >"conftest.$ac_ext" <<_ACEOF
11576 #line 11576 "configure"
11577 #include "confdefs.h"
11578
11579 #undef _XOPEN_SOURCE
11580 #undef _POSIX_SOURCE
11581 #undef _POSIX_C_SOURCE
11582 #include <sys/types.h>
11583 #include <sys/signal.h>
11584
11585 int
11586 main (void)
11587 {
11588
11589 #if SIGWINCH != $cf_sigwinch
11590 make an error
11591 #endif
11592 int x = SIGWINCH; (void)x
11593   ;
11594   return 0;
11595 }
11596 _ACEOF
11597 rm -f "conftest.$ac_objext"
11598 if { (eval echo "$as_me:11598: \"$ac_compile\"") >&5
11599   (eval $ac_compile) 2>&5
11600   ac_status=$?
11601   echo "$as_me:11601: \$? = $ac_status" >&5
11602   (exit "$ac_status"); } &&
11603          { ac_try='test -s "conftest.$ac_objext"'
11604   { (eval echo "$as_me:11604: \"$ac_try\"") >&5
11605   (eval $ac_try) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit "$ac_status"); }; }; then
11609   cf_cv_fixup_sigwinch=$cf_sigwinch
11610          break
11611 else
11612   echo "$as_me: failed program was:" >&5
11613 cat "conftest.$ac_ext" >&5
11614 fi
11615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11616
11617 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11618 done
11619
11620 fi
11621 echo "$as_me:11621: result: $cf_cv_fixup_sigwinch" >&5
11622 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11623
11624         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11625                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11626         fi
11627 fi
11628
11629 # Checks for CODESET support.
11630
11631 echo "$as_me:11631: checking for nl_langinfo and CODESET" >&5
11632 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11633 if test "${am_cv_langinfo_codeset+set}" = set; then
11634   echo $ECHO_N "(cached) $ECHO_C" >&6
11635 else
11636   cat >"conftest.$ac_ext" <<_ACEOF
11637 #line 11637 "configure"
11638 #include "confdefs.h"
11639 #include <langinfo.h>
11640 int
11641 main (void)
11642 {
11643 char* cs = nl_langinfo(CODESET); (void)cs
11644   ;
11645   return 0;
11646 }
11647 _ACEOF
11648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11649 if { (eval echo "$as_me:11649: \"$ac_link\"") >&5
11650   (eval $ac_link) 2>&5
11651   ac_status=$?
11652   echo "$as_me:11652: \$? = $ac_status" >&5
11653   (exit "$ac_status"); } &&
11654          { ac_try='test -s "conftest$ac_exeext"'
11655   { (eval echo "$as_me:11655: \"$ac_try\"") >&5
11656   (eval $ac_try) 2>&5
11657   ac_status=$?
11658   echo "$as_me:11658: \$? = $ac_status" >&5
11659   (exit "$ac_status"); }; }; then
11660   am_cv_langinfo_codeset=yes
11661 else
11662   echo "$as_me: failed program was:" >&5
11663 cat "conftest.$ac_ext" >&5
11664 am_cv_langinfo_codeset=no
11665 fi
11666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11667
11668 fi
11669 echo "$as_me:11669: result: $am_cv_langinfo_codeset" >&5
11670 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11671         if test "$am_cv_langinfo_codeset" = yes; then
11672
11673 cat >>confdefs.h <<\EOF
11674 #define HAVE_LANGINFO_CODESET 1
11675 EOF
11676
11677         fi
11678
11679 # use these variables to work around a defect in gcc's fixincludes.
11680 NCURSES_OK_WCHAR_T=
11681 NCURSES_OK_WINT_T=
11682
11683 echo "$as_me:11683: checking if you want wide-character code" >&5
11684 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11685
11686 # Check whether --enable-widec or --disable-widec was given.
11687 if test "${enable_widec+set}" = set; then
11688   enableval="$enable_widec"
11689   with_widec=$enableval
11690 else
11691   with_widec=no
11692 fi;
11693 echo "$as_me:11693: result: $with_widec" >&5
11694 echo "${ECHO_T}$with_widec" >&6
11695
11696 NCURSES_WCWIDTH_GRAPHICS=1
11697
11698 if test "x$with_widec" = xyes ; then
11699         if test "x$disable_lib_suffixes" = xno ; then
11700                 LIB_SUFFIX="w${LIB_SUFFIX}"
11701         fi
11702
11703 cat >>confdefs.h <<\EOF
11704 #define USE_WIDEC_SUPPORT 1
11705 EOF
11706
11707 cat >>confdefs.h <<\EOF
11708 #define NCURSES_WIDECHAR 1
11709 EOF
11710
11711 for ac_header in \
11712 wchar.h \
11713 wctype.h \
11714
11715 do
11716 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11717 echo "$as_me:11717: checking for $ac_header" >&5
11718 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11720   echo $ECHO_N "(cached) $ECHO_C" >&6
11721 else
11722   cat >"conftest.$ac_ext" <<_ACEOF
11723 #line 11723 "configure"
11724 #include "confdefs.h"
11725 #include <$ac_header>
11726 _ACEOF
11727 if { (eval echo "$as_me:11727: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11728   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11729   ac_status=$?
11730   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11731   rm -f conftest.er1
11732   cat conftest.err >&5
11733   echo "$as_me:11733: \$? = $ac_status" >&5
11734   (exit "$ac_status"); } >/dev/null; then
11735   if test -s conftest.err; then
11736     ac_cpp_err=$ac_c_preproc_warn_flag
11737   else
11738     ac_cpp_err=
11739   fi
11740 else
11741   ac_cpp_err=yes
11742 fi
11743 if test -z "$ac_cpp_err"; then
11744   eval "$as_ac_Header=yes"
11745 else
11746   echo "$as_me: failed program was:" >&5
11747   cat "conftest.$ac_ext" >&5
11748   eval "$as_ac_Header=no"
11749 fi
11750 rm -f conftest.err "conftest.$ac_ext"
11751 fi
11752 echo "$as_me:11752: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11753 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11754 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11755   cat >>confdefs.h <<EOF
11756 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11757 EOF
11758
11759 fi
11760 done
11761
11762 echo "$as_me:11762: checking if wchar.h can be used as is" >&5
11763 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11764 if test "${cf_cv_wchar_h_okay+set}" = set; then
11765   echo $ECHO_N "(cached) $ECHO_C" >&6
11766 else
11767
11768 cat >"conftest.$ac_ext" <<_ACEOF
11769 #line 11769 "configure"
11770 #include "confdefs.h"
11771
11772 #include <stdlib.h>
11773 #ifdef HAVE_WCHAR_H
11774 #include <wchar.h>
11775 #endif
11776 #ifdef HAVE_WCTYPE_H
11777 #include <wctype.h>
11778 #endif
11779
11780 int
11781 main (void)
11782 {
11783
11784         wint_t foo = 0;
11785         int bar = iswpunct(foo)
11786   ;
11787   return 0;
11788 }
11789 _ACEOF
11790 rm -f "conftest.$ac_objext"
11791 if { (eval echo "$as_me:11791: \"$ac_compile\"") >&5
11792   (eval $ac_compile) 2>&5
11793   ac_status=$?
11794   echo "$as_me:11794: \$? = $ac_status" >&5
11795   (exit "$ac_status"); } &&
11796          { ac_try='test -s "conftest.$ac_objext"'
11797   { (eval echo "$as_me:11797: \"$ac_try\"") >&5
11798   (eval $ac_try) 2>&5
11799   ac_status=$?
11800   echo "$as_me:11800: \$? = $ac_status" >&5
11801   (exit "$ac_status"); }; }; then
11802   cf_cv_wchar_h_okay=yes
11803 else
11804   echo "$as_me: failed program was:" >&5
11805 cat "conftest.$ac_ext" >&5
11806 cf_cv_wchar_h_okay=no
11807 fi
11808 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11809 fi
11810 echo "$as_me:11810: result: $cf_cv_wchar_h_okay" >&5
11811 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11812
11813 if test "$cf_cv_wchar_h_okay" = no
11814 then
11815
11816 echo "$as_me:11816: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11817 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11818 cat >"conftest.$ac_ext" <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821 #include <sys/types.h>
11822
11823 int
11824 main (void)
11825 {
11826
11827 #ifndef _XOPEN_SOURCE_EXTENDED
11828 make an error
11829 #endif
11830   ;
11831   return 0;
11832 }
11833 _ACEOF
11834 rm -f "conftest.$ac_objext"
11835 if { (eval echo "$as_me:11835: \"$ac_compile\"") >&5
11836   (eval $ac_compile) 2>&5
11837   ac_status=$?
11838   echo "$as_me:11838: \$? = $ac_status" >&5
11839   (exit "$ac_status"); } &&
11840          { ac_try='test -s "conftest.$ac_objext"'
11841   { (eval echo "$as_me:11841: \"$ac_try\"") >&5
11842   (eval $ac_try) 2>&5
11843   ac_status=$?
11844   echo "$as_me:11844: \$? = $ac_status" >&5
11845   (exit "$ac_status"); }; }; then
11846   cf_result=no
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 cat "conftest.$ac_ext" >&5
11850 cf_result=yes
11851 fi
11852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11853 echo "$as_me:11853: result: $cf_result" >&5
11854 echo "${ECHO_T}$cf_result" >&6
11855
11856 if test "$cf_result" = yes ; then
11857         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11858 elif test "x" != "x" ; then
11859         echo "$as_me:11859: checking checking for compatible value versus " >&5
11860 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11861         cat >"conftest.$ac_ext" <<_ACEOF
11862 #line 11862 "configure"
11863 #include "confdefs.h"
11864 #include <sys/types.h>
11865
11866 int
11867 main (void)
11868 {
11869
11870 #if _XOPEN_SOURCE_EXTENDED- < 0
11871 make an error
11872 #endif
11873   ;
11874   return 0;
11875 }
11876 _ACEOF
11877 rm -f "conftest.$ac_objext"
11878 if { (eval echo "$as_me:11878: \"$ac_compile\"") >&5
11879   (eval $ac_compile) 2>&5
11880   ac_status=$?
11881   echo "$as_me:11881: \$? = $ac_status" >&5
11882   (exit "$ac_status"); } &&
11883          { ac_try='test -s "conftest.$ac_objext"'
11884   { (eval echo "$as_me:11884: \"$ac_try\"") >&5
11885   (eval $ac_try) 2>&5
11886   ac_status=$?
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit "$ac_status"); }; }; then
11889   cf_result=yes
11890 else
11891   echo "$as_me: failed program was:" >&5
11892 cat "conftest.$ac_ext" >&5
11893 cf_result=no
11894 fi
11895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11896         echo "$as_me:11896: result: $cf_result" >&5
11897 echo "${ECHO_T}$cf_result" >&6
11898         if test "$cf_result" = no ; then
11899                 # perhaps we can override it - try...
11900                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11901         fi
11902 fi
11903
11904 fi
11905
11906 echo "$as_me:11906: checking if wcwidth agrees graphics are single-width" >&5
11907 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11908 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11909   echo $ECHO_N "(cached) $ECHO_C" >&6
11910 else
11911
11912 cat >conftest.in <<CF_EOF
11913 -       VT100 symbols
11914 0x250c  upper left corner
11915 0x2514  lower left corner
11916 0x2510  upper right corner
11917 0x2518  lower right corner
11918 0x251c  tee pointing left
11919 0x2524  tee pointing right
11920 0x2534  tee pointing up
11921 0x252c  tee pointing down
11922 0x2500  horizontal line
11923 0x2502  vertical line
11924 0x253c  large plus or crossover
11925 0x23ba  scan line 1
11926 0x23bd  scan line 9
11927 0x25c6  diamond
11928 0x2592  checker board (stipple)
11929 0x00b0  degree symbol
11930 0x00b1  plus/minus
11931 0x00b7  bullet
11932 -       Teletype 5410v1 symbols
11933 0x2190  arrow pointing left
11934 0x2192  arrow pointing right
11935 0x2193  arrow pointing down
11936 0x2191  arrow pointing up
11937 0x2592  board of squares
11938 0x2603  lantern symbol
11939 0x25ae  solid square block
11940 -       these defaults were invented for ncurses
11941 0x23bb  scan line 3
11942 0x23bc  scan line 7
11943 0x2264  less-than-or-equal-to
11944 0x2265  greater-than-or-equal-to
11945 0x03c0  greek pi
11946 0x2260  not-equal
11947 0x00a3  pound-sterling symbol
11948 -       thick-line-drawing
11949 0x250f  upper left corner
11950 0x2517  lower left corner
11951 0x2513  upper right corner
11952 0x251b  lower right corner
11953 0x2523  tee pointing left
11954 0x252b  tee pointing right
11955 0x253b  tee pointing up
11956 0x2533  tee pointing down
11957 0x2501  horizontal line
11958 0x2503  vertical line
11959 0x254b  large plus or crossover
11960 -       double-line-drawing
11961 0x2554  upper left corner
11962 0x255a  lower left corner
11963 0x2557  upper right corner
11964 0x255d  lower right corner
11965 0x2563  tee pointing left
11966 0x2560  tee pointing right
11967 0x2569  tee pointing up
11968 0x2566  tee pointing down
11969 0x2550  horizontal line
11970 0x2551  vertical line
11971 0x256c  large plus or crossover
11972 CF_EOF
11973 if test "$cross_compiling" = yes; then
11974   cf_cv_wcwidth_graphics=unknown
11975 else
11976   cat >"conftest.$ac_ext" <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979
11980 #include <locale.h>
11981 #include <stdio.h>
11982 #include <wchar.h>
11983
11984 #define MY_LEN 80
11985
11986 int
11987 main(void)
11988 {
11989         FILE *fp;
11990         int value;
11991         char buffer[MY_LEN + 1];
11992         char notes[MY_LEN + 1];
11993         int totals = 0;
11994         int passed = 0;
11995
11996         if (setlocale(LC_ALL, "en_US.UTF8") ||
11997                 setlocale(LC_ALL, "en_US.UTF-8") ||
11998                 setlocale(LC_ALL, "en_US.utf8") ||
11999                 setlocale(LC_ALL, "en_US.utf-8")) {
12000                 if ((fp = fopen("conftest.in", "r")) != 0) {
12001                         while (fgets(buffer, MY_LEN, fp) != 0) {
12002                                 if (*buffer == '-') {
12003                                         fprintf(stderr, "\\t%s", buffer);
12004                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12005                                         ++totals;
12006                                         if (wcwidth(value) == 1)
12007                                                 ++passed;
12008                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12009                                 } else {
12010                                         fprintf(stderr, "?\\t%s", buffer);
12011                                 }
12012                         }
12013                 }
12014         }
12015         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12016         return (totals == passed) ? 0 : 1;
12017 }
12018
12019 _ACEOF
12020 rm -f "conftest$ac_exeext"
12021 if { (eval echo "$as_me:12021: \"$ac_link\"") >&5
12022   (eval $ac_link) 2>&5
12023   ac_status=$?
12024   echo "$as_me:12024: \$? = $ac_status" >&5
12025   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12026   { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027   (eval $ac_try) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit "$ac_status"); }; }; then
12031   cf_cv_wcwidth_graphics=yes
12032 else
12033   echo "$as_me: program exited with status $ac_status" >&5
12034 echo "$as_me: failed program was:" >&5
12035 cat "conftest.$ac_ext" >&5
12036 cf_cv_wcwidth_graphics=no
12037 fi
12038 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12039 fi
12040
12041 fi
12042 echo "$as_me:12042: result: $cf_cv_wcwidth_graphics" >&5
12043 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12044
12045         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12046
12047         # with_overwrite=no
12048         NCURSES_CH_T=cchar_t
12049
12050 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12051 do
12052 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12053 echo "$as_me:12053: checking for $ac_func" >&5
12054 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12055 if eval "test \"\${$as_ac_var+set}\" = set"; then
12056   echo $ECHO_N "(cached) $ECHO_C" >&6
12057 else
12058   cat >"conftest.$ac_ext" <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061 #define $ac_func autoconf_temporary
12062 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12063 #undef $ac_func
12064
12065 #ifdef __cplusplus
12066 extern "C"
12067 #endif
12068
12069 /* We use char because int might match the return type of a gcc2
12070    builtin and then its argument prototype would still apply.  */
12071 char $ac_func (void);
12072
12073 int
12074 main (void)
12075 {
12076
12077 /* The GNU C library defines stubs for functions which it implements
12078     to always fail with ENOSYS.  Some functions are actually named
12079     something starting with __ and the normal name is an alias.  */
12080 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12081 #error found stub for $ac_func
12082 #endif
12083
12084         return $ac_func ();
12085   ;
12086   return 0;
12087 }
12088 _ACEOF
12089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12090 if { (eval echo "$as_me:12090: \"$ac_link\"") >&5
12091   (eval $ac_link) 2>&5
12092   ac_status=$?
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit "$ac_status"); } &&
12095          { ac_try='test -s "conftest$ac_exeext"'
12096   { (eval echo "$as_me:12096: \"$ac_try\"") >&5
12097   (eval $ac_try) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit "$ac_status"); }; }; then
12101   eval "$as_ac_var=yes"
12102 else
12103   echo "$as_me: failed program was:" >&5
12104 cat "conftest.$ac_ext" >&5
12105 eval "$as_ac_var=no"
12106 fi
12107 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12108 fi
12109 echo "$as_me:12109: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12110 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12111 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12112   cat >>confdefs.h <<EOF
12113 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12114 EOF
12115
12116 fi
12117 done
12118
12119         if test "x$ac_cv_func_putwc" != xyes ; then
12120
12121 for ac_header in wchar.h
12122 do
12123 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12124 echo "$as_me:12124: checking for $ac_header" >&5
12125 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12126 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12127   echo $ECHO_N "(cached) $ECHO_C" >&6
12128 else
12129   cat >"conftest.$ac_ext" <<_ACEOF
12130 #line 12130 "configure"
12131 #include "confdefs.h"
12132 #include <$ac_header>
12133 _ACEOF
12134 if { (eval echo "$as_me:12134: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12135   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12136   ac_status=$?
12137   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12138   rm -f conftest.er1
12139   cat conftest.err >&5
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit "$ac_status"); } >/dev/null; then
12142   if test -s conftest.err; then
12143     ac_cpp_err=$ac_c_preproc_warn_flag
12144   else
12145     ac_cpp_err=
12146   fi
12147 else
12148   ac_cpp_err=yes
12149 fi
12150 if test -z "$ac_cpp_err"; then
12151   eval "$as_ac_Header=yes"
12152 else
12153   echo "$as_me: failed program was:" >&5
12154   cat "conftest.$ac_ext" >&5
12155   eval "$as_ac_Header=no"
12156 fi
12157 rm -f conftest.err "conftest.$ac_ext"
12158 fi
12159 echo "$as_me:12159: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12160 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12161 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12162   cat >>confdefs.h <<EOF
12163 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12164 EOF
12165
12166 fi
12167 done
12168
12169 echo "$as_me:12169: checking for multibyte character support" >&5
12170 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12171 if test "${cf_cv_utf8_lib+set}" = set; then
12172   echo $ECHO_N "(cached) $ECHO_C" >&6
12173 else
12174
12175         cf_save_LIBS="$LIBS"
12176         cat >"conftest.$ac_ext" <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179
12180 #include <stdlib.h>
12181 #include <stdio.h>
12182 #ifdef HAVE_WCHAR_H
12183 #include <wchar.h>
12184 #endif
12185
12186 int
12187 main (void)
12188 {
12189 putwc(0,0);
12190   ;
12191   return 0;
12192 }
12193 _ACEOF
12194 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12195 if { (eval echo "$as_me:12195: \"$ac_link\"") >&5
12196   (eval $ac_link) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit "$ac_status"); } &&
12200          { ac_try='test -s "conftest$ac_exeext"'
12201   { (eval echo "$as_me:12201: \"$ac_try\"") >&5
12202   (eval $ac_try) 2>&5
12203   ac_status=$?
12204   echo "$as_me:12204: \$? = $ac_status" >&5
12205   (exit "$ac_status"); }; }; then
12206   cf_cv_utf8_lib=yes
12207 else
12208   echo "$as_me: failed program was:" >&5
12209 cat "conftest.$ac_ext" >&5
12210
12211 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12212 # will be set on completion of the AC_TRY_LINK below.
12213 cf_cv_header_path_utf8=
12214 cf_cv_library_path_utf8=
12215
12216 echo "${as_me:-configure}:12216: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12217
12218 cf_save_LIBS="$LIBS"
12219
12220 cat >"conftest.$ac_ext" <<_ACEOF
12221 #line 12221 "configure"
12222 #include "confdefs.h"
12223
12224 #include <libutf8.h>
12225 int
12226 main (void)
12227 {
12228 putwc(0,0);
12229   ;
12230   return 0;
12231 }
12232 _ACEOF
12233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12234 if { (eval echo "$as_me:12234: \"$ac_link\"") >&5
12235   (eval $ac_link) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit "$ac_status"); } &&
12239          { ac_try='test -s "conftest$ac_exeext"'
12240   { (eval echo "$as_me:12240: \"$ac_try\"") >&5
12241   (eval $ac_try) 2>&5
12242   ac_status=$?
12243   echo "$as_me:12243: \$? = $ac_status" >&5
12244   (exit "$ac_status"); }; }; then
12245
12246         cf_cv_find_linkage_utf8=yes
12247         cf_cv_header_path_utf8=/usr/include
12248         cf_cv_library_path_utf8=/usr/lib
12249
12250 else
12251   echo "$as_me: failed program was:" >&5
12252 cat "conftest.$ac_ext" >&5
12253
12254 LIBS="-lutf8  $cf_save_LIBS"
12255
12256 cat >"conftest.$ac_ext" <<_ACEOF
12257 #line 12257 "configure"
12258 #include "confdefs.h"
12259
12260 #include <libutf8.h>
12261 int
12262 main (void)
12263 {
12264 putwc(0,0);
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12270 if { (eval echo "$as_me:12270: \"$ac_link\"") >&5
12271   (eval $ac_link) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit "$ac_status"); } &&
12275          { ac_try='test -s "conftest$ac_exeext"'
12276   { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit "$ac_status"); }; }; then
12281
12282         cf_cv_find_linkage_utf8=yes
12283         cf_cv_header_path_utf8=/usr/include
12284         cf_cv_library_path_utf8=/usr/lib
12285         cf_cv_library_file_utf8="-lutf8"
12286
12287 else
12288   echo "$as_me: failed program was:" >&5
12289 cat "conftest.$ac_ext" >&5
12290
12291         cf_cv_find_linkage_utf8=no
12292         LIBS="$cf_save_LIBS"
12293
12294         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12295
12296 echo "${as_me:-configure}:12296: testing find linkage for utf8 library ..." 1>&5
12297
12298 echo "${as_me:-configure}:12298: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12299
12300         cf_save_CPPFLAGS="$CPPFLAGS"
12301         cf_test_CPPFLAGS="$CPPFLAGS"
12302
12303 cf_search=
12304
12305 # collect the current set of include-directories from compiler flags
12306 cf_header_path_list=""
12307 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12308         for cf_header_path in $CPPFLAGS $CFLAGS
12309         do
12310                 case "$cf_header_path" in
12311                 (-I*)
12312                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12313
12314 test "x$cf_header_path" != "xNONE" && \
12315 test -d "$cf_header_path" && \
12316  {
12317         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12318         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12319         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12320         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12321         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12322         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12323 }
12324
12325                         cf_header_path_list="$cf_header_path_list $cf_search"
12326                         ;;
12327                 esac
12328         done
12329 fi
12330
12331 # add the variations for the package we are looking for
12332
12333 cf_search=
12334
12335 test "x$prefix" != "xNONE" && \
12336 test -d "$prefix" && \
12337  {
12338         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12339         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12340         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12341         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12342         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12343         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12344 }
12345
12346 for cf_subdir_prefix in \
12347         /usr \
12348         /usr/local \
12349         /usr/pkg \
12350         /opt \
12351         /opt/local \
12352         $HOME
12353 do
12354
12355 test "x$cf_subdir_prefix" != "x$prefix" && \
12356 test -d "$cf_subdir_prefix" && \
12357 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12358         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12359         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12360         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12361         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12362         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12363         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12364 }
12365
12366 done
12367
12368 test "$includedir" != NONE && \
12369 test "$includedir" != "/usr/include" && \
12370 test -d "$includedir" && {
12371         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12372         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12373 }
12374
12375 test "$oldincludedir" != NONE && \
12376 test "$oldincludedir" != "/usr/include" && \
12377 test -d "$oldincludedir" && {
12378         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12379         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12380 }
12381
12382 cf_search="$cf_search $cf_header_path_list"
12383
12384         for cf_cv_header_path_utf8 in $cf_search
12385         do
12386                 if test -d "$cf_cv_header_path_utf8" ; then
12387                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12388
12389 echo "${as_me:-configure}:12389: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12390
12391                         CPPFLAGS="$cf_save_CPPFLAGS"
12392
12393         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12394         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12395
12396                         cat >"conftest.$ac_ext" <<_ACEOF
12397 #line 12397 "configure"
12398 #include "confdefs.h"
12399
12400 #include <libutf8.h>
12401 int
12402 main (void)
12403 {
12404 putwc(0,0);
12405   ;
12406   return 0;
12407 }
12408 _ACEOF
12409 rm -f "conftest.$ac_objext"
12410 if { (eval echo "$as_me:12410: \"$ac_compile\"") >&5
12411   (eval $ac_compile) 2>&5
12412   ac_status=$?
12413   echo "$as_me:12413: \$? = $ac_status" >&5
12414   (exit "$ac_status"); } &&
12415          { ac_try='test -s "conftest.$ac_objext"'
12416   { (eval echo "$as_me:12416: \"$ac_try\"") >&5
12417   (eval $ac_try) 2>&5
12418   ac_status=$?
12419   echo "$as_me:12419: \$? = $ac_status" >&5
12420   (exit "$ac_status"); }; }; then
12421
12422                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12423
12424 echo "${as_me:-configure}:12424: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12425
12426                                 cf_cv_find_linkage_utf8=maybe
12427                                 cf_test_CPPFLAGS="$CPPFLAGS"
12428                                 break
12429 else
12430   echo "$as_me: failed program was:" >&5
12431 cat "conftest.$ac_ext" >&5
12432
12433                                 CPPFLAGS="$cf_save_CPPFLAGS"
12434
12435 fi
12436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12437                 fi
12438         done
12439
12440         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12441
12442 echo "${as_me:-configure}:12442: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12443
12444                 cf_save_LIBS="$LIBS"
12445                 cf_save_LDFLAGS="$LDFLAGS"
12446
12447                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12448
12449 cf_search=
12450 cf_library_path_list=""
12451 if test -n "${LDFLAGS}${LIBS}" ; then
12452         for cf_library_path in $LDFLAGS $LIBS
12453         do
12454                 case "$cf_library_path" in
12455                 (-L*)
12456                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12457
12458 test "x$cf_library_path" != "xNONE" && \
12459 test -d "$cf_library_path" && \
12460  {
12461         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12462         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12463         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12464         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12465         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12466         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12467 }
12468
12469                         cf_library_path_list="$cf_library_path_list $cf_search"
12470                         ;;
12471                 esac
12472         done
12473 fi
12474
12475 cf_search=
12476
12477 test "x$prefix" != "xNONE" && \
12478 test -d "$prefix" && \
12479  {
12480         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12481         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12482         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12483         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12484         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12485         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12486 }
12487
12488 for cf_subdir_prefix in \
12489         /usr \
12490         /usr/local \
12491         /usr/pkg \
12492         /opt \
12493         /opt/local \
12494         $HOME
12495 do
12496
12497 test "x$cf_subdir_prefix" != "x$prefix" && \
12498 test -d "$cf_subdir_prefix" && \
12499 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12500         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12501         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12502         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12503         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12504         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12505         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12506 }
12507
12508 done
12509
12510 cf_search="$cf_library_path_list $cf_search"
12511
12512                         for cf_cv_library_path_utf8 in $cf_search
12513                         do
12514                                 if test -d "$cf_cv_library_path_utf8" ; then
12515                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12516
12517 echo "${as_me:-configure}:12517: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12518
12519                                         CPPFLAGS="$cf_test_CPPFLAGS"
12520                                         LIBS="-lutf8  $cf_save_LIBS"
12521                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12522                                         cat >"conftest.$ac_ext" <<_ACEOF
12523 #line 12523 "configure"
12524 #include "confdefs.h"
12525
12526 #include <libutf8.h>
12527 int
12528 main (void)
12529 {
12530 putwc(0,0);
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12536 if { (eval echo "$as_me:12536: \"$ac_link\"") >&5
12537   (eval $ac_link) 2>&5
12538   ac_status=$?
12539   echo "$as_me:12539: \$? = $ac_status" >&5
12540   (exit "$ac_status"); } &&
12541          { ac_try='test -s "conftest$ac_exeext"'
12542   { (eval echo "$as_me:12542: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:12545: \$? = $ac_status" >&5
12546   (exit "$ac_status"); }; }; then
12547
12548                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12549
12550 echo "${as_me:-configure}:12550: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12551
12552                                         cf_cv_find_linkage_utf8=yes
12553                                         cf_cv_library_file_utf8="-lutf8"
12554                                         break
12555 else
12556   echo "$as_me: failed program was:" >&5
12557 cat "conftest.$ac_ext" >&5
12558
12559                                         CPPFLAGS="$cf_save_CPPFLAGS"
12560                                         LIBS="$cf_save_LIBS"
12561                                         LDFLAGS="$cf_save_LDFLAGS"
12562
12563 fi
12564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12565                                 fi
12566                         done
12567                         CPPFLAGS="$cf_save_CPPFLAGS"
12568                         LDFLAGS="$cf_save_LDFLAGS"
12569                 fi
12570
12571         else
12572                 cf_cv_find_linkage_utf8=no
12573         fi
12574
12575 fi
12576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12577
12578 fi
12579 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12580
12581 LIBS="$cf_save_LIBS"
12582
12583 if test "$cf_cv_find_linkage_utf8" = yes ; then
12584 cf_cv_utf8_lib=add-on
12585 else
12586 cf_cv_utf8_lib=no
12587 fi
12588
12589 fi
12590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12591 fi
12592 echo "$as_me:12592: result: $cf_cv_utf8_lib" >&5
12593 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12594
12595 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12596 # ncurses/ncursesw:
12597 if test "$cf_cv_utf8_lib" = "add-on" ; then
12598
12599 cat >>confdefs.h <<\EOF
12600 #define HAVE_LIBUTF8_H 1
12601 EOF
12602
12603 if test -n "$cf_cv_header_path_utf8" ; then
12604   for cf_add_incdir in $cf_cv_header_path_utf8
12605   do
12606         while test "$cf_add_incdir" != /usr/include
12607         do
12608           if test -d "$cf_add_incdir"
12609           then
12610                 cf_have_incdir=no
12611                 if test -n "$CFLAGS$CPPFLAGS" ; then
12612                   # a loop is needed to ensure we can add subdirs of existing dirs
12613                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12614                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12615                           cf_have_incdir=yes; break
12616                         fi
12617                   done
12618                 fi
12619
12620                 if test "$cf_have_incdir" = no ; then
12621                   if test "$cf_add_incdir" = /usr/local/include ; then
12622                         if test "$GCC" = yes
12623                         then
12624                           cf_save_CPPFLAGS=$CPPFLAGS
12625
12626         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12627         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12628
12629                           cat >"conftest.$ac_ext" <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632 #include <stdio.h>
12633 int
12634 main (void)
12635 {
12636 printf("Hello")
12637   ;
12638   return 0;
12639 }
12640 _ACEOF
12641 rm -f "conftest.$ac_objext"
12642 if { (eval echo "$as_me:12642: \"$ac_compile\"") >&5
12643   (eval $ac_compile) 2>&5
12644   ac_status=$?
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit "$ac_status"); } &&
12647          { ac_try='test -s "conftest.$ac_objext"'
12648   { (eval echo "$as_me:12648: \"$ac_try\"") >&5
12649   (eval $ac_try) 2>&5
12650   ac_status=$?
12651   echo "$as_me:12651: \$? = $ac_status" >&5
12652   (exit "$ac_status"); }; }; then
12653   :
12654 else
12655   echo "$as_me: failed program was:" >&5
12656 cat "conftest.$ac_ext" >&5
12657 cf_have_incdir=yes
12658 fi
12659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12660                           CPPFLAGS=$cf_save_CPPFLAGS
12661                         fi
12662                   fi
12663                 fi
12664
12665                 if test "$cf_have_incdir" = no ; then
12666                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12667
12668 echo "${as_me:-configure}:12668: testing adding $cf_add_incdir to include-path ..." 1>&5
12669
12670                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12671
12672                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12673                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12674                   cf_add_incdir="$cf_top_incdir"
12675                 else
12676                   break
12677                 fi
12678           else
12679                 break
12680           fi
12681         done
12682   done
12683 fi
12684
12685 if test -n "$cf_cv_library_path_utf8" ; then
12686         for cf_add_libdir in $cf_cv_library_path_utf8
12687         do
12688                 if test "$cf_add_libdir" = /usr/lib ; then
12689                         :
12690                 elif test -d "$cf_add_libdir"
12691                 then
12692                         cf_have_libdir=no
12693                         if test -n "$LDFLAGS$LIBS" ; then
12694                                 # a loop is needed to ensure we can add subdirs of existing dirs
12695                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12696                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12697                                                 cf_have_libdir=yes; break
12698                                         fi
12699                                 done
12700                         fi
12701                         if test "$cf_have_libdir" = no ; then
12702                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12703
12704 echo "${as_me:-configure}:12704: testing adding $cf_add_libdir to library-path ..." 1>&5
12705
12706                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12707                         fi
12708                 fi
12709         done
12710 fi
12711
12712 cf_add_libs="$LIBS"
12713 # reverse order
12714 cf_add_0lib=
12715 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12716 # filter duplicates
12717 for cf_add_1lib in $cf_add_0lib; do
12718         for cf_add_2lib in $cf_add_libs; do
12719                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12720                         cf_add_1lib=
12721                         break
12722                 fi
12723         done
12724         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12725 done
12726 LIBS="$cf_add_libs"
12727
12728 fi
12729
12730                 if test "$cf_cv_utf8_lib" != no ; then
12731                         NCURSES_LIBUTF8=1
12732                 fi
12733         fi
12734
12735 # This is needed on Tru64 5.0 to declare mbstate_t
12736 echo "$as_me:12736: checking if we must include wchar.h to declare mbstate_t" >&5
12737 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12738 if test "${cf_cv_mbstate_t+set}" = set; then
12739   echo $ECHO_N "(cached) $ECHO_C" >&6
12740 else
12741
12742 cat >"conftest.$ac_ext" <<_ACEOF
12743 #line 12743 "configure"
12744 #include "confdefs.h"
12745
12746 #include <stdlib.h>
12747 #include <stdarg.h>
12748 #include <stdio.h>
12749 #ifdef HAVE_LIBUTF8_H
12750 #include <libutf8.h>
12751 #endif
12752 int
12753 main (void)
12754 {
12755 mbstate_t state
12756   ;
12757   return 0;
12758 }
12759 _ACEOF
12760 rm -f "conftest.$ac_objext"
12761 if { (eval echo "$as_me:12761: \"$ac_compile\"") >&5
12762   (eval $ac_compile) 2>&5
12763   ac_status=$?
12764   echo "$as_me:12764: \$? = $ac_status" >&5
12765   (exit "$ac_status"); } &&
12766          { ac_try='test -s "conftest.$ac_objext"'
12767   { (eval echo "$as_me:12767: \"$ac_try\"") >&5
12768   (eval $ac_try) 2>&5
12769   ac_status=$?
12770   echo "$as_me:12770: \$? = $ac_status" >&5
12771   (exit "$ac_status"); }; }; then
12772   cf_cv_mbstate_t=no
12773 else
12774   echo "$as_me: failed program was:" >&5
12775 cat "conftest.$ac_ext" >&5
12776 cat >"conftest.$ac_ext" <<_ACEOF
12777 #line 12777 "configure"
12778 #include "confdefs.h"
12779
12780 #include <stdlib.h>
12781 #include <stdarg.h>
12782 #include <stdio.h>
12783 #include <wchar.h>
12784 #ifdef HAVE_LIBUTF8_H
12785 #include <libutf8.h>
12786 #endif
12787 int
12788 main (void)
12789 {
12790 mbstate_t value
12791   ;
12792   return 0;
12793 }
12794 _ACEOF
12795 rm -f "conftest.$ac_objext"
12796 if { (eval echo "$as_me:12796: \"$ac_compile\"") >&5
12797   (eval $ac_compile) 2>&5
12798   ac_status=$?
12799   echo "$as_me:12799: \$? = $ac_status" >&5
12800   (exit "$ac_status"); } &&
12801          { ac_try='test -s "conftest.$ac_objext"'
12802   { (eval echo "$as_me:12802: \"$ac_try\"") >&5
12803   (eval $ac_try) 2>&5
12804   ac_status=$?
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit "$ac_status"); }; }; then
12807   cf_cv_mbstate_t=yes
12808 else
12809   echo "$as_me: failed program was:" >&5
12810 cat "conftest.$ac_ext" >&5
12811 cf_cv_mbstate_t=unknown
12812 fi
12813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12814 fi
12815 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12816 fi
12817 echo "$as_me:12817: result: $cf_cv_mbstate_t" >&5
12818 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12819
12820 if test "$cf_cv_mbstate_t" = yes ; then
12821
12822 cat >>confdefs.h <<\EOF
12823 #define NEED_WCHAR_H 1
12824 EOF
12825
12826         NEED_WCHAR_H=1
12827 fi
12828
12829 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12830 if test "$cf_cv_mbstate_t" = unknown ; then
12831         NCURSES_MBSTATE_T=1
12832 fi
12833
12834 # This is needed on Tru64 5.0 to declare wchar_t
12835 echo "$as_me:12835: checking if we must include wchar.h to declare wchar_t" >&5
12836 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12837 if test "${cf_cv_wchar_t+set}" = set; then
12838   echo $ECHO_N "(cached) $ECHO_C" >&6
12839 else
12840
12841 cat >"conftest.$ac_ext" <<_ACEOF
12842 #line 12842 "configure"
12843 #include "confdefs.h"
12844
12845 #include <stdlib.h>
12846 #include <stdarg.h>
12847 #include <stdio.h>
12848 #ifdef HAVE_LIBUTF8_H
12849 #include <libutf8.h>
12850 #endif
12851 int
12852 main (void)
12853 {
12854 wchar_t state
12855   ;
12856   return 0;
12857 }
12858 _ACEOF
12859 rm -f "conftest.$ac_objext"
12860 if { (eval echo "$as_me:12860: \"$ac_compile\"") >&5
12861   (eval $ac_compile) 2>&5
12862   ac_status=$?
12863   echo "$as_me:12863: \$? = $ac_status" >&5
12864   (exit "$ac_status"); } &&
12865          { ac_try='test -s "conftest.$ac_objext"'
12866   { (eval echo "$as_me:12866: \"$ac_try\"") >&5
12867   (eval $ac_try) 2>&5
12868   ac_status=$?
12869   echo "$as_me:12869: \$? = $ac_status" >&5
12870   (exit "$ac_status"); }; }; then
12871   cf_cv_wchar_t=no
12872 else
12873   echo "$as_me: failed program was:" >&5
12874 cat "conftest.$ac_ext" >&5
12875 cat >"conftest.$ac_ext" <<_ACEOF
12876 #line 12876 "configure"
12877 #include "confdefs.h"
12878
12879 #include <stdlib.h>
12880 #include <stdarg.h>
12881 #include <stdio.h>
12882 #include <wchar.h>
12883 #ifdef HAVE_LIBUTF8_H
12884 #include <libutf8.h>
12885 #endif
12886 int
12887 main (void)
12888 {
12889 wchar_t value
12890   ;
12891   return 0;
12892 }
12893 _ACEOF
12894 rm -f "conftest.$ac_objext"
12895 if { (eval echo "$as_me:12895: \"$ac_compile\"") >&5
12896   (eval $ac_compile) 2>&5
12897   ac_status=$?
12898   echo "$as_me:12898: \$? = $ac_status" >&5
12899   (exit "$ac_status"); } &&
12900          { ac_try='test -s "conftest.$ac_objext"'
12901   { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902   (eval $ac_try) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit "$ac_status"); }; }; then
12906   cf_cv_wchar_t=yes
12907 else
12908   echo "$as_me: failed program was:" >&5
12909 cat "conftest.$ac_ext" >&5
12910 cf_cv_wchar_t=unknown
12911 fi
12912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12913 fi
12914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12915 fi
12916 echo "$as_me:12916: result: $cf_cv_wchar_t" >&5
12917 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12918
12919 if test "$cf_cv_wchar_t" = yes ; then
12920
12921 cat >>confdefs.h <<\EOF
12922 #define NEED_WCHAR_H 1
12923 EOF
12924
12925         NEED_WCHAR_H=1
12926 fi
12927
12928 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12929 if test "$cf_cv_wchar_t" = unknown ; then
12930         NCURSES_WCHAR_T=1
12931 fi
12932
12933 # if we find wchar_t in either place, use substitution to provide a fallback.
12934 if test "$cf_cv_wchar_t" != unknown ; then
12935         NCURSES_OK_WCHAR_T=1
12936 fi
12937
12938 # This is needed on Tru64 5.0 to declare wint_t
12939 echo "$as_me:12939: checking if we must include wchar.h to declare wint_t" >&5
12940 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12941 if test "${cf_cv_wint_t+set}" = set; then
12942   echo $ECHO_N "(cached) $ECHO_C" >&6
12943 else
12944
12945 cat >"conftest.$ac_ext" <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12948
12949 #include <stdlib.h>
12950 #include <stdarg.h>
12951 #include <stdio.h>
12952 #ifdef HAVE_LIBUTF8_H
12953 #include <libutf8.h>
12954 #endif
12955 int
12956 main (void)
12957 {
12958 wint_t state
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f "conftest.$ac_objext"
12964 if { (eval echo "$as_me:12964: \"$ac_compile\"") >&5
12965   (eval $ac_compile) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit "$ac_status"); } &&
12969          { ac_try='test -s "conftest.$ac_objext"'
12970   { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:12973: \$? = $ac_status" >&5
12974   (exit "$ac_status"); }; }; then
12975   cf_cv_wint_t=no
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat "conftest.$ac_ext" >&5
12979 cat >"conftest.$ac_ext" <<_ACEOF
12980 #line 12980 "configure"
12981 #include "confdefs.h"
12982
12983 #include <stdlib.h>
12984 #include <stdarg.h>
12985 #include <stdio.h>
12986 #include <wchar.h>
12987 #ifdef HAVE_LIBUTF8_H
12988 #include <libutf8.h>
12989 #endif
12990 int
12991 main (void)
12992 {
12993 wint_t value
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 rm -f "conftest.$ac_objext"
12999 if { (eval echo "$as_me:12999: \"$ac_compile\"") >&5
13000   (eval $ac_compile) 2>&5
13001   ac_status=$?
13002   echo "$as_me:13002: \$? = $ac_status" >&5
13003   (exit "$ac_status"); } &&
13004          { ac_try='test -s "conftest.$ac_objext"'
13005   { (eval echo "$as_me:13005: \"$ac_try\"") >&5
13006   (eval $ac_try) 2>&5
13007   ac_status=$?
13008   echo "$as_me:13008: \$? = $ac_status" >&5
13009   (exit "$ac_status"); }; }; then
13010   cf_cv_wint_t=yes
13011 else
13012   echo "$as_me: failed program was:" >&5
13013 cat "conftest.$ac_ext" >&5
13014 cf_cv_wint_t=unknown
13015 fi
13016 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13017 fi
13018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13019 fi
13020 echo "$as_me:13020: result: $cf_cv_wint_t" >&5
13021 echo "${ECHO_T}$cf_cv_wint_t" >&6
13022
13023 if test "$cf_cv_wint_t" = yes ; then
13024
13025 cat >>confdefs.h <<\EOF
13026 #define NEED_WCHAR_H 1
13027 EOF
13028
13029         NEED_WCHAR_H=1
13030 fi
13031
13032 # if we do not find wint_t in either place, use substitution to provide a fallback.
13033 if test "$cf_cv_wint_t" = unknown ; then
13034         NCURSES_WINT_T=1
13035 fi
13036
13037 # if we find wint_t in either place, use substitution to provide a fallback.
13038 if test "$cf_cv_wint_t" != unknown ; then
13039         NCURSES_OK_WINT_T=1
13040 fi
13041
13042         if test "$NCURSES_MBSTATE_T" != 0; then
13043
13044 cat >>confdefs.h <<\EOF
13045 #define NEED_MBSTATE_T_DEF 1
13046 EOF
13047
13048         fi
13049 fi
13050
13051 ###   use option --disable-lp64 to allow long chtype
13052 echo "$as_me:13052: checking whether to enable _LP64 definition in curses.h" >&5
13053 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13054
13055 # Check whether --enable-lp64 or --disable-lp64 was given.
13056 if test "${enable_lp64+set}" = set; then
13057   enableval="$enable_lp64"
13058   with_lp64=$enableval
13059 else
13060   with_lp64=$cf_dft_with_lp64
13061 fi;
13062 echo "$as_me:13062: result: $with_lp64" >&5
13063 echo "${ECHO_T}$with_lp64" >&6
13064
13065 if test "x$with_lp64" = xyes ; then
13066         cf_cv_enable_lp64=1
13067 else
13068         cf_cv_enable_lp64=0
13069 fi
13070
13071 # Check whether --enable-largefile or --disable-largefile was given.
13072 if test "${enable_largefile+set}" = set; then
13073   enableval="$enable_largefile"
13074
13075 fi;
13076 if test "$enable_largefile" != no; then
13077
13078   echo "$as_me:13078: checking for special C compiler options needed for large files" >&5
13079 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13080 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13081   echo $ECHO_N "(cached) $ECHO_C" >&6
13082 else
13083   ac_cv_sys_largefile_CC=no
13084      if test "$GCC" != yes; then
13085        ac_save_CC=$CC
13086        while :; do
13087          # IRIX 6.2 and later do not support large files by default,
13088          # so use the C compiler's -n32 option if that helps.
13089          cat >"conftest.$ac_ext" <<_ACEOF
13090 #line 13090 "configure"
13091 #include "confdefs.h"
13092 #include <sys/types.h>
13093  /* Check that off_t can represent 2**63 - 1 correctly.
13094     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13095     since some C++ compilers masquerading as C compilers
13096     incorrectly reject 9223372036854775807.  */
13097 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13098   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13099                        && LARGE_OFF_T % 2147483647 == 1)
13100                       ? 1 : -1];
13101 int
13102 main (void)
13103 {
13104
13105   ;
13106   return 0;
13107 }
13108 _ACEOF
13109          rm -f "conftest.$ac_objext"
13110 if { (eval echo "$as_me:13110: \"$ac_compile\"") >&5
13111   (eval $ac_compile) 2>&5
13112   ac_status=$?
13113   echo "$as_me:13113: \$? = $ac_status" >&5
13114   (exit "$ac_status"); } &&
13115          { ac_try='test -s "conftest.$ac_objext"'
13116   { (eval echo "$as_me:13116: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:13119: \$? = $ac_status" >&5
13120   (exit "$ac_status"); }; }; then
13121   break
13122 else
13123   echo "$as_me: failed program was:" >&5
13124 cat "conftest.$ac_ext" >&5
13125 fi
13126 rm -f "conftest.$ac_objext"
13127          CC="$CC -n32"
13128          rm -f "conftest.$ac_objext"
13129 if { (eval echo "$as_me:13129: \"$ac_compile\"") >&5
13130   (eval $ac_compile) 2>&5
13131   ac_status=$?
13132   echo "$as_me:13132: \$? = $ac_status" >&5
13133   (exit "$ac_status"); } &&
13134          { ac_try='test -s "conftest.$ac_objext"'
13135   { (eval echo "$as_me:13135: \"$ac_try\"") >&5
13136   (eval $ac_try) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit "$ac_status"); }; }; then
13140   ac_cv_sys_largefile_CC=' -n32'; break
13141 else
13142   echo "$as_me: failed program was:" >&5
13143 cat "conftest.$ac_ext" >&5
13144 fi
13145 rm -f "conftest.$ac_objext"
13146          break
13147        done
13148        CC=$ac_save_CC
13149        rm -f "conftest.$ac_ext"
13150     fi
13151 fi
13152 echo "$as_me:13152: result: $ac_cv_sys_largefile_CC" >&5
13153 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13154   if test "$ac_cv_sys_largefile_CC" != no; then
13155     CC=$CC$ac_cv_sys_largefile_CC
13156   fi
13157
13158   echo "$as_me:13158: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13159 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13160 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13161   echo $ECHO_N "(cached) $ECHO_C" >&6
13162 else
13163   while :; do
13164   ac_cv_sys_file_offset_bits=no
13165   cat >"conftest.$ac_ext" <<_ACEOF
13166 #line 13166 "configure"
13167 #include "confdefs.h"
13168 #include <sys/types.h>
13169  /* Check that off_t can represent 2**63 - 1 correctly.
13170     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13171     since some C++ compilers masquerading as C compilers
13172     incorrectly reject 9223372036854775807.  */
13173 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13174   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13175                        && LARGE_OFF_T % 2147483647 == 1)
13176                       ? 1 : -1];
13177 int
13178 main (void)
13179 {
13180
13181   ;
13182   return 0;
13183 }
13184 _ACEOF
13185 rm -f "conftest.$ac_objext"
13186 if { (eval echo "$as_me:13186: \"$ac_compile\"") >&5
13187   (eval $ac_compile) 2>&5
13188   ac_status=$?
13189   echo "$as_me:13189: \$? = $ac_status" >&5
13190   (exit "$ac_status"); } &&
13191          { ac_try='test -s "conftest.$ac_objext"'
13192   { (eval echo "$as_me:13192: \"$ac_try\"") >&5
13193   (eval $ac_try) 2>&5
13194   ac_status=$?
13195   echo "$as_me:13195: \$? = $ac_status" >&5
13196   (exit "$ac_status"); }; }; then
13197   break
13198 else
13199   echo "$as_me: failed program was:" >&5
13200 cat "conftest.$ac_ext" >&5
13201 fi
13202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13203   cat >"conftest.$ac_ext" <<_ACEOF
13204 #line 13204 "configure"
13205 #include "confdefs.h"
13206 #define _FILE_OFFSET_BITS 64
13207 #include <sys/types.h>
13208  /* Check that off_t can represent 2**63 - 1 correctly.
13209     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13210     since some C++ compilers masquerading as C compilers
13211     incorrectly reject 9223372036854775807.  */
13212 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13213   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13214                        && LARGE_OFF_T % 2147483647 == 1)
13215                       ? 1 : -1];
13216 int
13217 main (void)
13218 {
13219
13220   ;
13221   return 0;
13222 }
13223 _ACEOF
13224 rm -f "conftest.$ac_objext"
13225 if { (eval echo "$as_me:13225: \"$ac_compile\"") >&5
13226   (eval $ac_compile) 2>&5
13227   ac_status=$?
13228   echo "$as_me:13228: \$? = $ac_status" >&5
13229   (exit "$ac_status"); } &&
13230          { ac_try='test -s "conftest.$ac_objext"'
13231   { (eval echo "$as_me:13231: \"$ac_try\"") >&5
13232   (eval $ac_try) 2>&5
13233   ac_status=$?
13234   echo "$as_me:13234: \$? = $ac_status" >&5
13235   (exit "$ac_status"); }; }; then
13236   ac_cv_sys_file_offset_bits=64; break
13237 else
13238   echo "$as_me: failed program was:" >&5
13239 cat "conftest.$ac_ext" >&5
13240 fi
13241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13242   break
13243 done
13244 fi
13245 echo "$as_me:13245: result: $ac_cv_sys_file_offset_bits" >&5
13246 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13247 if test "$ac_cv_sys_file_offset_bits" != no; then
13248
13249 cat >>confdefs.h <<EOF
13250 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13251 EOF
13252
13253 fi
13254 rm -rf conftest*
13255   echo "$as_me:13255: checking for _LARGE_FILES value needed for large files" >&5
13256 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13257 if test "${ac_cv_sys_large_files+set}" = set; then
13258   echo $ECHO_N "(cached) $ECHO_C" >&6
13259 else
13260   while :; do
13261   ac_cv_sys_large_files=no
13262   cat >"conftest.$ac_ext" <<_ACEOF
13263 #line 13263 "configure"
13264 #include "confdefs.h"
13265 #include <sys/types.h>
13266  /* Check that off_t can represent 2**63 - 1 correctly.
13267     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13268     since some C++ compilers masquerading as C compilers
13269     incorrectly reject 9223372036854775807.  */
13270 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13271   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13272                        && LARGE_OFF_T % 2147483647 == 1)
13273                       ? 1 : -1];
13274 int
13275 main (void)
13276 {
13277
13278   ;
13279   return 0;
13280 }
13281 _ACEOF
13282 rm -f "conftest.$ac_objext"
13283 if { (eval echo "$as_me:13283: \"$ac_compile\"") >&5
13284   (eval $ac_compile) 2>&5
13285   ac_status=$?
13286   echo "$as_me:13286: \$? = $ac_status" >&5
13287   (exit "$ac_status"); } &&
13288          { ac_try='test -s "conftest.$ac_objext"'
13289   { (eval echo "$as_me:13289: \"$ac_try\"") >&5
13290   (eval $ac_try) 2>&5
13291   ac_status=$?
13292   echo "$as_me:13292: \$? = $ac_status" >&5
13293   (exit "$ac_status"); }; }; then
13294   break
13295 else
13296   echo "$as_me: failed program was:" >&5
13297 cat "conftest.$ac_ext" >&5
13298 fi
13299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13300   cat >"conftest.$ac_ext" <<_ACEOF
13301 #line 13301 "configure"
13302 #include "confdefs.h"
13303 #define _LARGE_FILES 1
13304 #include <sys/types.h>
13305  /* Check that off_t can represent 2**63 - 1 correctly.
13306     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13307     since some C++ compilers masquerading as C compilers
13308     incorrectly reject 9223372036854775807.  */
13309 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13310   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13311                        && LARGE_OFF_T % 2147483647 == 1)
13312                       ? 1 : -1];
13313 int
13314 main (void)
13315 {
13316
13317   ;
13318   return 0;
13319 }
13320 _ACEOF
13321 rm -f "conftest.$ac_objext"
13322 if { (eval echo "$as_me:13322: \"$ac_compile\"") >&5
13323   (eval $ac_compile) 2>&5
13324   ac_status=$?
13325   echo "$as_me:13325: \$? = $ac_status" >&5
13326   (exit "$ac_status"); } &&
13327          { ac_try='test -s "conftest.$ac_objext"'
13328   { (eval echo "$as_me:13328: \"$ac_try\"") >&5
13329   (eval $ac_try) 2>&5
13330   ac_status=$?
13331   echo "$as_me:13331: \$? = $ac_status" >&5
13332   (exit "$ac_status"); }; }; then
13333   ac_cv_sys_large_files=1; break
13334 else
13335   echo "$as_me: failed program was:" >&5
13336 cat "conftest.$ac_ext" >&5
13337 fi
13338 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13339   break
13340 done
13341 fi
13342 echo "$as_me:13342: result: $ac_cv_sys_large_files" >&5
13343 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13344 if test "$ac_cv_sys_large_files" != no; then
13345
13346 cat >>confdefs.h <<EOF
13347 #define _LARGE_FILES $ac_cv_sys_large_files
13348 EOF
13349
13350 fi
13351 rm -rf conftest*
13352 fi
13353
13354         if test "$enable_largefile" != no ; then
13355         echo "$as_me:13355: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13356 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13357 if test "${ac_cv_sys_largefile_source+set}" = set; then
13358   echo $ECHO_N "(cached) $ECHO_C" >&6
13359 else
13360   while :; do
13361   ac_cv_sys_largefile_source=no
13362   cat >"conftest.$ac_ext" <<_ACEOF
13363 #line 13363 "configure"
13364 #include "confdefs.h"
13365 #include <stdio.h>
13366 int
13367 main (void)
13368 {
13369 return !fseeko;
13370   ;
13371   return 0;
13372 }
13373 _ACEOF
13374 rm -f "conftest.$ac_objext"
13375 if { (eval echo "$as_me:13375: \"$ac_compile\"") >&5
13376   (eval $ac_compile) 2>&5
13377   ac_status=$?
13378   echo "$as_me:13378: \$? = $ac_status" >&5
13379   (exit "$ac_status"); } &&
13380          { ac_try='test -s "conftest.$ac_objext"'
13381   { (eval echo "$as_me:13381: \"$ac_try\"") >&5
13382   (eval $ac_try) 2>&5
13383   ac_status=$?
13384   echo "$as_me:13384: \$? = $ac_status" >&5
13385   (exit "$ac_status"); }; }; then
13386   break
13387 else
13388   echo "$as_me: failed program was:" >&5
13389 cat "conftest.$ac_ext" >&5
13390 fi
13391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13392   cat >"conftest.$ac_ext" <<_ACEOF
13393 #line 13393 "configure"
13394 #include "confdefs.h"
13395 #define _LARGEFILE_SOURCE 1
13396 #include <stdio.h>
13397 int
13398 main (void)
13399 {
13400 return !fseeko;
13401   ;
13402   return 0;
13403 }
13404 _ACEOF
13405 rm -f "conftest.$ac_objext"
13406 if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
13407   (eval $ac_compile) 2>&5
13408   ac_status=$?
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit "$ac_status"); } &&
13411          { ac_try='test -s "conftest.$ac_objext"'
13412   { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413   (eval $ac_try) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit "$ac_status"); }; }; then
13417   ac_cv_sys_largefile_source=1; break
13418 else
13419   echo "$as_me: failed program was:" >&5
13420 cat "conftest.$ac_ext" >&5
13421 fi
13422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13423   break
13424 done
13425 fi
13426 echo "$as_me:13426: result: $ac_cv_sys_largefile_source" >&5
13427 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13428 if test "$ac_cv_sys_largefile_source" != no; then
13429
13430 cat >>confdefs.h <<EOF
13431 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13432 EOF
13433
13434 fi
13435 rm -rf conftest*
13436
13437 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13438 # in glibc 2.1.3, but that breaks too many other things.
13439 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13440 echo "$as_me:13440: checking for fseeko" >&5
13441 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13442 if test "${ac_cv_func_fseeko+set}" = set; then
13443   echo $ECHO_N "(cached) $ECHO_C" >&6
13444 else
13445   cat >"conftest.$ac_ext" <<_ACEOF
13446 #line 13446 "configure"
13447 #include "confdefs.h"
13448 #include <stdio.h>
13449 int
13450 main (void)
13451 {
13452 return fseeko && fseeko (stdin, 0, 0);
13453   ;
13454   return 0;
13455 }
13456 _ACEOF
13457 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13458 if { (eval echo "$as_me:13458: \"$ac_link\"") >&5
13459   (eval $ac_link) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit "$ac_status"); } &&
13463          { ac_try='test -s "conftest$ac_exeext"'
13464   { (eval echo "$as_me:13464: \"$ac_try\"") >&5
13465   (eval $ac_try) 2>&5
13466   ac_status=$?
13467   echo "$as_me:13467: \$? = $ac_status" >&5
13468   (exit "$ac_status"); }; }; then
13469   ac_cv_func_fseeko=yes
13470 else
13471   echo "$as_me: failed program was:" >&5
13472 cat "conftest.$ac_ext" >&5
13473 ac_cv_func_fseeko=no
13474 fi
13475 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13476 fi
13477 echo "$as_me:13477: result: $ac_cv_func_fseeko" >&5
13478 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13479 if test $ac_cv_func_fseeko = yes; then
13480
13481 cat >>confdefs.h <<\EOF
13482 #define HAVE_FSEEKO 1
13483 EOF
13484
13485 fi
13486
13487         # Normally we would collect these definitions in the config.h,
13488         # but (like _XOPEN_SOURCE), some environments rely on having these
13489         # defined before any of the system headers are included.  Another
13490         # case comes up with C++, e.g., on AIX the compiler compiles the
13491         # header files by themselves before looking at the body files it is
13492         # told to compile.  For ncurses, those header files do not include
13493         # the config.h
13494         if test "$ac_cv_sys_large_files" != no
13495         then
13496
13497         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13498         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13499
13500         fi
13501         if test "$ac_cv_sys_largefile_source" != no
13502         then
13503
13504         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13505         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13506
13507         fi
13508         if test "$ac_cv_sys_file_offset_bits" != no
13509         then
13510
13511         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13512         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13513
13514         fi
13515
13516         echo "$as_me:13516: checking whether to use struct dirent64" >&5
13517 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13518 if test "${cf_cv_struct_dirent64+set}" = set; then
13519   echo $ECHO_N "(cached) $ECHO_C" >&6
13520 else
13521
13522                 cat >"conftest.$ac_ext" <<_ACEOF
13523 #line 13523 "configure"
13524 #include "confdefs.h"
13525
13526 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13527 #include <sys/types.h>
13528 #include <dirent.h>
13529
13530 int
13531 main (void)
13532 {
13533
13534                 /* if transitional largefile support is setup, this is true */
13535                 extern struct dirent64 * readdir(DIR *);
13536                 struct dirent64 *x = readdir((DIR *)0);
13537                 struct dirent *y = readdir((DIR *)0);
13538                 int z = x - y;
13539                 (void)z;
13540
13541   ;
13542   return 0;
13543 }
13544 _ACEOF
13545 rm -f "conftest.$ac_objext"
13546 if { (eval echo "$as_me:13546: \"$ac_compile\"") >&5
13547   (eval $ac_compile) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit "$ac_status"); } &&
13551          { ac_try='test -s "conftest.$ac_objext"'
13552   { (eval echo "$as_me:13552: \"$ac_try\"") >&5
13553   (eval $ac_try) 2>&5
13554   ac_status=$?
13555   echo "$as_me:13555: \$? = $ac_status" >&5
13556   (exit "$ac_status"); }; }; then
13557   cf_cv_struct_dirent64=yes
13558 else
13559   echo "$as_me: failed program was:" >&5
13560 cat "conftest.$ac_ext" >&5
13561 cf_cv_struct_dirent64=no
13562 fi
13563 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13564
13565 fi
13566 echo "$as_me:13566: result: $cf_cv_struct_dirent64" >&5
13567 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13568         test "$cf_cv_struct_dirent64" = yes &&
13569 cat >>confdefs.h <<\EOF
13570 #define HAVE_STRUCT_DIRENT64 1
13571 EOF
13572
13573         fi
13574
13575 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13576 echo "$as_me:13576: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13577 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13578
13579 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13580 if test "${enable_tparm_varargs+set}" = set; then
13581   enableval="$enable_tparm_varargs"
13582   with_tparm_varargs=$enableval
13583 else
13584   with_tparm_varargs=yes
13585 fi;
13586 echo "$as_me:13586: result: $with_tparm_varargs" >&5
13587 echo "${ECHO_T}$with_tparm_varargs" >&6
13588 NCURSES_TPARM_VARARGS=0
13589 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13590
13591 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13592 if test "$with_ticlib" != no ; then
13593 echo "$as_me:13593: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13594 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13595
13596 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13597 if test "${enable_tic_depends+set}" = set; then
13598   enableval="$enable_tic_depends"
13599   with_tic_depends=$enableval
13600 else
13601   with_tic_depends=yes
13602 fi;
13603 echo "$as_me:13603: result: $with_tic_depends" >&5
13604 echo "${ECHO_T}$with_tic_depends" >&6
13605 else
13606         with_tic_depends=no
13607 fi
13608
13609 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13610 echo "$as_me:13610: checking if you want to enable wattr* macros" >&5
13611 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13612
13613 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13614 if test "${enable_wattr_macros+set}" = set; then
13615   enableval="$enable_wattr_macros"
13616   with_wattr_macros=$enableval
13617 else
13618   with_wattr_macros=no
13619 fi;
13620 if [ "x$with_wattr_macros" != xyes ]; then
13621         NCURSES_WATTR_MACROS=0
13622         echo "$as_me:13622: result: no" >&5
13623 echo "${ECHO_T}no" >&6
13624 else
13625         NCURSES_WATTR_MACROS=1
13626         echo "$as_me:13626: result: yes" >&5
13627 echo "${ECHO_T}yes" >&6
13628 fi
13629
13630 echo "$as_me:13630: checking for X11 rgb file" >&5
13631 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13632
13633 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13634 if test "${with_x11_rgb+set}" = set; then
13635   withval="$with_x11_rgb"
13636   RGB_PATH=$withval
13637 else
13638   RGB_PATH=auto
13639 fi;
13640
13641 if test "x$RGB_PATH" = xauto
13642 then
13643         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13644         for cf_path in \
13645                 /opt/local/share/X11/rgb.txt \
13646                 /opt/X11/share/X11/rgb.txt \
13647                 /usr/share/X11/rgb.txt \
13648                 /usr/X11/share/X11/rgb.txt \
13649                 /usr/X11/lib/X11/rgb.txt \
13650                 /usr/lib/X11/rgb.txt \
13651                 /etc/X11/rgb.txt \
13652                 /usr/pkg/lib/X11/rgb.txt \
13653                 /usr/X11R7/lib/X11/rgb.txt \
13654                 /usr/X11R6/lib/X11/rgb.txt \
13655                 /usr/X11R5/lib/X11/rgb.txt \
13656                 /usr/X11R4/lib/X11/rgb.txt \
13657                 /usr/local/lib/X11/rgb.txt \
13658                 /usr/local/share/X11/rgb.txt \
13659                 /usr/lib64/X11/rgb.txt
13660         do
13661                 if test -f "$cf_path" ; then
13662                         RGB_PATH="$cf_path"
13663                         break
13664                 fi
13665         done
13666 else
13667         cf_path=$RGB_PATH
13668
13669 if test "x$prefix" != xNONE; then
13670         cf_path_syntax="$prefix"
13671 else
13672         cf_path_syntax="$ac_default_prefix"
13673 fi
13674
13675 case ".$cf_path" in
13676 (.\$\(*\)*|.\'*\'*)
13677         ;;
13678 (..|./*|.\\*)
13679         ;;
13680 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13681         ;;
13682 (.\$\{*prefix\}*|.\$\{*dir\}*)
13683         eval cf_path="$cf_path"
13684         case ".$cf_path" in
13685         (.NONE/*)
13686                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13687                 ;;
13688         esac
13689         ;;
13690 (.no|.NONE/*)
13691         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13692         ;;
13693 (*)
13694         { { echo "$as_me:13694: error: expected a pathname, not \"$cf_path\"" >&5
13695 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13696    { (exit 1); exit 1; }; }
13697         ;;
13698 esac
13699
13700 fi
13701
13702 echo "$as_me:13702: result: $RGB_PATH" >&5
13703 echo "${ECHO_T}$RGB_PATH" >&6
13704
13705 cat >>confdefs.h <<EOF
13706 #define RGB_PATH "$cf_path"
13707 EOF
13708
13709 no_x11_rgb=
13710 if test "$RGB_PATH" = no
13711 then
13712         no_x11_rgb="#"
13713 fi
13714
13715 ###   use option --with-bool to override bool's type
13716 echo "$as_me:13716: checking for type of bool" >&5
13717 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13718
13719 # Check whether --with-bool or --without-bool was given.
13720 if test "${with_bool+set}" = set; then
13721   withval="$with_bool"
13722   NCURSES_BOOL="$withval"
13723 else
13724   NCURSES_BOOL=auto
13725 fi;
13726 echo "$as_me:13726: result: $NCURSES_BOOL" >&5
13727 echo "${ECHO_T}$NCURSES_BOOL" >&6
13728
13729 echo "$as_me:13729: checking for alternate terminal capabilities file" >&5
13730 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13731
13732 # Check whether --with-caps or --without-caps was given.
13733 if test "${with_caps+set}" = set; then
13734   withval="$with_caps"
13735   TERMINFO_CAPS=Caps.$withval
13736 else
13737   TERMINFO_CAPS=Caps
13738 fi;
13739 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13740 echo "$as_me:13740: result: $TERMINFO_CAPS" >&5
13741 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13742
13743 ###   use option --with-chtype to override chtype's type
13744 echo "$as_me:13744: checking for type of chtype" >&5
13745 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13746
13747 # Check whether --with-chtype or --without-chtype was given.
13748 if test "${with_chtype+set}" = set; then
13749   withval="$with_chtype"
13750   NCURSES_CHTYPE="$withval"
13751 else
13752   NCURSES_CHTYPE=$cf_dft_chtype
13753 fi;
13754 echo "$as_me:13754: result: $NCURSES_CHTYPE" >&5
13755 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13756
13757 ###   use option --with-ospeed to override ospeed's type
13758 echo "$as_me:13758: checking for type of ospeed" >&5
13759 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13760
13761 # Check whether --with-ospeed or --without-ospeed was given.
13762 if test "${with_ospeed+set}" = set; then
13763   withval="$with_ospeed"
13764   NCURSES_OSPEED="$withval"
13765 else
13766   NCURSES_OSPEED=short
13767 fi;
13768 echo "$as_me:13768: result: $NCURSES_OSPEED" >&5
13769 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13770
13771 ###   use option --with-mmask-t to override mmask_t's type
13772 echo "$as_me:13772: checking for type of mmask_t" >&5
13773 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13774
13775 # Check whether --with-mmask-t or --without-mmask-t was given.
13776 if test "${with_mmask_t+set}" = set; then
13777   withval="$with_mmask_t"
13778   NCURSES_MMASK_T="$withval"
13779 else
13780   NCURSES_MMASK_T=$cf_dft_mmask_t
13781 fi;
13782 echo "$as_me:13782: result: $NCURSES_MMASK_T" >&5
13783 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13784
13785 ###   use option --with-ccharw-max to override CCHARW_MAX size
13786 echo "$as_me:13786: checking for size CCHARW_MAX" >&5
13787 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13788
13789 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13790 if test "${with_ccharw_max+set}" = set; then
13791   withval="$with_ccharw_max"
13792   NCURSES_CCHARW_MAX="$withval"
13793 else
13794   NCURSES_CCHARW_MAX=5
13795 fi;
13796 echo "$as_me:13796: result: $NCURSES_CCHARW_MAX" >&5
13797 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13798
13799 echo "$as_me:13799: checking for ANSI C header files" >&5
13800 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13801 if test "${ac_cv_header_stdc+set}" = set; then
13802   echo $ECHO_N "(cached) $ECHO_C" >&6
13803 else
13804   cat >"conftest.$ac_ext" <<_ACEOF
13805 #line 13805 "configure"
13806 #include "confdefs.h"
13807 #include <stdlib.h>
13808 #include <stdarg.h>
13809 #include <string.h>
13810 #include <float.h>
13811
13812 _ACEOF
13813 if { (eval echo "$as_me:13813: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13814   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13815   ac_status=$?
13816   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13817   rm -f conftest.er1
13818   cat conftest.err >&5
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit "$ac_status"); } >/dev/null; then
13821   if test -s conftest.err; then
13822     ac_cpp_err=$ac_c_preproc_warn_flag
13823   else
13824     ac_cpp_err=
13825   fi
13826 else
13827   ac_cpp_err=yes
13828 fi
13829 if test -z "$ac_cpp_err"; then
13830   ac_cv_header_stdc=yes
13831 else
13832   echo "$as_me: failed program was:" >&5
13833   cat "conftest.$ac_ext" >&5
13834   ac_cv_header_stdc=no
13835 fi
13836 rm -f conftest.err "conftest.$ac_ext"
13837
13838 if test $ac_cv_header_stdc = yes; then
13839   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13840   cat >"conftest.$ac_ext" <<_ACEOF
13841 #line 13841 "configure"
13842 #include "confdefs.h"
13843 #include <string.h>
13844
13845 _ACEOF
13846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13847   $EGREP "memchr" >/dev/null 2>&1; then
13848   :
13849 else
13850   ac_cv_header_stdc=no
13851 fi
13852 rm -rf conftest*
13853
13854 fi
13855
13856 if test $ac_cv_header_stdc = yes; then
13857   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13858   cat >"conftest.$ac_ext" <<_ACEOF
13859 #line 13859 "configure"
13860 #include "confdefs.h"
13861 #include <stdlib.h>
13862
13863 _ACEOF
13864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13865   $EGREP "free" >/dev/null 2>&1; then
13866   :
13867 else
13868   ac_cv_header_stdc=no
13869 fi
13870 rm -rf conftest*
13871
13872 fi
13873
13874 if test $ac_cv_header_stdc = yes; then
13875   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13876   if test "$cross_compiling" = yes; then
13877   :
13878 else
13879   cat >"conftest.$ac_ext" <<_ACEOF
13880 #line 13880 "configure"
13881 #include "confdefs.h"
13882 #include <ctype.h>
13883 #if ((' ' & 0x0FF) == 0x020)
13884 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13885 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13886 #else
13887 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13888                      || ('j' <= (c) && (c) <= 'r') \
13889                      || ('s' <= (c) && (c) <= 'z'))
13890 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13891 #endif
13892
13893 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13894 int
13895 main (void)
13896 {
13897   int i;
13898   for (i = 0; i < 256; i++)
13899     if (XOR (islower (i), ISLOWER (i))
13900         || toupper (i) != TOUPPER (i))
13901       $ac_main_return(2);
13902   $ac_main_return (0);
13903 }
13904 _ACEOF
13905 rm -f "conftest$ac_exeext"
13906 if { (eval echo "$as_me:13906: \"$ac_link\"") >&5
13907   (eval $ac_link) 2>&5
13908   ac_status=$?
13909   echo "$as_me:13909: \$? = $ac_status" >&5
13910   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13911   { (eval echo "$as_me:13911: \"$ac_try\"") >&5
13912   (eval $ac_try) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit "$ac_status"); }; }; then
13916   :
13917 else
13918   echo "$as_me: program exited with status $ac_status" >&5
13919 echo "$as_me: failed program was:" >&5
13920 cat "conftest.$ac_ext" >&5
13921 ac_cv_header_stdc=no
13922 fi
13923 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13924 fi
13925 fi
13926 fi
13927 echo "$as_me:13927: result: $ac_cv_header_stdc" >&5
13928 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13929 if test $ac_cv_header_stdc = yes; then
13930
13931 cat >>confdefs.h <<\EOF
13932 #define STDC_HEADERS 1
13933 EOF
13934
13935 fi
13936
13937 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13938
13939 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13940                   inttypes.h stdint.h unistd.h
13941 do
13942 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13943 echo "$as_me:13943: checking for $ac_header" >&5
13944 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13946   echo $ECHO_N "(cached) $ECHO_C" >&6
13947 else
13948   cat >"conftest.$ac_ext" <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 $ac_includes_default
13952 #include <$ac_header>
13953 _ACEOF
13954 rm -f "conftest.$ac_objext"
13955 if { (eval echo "$as_me:13955: \"$ac_compile\"") >&5
13956   (eval $ac_compile) 2>&5
13957   ac_status=$?
13958   echo "$as_me:13958: \$? = $ac_status" >&5
13959   (exit "$ac_status"); } &&
13960          { ac_try='test -s "conftest.$ac_objext"'
13961   { (eval echo "$as_me:13961: \"$ac_try\"") >&5
13962   (eval $ac_try) 2>&5
13963   ac_status=$?
13964   echo "$as_me:13964: \$? = $ac_status" >&5
13965   (exit "$ac_status"); }; }; then
13966   eval "$as_ac_Header=yes"
13967 else
13968   echo "$as_me: failed program was:" >&5
13969 cat "conftest.$ac_ext" >&5
13970 eval "$as_ac_Header=no"
13971 fi
13972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13973 fi
13974 echo "$as_me:13974: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13975 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13976 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13977   cat >>confdefs.h <<EOF
13978 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13979 EOF
13980
13981 fi
13982 done
13983
13984 echo "$as_me:13984: checking for signed char" >&5
13985 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13986 if test "${ac_cv_type_signed_char+set}" = set; then
13987   echo $ECHO_N "(cached) $ECHO_C" >&6
13988 else
13989   cat >"conftest.$ac_ext" <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992 $ac_includes_default
13993 int
13994 main (void)
13995 {
13996 if ((signed char *) 0)
13997   return 0;
13998 if (sizeof (signed char))
13999   return 0;
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f "conftest.$ac_objext"
14005 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006   (eval $ac_compile) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit "$ac_status"); } &&
14010          { ac_try='test -s "conftest.$ac_objext"'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit "$ac_status"); }; }; then
14016   ac_cv_type_signed_char=yes
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat "conftest.$ac_ext" >&5
14020 ac_cv_type_signed_char=no
14021 fi
14022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14023 fi
14024 echo "$as_me:14024: result: $ac_cv_type_signed_char" >&5
14025 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14026
14027 echo "$as_me:14027: checking size of signed char" >&5
14028 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14029 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14030   echo $ECHO_N "(cached) $ECHO_C" >&6
14031 else
14032   if test "$ac_cv_type_signed_char" = yes; then
14033   if test "$cross_compiling" = yes; then
14034   # Depending upon the size, compute the lo and hi bounds.
14035 cat >"conftest.$ac_ext" <<_ACEOF
14036 #line 14036 "configure"
14037 #include "confdefs.h"
14038 $ac_includes_default
14039 int
14040 main (void)
14041 {
14042 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14043   ;
14044   return 0;
14045 }
14046 _ACEOF
14047 rm -f "conftest.$ac_objext"
14048 if { (eval echo "$as_me:14048: \"$ac_compile\"") >&5
14049   (eval $ac_compile) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit "$ac_status"); } &&
14053          { ac_try='test -s "conftest.$ac_objext"'
14054   { (eval echo "$as_me:14054: \"$ac_try\"") >&5
14055   (eval $ac_try) 2>&5
14056   ac_status=$?
14057   echo "$as_me:14057: \$? = $ac_status" >&5
14058   (exit "$ac_status"); }; }; then
14059   ac_lo=0 ac_mid=0
14060   while :; do
14061     cat >"conftest.$ac_ext" <<_ACEOF
14062 #line 14062 "configure"
14063 #include "confdefs.h"
14064 $ac_includes_default
14065 int
14066 main (void)
14067 {
14068 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f "conftest.$ac_objext"
14074 if { (eval echo "$as_me:14074: \"$ac_compile\"") >&5
14075   (eval $ac_compile) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit "$ac_status"); } &&
14079          { ac_try='test -s "conftest.$ac_objext"'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit "$ac_status"); }; }; then
14085   ac_hi=$ac_mid; break
14086 else
14087   echo "$as_me: failed program was:" >&5
14088 cat "conftest.$ac_ext" >&5
14089 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14090 fi
14091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14092   done
14093 else
14094   echo "$as_me: failed program was:" >&5
14095 cat "conftest.$ac_ext" >&5
14096 ac_hi=-1 ac_mid=-1
14097   while :; do
14098     cat >"conftest.$ac_ext" <<_ACEOF
14099 #line 14099 "configure"
14100 #include "confdefs.h"
14101 $ac_includes_default
14102 int
14103 main (void)
14104 {
14105 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14106   ;
14107   return 0;
14108 }
14109 _ACEOF
14110 rm -f "conftest.$ac_objext"
14111 if { (eval echo "$as_me:14111: \"$ac_compile\"") >&5
14112   (eval $ac_compile) 2>&5
14113   ac_status=$?
14114   echo "$as_me:14114: \$? = $ac_status" >&5
14115   (exit "$ac_status"); } &&
14116          { ac_try='test -s "conftest.$ac_objext"'
14117   { (eval echo "$as_me:14117: \"$ac_try\"") >&5
14118   (eval $ac_try) 2>&5
14119   ac_status=$?
14120   echo "$as_me:14120: \$? = $ac_status" >&5
14121   (exit "$ac_status"); }; }; then
14122   ac_lo=$ac_mid; break
14123 else
14124   echo "$as_me: failed program was:" >&5
14125 cat "conftest.$ac_ext" >&5
14126 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14127 fi
14128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14129   done
14130 fi
14131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14132 # Binary search between lo and hi bounds.
14133 while test "x$ac_lo" != "x$ac_hi"; do
14134   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14135   cat >"conftest.$ac_ext" <<_ACEOF
14136 #line 14136 "configure"
14137 #include "confdefs.h"
14138 $ac_includes_default
14139 int
14140 main (void)
14141 {
14142 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14143   ;
14144   return 0;
14145 }
14146 _ACEOF
14147 rm -f "conftest.$ac_objext"
14148 if { (eval echo "$as_me:14148: \"$ac_compile\"") >&5
14149   (eval $ac_compile) 2>&5
14150   ac_status=$?
14151   echo "$as_me:14151: \$? = $ac_status" >&5
14152   (exit "$ac_status"); } &&
14153          { ac_try='test -s "conftest.$ac_objext"'
14154   { (eval echo "$as_me:14154: \"$ac_try\"") >&5
14155   (eval $ac_try) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit "$ac_status"); }; }; then
14159   ac_hi=$ac_mid
14160 else
14161   echo "$as_me: failed program was:" >&5
14162 cat "conftest.$ac_ext" >&5
14163 ac_lo=`expr "$ac_mid" + 1`
14164 fi
14165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14166 done
14167 ac_cv_sizeof_signed_char=$ac_lo
14168 else
14169   if test "$cross_compiling" = yes; then
14170   { { echo "$as_me:14170: error: cannot run test program while cross compiling" >&5
14171 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14172    { (exit 1); exit 1; }; }
14173 else
14174   cat >"conftest.$ac_ext" <<_ACEOF
14175 #line 14175 "configure"
14176 #include "confdefs.h"
14177 $ac_includes_default
14178 int
14179 main (void)
14180 {
14181 FILE *f = fopen ("conftest.val", "w");
14182 if (!f)
14183   $ac_main_return (1);
14184 fprintf (f, "%ld", (long)(sizeof (signed char)));
14185 fclose (f);
14186   ;
14187   return 0;
14188 }
14189 _ACEOF
14190 rm -f "conftest$ac_exeext"
14191 if { (eval echo "$as_me:14191: \"$ac_link\"") >&5
14192   (eval $ac_link) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14196   { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit "$ac_status"); }; }; then
14201   ac_cv_sizeof_signed_char=`cat conftest.val`
14202 else
14203   echo "$as_me: program exited with status $ac_status" >&5
14204 echo "$as_me: failed program was:" >&5
14205 cat "conftest.$ac_ext" >&5
14206 fi
14207 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14208 fi
14209 fi
14210 rm -f conftest.val
14211 else
14212   ac_cv_sizeof_signed_char=0
14213 fi
14214 fi
14215 echo "$as_me:14215: result: $ac_cv_sizeof_signed_char" >&5
14216 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14217 cat >>confdefs.h <<EOF
14218 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14219 EOF
14220
14221 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14222         NCURSES_SBOOL="signed char"
14223 else
14224         NCURSES_SBOOL="char"
14225 fi
14226 echo "$as_me:14226: checking if you want to use signed Boolean array in term.h" >&5
14227 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14228
14229 # Check whether --enable-signed-char or --disable-signed-char was given.
14230 if test "${enable_signed_char+set}" = set; then
14231   enableval="$enable_signed_char"
14232   with_signed_char=$enableval
14233 else
14234   with_signed_char=no
14235 fi;
14236 echo "$as_me:14236: result: $with_signed_char" >&5
14237 echo "${ECHO_T}$with_signed_char" >&6
14238 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14239
14240 ###   use option --with-tparm-arg to override tparm's argument type
14241 echo "$as_me:14241: checking for type of tparm args" >&5
14242 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14243
14244 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14245 if test "${with_tparm_arg+set}" = set; then
14246   withval="$with_tparm_arg"
14247   NCURSES_TPARM_ARG="$withval"
14248 else
14249   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14250 fi;
14251 echo "$as_me:14251: result: $NCURSES_TPARM_ARG" >&5
14252 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14253
14254 ### Enable compiling-in rcs id's
14255 echo "$as_me:14255: checking if RCS identifiers should be compiled-in" >&5
14256 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14257
14258 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14259 if test "${with_rcs_ids+set}" = set; then
14260   withval="$with_rcs_ids"
14261   with_rcs_ids=$withval
14262 else
14263   with_rcs_ids=no
14264 fi;
14265 echo "$as_me:14265: result: $with_rcs_ids" >&5
14266 echo "${ECHO_T}$with_rcs_ids" >&6
14267 test "x$with_rcs_ids" = xyes &&
14268 cat >>confdefs.h <<\EOF
14269 #define USE_RCS_IDS 1
14270 EOF
14271
14272 ###############################################################################
14273
14274 echo "$as_me:14274: checking format of man-pages" >&5
14275 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14276
14277 # Check whether --with-manpage-format or --without-manpage-format was given.
14278 if test "${with_manpage_format+set}" = set; then
14279   withval="$with_manpage_format"
14280   MANPAGE_FORMAT=$withval
14281 else
14282   MANPAGE_FORMAT=unknown
14283 fi;
14284
14285 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14286 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14287
14288 cf_unknown=
14289
14290 case "$MANPAGE_FORMAT" in
14291 (unknown)
14292         if test -z "$MANPATH" ; then
14293                 MANPATH="/usr/man:/usr/share/man"
14294         fi
14295
14296         # look for the 'date' man-page (it's most likely to be installed!)
14297         MANPAGE_FORMAT=
14298         cf_preform="no"
14299         cf_catonly="yes"
14300         cf_example="date"
14301
14302         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14303         for cf_dir in $MANPATH; do
14304                 test -z "$cf_dir" && cf_dir=/usr/man
14305                 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
14306                 do
14307                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14308                         if test "x$cf_test" = "x$cf_name" ; then
14309
14310                                 case "$cf_name" in
14311                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14312                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14313                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14314                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14315                                 esac
14316
14317                                 case "$cf_name" in
14318                                 ($cf_dir/man*)
14319                                         cf_catonly=no
14320                                         ;;
14321                                 ($cf_dir/cat*)
14322                                         cf_preform=yes
14323                                         ;;
14324                                 esac
14325                                 break
14326                         fi
14327
14328                         # if we found a match in either man* or cat*, stop looking
14329                         if test -n "$MANPAGE_FORMAT" ; then
14330                                 cf_found=no
14331                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14332                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14333                                 case "$cf_name" in
14334                                 ($cf_dir/cat*)
14335                                         cf_found=yes
14336                                         ;;
14337                                 esac
14338                                 test "$cf_found" = yes && break
14339                         fi
14340                 done
14341                 # only check the first directory in $MANPATH where we find manpages
14342                 if test -n "$MANPAGE_FORMAT" ; then
14343                         break
14344                 fi
14345         done
14346         # if we did not find the example, just assume it is normal
14347         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14348         IFS="$ac_save_ifs"
14349         ;;
14350 (*)
14351         for cf_option in $MANPAGE_FORMAT; do
14352         case "$cf_option" in
14353         (gzip|compress|BSDI|normal|formatted|catonly)
14354                 ;;
14355         (*)
14356                 cf_unknown="$cf_unknown $cf_option"
14357                 ;;
14358         esac
14359         done
14360         ;;
14361 esac
14362
14363 echo "$as_me:14363: result: $MANPAGE_FORMAT" >&5
14364 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14365 if test -n "$cf_unknown" ; then
14366         { echo "$as_me:14366: WARNING: Unexpected manpage-format $cf_unknown" >&5
14367 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14368 fi
14369
14370 echo "$as_me:14370: checking for manpage renaming" >&5
14371 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14372
14373 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14374 if test "${with_manpage_renames+set}" = set; then
14375   withval="$with_manpage_renames"
14376   MANPAGE_RENAMES=$withval
14377 else
14378   MANPAGE_RENAMES=yes
14379 fi;
14380
14381 case ".$MANPAGE_RENAMES" in
14382 (.no)
14383         ;;
14384 (.|.yes)
14385         # Debian 'man' program?
14386         if test -f /etc/debian_version ; then
14387                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14388         else
14389                 MANPAGE_RENAMES=no
14390         fi
14391         ;;
14392 esac
14393
14394 if test "$MANPAGE_RENAMES" != no ; then
14395         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14396                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14397         elif test ! -f "$MANPAGE_RENAMES" ; then
14398                 { { echo "$as_me:14398: error: not a filename: $MANPAGE_RENAMES" >&5
14399 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14400    { (exit 1); exit 1; }; }
14401         fi
14402
14403         test ! -d man && mkdir man
14404
14405         # Construct a sed-script to perform renaming within man-pages
14406         if test -n "$MANPAGE_RENAMES" ; then
14407                 test ! -d man && mkdir man
14408                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14409         fi
14410 fi
14411
14412 echo "$as_me:14412: result: $MANPAGE_RENAMES" >&5
14413 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14414
14415 echo "$as_me:14415: checking if manpage aliases will be installed" >&5
14416 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14417
14418 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14419 if test "${with_manpage_aliases+set}" = set; then
14420   withval="$with_manpage_aliases"
14421   MANPAGE_ALIASES=$withval
14422 else
14423   MANPAGE_ALIASES=yes
14424 fi;
14425
14426 echo "$as_me:14426: result: $MANPAGE_ALIASES" >&5
14427 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14428
14429 case "x$LN_S" in
14430 (xln*)
14431         cf_use_symlinks=yes
14432         ;;
14433 (*)
14434         cf_use_symlinks=no
14435         ;;
14436 esac
14437
14438 MANPAGE_SYMLINKS=no
14439 if test "$MANPAGE_ALIASES" = yes ; then
14440 echo "$as_me:14440: checking if manpage symlinks should be used" >&5
14441 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14442
14443 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14444 if test "${with_manpage_symlinks+set}" = set; then
14445   withval="$with_manpage_symlinks"
14446   MANPAGE_SYMLINKS=$withval
14447 else
14448   MANPAGE_SYMLINKS=$cf_use_symlinks
14449 fi;
14450
14451 if test "$$cf_use_symlinks" = no; then
14452 if test "$MANPAGE_SYMLINKS" = yes ; then
14453         { echo "$as_me:14453: WARNING: cannot make symlinks" >&5
14454 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14455         MANPAGE_SYMLINKS=no
14456 fi
14457 fi
14458
14459 echo "$as_me:14459: result: $MANPAGE_SYMLINKS" >&5
14460 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14461 fi
14462
14463 echo "$as_me:14463: checking for manpage tbl" >&5
14464 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14465
14466 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14467 if test "${with_manpage_tbl+set}" = set; then
14468   withval="$with_manpage_tbl"
14469   MANPAGE_TBL=$withval
14470 else
14471   MANPAGE_TBL=no
14472 fi;
14473
14474 echo "$as_me:14474: result: $MANPAGE_TBL" >&5
14475 echo "${ECHO_T}$MANPAGE_TBL" >&6
14476
14477 if test "$prefix" = "NONE" ; then
14478         cf_prefix="$ac_default_prefix"
14479 else
14480         cf_prefix="$prefix"
14481 fi
14482
14483 case "$MANPAGE_FORMAT" in
14484 (*catonly*)
14485         cf_format=yes
14486         cf_inboth=no
14487         ;;
14488 (*formatted*)
14489         cf_format=yes
14490         cf_inboth=yes
14491         ;;
14492 (*)
14493         cf_format=no
14494         cf_inboth=no
14495         ;;
14496 esac
14497
14498 test ! -d man && mkdir man
14499
14500 cf_so_strip=
14501 cf_compress=
14502 case "$MANPAGE_FORMAT" in
14503 (*compress*)
14504         cf_so_strip="Z"
14505         cf_compress=compress
14506         ;;
14507 (*gzip*)
14508         cf_so_strip="gz"
14509         cf_compress=gzip
14510         ;;
14511 esac
14512
14513 cf_edit_man=./edit_man.sh
14514 cf_man_alias=`pwd`/man_alias.sed
14515
14516 cat >$cf_edit_man <<CF_EOF
14517 #! $SHELL
14518 # this script is generated by the configure-script CF_MAN_PAGES macro.
14519
14520 prefix="$cf_prefix"
14521 datarootdir="$datarootdir"
14522 datadir="$datadir"
14523
14524 NCURSES_MAJOR="$NCURSES_MAJOR"
14525 NCURSES_MINOR="$NCURSES_MINOR"
14526 NCURSES_PATCH="$NCURSES_PATCH"
14527
14528 NCURSES_OSPEED="$NCURSES_OSPEED"
14529 TERMINFO="$TERMINFO"
14530
14531 INSTALL="$INSTALL"
14532 INSTALL_DATA="$INSTALL_DATA"
14533
14534 transform="$program_transform_name"
14535
14536 TMP=\${TMPDIR:=/tmp}/man\$\$
14537 trap "rm -f \$TMP" 0 1 2 3 15
14538
14539 form=\$1
14540 shift || exit 1
14541
14542 verb=\$1
14543 shift || exit 1
14544
14545 mandir=\$1
14546 shift || exit 1
14547
14548 srcdir=\$1
14549 top_srcdir=\$srcdir/..
14550 shift || exit 1
14551
14552 if test "\$form" = normal ; then
14553         if test "$cf_format" = yes ; then
14554         if test "$cf_inboth" = no ; then
14555                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14556                 exit $?
14557         fi
14558         fi
14559         cf_subdir=\$mandir/man
14560         cf_tables=$MANPAGE_TBL
14561 else
14562         cf_subdir=\$mandir/cat
14563         cf_tables=yes
14564 fi
14565
14566 # process the list of source-files
14567 for i in "\$@" ; do
14568 case \$i in
14569 (*.orig|*.rej) ;;
14570 (*.[0-9]*)
14571         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14572         if test "\$verb" = installing ; then
14573         if test ! -d "\$cf_subdir\${section}" ; then
14574                 mkdir -p "\$cf_subdir\$section"
14575         fi
14576         fi
14577
14578         # replace variables in man page
14579         if test ! -f "$cf_man_alias" ; then
14580 cat >>$cf_man_alias <<-CF_EOF2
14581                 s,@DATADIR@,\$datadir,g
14582                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14583                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14584                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14585                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14586                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14587                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14588 CF_EOF
14589
14590         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14591         do
14592                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14593                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14594 cat >>$cf_edit_man <<-CF_EOF
14595                 s,@$cf_NAME@,$cf_name,g
14596 CF_EOF
14597         done
14598
14599 cat >>$cf_edit_man <<CF_EOF
14600 CF_EOF2
14601                 echo "...made $cf_man_alias"
14602         fi
14603
14604         aliases=
14605         cf_source=\`basename "\$i"\`
14606         inalias=\$cf_source
14607         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14608         if test ! -f "\$inalias" ; then
14609                 echo ".. skipped \$cf_source"
14610                 continue
14611         fi
14612 CF_EOF
14613
14614 if test "$MANPAGE_ALIASES" != no ; then
14615 cat >>$cf_edit_man <<CF_EOF
14616         nCurses=ignore.3x
14617         test "$with_curses_h" = yes && nCurses=ncurses.3x
14618         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14619 CF_EOF
14620 fi
14621
14622 if test "$MANPAGE_RENAMES" = no ; then
14623 cat >>$cf_edit_man <<CF_EOF
14624         # perform program transformations for section 1 man pages
14625         if test \$section = 1 ; then
14626                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14627         else
14628                 cf_target=\$cf_subdir\${section}/\$cf_source
14629         fi
14630 CF_EOF
14631 else
14632 cat >>$cf_edit_man <<CF_EOF
14633         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14634         if test -z "\$cf_target" ; then
14635                 echo "? missing rename for \$cf_source"
14636                 cf_target="\$cf_source"
14637         fi
14638         cf_target="\$cf_subdir\${section}/\${cf_target}"
14639
14640 CF_EOF
14641 fi
14642
14643 cat >>$cf_edit_man <<CF_EOF
14644         sed     -f "$cf_man_alias" \\
14645 CF_EOF
14646
14647 if test -f "$MANPAGE_RENAMES" ; then
14648 cat >>$cf_edit_man <<CF_EOF
14649                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14650 CF_EOF
14651 else
14652 cat >>$cf_edit_man <<CF_EOF
14653                 < "\$i" >\$TMP
14654 CF_EOF
14655 fi
14656
14657 cat >>$cf_edit_man <<CF_EOF
14658 if test \$cf_tables = yes ; then
14659         tbl \$TMP >\$TMP.out
14660         mv \$TMP.out \$TMP
14661 fi
14662 CF_EOF
14663
14664 if test "$with_overwrite" != yes ; then
14665 cat >>$cf_edit_man <<CF_EOF
14666         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14667         mv \$TMP.out \$TMP
14668 CF_EOF
14669 fi
14670
14671 if test "$with_curses_h" != yes ; then
14672 cat >>$cf_edit_man <<CF_EOF
14673         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14674         mv \$TMP.out \$TMP
14675 CF_EOF
14676 fi
14677
14678 cat >>$cf_edit_man <<CF_EOF
14679         if test "\$form" = format ; then
14680                 nroff -man \$TMP >\$TMP.out
14681                 mv \$TMP.out \$TMP
14682         fi
14683 CF_EOF
14684
14685 if test -n "$cf_compress" ; then
14686 cat >>$cf_edit_man <<CF_EOF
14687         if test "\$verb" = installing ; then
14688         if ( "$cf_compress" -f \$TMP )
14689         then
14690                 mv \$TMP.$cf_so_strip \$TMP
14691         fi
14692         fi
14693         cf_target="\$cf_target.$cf_so_strip"
14694 CF_EOF
14695 fi
14696
14697 case "$MANPAGE_FORMAT" in
14698 (*BSDI*)
14699 cat >>$cf_edit_man <<CF_EOF
14700         if test "\$form" = format ; then
14701                 # BSDI installs only .0 suffixes in the cat directories
14702                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14703         fi
14704 CF_EOF
14705   ;;
14706 esac
14707
14708 cat >>$cf_edit_man <<CF_EOF
14709         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14710         if test "\$verb" = installing ; then
14711                 echo "\$verb \$cf_target"
14712                 \$INSTALL_DATA \$TMP "\$cf_target"
14713                 test -d "\$cf_subdir\${section}" &&
14714                 test -n "\$aliases" && (
14715                         cd "\$cf_subdir\${section}" && (
14716                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14717                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14718                                 cf_target=\`basename "\$cf_target"\`
14719                                 for cf_alias in \$aliases
14720                                 do
14721                                         if test "\$section" = 1 ; then
14722                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14723                                         fi
14724
14725                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14726                                                 if test -f "\$cf_alias\${suffix}" ; then
14727                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14728                                                         then
14729                                                                 continue
14730                                                         fi
14731                                                 fi
14732                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14733 CF_EOF
14734 case "x$LN_S" in
14735 (*-f)
14736 cat >>$cf_edit_man <<CF_EOF
14737                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14738 CF_EOF
14739         ;;
14740 (*)
14741 cat >>$cf_edit_man <<CF_EOF
14742                                                 rm -f "\$cf_alias\${suffix}"
14743                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14744 CF_EOF
14745         ;;
14746 esac
14747 cat >>$cf_edit_man <<CF_EOF
14748                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14749                                                 echo ".so \$cf_source" >\$TMP
14750 CF_EOF
14751 if test -n "$cf_compress" ; then
14752 cat >>$cf_edit_man <<CF_EOF
14753                                                 if test -n "$cf_so_strip" ; then
14754                                                         "$cf_compress" -f \$TMP
14755                                                         mv \$TMP.$cf_so_strip \$TMP
14756                                                 fi
14757 CF_EOF
14758 fi
14759 cat >>$cf_edit_man <<CF_EOF
14760                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14761                                                 rm -f "\$cf_alias\${suffix}"
14762                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14763                                         fi
14764                                 done
14765                         )
14766                 )
14767         elif test "\$verb" = removing ; then
14768                 test -f "\$cf_target" && (
14769                         echo "\$verb \$cf_target"
14770                         rm -f "\$cf_target"
14771                 )
14772                 test -d "\$cf_subdir\${section}" &&
14773                 test -n "\$aliases" && (
14774                         cd "\$cf_subdir\${section}" && (
14775                                 for cf_alias in \$aliases
14776                                 do
14777                                         if test "\$section" = 1 ; then
14778                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14779                                         fi
14780
14781                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14782                                         rm -f "\$cf_alias\${suffix}"
14783                                 done
14784                         )
14785                 )
14786         else
14787 #               echo ".hy 0"
14788                 cat \$TMP
14789         fi
14790         ;;
14791 esac
14792 done
14793
14794 if test "$cf_inboth" = yes ; then
14795 if test "\$form" != format ; then
14796         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14797 fi
14798 fi
14799
14800 exit 0
14801 CF_EOF
14802 chmod 755 "$cf_edit_man"
14803
14804 ###############################################################################
14805
14806 ### Note that some functions (such as const) are normally disabled anyway.
14807 echo "$as_me:14807: checking if you want to build with function extensions" >&5
14808 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14809
14810 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14811 if test "${enable_ext_funcs+set}" = set; then
14812   enableval="$enable_ext_funcs"
14813   with_ext_funcs=$enableval
14814 else
14815   with_ext_funcs=yes
14816 fi;
14817 echo "$as_me:14817: result: $with_ext_funcs" >&5
14818 echo "${ECHO_T}$with_ext_funcs" >&6
14819 if test "x$with_ext_funcs" = xyes ; then
14820         NCURSES_EXT_FUNCS=1
14821
14822 cat >>confdefs.h <<\EOF
14823 #define NCURSES_EXT_FUNCS 1
14824 EOF
14825
14826 cat >>confdefs.h <<\EOF
14827 #define HAVE_ASSUME_DEFAULT_COLORS 1
14828 EOF
14829
14830 cat >>confdefs.h <<\EOF
14831 #define HAVE_CURSES_VERSION 1
14832 EOF
14833
14834 cat >>confdefs.h <<\EOF
14835 #define HAVE_HAS_KEY 1
14836 EOF
14837
14838 cat >>confdefs.h <<\EOF
14839 #define HAVE_RESIZETERM 1
14840 EOF
14841
14842 cat >>confdefs.h <<\EOF
14843 #define HAVE_RESIZE_TERM 1
14844 EOF
14845
14846 cat >>confdefs.h <<\EOF
14847 #define HAVE_TERM_ENTRY_H 1
14848 EOF
14849
14850 cat >>confdefs.h <<\EOF
14851 #define HAVE_USE_DEFAULT_COLORS 1
14852 EOF
14853
14854 cat >>confdefs.h <<\EOF
14855 #define HAVE_USE_EXTENDED_NAMES 1
14856 EOF
14857
14858 cat >>confdefs.h <<\EOF
14859 #define HAVE_USE_SCREEN 1
14860 EOF
14861
14862 cat >>confdefs.h <<\EOF
14863 #define HAVE_USE_WINDOW 1
14864 EOF
14865
14866 cat >>confdefs.h <<\EOF
14867 #define HAVE_WRESIZE 1
14868 EOF
14869
14870         GENERATED_EXT_FUNCS=generated
14871         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14872 else
14873         NCURSES_EXT_FUNCS=0
14874         GENERATED_EXT_FUNCS=
14875 fi
14876
14877 echo "$as_me:14877: checking if you want to build with SCREEN extensions" >&5
14878 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14879
14880 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14881 if test "${enable_sp_funcs+set}" = set; then
14882   enableval="$enable_sp_funcs"
14883   with_sp_funcs=$enableval
14884 else
14885   with_sp_funcs=$cf_dft_ext_spfuncs
14886 fi;
14887 echo "$as_me:14887: result: $with_sp_funcs" >&5
14888 echo "${ECHO_T}$with_sp_funcs" >&6
14889 if test "x$with_sp_funcs" = xyes ; then
14890         NCURSES_SP_FUNCS=1
14891
14892 cat >>confdefs.h <<\EOF
14893 #define NCURSES_SP_FUNCS 1
14894 EOF
14895
14896 cat >>confdefs.h <<\EOF
14897 #define HAVE_TPUTS_SP 1
14898 EOF
14899
14900         GENERATED_SP_FUNCS=generated
14901 else
14902         NCURSES_SP_FUNCS=0
14903         GENERATED_SP_FUNCS=
14904 fi
14905
14906 echo "$as_me:14906: checking if you want to build with terminal-driver" >&5
14907 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14908
14909 # Check whether --enable-term-driver or --disable-term-driver was given.
14910 if test "${enable_term_driver+set}" = set; then
14911   enableval="$enable_term_driver"
14912   with_term_driver=$enableval
14913 else
14914   with_term_driver=no
14915 fi;
14916 echo "$as_me:14916: result: $with_term_driver" >&5
14917 echo "${ECHO_T}$with_term_driver" >&6
14918 if test "x$with_term_driver" = xyes ; then
14919
14920 cat >>confdefs.h <<\EOF
14921 #define USE_TERM_DRIVER 1
14922 EOF
14923
14924         if test "x$with_termlib" != xno ; then
14925                 { { echo "$as_me:14925: error: The term-driver option conflicts with the termlib option" >&5
14926 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14927    { (exit 1); exit 1; }; }
14928         fi
14929         if test "x$with_sp_funcs" != xyes ; then
14930                 { { echo "$as_me:14930: error: The term-driver option relies upon sp-funcs" >&5
14931 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14932    { (exit 1); exit 1; }; }
14933         fi
14934 fi
14935
14936 ###   use option --enable-const to turn on use of const beyond that in XSI.
14937 echo "$as_me:14937: checking for extended use of const keyword" >&5
14938 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14939
14940 # Check whether --enable-const or --disable-const was given.
14941 if test "${enable_const+set}" = set; then
14942   enableval="$enable_const"
14943   with_ext_const=$enableval
14944 else
14945   with_ext_const=$cf_dft_ext_const
14946 fi;
14947 echo "$as_me:14947: result: $with_ext_const" >&5
14948 echo "${ECHO_T}$with_ext_const" >&6
14949 NCURSES_CONST='/*nothing*/'
14950 if test "x$with_ext_const" = xyes ; then
14951         NCURSES_CONST=const
14952 fi
14953
14954 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14955 echo "$as_me:14955: checking if you want to use extended colors" >&5
14956 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14957
14958 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14959 if test "${enable_ext_colors+set}" = set; then
14960   enableval="$enable_ext_colors"
14961   with_ext_colors=$enableval
14962 else
14963   with_ext_colors=$cf_dft_ext_colors
14964 fi;
14965 echo "$as_me:14965: result: $with_ext_colors" >&5
14966 echo "${ECHO_T}$with_ext_colors" >&6
14967 NCURSES_EXT_COLORS=0
14968 if test "x$with_ext_colors" = xyes ; then
14969         if test "x$with_widec" != xyes ; then
14970                 { echo "$as_me:14970: WARNING: This option applies only to wide-character library" >&5
14971 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14972         else
14973                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14974
14975 if test "${with_abi_version+set}" != set; then
14976         case "$cf_cv_rel_version" in
14977         (5.*)
14978                 cf_cv_rel_version=6.0
14979                 cf_cv_abi_version=6
14980                 { echo "$as_me:14980: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14981 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14982                 ;;
14983         esac
14984 fi
14985
14986                 NCURSES_EXT_COLORS=1
14987
14988 cat >>confdefs.h <<\EOF
14989 #define NCURSES_EXT_COLORS 1
14990 EOF
14991
14992 cat >>confdefs.h <<\EOF
14993 #define HAVE_ALLOC_PAIR 1
14994 EOF
14995
14996 cat >>confdefs.h <<\EOF
14997 #define HAVE_INIT_EXTENDED_COLOR 1
14998 EOF
14999
15000 cat >>confdefs.h <<\EOF
15001 #define HAVE_RESET_COLOR_PAIRS 1
15002 EOF
15003
15004         fi
15005 fi
15006
15007 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15008 echo "$as_me:15008: checking if you want to use extended mouse encoding" >&5
15009 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15010
15011 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15012 if test "${enable_ext_mouse+set}" = set; then
15013   enableval="$enable_ext_mouse"
15014   with_ext_mouse=$enableval
15015 else
15016   with_ext_mouse=$cf_dft_ext_mouse
15017 fi;
15018 echo "$as_me:15018: result: $with_ext_mouse" >&5
15019 echo "${ECHO_T}$with_ext_mouse" >&6
15020 NCURSES_MOUSE_VERSION=1
15021 if test "x$with_ext_mouse" = xyes ; then
15022         NCURSES_MOUSE_VERSION=2
15023
15024 if test "${with_abi_version+set}" != set; then
15025         case "$cf_cv_rel_version" in
15026         (5.*)
15027                 cf_cv_rel_version=6.0
15028                 cf_cv_abi_version=6
15029                 { echo "$as_me:15029: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15030 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15031                 ;;
15032         esac
15033 fi
15034
15035 fi
15036
15037 ###   use option --enable-ext-putwin to turn on extended screendumps
15038 echo "$as_me:15038: checking if you want to use extended putwin/screendump" >&5
15039 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15040
15041 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15042 if test "${enable_ext_putwin+set}" = set; then
15043   enableval="$enable_ext_putwin"
15044   with_ext_putwin=$enableval
15045 else
15046   with_ext_putwin=$cf_dft_ext_putwin
15047 fi;
15048 echo "$as_me:15048: result: $with_ext_putwin" >&5
15049 echo "${ECHO_T}$with_ext_putwin" >&6
15050 if test "x$with_ext_putwin" = xyes ; then
15051
15052 cat >>confdefs.h <<\EOF
15053 #define NCURSES_EXT_PUTWIN 1
15054 EOF
15055
15056 fi
15057
15058 echo "$as_me:15058: checking if you want \$NCURSES_NO_PADDING code" >&5
15059 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15060
15061 # Check whether --enable-no-padding or --disable-no-padding was given.
15062 if test "${enable_no_padding+set}" = set; then
15063   enableval="$enable_no_padding"
15064   with_no_padding=$enableval
15065 else
15066   with_no_padding=$with_ext_funcs
15067 fi;
15068 echo "$as_me:15068: result: $with_no_padding" >&5
15069 echo "${ECHO_T}$with_no_padding" >&6
15070 test "x$with_no_padding" = xyes &&
15071 cat >>confdefs.h <<\EOF
15072 #define NCURSES_NO_PADDING 1
15073 EOF
15074
15075 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15076 echo "$as_me:15076: checking if you want SIGWINCH handler" >&5
15077 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15078
15079 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15080 if test "${enable_sigwinch+set}" = set; then
15081   enableval="$enable_sigwinch"
15082   with_sigwinch=$enableval
15083 else
15084   with_sigwinch=$with_ext_funcs
15085 fi;
15086 echo "$as_me:15086: result: $with_sigwinch" >&5
15087 echo "${ECHO_T}$with_sigwinch" >&6
15088 test "x$with_sigwinch" = xyes &&
15089 cat >>confdefs.h <<\EOF
15090 #define USE_SIGWINCH 1
15091 EOF
15092
15093 ###   use option --enable-tcap-names to allow user to define new capabilities
15094 echo "$as_me:15094: checking if you want user-definable terminal capabilities like termcap" >&5
15095 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15096
15097 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15098 if test "${enable_tcap_names+set}" = set; then
15099   enableval="$enable_tcap_names"
15100   with_tcap_names=$enableval
15101 else
15102   with_tcap_names=$with_ext_funcs
15103 fi;
15104 echo "$as_me:15104: result: $with_tcap_names" >&5
15105 echo "${ECHO_T}$with_tcap_names" >&6
15106 NCURSES_XNAMES=0
15107 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15108
15109 ##############################################################################
15110
15111 echo "$as_me:15111: checking if you want to link with the pthread library" >&5
15112 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15113
15114 # Check whether --with-pthread or --without-pthread was given.
15115 if test "${with_pthread+set}" = set; then
15116   withval="$with_pthread"
15117   with_pthread=$withval
15118 else
15119   with_pthread=no
15120 fi;
15121 echo "$as_me:15121: result: $with_pthread" >&5
15122 echo "${ECHO_T}$with_pthread" >&6
15123
15124 if test "$with_pthread" != no ; then
15125         echo "$as_me:15125: checking for pthread.h" >&5
15126 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15127 if test "${ac_cv_header_pthread_h+set}" = set; then
15128   echo $ECHO_N "(cached) $ECHO_C" >&6
15129 else
15130   cat >"conftest.$ac_ext" <<_ACEOF
15131 #line 15131 "configure"
15132 #include "confdefs.h"
15133 #include <pthread.h>
15134 _ACEOF
15135 if { (eval echo "$as_me:15135: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15136   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15137   ac_status=$?
15138   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15139   rm -f conftest.er1
15140   cat conftest.err >&5
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit "$ac_status"); } >/dev/null; then
15143   if test -s conftest.err; then
15144     ac_cpp_err=$ac_c_preproc_warn_flag
15145   else
15146     ac_cpp_err=
15147   fi
15148 else
15149   ac_cpp_err=yes
15150 fi
15151 if test -z "$ac_cpp_err"; then
15152   ac_cv_header_pthread_h=yes
15153 else
15154   echo "$as_me: failed program was:" >&5
15155   cat "conftest.$ac_ext" >&5
15156   ac_cv_header_pthread_h=no
15157 fi
15158 rm -f conftest.err "conftest.$ac_ext"
15159 fi
15160 echo "$as_me:15160: result: $ac_cv_header_pthread_h" >&5
15161 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15162 if test "$ac_cv_header_pthread_h" = yes; then
15163
15164 cat >>confdefs.h <<\EOF
15165 #define HAVE_PTHREADS_H 1
15166 EOF
15167
15168         for cf_lib_pthread in pthread c_r
15169         do
15170             echo "$as_me:15170: checking if we can link with the $cf_lib_pthread library" >&5
15171 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15172             cf_save_LIBS="$LIBS"
15173
15174 cf_add_libs="$LIBS"
15175 # reverse order
15176 cf_add_0lib=
15177 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15178 # filter duplicates
15179 for cf_add_1lib in $cf_add_0lib; do
15180         for cf_add_2lib in $cf_add_libs; do
15181                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15182                         cf_add_1lib=
15183                         break
15184                 fi
15185         done
15186         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15187 done
15188 LIBS="$cf_add_libs"
15189
15190             cat >"conftest.$ac_ext" <<_ACEOF
15191 #line 15191 "configure"
15192 #include "confdefs.h"
15193
15194 #include <pthread.h>
15195
15196 int
15197 main (void)
15198 {
15199
15200                 int rc = pthread_create(0,0,0,0);
15201                 int r2 = pthread_mutexattr_settype(0, 0);
15202
15203   ;
15204   return 0;
15205 }
15206 _ACEOF
15207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15208 if { (eval echo "$as_me:15208: \"$ac_link\"") >&5
15209   (eval $ac_link) 2>&5
15210   ac_status=$?
15211   echo "$as_me:15211: \$? = $ac_status" >&5
15212   (exit "$ac_status"); } &&
15213          { ac_try='test -s "conftest$ac_exeext"'
15214   { (eval echo "$as_me:15214: \"$ac_try\"") >&5
15215   (eval $ac_try) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit "$ac_status"); }; }; then
15219   with_pthread=yes
15220 else
15221   echo "$as_me: failed program was:" >&5
15222 cat "conftest.$ac_ext" >&5
15223 with_pthread=no
15224 fi
15225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15226             LIBS="$cf_save_LIBS"
15227             echo "$as_me:15227: result: $with_pthread" >&5
15228 echo "${ECHO_T}$with_pthread" >&6
15229             test "$with_pthread" = yes && break
15230         done
15231
15232         if test "$with_pthread" = yes ; then
15233
15234 cf_add_libs="$LIBS"
15235 # reverse order
15236 cf_add_0lib=
15237 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15238 # filter duplicates
15239 for cf_add_1lib in $cf_add_0lib; do
15240         for cf_add_2lib in $cf_add_libs; do
15241                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15242                         cf_add_1lib=
15243                         break
15244                 fi
15245         done
15246         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15247 done
15248 LIBS="$cf_add_libs"
15249
15250 cat >>confdefs.h <<\EOF
15251 #define HAVE_LIBPTHREADS 1
15252 EOF
15253
15254         else
15255             { { echo "$as_me:15255: error: Cannot link with pthread library" >&5
15256 echo "$as_me: error: Cannot link with pthread library" >&2;}
15257    { (exit 1); exit 1; }; }
15258         fi
15259
15260 fi
15261
15262 fi
15263
15264 if test "x$with_pthread" != xno; then
15265         echo "$as_me:15265: checking for pthread_kill" >&5
15266 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15267 if test "${ac_cv_func_pthread_kill+set}" = set; then
15268   echo $ECHO_N "(cached) $ECHO_C" >&6
15269 else
15270   cat >"conftest.$ac_ext" <<_ACEOF
15271 #line 15271 "configure"
15272 #include "confdefs.h"
15273 #define pthread_kill autoconf_temporary
15274 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15275 #undef pthread_kill
15276
15277 #ifdef __cplusplus
15278 extern "C"
15279 #endif
15280
15281 /* We use char because int might match the return type of a gcc2
15282    builtin and then its argument prototype would still apply.  */
15283 char pthread_kill (void);
15284
15285 int
15286 main (void)
15287 {
15288
15289 /* The GNU C library defines stubs for functions which it implements
15290     to always fail with ENOSYS.  Some functions are actually named
15291     something starting with __ and the normal name is an alias.  */
15292 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15293 #error found stub for pthread_kill
15294 #endif
15295
15296         return pthread_kill ();
15297   ;
15298   return 0;
15299 }
15300 _ACEOF
15301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15302 if { (eval echo "$as_me:15302: \"$ac_link\"") >&5
15303   (eval $ac_link) 2>&5
15304   ac_status=$?
15305   echo "$as_me:15305: \$? = $ac_status" >&5
15306   (exit "$ac_status"); } &&
15307          { ac_try='test -s "conftest$ac_exeext"'
15308   { (eval echo "$as_me:15308: \"$ac_try\"") >&5
15309   (eval $ac_try) 2>&5
15310   ac_status=$?
15311   echo "$as_me:15311: \$? = $ac_status" >&5
15312   (exit "$ac_status"); }; }; then
15313   ac_cv_func_pthread_kill=yes
15314 else
15315   echo "$as_me: failed program was:" >&5
15316 cat "conftest.$ac_ext" >&5
15317 ac_cv_func_pthread_kill=no
15318 fi
15319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15320 fi
15321 echo "$as_me:15321: result: $ac_cv_func_pthread_kill" >&5
15322 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15323 if test "$ac_cv_func_pthread_kill" = yes; then
15324
15325                 echo "$as_me:15325: checking if you want to allow EINTR in wgetch with pthreads" >&5
15326 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15327
15328 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15329 if test "${enable_pthreads_eintr+set}" = set; then
15330   enableval="$enable_pthreads_eintr"
15331   use_pthreads_eintr=$enableval
15332 else
15333   use_pthreads_eintr=no
15334 fi;
15335                 echo "$as_me:15335: result: $use_pthreads_eintr" >&5
15336 echo "${ECHO_T}$use_pthreads_eintr" >&6
15337                 if test "x$use_pthreads_eintr" = xyes ; then
15338
15339 cat >>confdefs.h <<\EOF
15340 #define USE_PTHREADS_EINTR 1
15341 EOF
15342
15343                 fi
15344 fi
15345
15346         echo "$as_me:15346: checking if you want to use weak-symbols for pthreads" >&5
15347 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15348
15349 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15350 if test "${enable_weak_symbols+set}" = set; then
15351   enableval="$enable_weak_symbols"
15352   use_weak_symbols=$enableval
15353 else
15354   use_weak_symbols=no
15355 fi;
15356         echo "$as_me:15356: result: $use_weak_symbols" >&5
15357 echo "${ECHO_T}$use_weak_symbols" >&6
15358         if test "x$use_weak_symbols" = xyes ; then
15359
15360 echo "$as_me:15360: checking if $CC supports weak symbols" >&5
15361 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15362 if test "${cf_cv_weak_symbols+set}" = set; then
15363   echo $ECHO_N "(cached) $ECHO_C" >&6
15364 else
15365
15366 cat >"conftest.$ac_ext" <<_ACEOF
15367 #line 15367 "configure"
15368 #include "confdefs.h"
15369
15370 #include <stdio.h>
15371 int
15372 main (void)
15373 {
15374
15375 #if defined(__GNUC__)
15376 #  if defined __USE_ISOC99
15377 #    define _cat_pragma(exp)    _Pragma(#exp)
15378 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15379 #  else
15380 #    define _weak_pragma(exp)
15381 #  endif
15382 #  define _declare(name)        __extension__ extern __typeof__(name) name
15383 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15384 #endif
15385
15386 weak_symbol(fopen);
15387
15388   ;
15389   return 0;
15390 }
15391 _ACEOF
15392 rm -f "conftest.$ac_objext"
15393 if { (eval echo "$as_me:15393: \"$ac_compile\"") >&5
15394   (eval $ac_compile) 2>&5
15395   ac_status=$?
15396   echo "$as_me:15396: \$? = $ac_status" >&5
15397   (exit "$ac_status"); } &&
15398          { ac_try='test -s "conftest.$ac_objext"'
15399   { (eval echo "$as_me:15399: \"$ac_try\"") >&5
15400   (eval $ac_try) 2>&5
15401   ac_status=$?
15402   echo "$as_me:15402: \$? = $ac_status" >&5
15403   (exit "$ac_status"); }; }; then
15404   cf_cv_weak_symbols=yes
15405 else
15406   echo "$as_me: failed program was:" >&5
15407 cat "conftest.$ac_ext" >&5
15408 cf_cv_weak_symbols=no
15409 fi
15410 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15411
15412 fi
15413 echo "$as_me:15413: result: $cf_cv_weak_symbols" >&5
15414 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15415
15416         else
15417                 cf_cv_weak_symbols=no
15418         fi
15419
15420         if test "x$cf_cv_weak_symbols" = xyes ; then
15421
15422 cat >>confdefs.h <<\EOF
15423 #define USE_WEAK_SYMBOLS 1
15424 EOF
15425
15426         fi
15427 fi
15428
15429 PTHREAD=
15430 if test "x$with_pthread" = "xyes" ; then
15431
15432 cat >>confdefs.h <<\EOF
15433 #define USE_PTHREADS 1
15434 EOF
15435
15436         enable_reentrant=yes
15437         if test "x$cf_cv_weak_symbols" = xyes ; then
15438                 PTHREAD=-lpthread
15439
15440 cf_add_libs="$PRIVATE_LIBS"
15441 # reverse order
15442 cf_add_0lib=
15443 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15444 # filter duplicates
15445 for cf_add_1lib in $cf_add_0lib; do
15446         for cf_add_2lib in $cf_add_libs; do
15447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15448                         cf_add_1lib=
15449                         break
15450                 fi
15451         done
15452         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15453 done
15454 PRIVATE_LIBS="$cf_add_libs"
15455
15456         fi
15457 fi
15458
15459 # Reentrant code has to be opaque; there's little advantage to making ncurses
15460 # opaque outside of that, so there is no --enable-opaque option.  We can use
15461 # this option without --with-pthreads, but this will be always set for
15462 # pthreads.
15463 echo "$as_me:15463: checking if you want reentrant code" >&5
15464 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15465
15466 # Check whether --enable-reentrant or --disable-reentrant was given.
15467 if test "${enable_reentrant+set}" = set; then
15468   enableval="$enable_reentrant"
15469   with_reentrant=$enableval
15470 else
15471   with_reentrant=no
15472 fi;
15473 echo "$as_me:15473: result: $with_reentrant" >&5
15474 echo "${ECHO_T}$with_reentrant" >&6
15475 if test "x$with_reentrant" = xyes ; then
15476         cf_cv_enable_reentrant=1
15477         cf_cv_enable_opaque="NCURSES_INTERNALS"
15478         NCURSES_SIZE_T=int
15479         if test "x$cf_cv_weak_symbols" = xyes ; then
15480
15481 # remove pthread library from $LIBS
15482 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15483
15484 cf_add_libs="$TEST_LIBS"
15485 # reverse order
15486 cf_add_0lib=
15487 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15488 # filter duplicates
15489 for cf_add_1lib in $cf_add_0lib; do
15490         for cf_add_2lib in $cf_add_libs; do
15491                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15492                         cf_add_1lib=
15493                         break
15494                 fi
15495         done
15496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15497 done
15498 TEST_LIBS="$cf_add_libs"
15499
15500 cf_add_libs="$TEST_LIBS2"
15501 # reverse order
15502 cf_add_0lib=
15503 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15504 # filter duplicates
15505 for cf_add_1lib in $cf_add_0lib; do
15506         for cf_add_2lib in $cf_add_libs; do
15507                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15508                         cf_add_1lib=
15509                         break
15510                 fi
15511         done
15512         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15513 done
15514 TEST_LIBS2="$cf_add_libs"
15515
15516 cf_add_libs="$PRIVATE_LIBS"
15517 # reverse order
15518 cf_add_0lib=
15519 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15520 # filter duplicates
15521 for cf_add_1lib in $cf_add_0lib; do
15522         for cf_add_2lib in $cf_add_libs; do
15523                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15524                         cf_add_1lib=
15525                         break
15526                 fi
15527         done
15528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15529 done
15530 PRIVATE_LIBS="$cf_add_libs"
15531
15532         else
15533                 # when not using weak symbols but with_reentrant,
15534                 # add 't' to the library suffix on all platforms
15535                 # except cygwin, where we only do that if ALSO
15536                 # compiling with full thread support.
15537                 case "$host" in
15538                 (*cygwin* | *msys*)
15539                         if test "$with_pthread" = "yes" ; then
15540                                 if test "x$disable_lib_suffixes" = "xno" ; then
15541                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15542                                 fi
15543                         fi ;;
15544                 (*)
15545                         if test "x$disable_lib_suffixes" = "xno" ; then
15546                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15547                         fi
15548                         ;;
15549                 esac
15550         fi
15551
15552 cat >>confdefs.h <<\EOF
15553 #define USE_REENTRANT 1
15554 EOF
15555
15556 if test "${with_abi_version+set}" != set; then
15557         case "$cf_cv_rel_version" in
15558         (5.*)
15559                 cf_cv_rel_version=6.0
15560                 cf_cv_abi_version=6
15561                 { echo "$as_me:15561: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15562 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15563                 ;;
15564         esac
15565 fi
15566
15567 else
15568         cf_cv_enable_reentrant=0
15569         cf_cv_enable_opaque="NCURSES_OPAQUE"
15570         NCURSES_SIZE_T=short
15571 fi
15572
15573 echo "$as_me:15573: checking if you want opaque curses-library structures" >&5
15574 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15575
15576 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15577 if test "${enable_opaque_curses+set}" = set; then
15578   enableval="$enable_opaque_curses"
15579   test "$enableval" != yes && enableval=no
15580         if test "$enableval" != "no" ; then
15581     enable_opaque_curses=yes
15582         else
15583
15584          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15585          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15586
15587         fi
15588 else
15589   enableval=no
15590
15591          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15592          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15593
15594 fi;
15595 echo "$as_me:15595: result: $enable_opaque_curses" >&5
15596 echo "${ECHO_T}$enable_opaque_curses" >&6
15597
15598 test "$cf_cv_enable_reentrant" = 1 && \
15599 test "$enable_opaque_curses" = no && \
15600 { { echo "$as_me:15600: error: reentrant configuration requires opaque library" >&5
15601 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15602    { (exit 1); exit 1; }; }
15603
15604 echo "$as_me:15604: checking if you want opaque form-library structures" >&5
15605 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15606
15607 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15608 if test "${enable_opaque_form+set}" = set; then
15609   enableval="$enable_opaque_form"
15610   enable_opaque_form=yes
15611 else
15612   enable_opaque_form=no
15613 fi;
15614 echo "$as_me:15614: result: $enable_opaque_form" >&5
15615 echo "${ECHO_T}$enable_opaque_form" >&6
15616
15617 echo "$as_me:15617: checking if you want opaque menu-library structures" >&5
15618 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15619
15620 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15621 if test "${enable_opaque_menu+set}" = set; then
15622   enableval="$enable_opaque_menu"
15623   enable_opaque_menu=yes
15624 else
15625   enable_opaque_menu=no
15626 fi;
15627 echo "$as_me:15627: result: $enable_opaque_menu" >&5
15628 echo "${ECHO_T}$enable_opaque_menu" >&6
15629
15630 echo "$as_me:15630: checking if you want opaque panel-library structures" >&5
15631 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15632
15633 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15634 if test "${enable_opaque_panel+set}" = set; then
15635   enableval="$enable_opaque_panel"
15636   enable_opaque_panel=yes
15637 else
15638   enable_opaque_panel=no
15639 fi;
15640 echo "$as_me:15640: result: $enable_opaque_panel" >&5
15641 echo "${ECHO_T}$enable_opaque_panel" >&6
15642
15643 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15644 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15645 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15646 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15647
15648 ### Allow using a different wrap-prefix
15649 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15650         echo "$as_me:15650: checking for prefix used to wrap public variables" >&5
15651 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15652
15653 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15654 if test "${with_wrap_prefix+set}" = set; then
15655   withval="$with_wrap_prefix"
15656   NCURSES_WRAP_PREFIX=$withval
15657 else
15658   NCURSES_WRAP_PREFIX=_nc_
15659 fi;
15660         echo "$as_me:15660: result: $NCURSES_WRAP_PREFIX" >&5
15661 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15662 else
15663         NCURSES_WRAP_PREFIX=_nc_
15664 fi
15665
15666 cat >>confdefs.h <<EOF
15667 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15668 EOF
15669
15670 ###############################################################################
15671 # These options are relatively safe to experiment with.
15672
15673 echo "$as_me:15673: checking if you want all development code" >&5
15674 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15675
15676 # Check whether --with-develop or --without-develop was given.
15677 if test "${with_develop+set}" = set; then
15678   withval="$with_develop"
15679   with_develop=$withval
15680 else
15681   with_develop=no
15682 fi;
15683 echo "$as_me:15683: result: $with_develop" >&5
15684 echo "${ECHO_T}$with_develop" >&6
15685
15686 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15687 echo "$as_me:15687: checking if you want hard-tabs code" >&5
15688 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15689
15690 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15691 if test "${enable_hard_tabs+set}" = set; then
15692   enableval="$enable_hard_tabs"
15693
15694 else
15695   enable_hard_tabs=$with_develop
15696 fi;
15697 echo "$as_me:15697: result: $enable_hard_tabs" >&5
15698 echo "${ECHO_T}$enable_hard_tabs" >&6
15699 test "x$enable_hard_tabs" = xyes &&
15700 cat >>confdefs.h <<\EOF
15701 #define USE_HARD_TABS 1
15702 EOF
15703
15704 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15705 echo "$as_me:15705: checking if you want limited support for xmc" >&5
15706 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15707
15708 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15709 if test "${enable_xmc_glitch+set}" = set; then
15710   enableval="$enable_xmc_glitch"
15711
15712 else
15713   enable_xmc_glitch=$with_develop
15714 fi;
15715 echo "$as_me:15715: result: $enable_xmc_glitch" >&5
15716 echo "${ECHO_T}$enable_xmc_glitch" >&6
15717 test "x$enable_xmc_glitch" = xyes &&
15718 cat >>confdefs.h <<\EOF
15719 #define USE_XMC_SUPPORT 1
15720 EOF
15721
15722 ###############################################################################
15723 # These are just experimental, probably should not be in a package:
15724
15725 echo "$as_me:15725: checking if you do not want to assume colors are white-on-black" >&5
15726 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15727
15728 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15729 if test "${enable_assumed_color+set}" = set; then
15730   enableval="$enable_assumed_color"
15731   with_assumed_color=$enableval
15732 else
15733   with_assumed_color=yes
15734 fi;
15735 echo "$as_me:15735: result: $with_assumed_color" >&5
15736 echo "${ECHO_T}$with_assumed_color" >&6
15737 test "x$with_assumed_color" = xyes &&
15738 cat >>confdefs.h <<\EOF
15739 #define USE_ASSUMED_COLOR 1
15740 EOF
15741
15742 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15743 echo "$as_me:15743: checking if you want hashmap scrolling-optimization code" >&5
15744 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15745
15746 # Check whether --enable-hashmap or --disable-hashmap was given.
15747 if test "${enable_hashmap+set}" = set; then
15748   enableval="$enable_hashmap"
15749   with_hashmap=$enableval
15750 else
15751   with_hashmap=yes
15752 fi;
15753 echo "$as_me:15753: result: $with_hashmap" >&5
15754 echo "${ECHO_T}$with_hashmap" >&6
15755 test "x$with_hashmap" = xyes &&
15756 cat >>confdefs.h <<\EOF
15757 #define USE_HASHMAP 1
15758 EOF
15759
15760 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15761 echo "$as_me:15761: checking if you want colorfgbg code" >&5
15762 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15763
15764 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15765 if test "${enable_colorfgbg+set}" = set; then
15766   enableval="$enable_colorfgbg"
15767   with_colorfgbg=$enableval
15768 else
15769   with_colorfgbg=no
15770 fi;
15771 echo "$as_me:15771: result: $with_colorfgbg" >&5
15772 echo "${ECHO_T}$with_colorfgbg" >&6
15773 test "x$with_colorfgbg" = xyes &&
15774 cat >>confdefs.h <<\EOF
15775 #define USE_COLORFGBG 1
15776 EOF
15777
15778 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15779 echo "$as_me:15779: checking if you want to use gcc -fvisibility option" >&5
15780 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15781
15782 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15783 if test "${enable_fvisibility+set}" = set; then
15784   enableval="$enable_fvisibility"
15785   cf_with_fvisibility=$enableval
15786 else
15787   cf_with_fvisibility=no
15788 fi;
15789 echo "$as_me:15789: result: $cf_with_fvisibility" >&5
15790 echo "${ECHO_T}$cf_with_fvisibility" >&6
15791
15792 NCURSES_IMPEXP=
15793 NCURSES_CXX_IMPEXP=
15794 if test "x$cf_with_fvisibility" = xyes; then
15795
15796 echo "$as_me:15796: checking if $CC -fvisibility=hidden option works" >&5
15797 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15798 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15799   echo $ECHO_N "(cached) $ECHO_C" >&6
15800 else
15801
15802     cf_save_cflags="$CFLAGS"
15803     CFLAGS="$CFLAGS -fvisibility=hidden"
15804     cat >"conftest.$ac_ext" <<_ACEOF
15805 #line 15805 "configure"
15806 #include "confdefs.h"
15807
15808 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15809
15810 int
15811 main (void)
15812 {
15813
15814         if (somefunc()) return 1;
15815
15816   ;
15817   return 0;
15818 }
15819 _ACEOF
15820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15821 if { (eval echo "$as_me:15821: \"$ac_link\"") >&5
15822   (eval $ac_link) 2>&5
15823   ac_status=$?
15824   echo "$as_me:15824: \$? = $ac_status" >&5
15825   (exit "$ac_status"); } &&
15826          { ac_try='test -s "conftest$ac_exeext"'
15827   { (eval echo "$as_me:15827: \"$ac_try\"") >&5
15828   (eval $ac_try) 2>&5
15829   ac_status=$?
15830   echo "$as_me:15830: \$? = $ac_status" >&5
15831   (exit "$ac_status"); }; }; then
15832   cf_cv_fvisibility_hidden=yes
15833 else
15834   echo "$as_me: failed program was:" >&5
15835 cat "conftest.$ac_ext" >&5
15836 cf_cv_fvisibility_hidden=no
15837 fi
15838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15839     CFLAGS=$cf_save_cflags
15840
15841 fi
15842 echo "$as_me:15842: result: $cf_cv_fvisibility_hidden" >&5
15843 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15844
15845         if test "x$cf_cv_fvisibility_hidden" = xyes
15846         then
15847
15848 cf_fix_cppflags=no
15849 cf_new_cflags=
15850 cf_new_cppflags=
15851 cf_new_extra_cppflags=
15852
15853 for cf_add_cflags in -fvisibility=hidden
15854 do
15855 case "$cf_fix_cppflags" in
15856 (no)
15857         case "$cf_add_cflags" in
15858         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15859                 case "$cf_add_cflags" in
15860                 (-D*)
15861                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15862
15863                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15864                                 && test -z "${cf_tst_cflags}" \
15865                                 && cf_fix_cppflags=yes
15866
15867                         if test "$cf_fix_cppflags" = yes ; then
15868
15869         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15870         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15871
15872                                 continue
15873                         elif test "${cf_tst_cflags}" = "\"'" ; then
15874
15875         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15876         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15877
15878                                 continue
15879                         fi
15880                         ;;
15881                 esac
15882                 case "$CPPFLAGS" in
15883                 (*$cf_add_cflags)
15884                         ;;
15885                 (*)
15886                         case "$cf_add_cflags" in
15887                         (-D*)
15888                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15889
15890 CPPFLAGS=`echo "$CPPFLAGS" | \
15891         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15892                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15893
15894                                 ;;
15895                         esac
15896
15897         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15898         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15899
15900                         ;;
15901                 esac
15902                 ;;
15903         (*)
15904
15905         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15906         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15907
15908                 ;;
15909         esac
15910         ;;
15911 (yes)
15912
15913         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15914         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15915
15916         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15917
15918         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15919                 && test -z "${cf_tst_cflags}" \
15920                 && cf_fix_cppflags=no
15921         ;;
15922 esac
15923 done
15924
15925 if test -n "$cf_new_cflags" ; then
15926
15927         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15928         CFLAGS="${CFLAGS}$cf_new_cflags"
15929
15930 fi
15931
15932 if test -n "$cf_new_cppflags" ; then
15933
15934         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15935         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15936
15937 fi
15938
15939 if test -n "$cf_new_extra_cppflags" ; then
15940
15941         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15942         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15943
15944 fi
15945
15946                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15947         fi
15948         if test -n "$CXX"
15949         then
15950                 ac_ext=cc
15951 ac_cpp='$CXXCPP $CPPFLAGS'
15952 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15953 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15954 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15955 ac_main_return="return"
15956
15957 echo "$as_me:15957: checking if $CXX -fvisibility=hidden option works" >&5
15958 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15959 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15960   echo $ECHO_N "(cached) $ECHO_C" >&6
15961 else
15962
15963     cf_save_cflags="$CXXFLAGS"
15964     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15965     cat >"conftest.$ac_ext" <<_ACEOF
15966 #line 15966 "configure"
15967 #include "confdefs.h"
15968
15969 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15970
15971 int
15972 main (void)
15973 {
15974
15975         if (somefunc()) return 1;
15976
15977   ;
15978   return 0;
15979 }
15980 _ACEOF
15981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15982 if { (eval echo "$as_me:15982: \"$ac_link\"") >&5
15983   (eval $ac_link) 2>&5
15984   ac_status=$?
15985   echo "$as_me:15985: \$? = $ac_status" >&5
15986   (exit "$ac_status"); } &&
15987          { ac_try='test -s "conftest$ac_exeext"'
15988   { (eval echo "$as_me:15988: \"$ac_try\"") >&5
15989   (eval $ac_try) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit "$ac_status"); }; }; then
15993   cf_cv_fvisibility_hidden2=yes
15994 else
15995   echo "$as_me: failed program was:" >&5
15996 cat "conftest.$ac_ext" >&5
15997 cf_cv_fvisibility_hidden2=no
15998 fi
15999 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16000     CXXFLAGS=$cf_save_cflags
16001
16002 fi
16003 echo "$as_me:16003: result: $cf_cv_fvisibility_hidden2" >&5
16004 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16005
16006                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16007                 then
16008
16009 cf_save_CXXFLAGS="$CFLAGS"
16010 CFLAGS="$CXXFLAGS"
16011
16012 cf_fix_cppflags=no
16013 cf_new_cflags=
16014 cf_new_cppflags=
16015 cf_new_extra_cppflags=
16016
16017 for cf_add_cflags in -fvisibility=hidden
16018 do
16019 case "$cf_fix_cppflags" in
16020 (no)
16021         case "$cf_add_cflags" in
16022         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16023                 case "$cf_add_cflags" in
16024                 (-D*)
16025                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16026
16027                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16028                                 && test -z "${cf_tst_cflags}" \
16029                                 && cf_fix_cppflags=yes
16030
16031                         if test "$cf_fix_cppflags" = yes ; then
16032
16033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16035
16036                                 continue
16037                         elif test "${cf_tst_cflags}" = "\"'" ; then
16038
16039         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16040         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16041
16042                                 continue
16043                         fi
16044                         ;;
16045                 esac
16046                 case "$CPPFLAGS" in
16047                 (*$cf_add_cflags)
16048                         ;;
16049                 (*)
16050                         case "$cf_add_cflags" in
16051                         (-D*)
16052                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16053
16054 CPPFLAGS=`echo "$CPPFLAGS" | \
16055         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16056                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16057
16058                                 ;;
16059                         esac
16060
16061         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16062         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16063
16064                         ;;
16065                 esac
16066                 ;;
16067         (*)
16068
16069         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16070         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16071
16072                 ;;
16073         esac
16074         ;;
16075 (yes)
16076
16077         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16078         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16079
16080         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16081
16082         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16083                 && test -z "${cf_tst_cflags}" \
16084                 && cf_fix_cppflags=no
16085         ;;
16086 esac
16087 done
16088
16089 if test -n "$cf_new_cflags" ; then
16090
16091         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16092         CFLAGS="${CFLAGS}$cf_new_cflags"
16093
16094 fi
16095
16096 if test -n "$cf_new_cppflags" ; then
16097
16098         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16099         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16100
16101 fi
16102
16103 if test -n "$cf_new_extra_cppflags" ; then
16104
16105         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16106         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16107
16108 fi
16109
16110 CXXFLAGS="$CFLAGS"
16111 CFLAGS="$cf_save_CXXFLAGS"
16112
16113                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16114                 fi
16115                 ac_ext=c
16116 ac_cpp='$CPP $CPPFLAGS'
16117 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16118 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16120 ac_main_return="return"
16121
16122         fi
16123 fi
16124
16125 ###   use option --enable-interop to turn on use of bindings used for interop
16126 echo "$as_me:16126: checking if you want interop bindings" >&5
16127 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16128
16129 # Check whether --enable-interop or --disable-interop was given.
16130 if test "${enable_interop+set}" = set; then
16131   enableval="$enable_interop"
16132   with_exp_interop=$enableval
16133 else
16134   with_exp_interop=$cf_dft_interop
16135 fi;
16136 echo "$as_me:16136: result: $with_exp_interop" >&5
16137 echo "${ECHO_T}$with_exp_interop" >&6
16138
16139 NCURSES_INTEROP_FUNCS=0
16140 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16141
16142 echo "$as_me:16142: checking if you want experimental safe-sprintf code" >&5
16143 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16144
16145 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16146 if test "${enable_safe_sprintf+set}" = set; then
16147   enableval="$enable_safe_sprintf"
16148   with_safe_sprintf=$enableval
16149 else
16150   with_safe_sprintf=no
16151 fi;
16152 echo "$as_me:16152: result: $with_safe_sprintf" >&5
16153 echo "${ECHO_T}$with_safe_sprintf" >&6
16154
16155 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16156 # when hashmap is used scroll hints are useless
16157 if test "$with_hashmap" = no ; then
16158 echo "$as_me:16158: checking if you want to experiment without scrolling-hints code" >&5
16159 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16160
16161 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16162 if test "${enable_scroll_hints+set}" = set; then
16163   enableval="$enable_scroll_hints"
16164   with_scroll_hints=$enableval
16165 else
16166   with_scroll_hints=yes
16167 fi;
16168 echo "$as_me:16168: result: $with_scroll_hints" >&5
16169 echo "${ECHO_T}$with_scroll_hints" >&6
16170 test "x$with_scroll_hints" = xyes &&
16171 cat >>confdefs.h <<\EOF
16172 #define USE_SCROLL_HINTS 1
16173 EOF
16174
16175 fi
16176
16177 echo "$as_me:16177: checking if you want wgetch-events code" >&5
16178 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16179
16180 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16181 if test "${enable_wgetch_events+set}" = set; then
16182   enableval="$enable_wgetch_events"
16183   with_wgetch_events=$enableval
16184 else
16185   with_wgetch_events=no
16186 fi;
16187 echo "$as_me:16187: result: $with_wgetch_events" >&5
16188 echo "${ECHO_T}$with_wgetch_events" >&6
16189 if test "x$with_wgetch_events" = xyes ; then
16190
16191 cat >>confdefs.h <<\EOF
16192 #define NCURSES_WGETCH_EVENTS 1
16193 EOF
16194
16195         NCURSES_WGETCH_EVENTS=1
16196 else
16197         NCURSES_WGETCH_EVENTS=0
16198 fi
16199
16200 case "$cf_cv_system_name" in
16201 (*mingw32*|*mingw64*|*-msvc*)
16202         echo "$as_me:16202: checking if you want experimental-Windows driver" >&5
16203 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16204
16205 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16206 if test "${enable_exp_win32+set}" = set; then
16207   enableval="$enable_exp_win32"
16208   with_exp_win32=$enableval
16209 else
16210   with_exp_win32=no
16211 fi;
16212         echo "$as_me:16212: result: $with_exp_win32" >&5
16213 echo "${ECHO_T}$with_exp_win32" >&6
16214         if test "x$with_exp_win32" = xyes
16215         then
16216
16217 cat >>confdefs.h <<\EOF
16218 #define EXP_WIN32_DRIVER 1
16219 EOF
16220
16221                 EXP_WIN32_DRIVER=1
16222                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16223         else
16224                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16225                 EXP_WIN32_DRIVER=0
16226         fi
16227         ;;
16228 (*)
16229         EXP_WIN32_DRIVER=0
16230         INTERNALS_HDR=
16231         ;;
16232 esac
16233
16234 ###############################################################################
16235
16236 ###     use option --disable-echo to suppress full display compiling commands
16237
16238 echo "$as_me:16238: checking if you want to see long compiling messages" >&5
16239 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16240
16241 # Check whether --enable-echo or --disable-echo was given.
16242 if test "${enable_echo+set}" = set; then
16243   enableval="$enable_echo"
16244   test "$enableval" != no && enableval=yes
16245         if test "$enableval" != "yes" ; then
16246
16247         ECHO_LT='--silent'
16248         ECHO_LD='@echo linking $@;'
16249         RULE_CC='@echo compiling $<'
16250         SHOW_CC='@echo compiling $@'
16251         ECHO_CC='@'
16252
16253         else
16254
16255         ECHO_LT=''
16256         ECHO_LD=''
16257         RULE_CC=''
16258         SHOW_CC=''
16259         ECHO_CC=''
16260
16261         fi
16262 else
16263   enableval=yes
16264
16265         ECHO_LT=''
16266         ECHO_LD=''
16267         RULE_CC=''
16268         SHOW_CC=''
16269         ECHO_CC=''
16270
16271 fi;
16272 echo "$as_me:16272: result: $enableval" >&5
16273 echo "${ECHO_T}$enableval" >&6
16274
16275 if test "x$enable_echo" = xyes; then
16276         ECHO_LINK=
16277 else
16278         ECHO_LINK='@ echo linking $@ ... ;'
16279         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16280         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16281 fi
16282
16283 # --disable-stripping is used for debugging
16284
16285 echo "$as_me:16285: checking if you want to install stripped executables" >&5
16286 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16287
16288 # Check whether --enable-stripping or --disable-stripping was given.
16289 if test "${enable_stripping+set}" = set; then
16290   enableval="$enable_stripping"
16291   test "$enableval" != no && enableval=yes
16292         if test "$enableval" != "yes" ; then
16293     enable_stripping=no
16294         else
16295                 enable_stripping=yes
16296         fi
16297 else
16298   enableval=yes
16299         enable_stripping=yes
16300
16301 fi;
16302 echo "$as_me:16302: result: $enable_stripping" >&5
16303 echo "${ECHO_T}$enable_stripping" >&6
16304
16305 if test "$enable_stripping" = yes
16306 then
16307         INSTALL_OPT_S="-s"
16308 else
16309         INSTALL_OPT_S=
16310 fi
16311
16312 : "${INSTALL:=install}"
16313 echo "$as_me:16313: checking if install accepts -p option" >&5
16314 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16315 if test "${cf_cv_install_p+set}" = set; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318
16319         rm -rf ./conftest*
16320         date >conftest.in
16321         mkdir conftest.out
16322         sleep 3
16323         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16324         then
16325                 if test -f conftest.out/conftest.in
16326                 then
16327                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16328                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16329                         if test -s conftest.err
16330                         then
16331                                 cf_cv_install_p=no
16332                         else
16333                                 cf_cv_install_p=yes
16334                         fi
16335                 else
16336                         cf_cv_install_p=no
16337                 fi
16338         else
16339                 cf_cv_install_p=no
16340         fi
16341         rm -rf ./conftest*
16342
16343 fi
16344 echo "$as_me:16344: result: $cf_cv_install_p" >&5
16345 echo "${ECHO_T}$cf_cv_install_p" >&6
16346
16347 echo "$as_me:16347: checking if install needs to be told about ownership" >&5
16348 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16349 case `$ac_config_guess` in
16350 (*minix)
16351         with_install_o=yes
16352         ;;
16353 (*)
16354         with_install_o=no
16355         ;;
16356 esac
16357
16358 echo "$as_me:16358: result: $with_install_o" >&5
16359 echo "${ECHO_T}$with_install_o" >&6
16360 if test "x$with_install_o" = xyes
16361 then
16362         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'`"
16363 else
16364         INSTALL_OPT_O=
16365 fi
16366
16367 # If we're avoiding relinking of shared libraries during install, that is to
16368 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16369 # the install program has "-p" (for preserving timestamps).
16370 cf_cv_do_reranlib=yes
16371 if test "x$cf_cv_install_p" = xyes
16372 then
16373         if test "x$cf_cv_do_relink" != xyes
16374         then
16375                 cf_cv_do_reranlib=no
16376                 INSTALL_OPT_P="-p"
16377                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16378         fi
16379 fi
16380
16381 ###     use option --enable-warnings to turn on all gcc warnings
16382
16383 echo "$as_me:16383: checking if you want to use C11 _Noreturn feature" >&5
16384 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16385
16386 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16387 if test "${enable_stdnoreturn+set}" = set; then
16388   enableval="$enable_stdnoreturn"
16389   test "$enableval" != yes && enableval=no
16390         if test "$enableval" != "no" ; then
16391     enable_stdnoreturn=yes
16392         else
16393                 enable_stdnoreturn=no
16394         fi
16395 else
16396   enableval=no
16397         enable_stdnoreturn=no
16398
16399 fi;
16400 echo "$as_me:16400: result: $enable_stdnoreturn" >&5
16401 echo "${ECHO_T}$enable_stdnoreturn" >&6
16402
16403 if test $enable_stdnoreturn = yes; then
16404 echo "$as_me:16404: checking for C11 _Noreturn feature" >&5
16405 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16406 if test "${cf_cv_c11_noreturn+set}" = set; then
16407   echo $ECHO_N "(cached) $ECHO_C" >&6
16408 else
16409   cat >"conftest.$ac_ext" <<_ACEOF
16410 #line 16410 "configure"
16411 #include "confdefs.h"
16412
16413 #include <stdio.h>
16414 #include <stdlib.h>
16415 #include <stdnoreturn.h>
16416 static _Noreturn void giveup(void) { exit(0); }
16417
16418 int
16419 main (void)
16420 {
16421 if (feof(stdin)) giveup()
16422   ;
16423   return 0;
16424 }
16425 _ACEOF
16426 rm -f "conftest.$ac_objext"
16427 if { (eval echo "$as_me:16427: \"$ac_compile\"") >&5
16428   (eval $ac_compile) 2>&5
16429   ac_status=$?
16430   echo "$as_me:16430: \$? = $ac_status" >&5
16431   (exit "$ac_status"); } &&
16432          { ac_try='test -s "conftest.$ac_objext"'
16433   { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434   (eval $ac_try) 2>&5
16435   ac_status=$?
16436   echo "$as_me:16436: \$? = $ac_status" >&5
16437   (exit "$ac_status"); }; }; then
16438   cf_cv_c11_noreturn=yes
16439 else
16440   echo "$as_me: failed program was:" >&5
16441 cat "conftest.$ac_ext" >&5
16442 cf_cv_c11_noreturn=no
16443 fi
16444 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16445
16446 fi
16447 echo "$as_me:16447: result: $cf_cv_c11_noreturn" >&5
16448 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16449 else
16450         cf_cv_c11_noreturn=no,
16451 fi
16452
16453 if test "$cf_cv_c11_noreturn" = yes; then
16454
16455 cat >>confdefs.h <<\EOF
16456 #define HAVE_STDNORETURN_H 1
16457 EOF
16458
16459 cat >>confdefs.h <<EOF
16460 #define STDC_NORETURN _Noreturn
16461 EOF
16462
16463         HAVE_STDNORETURN_H=1
16464 else
16465         HAVE_STDNORETURN_H=0
16466 fi
16467
16468 if test "$GCC" = yes || test "$GXX" = yes
16469 then
16470
16471 if test "$GCC" = yes || test "$GXX" = yes
16472 then
16473         case $CFLAGS in
16474         (*-Werror=*)
16475                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16476
16477 echo "${as_me:-configure}:16477: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16478
16479                 cf_temp_flags=
16480                 for cf_temp_scan in $CFLAGS
16481                 do
16482                         case "x$cf_temp_scan" in
16483                         (x-Werror=*)
16484
16485         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16486         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16487
16488                                 ;;
16489                         (*)
16490
16491         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16492         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16493
16494                                 ;;
16495                         esac
16496                 done
16497                 CFLAGS="$cf_temp_flags"
16498                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16499
16500 echo "${as_me:-configure}:16500: testing ... fixed $CFLAGS ..." 1>&5
16501
16502                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16503
16504 echo "${as_me:-configure}:16504: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16505
16506                 ;;
16507         esac
16508 fi
16509
16510 if test "$GCC" = yes || test "$GXX" = yes
16511 then
16512         case $CPPFLAGS in
16513         (*-Werror=*)
16514                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16515
16516 echo "${as_me:-configure}:16516: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16517
16518                 cf_temp_flags=
16519                 for cf_temp_scan in $CPPFLAGS
16520                 do
16521                         case "x$cf_temp_scan" in
16522                         (x-Werror=*)
16523
16524         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16525         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16526
16527                                 ;;
16528                         (*)
16529
16530         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16531         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16532
16533                                 ;;
16534                         esac
16535                 done
16536                 CPPFLAGS="$cf_temp_flags"
16537                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16538
16539 echo "${as_me:-configure}:16539: testing ... fixed $CPPFLAGS ..." 1>&5
16540
16541                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16542
16543 echo "${as_me:-configure}:16543: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16544
16545                 ;;
16546         esac
16547 fi
16548
16549 if test "$GCC" = yes || test "$GXX" = yes
16550 then
16551         case $LDFLAGS in
16552         (*-Werror=*)
16553                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16554
16555 echo "${as_me:-configure}:16555: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16556
16557                 cf_temp_flags=
16558                 for cf_temp_scan in $LDFLAGS
16559                 do
16560                         case "x$cf_temp_scan" in
16561                         (x-Werror=*)
16562
16563         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16564         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16565
16566                                 ;;
16567                         (*)
16568
16569         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16570         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16571
16572                                 ;;
16573                         esac
16574                 done
16575                 LDFLAGS="$cf_temp_flags"
16576                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16577
16578 echo "${as_me:-configure}:16578: testing ... fixed $LDFLAGS ..." 1>&5
16579
16580                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16581
16582 echo "${as_me:-configure}:16582: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16583
16584                 ;;
16585         esac
16586 fi
16587
16588 echo "$as_me:16588: checking if you want to turn on gcc warnings" >&5
16589 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16590
16591 # Check whether --enable-warnings or --disable-warnings was given.
16592 if test "${enable_warnings+set}" = set; then
16593   enableval="$enable_warnings"
16594   test "$enableval" != yes && enableval=no
16595         if test "$enableval" != "no" ; then
16596     enable_warnings=yes
16597         else
16598                 enable_warnings=no
16599         fi
16600 else
16601   enableval=no
16602         enable_warnings=no
16603
16604 fi;
16605 echo "$as_me:16605: result: $enable_warnings" >&5
16606 echo "${ECHO_T}$enable_warnings" >&6
16607 if test "$enable_warnings" = "yes"
16608 then
16609
16610 if test "x$have_x" = xyes; then
16611
16612 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16613 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16614 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16615 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16616 for cf_X_CFLAGS in $X_CFLAGS
16617 do
16618         case "x$cf_X_CFLAGS" in
16619         x-[IUD]*)
16620                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16621                 ;;
16622         *)
16623                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16624                 ;;
16625         esac
16626 done
16627
16628 cat >"conftest.$ac_ext" <<_ACEOF
16629 #line 16629 "configure"
16630 #include "confdefs.h"
16631
16632 #include <stdlib.h>
16633 #include <X11/Intrinsic.h>
16634
16635 int
16636 main (void)
16637 {
16638 String foo = malloc(1); free((void*)foo)
16639   ;
16640   return 0;
16641 }
16642 _ACEOF
16643 rm -f "conftest.$ac_objext"
16644 if { (eval echo "$as_me:16644: \"$ac_compile\"") >&5
16645   (eval $ac_compile) 2>&5
16646   ac_status=$?
16647   echo "$as_me:16647: \$? = $ac_status" >&5
16648   (exit "$ac_status"); } &&
16649          { ac_try='test -s "conftest.$ac_objext"'
16650   { (eval echo "$as_me:16650: \"$ac_try\"") >&5
16651   (eval $ac_try) 2>&5
16652   ac_status=$?
16653   echo "$as_me:16653: \$? = $ac_status" >&5
16654   (exit "$ac_status"); }; }; then
16655
16656 echo "$as_me:16656: checking for X11/Xt const-feature" >&5
16657 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16658 if test "${cf_cv_const_x_string+set}" = set; then
16659   echo $ECHO_N "(cached) $ECHO_C" >&6
16660 else
16661
16662         cat >"conftest.$ac_ext" <<_ACEOF
16663 #line 16663 "configure"
16664 #include "confdefs.h"
16665
16666 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16667 #undef  XTSTRINGDEFINES /* X11R5 and later */
16668 #include <stdlib.h>
16669 #include <X11/Intrinsic.h>
16670
16671 int
16672 main (void)
16673 {
16674 String foo = malloc(1); *foo = 0
16675   ;
16676   return 0;
16677 }
16678 _ACEOF
16679 rm -f "conftest.$ac_objext"
16680 if { (eval echo "$as_me:16680: \"$ac_compile\"") >&5
16681   (eval $ac_compile) 2>&5
16682   ac_status=$?
16683   echo "$as_me:16683: \$? = $ac_status" >&5
16684   (exit "$ac_status"); } &&
16685          { ac_try='test -s "conftest.$ac_objext"'
16686   { (eval echo "$as_me:16686: \"$ac_try\"") >&5
16687   (eval $ac_try) 2>&5
16688   ac_status=$?
16689   echo "$as_me:16689: \$? = $ac_status" >&5
16690   (exit "$ac_status"); }; }; then
16691
16692                         cf_cv_const_x_string=no
16693
16694 else
16695   echo "$as_me: failed program was:" >&5
16696 cat "conftest.$ac_ext" >&5
16697
16698                         cf_cv_const_x_string=yes
16699
16700 fi
16701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16702
16703 fi
16704 echo "$as_me:16704: result: $cf_cv_const_x_string" >&5
16705 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16706
16707 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16708 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16709 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16710
16711 case "$cf_cv_const_x_string" in
16712 (no)
16713
16714         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16715         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16716
16717         ;;
16718 (*)
16719
16720         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16721         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16722
16723         ;;
16724 esac
16725
16726 else
16727   echo "$as_me: failed program was:" >&5
16728 cat "conftest.$ac_ext" >&5
16729 fi
16730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16731  fi
16732 cat > "conftest.$ac_ext" <<EOF
16733 #line 16733 "${as_me:-configure}"
16734 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16735 EOF
16736 if test "$INTEL_COMPILER" = yes
16737 then
16738 # The "-wdXXX" options suppress warnings:
16739 # remark #1419: external declaration in primary source file
16740 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16741 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16742 # remark #193: zero used for undefined preprocessing identifier
16743 # remark #593: variable "curs_sb_left_arrow" was set but never used
16744 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16745 # remark #869: parameter "tw" was never referenced
16746 # remark #981: operands are evaluated in unspecified order
16747 # warning #279: controlling expression is constant
16748
16749         { echo "$as_me:16749: checking for $CC warning options..." >&5
16750 echo "$as_me: checking for $CC warning options..." >&6;}
16751         cf_save_CFLAGS="$CFLAGS"
16752         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16753         for cf_opt in \
16754                 wd1419 \
16755                 wd1683 \
16756                 wd1684 \
16757                 wd193 \
16758                 wd593 \
16759                 wd279 \
16760                 wd810 \
16761                 wd869 \
16762                 wd981
16763         do
16764                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16765                 if { (eval echo "$as_me:16765: \"$ac_compile\"") >&5
16766   (eval $ac_compile) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit "$ac_status"); }; then
16770                         test -n "$verbose" && echo "$as_me:16770: result: ... -$cf_opt" >&5
16771 echo "${ECHO_T}... -$cf_opt" >&6
16772                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16773                 fi
16774         done
16775         CFLAGS="$cf_save_CFLAGS"
16776 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16777 then
16778         { echo "$as_me:16778: checking for $CC warning options..." >&5
16779 echo "$as_me: checking for $CC warning options..." >&6;}
16780         cf_save_CFLAGS="$CFLAGS"
16781         cf_warn_CONST=""
16782         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16783         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16784         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16785         for cf_opt in W Wall \
16786                 Wbad-function-cast \
16787                 Wcast-align \
16788                 Wcast-qual \
16789                 Wdeclaration-after-statement \
16790                 Wextra \
16791                 Winline \
16792                 Wmissing-declarations \
16793                 Wmissing-prototypes \
16794                 Wnested-externs \
16795                 Wpointer-arith \
16796                 Wshadow \
16797                 Wstrict-prototypes \
16798                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16799         do
16800                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16801                 if { (eval echo "$as_me:16801: \"$ac_compile\"") >&5
16802   (eval $ac_compile) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit "$ac_status"); }; then
16806                         test -n "$verbose" && echo "$as_me:16806: result: ... -$cf_opt" >&5
16807 echo "${ECHO_T}... -$cf_opt" >&6
16808                         case "$cf_opt" in
16809                         (Winline)
16810                                 case "$GCC_VERSION" in
16811                                 ([34].*)
16812                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16813
16814 echo "${as_me:-configure}:16814: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16815
16816                                         continue;;
16817                                 esac
16818                                 ;;
16819                         (Wpointer-arith)
16820                                 case "$GCC_VERSION" in
16821                                 ([12].*)
16822                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16823
16824 echo "${as_me:-configure}:16824: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16825
16826                                         continue;;
16827                                 esac
16828                                 ;;
16829                         esac
16830                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16831                 fi
16832         done
16833         CFLAGS="$cf_save_CFLAGS"
16834 fi
16835 rm -rf ./conftest*
16836
16837 fi
16838
16839 if test "$GCC" = yes || test "$GXX" = yes
16840 then
16841 cat > conftest.i <<EOF
16842 #ifndef GCC_PRINTF
16843 #define GCC_PRINTF 0
16844 #endif
16845 #ifndef GCC_SCANF
16846 #define GCC_SCANF 0
16847 #endif
16848 #ifndef GCC_NORETURN
16849 #define GCC_NORETURN /* nothing */
16850 #endif
16851 #ifndef GCC_UNUSED
16852 #define GCC_UNUSED /* nothing */
16853 #endif
16854 EOF
16855 if test "$GCC" = yes
16856 then
16857         { echo "$as_me:16857: checking for $CC __attribute__ directives..." >&5
16858 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16859 cat > "conftest.$ac_ext" <<EOF
16860 #line 16860 "${as_me:-configure}"
16861 #include "confdefs.h"
16862 #include "conftest.h"
16863 #include "conftest.i"
16864 #if     GCC_PRINTF
16865 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16866 #else
16867 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16868 #endif
16869 #if     GCC_SCANF
16870 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16871 #else
16872 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16873 #endif
16874 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16875 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16876 extern GCC_NORETURN void foo(void);
16877 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16878 EOF
16879         cf_printf_attribute=no
16880         cf_scanf_attribute=no
16881         for cf_attribute in scanf printf unused noreturn
16882         do
16883
16884 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16885
16886                 cf_directive="__attribute__(($cf_attribute))"
16887                 echo "checking for $CC $cf_directive" 1>&5
16888
16889                 case "$cf_attribute" in
16890                 (printf)
16891                         cf_printf_attribute=yes
16892                         cat >conftest.h <<EOF
16893 #define GCC_$cf_ATTRIBUTE 1
16894 EOF
16895                         ;;
16896                 (scanf)
16897                         cf_scanf_attribute=yes
16898                         cat >conftest.h <<EOF
16899 #define GCC_$cf_ATTRIBUTE 1
16900 EOF
16901                         ;;
16902                 (*)
16903                         cat >conftest.h <<EOF
16904 #define GCC_$cf_ATTRIBUTE $cf_directive
16905 EOF
16906                         ;;
16907                 esac
16908
16909                 if { (eval echo "$as_me:16909: \"$ac_compile\"") >&5
16910   (eval $ac_compile) 2>&5
16911   ac_status=$?
16912   echo "$as_me:16912: \$? = $ac_status" >&5
16913   (exit "$ac_status"); }; then
16914                         test -n "$verbose" && echo "$as_me:16914: result: ... $cf_attribute" >&5
16915 echo "${ECHO_T}... $cf_attribute" >&6
16916                         cat conftest.h >>confdefs.h
16917                         case "$cf_attribute" in
16918                         (noreturn)
16919
16920 cat >>confdefs.h <<EOF
16921 #define GCC_NORETURN $cf_directive
16922 EOF
16923
16924                                 ;;
16925                         (printf)
16926                                 cf_value='/* nothing */'
16927                                 if test "$cf_printf_attribute" != no ; then
16928                                         cf_value='__attribute__((format(printf,fmt,var)))'
16929
16930 cat >>confdefs.h <<\EOF
16931 #define GCC_PRINTF 1
16932 EOF
16933
16934                                 fi
16935
16936 cat >>confdefs.h <<EOF
16937 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16938 EOF
16939
16940                                 ;;
16941                         (scanf)
16942                                 cf_value='/* nothing */'
16943                                 if test "$cf_scanf_attribute" != no ; then
16944                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16945
16946 cat >>confdefs.h <<\EOF
16947 #define GCC_SCANF 1
16948 EOF
16949
16950                                 fi
16951
16952 cat >>confdefs.h <<EOF
16953 #define GCC_SCANFLIKE(fmt,var) $cf_value
16954 EOF
16955
16956                                 ;;
16957                         (unused)
16958
16959 cat >>confdefs.h <<EOF
16960 #define GCC_UNUSED $cf_directive
16961 EOF
16962
16963                                 ;;
16964                         esac
16965                 fi
16966         done
16967 else
16968         ${FGREP-fgrep} define conftest.i >>confdefs.h
16969 fi
16970 rm -rf ./conftest*
16971 fi
16972
16973 fi
16974
16975 if test "x$enable_warnings" = "xyes"; then
16976
16977         ADAFLAGS="$ADAFLAGS -gnatg"
16978
16979         if test "x$cf_with_cxx" = xyes ; then
16980
16981 INTEL_CPLUSPLUS=no
16982
16983 if test "$GCC" = yes ; then
16984         case "$host_os" in
16985         (linux*|gnu*)
16986                 echo "$as_me:16986: checking if this is really Intel C++ compiler" >&5
16987 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16988                 cf_save_CFLAGS="$CXXFLAGS"
16989                 CXXFLAGS="$CXXFLAGS -no-gcc"
16990                 cat >"conftest.$ac_ext" <<_ACEOF
16991 #line 16991 "configure"
16992 #include "confdefs.h"
16993
16994 int
16995 main (void)
16996 {
16997
16998 #ifdef __INTEL_COMPILER
16999 #else
17000 make an error
17001 #endif
17002
17003   ;
17004   return 0;
17005 }
17006 _ACEOF
17007 rm -f "conftest.$ac_objext"
17008 if { (eval echo "$as_me:17008: \"$ac_compile\"") >&5
17009   (eval $ac_compile) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit "$ac_status"); } &&
17013          { ac_try='test -s "conftest.$ac_objext"'
17014   { (eval echo "$as_me:17014: \"$ac_try\"") >&5
17015   (eval $ac_try) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit "$ac_status"); }; }; then
17019   INTEL_CPLUSPLUS=yes
17020 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17021
17022 else
17023   echo "$as_me: failed program was:" >&5
17024 cat "conftest.$ac_ext" >&5
17025 fi
17026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17027                 CXXFLAGS="$cf_save_CFLAGS"
17028                 echo "$as_me:17028: result: $INTEL_CPLUSPLUS" >&5
17029 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17030                 ;;
17031         esac
17032 fi
17033
17034 CLANG_CPLUSPLUS=no
17035
17036 if test "$GCC" = yes ; then
17037         echo "$as_me:17037: checking if this is really Clang C++ compiler" >&5
17038 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17039         cf_save_CFLAGS="$CXXFLAGS"
17040         cat >"conftest.$ac_ext" <<_ACEOF
17041 #line 17041 "configure"
17042 #include "confdefs.h"
17043
17044 int
17045 main (void)
17046 {
17047
17048 #ifdef __clang__
17049 #else
17050 make an error
17051 #endif
17052
17053   ;
17054   return 0;
17055 }
17056 _ACEOF
17057 rm -f "conftest.$ac_objext"
17058 if { (eval echo "$as_me:17058: \"$ac_compile\"") >&5
17059   (eval $ac_compile) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit "$ac_status"); } &&
17063          { ac_try='test -s "conftest.$ac_objext"'
17064   { (eval echo "$as_me:17064: \"$ac_try\"") >&5
17065   (eval $ac_try) 2>&5
17066   ac_status=$?
17067   echo "$as_me:17067: \$? = $ac_status" >&5
17068   (exit "$ac_status"); }; }; then
17069   CLANG_CPLUSPLUS=yes
17070
17071 else
17072   echo "$as_me: failed program was:" >&5
17073 cat "conftest.$ac_ext" >&5
17074 fi
17075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17076         CXXFLAGS="$cf_save_CFLAGS"
17077         echo "$as_me:17077: result: $CLANG_CPLUSPLUS" >&5
17078 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17079 fi
17080
17081 CLANG_VERSION=none
17082
17083 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17084         case "$CC" in
17085         (c[1-9][0-9]|*/c[1-9][0-9])
17086                 { echo "$as_me:17086: WARNING: replacing broken compiler alias $CC" >&5
17087 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17088                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17089                 CC=clang
17090                 ;;
17091         esac
17092
17093         echo "$as_me:17093: checking version of $CC" >&5
17094 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17095         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.].*//'`"
17096         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17097         echo "$as_me:17097: result: $CLANG_VERSION" >&5
17098 echo "${ECHO_T}$CLANG_VERSION" >&6
17099
17100         for cf_clang_opt in \
17101                 -Qunused-arguments \
17102                 -Wno-error=implicit-function-declaration
17103         do
17104                 echo "$as_me:17104: checking if option $cf_clang_opt works" >&5
17105 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17106                 cf_save_CFLAGS="$CFLAGS"
17107                 CFLAGS="$CFLAGS $cf_clang_opt"
17108                 cat >"conftest.$ac_ext" <<_ACEOF
17109 #line 17109 "configure"
17110 #include "confdefs.h"
17111
17112                         #include <stdio.h>
17113 int
17114 main (void)
17115 {
17116
17117                         printf("hello!\\n");
17118   ;
17119   return 0;
17120 }
17121 _ACEOF
17122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17123 if { (eval echo "$as_me:17123: \"$ac_link\"") >&5
17124   (eval $ac_link) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit "$ac_status"); } &&
17128          { ac_try='test -s "conftest$ac_exeext"'
17129   { (eval echo "$as_me:17129: \"$ac_try\"") >&5
17130   (eval $ac_try) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit "$ac_status"); }; }; then
17134
17135                         cf_clang_optok=yes
17136 else
17137   echo "$as_me: failed program was:" >&5
17138 cat "conftest.$ac_ext" >&5
17139
17140                         cf_clang_optok=no
17141 fi
17142 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17143                 echo "$as_me:17143: result: $cf_clang_optok" >&5
17144 echo "${ECHO_T}$cf_clang_optok" >&6
17145                 CFLAGS="$cf_save_CFLAGS"
17146                 if test "$cf_clang_optok" = yes; then
17147                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17148
17149 echo "${as_me:-configure}:17149: testing adding option $cf_clang_opt ..." 1>&5
17150
17151         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17152         CFLAGS="${CFLAGS}$cf_clang_opt"
17153
17154                 fi
17155         done
17156 fi
17157
17158 ac_ext=cc
17159 ac_cpp='$CXXCPP $CPPFLAGS'
17160 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17161 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17162 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17163 ac_main_return="return"
17164
17165 cat > conftest.$ac_ext <<EOF
17166 #line 17166 "configure"
17167 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17168 EOF
17169
17170 if test "$INTEL_CPLUSPLUS" = yes
17171 then
17172 # The "-wdXXX" options suppress warnings:
17173 # remark #1419: external declaration in primary source file
17174 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17175 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17176 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17177 # remark #193: zero used for undefined preprocessing identifier
17178 # remark #593: variable "curs_sb_left_arrow" was set but never used
17179 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17180 # remark #869: parameter "tw" was never referenced
17181 # remark #981: operands are evaluated in unspecified order
17182 # warning #269: invalid format string conversion
17183
17184         { echo "$as_me:17184: checking for $CC warning options..." >&5
17185 echo "$as_me: checking for $CC warning options..." >&6;}
17186         cf_save_CXXFLAGS="$CXXFLAGS"
17187         EXTRA_CXXFLAGS="-Wall"
17188         for cf_opt in \
17189                 wd1419 \
17190                 wd1682 \
17191                 wd1683 \
17192                 wd1684 \
17193                 wd193 \
17194                 wd279 \
17195                 wd593 \
17196                 wd810 \
17197                 wd869 \
17198                 wd981
17199         do
17200                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17201                 if { (eval echo "$as_me:17201: \"$ac_compile\"") >&5
17202   (eval $ac_compile) 2>&5
17203   ac_status=$?
17204   echo "$as_me:17204: \$? = $ac_status" >&5
17205   (exit "$ac_status"); }; then
17206                         test -n "$verbose" && echo "$as_me:17206: result: ... -$cf_opt" >&5
17207 echo "${ECHO_T}... -$cf_opt" >&6
17208                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17209                 fi
17210         done
17211         CXXFLAGS="$cf_save_CXXFLAGS"
17212
17213 elif test "$GXX" = yes
17214 then
17215         { echo "$as_me:17215: checking for $CXX warning options..." >&5
17216 echo "$as_me: checking for $CXX warning options..." >&6;}
17217         cf_save_CXXFLAGS="$CXXFLAGS"
17218         EXTRA_CXXFLAGS="-W -Wall"
17219         cf_gxx_extra_warnings=""
17220         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17221         case "$GXX_VERSION" in
17222         ([1-2].*)
17223                 ;;
17224         (*)
17225                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17226                 ;;
17227         esac
17228         for cf_opt in \
17229                 Wabi \
17230                 fabi-version=0 \
17231                 Wextra \
17232                 Wignored-qualifiers \
17233                 Wlogical-op \
17234                 Woverloaded-virtual \
17235                 Wsign-promo \
17236                 Wsynth \
17237                 Wold-style-cast \
17238                 Wcast-align \
17239                 Wcast-qual \
17240                 Wpointer-arith \
17241                 Wshadow \
17242                 Wundef $cf_gxx_extra_warnings Wno-unused
17243         do
17244                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17245                 if { (eval echo "$as_me:17245: \"$ac_compile\"") >&5
17246   (eval $ac_compile) 2>&5
17247   ac_status=$?
17248   echo "$as_me:17248: \$? = $ac_status" >&5
17249   (exit "$ac_status"); }; then
17250                         test -n "$verbose" && echo "$as_me:17250: result: ... -$cf_opt" >&5
17251 echo "${ECHO_T}... -$cf_opt" >&6
17252                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17253                 else
17254                         test -n "$verbose" && echo "$as_me:17254: result: ... no -$cf_opt" >&5
17255 echo "${ECHO_T}... no -$cf_opt" >&6
17256                 fi
17257         done
17258         CXXFLAGS="$cf_save_CXXFLAGS"
17259 fi
17260
17261 rm -rf ./conftest*
17262 ac_ext=c
17263 ac_cpp='$CPP $CPPFLAGS'
17264 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17265 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17266 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17267 ac_main_return="return"
17268
17269         fi
17270 fi
17271
17272 echo "$as_me:17272: checking if you want to work around bogus compiler/loader warnings" >&5
17273 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17274
17275 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17276 if test "${enable_string_hacks+set}" = set; then
17277   enableval="$enable_string_hacks"
17278   enable_string_hacks=$enableval
17279 else
17280   enable_string_hacks=no
17281 fi;
17282 echo "$as_me:17282: result: $enable_string_hacks" >&5
17283 echo "${ECHO_T}$enable_string_hacks" >&6
17284
17285 if test "x$enable_string_hacks" = "xyes"; then
17286
17287 cat >>confdefs.h <<\EOF
17288 #define USE_STRING_HACKS 1
17289 EOF
17290
17291         { echo "$as_me:17291: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17292 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17293         echo "$as_me:17293: checking for strlcat" >&5
17294 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17295 if test "${ac_cv_func_strlcat+set}" = set; then
17296   echo $ECHO_N "(cached) $ECHO_C" >&6
17297 else
17298   cat >"conftest.$ac_ext" <<_ACEOF
17299 #line 17299 "configure"
17300 #include "confdefs.h"
17301 #define strlcat autoconf_temporary
17302 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17303 #undef strlcat
17304
17305 #ifdef __cplusplus
17306 extern "C"
17307 #endif
17308
17309 /* We use char because int might match the return type of a gcc2
17310    builtin and then its argument prototype would still apply.  */
17311 char strlcat (void);
17312
17313 int
17314 main (void)
17315 {
17316
17317 /* The GNU C library defines stubs for functions which it implements
17318     to always fail with ENOSYS.  Some functions are actually named
17319     something starting with __ and the normal name is an alias.  */
17320 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17321 #error found stub for strlcat
17322 #endif
17323
17324         return strlcat ();
17325   ;
17326   return 0;
17327 }
17328 _ACEOF
17329 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17330 if { (eval echo "$as_me:17330: \"$ac_link\"") >&5
17331   (eval $ac_link) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit "$ac_status"); } &&
17335          { ac_try='test -s "conftest$ac_exeext"'
17336   { (eval echo "$as_me:17336: \"$ac_try\"") >&5
17337   (eval $ac_try) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit "$ac_status"); }; }; then
17341   ac_cv_func_strlcat=yes
17342 else
17343   echo "$as_me: failed program was:" >&5
17344 cat "conftest.$ac_ext" >&5
17345 ac_cv_func_strlcat=no
17346 fi
17347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17348 fi
17349 echo "$as_me:17349: result: $ac_cv_func_strlcat" >&5
17350 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17351 if test "$ac_cv_func_strlcat" = yes; then
17352
17353 cat >>confdefs.h <<\EOF
17354 #define HAVE_STRLCAT 1
17355 EOF
17356
17357 else
17358
17359                 echo "$as_me:17359: checking for strlcat in -lbsd" >&5
17360 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17361 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17362   echo $ECHO_N "(cached) $ECHO_C" >&6
17363 else
17364   ac_check_lib_save_LIBS=$LIBS
17365 LIBS="-lbsd  $LIBS"
17366 cat >"conftest.$ac_ext" <<_ACEOF
17367 #line 17367 "configure"
17368 #include "confdefs.h"
17369
17370 /* Override any gcc2 internal prototype to avoid an error.  */
17371 #ifdef __cplusplus
17372 extern "C"
17373 #endif
17374 /* We use char because int might match the return type of a gcc2
17375    builtin and then its argument prototype would still apply.  */
17376 char strlcat ();
17377 int
17378 main (void)
17379 {
17380 strlcat ();
17381   ;
17382   return 0;
17383 }
17384 _ACEOF
17385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17386 if { (eval echo "$as_me:17386: \"$ac_link\"") >&5
17387   (eval $ac_link) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit "$ac_status"); } &&
17391          { ac_try='test -s "conftest$ac_exeext"'
17392   { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit "$ac_status"); }; }; then
17397   ac_cv_lib_bsd_strlcat=yes
17398 else
17399   echo "$as_me: failed program was:" >&5
17400 cat "conftest.$ac_ext" >&5
17401 ac_cv_lib_bsd_strlcat=no
17402 fi
17403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17404 LIBS=$ac_check_lib_save_LIBS
17405 fi
17406 echo "$as_me:17406: result: $ac_cv_lib_bsd_strlcat" >&5
17407 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17408 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17409
17410 cf_add_libs="$LIBS"
17411 # reverse order
17412 cf_add_0lib=
17413 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17414 # filter duplicates
17415 for cf_add_1lib in $cf_add_0lib; do
17416         for cf_add_2lib in $cf_add_libs; do
17417                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17418                         cf_add_1lib=
17419                         break
17420                 fi
17421         done
17422         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17423 done
17424 LIBS="$cf_add_libs"
17425
17426 for ac_header in bsd/string.h
17427 do
17428 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17429 echo "$as_me:17429: checking for $ac_header" >&5
17430 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17431 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17432   echo $ECHO_N "(cached) $ECHO_C" >&6
17433 else
17434   cat >"conftest.$ac_ext" <<_ACEOF
17435 #line 17435 "configure"
17436 #include "confdefs.h"
17437 #include <$ac_header>
17438 _ACEOF
17439 if { (eval echo "$as_me:17439: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17440   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17441   ac_status=$?
17442   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17443   rm -f conftest.er1
17444   cat conftest.err >&5
17445   echo "$as_me:17445: \$? = $ac_status" >&5
17446   (exit "$ac_status"); } >/dev/null; then
17447   if test -s conftest.err; then
17448     ac_cpp_err=$ac_c_preproc_warn_flag
17449   else
17450     ac_cpp_err=
17451   fi
17452 else
17453   ac_cpp_err=yes
17454 fi
17455 if test -z "$ac_cpp_err"; then
17456   eval "$as_ac_Header=yes"
17457 else
17458   echo "$as_me: failed program was:" >&5
17459   cat "conftest.$ac_ext" >&5
17460   eval "$as_ac_Header=no"
17461 fi
17462 rm -f conftest.err "conftest.$ac_ext"
17463 fi
17464 echo "$as_me:17464: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17465 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17466 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17467   cat >>confdefs.h <<EOF
17468 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17469 EOF
17470
17471 fi
17472 done
17473
17474 cat >>confdefs.h <<\EOF
17475 #define HAVE_STRLCAT 1
17476 EOF
17477
17478 fi
17479
17480 fi
17481
17482 for ac_func in strlcpy snprintf
17483 do
17484 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17485 echo "$as_me:17485: checking for $ac_func" >&5
17486 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17487 if eval "test \"\${$as_ac_var+set}\" = set"; then
17488   echo $ECHO_N "(cached) $ECHO_C" >&6
17489 else
17490   cat >"conftest.$ac_ext" <<_ACEOF
17491 #line 17491 "configure"
17492 #include "confdefs.h"
17493 #define $ac_func autoconf_temporary
17494 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17495 #undef $ac_func
17496
17497 #ifdef __cplusplus
17498 extern "C"
17499 #endif
17500
17501 /* We use char because int might match the return type of a gcc2
17502    builtin and then its argument prototype would still apply.  */
17503 char $ac_func (void);
17504
17505 int
17506 main (void)
17507 {
17508
17509 /* The GNU C library defines stubs for functions which it implements
17510     to always fail with ENOSYS.  Some functions are actually named
17511     something starting with __ and the normal name is an alias.  */
17512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17513 #error found stub for $ac_func
17514 #endif
17515
17516         return $ac_func ();
17517   ;
17518   return 0;
17519 }
17520 _ACEOF
17521 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17522 if { (eval echo "$as_me:17522: \"$ac_link\"") >&5
17523   (eval $ac_link) 2>&5
17524   ac_status=$?
17525   echo "$as_me:17525: \$? = $ac_status" >&5
17526   (exit "$ac_status"); } &&
17527          { ac_try='test -s "conftest$ac_exeext"'
17528   { (eval echo "$as_me:17528: \"$ac_try\"") >&5
17529   (eval $ac_try) 2>&5
17530   ac_status=$?
17531   echo "$as_me:17531: \$? = $ac_status" >&5
17532   (exit "$ac_status"); }; }; then
17533   eval "$as_ac_var=yes"
17534 else
17535   echo "$as_me: failed program was:" >&5
17536 cat "conftest.$ac_ext" >&5
17537 eval "$as_ac_var=no"
17538 fi
17539 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17540 fi
17541 echo "$as_me:17541: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17542 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17543 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17544   cat >>confdefs.h <<EOF
17545 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17546 EOF
17547
17548 fi
17549 done
17550
17551 fi
17552
17553 ###     use option --enable-assertions to turn on generation of assertion code
17554 echo "$as_me:17554: checking if you want to enable runtime assertions" >&5
17555 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17556
17557 # Check whether --enable-assertions or --disable-assertions was given.
17558 if test "${enable_assertions+set}" = set; then
17559   enableval="$enable_assertions"
17560   with_assertions=$enableval
17561 else
17562   with_assertions=no
17563 fi;
17564 echo "$as_me:17564: result: $with_assertions" >&5
17565 echo "${ECHO_T}$with_assertions" >&6
17566 if test -n "$GCC"
17567 then
17568         if test "$with_assertions" = no
17569         then
17570                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17571         else
17572
17573         ADAFLAGS="$ADAFLAGS -gnata"
17574
17575         fi
17576 fi
17577
17578 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17579
17580 echo "$as_me:17580: checking if you want to use dmalloc for testing" >&5
17581 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17582
17583 # Check whether --with-dmalloc or --without-dmalloc was given.
17584 if test "${with_dmalloc+set}" = set; then
17585   withval="$with_dmalloc"
17586   case "x$withval" in
17587         (x|xno) ;;
17588         (*)
17589                 : "${with_cflags:=-g}"
17590                 : "${enable_leaks:=no}"
17591                 with_dmalloc=yes
17592
17593 cat >>confdefs.h <<EOF
17594 #define USE_DMALLOC 1
17595 EOF
17596
17597                 ;;
17598         esac
17599 else
17600   with_dmalloc=
17601 fi;
17602 echo "$as_me:17602: result: ${with_dmalloc:-no}" >&5
17603 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17604
17605 case ".$with_cflags" in
17606 (.*-g*)
17607         case .$CFLAGS in
17608         (.*-g*)
17609                 ;;
17610         (*)
17611
17612 cf_fix_cppflags=no
17613 cf_new_cflags=
17614 cf_new_cppflags=
17615 cf_new_extra_cppflags=
17616
17617 for cf_add_cflags in -g
17618 do
17619 case "$cf_fix_cppflags" in
17620 (no)
17621         case "$cf_add_cflags" in
17622         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17623                 case "$cf_add_cflags" in
17624                 (-D*)
17625                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17626
17627                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17628                                 && test -z "${cf_tst_cflags}" \
17629                                 && cf_fix_cppflags=yes
17630
17631                         if test "$cf_fix_cppflags" = yes ; then
17632
17633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17635
17636                                 continue
17637                         elif test "${cf_tst_cflags}" = "\"'" ; then
17638
17639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17641
17642                                 continue
17643                         fi
17644                         ;;
17645                 esac
17646                 case "$CPPFLAGS" in
17647                 (*$cf_add_cflags)
17648                         ;;
17649                 (*)
17650                         case "$cf_add_cflags" in
17651                         (-D*)
17652                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17653
17654 CPPFLAGS=`echo "$CPPFLAGS" | \
17655         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17656                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17657
17658                                 ;;
17659                         esac
17660
17661         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17662         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17663
17664                         ;;
17665                 esac
17666                 ;;
17667         (*)
17668
17669         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17670         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17671
17672                 ;;
17673         esac
17674         ;;
17675 (yes)
17676
17677         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17678         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17679
17680         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17681
17682         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17683                 && test -z "${cf_tst_cflags}" \
17684                 && cf_fix_cppflags=no
17685         ;;
17686 esac
17687 done
17688
17689 if test -n "$cf_new_cflags" ; then
17690
17691         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17692         CFLAGS="${CFLAGS}$cf_new_cflags"
17693
17694 fi
17695
17696 if test -n "$cf_new_cppflags" ; then
17697
17698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17699         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17700
17701 fi
17702
17703 if test -n "$cf_new_extra_cppflags" ; then
17704
17705         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17706         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17707
17708 fi
17709
17710                 ;;
17711         esac
17712         ;;
17713 esac
17714
17715 if test "$with_dmalloc" = yes ; then
17716         echo "$as_me:17716: checking for dmalloc.h" >&5
17717 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17718 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17719   echo $ECHO_N "(cached) $ECHO_C" >&6
17720 else
17721   cat >"conftest.$ac_ext" <<_ACEOF
17722 #line 17722 "configure"
17723 #include "confdefs.h"
17724 #include <dmalloc.h>
17725 _ACEOF
17726 if { (eval echo "$as_me:17726: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17727   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17728   ac_status=$?
17729   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17730   rm -f conftest.er1
17731   cat conftest.err >&5
17732   echo "$as_me:17732: \$? = $ac_status" >&5
17733   (exit "$ac_status"); } >/dev/null; then
17734   if test -s conftest.err; then
17735     ac_cpp_err=$ac_c_preproc_warn_flag
17736   else
17737     ac_cpp_err=
17738   fi
17739 else
17740   ac_cpp_err=yes
17741 fi
17742 if test -z "$ac_cpp_err"; then
17743   ac_cv_header_dmalloc_h=yes
17744 else
17745   echo "$as_me: failed program was:" >&5
17746   cat "conftest.$ac_ext" >&5
17747   ac_cv_header_dmalloc_h=no
17748 fi
17749 rm -f conftest.err "conftest.$ac_ext"
17750 fi
17751 echo "$as_me:17751: result: $ac_cv_header_dmalloc_h" >&5
17752 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17753 if test "$ac_cv_header_dmalloc_h" = yes; then
17754
17755 echo "$as_me:17755: checking for dmalloc_debug in -ldmalloc" >&5
17756 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17757 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17758   echo $ECHO_N "(cached) $ECHO_C" >&6
17759 else
17760   ac_check_lib_save_LIBS=$LIBS
17761 LIBS="-ldmalloc  $LIBS"
17762 cat >"conftest.$ac_ext" <<_ACEOF
17763 #line 17763 "configure"
17764 #include "confdefs.h"
17765
17766 /* Override any gcc2 internal prototype to avoid an error.  */
17767 #ifdef __cplusplus
17768 extern "C"
17769 #endif
17770 /* We use char because int might match the return type of a gcc2
17771    builtin and then its argument prototype would still apply.  */
17772 char dmalloc_debug ();
17773 int
17774 main (void)
17775 {
17776 dmalloc_debug ();
17777   ;
17778   return 0;
17779 }
17780 _ACEOF
17781 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17782 if { (eval echo "$as_me:17782: \"$ac_link\"") >&5
17783   (eval $ac_link) 2>&5
17784   ac_status=$?
17785   echo "$as_me:17785: \$? = $ac_status" >&5
17786   (exit "$ac_status"); } &&
17787          { ac_try='test -s "conftest$ac_exeext"'
17788   { (eval echo "$as_me:17788: \"$ac_try\"") >&5
17789   (eval $ac_try) 2>&5
17790   ac_status=$?
17791   echo "$as_me:17791: \$? = $ac_status" >&5
17792   (exit "$ac_status"); }; }; then
17793   ac_cv_lib_dmalloc_dmalloc_debug=yes
17794 else
17795   echo "$as_me: failed program was:" >&5
17796 cat "conftest.$ac_ext" >&5
17797 ac_cv_lib_dmalloc_dmalloc_debug=no
17798 fi
17799 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17800 LIBS=$ac_check_lib_save_LIBS
17801 fi
17802 echo "$as_me:17802: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17803 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17804 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17805   cat >>confdefs.h <<EOF
17806 #define HAVE_LIBDMALLOC 1
17807 EOF
17808
17809   LIBS="-ldmalloc $LIBS"
17810
17811 fi
17812
17813 fi
17814
17815 fi
17816
17817 echo "$as_me:17817: checking if you want to use dbmalloc for testing" >&5
17818 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17819
17820 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17821 if test "${with_dbmalloc+set}" = set; then
17822   withval="$with_dbmalloc"
17823   case "x$withval" in
17824         (x|xno) ;;
17825         (*)
17826                 : "${with_cflags:=-g}"
17827                 : "${enable_leaks:=no}"
17828                 with_dbmalloc=yes
17829
17830 cat >>confdefs.h <<EOF
17831 #define USE_DBMALLOC 1
17832 EOF
17833
17834                 ;;
17835         esac
17836 else
17837   with_dbmalloc=
17838 fi;
17839 echo "$as_me:17839: result: ${with_dbmalloc:-no}" >&5
17840 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17841
17842 case ".$with_cflags" in
17843 (.*-g*)
17844         case .$CFLAGS in
17845         (.*-g*)
17846                 ;;
17847         (*)
17848
17849 cf_fix_cppflags=no
17850 cf_new_cflags=
17851 cf_new_cppflags=
17852 cf_new_extra_cppflags=
17853
17854 for cf_add_cflags in -g
17855 do
17856 case "$cf_fix_cppflags" in
17857 (no)
17858         case "$cf_add_cflags" in
17859         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17860                 case "$cf_add_cflags" in
17861                 (-D*)
17862                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17863
17864                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17865                                 && test -z "${cf_tst_cflags}" \
17866                                 && cf_fix_cppflags=yes
17867
17868                         if test "$cf_fix_cppflags" = yes ; then
17869
17870         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17871         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17872
17873                                 continue
17874                         elif test "${cf_tst_cflags}" = "\"'" ; then
17875
17876         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17877         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17878
17879                                 continue
17880                         fi
17881                         ;;
17882                 esac
17883                 case "$CPPFLAGS" in
17884                 (*$cf_add_cflags)
17885                         ;;
17886                 (*)
17887                         case "$cf_add_cflags" in
17888                         (-D*)
17889                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17890
17891 CPPFLAGS=`echo "$CPPFLAGS" | \
17892         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17893                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17894
17895                                 ;;
17896                         esac
17897
17898         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17899         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17900
17901                         ;;
17902                 esac
17903                 ;;
17904         (*)
17905
17906         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17907         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17908
17909                 ;;
17910         esac
17911         ;;
17912 (yes)
17913
17914         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17915         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17916
17917         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17918
17919         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17920                 && test -z "${cf_tst_cflags}" \
17921                 && cf_fix_cppflags=no
17922         ;;
17923 esac
17924 done
17925
17926 if test -n "$cf_new_cflags" ; then
17927
17928         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17929         CFLAGS="${CFLAGS}$cf_new_cflags"
17930
17931 fi
17932
17933 if test -n "$cf_new_cppflags" ; then
17934
17935         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17936         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17937
17938 fi
17939
17940 if test -n "$cf_new_extra_cppflags" ; then
17941
17942         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17943         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17944
17945 fi
17946
17947                 ;;
17948         esac
17949         ;;
17950 esac
17951
17952 if test "$with_dbmalloc" = yes ; then
17953         echo "$as_me:17953: checking for dbmalloc.h" >&5
17954 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17955 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17956   echo $ECHO_N "(cached) $ECHO_C" >&6
17957 else
17958   cat >"conftest.$ac_ext" <<_ACEOF
17959 #line 17959 "configure"
17960 #include "confdefs.h"
17961 #include <dbmalloc.h>
17962 _ACEOF
17963 if { (eval echo "$as_me:17963: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17964   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17965   ac_status=$?
17966   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17967   rm -f conftest.er1
17968   cat conftest.err >&5
17969   echo "$as_me:17969: \$? = $ac_status" >&5
17970   (exit "$ac_status"); } >/dev/null; then
17971   if test -s conftest.err; then
17972     ac_cpp_err=$ac_c_preproc_warn_flag
17973   else
17974     ac_cpp_err=
17975   fi
17976 else
17977   ac_cpp_err=yes
17978 fi
17979 if test -z "$ac_cpp_err"; then
17980   ac_cv_header_dbmalloc_h=yes
17981 else
17982   echo "$as_me: failed program was:" >&5
17983   cat "conftest.$ac_ext" >&5
17984   ac_cv_header_dbmalloc_h=no
17985 fi
17986 rm -f conftest.err "conftest.$ac_ext"
17987 fi
17988 echo "$as_me:17988: result: $ac_cv_header_dbmalloc_h" >&5
17989 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17990 if test "$ac_cv_header_dbmalloc_h" = yes; then
17991
17992 echo "$as_me:17992: checking for debug_malloc in -ldbmalloc" >&5
17993 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17994 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17995   echo $ECHO_N "(cached) $ECHO_C" >&6
17996 else
17997   ac_check_lib_save_LIBS=$LIBS
17998 LIBS="-ldbmalloc  $LIBS"
17999 cat >"conftest.$ac_ext" <<_ACEOF
18000 #line 18000 "configure"
18001 #include "confdefs.h"
18002
18003 /* Override any gcc2 internal prototype to avoid an error.  */
18004 #ifdef __cplusplus
18005 extern "C"
18006 #endif
18007 /* We use char because int might match the return type of a gcc2
18008    builtin and then its argument prototype would still apply.  */
18009 char debug_malloc ();
18010 int
18011 main (void)
18012 {
18013 debug_malloc ();
18014   ;
18015   return 0;
18016 }
18017 _ACEOF
18018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18019 if { (eval echo "$as_me:18019: \"$ac_link\"") >&5
18020   (eval $ac_link) 2>&5
18021   ac_status=$?
18022   echo "$as_me:18022: \$? = $ac_status" >&5
18023   (exit "$ac_status"); } &&
18024          { ac_try='test -s "conftest$ac_exeext"'
18025   { (eval echo "$as_me:18025: \"$ac_try\"") >&5
18026   (eval $ac_try) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit "$ac_status"); }; }; then
18030   ac_cv_lib_dbmalloc_debug_malloc=yes
18031 else
18032   echo "$as_me: failed program was:" >&5
18033 cat "conftest.$ac_ext" >&5
18034 ac_cv_lib_dbmalloc_debug_malloc=no
18035 fi
18036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18037 LIBS=$ac_check_lib_save_LIBS
18038 fi
18039 echo "$as_me:18039: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18040 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18041 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18042   cat >>confdefs.h <<EOF
18043 #define HAVE_LIBDBMALLOC 1
18044 EOF
18045
18046   LIBS="-ldbmalloc $LIBS"
18047
18048 fi
18049
18050 fi
18051
18052 fi
18053
18054 echo "$as_me:18054: checking if you want to use valgrind for testing" >&5
18055 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18056
18057 # Check whether --with-valgrind or --without-valgrind was given.
18058 if test "${with_valgrind+set}" = set; then
18059   withval="$with_valgrind"
18060   case "x$withval" in
18061         (x|xno) ;;
18062         (*)
18063                 : "${with_cflags:=-g}"
18064                 : "${enable_leaks:=no}"
18065                 with_valgrind=yes
18066
18067 cat >>confdefs.h <<EOF
18068 #define USE_VALGRIND 1
18069 EOF
18070
18071                 ;;
18072         esac
18073 else
18074   with_valgrind=
18075 fi;
18076 echo "$as_me:18076: result: ${with_valgrind:-no}" >&5
18077 echo "${ECHO_T}${with_valgrind:-no}" >&6
18078
18079 case ".$with_cflags" in
18080 (.*-g*)
18081         case .$CFLAGS in
18082         (.*-g*)
18083                 ;;
18084         (*)
18085
18086 cf_fix_cppflags=no
18087 cf_new_cflags=
18088 cf_new_cppflags=
18089 cf_new_extra_cppflags=
18090
18091 for cf_add_cflags in -g
18092 do
18093 case "$cf_fix_cppflags" in
18094 (no)
18095         case "$cf_add_cflags" in
18096         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18097                 case "$cf_add_cflags" in
18098                 (-D*)
18099                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18100
18101                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18102                                 && test -z "${cf_tst_cflags}" \
18103                                 && cf_fix_cppflags=yes
18104
18105                         if test "$cf_fix_cppflags" = yes ; then
18106
18107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18109
18110                                 continue
18111                         elif test "${cf_tst_cflags}" = "\"'" ; then
18112
18113         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18114         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18115
18116                                 continue
18117                         fi
18118                         ;;
18119                 esac
18120                 case "$CPPFLAGS" in
18121                 (*$cf_add_cflags)
18122                         ;;
18123                 (*)
18124                         case "$cf_add_cflags" in
18125                         (-D*)
18126                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18127
18128 CPPFLAGS=`echo "$CPPFLAGS" | \
18129         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18130                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18131
18132                                 ;;
18133                         esac
18134
18135         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18136         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18137
18138                         ;;
18139                 esac
18140                 ;;
18141         (*)
18142
18143         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18144         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18145
18146                 ;;
18147         esac
18148         ;;
18149 (yes)
18150
18151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18153
18154         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18155
18156         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18157                 && test -z "${cf_tst_cflags}" \
18158                 && cf_fix_cppflags=no
18159         ;;
18160 esac
18161 done
18162
18163 if test -n "$cf_new_cflags" ; then
18164
18165         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18166         CFLAGS="${CFLAGS}$cf_new_cflags"
18167
18168 fi
18169
18170 if test -n "$cf_new_cppflags" ; then
18171
18172         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18173         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18174
18175 fi
18176
18177 if test -n "$cf_new_extra_cppflags" ; then
18178
18179         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18180         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18181
18182 fi
18183
18184                 ;;
18185         esac
18186         ;;
18187 esac
18188
18189 echo "$as_me:18189: checking if you want to perform memory-leak testing" >&5
18190 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18191
18192 # Check whether --enable-leaks or --disable-leaks was given.
18193 if test "${enable_leaks+set}" = set; then
18194   enableval="$enable_leaks"
18195   enable_leaks=$enableval
18196 else
18197   enable_leaks=yes
18198 fi;
18199 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18200 echo "$as_me:18200: result: $with_no_leaks" >&5
18201 echo "${ECHO_T}$with_no_leaks" >&6
18202
18203 if test "$enable_leaks" = no ; then
18204
18205 cat >>confdefs.h <<\EOF
18206 #define NO_LEAKS 1
18207 EOF
18208
18209 cat >>confdefs.h <<\EOF
18210 #define YY_NO_LEAKS 1
18211 EOF
18212
18213 fi
18214
18215 cat >>confdefs.h <<\EOF
18216 #define HAVE_NC_ALLOC_H 1
18217 EOF
18218
18219 ###     use option --enable-expanded to generate certain macros as functions
18220
18221 # Check whether --enable-expanded or --disable-expanded was given.
18222 if test "${enable_expanded+set}" = set; then
18223   enableval="$enable_expanded"
18224   test "x$enableval" = xyes &&
18225 cat >>confdefs.h <<\EOF
18226 #define NCURSES_EXPANDED 1
18227 EOF
18228
18229 fi;
18230
18231 ###     use option --disable-macros to suppress macros in favor of functions
18232
18233 # Check whether --enable-macros or --disable-macros was given.
18234 if test "${enable_macros+set}" = set; then
18235   enableval="$enable_macros"
18236   test "$enableval" = no &&
18237 cat >>confdefs.h <<\EOF
18238 #define NCURSES_NOMACROS 1
18239 EOF
18240
18241 fi;
18242
18243 # Normally we only add trace() to the debug-library.  Allow this to be
18244 # extended to all models of the ncurses library:
18245 cf_all_traces=no
18246 case "$CFLAGS $CPPFLAGS" in
18247 (*-DTRACE*)
18248         cf_all_traces=yes
18249         ;;
18250 esac
18251
18252 echo "$as_me:18252: checking whether to add trace feature to all models" >&5
18253 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18254
18255 # Check whether --with-trace or --without-trace was given.
18256 if test "${with_trace+set}" = set; then
18257   withval="$with_trace"
18258   cf_with_trace=$withval
18259 else
18260   cf_with_trace=$cf_all_traces
18261 fi;
18262 echo "$as_me:18262: result: $cf_with_trace" >&5
18263 echo "${ECHO_T}$cf_with_trace" >&6
18264
18265 if test "x$cf_with_trace" = xyes ; then
18266         LIB_TRACING=all
18267         ADA_TRACE=TRUE
18268
18269 cf_fix_cppflags=no
18270 cf_new_cflags=
18271 cf_new_cppflags=
18272 cf_new_extra_cppflags=
18273
18274 for cf_add_cflags in -DTRACE
18275 do
18276 case "$cf_fix_cppflags" in
18277 (no)
18278         case "$cf_add_cflags" in
18279         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18280                 case "$cf_add_cflags" in
18281                 (-D*)
18282                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18283
18284                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18285                                 && test -z "${cf_tst_cflags}" \
18286                                 && cf_fix_cppflags=yes
18287
18288                         if test "$cf_fix_cppflags" = yes ; then
18289
18290         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18291         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18292
18293                                 continue
18294                         elif test "${cf_tst_cflags}" = "\"'" ; then
18295
18296         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18297         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18298
18299                                 continue
18300                         fi
18301                         ;;
18302                 esac
18303                 case "$CPPFLAGS" in
18304                 (*$cf_add_cflags)
18305                         ;;
18306                 (*)
18307                         case "$cf_add_cflags" in
18308                         (-D*)
18309                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18310
18311 CPPFLAGS=`echo "$CPPFLAGS" | \
18312         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18313                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18314
18315                                 ;;
18316                         esac
18317
18318         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18319         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18320
18321                         ;;
18322                 esac
18323                 ;;
18324         (*)
18325
18326         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18327         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18328
18329                 ;;
18330         esac
18331         ;;
18332 (yes)
18333
18334         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18335         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18336
18337         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18338
18339         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18340                 && test -z "${cf_tst_cflags}" \
18341                 && cf_fix_cppflags=no
18342         ;;
18343 esac
18344 done
18345
18346 if test -n "$cf_new_cflags" ; then
18347
18348         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18349         CFLAGS="${CFLAGS}$cf_new_cflags"
18350
18351 fi
18352
18353 if test -n "$cf_new_cppflags" ; then
18354
18355         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18356         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18357
18358 fi
18359
18360 if test -n "$cf_new_extra_cppflags" ; then
18361
18362         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18363         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18364
18365 fi
18366
18367 cat >>confdefs.h <<\EOF
18368 #define HAVE__TRACEF 1
18369 EOF
18370
18371 else
18372         LIB_TRACING=DEBUG
18373         ADA_TRACE=FALSE
18374 fi
18375
18376 echo "$as_me:18376: checking if we want to use GNAT projects" >&5
18377 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18378
18379 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18380 if test "${enable_gnat_projects+set}" = set; then
18381   enableval="$enable_gnat_projects"
18382   test "$enableval" != no && enableval=yes
18383         if test "$enableval" != "yes" ; then
18384     enable_gnat_projects=no
18385         else
18386                 enable_gnat_projects=yes
18387         fi
18388 else
18389   enableval=yes
18390         enable_gnat_projects=yes
18391
18392 fi;
18393 echo "$as_me:18393: result: $enable_gnat_projects" >&5
18394 echo "${ECHO_T}$enable_gnat_projects" >&6
18395
18396 ###     Checks for libraries.
18397 case "$cf_cv_system_name" in
18398 (*mingw32*|*mingw64*)
18399         if test "x$with_exp_win32" = xyes ; then
18400         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18401         else
18402         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18403         fi
18404         # Note: WINVER may be a problem with Windows 10
18405         ;;
18406 (*)
18407 echo "$as_me:18407: checking for gettimeofday" >&5
18408 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18409 if test "${ac_cv_func_gettimeofday+set}" = set; then
18410   echo $ECHO_N "(cached) $ECHO_C" >&6
18411 else
18412   cat >"conftest.$ac_ext" <<_ACEOF
18413 #line 18413 "configure"
18414 #include "confdefs.h"
18415 #define gettimeofday autoconf_temporary
18416 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18417 #undef gettimeofday
18418
18419 #ifdef __cplusplus
18420 extern "C"
18421 #endif
18422
18423 /* We use char because int might match the return type of a gcc2
18424    builtin and then its argument prototype would still apply.  */
18425 char gettimeofday (void);
18426
18427 int
18428 main (void)
18429 {
18430
18431 /* The GNU C library defines stubs for functions which it implements
18432     to always fail with ENOSYS.  Some functions are actually named
18433     something starting with __ and the normal name is an alias.  */
18434 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18435 #error found stub for gettimeofday
18436 #endif
18437
18438         return gettimeofday ();
18439   ;
18440   return 0;
18441 }
18442 _ACEOF
18443 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18444 if { (eval echo "$as_me:18444: \"$ac_link\"") >&5
18445   (eval $ac_link) 2>&5
18446   ac_status=$?
18447   echo "$as_me:18447: \$? = $ac_status" >&5
18448   (exit "$ac_status"); } &&
18449          { ac_try='test -s "conftest$ac_exeext"'
18450   { (eval echo "$as_me:18450: \"$ac_try\"") >&5
18451   (eval $ac_try) 2>&5
18452   ac_status=$?
18453   echo "$as_me:18453: \$? = $ac_status" >&5
18454   (exit "$ac_status"); }; }; then
18455   ac_cv_func_gettimeofday=yes
18456 else
18457   echo "$as_me: failed program was:" >&5
18458 cat "conftest.$ac_ext" >&5
18459 ac_cv_func_gettimeofday=no
18460 fi
18461 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18462 fi
18463 echo "$as_me:18463: result: $ac_cv_func_gettimeofday" >&5
18464 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18465 if test "$ac_cv_func_gettimeofday" = yes; then
18466
18467 cat >>confdefs.h <<\EOF
18468 #define HAVE_GETTIMEOFDAY 1
18469 EOF
18470
18471 else
18472
18473 echo "$as_me:18473: checking for gettimeofday in -lbsd" >&5
18474 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18475 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18476   echo $ECHO_N "(cached) $ECHO_C" >&6
18477 else
18478   ac_check_lib_save_LIBS=$LIBS
18479 LIBS="-lbsd  $LIBS"
18480 cat >"conftest.$ac_ext" <<_ACEOF
18481 #line 18481 "configure"
18482 #include "confdefs.h"
18483
18484 /* Override any gcc2 internal prototype to avoid an error.  */
18485 #ifdef __cplusplus
18486 extern "C"
18487 #endif
18488 /* We use char because int might match the return type of a gcc2
18489    builtin and then its argument prototype would still apply.  */
18490 char gettimeofday ();
18491 int
18492 main (void)
18493 {
18494 gettimeofday ();
18495   ;
18496   return 0;
18497 }
18498 _ACEOF
18499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18500 if { (eval echo "$as_me:18500: \"$ac_link\"") >&5
18501   (eval $ac_link) 2>&5
18502   ac_status=$?
18503   echo "$as_me:18503: \$? = $ac_status" >&5
18504   (exit "$ac_status"); } &&
18505          { ac_try='test -s "conftest$ac_exeext"'
18506   { (eval echo "$as_me:18506: \"$ac_try\"") >&5
18507   (eval $ac_try) 2>&5
18508   ac_status=$?
18509   echo "$as_me:18509: \$? = $ac_status" >&5
18510   (exit "$ac_status"); }; }; then
18511   ac_cv_lib_bsd_gettimeofday=yes
18512 else
18513   echo "$as_me: failed program was:" >&5
18514 cat "conftest.$ac_ext" >&5
18515 ac_cv_lib_bsd_gettimeofday=no
18516 fi
18517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18518 LIBS=$ac_check_lib_save_LIBS
18519 fi
18520 echo "$as_me:18520: result: $ac_cv_lib_bsd_gettimeofday" >&5
18521 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18522 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18523
18524 cat >>confdefs.h <<\EOF
18525 #define HAVE_GETTIMEOFDAY 1
18526 EOF
18527
18528 cf_add_libs="$LIBS"
18529 # reverse order
18530 cf_add_0lib=
18531 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18532 # filter duplicates
18533 for cf_add_1lib in $cf_add_0lib; do
18534         for cf_add_2lib in $cf_add_libs; do
18535                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18536                         cf_add_1lib=
18537                         break
18538                 fi
18539         done
18540         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18541 done
18542 LIBS="$cf_add_libs"
18543
18544 fi
18545
18546 fi
18547         ;;
18548 esac
18549
18550 echo "$as_me:18550: checking if -lm needed for math functions" >&5
18551 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18552 if test "${cf_cv_need_libm+set}" = set; then
18553   echo $ECHO_N "(cached) $ECHO_C" >&6
18554 else
18555
18556         cat >"conftest.$ac_ext" <<_ACEOF
18557 #line 18557 "configure"
18558 #include "confdefs.h"
18559
18560         #include <stdio.h>
18561         #include <stdlib.h>
18562         #include <math.h>
18563
18564 int
18565 main (void)
18566 {
18567 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18568   ;
18569   return 0;
18570 }
18571 _ACEOF
18572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18573 if { (eval echo "$as_me:18573: \"$ac_link\"") >&5
18574   (eval $ac_link) 2>&5
18575   ac_status=$?
18576   echo "$as_me:18576: \$? = $ac_status" >&5
18577   (exit "$ac_status"); } &&
18578          { ac_try='test -s "conftest$ac_exeext"'
18579   { (eval echo "$as_me:18579: \"$ac_try\"") >&5
18580   (eval $ac_try) 2>&5
18581   ac_status=$?
18582   echo "$as_me:18582: \$? = $ac_status" >&5
18583   (exit "$ac_status"); }; }; then
18584   cf_cv_need_libm=no
18585 else
18586   echo "$as_me: failed program was:" >&5
18587 cat "conftest.$ac_ext" >&5
18588 cf_cv_need_libm=yes
18589 fi
18590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18591 fi
18592 echo "$as_me:18592: result: $cf_cv_need_libm" >&5
18593 echo "${ECHO_T}$cf_cv_need_libm" >&6
18594 if test "$cf_cv_need_libm" = yes
18595 then
18596 MATH_LIB=-lm
18597 fi
18598
18599 ###     Checks for header files.
18600 echo "$as_me:18600: checking for ANSI C header files" >&5
18601 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18602 if test "${ac_cv_header_stdc+set}" = set; then
18603   echo $ECHO_N "(cached) $ECHO_C" >&6
18604 else
18605   cat >"conftest.$ac_ext" <<_ACEOF
18606 #line 18606 "configure"
18607 #include "confdefs.h"
18608 #include <stdlib.h>
18609 #include <stdarg.h>
18610 #include <string.h>
18611 #include <float.h>
18612
18613 _ACEOF
18614 if { (eval echo "$as_me:18614: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18615   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18616   ac_status=$?
18617   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18618   rm -f conftest.er1
18619   cat conftest.err >&5
18620   echo "$as_me:18620: \$? = $ac_status" >&5
18621   (exit "$ac_status"); } >/dev/null; then
18622   if test -s conftest.err; then
18623     ac_cpp_err=$ac_c_preproc_warn_flag
18624   else
18625     ac_cpp_err=
18626   fi
18627 else
18628   ac_cpp_err=yes
18629 fi
18630 if test -z "$ac_cpp_err"; then
18631   ac_cv_header_stdc=yes
18632 else
18633   echo "$as_me: failed program was:" >&5
18634   cat "conftest.$ac_ext" >&5
18635   ac_cv_header_stdc=no
18636 fi
18637 rm -f conftest.err "conftest.$ac_ext"
18638
18639 if test $ac_cv_header_stdc = yes; then
18640   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18641   cat >"conftest.$ac_ext" <<_ACEOF
18642 #line 18642 "configure"
18643 #include "confdefs.h"
18644 #include <string.h>
18645
18646 _ACEOF
18647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18648   $EGREP "memchr" >/dev/null 2>&1; then
18649   :
18650 else
18651   ac_cv_header_stdc=no
18652 fi
18653 rm -rf conftest*
18654
18655 fi
18656
18657 if test $ac_cv_header_stdc = yes; then
18658   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18659   cat >"conftest.$ac_ext" <<_ACEOF
18660 #line 18660 "configure"
18661 #include "confdefs.h"
18662 #include <stdlib.h>
18663
18664 _ACEOF
18665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18666   $EGREP "free" >/dev/null 2>&1; then
18667   :
18668 else
18669   ac_cv_header_stdc=no
18670 fi
18671 rm -rf conftest*
18672
18673 fi
18674
18675 if test $ac_cv_header_stdc = yes; then
18676   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18677   if test "$cross_compiling" = yes; then
18678   :
18679 else
18680   cat >"conftest.$ac_ext" <<_ACEOF
18681 #line 18681 "configure"
18682 #include "confdefs.h"
18683 #include <ctype.h>
18684 #if ((' ' & 0x0FF) == 0x020)
18685 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18686 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18687 #else
18688 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18689                      || ('j' <= (c) && (c) <= 'r') \
18690                      || ('s' <= (c) && (c) <= 'z'))
18691 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18692 #endif
18693
18694 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18695 int
18696 main (void)
18697 {
18698   int i;
18699   for (i = 0; i < 256; i++)
18700     if (XOR (islower (i), ISLOWER (i))
18701         || toupper (i) != TOUPPER (i))
18702       $ac_main_return(2);
18703   $ac_main_return (0);
18704 }
18705 _ACEOF
18706 rm -f "conftest$ac_exeext"
18707 if { (eval echo "$as_me:18707: \"$ac_link\"") >&5
18708   (eval $ac_link) 2>&5
18709   ac_status=$?
18710   echo "$as_me:18710: \$? = $ac_status" >&5
18711   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18712   { (eval echo "$as_me:18712: \"$ac_try\"") >&5
18713   (eval $ac_try) 2>&5
18714   ac_status=$?
18715   echo "$as_me:18715: \$? = $ac_status" >&5
18716   (exit "$ac_status"); }; }; then
18717   :
18718 else
18719   echo "$as_me: program exited with status $ac_status" >&5
18720 echo "$as_me: failed program was:" >&5
18721 cat "conftest.$ac_ext" >&5
18722 ac_cv_header_stdc=no
18723 fi
18724 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18725 fi
18726 fi
18727 fi
18728 echo "$as_me:18728: result: $ac_cv_header_stdc" >&5
18729 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18730 if test $ac_cv_header_stdc = yes; then
18731
18732 cat >>confdefs.h <<\EOF
18733 #define STDC_HEADERS 1
18734 EOF
18735
18736 fi
18737
18738 ac_header_dirent=no
18739 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18740   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18741 echo "$as_me:18741: checking for $ac_hdr that defines DIR" >&5
18742 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18743 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18744   echo $ECHO_N "(cached) $ECHO_C" >&6
18745 else
18746   cat >"conftest.$ac_ext" <<_ACEOF
18747 #line 18747 "configure"
18748 #include "confdefs.h"
18749 #include <sys/types.h>
18750 #include <$ac_hdr>
18751
18752 int
18753 main (void)
18754 {
18755 if ((DIR *) 0)
18756 return 0;
18757   ;
18758   return 0;
18759 }
18760 _ACEOF
18761 rm -f "conftest.$ac_objext"
18762 if { (eval echo "$as_me:18762: \"$ac_compile\"") >&5
18763   (eval $ac_compile) 2>&5
18764   ac_status=$?
18765   echo "$as_me:18765: \$? = $ac_status" >&5
18766   (exit "$ac_status"); } &&
18767          { ac_try='test -s "conftest.$ac_objext"'
18768   { (eval echo "$as_me:18768: \"$ac_try\"") >&5
18769   (eval $ac_try) 2>&5
18770   ac_status=$?
18771   echo "$as_me:18771: \$? = $ac_status" >&5
18772   (exit "$ac_status"); }; }; then
18773   eval "$as_ac_Header=yes"
18774 else
18775   echo "$as_me: failed program was:" >&5
18776 cat "conftest.$ac_ext" >&5
18777 eval "$as_ac_Header=no"
18778 fi
18779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18780 fi
18781 echo "$as_me:18781: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18782 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18783 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18784   cat >>confdefs.h <<EOF
18785 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18786 EOF
18787
18788 ac_header_dirent=$ac_hdr; break
18789 fi
18790
18791 done
18792 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18793 if test $ac_header_dirent = dirent.h; then
18794   echo "$as_me:18794: checking for opendir in -ldir" >&5
18795 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18796 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18797   echo $ECHO_N "(cached) $ECHO_C" >&6
18798 else
18799   ac_check_lib_save_LIBS=$LIBS
18800 LIBS="-ldir  $LIBS"
18801 cat >"conftest.$ac_ext" <<_ACEOF
18802 #line 18802 "configure"
18803 #include "confdefs.h"
18804
18805 /* Override any gcc2 internal prototype to avoid an error.  */
18806 #ifdef __cplusplus
18807 extern "C"
18808 #endif
18809 /* We use char because int might match the return type of a gcc2
18810    builtin and then its argument prototype would still apply.  */
18811 char opendir ();
18812 int
18813 main (void)
18814 {
18815 opendir ();
18816   ;
18817   return 0;
18818 }
18819 _ACEOF
18820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18821 if { (eval echo "$as_me:18821: \"$ac_link\"") >&5
18822   (eval $ac_link) 2>&5
18823   ac_status=$?
18824   echo "$as_me:18824: \$? = $ac_status" >&5
18825   (exit "$ac_status"); } &&
18826          { ac_try='test -s "conftest$ac_exeext"'
18827   { (eval echo "$as_me:18827: \"$ac_try\"") >&5
18828   (eval $ac_try) 2>&5
18829   ac_status=$?
18830   echo "$as_me:18830: \$? = $ac_status" >&5
18831   (exit "$ac_status"); }; }; then
18832   ac_cv_lib_dir_opendir=yes
18833 else
18834   echo "$as_me: failed program was:" >&5
18835 cat "conftest.$ac_ext" >&5
18836 ac_cv_lib_dir_opendir=no
18837 fi
18838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18839 LIBS=$ac_check_lib_save_LIBS
18840 fi
18841 echo "$as_me:18841: result: $ac_cv_lib_dir_opendir" >&5
18842 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18843 if test "$ac_cv_lib_dir_opendir" = yes; then
18844   LIBS="$LIBS -ldir"
18845 fi
18846
18847 else
18848   echo "$as_me:18848: checking for opendir in -lx" >&5
18849 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18850 if test "${ac_cv_lib_x_opendir+set}" = set; then
18851   echo $ECHO_N "(cached) $ECHO_C" >&6
18852 else
18853   ac_check_lib_save_LIBS=$LIBS
18854 LIBS="-lx  $LIBS"
18855 cat >"conftest.$ac_ext" <<_ACEOF
18856 #line 18856 "configure"
18857 #include "confdefs.h"
18858
18859 /* Override any gcc2 internal prototype to avoid an error.  */
18860 #ifdef __cplusplus
18861 extern "C"
18862 #endif
18863 /* We use char because int might match the return type of a gcc2
18864    builtin and then its argument prototype would still apply.  */
18865 char opendir ();
18866 int
18867 main (void)
18868 {
18869 opendir ();
18870   ;
18871   return 0;
18872 }
18873 _ACEOF
18874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18875 if { (eval echo "$as_me:18875: \"$ac_link\"") >&5
18876   (eval $ac_link) 2>&5
18877   ac_status=$?
18878   echo "$as_me:18878: \$? = $ac_status" >&5
18879   (exit "$ac_status"); } &&
18880          { ac_try='test -s "conftest$ac_exeext"'
18881   { (eval echo "$as_me:18881: \"$ac_try\"") >&5
18882   (eval $ac_try) 2>&5
18883   ac_status=$?
18884   echo "$as_me:18884: \$? = $ac_status" >&5
18885   (exit "$ac_status"); }; }; then
18886   ac_cv_lib_x_opendir=yes
18887 else
18888   echo "$as_me: failed program was:" >&5
18889 cat "conftest.$ac_ext" >&5
18890 ac_cv_lib_x_opendir=no
18891 fi
18892 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18893 LIBS=$ac_check_lib_save_LIBS
18894 fi
18895 echo "$as_me:18895: result: $ac_cv_lib_x_opendir" >&5
18896 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18897 if test "$ac_cv_lib_x_opendir" = yes; then
18898   LIBS="$LIBS -lx"
18899 fi
18900
18901 fi
18902
18903 echo "$as_me:18903: checking whether time.h and sys/time.h may both be included" >&5
18904 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18905 if test "${ac_cv_header_time+set}" = set; then
18906   echo $ECHO_N "(cached) $ECHO_C" >&6
18907 else
18908   cat >"conftest.$ac_ext" <<_ACEOF
18909 #line 18909 "configure"
18910 #include "confdefs.h"
18911 #include <sys/types.h>
18912 #include <sys/time.h>
18913 #include <time.h>
18914
18915 int
18916 main (void)
18917 {
18918 if ((struct tm *) 0)
18919 return 0;
18920   ;
18921   return 0;
18922 }
18923 _ACEOF
18924 rm -f "conftest.$ac_objext"
18925 if { (eval echo "$as_me:18925: \"$ac_compile\"") >&5
18926   (eval $ac_compile) 2>&5
18927   ac_status=$?
18928   echo "$as_me:18928: \$? = $ac_status" >&5
18929   (exit "$ac_status"); } &&
18930          { ac_try='test -s "conftest.$ac_objext"'
18931   { (eval echo "$as_me:18931: \"$ac_try\"") >&5
18932   (eval $ac_try) 2>&5
18933   ac_status=$?
18934   echo "$as_me:18934: \$? = $ac_status" >&5
18935   (exit "$ac_status"); }; }; then
18936   ac_cv_header_time=yes
18937 else
18938   echo "$as_me: failed program was:" >&5
18939 cat "conftest.$ac_ext" >&5
18940 ac_cv_header_time=no
18941 fi
18942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18943 fi
18944 echo "$as_me:18944: result: $ac_cv_header_time" >&5
18945 echo "${ECHO_T}$ac_cv_header_time" >&6
18946 if test $ac_cv_header_time = yes; then
18947
18948 cat >>confdefs.h <<\EOF
18949 #define TIME_WITH_SYS_TIME 1
18950 EOF
18951
18952 fi
18953
18954 cf_regex_func=no
18955 cf_regex_libs=
18956 case "$host_os" in
18957 (mingw*)
18958         # -lsystre -ltre -lintl -liconv
18959         echo "$as_me:18959: checking for regcomp in -lsystre" >&5
18960 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18961 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18962   echo $ECHO_N "(cached) $ECHO_C" >&6
18963 else
18964   ac_check_lib_save_LIBS=$LIBS
18965 LIBS="-lsystre  $LIBS"
18966 cat >"conftest.$ac_ext" <<_ACEOF
18967 #line 18967 "configure"
18968 #include "confdefs.h"
18969
18970 /* Override any gcc2 internal prototype to avoid an error.  */
18971 #ifdef __cplusplus
18972 extern "C"
18973 #endif
18974 /* We use char because int might match the return type of a gcc2
18975    builtin and then its argument prototype would still apply.  */
18976 char regcomp ();
18977 int
18978 main (void)
18979 {
18980 regcomp ();
18981   ;
18982   return 0;
18983 }
18984 _ACEOF
18985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18986 if { (eval echo "$as_me:18986: \"$ac_link\"") >&5
18987   (eval $ac_link) 2>&5
18988   ac_status=$?
18989   echo "$as_me:18989: \$? = $ac_status" >&5
18990   (exit "$ac_status"); } &&
18991          { ac_try='test -s "conftest$ac_exeext"'
18992   { (eval echo "$as_me:18992: \"$ac_try\"") >&5
18993   (eval $ac_try) 2>&5
18994   ac_status=$?
18995   echo "$as_me:18995: \$? = $ac_status" >&5
18996   (exit "$ac_status"); }; }; then
18997   ac_cv_lib_systre_regcomp=yes
18998 else
18999   echo "$as_me: failed program was:" >&5
19000 cat "conftest.$ac_ext" >&5
19001 ac_cv_lib_systre_regcomp=no
19002 fi
19003 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19004 LIBS=$ac_check_lib_save_LIBS
19005 fi
19006 echo "$as_me:19006: result: $ac_cv_lib_systre_regcomp" >&5
19007 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19008 if test "$ac_cv_lib_systre_regcomp" = yes; then
19009
19010                 echo "$as_me:19010: checking for libiconv_open in -liconv" >&5
19011 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19012 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19013   echo $ECHO_N "(cached) $ECHO_C" >&6
19014 else
19015   ac_check_lib_save_LIBS=$LIBS
19016 LIBS="-liconv  $LIBS"
19017 cat >"conftest.$ac_ext" <<_ACEOF
19018 #line 19018 "configure"
19019 #include "confdefs.h"
19020
19021 /* Override any gcc2 internal prototype to avoid an error.  */
19022 #ifdef __cplusplus
19023 extern "C"
19024 #endif
19025 /* We use char because int might match the return type of a gcc2
19026    builtin and then its argument prototype would still apply.  */
19027 char libiconv_open ();
19028 int
19029 main (void)
19030 {
19031 libiconv_open ();
19032   ;
19033   return 0;
19034 }
19035 _ACEOF
19036 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19037 if { (eval echo "$as_me:19037: \"$ac_link\"") >&5
19038   (eval $ac_link) 2>&5
19039   ac_status=$?
19040   echo "$as_me:19040: \$? = $ac_status" >&5
19041   (exit "$ac_status"); } &&
19042          { ac_try='test -s "conftest$ac_exeext"'
19043   { (eval echo "$as_me:19043: \"$ac_try\"") >&5
19044   (eval $ac_try) 2>&5
19045   ac_status=$?
19046   echo "$as_me:19046: \$? = $ac_status" >&5
19047   (exit "$ac_status"); }; }; then
19048   ac_cv_lib_iconv_libiconv_open=yes
19049 else
19050   echo "$as_me: failed program was:" >&5
19051 cat "conftest.$ac_ext" >&5
19052 ac_cv_lib_iconv_libiconv_open=no
19053 fi
19054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19055 LIBS=$ac_check_lib_save_LIBS
19056 fi
19057 echo "$as_me:19057: result: $ac_cv_lib_iconv_libiconv_open" >&5
19058 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19059 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19060
19061 cf_add_libs="$LIBS"
19062 # reverse order
19063 cf_add_0lib=
19064 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19065 # filter duplicates
19066 for cf_add_1lib in $cf_add_0lib; do
19067         for cf_add_2lib in $cf_add_libs; do
19068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19069                         cf_add_1lib=
19070                         break
19071                 fi
19072         done
19073         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19074 done
19075 LIBS="$cf_add_libs"
19076
19077 fi
19078
19079                 echo "$as_me:19079: checking for libintl_gettext in -lintl" >&5
19080 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19081 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19082   echo $ECHO_N "(cached) $ECHO_C" >&6
19083 else
19084   ac_check_lib_save_LIBS=$LIBS
19085 LIBS="-lintl  $LIBS"
19086 cat >"conftest.$ac_ext" <<_ACEOF
19087 #line 19087 "configure"
19088 #include "confdefs.h"
19089
19090 /* Override any gcc2 internal prototype to avoid an error.  */
19091 #ifdef __cplusplus
19092 extern "C"
19093 #endif
19094 /* We use char because int might match the return type of a gcc2
19095    builtin and then its argument prototype would still apply.  */
19096 char libintl_gettext ();
19097 int
19098 main (void)
19099 {
19100 libintl_gettext ();
19101   ;
19102   return 0;
19103 }
19104 _ACEOF
19105 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19106 if { (eval echo "$as_me:19106: \"$ac_link\"") >&5
19107   (eval $ac_link) 2>&5
19108   ac_status=$?
19109   echo "$as_me:19109: \$? = $ac_status" >&5
19110   (exit "$ac_status"); } &&
19111          { ac_try='test -s "conftest$ac_exeext"'
19112   { (eval echo "$as_me:19112: \"$ac_try\"") >&5
19113   (eval $ac_try) 2>&5
19114   ac_status=$?
19115   echo "$as_me:19115: \$? = $ac_status" >&5
19116   (exit "$ac_status"); }; }; then
19117   ac_cv_lib_intl_libintl_gettext=yes
19118 else
19119   echo "$as_me: failed program was:" >&5
19120 cat "conftest.$ac_ext" >&5
19121 ac_cv_lib_intl_libintl_gettext=no
19122 fi
19123 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19124 LIBS=$ac_check_lib_save_LIBS
19125 fi
19126 echo "$as_me:19126: result: $ac_cv_lib_intl_libintl_gettext" >&5
19127 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19128 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19129
19130 cf_add_libs="$LIBS"
19131 # reverse order
19132 cf_add_0lib=
19133 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19134 # filter duplicates
19135 for cf_add_1lib in $cf_add_0lib; do
19136         for cf_add_2lib in $cf_add_libs; do
19137                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19138                         cf_add_1lib=
19139                         break
19140                 fi
19141         done
19142         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19143 done
19144 LIBS="$cf_add_libs"
19145
19146 fi
19147
19148                 echo "$as_me:19148: checking for tre_regcomp in -ltre" >&5
19149 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19150 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19151   echo $ECHO_N "(cached) $ECHO_C" >&6
19152 else
19153   ac_check_lib_save_LIBS=$LIBS
19154 LIBS="-ltre  $LIBS"
19155 cat >"conftest.$ac_ext" <<_ACEOF
19156 #line 19156 "configure"
19157 #include "confdefs.h"
19158
19159 /* Override any gcc2 internal prototype to avoid an error.  */
19160 #ifdef __cplusplus
19161 extern "C"
19162 #endif
19163 /* We use char because int might match the return type of a gcc2
19164    builtin and then its argument prototype would still apply.  */
19165 char tre_regcomp ();
19166 int
19167 main (void)
19168 {
19169 tre_regcomp ();
19170   ;
19171   return 0;
19172 }
19173 _ACEOF
19174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19175 if { (eval echo "$as_me:19175: \"$ac_link\"") >&5
19176   (eval $ac_link) 2>&5
19177   ac_status=$?
19178   echo "$as_me:19178: \$? = $ac_status" >&5
19179   (exit "$ac_status"); } &&
19180          { ac_try='test -s "conftest$ac_exeext"'
19181   { (eval echo "$as_me:19181: \"$ac_try\"") >&5
19182   (eval $ac_try) 2>&5
19183   ac_status=$?
19184   echo "$as_me:19184: \$? = $ac_status" >&5
19185   (exit "$ac_status"); }; }; then
19186   ac_cv_lib_tre_tre_regcomp=yes
19187 else
19188   echo "$as_me: failed program was:" >&5
19189 cat "conftest.$ac_ext" >&5
19190 ac_cv_lib_tre_tre_regcomp=no
19191 fi
19192 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19193 LIBS=$ac_check_lib_save_LIBS
19194 fi
19195 echo "$as_me:19195: result: $ac_cv_lib_tre_tre_regcomp" >&5
19196 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19197 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19198
19199 cf_add_libs="$LIBS"
19200 # reverse order
19201 cf_add_0lib=
19202 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19203 # filter duplicates
19204 for cf_add_1lib in $cf_add_0lib; do
19205         for cf_add_2lib in $cf_add_libs; do
19206                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19207                         cf_add_1lib=
19208                         break
19209                 fi
19210         done
19211         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19212 done
19213 LIBS="$cf_add_libs"
19214
19215 fi
19216
19217 cf_add_libs="$LIBS"
19218 # reverse order
19219 cf_add_0lib=
19220 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19221 # filter duplicates
19222 for cf_add_1lib in $cf_add_0lib; do
19223         for cf_add_2lib in $cf_add_libs; do
19224                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19225                         cf_add_1lib=
19226                         break
19227                 fi
19228         done
19229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19230 done
19231 LIBS="$cf_add_libs"
19232
19233                 cf_regex_func=regcomp
19234
19235 else
19236
19237                 echo "$as_me:19237: checking for regcomp in -lgnurx" >&5
19238 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19239 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19240   echo $ECHO_N "(cached) $ECHO_C" >&6
19241 else
19242   ac_check_lib_save_LIBS=$LIBS
19243 LIBS="-lgnurx  $LIBS"
19244 cat >"conftest.$ac_ext" <<_ACEOF
19245 #line 19245 "configure"
19246 #include "confdefs.h"
19247
19248 /* Override any gcc2 internal prototype to avoid an error.  */
19249 #ifdef __cplusplus
19250 extern "C"
19251 #endif
19252 /* We use char because int might match the return type of a gcc2
19253    builtin and then its argument prototype would still apply.  */
19254 char regcomp ();
19255 int
19256 main (void)
19257 {
19258 regcomp ();
19259   ;
19260   return 0;
19261 }
19262 _ACEOF
19263 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19264 if { (eval echo "$as_me:19264: \"$ac_link\"") >&5
19265   (eval $ac_link) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit "$ac_status"); } &&
19269          { ac_try='test -s "conftest$ac_exeext"'
19270   { (eval echo "$as_me:19270: \"$ac_try\"") >&5
19271   (eval $ac_try) 2>&5
19272   ac_status=$?
19273   echo "$as_me:19273: \$? = $ac_status" >&5
19274   (exit "$ac_status"); }; }; then
19275   ac_cv_lib_gnurx_regcomp=yes
19276 else
19277   echo "$as_me: failed program was:" >&5
19278 cat "conftest.$ac_ext" >&5
19279 ac_cv_lib_gnurx_regcomp=no
19280 fi
19281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19282 LIBS=$ac_check_lib_save_LIBS
19283 fi
19284 echo "$as_me:19284: result: $ac_cv_lib_gnurx_regcomp" >&5
19285 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19286 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19287
19288 cf_add_libs="$LIBS"
19289 # reverse order
19290 cf_add_0lib=
19291 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19292 # filter duplicates
19293 for cf_add_1lib in $cf_add_0lib; do
19294         for cf_add_2lib in $cf_add_libs; do
19295                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19296                         cf_add_1lib=
19297                         break
19298                 fi
19299         done
19300         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19301 done
19302 LIBS="$cf_add_libs"
19303
19304                         cf_regex_func=regcomp
19305 fi
19306
19307 fi
19308
19309         ;;
19310 (*)
19311         cf_regex_libs="regex re"
19312         echo "$as_me:19312: checking for regcomp" >&5
19313 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19314 if test "${ac_cv_func_regcomp+set}" = set; then
19315   echo $ECHO_N "(cached) $ECHO_C" >&6
19316 else
19317   cat >"conftest.$ac_ext" <<_ACEOF
19318 #line 19318 "configure"
19319 #include "confdefs.h"
19320 #define regcomp autoconf_temporary
19321 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19322 #undef regcomp
19323
19324 #ifdef __cplusplus
19325 extern "C"
19326 #endif
19327
19328 /* We use char because int might match the return type of a gcc2
19329    builtin and then its argument prototype would still apply.  */
19330 char regcomp (void);
19331
19332 int
19333 main (void)
19334 {
19335
19336 /* The GNU C library defines stubs for functions which it implements
19337     to always fail with ENOSYS.  Some functions are actually named
19338     something starting with __ and the normal name is an alias.  */
19339 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19340 #error found stub for regcomp
19341 #endif
19342
19343         return regcomp ();
19344   ;
19345   return 0;
19346 }
19347 _ACEOF
19348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19349 if { (eval echo "$as_me:19349: \"$ac_link\"") >&5
19350   (eval $ac_link) 2>&5
19351   ac_status=$?
19352   echo "$as_me:19352: \$? = $ac_status" >&5
19353   (exit "$ac_status"); } &&
19354          { ac_try='test -s "conftest$ac_exeext"'
19355   { (eval echo "$as_me:19355: \"$ac_try\"") >&5
19356   (eval $ac_try) 2>&5
19357   ac_status=$?
19358   echo "$as_me:19358: \$? = $ac_status" >&5
19359   (exit "$ac_status"); }; }; then
19360   ac_cv_func_regcomp=yes
19361 else
19362   echo "$as_me: failed program was:" >&5
19363 cat "conftest.$ac_ext" >&5
19364 ac_cv_func_regcomp=no
19365 fi
19366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19367 fi
19368 echo "$as_me:19368: result: $ac_cv_func_regcomp" >&5
19369 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19370 if test "$ac_cv_func_regcomp" = yes; then
19371   cf_regex_func=regcomp
19372 else
19373
19374                 for cf_regex_lib in $cf_regex_libs
19375                 do
19376                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19377 echo "$as_me:19377: checking for regcomp in -l$cf_regex_lib" >&5
19378 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19379 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19380   echo $ECHO_N "(cached) $ECHO_C" >&6
19381 else
19382   ac_check_lib_save_LIBS=$LIBS
19383 LIBS="-l$cf_regex_lib  $LIBS"
19384 cat >"conftest.$ac_ext" <<_ACEOF
19385 #line 19385 "configure"
19386 #include "confdefs.h"
19387
19388 /* Override any gcc2 internal prototype to avoid an error.  */
19389 #ifdef __cplusplus
19390 extern "C"
19391 #endif
19392 /* We use char because int might match the return type of a gcc2
19393    builtin and then its argument prototype would still apply.  */
19394 char regcomp ();
19395 int
19396 main (void)
19397 {
19398 regcomp ();
19399   ;
19400   return 0;
19401 }
19402 _ACEOF
19403 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19404 if { (eval echo "$as_me:19404: \"$ac_link\"") >&5
19405   (eval $ac_link) 2>&5
19406   ac_status=$?
19407   echo "$as_me:19407: \$? = $ac_status" >&5
19408   (exit "$ac_status"); } &&
19409          { ac_try='test -s "conftest$ac_exeext"'
19410   { (eval echo "$as_me:19410: \"$ac_try\"") >&5
19411   (eval $ac_try) 2>&5
19412   ac_status=$?
19413   echo "$as_me:19413: \$? = $ac_status" >&5
19414   (exit "$ac_status"); }; }; then
19415   eval "$as_ac_Lib=yes"
19416 else
19417   echo "$as_me: failed program was:" >&5
19418 cat "conftest.$ac_ext" >&5
19419 eval "$as_ac_Lib=no"
19420 fi
19421 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19422 LIBS=$ac_check_lib_save_LIBS
19423 fi
19424 echo "$as_me:19424: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19425 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19426 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19427
19428 cf_add_libs="$LIBS"
19429 # reverse order
19430 cf_add_0lib=
19431 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19432 # filter duplicates
19433 for cf_add_1lib in $cf_add_0lib; do
19434         for cf_add_2lib in $cf_add_libs; do
19435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19436                         cf_add_1lib=
19437                         break
19438                 fi
19439         done
19440         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19441 done
19442 LIBS="$cf_add_libs"
19443
19444                                         cf_regex_func=regcomp
19445                                         break
19446 fi
19447
19448                 done
19449
19450 fi
19451
19452         ;;
19453 esac
19454
19455 if test "$cf_regex_func" = no ; then
19456         echo "$as_me:19456: checking for compile" >&5
19457 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19458 if test "${ac_cv_func_compile+set}" = set; then
19459   echo $ECHO_N "(cached) $ECHO_C" >&6
19460 else
19461   cat >"conftest.$ac_ext" <<_ACEOF
19462 #line 19462 "configure"
19463 #include "confdefs.h"
19464 #define compile autoconf_temporary
19465 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19466 #undef compile
19467
19468 #ifdef __cplusplus
19469 extern "C"
19470 #endif
19471
19472 /* We use char because int might match the return type of a gcc2
19473    builtin and then its argument prototype would still apply.  */
19474 char compile (void);
19475
19476 int
19477 main (void)
19478 {
19479
19480 /* The GNU C library defines stubs for functions which it implements
19481     to always fail with ENOSYS.  Some functions are actually named
19482     something starting with __ and the normal name is an alias.  */
19483 #if defined (__stub_compile) || defined (__stub___compile)
19484 #error found stub for compile
19485 #endif
19486
19487         return compile ();
19488   ;
19489   return 0;
19490 }
19491 _ACEOF
19492 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19493 if { (eval echo "$as_me:19493: \"$ac_link\"") >&5
19494   (eval $ac_link) 2>&5
19495   ac_status=$?
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit "$ac_status"); } &&
19498          { ac_try='test -s "conftest$ac_exeext"'
19499   { (eval echo "$as_me:19499: \"$ac_try\"") >&5
19500   (eval $ac_try) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit "$ac_status"); }; }; then
19504   ac_cv_func_compile=yes
19505 else
19506   echo "$as_me: failed program was:" >&5
19507 cat "conftest.$ac_ext" >&5
19508 ac_cv_func_compile=no
19509 fi
19510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19511 fi
19512 echo "$as_me:19512: result: $ac_cv_func_compile" >&5
19513 echo "${ECHO_T}$ac_cv_func_compile" >&6
19514 if test "$ac_cv_func_compile" = yes; then
19515   cf_regex_func=compile
19516 else
19517
19518                 echo "$as_me:19518: checking for compile in -lgen" >&5
19519 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19520 if test "${ac_cv_lib_gen_compile+set}" = set; then
19521   echo $ECHO_N "(cached) $ECHO_C" >&6
19522 else
19523   ac_check_lib_save_LIBS=$LIBS
19524 LIBS="-lgen  $LIBS"
19525 cat >"conftest.$ac_ext" <<_ACEOF
19526 #line 19526 "configure"
19527 #include "confdefs.h"
19528
19529 /* Override any gcc2 internal prototype to avoid an error.  */
19530 #ifdef __cplusplus
19531 extern "C"
19532 #endif
19533 /* We use char because int might match the return type of a gcc2
19534    builtin and then its argument prototype would still apply.  */
19535 char compile ();
19536 int
19537 main (void)
19538 {
19539 compile ();
19540   ;
19541   return 0;
19542 }
19543 _ACEOF
19544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19545 if { (eval echo "$as_me:19545: \"$ac_link\"") >&5
19546   (eval $ac_link) 2>&5
19547   ac_status=$?
19548   echo "$as_me:19548: \$? = $ac_status" >&5
19549   (exit "$ac_status"); } &&
19550          { ac_try='test -s "conftest$ac_exeext"'
19551   { (eval echo "$as_me:19551: \"$ac_try\"") >&5
19552   (eval $ac_try) 2>&5
19553   ac_status=$?
19554   echo "$as_me:19554: \$? = $ac_status" >&5
19555   (exit "$ac_status"); }; }; then
19556   ac_cv_lib_gen_compile=yes
19557 else
19558   echo "$as_me: failed program was:" >&5
19559 cat "conftest.$ac_ext" >&5
19560 ac_cv_lib_gen_compile=no
19561 fi
19562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19563 LIBS=$ac_check_lib_save_LIBS
19564 fi
19565 echo "$as_me:19565: result: $ac_cv_lib_gen_compile" >&5
19566 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19567 if test "$ac_cv_lib_gen_compile" = yes; then
19568
19569 cf_add_libs="$LIBS"
19570 # reverse order
19571 cf_add_0lib=
19572 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19573 # filter duplicates
19574 for cf_add_1lib in $cf_add_0lib; do
19575         for cf_add_2lib in $cf_add_libs; do
19576                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19577                         cf_add_1lib=
19578                         break
19579                 fi
19580         done
19581         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19582 done
19583 LIBS="$cf_add_libs"
19584
19585                                 cf_regex_func=compile
19586 fi
19587
19588 fi
19589
19590 fi
19591
19592 if test "$cf_regex_func" = no ; then
19593         { echo "$as_me:19593: WARNING: cannot find regular expression library" >&5
19594 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19595 fi
19596
19597 echo "$as_me:19597: checking for regular-expression headers" >&5
19598 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19599 if test "${cf_cv_regex_hdrs+set}" = set; then
19600   echo $ECHO_N "(cached) $ECHO_C" >&6
19601 else
19602
19603 cf_cv_regex_hdrs=no
19604 case "$cf_regex_func" in
19605 (compile)
19606         for cf_regex_hdr in regexp.h regexpr.h
19607         do
19608                 cat >"conftest.$ac_ext" <<_ACEOF
19609 #line 19609 "configure"
19610 #include "confdefs.h"
19611 #include <$cf_regex_hdr>
19612 int
19613 main (void)
19614 {
19615
19616                         char *p = compile("", "", "", 0);
19617                         int x = step("", "");
19618                         (void)p;
19619                         (void)x;
19620
19621   ;
19622   return 0;
19623 }
19624 _ACEOF
19625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19626 if { (eval echo "$as_me:19626: \"$ac_link\"") >&5
19627   (eval $ac_link) 2>&5
19628   ac_status=$?
19629   echo "$as_me:19629: \$? = $ac_status" >&5
19630   (exit "$ac_status"); } &&
19631          { ac_try='test -s "conftest$ac_exeext"'
19632   { (eval echo "$as_me:19632: \"$ac_try\"") >&5
19633   (eval $ac_try) 2>&5
19634   ac_status=$?
19635   echo "$as_me:19635: \$? = $ac_status" >&5
19636   (exit "$ac_status"); }; }; then
19637
19638                         cf_cv_regex_hdrs=$cf_regex_hdr
19639                         break
19640
19641 else
19642   echo "$as_me: failed program was:" >&5
19643 cat "conftest.$ac_ext" >&5
19644 fi
19645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19646         done
19647         ;;
19648 (*)
19649         for cf_regex_hdr in regex.h
19650         do
19651                 cat >"conftest.$ac_ext" <<_ACEOF
19652 #line 19652 "configure"
19653 #include "confdefs.h"
19654 #include <sys/types.h>
19655 #include <$cf_regex_hdr>
19656 int
19657 main (void)
19658 {
19659
19660                         regex_t *p = 0;
19661                         int x = regcomp(p, "", 0);
19662                         int y = regexec(p, "", 0, 0, 0);
19663                         (void)x;
19664                         (void)y;
19665                         regfree(p);
19666
19667   ;
19668   return 0;
19669 }
19670 _ACEOF
19671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19672 if { (eval echo "$as_me:19672: \"$ac_link\"") >&5
19673   (eval $ac_link) 2>&5
19674   ac_status=$?
19675   echo "$as_me:19675: \$? = $ac_status" >&5
19676   (exit "$ac_status"); } &&
19677          { ac_try='test -s "conftest$ac_exeext"'
19678   { (eval echo "$as_me:19678: \"$ac_try\"") >&5
19679   (eval $ac_try) 2>&5
19680   ac_status=$?
19681   echo "$as_me:19681: \$? = $ac_status" >&5
19682   (exit "$ac_status"); }; }; then
19683
19684                         cf_cv_regex_hdrs=$cf_regex_hdr
19685                         break
19686
19687 else
19688   echo "$as_me: failed program was:" >&5
19689 cat "conftest.$ac_ext" >&5
19690 fi
19691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19692         done
19693         ;;
19694 esac
19695
19696 fi
19697 echo "$as_me:19697: result: $cf_cv_regex_hdrs" >&5
19698 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19699
19700 case "$cf_cv_regex_hdrs" in
19701         (no)            { echo "$as_me:19701: WARNING: no regular expression header found" >&5
19702 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19703         (regex.h)
19704 cat >>confdefs.h <<\EOF
19705 #define HAVE_REGEX_H_FUNCS 1
19706 EOF
19707  ;;
19708         (regexp.h)
19709 cat >>confdefs.h <<\EOF
19710 #define HAVE_REGEXP_H_FUNCS 1
19711 EOF
19712  ;;
19713         (regexpr.h)
19714 cat >>confdefs.h <<\EOF
19715 #define HAVE_REGEXPR_H_FUNCS 1
19716 EOF
19717  ;;
19718 esac
19719
19720 for ac_header in \
19721 fcntl.h \
19722 getopt.h \
19723 limits.h \
19724 locale.h \
19725 math.h \
19726 poll.h \
19727 sys/ioctl.h \
19728 sys/param.h \
19729 sys/poll.h \
19730 sys/select.h \
19731 sys/time.h \
19732 sys/times.h \
19733 ttyent.h \
19734 unistd.h \
19735 wctype.h \
19736
19737 do
19738 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19739 echo "$as_me:19739: checking for $ac_header" >&5
19740 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19741 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19742   echo $ECHO_N "(cached) $ECHO_C" >&6
19743 else
19744   cat >"conftest.$ac_ext" <<_ACEOF
19745 #line 19745 "configure"
19746 #include "confdefs.h"
19747 #include <$ac_header>
19748 _ACEOF
19749 if { (eval echo "$as_me:19749: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19750   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19751   ac_status=$?
19752   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19753   rm -f conftest.er1
19754   cat conftest.err >&5
19755   echo "$as_me:19755: \$? = $ac_status" >&5
19756   (exit "$ac_status"); } >/dev/null; then
19757   if test -s conftest.err; then
19758     ac_cpp_err=$ac_c_preproc_warn_flag
19759   else
19760     ac_cpp_err=
19761   fi
19762 else
19763   ac_cpp_err=yes
19764 fi
19765 if test -z "$ac_cpp_err"; then
19766   eval "$as_ac_Header=yes"
19767 else
19768   echo "$as_me: failed program was:" >&5
19769   cat "conftest.$ac_ext" >&5
19770   eval "$as_ac_Header=no"
19771 fi
19772 rm -f conftest.err "conftest.$ac_ext"
19773 fi
19774 echo "$as_me:19774: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19775 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19776 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19777   cat >>confdefs.h <<EOF
19778 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19779 EOF
19780
19781 fi
19782 done
19783
19784 for ac_header in unistd.h getopt.h
19785 do
19786 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19787 echo "$as_me:19787: checking for $ac_header" >&5
19788 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19789 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19790   echo $ECHO_N "(cached) $ECHO_C" >&6
19791 else
19792   cat >"conftest.$ac_ext" <<_ACEOF
19793 #line 19793 "configure"
19794 #include "confdefs.h"
19795 #include <$ac_header>
19796 _ACEOF
19797 if { (eval echo "$as_me:19797: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19798   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19799   ac_status=$?
19800   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19801   rm -f conftest.er1
19802   cat conftest.err >&5
19803   echo "$as_me:19803: \$? = $ac_status" >&5
19804   (exit "$ac_status"); } >/dev/null; then
19805   if test -s conftest.err; then
19806     ac_cpp_err=$ac_c_preproc_warn_flag
19807   else
19808     ac_cpp_err=
19809   fi
19810 else
19811   ac_cpp_err=yes
19812 fi
19813 if test -z "$ac_cpp_err"; then
19814   eval "$as_ac_Header=yes"
19815 else
19816   echo "$as_me: failed program was:" >&5
19817   cat "conftest.$ac_ext" >&5
19818   eval "$as_ac_Header=no"
19819 fi
19820 rm -f conftest.err "conftest.$ac_ext"
19821 fi
19822 echo "$as_me:19822: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19823 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19824 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19825   cat >>confdefs.h <<EOF
19826 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19827 EOF
19828
19829 fi
19830 done
19831
19832 echo "$as_me:19832: checking for header declaring getopt variables" >&5
19833 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19834 if test "${cf_cv_getopt_header+set}" = set; then
19835   echo $ECHO_N "(cached) $ECHO_C" >&6
19836 else
19837
19838 cf_cv_getopt_header=none
19839 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19840 do
19841 cat >"conftest.$ac_ext" <<_ACEOF
19842 #line 19842 "configure"
19843 #include "confdefs.h"
19844
19845 #include <$cf_header>
19846 int
19847 main (void)
19848 {
19849 int x = optind; char *y = optarg; (void)x; (void)y
19850   ;
19851   return 0;
19852 }
19853 _ACEOF
19854 rm -f "conftest.$ac_objext"
19855 if { (eval echo "$as_me:19855: \"$ac_compile\"") >&5
19856   (eval $ac_compile) 2>&5
19857   ac_status=$?
19858   echo "$as_me:19858: \$? = $ac_status" >&5
19859   (exit "$ac_status"); } &&
19860          { ac_try='test -s "conftest.$ac_objext"'
19861   { (eval echo "$as_me:19861: \"$ac_try\"") >&5
19862   (eval $ac_try) 2>&5
19863   ac_status=$?
19864   echo "$as_me:19864: \$? = $ac_status" >&5
19865   (exit "$ac_status"); }; }; then
19866   cf_cv_getopt_header=$cf_header
19867  break
19868 else
19869   echo "$as_me: failed program was:" >&5
19870 cat "conftest.$ac_ext" >&5
19871 fi
19872 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19873 done
19874
19875 fi
19876 echo "$as_me:19876: result: $cf_cv_getopt_header" >&5
19877 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19878 if test "$cf_cv_getopt_header" != none ; then
19879
19880 cat >>confdefs.h <<\EOF
19881 #define HAVE_GETOPT_HEADER 1
19882 EOF
19883
19884 fi
19885 if test "$cf_cv_getopt_header" = getopt.h ; then
19886
19887 cat >>confdefs.h <<\EOF
19888 #define NEED_GETOPT_H 1
19889 EOF
19890
19891 fi
19892
19893 echo "$as_me:19893: checking if external environ is declared" >&5
19894 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19895 if test "${cf_cv_dcl_environ+set}" = set; then
19896   echo $ECHO_N "(cached) $ECHO_C" >&6
19897 else
19898
19899     cat >"conftest.$ac_ext" <<_ACEOF
19900 #line 19900 "configure"
19901 #include "confdefs.h"
19902
19903 #ifdef HAVE_STDLIB_H
19904 #include <stdlib.h>
19905 #endif
19906 #include <unistd.h>
19907 int
19908 main (void)
19909 {
19910 int x = (int) environ
19911   ;
19912   return 0;
19913 }
19914 _ACEOF
19915 rm -f "conftest.$ac_objext"
19916 if { (eval echo "$as_me:19916: \"$ac_compile\"") >&5
19917   (eval $ac_compile) 2>&5
19918   ac_status=$?
19919   echo "$as_me:19919: \$? = $ac_status" >&5
19920   (exit "$ac_status"); } &&
19921          { ac_try='test -s "conftest.$ac_objext"'
19922   { (eval echo "$as_me:19922: \"$ac_try\"") >&5
19923   (eval $ac_try) 2>&5
19924   ac_status=$?
19925   echo "$as_me:19925: \$? = $ac_status" >&5
19926   (exit "$ac_status"); }; }; then
19927   cf_cv_dcl_environ=yes
19928 else
19929   echo "$as_me: failed program was:" >&5
19930 cat "conftest.$ac_ext" >&5
19931 cf_cv_dcl_environ=no
19932 fi
19933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19934
19935 fi
19936 echo "$as_me:19936: result: $cf_cv_dcl_environ" >&5
19937 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19938
19939 if test "$cf_cv_dcl_environ" = no ; then
19940
19941 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19942
19943     cat >>confdefs.h <<EOF
19944 #define $cf_result 1
19945 EOF
19946
19947 fi
19948
19949 # It's possible (for near-UNIX clones) that the data doesn't exist
19950
19951 echo "$as_me:19951: checking if external environ exists" >&5
19952 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19953 if test "${cf_cv_have_environ+set}" = set; then
19954   echo $ECHO_N "(cached) $ECHO_C" >&6
19955 else
19956
19957         cat >"conftest.$ac_ext" <<_ACEOF
19958 #line 19958 "configure"
19959 #include "confdefs.h"
19960
19961 #undef environ
19962 extern int environ;
19963
19964 int
19965 main (void)
19966 {
19967 environ = 2
19968   ;
19969   return 0;
19970 }
19971 _ACEOF
19972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19973 if { (eval echo "$as_me:19973: \"$ac_link\"") >&5
19974   (eval $ac_link) 2>&5
19975   ac_status=$?
19976   echo "$as_me:19976: \$? = $ac_status" >&5
19977   (exit "$ac_status"); } &&
19978          { ac_try='test -s "conftest$ac_exeext"'
19979   { (eval echo "$as_me:19979: \"$ac_try\"") >&5
19980   (eval $ac_try) 2>&5
19981   ac_status=$?
19982   echo "$as_me:19982: \$? = $ac_status" >&5
19983   (exit "$ac_status"); }; }; then
19984   cf_cv_have_environ=yes
19985 else
19986   echo "$as_me: failed program was:" >&5
19987 cat "conftest.$ac_ext" >&5
19988 cf_cv_have_environ=no
19989 fi
19990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19991
19992 fi
19993 echo "$as_me:19993: result: $cf_cv_have_environ" >&5
19994 echo "${ECHO_T}$cf_cv_have_environ" >&6
19995
19996 if test "$cf_cv_have_environ" = yes ; then
19997
19998 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19999
20000         cat >>confdefs.h <<EOF
20001 #define $cf_result 1
20002 EOF
20003
20004 fi
20005
20006 echo "$as_me:20006: checking for getenv" >&5
20007 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20008 if test "${ac_cv_func_getenv+set}" = set; then
20009   echo $ECHO_N "(cached) $ECHO_C" >&6
20010 else
20011   cat >"conftest.$ac_ext" <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014 #define getenv autoconf_temporary
20015 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20016 #undef getenv
20017
20018 #ifdef __cplusplus
20019 extern "C"
20020 #endif
20021
20022 /* We use char because int might match the return type of a gcc2
20023    builtin and then its argument prototype would still apply.  */
20024 char getenv (void);
20025
20026 int
20027 main (void)
20028 {
20029
20030 /* The GNU C library defines stubs for functions which it implements
20031     to always fail with ENOSYS.  Some functions are actually named
20032     something starting with __ and the normal name is an alias.  */
20033 #if defined (__stub_getenv) || defined (__stub___getenv)
20034 #error found stub for getenv
20035 #endif
20036
20037         return getenv ();
20038   ;
20039   return 0;
20040 }
20041 _ACEOF
20042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20043 if { (eval echo "$as_me:20043: \"$ac_link\"") >&5
20044   (eval $ac_link) 2>&5
20045   ac_status=$?
20046   echo "$as_me:20046: \$? = $ac_status" >&5
20047   (exit "$ac_status"); } &&
20048          { ac_try='test -s "conftest$ac_exeext"'
20049   { (eval echo "$as_me:20049: \"$ac_try\"") >&5
20050   (eval $ac_try) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit "$ac_status"); }; }; then
20054   ac_cv_func_getenv=yes
20055 else
20056   echo "$as_me: failed program was:" >&5
20057 cat "conftest.$ac_ext" >&5
20058 ac_cv_func_getenv=no
20059 fi
20060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20061 fi
20062 echo "$as_me:20062: result: $ac_cv_func_getenv" >&5
20063 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20064
20065 for ac_func in putenv setenv strdup
20066 do
20067 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20068 echo "$as_me:20068: checking for $ac_func" >&5
20069 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20070 if eval "test \"\${$as_ac_var+set}\" = set"; then
20071   echo $ECHO_N "(cached) $ECHO_C" >&6
20072 else
20073   cat >"conftest.$ac_ext" <<_ACEOF
20074 #line 20074 "configure"
20075 #include "confdefs.h"
20076 #define $ac_func autoconf_temporary
20077 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20078 #undef $ac_func
20079
20080 #ifdef __cplusplus
20081 extern "C"
20082 #endif
20083
20084 /* We use char because int might match the return type of a gcc2
20085    builtin and then its argument prototype would still apply.  */
20086 char $ac_func (void);
20087
20088 int
20089 main (void)
20090 {
20091
20092 /* The GNU C library defines stubs for functions which it implements
20093     to always fail with ENOSYS.  Some functions are actually named
20094     something starting with __ and the normal name is an alias.  */
20095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20096 #error found stub for $ac_func
20097 #endif
20098
20099         return $ac_func ();
20100   ;
20101   return 0;
20102 }
20103 _ACEOF
20104 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20105 if { (eval echo "$as_me:20105: \"$ac_link\"") >&5
20106   (eval $ac_link) 2>&5
20107   ac_status=$?
20108   echo "$as_me:20108: \$? = $ac_status" >&5
20109   (exit "$ac_status"); } &&
20110          { ac_try='test -s "conftest$ac_exeext"'
20111   { (eval echo "$as_me:20111: \"$ac_try\"") >&5
20112   (eval $ac_try) 2>&5
20113   ac_status=$?
20114   echo "$as_me:20114: \$? = $ac_status" >&5
20115   (exit "$ac_status"); }; }; then
20116   eval "$as_ac_var=yes"
20117 else
20118   echo "$as_me: failed program was:" >&5
20119 cat "conftest.$ac_ext" >&5
20120 eval "$as_ac_var=no"
20121 fi
20122 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20123 fi
20124 echo "$as_me:20124: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20125 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20126 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20127   cat >>confdefs.h <<EOF
20128 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20129 EOF
20130
20131 fi
20132 done
20133
20134 echo "$as_me:20134: checking if getenv returns consistent values" >&5
20135 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20136 if test "${cf_cv_consistent_getenv+set}" = set; then
20137   echo $ECHO_N "(cached) $ECHO_C" >&6
20138 else
20139
20140 if test "$cross_compiling" = yes; then
20141   cf_cv_consistent_getenv=unknown
20142 else
20143   cat >"conftest.$ac_ext" <<_ACEOF
20144 #line 20144 "configure"
20145 #include "confdefs.h"
20146
20147 #include <stdlib.h>
20148 #include <unistd.h>
20149 #include <stdio.h>
20150 #include <string.h>
20151 #include <sys/types.h>
20152
20153 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20154 extern char **environ;  /* POSIX, but some systems are not... */
20155 #endif
20156
20157 #if defined(HAVE_STRDUP)
20158 #define str_alloc(s) strdup(s)
20159 #else
20160 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20161 #endif
20162
20163 static void set_value(const char *name, const char *value)
20164 {
20165 #if defined(HAVE_SETENV)
20166         setenv(name, value, 1);
20167 #elif defined(HAVE_PUTENV)
20168         char buffer[1024];
20169         sprintf(buffer, "%s=%s", name, value);
20170         putenv(str_alloc(buffer));
20171 #else
20172 #error neither putenv/setenv found
20173 #endif
20174 }
20175 int main(void)
20176 {
20177         int pass;
20178         size_t numenv, limit, j;
20179         char **mynames;
20180         char **myvalues;
20181         char **mypointer;
20182         char *equals;
20183         for (numenv = 0; environ[numenv]; ++numenv) ;
20184         limit = numenv + 10;
20185         mynames = (char **) calloc(limit + 1, sizeof(char *));
20186         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20187         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20188 #if defined(HAVE_ENVIRON)
20189         for (j = 0; environ[j]; ++j) {
20190                 mynames[j] = str_alloc(environ[j]);
20191                 equals = strchr(mynames[j], '=');
20192                 if (equals != 0) {
20193                         *equals++ = '\\0';
20194                         myvalues[j] = str_alloc(equals);
20195                 } else {
20196                         myvalues[j] = str_alloc("");
20197                 }
20198         }
20199 #endif
20200         for (j = numenv; j < limit; ++j) {
20201                 char name[80];
20202                 char value[80];
20203                 size_t found;
20204                 size_t k = 0;
20205                 do {
20206                         size_t jk;
20207                         found = 0;
20208                         sprintf(name, "TERM%lu", (unsigned long) k);
20209                         for (jk = 0; jk < j; ++jk) {
20210                                 if (!strcmp(name, mynames[jk])) {
20211                                         found = 1;
20212                                         ++k;
20213                                         break;
20214                                 }
20215                         }
20216                 } while (found);
20217                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20218                 set_value(name, value);
20219                 mynames[j] = str_alloc(name);
20220                 myvalues[j] = str_alloc(value);
20221         }
20222         for (pass = 0; pass < 3; ++pass) {
20223                 for (j = 0; j < limit; ++j) {
20224                         char *value = getenv(mynames[j]);
20225                         if (pass) {
20226                                 if (value == 0) {
20227                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20228                                         ${cf_cv_main_return:-return}(1);
20229                                 } else if (value != mypointer[j]) {
20230                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20231                                         ${cf_cv_main_return:-return}(1);
20232                                 } else if (strcmp(value, myvalues[j])) {
20233                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20234                                         ${cf_cv_main_return:-return}(1);
20235                                 }
20236                         } else {
20237                                 size_t k;
20238                                 mypointer[j] = value;
20239                                 for (k = 0; k < j; ++k) {
20240                                         if (mypointer[j] == mypointer[k]) {
20241                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20242                                                 ${cf_cv_main_return:-return}(1);
20243                                         }
20244                                 }
20245                         }
20246                 }
20247         }
20248         ${cf_cv_main_return:-return}(0);
20249 }
20250
20251 _ACEOF
20252 rm -f "conftest$ac_exeext"
20253 if { (eval echo "$as_me:20253: \"$ac_link\"") >&5
20254   (eval $ac_link) 2>&5
20255   ac_status=$?
20256   echo "$as_me:20256: \$? = $ac_status" >&5
20257   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20258   { (eval echo "$as_me:20258: \"$ac_try\"") >&5
20259   (eval $ac_try) 2>&5
20260   ac_status=$?
20261   echo "$as_me:20261: \$? = $ac_status" >&5
20262   (exit "$ac_status"); }; }; then
20263   cf_cv_consistent_getenv=yes
20264 else
20265   echo "$as_me: program exited with status $ac_status" >&5
20266 echo "$as_me: failed program was:" >&5
20267 cat "conftest.$ac_ext" >&5
20268 cf_cv_consistent_getenv=no
20269 fi
20270 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20271 fi
20272
20273 fi
20274 echo "$as_me:20274: result: $cf_cv_consistent_getenv" >&5
20275 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20276
20277 if test "x$cf_cv_consistent_getenv" = xno
20278 then
20279
20280 cat >>confdefs.h <<\EOF
20281 #define HAVE_CONSISTENT_GETENV 1
20282 EOF
20283
20284 fi
20285
20286 if test "x$cf_cv_consistent_getenv" = xno && \
20287         test "x$cf_with_trace" = xyes
20288 then
20289         { echo "$as_me:20289: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20290 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20291 fi
20292
20293 echo "$as_me:20293: checking if sys/time.h works with sys/select.h" >&5
20294 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20295 if test "${cf_cv_sys_time_select+set}" = set; then
20296   echo $ECHO_N "(cached) $ECHO_C" >&6
20297 else
20298
20299 cat >"conftest.$ac_ext" <<_ACEOF
20300 #line 20300 "configure"
20301 #include "confdefs.h"
20302
20303 #include <sys/types.h>
20304 #ifdef HAVE_SYS_TIME_H
20305 #include <sys/time.h>
20306 #endif
20307 #ifdef HAVE_SYS_SELECT_H
20308 #include <sys/select.h>
20309 #endif
20310
20311 int
20312 main (void)
20313 {
20314
20315   ;
20316   return 0;
20317 }
20318 _ACEOF
20319 rm -f "conftest.$ac_objext"
20320 if { (eval echo "$as_me:20320: \"$ac_compile\"") >&5
20321   (eval $ac_compile) 2>&5
20322   ac_status=$?
20323   echo "$as_me:20323: \$? = $ac_status" >&5
20324   (exit "$ac_status"); } &&
20325          { ac_try='test -s "conftest.$ac_objext"'
20326   { (eval echo "$as_me:20326: \"$ac_try\"") >&5
20327   (eval $ac_try) 2>&5
20328   ac_status=$?
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit "$ac_status"); }; }; then
20331   cf_cv_sys_time_select=yes
20332 else
20333   echo "$as_me: failed program was:" >&5
20334 cat "conftest.$ac_ext" >&5
20335 cf_cv_sys_time_select=no
20336 fi
20337 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20338
20339 fi
20340
20341 echo "$as_me:20341: result: $cf_cv_sys_time_select" >&5
20342 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20343 test "$cf_cv_sys_time_select" = yes &&
20344 cat >>confdefs.h <<\EOF
20345 #define HAVE_SYS_TIME_SELECT 1
20346 EOF
20347
20348 ###     checks for compiler characteristics
20349 ac_ext=c
20350 ac_cpp='$CPP $CPPFLAGS'
20351 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20352 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20353 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20354 ac_main_return="return"
20355
20356 echo "$as_me:20356: checking for an ANSI C-conforming const" >&5
20357 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20358 if test "${ac_cv_c_const+set}" = set; then
20359   echo $ECHO_N "(cached) $ECHO_C" >&6
20360 else
20361   cat >"conftest.$ac_ext" <<_ACEOF
20362 #line 20362 "configure"
20363 #include "confdefs.h"
20364
20365 int
20366 main (void)
20367 {
20368 /* FIXME: Include the comments suggested by Paul. */
20369 #ifndef __cplusplus
20370   /* Ultrix mips cc rejects this.  */
20371   typedef int charset[2];
20372   const charset x;
20373   /* SunOS 4.1.1 cc rejects this.  */
20374   char const *const *ccp;
20375   char **p;
20376   /* NEC SVR4.0.2 mips cc rejects this.  */
20377   struct point {int x, y;};
20378   static struct point const zero = {0,0};
20379   /* AIX XL C 1.02.0.0 rejects this.
20380      It does not let you subtract one const X* pointer from another in
20381      an arm of an if-expression whose if-part is not a constant
20382      expression */
20383   const char *g = "string";
20384   ccp = &g + (g ? g-g : 0);
20385   /* HPUX 7.0 cc rejects these. */
20386   ++ccp;
20387   p = (char**) ccp;
20388   ccp = (char const *const *) p;
20389   { /* SCO 3.2v4 cc rejects this.  */
20390     char *t;
20391     char const *s = 0 ? (char *) 0 : (char const *) 0;
20392
20393     *t++ = 0;
20394   }
20395   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20396     int x[] = {25, 17};
20397     const int *foo = &x[0];
20398     ++foo;
20399   }
20400   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20401     typedef const int *iptr;
20402     iptr p = 0;
20403     ++p;
20404   }
20405   { /* AIX XL C 1.02.0.0 rejects this saying
20406        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20407     struct s { int j; const int *ap[3]; };
20408     struct s *b; b->j = 5;
20409   }
20410   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20411     const int foo = 10;
20412   }
20413 #endif
20414
20415   ;
20416   return 0;
20417 }
20418 _ACEOF
20419 rm -f "conftest.$ac_objext"
20420 if { (eval echo "$as_me:20420: \"$ac_compile\"") >&5
20421   (eval $ac_compile) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit "$ac_status"); } &&
20425          { ac_try='test -s "conftest.$ac_objext"'
20426   { (eval echo "$as_me:20426: \"$ac_try\"") >&5
20427   (eval $ac_try) 2>&5
20428   ac_status=$?
20429   echo "$as_me:20429: \$? = $ac_status" >&5
20430   (exit "$ac_status"); }; }; then
20431   ac_cv_c_const=yes
20432 else
20433   echo "$as_me: failed program was:" >&5
20434 cat "conftest.$ac_ext" >&5
20435 ac_cv_c_const=no
20436 fi
20437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20438 fi
20439 echo "$as_me:20439: result: $ac_cv_c_const" >&5
20440 echo "${ECHO_T}$ac_cv_c_const" >&6
20441 if test $ac_cv_c_const = no; then
20442
20443 cat >>confdefs.h <<\EOF
20444 #define const
20445 EOF
20446
20447 fi
20448
20449 echo "$as_me:20449: checking for inline" >&5
20450 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20451 if test "${ac_cv_c_inline+set}" = set; then
20452   echo $ECHO_N "(cached) $ECHO_C" >&6
20453 else
20454   ac_cv_c_inline=no
20455 for ac_kw in inline __inline__ __inline; do
20456   cat >"conftest.$ac_ext" <<_ACEOF
20457 #line 20457 "configure"
20458 #include "confdefs.h"
20459 #ifndef __cplusplus
20460 static $ac_kw int static_foo () {return 0; }
20461 $ac_kw int foo () {return 0; }
20462 #endif
20463
20464 _ACEOF
20465 rm -f "conftest.$ac_objext"
20466 if { (eval echo "$as_me:20466: \"$ac_compile\"") >&5
20467   (eval $ac_compile) 2>&5
20468   ac_status=$?
20469   echo "$as_me:20469: \$? = $ac_status" >&5
20470   (exit "$ac_status"); } &&
20471          { ac_try='test -s "conftest.$ac_objext"'
20472   { (eval echo "$as_me:20472: \"$ac_try\"") >&5
20473   (eval $ac_try) 2>&5
20474   ac_status=$?
20475   echo "$as_me:20475: \$? = $ac_status" >&5
20476   (exit "$ac_status"); }; }; then
20477   ac_cv_c_inline=$ac_kw; break
20478 else
20479   echo "$as_me: failed program was:" >&5
20480 cat "conftest.$ac_ext" >&5
20481 fi
20482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20483 done
20484
20485 fi
20486 echo "$as_me:20486: result: $ac_cv_c_inline" >&5
20487 echo "${ECHO_T}$ac_cv_c_inline" >&6
20488 case $ac_cv_c_inline in
20489   inline | yes) ;;
20490   no)
20491 cat >>confdefs.h <<\EOF
20492 #define inline
20493 EOF
20494  ;;
20495   *)  cat >>confdefs.h <<EOF
20496 #define inline $ac_cv_c_inline
20497 EOF
20498  ;;
20499 esac
20500
20501 NCURSES_INLINE=
20502 if test "$ac_cv_c_inline" != no ; then
20503         NCURSES_INLINE=inline
20504         if test "$INTEL_COMPILER" = yes
20505         then
20506                 :
20507         elif test "$CLANG_COMPILER" = yes
20508         then
20509                 :
20510         elif test "$GCC" = yes
20511         then
20512                 echo "$as_me:20512: checking if $CC supports options to tune inlining" >&5
20513 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20514 if test "${cf_cv_gcc_inline+set}" = set; then
20515   echo $ECHO_N "(cached) $ECHO_C" >&6
20516 else
20517
20518                 cf_save_CFLAGS=$CFLAGS
20519                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20520                 cat >"conftest.$ac_ext" <<_ACEOF
20521 #line 20521 "configure"
20522 #include "confdefs.h"
20523 inline int foo(void) { return 1; }
20524 int
20525 main (void)
20526 {
20527 ${cf_cv_main_return:-return} foo()
20528   ;
20529   return 0;
20530 }
20531 _ACEOF
20532 rm -f "conftest.$ac_objext"
20533 if { (eval echo "$as_me:20533: \"$ac_compile\"") >&5
20534   (eval $ac_compile) 2>&5
20535   ac_status=$?
20536   echo "$as_me:20536: \$? = $ac_status" >&5
20537   (exit "$ac_status"); } &&
20538          { ac_try='test -s "conftest.$ac_objext"'
20539   { (eval echo "$as_me:20539: \"$ac_try\"") >&5
20540   (eval $ac_try) 2>&5
20541   ac_status=$?
20542   echo "$as_me:20542: \$? = $ac_status" >&5
20543   (exit "$ac_status"); }; }; then
20544   cf_cv_gcc_inline=yes
20545 else
20546   echo "$as_me: failed program was:" >&5
20547 cat "conftest.$ac_ext" >&5
20548 cf_cv_gcc_inline=no
20549 fi
20550 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20551                 CFLAGS=$cf_save_CFLAGS
20552
20553 fi
20554 echo "$as_me:20554: result: $cf_cv_gcc_inline" >&5
20555 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20556                 if test "$cf_cv_gcc_inline" = yes ; then
20557
20558 cf_fix_cppflags=no
20559 cf_new_cflags=
20560 cf_new_cppflags=
20561 cf_new_extra_cppflags=
20562
20563 for cf_add_cflags in --param max-inline-insns-single=1200
20564 do
20565 case "$cf_fix_cppflags" in
20566 (no)
20567         case "$cf_add_cflags" in
20568         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20569                 case "$cf_add_cflags" in
20570                 (-D*)
20571                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20572
20573                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20574                                 && test -z "${cf_tst_cflags}" \
20575                                 && cf_fix_cppflags=yes
20576
20577                         if test "$cf_fix_cppflags" = yes ; then
20578
20579         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20580         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20581
20582                                 continue
20583                         elif test "${cf_tst_cflags}" = "\"'" ; then
20584
20585         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20586         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20587
20588                                 continue
20589                         fi
20590                         ;;
20591                 esac
20592                 case "$CPPFLAGS" in
20593                 (*$cf_add_cflags)
20594                         ;;
20595                 (*)
20596                         case "$cf_add_cflags" in
20597                         (-D*)
20598                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20599
20600 CPPFLAGS=`echo "$CPPFLAGS" | \
20601         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20602                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20603
20604                                 ;;
20605                         esac
20606
20607         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20608         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20609
20610                         ;;
20611                 esac
20612                 ;;
20613         (*)
20614
20615         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20616         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20617
20618                 ;;
20619         esac
20620         ;;
20621 (yes)
20622
20623         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20624         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20625
20626         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20627
20628         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20629                 && test -z "${cf_tst_cflags}" \
20630                 && cf_fix_cppflags=no
20631         ;;
20632 esac
20633 done
20634
20635 if test -n "$cf_new_cflags" ; then
20636
20637         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20638         CFLAGS="${CFLAGS}$cf_new_cflags"
20639
20640 fi
20641
20642 if test -n "$cf_new_cppflags" ; then
20643
20644         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20645         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20646
20647 fi
20648
20649 if test -n "$cf_new_extra_cppflags" ; then
20650
20651         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20652         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20653
20654 fi
20655
20656                 fi
20657         fi
20658 fi
20659
20660 echo "$as_me:20660: checking for signal global datatype" >&5
20661 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20662 if test "${cf_cv_sig_atomic_t+set}" = set; then
20663   echo $ECHO_N "(cached) $ECHO_C" >&6
20664 else
20665
20666         for cf_type in \
20667                 "volatile sig_atomic_t" \
20668                 "sig_atomic_t" \
20669                 "int"
20670         do
20671         cat >"conftest.$ac_ext" <<_ACEOF
20672 #line 20672 "configure"
20673 #include "confdefs.h"
20674
20675 #include <sys/types.h>
20676 #include <signal.h>
20677 #include <stdio.h>
20678
20679 extern $cf_type x;
20680 $cf_type x;
20681 static void handler(int sig)
20682 {
20683         (void)sig;
20684         x = 5;
20685 }
20686 int
20687 main (void)
20688 {
20689 signal(SIGINT, handler);
20690                  x = 1
20691   ;
20692   return 0;
20693 }
20694 _ACEOF
20695 rm -f "conftest.$ac_objext"
20696 if { (eval echo "$as_me:20696: \"$ac_compile\"") >&5
20697   (eval $ac_compile) 2>&5
20698   ac_status=$?
20699   echo "$as_me:20699: \$? = $ac_status" >&5
20700   (exit "$ac_status"); } &&
20701          { ac_try='test -s "conftest.$ac_objext"'
20702   { (eval echo "$as_me:20702: \"$ac_try\"") >&5
20703   (eval $ac_try) 2>&5
20704   ac_status=$?
20705   echo "$as_me:20705: \$? = $ac_status" >&5
20706   (exit "$ac_status"); }; }; then
20707   cf_cv_sig_atomic_t=$cf_type
20708 else
20709   echo "$as_me: failed program was:" >&5
20710 cat "conftest.$ac_ext" >&5
20711 cf_cv_sig_atomic_t=no
20712 fi
20713 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20714                 test "$cf_cv_sig_atomic_t" != no && break
20715         done
20716
20717 fi
20718
20719 echo "$as_me:20719: result: $cf_cv_sig_atomic_t" >&5
20720 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20721 test "$cf_cv_sig_atomic_t" != no &&
20722 cat >>confdefs.h <<EOF
20723 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20724 EOF
20725
20726 if test "$NCURSES_CHTYPE" = auto ; then
20727
20728 echo "$as_me:20728: checking for type of chtype" >&5
20729 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20730 if test "${cf_cv_typeof_chtype+set}" = set; then
20731   echo $ECHO_N "(cached) $ECHO_C" >&6
20732 else
20733
20734                 if test "$cross_compiling" = yes; then
20735   cf_cv_typeof_chtype=long
20736 else
20737   cat >"conftest.$ac_ext" <<_ACEOF
20738 #line 20738 "configure"
20739 #include "confdefs.h"
20740
20741 #define WANT_BITS 31
20742 #include <stdio.h>
20743 int main(void)
20744 {
20745         FILE *fp = fopen("cf_test.out", "w");
20746         if (fp != 0) {
20747                 char *result = "long";
20748                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20749                         int n;
20750                         unsigned int x, y;
20751                         for (n = 0; n < WANT_BITS; n++) {
20752                                 x = (1 << n);
20753                                 y = (x >> n);
20754                                 if (y != 1 || x == 0) {
20755                                         x = 0;
20756                                         break;
20757                                 }
20758                         }
20759                         /*
20760                          * If x is nonzero, an int is big enough for the bits
20761                          * that we want.
20762                          */
20763                         result = (x != 0) ? "int" : "long";
20764                 }
20765                 fputs(result, fp);
20766                 fclose(fp);
20767         }
20768         ${cf_cv_main_return:-return}(0);
20769 }
20770
20771 _ACEOF
20772 rm -f "conftest$ac_exeext"
20773 if { (eval echo "$as_me:20773: \"$ac_link\"") >&5
20774   (eval $ac_link) 2>&5
20775   ac_status=$?
20776   echo "$as_me:20776: \$? = $ac_status" >&5
20777   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20778   { (eval echo "$as_me:20778: \"$ac_try\"") >&5
20779   (eval $ac_try) 2>&5
20780   ac_status=$?
20781   echo "$as_me:20781: \$? = $ac_status" >&5
20782   (exit "$ac_status"); }; }; then
20783   cf_cv_typeof_chtype=`cat cf_test.out`
20784 else
20785   echo "$as_me: program exited with status $ac_status" >&5
20786 echo "$as_me: failed program was:" >&5
20787 cat "conftest.$ac_ext" >&5
20788 cf_cv_typeof_chtype=long
20789 fi
20790 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20791 fi
20792                 rm -f cf_test.out
20793
20794 fi
20795
20796 echo "$as_me:20796: result: $cf_cv_typeof_chtype" >&5
20797 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20798
20799 cat >>confdefs.h <<EOF
20800 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20801 EOF
20802
20803 else
20804         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20805 fi
20806 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20807
20808 echo "$as_me:20808: checking if unsigned literals are legal" >&5
20809 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20810 if test "${cf_cv_unsigned_literals+set}" = set; then
20811   echo $ECHO_N "(cached) $ECHO_C" >&6
20812 else
20813
20814         cat >"conftest.$ac_ext" <<_ACEOF
20815 #line 20815 "configure"
20816 #include "confdefs.h"
20817
20818 int
20819 main (void)
20820 {
20821 long x = 1L + 1UL + 1U + 1
20822   ;
20823   return 0;
20824 }
20825 _ACEOF
20826 rm -f "conftest.$ac_objext"
20827 if { (eval echo "$as_me:20827: \"$ac_compile\"") >&5
20828   (eval $ac_compile) 2>&5
20829   ac_status=$?
20830   echo "$as_me:20830: \$? = $ac_status" >&5
20831   (exit "$ac_status"); } &&
20832          { ac_try='test -s "conftest.$ac_objext"'
20833   { (eval echo "$as_me:20833: \"$ac_try\"") >&5
20834   (eval $ac_try) 2>&5
20835   ac_status=$?
20836   echo "$as_me:20836: \$? = $ac_status" >&5
20837   (exit "$ac_status"); }; }; then
20838   cf_cv_unsigned_literals=yes
20839 else
20840   echo "$as_me: failed program was:" >&5
20841 cat "conftest.$ac_ext" >&5
20842 cf_cv_unsigned_literals=no
20843 fi
20844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20845
20846 fi
20847
20848 echo "$as_me:20848: result: $cf_cv_unsigned_literals" >&5
20849 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20850
20851 cf_cv_1UL="1"
20852 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20853 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20854
20855 if test "$NCURSES_MMASK_T" = auto ; then
20856         cf_cv_typeof_mmask_t=long
20857 else
20858         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20859 fi
20860 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20861
20862 ###     Checks for external-data
20863
20864 echo "$as_me:20864: checking if external errno is declared" >&5
20865 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20866 if test "${cf_cv_dcl_errno+set}" = set; then
20867   echo $ECHO_N "(cached) $ECHO_C" >&6
20868 else
20869
20870         cat >"conftest.$ac_ext" <<_ACEOF
20871 #line 20871 "configure"
20872 #include "confdefs.h"
20873
20874 #ifdef HAVE_STDLIB_H
20875 #include <stdlib.h>
20876 #endif
20877 #include <stdio.h>
20878 #include <sys/types.h>
20879 #include <errno.h>
20880 int
20881 main (void)
20882 {
20883 int x = (int) errno; (void)x
20884   ;
20885   return 0;
20886 }
20887 _ACEOF
20888 rm -f "conftest.$ac_objext"
20889 if { (eval echo "$as_me:20889: \"$ac_compile\"") >&5
20890   (eval $ac_compile) 2>&5
20891   ac_status=$?
20892   echo "$as_me:20892: \$? = $ac_status" >&5
20893   (exit "$ac_status"); } &&
20894          { ac_try='test -s "conftest.$ac_objext"'
20895   { (eval echo "$as_me:20895: \"$ac_try\"") >&5
20896   (eval $ac_try) 2>&5
20897   ac_status=$?
20898   echo "$as_me:20898: \$? = $ac_status" >&5
20899   (exit "$ac_status"); }; }; then
20900   cf_cv_dcl_errno=yes
20901 else
20902   echo "$as_me: failed program was:" >&5
20903 cat "conftest.$ac_ext" >&5
20904 cf_cv_dcl_errno=no
20905 fi
20906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20907
20908 fi
20909 echo "$as_me:20909: result: $cf_cv_dcl_errno" >&5
20910 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20911
20912 if test "$cf_cv_dcl_errno" = no ; then
20913
20914 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20915
20916         cat >>confdefs.h <<EOF
20917 #define $cf_result 1
20918 EOF
20919
20920 fi
20921
20922 # It's possible (for near-UNIX clones) that the data doesn't exist
20923
20924 echo "$as_me:20924: checking if external errno exists" >&5
20925 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20926 if test "${cf_cv_have_errno+set}" = set; then
20927   echo $ECHO_N "(cached) $ECHO_C" >&6
20928 else
20929
20930         cat >"conftest.$ac_ext" <<_ACEOF
20931 #line 20931 "configure"
20932 #include "confdefs.h"
20933
20934 #undef errno
20935 extern int errno;
20936
20937 int
20938 main (void)
20939 {
20940 errno = 2
20941   ;
20942   return 0;
20943 }
20944 _ACEOF
20945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20946 if { (eval echo "$as_me:20946: \"$ac_link\"") >&5
20947   (eval $ac_link) 2>&5
20948   ac_status=$?
20949   echo "$as_me:20949: \$? = $ac_status" >&5
20950   (exit "$ac_status"); } &&
20951          { ac_try='test -s "conftest$ac_exeext"'
20952   { (eval echo "$as_me:20952: \"$ac_try\"") >&5
20953   (eval $ac_try) 2>&5
20954   ac_status=$?
20955   echo "$as_me:20955: \$? = $ac_status" >&5
20956   (exit "$ac_status"); }; }; then
20957   cf_cv_have_errno=yes
20958 else
20959   echo "$as_me: failed program was:" >&5
20960 cat "conftest.$ac_ext" >&5
20961 cf_cv_have_errno=no
20962 fi
20963 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20964
20965 fi
20966 echo "$as_me:20966: result: $cf_cv_have_errno" >&5
20967 echo "${ECHO_T}$cf_cv_have_errno" >&6
20968
20969 if test "$cf_cv_have_errno" = yes ; then
20970
20971 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20972
20973         cat >>confdefs.h <<EOF
20974 #define $cf_result 1
20975 EOF
20976
20977 fi
20978
20979 echo "$as_me:20979: checking if data-only library module links" >&5
20980 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20981 if test "${cf_cv_link_dataonly+set}" = set; then
20982   echo $ECHO_N "(cached) $ECHO_C" >&6
20983 else
20984
20985         rm -f conftest.a
20986         cat >conftest.$ac_ext <<EOF
20987 #line 20987 "configure"
20988 int     testdata[3] = { 123, 456, 789 };
20989 EOF
20990         if { (eval echo "$as_me:20990: \"$ac_compile\"") >&5
20991   (eval $ac_compile) 2>&5
20992   ac_status=$?
20993   echo "$as_me:20993: \$? = $ac_status" >&5
20994   (exit "$ac_status"); } ; then
20995                 mv conftest.o data.o && \
20996                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20997         fi
20998         rm -f conftest.$ac_ext data.o
20999         cat >conftest.$ac_ext <<EOF
21000 #line 21000 "configure"
21001 int     testfunc(void)
21002 {
21003 #if defined(NeXT)
21004         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21005 #else
21006         extern int testdata[3];
21007         return testdata[0] == 123
21008            &&  testdata[1] == 456
21009            &&  testdata[2] == 789;
21010 #endif
21011 }
21012 EOF
21013         if { (eval echo "$as_me:21013: \"$ac_compile\"") >&5
21014   (eval $ac_compile) 2>&5
21015   ac_status=$?
21016   echo "$as_me:21016: \$? = $ac_status" >&5
21017   (exit "$ac_status"); }; then
21018                 mv conftest.o func.o && \
21019                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21020         fi
21021         rm -f conftest.$ac_ext func.o
21022         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21023         cf_saveLIBS="$LIBS"
21024         LIBS="conftest.a $LIBS"
21025         if test "$cross_compiling" = yes; then
21026   cf_cv_link_dataonly=unknown
21027 else
21028   cat >"conftest.$ac_ext" <<_ACEOF
21029 #line 21029 "configure"
21030 #include "confdefs.h"
21031
21032         int main(void)
21033         {
21034                 extern int testfunc();
21035                 ${cf_cv_main_return:-return} (!testfunc());
21036         }
21037
21038 _ACEOF
21039 rm -f "conftest$ac_exeext"
21040 if { (eval echo "$as_me:21040: \"$ac_link\"") >&5
21041   (eval $ac_link) 2>&5
21042   ac_status=$?
21043   echo "$as_me:21043: \$? = $ac_status" >&5
21044   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21045   { (eval echo "$as_me:21045: \"$ac_try\"") >&5
21046   (eval $ac_try) 2>&5
21047   ac_status=$?
21048   echo "$as_me:21048: \$? = $ac_status" >&5
21049   (exit "$ac_status"); }; }; then
21050   cf_cv_link_dataonly=yes
21051 else
21052   echo "$as_me: program exited with status $ac_status" >&5
21053 echo "$as_me: failed program was:" >&5
21054 cat "conftest.$ac_ext" >&5
21055 cf_cv_link_dataonly=no
21056 fi
21057 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21058 fi
21059         LIBS="$cf_saveLIBS"
21060
21061 fi
21062
21063 echo "$as_me:21063: result: $cf_cv_link_dataonly" >&5
21064 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21065
21066 if test "$cf_cv_link_dataonly" = no ; then
21067
21068 cat >>confdefs.h <<\EOF
21069 #define BROKEN_LINKER 1
21070 EOF
21071
21072         BROKEN_LINKER=1
21073 fi
21074
21075 ###     Checks for library functions.
21076
21077 for ac_func in \
21078 getcwd \
21079 getegid \
21080 geteuid \
21081 getopt \
21082 getttynam \
21083 issetugid \
21084 localeconv \
21085 poll \
21086 putenv \
21087 remove \
21088 select \
21089 setbuf \
21090 setbuffer \
21091 setenv \
21092 setfsuid \
21093 setvbuf \
21094 sigaction \
21095 sigvec \
21096 snprintf \
21097 strdup \
21098 strstr \
21099 sysconf \
21100 tcgetpgrp \
21101 times \
21102 tsearch \
21103 vsnprintf \
21104
21105 do
21106 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21107 echo "$as_me:21107: checking for $ac_func" >&5
21108 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21109 if eval "test \"\${$as_ac_var+set}\" = set"; then
21110   echo $ECHO_N "(cached) $ECHO_C" >&6
21111 else
21112   cat >"conftest.$ac_ext" <<_ACEOF
21113 #line 21113 "configure"
21114 #include "confdefs.h"
21115 #define $ac_func autoconf_temporary
21116 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21117 #undef $ac_func
21118
21119 #ifdef __cplusplus
21120 extern "C"
21121 #endif
21122
21123 /* We use char because int might match the return type of a gcc2
21124    builtin and then its argument prototype would still apply.  */
21125 char $ac_func (void);
21126
21127 int
21128 main (void)
21129 {
21130
21131 /* The GNU C library defines stubs for functions which it implements
21132     to always fail with ENOSYS.  Some functions are actually named
21133     something starting with __ and the normal name is an alias.  */
21134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21135 #error found stub for $ac_func
21136 #endif
21137
21138         return $ac_func ();
21139   ;
21140   return 0;
21141 }
21142 _ACEOF
21143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21144 if { (eval echo "$as_me:21144: \"$ac_link\"") >&5
21145   (eval $ac_link) 2>&5
21146   ac_status=$?
21147   echo "$as_me:21147: \$? = $ac_status" >&5
21148   (exit "$ac_status"); } &&
21149          { ac_try='test -s "conftest$ac_exeext"'
21150   { (eval echo "$as_me:21150: \"$ac_try\"") >&5
21151   (eval $ac_try) 2>&5
21152   ac_status=$?
21153   echo "$as_me:21153: \$? = $ac_status" >&5
21154   (exit "$ac_status"); }; }; then
21155   eval "$as_ac_var=yes"
21156 else
21157   echo "$as_me: failed program was:" >&5
21158 cat "conftest.$ac_ext" >&5
21159 eval "$as_ac_var=no"
21160 fi
21161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21162 fi
21163 echo "$as_me:21163: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21164 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21165 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21166   cat >>confdefs.h <<EOF
21167 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21168 EOF
21169
21170 fi
21171 done
21172
21173 if test "x$ac_cv_func_getopt" = xno && \
21174    test "x$cf_with_progs$cf_with_tests" != xnono; then
21175         { { echo "$as_me:21175: error: getopt is required for building programs" >&5
21176 echo "$as_me: error: getopt is required for building programs" >&2;}
21177    { (exit 1); exit 1; }; }
21178 fi
21179
21180 if test "x$with_safe_sprintf" = xyes
21181 then
21182         if test "x$ac_cv_func_vsnprintf" = xyes
21183         then
21184                 { echo "$as_me:21184: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21185 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21186         else
21187
21188 cat >>confdefs.h <<\EOF
21189 #define USE_SAFE_SPRINTF 1
21190 EOF
21191
21192         fi
21193 fi
21194
21195 if test "x$with_getcap" = "xyes" ; then
21196
21197 echo "$as_me:21197: checking for terminal-capability database functions" >&5
21198 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21199 if test "${cf_cv_cgetent+set}" = set; then
21200   echo $ECHO_N "(cached) $ECHO_C" >&6
21201 else
21202
21203 cat >"conftest.$ac_ext" <<_ACEOF
21204 #line 21204 "configure"
21205 #include "confdefs.h"
21206
21207 #include <stdlib.h>
21208 int
21209 main (void)
21210 {
21211
21212         char temp[128];
21213         char *buf = temp;
21214         char *db_array = temp;
21215         cgetent(&buf, &db_array, "vt100");
21216         cgetcap(buf, "tc", '=');
21217         cgetmatch(buf, "tc");
21218
21219   ;
21220   return 0;
21221 }
21222 _ACEOF
21223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21224 if { (eval echo "$as_me:21224: \"$ac_link\"") >&5
21225   (eval $ac_link) 2>&5
21226   ac_status=$?
21227   echo "$as_me:21227: \$? = $ac_status" >&5
21228   (exit "$ac_status"); } &&
21229          { ac_try='test -s "conftest$ac_exeext"'
21230   { (eval echo "$as_me:21230: \"$ac_try\"") >&5
21231   (eval $ac_try) 2>&5
21232   ac_status=$?
21233   echo "$as_me:21233: \$? = $ac_status" >&5
21234   (exit "$ac_status"); }; }; then
21235   cf_cv_cgetent=yes
21236 else
21237   echo "$as_me: failed program was:" >&5
21238 cat "conftest.$ac_ext" >&5
21239 cf_cv_cgetent=no
21240 fi
21241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21242
21243 fi
21244 echo "$as_me:21244: result: $cf_cv_cgetent" >&5
21245 echo "${ECHO_T}$cf_cv_cgetent" >&6
21246
21247 if test "$cf_cv_cgetent" = yes
21248 then
21249
21250 cat >>confdefs.h <<\EOF
21251 #define HAVE_BSD_CGETENT 1
21252 EOF
21253
21254 echo "$as_me:21254: checking if cgetent uses const parameter" >&5
21255 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21256 if test "${cf_cv_cgetent_const+set}" = set; then
21257   echo $ECHO_N "(cached) $ECHO_C" >&6
21258 else
21259
21260 cat >"conftest.$ac_ext" <<_ACEOF
21261 #line 21261 "configure"
21262 #include "confdefs.h"
21263
21264 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21265 #include <stdlib.h>
21266 int
21267 main (void)
21268 {
21269
21270         char temp[128];
21271         char *buf = temp;
21272 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21273         const char *db_array = temp;
21274         cgetent(&buf, &db_array, "vt100");
21275 #endif
21276         cgetcap(buf, "tc", '=');
21277         cgetmatch(buf, "tc");
21278
21279   ;
21280   return 0;
21281 }
21282 _ACEOF
21283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21284 if { (eval echo "$as_me:21284: \"$ac_link\"") >&5
21285   (eval $ac_link) 2>&5
21286   ac_status=$?
21287   echo "$as_me:21287: \$? = $ac_status" >&5
21288   (exit "$ac_status"); } &&
21289          { ac_try='test -s "conftest$ac_exeext"'
21290   { (eval echo "$as_me:21290: \"$ac_try\"") >&5
21291   (eval $ac_try) 2>&5
21292   ac_status=$?
21293   echo "$as_me:21293: \$? = $ac_status" >&5
21294   (exit "$ac_status"); }; }; then
21295   cf_cv_cgetent_const=yes
21296 else
21297   echo "$as_me: failed program was:" >&5
21298 cat "conftest.$ac_ext" >&5
21299 cf_cv_cgetent_const=no
21300 fi
21301 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21302
21303 fi
21304 echo "$as_me:21304: result: $cf_cv_cgetent_const" >&5
21305 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21306         if test "$cf_cv_cgetent_const" = yes
21307         then
21308
21309 cat >>confdefs.h <<EOF
21310 #define CGETENT_CONST const
21311 EOF
21312
21313         fi
21314 fi
21315
21316 fi
21317
21318 echo "$as_me:21318: checking for isascii" >&5
21319 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21320 if test "${cf_cv_have_isascii+set}" = set; then
21321   echo $ECHO_N "(cached) $ECHO_C" >&6
21322 else
21323
21324         cat >"conftest.$ac_ext" <<_ACEOF
21325 #line 21325 "configure"
21326 #include "confdefs.h"
21327 #include <ctype.h>
21328 int
21329 main (void)
21330 {
21331 int x = isascii(' ')
21332   ;
21333   return 0;
21334 }
21335 _ACEOF
21336 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21337 if { (eval echo "$as_me:21337: \"$ac_link\"") >&5
21338   (eval $ac_link) 2>&5
21339   ac_status=$?
21340   echo "$as_me:21340: \$? = $ac_status" >&5
21341   (exit "$ac_status"); } &&
21342          { ac_try='test -s "conftest$ac_exeext"'
21343   { (eval echo "$as_me:21343: \"$ac_try\"") >&5
21344   (eval $ac_try) 2>&5
21345   ac_status=$?
21346   echo "$as_me:21346: \$? = $ac_status" >&5
21347   (exit "$ac_status"); }; }; then
21348   cf_cv_have_isascii=yes
21349 else
21350   echo "$as_me: failed program was:" >&5
21351 cat "conftest.$ac_ext" >&5
21352 cf_cv_have_isascii=no
21353 fi
21354 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21355
21356 fi
21357 echo "$as_me:21357: result: $cf_cv_have_isascii" >&5
21358 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21359 test "$cf_cv_have_isascii" = yes &&
21360 cat >>confdefs.h <<\EOF
21361 #define HAVE_ISASCII 1
21362 EOF
21363
21364 if test "$ac_cv_func_sigaction" = yes; then
21365 echo "$as_me:21365: checking whether sigaction needs _POSIX_SOURCE" >&5
21366 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21367 cat >"conftest.$ac_ext" <<_ACEOF
21368 #line 21368 "configure"
21369 #include "confdefs.h"
21370
21371 #include <sys/types.h>
21372 #include <signal.h>
21373 int
21374 main (void)
21375 {
21376 struct sigaction act
21377   ;
21378   return 0;
21379 }
21380 _ACEOF
21381 rm -f "conftest.$ac_objext"
21382 if { (eval echo "$as_me:21382: \"$ac_compile\"") >&5
21383   (eval $ac_compile) 2>&5
21384   ac_status=$?
21385   echo "$as_me:21385: \$? = $ac_status" >&5
21386   (exit "$ac_status"); } &&
21387          { ac_try='test -s "conftest.$ac_objext"'
21388   { (eval echo "$as_me:21388: \"$ac_try\"") >&5
21389   (eval $ac_try) 2>&5
21390   ac_status=$?
21391   echo "$as_me:21391: \$? = $ac_status" >&5
21392   (exit "$ac_status"); }; }; then
21393   sigact_bad=no
21394 else
21395   echo "$as_me: failed program was:" >&5
21396 cat "conftest.$ac_ext" >&5
21397
21398 cat >"conftest.$ac_ext" <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21401
21402 #define _POSIX_SOURCE
21403 #include <sys/types.h>
21404 #include <signal.h>
21405 int
21406 main (void)
21407 {
21408 struct sigaction act
21409   ;
21410   return 0;
21411 }
21412 _ACEOF
21413 rm -f "conftest.$ac_objext"
21414 if { (eval echo "$as_me:21414: \"$ac_compile\"") >&5
21415   (eval $ac_compile) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit "$ac_status"); } &&
21419          { ac_try='test -s "conftest.$ac_objext"'
21420   { (eval echo "$as_me:21420: \"$ac_try\"") >&5
21421   (eval $ac_try) 2>&5
21422   ac_status=$?
21423   echo "$as_me:21423: \$? = $ac_status" >&5
21424   (exit "$ac_status"); }; }; then
21425   sigact_bad=yes
21426
21427 cat >>confdefs.h <<\EOF
21428 #define _POSIX_SOURCE 1
21429 EOF
21430
21431 else
21432   echo "$as_me: failed program was:" >&5
21433 cat "conftest.$ac_ext" >&5
21434 sigact_bad=unknown
21435 fi
21436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21437 fi
21438 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21439 echo "$as_me:21439: result: $sigact_bad" >&5
21440 echo "${ECHO_T}$sigact_bad" >&6
21441 fi
21442
21443 echo "$as_me:21443: checking if nanosleep really works" >&5
21444 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21445 if test "${cf_cv_func_nanosleep+set}" = set; then
21446   echo $ECHO_N "(cached) $ECHO_C" >&6
21447 else
21448
21449 if test "$cross_compiling" = yes; then
21450   cf_cv_func_nanosleep=unknown
21451 else
21452   cat >"conftest.$ac_ext" <<_ACEOF
21453 #line 21453 "configure"
21454 #include "confdefs.h"
21455
21456 #include <stdio.h>
21457 #include <errno.h>
21458 #include <time.h>
21459
21460 #ifdef HAVE_SYS_TIME_H
21461 #include <sys/time.h>
21462 #endif
21463
21464 int main(void) {
21465         struct timespec ts1, ts2;
21466         int code;
21467         ts1.tv_sec  = 0;
21468         ts1.tv_nsec = 750000000;
21469         ts2.tv_sec  = 0;
21470         ts2.tv_nsec = 0;
21471         errno = 0;
21472         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21473         ${cf_cv_main_return:-return}(code != 0);
21474 }
21475
21476 _ACEOF
21477 rm -f "conftest$ac_exeext"
21478 if { (eval echo "$as_me:21478: \"$ac_link\"") >&5
21479   (eval $ac_link) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21483   { (eval echo "$as_me:21483: \"$ac_try\"") >&5
21484   (eval $ac_try) 2>&5
21485   ac_status=$?
21486   echo "$as_me:21486: \$? = $ac_status" >&5
21487   (exit "$ac_status"); }; }; then
21488   cf_cv_func_nanosleep=yes
21489 else
21490   echo "$as_me: program exited with status $ac_status" >&5
21491 echo "$as_me: failed program was:" >&5
21492 cat "conftest.$ac_ext" >&5
21493 cf_cv_func_nanosleep=no
21494 fi
21495 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21496 fi
21497 fi
21498 echo "$as_me:21498: result: $cf_cv_func_nanosleep" >&5
21499 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21500
21501 test "$cf_cv_func_nanosleep" = "yes" &&
21502 cat >>confdefs.h <<\EOF
21503 #define HAVE_NANOSLEEP 1
21504 EOF
21505
21506 for ac_header in \
21507 termio.h \
21508 termios.h \
21509 unistd.h \
21510 sys/ioctl.h \
21511 sys/termio.h \
21512
21513 do
21514 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21515 echo "$as_me:21515: checking for $ac_header" >&5
21516 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21517 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21518   echo $ECHO_N "(cached) $ECHO_C" >&6
21519 else
21520   cat >"conftest.$ac_ext" <<_ACEOF
21521 #line 21521 "configure"
21522 #include "confdefs.h"
21523 #include <$ac_header>
21524 _ACEOF
21525 if { (eval echo "$as_me:21525: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21526   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21527   ac_status=$?
21528   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21529   rm -f conftest.er1
21530   cat conftest.err >&5
21531   echo "$as_me:21531: \$? = $ac_status" >&5
21532   (exit "$ac_status"); } >/dev/null; then
21533   if test -s conftest.err; then
21534     ac_cpp_err=$ac_c_preproc_warn_flag
21535   else
21536     ac_cpp_err=
21537   fi
21538 else
21539   ac_cpp_err=yes
21540 fi
21541 if test -z "$ac_cpp_err"; then
21542   eval "$as_ac_Header=yes"
21543 else
21544   echo "$as_me: failed program was:" >&5
21545   cat "conftest.$ac_ext" >&5
21546   eval "$as_ac_Header=no"
21547 fi
21548 rm -f conftest.err "conftest.$ac_ext"
21549 fi
21550 echo "$as_me:21550: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21551 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21552 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21553   cat >>confdefs.h <<EOF
21554 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21555 EOF
21556
21557 fi
21558 done
21559
21560 if test "$ac_cv_header_termios_h" = yes ; then
21561         case "$CFLAGS $CPPFLAGS" in
21562         (*-D_POSIX_SOURCE*)
21563                 termios_bad=dunno ;;
21564         (*)     termios_bad=maybe ;;
21565         esac
21566         if test "$termios_bad" = maybe ; then
21567         echo "$as_me:21567: checking whether termios.h needs _POSIX_SOURCE" >&5
21568 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21569         cat >"conftest.$ac_ext" <<_ACEOF
21570 #line 21570 "configure"
21571 #include "confdefs.h"
21572 #include <termios.h>
21573 int
21574 main (void)
21575 {
21576 struct termios foo; int x = foo.c_iflag = 1; (void)x
21577   ;
21578   return 0;
21579 }
21580 _ACEOF
21581 rm -f "conftest.$ac_objext"
21582 if { (eval echo "$as_me:21582: \"$ac_compile\"") >&5
21583   (eval $ac_compile) 2>&5
21584   ac_status=$?
21585   echo "$as_me:21585: \$? = $ac_status" >&5
21586   (exit "$ac_status"); } &&
21587          { ac_try='test -s "conftest.$ac_objext"'
21588   { (eval echo "$as_me:21588: \"$ac_try\"") >&5
21589   (eval $ac_try) 2>&5
21590   ac_status=$?
21591   echo "$as_me:21591: \$? = $ac_status" >&5
21592   (exit "$ac_status"); }; }; then
21593   termios_bad=no
21594 else
21595   echo "$as_me: failed program was:" >&5
21596 cat "conftest.$ac_ext" >&5
21597
21598                 cat >"conftest.$ac_ext" <<_ACEOF
21599 #line 21599 "configure"
21600 #include "confdefs.h"
21601
21602 #define _POSIX_SOURCE
21603 #include <termios.h>
21604 int
21605 main (void)
21606 {
21607 struct termios foo; int x = foo.c_iflag = 2; (void)x
21608   ;
21609   return 0;
21610 }
21611 _ACEOF
21612 rm -f "conftest.$ac_objext"
21613 if { (eval echo "$as_me:21613: \"$ac_compile\"") >&5
21614   (eval $ac_compile) 2>&5
21615   ac_status=$?
21616   echo "$as_me:21616: \$? = $ac_status" >&5
21617   (exit "$ac_status"); } &&
21618          { ac_try='test -s "conftest.$ac_objext"'
21619   { (eval echo "$as_me:21619: \"$ac_try\"") >&5
21620   (eval $ac_try) 2>&5
21621   ac_status=$?
21622   echo "$as_me:21622: \$? = $ac_status" >&5
21623   (exit "$ac_status"); }; }; then
21624   termios_bad=unknown
21625 else
21626   echo "$as_me: failed program was:" >&5
21627 cat "conftest.$ac_ext" >&5
21628 termios_bad=yes
21629 cat >>confdefs.h <<\EOF
21630 #define _POSIX_SOURCE 1
21631 EOF
21632
21633 fi
21634 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21635
21636 fi
21637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21638         echo "$as_me:21638: result: $termios_bad" >&5
21639 echo "${ECHO_T}$termios_bad" >&6
21640         fi
21641 fi
21642
21643 echo "$as_me:21643: checking for tcgetattr" >&5
21644 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21645 if test "${cf_cv_have_tcgetattr+set}" = set; then
21646   echo $ECHO_N "(cached) $ECHO_C" >&6
21647 else
21648
21649 cat >"conftest.$ac_ext" <<_ACEOF
21650 #line 21650 "configure"
21651 #include "confdefs.h"
21652
21653 #include <sys/types.h>
21654 #ifdef HAVE_UNISTD_H
21655 #include <unistd.h>
21656 #endif
21657 #ifdef HAVE_TERMIOS_H
21658 #include <termios.h>
21659 #define TTY struct termios
21660 #else
21661 #ifdef HAVE_TERMIO_H
21662 #include <termio.h>
21663 #define TTY struct termio
21664 #endif
21665 #endif
21666
21667 int
21668 main (void)
21669 {
21670
21671 TTY foo;
21672 tcgetattr(1, &foo);
21673   ;
21674   return 0;
21675 }
21676 _ACEOF
21677 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21678 if { (eval echo "$as_me:21678: \"$ac_link\"") >&5
21679   (eval $ac_link) 2>&5
21680   ac_status=$?
21681   echo "$as_me:21681: \$? = $ac_status" >&5
21682   (exit "$ac_status"); } &&
21683          { ac_try='test -s "conftest$ac_exeext"'
21684   { (eval echo "$as_me:21684: \"$ac_try\"") >&5
21685   (eval $ac_try) 2>&5
21686   ac_status=$?
21687   echo "$as_me:21687: \$? = $ac_status" >&5
21688   (exit "$ac_status"); }; }; then
21689   cf_cv_have_tcgetattr=yes
21690 else
21691   echo "$as_me: failed program was:" >&5
21692 cat "conftest.$ac_ext" >&5
21693 cf_cv_have_tcgetattr=no
21694 fi
21695 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21696 fi
21697 echo "$as_me:21697: result: $cf_cv_have_tcgetattr" >&5
21698 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21699 test "$cf_cv_have_tcgetattr" = yes &&
21700 cat >>confdefs.h <<\EOF
21701 #define HAVE_TCGETATTR 1
21702 EOF
21703
21704 echo "$as_me:21704: checking for vsscanf function or workaround" >&5
21705 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21706 if test "${cf_cv_func_vsscanf+set}" = set; then
21707   echo $ECHO_N "(cached) $ECHO_C" >&6
21708 else
21709
21710 cat >"conftest.$ac_ext" <<_ACEOF
21711 #line 21711 "configure"
21712 #include "confdefs.h"
21713
21714 #include <stdarg.h>
21715 #include <stdio.h>
21716 int
21717 main (void)
21718 {
21719
21720         va_list ap;
21721         vsscanf("from", "%d", ap)
21722   ;
21723   return 0;
21724 }
21725 _ACEOF
21726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21727 if { (eval echo "$as_me:21727: \"$ac_link\"") >&5
21728   (eval $ac_link) 2>&5
21729   ac_status=$?
21730   echo "$as_me:21730: \$? = $ac_status" >&5
21731   (exit "$ac_status"); } &&
21732          { ac_try='test -s "conftest$ac_exeext"'
21733   { (eval echo "$as_me:21733: \"$ac_try\"") >&5
21734   (eval $ac_try) 2>&5
21735   ac_status=$?
21736   echo "$as_me:21736: \$? = $ac_status" >&5
21737   (exit "$ac_status"); }; }; then
21738   cf_cv_func_vsscanf=vsscanf
21739 else
21740   echo "$as_me: failed program was:" >&5
21741 cat "conftest.$ac_ext" >&5
21742
21743 cat >"conftest.$ac_ext" <<_ACEOF
21744 #line 21744 "configure"
21745 #include "confdefs.h"
21746
21747 #include <stdarg.h>
21748 #include <stdio.h>
21749 int
21750 main (void)
21751 {
21752
21753         FILE strbuf;
21754         char *str = "from";
21755
21756         strbuf._flag = _IOREAD;
21757         strbuf._ptr = strbuf._base = (unsigned char *) str;
21758         strbuf._cnt = strlen(str);
21759         strbuf._file = _NFILE;
21760         return (vfscanf(&strbuf, "%d", ap))
21761   ;
21762   return 0;
21763 }
21764 _ACEOF
21765 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21766 if { (eval echo "$as_me:21766: \"$ac_link\"") >&5
21767   (eval $ac_link) 2>&5
21768   ac_status=$?
21769   echo "$as_me:21769: \$? = $ac_status" >&5
21770   (exit "$ac_status"); } &&
21771          { ac_try='test -s "conftest$ac_exeext"'
21772   { (eval echo "$as_me:21772: \"$ac_try\"") >&5
21773   (eval $ac_try) 2>&5
21774   ac_status=$?
21775   echo "$as_me:21775: \$? = $ac_status" >&5
21776   (exit "$ac_status"); }; }; then
21777   cf_cv_func_vsscanf=vfscanf
21778 else
21779   echo "$as_me: failed program was:" >&5
21780 cat "conftest.$ac_ext" >&5
21781
21782 cat >"conftest.$ac_ext" <<_ACEOF
21783 #line 21783 "configure"
21784 #include "confdefs.h"
21785
21786 #include <stdarg.h>
21787 #include <stdio.h>
21788 int
21789 main (void)
21790 {
21791
21792         FILE strbuf;
21793         char *str = "from";
21794
21795         strbuf._flag = _IOREAD;
21796         strbuf._ptr = strbuf._base = (unsigned char *) str;
21797         strbuf._cnt = strlen(str);
21798         strbuf._file = _NFILE;
21799         return (_doscan(&strbuf, "%d", ap))
21800   ;
21801   return 0;
21802 }
21803 _ACEOF
21804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21805 if { (eval echo "$as_me:21805: \"$ac_link\"") >&5
21806   (eval $ac_link) 2>&5
21807   ac_status=$?
21808   echo "$as_me:21808: \$? = $ac_status" >&5
21809   (exit "$ac_status"); } &&
21810          { ac_try='test -s "conftest$ac_exeext"'
21811   { (eval echo "$as_me:21811: \"$ac_try\"") >&5
21812   (eval $ac_try) 2>&5
21813   ac_status=$?
21814   echo "$as_me:21814: \$? = $ac_status" >&5
21815   (exit "$ac_status"); }; }; then
21816   cf_cv_func_vsscanf=_doscan
21817 else
21818   echo "$as_me: failed program was:" >&5
21819 cat "conftest.$ac_ext" >&5
21820
21821 cf_cv_func_vsscanf=no
21822 fi
21823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21824 fi
21825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21826 fi
21827 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21828 fi
21829 echo "$as_me:21829: result: $cf_cv_func_vsscanf" >&5
21830 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21831
21832 case "$cf_cv_func_vsscanf" in
21833 (vsscanf)
21834 cat >>confdefs.h <<\EOF
21835 #define HAVE_VSSCANF 1
21836 EOF
21837 ;;
21838 (vfscanf)
21839 cat >>confdefs.h <<\EOF
21840 #define HAVE_VFSCANF 1
21841 EOF
21842 ;;
21843 (_doscan)
21844 cat >>confdefs.h <<\EOF
21845 #define HAVE__DOSCAN 1
21846 EOF
21847 ;;
21848 esac
21849
21850 for ac_header in \
21851 unistd.h \
21852
21853 do
21854 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21855 echo "$as_me:21855: checking for $ac_header" >&5
21856 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21857 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21858   echo $ECHO_N "(cached) $ECHO_C" >&6
21859 else
21860   cat >"conftest.$ac_ext" <<_ACEOF
21861 #line 21861 "configure"
21862 #include "confdefs.h"
21863 #include <$ac_header>
21864 _ACEOF
21865 if { (eval echo "$as_me:21865: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21866   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21867   ac_status=$?
21868   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21869   rm -f conftest.er1
21870   cat conftest.err >&5
21871   echo "$as_me:21871: \$? = $ac_status" >&5
21872   (exit "$ac_status"); } >/dev/null; then
21873   if test -s conftest.err; then
21874     ac_cpp_err=$ac_c_preproc_warn_flag
21875   else
21876     ac_cpp_err=
21877   fi
21878 else
21879   ac_cpp_err=yes
21880 fi
21881 if test -z "$ac_cpp_err"; then
21882   eval "$as_ac_Header=yes"
21883 else
21884   echo "$as_me: failed program was:" >&5
21885   cat "conftest.$ac_ext" >&5
21886   eval "$as_ac_Header=no"
21887 fi
21888 rm -f conftest.err "conftest.$ac_ext"
21889 fi
21890 echo "$as_me:21890: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21891 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21892 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21893   cat >>confdefs.h <<EOF
21894 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21895 EOF
21896
21897 fi
21898 done
21899
21900 echo "$as_me:21900: checking for working mkstemp" >&5
21901 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21902 if test "${cf_cv_func_mkstemp+set}" = set; then
21903   echo $ECHO_N "(cached) $ECHO_C" >&6
21904 else
21905
21906 rm -rf ./conftest*
21907 if test "$cross_compiling" = yes; then
21908   cf_cv_func_mkstemp=maybe
21909 else
21910   cat >"conftest.$ac_ext" <<_ACEOF
21911 #line 21911 "configure"
21912 #include "confdefs.h"
21913
21914 #include <sys/types.h>
21915 #ifdef HAVE_UNISTD_H
21916 #include <unistd.h>
21917 #endif
21918 #include <stdlib.h>
21919 #include <stdio.h>
21920 #include <string.h>
21921 #include <sys/stat.h>
21922 int main(void)
21923 {
21924         char *tmpl = "conftestXXXXXX";
21925         char name[2][80];
21926         int n;
21927         int result = 0;
21928         int fd;
21929         struct stat sb;
21930
21931         umask(077);
21932         for (n = 0; n < 2; ++n) {
21933                 strcpy(name[n], tmpl);
21934                 if ((fd = mkstemp(name[n])) >= 0) {
21935                         if (!strcmp(name[n], tmpl)
21936                          || stat(name[n], &sb) != 0
21937                          || (sb.st_mode & S_IFMT) != S_IFREG
21938                          || (sb.st_mode & 077) != 0) {
21939                                 result = 1;
21940                         }
21941                         close(fd);
21942                 }
21943         }
21944         if (result == 0
21945          && !strcmp(name[0], name[1]))
21946                 result = 1;
21947         ${cf_cv_main_return:-return}(result);
21948 }
21949
21950 _ACEOF
21951 rm -f "conftest$ac_exeext"
21952 if { (eval echo "$as_me:21952: \"$ac_link\"") >&5
21953   (eval $ac_link) 2>&5
21954   ac_status=$?
21955   echo "$as_me:21955: \$? = $ac_status" >&5
21956   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21957   { (eval echo "$as_me:21957: \"$ac_try\"") >&5
21958   (eval $ac_try) 2>&5
21959   ac_status=$?
21960   echo "$as_me:21960: \$? = $ac_status" >&5
21961   (exit "$ac_status"); }; }; then
21962   cf_cv_func_mkstemp=yes
21963
21964 else
21965   echo "$as_me: program exited with status $ac_status" >&5
21966 echo "$as_me: failed program was:" >&5
21967 cat "conftest.$ac_ext" >&5
21968 cf_cv_func_mkstemp=no
21969
21970 fi
21971 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21972 fi
21973
21974 fi
21975 echo "$as_me:21975: result: $cf_cv_func_mkstemp" >&5
21976 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21977 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21978         echo "$as_me:21978: checking for mkstemp" >&5
21979 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21980 if test "${ac_cv_func_mkstemp+set}" = set; then
21981   echo $ECHO_N "(cached) $ECHO_C" >&6
21982 else
21983   cat >"conftest.$ac_ext" <<_ACEOF
21984 #line 21984 "configure"
21985 #include "confdefs.h"
21986 #define mkstemp autoconf_temporary
21987 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21988 #undef mkstemp
21989
21990 #ifdef __cplusplus
21991 extern "C"
21992 #endif
21993
21994 /* We use char because int might match the return type of a gcc2
21995    builtin and then its argument prototype would still apply.  */
21996 char mkstemp (void);
21997
21998 int
21999 main (void)
22000 {
22001
22002 /* The GNU C library defines stubs for functions which it implements
22003     to always fail with ENOSYS.  Some functions are actually named
22004     something starting with __ and the normal name is an alias.  */
22005 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22006 #error found stub for mkstemp
22007 #endif
22008
22009         return mkstemp ();
22010   ;
22011   return 0;
22012 }
22013 _ACEOF
22014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22015 if { (eval echo "$as_me:22015: \"$ac_link\"") >&5
22016   (eval $ac_link) 2>&5
22017   ac_status=$?
22018   echo "$as_me:22018: \$? = $ac_status" >&5
22019   (exit "$ac_status"); } &&
22020          { ac_try='test -s "conftest$ac_exeext"'
22021   { (eval echo "$as_me:22021: \"$ac_try\"") >&5
22022   (eval $ac_try) 2>&5
22023   ac_status=$?
22024   echo "$as_me:22024: \$? = $ac_status" >&5
22025   (exit "$ac_status"); }; }; then
22026   ac_cv_func_mkstemp=yes
22027 else
22028   echo "$as_me: failed program was:" >&5
22029 cat "conftest.$ac_ext" >&5
22030 ac_cv_func_mkstemp=no
22031 fi
22032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22033 fi
22034 echo "$as_me:22034: result: $ac_cv_func_mkstemp" >&5
22035 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22036
22037 fi
22038 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22039
22040 cat >>confdefs.h <<\EOF
22041 #define HAVE_MKSTEMP 1
22042 EOF
22043
22044 fi
22045
22046 # setup for prototype of fallback for vsscanf()
22047
22048 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22049         HAVE_VSSCANF=1
22050 else
22051         HAVE_VSSCANF=0
22052 fi
22053
22054 if test "x$cross_compiling" = xyes ; then
22055         { echo "$as_me:22055: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22056 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22057 else
22058         echo "$as_me:22058: checking whether setvbuf arguments are reversed" >&5
22059 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22060 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22061   echo $ECHO_N "(cached) $ECHO_C" >&6
22062 else
22063   if test "$cross_compiling" = yes; then
22064   { { echo "$as_me:22064: error: cannot run test program while cross compiling" >&5
22065 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22066    { (exit 1); exit 1; }; }
22067 else
22068   cat >"conftest.$ac_ext" <<_ACEOF
22069 #line 22069 "configure"
22070 #include "confdefs.h"
22071 #include <stdio.h>
22072 /* If setvbuf has the reversed format, exit 0. */
22073 int
22074 main (void)
22075 {
22076   /* This call has the arguments reversed.
22077      A reversed system may check and see that the address of main
22078      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22079   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22080     $ac_main_return(1);
22081   putc('\r', stdout);
22082   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22083 }
22084 _ACEOF
22085 rm -f "conftest$ac_exeext"
22086 if { (eval echo "$as_me:22086: \"$ac_link\"") >&5
22087   (eval $ac_link) 2>&5
22088   ac_status=$?
22089   echo "$as_me:22089: \$? = $ac_status" >&5
22090   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22091   { (eval echo "$as_me:22091: \"$ac_try\"") >&5
22092   (eval $ac_try) 2>&5
22093   ac_status=$?
22094   echo "$as_me:22094: \$? = $ac_status" >&5
22095   (exit "$ac_status"); }; }; then
22096   ac_cv_func_setvbuf_reversed=yes
22097 else
22098   echo "$as_me: program exited with status $ac_status" >&5
22099 echo "$as_me: failed program was:" >&5
22100 cat "conftest.$ac_ext" >&5
22101 ac_cv_func_setvbuf_reversed=no
22102 fi
22103 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22104 fi
22105 rm -f core ./core.* ./*.core
22106 fi
22107 echo "$as_me:22107: result: $ac_cv_func_setvbuf_reversed" >&5
22108 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22109 if test $ac_cv_func_setvbuf_reversed = yes; then
22110
22111 cat >>confdefs.h <<\EOF
22112 #define SETVBUF_REVERSED 1
22113 EOF
22114
22115 fi
22116
22117 fi
22118 echo "$as_me:22118: checking for intptr_t" >&5
22119 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22120 if test "${ac_cv_type_intptr_t+set}" = set; then
22121   echo $ECHO_N "(cached) $ECHO_C" >&6
22122 else
22123   cat >"conftest.$ac_ext" <<_ACEOF
22124 #line 22124 "configure"
22125 #include "confdefs.h"
22126 $ac_includes_default
22127 int
22128 main (void)
22129 {
22130 if ((intptr_t *) 0)
22131   return 0;
22132 if (sizeof (intptr_t))
22133   return 0;
22134   ;
22135   return 0;
22136 }
22137 _ACEOF
22138 rm -f "conftest.$ac_objext"
22139 if { (eval echo "$as_me:22139: \"$ac_compile\"") >&5
22140   (eval $ac_compile) 2>&5
22141   ac_status=$?
22142   echo "$as_me:22142: \$? = $ac_status" >&5
22143   (exit "$ac_status"); } &&
22144          { ac_try='test -s "conftest.$ac_objext"'
22145   { (eval echo "$as_me:22145: \"$ac_try\"") >&5
22146   (eval $ac_try) 2>&5
22147   ac_status=$?
22148   echo "$as_me:22148: \$? = $ac_status" >&5
22149   (exit "$ac_status"); }; }; then
22150   ac_cv_type_intptr_t=yes
22151 else
22152   echo "$as_me: failed program was:" >&5
22153 cat "conftest.$ac_ext" >&5
22154 ac_cv_type_intptr_t=no
22155 fi
22156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22157 fi
22158 echo "$as_me:22158: result: $ac_cv_type_intptr_t" >&5
22159 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22160 if test "$ac_cv_type_intptr_t" = yes; then
22161   :
22162 else
22163
22164 cat >>confdefs.h <<EOF
22165 #define intptr_t long
22166 EOF
22167
22168 fi
22169
22170 echo "$as_me:22170: checking for ssize_t" >&5
22171 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22172 if test "${ac_cv_type_ssize_t+set}" = set; then
22173   echo $ECHO_N "(cached) $ECHO_C" >&6
22174 else
22175   cat >"conftest.$ac_ext" <<_ACEOF
22176 #line 22176 "configure"
22177 #include "confdefs.h"
22178 $ac_includes_default
22179 int
22180 main (void)
22181 {
22182 if ((ssize_t *) 0)
22183   return 0;
22184 if (sizeof (ssize_t))
22185   return 0;
22186   ;
22187   return 0;
22188 }
22189 _ACEOF
22190 rm -f "conftest.$ac_objext"
22191 if { (eval echo "$as_me:22191: \"$ac_compile\"") >&5
22192   (eval $ac_compile) 2>&5
22193   ac_status=$?
22194   echo "$as_me:22194: \$? = $ac_status" >&5
22195   (exit "$ac_status"); } &&
22196          { ac_try='test -s "conftest.$ac_objext"'
22197   { (eval echo "$as_me:22197: \"$ac_try\"") >&5
22198   (eval $ac_try) 2>&5
22199   ac_status=$?
22200   echo "$as_me:22200: \$? = $ac_status" >&5
22201   (exit "$ac_status"); }; }; then
22202   ac_cv_type_ssize_t=yes
22203 else
22204   echo "$as_me: failed program was:" >&5
22205 cat "conftest.$ac_ext" >&5
22206 ac_cv_type_ssize_t=no
22207 fi
22208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22209 fi
22210 echo "$as_me:22210: result: $ac_cv_type_ssize_t" >&5
22211 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22212 if test "$ac_cv_type_ssize_t" = yes; then
22213   :
22214 else
22215
22216 cat >>confdefs.h <<EOF
22217 #define ssize_t int
22218 EOF
22219
22220 fi
22221
22222 echo "$as_me:22222: checking for type sigaction_t" >&5
22223 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22224 if test "${cf_cv_type_sigaction+set}" = set; then
22225   echo $ECHO_N "(cached) $ECHO_C" >&6
22226 else
22227
22228         cat >"conftest.$ac_ext" <<_ACEOF
22229 #line 22229 "configure"
22230 #include "confdefs.h"
22231
22232 #include <signal.h>
22233 int
22234 main (void)
22235 {
22236 sigaction_t x
22237   ;
22238   return 0;
22239 }
22240 _ACEOF
22241 rm -f "conftest.$ac_objext"
22242 if { (eval echo "$as_me:22242: \"$ac_compile\"") >&5
22243   (eval $ac_compile) 2>&5
22244   ac_status=$?
22245   echo "$as_me:22245: \$? = $ac_status" >&5
22246   (exit "$ac_status"); } &&
22247          { ac_try='test -s "conftest.$ac_objext"'
22248   { (eval echo "$as_me:22248: \"$ac_try\"") >&5
22249   (eval $ac_try) 2>&5
22250   ac_status=$?
22251   echo "$as_me:22251: \$? = $ac_status" >&5
22252   (exit "$ac_status"); }; }; then
22253   cf_cv_type_sigaction=yes
22254 else
22255   echo "$as_me: failed program was:" >&5
22256 cat "conftest.$ac_ext" >&5
22257 cf_cv_type_sigaction=no
22258 fi
22259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22260 fi
22261
22262 echo "$as_me:22262: result: $cf_cv_type_sigaction" >&5
22263 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22264 test "$cf_cv_type_sigaction" = yes &&
22265 cat >>confdefs.h <<\EOF
22266 #define HAVE_TYPE_SIGACTION 1
22267 EOF
22268
22269 echo "$as_me:22269: checking declaration of size-change" >&5
22270 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22271 if test "${cf_cv_sizechange+set}" = set; then
22272   echo $ECHO_N "(cached) $ECHO_C" >&6
22273 else
22274
22275         cf_cv_sizechange=unknown
22276         cf_save_CPPFLAGS="$CPPFLAGS"
22277
22278 for cf_opts in "" "NEED_PTEM_H"
22279 do
22280
22281         CPPFLAGS="$cf_save_CPPFLAGS"
22282         if test -n "$cf_opts"
22283         then
22284
22285         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22286         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22287
22288         fi
22289         cat >"conftest.$ac_ext" <<_ACEOF
22290 #line 22290 "configure"
22291 #include "confdefs.h"
22292 #include <sys/types.h>
22293 #ifdef HAVE_TERMIOS_H
22294 #include <termios.h>
22295 #else
22296 #ifdef HAVE_TERMIO_H
22297 #include <termio.h>
22298 #endif
22299 #endif
22300
22301 #ifdef NEED_PTEM_H
22302 /* This is a workaround for SCO:  they neglected to define struct winsize in
22303  * termios.h -- it's only in termio.h and ptem.h
22304  */
22305 #include <sys/stream.h>
22306 #include <sys/ptem.h>
22307 #endif
22308
22309 #ifdef HAVE_SYS_IOCTL_H
22310 #include <sys/ioctl.h>
22311 #endif
22312
22313 int
22314 main (void)
22315 {
22316
22317 #ifdef TIOCGSIZE
22318         struct ttysize win;     /* SunOS 3.0... */
22319         int y = win.ts_lines = 2;
22320         int x = win.ts_cols = 1;
22321         (void)y;
22322         (void)x;
22323 #else
22324 #ifdef TIOCGWINSZ
22325         struct winsize win;     /* everything else */
22326         int y = win.ws_row = 2;
22327         int x = win.ws_col = 1;
22328         (void)y;
22329         (void)x;
22330 #else
22331         no TIOCGSIZE or TIOCGWINSZ
22332 #endif /* TIOCGWINSZ */
22333 #endif /* TIOCGSIZE */
22334
22335   ;
22336   return 0;
22337 }
22338 _ACEOF
22339 rm -f "conftest.$ac_objext"
22340 if { (eval echo "$as_me:22340: \"$ac_compile\"") >&5
22341   (eval $ac_compile) 2>&5
22342   ac_status=$?
22343   echo "$as_me:22343: \$? = $ac_status" >&5
22344   (exit "$ac_status"); } &&
22345          { ac_try='test -s "conftest.$ac_objext"'
22346   { (eval echo "$as_me:22346: \"$ac_try\"") >&5
22347   (eval $ac_try) 2>&5
22348   ac_status=$?
22349   echo "$as_me:22349: \$? = $ac_status" >&5
22350   (exit "$ac_status"); }; }; then
22351   cf_cv_sizechange=yes
22352 else
22353   echo "$as_me: failed program was:" >&5
22354 cat "conftest.$ac_ext" >&5
22355 cf_cv_sizechange=no
22356 fi
22357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22358
22359         CPPFLAGS="$cf_save_CPPFLAGS"
22360         if test "$cf_cv_sizechange" = yes ; then
22361                 echo "size-change succeeded ($cf_opts)" >&5
22362                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22363                 break
22364         fi
22365 done
22366
22367 fi
22368 echo "$as_me:22368: result: $cf_cv_sizechange" >&5
22369 echo "${ECHO_T}$cf_cv_sizechange" >&6
22370 if test "$cf_cv_sizechange" != no ; then
22371
22372 cat >>confdefs.h <<\EOF
22373 #define HAVE_SIZECHANGE 1
22374 EOF
22375
22376         case "$cf_cv_sizechange" in
22377         (NEED*)
22378                 cat >>confdefs.h <<EOF
22379 #define $cf_cv_sizechange  1
22380 EOF
22381
22382                 ;;
22383         esac
22384 fi
22385
22386 echo "$as_me:22386: checking for memmove" >&5
22387 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22388 if test "${ac_cv_func_memmove+set}" = set; then
22389   echo $ECHO_N "(cached) $ECHO_C" >&6
22390 else
22391   cat >"conftest.$ac_ext" <<_ACEOF
22392 #line 22392 "configure"
22393 #include "confdefs.h"
22394 #define memmove autoconf_temporary
22395 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22396 #undef memmove
22397
22398 #ifdef __cplusplus
22399 extern "C"
22400 #endif
22401
22402 /* We use char because int might match the return type of a gcc2
22403    builtin and then its argument prototype would still apply.  */
22404 char memmove (void);
22405
22406 int
22407 main (void)
22408 {
22409
22410 /* The GNU C library defines stubs for functions which it implements
22411     to always fail with ENOSYS.  Some functions are actually named
22412     something starting with __ and the normal name is an alias.  */
22413 #if defined (__stub_memmove) || defined (__stub___memmove)
22414 #error found stub for memmove
22415 #endif
22416
22417         return memmove ();
22418   ;
22419   return 0;
22420 }
22421 _ACEOF
22422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22423 if { (eval echo "$as_me:22423: \"$ac_link\"") >&5
22424   (eval $ac_link) 2>&5
22425   ac_status=$?
22426   echo "$as_me:22426: \$? = $ac_status" >&5
22427   (exit "$ac_status"); } &&
22428          { ac_try='test -s "conftest$ac_exeext"'
22429   { (eval echo "$as_me:22429: \"$ac_try\"") >&5
22430   (eval $ac_try) 2>&5
22431   ac_status=$?
22432   echo "$as_me:22432: \$? = $ac_status" >&5
22433   (exit "$ac_status"); }; }; then
22434   ac_cv_func_memmove=yes
22435 else
22436   echo "$as_me: failed program was:" >&5
22437 cat "conftest.$ac_ext" >&5
22438 ac_cv_func_memmove=no
22439 fi
22440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22441 fi
22442 echo "$as_me:22442: result: $ac_cv_func_memmove" >&5
22443 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22444 if test "$ac_cv_func_memmove" = yes; then
22445   :
22446 else
22447
22448 echo "$as_me:22448: checking for bcopy" >&5
22449 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22450 if test "${ac_cv_func_bcopy+set}" = set; then
22451   echo $ECHO_N "(cached) $ECHO_C" >&6
22452 else
22453   cat >"conftest.$ac_ext" <<_ACEOF
22454 #line 22454 "configure"
22455 #include "confdefs.h"
22456 #define bcopy autoconf_temporary
22457 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22458 #undef bcopy
22459
22460 #ifdef __cplusplus
22461 extern "C"
22462 #endif
22463
22464 /* We use char because int might match the return type of a gcc2
22465    builtin and then its argument prototype would still apply.  */
22466 char bcopy (void);
22467
22468 int
22469 main (void)
22470 {
22471
22472 /* The GNU C library defines stubs for functions which it implements
22473     to always fail with ENOSYS.  Some functions are actually named
22474     something starting with __ and the normal name is an alias.  */
22475 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22476 #error found stub for bcopy
22477 #endif
22478
22479         return bcopy ();
22480   ;
22481   return 0;
22482 }
22483 _ACEOF
22484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22485 if { (eval echo "$as_me:22485: \"$ac_link\"") >&5
22486   (eval $ac_link) 2>&5
22487   ac_status=$?
22488   echo "$as_me:22488: \$? = $ac_status" >&5
22489   (exit "$ac_status"); } &&
22490          { ac_try='test -s "conftest$ac_exeext"'
22491   { (eval echo "$as_me:22491: \"$ac_try\"") >&5
22492   (eval $ac_try) 2>&5
22493   ac_status=$?
22494   echo "$as_me:22494: \$? = $ac_status" >&5
22495   (exit "$ac_status"); }; }; then
22496   ac_cv_func_bcopy=yes
22497 else
22498   echo "$as_me: failed program was:" >&5
22499 cat "conftest.$ac_ext" >&5
22500 ac_cv_func_bcopy=no
22501 fi
22502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22503 fi
22504 echo "$as_me:22504: result: $ac_cv_func_bcopy" >&5
22505 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22506 if test "$ac_cv_func_bcopy" = yes; then
22507
22508         echo "$as_me:22508: checking if bcopy does overlapping moves" >&5
22509 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22510 if test "${cf_cv_good_bcopy+set}" = set; then
22511   echo $ECHO_N "(cached) $ECHO_C" >&6
22512 else
22513
22514                 if test "$cross_compiling" = yes; then
22515   cf_cv_good_bcopy=unknown
22516 else
22517   cat >"conftest.$ac_ext" <<_ACEOF
22518 #line 22518 "configure"
22519 #include "confdefs.h"
22520
22521 int main(void) {
22522         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22523         char temp[40];
22524         bcopy(data, temp, sizeof(data));
22525         bcopy(temp+10, temp, 15);
22526         bcopy(temp+5, temp+15, 10);
22527         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22528 }
22529
22530 _ACEOF
22531 rm -f "conftest$ac_exeext"
22532 if { (eval echo "$as_me:22532: \"$ac_link\"") >&5
22533   (eval $ac_link) 2>&5
22534   ac_status=$?
22535   echo "$as_me:22535: \$? = $ac_status" >&5
22536   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22537   { (eval echo "$as_me:22537: \"$ac_try\"") >&5
22538   (eval $ac_try) 2>&5
22539   ac_status=$?
22540   echo "$as_me:22540: \$? = $ac_status" >&5
22541   (exit "$ac_status"); }; }; then
22542   cf_cv_good_bcopy=yes
22543 else
22544   echo "$as_me: program exited with status $ac_status" >&5
22545 echo "$as_me: failed program was:" >&5
22546 cat "conftest.$ac_ext" >&5
22547 cf_cv_good_bcopy=no
22548 fi
22549 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22550 fi
22551
22552 fi
22553 echo "$as_me:22553: result: $cf_cv_good_bcopy" >&5
22554 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22555
22556 else
22557   cf_cv_good_bcopy=no
22558 fi
22559
22560         if test "$cf_cv_good_bcopy" = yes ; then
22561
22562 cat >>confdefs.h <<\EOF
22563 #define USE_OK_BCOPY 1
22564 EOF
22565
22566         else
22567
22568 cat >>confdefs.h <<\EOF
22569 #define USE_MY_MEMMOVE 1
22570 EOF
22571
22572         fi
22573
22574 fi
22575
22576 tty >/dev/null 2>&1 || {
22577 for ac_func in posix_openpt
22578 do
22579 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22580 echo "$as_me:22580: checking for $ac_func" >&5
22581 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22582 if eval "test \"\${$as_ac_var+set}\" = set"; then
22583   echo $ECHO_N "(cached) $ECHO_C" >&6
22584 else
22585   cat >"conftest.$ac_ext" <<_ACEOF
22586 #line 22586 "configure"
22587 #include "confdefs.h"
22588 #define $ac_func autoconf_temporary
22589 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22590 #undef $ac_func
22591
22592 #ifdef __cplusplus
22593 extern "C"
22594 #endif
22595
22596 /* We use char because int might match the return type of a gcc2
22597    builtin and then its argument prototype would still apply.  */
22598 char $ac_func (void);
22599
22600 int
22601 main (void)
22602 {
22603
22604 /* The GNU C library defines stubs for functions which it implements
22605     to always fail with ENOSYS.  Some functions are actually named
22606     something starting with __ and the normal name is an alias.  */
22607 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22608 #error found stub for $ac_func
22609 #endif
22610
22611         return $ac_func ();
22612   ;
22613   return 0;
22614 }
22615 _ACEOF
22616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22617 if { (eval echo "$as_me:22617: \"$ac_link\"") >&5
22618   (eval $ac_link) 2>&5
22619   ac_status=$?
22620   echo "$as_me:22620: \$? = $ac_status" >&5
22621   (exit "$ac_status"); } &&
22622          { ac_try='test -s "conftest$ac_exeext"'
22623   { (eval echo "$as_me:22623: \"$ac_try\"") >&5
22624   (eval $ac_try) 2>&5
22625   ac_status=$?
22626   echo "$as_me:22626: \$? = $ac_status" >&5
22627   (exit "$ac_status"); }; }; then
22628   eval "$as_ac_var=yes"
22629 else
22630   echo "$as_me: failed program was:" >&5
22631 cat "conftest.$ac_ext" >&5
22632 eval "$as_ac_var=no"
22633 fi
22634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22635 fi
22636 echo "$as_me:22636: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22637 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22638 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22639   cat >>confdefs.h <<EOF
22640 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22641 EOF
22642
22643 fi
22644 done
22645  }
22646 echo "$as_me:22646: checking if poll really works" >&5
22647 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22648 if test "${cf_cv_working_poll+set}" = set; then
22649   echo $ECHO_N "(cached) $ECHO_C" >&6
22650 else
22651
22652 if test "$cross_compiling" = yes; then
22653   cf_cv_working_poll=unknown
22654 else
22655   cat >"conftest.$ac_ext" <<_ACEOF
22656 #line 22656 "configure"
22657 #include "confdefs.h"
22658
22659 #include <stdlib.h>
22660 #include <stdio.h>
22661 #include <unistd.h>
22662 #include <fcntl.h>
22663 #ifdef HAVE_POLL_H
22664 #include <poll.h>
22665 #else
22666 #include <sys/poll.h>
22667 #endif
22668 int main(void) {
22669         struct pollfd myfds;
22670         int ret;
22671
22672         /* check for Darwin bug with respect to "devices" */
22673         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22674         if (myfds.fd < 0)
22675                 myfds.fd = 0;
22676         myfds.events = POLLIN;
22677         myfds.revents = 0;
22678
22679         ret = poll(&myfds, 1, 100);
22680
22681         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22682                 ret = -1;
22683         } else {
22684                 int fd = 0;
22685                 if (!isatty(fd)) {
22686                         fd = open("/dev/tty", 2);       /* O_RDWR */
22687                 }
22688 #ifdef HAVE_POSIX_OPENPT
22689                 if (fd < 0) {
22690                         fd = posix_openpt(O_RDWR);
22691                 }
22692 #endif
22693
22694                 if (fd >= 0) {
22695                         /* also check with standard input */
22696                         myfds.fd = fd;
22697                         myfds.events = POLLIN;
22698                         myfds.revents = 0;
22699                         ret = poll(&myfds, 1, 100);
22700                 } else {
22701                         ret = -1;
22702                 }
22703         }
22704         ${cf_cv_main_return:-return}(ret < 0);
22705 }
22706 _ACEOF
22707 rm -f "conftest$ac_exeext"
22708 if { (eval echo "$as_me:22708: \"$ac_link\"") >&5
22709   (eval $ac_link) 2>&5
22710   ac_status=$?
22711   echo "$as_me:22711: \$? = $ac_status" >&5
22712   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22713   { (eval echo "$as_me:22713: \"$ac_try\"") >&5
22714   (eval $ac_try) 2>&5
22715   ac_status=$?
22716   echo "$as_me:22716: \$? = $ac_status" >&5
22717   (exit "$ac_status"); }; }; then
22718   cf_cv_working_poll=yes
22719 else
22720   echo "$as_me: program exited with status $ac_status" >&5
22721 echo "$as_me: failed program was:" >&5
22722 cat "conftest.$ac_ext" >&5
22723 cf_cv_working_poll=no
22724 fi
22725 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22726 fi
22727 fi
22728 echo "$as_me:22728: result: $cf_cv_working_poll" >&5
22729 echo "${ECHO_T}$cf_cv_working_poll" >&6
22730 test "$cf_cv_working_poll" = "yes" &&
22731 cat >>confdefs.h <<\EOF
22732 #define HAVE_WORKING_POLL 1
22733 EOF
22734
22735 echo "$as_me:22735: checking for va_copy" >&5
22736 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22737 if test "${cf_cv_have_va_copy+set}" = set; then
22738   echo $ECHO_N "(cached) $ECHO_C" >&6
22739 else
22740
22741 cat >"conftest.$ac_ext" <<_ACEOF
22742 #line 22742 "configure"
22743 #include "confdefs.h"
22744
22745 #include <stdarg.h>
22746
22747 int
22748 main (void)
22749 {
22750
22751         static va_list dst;
22752         static va_list src;
22753         va_copy(dst, src)
22754   ;
22755   return 0;
22756 }
22757 _ACEOF
22758 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22759 if { (eval echo "$as_me:22759: \"$ac_link\"") >&5
22760   (eval $ac_link) 2>&5
22761   ac_status=$?
22762   echo "$as_me:22762: \$? = $ac_status" >&5
22763   (exit "$ac_status"); } &&
22764          { ac_try='test -s "conftest$ac_exeext"'
22765   { (eval echo "$as_me:22765: \"$ac_try\"") >&5
22766   (eval $ac_try) 2>&5
22767   ac_status=$?
22768   echo "$as_me:22768: \$? = $ac_status" >&5
22769   (exit "$ac_status"); }; }; then
22770   cf_cv_have_va_copy=yes
22771 else
22772   echo "$as_me: failed program was:" >&5
22773 cat "conftest.$ac_ext" >&5
22774 cf_cv_have_va_copy=no
22775 fi
22776 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22777 fi
22778 echo "$as_me:22778: result: $cf_cv_have_va_copy" >&5
22779 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22780
22781 if test "$cf_cv_have_va_copy" = yes;
22782 then
22783
22784 cat >>confdefs.h <<\EOF
22785 #define HAVE_VA_COPY 1
22786 EOF
22787
22788 else # !cf_cv_have_va_copy
22789
22790 echo "$as_me:22790: checking for __va_copy" >&5
22791 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22792 if test "${cf_cv_have___va_copy+set}" = set; then
22793   echo $ECHO_N "(cached) $ECHO_C" >&6
22794 else
22795
22796 cat >"conftest.$ac_ext" <<_ACEOF
22797 #line 22797 "configure"
22798 #include "confdefs.h"
22799
22800 #include <stdarg.h>
22801
22802 int
22803 main (void)
22804 {
22805
22806         static va_list dst;
22807         static va_list src;
22808         __va_copy(dst, src)
22809   ;
22810   return 0;
22811 }
22812 _ACEOF
22813 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22814 if { (eval echo "$as_me:22814: \"$ac_link\"") >&5
22815   (eval $ac_link) 2>&5
22816   ac_status=$?
22817   echo "$as_me:22817: \$? = $ac_status" >&5
22818   (exit "$ac_status"); } &&
22819          { ac_try='test -s "conftest$ac_exeext"'
22820   { (eval echo "$as_me:22820: \"$ac_try\"") >&5
22821   (eval $ac_try) 2>&5
22822   ac_status=$?
22823   echo "$as_me:22823: \$? = $ac_status" >&5
22824   (exit "$ac_status"); }; }; then
22825   cf_cv_have___va_copy=yes
22826 else
22827   echo "$as_me: failed program was:" >&5
22828 cat "conftest.$ac_ext" >&5
22829 cf_cv_have___va_copy=no
22830 fi
22831 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22832 fi
22833 echo "$as_me:22833: result: $cf_cv_have___va_copy" >&5
22834 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22835
22836 if test "$cf_cv_have___va_copy" = yes
22837 then
22838
22839 cat >>confdefs.h <<\EOF
22840 #define HAVE___VA_COPY 1
22841 EOF
22842
22843 else # !cf_cv_have___va_copy
22844
22845 echo "$as_me:22845: checking for __builtin_va_copy" >&5
22846 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22847 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22848   echo $ECHO_N "(cached) $ECHO_C" >&6
22849 else
22850
22851 cat >"conftest.$ac_ext" <<_ACEOF
22852 #line 22852 "configure"
22853 #include "confdefs.h"
22854
22855 #include <stdarg.h>
22856
22857 int
22858 main (void)
22859 {
22860
22861         static va_list dst;
22862         static va_list src;
22863         __builtin_va_copy(dst, src)
22864   ;
22865   return 0;
22866 }
22867 _ACEOF
22868 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22869 if { (eval echo "$as_me:22869: \"$ac_link\"") >&5
22870   (eval $ac_link) 2>&5
22871   ac_status=$?
22872   echo "$as_me:22872: \$? = $ac_status" >&5
22873   (exit "$ac_status"); } &&
22874          { ac_try='test -s "conftest$ac_exeext"'
22875   { (eval echo "$as_me:22875: \"$ac_try\"") >&5
22876   (eval $ac_try) 2>&5
22877   ac_status=$?
22878   echo "$as_me:22878: \$? = $ac_status" >&5
22879   (exit "$ac_status"); }; }; then
22880   cf_cv_have___builtin_va_copy=yes
22881 else
22882   echo "$as_me: failed program was:" >&5
22883 cat "conftest.$ac_ext" >&5
22884 cf_cv_have___builtin_va_copy=no
22885 fi
22886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22887 fi
22888 echo "$as_me:22888: result: $cf_cv_have___builtin_va_copy" >&5
22889 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22890
22891 test "$cf_cv_have___builtin_va_copy" = yes &&
22892
22893 cat >>confdefs.h <<\EOF
22894 #define HAVE___BUILTIN_VA_COPY 1
22895 EOF
22896
22897 fi # cf_cv_have___va_copy
22898
22899 fi # cf_cv_have_va_copy
22900
22901 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22902 (*yes*)
22903         ;;
22904
22905 (*)
22906         echo "$as_me:22906: checking if we can simply copy va_list" >&5
22907 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22908 if test "${cf_cv_pointer_va_list+set}" = set; then
22909   echo $ECHO_N "(cached) $ECHO_C" >&6
22910 else
22911
22912 cat >"conftest.$ac_ext" <<_ACEOF
22913 #line 22913 "configure"
22914 #include "confdefs.h"
22915
22916 #include <stdarg.h>
22917
22918 int
22919 main (void)
22920 {
22921
22922         va_list dst;
22923         va_list src;
22924         dst = src
22925   ;
22926   return 0;
22927 }
22928 _ACEOF
22929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22930 if { (eval echo "$as_me:22930: \"$ac_link\"") >&5
22931   (eval $ac_link) 2>&5
22932   ac_status=$?
22933   echo "$as_me:22933: \$? = $ac_status" >&5
22934   (exit "$ac_status"); } &&
22935          { ac_try='test -s "conftest$ac_exeext"'
22936   { (eval echo "$as_me:22936: \"$ac_try\"") >&5
22937   (eval $ac_try) 2>&5
22938   ac_status=$?
22939   echo "$as_me:22939: \$? = $ac_status" >&5
22940   (exit "$ac_status"); }; }; then
22941   cf_cv_pointer_va_list=yes
22942 else
22943   echo "$as_me: failed program was:" >&5
22944 cat "conftest.$ac_ext" >&5
22945 cf_cv_pointer_va_list=no
22946 fi
22947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22948 fi
22949 echo "$as_me:22949: result: $cf_cv_pointer_va_list" >&5
22950 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22951
22952         if test "$cf_cv_pointer_va_list" = no
22953         then
22954                 echo "$as_me:22954: checking if we can copy va_list indirectly" >&5
22955 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22956 if test "${cf_cv_array_va_list+set}" = set; then
22957   echo $ECHO_N "(cached) $ECHO_C" >&6
22958 else
22959
22960 cat >"conftest.$ac_ext" <<_ACEOF
22961 #line 22961 "configure"
22962 #include "confdefs.h"
22963
22964 #include <stdarg.h>
22965
22966 int
22967 main (void)
22968 {
22969
22970         va_list dst;
22971         va_list src;
22972         *dst = *src
22973   ;
22974   return 0;
22975 }
22976 _ACEOF
22977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22978 if { (eval echo "$as_me:22978: \"$ac_link\"") >&5
22979   (eval $ac_link) 2>&5
22980   ac_status=$?
22981   echo "$as_me:22981: \$? = $ac_status" >&5
22982   (exit "$ac_status"); } &&
22983          { ac_try='test -s "conftest$ac_exeext"'
22984   { (eval echo "$as_me:22984: \"$ac_try\"") >&5
22985   (eval $ac_try) 2>&5
22986   ac_status=$?
22987   echo "$as_me:22987: \$? = $ac_status" >&5
22988   (exit "$ac_status"); }; }; then
22989   cf_cv_array_va_list=yes
22990 else
22991   echo "$as_me: failed program was:" >&5
22992 cat "conftest.$ac_ext" >&5
22993 cf_cv_array_va_list=no
22994 fi
22995 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22996 fi
22997 echo "$as_me:22997: result: $cf_cv_array_va_list" >&5
22998 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22999                 test "$cf_cv_array_va_list" = yes &&
23000 cat >>confdefs.h <<\EOF
23001 #define ARRAY_VA_LIST 1
23002 EOF
23003
23004         fi
23005         ;;
23006 esac
23007
23008 echo "$as_me:23008: checking for pid_t" >&5
23009 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23010 if test "${ac_cv_type_pid_t+set}" = set; then
23011   echo $ECHO_N "(cached) $ECHO_C" >&6
23012 else
23013   cat >"conftest.$ac_ext" <<_ACEOF
23014 #line 23014 "configure"
23015 #include "confdefs.h"
23016 $ac_includes_default
23017 int
23018 main (void)
23019 {
23020 if ((pid_t *) 0)
23021   return 0;
23022 if (sizeof (pid_t))
23023   return 0;
23024   ;
23025   return 0;
23026 }
23027 _ACEOF
23028 rm -f "conftest.$ac_objext"
23029 if { (eval echo "$as_me:23029: \"$ac_compile\"") >&5
23030   (eval $ac_compile) 2>&5
23031   ac_status=$?
23032   echo "$as_me:23032: \$? = $ac_status" >&5
23033   (exit "$ac_status"); } &&
23034          { ac_try='test -s "conftest.$ac_objext"'
23035   { (eval echo "$as_me:23035: \"$ac_try\"") >&5
23036   (eval $ac_try) 2>&5
23037   ac_status=$?
23038   echo "$as_me:23038: \$? = $ac_status" >&5
23039   (exit "$ac_status"); }; }; then
23040   ac_cv_type_pid_t=yes
23041 else
23042   echo "$as_me: failed program was:" >&5
23043 cat "conftest.$ac_ext" >&5
23044 ac_cv_type_pid_t=no
23045 fi
23046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23047 fi
23048 echo "$as_me:23048: result: $ac_cv_type_pid_t" >&5
23049 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23050 if test "$ac_cv_type_pid_t" = yes; then
23051   :
23052 else
23053
23054 cat >>confdefs.h <<EOF
23055 #define pid_t int
23056 EOF
23057
23058 fi
23059
23060 for ac_header in unistd.h vfork.h
23061 do
23062 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23063 echo "$as_me:23063: checking for $ac_header" >&5
23064 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23065 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23066   echo $ECHO_N "(cached) $ECHO_C" >&6
23067 else
23068   cat >"conftest.$ac_ext" <<_ACEOF
23069 #line 23069 "configure"
23070 #include "confdefs.h"
23071 #include <$ac_header>
23072 _ACEOF
23073 if { (eval echo "$as_me:23073: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23074   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23075   ac_status=$?
23076   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23077   rm -f conftest.er1
23078   cat conftest.err >&5
23079   echo "$as_me:23079: \$? = $ac_status" >&5
23080   (exit "$ac_status"); } >/dev/null; then
23081   if test -s conftest.err; then
23082     ac_cpp_err=$ac_c_preproc_warn_flag
23083   else
23084     ac_cpp_err=
23085   fi
23086 else
23087   ac_cpp_err=yes
23088 fi
23089 if test -z "$ac_cpp_err"; then
23090   eval "$as_ac_Header=yes"
23091 else
23092   echo "$as_me: failed program was:" >&5
23093   cat "conftest.$ac_ext" >&5
23094   eval "$as_ac_Header=no"
23095 fi
23096 rm -f conftest.err "conftest.$ac_ext"
23097 fi
23098 echo "$as_me:23098: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23099 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23100 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23101   cat >>confdefs.h <<EOF
23102 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23103 EOF
23104
23105 fi
23106 done
23107
23108 for ac_func in fork vfork
23109 do
23110 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23111 echo "$as_me:23111: checking for $ac_func" >&5
23112 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23113 if eval "test \"\${$as_ac_var+set}\" = set"; then
23114   echo $ECHO_N "(cached) $ECHO_C" >&6
23115 else
23116   cat >"conftest.$ac_ext" <<_ACEOF
23117 #line 23117 "configure"
23118 #include "confdefs.h"
23119 #define $ac_func autoconf_temporary
23120 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23121 #undef $ac_func
23122
23123 #ifdef __cplusplus
23124 extern "C"
23125 #endif
23126
23127 /* We use char because int might match the return type of a gcc2
23128    builtin and then its argument prototype would still apply.  */
23129 char $ac_func (void);
23130
23131 int
23132 main (void)
23133 {
23134
23135 /* The GNU C library defines stubs for functions which it implements
23136     to always fail with ENOSYS.  Some functions are actually named
23137     something starting with __ and the normal name is an alias.  */
23138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23139 #error found stub for $ac_func
23140 #endif
23141
23142         return $ac_func ();
23143   ;
23144   return 0;
23145 }
23146 _ACEOF
23147 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23148 if { (eval echo "$as_me:23148: \"$ac_link\"") >&5
23149   (eval $ac_link) 2>&5
23150   ac_status=$?
23151   echo "$as_me:23151: \$? = $ac_status" >&5
23152   (exit "$ac_status"); } &&
23153          { ac_try='test -s "conftest$ac_exeext"'
23154   { (eval echo "$as_me:23154: \"$ac_try\"") >&5
23155   (eval $ac_try) 2>&5
23156   ac_status=$?
23157   echo "$as_me:23157: \$? = $ac_status" >&5
23158   (exit "$ac_status"); }; }; then
23159   eval "$as_ac_var=yes"
23160 else
23161   echo "$as_me: failed program was:" >&5
23162 cat "conftest.$ac_ext" >&5
23163 eval "$as_ac_var=no"
23164 fi
23165 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23166 fi
23167 echo "$as_me:23167: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23168 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23169 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23170   cat >>confdefs.h <<EOF
23171 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23172 EOF
23173
23174 fi
23175 done
23176
23177 ac_cv_func_fork_works=$ac_cv_func_fork
23178 if test "x$ac_cv_func_fork" = xyes; then
23179   echo "$as_me:23179: checking for working fork" >&5
23180 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23181 if test "${ac_cv_func_fork_works+set}" = set; then
23182   echo $ECHO_N "(cached) $ECHO_C" >&6
23183 else
23184   if test "$cross_compiling" = yes; then
23185   ac_cv_func_fork_works=cross
23186 else
23187   cat >"conftest.$ac_ext" <<_ACEOF
23188 /* By Rüdiger Kuhlmann. */
23189       #include <sys/types.h>
23190       #if HAVE_UNISTD_H
23191       # include <unistd.h>
23192       #endif
23193       /* Some systems only have a dummy stub for fork() */
23194       int main (void)
23195       {
23196         if (fork() < 0)
23197           $ac_main_return (1);
23198         $ac_main_return (0);
23199       }
23200 _ACEOF
23201 rm -f "conftest$ac_exeext"
23202 if { (eval echo "$as_me:23202: \"$ac_link\"") >&5
23203   (eval $ac_link) 2>&5
23204   ac_status=$?
23205   echo "$as_me:23205: \$? = $ac_status" >&5
23206   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23207   { (eval echo "$as_me:23207: \"$ac_try\"") >&5
23208   (eval $ac_try) 2>&5
23209   ac_status=$?
23210   echo "$as_me:23210: \$? = $ac_status" >&5
23211   (exit "$ac_status"); }; }; then
23212   ac_cv_func_fork_works=yes
23213 else
23214   echo "$as_me: program exited with status $ac_status" >&5
23215 echo "$as_me: failed program was:" >&5
23216 cat "conftest.$ac_ext" >&5
23217 ac_cv_func_fork_works=no
23218 fi
23219 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23220 fi
23221 fi
23222 echo "$as_me:23222: result: $ac_cv_func_fork_works" >&5
23223 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23224
23225 fi
23226 if test "x$ac_cv_func_fork_works" = xcross; then
23227   case $host in
23228     *-*-amigaos* | *-*-msdosdjgpp*)
23229       # Override, as these systems have only a dummy fork() stub
23230       ac_cv_func_fork_works=no
23231       ;;
23232     *)
23233       ac_cv_func_fork_works=yes
23234       ;;
23235   esac
23236   { echo "$as_me:23236: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23237 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23238 fi
23239 ac_cv_func_vfork_works=$ac_cv_func_vfork
23240 if test "x$ac_cv_func_vfork" = xyes; then
23241   echo "$as_me:23241: checking for working vfork" >&5
23242 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23243 if test "${ac_cv_func_vfork_works+set}" = set; then
23244   echo $ECHO_N "(cached) $ECHO_C" >&6
23245 else
23246   if test "$cross_compiling" = yes; then
23247   ac_cv_func_vfork_works=cross
23248 else
23249   cat >"conftest.$ac_ext" <<_ACEOF
23250 #line 23250 "configure"
23251 #include "confdefs.h"
23252 /* Thanks to Paul Eggert for this test.  */
23253 #include <stdio.h>
23254 #include <sys/types.h>
23255 #include <sys/stat.h>
23256 #if HAVE_UNISTD_H
23257 # include <unistd.h>
23258 #endif
23259 #if HAVE_VFORK_H
23260 # include <vfork.h>
23261 #endif
23262 /* On some sparc systems, changes by the child to local and incoming
23263    argument registers are propagated back to the parent.  The compiler
23264    is told about this with #include <vfork.h>, but some compilers
23265    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23266    static variable whose address is put into a register that is
23267    clobbered by the vfork.  */
23268 static
23269 #ifdef __cplusplus
23270 sparc_address_test (int arg)
23271 # else
23272 sparc_address_test (arg) int arg;
23273 #endif
23274 {
23275   static pid_t child;
23276   if (!child) {
23277     child = vfork ();
23278     if (child < 0) {
23279       perror ("vfork");
23280       _exit(2);
23281     }
23282     if (!child) {
23283       arg = getpid();
23284       write(-1, "", 0);
23285       _exit (arg);
23286     }
23287   }
23288 }
23289
23290 int
23291 main (void)
23292 {
23293   pid_t parent = getpid ();
23294   pid_t child;
23295
23296   sparc_address_test ();
23297
23298   child = vfork ();
23299
23300   if (child == 0) {
23301     /* Here is another test for sparc vfork register problems.  This
23302        test uses lots of local variables, at least as many local
23303        variables as main has allocated so far including compiler
23304        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23305        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23306        reuse the register of parent for one of the local variables,
23307        since it will think that parent can't possibly be used any more
23308        in this routine.  Assigning to the local variable will thus
23309        munge parent in the parent process.  */
23310     pid_t
23311       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23312       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23313     /* Convince the compiler that p..p7 are live; otherwise, it might
23314        use the same hardware register for all 8 local variables.  */
23315     if (p != p1 || p != p2 || p != p3 || p != p4
23316         || p != p5 || p != p6 || p != p7)
23317       _exit(1);
23318
23319     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23320        from child file descriptors.  If the child closes a descriptor
23321        before it execs or exits, this munges the parent's descriptor
23322        as well.  Test for this by closing stdout in the child.  */
23323     _exit(close(fileno(stdout)) != 0);
23324   } else {
23325     int status;
23326     struct stat st;
23327
23328     while (wait(&status) != child)
23329       ;
23330     $ac_main_return(
23331          /* Was there some problem with vforking?  */
23332          child < 0
23333
23334          /* Did the child fail?  (This shouldn't happen.)  */
23335          || status
23336
23337          /* Did the vfork/compiler bug occur?  */
23338          || parent != getpid()
23339
23340          /* Did the file descriptor bug occur?  */
23341          || fstat(fileno(stdout), &st) != 0
23342          );
23343   }
23344 }
23345 _ACEOF
23346 rm -f "conftest$ac_exeext"
23347 if { (eval echo "$as_me:23347: \"$ac_link\"") >&5
23348   (eval $ac_link) 2>&5
23349   ac_status=$?
23350   echo "$as_me:23350: \$? = $ac_status" >&5
23351   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23352   { (eval echo "$as_me:23352: \"$ac_try\"") >&5
23353   (eval $ac_try) 2>&5
23354   ac_status=$?
23355   echo "$as_me:23355: \$? = $ac_status" >&5
23356   (exit "$ac_status"); }; }; then
23357   ac_cv_func_vfork_works=yes
23358 else
23359   echo "$as_me: program exited with status $ac_status" >&5
23360 echo "$as_me: failed program was:" >&5
23361 cat "conftest.$ac_ext" >&5
23362 ac_cv_func_vfork_works=no
23363 fi
23364 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23365 fi
23366 fi
23367 echo "$as_me:23367: result: $ac_cv_func_vfork_works" >&5
23368 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23369
23370 fi;
23371 if test "x$ac_cv_func_fork_works" = xcross; then
23372   ac_cv_func_vfork_works=ac_cv_func_vfork
23373   { echo "$as_me:23373: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23374 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23375 fi
23376
23377 if test "x$ac_cv_func_vfork_works" = xyes; then
23378
23379 cat >>confdefs.h <<\EOF
23380 #define HAVE_WORKING_VFORK 1
23381 EOF
23382
23383 else
23384
23385 cat >>confdefs.h <<\EOF
23386 #define vfork fork
23387 EOF
23388
23389 fi
23390 if test "x$ac_cv_func_fork_works" = xyes; then
23391
23392 cat >>confdefs.h <<\EOF
23393 #define HAVE_WORKING_FORK 1
23394 EOF
23395
23396 fi
23397
23398 echo "$as_me:23398: checking if fopen accepts explicit binary mode" >&5
23399 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23400 if test "${cf_cv_fopen_bin_r+set}" = set; then
23401   echo $ECHO_N "(cached) $ECHO_C" >&6
23402 else
23403
23404         if test "$cross_compiling" = yes; then
23405   cf_cv_fopen_bin_r=unknown
23406 else
23407   cat >"conftest.$ac_ext" <<_ACEOF
23408 #line 23408 "configure"
23409 #include "confdefs.h"
23410
23411 #include <stdio.h>
23412 int main(void) {
23413         FILE *fp = fopen("conftest.tmp", "wb");
23414         int rc = 0;
23415         if (fp != 0) {
23416                 int p, q;
23417                 for (p = 0; p < 256; ++p) {
23418                         fputc(p, fp);
23419                 }
23420                 fclose(fp);
23421                 fp = fopen("conftest.tmp", "rb");
23422                 if (fp != 0) {
23423                         for (p = 0; p < 256; ++p) {
23424                                 q = fgetc(fp);
23425                                 if (q != p) {
23426                                         rc = 1;
23427                                         break;
23428                                 }
23429                         }
23430                 } else {
23431                         rc = 1;
23432                 }
23433         } else {
23434                 rc = 1;
23435         }
23436         ${cf_cv_main_return:-return} (rc);
23437 }
23438
23439 _ACEOF
23440 rm -f "conftest$ac_exeext"
23441 if { (eval echo "$as_me:23441: \"$ac_link\"") >&5
23442   (eval $ac_link) 2>&5
23443   ac_status=$?
23444   echo "$as_me:23444: \$? = $ac_status" >&5
23445   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23446   { (eval echo "$as_me:23446: \"$ac_try\"") >&5
23447   (eval $ac_try) 2>&5
23448   ac_status=$?
23449   echo "$as_me:23449: \$? = $ac_status" >&5
23450   (exit "$ac_status"); }; }; then
23451   cf_cv_fopen_bin_r=yes
23452 else
23453   echo "$as_me: program exited with status $ac_status" >&5
23454 echo "$as_me: failed program was:" >&5
23455 cat "conftest.$ac_ext" >&5
23456 cf_cv_fopen_bin_r=no
23457 fi
23458 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23459 fi
23460
23461 fi
23462 echo "$as_me:23462: result: $cf_cv_fopen_bin_r" >&5
23463 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23464 test "x$cf_cv_fopen_bin_r" != xno &&
23465 cat >>confdefs.h <<\EOF
23466 #define USE_FOPEN_BIN_R 1
23467 EOF
23468
23469 # special check for test/ditto.c
23470
23471 echo "$as_me:23471: checking for openpty in -lutil" >&5
23472 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23473 if test "${ac_cv_lib_util_openpty+set}" = set; then
23474   echo $ECHO_N "(cached) $ECHO_C" >&6
23475 else
23476   ac_check_lib_save_LIBS=$LIBS
23477 LIBS="-lutil  $LIBS"
23478 cat >"conftest.$ac_ext" <<_ACEOF
23479 #line 23479 "configure"
23480 #include "confdefs.h"
23481
23482 /* Override any gcc2 internal prototype to avoid an error.  */
23483 #ifdef __cplusplus
23484 extern "C"
23485 #endif
23486 /* We use char because int might match the return type of a gcc2
23487    builtin and then its argument prototype would still apply.  */
23488 char openpty ();
23489 int
23490 main (void)
23491 {
23492 openpty ();
23493   ;
23494   return 0;
23495 }
23496 _ACEOF
23497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23498 if { (eval echo "$as_me:23498: \"$ac_link\"") >&5
23499   (eval $ac_link) 2>&5
23500   ac_status=$?
23501   echo "$as_me:23501: \$? = $ac_status" >&5
23502   (exit "$ac_status"); } &&
23503          { ac_try='test -s "conftest$ac_exeext"'
23504   { (eval echo "$as_me:23504: \"$ac_try\"") >&5
23505   (eval $ac_try) 2>&5
23506   ac_status=$?
23507   echo "$as_me:23507: \$? = $ac_status" >&5
23508   (exit "$ac_status"); }; }; then
23509   ac_cv_lib_util_openpty=yes
23510 else
23511   echo "$as_me: failed program was:" >&5
23512 cat "conftest.$ac_ext" >&5
23513 ac_cv_lib_util_openpty=no
23514 fi
23515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23516 LIBS=$ac_check_lib_save_LIBS
23517 fi
23518 echo "$as_me:23518: result: $ac_cv_lib_util_openpty" >&5
23519 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23520 if test "$ac_cv_lib_util_openpty" = yes; then
23521   cf_cv_lib_util=yes
23522 else
23523   cf_cv_lib_util=no
23524 fi
23525
23526 echo "$as_me:23526: checking for openpty header" >&5
23527 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23528 if test "${cf_cv_func_openpty+set}" = set; then
23529   echo $ECHO_N "(cached) $ECHO_C" >&6
23530 else
23531
23532         cf_save_LIBS="$LIBS"
23533         test "$cf_cv_lib_util" = yes && {
23534 cf_add_libs="$LIBS"
23535 # reverse order
23536 cf_add_0lib=
23537 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23538 # filter duplicates
23539 for cf_add_1lib in $cf_add_0lib; do
23540         for cf_add_2lib in $cf_add_libs; do
23541                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23542                         cf_add_1lib=
23543                         break
23544                 fi
23545         done
23546         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23547 done
23548 LIBS="$cf_add_libs"
23549  }
23550         for cf_header in pty.h libutil.h util.h
23551         do
23552         cat >"conftest.$ac_ext" <<_ACEOF
23553 #line 23553 "configure"
23554 #include "confdefs.h"
23555
23556 #include <$cf_header>
23557
23558 int
23559 main (void)
23560 {
23561
23562         int x = openpty((int *)0, (int *)0, (char *)0,
23563                                    (struct termios *)0, (struct winsize *)0);
23564
23565   ;
23566   return 0;
23567 }
23568 _ACEOF
23569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23570 if { (eval echo "$as_me:23570: \"$ac_link\"") >&5
23571   (eval $ac_link) 2>&5
23572   ac_status=$?
23573   echo "$as_me:23573: \$? = $ac_status" >&5
23574   (exit "$ac_status"); } &&
23575          { ac_try='test -s "conftest$ac_exeext"'
23576   { (eval echo "$as_me:23576: \"$ac_try\"") >&5
23577   (eval $ac_try) 2>&5
23578   ac_status=$?
23579   echo "$as_me:23579: \$? = $ac_status" >&5
23580   (exit "$ac_status"); }; }; then
23581
23582                 cf_cv_func_openpty=$cf_header
23583                 break
23584
23585 else
23586   echo "$as_me: failed program was:" >&5
23587 cat "conftest.$ac_ext" >&5
23588
23589                 cf_cv_func_openpty=no
23590
23591 fi
23592 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23593         done
23594         LIBS="$cf_save_LIBS"
23595
23596 fi
23597 echo "$as_me:23597: result: $cf_cv_func_openpty" >&5
23598 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23599
23600 if test "$cf_cv_func_openpty" != no ; then
23601
23602 cat >>confdefs.h <<EOF
23603 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23604 EOF
23605
23606 cat >>confdefs.h <<\EOF
23607 #define USE_XTERM_PTY 1
23608 EOF
23609
23610         if test "x$cf_cv_lib_util" = xyes ; then
23611
23612 cf_add_libs="$TEST_LIBS"
23613 # reverse order
23614 cf_add_0lib=
23615 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23616 # filter duplicates
23617 for cf_add_1lib in $cf_add_0lib; do
23618         for cf_add_2lib in $cf_add_libs; do
23619                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23620                         cf_add_1lib=
23621                         break
23622                 fi
23623         done
23624         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23625 done
23626 TEST_LIBS="$cf_add_libs"
23627
23628         fi
23629 fi
23630
23631 if test "$with_hashed_db" != no ; then
23632
23633 cat >>confdefs.h <<\EOF
23634 #define USE_HASHED_DB 1
23635 EOF
23636
23637 case $with_hashed_db in
23638 (yes|*able*)
23639         ;;
23640 (*)
23641         if test -d "$with_hashed_db" ; then
23642
23643 if test -n "$with_hashed_db/include" ; then
23644   for cf_add_incdir in $with_hashed_db/include
23645   do
23646         while test "$cf_add_incdir" != /usr/include
23647         do
23648           if test -d "$cf_add_incdir"
23649           then
23650                 cf_have_incdir=no
23651                 if test -n "$CFLAGS$CPPFLAGS" ; then
23652                   # a loop is needed to ensure we can add subdirs of existing dirs
23653                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23654                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23655                           cf_have_incdir=yes; break
23656                         fi
23657                   done
23658                 fi
23659
23660                 if test "$cf_have_incdir" = no ; then
23661                   if test "$cf_add_incdir" = /usr/local/include ; then
23662                         if test "$GCC" = yes
23663                         then
23664                           cf_save_CPPFLAGS=$CPPFLAGS
23665
23666         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23667         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23668
23669                           cat >"conftest.$ac_ext" <<_ACEOF
23670 #line 23670 "configure"
23671 #include "confdefs.h"
23672 #include <stdio.h>
23673 int
23674 main (void)
23675 {
23676 printf("Hello")
23677   ;
23678   return 0;
23679 }
23680 _ACEOF
23681 rm -f "conftest.$ac_objext"
23682 if { (eval echo "$as_me:23682: \"$ac_compile\"") >&5
23683   (eval $ac_compile) 2>&5
23684   ac_status=$?
23685   echo "$as_me:23685: \$? = $ac_status" >&5
23686   (exit "$ac_status"); } &&
23687          { ac_try='test -s "conftest.$ac_objext"'
23688   { (eval echo "$as_me:23688: \"$ac_try\"") >&5
23689   (eval $ac_try) 2>&5
23690   ac_status=$?
23691   echo "$as_me:23691: \$? = $ac_status" >&5
23692   (exit "$ac_status"); }; }; then
23693   :
23694 else
23695   echo "$as_me: failed program was:" >&5
23696 cat "conftest.$ac_ext" >&5
23697 cf_have_incdir=yes
23698 fi
23699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23700                           CPPFLAGS=$cf_save_CPPFLAGS
23701                         fi
23702                   fi
23703                 fi
23704
23705                 if test "$cf_have_incdir" = no ; then
23706                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23707
23708 echo "${as_me:-configure}:23708: testing adding $cf_add_incdir to include-path ..." 1>&5
23709
23710                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23711
23712                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23713                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23714                   cf_add_incdir="$cf_top_incdir"
23715                 else
23716                   break
23717                 fi
23718           else
23719                 break
23720           fi
23721         done
23722   done
23723 fi
23724
23725 if test -n "$with_hashed_db/lib" ; then
23726         for cf_add_libdir in $with_hashed_db/lib
23727         do
23728                 if test "$cf_add_libdir" = /usr/lib ; then
23729                         :
23730                 elif test -d "$cf_add_libdir"
23731                 then
23732                         cf_have_libdir=no
23733                         if test -n "$LDFLAGS$LIBS" ; then
23734                                 # a loop is needed to ensure we can add subdirs of existing dirs
23735                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23736                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23737                                                 cf_have_libdir=yes; break
23738                                         fi
23739                                 done
23740                         fi
23741                         if test "$cf_have_libdir" = no ; then
23742                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23743
23744 echo "${as_me:-configure}:23744: testing adding $cf_add_libdir to library-path ..." 1>&5
23745
23746                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23747                         fi
23748                 fi
23749         done
23750 fi
23751
23752         else
23753                 case "$with_hashed_db" in
23754                 (./*|../*|/*)
23755                         { echo "$as_me:23755: WARNING: no such directory $with_hashed_db" >&5
23756 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23757                         ;;
23758                 (*)
23759
23760 cf_search=
23761
23762 test "x$prefix" != "xNONE" && \
23763 test -d "$prefix" && \
23764  {
23765         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23766         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23767         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23768         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23769         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23770         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23771 }
23772
23773 for cf_subdir_prefix in \
23774         /usr \
23775         /usr/local \
23776         /usr/pkg \
23777         /opt \
23778         /opt/local \
23779         $HOME
23780 do
23781
23782 test "x$cf_subdir_prefix" != "x$prefix" && \
23783 test -d "$cf_subdir_prefix" && \
23784 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23785         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23786         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23787         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23788         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23789         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23790         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"
23791 }
23792
23793 done
23794
23795         for cf_item in $cf_search
23796         do
23797                 case "$cf_item" in
23798                 (*/$with_hashed_db)
23799
23800 if test -n "$cf_item" ; then
23801   for cf_add_incdir in $cf_item
23802   do
23803         while test "$cf_add_incdir" != /usr/include
23804         do
23805           if test -d "$cf_add_incdir"
23806           then
23807                 cf_have_incdir=no
23808                 if test -n "$CFLAGS$CPPFLAGS" ; then
23809                   # a loop is needed to ensure we can add subdirs of existing dirs
23810                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23811                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23812                           cf_have_incdir=yes; break
23813                         fi
23814                   done
23815                 fi
23816
23817                 if test "$cf_have_incdir" = no ; then
23818                   if test "$cf_add_incdir" = /usr/local/include ; then
23819                         if test "$GCC" = yes
23820                         then
23821                           cf_save_CPPFLAGS=$CPPFLAGS
23822
23823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23824         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23825
23826                           cat >"conftest.$ac_ext" <<_ACEOF
23827 #line 23827 "configure"
23828 #include "confdefs.h"
23829 #include <stdio.h>
23830 int
23831 main (void)
23832 {
23833 printf("Hello")
23834   ;
23835   return 0;
23836 }
23837 _ACEOF
23838 rm -f "conftest.$ac_objext"
23839 if { (eval echo "$as_me:23839: \"$ac_compile\"") >&5
23840   (eval $ac_compile) 2>&5
23841   ac_status=$?
23842   echo "$as_me:23842: \$? = $ac_status" >&5
23843   (exit "$ac_status"); } &&
23844          { ac_try='test -s "conftest.$ac_objext"'
23845   { (eval echo "$as_me:23845: \"$ac_try\"") >&5
23846   (eval $ac_try) 2>&5
23847   ac_status=$?
23848   echo "$as_me:23848: \$? = $ac_status" >&5
23849   (exit "$ac_status"); }; }; then
23850   :
23851 else
23852   echo "$as_me: failed program was:" >&5
23853 cat "conftest.$ac_ext" >&5
23854 cf_have_incdir=yes
23855 fi
23856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23857                           CPPFLAGS=$cf_save_CPPFLAGS
23858                         fi
23859                   fi
23860                 fi
23861
23862                 if test "$cf_have_incdir" = no ; then
23863                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23864
23865 echo "${as_me:-configure}:23865: testing adding $cf_add_incdir to include-path ..." 1>&5
23866
23867                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23868
23869                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23870                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23871                   cf_add_incdir="$cf_top_incdir"
23872                 else
23873                   break
23874                 fi
23875           else
23876                 break
23877           fi
23878         done
23879   done
23880 fi
23881
23882                         ;;
23883                 esac
23884         done
23885
23886 cf_search=
23887
23888 test "x$prefix" != "xNONE" && \
23889 test -d "$prefix" && \
23890  {
23891         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23892         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23893         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23894         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23895         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23896         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23897 }
23898
23899 for cf_subdir_prefix in \
23900         /usr \
23901         /usr/local \
23902         /usr/pkg \
23903         /opt \
23904         /opt/local \
23905         $HOME
23906 do
23907
23908 test "x$cf_subdir_prefix" != "x$prefix" && \
23909 test -d "$cf_subdir_prefix" && \
23910 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23911         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23912         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23913         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23914         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23915         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23916         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"
23917 }
23918
23919 done
23920
23921         for cf_item in $cf_search
23922         do
23923                 case "$cf_item" in
23924                 (*/$with_hashed_db)
23925
23926 if test -n "$cf_item" ; then
23927         for cf_add_libdir in $cf_item
23928         do
23929                 if test "$cf_add_libdir" = /usr/lib ; then
23930                         :
23931                 elif test -d "$cf_add_libdir"
23932                 then
23933                         cf_have_libdir=no
23934                         if test -n "$LDFLAGS$LIBS" ; then
23935                                 # a loop is needed to ensure we can add subdirs of existing dirs
23936                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23937                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23938                                                 cf_have_libdir=yes; break
23939                                         fi
23940                                 done
23941                         fi
23942                         if test "$cf_have_libdir" = no ; then
23943                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23944
23945 echo "${as_me:-configure}:23945: testing adding $cf_add_libdir to library-path ..." 1>&5
23946
23947                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23948                         fi
23949                 fi
23950         done
23951 fi
23952
23953                         ;;
23954                 esac
23955         done
23956
23957                         ;;
23958                 esac
23959         fi
23960 esac
23961
23962 echo "$as_me:23962: checking for db.h" >&5
23963 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23964 if test "${ac_cv_header_db_h+set}" = set; then
23965   echo $ECHO_N "(cached) $ECHO_C" >&6
23966 else
23967   cat >"conftest.$ac_ext" <<_ACEOF
23968 #line 23968 "configure"
23969 #include "confdefs.h"
23970 #include <db.h>
23971 _ACEOF
23972 if { (eval echo "$as_me:23972: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23973   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23974   ac_status=$?
23975   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23976   rm -f conftest.er1
23977   cat conftest.err >&5
23978   echo "$as_me:23978: \$? = $ac_status" >&5
23979   (exit "$ac_status"); } >/dev/null; then
23980   if test -s conftest.err; then
23981     ac_cpp_err=$ac_c_preproc_warn_flag
23982   else
23983     ac_cpp_err=
23984   fi
23985 else
23986   ac_cpp_err=yes
23987 fi
23988 if test -z "$ac_cpp_err"; then
23989   ac_cv_header_db_h=yes
23990 else
23991   echo "$as_me: failed program was:" >&5
23992   cat "conftest.$ac_ext" >&5
23993   ac_cv_header_db_h=no
23994 fi
23995 rm -f conftest.err "conftest.$ac_ext"
23996 fi
23997 echo "$as_me:23997: result: $ac_cv_header_db_h" >&5
23998 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23999 if test "$ac_cv_header_db_h" = yes; then
24000
24001 echo "$as_me:24001: checking for version of db" >&5
24002 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24003 if test "${cf_cv_hashed_db_version+set}" = set; then
24004   echo $ECHO_N "(cached) $ECHO_C" >&6
24005 else
24006
24007 cf_cv_hashed_db_version=unknown
24008
24009 for cf_db_version in 1 2 3 4 5 6
24010 do
24011
24012 echo "${as_me:-configure}:24012: testing checking for db version $cf_db_version ..." 1>&5
24013
24014         cat >"conftest.$ac_ext" <<_ACEOF
24015 #line 24015 "configure"
24016 #include "confdefs.h"
24017
24018 $ac_includes_default
24019 #include <db.h>
24020
24021 #ifdef DB_VERSION_MAJOR
24022         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24023 #if $cf_db_version == DB_VERSION_MAJOR
24024         /* ok */
24025 #else
24026         make an error
24027 #endif
24028 #else
24029 #if $cf_db_version == 1
24030         /* ok: assuming this is DB 1.8.5 */
24031 #else
24032         make an error
24033 #endif
24034 #endif
24035
24036 int
24037 main (void)
24038 {
24039 DBT *foo = 0
24040   ;
24041   return 0;
24042 }
24043 _ACEOF
24044 rm -f "conftest.$ac_objext"
24045 if { (eval echo "$as_me:24045: \"$ac_compile\"") >&5
24046   (eval $ac_compile) 2>&5
24047   ac_status=$?
24048   echo "$as_me:24048: \$? = $ac_status" >&5
24049   (exit "$ac_status"); } &&
24050          { ac_try='test -s "conftest.$ac_objext"'
24051   { (eval echo "$as_me:24051: \"$ac_try\"") >&5
24052   (eval $ac_try) 2>&5
24053   ac_status=$?
24054   echo "$as_me:24054: \$? = $ac_status" >&5
24055   (exit "$ac_status"); }; }; then
24056
24057         cf_cv_hashed_db_version=$cf_db_version
24058         break
24059
24060 else
24061   echo "$as_me: failed program was:" >&5
24062 cat "conftest.$ac_ext" >&5
24063 fi
24064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24065 done
24066
24067 fi
24068 echo "$as_me:24068: result: $cf_cv_hashed_db_version" >&5
24069 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24070
24071 if test "$cf_cv_hashed_db_version" = unknown ; then
24072         { { echo "$as_me:24072: error: Cannot determine version of db" >&5
24073 echo "$as_me: error: Cannot determine version of db" >&2;}
24074    { (exit 1); exit 1; }; }
24075 else
24076
24077 echo "$as_me:24077: checking for db libraries" >&5
24078 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24079 if test "${cf_cv_hashed_db_libs+set}" = set; then
24080   echo $ECHO_N "(cached) $ECHO_C" >&6
24081 else
24082
24083 cf_cv_hashed_db_libs=unknown
24084 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24085 do
24086         cf_save_libs="$LIBS"
24087         if test -n "$cf_db_libs"; then
24088
24089 cf_add_libs="$LIBS"
24090 # reverse order
24091 cf_add_0lib=
24092 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24093 # filter duplicates
24094 for cf_add_1lib in $cf_add_0lib; do
24095         for cf_add_2lib in $cf_add_libs; do
24096                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24097                         cf_add_1lib=
24098                         break
24099                 fi
24100         done
24101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24102 done
24103 LIBS="$cf_add_libs"
24104
24105         fi
24106
24107 echo "${as_me:-configure}:24107: testing checking for library $cf_db_libs ..." 1>&5
24108
24109         cat >"conftest.$ac_ext" <<_ACEOF
24110 #line 24110 "configure"
24111 #include "confdefs.h"
24112
24113 $ac_includes_default
24114 #include <db.h>
24115
24116 int
24117 main (void)
24118 {
24119
24120         char *path = "/tmp/foo";
24121 #ifdef DB_VERSION_MAJOR
24122 #if DB_VERSION_MAJOR >= 4
24123         DB *result = 0;
24124         db_create(&result, NULL, 0);
24125         result->open(result,
24126                 NULL,
24127                 path,
24128                 path,
24129                 DB_HASH,
24130                 DB_CREATE,
24131                 0644);
24132 #elif DB_VERSION_MAJOR >= 3
24133         DB *result = 0;
24134         db_create(&result, NULL, 0);
24135         result->open(result,
24136                 path,
24137                 path,
24138                 DB_HASH,
24139                 DB_CREATE,
24140                 0644);
24141 #elif DB_VERSION_MAJOR >= 2
24142         DB *result = 0;
24143         db_open(path,
24144                 DB_HASH,
24145                 DB_CREATE,
24146                 0644,
24147                 (DB_ENV *) 0,
24148                 (DB_INFO *) 0,
24149                 &result);
24150 #endif /* DB_VERSION_MAJOR */
24151 #else
24152         DB *result = dbopen(path,
24153                      2,
24154                      0644,
24155                      DB_HASH,
24156                      0);
24157 #endif
24158         ${cf_cv_main_return:-return}(result != 0)
24159
24160   ;
24161   return 0;
24162 }
24163 _ACEOF
24164 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24165 if { (eval echo "$as_me:24165: \"$ac_link\"") >&5
24166   (eval $ac_link) 2>&5
24167   ac_status=$?
24168   echo "$as_me:24168: \$? = $ac_status" >&5
24169   (exit "$ac_status"); } &&
24170          { ac_try='test -s "conftest$ac_exeext"'
24171   { (eval echo "$as_me:24171: \"$ac_try\"") >&5
24172   (eval $ac_try) 2>&5
24173   ac_status=$?
24174   echo "$as_me:24174: \$? = $ac_status" >&5
24175   (exit "$ac_status"); }; }; then
24176
24177         if test -n "$cf_db_libs" ; then
24178                 cf_cv_hashed_db_libs=$cf_db_libs
24179         else
24180                 cf_cv_hashed_db_libs=default
24181         fi
24182         LIBS="$cf_save_libs"
24183         break
24184
24185 else
24186   echo "$as_me: failed program was:" >&5
24187 cat "conftest.$ac_ext" >&5
24188 fi
24189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24190         LIBS="$cf_save_libs"
24191 done
24192
24193 fi
24194 echo "$as_me:24194: result: $cf_cv_hashed_db_libs" >&5
24195 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24196
24197         if test "$cf_cv_hashed_db_libs" = unknown ; then
24198                 { { echo "$as_me:24198: error: Cannot determine library for db" >&5
24199 echo "$as_me: error: Cannot determine library for db" >&2;}
24200    { (exit 1); exit 1; }; }
24201         elif test "$cf_cv_hashed_db_libs" != default ; then
24202
24203 cf_add_libs="$LIBS"
24204 # reverse order
24205 cf_add_0lib=
24206 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24207 # filter duplicates
24208 for cf_add_1lib in $cf_add_0lib; do
24209         for cf_add_2lib in $cf_add_libs; do
24210                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24211                         cf_add_1lib=
24212                         break
24213                 fi
24214         done
24215         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24216 done
24217 LIBS="$cf_add_libs"
24218
24219         fi
24220 fi
24221
24222 else
24223
24224         { { echo "$as_me:24224: error: Cannot find db.h" >&5
24225 echo "$as_me: error: Cannot find db.h" >&2;}
24226    { (exit 1); exit 1; }; }
24227
24228 fi
24229
24230 fi
24231
24232 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24233         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24234         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24235 fi
24236
24237 # Just in case, check if the C compiler has a bool type.
24238
24239 echo "$as_me:24239: checking if we should include stdbool.h" >&5
24240 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24241
24242 if test "${cf_cv_header_stdbool_h+set}" = set; then
24243   echo $ECHO_N "(cached) $ECHO_C" >&6
24244 else
24245
24246         cat >"conftest.$ac_ext" <<_ACEOF
24247 #line 24247 "configure"
24248 #include "confdefs.h"
24249
24250 int
24251 main (void)
24252 {
24253 bool foo = false
24254   ;
24255   return 0;
24256 }
24257 _ACEOF
24258 rm -f "conftest.$ac_objext"
24259 if { (eval echo "$as_me:24259: \"$ac_compile\"") >&5
24260   (eval $ac_compile) 2>&5
24261   ac_status=$?
24262   echo "$as_me:24262: \$? = $ac_status" >&5
24263   (exit "$ac_status"); } &&
24264          { ac_try='test -s "conftest.$ac_objext"'
24265   { (eval echo "$as_me:24265: \"$ac_try\"") >&5
24266   (eval $ac_try) 2>&5
24267   ac_status=$?
24268   echo "$as_me:24268: \$? = $ac_status" >&5
24269   (exit "$ac_status"); }; }; then
24270   cf_cv_header_stdbool_h=0
24271 else
24272   echo "$as_me: failed program was:" >&5
24273 cat "conftest.$ac_ext" >&5
24274 cat >"conftest.$ac_ext" <<_ACEOF
24275 #line 24275 "configure"
24276 #include "confdefs.h"
24277
24278 #ifndef __BEOS__
24279 #include <stdbool.h>
24280 #endif
24281
24282 int
24283 main (void)
24284 {
24285 bool foo = false
24286   ;
24287   return 0;
24288 }
24289 _ACEOF
24290 rm -f "conftest.$ac_objext"
24291 if { (eval echo "$as_me:24291: \"$ac_compile\"") >&5
24292   (eval $ac_compile) 2>&5
24293   ac_status=$?
24294   echo "$as_me:24294: \$? = $ac_status" >&5
24295   (exit "$ac_status"); } &&
24296          { ac_try='test -s "conftest.$ac_objext"'
24297   { (eval echo "$as_me:24297: \"$ac_try\"") >&5
24298   (eval $ac_try) 2>&5
24299   ac_status=$?
24300   echo "$as_me:24300: \$? = $ac_status" >&5
24301   (exit "$ac_status"); }; }; then
24302   cf_cv_header_stdbool_h=1
24303 else
24304   echo "$as_me: failed program was:" >&5
24305 cat "conftest.$ac_ext" >&5
24306 cf_cv_header_stdbool_h=0
24307 fi
24308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24309 fi
24310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24311 fi
24312
24313 if test "$cf_cv_header_stdbool_h" = 1
24314 then    echo "$as_me:24314: result: yes" >&5
24315 echo "${ECHO_T}yes" >&6
24316 else    echo "$as_me:24316: result: no" >&5
24317 echo "${ECHO_T}no" >&6
24318 fi
24319
24320 echo "$as_me:24320: checking for builtin bool type" >&5
24321 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24322
24323 if test "${cf_cv_cc_bool_type+set}" = set; then
24324   echo $ECHO_N "(cached) $ECHO_C" >&6
24325 else
24326
24327         cat >"conftest.$ac_ext" <<_ACEOF
24328 #line 24328 "configure"
24329 #include "confdefs.h"
24330
24331 #include <stdio.h>
24332 #include <sys/types.h>
24333
24334 int
24335 main (void)
24336 {
24337 bool x = false
24338   ;
24339   return 0;
24340 }
24341 _ACEOF
24342 rm -f "conftest.$ac_objext"
24343 if { (eval echo "$as_me:24343: \"$ac_compile\"") >&5
24344   (eval $ac_compile) 2>&5
24345   ac_status=$?
24346   echo "$as_me:24346: \$? = $ac_status" >&5
24347   (exit "$ac_status"); } &&
24348          { ac_try='test -s "conftest.$ac_objext"'
24349   { (eval echo "$as_me:24349: \"$ac_try\"") >&5
24350   (eval $ac_try) 2>&5
24351   ac_status=$?
24352   echo "$as_me:24352: \$? = $ac_status" >&5
24353   (exit "$ac_status"); }; }; then
24354   cf_cv_cc_bool_type=1
24355 else
24356   echo "$as_me: failed program was:" >&5
24357 cat "conftest.$ac_ext" >&5
24358 cf_cv_cc_bool_type=0
24359 fi
24360 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24361
24362 fi
24363
24364 if test "$cf_cv_cc_bool_type" = 1
24365 then    echo "$as_me:24365: result: yes" >&5
24366 echo "${ECHO_T}yes" >&6
24367 else    echo "$as_me:24367: result: no" >&5
24368 echo "${ECHO_T}no" >&6
24369 fi
24370
24371 # Check for C++ compiler characteristics (and ensure that it's there!)
24372 if test -n "$CXX" ; then
24373         ac_ext=cc
24374 ac_cpp='$CXXCPP $CPPFLAGS'
24375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24376 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24378 ac_main_return="return"
24379
24380 if test -n "$GXX" ; then
24381
24382         cf_save="$LIBS"
24383         LIBS="$LIBS $CXXLIBS"
24384         echo "$as_me:24384: checking if we already have C++ library" >&5
24385 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24386         cat >"conftest.$ac_ext" <<_ACEOF
24387 #line 24387 "configure"
24388 #include "confdefs.h"
24389
24390                         #include <iostream>
24391 int
24392 main (void)
24393 {
24394
24395                         std::cout << "Hello World!" << std::endl;
24396   ;
24397   return 0;
24398 }
24399 _ACEOF
24400 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24401 if { (eval echo "$as_me:24401: \"$ac_link\"") >&5
24402   (eval $ac_link) 2>&5
24403   ac_status=$?
24404   echo "$as_me:24404: \$? = $ac_status" >&5
24405   (exit "$ac_status"); } &&
24406          { ac_try='test -s "conftest$ac_exeext"'
24407   { (eval echo "$as_me:24407: \"$ac_try\"") >&5
24408   (eval $ac_try) 2>&5
24409   ac_status=$?
24410   echo "$as_me:24410: \$? = $ac_status" >&5
24411   (exit "$ac_status"); }; }; then
24412   cf_have_libstdcpp=yes
24413 else
24414   echo "$as_me: failed program was:" >&5
24415 cat "conftest.$ac_ext" >&5
24416 cf_have_libstdcpp=no
24417 fi
24418 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24419         echo "$as_me:24419: result: $cf_have_libstdcpp" >&5
24420 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24421         LIBS="$cf_save"
24422
24423         if test "$cf_have_libstdcpp" != yes
24424         then
24425                 case "$cf_cv_system_name" in
24426                 (os2*)
24427                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24428                                 cf_stdcpp_libname=stdcpp
24429                         else
24430                                 cf_stdcpp_libname=stdc++
24431                         fi
24432                         ;;
24433                 (*)
24434                         cf_stdcpp_libname=stdc++
24435                         ;;
24436                 esac
24437
24438                 echo "$as_me:24438: checking for library $cf_stdcpp_libname" >&5
24439 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24440 if test "${cf_cv_libstdcpp+set}" = set; then
24441   echo $ECHO_N "(cached) $ECHO_C" >&6
24442 else
24443
24444                         cf_save="$LIBS"
24445                         LIBS="$LIBS $CXXLIBS"
24446
24447 cf_add_libs="$LIBS"
24448 # reverse order
24449 cf_add_0lib=
24450 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24451 # filter duplicates
24452 for cf_add_1lib in $cf_add_0lib; do
24453         for cf_add_2lib in $cf_add_libs; do
24454                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24455                         cf_add_1lib=
24456                         break
24457                 fi
24458         done
24459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24460 done
24461 LIBS="$cf_add_libs"
24462
24463                 cat >"conftest.$ac_ext" <<_ACEOF
24464 #line 24464 "configure"
24465 #include "confdefs.h"
24466
24467                                 #include <iostream>
24468 int
24469 main (void)
24470 {
24471
24472                                 std::cout << "Hello World!" << std::endl;
24473   ;
24474   return 0;
24475 }
24476 _ACEOF
24477 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24478 if { (eval echo "$as_me:24478: \"$ac_link\"") >&5
24479   (eval $ac_link) 2>&5
24480   ac_status=$?
24481   echo "$as_me:24481: \$? = $ac_status" >&5
24482   (exit "$ac_status"); } &&
24483          { ac_try='test -s "conftest$ac_exeext"'
24484   { (eval echo "$as_me:24484: \"$ac_try\"") >&5
24485   (eval $ac_try) 2>&5
24486   ac_status=$?
24487   echo "$as_me:24487: \$? = $ac_status" >&5
24488   (exit "$ac_status"); }; }; then
24489   cf_cv_libstdcpp=yes
24490 else
24491   echo "$as_me: failed program was:" >&5
24492 cat "conftest.$ac_ext" >&5
24493 cf_cv_libstdcpp=no
24494 fi
24495 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24496                         LIBS="$cf_save"
24497
24498 fi
24499 echo "$as_me:24499: result: $cf_cv_libstdcpp" >&5
24500 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24501                 test "$cf_cv_libstdcpp" = yes && {
24502 cf_add_libs="$CXXLIBS"
24503 # reverse order
24504 cf_add_0lib=
24505 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24506 # filter duplicates
24507 for cf_add_1lib in $cf_add_0lib; do
24508         for cf_add_2lib in $cf_add_libs; do
24509                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24510                         cf_add_1lib=
24511                         break
24512                 fi
24513         done
24514         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24515 done
24516 CXXLIBS="$cf_add_libs"
24517  }
24518         fi
24519 fi
24520
24521         echo "$as_me:24521: checking whether $CXX understands -c and -o together" >&5
24522 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24523 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24524   echo $ECHO_N "(cached) $ECHO_C" >&6
24525 else
24526
24527 cat > conftest.$ac_ext <<CF_EOF
24528 int main(void)
24529 {
24530         ${cf_cv_main_return:-return}(0);
24531 }
24532 CF_EOF
24533 # We do the test twice because some compilers refuse to overwrite an
24534 # existing .o file with -o, though they will create one.
24535 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24536 if { (eval echo "$as_me:24536: \"$ac_try\"") >&5
24537   (eval $ac_try) 2>&5
24538   ac_status=$?
24539   echo "$as_me:24539: \$? = $ac_status" >&5
24540   (exit "$ac_status"); } &&
24541   test -f conftest2.$ac_objext && { (eval echo "$as_me:24541: \"$ac_try\"") >&5
24542   (eval $ac_try) 2>&5
24543   ac_status=$?
24544   echo "$as_me:24544: \$? = $ac_status" >&5
24545   (exit "$ac_status"); };
24546 then
24547   eval cf_cv_prog_CXX_c_o=yes
24548 else
24549   eval cf_cv_prog_CXX_c_o=no
24550 fi
24551 rm -rf ./conftest*
24552
24553 fi
24554 if test "$cf_cv_prog_CXX_c_o" = yes; then
24555   echo "$as_me:24555: result: yes" >&5
24556 echo "${ECHO_T}yes" >&6
24557 else
24558   echo "$as_me:24558: result: no" >&5
24559 echo "${ECHO_T}no" >&6
24560 fi
24561
24562         case "$GXX_VERSION" in
24563         (1.*|2.[0-6]*|[1-9][0-9].*)
24564                 cf_cxx_library=yes
24565                 ;;
24566         (*-2.7*|2.7*)
24567
24568 cf_cxx_library=unknown
24569 case "$cf_cv_system_name" in
24570 (os2*)
24571         cf_gpp_libname=gpp
24572         ;;
24573 (*)
24574         cf_gpp_libname=g++
24575         ;;
24576 esac
24577 if test "$GXX" = yes; then
24578         echo "$as_me:24578: checking for lib$cf_gpp_libname" >&5
24579 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24580         cf_save="$LIBS"
24581
24582 cf_add_libs="$LIBS"
24583 # reverse order
24584 cf_add_0lib=
24585 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24586 # filter duplicates
24587 for cf_add_1lib in $cf_add_0lib; do
24588         for cf_add_2lib in $cf_add_libs; do
24589                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24590                         cf_add_1lib=
24591                         break
24592                 fi
24593         done
24594         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24595 done
24596 LIBS="$cf_add_libs"
24597
24598         cat >"conftest.$ac_ext" <<_ACEOF
24599 #line 24599 "configure"
24600 #include "confdefs.h"
24601
24602 #include <$cf_gpp_libname/builtin.h>
24603
24604 int
24605 main (void)
24606 {
24607 two_arg_error_handler_t foo2 = lib_error_handler
24608   ;
24609   return 0;
24610 }
24611 _ACEOF
24612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24613 if { (eval echo "$as_me:24613: \"$ac_link\"") >&5
24614   (eval $ac_link) 2>&5
24615   ac_status=$?
24616   echo "$as_me:24616: \$? = $ac_status" >&5
24617   (exit "$ac_status"); } &&
24618          { ac_try='test -s "conftest$ac_exeext"'
24619   { (eval echo "$as_me:24619: \"$ac_try\"") >&5
24620   (eval $ac_try) 2>&5
24621   ac_status=$?
24622   echo "$as_me:24622: \$? = $ac_status" >&5
24623   (exit "$ac_status"); }; }; then
24624   cf_cxx_library=yes
24625
24626 cf_add_libs="$CXXLIBS"
24627 # reverse order
24628 cf_add_0lib=
24629 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24630 # filter duplicates
24631 for cf_add_1lib in $cf_add_0lib; do
24632         for cf_add_2lib in $cf_add_libs; do
24633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24634                         cf_add_1lib=
24635                         break
24636                 fi
24637         done
24638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24639 done
24640 CXXLIBS="$cf_add_libs"
24641
24642          if test "$cf_gpp_libname" = cpp ; then
24643
24644 cat >>confdefs.h <<\EOF
24645 #define HAVE_GPP_BUILTIN_H 1
24646 EOF
24647
24648          else
24649
24650 cat >>confdefs.h <<\EOF
24651 #define HAVE_GXX_BUILTIN_H 1
24652 EOF
24653
24654          fi
24655 else
24656   echo "$as_me: failed program was:" >&5
24657 cat "conftest.$ac_ext" >&5
24658 cat >"conftest.$ac_ext" <<_ACEOF
24659 #line 24659 "configure"
24660 #include "confdefs.h"
24661
24662 #include <builtin.h>
24663
24664 int
24665 main (void)
24666 {
24667 two_arg_error_handler_t foo2 = lib_error_handler
24668   ;
24669   return 0;
24670 }
24671 _ACEOF
24672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24673 if { (eval echo "$as_me:24673: \"$ac_link\"") >&5
24674   (eval $ac_link) 2>&5
24675   ac_status=$?
24676   echo "$as_me:24676: \$? = $ac_status" >&5
24677   (exit "$ac_status"); } &&
24678          { ac_try='test -s "conftest$ac_exeext"'
24679   { (eval echo "$as_me:24679: \"$ac_try\"") >&5
24680   (eval $ac_try) 2>&5
24681   ac_status=$?
24682   echo "$as_me:24682: \$? = $ac_status" >&5
24683   (exit "$ac_status"); }; }; then
24684   cf_cxx_library=yes
24685
24686 cf_add_libs="$CXXLIBS"
24687 # reverse order
24688 cf_add_0lib=
24689 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24690 # filter duplicates
24691 for cf_add_1lib in $cf_add_0lib; do
24692         for cf_add_2lib in $cf_add_libs; do
24693                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24694                         cf_add_1lib=
24695                         break
24696                 fi
24697         done
24698         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24699 done
24700 CXXLIBS="$cf_add_libs"
24701
24702 cat >>confdefs.h <<\EOF
24703 #define HAVE_BUILTIN_H 1
24704 EOF
24705
24706 else
24707   echo "$as_me: failed program was:" >&5
24708 cat "conftest.$ac_ext" >&5
24709 cf_cxx_library=no
24710 fi
24711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24712 fi
24713 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24714         LIBS="$cf_save"
24715         echo "$as_me:24715: result: $cf_cxx_library" >&5
24716 echo "${ECHO_T}$cf_cxx_library" >&6
24717 fi
24718
24719                 ;;
24720         (*)
24721                 cf_cxx_library=no
24722                 ;;
24723         esac
24724
24725         ac_ext=cc
24726 ac_cpp='$CXXCPP $CPPFLAGS'
24727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24728 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24730 ac_main_return="return"
24731 echo "$as_me:24731: checking how to run the C++ preprocessor" >&5
24732 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24733 if test -z "$CXXCPP"; then
24734   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24735   echo $ECHO_N "(cached) $ECHO_C" >&6
24736 else
24737       # Double quotes because CXXCPP needs to be expanded
24738     for CXXCPP in "$CXX -E" "/lib/cpp"
24739     do
24740       ac_preproc_ok=false
24741 for ac_cxx_preproc_warn_flag in '' yes
24742 do
24743   # Use a header file that comes with gcc, so configuring glibc
24744   # with a fresh cross-compiler works.
24745   # On the NeXT, cc -E runs the code through the compiler's parser,
24746   # not just through cpp. "Syntax error" is here to catch this case.
24747   cat >"conftest.$ac_ext" <<_ACEOF
24748 #line 24748 "configure"
24749 #include "confdefs.h"
24750 #include <assert.h>
24751                      Syntax error
24752 _ACEOF
24753 if { (eval echo "$as_me:24753: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24754   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24755   ac_status=$?
24756   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24757   rm -f conftest.er1
24758   cat conftest.err >&5
24759   echo "$as_me:24759: \$? = $ac_status" >&5
24760   (exit "$ac_status"); } >/dev/null; then
24761   if test -s conftest.err; then
24762     ac_cpp_err=$ac_cxx_preproc_warn_flag
24763   else
24764     ac_cpp_err=
24765   fi
24766 else
24767   ac_cpp_err=yes
24768 fi
24769 if test -z "$ac_cpp_err"; then
24770   :
24771 else
24772   echo "$as_me: failed program was:" >&5
24773   cat "conftest.$ac_ext" >&5
24774   # Broken: fails on valid input.
24775 continue
24776 fi
24777 rm -f conftest.err "conftest.$ac_ext"
24778
24779   # OK, works on sane cases.  Now check whether non-existent headers
24780   # can be detected and how.
24781   cat >"conftest.$ac_ext" <<_ACEOF
24782 #line 24782 "configure"
24783 #include "confdefs.h"
24784 #include <ac_nonexistent.h>
24785 _ACEOF
24786 if { (eval echo "$as_me:24786: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24787   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24788   ac_status=$?
24789   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24790   rm -f conftest.er1
24791   cat conftest.err >&5
24792   echo "$as_me:24792: \$? = $ac_status" >&5
24793   (exit "$ac_status"); } >/dev/null; then
24794   if test -s conftest.err; then
24795     ac_cpp_err=$ac_cxx_preproc_warn_flag
24796   else
24797     ac_cpp_err=
24798   fi
24799 else
24800   ac_cpp_err=yes
24801 fi
24802 if test -z "$ac_cpp_err"; then
24803   # Broken: success on invalid input.
24804 continue
24805 else
24806   echo "$as_me: failed program was:" >&5
24807   cat "conftest.$ac_ext" >&5
24808   # Passes both tests.
24809 ac_preproc_ok=:
24810 break
24811 fi
24812 rm -f conftest.err "conftest.$ac_ext"
24813
24814 done
24815 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24816 rm -f conftest.err "conftest.$ac_ext"
24817 if $ac_preproc_ok; then
24818   break
24819 fi
24820
24821     done
24822     ac_cv_prog_CXXCPP=$CXXCPP
24823
24824 fi
24825   CXXCPP=$ac_cv_prog_CXXCPP
24826 else
24827   ac_cv_prog_CXXCPP=$CXXCPP
24828 fi
24829 echo "$as_me:24829: result: $CXXCPP" >&5
24830 echo "${ECHO_T}$CXXCPP" >&6
24831 ac_preproc_ok=false
24832 for ac_cxx_preproc_warn_flag in '' yes
24833 do
24834   # Use a header file that comes with gcc, so configuring glibc
24835   # with a fresh cross-compiler works.
24836   # On the NeXT, cc -E runs the code through the compiler's parser,
24837   # not just through cpp. "Syntax error" is here to catch this case.
24838   cat >"conftest.$ac_ext" <<_ACEOF
24839 #line 24839 "configure"
24840 #include "confdefs.h"
24841 #include <assert.h>
24842                      Syntax error
24843 _ACEOF
24844 if { (eval echo "$as_me:24844: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24845   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24846   ac_status=$?
24847   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24848   rm -f conftest.er1
24849   cat conftest.err >&5
24850   echo "$as_me:24850: \$? = $ac_status" >&5
24851   (exit "$ac_status"); } >/dev/null; then
24852   if test -s conftest.err; then
24853     ac_cpp_err=$ac_cxx_preproc_warn_flag
24854   else
24855     ac_cpp_err=
24856   fi
24857 else
24858   ac_cpp_err=yes
24859 fi
24860 if test -z "$ac_cpp_err"; then
24861   :
24862 else
24863   echo "$as_me: failed program was:" >&5
24864   cat "conftest.$ac_ext" >&5
24865   # Broken: fails on valid input.
24866 continue
24867 fi
24868 rm -f conftest.err "conftest.$ac_ext"
24869
24870   # OK, works on sane cases.  Now check whether non-existent headers
24871   # can be detected and how.
24872   cat >"conftest.$ac_ext" <<_ACEOF
24873 #line 24873 "configure"
24874 #include "confdefs.h"
24875 #include <ac_nonexistent.h>
24876 _ACEOF
24877 if { (eval echo "$as_me:24877: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24878   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24879   ac_status=$?
24880   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24881   rm -f conftest.er1
24882   cat conftest.err >&5
24883   echo "$as_me:24883: \$? = $ac_status" >&5
24884   (exit "$ac_status"); } >/dev/null; then
24885   if test -s conftest.err; then
24886     ac_cpp_err=$ac_cxx_preproc_warn_flag
24887   else
24888     ac_cpp_err=
24889   fi
24890 else
24891   ac_cpp_err=yes
24892 fi
24893 if test -z "$ac_cpp_err"; then
24894   # Broken: success on invalid input.
24895 continue
24896 else
24897   echo "$as_me: failed program was:" >&5
24898   cat "conftest.$ac_ext" >&5
24899   # Passes both tests.
24900 ac_preproc_ok=:
24901 break
24902 fi
24903 rm -f conftest.err "conftest.$ac_ext"
24904
24905 done
24906 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24907 rm -f conftest.err "conftest.$ac_ext"
24908 if $ac_preproc_ok; then
24909   :
24910 else
24911   { { echo "$as_me:24911: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24912 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24913    { (exit 1); exit 1; }; }
24914 fi
24915
24916 ac_ext=cc
24917 ac_cpp='$CXXCPP $CPPFLAGS'
24918 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24919 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24920 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24921 ac_main_return="return"
24922
24923 for ac_header in typeinfo
24924 do
24925 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24926 echo "$as_me:24926: checking for $ac_header" >&5
24927 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24928 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24929   echo $ECHO_N "(cached) $ECHO_C" >&6
24930 else
24931   cat >"conftest.$ac_ext" <<_ACEOF
24932 #line 24932 "configure"
24933 #include "confdefs.h"
24934 #include <$ac_header>
24935 _ACEOF
24936 if { (eval echo "$as_me:24936: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24937   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24938   ac_status=$?
24939   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24940   rm -f conftest.er1
24941   cat conftest.err >&5
24942   echo "$as_me:24942: \$? = $ac_status" >&5
24943   (exit "$ac_status"); } >/dev/null; then
24944   if test -s conftest.err; then
24945     ac_cpp_err=$ac_cxx_preproc_warn_flag
24946   else
24947     ac_cpp_err=
24948   fi
24949 else
24950   ac_cpp_err=yes
24951 fi
24952 if test -z "$ac_cpp_err"; then
24953   eval "$as_ac_Header=yes"
24954 else
24955   echo "$as_me: failed program was:" >&5
24956   cat "conftest.$ac_ext" >&5
24957   eval "$as_ac_Header=no"
24958 fi
24959 rm -f conftest.err "conftest.$ac_ext"
24960 fi
24961 echo "$as_me:24961: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24962 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24963 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24964   cat >>confdefs.h <<EOF
24965 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24966 EOF
24967
24968 fi
24969 done
24970
24971 for ac_header in iostream
24972 do
24973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24974 echo "$as_me:24974: checking for $ac_header" >&5
24975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24977   echo $ECHO_N "(cached) $ECHO_C" >&6
24978 else
24979   cat >"conftest.$ac_ext" <<_ACEOF
24980 #line 24980 "configure"
24981 #include "confdefs.h"
24982 #include <$ac_header>
24983 _ACEOF
24984 if { (eval echo "$as_me:24984: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24985   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24986   ac_status=$?
24987   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24988   rm -f conftest.er1
24989   cat conftest.err >&5
24990   echo "$as_me:24990: \$? = $ac_status" >&5
24991   (exit "$ac_status"); } >/dev/null; then
24992   if test -s conftest.err; then
24993     ac_cpp_err=$ac_cxx_preproc_warn_flag
24994   else
24995     ac_cpp_err=
24996   fi
24997 else
24998   ac_cpp_err=yes
24999 fi
25000 if test -z "$ac_cpp_err"; then
25001   eval "$as_ac_Header=yes"
25002 else
25003   echo "$as_me: failed program was:" >&5
25004   cat "conftest.$ac_ext" >&5
25005   eval "$as_ac_Header=no"
25006 fi
25007 rm -f conftest.err "conftest.$ac_ext"
25008 fi
25009 echo "$as_me:25009: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25010 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25011 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25012   cat >>confdefs.h <<EOF
25013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25014 EOF
25015
25016 fi
25017 done
25018
25019 if test x"$ac_cv_header_iostream" = xyes ; then
25020         echo "$as_me:25020: checking if iostream uses std-namespace" >&5
25021 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25022         cat >"conftest.$ac_ext" <<_ACEOF
25023 #line 25023 "configure"
25024 #include "confdefs.h"
25025
25026 #include <iostream>
25027 using std::endl;
25028 using std::cerr;
25029 int
25030 main (void)
25031 {
25032
25033 cerr << "testing" << endl;
25034
25035   ;
25036   return 0;
25037 }
25038 _ACEOF
25039 rm -f "conftest.$ac_objext"
25040 if { (eval echo "$as_me:25040: \"$ac_compile\"") >&5
25041   (eval $ac_compile) 2>&5
25042   ac_status=$?
25043   echo "$as_me:25043: \$? = $ac_status" >&5
25044   (exit "$ac_status"); } &&
25045          { ac_try='test -s "conftest.$ac_objext"'
25046   { (eval echo "$as_me:25046: \"$ac_try\"") >&5
25047   (eval $ac_try) 2>&5
25048   ac_status=$?
25049   echo "$as_me:25049: \$? = $ac_status" >&5
25050   (exit "$ac_status"); }; }; then
25051   cf_iostream_namespace=yes
25052 else
25053   echo "$as_me: failed program was:" >&5
25054 cat "conftest.$ac_ext" >&5
25055 cf_iostream_namespace=no
25056 fi
25057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25058         echo "$as_me:25058: result: $cf_iostream_namespace" >&5
25059 echo "${ECHO_T}$cf_iostream_namespace" >&6
25060         if test "$cf_iostream_namespace" = yes ; then
25061
25062 cat >>confdefs.h <<\EOF
25063 #define IOSTREAM_NAMESPACE 1
25064 EOF
25065
25066         fi
25067 fi
25068
25069 echo "$as_me:25069: checking if we should include stdbool.h" >&5
25070 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25071
25072 if test "${cf_cv_header_stdbool_h+set}" = set; then
25073   echo $ECHO_N "(cached) $ECHO_C" >&6
25074 else
25075
25076         cat >"conftest.$ac_ext" <<_ACEOF
25077 #line 25077 "configure"
25078 #include "confdefs.h"
25079
25080 int
25081 main (void)
25082 {
25083 bool foo = false
25084   ;
25085   return 0;
25086 }
25087 _ACEOF
25088 rm -f "conftest.$ac_objext"
25089 if { (eval echo "$as_me:25089: \"$ac_compile\"") >&5
25090   (eval $ac_compile) 2>&5
25091   ac_status=$?
25092   echo "$as_me:25092: \$? = $ac_status" >&5
25093   (exit "$ac_status"); } &&
25094          { ac_try='test -s "conftest.$ac_objext"'
25095   { (eval echo "$as_me:25095: \"$ac_try\"") >&5
25096   (eval $ac_try) 2>&5
25097   ac_status=$?
25098   echo "$as_me:25098: \$? = $ac_status" >&5
25099   (exit "$ac_status"); }; }; then
25100   cf_cv_header_stdbool_h=0
25101 else
25102   echo "$as_me: failed program was:" >&5
25103 cat "conftest.$ac_ext" >&5
25104 cat >"conftest.$ac_ext" <<_ACEOF
25105 #line 25105 "configure"
25106 #include "confdefs.h"
25107
25108 #ifndef __BEOS__
25109 #include <stdbool.h>
25110 #endif
25111
25112 int
25113 main (void)
25114 {
25115 bool foo = false
25116   ;
25117   return 0;
25118 }
25119 _ACEOF
25120 rm -f "conftest.$ac_objext"
25121 if { (eval echo "$as_me:25121: \"$ac_compile\"") >&5
25122   (eval $ac_compile) 2>&5
25123   ac_status=$?
25124   echo "$as_me:25124: \$? = $ac_status" >&5
25125   (exit "$ac_status"); } &&
25126          { ac_try='test -s "conftest.$ac_objext"'
25127   { (eval echo "$as_me:25127: \"$ac_try\"") >&5
25128   (eval $ac_try) 2>&5
25129   ac_status=$?
25130   echo "$as_me:25130: \$? = $ac_status" >&5
25131   (exit "$ac_status"); }; }; then
25132   cf_cv_header_stdbool_h=1
25133 else
25134   echo "$as_me: failed program was:" >&5
25135 cat "conftest.$ac_ext" >&5
25136 cf_cv_header_stdbool_h=0
25137 fi
25138 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25139 fi
25140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25141 fi
25142
25143 if test "$cf_cv_header_stdbool_h" = 1
25144 then    echo "$as_me:25144: result: yes" >&5
25145 echo "${ECHO_T}yes" >&6
25146 else    echo "$as_me:25146: result: no" >&5
25147 echo "${ECHO_T}no" >&6
25148 fi
25149
25150 echo "$as_me:25150: checking for builtin bool type" >&5
25151 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25152
25153 if test "${cf_cv_builtin_bool+set}" = set; then
25154   echo $ECHO_N "(cached) $ECHO_C" >&6
25155 else
25156
25157         cat >"conftest.$ac_ext" <<_ACEOF
25158 #line 25158 "configure"
25159 #include "confdefs.h"
25160
25161 #include <stdio.h>
25162 #include <sys/types.h>
25163
25164 int
25165 main (void)
25166 {
25167 bool x = false
25168   ;
25169   return 0;
25170 }
25171 _ACEOF
25172 rm -f "conftest.$ac_objext"
25173 if { (eval echo "$as_me:25173: \"$ac_compile\"") >&5
25174   (eval $ac_compile) 2>&5
25175   ac_status=$?
25176   echo "$as_me:25176: \$? = $ac_status" >&5
25177   (exit "$ac_status"); } &&
25178          { ac_try='test -s "conftest.$ac_objext"'
25179   { (eval echo "$as_me:25179: \"$ac_try\"") >&5
25180   (eval $ac_try) 2>&5
25181   ac_status=$?
25182   echo "$as_me:25182: \$? = $ac_status" >&5
25183   (exit "$ac_status"); }; }; then
25184   cf_cv_builtin_bool=1
25185 else
25186   echo "$as_me: failed program was:" >&5
25187 cat "conftest.$ac_ext" >&5
25188 cf_cv_builtin_bool=0
25189 fi
25190 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25191
25192 fi
25193
25194 if test "$cf_cv_builtin_bool" = 1
25195 then    echo "$as_me:25195: result: yes" >&5
25196 echo "${ECHO_T}yes" >&6
25197 else    echo "$as_me:25197: result: no" >&5
25198 echo "${ECHO_T}no" >&6
25199 fi
25200
25201 echo "$as_me:25201: checking for bool" >&5
25202 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25203 if test "${ac_cv_type_bool+set}" = set; then
25204   echo $ECHO_N "(cached) $ECHO_C" >&6
25205 else
25206   cat >"conftest.$ac_ext" <<_ACEOF
25207 #line 25207 "configure"
25208 #include "confdefs.h"
25209
25210 #include <stdlib.h>
25211 #include <stdio.h>
25212
25213 #if defined(__cplusplus)
25214
25215 #ifdef HAVE_GXX_BUILTIN_H
25216 #include <g++/builtin.h>
25217 #elif HAVE_GPP_BUILTIN_H
25218 #include <gpp/builtin.h>
25219 #elif HAVE_BUILTIN_H
25220 #include <builtin.h>
25221 #endif
25222
25223 #else
25224
25225 #if $cf_cv_header_stdbool_h
25226 #include <stdbool.h>
25227 #endif
25228
25229 #endif
25230
25231 int
25232 main (void)
25233 {
25234 if ((bool *) 0)
25235   return 0;
25236 if (sizeof (bool))
25237   return 0;
25238   ;
25239   return 0;
25240 }
25241 _ACEOF
25242 rm -f "conftest.$ac_objext"
25243 if { (eval echo "$as_me:25243: \"$ac_compile\"") >&5
25244   (eval $ac_compile) 2>&5
25245   ac_status=$?
25246   echo "$as_me:25246: \$? = $ac_status" >&5
25247   (exit "$ac_status"); } &&
25248          { ac_try='test -s "conftest.$ac_objext"'
25249   { (eval echo "$as_me:25249: \"$ac_try\"") >&5
25250   (eval $ac_try) 2>&5
25251   ac_status=$?
25252   echo "$as_me:25252: \$? = $ac_status" >&5
25253   (exit "$ac_status"); }; }; then
25254   ac_cv_type_bool=yes
25255 else
25256   echo "$as_me: failed program was:" >&5
25257 cat "conftest.$ac_ext" >&5
25258 ac_cv_type_bool=no
25259 fi
25260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25261 fi
25262 echo "$as_me:25262: result: $ac_cv_type_bool" >&5
25263 echo "${ECHO_T}$ac_cv_type_bool" >&6
25264
25265 echo "$as_me:25265: checking size of bool" >&5
25266 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25267 if test "${ac_cv_sizeof_bool+set}" = set; then
25268   echo $ECHO_N "(cached) $ECHO_C" >&6
25269 else
25270   if test "$ac_cv_type_bool" = yes; then
25271   if test "$cross_compiling" = yes; then
25272   # Depending upon the size, compute the lo and hi bounds.
25273 cat >"conftest.$ac_ext" <<_ACEOF
25274 #line 25274 "configure"
25275 #include "confdefs.h"
25276
25277 #include <stdlib.h>
25278 #include <stdio.h>
25279
25280 #if defined(__cplusplus)
25281
25282 #ifdef HAVE_GXX_BUILTIN_H
25283 #include <g++/builtin.h>
25284 #elif HAVE_GPP_BUILTIN_H
25285 #include <gpp/builtin.h>
25286 #elif HAVE_BUILTIN_H
25287 #include <builtin.h>
25288 #endif
25289
25290 #else
25291
25292 #if $cf_cv_header_stdbool_h
25293 #include <stdbool.h>
25294 #endif
25295
25296 #endif
25297
25298 int
25299 main (void)
25300 {
25301 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25302   ;
25303   return 0;
25304 }
25305 _ACEOF
25306 rm -f "conftest.$ac_objext"
25307 if { (eval echo "$as_me:25307: \"$ac_compile\"") >&5
25308   (eval $ac_compile) 2>&5
25309   ac_status=$?
25310   echo "$as_me:25310: \$? = $ac_status" >&5
25311   (exit "$ac_status"); } &&
25312          { ac_try='test -s "conftest.$ac_objext"'
25313   { (eval echo "$as_me:25313: \"$ac_try\"") >&5
25314   (eval $ac_try) 2>&5
25315   ac_status=$?
25316   echo "$as_me:25316: \$? = $ac_status" >&5
25317   (exit "$ac_status"); }; }; then
25318   ac_lo=0 ac_mid=0
25319   while :; do
25320     cat >"conftest.$ac_ext" <<_ACEOF
25321 #line 25321 "configure"
25322 #include "confdefs.h"
25323
25324 #include <stdlib.h>
25325 #include <stdio.h>
25326
25327 #if defined(__cplusplus)
25328
25329 #ifdef HAVE_GXX_BUILTIN_H
25330 #include <g++/builtin.h>
25331 #elif HAVE_GPP_BUILTIN_H
25332 #include <gpp/builtin.h>
25333 #elif HAVE_BUILTIN_H
25334 #include <builtin.h>
25335 #endif
25336
25337 #else
25338
25339 #if $cf_cv_header_stdbool_h
25340 #include <stdbool.h>
25341 #endif
25342
25343 #endif
25344
25345 int
25346 main (void)
25347 {
25348 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25349   ;
25350   return 0;
25351 }
25352 _ACEOF
25353 rm -f "conftest.$ac_objext"
25354 if { (eval echo "$as_me:25354: \"$ac_compile\"") >&5
25355   (eval $ac_compile) 2>&5
25356   ac_status=$?
25357   echo "$as_me:25357: \$? = $ac_status" >&5
25358   (exit "$ac_status"); } &&
25359          { ac_try='test -s "conftest.$ac_objext"'
25360   { (eval echo "$as_me:25360: \"$ac_try\"") >&5
25361   (eval $ac_try) 2>&5
25362   ac_status=$?
25363   echo "$as_me:25363: \$? = $ac_status" >&5
25364   (exit "$ac_status"); }; }; then
25365   ac_hi=$ac_mid; break
25366 else
25367   echo "$as_me: failed program was:" >&5
25368 cat "conftest.$ac_ext" >&5
25369 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25370 fi
25371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25372   done
25373 else
25374   echo "$as_me: failed program was:" >&5
25375 cat "conftest.$ac_ext" >&5
25376 ac_hi=-1 ac_mid=-1
25377   while :; do
25378     cat >"conftest.$ac_ext" <<_ACEOF
25379 #line 25379 "configure"
25380 #include "confdefs.h"
25381
25382 #include <stdlib.h>
25383 #include <stdio.h>
25384
25385 #if defined(__cplusplus)
25386
25387 #ifdef HAVE_GXX_BUILTIN_H
25388 #include <g++/builtin.h>
25389 #elif HAVE_GPP_BUILTIN_H
25390 #include <gpp/builtin.h>
25391 #elif HAVE_BUILTIN_H
25392 #include <builtin.h>
25393 #endif
25394
25395 #else
25396
25397 #if $cf_cv_header_stdbool_h
25398 #include <stdbool.h>
25399 #endif
25400
25401 #endif
25402
25403 int
25404 main (void)
25405 {
25406 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25407   ;
25408   return 0;
25409 }
25410 _ACEOF
25411 rm -f "conftest.$ac_objext"
25412 if { (eval echo "$as_me:25412: \"$ac_compile\"") >&5
25413   (eval $ac_compile) 2>&5
25414   ac_status=$?
25415   echo "$as_me:25415: \$? = $ac_status" >&5
25416   (exit "$ac_status"); } &&
25417          { ac_try='test -s "conftest.$ac_objext"'
25418   { (eval echo "$as_me:25418: \"$ac_try\"") >&5
25419   (eval $ac_try) 2>&5
25420   ac_status=$?
25421   echo "$as_me:25421: \$? = $ac_status" >&5
25422   (exit "$ac_status"); }; }; then
25423   ac_lo=$ac_mid; break
25424 else
25425   echo "$as_me: failed program was:" >&5
25426 cat "conftest.$ac_ext" >&5
25427 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25428 fi
25429 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25430   done
25431 fi
25432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25433 # Binary search between lo and hi bounds.
25434 while test "x$ac_lo" != "x$ac_hi"; do
25435   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25436   cat >"conftest.$ac_ext" <<_ACEOF
25437 #line 25437 "configure"
25438 #include "confdefs.h"
25439
25440 #include <stdlib.h>
25441 #include <stdio.h>
25442
25443 #if defined(__cplusplus)
25444
25445 #ifdef HAVE_GXX_BUILTIN_H
25446 #include <g++/builtin.h>
25447 #elif HAVE_GPP_BUILTIN_H
25448 #include <gpp/builtin.h>
25449 #elif HAVE_BUILTIN_H
25450 #include <builtin.h>
25451 #endif
25452
25453 #else
25454
25455 #if $cf_cv_header_stdbool_h
25456 #include <stdbool.h>
25457 #endif
25458
25459 #endif
25460
25461 int
25462 main (void)
25463 {
25464 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25465   ;
25466   return 0;
25467 }
25468 _ACEOF
25469 rm -f "conftest.$ac_objext"
25470 if { (eval echo "$as_me:25470: \"$ac_compile\"") >&5
25471   (eval $ac_compile) 2>&5
25472   ac_status=$?
25473   echo "$as_me:25473: \$? = $ac_status" >&5
25474   (exit "$ac_status"); } &&
25475          { ac_try='test -s "conftest.$ac_objext"'
25476   { (eval echo "$as_me:25476: \"$ac_try\"") >&5
25477   (eval $ac_try) 2>&5
25478   ac_status=$?
25479   echo "$as_me:25479: \$? = $ac_status" >&5
25480   (exit "$ac_status"); }; }; then
25481   ac_hi=$ac_mid
25482 else
25483   echo "$as_me: failed program was:" >&5
25484 cat "conftest.$ac_ext" >&5
25485 ac_lo=`expr "$ac_mid" + 1`
25486 fi
25487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25488 done
25489 ac_cv_sizeof_bool=$ac_lo
25490 else
25491   if test "$cross_compiling" = yes; then
25492   { { echo "$as_me:25492: error: cannot run test program while cross compiling" >&5
25493 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25494    { (exit 1); exit 1; }; }
25495 else
25496   cat >"conftest.$ac_ext" <<_ACEOF
25497 #line 25497 "configure"
25498 #include "confdefs.h"
25499
25500 #include <stdlib.h>
25501 #include <stdio.h>
25502
25503 #if defined(__cplusplus)
25504
25505 #ifdef HAVE_GXX_BUILTIN_H
25506 #include <g++/builtin.h>
25507 #elif HAVE_GPP_BUILTIN_H
25508 #include <gpp/builtin.h>
25509 #elif HAVE_BUILTIN_H
25510 #include <builtin.h>
25511 #endif
25512
25513 #else
25514
25515 #if $cf_cv_header_stdbool_h
25516 #include <stdbool.h>
25517 #endif
25518
25519 #endif
25520
25521 int
25522 main (void)
25523 {
25524 FILE *f = fopen ("conftest.val", "w");
25525 if (!f)
25526   $ac_main_return (1);
25527 fprintf (f, "%ld", (long)(sizeof (bool)));
25528 fclose (f);
25529   ;
25530   return 0;
25531 }
25532 _ACEOF
25533 rm -f "conftest$ac_exeext"
25534 if { (eval echo "$as_me:25534: \"$ac_link\"") >&5
25535   (eval $ac_link) 2>&5
25536   ac_status=$?
25537   echo "$as_me:25537: \$? = $ac_status" >&5
25538   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25539   { (eval echo "$as_me:25539: \"$ac_try\"") >&5
25540   (eval $ac_try) 2>&5
25541   ac_status=$?
25542   echo "$as_me:25542: \$? = $ac_status" >&5
25543   (exit "$ac_status"); }; }; then
25544   ac_cv_sizeof_bool=`cat conftest.val`
25545 else
25546   echo "$as_me: program exited with status $ac_status" >&5
25547 echo "$as_me: failed program was:" >&5
25548 cat "conftest.$ac_ext" >&5
25549 fi
25550 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25551 fi
25552 fi
25553 rm -f conftest.val
25554 else
25555   ac_cv_sizeof_bool=0
25556 fi
25557 fi
25558 echo "$as_me:25558: result: $ac_cv_sizeof_bool" >&5
25559 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25560 cat >>confdefs.h <<EOF
25561 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25562 EOF
25563
25564 echo "$as_me:25564: checking for type of bool" >&5
25565 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25566 if test "${cf_cv_type_of_bool+set}" = set; then
25567   echo $ECHO_N "(cached) $ECHO_C" >&6
25568 else
25569
25570         rm -f cf_test.out
25571         if test "$cross_compiling" = yes; then
25572
25573                 case x$ac_cv_sizeof_bool in
25574                 (x1) cf_cv_type_of_bool="unsigned char";;
25575                 (x2) cf_cv_type_of_bool="unsigned short";;
25576                 (x4) cf_cv_type_of_bool="unsigned int";;
25577                 (x8) cf_cv_type_of_bool="unsigned long";;
25578                 (*)  cf_cv_type_of_bool=unknown;;
25579                 esac
25580
25581 else
25582   cat >"conftest.$ac_ext" <<_ACEOF
25583 #line 25583 "configure"
25584 #include "confdefs.h"
25585
25586 #include <stdlib.h>
25587 #include <stdio.h>
25588
25589 #if defined(__cplusplus)
25590
25591 #ifdef HAVE_GXX_BUILTIN_H
25592 #include <g++/builtin.h>
25593 #elif HAVE_GPP_BUILTIN_H
25594 #include <gpp/builtin.h>
25595 #elif HAVE_BUILTIN_H
25596 #include <builtin.h>
25597 #endif
25598
25599 #else
25600
25601 #if $cf_cv_header_stdbool_h
25602 #include <stdbool.h>
25603 #endif
25604
25605 #endif
25606
25607 int main(void)
25608 {
25609         FILE *fp = fopen("cf_test.out", "w");
25610         if (fp != 0) {
25611                 bool x = true;
25612                 if ((bool)(-x) >= 0)
25613                         fputs("unsigned ", fp);
25614                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25615                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25616                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25617                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25618                 fclose(fp);
25619         }
25620         ${cf_cv_main_return:-return}(0);
25621 }
25622
25623 _ACEOF
25624 rm -f "conftest$ac_exeext"
25625 if { (eval echo "$as_me:25625: \"$ac_link\"") >&5
25626   (eval $ac_link) 2>&5
25627   ac_status=$?
25628   echo "$as_me:25628: \$? = $ac_status" >&5
25629   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25630   { (eval echo "$as_me:25630: \"$ac_try\"") >&5
25631   (eval $ac_try) 2>&5
25632   ac_status=$?
25633   echo "$as_me:25633: \$? = $ac_status" >&5
25634   (exit "$ac_status"); }; }; then
25635   cf_cv_type_of_bool=`cat cf_test.out`
25636                  if test -z "$cf_cv_type_of_bool"; then
25637                    cf_cv_type_of_bool=unknown
25638                  fi
25639 else
25640   echo "$as_me: program exited with status $ac_status" >&5
25641 echo "$as_me: failed program was:" >&5
25642 cat "conftest.$ac_ext" >&5
25643 cf_cv_type_of_bool=unknown
25644 fi
25645 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25646 fi
25647         rm -f cf_test.out
25648
25649 fi
25650 echo "$as_me:25650: result: $cf_cv_type_of_bool" >&5
25651 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25652
25653 if test "$cf_cv_type_of_bool" = unknown ; then
25654         case .$NCURSES_BOOL in
25655         (.auto|.) NCURSES_BOOL=unsigned;;
25656         esac
25657         { echo "$as_me:25657: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25658 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25659         cf_cv_type_of_bool=$NCURSES_BOOL
25660 fi
25661
25662 echo "$as_me:25662: checking for special defines needed for etip.h" >&5
25663 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25664 cf_save_CXXFLAGS="$CXXFLAGS"
25665 cf_result="none"
25666
25667 # etip.h includes ncurses.h which includes ncurses_dll.h
25668 # But ncurses_dll.h is generated - fix here.
25669 test -d include || mkdir include
25670 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
25671
25672 for cf_math in "" MATH_H
25673 do
25674 for cf_excp in "" MATH_EXCEPTION
25675 do
25676         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25677         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25678         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25679 cat >"conftest.$ac_ext" <<_ACEOF
25680 #line 25680 "configure"
25681 #include "confdefs.h"
25682
25683 #include <etip.h.in>
25684
25685 int
25686 main (void)
25687 {
25688
25689   ;
25690   return 0;
25691 }
25692 _ACEOF
25693 rm -f "conftest.$ac_objext"
25694 if { (eval echo "$as_me:25694: \"$ac_compile\"") >&5
25695   (eval $ac_compile) 2>&5
25696   ac_status=$?
25697   echo "$as_me:25697: \$? = $ac_status" >&5
25698   (exit "$ac_status"); } &&
25699          { ac_try='test -s "conftest.$ac_objext"'
25700   { (eval echo "$as_me:25700: \"$ac_try\"") >&5
25701   (eval $ac_try) 2>&5
25702   ac_status=$?
25703   echo "$as_me:25703: \$? = $ac_status" >&5
25704   (exit "$ac_status"); }; }; then
25705
25706         test -n "$cf_math" && cat >>confdefs.h <<EOF
25707 #define ETIP_NEEDS_${cf_math} 1
25708 EOF
25709
25710         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25711 #define ETIP_NEEDS_${cf_excp} 1
25712 EOF
25713
25714         cf_result="$cf_math $cf_excp"
25715         break 2
25716
25717 else
25718   echo "$as_me: failed program was:" >&5
25719 cat "conftest.$ac_ext" >&5
25720 fi
25721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25722 done
25723 done
25724 echo "$as_me:25724: result: $cf_result" >&5
25725 echo "${ECHO_T}$cf_result" >&6
25726 CXXFLAGS="$cf_save_CXXFLAGS"
25727
25728 if test -n "$CXX"; then
25729 echo "$as_me:25729: checking if $CXX accepts parameter initialization" >&5
25730 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25731 if test "${cf_cv_cpp_param_init+set}" = set; then
25732   echo $ECHO_N "(cached) $ECHO_C" >&6
25733 else
25734
25735         ac_ext=cc
25736 ac_cpp='$CXXCPP $CPPFLAGS'
25737 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25738 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25739 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25740 ac_main_return="return"
25741
25742         if test "$cross_compiling" = yes; then
25743   cf_cv_cpp_param_init=unknown
25744 else
25745   cat >"conftest.$ac_ext" <<_ACEOF
25746 #line 25746 "configure"
25747 #include "confdefs.h"
25748
25749 class TEST {
25750 private:
25751         int value;
25752 public:
25753         TEST(int x = 1);
25754         ~TEST();
25755 };
25756
25757 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25758 {
25759         value = x;
25760 }
25761 int main(void) { }
25762
25763 _ACEOF
25764 rm -f "conftest$ac_exeext"
25765 if { (eval echo "$as_me:25765: \"$ac_link\"") >&5
25766   (eval $ac_link) 2>&5
25767   ac_status=$?
25768   echo "$as_me:25768: \$? = $ac_status" >&5
25769   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25770   { (eval echo "$as_me:25770: \"$ac_try\"") >&5
25771   (eval $ac_try) 2>&5
25772   ac_status=$?
25773   echo "$as_me:25773: \$? = $ac_status" >&5
25774   (exit "$ac_status"); }; }; then
25775   cf_cv_cpp_param_init=yes
25776 else
25777   echo "$as_me: program exited with status $ac_status" >&5
25778 echo "$as_me: failed program was:" >&5
25779 cat "conftest.$ac_ext" >&5
25780 cf_cv_cpp_param_init=no
25781 fi
25782 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25783 fi
25784         ac_ext=cc
25785 ac_cpp='$CXXCPP $CPPFLAGS'
25786 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25787 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25788 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25789 ac_main_return="return"
25790
25791 fi
25792 echo "$as_me:25792: result: $cf_cv_cpp_param_init" >&5
25793 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25794 fi
25795 test "$cf_cv_cpp_param_init" = yes &&
25796 cat >>confdefs.h <<\EOF
25797 #define CPP_HAS_PARAM_INIT 1
25798 EOF
25799
25800 if test -n "$CXX"; then
25801
25802 echo "$as_me:25802: checking if $CXX accepts static_cast" >&5
25803 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25804 if test "${cf_cv_cpp_static_cast+set}" = set; then
25805   echo $ECHO_N "(cached) $ECHO_C" >&6
25806 else
25807
25808         ac_ext=cc
25809 ac_cpp='$CXXCPP $CPPFLAGS'
25810 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25811 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25812 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25813 ac_main_return="return"
25814
25815         cat >"conftest.$ac_ext" <<_ACEOF
25816 #line 25816 "configure"
25817 #include "confdefs.h"
25818
25819 class NCursesPanel
25820 {
25821 public:
25822   NCursesPanel(int nlines,
25823                int ncols,
25824                int begin_y = 0,
25825                int begin_x = 0)
25826   {
25827   }
25828   NCursesPanel();
25829   ~NCursesPanel();
25830 };
25831
25832 template<class T> class NCursesUserPanel : public NCursesPanel
25833 {
25834 public:
25835   NCursesUserPanel (int nlines,
25836                     int ncols,
25837                     int begin_y = 0,
25838                     int begin_x = 0,
25839                     const T* p_UserData = static_cast<T*>(0))
25840     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25841   {
25842   };
25843   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25844   {
25845   };
25846
25847   virtual ~NCursesUserPanel() {};
25848 };
25849
25850 int
25851 main (void)
25852 {
25853
25854         const char* p_UserData = static_cast<char*>(0)
25855   ;
25856   return 0;
25857 }
25858 _ACEOF
25859 rm -f "conftest.$ac_objext"
25860 if { (eval echo "$as_me:25860: \"$ac_compile\"") >&5
25861   (eval $ac_compile) 2>&5
25862   ac_status=$?
25863   echo "$as_me:25863: \$? = $ac_status" >&5
25864   (exit "$ac_status"); } &&
25865          { ac_try='test -s "conftest.$ac_objext"'
25866   { (eval echo "$as_me:25866: \"$ac_try\"") >&5
25867   (eval $ac_try) 2>&5
25868   ac_status=$?
25869   echo "$as_me:25869: \$? = $ac_status" >&5
25870   (exit "$ac_status"); }; }; then
25871   cf_cv_cpp_static_cast=yes
25872 else
25873   echo "$as_me: failed program was:" >&5
25874 cat "conftest.$ac_ext" >&5
25875 cf_cv_cpp_static_cast=no
25876 fi
25877 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25878
25879         ac_ext=cc
25880 ac_cpp='$CXXCPP $CPPFLAGS'
25881 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25882 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25883 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25884 ac_main_return="return"
25885
25886 fi
25887 echo "$as_me:25887: result: $cf_cv_cpp_static_cast" >&5
25888 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25889
25890 fi
25891
25892 test "$cf_cv_cpp_static_cast" = yes &&
25893 cat >>confdefs.h <<\EOF
25894 #define CPP_HAS_STATIC_CAST 1
25895 EOF
25896
25897         CXX_AR='$(AR)'
25898         CXX_ARFLAGS='$(ARFLAGS)'
25899         case "$cf_cv_system_name" in
25900         (irix*)
25901             if test "$GXX" != yes ; then
25902                 CXX_AR='$(CXX)'
25903                 CXX_ARFLAGS='-ar -o'
25904             fi
25905             ;;
25906         (sco3.2v5*)
25907             CXXLDFLAGS="-u main"
25908             ;;
25909         (solaris2*)
25910             if test "$GXX" != yes ; then
25911                 CXX_AR='$(CXX)'
25912                 CXX_ARFLAGS='-xar -o'
25913             fi
25914             ;;
25915         esac
25916
25917 else
25918         cf_cxx_library=no
25919         cf_cv_builtin_bool=1
25920
25921         # Just because we are not configuring against C++ right now does not
25922         # mean that a user will not want to use C++.  Some distributors disable
25923         # the C++ portion of this configuration as a shortcut (or just to avoid
25924         # compiling the demo in the c++ directory).  So we need a reasonable
25925         # default for the 'bool' type.
25926         #
25927         # Caveat: since the storage of the bool type is not standardized, it
25928         # may change.
25929
25930         if test "$NCURSES_BOOL" != auto ; then
25931                 cf_cv_type_of_bool=$NCURSES_BOOL
25932                 cf_cv_header_stdbool_h=0
25933         else
25934                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25935
25936 echo "$as_me:25936: checking for bool" >&5
25937 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25938 if test "${ac_cv_type_bool+set}" = set; then
25939   echo $ECHO_N "(cached) $ECHO_C" >&6
25940 else
25941   cat >"conftest.$ac_ext" <<_ACEOF
25942 #line 25942 "configure"
25943 #include "confdefs.h"
25944
25945 #include <stdlib.h>
25946 #include <stdio.h>
25947
25948 #if defined(__cplusplus)
25949
25950 #ifdef HAVE_GXX_BUILTIN_H
25951 #include <g++/builtin.h>
25952 #elif HAVE_GPP_BUILTIN_H
25953 #include <gpp/builtin.h>
25954 #elif HAVE_BUILTIN_H
25955 #include <builtin.h>
25956 #endif
25957
25958 #else
25959
25960 #if $cf_cv_header_stdbool_h
25961 #include <stdbool.h>
25962 #endif
25963
25964 #endif
25965
25966 int
25967 main (void)
25968 {
25969 if ((bool *) 0)
25970   return 0;
25971 if (sizeof (bool))
25972   return 0;
25973   ;
25974   return 0;
25975 }
25976 _ACEOF
25977 rm -f "conftest.$ac_objext"
25978 if { (eval echo "$as_me:25978: \"$ac_compile\"") >&5
25979   (eval $ac_compile) 2>&5
25980   ac_status=$?
25981   echo "$as_me:25981: \$? = $ac_status" >&5
25982   (exit "$ac_status"); } &&
25983          { ac_try='test -s "conftest.$ac_objext"'
25984   { (eval echo "$as_me:25984: \"$ac_try\"") >&5
25985   (eval $ac_try) 2>&5
25986   ac_status=$?
25987   echo "$as_me:25987: \$? = $ac_status" >&5
25988   (exit "$ac_status"); }; }; then
25989   ac_cv_type_bool=yes
25990 else
25991   echo "$as_me: failed program was:" >&5
25992 cat "conftest.$ac_ext" >&5
25993 ac_cv_type_bool=no
25994 fi
25995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25996 fi
25997 echo "$as_me:25997: result: $ac_cv_type_bool" >&5
25998 echo "${ECHO_T}$ac_cv_type_bool" >&6
25999
26000 echo "$as_me:26000: checking size of bool" >&5
26001 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26002 if test "${ac_cv_sizeof_bool+set}" = set; then
26003   echo $ECHO_N "(cached) $ECHO_C" >&6
26004 else
26005   if test "$ac_cv_type_bool" = yes; then
26006   if test "$cross_compiling" = yes; then
26007   # Depending upon the size, compute the lo and hi bounds.
26008 cat >"conftest.$ac_ext" <<_ACEOF
26009 #line 26009 "configure"
26010 #include "confdefs.h"
26011
26012 #include <stdlib.h>
26013 #include <stdio.h>
26014
26015 #if defined(__cplusplus)
26016
26017 #ifdef HAVE_GXX_BUILTIN_H
26018 #include <g++/builtin.h>
26019 #elif HAVE_GPP_BUILTIN_H
26020 #include <gpp/builtin.h>
26021 #elif HAVE_BUILTIN_H
26022 #include <builtin.h>
26023 #endif
26024
26025 #else
26026
26027 #if $cf_cv_header_stdbool_h
26028 #include <stdbool.h>
26029 #endif
26030
26031 #endif
26032
26033 int
26034 main (void)
26035 {
26036 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26037   ;
26038   return 0;
26039 }
26040 _ACEOF
26041 rm -f "conftest.$ac_objext"
26042 if { (eval echo "$as_me:26042: \"$ac_compile\"") >&5
26043   (eval $ac_compile) 2>&5
26044   ac_status=$?
26045   echo "$as_me:26045: \$? = $ac_status" >&5
26046   (exit "$ac_status"); } &&
26047          { ac_try='test -s "conftest.$ac_objext"'
26048   { (eval echo "$as_me:26048: \"$ac_try\"") >&5
26049   (eval $ac_try) 2>&5
26050   ac_status=$?
26051   echo "$as_me:26051: \$? = $ac_status" >&5
26052   (exit "$ac_status"); }; }; then
26053   ac_lo=0 ac_mid=0
26054   while :; do
26055     cat >"conftest.$ac_ext" <<_ACEOF
26056 #line 26056 "configure"
26057 #include "confdefs.h"
26058
26059 #include <stdlib.h>
26060 #include <stdio.h>
26061
26062 #if defined(__cplusplus)
26063
26064 #ifdef HAVE_GXX_BUILTIN_H
26065 #include <g++/builtin.h>
26066 #elif HAVE_GPP_BUILTIN_H
26067 #include <gpp/builtin.h>
26068 #elif HAVE_BUILTIN_H
26069 #include <builtin.h>
26070 #endif
26071
26072 #else
26073
26074 #if $cf_cv_header_stdbool_h
26075 #include <stdbool.h>
26076 #endif
26077
26078 #endif
26079
26080 int
26081 main (void)
26082 {
26083 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26084   ;
26085   return 0;
26086 }
26087 _ACEOF
26088 rm -f "conftest.$ac_objext"
26089 if { (eval echo "$as_me:26089: \"$ac_compile\"") >&5
26090   (eval $ac_compile) 2>&5
26091   ac_status=$?
26092   echo "$as_me:26092: \$? = $ac_status" >&5
26093   (exit "$ac_status"); } &&
26094          { ac_try='test -s "conftest.$ac_objext"'
26095   { (eval echo "$as_me:26095: \"$ac_try\"") >&5
26096   (eval $ac_try) 2>&5
26097   ac_status=$?
26098   echo "$as_me:26098: \$? = $ac_status" >&5
26099   (exit "$ac_status"); }; }; then
26100   ac_hi=$ac_mid; break
26101 else
26102   echo "$as_me: failed program was:" >&5
26103 cat "conftest.$ac_ext" >&5
26104 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26105 fi
26106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26107   done
26108 else
26109   echo "$as_me: failed program was:" >&5
26110 cat "conftest.$ac_ext" >&5
26111 ac_hi=-1 ac_mid=-1
26112   while :; do
26113     cat >"conftest.$ac_ext" <<_ACEOF
26114 #line 26114 "configure"
26115 #include "confdefs.h"
26116
26117 #include <stdlib.h>
26118 #include <stdio.h>
26119
26120 #if defined(__cplusplus)
26121
26122 #ifdef HAVE_GXX_BUILTIN_H
26123 #include <g++/builtin.h>
26124 #elif HAVE_GPP_BUILTIN_H
26125 #include <gpp/builtin.h>
26126 #elif HAVE_BUILTIN_H
26127 #include <builtin.h>
26128 #endif
26129
26130 #else
26131
26132 #if $cf_cv_header_stdbool_h
26133 #include <stdbool.h>
26134 #endif
26135
26136 #endif
26137
26138 int
26139 main (void)
26140 {
26141 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26142   ;
26143   return 0;
26144 }
26145 _ACEOF
26146 rm -f "conftest.$ac_objext"
26147 if { (eval echo "$as_me:26147: \"$ac_compile\"") >&5
26148   (eval $ac_compile) 2>&5
26149   ac_status=$?
26150   echo "$as_me:26150: \$? = $ac_status" >&5
26151   (exit "$ac_status"); } &&
26152          { ac_try='test -s "conftest.$ac_objext"'
26153   { (eval echo "$as_me:26153: \"$ac_try\"") >&5
26154   (eval $ac_try) 2>&5
26155   ac_status=$?
26156   echo "$as_me:26156: \$? = $ac_status" >&5
26157   (exit "$ac_status"); }; }; then
26158   ac_lo=$ac_mid; break
26159 else
26160   echo "$as_me: failed program was:" >&5
26161 cat "conftest.$ac_ext" >&5
26162 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26163 fi
26164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26165   done
26166 fi
26167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26168 # Binary search between lo and hi bounds.
26169 while test "x$ac_lo" != "x$ac_hi"; do
26170   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26171   cat >"conftest.$ac_ext" <<_ACEOF
26172 #line 26172 "configure"
26173 #include "confdefs.h"
26174
26175 #include <stdlib.h>
26176 #include <stdio.h>
26177
26178 #if defined(__cplusplus)
26179
26180 #ifdef HAVE_GXX_BUILTIN_H
26181 #include <g++/builtin.h>
26182 #elif HAVE_GPP_BUILTIN_H
26183 #include <gpp/builtin.h>
26184 #elif HAVE_BUILTIN_H
26185 #include <builtin.h>
26186 #endif
26187
26188 #else
26189
26190 #if $cf_cv_header_stdbool_h
26191 #include <stdbool.h>
26192 #endif
26193
26194 #endif
26195
26196 int
26197 main (void)
26198 {
26199 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26200   ;
26201   return 0;
26202 }
26203 _ACEOF
26204 rm -f "conftest.$ac_objext"
26205 if { (eval echo "$as_me:26205: \"$ac_compile\"") >&5
26206   (eval $ac_compile) 2>&5
26207   ac_status=$?
26208   echo "$as_me:26208: \$? = $ac_status" >&5
26209   (exit "$ac_status"); } &&
26210          { ac_try='test -s "conftest.$ac_objext"'
26211   { (eval echo "$as_me:26211: \"$ac_try\"") >&5
26212   (eval $ac_try) 2>&5
26213   ac_status=$?
26214   echo "$as_me:26214: \$? = $ac_status" >&5
26215   (exit "$ac_status"); }; }; then
26216   ac_hi=$ac_mid
26217 else
26218   echo "$as_me: failed program was:" >&5
26219 cat "conftest.$ac_ext" >&5
26220 ac_lo=`expr "$ac_mid" + 1`
26221 fi
26222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26223 done
26224 ac_cv_sizeof_bool=$ac_lo
26225 else
26226   if test "$cross_compiling" = yes; then
26227   { { echo "$as_me:26227: error: cannot run test program while cross compiling" >&5
26228 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26229    { (exit 1); exit 1; }; }
26230 else
26231   cat >"conftest.$ac_ext" <<_ACEOF
26232 #line 26232 "configure"
26233 #include "confdefs.h"
26234
26235 #include <stdlib.h>
26236 #include <stdio.h>
26237
26238 #if defined(__cplusplus)
26239
26240 #ifdef HAVE_GXX_BUILTIN_H
26241 #include <g++/builtin.h>
26242 #elif HAVE_GPP_BUILTIN_H
26243 #include <gpp/builtin.h>
26244 #elif HAVE_BUILTIN_H
26245 #include <builtin.h>
26246 #endif
26247
26248 #else
26249
26250 #if $cf_cv_header_stdbool_h
26251 #include <stdbool.h>
26252 #endif
26253
26254 #endif
26255
26256 int
26257 main (void)
26258 {
26259 FILE *f = fopen ("conftest.val", "w");
26260 if (!f)
26261   $ac_main_return (1);
26262 fprintf (f, "%ld", (long)(sizeof (bool)));
26263 fclose (f);
26264   ;
26265   return 0;
26266 }
26267 _ACEOF
26268 rm -f "conftest$ac_exeext"
26269 if { (eval echo "$as_me:26269: \"$ac_link\"") >&5
26270   (eval $ac_link) 2>&5
26271   ac_status=$?
26272   echo "$as_me:26272: \$? = $ac_status" >&5
26273   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26274   { (eval echo "$as_me:26274: \"$ac_try\"") >&5
26275   (eval $ac_try) 2>&5
26276   ac_status=$?
26277   echo "$as_me:26277: \$? = $ac_status" >&5
26278   (exit "$ac_status"); }; }; then
26279   ac_cv_sizeof_bool=`cat conftest.val`
26280 else
26281   echo "$as_me: program exited with status $ac_status" >&5
26282 echo "$as_me: failed program was:" >&5
26283 cat "conftest.$ac_ext" >&5
26284 fi
26285 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26286 fi
26287 fi
26288 rm -f conftest.val
26289 else
26290   ac_cv_sizeof_bool=0
26291 fi
26292 fi
26293 echo "$as_me:26293: result: $ac_cv_sizeof_bool" >&5
26294 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26295 cat >>confdefs.h <<EOF
26296 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26297 EOF
26298
26299 echo "$as_me:26299: checking for type of bool" >&5
26300 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26301 if test "${cf_cv_type_of_bool+set}" = set; then
26302   echo $ECHO_N "(cached) $ECHO_C" >&6
26303 else
26304
26305         rm -f cf_test.out
26306         if test "$cross_compiling" = yes; then
26307
26308                 case x$ac_cv_sizeof_bool in
26309                 (x1) cf_cv_type_of_bool="unsigned char";;
26310                 (x2) cf_cv_type_of_bool="unsigned short";;
26311                 (x4) cf_cv_type_of_bool="unsigned int";;
26312                 (x8) cf_cv_type_of_bool="unsigned long";;
26313                 (*)  cf_cv_type_of_bool=unknown;;
26314                 esac
26315
26316 else
26317   cat >"conftest.$ac_ext" <<_ACEOF
26318 #line 26318 "configure"
26319 #include "confdefs.h"
26320
26321 #include <stdlib.h>
26322 #include <stdio.h>
26323
26324 #if defined(__cplusplus)
26325
26326 #ifdef HAVE_GXX_BUILTIN_H
26327 #include <g++/builtin.h>
26328 #elif HAVE_GPP_BUILTIN_H
26329 #include <gpp/builtin.h>
26330 #elif HAVE_BUILTIN_H
26331 #include <builtin.h>
26332 #endif
26333
26334 #else
26335
26336 #if $cf_cv_header_stdbool_h
26337 #include <stdbool.h>
26338 #endif
26339
26340 #endif
26341
26342 int main(void)
26343 {
26344         FILE *fp = fopen("cf_test.out", "w");
26345         if (fp != 0) {
26346                 bool x = true;
26347                 if ((bool)(-x) >= 0)
26348                         fputs("unsigned ", fp);
26349                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26350                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26351                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26352                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26353                 fclose(fp);
26354         }
26355         ${cf_cv_main_return:-return}(0);
26356 }
26357
26358 _ACEOF
26359 rm -f "conftest$ac_exeext"
26360 if { (eval echo "$as_me:26360: \"$ac_link\"") >&5
26361   (eval $ac_link) 2>&5
26362   ac_status=$?
26363   echo "$as_me:26363: \$? = $ac_status" >&5
26364   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26365   { (eval echo "$as_me:26365: \"$ac_try\"") >&5
26366   (eval $ac_try) 2>&5
26367   ac_status=$?
26368   echo "$as_me:26368: \$? = $ac_status" >&5
26369   (exit "$ac_status"); }; }; then
26370   cf_cv_type_of_bool=`cat cf_test.out`
26371                  if test -z "$cf_cv_type_of_bool"; then
26372                    cf_cv_type_of_bool=unknown
26373                  fi
26374 else
26375   echo "$as_me: program exited with status $ac_status" >&5
26376 echo "$as_me: failed program was:" >&5
26377 cat "conftest.$ac_ext" >&5
26378 cf_cv_type_of_bool=unknown
26379 fi
26380 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26381 fi
26382         rm -f cf_test.out
26383
26384 fi
26385 echo "$as_me:26385: result: $cf_cv_type_of_bool" >&5
26386 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26387
26388 if test "$cf_cv_type_of_bool" = unknown ; then
26389         case .$NCURSES_BOOL in
26390         (.auto|.) NCURSES_BOOL=unsigned;;
26391         esac
26392         { echo "$as_me:26392: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26393 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26394         cf_cv_type_of_bool=$NCURSES_BOOL
26395 fi
26396
26397                 else
26398                         echo "$as_me:26398: checking for fallback type of bool" >&5
26399 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26400                         case "$host_cpu" in
26401                         (i?86)  cf_cv_type_of_bool=char ;;
26402                         (*)     cf_cv_type_of_bool=int  ;;
26403                         esac
26404                         echo "$as_me:26404: result: $cf_cv_type_of_bool" >&5
26405 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26406                 fi
26407         fi
26408 fi
26409
26410 # If the C compiler did not declare bool, and we did not determine that the C++
26411 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26412 # ncurses library use the same type as C++ bool.  Note that this allows one to
26413 # specify the type of bool in a configure-script option and postpone
26414 # integration with the C++ compiler provided that the types are compatible.
26415 USE_CXX_BOOL=1
26416 if test "$cf_cv_cc_bool_type" = 1
26417 then
26418         # oops: C has a bool.  Unlikely, but C++ could differ.
26419         USE_CXX_BOOL=0
26420 elif test "$cf_cv_builtin_bool" = 0
26421 then
26422         # C++ has no bool
26423         USE_CXX_BOOL=0
26424 else
26425         # this is the normal case
26426         USE_CXX_BOOL='defined(__cplusplus)'
26427 fi
26428
26429 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26430
26431         if test "$cf_with_ada" != "no" ; then
26432                 if test "$with_libtool" != "no"; then
26433                         { echo "$as_me:26433: WARNING: libtool does not support Ada - disabling feature" >&5
26434 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26435                         cf_with_ada=no
26436                 fi
26437         fi
26438
26439         if test "$cf_with_ada" != "no" ; then
26440
26441 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26442 do
26443
26444 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26445
26446         unset ac_cv_path_cf_TEMP_gnat
26447         unset cf_TEMP_gnat
26448         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26449 set dummy $cf_prog_gnat; ac_word=$2
26450 echo "$as_me:26450: checking for $ac_word" >&5
26451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26452 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26453   echo $ECHO_N "(cached) $ECHO_C" >&6
26454 else
26455   case $cf_TEMP_gnat in
26456   [\\/]* | ?:[\\/]*)
26457   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26458   ;;
26459   *)
26460   ac_save_IFS=$IFS; IFS=$ac_path_separator
26461 ac_dummy="$PATH"
26462 for ac_dir in $ac_dummy; do
26463   IFS=$ac_save_IFS
26464   test -z "$ac_dir" && ac_dir=.
26465   if $as_executable_p "$ac_dir/$ac_word"; then
26466    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26467    echo "$as_me:26467: found $ac_dir/$ac_word" >&5
26468    break
26469 fi
26470 done
26471
26472   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26473   ;;
26474 esac
26475 fi
26476 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26477
26478 if test -n "$cf_TEMP_gnat"; then
26479   echo "$as_me:26479: result: $cf_TEMP_gnat" >&5
26480 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26481 else
26482   echo "$as_me:26482: result: no" >&5
26483 echo "${ECHO_T}no" >&6
26484 fi
26485
26486         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26487
26488         if test "x$cf_TEMP_gnat" != xno; then
26489                 unset cf_cv_gnat_version
26490                 unset cf_TEMP_gnat
26491
26492 echo "$as_me:26492: checking for $cf_prog_gnat version" >&5
26493 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26494 if test "${cf_cv_gnat_version+set}" = set; then
26495   echo $ECHO_N "(cached) $ECHO_C" >&6
26496 else
26497
26498 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26499         grep '[0-9].[0-9][0-9]*' |\
26500         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26501
26502 fi
26503 echo "$as_me:26503: result: $cf_cv_gnat_version" >&5
26504 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26505 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26506 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26507
26508         fi
26509         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26510
26511         unset cf_TEMP_gnat
26512         unset cf_cv_gnat_version
26513         unset ac_cv_path_cf_TEMP_gnat
26514 done
26515
26516 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26517         cf_ada_make=
26518         cf_cv_prog_gnat_correct=no
26519 else
26520         cf_ada_make=gnatmake
26521         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26522                 # gprconfig is newer than gnatmake; we can continue...
26523                 cf_ada_config="##"
26524         else
26525                 rm -rf ./conftest* ./*~conftest*
26526                 if mkdir conftest.src
26527                 then
26528                         cf_ada_config=""
26529                         cd conftest.src
26530                         for cf_gprconfig in Ada C
26531                         do
26532                                 echo "$as_me:26532: checking for gprconfig name for $cf_gprconfig" >&5
26533 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26534                                 if test "$cf_gprconfig" = C
26535                                 then
26536                                         for cf_gprconfig_param in \
26537                                                 "$cf_gprconfig,,,,GNATGCC" \
26538                                                 "$cf_gprconfig,,,,GCC" \
26539                                                 "$cf_gprconfig"
26540                                         do
26541                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26542                                                 test -n "$cf_gprconfig_value" && break
26543                                         done
26544                                 else
26545                                         cf_gprconfig_param=$cf_gprconfig
26546                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26547                                 fi
26548                                 if test -n "$cf_gprconfig_value"
26549                                 then
26550                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26551                                         echo "$as_me:26551: result: $cf_gprconfig_value" >&5
26552 echo "${ECHO_T}$cf_gprconfig_value" >&6
26553                                 else
26554                                         echo "$as_me:26554: result: missing" >&5
26555 echo "${ECHO_T}missing" >&6
26556                                         cf_ada_config="#"
26557                                         break
26558                                 fi
26559                         done
26560                         cd ..
26561                         rm -rf ./conftest* ./*~conftest*
26562                 fi
26563         fi
26564         if test "x$cf_ada_config" != "x#"
26565         then
26566
26567 echo "$as_me:26567: checking for gnat version" >&5
26568 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26569 if test "${cf_cv_gnat_version+set}" = set; then
26570   echo $ECHO_N "(cached) $ECHO_C" >&6
26571 else
26572
26573 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26574         grep '[0-9].[0-9][0-9]*' |\
26575         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26576
26577 fi
26578 echo "$as_me:26578: result: $cf_cv_gnat_version" >&5
26579 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26580 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26581
26582 case "$cf_cv_gnat_version" in
26583 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26584         cf_cv_prog_gnat_correct=yes
26585         ;;
26586 (*)
26587         { echo "$as_me:26587: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26588 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26589         cf_cv_prog_gnat_correct=no
26590         ;;
26591 esac
26592
26593                 # Extract the first word of "m4", so it can be a program name with args.
26594 set dummy m4; ac_word=$2
26595 echo "$as_me:26595: checking for $ac_word" >&5
26596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26597 if test "${ac_cv_prog_M4_exists+set}" = set; then
26598   echo $ECHO_N "(cached) $ECHO_C" >&6
26599 else
26600   if test -n "$M4_exists"; then
26601   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26602 else
26603   ac_save_IFS=$IFS; IFS=$ac_path_separator
26604 ac_dummy="$PATH"
26605 for ac_dir in $ac_dummy; do
26606   IFS=$ac_save_IFS
26607   test -z "$ac_dir" && ac_dir=.
26608   $as_executable_p "$ac_dir/$ac_word" || continue
26609 ac_cv_prog_M4_exists="yes"
26610 echo "$as_me:26610: found $ac_dir/$ac_word" >&5
26611 break
26612 done
26613
26614   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26615 fi
26616 fi
26617 M4_exists=$ac_cv_prog_M4_exists
26618 if test -n "$M4_exists"; then
26619   echo "$as_me:26619: result: $M4_exists" >&5
26620 echo "${ECHO_T}$M4_exists" >&6
26621 else
26622   echo "$as_me:26622: result: no" >&5
26623 echo "${ECHO_T}no" >&6
26624 fi
26625
26626                 if test "$ac_cv_prog_M4_exists" = no; then
26627                         cf_cv_prog_gnat_correct=no
26628                         { echo "$as_me:26628: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26629 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26630                 fi
26631                 if test "$cf_cv_prog_gnat_correct" = yes; then
26632                         echo "$as_me:26632: checking if GNAT works" >&5
26633 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26634
26635 rm -rf ./conftest* ./*~conftest*
26636 cat >>conftest.ads <<CF_EOF
26637 procedure conftest;
26638 CF_EOF
26639 cat >>conftest.adb <<CF_EOF
26640 with Text_IO;
26641 with GNAT.OS_Lib;
26642 procedure conftest is
26643 begin
26644    Text_IO.Put ("Hello World");
26645    Text_IO.New_Line;
26646    GNAT.OS_Lib.OS_Exit (0);
26647 end conftest;
26648 CF_EOF
26649 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26650    if ( ./conftest 1>&5 2>&1 ) ; then
26651       cf_cv_prog_gnat_correct=yes
26652    else
26653       cf_cv_prog_gnat_correct=no
26654    fi
26655 else
26656    cf_cv_prog_gnat_correct=no
26657 fi
26658 rm -rf ./conftest* ./*~conftest*
26659
26660                         echo "$as_me:26660: result: $cf_cv_prog_gnat_correct" >&5
26661 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26662                 fi
26663         else
26664                 cf_cv_prog_gnat_correct=no
26665         fi
26666 fi
26667
26668                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26669
26670         ADAFLAGS="$ADAFLAGS -gnatpn"
26671
26672         echo "$as_me:26672: checking optimization options for ADAFLAGS" >&5
26673 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26674         case "$CFLAGS" in
26675         (*-g*)
26676
26677         ADAFLAGS="$ADAFLAGS -g"
26678
26679                 ;;
26680         esac
26681         case "$CFLAGS" in
26682         (*-O*)
26683                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26684
26685         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26686
26687                 ;;
26688         esac
26689         echo "$as_me:26689: result: $ADAFLAGS" >&5
26690 echo "${ECHO_T}$ADAFLAGS" >&6
26691
26692 echo "$as_me:26692: checking if GNATPREP supports -T option" >&5
26693 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26694 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26695   echo $ECHO_N "(cached) $ECHO_C" >&6
26696 else
26697
26698 cf_cv_gnatprep_opt_t=no
26699 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26700
26701 fi
26702 echo "$as_me:26702: result: $cf_cv_gnatprep_opt_t" >&5
26703 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26704 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26705
26706 echo "$as_me:26706: checking if GNAT supports generics" >&5
26707 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26708 case "$cf_cv_gnat_version" in
26709 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26710         cf_gnat_generics=yes
26711         ;;
26712 (*)
26713         cf_gnat_generics=no
26714         ;;
26715 esac
26716 echo "$as_me:26716: result: $cf_gnat_generics" >&5
26717 echo "${ECHO_T}$cf_gnat_generics" >&6
26718
26719 if test "$cf_gnat_generics" = yes
26720 then
26721         cf_compile_generics=generics
26722         cf_generic_objects="\${GENOBJS}"
26723 else
26724         cf_compile_generics=
26725         cf_generic_objects=
26726 fi
26727
26728 echo "$as_me:26728: checking if GNAT supports SIGINT" >&5
26729 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26730 if test "${cf_cv_gnat_sigint+set}" = set; then
26731   echo $ECHO_N "(cached) $ECHO_C" >&6
26732 else
26733
26734 rm -rf ./conftest* ./*~conftest*
26735 cat >>conftest.ads <<CF_EOF
26736 with Ada.Interrupts.Names;
26737
26738 package ConfTest is
26739
26740    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26741    pragma Unreserve_All_Interrupts;
26742    pragma Warnings (On);
26743
26744    protected Process is
26745       procedure Stop;
26746       function Continue return Boolean;
26747       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26748    private
26749       Done : Boolean := False;
26750    end Process;
26751
26752 end ConfTest;
26753 CF_EOF
26754 cat >>conftest.adb <<CF_EOF
26755 package body ConfTest is
26756    protected body Process is
26757       procedure Stop is
26758       begin
26759          Done := True;
26760       end Stop;
26761       function Continue return Boolean is
26762       begin
26763          return not Done;
26764       end Continue;
26765    end Process;
26766 end ConfTest;
26767 CF_EOF
26768 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26769       cf_cv_gnat_sigint=yes
26770 else
26771    cf_cv_gnat_sigint=no
26772 fi
26773 rm -rf ./conftest* ./*~conftest*
26774
26775 fi
26776 echo "$as_me:26776: result: $cf_cv_gnat_sigint" >&5
26777 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26778
26779 if test "$cf_cv_gnat_sigint" = yes ; then
26780         USE_GNAT_SIGINT=""
26781 else
26782         USE_GNAT_SIGINT="#"
26783 fi
26784
26785 cf_gnat_libraries=no
26786 cf_gnat_projects=no
26787
26788 if test "$enable_gnat_projects" != no ; then
26789 echo "$as_me:26789: checking if GNAT supports project files" >&5
26790 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26791 case "$cf_cv_gnat_version" in
26792 (3.[0-9]*)
26793         ;;
26794 (*)
26795         case "$cf_cv_system_name" in
26796         (cygwin*|msys*)
26797                 ;;
26798         (*)
26799                 rm -rf ./conftest* ./*~conftest*
26800                 if mkdir conftest.src conftest.bin conftest.lib
26801                 then
26802                         cd conftest.src
26803                         rm -rf ./conftest* ./*~conftest*
26804                         cat >>library.gpr <<CF_EOF
26805 project Library is
26806   Kind := External ("LIB_KIND");
26807   for Library_Name use "ConfTest";
26808   for Object_Dir use ".";
26809   for Library_ALI_Dir use External("LIBRARY_DIR");
26810   for Library_Version use External ("SONAME");
26811   for Library_Kind use Kind;
26812   for Library_Dir use External("BUILD_DIR");
26813   Source_Dir := External ("SOURCE_DIR");
26814   for Source_Dirs use (Source_Dir);
26815 end Library;
26816 CF_EOF
26817                         cat >>confpackage.ads <<CF_EOF
26818 package ConfPackage is
26819    procedure conftest;
26820 end ConfPackage;
26821 CF_EOF
26822                         cat >>confpackage.adb <<CF_EOF
26823 with Text_IO;
26824 package body ConfPackage is
26825    procedure conftest is
26826    begin
26827       Text_IO.Put ("Hello World");
26828       Text_IO.New_Line;
26829    end conftest;
26830 end ConfPackage;
26831 CF_EOF
26832                         if ( "$cf_ada_make" $ADAFLAGS \
26833                                         -Plibrary.gpr \
26834                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26835                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26836                                         -XSOURCE_DIR="`pwd`" \
26837                                         -XSONAME=libConfTest.so.1 \
26838                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26839                                 cf_gnat_projects=yes
26840                         fi
26841                         cd ..
26842                 fi
26843                 if test -f conftest.lib/confpackage.ali
26844                 then
26845                         cf_gnat_libraries=yes
26846                 fi
26847                 rm -rf ./conftest* ./*~conftest*
26848                 ;;
26849         esac
26850         ;;
26851 esac
26852 echo "$as_me:26852: result: $cf_gnat_projects" >&5
26853 echo "${ECHO_T}$cf_gnat_projects" >&6
26854 fi # enable_gnat_projects
26855
26856 if test "$cf_gnat_projects" = yes
26857 then
26858         echo "$as_me:26858: checking if GNAT supports libraries" >&5
26859 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26860         echo "$as_me:26860: result: $cf_gnat_libraries" >&5
26861 echo "${ECHO_T}$cf_gnat_libraries" >&6
26862 fi
26863
26864 USE_OLD_MAKERULES=""
26865 USE_GNAT_PROJECTS="#"
26866 USE_GNAT_MAKE_GPR="#"
26867 USE_GNAT_GPRBUILD="#"
26868
26869 if test "$cf_gnat_projects" = yes
26870 then
26871         USE_OLD_MAKERULES="#"
26872         USE_GNAT_PROJECTS=""
26873         if test "$cf_cv_VERSION_GPRBUILD" != no
26874         then
26875                 USE_GNAT_GPRBUILD=""
26876         elif test "$cf_cv_VERSION_GNATMAKE" != no
26877         then
26878                 USE_GNAT_MAKE_GPR=""
26879         else
26880                 { echo "$as_me:26880: WARNING: use old makefile rules since tools are missing" >&5
26881 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26882         fi
26883 fi
26884
26885 if test "$cf_gnat_libraries" = yes
26886 then
26887         USE_GNAT_LIBRARIES=""
26888 else
26889         USE_GNAT_LIBRARIES="#"
26890 fi
26891
26892 echo "$as_me:26892: checking for ada-compiler" >&5
26893 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26894
26895 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26896 if test "${with_ada_compiler+set}" = set; then
26897   withval="$with_ada_compiler"
26898   cf_ada_compiler=$withval
26899 else
26900   cf_ada_compiler=gnatmake
26901 fi;
26902
26903 echo "$as_me:26903: result: $cf_ada_compiler" >&5
26904 echo "${ECHO_T}$cf_ada_compiler" >&6
26905
26906                         cf_ada_package=terminal_interface
26907
26908 echo "$as_me:26908: checking for ada-include" >&5
26909 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26910
26911 # Check whether --with-ada-include or --without-ada-include was given.
26912 if test "${with_ada_include+set}" = set; then
26913   withval="$with_ada_include"
26914
26915 else
26916   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26917 fi; if test -n "$prefix/share/ada/adainclude" ; then
26918
26919 if test "x$prefix" != xNONE; then
26920         cf_path_syntax="$prefix"
26921 else
26922         cf_path_syntax="$ac_default_prefix"
26923 fi
26924
26925 case ".$withval" in
26926 (.\$\(*\)*|.\'*\'*)
26927         ;;
26928 (..|./*|.\\*)
26929         ;;
26930 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26931         ;;
26932 (.\$\{*prefix\}*|.\$\{*dir\}*)
26933         eval withval="$withval"
26934         case ".$withval" in
26935         (.NONE/*)
26936                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26937                 ;;
26938         esac
26939         ;;
26940 (.no|.NONE/*)
26941         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26942         ;;
26943 (*)
26944         { { echo "$as_me:26944: error: expected a pathname, not \"$withval\"" >&5
26945 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26946    { (exit 1); exit 1; }; }
26947         ;;
26948 esac
26949
26950 fi
26951 eval ADA_INCLUDE="$withval"
26952
26953 echo "$as_me:26953: result: $ADA_INCLUDE" >&5
26954 echo "${ECHO_T}$ADA_INCLUDE" >&6
26955
26956 echo "$as_me:26956: checking for ada-objects" >&5
26957 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26958
26959 # Check whether --with-ada-objects or --without-ada-objects was given.
26960 if test "${with_ada_objects+set}" = set; then
26961   withval="$with_ada_objects"
26962
26963 else
26964   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26965 fi; if test -n "$prefix/lib/ada/adalib" ; then
26966
26967 if test "x$prefix" != xNONE; then
26968         cf_path_syntax="$prefix"
26969 else
26970         cf_path_syntax="$ac_default_prefix"
26971 fi
26972
26973 case ".$withval" in
26974 (.\$\(*\)*|.\'*\'*)
26975         ;;
26976 (..|./*|.\\*)
26977         ;;
26978 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26979         ;;
26980 (.\$\{*prefix\}*|.\$\{*dir\}*)
26981         eval withval="$withval"
26982         case ".$withval" in
26983         (.NONE/*)
26984                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26985                 ;;
26986         esac
26987         ;;
26988 (.no|.NONE/*)
26989         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26990         ;;
26991 (*)
26992         { { echo "$as_me:26992: error: expected a pathname, not \"$withval\"" >&5
26993 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26994    { (exit 1); exit 1; }; }
26995         ;;
26996 esac
26997
26998 fi
26999 eval ADA_OBJECTS="$withval"
27000
27001 echo "$as_me:27001: result: $ADA_OBJECTS" >&5
27002 echo "${ECHO_T}$ADA_OBJECTS" >&6
27003
27004 echo "$as_me:27004: checking if an Ada95 shared-library should be built" >&5
27005 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27006
27007 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27008 if test "${with_ada_sharedlib+set}" = set; then
27009   withval="$with_ada_sharedlib"
27010   with_ada_sharedlib=$withval
27011 else
27012   with_ada_sharedlib=no
27013 fi;
27014 echo "$as_me:27014: result: $with_ada_sharedlib" >&5
27015 echo "${ECHO_T}$with_ada_sharedlib" >&6
27016
27017 if test "x$with_ada_sharedlib" != xno
27018 then
27019         if test "x$cf_gnat_projects" != xyes
27020         then
27021                 { echo "$as_me:27021: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27022 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27023                 with_ada_sharedlib=no
27024         fi
27025 fi
27026
27027 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27028 MAKE_ADA_SHAREDLIB="#"
27029
27030 if test "x$with_ada_sharedlib" != xno
27031 then
27032         MAKE_ADA_SHAREDLIB=
27033         if test "x$with_ada_sharedlib" != xyes
27034         then
27035                 ADA_SHAREDLIB="$with_ada_sharedlib"
27036         fi
27037 fi
27038
27039                         # allow the Ada binding to be renamed
27040
27041 echo "$as_me:27041: checking for ada-libname" >&5
27042 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27043
27044 # Check whether --with-ada-libname or --without-ada-libname was given.
27045 if test "${with_ada_libname+set}" = set; then
27046   withval="$with_ada_libname"
27047   ADA_LIBNAME=$withval
27048 else
27049   ADA_LIBNAME=AdaCurses
27050 fi;
27051 case "x$ADA_LIBNAME" in
27052 (x|xyes|xno)
27053         ADA_LIBNAME=AdaCurses
27054         ;;
27055 esac
27056
27057 echo "$as_me:27057: result: $ADA_LIBNAME" >&5
27058 echo "${ECHO_T}$ADA_LIBNAME" >&6
27059
27060                 fi
27061         fi
27062 else
27063         cf_with_ada=no
27064 fi
27065
27066 # do this "late" to avoid conflict with header-checks
27067 if test "x$with_widec" = xyes ; then
27068         echo "$as_me:27068: checking for wchar_t" >&5
27069 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27070 if test "${ac_cv_type_wchar_t+set}" = set; then
27071   echo $ECHO_N "(cached) $ECHO_C" >&6
27072 else
27073   cat >"conftest.$ac_ext" <<_ACEOF
27074 #line 27074 "configure"
27075 #include "confdefs.h"
27076 $ac_includes_default
27077 int
27078 main (void)
27079 {
27080 if ((wchar_t *) 0)
27081   return 0;
27082 if (sizeof (wchar_t))
27083   return 0;
27084   ;
27085   return 0;
27086 }
27087 _ACEOF
27088 rm -f "conftest.$ac_objext"
27089 if { (eval echo "$as_me:27089: \"$ac_compile\"") >&5
27090   (eval $ac_compile) 2>&5
27091   ac_status=$?
27092   echo "$as_me:27092: \$? = $ac_status" >&5
27093   (exit "$ac_status"); } &&
27094          { ac_try='test -s "conftest.$ac_objext"'
27095   { (eval echo "$as_me:27095: \"$ac_try\"") >&5
27096   (eval $ac_try) 2>&5
27097   ac_status=$?
27098   echo "$as_me:27098: \$? = $ac_status" >&5
27099   (exit "$ac_status"); }; }; then
27100   ac_cv_type_wchar_t=yes
27101 else
27102   echo "$as_me: failed program was:" >&5
27103 cat "conftest.$ac_ext" >&5
27104 ac_cv_type_wchar_t=no
27105 fi
27106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27107 fi
27108 echo "$as_me:27108: result: $ac_cv_type_wchar_t" >&5
27109 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27110
27111 echo "$as_me:27111: checking size of wchar_t" >&5
27112 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27113 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27114   echo $ECHO_N "(cached) $ECHO_C" >&6
27115 else
27116   if test "$ac_cv_type_wchar_t" = yes; then
27117   if test "$cross_compiling" = yes; then
27118   # Depending upon the size, compute the lo and hi bounds.
27119 cat >"conftest.$ac_ext" <<_ACEOF
27120 #line 27120 "configure"
27121 #include "confdefs.h"
27122 $ac_includes_default
27123 int
27124 main (void)
27125 {
27126 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27127   ;
27128   return 0;
27129 }
27130 _ACEOF
27131 rm -f "conftest.$ac_objext"
27132 if { (eval echo "$as_me:27132: \"$ac_compile\"") >&5
27133   (eval $ac_compile) 2>&5
27134   ac_status=$?
27135   echo "$as_me:27135: \$? = $ac_status" >&5
27136   (exit "$ac_status"); } &&
27137          { ac_try='test -s "conftest.$ac_objext"'
27138   { (eval echo "$as_me:27138: \"$ac_try\"") >&5
27139   (eval $ac_try) 2>&5
27140   ac_status=$?
27141   echo "$as_me:27141: \$? = $ac_status" >&5
27142   (exit "$ac_status"); }; }; then
27143   ac_lo=0 ac_mid=0
27144   while :; do
27145     cat >"conftest.$ac_ext" <<_ACEOF
27146 #line 27146 "configure"
27147 #include "confdefs.h"
27148 $ac_includes_default
27149 int
27150 main (void)
27151 {
27152 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27153   ;
27154   return 0;
27155 }
27156 _ACEOF
27157 rm -f "conftest.$ac_objext"
27158 if { (eval echo "$as_me:27158: \"$ac_compile\"") >&5
27159   (eval $ac_compile) 2>&5
27160   ac_status=$?
27161   echo "$as_me:27161: \$? = $ac_status" >&5
27162   (exit "$ac_status"); } &&
27163          { ac_try='test -s "conftest.$ac_objext"'
27164   { (eval echo "$as_me:27164: \"$ac_try\"") >&5
27165   (eval $ac_try) 2>&5
27166   ac_status=$?
27167   echo "$as_me:27167: \$? = $ac_status" >&5
27168   (exit "$ac_status"); }; }; then
27169   ac_hi=$ac_mid; break
27170 else
27171   echo "$as_me: failed program was:" >&5
27172 cat "conftest.$ac_ext" >&5
27173 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27174 fi
27175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27176   done
27177 else
27178   echo "$as_me: failed program was:" >&5
27179 cat "conftest.$ac_ext" >&5
27180 ac_hi=-1 ac_mid=-1
27181   while :; do
27182     cat >"conftest.$ac_ext" <<_ACEOF
27183 #line 27183 "configure"
27184 #include "confdefs.h"
27185 $ac_includes_default
27186 int
27187 main (void)
27188 {
27189 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27190   ;
27191   return 0;
27192 }
27193 _ACEOF
27194 rm -f "conftest.$ac_objext"
27195 if { (eval echo "$as_me:27195: \"$ac_compile\"") >&5
27196   (eval $ac_compile) 2>&5
27197   ac_status=$?
27198   echo "$as_me:27198: \$? = $ac_status" >&5
27199   (exit "$ac_status"); } &&
27200          { ac_try='test -s "conftest.$ac_objext"'
27201   { (eval echo "$as_me:27201: \"$ac_try\"") >&5
27202   (eval $ac_try) 2>&5
27203   ac_status=$?
27204   echo "$as_me:27204: \$? = $ac_status" >&5
27205   (exit "$ac_status"); }; }; then
27206   ac_lo=$ac_mid; break
27207 else
27208   echo "$as_me: failed program was:" >&5
27209 cat "conftest.$ac_ext" >&5
27210 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27211 fi
27212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27213   done
27214 fi
27215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27216 # Binary search between lo and hi bounds.
27217 while test "x$ac_lo" != "x$ac_hi"; do
27218   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27219   cat >"conftest.$ac_ext" <<_ACEOF
27220 #line 27220 "configure"
27221 #include "confdefs.h"
27222 $ac_includes_default
27223 int
27224 main (void)
27225 {
27226 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27227   ;
27228   return 0;
27229 }
27230 _ACEOF
27231 rm -f "conftest.$ac_objext"
27232 if { (eval echo "$as_me:27232: \"$ac_compile\"") >&5
27233   (eval $ac_compile) 2>&5
27234   ac_status=$?
27235   echo "$as_me:27235: \$? = $ac_status" >&5
27236   (exit "$ac_status"); } &&
27237          { ac_try='test -s "conftest.$ac_objext"'
27238   { (eval echo "$as_me:27238: \"$ac_try\"") >&5
27239   (eval $ac_try) 2>&5
27240   ac_status=$?
27241   echo "$as_me:27241: \$? = $ac_status" >&5
27242   (exit "$ac_status"); }; }; then
27243   ac_hi=$ac_mid
27244 else
27245   echo "$as_me: failed program was:" >&5
27246 cat "conftest.$ac_ext" >&5
27247 ac_lo=`expr "$ac_mid" + 1`
27248 fi
27249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27250 done
27251 ac_cv_sizeof_wchar_t=$ac_lo
27252 else
27253   if test "$cross_compiling" = yes; then
27254   { { echo "$as_me:27254: error: cannot run test program while cross compiling" >&5
27255 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27256    { (exit 1); exit 1; }; }
27257 else
27258   cat >"conftest.$ac_ext" <<_ACEOF
27259 #line 27259 "configure"
27260 #include "confdefs.h"
27261 $ac_includes_default
27262 int
27263 main (void)
27264 {
27265 FILE *f = fopen ("conftest.val", "w");
27266 if (!f)
27267   $ac_main_return (1);
27268 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27269 fclose (f);
27270   ;
27271   return 0;
27272 }
27273 _ACEOF
27274 rm -f "conftest$ac_exeext"
27275 if { (eval echo "$as_me:27275: \"$ac_link\"") >&5
27276   (eval $ac_link) 2>&5
27277   ac_status=$?
27278   echo "$as_me:27278: \$? = $ac_status" >&5
27279   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27280   { (eval echo "$as_me:27280: \"$ac_try\"") >&5
27281   (eval $ac_try) 2>&5
27282   ac_status=$?
27283   echo "$as_me:27283: \$? = $ac_status" >&5
27284   (exit "$ac_status"); }; }; then
27285   ac_cv_sizeof_wchar_t=`cat conftest.val`
27286 else
27287   echo "$as_me: program exited with status $ac_status" >&5
27288 echo "$as_me: failed program was:" >&5
27289 cat "conftest.$ac_ext" >&5
27290 fi
27291 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27292 fi
27293 fi
27294 rm -f conftest.val
27295 else
27296   ac_cv_sizeof_wchar_t=0
27297 fi
27298 fi
27299 echo "$as_me:27299: result: $ac_cv_sizeof_wchar_t" >&5
27300 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27301 cat >>confdefs.h <<EOF
27302 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27303 EOF
27304
27305         # cross-compiling to mingw can run into the problem that attempting to
27306         # link with the regex library fails, causing the test to not set this to
27307         # a number.  "recent" autoconf does not address this problem either -TD
27308         if test -z "$ac_cv_sizeof_wchar_t"
27309         then
27310                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27311
27312 echo "${as_me:-configure}:27312: testing test failed (assume 2) ..." 1>&5
27313
27314                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27315                 mv confdefs.tmp confdefs.h
27316                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27317         fi
27318 fi
27319
27320 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27321 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27322 ###
27323 ### ticlib modules may be a separate library, otherwise contained in termlib.
27324 ### termlib modules may be a separate library, otherwise contained in ncurses.
27325 ###
27326 ### The of "+" or " " between the tokens controls the way the script
27327 ### chooses to split module lists into libraries.
27328 ###
27329 ### (see CF_LIB_RULES).
27330 echo "$as_me:27330: checking for library subsets" >&5
27331 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27332 LIB_SUBSETS=
27333
27334 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27335         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27336         if test "$with_ticlib" != no ; then
27337                 LIB_SUBSETS="${LIB_SUBSETS} "
27338         else
27339                 LIB_SUBSETS="${LIB_SUBSETS}+"
27340         fi
27341 fi
27342
27343 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27344 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27345
27346 if test "$with_termlib" != no ; then
27347         LIB_SUBSETS="${LIB_SUBSETS} "
27348 else
27349         LIB_SUBSETS="${LIB_SUBSETS}+"
27350 fi
27351
27352 LIB_SUBSETS="${LIB_SUBSETS}base"
27353
27354 # Most term-driver calls are to tinfo, but some like init_pair are to the
27355 # base library (so it resides in base).
27356 if test "$with_term_driver" != no ; then
27357         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27358         case "$cf_cv_system_name" in
27359         (*mingw32*|*mingw64*)
27360                 if test "x$with_exp_win32" = xyes ; then
27361                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27362                 else
27363                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27364                 fi
27365                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27366                 ;;
27367         (*)
27368                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27369                 ;;
27370         esac
27371 elif test "x$with_exp_win32" = xyes ; then
27372         case "$cf_cv_system_name" in
27373         (*mingw32*|*mingw64*)
27374                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27375                 ;;
27376         (*)
27377                 ;;
27378         esac
27379 fi
27380
27381 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27382 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27383
27384 echo "$as_me:27384: result: $LIB_SUBSETS" >&5
27385 echo "${ECHO_T}$LIB_SUBSETS" >&6
27386
27387 ### Construct the list of include-directories to be generated
27388
27389 if test "$srcdir" != "."; then
27390         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27391 fi
27392 CPPFLAGS="-I../include $CPPFLAGS"
27393 if test "$srcdir" != "."; then
27394         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27395 fi
27396 CPPFLAGS="-I. $CPPFLAGS"
27397
27398 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27399 if test "$srcdir" != "."; then
27400         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27401 fi
27402 if test "$GCC" != yes; then
27403         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27404 elif test "$includedir" != "/usr/include"; then
27405         if test "$includedir" = '${prefix}/include' ; then
27406                 if test x$prefix != x/usr ; then
27407                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27408                 fi
27409         else
27410                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27411         fi
27412 fi
27413
27414 ### Build up pieces for makefile rules
27415 echo "$as_me:27415: checking default library suffix" >&5
27416 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27417
27418         case $DFT_LWR_MODEL in
27419         (libtool) DFT_ARG_SUFFIX=''   ;;
27420         (normal)  DFT_ARG_SUFFIX=''   ;;
27421         (debug)   DFT_ARG_SUFFIX='_g' ;;
27422         (profile) DFT_ARG_SUFFIX='_p' ;;
27423         (shared)  DFT_ARG_SUFFIX=''   ;;
27424         esac
27425         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27426 echo "$as_me:27426: result: $DFT_ARG_SUFFIX" >&5
27427 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27428
27429 echo "$as_me:27429: checking default library-dependency suffix" >&5
27430 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27431
27432         case X$DFT_LWR_MODEL in
27433         (Xlibtool)
27434                 DFT_LIB_SUFFIX='.la'
27435                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27436                 ;;
27437         (Xdebug)
27438                 case "$cf_cv_system_name" in
27439                 (*-msvc*)
27440                         DFT_LIB_SUFFIX='_g.lib'
27441                         ;;
27442                 (*)
27443                         DFT_LIB_SUFFIX='_g.a'
27444                         ;;
27445                 esac
27446                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27447                 ;;
27448         (Xprofile)
27449                 case "$cf_cv_system_name" in
27450                 (*-msvc*)
27451                         DFT_LIB_SUFFIX='_p.lib'
27452                         ;;
27453                 (*)
27454                         DFT_LIB_SUFFIX='_p.a'
27455                         ;;
27456                 esac
27457                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27458                 ;;
27459         (Xshared)
27460                 case "$cf_cv_system_name" in
27461                 (aix[5-7]*)
27462                         DFT_LIB_SUFFIX='.so'
27463                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27464                         ;;
27465                 (*-msvc*)
27466                         DFT_LIB_SUFFIX='.dll'
27467                         DFT_DEP_SUFFIX='.dll.lib'
27468                         ;;
27469                 (cygwin*|msys*|mingw*)
27470                         DFT_LIB_SUFFIX='.dll'
27471                         DFT_DEP_SUFFIX='.dll.a'
27472                         ;;
27473                 (darwin*)
27474                         DFT_LIB_SUFFIX='.dylib'
27475                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27476                         ;;
27477                 (hpux*)
27478                         case "$target" in
27479                         (ia64*)
27480                                 DFT_LIB_SUFFIX='.so'
27481                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27482                                 ;;
27483                         (*)
27484                                 DFT_LIB_SUFFIX='.sl'
27485                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27486                                 ;;
27487                         esac
27488                         ;;
27489                 (*)
27490                         DFT_LIB_SUFFIX='.so'
27491                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27492                         ;;
27493                 esac
27494                 ;;
27495         (*)
27496                 case "$target" in
27497                 (*-msvc*)
27498                         DFT_LIB_SUFFIX='.lib'
27499                         ;;
27500                 (*)
27501                         DFT_LIB_SUFFIX='.a'
27502                         ;;
27503                 esac
27504                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27505                 ;;
27506         esac
27507         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27508         then
27509                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27510                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27511         fi
27512 echo "$as_me:27512: result: $DFT_DEP_SUFFIX" >&5
27513 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27514
27515 echo "$as_me:27515: checking default object directory" >&5
27516 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27517
27518         case $DFT_LWR_MODEL in
27519         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27520         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27521         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27522         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27523         (shared)
27524                 case "$cf_cv_system_name" in
27525                 (cygwin|msys)
27526                         DFT_OBJ_SUBDIR='objects' ;;
27527                 (*)
27528                         DFT_OBJ_SUBDIR='obj_s' ;;
27529                 esac
27530         esac
27531 echo "$as_me:27531: result: $DFT_OBJ_SUBDIR" >&5
27532 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27533
27534 if test "x$cf_with_cxx" = xyes ; then
27535 echo "$as_me:27535: checking c++ library-dependency suffix" >&5
27536 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27537 if test "$with_libtool" != "no"; then
27538         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27539         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27540 elif test "$with_shared_cxx" != "no"; then
27541         # also for g++ users...
27542         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27543 else
27544         # we normally make a static library because C/C++ library rules differ
27545
27546         case Xnormal in
27547         (Xlibtool)
27548                 CXX_LIB_SUFFIX='.la'
27549                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27550                 ;;
27551         (Xdebug)
27552                 case "$cf_cv_system_name" in
27553                 (*-msvc*)
27554                         CXX_LIB_SUFFIX='_g.lib'
27555                         ;;
27556                 (*)
27557                         CXX_LIB_SUFFIX='_g.a'
27558                         ;;
27559                 esac
27560                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27561                 ;;
27562         (Xprofile)
27563                 case "$cf_cv_system_name" in
27564                 (*-msvc*)
27565                         CXX_LIB_SUFFIX='_p.lib'
27566                         ;;
27567                 (*)
27568                         CXX_LIB_SUFFIX='_p.a'
27569                         ;;
27570                 esac
27571                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27572                 ;;
27573         (Xshared)
27574                 case "$cf_cv_system_name" in
27575                 (aix[5-7]*)
27576                         CXX_LIB_SUFFIX='.so'
27577                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27578                         ;;
27579                 (*-msvc*)
27580                         CXX_LIB_SUFFIX='.dll'
27581                         CXX_DEP_SUFFIX='.dll.lib'
27582                         ;;
27583                 (cygwin*|msys*|mingw*)
27584                         CXX_LIB_SUFFIX='.dll'
27585                         CXX_DEP_SUFFIX='.dll.a'
27586                         ;;
27587                 (darwin*)
27588                         CXX_LIB_SUFFIX='.dylib'
27589                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27590                         ;;
27591                 (hpux*)
27592                         case "$target" in
27593                         (ia64*)
27594                                 CXX_LIB_SUFFIX='.so'
27595                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27596                                 ;;
27597                         (*)
27598                                 CXX_LIB_SUFFIX='.sl'
27599                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27600                                 ;;
27601                         esac
27602                         ;;
27603                 (*)
27604                         CXX_LIB_SUFFIX='.so'
27605                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27606                         ;;
27607                 esac
27608                 ;;
27609         (*)
27610                 case "$target" in
27611                 (*-msvc*)
27612                         CXX_LIB_SUFFIX='.lib'
27613                         ;;
27614                 (*)
27615                         CXX_LIB_SUFFIX='.a'
27616                         ;;
27617                 esac
27618                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27619                 ;;
27620         esac
27621         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27622         then
27623                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27624                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27625         fi
27626
27627 fi
27628 echo "$as_me:27628: result: $CXX_LIB_SUFFIX" >&5
27629 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27630
27631 fi
27632
27633 # do not want -ldl in build except as needed for -lncurses dependency
27634 if test "x$with_dlsym" = xyes ; then
27635 if test "$DFT_LWR_MODEL" = shared || \
27636    test "$DFT_LWR_MODEL" = libtool ; then
27637
27638 # remove dl library from $LIBS
27639 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27640
27641 fi
27642 fi
27643 ### Set up low-level terminfo dependencies for makefiles.
27644
27645 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27646 # do not need libdl
27647 TICS_LIST=
27648 if test "x$with_dlsym" = xyes ; then
27649
27650 # remove dl library from $SHLIB_LIST
27651 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27652
27653 fi
27654
27655 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27656 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27657 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27658 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27659 then
27660         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27661 fi
27662
27663 if test "$with_ticlib" != no ; then
27664
27665         if test "x$with_ticlib" != xyes ; then
27666                 TICS_NAME=$with_ticlib
27667                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27668                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27669                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27670                 TICS_LIB_SUFFIX="${with_ticlib}"
27671         else
27672                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27673                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27674                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27675                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27676         fi
27677         TICS_LDFLAGS="-L${LIB_DIR}"
27678         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27679 else
27680         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27681         TICS_LDFLAGS="-L${LIB_DIR}"
27682         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27683 fi
27684
27685 if test "$with_termlib" != no ; then
27686
27687         if test "x$with_termlib" != xyes ; then
27688                 TINFO_NAME=$with_termlib
27689                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27690                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27691                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27692                 TINFO_LIB_SUFFIX="${with_termlib}"
27693         else
27694                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27695                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27696                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27697                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27698         fi
27699
27700         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27701         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27702         if test "$DFT_LWR_MODEL" = "libtool"; then
27703                 TEST_ARGS="${TEST_DEPS}"
27704                 TEST_ARG2="${TEST_DEP2}"
27705                 TINFO_LDFLAGS="-L${LIB_DIR}"
27706                 TINFO_LIBS="$TEST_ARGS"
27707                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27708                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27709         else
27710                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27711                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27712                 if test "x$with_term_driver" != xno ; then
27713                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27714                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27715                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27716                 else
27717                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27718                         TINFO_LIBS="$TEST_ARGS"
27719                 fi
27720                 TINFO_LDFLAGS="-L${LIB_DIR}"
27721                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27722         fi
27723 else
27724         # the next lines are needed for linking libtic over libncurses
27725         TINFO_NAME=${LIB_NAME}
27726         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27727         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27728         if test "x$with_tic_depends" = xyes ; then
27729                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27730         else
27731                 TICS_LIST="$SHLIB_LIST"
27732         fi
27733
27734         TINFO_LDFLAGS="-L${LIB_DIR}"
27735         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27736 fi
27737
27738 if test "$DFT_LWR_MODEL" = shared ; then
27739         case "$cf_cv_system_name" in
27740         (cygwin*|msys*)
27741                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27742                 TINFO_SUFFIX=.dll
27743                 ;;
27744         esac
27745 fi
27746
27747 if test "x$with_dlsym" = xyes ; then
27748
27749 # remove dl library from $TICS_LIST
27750 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27751
27752 fi
27753
27754 if test "$DFT_LWR_MODEL" = "libtool"; then
27755         OBJEXT=lo
27756 fi
27757
27758 # needed for Ada95
27759 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27760
27761 case "$DFT_LWR_MODEL" in
27762 (normal|debug|profile)
27763
27764 if test "$GCC" = yes ; then
27765         case "$cf_cv_system_name" in
27766         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27767                 LDFLAGS_STATIC=
27768                 LDFLAGS_SHARED=
27769                 ;;
27770         (*)     # normally, except when broken
27771                 LDFLAGS_STATIC=-static
27772                 LDFLAGS_SHARED=-dynamic
27773                 ;;
27774         esac
27775 else
27776         case "$cf_cv_system_name" in
27777         (aix[4-7]*)     # from ld manpage
27778                 LDFLAGS_STATIC=-bstatic
27779                 LDFLAGS_SHARED=-bdynamic
27780                 ;;
27781         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27782                 # We could also use just "archive" and "shared".
27783                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27784                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27785                 ;;
27786         (irix*)         # from ld manpage IRIX64
27787                 LDFLAGS_STATIC=-Bstatic
27788                 LDFLAGS_SHARED=-Bdynamic
27789                 ;;
27790         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27791                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27792                 LDFLAGS_STATIC=-noso
27793                 LDFLAGS_SHARED=-so_archive
27794                 ;;
27795         (solaris2*)
27796                 LDFLAGS_STATIC=-Bstatic
27797                 LDFLAGS_SHARED=-Bdynamic
27798                 ;;
27799         esac
27800 fi
27801
27802 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27803 then
27804         echo "$as_me:27804: checking if linker supports switching between static/dynamic" >&5
27805 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27806
27807         rm -f libconftest.a
27808         cat >conftest.$ac_ext <<EOF
27809 #line 27809 "configure"
27810 #include <stdio.h>
27811 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27812 EOF
27813         if { (eval echo "$as_me:27813: \"$ac_compile\"") >&5
27814   (eval $ac_compile) 2>&5
27815   ac_status=$?
27816   echo "$as_me:27816: \$? = $ac_status" >&5
27817   (exit "$ac_status"); } ; then
27818                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27819                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27820         fi
27821         rm -f conftest.*
27822
27823         cf_save_LIBS="$LIBS"
27824
27825         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27826         cat >"conftest.$ac_ext" <<_ACEOF
27827 #line 27827 "configure"
27828 #include "confdefs.h"
27829
27830 #line 27830 "configure"
27831 #include <stdio.h>
27832 int cf_ldflags_static(FILE *fp);
27833
27834 int
27835 main (void)
27836 {
27837
27838         return cf_ldflags_static(stdin);
27839
27840   ;
27841   return 0;
27842 }
27843 _ACEOF
27844 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27845 if { (eval echo "$as_me:27845: \"$ac_link\"") >&5
27846   (eval $ac_link) 2>&5
27847   ac_status=$?
27848   echo "$as_me:27848: \$? = $ac_status" >&5
27849   (exit "$ac_status"); } &&
27850          { ac_try='test -s "conftest$ac_exeext"'
27851   { (eval echo "$as_me:27851: \"$ac_try\"") >&5
27852   (eval $ac_try) 2>&5
27853   ac_status=$?
27854   echo "$as_me:27854: \$? = $ac_status" >&5
27855   (exit "$ac_status"); }; }; then
27856
27857         # some linkers simply ignore the -dynamic
27858         case x`file "conftest$ac_exeext" 2>/dev/null` in
27859         (*static*)
27860                 cf_ldflags_static=no
27861                 ;;
27862         (*)
27863                 cf_ldflags_static=yes
27864                 ;;
27865         esac
27866
27867 else
27868   echo "$as_me: failed program was:" >&5
27869 cat "conftest.$ac_ext" >&5
27870 cf_ldflags_static=no
27871 fi
27872 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27873
27874         rm -f libconftest.*
27875         LIBS="$cf_save_LIBS"
27876
27877         echo "$as_me:27877: result: $cf_ldflags_static" >&5
27878 echo "${ECHO_T}$cf_ldflags_static" >&6
27879
27880         if test "$cf_ldflags_static" != yes
27881         then
27882                 LDFLAGS_STATIC=
27883                 LDFLAGS_SHARED=
27884         fi
27885 else
27886         LDFLAGS_STATIC=
27887         LDFLAGS_SHARED=
27888 fi
27889
27890         ;;
27891 esac
27892
27893 echo "$as_me:27893: checking where we will install curses.h" >&5
27894 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27895
27896 includesubdir=
27897 if test "$with_overwrite" = no && \
27898  { test "x$includedir" = 'x${prefix}/include' || \
27899    test "x$includedir" = "x${prefix}/include"; }
27900 then
27901         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27902 fi
27903 echo "$as_me:27903: result: ${includedir}${includesubdir}" >&5
27904 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27905
27906 ### Resolve a conflict between normal and wide-curses by forcing applications
27907 ### that will need libutf8 to add it to their configure script.
27908 if test "$with_overwrite" != no ; then
27909 if test "$NCURSES_LIBUTF8" = 1 ; then
27910         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27911         { echo "$as_me:27911: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27912 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27913 fi
27914 fi
27915 WITH_OVERWRITE=$with_overwrite
27916
27917 ### At least on MinGW a shared library build without libtool
27918 ### requires adding the additional libs to the link list.
27919 case "$cf_cv_system_name" in
27920 (*mingw32*|*mingw64*)
27921         if test "$DFT_LWR_MODEL" != "libtool"; then
27922            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27923         fi
27924         ;;
27925 *)      ;;
27926 esac
27927
27928 # used to separate tack out of the tree
27929 NCURSES_TREE=
27930
27931 ### predefined stuff for the test programs
27932
27933 cat >>confdefs.h <<\EOF
27934 #define HAVE_SLK_COLOR 1
27935 EOF
27936
27937 # pkgsrc uses these
27938
27939 echo "$as_me:27939: checking for desired basename for form library" >&5
27940 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27941
27942 # Check whether --with-form-libname or --without-form-libname was given.
27943 if test "${with_form_libname+set}" = set; then
27944   withval="$with_form_libname"
27945   with_lib_basename=$withval
27946 else
27947   with_lib_basename=form
27948 fi;
27949 FORM_NAME="$with_lib_basename"
27950
27951 case "x$FORM_NAME" in
27952 (x|xno|xnone|xyes)
27953         FORM_NAME=form
27954         ;;
27955 (*)
27956         ;;
27957 esac
27958
27959 echo "$as_me:27959: result: $FORM_NAME" >&5
27960 echo "${ECHO_T}$FORM_NAME" >&6
27961
27962 echo "$as_me:27962: checking for desired basename for menu library" >&5
27963 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27964
27965 # Check whether --with-menu-libname or --without-menu-libname was given.
27966 if test "${with_menu_libname+set}" = set; then
27967   withval="$with_menu_libname"
27968   with_lib_basename=$withval
27969 else
27970   with_lib_basename=menu
27971 fi;
27972 MENU_NAME="$with_lib_basename"
27973
27974 case "x$MENU_NAME" in
27975 (x|xno|xnone|xyes)
27976         MENU_NAME=menu
27977         ;;
27978 (*)
27979         ;;
27980 esac
27981
27982 echo "$as_me:27982: result: $MENU_NAME" >&5
27983 echo "${ECHO_T}$MENU_NAME" >&6
27984
27985 echo "$as_me:27985: checking for desired basename for panel library" >&5
27986 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27987
27988 # Check whether --with-panel-libname or --without-panel-libname was given.
27989 if test "${with_panel_libname+set}" = set; then
27990   withval="$with_panel_libname"
27991   with_lib_basename=$withval
27992 else
27993   with_lib_basename=panel
27994 fi;
27995 PANEL_NAME="$with_lib_basename"
27996
27997 case "x$PANEL_NAME" in
27998 (x|xno|xnone|xyes)
27999         PANEL_NAME=panel
28000         ;;
28001 (*)
28002         ;;
28003 esac
28004
28005 echo "$as_me:28005: result: $PANEL_NAME" >&5
28006 echo "${ECHO_T}$PANEL_NAME" >&6
28007
28008 echo "$as_me:28008: checking for desired basename for cxx library" >&5
28009 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28010
28011 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28012 if test "${with_cxx_libname+set}" = set; then
28013   withval="$with_cxx_libname"
28014   with_lib_basename=$withval
28015 else
28016   with_lib_basename=ncurses++
28017 fi;
28018 CXX_NAME="$with_lib_basename"
28019
28020 case "x$CXX_NAME" in
28021 (x|xno|xnone|xyes)
28022         CXX_NAME=ncurses++
28023         ;;
28024 (*)
28025         ;;
28026 esac
28027
28028 echo "$as_me:28028: result: $CXX_NAME" >&5
28029 echo "${ECHO_T}$CXX_NAME" >&6
28030
28031 ### Construct the list of subdirectories for which we'll customize makefiles
28032 ### with the appropriate compile-rules.
28033
28034 echo "$as_me:28034: checking for src modules" >&5
28035 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28036
28037 # dependencies and linker-arguments for test-programs
28038 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28039 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28040 if test "$DFT_LWR_MODEL" = "libtool"; then
28041         TEST_ARGS="${TEST_DEPS}"
28042         TEST_ARG2="${TEST_DEP2}"
28043 else
28044         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28045         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28046 fi
28047
28048 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28049 cf_cv_src_modules=
28050 for cf_dir in $modules_to_build
28051 do
28052         if test -f "$srcdir/$cf_dir/modules" ; then
28053
28054                 # We may/may not have tack in the distribution, though the
28055                 # makefile is.
28056                 if test "$cf_dir" = tack ; then
28057                         if test "x$cf_with_tack" != "xyes"; then
28058                                 continue
28059                         fi
28060                 fi
28061
28062                 if test -z "$cf_cv_src_modules"; then
28063                         cf_cv_src_modules=$cf_dir
28064                 else
28065                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28066                 fi
28067
28068                 # Make the ncurses_cfg.h file record the library interface files as
28069                 # well.  These are header files that are the same name as their
28070                 # directory.  Ncurses is the only library that does not follow
28071                 # that pattern.
28072                 if test "$cf_dir" = tack ; then
28073                         continue
28074                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28075
28076 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28077
28078                         cat >>confdefs.h <<EOF
28079 #define HAVE_${cf_have_include}_H 1
28080 EOF
28081
28082                         cat >>confdefs.h <<EOF
28083 #define HAVE_LIB${cf_have_include} 1
28084 EOF
28085
28086 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28087
28088 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28089
28090                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28091                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28092                         if test "$DFT_LWR_MODEL" = "libtool"; then
28093                                 TEST_ARGS="${TEST_DEPS}"
28094                                 TEST_ARG2="${TEST_DEP2}"
28095                         else
28096                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28097                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28098                         fi
28099                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28100                 fi
28101         fi
28102 done
28103 echo "$as_me:28103: result: $cf_cv_src_modules" >&5
28104 echo "${ECHO_T}$cf_cv_src_modules" >&6
28105
28106 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28107 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28108
28109 SRC_SUBDIRS=
28110 if test "x$cf_with_manpages" != xno ; then
28111         SRC_SUBDIRS="$SRC_SUBDIRS man"
28112 fi
28113 SRC_SUBDIRS="$SRC_SUBDIRS include"
28114 for cf_dir in $cf_cv_src_modules
28115 do
28116         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28117 done
28118 if test "x$cf_with_tests" != "xno" ; then
28119         SRC_SUBDIRS="$SRC_SUBDIRS test"
28120 fi
28121 # always make this, to install the ncurses-config script
28122 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28123 if test "$cf_with_cxx_binding" != no; then
28124         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28125         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28126 fi
28127
28128 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28129 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28130
28131 ADA_SUBDIRS=
28132 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28133         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28134         ADA_SUBDIRS="gen src"
28135         if test "x$cf_with_tests" != "xno" ; then
28136                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28137         fi
28138 fi
28139
28140 SUB_MAKEFILES=
28141 for cf_dir in $SRC_SUBDIRS
28142 do
28143         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28144 done
28145
28146 if test -n "$ADA_SUBDIRS"; then
28147         for cf_dir in $ADA_SUBDIRS
28148         do
28149                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28150         done
28151
28152 fi
28153
28154 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28155    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28156    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28157    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28158 fi
28159
28160 DIRS_TO_MAKE="lib"
28161 for cf_item in $cf_list_models
28162 do
28163
28164         case $cf_item in
28165         (libtool) cf_subdir='obj_lo'  ;;
28166         (normal)  cf_subdir='objects' ;;
28167         (debug)   cf_subdir='obj_g' ;;
28168         (profile) cf_subdir='obj_p' ;;
28169         (shared)
28170                 case "$cf_cv_system_name" in
28171                 (cygwin|msys)
28172                         cf_subdir='objects' ;;
28173                 (*)
28174                         cf_subdir='obj_s' ;;
28175                 esac
28176         esac
28177
28178         for cf_item2 in $DIRS_TO_MAKE
28179         do
28180                 test "$cf_item2" = "$cf_subdir" && break
28181         done
28182         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28183 done
28184 for cf_dir in $DIRS_TO_MAKE
28185 do
28186         test ! -d "$cf_dir" && mkdir "$cf_dir"
28187 done
28188
28189 # symbols that differ when compiling Ada95 by itself.
28190 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28191
28192 # values to use as strings
28193
28194 cat >>confdefs.h <<EOF
28195 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28196 EOF
28197
28198 cat >>confdefs.h <<EOF
28199 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28200 EOF
28201
28202 ### Define substitutions for header files to avoid name-pollution
28203
28204 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28205         HAVE_TCGETATTR=1
28206 else
28207         HAVE_TCGETATTR=0
28208 fi
28209
28210 if test "x$ac_cv_header_stdint_h" = xyes ; then
28211         HAVE_STDINT_H=1
28212 else
28213         HAVE_STDINT_H=0
28214 fi
28215
28216 if test "x$ac_cv_header_termio_h" = xyes ; then
28217         HAVE_TERMIO_H=1
28218 else
28219         HAVE_TERMIO_H=0
28220 fi
28221
28222 if test "x$ac_cv_header_termios_h" = xyes ; then
28223         HAVE_TERMIOS_H=1
28224 else
28225         HAVE_TERMIOS_H=0
28226 fi
28227
28228 ################################################################################
28229 test "x$use_database" = xyes && \
28230 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28231
28232 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28233 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28234
28235 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28236 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28237 fi
28238
28239 if test "x$cf_with_tests" != xno ; then
28240         MAKE_TESTS=
28241 else
28242         MAKE_TESTS="#"
28243 fi
28244
28245 ADAHTML_DIR=../../doc/html/ada
28246
28247 # workaround for OS/2 (20151017)
28248 case "$cf_cv_system_name" in
28249 (os2*)
28250         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28251         ;;
28252 (*)
28253         LIBTOOL_OPTS_CXX=
28254         ;;
28255 esac
28256
28257 # workaround for g++ versus Solaris (20131116)
28258 case "$cf_cv_system_name" in
28259 (solaris2*)
28260         case "x$CPPFLAGS" in
28261         (*-D_XOPEN_SOURCE_EXTENDED*)
28262                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28263
28264 echo "${as_me:-configure}:28264: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28265
28266                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28267                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28268                 ;;
28269         esac
28270         ;;
28271 esac
28272
28273 # Help to automatically enable the extended curses features when using either
28274 # the *-config or the ".pc" files by adding defines.
28275 echo "$as_me:28275: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28276 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28277 PKG_CFLAGS=
28278 for cf_loop1 in $CPPFLAGS_after_XOPEN
28279 do
28280         cf_found=no
28281         for cf_loop2 in $CPPFLAGS_before_XOPEN
28282         do
28283                 if test "x$cf_loop1" = "x$cf_loop2"
28284                 then
28285                         cf_found=yes
28286                         break
28287                 fi
28288         done
28289         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28290 done
28291 echo "$as_me:28291: result: $PKG_CFLAGS" >&5
28292 echo "${ECHO_T}$PKG_CFLAGS" >&6
28293
28294 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28295 case "x$NCURSES_OSPEED" in
28296 (*short*)
28297         cf_compatible=1
28298         ;;
28299 (*)
28300         cf_compatible=0
28301         ;;
28302 esac
28303
28304 cat >>confdefs.h <<EOF
28305 #define NCURSES_OSPEED_COMPAT $cf_compatible
28306 EOF
28307
28308 case "x$cf_cv_typeof_chtype" in
28309 (xshort|xint|xlong)
28310         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28311         ;;
28312 esac
28313
28314 case "x$cf_cv_typeof_mmask_t" in
28315 (xshort|xint|xlong)
28316         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28317         ;;
28318 esac
28319
28320 # substitute into misc/Makefile to suppress
28321 # (un)install.data from the
28322 # (un)install rules.
28323 if test "x$cf_with_db_install" = "xno"; then
28324         MISC_INSTALL_DATA=
28325         MISC_UNINSTALL_DATA=
28326 else
28327         MISC_INSTALL_DATA=install.data
28328         MISC_UNINSTALL_DATA=uninstall.data
28329 fi
28330
28331 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28332         MAKE_DATABASE="#"
28333 else
28334         MAKE_DATABASE="$MAKE_TERMINFO"
28335 fi
28336
28337 if test -n "$PACKAGE"
28338 then
28339         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28340         export PACKAGE
28341         echo "package: $PACKAGE"
28342 fi
28343
28344 UNALTERED_SYMS=
28345 cf_filter_syms=no
28346
28347 if test -n "$RESULTING_SYMS"
28348 then
28349         cf_filter_syms=$cf_dft_filter_syms
28350         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28351
28352 echo "${as_me:-configure}:28352: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28353
28354 fi
28355
28356 if test "x$WILDCARD_SYMS" = xno
28357 then
28358         cf_filter_syms=yes
28359 fi
28360
28361 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28362
28363 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28364 if test "$cf_filter_syms" = yes
28365 then
28366         RESULTING_SYMS=resulting.map
28367 fi
28368
28369 if test "x$cross_compiling" = xyes ; then
28370         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28371         CHECK_BUILD="#"
28372 else
28373         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28374         CHECK_BUILD=
28375 fi
28376
28377 # This is used for the *-config script and *.pc data files.
28378
28379 echo "$as_me:28379: checking for linker search path" >&5
28380 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28381 if test "${cf_cv_ld_searchpath+set}" = set; then
28382   echo $ECHO_N "(cached) $ECHO_C" >&6
28383 else
28384
28385 if test "$cross_compiling" != yes ; then
28386
28387 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28388 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28389
28390 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28391 # update the cache, which makes it run faster.
28392 test -z "$cf_pathlist" && \
28393         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28394
28395 test -z "$cf_pathlist" &&
28396         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28397
28398 # This works with OpenBSD 6.5, which lists only filenames
28399 test -z "$cf_pathlist" &&
28400         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28401
28402 if test -z "$cf_pathlist"
28403 then
28404         # dyld default path with MacOS
28405         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28406         then
28407                 # do this to bypass check
28408                 cf_cv_ld_searchpath='$HOME/lib'
28409                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28410         fi
28411 fi
28412
28413 if test -z "$cf_pathlist"
28414 then
28415         # Solaris is "SunOS"
28416         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28417         then
28418                 case x`(isainfo -b)` in
28419                 (x64)
28420                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28421                         ;;
28422                 (x32)
28423                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28424                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28425                         ;;
28426                 (*)
28427                         { echo "$as_me:28427: WARNING: problem with Solaris architecture" >&5
28428 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28429                         ;;
28430                 esac
28431         fi
28432 fi
28433
28434 if test -z "$cf_pathlist"
28435 then
28436         # HP-UX
28437         if test x"`uname -s`" = xHP-UX
28438         then
28439                 case x`getconf LONG_BIT` in
28440                 (x64)
28441                         cf_pathlist="/usr/lib/hpux64"
28442                         ;;
28443                 (x*)
28444                         cf_pathlist="/usr/lib/hpux32"
28445                         ;;
28446                 esac
28447         fi
28448 fi
28449
28450 fi
28451
28452 # If nothing else, assume it is conventional
28453 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28454
28455 # Finally, check that this is only directories
28456 for cf_path in $0 $cf_pathlist
28457 do
28458         if test -d "$cf_path"; then
28459                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28460                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28461         fi
28462 done
28463
28464 # Ensure that it is nonempty
28465 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28466
28467 fi
28468 echo "$as_me:28468: result: $cf_cv_ld_searchpath" >&5
28469 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28470
28471 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28472
28473 cat >>confdefs.h <<\EOF
28474 #define HAVE_CURSES_DATA_BOOLNAMES 1
28475 EOF
28476
28477 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"
28478 ac_config_commands="$ac_config_commands default"
28479 cat >confcache <<\_ACEOF
28480 # This file is a shell script that caches the results of configure
28481 # tests run on this system so they can be shared between configure
28482 # scripts and configure runs, see configure's option --config-cache.
28483 # It is not useful on other systems.  If it contains results you don't
28484 # want to keep, you may remove or edit it.
28485 #
28486 # config.status only pays attention to the cache file if you give it
28487 # the --recheck option to rerun configure.
28488 #
28489 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28490 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28491 # following values.
28492
28493 _ACEOF
28494
28495 # The following way of writing the cache mishandles newlines in values,
28496 # but we know of no workaround that is simple, portable, and efficient.
28497 # So, don't put newlines in cache variables' values.
28498 # Ultrix sh set writes to stderr and can't be redirected directly,
28499 # and sets the high bit in the cache file unless we assign to the vars.
28500 {
28501   (set) 2>&1 |
28502     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28503     *ac_space=\ *)
28504       # `set' does not quote correctly, so add quotes (double-quote
28505       # substitution turns \\\\ into \\, and sed turns \\ into \).
28506       sed -n \
28507         "s/'/'\\\\''/g;
28508           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28509       ;;
28510     *)
28511       # `set' quotes correctly as required by POSIX, so do not add quotes.
28512       sed -n \
28513         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28514       ;;
28515     esac;
28516 } |
28517   sed '
28518      t clear
28519      : clear
28520      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28521      t end
28522      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28523      : end' >>confcache
28524 if cmp -s $cache_file confcache; then :; else
28525   if test -w $cache_file; then
28526     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28527     cat confcache >$cache_file
28528   else
28529     echo "not updating unwritable cache $cache_file"
28530   fi
28531 fi
28532 rm -f confcache
28533
28534 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28535 # Let make expand exec_prefix.
28536 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28537
28538 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28539 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28540 # trailing colons and then remove the whole line if VPATH becomes empty
28541 # (actually we leave an empty line to preserve line numbers).
28542 if test "x$srcdir" = x.; then
28543   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28544 s/:*\$(srcdir):*/:/;
28545 s/:*\${srcdir}:*/:/;
28546 s/:*@srcdir@:*/:/;
28547 s/^\([^=]*=[    ]*\):*/\1/;
28548 s/:*$//;
28549 s/^[^=]*=[      ]*$//;
28550 }'
28551 fi
28552
28553 DEFS=-DHAVE_CONFIG_H
28554
28555 : "${CONFIG_STATUS=./config.status}"
28556 ac_clean_files_save=$ac_clean_files
28557 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28558 { echo "$as_me:28558: creating $CONFIG_STATUS" >&5
28559 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28560 cat >"$CONFIG_STATUS" <<_ACEOF
28561 #! $SHELL
28562 # Generated automatically by configure.
28563 # Run this file to recreate the current configuration.
28564 # Compiler output produced by configure, useful for debugging
28565 # configure, is in config.log if it exists.
28566
28567 debug=false
28568 SHELL=\${CONFIG_SHELL-$SHELL}
28569 ac_cs_invocation="\$0 \$@"
28570
28571 CLICOLOR_FORCE= GREP_OPTIONS=
28572 unset CLICOLOR_FORCE GREP_OPTIONS
28573 _ACEOF
28574
28575 cat >>"$CONFIG_STATUS" <<\_ACEOF
28576 # Be Bourne compatible
28577 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28578   emulate sh
28579   NULLCMD=:
28580 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28581   set -o posix
28582 fi
28583
28584 # Name of the executable.
28585 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28586
28587 if expr a : '\(a\)' >/dev/null 2>&1; then
28588   as_expr=expr
28589 else
28590   as_expr=false
28591 fi
28592
28593 rm -f conf$$ conf$$.exe conf$$.file
28594 echo >conf$$.file
28595 if ln -s conf$$.file conf$$ 2>/dev/null; then
28596   # We could just check for DJGPP; but this test a) works b) is more generic
28597   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28598   if test -f conf$$.exe; then
28599     # Don't use ln at all; we don't have any links
28600     as_ln_s='cp -p'
28601   else
28602     as_ln_s='ln -s'
28603   fi
28604 elif ln conf$$.file conf$$ 2>/dev/null; then
28605   as_ln_s=ln
28606 else
28607   as_ln_s='cp -p'
28608 fi
28609 rm -f conf$$ conf$$.exe conf$$.file
28610
28611 as_executable_p="test -f"
28612
28613 # Support unset when possible.
28614 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28615   as_unset="unset"
28616 else
28617   as_unset="false"
28618 fi
28619
28620 # NLS nuisances.
28621 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28622 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28623 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28624 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28625 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28626 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28627 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28628 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28629
28630 # IFS
28631 # We need space, tab and new line, in precisely that order.
28632 as_nl='
28633 '
28634 IFS="   $as_nl"
28635
28636 # CDPATH.
28637 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28638
28639 exec 6>&1
28640
28641 _ACEOF
28642
28643 # Files that config.status was made for.
28644 if test -n "$ac_config_files"; then
28645   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28646 fi
28647
28648 if test -n "$ac_config_headers"; then
28649   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28650 fi
28651
28652 if test -n "$ac_config_links"; then
28653   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28654 fi
28655
28656 if test -n "$ac_config_commands"; then
28657   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28658 fi
28659
28660 cat >>"$CONFIG_STATUS" <<\EOF
28661
28662 ac_cs_usage="\
28663 \`$as_me' instantiates files from templates according to the
28664 current configuration.
28665
28666 Usage: $0 [OPTIONS] [FILE]...
28667
28668   -h, --help       print this help, then exit
28669   -V, --version    print version number, then exit
28670   -d, --debug      don't remove temporary files
28671       --recheck    update $as_me by reconfiguring in the same conditions
28672   --file=FILE[:TEMPLATE]
28673                    instantiate the configuration file FILE
28674   --header=FILE[:TEMPLATE]
28675                    instantiate the configuration header FILE
28676
28677 Configuration files:
28678 $config_files
28679
28680 Configuration headers:
28681 $config_headers
28682
28683 Configuration commands:
28684 $config_commands
28685
28686 Report bugs to <dickey@invisible-island.net>."
28687 EOF
28688
28689 cat >>"$CONFIG_STATUS" <<EOF
28690 ac_cs_version="\\
28691 config.status
28692 configured by $0, generated by GNU Autoconf 2.52.20210509,
28693   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28694
28695 Copyright 2003-2020,2021        Thomas E. Dickey
28696 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28697 Free Software Foundation, Inc.
28698 This config.status script is free software; the Free Software Foundation
28699 gives unlimited permission to copy, distribute and modify it."
28700 srcdir="$srcdir"
28701 INSTALL="$INSTALL"
28702 EOF
28703
28704 cat >>"$CONFIG_STATUS" <<\EOF
28705 # If no file are specified by the user, then we need to provide default
28706 # value.  By we need to know if files were specified by the user.
28707 ac_need_defaults=:
28708 while test $# != 0
28709 do
28710   case $1 in
28711   --*=*)
28712     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28713     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28714     shift
28715     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28716     shift
28717     ;;
28718   -*);;
28719   *) # This is not an option, so the user has probably given explicit
28720      # arguments.
28721      ac_need_defaults=false;;
28722   esac
28723
28724   case $1 in
28725   # Handling of the options.
28726 EOF
28727 cat >>"$CONFIG_STATUS" <<EOF
28728   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28729     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28730     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28731 EOF
28732 cat >>"$CONFIG_STATUS" <<\EOF
28733   --version | --vers* | -V )
28734     echo "$ac_cs_version"; exit 0 ;;
28735   --he | --h)
28736     # Conflict between --help and --header
28737     { { echo "$as_me:28737: error: ambiguous option: $1
28738 Try \`$0 --help' for more information." >&5
28739 echo "$as_me: error: ambiguous option: $1
28740 Try \`$0 --help' for more information." >&2;}
28741    { (exit 1); exit 1; }; };;
28742   --help | --hel | -h )
28743     echo "$ac_cs_usage"; exit 0 ;;
28744   --debug | --d* | -d )
28745     debug=: ;;
28746   --file | --fil | --fi | --f )
28747     shift
28748     CONFIG_FILES="$CONFIG_FILES $1"
28749     ac_need_defaults=false;;
28750   --header | --heade | --head | --hea )
28751     shift
28752     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28753     ac_need_defaults=false;;
28754
28755   # This is an error.
28756   -*) { { echo "$as_me:28756: error: unrecognized option: $1
28757 Try \`$0 --help' for more information." >&5
28758 echo "$as_me: error: unrecognized option: $1
28759 Try \`$0 --help' for more information." >&2;}
28760    { (exit 1); exit 1; }; } ;;
28761
28762   *) ac_config_targets="$ac_config_targets $1" ;;
28763
28764   esac
28765   shift
28766 done
28767
28768 exec 5>>config.log
28769 cat >&5 << _ACEOF
28770
28771 ## ----------------------- ##
28772 ## Running config.status.  ##
28773 ## ----------------------- ##
28774
28775 This file was extended by $as_me 2.52.20210509, executed with
28776   CONFIG_FILES    = $CONFIG_FILES
28777   CONFIG_HEADERS  = $CONFIG_HEADERS
28778   CONFIG_LINKS    = $CONFIG_LINKS
28779   CONFIG_COMMANDS = $CONFIG_COMMANDS
28780   > "$ac_cs_invocation"
28781 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28782
28783 _ACEOF
28784 EOF
28785
28786 cat >>"$CONFIG_STATUS" <<EOF
28787 #
28788 # INIT-COMMANDS section.
28789 #
28790
28791 ### Special initialization commands, used to pass information from the
28792 ### configuration-run into config.status
28793
28794 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28795 AWK="$AWK"
28796 CXX_NAME="$CXX_NAME"
28797 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28798 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28799 ECHO_LD="$ECHO_LD"
28800 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28801 FORM_NAME="$FORM_NAME"
28802 LDCONFIG="$LDCONFIG"
28803 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28804 LIB_NAME="$LIB_NAME"
28805 LIB_PREFIX="$LIB_PREFIX"
28806 LIB_SUBSETS="$LIB_SUBSETS"
28807 LIB_SUFFIX="$LIB_SUFFIX"
28808 LIB_TRACING="$LIB_TRACING"
28809 LN_S="$LN_S"
28810 MAKE_TERMINFO="$MAKE_TERMINFO"
28811 MENU_NAME="$MENU_NAME"
28812 NCURSES_MAJOR="$NCURSES_MAJOR"
28813 NCURSES_MINOR="$NCURSES_MINOR"
28814 NCURSES_OSPEED="$NCURSES_OSPEED"
28815 NCURSES_PATCH="$NCURSES_PATCH"
28816 PANEL_NAME="$PANEL_NAME"
28817 SRC_SUBDIRS="$SRC_SUBDIRS"
28818 TERMINFO="$TERMINFO"
28819 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28820 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28821 TICS_NAME="$TICS_NAME"
28822 TICS_SUFFIX="$TICS_SUFFIX"
28823 TIC_PATH="$TIC_PATH"
28824 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28825 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28826 TINFO_NAME="$TINFO_NAME"
28827 TINFO_SUFFIX="$TINFO_SUFFIX"
28828 UNALTERED_SYMS="$UNALTERED_SYMS"
28829 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28830 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28831 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28832 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28833 WILDCARD_SYMS="$WILDCARD_SYMS"
28834 WITH_CURSES_H="$with_curses_h"
28835 WITH_ECHO="${enable_echo:=yes}"
28836 WITH_OVERWRITE="$with_overwrite"
28837 cf_LIST_MODELS="$cf_list_models"
28838 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28839 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28840 cf_cv_abi_version="$cf_cv_abi_version"
28841 cf_cv_do_relink="$cf_cv_do_relink"
28842 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28843 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28844 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28845 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28846 cf_cv_make_PHONY="$cf_cv_make_PHONY"
28847 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28848 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28849 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28850 cf_cv_rel_version="$cf_cv_rel_version"
28851 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28852 cf_cv_shared_soname='$cf_cv_shared_soname'
28853 cf_cv_shlib_version="$cf_cv_shlib_version"
28854 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28855 cf_cv_system_name="$cf_cv_system_name"
28856 cf_cv_term_driver="$with_term_driver"
28857 cf_with_ada="$cf_with_ada"
28858 cf_with_cxx_binding="$cf_with_cxx_binding"
28859 cf_with_db_install="$cf_with_db_install"
28860 cf_with_manpages="$cf_with_manpages"
28861 cf_with_tests="$cf_with_tests"
28862 host="$host"
28863 target="$target"
28864 with_shared_cxx="$with_shared_cxx"
28865
28866 EOF
28867
28868 cat >>"$CONFIG_STATUS" <<\EOF
28869 for ac_config_target in $ac_config_targets
28870 do
28871   case "$ac_config_target" in
28872   # Handling of arguments.
28873   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28874   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28875   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28876   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28877   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28878   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28879   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28880   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28881   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28882   *) { { echo "$as_me:28882: error: invalid argument: $ac_config_target" >&5
28883 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28884    { (exit 1); exit 1; }; };;
28885   esac
28886 done
28887
28888 # If the user did not use the arguments to specify the items to instantiate,
28889 # then the envvar interface is used.  Set only those that are not.
28890 # We use the long form for the default assignment because of an extremely
28891 # bizarre bug on SunOS 4.1.3.
28892 if "$ac_need_defaults"; then
28893   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28894   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28895   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28896 fi
28897
28898 # Create a temporary directory, and hook for its removal unless debugging.
28899 $debug ||
28900 {
28901   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28902   trap '{ (exit 1); exit 1; }' 1 2 13 15
28903 }
28904
28905 # Create a (secure) tmp directory for tmp files.
28906 : ${TMPDIR=/tmp}
28907 {
28908   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28909   test -n "$tmp" && test -d "$tmp"
28910 }  ||
28911 {
28912   tmp=$TMPDIR/cs$$-$RANDOM
28913   (umask 077 && mkdir $tmp)
28914 } ||
28915 {
28916    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28917    { (exit 1); exit 1; }
28918 }
28919
28920 EOF
28921
28922 cat >>"$CONFIG_STATUS" <<EOF
28923
28924 #
28925 # CONFIG_FILES section.
28926 #
28927
28928 # No need to generate the scripts if there are no CONFIG_FILES.
28929 # This happens for instance when ./config.status config.h
28930 if test -n "\$CONFIG_FILES"; then
28931   # Protect against being on the right side of a sed subst in config.status.
28932   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28933    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28934 s,@SHELL@,$SHELL,;t t
28935 s,@exec_prefix@,$exec_prefix,;t t
28936 s,@prefix@,$prefix,;t t
28937 s,@program_transform_name@,$program_transform_name,;t t
28938 s,@bindir@,$bindir,;t t
28939 s,@sbindir@,$sbindir,;t t
28940 s,@libexecdir@,$libexecdir,;t t
28941 s,@datarootdir@,$datarootdir,;t t
28942 s,@datadir@,$datadir,;t t
28943 s,@sysconfdir@,$sysconfdir,;t t
28944 s,@sharedstatedir@,$sharedstatedir,;t t
28945 s,@localstatedir@,$localstatedir,;t t
28946 s,@runstatedir@,$runstatedir,;t t
28947 s,@libdir@,$libdir,;t t
28948 s,@includedir@,$includedir,;t t
28949 s,@oldincludedir@,$oldincludedir,;t t
28950 s,@infodir@,$infodir,;t t
28951 s,@mandir@,$mandir,;t t
28952 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28953 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28954 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28955 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28956 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28957 s,@build_alias@,$build_alias,;t t
28958 s,@host_alias@,$host_alias,;t t
28959 s,@target_alias@,$target_alias,;t t
28960 s,@ECHO_C@,$ECHO_C,;t t
28961 s,@ECHO_N@,$ECHO_N,;t t
28962 s,@ECHO_T@,$ECHO_T,;t t
28963 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28964 s,@DEFS@,$DEFS,;t t
28965 s,@LIBS@,$LIBS,;t t
28966 s,@top_builddir@,$top_builddir,;t t
28967 s,@GREP@,$GREP,;t t
28968 s,@EGREP@,$EGREP,;t t
28969 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28970 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28971 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28972 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28973 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28974 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28975 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28976 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28977 s,@VERSION@,$VERSION,;t t
28978 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28979 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28980 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28981 s,@PACKAGE@,$PACKAGE,;t t
28982 s,@build@,$build,;t t
28983 s,@build_cpu@,$build_cpu,;t t
28984 s,@build_vendor@,$build_vendor,;t t
28985 s,@build_os@,$build_os,;t t
28986 s,@host@,$host,;t t
28987 s,@host_cpu@,$host_cpu,;t t
28988 s,@host_vendor@,$host_vendor,;t t
28989 s,@host_os@,$host_os,;t t
28990 s,@target@,$target,;t t
28991 s,@target_cpu@,$target_cpu,;t t
28992 s,@target_vendor@,$target_vendor,;t t
28993 s,@target_os@,$target_os,;t t
28994 s,@FGREP@,$FGREP,;t t
28995 s,@CC@,$CC,;t t
28996 s,@CFLAGS@,$CFLAGS,;t t
28997 s,@LDFLAGS@,$LDFLAGS,;t t
28998 s,@CPPFLAGS@,$CPPFLAGS,;t t
28999 s,@ac_ct_CC@,$ac_ct_CC,;t t
29000 s,@EXEEXT@,$EXEEXT,;t t
29001 s,@OBJEXT@,$OBJEXT,;t t
29002 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29003 s,@CPP@,$CPP,;t t
29004 s,@LDCONFIG@,$LDCONFIG,;t t
29005 s,@CXX@,$CXX,;t t
29006 s,@CXXFLAGS@,$CXXFLAGS,;t t
29007 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29008 s,@AWK@,$AWK,;t t
29009 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29010 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29011 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29012 s,@LINT@,$LINT,;t t
29013 s,@LINT_OPTS@,$LINT_OPTS,;t t
29014 s,@LN_S@,$LN_S,;t t
29015 s,@cf_config_suffix@,$cf_config_suffix,;t t
29016 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29017 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29018 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29019 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29020 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29021 s,@SET_MAKE@,$SET_MAKE,;t t
29022 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29023 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29024 s,@CTAGS@,$CTAGS,;t t
29025 s,@ETAGS@,$ETAGS,;t t
29026 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29027 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29028 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29029 s,@RANLIB@,$RANLIB,;t t
29030 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29031 s,@LD@,$LD,;t t
29032 s,@ac_ct_LD@,$ac_ct_LD,;t t
29033 s,@AR@,$AR,;t t
29034 s,@ac_ct_AR@,$ac_ct_AR,;t t
29035 s,@NM@,$NM,;t t
29036 s,@ac_ct_NM@,$ac_ct_NM,;t t
29037 s,@ARFLAGS@,$ARFLAGS,;t t
29038 s,@DESTDIR@,$DESTDIR,;t t
29039 s,@BUILD_CC@,$BUILD_CC,;t t
29040 s,@BUILD_CPP@,$BUILD_CPP,;t t
29041 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29042 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29043 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29044 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29045 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29046 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29047 s,@cf_list_models@,$cf_list_models,;t t
29048 s,@ABI_VERSION@,$ABI_VERSION,;t t
29049 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29050 s,@LIBTOOL@,$LIBTOOL,;t t
29051 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29052 s,@LT_UNDEF@,$LT_UNDEF,;t t
29053 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29054 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29055 s,@LIB_CREATE@,$LIB_CREATE,;t t
29056 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29057 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29058 s,@LIB_PREP@,$LIB_PREP,;t t
29059 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29060 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29061 s,@LIB_LINK@,$LIB_LINK,;t t
29062 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29063 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29064 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29065 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29066 s,@TICS_NAME@,$TICS_NAME,;t t
29067 s,@TINFO_NAME@,$TINFO_NAME,;t t
29068 s,@LIB_NAME@,$LIB_NAME,;t t
29069 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29070 s,@CC_G_OPT@,$CC_G_OPT,;t t
29071 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29072 s,@LD_MODEL@,$LD_MODEL,;t t
29073 s,@shlibdir@,$shlibdir,;t t
29074 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29075 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29076 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29077 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29078 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29079 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29080 s,@LINK_PROGS@,$LINK_PROGS,;t t
29081 s,@LINK_TESTS@,$LINK_TESTS,;t t
29082 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29083 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29084 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29085 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29086 s,@RPATH_LIST@,$RPATH_LIST,;t t
29087 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29088 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29089 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29090 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29091 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29092 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29093 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29094 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29095 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29096 s,@TIC@,$TIC,;t t
29097 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29098 s,@INFOCMP@,$INFOCMP,;t t
29099 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29100 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29101 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29102 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29103 s,@XTERM_KBS@,$XTERM_KBS,;t t
29104 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29105 s,@TERMINFO@,$TERMINFO,;t t
29106 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29107 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29108 s,@TERMPATH@,$TERMPATH,;t t
29109 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29110 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29111 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29112 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29113 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29114 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29115 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29116 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29117 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29118 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29119 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29120 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29121 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29122 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29123 s,@RGB_PATH@,$RGB_PATH,;t t
29124 s,@no_x11_rgb@,$no_x11_rgb,;t t
29125 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29126 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29127 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29128 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29129 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29130 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29131 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29132 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29133 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29134 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29135 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29136 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29137 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29138 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29139 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29140 s,@PTHREAD@,$PTHREAD,;t t
29141 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29142 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29143 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29144 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29145 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29146 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29147 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29148 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29149 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29150 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29151 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29152 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29153 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29154 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29155 s,@ECHO_LT@,$ECHO_LT,;t t
29156 s,@ECHO_LD@,$ECHO_LD,;t t
29157 s,@RULE_CC@,$RULE_CC,;t t
29158 s,@SHOW_CC@,$SHOW_CC,;t t
29159 s,@ECHO_CC@,$ECHO_CC,;t t
29160 s,@ECHO_LINK@,$ECHO_LINK,;t t
29161 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29162 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29163 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29164 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29165 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29166 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29167 s,@ADAFLAGS@,$ADAFLAGS,;t t
29168 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29169 s,@ADA_TRACE@,$ADA_TRACE,;t t
29170 s,@MATH_LIB@,$MATH_LIB,;t t
29171 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29172 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29173 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29174 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29175 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29176 s,@TEST_LIBS@,$TEST_LIBS,;t t
29177 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29178 s,@CXXCPP@,$CXXCPP,;t t
29179 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29180 s,@CXX_AR@,$CXX_AR,;t t
29181 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29182 s,@CXXLIBS@,$CXXLIBS,;t t
29183 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29184 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29185 s,@M4_exists@,$M4_exists,;t t
29186 s,@cf_ada_make@,$cf_ada_make,;t t
29187 s,@cf_ada_config@,$cf_ada_config,;t t
29188 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29189 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29190 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29191 s,@cf_compile_generics@,$cf_compile_generics,;t t
29192 s,@cf_generic_objects@,$cf_generic_objects,;t t
29193 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29194 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29195 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29196 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29197 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29198 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29199 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29200 s,@cf_ada_package@,$cf_ada_package,;t t
29201 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29202 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29203 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29204 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29205 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29206 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29207 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29208 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29209 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29210 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29211 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29212 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29213 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29214 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29215 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29216 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29217 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29218 s,@TICS_LIBS@,$TICS_LIBS,;t t
29219 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29220 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29221 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29222 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29223 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29224 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29225 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29226 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29227 s,@includesubdir@,$includesubdir,;t t
29228 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29229 s,@TICS_LIST@,$TICS_LIST,;t t
29230 s,@TINFO_LIST@,$TINFO_LIST,;t t
29231 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29232 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29233 s,@FORM_NAME@,$FORM_NAME,;t t
29234 s,@MENU_NAME@,$MENU_NAME,;t t
29235 s,@PANEL_NAME@,$PANEL_NAME,;t t
29236 s,@CXX_NAME@,$CXX_NAME,;t t
29237 s,@TEST_ARGS@,$TEST_ARGS,;t t
29238 s,@TEST_DEPS@,$TEST_DEPS,;t t
29239 s,@TEST_ARG2@,$TEST_ARG2,;t t
29240 s,@TEST_DEP2@,$TEST_DEP2,;t t
29241 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29242 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29243 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29244 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29245 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29246 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29247 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29248 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29249 s,@cross_compiling@,$cross_compiling,;t t
29250 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29251 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29252 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29253 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29254 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29255 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29256 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29257 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29258 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29259 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29260 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29261 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29262 CEOF
29263
29264 EOF
29265
29266   cat >>"$CONFIG_STATUS" <<\EOF
29267   # Split the substitutions into bite-sized pieces for seds with
29268   # small command number limits, like on Digital OSF/1 and HP-UX.
29269   ac_max_sed_lines=48
29270   ac_sed_frag=1 # Number of current file.
29271   ac_beg=1 # First line for current file.
29272   ac_end=$ac_max_sed_lines # Line after last line for current file.
29273   ac_more_lines=:
29274   ac_sed_cmds=
29275   while "$ac_more_lines"; do
29276     if test "$ac_beg" -gt 1; then
29277       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29278     else
29279       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29280     fi
29281     if test ! -s $tmp/subs.frag; then
29282       ac_more_lines=false
29283     else
29284       # The purpose of the label and of the branching condition is to
29285       # speed up the sed processing (if there are no `@' at all, there
29286       # is no need to browse any of the substitutions).
29287       # These are the two extra sed commands mentioned above.
29288       (echo ':t
29289   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29290       # It is possible to make a multiline substitution using escaped newlines.
29291       # Ensure that we do not split the substitution between script fragments.
29292       ac_BEG=$ac_end
29293       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29294       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29295       if test -s $tmp/subs.next; then
29296         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29297         if test ! -s $tmp/subs.edit; then
29298           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29299           if test ! -s $tmp/subs.edit; then
29300             if test "$ac_beg" -gt 1; then
29301               ac_end=`expr "$ac_end" - 1`
29302               continue
29303             fi
29304           fi
29305         fi
29306       fi
29307
29308       if test -z "$ac_sed_cmds"; then
29309         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29310       else
29311         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29312       fi
29313       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29314       ac_beg=$ac_end
29315       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29316     fi
29317   done
29318   if test -z "$ac_sed_cmds"; then
29319     ac_sed_cmds=cat
29320   fi
29321 fi # test -n "$CONFIG_FILES"
29322
29323 EOF
29324 cat >>"$CONFIG_STATUS" <<\EOF
29325 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29326   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29327   case "$ac_file" in
29328   - | *:- | *:-:* ) # input from stdin
29329         cat >$tmp/stdin
29330         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29331         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29332   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29333         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29334   * )   ac_file_in=$ac_file.in ;;
29335   esac
29336
29337   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29338   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29339          X"$ac_file" : 'X\(//\)[^/]' \| \
29340          X"$ac_file" : 'X\(//\)$' \| \
29341          X"$ac_file" : 'X\(/\)' \| \
29342          .     : '\(.\)' 2>/dev/null ||
29343 echo X"$ac_file" |
29344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29345           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29346           /^X\(\/\/\)$/{ s//\1/; q; }
29347           /^X\(\/\).*/{ s//\1/; q; }
29348           s/.*/./; q'`
29349   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29350     { case "$ac_dir" in
29351   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29352   *)                      as_incr_dir=.;;
29353 esac
29354 as_dummy="$ac_dir"
29355 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29356   case $as_mkdir_dir in
29357     # Skip DOS drivespec
29358     ?:) as_incr_dir=$as_mkdir_dir ;;
29359     *)
29360       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29361       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29362     ;;
29363   esac
29364 done; }
29365
29366     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29367     # A "../" for each directory in $ac_dir_suffix.
29368     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29369   else
29370     ac_dir_suffix= ac_dots=
29371   fi
29372
29373   case "$srcdir" in
29374   .)  ac_srcdir=.
29375       if test -z "$ac_dots"; then
29376          ac_top_srcdir=.
29377       else
29378          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29379       fi ;;
29380   [\\/]* | ?:[\\/]* )
29381       ac_srcdir="$srcdir$ac_dir_suffix";
29382       ac_top_srcdir="$srcdir" ;;
29383   *) # Relative path.
29384     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29385     ac_top_srcdir="$ac_dots$srcdir" ;;
29386   esac
29387
29388   case $INSTALL in
29389   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29390   *) ac_INSTALL=$ac_dots$INSTALL ;;
29391   esac
29392
29393   if test x"$ac_file" != x-; then
29394     { echo "$as_me:29394: creating $ac_file" >&5
29395 echo "$as_me: creating $ac_file" >&6;}
29396     rm -f "$ac_file"
29397   fi
29398   # Let's still pretend it is `configure' which instantiates (i.e., don't
29399   # use $as_me), people would be surprised to read:
29400   #    /* config.h.  Generated automatically by config.status.  */
29401   configure_input="Generated automatically from `echo $ac_file_in |
29402                                                  sed 's,.*/,,'` by configure."
29403
29404   # First look for the input files in the build tree, otherwise in the
29405   # src tree.
29406   ac_file_inputs=`IFS=:
29407     for f in $ac_file_in; do
29408       case $f in
29409       -) echo $tmp/stdin ;;
29410       [\\/$]*)
29411          # Absolute (can't be DOS-style, as IFS=:)
29412          test -f "$f" || { { echo "$as_me:29412: error: cannot find input file: $f" >&5
29413 echo "$as_me: error: cannot find input file: $f" >&2;}
29414    { (exit 1); exit 1; }; }
29415          echo $f;;
29416       *) # Relative
29417          if test -f "$f"; then
29418            # Build tree
29419            echo $f
29420          elif test -f "$srcdir/$f"; then
29421            # Source tree
29422            echo "$srcdir/$f"
29423          else
29424            # /dev/null tree
29425            { { echo "$as_me:29425: error: cannot find input file: $f" >&5
29426 echo "$as_me: error: cannot find input file: $f" >&2;}
29427    { (exit 1); exit 1; }; }
29428          fi;;
29429       esac
29430     done` || { (exit 1); exit 1; }
29431 EOF
29432 cat >>"$CONFIG_STATUS" <<\EOF
29433   ac_warn_datarootdir=no
29434   if test x"$ac_file" != x-; then
29435     for ac_item in $ac_file_inputs
29436     do
29437       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29438       if test -n "$ac_seen"; then
29439         ac_used=`grep '@datarootdir@' "$ac_item"`
29440         if test -z "$ac_used"; then
29441           { echo "$as_me:29441: WARNING: datarootdir was used implicitly but not set:
29442 $ac_seen" >&5
29443 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29444 $ac_seen" >&2;}
29445           ac_warn_datarootdir=yes
29446         fi
29447       fi
29448       ac_seen=`grep '${datarootdir}' "$ac_item"`
29449       if test -n "$ac_seen"; then
29450         { echo "$as_me:29450: WARNING: datarootdir was used explicitly but not set:
29451 $ac_seen" >&5
29452 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29453 $ac_seen" >&2;}
29454         ac_warn_datarootdir=yes
29455       fi
29456     done
29457   fi
29458
29459 if test "x$ac_warn_datarootdir" = xyes; then
29460   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29461 fi
29462
29463 EOF
29464 cat >>"$CONFIG_STATUS" <<EOF
29465   sed "$ac_vpsub
29466 $extrasub
29467 EOF
29468 cat >>"$CONFIG_STATUS" <<\EOF
29469 :t
29470 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29471 s,@configure_input@,$configure_input,;t t
29472 s,@srcdir@,$ac_srcdir,;t t
29473 s,@top_srcdir@,$ac_top_srcdir,;t t
29474 s,@INSTALL@,$ac_INSTALL,;t t
29475 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29476   rm -f $tmp/stdin
29477   if test x"$ac_file" != x-; then
29478     cp "$tmp/out" "$ac_file"
29479
29480     for ac_name in prefix exec_prefix datarootdir
29481     do
29482         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29483         if test -n "$ac_seen"; then
29484             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29485             if test -z "$ac_init"; then
29486               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29487               { echo "$as_me:29487: WARNING: Variable $ac_name is used but was not set:
29488 $ac_seen" >&5
29489 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29490 $ac_seen" >&2;}
29491             fi
29492         fi
29493     done
29494     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29495     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29496     if test -s $tmp/out; then
29497       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29498       { echo "$as_me:29498: WARNING: Some variables may not be substituted:
29499 $ac_seen" >&5
29500 echo "$as_me: WARNING: Some variables may not be substituted:
29501 $ac_seen" >&2;}
29502     fi
29503   else
29504     cat $tmp/out
29505   fi
29506   rm -f $tmp/out
29507
29508 done
29509 EOF
29510 cat >>"$CONFIG_STATUS" <<\EOF
29511
29512 #
29513 # CONFIG_HEADER section.
29514 #
29515
29516 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29517 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29518 #
29519 # ac_d sets the value in "#define NAME VALUE" lines.
29520 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29521 ac_dB='[        ].*$,\1#\2'
29522 ac_dC=' '
29523 ac_dD=',;t'
29524 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29525 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29526 ac_iB='\([      ]\),\1#\2define\3'
29527 ac_iC=' '
29528 ac_iD='\4,;t'
29529 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29530 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29531 ac_uB='$,\1#\2define\3'
29532 ac_uC=' '
29533 ac_uD=',;t'
29534
29535 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29536   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29537   case "$ac_file" in
29538   - | *:- | *:-:* ) # input from stdin
29539         cat >$tmp/stdin
29540         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29541         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29542   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29543         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29544   * )   ac_file_in=$ac_file.in ;;
29545   esac
29546
29547   test x"$ac_file" != x- && { echo "$as_me:29547: creating $ac_file" >&5
29548 echo "$as_me: creating $ac_file" >&6;}
29549
29550   # First look for the input files in the build tree, otherwise in the
29551   # src tree.
29552   ac_file_inputs=`IFS=:
29553     for f in $ac_file_in; do
29554       case $f in
29555       -) echo $tmp/stdin ;;
29556       [\\/$]*)
29557          # Absolute (can't be DOS-style, as IFS=:)
29558          test -f "$f" || { { echo "$as_me:29558: error: cannot find input file: $f" >&5
29559 echo "$as_me: error: cannot find input file: $f" >&2;}
29560    { (exit 1); exit 1; }; }
29561          echo $f;;
29562       *) # Relative
29563          if test -f "$f"; then
29564            # Build tree
29565            echo $f
29566          elif test -f "$srcdir/$f"; then
29567            # Source tree
29568            echo "$srcdir/$f"
29569          else
29570            # /dev/null tree
29571            { { echo "$as_me:29571: error: cannot find input file: $f" >&5
29572 echo "$as_me: error: cannot find input file: $f" >&2;}
29573    { (exit 1); exit 1; }; }
29574          fi;;
29575       esac
29576     done` || { (exit 1); exit 1; }
29577   # Remove the trailing spaces.
29578   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29579
29580 EOF
29581
29582 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29583 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29584 # be either 'cat' or 'sort'.
29585 cat confdefs.h | uniq >conftest.vals
29586
29587 # Break up conftest.vals because some shells have a limit on
29588 # the size of here documents, and old seds have small limits too.
29589
29590 rm -f conftest.tail
29591 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29592 while grep . conftest.vals >/dev/null
29593 do
29594   # Write chunks of a limited-size here document to conftest.frag.
29595   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29596   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29597   echo 'CEOF' >> "$CONFIG_STATUS"
29598   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29599   rm -f conftest.vals
29600   mv conftest.tail conftest.vals
29601 done
29602 rm -f conftest.vals
29603
29604 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29605 # marker @DEFS@.
29606 echo '  cat >> conftest.edit <<CEOF
29607 /@DEFS@/r conftest.frag
29608 /@DEFS@/d
29609 CEOF
29610 sed -f conftest.edit $tmp/in > $tmp/out
29611 rm -f $tmp/in
29612 mv $tmp/out $tmp/in
29613 rm -f conftest.edit conftest.frag
29614 ' >> "$CONFIG_STATUS"
29615
29616 cat >>"$CONFIG_STATUS" <<\EOF
29617   # Let's still pretend it is `configure' which instantiates (i.e., don't
29618   # use $as_me), people would be surprised to read:
29619   #    /* config.h.  Generated automatically by config.status.  */
29620   if test x"$ac_file" = x-; then
29621     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29622   else
29623     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29624   fi
29625   cat $tmp/in >>$tmp/config.h
29626   rm -f $tmp/in
29627   if test x"$ac_file" != x-; then
29628     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29629       { echo "$as_me:29629: $ac_file is unchanged" >&5
29630 echo "$as_me: $ac_file is unchanged" >&6;}
29631     else
29632       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29633          X"$ac_file" : 'X\(//\)[^/]' \| \
29634          X"$ac_file" : 'X\(//\)$' \| \
29635          X"$ac_file" : 'X\(/\)' \| \
29636          .     : '\(.\)' 2>/dev/null ||
29637 echo X"$ac_file" |
29638     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29639           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29640           /^X\(\/\/\)$/{ s//\1/; q; }
29641           /^X\(\/\).*/{ s//\1/; q; }
29642           s/.*/./; q'`
29643       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29644         { case "$ac_dir" in
29645   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29646   *)                      as_incr_dir=.;;
29647 esac
29648 as_dummy="$ac_dir"
29649 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29650   case $as_mkdir_dir in
29651     # Skip DOS drivespec
29652     ?:) as_incr_dir=$as_mkdir_dir ;;
29653     *)
29654       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29655       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29656     ;;
29657   esac
29658 done; }
29659
29660       fi
29661       rm -f "$ac_file"
29662       mv "$tmp/config.h" "$ac_file"
29663     fi
29664   else
29665     cat $tmp/config.h
29666     rm -f $tmp/config.h
29667   fi
29668 done
29669 EOF
29670 cat >>"$CONFIG_STATUS" <<\EOF
29671 #
29672 # CONFIG_COMMANDS section.
29673 #
29674 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29675   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29676   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29677
29678   case "$ac_dest" in
29679     default )
29680 if test "x$cf_with_tests" != xno ; then
29681
29682 for cf_dir in test
29683 do
29684         if test ! -d "$srcdir/$cf_dir" ; then
29685                 continue
29686         elif test -f "$srcdir/$cf_dir/programs" ; then
29687                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29688         fi
29689 done
29690
29691 fi
29692
29693 cf_prefix=$LIB_PREFIX
29694
29695 case "$cf_cv_shlib_version" in
29696 (cygdll|msysdll|mingw|msvcdll)
29697         TINFO_NAME=$TINFO_ARG_SUFFIX
29698         TINFO_SUFFIX=.dll
29699         ;;
29700 esac
29701
29702 if test -n "$TINFO_SUFFIX" ; then
29703         case "$TINFO_SUFFIX" in
29704         (tw*)
29705                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29706                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29707                 ;;
29708         (t*)
29709                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29710                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29711                 ;;
29712         (w*)
29713                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29714                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29715                 ;;
29716         esac
29717 fi
29718
29719 for cf_dir in $SRC_SUBDIRS
29720 do
29721         if test ! -d "$srcdir/$cf_dir" ; then
29722                 continue
29723         elif test -f "$srcdir/$cf_dir/modules" ; then
29724
29725                 SHARED_LIB=
29726                 Libs_To_Make=
29727                 cf_awk_program=
29728                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29729                 then
29730                         cf_awk_program="$cf_awk_program\
29731 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29732 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29733 "
29734                 fi
29735
29736                 if test "x$WILDCARD_SYMS" = xno
29737                 then
29738                         cf_awk_program="$cf_awk_program\
29739 /[      ]_\\*;/ { skip=1; next; }\
29740 "
29741                 fi
29742
29743                 if test "x$cf_awk_program" != "x"
29744                 then
29745                         cat >>$cf_dir/Makefile <<CF_EOF
29746
29747 # Generated by CF_LIB_RULES
29748 resulting.map: $UNALTERED_SYMS
29749         $AWK 'BEGIN { skip = 1; last=""; } \
29750 $cf_awk_program \
29751 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29752  skip = 0; last = \$\$0; } \
29753 END { print last; }' < "$UNALTERED_SYMS" >\$@
29754
29755 distclean::
29756         rm -f resulting.map
29757 CF_EOF
29758                 fi
29759
29760                 for cf_item in $cf_LIST_MODELS
29761                 do
29762
29763         case X$cf_item in
29764         (Xlibtool)
29765                 cf_suffix='.la'
29766                 cf_depsuf=$cf_suffix
29767                 ;;
29768         (Xdebug)
29769                 case "$cf_cv_system_name" in
29770                 (*-msvc*)
29771                         cf_suffix='_g.lib'
29772                         ;;
29773                 (*)
29774                         cf_suffix='_g.a'
29775                         ;;
29776                 esac
29777                 cf_depsuf=$cf_suffix
29778                 ;;
29779         (Xprofile)
29780                 case "$cf_cv_system_name" in
29781                 (*-msvc*)
29782                         cf_suffix='_p.lib'
29783                         ;;
29784                 (*)
29785                         cf_suffix='_p.a'
29786                         ;;
29787                 esac
29788                 cf_depsuf=$cf_suffix
29789                 ;;
29790         (Xshared)
29791                 case "$cf_cv_system_name" in
29792                 (aix[5-7]*)
29793                         cf_suffix='.so'
29794                         cf_depsuf=$cf_suffix
29795                         ;;
29796                 (*-msvc*)
29797                         cf_suffix='.dll'
29798                         cf_depsuf='.dll.lib'
29799                         ;;
29800                 (cygwin*|msys*|mingw*)
29801                         cf_suffix='.dll'
29802                         cf_depsuf='.dll.a'
29803                         ;;
29804                 (darwin*)
29805                         cf_suffix='.dylib'
29806                         cf_depsuf=$cf_suffix
29807                         ;;
29808                 (hpux*)
29809                         case "$target" in
29810                         (ia64*)
29811                                 cf_suffix='.so'
29812                                 cf_depsuf=$cf_suffix
29813                                 ;;
29814                         (*)
29815                                 cf_suffix='.sl'
29816                                 cf_depsuf=$cf_suffix
29817                                 ;;
29818                         esac
29819                         ;;
29820                 (*)
29821                         cf_suffix='.so'
29822                         cf_depsuf=$cf_suffix
29823                         ;;
29824                 esac
29825                 ;;
29826         (*)
29827                 case "$target" in
29828                 (*-msvc*)
29829                         cf_suffix='.lib'
29830                         ;;
29831                 (*)
29832                         cf_suffix='.a'
29833                         ;;
29834                 esac
29835                 cf_depsuf=$cf_suffix
29836                 ;;
29837         esac
29838         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29839         then
29840                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29841                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29842         fi
29843
29844                         if test "$cf_dir" = "c++"
29845                         then
29846
29847 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29848
29849 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29850
29851                         else
29852
29853 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29854
29855 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29856
29857                         fi
29858                         test -z "$cf_libname" && cf_libname="$cf_dir"
29859                         if test "$cf_item" = shared ; then
29860                                 if test -n "${LIB_SUFFIX}"
29861                                 then
29862                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29863                                 else
29864                                         cf_shared_suffix="$cf_suffix"
29865                                 fi
29866                                 if test "$cf_cv_do_symlinks" = yes ; then
29867                                         cf_version_name=
29868
29869                                         case "$cf_cv_shlib_version" in
29870                                         (rel)
29871                                                 cf_version_name=REL_VERSION
29872                                                 ;;
29873                                         (abi)
29874                                                 cf_version_name=ABI_VERSION
29875                                                 ;;
29876                                         esac
29877
29878                                         if test -n "$cf_version_name"
29879                                         then
29880                                                 case "$cf_cv_system_name" in
29881                                                 (darwin*)
29882                                                         # "w", etc?
29883                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29884                                                         ;;
29885                                                 (*)
29886                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29887                                                         ;;
29888                                                 esac
29889                                         fi
29890                                         if test -n "${USE_LIB_SUFFIX}"
29891                                         then
29892                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29893                                         else
29894                                                 cf_shared_suffix="$cf_suffix"
29895                                         fi
29896                                 fi
29897                                 # cygwin needs import library, and has unique naming convention
29898                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29899                                 # use 'cyg' prefix for shared lib.
29900                                 case "$cf_cv_shlib_version" in
29901                                 (cygdll)
29902                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29903                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29904                                         ;;
29905                                 (msysdll)
29906                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29907                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29908                                         ;;
29909                                 (mingw)
29910                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29911                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29912                                         ;;
29913                                 (msvcdll)
29914                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29915                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29916                                         ;;
29917                                 (*)
29918                                         cf_add_lib=
29919                                         ;;
29920                                 esac
29921                                 if test -n "$cf_add_lib"
29922                                 then
29923                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29924                                         continue
29925                                 fi
29926                         fi
29927                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29928                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29929                 done
29930
29931                 if test "$cf_dir" = ncurses ; then
29932                         cf_subsets="$LIB_SUBSETS"
29933                         cf_r_parts="$cf_subsets"
29934                         cf_liblist="$Libs_To_Make"
29935
29936                         while test -n "$cf_r_parts"
29937                         do
29938                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29939                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29940                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29941                                         cf_add_lib=
29942                                         case "$cf_l_parts" in
29943                                         (*termlib*)
29944                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29945                                                 ;;
29946                                         (*ticlib*)
29947                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29948                                                 ;;
29949                                         (*)
29950                                                 break
29951                                                 ;;
29952                                         esac
29953                                         if test -n "$cf_add_lib"; then
29954                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29955                                         fi
29956                                 else
29957                                         break
29958                                 fi
29959                         done
29960                 else
29961                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29962                 fi
29963
29964                 if test "$cf_dir" = c++; then
29965                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29966                                 cf_list=
29967                                 for cf_item in $Libs_To_Make
29968                                 do
29969                                         case "$cf_item" in
29970                                         (*.a)
29971                                                 ;;
29972                                         (*)
29973                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29974                                                 ;;
29975                                         esac
29976                                         for cf_test in $cf_list
29977                                         do
29978                                                 if test "$cf_test" = "$cf_item"
29979                                                 then
29980                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29981                                                         cf_item=
29982                                                         break
29983                                                 fi
29984                                         done
29985                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29986                                 done
29987                                 Libs_To_Make="$cf_list"
29988                         fi
29989                 fi
29990
29991                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29992                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29993                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29994                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29995
29996                 $AWK -f "$srcdir/mk-0th.awk" \
29997                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29998                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29999
30000                 for cf_subset in $cf_subsets
30001                 do
30002                         cf_subdirs=
30003                         for cf_item in $cf_LIST_MODELS
30004                         do
30005
30006                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30007
30008 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30009
30010                         CXX_MODEL=$cf_ITEM
30011                         if test "$CXX_MODEL" = SHARED; then
30012                                 case "$cf_cv_shlib_version" in
30013                                 (cygdll|msysdll|mingw|msvcdll)
30014                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30015
30016 echo "${as_me:-configure}:30016: testing overriding CXX_MODEL to SHARED ..." 1>&5
30017
30018                                         with_shared_cxx=yes
30019                                         ;;
30020                                 (*)
30021                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30022                                         ;;
30023                                 esac
30024                         fi
30025
30026         case X$cf_item in
30027         (Xlibtool)
30028                 cf_suffix='.la'
30029                 cf_depsuf=$cf_suffix
30030                 ;;
30031         (Xdebug)
30032                 case "$cf_cv_system_name" in
30033                 (*-msvc*)
30034                         cf_suffix='_g.lib'
30035                         ;;
30036                 (*)
30037                         cf_suffix='_g.a'
30038                         ;;
30039                 esac
30040                 cf_depsuf=$cf_suffix
30041                 ;;
30042         (Xprofile)
30043                 case "$cf_cv_system_name" in
30044                 (*-msvc*)
30045                         cf_suffix='_p.lib'
30046                         ;;
30047                 (*)
30048                         cf_suffix='_p.a'
30049                         ;;
30050                 esac
30051                 cf_depsuf=$cf_suffix
30052                 ;;
30053         (Xshared)
30054                 case "$cf_cv_system_name" in
30055                 (aix[5-7]*)
30056                         cf_suffix='.so'
30057                         cf_depsuf=$cf_suffix
30058                         ;;
30059                 (*-msvc*)
30060                         cf_suffix='.dll'
30061                         cf_depsuf='.dll.lib'
30062                         ;;
30063                 (cygwin*|msys*|mingw*)
30064                         cf_suffix='.dll'
30065                         cf_depsuf='.dll.a'
30066                         ;;
30067                 (darwin*)
30068                         cf_suffix='.dylib'
30069                         cf_depsuf=$cf_suffix
30070                         ;;
30071                 (hpux*)
30072                         case "$target" in
30073                         (ia64*)
30074                                 cf_suffix='.so'
30075                                 cf_depsuf=$cf_suffix
30076                                 ;;
30077                         (*)
30078                                 cf_suffix='.sl'
30079                                 cf_depsuf=$cf_suffix
30080                                 ;;
30081                         esac
30082                         ;;
30083                 (*)
30084                         cf_suffix='.so'
30085                         cf_depsuf=$cf_suffix
30086                         ;;
30087                 esac
30088                 ;;
30089         (*)
30090                 case "$target" in
30091                 (*-msvc*)
30092                         cf_suffix='.lib'
30093                         ;;
30094                 (*)
30095                         cf_suffix='.a'
30096                         ;;
30097                 esac
30098                 cf_depsuf=$cf_suffix
30099                 ;;
30100         esac
30101         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30102         then
30103                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30104                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30105         fi
30106
30107         case $cf_item in
30108         (libtool) cf_subdir='obj_lo'  ;;
30109         (normal)  cf_subdir='objects' ;;
30110         (debug)   cf_subdir='obj_g' ;;
30111         (profile) cf_subdir='obj_p' ;;
30112         (shared)
30113                 case "$cf_cv_system_name" in
30114                 (cygwin|msys)
30115                         cf_subdir='objects' ;;
30116                 (*)
30117                         cf_subdir='obj_s' ;;
30118                 esac
30119         esac
30120
30121                         # Test for case where we build libtinfo with a different name.
30122                         cf_libname=$cf_dir
30123                         if test "$cf_dir" = ncurses ; then
30124                                 case "$cf_subset" in
30125                                 (*base*)
30126                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30127                                         ;;
30128                                 (*termlib*)
30129                                         cf_libname=$TINFO_LIB_SUFFIX
30130                                         ;;
30131                                 (ticlib*)
30132                                         cf_libname=$TICS_LIB_SUFFIX
30133                                         ;;
30134                                 esac
30135                         elif test "$cf_dir" = c++ ; then
30136
30137 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30138
30139 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30140
30141                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30142                         else
30143
30144 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30145
30146 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30147
30148                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30149                         fi
30150                         if test -n "${USE_ARG_SUFFIX}" ; then
30151                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30152                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30153                         fi
30154
30155                         # These dependencies really are for development, not
30156                         # builds, but they are useful in porting, too.
30157                         cf_depend="../include/ncurses_cfg.h"
30158                         if test "$srcdir" = "."; then
30159                                 cf_reldir="."
30160                         else
30161                                 cf_reldir="\${srcdir}"
30162                         fi
30163
30164                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30165                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30166                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30167                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30168                         fi
30169
30170                         cf_dir_suffix=
30171                         old_cf_suffix="$cf_suffix"
30172                         if test "$cf_cv_shlib_version_infix" = yes ; then
30173                         if test -n "$USE_LIB_SUFFIX" ; then
30174                                 case "$USE_LIB_SUFFIX" in
30175                                 (tw*)
30176                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30177                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30178                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30179                                         ;;
30180                                 (t*)
30181                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30182                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30183                                         cf_dir_suffix=t$EXTRA_SUFFIX
30184                                         ;;
30185                                 (w*)
30186                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30187                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30188                                         cf_dir_suffix=w$EXTRA_SUFFIX
30189                                         ;;
30190                                 (*)
30191                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30192                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30193                                         cf_dir_suffix=$EXTRA_SUFFIX
30194                                         ;;
30195                                 esac
30196                         fi
30197                         fi
30198
30199                         $AWK -f "$srcdir/mk-1st.awk" \
30200                                 name=${cf_libname}${cf_dir_suffix} \
30201                                 traces=$LIB_TRACING \
30202                                 MODEL=$cf_ITEM \
30203                                 CXX_MODEL=$CXX_MODEL \
30204                                 LIB_SUFFIX=$LIB_SUFFIX \
30205                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30206                                 make_phony="${cf_cv_make_PHONY:-no}" \
30207                                 model=$cf_subdir \
30208                                 prefix=$cf_prefix \
30209                                 suffix=$cf_suffix \
30210                                 subset=$cf_subset \
30211                                 driver=$cf_cv_term_driver \
30212                                 SymLink="$LN_S" \
30213                                 TermlibRoot=$TINFO_NAME \
30214                                 TermlibSuffix=$TINFO_SUFFIX \
30215                                 ShlibVer=$cf_cv_shlib_version \
30216                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30217                                 ReLink=${cf_cv_do_relink:-no} \
30218                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30219                                 DoLinks=$cf_cv_do_symlinks \
30220                                 rmSoLocs=$cf_cv_rm_so_locs \
30221                                 ldconfig="$LDCONFIG" \
30222                                 overwrite=$WITH_OVERWRITE \
30223                                 depend="$cf_depend" \
30224                                 host="$host" \
30225                                 libtool_version="$LIBTOOL_VERSION" \
30226                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30227
30228                         cf_suffix="$old_cf_suffix"
30229
30230                         for cf_subdir2 in $cf_subdirs lib
30231                         do
30232                                 test "$cf_subdir" = "$cf_subdir2" && break
30233                         done
30234                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30235                         $AWK -f "$srcdir/mk-2nd.awk" \
30236                                 name=$cf_dir \
30237                                 traces=$LIB_TRACING \
30238                                 MODEL=$cf_ITEM \
30239                                 model=$cf_subdir \
30240                                 subset=$cf_subset \
30241                                 srcdir=$srcdir \
30242                                 echo=$WITH_ECHO \
30243                                 crenames=$cf_cv_prog_CC_c_o \
30244                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30245                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30246                         cf_subdirs="$cf_subdirs $cf_subdir"
30247                         done
30248                 done
30249         fi
30250
30251         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30252 done
30253
30254 echo >> Makefile
30255 echo '# generated by CF_LIB_RULES' >> Makefile
30256
30257 if test "x$cf_cv_make_PHONY" = xyes ; then
30258         cat >> Makefile <<-CF_EOF
30259
30260         .PHONY :        libs
30261         .PHONY :        lintlib
30262         .PHONY :        install.includes
30263         .PHONY :        uninstall.includes
30264         .PHONY :        install.libs
30265         .PHONY :        uninstall.libs
30266 CF_EOF
30267 fi
30268
30269 for cf_dir in $SRC_SUBDIRS
30270 do
30271         if test ! -d "$srcdir/$cf_dir" ; then
30272                 continue
30273         fi
30274
30275         if test -f "$cf_dir/Makefile" ; then
30276                 case "$cf_dir" in
30277                 (Ada95)
30278                         echo 'libs \' >> Makefile
30279                         echo 'install.libs \' >> Makefile
30280                         echo 'uninstall.libs ::' >> Makefile
30281                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30282                         ;;
30283                 esac
30284         fi
30285
30286         if test -f "$srcdir/$cf_dir/modules" ; then
30287
30288                 if test "x$cf_cv_make_PHONY" = xyes ; then
30289                         cat >> Makefile <<-CF_EOF
30290
30291                         .PHONY :        install.$cf_dir
30292                         .PHONY :        uninstall.$cf_dir
30293 CF_EOF
30294                 fi
30295
30296                 echo >> Makefile
30297                 if test -f "$srcdir/$cf_dir/headers" ; then
30298 cat >> Makefile <<CF_EOF
30299 install.includes \\
30300 uninstall.includes \\
30301 CF_EOF
30302                 fi
30303
30304 cat >> Makefile <<CF_EOF
30305 lint \\
30306 libs \\
30307 lintlib \\
30308 install.libs \\
30309 uninstall.libs \\
30310 install.$cf_dir \\
30311 uninstall.$cf_dir ::
30312         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30313 CF_EOF
30314         elif test -f "$srcdir/$cf_dir/headers" ; then
30315 cat >> Makefile <<CF_EOF
30316
30317 libs \\
30318 install.libs \\
30319 uninstall.libs \\
30320 install.includes \\
30321 uninstall.includes ::
30322         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30323 CF_EOF
30324 fi
30325 done
30326
30327 if test "x$cf_cv_make_PHONY" = xyes ; then
30328         cat >> Makefile <<-CF_EOF
30329
30330         .PHONY :        install.data
30331         .PHONY :        uninstall.data
30332 CF_EOF
30333 fi
30334
30335 if test "x$cf_with_db_install" = xyes; then
30336 cat >> Makefile <<CF_EOF
30337
30338 install.libs uninstall.libs \\
30339 install.data uninstall.data ::
30340 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30341 CF_EOF
30342 else
30343 cat >> Makefile <<CF_EOF
30344
30345 install.libs uninstall.libs ::
30346         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30347 CF_EOF
30348 fi
30349
30350 if test "x$cf_with_manpages" = xyes; then
30351
30352 if test "x$cf_cv_make_PHONY" = xyes ; then
30353         cat >> Makefile <<-CF_EOF
30354
30355         .PHONY :        install.man
30356         .PHONY :        uninstall.man
30357 CF_EOF
30358 fi
30359
30360 cat >> Makefile <<CF_EOF
30361
30362 install.man \\
30363 uninstall.man ::
30364         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30365 CF_EOF
30366 fi
30367
30368 cat >> Makefile <<CF_EOF
30369
30370 distclean ::
30371         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30372         rm -f headers.sh headers.sed mk_shared_lib.sh
30373         rm -f edit_man.* man_alias.*
30374         rm -rf \${DIRS_TO_MAKE}
30375 CF_EOF
30376
30377 # Special case: tack's manpage lives in its own directory.
30378 if test "x$cf_with_manpages" = xyes; then
30379 if test "x$cf_with_tack" = "xyes"; then
30380 cat >> Makefile <<CF_EOF
30381
30382 install.man \\
30383 uninstall.man ::
30384         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30385 CF_EOF
30386 fi
30387 fi
30388
30389 rm -f headers.sed headers.sh
30390
30391 echo creating headers.sh
30392 cat >headers.sh <<CF_EOF
30393 #! $SHELL
30394 # This shell script is generated by the 'configure' script.  It is invoked in a
30395 # subdirectory of the build tree.  It generates a sed-script in the parent
30396 # directory that is used to adjust includes for header files that reside in a
30397 # subdirectory of /usr/include, etc.
30398 PRG=""
30399 while test \$# != 3
30400 do
30401 PRG="\$PRG \$1"; shift
30402 done
30403 DST=\$1
30404 REF=\$2
30405 SRC=\$3
30406 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30407 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30408 echo installing \$SRC in \$DST
30409 CF_EOF
30410
30411 if test "$WITH_CURSES_H" = yes; then
30412         cat >>headers.sh <<CF_EOF
30413 case \$DST in
30414 (/*/include/*)
30415         END=\`basename \$DST\`
30416         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30417         do
30418                 NAME=\`basename \$i\`
30419                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30420         done
30421         ;;
30422 (*)
30423         echo "" >> \$TMPSED
30424         ;;
30425 esac
30426 CF_EOF
30427
30428 else
30429         cat >>headers.sh <<CF_EOF
30430 case \$DST in
30431 (/*/include/*)
30432         END=\`basename \$DST\`
30433         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30434         do
30435                 NAME=\`basename \$i\`
30436                 if test "\$NAME" = "curses.h"
30437                 then
30438                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30439                         NAME=ncurses.h
30440                 fi
30441                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30442         done
30443         ;;
30444 (*)
30445         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30446         ;;
30447 esac
30448 CF_EOF
30449 fi
30450 cat >>headers.sh <<CF_EOF
30451 rm -f \$TMPSRC
30452 sed -f \$TMPSED \$SRC > \$TMPSRC
30453 NAME=\`basename \$SRC\`
30454 CF_EOF
30455 if test "$WITH_CURSES_H" != yes; then
30456         cat >>headers.sh <<CF_EOF
30457 test "\$NAME" = "curses.h" && NAME=ncurses.h
30458 CF_EOF
30459 fi
30460 cat >>headers.sh <<CF_EOF
30461 # Just in case someone gzip'd manpages, remove the conflicting copy.
30462 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30463
30464 eval \$PRG \$TMPSRC \$DST/\$NAME
30465 rm -f \$TMPSRC \$TMPSED
30466 CF_EOF
30467
30468 chmod 0755 headers.sh
30469
30470 for cf_dir in $SRC_SUBDIRS
30471 do
30472         if test ! -d "$srcdir/$cf_dir" ; then
30473                 continue
30474         fi
30475
30476         if test -f "$srcdir/$cf_dir/headers" ; then
30477                 $AWK -f "$srcdir/mk-hdr.awk" \
30478                         subset="$LIB_SUBSETS" \
30479                         compat="$WITH_CURSES_H" \
30480                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30481         fi
30482
30483         if test -f "$srcdir/$cf_dir/modules" ; then
30484                 if test "$cf_dir" != "c++" ; then
30485                         if test "x$cf_cv_make_PHONY" = xyes ; then
30486                                 cat >> $cf_dir/Makefile <<-CF_EOF
30487
30488                                 .PHONY :        depend
30489 CF_EOF
30490                         fi
30491
30492                         cat >>$cf_dir/Makefile <<"CF_EOF"
30493 depend : ${AUTO_SRC}
30494         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30495
30496 # DO NOT DELETE THIS LINE -- make depend depends on it.
30497 CF_EOF
30498                 fi
30499         fi
30500 done
30501
30502 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30503 if test -z "$USE_OLD_MAKERULES" ; then
30504         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30505 fi
30506 fi
30507  ;;
30508   esac
30509 done
30510 EOF
30511
30512 cat >>"$CONFIG_STATUS" <<\EOF
30513
30514 { (exit 0); exit 0; }
30515 EOF
30516 chmod +x "$CONFIG_STATUS"
30517 ac_clean_files=$ac_clean_files_save
30518
30519 # configure is writing to config.log, and then calls config.status.
30520 # config.status does its own redirection, appending to config.log.
30521 # Unfortunately, on DOS this fails, as config.log is still kept open
30522 # by configure, so config.status won't be able to write to it; its
30523 # output is simply discarded.  So we exec the FD to /dev/null,
30524 # effectively closing config.log, so it can be properly (re)opened and
30525 # appended to by config.status.  When coming back to configure, we
30526 # need to make the FD available again.
30527 if test "$no_create" != yes; then
30528   ac_cs_success=:
30529   exec 5>/dev/null
30530   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30531   exec 5>>config.log
30532   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30533   # would make configure fail if this is the last instruction.
30534   "$ac_cs_success" || { (exit 1); exit 1; }
30535 fi
30536 ${MAKE:-make} preinstall