]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210206
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.729 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210105.
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 environment when running as root
787   --enable-symlinks       make tic use symbolic links not hard links
788   --enable-broken_linker  compile with broken-linker support code
789   --enable-bsdpad         recognize BSD-style prefix padding
790   --enable-widec          compile with wide-char/UTF-8 code
791   --disable-lp64          allow chtype to be long (ignore _LP64)
792   --disable-largefile     omit support for large files
793   --disable-tparm-varargs compile tparm() without varargs interface
794   --disable-tic-depends   link tic library without explicit dependency on ncurses library
795   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
796   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
797   --with-bool=TYPE        override fallback type of bool variable
798   --with-caps=alt         compile with alternate Caps file
799   --with-chtype=TYPE      override type of chtype
800   --with-ospeed=TYPE      override type of ospeed variable
801   --with-mmask-t=TYPE     override type of mmask_t
802   --with-ccharw-max=XXX   override size CCHARW_MAX
803   --enable-signed-char    compile using signed Boolean's in term.h
804   --with-tparm-arg=TYPE   override parameter type of tparm
805   --with-rcs-ids          compile-in RCS identifiers
806 Options to Specify How Manpages are Installed:
807   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
808                           optionally formatted/catonly, e.g., gzip,formatted
809   --with-manpage-renames  specify manpage-renaming
810   --with-manpage-aliases  specify manpage-aliases using .so
811   --with-manpage-symlinks specify manpage-aliases using symlinks
812   --with-manpage-tbl      specify manpage processing with tbl
813 Extensions:
814   --disable-ext-funcs     disable function-extensions
815   --enable-sp-funcs       enable SCREEN-extensions
816   --enable-term-driver    enable terminal-driver
817   --enable-const          compile with extra/non-standard const
818   --enable-ext-colors     compile for 256-color support
819   --enable-ext-mouse      compile for extended mouse-encoding
820   --enable-ext-putwin     compile with extended putwin/screendump
821   --enable-no-padding     compile with $NCURSES_NO_PADDING code
822   --enable-sigwinch       compile with SIGWINCH handler
823   --enable-tcap-names     compile with user-definable terminal capabilities
824 Reentrant Code:
825   --with-pthread          use POSIX thread library
826   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
827   --enable-weak-symbols   enable weak-symbols for pthreads
828   --enable-reentrant      compile with reentrant code
829   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
830   --enable-opaque-form    make form-library structures "opaque"
831   --enable-opaque-menu    make menu-library structures "opaque"
832   --enable-opaque-panel   make panel-library structures "opaque"
833   --with-wrap-prefix=XXX  override prefix used for public variables
834 Development Code:
835   --without-develop       disable development options
836   --enable-hard-tabs      compile with hard-tabs code
837   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
838 Experimental Code:
839   --disable-assumed-color do not assume anything about default-colors
840   --disable-hashmap       compile without hashmap scrolling-optimization
841   --enable-colorfgbg      compile-in experimental $COLORFGBG code
842   --enable-fvisibility    compile with -fvisibility=hidden
843   --enable-interop        compile-in interop bindings
844   --enable-safe-sprintf   compile with experimental safe-sprintf code
845   --disable-scroll-hints  compile without scroll-hints code
846   --enable-wgetch-events  compile with wgetch-events code
847   --enable-exp-win32      compile with experimental-Windows driver
848 Testing/development Options:
849   --disable-echo          do not display "compiling" commands
850   --disable-stripping     do not strip (debug info) installed executables
851   --enable-warnings       test: turn on gcc compiler warnings
852   --enable-string-hacks   work around bogus compiler/loader warnings
853   --enable-assertions     test: turn on generation of assertion code
854   --with-dmalloc          test: use Gray Watson's dmalloc library
855   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
856   --with-valgrind         test: use valgrind
857   --disable-leaks         test: free permanent memory, analyze leaks
858   --enable-expanded       test: generate functions for certain macros
859   --disable-macros        test: use functions rather than macros
860   --with-trace            test: add trace() function to all models of ncurses
861   --disable-gnat-projects test: disable GNAT projects even if usable
862 Ada Binding Options:
863   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
864   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
865   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
866   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
867   --with-ada-libname=XXX  override default Ada library-name
868   --with-form-libname=XXX override form basename of library
869   --with-menu-libname=XXX override menu basename of library
870   --with-panel-libname=XXX override panel basename of library
871   --with-cxx-libname=XXX override ncurses++ basename of library
872
873 Some influential environment variables:
874   CC          C compiler command
875   CFLAGS      C compiler flags
876   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
877               nonstandard directory <lib dir>
878   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
879               headers in a nonstandard directory <include dir>
880   CPP         C preprocessor
881   CXX         C++ compiler command
882   CXXFLAGS    C++ compiler flags
883   CXXCPP      C++ preprocessor
884
885 Use these variables to override the choices made by `configure' or to help
886 it to find libraries and programs with nonstandard names/locations.
887
888 EOF
889 fi
890
891 if test "$ac_init_help" = "recursive"; then
892   # If there are subdirs, report their specific --help.
893   ac_popdir=`pwd`
894   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
895     cd "$ac_subdir"
896     # A "../" for each directory in /$ac_subdir.
897     ac_dots=`echo "$ac_subdir" |
898              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
899
900     case "$srcdir" in
901     .) # No --srcdir option.  We are building in place.
902       ac_sub_srcdir="$srcdir" ;;
903     [\\/]* | ?:[\\/]* ) # Absolute path.
904       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
905     *) # Relative path.
906       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
907     esac
908
909     # Check for guested configure; otherwise get Cygnus style configure.
910     if test -f "$ac_sub_srcdir/configure.gnu"; then
911       echo
912       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
913     elif test -f "$ac_sub_srcdir/configure"; then
914       echo
915       $SHELL "$ac_sub_srcdir/configure" --help=recursive
916     elif test -f "$ac_sub_srcdir/configure.ac" ||
917            test -f "$ac_sub_srcdir/configure.in"; then
918       echo
919       "$ac_configure" --help
920     else
921       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
922     fi
923     cd "$ac_popdir"
924   done
925 fi
926
927 test -n "$ac_init_help" && exit 0
928 if "$ac_init_version"; then
929   cat <<\EOF
930
931 Copyright 2003-2020,2021        Thomas E. Dickey
932 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
933 Free Software Foundation, Inc.
934 This configure script is free software; the Free Software Foundation
935 gives unlimited permission to copy, distribute and modify it.
936 EOF
937   exit 0
938 fi
939 exec 5>config.log
940 cat >&5 <<EOF
941 This file contains any messages produced by compilers while
942 running configure, to aid debugging if configure makes a mistake.
943
944 It was created by $as_me, which was
945 generated by GNU Autoconf 2.52.20210105.  Invocation command line was
946
947   $ $0 $@
948
949 EOF
950 {
951 cat <<_ASUNAME
952 ## ---------- ##
953 ## Platform.  ##
954 ## ---------- ##
955
956 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
957 uname -m = `(uname -m) 2>/dev/null || echo unknown`
958 uname -r = `(uname -r) 2>/dev/null || echo unknown`
959 uname -s = `(uname -s) 2>/dev/null || echo unknown`
960 uname -v = `(uname -v) 2>/dev/null || echo unknown`
961
962 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
963 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
964
965 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
966 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
967 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
968 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
969 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
970 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
971 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
972
973 PATH = $PATH
974
975 _ASUNAME
976 } >&5
977
978 cat >&5 <<EOF
979 ## ------------ ##
980 ## Core tests.  ##
981 ## ------------ ##
982
983 EOF
984
985 # Keep a trace of the command line.
986 # Strip out --no-create and --no-recursion so they do not pile up.
987 # Also quote any args containing shell meta-characters.
988 ac_configure_args=
989 ac_sep=
990 for ac_arg
991 do
992   case "$ac_arg" in
993   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
994   | --no-cr | --no-c) ;;
995   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
997   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
998     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
999     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1000     ac_sep=" " ;;
1001   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1002      ac_sep=" " ;;
1003   esac
1004   # Get rid of the leading space.
1005 done
1006
1007 # When interrupted or exit'd, cleanup temporary files, and complete
1008 # config.log.  We remove comments because anyway the quotes in there
1009 # would cause problems or look ugly.
1010 trap 'exit_status=$?
1011   # Save into config.log some information that might help in debugging.
1012   echo >&5
1013   echo "## ----------------- ##" >&5
1014   echo "## Cache variables.  ##" >&5
1015   echo "## ----------------- ##" >&5
1016   echo >&5
1017   # The following way of writing the cache mishandles newlines in values,
1018 {
1019   (set) 2>&1 |
1020     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1021     *ac_space=\ *)
1022       sed -n \
1023         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1024           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1025       ;;
1026     *)
1027       sed -n \
1028         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1029       ;;
1030     esac;
1031 } >&5
1032   sed "/^$/d" confdefs.h >conftest.log
1033   if test -s conftest.log; then
1034     echo >&5
1035     echo "## ------------ ##" >&5
1036     echo "## confdefs.h.  ##" >&5
1037     echo "## ------------ ##" >&5
1038     echo >&5
1039     cat conftest.log >&5
1040   fi
1041   (echo; echo) >&5
1042   test "$ac_signal" != 0 &&
1043     echo "$as_me: caught signal $ac_signal" >&5
1044   echo "$as_me: exit $exit_status" >&5
1045   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1046     exit $exit_status
1047      ' 0
1048 for ac_signal in 1 2 13 15; do
1049   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1050 done
1051 ac_signal=0
1052
1053 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1054 rm -rf conftest* confdefs.h
1055 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1056 echo >confdefs.h
1057
1058 # Let the site file select an alternate cache file if it wants to.
1059 # Prefer explicitly selected file to automatically selected ones.
1060 if test -z "$CONFIG_SITE"; then
1061   if test "x$prefix" != xNONE; then
1062     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1063   else
1064     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1065   fi
1066 fi
1067 for ac_site_file in $CONFIG_SITE; do
1068   if test -r "$ac_site_file"; then
1069     { echo "$as_me:1069: loading site script $ac_site_file" >&5
1070 echo "$as_me: loading site script $ac_site_file" >&6;}
1071     cat "$ac_site_file" >&5
1072     . "$ac_site_file"
1073   fi
1074 done
1075
1076 if test -r "$cache_file"; then
1077   # Some versions of bash will fail to source /dev/null (special
1078   # files actually), so we avoid doing that.
1079   if test -f "$cache_file"; then
1080     { echo "$as_me:1080: loading cache $cache_file" >&5
1081 echo "$as_me: loading cache $cache_file" >&6;}
1082     case $cache_file in
1083       [\\/]* | ?:[\\/]* ) . $cache_file;;
1084       *)                      . ./$cache_file;;
1085     esac
1086   fi
1087 else
1088   { echo "$as_me:1088: creating cache $cache_file" >&5
1089 echo "$as_me: creating cache $cache_file" >&6;}
1090   >$cache_file
1091 fi
1092
1093 # Check that the precious variables saved in the cache have kept the same
1094 # value.
1095 ac_cache_corrupted=false
1096 for ac_var in `(set) 2>&1 |
1097                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1098   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1099   eval ac_new_set=\$ac_env_${ac_var}_set
1100   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1101   eval ac_new_val="\$ac_env_${ac_var}_value"
1102   case "$ac_old_set,$ac_new_set" in
1103     set,)
1104       { echo "$as_me:1104: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1105 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1106       ac_cache_corrupted=: ;;
1107     ,set)
1108       { echo "$as_me:1108: error: \`$ac_var' was not set in the previous run" >&5
1109 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1110       ac_cache_corrupted=: ;;
1111     ,);;
1112     *)
1113       if test "x$ac_old_val" != "x$ac_new_val"; then
1114         { echo "$as_me:1114: error: \`$ac_var' has changed since the previous run:" >&5
1115 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1116         { echo "$as_me:1116:   former value:  $ac_old_val" >&5
1117 echo "$as_me:   former value:  $ac_old_val" >&2;}
1118         { echo "$as_me:1118:   current value: $ac_new_val" >&5
1119 echo "$as_me:   current value: $ac_new_val" >&2;}
1120         ac_cache_corrupted=:
1121       fi;;
1122   esac
1123   # Pass precious variables to config.status.  It doesn't matter if
1124   # we pass some twice (in addition to the command line arguments).
1125   if test "$ac_new_set" = set; then
1126     case "$ac_new_val" in
1127     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1128       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1129       ac_configure_args="$ac_configure_args '$ac_arg'"
1130       ;;
1131     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1132        ;;
1133     esac
1134   fi
1135 done
1136 if "$ac_cache_corrupted"; then
1137   { echo "$as_me:1137: error: changes in the environment can compromise the build" >&5
1138 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1139   { { echo "$as_me:1139: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1140 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1141    { (exit 1); exit 1; }; }
1142 fi
1143
1144 ac_ext=c
1145 ac_cpp='$CPP $CPPFLAGS'
1146 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1147 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1148 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1149 ac_main_return="return"
1150
1151 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1152   *c*,-n*) ECHO_N=
1153            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1154            ECHO_T='     '
1155            ;;
1156   *c*,*  ) ECHO_N=-n
1157            ECHO_C=
1158            ECHO_T=
1159            ;;
1160   *)       ECHO_N=
1161            ECHO_C='\c'
1162            ECHO_T=
1163            ;;
1164 esac
1165 echo "#! $SHELL" >conftest.sh
1166 echo  "exit 0"   >>conftest.sh
1167 chmod +x conftest.sh
1168 if { (echo "$as_me:1168: PATH=\".;.\"; conftest.sh") >&5
1169   (PATH=".;."; conftest.sh) 2>&5
1170   ac_status=$?
1171   echo "$as_me:1171: \$? = $ac_status" >&5
1172   (exit "$ac_status"); }; then
1173   ac_path_separator=';'
1174 else
1175   ac_path_separator=:
1176 fi
1177 PATH_SEPARATOR="$ac_path_separator"
1178 rm -f conftest.sh
1179
1180 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1181
1182 top_builddir=`pwd`
1183
1184 for ac_prog in ggrep grep
1185 do
1186   # Extract the first word of "$ac_prog", so it can be a program name with args.
1187 set dummy $ac_prog; ac_word=$2
1188 echo "$as_me:1188: checking for $ac_word" >&5
1189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1190 if test "${ac_cv_prog_GREP+set}" = set; then
1191   echo $ECHO_N "(cached) $ECHO_C" >&6
1192 else
1193   if test -n "$GREP"; then
1194   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1195 else
1196   ac_save_IFS=$IFS; IFS=$ac_path_separator
1197 ac_dummy="$PATH"
1198 for ac_dir in $ac_dummy; do
1199   IFS=$ac_save_IFS
1200   test -z "$ac_dir" && ac_dir=.
1201   $as_executable_p "$ac_dir/$ac_word" || continue
1202 ac_cv_prog_GREP="$ac_prog"
1203 echo "$as_me:1203: found $ac_dir/$ac_word" >&5
1204 break
1205 done
1206
1207 fi
1208 fi
1209 GREP=$ac_cv_prog_GREP
1210 if test -n "$GREP"; then
1211   echo "$as_me:1211: result: $GREP" >&5
1212 echo "${ECHO_T}$GREP" >&6
1213 else
1214   echo "$as_me:1214: result: no" >&5
1215 echo "${ECHO_T}no" >&6
1216 fi
1217
1218   test -n "$GREP" && break
1219 done
1220 test -n "$GREP" || GREP=": "
1221
1222 echo "$as_me:1222: checking for egrep" >&5
1223 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1224 if test "${ac_cv_path_EGREP+set}" = set; then
1225   echo $ECHO_N "(cached) $ECHO_C" >&6
1226 else
1227   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1228    then ac_cv_path_EGREP="$GREP -E"
1229    else
1230      for ac_prog in gegrep egrep
1231 do
1232   # Extract the first word of "$ac_prog", so it can be a program name with args.
1233 set dummy $ac_prog; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_path_EGREP+set}" = set; then
1237   echo $ECHO_N "(cached) $ECHO_C" >&6
1238 else
1239   case $EGREP in
1240   [\\/]* | ?:[\\/]*)
1241   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1242   ;;
1243   *)
1244   ac_save_IFS=$IFS; IFS=$ac_path_separator
1245 ac_dummy="$PATH"
1246 for ac_dir in $ac_dummy; do
1247   IFS=$ac_save_IFS
1248   test -z "$ac_dir" && ac_dir=.
1249   if $as_executable_p "$ac_dir/$ac_word"; then
1250    ac_cv_path_EGREP="$ac_dir/$ac_word"
1251    echo "$as_me:1251: found $ac_dir/$ac_word" >&5
1252    break
1253 fi
1254 done
1255
1256   ;;
1257 esac
1258 fi
1259 EGREP=$ac_cv_path_EGREP
1260
1261 if test -n "$EGREP"; then
1262   echo "$as_me:1262: result: $EGREP" >&5
1263 echo "${ECHO_T}$EGREP" >&6
1264 else
1265   echo "$as_me:1265: result: no" >&5
1266 echo "${ECHO_T}no" >&6
1267 fi
1268
1269   test -n "$EGREP" && break
1270 done
1271 test -n "$EGREP" || EGREP=": "
1272
1273      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1273: error: cannot find workable egrep" >&5
1274 echo "$as_me: error: cannot find workable egrep" >&2;}
1275    { (exit 1); exit 1; }; }
1276    fi
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_path_EGREP" >&5
1279 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1280  EGREP="$ac_cv_path_EGREP"
1281
1282 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1283 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1284 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 cf_cv_abi_version=${NCURSES_MAJOR}
1286 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1287 cf_cv_timestamp=`date`
1288 echo "$as_me:1288: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1289 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1290
1291 if test -f "$srcdir/VERSION" ; then
1292         echo "$as_me:1292: checking for package version" >&5
1293 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1294
1295         # if there are not enough fields, cut returns the last one...
1296         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1297         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1298         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1299
1300         # this is how CF_BUNDLED_INTL uses $VERSION:
1301         VERSION="$cf_field1"
1302
1303         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1304         test -z "$VERSION_MAJOR" && { { echo "$as_me:1304: error: missing major-version" >&5
1305 echo "$as_me: error: missing major-version" >&2;}
1306    { (exit 1); exit 1; }; }
1307
1308         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1309         test -z "$VERSION_MINOR" && { { echo "$as_me:1309: error: missing minor-version" >&5
1310 echo "$as_me: error: missing minor-version" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313         echo "$as_me:1313: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1314 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1315
1316         echo "$as_me:1316: checking for package patch date" >&5
1317 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1318         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1319         case .$VERSION_PATCH in
1320         (.)
1321                 { { echo "$as_me:1321: error: missing patch-date $VERSION_PATCH" >&5
1322 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1323    { (exit 1); exit 1; }; }
1324                 ;;
1325         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1326                 ;;
1327         (*)
1328                 { { echo "$as_me:1328: error: illegal patch-date $VERSION_PATCH" >&5
1329 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1330    { (exit 1); exit 1; }; }
1331                 ;;
1332         esac
1333         echo "$as_me:1333: result: $VERSION_PATCH" >&5
1334 echo "${ECHO_T}$VERSION_PATCH" >&6
1335 else
1336         { { echo "$as_me:1336: error: did not find $srcdir/VERSION" >&5
1337 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1338    { (exit 1); exit 1; }; }
1339 fi
1340
1341 # show the actual data that we have for versions:
1342 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1343
1344 echo "${as_me:-configure}:1344: testing ABI VERSION $VERSION ..." 1>&5
1345
1346 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1347
1348 echo "${as_me:-configure}:1348: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1349
1350 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1351
1352 echo "${as_me:-configure}:1352: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1353
1354 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1355
1356 echo "${as_me:-configure}:1356: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1357
1358         cf_PACKAGE=NCURSES
1359         PACKAGE=ncurses
1360
1361 cat >>confdefs.h <<EOF
1362 #define PACKAGE "$PACKAGE"
1363 EOF
1364
1365 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1366
1367         cat >>confdefs.h <<EOF
1368 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1369 EOF
1370
1371         cat >>confdefs.h <<EOF
1372 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1373 EOF
1374
1375 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1376
1377 # Check whether --with-rel-version or --without-rel-version was given.
1378 if test "${with_rel_version+set}" = set; then
1379   withval="$with_rel_version"
1380   { echo "$as_me:1380: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1381 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1382  cf_cv_rel_version=$withval
1383 fi;
1384
1385  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1386  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1387
1388 if test -n "$NCURSES_MAJOR" ; then
1389   case $NCURSES_MAJOR in
1390   ([0-9]*)
1391         ;;
1392   (*)
1393         { { echo "$as_me:1393: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1394 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1395    { (exit 1); exit 1; }; }
1396         ;;
1397   esac
1398 else
1399   { { echo "$as_me:1399: error: Release major-version value is empty" >&5
1400 echo "$as_me: error: Release major-version value is empty" >&2;}
1401    { (exit 1); exit 1; }; }
1402 fi
1403
1404 if test -n "$NCURSES_MINOR" ; then
1405   case $NCURSES_MINOR in
1406   ([0-9]*)
1407         ;;
1408   (*)
1409         { { echo "$as_me:1409: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1410 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1411    { (exit 1); exit 1; }; }
1412         ;;
1413   esac
1414 else
1415   { { echo "$as_me:1415: error: Release minor-version value is empty" >&5
1416 echo "$as_me: error: Release minor-version value is empty" >&2;}
1417    { (exit 1); exit 1; }; }
1418 fi
1419
1420 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1421
1422 # Check whether --with-abi-version or --without-abi-version was given.
1423 if test "${with_abi_version+set}" = set; then
1424   withval="$with_abi_version"
1425
1426         if test "x$cf_cv_abi_version" != "x$withval"
1427         then
1428                 { echo "$as_me:1428: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1429 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1430                 case "$cf_cv_rel_version" in
1431                 (5.*)
1432                         cf_cv_rel_version=$withval.0
1433                         ;;
1434                 (6.*)
1435                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1436                         ;;
1437                 esac
1438         fi
1439         cf_cv_abi_version=$withval
1440 fi;
1441
1442 if test -n "$cf_cv_abi_version" ; then
1443   case $cf_cv_abi_version in
1444   ([0-9]*)
1445         ;;
1446   (*)
1447         { { echo "$as_me:1447: error: ABI version is not a number: $cf_cv_abi_version" >&5
1448 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1449    { (exit 1); exit 1; }; }
1450         ;;
1451   esac
1452 else
1453   { { echo "$as_me:1453: error: ABI version value is empty" >&5
1454 echo "$as_me: error: ABI version value is empty" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457
1458 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1459 then
1460         case "$cf_cv_rel_version" in
1461         (5.*)
1462                 cf_cv_rel_version=$with_abi_version.0
1463                 ;;
1464         esac
1465 fi
1466
1467 ac_aux_dir=
1468 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1469   if test -f "$ac_dir/install-sh"; then
1470     ac_aux_dir=$ac_dir
1471     ac_install_sh="$ac_aux_dir/install-sh -c"
1472     break
1473   elif test -f "$ac_dir/install.sh"; then
1474     ac_aux_dir=$ac_dir
1475     ac_install_sh="$ac_aux_dir/install.sh -c"
1476     break
1477   elif test -f "$ac_dir/shtool"; then
1478     ac_aux_dir=$ac_dir
1479     ac_install_sh="$ac_aux_dir/shtool install -c"
1480     break
1481   fi
1482 done
1483 if test -z "$ac_aux_dir"; then
1484   { { echo "$as_me:1484: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1485 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1489 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1490 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1491
1492 # Make sure we can run config.sub.
1493 $ac_config_sub sun4 >/dev/null 2>&1 ||
1494   { { echo "$as_me:1494: error: cannot run $ac_config_sub" >&5
1495 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1496    { (exit 1); exit 1; }; }
1497
1498 echo "$as_me:1498: checking build system type" >&5
1499 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1500 if test "${ac_cv_build+set}" = set; then
1501   echo $ECHO_N "(cached) $ECHO_C" >&6
1502 else
1503   ac_cv_build_alias=$build_alias
1504 test -z "$ac_cv_build_alias" &&
1505   ac_cv_build_alias=`$ac_config_guess`
1506 test -z "$ac_cv_build_alias" &&
1507   { { echo "$as_me:1507: error: cannot guess build type; you must specify one" >&5
1508 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1509    { (exit 1); exit 1; }; }
1510 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1511   { { echo "$as_me:1511: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1512 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1513    { (exit 1); exit 1; }; }
1514
1515 fi
1516 echo "$as_me:1516: result: $ac_cv_build" >&5
1517 echo "${ECHO_T}$ac_cv_build" >&6
1518 build=$ac_cv_build
1519 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1520 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1521 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1522
1523 echo "$as_me:1523: checking host system type" >&5
1524 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1525 if test "${ac_cv_host+set}" = set; then
1526   echo $ECHO_N "(cached) $ECHO_C" >&6
1527 else
1528   ac_cv_host_alias=$host_alias
1529 test -z "$ac_cv_host_alias" &&
1530   ac_cv_host_alias=$ac_cv_build_alias
1531 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1532   { { echo "$as_me:1532: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1533 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1534    { (exit 1); exit 1; }; }
1535
1536 fi
1537 echo "$as_me:1537: result: $ac_cv_host" >&5
1538 echo "${ECHO_T}$ac_cv_host" >&6
1539 host=$ac_cv_host
1540 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1541 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1542 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1543
1544 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1545         echo "$as_me:1545: checking target system type" >&5
1546 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1547 if test "${ac_cv_target+set}" = set; then
1548   echo $ECHO_N "(cached) $ECHO_C" >&6
1549 else
1550   ac_cv_target_alias=$target_alias
1551 test "x$ac_cv_target_alias" = "x" &&
1552   ac_cv_target_alias=$ac_cv_host_alias
1553 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1554   { { echo "$as_me:1554: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1555 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1556    { (exit 1); exit 1; }; }
1557
1558 fi
1559 echo "$as_me:1559: result: $ac_cv_target" >&5
1560 echo "${ECHO_T}$ac_cv_target" >&6
1561 target=$ac_cv_target
1562 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1563 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1564 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1565
1566 # The aliases save the names the user supplied, while $host etc.
1567 # will get canonicalized.
1568 test -n "$target_alias" &&
1569   test "$program_prefix$program_suffix$program_transform_name" = \
1570     NONENONEs,x,x, &&
1571   program_prefix=${target_alias}-
1572         system_name="$host_os"
1573 else
1574         system_name="`(uname -s -r) 2>/dev/null`"
1575         if test -z "$system_name" ; then
1576                 system_name="`(hostname) 2>/dev/null`"
1577         fi
1578 fi
1579 test -n "$system_name" &&
1580 cat >>confdefs.h <<EOF
1581 #define SYSTEM_NAME "$system_name"
1582 EOF
1583
1584 if test "${cf_cv_system_name+set}" = set; then
1585   echo $ECHO_N "(cached) $ECHO_C" >&6
1586 else
1587   cf_cv_system_name="$system_name"
1588 fi
1589
1590 test -z "$system_name" && system_name="$cf_cv_system_name"
1591 test -n "$cf_cv_system_name" && echo "$as_me:1591: result: Configuring for $cf_cv_system_name" >&5
1592 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1593
1594 if test ".$system_name" != ".$cf_cv_system_name" ; then
1595         echo "$as_me:1595: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1596 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1597         { { echo "$as_me:1597: error: \"Please remove config.cache and try again.\"" >&5
1598 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1599    { (exit 1); exit 1; }; }
1600 fi
1601
1602 # Check whether --with-system-type or --without-system-type was given.
1603 if test "${with_system_type+set}" = set; then
1604   withval="$with_system_type"
1605   { echo "$as_me:1605: WARNING: overriding system type to $withval" >&5
1606 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1607         cf_cv_system_name=$withval
1608         host_os=$withval
1609
1610 fi;
1611
1612 ###     Save the given $CFLAGS to allow user-override.
1613 cf_user_CFLAGS="$CFLAGS"
1614
1615 ###     Default install-location
1616 echo "$as_me:1616: checking for fgrep" >&5
1617 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1618 if test "${ac_cv_path_FGREP+set}" = set; then
1619   echo $ECHO_N "(cached) $ECHO_C" >&6
1620 else
1621   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1622    then ac_cv_path_FGREP="$GREP -F"
1623    else
1624      for ac_prog in gfgrep fgrep
1625 do
1626   # Extract the first word of "$ac_prog", so it can be a program name with args.
1627 set dummy $ac_prog; ac_word=$2
1628 echo "$as_me:1628: checking for $ac_word" >&5
1629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630 if test "${ac_cv_path_FGREP+set}" = set; then
1631   echo $ECHO_N "(cached) $ECHO_C" >&6
1632 else
1633   case $FGREP in
1634   [\\/]* | ?:[\\/]*)
1635   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1636   ;;
1637   *)
1638   ac_save_IFS=$IFS; IFS=$ac_path_separator
1639 ac_dummy="$PATH"
1640 for ac_dir in $ac_dummy; do
1641   IFS=$ac_save_IFS
1642   test -z "$ac_dir" && ac_dir=.
1643   if $as_executable_p "$ac_dir/$ac_word"; then
1644    ac_cv_path_FGREP="$ac_dir/$ac_word"
1645    echo "$as_me:1645: found $ac_dir/$ac_word" >&5
1646    break
1647 fi
1648 done
1649
1650   ;;
1651 esac
1652 fi
1653 FGREP=$ac_cv_path_FGREP
1654
1655 if test -n "$FGREP"; then
1656   echo "$as_me:1656: result: $FGREP" >&5
1657 echo "${ECHO_T}$FGREP" >&6
1658 else
1659   echo "$as_me:1659: result: no" >&5
1660 echo "${ECHO_T}no" >&6
1661 fi
1662
1663   test -n "$FGREP" && break
1664 done
1665 test -n "$FGREP" || FGREP=": "
1666
1667      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1667: error: cannot find workable fgrep" >&5
1668 echo "$as_me: error: cannot find workable fgrep" >&2;}
1669    { (exit 1); exit 1; }; }
1670    fi
1671 fi
1672 echo "$as_me:1672: result: $ac_cv_path_FGREP" >&5
1673 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1674  FGREP="$ac_cv_path_FGREP"
1675
1676 echo "$as_me:1676: checking for prefix" >&5
1677 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1678 if test "x$prefix" = "xNONE" ; then
1679         case "$cf_cv_system_name" in
1680                 # non-vendor systems don't have a conflict
1681         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1682                 prefix=/usr
1683                 ;;
1684         (*)     prefix=$ac_default_prefix
1685                 ;;
1686         esac
1687 fi
1688 echo "$as_me:1688: result: $prefix" >&5
1689 echo "${ECHO_T}$prefix" >&6
1690
1691 if test "x$prefix" = "xNONE" ; then
1692 echo "$as_me:1692: checking for default include-directory" >&5
1693 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1694 test -n "$verbose" && echo 1>&6
1695 for cf_symbol in \
1696         "$includedir" \
1697         "$includedir/ncurses" \
1698         "$prefix/include" \
1699         "$prefix/include/ncurses" \
1700         /usr/local/include \
1701         /usr/local/include/ncurses \
1702         /usr/include \
1703         /usr/include/ncurses
1704 do
1705         cf_dir=`eval echo "$cf_symbol"`
1706         if test -f "$cf_dir/curses.h" ; then
1707         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1708                 includedir="$cf_symbol"
1709                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1710                 break
1711         fi
1712         fi
1713         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1714 done
1715 echo "$as_me:1715: result: $includedir" >&5
1716 echo "${ECHO_T}$includedir" >&6
1717 fi
1718
1719 ### Defaults for ncurses ABI
1720
1721 case x$cf_cv_abi_version in
1722 (x[6789])
1723         cf_dft_ext_colors=yes
1724         cf_dft_ext_const=yes
1725         cf_dft_ext_mouse=yes
1726         cf_dft_ext_putwin=yes
1727         cf_dft_ext_spfuncs=yes
1728         cf_dft_filter_syms=yes
1729         cf_dft_chtype=uint32_t
1730         cf_dft_mmask_t=uint32_t
1731         cf_dft_interop=yes
1732         cf_dft_tparm_arg=intptr_t
1733         cf_dft_with_lp64=yes
1734         ;;
1735 (*)
1736         cf_dft_ext_colors=no
1737         cf_dft_ext_const=no
1738         cf_dft_ext_mouse=no
1739         cf_dft_ext_putwin=no
1740         cf_dft_ext_spfuncs=no
1741         cf_dft_filter_syms=no
1742         cf_dft_chtype=auto
1743         cf_dft_mmask_t=auto
1744         cf_dft_interop=no
1745         cf_dft_tparm_arg=long
1746         cf_dft_with_lp64=no
1747         ;;
1748 esac
1749
1750 ###     Checks for programs.
1751
1752 # Check whether --with-ada or --without-ada was given.
1753 if test "${with_ada+set}" = set; then
1754   withval="$with_ada"
1755   cf_with_ada=$withval
1756 else
1757   cf_with_ada=yes
1758 fi;
1759
1760 if test "x$cf_with_ada" = xyes
1761 then
1762         cf_prog_cc="gnatgcc gcc cc"
1763 else
1764         cf_prog_cc="gcc cc"
1765 fi
1766
1767 ac_ext=c
1768 ac_cpp='$CPP $CPPFLAGS'
1769 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1770 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1772 ac_main_return="return"
1773 if test -n "$ac_tool_prefix"; then
1774   for ac_prog in $cf_prog_cc
1775   do
1776     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1777 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1778 echo "$as_me:1778: checking for $ac_word" >&5
1779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1780 if test "${ac_cv_prog_CC+set}" = set; then
1781   echo $ECHO_N "(cached) $ECHO_C" >&6
1782 else
1783   if test -n "$CC"; then
1784   ac_cv_prog_CC="$CC" # Let the user override the test.
1785 else
1786   ac_save_IFS=$IFS; IFS=$ac_path_separator
1787 ac_dummy="$PATH"
1788 for ac_dir in $ac_dummy; do
1789   IFS=$ac_save_IFS
1790   test -z "$ac_dir" && ac_dir=.
1791   $as_executable_p "$ac_dir/$ac_word" || continue
1792 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1793 echo "$as_me:1793: found $ac_dir/$ac_word" >&5
1794 break
1795 done
1796
1797 fi
1798 fi
1799 CC=$ac_cv_prog_CC
1800 if test -n "$CC"; then
1801   echo "$as_me:1801: result: $CC" >&5
1802 echo "${ECHO_T}$CC" >&6
1803 else
1804   echo "$as_me:1804: result: no" >&5
1805 echo "${ECHO_T}no" >&6
1806 fi
1807
1808     test -n "$CC" && break
1809   done
1810 fi
1811 if test -z "$CC"; then
1812   ac_ct_CC=$CC
1813   for ac_prog in $cf_prog_cc
1814 do
1815   # Extract the first word of "$ac_prog", so it can be a program name with args.
1816 set dummy $ac_prog; ac_word=$2
1817 echo "$as_me:1817: checking for $ac_word" >&5
1818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1819 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1820   echo $ECHO_N "(cached) $ECHO_C" >&6
1821 else
1822   if test -n "$ac_ct_CC"; then
1823   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1824 else
1825   ac_save_IFS=$IFS; IFS=$ac_path_separator
1826 ac_dummy="$PATH"
1827 for ac_dir in $ac_dummy; do
1828   IFS=$ac_save_IFS
1829   test -z "$ac_dir" && ac_dir=.
1830   $as_executable_p "$ac_dir/$ac_word" || continue
1831 ac_cv_prog_ac_ct_CC="$ac_prog"
1832 echo "$as_me:1832: found $ac_dir/$ac_word" >&5
1833 break
1834 done
1835
1836 fi
1837 fi
1838 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1839 if test -n "$ac_ct_CC"; then
1840   echo "$as_me:1840: result: $ac_ct_CC" >&5
1841 echo "${ECHO_T}$ac_ct_CC" >&6
1842 else
1843   echo "$as_me:1843: result: no" >&5
1844 echo "${ECHO_T}no" >&6
1845 fi
1846
1847   test -n "$ac_ct_CC" && break
1848 done
1849
1850   CC=$ac_ct_CC
1851 fi
1852
1853 test -z "$CC" && { { echo "$as_me:1853: error: no acceptable cc found in \$PATH" >&5
1854 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1855    { (exit 1); exit 1; }; }
1856
1857 # Provide some information about the compiler.
1858 echo "$as_me:1858:" \
1859      "checking for C compiler version" >&5
1860 ac_compiler=`set X $ac_compile; echo "$2"`
1861 { (eval echo "$as_me:1861: \"$ac_compiler --version </dev/null >&5\"") >&5
1862   (eval $ac_compiler --version </dev/null >&5) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit "$ac_status"); }
1866 { (eval echo "$as_me:1866: \"$ac_compiler -v </dev/null >&5\"") >&5
1867   (eval $ac_compiler -v </dev/null >&5) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit "$ac_status"); }
1871 { (eval echo "$as_me:1871: \"$ac_compiler -V </dev/null >&5\"") >&5
1872   (eval $ac_compiler -V </dev/null >&5) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit "$ac_status"); }
1876
1877 cat >"conftest.$ac_ext" <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main (void)
1883 {
1884
1885   ;
1886   return 0;
1887 }
1888 _ACEOF
1889 ac_clean_files_save=$ac_clean_files
1890 ac_clean_files="$ac_clean_files a.out a.exe"
1891 # Try to create an executable without -o first, disregard a.out.
1892 # It will help us diagnose broken compilers, and finding out an intuition
1893 # of exeext.
1894 echo "$as_me:1894: checking for C compiler default output" >&5
1895 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1896 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1897 if { (eval echo "$as_me:1897: \"$ac_link_default\"") >&5
1898   (eval $ac_link_default) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit "$ac_status"); }; then
1902   # Find the output, starting from the most likely.  This scheme is
1903 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1904 # resort.
1905 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1906                 ls a.out conftest 2>/dev/null;
1907                 ls a.* conftest.* 2>/dev/null`; do
1908   case $ac_file in
1909     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1910     a.out ) # We found the default executable, but exeext='' is most
1911             # certainly right.
1912             break;;
1913     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1914           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1915           export ac_cv_exeext
1916           break;;
1917     * ) break;;
1918   esac
1919 done
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat "conftest.$ac_ext" >&5
1923 { { echo "$as_me:1923: error: C compiler cannot create executables" >&5
1924 echo "$as_me: error: C compiler cannot create executables" >&2;}
1925    { (exit 77); exit 77; }; }
1926 fi
1927
1928 ac_exeext=$ac_cv_exeext
1929 echo "$as_me:1929: result: $ac_file" >&5
1930 echo "${ECHO_T}$ac_file" >&6
1931
1932 # Check the compiler produces executables we can run.  If not, either
1933 # the compiler is broken, or we cross compile.
1934 echo "$as_me:1934: checking whether the C compiler works" >&5
1935 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1936 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1937 # If not cross compiling, check that we can run a simple program.
1938 if test "$cross_compiling" != yes; then
1939   if { ac_try='./$ac_file'
1940   { (eval echo "$as_me:1940: \"$ac_try\"") >&5
1941   (eval $ac_try) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit "$ac_status"); }; }; then
1945     cross_compiling=no
1946   else
1947     if test "$cross_compiling" = maybe; then
1948         cross_compiling=yes
1949     else
1950         { { echo "$as_me:1950: error: cannot run C compiled programs.
1951 If you meant to cross compile, use \`--host'." >&5
1952 echo "$as_me: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&2;}
1954    { (exit 1); exit 1; }; }
1955     fi
1956   fi
1957 fi
1958 echo "$as_me:1958: result: yes" >&5
1959 echo "${ECHO_T}yes" >&6
1960
1961 rm -f a.out a.exe "conftest$ac_cv_exeext"
1962 ac_clean_files=$ac_clean_files_save
1963 # Check the compiler produces executables we can run.  If not, either
1964 # the compiler is broken, or we cross compile.
1965 echo "$as_me:1965: checking whether we are cross compiling" >&5
1966 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1967 echo "$as_me:1967: result: $cross_compiling" >&5
1968 echo "${ECHO_T}$cross_compiling" >&6
1969
1970 echo "$as_me:1970: checking for executable suffix" >&5
1971 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1972 if { (eval echo "$as_me:1972: \"$ac_link\"") >&5
1973   (eval $ac_link) 2>&5
1974   ac_status=$?
1975   echo "$as_me:1975: \$? = $ac_status" >&5
1976   (exit "$ac_status"); }; then
1977   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1978 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1979 # work properly (i.e., refer to `conftest.exe'), while it won't with
1980 # `rm'.
1981 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1982   case $ac_file in
1983     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1984     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1985           export ac_cv_exeext
1986           break;;
1987     * ) break;;
1988   esac
1989 done
1990 else
1991   { { echo "$as_me:1991: error: cannot compute EXEEXT: cannot compile and link" >&5
1992 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1993    { (exit 1); exit 1; }; }
1994 fi
1995
1996 rm -f "conftest$ac_cv_exeext"
1997 echo "$as_me:1997: result: $ac_cv_exeext" >&5
1998 echo "${ECHO_T}$ac_cv_exeext" >&6
1999
2000 rm -f "conftest.$ac_ext"
2001 EXEEXT=$ac_cv_exeext
2002 ac_exeext=$EXEEXT
2003 echo "$as_me:2003: checking for object suffix" >&5
2004 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2005 if test "${ac_cv_objext+set}" = set; then
2006   echo $ECHO_N "(cached) $ECHO_C" >&6
2007 else
2008   cat >"conftest.$ac_ext" <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011
2012 int
2013 main (void)
2014 {
2015
2016   ;
2017   return 0;
2018 }
2019 _ACEOF
2020 rm -f conftest.o conftest.obj
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022   (eval $ac_compile) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit "$ac_status"); }; then
2026   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2027   case $ac_file in
2028     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2029     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2030        break;;
2031   esac
2032 done
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat "conftest.$ac_ext" >&5
2036 { { echo "$as_me:2036: error: cannot compute OBJEXT: cannot compile" >&5
2037 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2038    { (exit 1); exit 1; }; }
2039 fi
2040
2041 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2042 fi
2043 echo "$as_me:2043: result: $ac_cv_objext" >&5
2044 echo "${ECHO_T}$ac_cv_objext" >&6
2045 OBJEXT=$ac_cv_objext
2046 ac_objext=$OBJEXT
2047 echo "$as_me:2047: checking whether we are using the GNU C compiler" >&5
2048 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2049 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2050   echo $ECHO_N "(cached) $ECHO_C" >&6
2051 else
2052   cat >"conftest.$ac_ext" <<_ACEOF
2053 #line 2053 "configure"
2054 #include "confdefs.h"
2055
2056 int
2057 main (void)
2058 {
2059 #ifndef __GNUC__
2060        choke me
2061 #endif
2062
2063   ;
2064   return 0;
2065 }
2066 _ACEOF
2067 rm -f "conftest.$ac_objext"
2068 if { (eval echo "$as_me:2068: \"$ac_compile\"") >&5
2069   (eval $ac_compile) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit "$ac_status"); } &&
2073          { ac_try='test -s "conftest.$ac_objext"'
2074   { (eval echo "$as_me:2074: \"$ac_try\"") >&5
2075   (eval $ac_try) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit "$ac_status"); }; }; then
2079   ac_compiler_gnu=yes
2080 else
2081   echo "$as_me: failed program was:" >&5
2082 cat "conftest.$ac_ext" >&5
2083 ac_compiler_gnu=no
2084 fi
2085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2086 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2087
2088 fi
2089 echo "$as_me:2089: result: $ac_cv_c_compiler_gnu" >&5
2090 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2091 GCC=`test $ac_compiler_gnu = yes && echo yes`
2092 ac_test_CFLAGS=${CFLAGS+set}
2093 ac_save_CFLAGS=$CFLAGS
2094 CFLAGS="-g"
2095 echo "$as_me:2095: checking whether $CC accepts -g" >&5
2096 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2097 if test "${ac_cv_prog_cc_g+set}" = set; then
2098   echo $ECHO_N "(cached) $ECHO_C" >&6
2099 else
2100   cat >"conftest.$ac_ext" <<_ACEOF
2101 #line 2101 "configure"
2102 #include "confdefs.h"
2103
2104 int
2105 main (void)
2106 {
2107
2108   ;
2109   return 0;
2110 }
2111 _ACEOF
2112 rm -f "conftest.$ac_objext"
2113 if { (eval echo "$as_me:2113: \"$ac_compile\"") >&5
2114   (eval $ac_compile) 2>&5
2115   ac_status=$?
2116   echo "$as_me:2116: \$? = $ac_status" >&5
2117   (exit "$ac_status"); } &&
2118          { ac_try='test -s "conftest.$ac_objext"'
2119   { (eval echo "$as_me:2119: \"$ac_try\"") >&5
2120   (eval $ac_try) 2>&5
2121   ac_status=$?
2122   echo "$as_me:2122: \$? = $ac_status" >&5
2123   (exit "$ac_status"); }; }; then
2124   ac_cv_prog_cc_g=yes
2125 else
2126   echo "$as_me: failed program was:" >&5
2127 cat "conftest.$ac_ext" >&5
2128 ac_cv_prog_cc_g=no
2129 fi
2130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2131 fi
2132 echo "$as_me:2132: result: $ac_cv_prog_cc_g" >&5
2133 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2134 if test "$ac_test_CFLAGS" = set; then
2135   CFLAGS=$ac_save_CFLAGS
2136 elif test $ac_cv_prog_cc_g = yes; then
2137   if test "$GCC" = yes; then
2138     CFLAGS="-g -O2"
2139   else
2140     CFLAGS="-g"
2141   fi
2142 else
2143   if test "$GCC" = yes; then
2144     CFLAGS="-O2"
2145   else
2146     CFLAGS=
2147   fi
2148 fi
2149 # Some people use a C++ compiler to compile C.  Since we use `exit',
2150 # in C++ we need to declare it.  In case someone uses the same compiler
2151 # for both compiling C and C++ we need to have the C++ compiler decide
2152 # the declaration of exit, since it's the most demanding environment.
2153 cat >"conftest.$ac_ext" <<_ACEOF
2154 #ifndef __cplusplus
2155   choke me
2156 #endif
2157 _ACEOF
2158 rm -f "conftest.$ac_objext"
2159 if { (eval echo "$as_me:2159: \"$ac_compile\"") >&5
2160   (eval $ac_compile) 2>&5
2161   ac_status=$?
2162   echo "$as_me:2162: \$? = $ac_status" >&5
2163   (exit "$ac_status"); } &&
2164          { ac_try='test -s "conftest.$ac_objext"'
2165   { (eval echo "$as_me:2165: \"$ac_try\"") >&5
2166   (eval $ac_try) 2>&5
2167   ac_status=$?
2168   echo "$as_me:2168: \$? = $ac_status" >&5
2169   (exit "$ac_status"); }; }; then
2170   for ac_declaration in \
2171    ''\
2172    '#include <stdlib.h>' \
2173    'extern "C" void std::exit (int) throw (); using std::exit;' \
2174    'extern "C" void std::exit (int); using std::exit;' \
2175    'extern "C" void exit (int) throw ();' \
2176    'extern "C" void exit (int);' \
2177    'void exit (int);'
2178 do
2179   cat >"conftest.$ac_ext" <<_ACEOF
2180 #line 2180 "configure"
2181 #include "confdefs.h"
2182 #include <stdlib.h>
2183 $ac_declaration
2184 int
2185 main (void)
2186 {
2187 exit (42);
2188   ;
2189   return 0;
2190 }
2191 _ACEOF
2192 rm -f "conftest.$ac_objext"
2193 if { (eval echo "$as_me:2193: \"$ac_compile\"") >&5
2194   (eval $ac_compile) 2>&5
2195   ac_status=$?
2196   echo "$as_me:2196: \$? = $ac_status" >&5
2197   (exit "$ac_status"); } &&
2198          { ac_try='test -s "conftest.$ac_objext"'
2199   { (eval echo "$as_me:2199: \"$ac_try\"") >&5
2200   (eval $ac_try) 2>&5
2201   ac_status=$?
2202   echo "$as_me:2202: \$? = $ac_status" >&5
2203   (exit "$ac_status"); }; }; then
2204   :
2205 else
2206   echo "$as_me: failed program was:" >&5
2207 cat "conftest.$ac_ext" >&5
2208 continue
2209 fi
2210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2211   cat >"conftest.$ac_ext" <<_ACEOF
2212 #line 2212 "configure"
2213 #include "confdefs.h"
2214 $ac_declaration
2215 int
2216 main (void)
2217 {
2218 exit (42);
2219   ;
2220   return 0;
2221 }
2222 _ACEOF
2223 rm -f "conftest.$ac_objext"
2224 if { (eval echo "$as_me:2224: \"$ac_compile\"") >&5
2225   (eval $ac_compile) 2>&5
2226   ac_status=$?
2227   echo "$as_me:2227: \$? = $ac_status" >&5
2228   (exit "$ac_status"); } &&
2229          { ac_try='test -s "conftest.$ac_objext"'
2230   { (eval echo "$as_me:2230: \"$ac_try\"") >&5
2231   (eval $ac_try) 2>&5
2232   ac_status=$?
2233   echo "$as_me:2233: \$? = $ac_status" >&5
2234   (exit "$ac_status"); }; }; then
2235   break
2236 else
2237   echo "$as_me: failed program was:" >&5
2238 cat "conftest.$ac_ext" >&5
2239 fi
2240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2241 done
2242 rm -rf conftest*
2243 if test -n "$ac_declaration"; then
2244   echo '#ifdef __cplusplus' >>confdefs.h
2245   echo "$ac_declaration"    >>confdefs.h
2246   echo '#endif'             >>confdefs.h
2247 fi
2248
2249 else
2250   echo "$as_me: failed program was:" >&5
2251 cat "conftest.$ac_ext" >&5
2252 fi
2253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2254 ac_ext=c
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2257 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2259 ac_main_return="return"
2260
2261 GCC_VERSION=none
2262 if test "$GCC" = yes ; then
2263         echo "$as_me:2263: checking version of $CC" >&5
2264 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2265         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.].*//'`"
2266         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2267         echo "$as_me:2267: result: $GCC_VERSION" >&5
2268 echo "${ECHO_T}$GCC_VERSION" >&6
2269 fi
2270
2271 INTEL_COMPILER=no
2272
2273 if test "$GCC" = yes ; then
2274         case "$host_os" in
2275         (linux*|gnu*)
2276                 echo "$as_me:2276: checking if this is really Intel C compiler" >&5
2277 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2278                 cf_save_CFLAGS="$CFLAGS"
2279                 CFLAGS="$CFLAGS -no-gcc"
2280                 cat >"conftest.$ac_ext" <<_ACEOF
2281 #line 2281 "configure"
2282 #include "confdefs.h"
2283
2284 int
2285 main (void)
2286 {
2287
2288 #ifdef __INTEL_COMPILER
2289 #else
2290 make an error
2291 #endif
2292
2293   ;
2294   return 0;
2295 }
2296 _ACEOF
2297 rm -f "conftest.$ac_objext"
2298 if { (eval echo "$as_me:2298: \"$ac_compile\"") >&5
2299   (eval $ac_compile) 2>&5
2300   ac_status=$?
2301   echo "$as_me:2301: \$? = $ac_status" >&5
2302   (exit "$ac_status"); } &&
2303          { ac_try='test -s "conftest.$ac_objext"'
2304   { (eval echo "$as_me:2304: \"$ac_try\"") >&5
2305   (eval $ac_try) 2>&5
2306   ac_status=$?
2307   echo "$as_me:2307: \$? = $ac_status" >&5
2308   (exit "$ac_status"); }; }; then
2309   INTEL_COMPILER=yes
2310 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2311
2312 else
2313   echo "$as_me: failed program was:" >&5
2314 cat "conftest.$ac_ext" >&5
2315 fi
2316 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2317                 CFLAGS="$cf_save_CFLAGS"
2318                 echo "$as_me:2318: result: $INTEL_COMPILER" >&5
2319 echo "${ECHO_T}$INTEL_COMPILER" >&6
2320                 ;;
2321         esac
2322 fi
2323
2324 CLANG_COMPILER=no
2325
2326 if test "$GCC" = yes ; then
2327         echo "$as_me:2327: checking if this is really Clang C compiler" >&5
2328 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2329         cf_save_CFLAGS="$CFLAGS"
2330         cat >"conftest.$ac_ext" <<_ACEOF
2331 #line 2331 "configure"
2332 #include "confdefs.h"
2333
2334 int
2335 main (void)
2336 {
2337
2338 #ifdef __clang__
2339 #else
2340 make an error
2341 #endif
2342
2343   ;
2344   return 0;
2345 }
2346 _ACEOF
2347 rm -f "conftest.$ac_objext"
2348 if { (eval echo "$as_me:2348: \"$ac_compile\"") >&5
2349   (eval $ac_compile) 2>&5
2350   ac_status=$?
2351   echo "$as_me:2351: \$? = $ac_status" >&5
2352   (exit "$ac_status"); } &&
2353          { ac_try='test -s "conftest.$ac_objext"'
2354   { (eval echo "$as_me:2354: \"$ac_try\"") >&5
2355   (eval $ac_try) 2>&5
2356   ac_status=$?
2357   echo "$as_me:2357: \$? = $ac_status" >&5
2358   (exit "$ac_status"); }; }; then
2359   CLANG_COMPILER=yes
2360
2361 else
2362   echo "$as_me: failed program was:" >&5
2363 cat "conftest.$ac_ext" >&5
2364 fi
2365 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2366         CFLAGS="$cf_save_CFLAGS"
2367         echo "$as_me:2367: result: $CLANG_COMPILER" >&5
2368 echo "${ECHO_T}$CLANG_COMPILER" >&6
2369 fi
2370
2371 CLANG_VERSION=none
2372
2373 if test "x$CLANG_COMPILER" = "xyes" ; then
2374         case "$CC" in
2375         (c[1-9][0-9]|*/c[1-9][0-9])
2376                 { echo "$as_me:2376: WARNING: replacing broken compiler alias $CC" >&5
2377 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2378                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2379                 CC=clang
2380                 ;;
2381         esac
2382
2383         echo "$as_me:2383: checking version of $CC" >&5
2384 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2385         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.].*//'`"
2386         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2387         echo "$as_me:2387: result: $CLANG_VERSION" >&5
2388 echo "${ECHO_T}$CLANG_VERSION" >&6
2389
2390         for cf_clang_opt in \
2391                 -Qunused-arguments \
2392                 -Wno-error=implicit-function-declaration
2393         do
2394                 echo "$as_me:2394: checking if option $cf_clang_opt works" >&5
2395 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2396                 cf_save_CFLAGS="$CFLAGS"
2397                 CFLAGS="$CFLAGS $cf_clang_opt"
2398                 cat >"conftest.$ac_ext" <<_ACEOF
2399 #line 2399 "configure"
2400 #include "confdefs.h"
2401
2402                         #include <stdio.h>
2403 int
2404 main (void)
2405 {
2406
2407                         printf("hello!\\n");
2408   ;
2409   return 0;
2410 }
2411 _ACEOF
2412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2413 if { (eval echo "$as_me:2413: \"$ac_link\"") >&5
2414   (eval $ac_link) 2>&5
2415   ac_status=$?
2416   echo "$as_me:2416: \$? = $ac_status" >&5
2417   (exit "$ac_status"); } &&
2418          { ac_try='test -s "conftest$ac_exeext"'
2419   { (eval echo "$as_me:2419: \"$ac_try\"") >&5
2420   (eval $ac_try) 2>&5
2421   ac_status=$?
2422   echo "$as_me:2422: \$? = $ac_status" >&5
2423   (exit "$ac_status"); }; }; then
2424
2425                         cf_clang_optok=yes
2426 else
2427   echo "$as_me: failed program was:" >&5
2428 cat "conftest.$ac_ext" >&5
2429
2430                         cf_clang_optok=no
2431 fi
2432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2433                 echo "$as_me:2433: result: $cf_clang_optok" >&5
2434 echo "${ECHO_T}$cf_clang_optok" >&6
2435                 CFLAGS="$cf_save_CFLAGS"
2436                 if test "$cf_clang_optok" = yes; then
2437                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2438
2439 echo "${as_me:-configure}:2439: testing adding option $cf_clang_opt ..." 1>&5
2440
2441         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2442         CFLAGS="${CFLAGS}$cf_clang_opt"
2443
2444                 fi
2445         done
2446 fi
2447
2448 echo "$as_me:2448: checking for $CC option to accept ANSI C" >&5
2449 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2450 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2451   echo $ECHO_N "(cached) $ECHO_C" >&6
2452 else
2453   ac_cv_prog_cc_stdc=no
2454 ac_save_CC=$CC
2455 cat >"conftest.$ac_ext" <<_ACEOF
2456 #line 2456 "configure"
2457 #include "confdefs.h"
2458 #include <stdarg.h>
2459 #include <stdio.h>
2460 #include <sys/types.h>
2461 #include <sys/stat.h>
2462 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2463 struct buf { int x; };
2464 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2465 static char *e (p, i)
2466      char **p;
2467      int i;
2468 {
2469   return p[i];
2470 }
2471 static char *f (char * (*g) (char **, int), char **p, ...)
2472 {
2473   char *s;
2474   va_list v;
2475   va_start (v,p);
2476   s = g (p, va_arg (v,int));
2477   va_end (v);
2478   return s;
2479 }
2480 int test (int i, double x);
2481 struct s1 {int (*f) (int a);};
2482 struct s2 {int (*f) (double a);};
2483 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2484 int argc;
2485 char **argv;
2486 int
2487 main (void)
2488 {
2489 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2490   ;
2491   return 0;
2492 }
2493 _ACEOF
2494 # Don't try gcc -ansi; that turns off useful extensions and
2495 # breaks some systems' header files.
2496 # AIX                   -qlanglvl=ansi
2497 # Ultrix and OSF/1      -std1
2498 # HP-UX 10.20 and later -Ae
2499 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2500 # SVR4                  -Xc -D__EXTENSIONS__
2501 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2502 do
2503   CC="$ac_save_CC $ac_arg"
2504   rm -f "conftest.$ac_objext"
2505 if { (eval echo "$as_me:2505: \"$ac_compile\"") >&5
2506   (eval $ac_compile) 2>&5
2507   ac_status=$?
2508   echo "$as_me:2508: \$? = $ac_status" >&5
2509   (exit "$ac_status"); } &&
2510          { ac_try='test -s "conftest.$ac_objext"'
2511   { (eval echo "$as_me:2511: \"$ac_try\"") >&5
2512   (eval $ac_try) 2>&5
2513   ac_status=$?
2514   echo "$as_me:2514: \$? = $ac_status" >&5
2515   (exit "$ac_status"); }; }; then
2516   ac_cv_prog_cc_stdc=$ac_arg
2517 break
2518 else
2519   echo "$as_me: failed program was:" >&5
2520 cat "conftest.$ac_ext" >&5
2521 fi
2522 rm -f "conftest.$ac_objext"
2523 done
2524 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2525 CC=$ac_save_CC
2526
2527 fi
2528
2529 case "x$ac_cv_prog_cc_stdc" in
2530   x|xno)
2531     echo "$as_me:2531: result: none needed" >&5
2532 echo "${ECHO_T}none needed" >&6 ;;
2533   *)
2534     echo "$as_me:2534: result: $ac_cv_prog_cc_stdc" >&5
2535 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2536     CC="$CC $ac_cv_prog_cc_stdc" ;;
2537 esac
2538
2539 # This should have been defined by AC_PROG_CC
2540 : "${CC:=cc}"
2541
2542 echo "$as_me:2542: checking \$CFLAGS variable" >&5
2543 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2544 case "x$CFLAGS" in
2545 (*-[IUD]*)
2546         echo "$as_me:2546: result: broken" >&5
2547 echo "${ECHO_T}broken" >&6
2548         { echo "$as_me:2548: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2549 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2550         cf_flags="$CFLAGS"
2551         CFLAGS=
2552         for cf_arg in $cf_flags
2553         do
2554
2555 cf_fix_cppflags=no
2556 cf_new_cflags=
2557 cf_new_cppflags=
2558 cf_new_extra_cppflags=
2559
2560 for cf_add_cflags in $cf_arg
2561 do
2562 case "$cf_fix_cppflags" in
2563 (no)
2564         case "$cf_add_cflags" in
2565         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2566                 case "$cf_add_cflags" in
2567                 (-D*)
2568                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2569
2570                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2571                                 && test -z "${cf_tst_cflags}" \
2572                                 && cf_fix_cppflags=yes
2573
2574                         if test "$cf_fix_cppflags" = yes ; then
2575
2576         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2577         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2578
2579                                 continue
2580                         elif test "${cf_tst_cflags}" = "\"'" ; then
2581
2582         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2583         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2584
2585                                 continue
2586                         fi
2587                         ;;
2588                 esac
2589                 case "$CPPFLAGS" in
2590                 (*$cf_add_cflags)
2591                         ;;
2592                 (*)
2593                         case "$cf_add_cflags" in
2594                         (-D*)
2595                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2596
2597 CPPFLAGS=`echo "$CPPFLAGS" | \
2598         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2599                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2600
2601                                 ;;
2602                         esac
2603
2604         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2605         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2606
2607                         ;;
2608                 esac
2609                 ;;
2610         (*)
2611
2612         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2613         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2614
2615                 ;;
2616         esac
2617         ;;
2618 (yes)
2619
2620         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2621         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2622
2623         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2624
2625         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2626                 && test -z "${cf_tst_cflags}" \
2627                 && cf_fix_cppflags=no
2628         ;;
2629 esac
2630 done
2631
2632 if test -n "$cf_new_cflags" ; then
2633
2634         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2635         CFLAGS="${CFLAGS}$cf_new_cflags"
2636
2637 fi
2638
2639 if test -n "$cf_new_cppflags" ; then
2640
2641         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2642         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2643
2644 fi
2645
2646 if test -n "$cf_new_extra_cppflags" ; then
2647
2648         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2649         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2650
2651 fi
2652
2653         done
2654         ;;
2655 (*)
2656         echo "$as_me:2656: result: ok" >&5
2657 echo "${ECHO_T}ok" >&6
2658         ;;
2659 esac
2660
2661 echo "$as_me:2661: checking \$CC variable" >&5
2662 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2663 case "$CC" in
2664 (*[\ \  ]-*)
2665         echo "$as_me:2665: result: broken" >&5
2666 echo "${ECHO_T}broken" >&6
2667         { echo "$as_me:2667: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2668 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2669         # humor him...
2670         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2671         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2672         CC="$cf_prog"
2673         for cf_arg in $cf_flags
2674         do
2675                 case "x$cf_arg" in
2676                 (x-[IUDfgOW]*)
2677
2678 cf_fix_cppflags=no
2679 cf_new_cflags=
2680 cf_new_cppflags=
2681 cf_new_extra_cppflags=
2682
2683 for cf_add_cflags in $cf_arg
2684 do
2685 case "$cf_fix_cppflags" in
2686 (no)
2687         case "$cf_add_cflags" in
2688         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2689                 case "$cf_add_cflags" in
2690                 (-D*)
2691                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2692
2693                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2694                                 && test -z "${cf_tst_cflags}" \
2695                                 && cf_fix_cppflags=yes
2696
2697                         if test "$cf_fix_cppflags" = yes ; then
2698
2699         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2700         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2701
2702                                 continue
2703                         elif test "${cf_tst_cflags}" = "\"'" ; then
2704
2705         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2706         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2707
2708                                 continue
2709                         fi
2710                         ;;
2711                 esac
2712                 case "$CPPFLAGS" in
2713                 (*$cf_add_cflags)
2714                         ;;
2715                 (*)
2716                         case "$cf_add_cflags" in
2717                         (-D*)
2718                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2719
2720 CPPFLAGS=`echo "$CPPFLAGS" | \
2721         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2722                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2723
2724                                 ;;
2725                         esac
2726
2727         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2728         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2729
2730                         ;;
2731                 esac
2732                 ;;
2733         (*)
2734
2735         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2736         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2737
2738                 ;;
2739         esac
2740         ;;
2741 (yes)
2742
2743         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2744         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2745
2746         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2747
2748         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2749                 && test -z "${cf_tst_cflags}" \
2750                 && cf_fix_cppflags=no
2751         ;;
2752 esac
2753 done
2754
2755 if test -n "$cf_new_cflags" ; then
2756
2757         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2758         CFLAGS="${CFLAGS}$cf_new_cflags"
2759
2760 fi
2761
2762 if test -n "$cf_new_cppflags" ; then
2763
2764         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2765         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2766
2767 fi
2768
2769 if test -n "$cf_new_extra_cppflags" ; then
2770
2771         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2772         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2773
2774 fi
2775
2776                         ;;
2777                 (*)
2778                         CC="$CC $cf_arg"
2779                         ;;
2780                 esac
2781         done
2782         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2783
2784 echo "${as_me:-configure}:2784: testing resulting CC: '$CC' ..." 1>&5
2785
2786         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2787
2788 echo "${as_me:-configure}:2788: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2789
2790         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2791
2792 echo "${as_me:-configure}:2792: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2793
2794         ;;
2795 (*)
2796         echo "$as_me:2796: result: ok" >&5
2797 echo "${ECHO_T}ok" >&6
2798         ;;
2799 esac
2800
2801 ac_ext=c
2802 ac_cpp='$CPP $CPPFLAGS'
2803 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2804 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2805 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2806 ac_main_return="return"
2807 echo "$as_me:2807: checking how to run the C preprocessor" >&5
2808 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2809 # On Suns, sometimes $CPP names a directory.
2810 if test -n "$CPP" && test -d "$CPP"; then
2811   CPP=
2812 fi
2813 if test -z "$CPP"; then
2814   if test "${ac_cv_prog_CPP+set}" = set; then
2815   echo $ECHO_N "(cached) $ECHO_C" >&6
2816 else
2817       # Double quotes because CPP needs to be expanded
2818     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2819     do
2820       ac_preproc_ok=false
2821 for ac_c_preproc_warn_flag in '' yes
2822 do
2823   # Use a header file that comes with gcc, so configuring glibc
2824   # with a fresh cross-compiler works.
2825   # On the NeXT, cc -E runs the code through the compiler's parser,
2826   # not just through cpp. "Syntax error" is here to catch this case.
2827   cat >"conftest.$ac_ext" <<_ACEOF
2828 #line 2828 "configure"
2829 #include "confdefs.h"
2830 #include <assert.h>
2831                      Syntax error
2832 _ACEOF
2833 if { (eval echo "$as_me:2833: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2834   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2835   ac_status=$?
2836   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2837   rm -f conftest.er1
2838   cat conftest.err >&5
2839   echo "$as_me:2839: \$? = $ac_status" >&5
2840   (exit "$ac_status"); } >/dev/null; then
2841   if test -s conftest.err; then
2842     ac_cpp_err=$ac_c_preproc_warn_flag
2843   else
2844     ac_cpp_err=
2845   fi
2846 else
2847   ac_cpp_err=yes
2848 fi
2849 if test -z "$ac_cpp_err"; then
2850   :
2851 else
2852   echo "$as_me: failed program was:" >&5
2853   cat "conftest.$ac_ext" >&5
2854   # Broken: fails on valid input.
2855 continue
2856 fi
2857 rm -f conftest.err "conftest.$ac_ext"
2858
2859   # OK, works on sane cases.  Now check whether non-existent headers
2860   # can be detected and how.
2861   cat >"conftest.$ac_ext" <<_ACEOF
2862 #line 2862 "configure"
2863 #include "confdefs.h"
2864 #include <ac_nonexistent.h>
2865 _ACEOF
2866 if { (eval echo "$as_me:2866: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2867   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2868   ac_status=$?
2869   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2870   rm -f conftest.er1
2871   cat conftest.err >&5
2872   echo "$as_me:2872: \$? = $ac_status" >&5
2873   (exit "$ac_status"); } >/dev/null; then
2874   if test -s conftest.err; then
2875     ac_cpp_err=$ac_c_preproc_warn_flag
2876   else
2877     ac_cpp_err=
2878   fi
2879 else
2880   ac_cpp_err=yes
2881 fi
2882 if test -z "$ac_cpp_err"; then
2883   # Broken: success on invalid input.
2884 continue
2885 else
2886   echo "$as_me: failed program was:" >&5
2887   cat "conftest.$ac_ext" >&5
2888   # Passes both tests.
2889 ac_preproc_ok=:
2890 break
2891 fi
2892 rm -f conftest.err "conftest.$ac_ext"
2893
2894 done
2895 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2896 rm -f conftest.err "conftest.$ac_ext"
2897 if $ac_preproc_ok; then
2898   break
2899 fi
2900
2901     done
2902     ac_cv_prog_CPP=$CPP
2903
2904 fi
2905   CPP=$ac_cv_prog_CPP
2906 else
2907   ac_cv_prog_CPP=$CPP
2908 fi
2909 echo "$as_me:2909: result: $CPP" >&5
2910 echo "${ECHO_T}$CPP" >&6
2911 ac_preproc_ok=false
2912 for ac_c_preproc_warn_flag in '' yes
2913 do
2914   # Use a header file that comes with gcc, so configuring glibc
2915   # with a fresh cross-compiler works.
2916   # On the NeXT, cc -E runs the code through the compiler's parser,
2917   # not just through cpp. "Syntax error" is here to catch this case.
2918   cat >"conftest.$ac_ext" <<_ACEOF
2919 #line 2919 "configure"
2920 #include "confdefs.h"
2921 #include <assert.h>
2922                      Syntax error
2923 _ACEOF
2924 if { (eval echo "$as_me:2924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2925   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2926   ac_status=$?
2927   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2928   rm -f conftest.er1
2929   cat conftest.err >&5
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit "$ac_status"); } >/dev/null; then
2932   if test -s conftest.err; then
2933     ac_cpp_err=$ac_c_preproc_warn_flag
2934   else
2935     ac_cpp_err=
2936   fi
2937 else
2938   ac_cpp_err=yes
2939 fi
2940 if test -z "$ac_cpp_err"; then
2941   :
2942 else
2943   echo "$as_me: failed program was:" >&5
2944   cat "conftest.$ac_ext" >&5
2945   # Broken: fails on valid input.
2946 continue
2947 fi
2948 rm -f conftest.err "conftest.$ac_ext"
2949
2950   # OK, works on sane cases.  Now check whether non-existent headers
2951   # can be detected and how.
2952   cat >"conftest.$ac_ext" <<_ACEOF
2953 #line 2953 "configure"
2954 #include "confdefs.h"
2955 #include <ac_nonexistent.h>
2956 _ACEOF
2957 if { (eval echo "$as_me:2957: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2958   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2959   ac_status=$?
2960   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2961   rm -f conftest.er1
2962   cat conftest.err >&5
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit "$ac_status"); } >/dev/null; then
2965   if test -s conftest.err; then
2966     ac_cpp_err=$ac_c_preproc_warn_flag
2967   else
2968     ac_cpp_err=
2969   fi
2970 else
2971   ac_cpp_err=yes
2972 fi
2973 if test -z "$ac_cpp_err"; then
2974   # Broken: success on invalid input.
2975 continue
2976 else
2977   echo "$as_me: failed program was:" >&5
2978   cat "conftest.$ac_ext" >&5
2979   # Passes both tests.
2980 ac_preproc_ok=:
2981 break
2982 fi
2983 rm -f conftest.err "conftest.$ac_ext"
2984
2985 done
2986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2987 rm -f conftest.err "conftest.$ac_ext"
2988 if $ac_preproc_ok; then
2989   :
2990 else
2991   { { echo "$as_me:2991: error: C preprocessor \"$CPP\" fails sanity check" >&5
2992 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2993    { (exit 1); exit 1; }; }
2994 fi
2995
2996 ac_ext=c
2997 ac_cpp='$CPP $CPPFLAGS'
2998 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2999 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3000 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3001 ac_main_return="return"
3002
3003 if test $ac_cv_c_compiler_gnu = yes; then
3004     echo "$as_me:3004: checking whether $CC needs -traditional" >&5
3005 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3006 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3007   echo $ECHO_N "(cached) $ECHO_C" >&6
3008 else
3009     ac_pattern="Autoconf.*'x'"
3010   cat >"conftest.$ac_ext" <<_ACEOF
3011 #line 3011 "configure"
3012 #include "confdefs.h"
3013 #include <sgtty.h>
3014 int Autoconf = TIOCGETP;
3015 _ACEOF
3016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3017   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3018   ac_cv_prog_gcc_traditional=yes
3019 else
3020   ac_cv_prog_gcc_traditional=no
3021 fi
3022 rm -rf conftest*
3023
3024   if test $ac_cv_prog_gcc_traditional = no; then
3025     cat >"conftest.$ac_ext" <<_ACEOF
3026 #line 3026 "configure"
3027 #include "confdefs.h"
3028 #include <termio.h>
3029 int Autoconf = TCGETA;
3030 _ACEOF
3031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3032   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3033   ac_cv_prog_gcc_traditional=yes
3034 fi
3035 rm -rf conftest*
3036
3037   fi
3038 fi
3039 echo "$as_me:3039: result: $ac_cv_prog_gcc_traditional" >&5
3040 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3041   if test $ac_cv_prog_gcc_traditional = yes; then
3042     CC="$CC -traditional"
3043   fi
3044 fi
3045
3046 echo "$as_me:3046: checking whether $CC understands -c and -o together" >&5
3047 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3048 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3049   echo $ECHO_N "(cached) $ECHO_C" >&6
3050 else
3051
3052 cat > conftest.$ac_ext <<CF_EOF
3053 int main(void)
3054 {
3055         ${cf_cv_main_return:-return}(0);
3056 }
3057 CF_EOF
3058 # We do the test twice because some compilers refuse to overwrite an
3059 # existing .o file with -o, though they will create one.
3060 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3061 if { (eval echo "$as_me:3061: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:3064: \$? = $ac_status" >&5
3065   (exit "$ac_status"); } &&
3066   test -f conftest2.$ac_objext && { (eval echo "$as_me:3066: \"$ac_try\"") >&5
3067   (eval $ac_try) 2>&5
3068   ac_status=$?
3069   echo "$as_me:3069: \$? = $ac_status" >&5
3070   (exit "$ac_status"); };
3071 then
3072   eval cf_cv_prog_CC_c_o=yes
3073 else
3074   eval cf_cv_prog_CC_c_o=no
3075 fi
3076 rm -rf ./conftest*
3077
3078 fi
3079 if test "$cf_cv_prog_CC_c_o" = yes; then
3080   echo "$as_me:3080: result: yes" >&5
3081 echo "${ECHO_T}yes" >&6
3082 else
3083   echo "$as_me:3083: result: no" >&5
3084 echo "${ECHO_T}no" >&6
3085 fi
3086
3087 if test "$cross_compiling" = yes ; then
3088         LDCONFIG=:
3089 else
3090         case "$cf_cv_system_name" in
3091         (dragonfly*|mirbsd*|freebsd*)
3092                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3093                 ;;
3094         (*) LDPATH=$PATH:/sbin:/usr/sbin
3095                 # Extract the first word of "ldconfig", so it can be a program name with args.
3096 set dummy ldconfig; ac_word=$2
3097 echo "$as_me:3097: checking for $ac_word" >&5
3098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3099 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3100   echo $ECHO_N "(cached) $ECHO_C" >&6
3101 else
3102   case $LDCONFIG in
3103   [\\/]* | ?:[\\/]*)
3104   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3105   ;;
3106   *)
3107   ac_save_IFS=$IFS; IFS=$ac_path_separator
3108 ac_dummy="$LDPATH"
3109 for ac_dir in $ac_dummy; do
3110   IFS=$ac_save_IFS
3111   test -z "$ac_dir" && ac_dir=.
3112   if $as_executable_p "$ac_dir/$ac_word"; then
3113    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3114    echo "$as_me:3114: found $ac_dir/$ac_word" >&5
3115    break
3116 fi
3117 done
3118
3119   ;;
3120 esac
3121 fi
3122 LDCONFIG=$ac_cv_path_LDCONFIG
3123
3124 if test -n "$LDCONFIG"; then
3125   echo "$as_me:3125: result: $LDCONFIG" >&5
3126 echo "${ECHO_T}$LDCONFIG" >&6
3127 else
3128   echo "$as_me:3128: result: no" >&5
3129 echo "${ECHO_T}no" >&6
3130 fi
3131
3132                 ;;
3133         esac
3134 fi
3135
3136 echo "$as_me:3136: checking if you want to ensure bool is consistent with C++" >&5
3137 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3138
3139 # Check whether --with-cxx or --without-cxx was given.
3140 if test "${with_cxx+set}" = set; then
3141   withval="$with_cxx"
3142   cf_with_cxx=$withval
3143 else
3144   cf_with_cxx=yes
3145 fi;
3146 echo "$as_me:3146: result: $cf_with_cxx" >&5
3147 echo "${ECHO_T}$cf_with_cxx" >&6
3148 if test "X$cf_with_cxx" = Xno ; then
3149         CXX=""
3150         GXX=""
3151 else
3152         # with autoconf 2.13, we can change the error to a warning:
3153                 ac_ext=cc
3154 ac_cpp='$CXXCPP $CPPFLAGS'
3155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3156 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3158 ac_main_return="return"
3159 if test -n "$ac_tool_prefix"; then
3160   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3161   do
3162     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3163 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_prog_CXX+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   if test -n "$CXX"; then
3170   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3171 else
3172   ac_save_IFS=$IFS; IFS=$ac_path_separator
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175   IFS=$ac_save_IFS
3176   test -z "$ac_dir" && ac_dir=.
3177   $as_executable_p "$ac_dir/$ac_word" || continue
3178 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3179 echo "$as_me:3179: found $ac_dir/$ac_word" >&5
3180 break
3181 done
3182
3183 fi
3184 fi
3185 CXX=$ac_cv_prog_CXX
3186 if test -n "$CXX"; then
3187   echo "$as_me:3187: result: $CXX" >&5
3188 echo "${ECHO_T}$CXX" >&6
3189 else
3190   echo "$as_me:3190: result: no" >&5
3191 echo "${ECHO_T}no" >&6
3192 fi
3193
3194     test -n "$CXX" && break
3195   done
3196 fi
3197 if test -z "$CXX"; then
3198   ac_ct_CXX=$CXX
3199   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3200 do
3201   # Extract the first word of "$ac_prog", so it can be a program name with args.
3202 set dummy $ac_prog; ac_word=$2
3203 echo "$as_me:3203: checking for $ac_word" >&5
3204 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3205 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3206   echo $ECHO_N "(cached) $ECHO_C" >&6
3207 else
3208   if test -n "$ac_ct_CXX"; then
3209   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3210 else
3211   ac_save_IFS=$IFS; IFS=$ac_path_separator
3212 ac_dummy="$PATH"
3213 for ac_dir in $ac_dummy; do
3214   IFS=$ac_save_IFS
3215   test -z "$ac_dir" && ac_dir=.
3216   $as_executable_p "$ac_dir/$ac_word" || continue
3217 ac_cv_prog_ac_ct_CXX="$ac_prog"
3218 echo "$as_me:3218: found $ac_dir/$ac_word" >&5
3219 break
3220 done
3221
3222 fi
3223 fi
3224 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3225 if test -n "$ac_ct_CXX"; then
3226   echo "$as_me:3226: result: $ac_ct_CXX" >&5
3227 echo "${ECHO_T}$ac_ct_CXX" >&6
3228 else
3229   echo "$as_me:3229: result: no" >&5
3230 echo "${ECHO_T}no" >&6
3231 fi
3232
3233   test -n "$ac_ct_CXX" && break
3234 done
3235 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3236
3237   CXX=$ac_ct_CXX
3238 fi
3239
3240 # Provide some information about the compiler.
3241 echo "$as_me:3241:" \
3242      "checking for C++ compiler version" >&5
3243 ac_compiler=`set X $ac_compile; echo $2`
3244 { (eval echo "$as_me:3244: \"$ac_compiler --version </dev/null >&5\"") >&5
3245   (eval $ac_compiler --version </dev/null >&5) 2>&5
3246   ac_status=$?
3247   echo "$as_me:3247: \$? = $ac_status" >&5
3248   (exit "$ac_status"); }
3249 { (eval echo "$as_me:3249: \"$ac_compiler -v </dev/null >&5\"") >&5
3250   (eval $ac_compiler -v </dev/null >&5) 2>&5
3251   ac_status=$?
3252   echo "$as_me:3252: \$? = $ac_status" >&5
3253   (exit "$ac_status"); }
3254 { (eval echo "$as_me:3254: \"$ac_compiler -V </dev/null >&5\"") >&5
3255   (eval $ac_compiler -V </dev/null >&5) 2>&5
3256   ac_status=$?
3257   echo "$as_me:3257: \$? = $ac_status" >&5
3258   (exit "$ac_status"); }
3259
3260 echo "$as_me:3260: checking whether we are using the GNU C++ compiler" >&5
3261 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3262 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   cat >"conftest.$ac_ext" <<_ACEOF
3266 #line 3266 "configure"
3267 #include "confdefs.h"
3268
3269 int
3270 main (void)
3271 {
3272 #ifndef __GNUC__
3273        choke me
3274 #endif
3275
3276   ;
3277   return 0;
3278 }
3279 _ACEOF
3280 rm -f "conftest.$ac_objext"
3281 if { (eval echo "$as_me:3281: \"$ac_compile\"") >&5
3282   (eval $ac_compile) 2>&5
3283   ac_status=$?
3284   echo "$as_me:3284: \$? = $ac_status" >&5
3285   (exit "$ac_status"); } &&
3286          { ac_try='test -s "conftest.$ac_objext"'
3287   { (eval echo "$as_me:3287: \"$ac_try\"") >&5
3288   (eval $ac_try) 2>&5
3289   ac_status=$?
3290   echo "$as_me:3290: \$? = $ac_status" >&5
3291   (exit "$ac_status"); }; }; then
3292   ac_compiler_gnu=yes
3293 else
3294   echo "$as_me: failed program was:" >&5
3295 cat "conftest.$ac_ext" >&5
3296 ac_compiler_gnu=no
3297 fi
3298 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3299 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3300
3301 fi
3302 echo "$as_me:3302: result: $ac_cv_cxx_compiler_gnu" >&5
3303 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3304 GXX=`test $ac_compiler_gnu = yes && echo yes`
3305 ac_test_CXXFLAGS=${CXXFLAGS+set}
3306 ac_save_CXXFLAGS=$CXXFLAGS
3307 CXXFLAGS="-g"
3308 echo "$as_me:3308: checking whether $CXX accepts -g" >&5
3309 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3310 if test "${ac_cv_prog_cxx_g+set}" = set; then
3311   echo $ECHO_N "(cached) $ECHO_C" >&6
3312 else
3313   cat >"conftest.$ac_ext" <<_ACEOF
3314 #line 3314 "configure"
3315 #include "confdefs.h"
3316
3317 int
3318 main (void)
3319 {
3320
3321   ;
3322   return 0;
3323 }
3324 _ACEOF
3325 rm -f "conftest.$ac_objext"
3326 if { (eval echo "$as_me:3326: \"$ac_compile\"") >&5
3327   (eval $ac_compile) 2>&5
3328   ac_status=$?
3329   echo "$as_me:3329: \$? = $ac_status" >&5
3330   (exit "$ac_status"); } &&
3331          { ac_try='test -s "conftest.$ac_objext"'
3332   { (eval echo "$as_me:3332: \"$ac_try\"") >&5
3333   (eval $ac_try) 2>&5
3334   ac_status=$?
3335   echo "$as_me:3335: \$? = $ac_status" >&5
3336   (exit "$ac_status"); }; }; then
3337   ac_cv_prog_cxx_g=yes
3338 else
3339   echo "$as_me: failed program was:" >&5
3340 cat "conftest.$ac_ext" >&5
3341 ac_cv_prog_cxx_g=no
3342 fi
3343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3344 fi
3345 echo "$as_me:3345: result: $ac_cv_prog_cxx_g" >&5
3346 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3347 if test "$ac_test_CXXFLAGS" = set; then
3348   CXXFLAGS=$ac_save_CXXFLAGS
3349 elif test $ac_cv_prog_cxx_g = yes; then
3350   if test "$GXX" = yes; then
3351     CXXFLAGS="-g -O2"
3352   else
3353     CXXFLAGS="-g"
3354   fi
3355 else
3356   if test "$GXX" = yes; then
3357     CXXFLAGS="-O2"
3358   else
3359     CXXFLAGS=
3360   fi
3361 fi
3362 for ac_declaration in \
3363    ''\
3364    '#include <stdlib.h>' \
3365    'extern "C" void std::exit (int) throw (); using std::exit;' \
3366    'extern "C" void std::exit (int); using std::exit;' \
3367    'extern "C" void exit (int) throw ();' \
3368    'extern "C" void exit (int);' \
3369    'void exit (int);'
3370 do
3371   cat >"conftest.$ac_ext" <<_ACEOF
3372 #line 3372 "configure"
3373 #include "confdefs.h"
3374 #include <stdlib.h>
3375 $ac_declaration
3376 int
3377 main (void)
3378 {
3379 exit (42);
3380   ;
3381   return 0;
3382 }
3383 _ACEOF
3384 rm -f "conftest.$ac_objext"
3385 if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5
3386   (eval $ac_compile) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); } &&
3390          { ac_try='test -s "conftest.$ac_objext"'
3391   { (eval echo "$as_me:3391: \"$ac_try\"") >&5
3392   (eval $ac_try) 2>&5
3393   ac_status=$?
3394   echo "$as_me:3394: \$? = $ac_status" >&5
3395   (exit "$ac_status"); }; }; then
3396   :
3397 else
3398   echo "$as_me: failed program was:" >&5
3399 cat "conftest.$ac_ext" >&5
3400 continue
3401 fi
3402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3403   cat >"conftest.$ac_ext" <<_ACEOF
3404 #line 3404 "configure"
3405 #include "confdefs.h"
3406 $ac_declaration
3407 int
3408 main (void)
3409 {
3410 exit (42);
3411   ;
3412   return 0;
3413 }
3414 _ACEOF
3415 rm -f "conftest.$ac_objext"
3416 if { (eval echo "$as_me:3416: \"$ac_compile\"") >&5
3417   (eval $ac_compile) 2>&5
3418   ac_status=$?
3419   echo "$as_me:3419: \$? = $ac_status" >&5
3420   (exit "$ac_status"); } &&
3421          { ac_try='test -s "conftest.$ac_objext"'
3422   { (eval echo "$as_me:3422: \"$ac_try\"") >&5
3423   (eval $ac_try) 2>&5
3424   ac_status=$?
3425   echo "$as_me:3425: \$? = $ac_status" >&5
3426   (exit "$ac_status"); }; }; then
3427   break
3428 else
3429   echo "$as_me: failed program was:" >&5
3430 cat "conftest.$ac_ext" >&5
3431 fi
3432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3433 done
3434 rm -rf conftest*
3435 if test -n "$ac_declaration"; then
3436   echo '#ifdef __cplusplus' >>confdefs.h
3437   echo "$ac_declaration"    >>confdefs.h
3438   echo '#endif'             >>confdefs.h
3439 fi
3440
3441 ac_ext=c
3442 ac_cpp='$CPP $CPPFLAGS'
3443 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3444 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3446 ac_main_return="return"
3447
3448         ac_ext=cc
3449 ac_cpp='$CXXCPP $CPPFLAGS'
3450 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3451 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3452 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3453 ac_main_return="return"
3454
3455         if test "x$cf_with_cxx" != xno
3456         then
3457                 # Several of the C++ configurations do not work, particularly when
3458                 # cross-compiling (20140913 -TD)
3459                 echo "$as_me:3459: checking if $CXX works" >&5
3460 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3461
3462                 save_CPPFLAGS="$CPPFLAGS"
3463                 eval cf_includedir=${includedir}
3464                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3465
3466 cat >"conftest.$ac_ext" <<_ACEOF
3467 #line 3467 "configure"
3468 #include "confdefs.h"
3469
3470 #include <stdlib.h>
3471 #include <stdio.h>
3472
3473 int
3474 main (void)
3475 {
3476
3477                 printf("Hello world!\n")
3478
3479   ;
3480   return 0;
3481 }
3482 _ACEOF
3483 rm -f "conftest.$ac_objext"
3484 if { (eval echo "$as_me:3484: \"$ac_compile\"") >&5
3485   (eval $ac_compile) 2>&5
3486   ac_status=$?
3487   echo "$as_me:3487: \$? = $ac_status" >&5
3488   (exit "$ac_status"); } &&
3489          { ac_try='test -s "conftest.$ac_objext"'
3490   { (eval echo "$as_me:3490: \"$ac_try\"") >&5
3491   (eval $ac_try) 2>&5
3492   ac_status=$?
3493   echo "$as_me:3493: \$? = $ac_status" >&5
3494   (exit "$ac_status"); }; }; then
3495   cf_cxx_works=yes
3496 else
3497   echo "$as_me: failed program was:" >&5
3498 cat "conftest.$ac_ext" >&5
3499 cf_cxx_works=no
3500 fi
3501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3502                 CPPFLAGS="$save_CPPFLAGS"
3503
3504                 echo "$as_me:3504: result: $cf_cxx_works" >&5
3505 echo "${ECHO_T}$cf_cxx_works" >&6
3506                 if test "x$cf_cxx_works" = xno
3507                 then
3508                         { echo "$as_me:3508: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3509 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3510                         cf_with_cxx=no; CXX=""; GXX="";
3511                 fi
3512         fi
3513         ac_ext=c
3514 ac_cpp='$CPP $CPPFLAGS'
3515 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3516 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3517 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3518 ac_main_return="return"
3519
3520         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3521         if test "$CXX" = "g++" ; then
3522                 # Extract the first word of "g++", so it can be a program name with args.
3523 set dummy g++; ac_word=$2
3524 echo "$as_me:3524: checking for $ac_word" >&5
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3526 if test "${ac_cv_path_CXX+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   case $CXX in
3530   [\\/]* | ?:[\\/]*)
3531   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3532   ;;
3533   *)
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   if $as_executable_p "$ac_dir/$ac_word"; then
3540    ac_cv_path_CXX="$ac_dir/$ac_word"
3541    echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542    break
3543 fi
3544 done
3545
3546   ;;
3547 esac
3548 fi
3549 CXX=$ac_cv_path_CXX
3550
3551 if test -n "$CXX"; then
3552   echo "$as_me:3552: result: $CXX" >&5
3553 echo "${ECHO_T}$CXX" >&6
3554 else
3555   echo "$as_me:3555: result: no" >&5
3556 echo "${ECHO_T}no" >&6
3557 fi
3558
3559         fi
3560         case "x$CXX" in
3561         (x|xg++)
3562                 { echo "$as_me:3562: WARNING: You don't have any C++ compiler, too bad" >&5
3563 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3564                 cf_with_cxx=no; CXX=""; GXX="";
3565                 ;;
3566         esac
3567 fi
3568
3569 GXX_VERSION=none
3570 if test "$GXX" = yes; then
3571         echo "$as_me:3571: checking version of ${CXX:-g++}" >&5
3572 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3573         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3574         if test -z "$GXX_VERSION"
3575         then
3576                 GXX_VERSION=unknown
3577                 GXX=no
3578         fi
3579         echo "$as_me:3579: result: $GXX_VERSION" >&5
3580 echo "${ECHO_T}$GXX_VERSION" >&6
3581 fi
3582
3583 case "$GXX_VERSION" in
3584 ([1-9][0-9].*)
3585         ;;
3586 (1.*|2.[0-6]*)
3587         { echo "$as_me:3587: WARNING: templates do not work" >&5
3588 echo "$as_me: WARNING: templates do not work" >&2;}
3589         ;;
3590 esac
3591
3592 echo "$as_me:3592: checking if you want to build C++ binding and demo" >&5
3593 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3594
3595 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3596 if test "${with_cxx_binding+set}" = set; then
3597   withval="$with_cxx_binding"
3598   cf_with_cxx_binding=$withval
3599 else
3600   cf_with_cxx_binding=$cf_with_cxx
3601 fi;
3602 echo "$as_me:3602: result: $cf_with_cxx_binding" >&5
3603 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3604
3605 echo "$as_me:3605: checking if you want to build with Ada" >&5
3606 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3607 echo "$as_me:3607: result: $cf_with_ada" >&5
3608 echo "${ECHO_T}$cf_with_ada" >&6
3609
3610 echo "$as_me:3610: checking if you want to install terminal database" >&5
3611 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3612
3613 # Check whether --enable-db-install or --disable-db-install was given.
3614 if test "${enable_db_install+set}" = set; then
3615   enableval="$enable_db_install"
3616   cf_with_db_install=$enableval
3617 else
3618   cf_with_db_install=yes
3619 fi;
3620 echo "$as_me:3620: result: $cf_with_db_install" >&5
3621 echo "${ECHO_T}$cf_with_db_install" >&6
3622
3623 echo "$as_me:3623: checking if you want to install manpages" >&5
3624 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3625
3626 # Check whether --with-manpages or --without-manpages was given.
3627 if test "${with_manpages+set}" = set; then
3628   withval="$with_manpages"
3629   cf_with_manpages=$withval
3630 else
3631   cf_with_manpages=yes
3632 fi;
3633 echo "$as_me:3633: result: $cf_with_manpages" >&5
3634 echo "${ECHO_T}$cf_with_manpages" >&6
3635
3636 echo "$as_me:3636: checking if you want to build programs such as tic" >&5
3637 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3638
3639 # Check whether --with-progs or --without-progs was given.
3640 if test "${with_progs+set}" = set; then
3641   withval="$with_progs"
3642   cf_with_progs=$withval
3643 else
3644   cf_with_progs=yes
3645 fi;
3646 echo "$as_me:3646: result: $cf_with_progs" >&5
3647 echo "${ECHO_T}$cf_with_progs" >&6
3648
3649 if test -f "$srcdir/tack/tack.h" ; then
3650         if test "x$cross_compiling" = xyes ; then
3651                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3652
3653 echo "${as_me:-configure}:3653: testing ignoring tack because we are cross-compiling ..." 1>&5
3654
3655                 cf_with_tack=no
3656         else
3657                 echo "$as_me:3657: checking if you want to build the tack program" >&5
3658 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3659
3660 # Check whether --with-tack or --without-tack was given.
3661 if test "${with_tack+set}" = set; then
3662   withval="$with_tack"
3663   cf_with_tack=$withval
3664 else
3665   cf_with_tack=$cf_with_progs
3666 fi;
3667                 echo "$as_me:3667: result: $cf_with_tack" >&5
3668 echo "${ECHO_T}$cf_with_tack" >&6
3669         fi
3670 else
3671         cf_with_tack=no
3672 fi
3673
3674 echo "$as_me:3674: checking if you want to build test-programs" >&5
3675 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3676
3677 # Check whether --with-tests or --without-tests was given.
3678 if test "${with_tests+set}" = set; then
3679   withval="$with_tests"
3680   cf_with_tests=$withval
3681 else
3682   cf_with_tests=yes
3683 fi;
3684 echo "$as_me:3684: result: $cf_with_tests" >&5
3685 echo "${ECHO_T}$cf_with_tests" >&6
3686
3687 echo "$as_me:3687: checking if you wish to install curses.h" >&5
3688 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3689
3690 # Check whether --with-curses-h or --without-curses-h was given.
3691 if test "${with_curses_h+set}" = set; then
3692   withval="$with_curses_h"
3693   with_curses_h=$withval
3694 else
3695   with_curses_h=yes
3696 fi;
3697 echo "$as_me:3697: result: $with_curses_h" >&5
3698 echo "${ECHO_T}$with_curses_h" >&6
3699
3700 modules_to_build="ncurses"
3701 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3702 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3703 modules_to_build="$modules_to_build panel menu form"
3704
3705 test "$program_prefix" != NONE &&
3706   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3707 # Use a double $ so make ignores it.
3708 test "$program_suffix" != NONE &&
3709   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3710 # Double any \ or $.  echo might interpret backslashes.
3711 # By default was `s,x,x', remove it if useless.
3712 cat <<\_ACEOF >conftest.sed
3713 s/[\\$]/&&/g;s/;s,x,x,$//
3714 _ACEOF
3715 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3716 rm conftest.sed
3717
3718 for ac_prog in mawk gawk nawk awk
3719 do
3720   # Extract the first word of "$ac_prog", so it can be a program name with args.
3721 set dummy $ac_prog; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_AWK+set}" = set; then
3725   echo $ECHO_N "(cached) $ECHO_C" >&6
3726 else
3727   if test -n "$AWK"; then
3728   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3729 else
3730   ac_save_IFS=$IFS; IFS=$ac_path_separator
3731 ac_dummy="$PATH"
3732 for ac_dir in $ac_dummy; do
3733   IFS=$ac_save_IFS
3734   test -z "$ac_dir" && ac_dir=.
3735   $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_AWK="$ac_prog"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3738 break
3739 done
3740
3741 fi
3742 fi
3743 AWK=$ac_cv_prog_AWK
3744 if test -n "$AWK"; then
3745   echo "$as_me:3745: result: $AWK" >&5
3746 echo "${ECHO_T}$AWK" >&6
3747 else
3748   echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3750 fi
3751
3752   test -n "$AWK" && break
3753 done
3754
3755 test -z "$AWK" && { { echo "$as_me:3755: error: No awk program found" >&5
3756 echo "$as_me: error: No awk program found" >&2;}
3757    { (exit 1); exit 1; }; }
3758
3759 # Find a good install program.  We prefer a C program (faster),
3760 # so one script is as good as another.  But avoid the broken or
3761 # incompatible versions:
3762 # SysV /etc/install, /usr/sbin/install
3763 # SunOS /usr/etc/install
3764 # IRIX /sbin/install
3765 # AIX /bin/install
3766 # AmigaOS /C/install, which installs bootblocks on floppy discs
3767 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3768 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3769 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3770 # ./install, which can be erroneously created by make from ./install.sh.
3771 echo "$as_me:3771: checking for a BSD compatible install" >&5
3772 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3773 if test -z "$INSTALL"; then
3774 if test "${ac_cv_path_install+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777     ac_save_IFS=$IFS; IFS=$ac_path_separator
3778   for ac_dir in $PATH; do
3779     IFS=$ac_save_IFS
3780     # Account for people who put trailing slashes in PATH elements.
3781     case $ac_dir/ in
3782     / | ./ | .// | /cC/* \
3783     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3784     | /usr/ucb/* ) ;;
3785     *)
3786       # OSF1 and SCO ODT 3.0 have their own names for install.
3787       # Don't use installbsd from OSF since it installs stuff as root
3788       # by default.
3789       for ac_prog in ginstall scoinst install; do
3790         if $as_executable_p "$ac_dir/$ac_prog"; then
3791           if test $ac_prog = install &&
3792             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3793             # AIX install.  It has an incompatible calling convention.
3794             :
3795           elif test $ac_prog = install &&
3796             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3797             # program-specific install script used by HP pwplus--don't use.
3798             :
3799           else
3800             ac_cv_path_install="$ac_dir/$ac_prog -c"
3801             break 2
3802           fi
3803         fi
3804       done
3805       ;;
3806     esac
3807   done
3808
3809 fi
3810   if test "${ac_cv_path_install+set}" = set; then
3811     INSTALL=$ac_cv_path_install
3812   else
3813     # As a last resort, use the slow shell script.  We don't cache a
3814     # path for INSTALL within a source directory, because that will
3815     # break other packages using the cache if that directory is
3816     # removed, or if the path is relative.
3817     INSTALL=$ac_install_sh
3818   fi
3819 fi
3820 echo "$as_me:3820: result: $INSTALL" >&5
3821 echo "${ECHO_T}$INSTALL" >&6
3822
3823 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3824 # It thinks the first close brace ends the variable substitution.
3825 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3826
3827 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3828
3829 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3830
3831 case $INSTALL in
3832 (/*)
3833         ;;
3834 (*)
3835         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3836         test -z "$cf_dir" && cf_dir=.
3837         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3838         ;;
3839 esac
3840
3841 for ac_prog in lint cppcheck splint
3842 do
3843   # Extract the first word of "$ac_prog", so it can be a program name with args.
3844 set dummy $ac_prog; ac_word=$2
3845 echo "$as_me:3845: checking for $ac_word" >&5
3846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3847 if test "${ac_cv_prog_LINT+set}" = set; then
3848   echo $ECHO_N "(cached) $ECHO_C" >&6
3849 else
3850   if test -n "$LINT"; then
3851   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3852 else
3853   ac_save_IFS=$IFS; IFS=$ac_path_separator
3854 ac_dummy="$PATH"
3855 for ac_dir in $ac_dummy; do
3856   IFS=$ac_save_IFS
3857   test -z "$ac_dir" && ac_dir=.
3858   $as_executable_p "$ac_dir/$ac_word" || continue
3859 ac_cv_prog_LINT="$ac_prog"
3860 echo "$as_me:3860: found $ac_dir/$ac_word" >&5
3861 break
3862 done
3863
3864 fi
3865 fi
3866 LINT=$ac_cv_prog_LINT
3867 if test -n "$LINT"; then
3868   echo "$as_me:3868: result: $LINT" >&5
3869 echo "${ECHO_T}$LINT" >&6
3870 else
3871   echo "$as_me:3871: result: no" >&5
3872 echo "${ECHO_T}no" >&6
3873 fi
3874
3875   test -n "$LINT" && break
3876 done
3877
3878 case "x$LINT" in
3879 (xcppcheck|x*/cppcheck)
3880         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3881         ;;
3882 esac
3883
3884 echo "$as_me:3884: checking whether ln -s works" >&5
3885 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3886 LN_S=$as_ln_s
3887 if test "$LN_S" = "ln -s"; then
3888   echo "$as_me:3888: result: yes" >&5
3889 echo "${ECHO_T}yes" >&6
3890 else
3891   echo "$as_me:3891: result: no, using $LN_S" >&5
3892 echo "${ECHO_T}no, using $LN_S" >&6
3893 fi
3894
3895 echo "$as_me:3895: checking if $LN_S -f options work" >&5
3896 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3897
3898 rm -f conf$$.src conf$$dst
3899 echo >conf$$.dst
3900 echo first >conf$$.src
3901 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3902         cf_prog_ln_sf=yes
3903 else
3904         cf_prog_ln_sf=no
3905 fi
3906 rm -f conf$$.dst conf$$src
3907 echo "$as_me:3907: result: $cf_prog_ln_sf" >&5
3908 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3909
3910 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3911
3912 echo "$as_me:3912: checking for long file names" >&5
3913 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3914 if test "${ac_cv_sys_long_file_names+set}" = set; then
3915   echo $ECHO_N "(cached) $ECHO_C" >&6
3916 else
3917   ac_cv_sys_long_file_names=yes
3918 # Test for long file names in all the places we know might matter:
3919 #      .                the current directory, where building will happen
3920 #      $prefix/lib      where we will be installing things
3921 #      $exec_prefix/lib likewise
3922 # eval it to expand exec_prefix.
3923 #      $TMPDIR          if set, where it might want to write temporary files
3924 # if $TMPDIR is not set:
3925 #      /tmp             where it might want to write temporary files
3926 #      /var/tmp         likewise
3927 #      /usr/tmp         likewise
3928 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3929   ac_tmpdirs=$TMPDIR
3930 else
3931   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3932 fi
3933 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3934   test -d "$ac_dir" || continue
3935   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3936   ac_xdir=$ac_dir/cf$$
3937   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3938   ac_tf1=$ac_xdir/conftest9012345
3939   ac_tf2=$ac_xdir/conftest9012346
3940   (echo 1 >"$ac_tf1") 2>/dev/null
3941   (echo 2 >"$ac_tf2") 2>/dev/null
3942   ac_val=`cat "$ac_tf1" 2>/dev/null`
3943   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3944     ac_cv_sys_long_file_names=no
3945     rm -rf "$ac_xdir" 2>/dev/null
3946     break
3947   fi
3948   rm -rf "$ac_xdir" 2>/dev/null
3949 done
3950 fi
3951 echo "$as_me:3951: result: $ac_cv_sys_long_file_names" >&5
3952 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3953 if test "$ac_cv_sys_long_file_names" = yes; then
3954
3955 cat >>confdefs.h <<\EOF
3956 #define HAVE_LONG_FILE_NAMES 1
3957 EOF
3958
3959 fi
3960
3961 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3962 # of package conflict.
3963 cf_config_suffix=
3964
3965 # Check whether --with-config-suffix or --without-config-suffix was given.
3966 if test "${with_config_suffix+set}" = set; then
3967   withval="$with_config_suffix"
3968   case "x$withval" in
3969         (xyes|xno)
3970                 { echo "$as_me:3970: WARNING: expected a value for config-suffix option" >&5
3971 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3972                 ;;
3973         (*)     cf_config_suffix="$withval"
3974                 ;;
3975         esac
3976 fi;
3977
3978 # If we find pkg-config, check if we should install the ".pc" files.
3979
3980 echo "$as_me:3980: checking if you want to use pkg-config" >&5
3981 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3982
3983 # Check whether --with-pkg-config or --without-pkg-config was given.
3984 if test "${with_pkg_config+set}" = set; then
3985   withval="$with_pkg_config"
3986   cf_pkg_config=$withval
3987 else
3988   cf_pkg_config=yes
3989 fi;
3990 echo "$as_me:3990: result: $cf_pkg_config" >&5
3991 echo "${ECHO_T}$cf_pkg_config" >&6
3992
3993 case "$cf_pkg_config" in
3994 (no)
3995         PKG_CONFIG=none
3996         ;;
3997 (yes)
3998
3999 if test -n "$ac_tool_prefix"; then
4000   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4001 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4002 echo "$as_me:4002: checking for $ac_word" >&5
4003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4004 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4005   echo $ECHO_N "(cached) $ECHO_C" >&6
4006 else
4007   case $PKG_CONFIG in
4008   [\\/]* | ?:[\\/]*)
4009   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4010   ;;
4011   *)
4012   ac_save_IFS=$IFS; IFS=$ac_path_separator
4013 ac_dummy="$PATH"
4014 for ac_dir in $ac_dummy; do
4015   IFS=$ac_save_IFS
4016   test -z "$ac_dir" && ac_dir=.
4017   if $as_executable_p "$ac_dir/$ac_word"; then
4018    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4019    echo "$as_me:4019: found $ac_dir/$ac_word" >&5
4020    break
4021 fi
4022 done
4023
4024   ;;
4025 esac
4026 fi
4027 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4028
4029 if test -n "$PKG_CONFIG"; then
4030   echo "$as_me:4030: result: $PKG_CONFIG" >&5
4031 echo "${ECHO_T}$PKG_CONFIG" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037 fi
4038 if test -z "$ac_cv_path_PKG_CONFIG"; then
4039   ac_pt_PKG_CONFIG=$PKG_CONFIG
4040   # Extract the first word of "pkg-config", so it can be a program name with args.
4041 set dummy pkg-config; ac_word=$2
4042 echo "$as_me:4042: checking for $ac_word" >&5
4043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4044 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4045   echo $ECHO_N "(cached) $ECHO_C" >&6
4046 else
4047   case $ac_pt_PKG_CONFIG in
4048   [\\/]* | ?:[\\/]*)
4049   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4050   ;;
4051   *)
4052   ac_save_IFS=$IFS; IFS=$ac_path_separator
4053 ac_dummy="$PATH"
4054 for ac_dir in $ac_dummy; do
4055   IFS=$ac_save_IFS
4056   test -z "$ac_dir" && ac_dir=.
4057   if $as_executable_p "$ac_dir/$ac_word"; then
4058    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4059    echo "$as_me:4059: found $ac_dir/$ac_word" >&5
4060    break
4061 fi
4062 done
4063
4064   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4065   ;;
4066 esac
4067 fi
4068 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4069
4070 if test -n "$ac_pt_PKG_CONFIG"; then
4071   echo "$as_me:4071: result: $ac_pt_PKG_CONFIG" >&5
4072 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4073 else
4074   echo "$as_me:4074: result: no" >&5
4075 echo "${ECHO_T}no" >&6
4076 fi
4077
4078   PKG_CONFIG=$ac_pt_PKG_CONFIG
4079 else
4080   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4081 fi
4082
4083         ;;
4084 (*)
4085         PKG_CONFIG=$withval
4086         ;;
4087 esac
4088
4089 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4090 if test "$PKG_CONFIG" != none ; then
4091
4092 if test "x$prefix" != xNONE; then
4093         cf_path_syntax="$prefix"
4094 else
4095         cf_path_syntax="$ac_default_prefix"
4096 fi
4097
4098 case ".$PKG_CONFIG" in
4099 (.\$\(*\)*|.\'*\'*)
4100         ;;
4101 (..|./*|.\\*)
4102         ;;
4103 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4104         ;;
4105 (.\$\{*prefix\}*|.\$\{*dir\}*)
4106         eval PKG_CONFIG="$PKG_CONFIG"
4107         case ".$PKG_CONFIG" in
4108         (.NONE/*)
4109                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4110                 ;;
4111         esac
4112         ;;
4113 (.no|.NONE/*)
4114         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4115         ;;
4116 (*)
4117         { { echo "$as_me:4117: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4118 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4119    { (exit 1); exit 1; }; }
4120         ;;
4121 esac
4122
4123 elif test "x$cf_pkg_config" != xno ; then
4124         { echo "$as_me:4124: WARNING: pkg-config is not installed" >&5
4125 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4126 fi
4127
4128 case "$PKG_CONFIG" in
4129 (no|none|yes)
4130         echo "$as_me:4130: checking for pkg-config library directory" >&5
4131 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4132         ;;
4133 (*)
4134         echo "$as_me:4134: checking for $PKG_CONFIG library directory" >&5
4135 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4136         ;;
4137 esac
4138
4139 PKG_CONFIG_LIBDIR=no
4140
4141 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4142 if test "${with_pkg_config_libdir+set}" = set; then
4143   withval="$with_pkg_config_libdir"
4144   PKG_CONFIG_LIBDIR=$withval
4145 else
4146   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4147 fi;
4148
4149 case x$PKG_CONFIG_LIBDIR in
4150 (x/*)
4151         ;;
4152 (xyes)
4153         # Look for the library directory using the same prefix as the executable
4154         if test "x$PKG_CONFIG" = xnone
4155         then
4156                 cf_path=$prefix
4157         else
4158                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4159         fi
4160
4161         # If you don't like using the default architecture, you have to specify the
4162         # intended library directory and corresponding compiler/linker options.
4163         #
4164         # This case allows for Debian's 2014-flavor of multiarch, along with the
4165         # most common variations before that point.  Some other variants spell the
4166         # directory differently, e.g., "pkg-config", and put it in unusual places.
4167         # pkg-config has always been poorly standardized, which is ironic...
4168         case x`(arch) 2>/dev/null` in
4169         (*64)
4170                 cf_search_path="\
4171                         $cf_path/lib/*64-linux-gnu \
4172                         $cf_path/share \
4173                         $cf_path/lib64 \
4174                         $cf_path/lib32 \
4175                         $cf_path/lib"
4176                 ;;
4177         (*)
4178                 cf_search_path="\
4179                         $cf_path/lib/*-linux-gnu \
4180                         $cf_path/share \
4181                         $cf_path/lib32 \
4182                         $cf_path/lib \
4183                         $cf_path/libdata"
4184                 ;;
4185         esac
4186
4187         test -n "$verbose" && echo "    list..." 1>&6
4188
4189 echo "${as_me:-configure}:4189: testing list... ..." 1>&5
4190
4191         for cf_config in $cf_search_path
4192         do
4193                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4194
4195 echo "${as_me:-configure}:4195: testing checking $cf_config/pkgconfig ..." 1>&5
4196
4197                 if test -d "$cf_config/pkgconfig"
4198                 then
4199                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4200                         echo "$as_me:4200: checking done" >&5
4201 echo $ECHO_N "checking done... $ECHO_C" >&6
4202                         break
4203                 fi
4204         done
4205         ;;
4206 (*)
4207         ;;
4208 esac
4209
4210 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4211         echo "$as_me:4211: result: $PKG_CONFIG_LIBDIR" >&5
4212 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4213 fi
4214
4215 if test "x$PKG_CONFIG" != xnone
4216 then
4217         echo "$as_me:4217: checking if we should install .pc files for $PKG_CONFIG" >&5
4218 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4219 else
4220         echo "$as_me:4220: checking if we should install .pc files" >&5
4221 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4222 fi
4223
4224 # Check whether --enable-pc-files or --disable-pc-files was given.
4225 if test "${enable_pc_files+set}" = set; then
4226   enableval="$enable_pc_files"
4227   enable_pc_files=$enableval
4228 else
4229   enable_pc_files=no
4230 fi;
4231 echo "$as_me:4231: result: $enable_pc_files" >&5
4232 echo "${ECHO_T}$enable_pc_files" >&6
4233
4234 if test "x$enable_pc_files" != xno
4235 then
4236         MAKE_PC_FILES=
4237         case "x$PKG_CONFIG_LIBDIR" in
4238         (xno|xyes)
4239                 { echo "$as_me:4239: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4240 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4241                 ;;
4242         (*)
4243
4244 if test "x$prefix" != xNONE; then
4245         cf_path_syntax="$prefix"
4246 else
4247         cf_path_syntax="$ac_default_prefix"
4248 fi
4249
4250 case ".$PKG_CONFIG_LIBDIR" in
4251 (.\$\(*\)*|.\'*\'*)
4252         ;;
4253 (..|./*|.\\*)
4254         ;;
4255 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4256         ;;
4257 (.\$\{*prefix\}*|.\$\{*dir\}*)
4258         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4259         case ".$PKG_CONFIG_LIBDIR" in
4260         (.NONE/*)
4261                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4262                 ;;
4263         esac
4264         ;;
4265 (.no|.NONE/*)
4266         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4267         ;;
4268 (*)
4269         { { echo "$as_me:4269: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4270 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4271    { (exit 1); exit 1; }; }
4272         ;;
4273 esac
4274
4275                 ;;
4276         esac
4277 else
4278         MAKE_PC_FILES="#"
4279 fi
4280
4281 if test -z "$MAKE_PC_FILES"
4282 then
4283         echo "$as_me:4283: checking for suffix to add to pc-files" >&5
4284 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4285
4286 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4287 if test "${with_pc_suffix+set}" = set; then
4288   withval="$with_pc_suffix"
4289   case "x$withval" in
4290         (xyes|xno)
4291                 PC_MODULE_SUFFIX=
4292                 ;;
4293         (*)     PC_MODULE_SUFFIX="$withval"
4294                 ;;
4295         esac
4296 fi;
4297         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4298         echo "$as_me:4298: result: $PC_MODULE_SUFFIX" >&5
4299 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4300         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4301
4302 fi
4303
4304 echo "$as_me:4304: checking if we should assume mixed-case filenames" >&5
4305 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4306
4307 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4308 if test "${enable_mixed_case+set}" = set; then
4309   enableval="$enable_mixed_case"
4310   enable_mixedcase=$enableval
4311 else
4312   enable_mixedcase=auto
4313 fi;
4314 echo "$as_me:4314: result: $enable_mixedcase" >&5
4315 echo "${ECHO_T}$enable_mixedcase" >&6
4316 if test "$enable_mixedcase" = "auto" ; then
4317
4318 echo "$as_me:4318: checking if filesystem supports mixed-case filenames" >&5
4319 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4320 if test "${cf_cv_mixedcase+set}" = set; then
4321   echo $ECHO_N "(cached) $ECHO_C" >&6
4322 else
4323
4324 if test "$cross_compiling" = yes ; then
4325         case "$target_alias" in
4326         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4327                 cf_cv_mixedcase=no
4328                 ;;
4329         (*)
4330                 cf_cv_mixedcase=yes
4331                 ;;
4332         esac
4333 else
4334         rm -f conftest CONFTEST
4335         echo test >conftest
4336         if test -f CONFTEST ; then
4337                 cf_cv_mixedcase=no
4338         else
4339                 cf_cv_mixedcase=yes
4340         fi
4341         rm -f conftest CONFTEST
4342 fi
4343
4344 fi
4345 echo "$as_me:4345: result: $cf_cv_mixedcase" >&5
4346 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4347 test "$cf_cv_mixedcase" = yes &&
4348 cat >>confdefs.h <<\EOF
4349 #define MIXEDCASE_FILENAMES 1
4350 EOF
4351
4352 else
4353         cf_cv_mixedcase=$enable_mixedcase
4354         if test "x$enable_mixedcase" = "xyes" ; then
4355
4356 cat >>confdefs.h <<\EOF
4357 #define MIXEDCASE_FILENAMES 1
4358 EOF
4359
4360         fi
4361 fi
4362
4363 # do this after mixed-case option (tags/TAGS is not as important as tic).
4364 echo "$as_me:4364: checking whether ${MAKE-make} sets \${MAKE}" >&5
4365 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4366 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4367 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4368   echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370   cat >conftest.make <<\EOF
4371 all:
4372         @echo 'ac_maketemp="${MAKE}"'
4373 EOF
4374 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4375 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4376 if test -n "$ac_maketemp"; then
4377   eval ac_cv_prog_make_${ac_make}_set=yes
4378 else
4379   eval ac_cv_prog_make_${ac_make}_set=no
4380 fi
4381 rm -f conftest.make
4382 fi
4383 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4384   echo "$as_me:4384: result: yes" >&5
4385 echo "${ECHO_T}yes" >&6
4386   SET_MAKE=
4387 else
4388   echo "$as_me:4388: result: no" >&5
4389 echo "${ECHO_T}no" >&6
4390   SET_MAKE="MAKE=${MAKE-make}"
4391 fi
4392
4393 for ac_prog in exctags ctags
4394 do
4395   # Extract the first word of "$ac_prog", so it can be a program name with args.
4396 set dummy $ac_prog; ac_word=$2
4397 echo "$as_me:4397: checking for $ac_word" >&5
4398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4399 if test "${ac_cv_prog_CTAGS+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402   if test -n "$CTAGS"; then
4403   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4404 else
4405   ac_save_IFS=$IFS; IFS=$ac_path_separator
4406 ac_dummy="$PATH"
4407 for ac_dir in $ac_dummy; do
4408   IFS=$ac_save_IFS
4409   test -z "$ac_dir" && ac_dir=.
4410   $as_executable_p "$ac_dir/$ac_word" || continue
4411 ac_cv_prog_CTAGS="$ac_prog"
4412 echo "$as_me:4412: found $ac_dir/$ac_word" >&5
4413 break
4414 done
4415
4416 fi
4417 fi
4418 CTAGS=$ac_cv_prog_CTAGS
4419 if test -n "$CTAGS"; then
4420   echo "$as_me:4420: result: $CTAGS" >&5
4421 echo "${ECHO_T}$CTAGS" >&6
4422 else
4423   echo "$as_me:4423: result: no" >&5
4424 echo "${ECHO_T}no" >&6
4425 fi
4426
4427   test -n "$CTAGS" && break
4428 done
4429
4430 for ac_prog in exetags etags
4431 do
4432   # Extract the first word of "$ac_prog", so it can be a program name with args.
4433 set dummy $ac_prog; ac_word=$2
4434 echo "$as_me:4434: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_ETAGS+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$ETAGS"; then
4440   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4441 else
4442   ac_save_IFS=$IFS; IFS=$ac_path_separator
4443 ac_dummy="$PATH"
4444 for ac_dir in $ac_dummy; do
4445   IFS=$ac_save_IFS
4446   test -z "$ac_dir" && ac_dir=.
4447   $as_executable_p "$ac_dir/$ac_word" || continue
4448 ac_cv_prog_ETAGS="$ac_prog"
4449 echo "$as_me:4449: found $ac_dir/$ac_word" >&5
4450 break
4451 done
4452
4453 fi
4454 fi
4455 ETAGS=$ac_cv_prog_ETAGS
4456 if test -n "$ETAGS"; then
4457   echo "$as_me:4457: result: $ETAGS" >&5
4458 echo "${ECHO_T}$ETAGS" >&6
4459 else
4460   echo "$as_me:4460: result: no" >&5
4461 echo "${ECHO_T}no" >&6
4462 fi
4463
4464   test -n "$ETAGS" && break
4465 done
4466
4467 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4468 set dummy ${CTAGS:-ctags}; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   if test -n "$MAKE_LOWER_TAGS"; then
4475   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4476 else
4477   ac_save_IFS=$IFS; IFS=$ac_path_separator
4478 ac_dummy="$PATH"
4479 for ac_dir in $ac_dummy; do
4480   IFS=$ac_save_IFS
4481   test -z "$ac_dir" && ac_dir=.
4482   $as_executable_p "$ac_dir/$ac_word" || continue
4483 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4484 echo "$as_me:4484: found $ac_dir/$ac_word" >&5
4485 break
4486 done
4487
4488   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4489 fi
4490 fi
4491 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4492 if test -n "$MAKE_LOWER_TAGS"; then
4493   echo "$as_me:4493: result: $MAKE_LOWER_TAGS" >&5
4494 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4495 else
4496   echo "$as_me:4496: result: no" >&5
4497 echo "${ECHO_T}no" >&6
4498 fi
4499
4500 if test "$cf_cv_mixedcase" = yes ; then
4501         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4502 set dummy ${ETAGS:-etags}; ac_word=$2
4503 echo "$as_me:4503: checking for $ac_word" >&5
4504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4505 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4506   echo $ECHO_N "(cached) $ECHO_C" >&6
4507 else
4508   if test -n "$MAKE_UPPER_TAGS"; then
4509   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4510 else
4511   ac_save_IFS=$IFS; IFS=$ac_path_separator
4512 ac_dummy="$PATH"
4513 for ac_dir in $ac_dummy; do
4514   IFS=$ac_save_IFS
4515   test -z "$ac_dir" && ac_dir=.
4516   $as_executable_p "$ac_dir/$ac_word" || continue
4517 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4518 echo "$as_me:4518: found $ac_dir/$ac_word" >&5
4519 break
4520 done
4521
4522   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4523 fi
4524 fi
4525 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4526 if test -n "$MAKE_UPPER_TAGS"; then
4527   echo "$as_me:4527: result: $MAKE_UPPER_TAGS" >&5
4528 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4529 else
4530   echo "$as_me:4530: result: no" >&5
4531 echo "${ECHO_T}no" >&6
4532 fi
4533
4534 else
4535         MAKE_UPPER_TAGS=no
4536 fi
4537
4538 if test "$MAKE_UPPER_TAGS" = yes ; then
4539         MAKE_UPPER_TAGS=
4540 else
4541         MAKE_UPPER_TAGS="#"
4542 fi
4543
4544 if test "$MAKE_LOWER_TAGS" = yes ; then
4545         MAKE_LOWER_TAGS=
4546 else
4547         MAKE_LOWER_TAGS="#"
4548 fi
4549
4550 echo "$as_me:4550: checking for makeflags variable" >&5
4551 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4552 if test "${cf_cv_makeflags+set}" = set; then
4553   echo $ECHO_N "(cached) $ECHO_C" >&6
4554 else
4555
4556         cf_cv_makeflags=''
4557         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4558         do
4559                 cat >cf_makeflags.tmp <<CF_EOF
4560 SHELL = $SHELL
4561 all :
4562         @ echo '.$cf_option'
4563 CF_EOF
4564                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4565                 case "$cf_result" in
4566                 (.*k|.*kw)
4567                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4568                         case "$cf_result" in
4569                         (.*CC=*)        cf_cv_makeflags=
4570                                 ;;
4571                         (*)     cf_cv_makeflags=$cf_option
4572                                 ;;
4573                         esac
4574                         break
4575                         ;;
4576                 (.-)
4577                         ;;
4578                 (*)
4579
4580 echo "${as_me:-configure}:4580: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4581
4582                         ;;
4583                 esac
4584         done
4585         rm -f cf_makeflags.tmp
4586
4587 fi
4588 echo "$as_me:4588: result: $cf_cv_makeflags" >&5
4589 echo "${ECHO_T}$cf_cv_makeflags" >&6
4590
4591 if test -n "$ac_tool_prefix"; then
4592   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4593 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4594 echo "$as_me:4594: checking for $ac_word" >&5
4595 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4596 if test "${ac_cv_prog_RANLIB+set}" = set; then
4597   echo $ECHO_N "(cached) $ECHO_C" >&6
4598 else
4599   if test -n "$RANLIB"; then
4600   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4601 else
4602   ac_save_IFS=$IFS; IFS=$ac_path_separator
4603 ac_dummy="$PATH"
4604 for ac_dir in $ac_dummy; do
4605   IFS=$ac_save_IFS
4606   test -z "$ac_dir" && ac_dir=.
4607   $as_executable_p "$ac_dir/$ac_word" || continue
4608 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4609 echo "$as_me:4609: found $ac_dir/$ac_word" >&5
4610 break
4611 done
4612
4613 fi
4614 fi
4615 RANLIB=$ac_cv_prog_RANLIB
4616 if test -n "$RANLIB"; then
4617   echo "$as_me:4617: result: $RANLIB" >&5
4618 echo "${ECHO_T}$RANLIB" >&6
4619 else
4620   echo "$as_me:4620: result: no" >&5
4621 echo "${ECHO_T}no" >&6
4622 fi
4623
4624 fi
4625 if test -z "$ac_cv_prog_RANLIB"; then
4626   ac_ct_RANLIB=$RANLIB
4627   # Extract the first word of "ranlib", so it can be a program name with args.
4628 set dummy ranlib; ac_word=$2
4629 echo "$as_me:4629: checking for $ac_word" >&5
4630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4631 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4632   echo $ECHO_N "(cached) $ECHO_C" >&6
4633 else
4634   if test -n "$ac_ct_RANLIB"; then
4635   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4636 else
4637   ac_save_IFS=$IFS; IFS=$ac_path_separator
4638 ac_dummy="$PATH"
4639 for ac_dir in $ac_dummy; do
4640   IFS=$ac_save_IFS
4641   test -z "$ac_dir" && ac_dir=.
4642   $as_executable_p "$ac_dir/$ac_word" || continue
4643 ac_cv_prog_ac_ct_RANLIB="ranlib"
4644 echo "$as_me:4644: found $ac_dir/$ac_word" >&5
4645 break
4646 done
4647
4648   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4649 fi
4650 fi
4651 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4652 if test -n "$ac_ct_RANLIB"; then
4653   echo "$as_me:4653: result: $ac_ct_RANLIB" >&5
4654 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4655 else
4656   echo "$as_me:4656: result: no" >&5
4657 echo "${ECHO_T}no" >&6
4658 fi
4659
4660   RANLIB=$ac_ct_RANLIB
4661 else
4662   RANLIB="$ac_cv_prog_RANLIB"
4663 fi
4664
4665 if test -n "$ac_tool_prefix"; then
4666   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4667 set dummy ${ac_tool_prefix}ld; ac_word=$2
4668 echo "$as_me:4668: checking for $ac_word" >&5
4669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4670 if test "${ac_cv_prog_LD+set}" = set; then
4671   echo $ECHO_N "(cached) $ECHO_C" >&6
4672 else
4673   if test -n "$LD"; then
4674   ac_cv_prog_LD="$LD" # Let the user override the test.
4675 else
4676   ac_save_IFS=$IFS; IFS=$ac_path_separator
4677 ac_dummy="$PATH"
4678 for ac_dir in $ac_dummy; do
4679   IFS=$ac_save_IFS
4680   test -z "$ac_dir" && ac_dir=.
4681   $as_executable_p "$ac_dir/$ac_word" || continue
4682 ac_cv_prog_LD="${ac_tool_prefix}ld"
4683 echo "$as_me:4683: found $ac_dir/$ac_word" >&5
4684 break
4685 done
4686
4687 fi
4688 fi
4689 LD=$ac_cv_prog_LD
4690 if test -n "$LD"; then
4691   echo "$as_me:4691: result: $LD" >&5
4692 echo "${ECHO_T}$LD" >&6
4693 else
4694   echo "$as_me:4694: result: no" >&5
4695 echo "${ECHO_T}no" >&6
4696 fi
4697
4698 fi
4699 if test -z "$ac_cv_prog_LD"; then
4700   ac_ct_LD=$LD
4701   # Extract the first word of "ld", so it can be a program name with args.
4702 set dummy ld; ac_word=$2
4703 echo "$as_me:4703: checking for $ac_word" >&5
4704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4705 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4706   echo $ECHO_N "(cached) $ECHO_C" >&6
4707 else
4708   if test -n "$ac_ct_LD"; then
4709   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4710 else
4711   ac_save_IFS=$IFS; IFS=$ac_path_separator
4712 ac_dummy="$PATH"
4713 for ac_dir in $ac_dummy; do
4714   IFS=$ac_save_IFS
4715   test -z "$ac_dir" && ac_dir=.
4716   $as_executable_p "$ac_dir/$ac_word" || continue
4717 ac_cv_prog_ac_ct_LD="ld"
4718 echo "$as_me:4718: found $ac_dir/$ac_word" >&5
4719 break
4720 done
4721
4722   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4723 fi
4724 fi
4725 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4726 if test -n "$ac_ct_LD"; then
4727   echo "$as_me:4727: result: $ac_ct_LD" >&5
4728 echo "${ECHO_T}$ac_ct_LD" >&6
4729 else
4730   echo "$as_me:4730: result: no" >&5
4731 echo "${ECHO_T}no" >&6
4732 fi
4733
4734   LD=$ac_ct_LD
4735 else
4736   LD="$ac_cv_prog_LD"
4737 fi
4738
4739 if test -n "$ac_tool_prefix"; then
4740   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4741 set dummy ${ac_tool_prefix}ar; ac_word=$2
4742 echo "$as_me:4742: checking for $ac_word" >&5
4743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4744 if test "${ac_cv_prog_AR+set}" = set; then
4745   echo $ECHO_N "(cached) $ECHO_C" >&6
4746 else
4747   if test -n "$AR"; then
4748   ac_cv_prog_AR="$AR" # Let the user override the test.
4749 else
4750   ac_save_IFS=$IFS; IFS=$ac_path_separator
4751 ac_dummy="$PATH"
4752 for ac_dir in $ac_dummy; do
4753   IFS=$ac_save_IFS
4754   test -z "$ac_dir" && ac_dir=.
4755   $as_executable_p "$ac_dir/$ac_word" || continue
4756 ac_cv_prog_AR="${ac_tool_prefix}ar"
4757 echo "$as_me:4757: found $ac_dir/$ac_word" >&5
4758 break
4759 done
4760
4761 fi
4762 fi
4763 AR=$ac_cv_prog_AR
4764 if test -n "$AR"; then
4765   echo "$as_me:4765: result: $AR" >&5
4766 echo "${ECHO_T}$AR" >&6
4767 else
4768   echo "$as_me:4768: result: no" >&5
4769 echo "${ECHO_T}no" >&6
4770 fi
4771
4772 fi
4773 if test -z "$ac_cv_prog_AR"; then
4774   ac_ct_AR=$AR
4775   # Extract the first word of "ar", so it can be a program name with args.
4776 set dummy ar; ac_word=$2
4777 echo "$as_me:4777: checking for $ac_word" >&5
4778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4779 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4780   echo $ECHO_N "(cached) $ECHO_C" >&6
4781 else
4782   if test -n "$ac_ct_AR"; then
4783   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4784 else
4785   ac_save_IFS=$IFS; IFS=$ac_path_separator
4786 ac_dummy="$PATH"
4787 for ac_dir in $ac_dummy; do
4788   IFS=$ac_save_IFS
4789   test -z "$ac_dir" && ac_dir=.
4790   $as_executable_p "$ac_dir/$ac_word" || continue
4791 ac_cv_prog_ac_ct_AR="ar"
4792 echo "$as_me:4792: found $ac_dir/$ac_word" >&5
4793 break
4794 done
4795
4796   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4797 fi
4798 fi
4799 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4800 if test -n "$ac_ct_AR"; then
4801   echo "$as_me:4801: result: $ac_ct_AR" >&5
4802 echo "${ECHO_T}$ac_ct_AR" >&6
4803 else
4804   echo "$as_me:4804: result: no" >&5
4805 echo "${ECHO_T}no" >&6
4806 fi
4807
4808   AR=$ac_ct_AR
4809 else
4810   AR="$ac_cv_prog_AR"
4811 fi
4812
4813 if test -n "$ac_tool_prefix"; then
4814   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4815 set dummy ${ac_tool_prefix}nm; ac_word=$2
4816 echo "$as_me:4816: checking for $ac_word" >&5
4817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4818 if test "${ac_cv_prog_NM+set}" = set; then
4819   echo $ECHO_N "(cached) $ECHO_C" >&6
4820 else
4821   if test -n "$NM"; then
4822   ac_cv_prog_NM="$NM" # Let the user override the test.
4823 else
4824   ac_save_IFS=$IFS; IFS=$ac_path_separator
4825 ac_dummy="$PATH"
4826 for ac_dir in $ac_dummy; do
4827   IFS=$ac_save_IFS
4828   test -z "$ac_dir" && ac_dir=.
4829   $as_executable_p "$ac_dir/$ac_word" || continue
4830 ac_cv_prog_NM="${ac_tool_prefix}nm"
4831 echo "$as_me:4831: found $ac_dir/$ac_word" >&5
4832 break
4833 done
4834
4835 fi
4836 fi
4837 NM=$ac_cv_prog_NM
4838 if test -n "$NM"; then
4839   echo "$as_me:4839: result: $NM" >&5
4840 echo "${ECHO_T}$NM" >&6
4841 else
4842   echo "$as_me:4842: result: no" >&5
4843 echo "${ECHO_T}no" >&6
4844 fi
4845
4846 fi
4847 if test -z "$ac_cv_prog_NM"; then
4848   ac_ct_NM=$NM
4849   # Extract the first word of "nm", so it can be a program name with args.
4850 set dummy nm; ac_word=$2
4851 echo "$as_me:4851: checking for $ac_word" >&5
4852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4853 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   if test -n "$ac_ct_NM"; then
4857   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4858 else
4859   ac_save_IFS=$IFS; IFS=$ac_path_separator
4860 ac_dummy="$PATH"
4861 for ac_dir in $ac_dummy; do
4862   IFS=$ac_save_IFS
4863   test -z "$ac_dir" && ac_dir=.
4864   $as_executable_p "$ac_dir/$ac_word" || continue
4865 ac_cv_prog_ac_ct_NM="nm"
4866 echo "$as_me:4866: found $ac_dir/$ac_word" >&5
4867 break
4868 done
4869
4870   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4871 fi
4872 fi
4873 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4874 if test -n "$ac_ct_NM"; then
4875   echo "$as_me:4875: result: $ac_ct_NM" >&5
4876 echo "${ECHO_T}$ac_ct_NM" >&6
4877 else
4878   echo "$as_me:4878: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882   NM=$ac_ct_NM
4883 else
4884   NM="$ac_cv_prog_NM"
4885 fi
4886
4887 if test -n "$ac_tool_prefix"; then
4888   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4889 set dummy ${ac_tool_prefix}ar; ac_word=$2
4890 echo "$as_me:4890: checking for $ac_word" >&5
4891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4892 if test "${ac_cv_prog_AR+set}" = set; then
4893   echo $ECHO_N "(cached) $ECHO_C" >&6
4894 else
4895   if test -n "$AR"; then
4896   ac_cv_prog_AR="$AR" # Let the user override the test.
4897 else
4898   ac_save_IFS=$IFS; IFS=$ac_path_separator
4899 ac_dummy="$PATH"
4900 for ac_dir in $ac_dummy; do
4901   IFS=$ac_save_IFS
4902   test -z "$ac_dir" && ac_dir=.
4903   $as_executable_p "$ac_dir/$ac_word" || continue
4904 ac_cv_prog_AR="${ac_tool_prefix}ar"
4905 echo "$as_me:4905: found $ac_dir/$ac_word" >&5
4906 break
4907 done
4908
4909 fi
4910 fi
4911 AR=$ac_cv_prog_AR
4912 if test -n "$AR"; then
4913   echo "$as_me:4913: result: $AR" >&5
4914 echo "${ECHO_T}$AR" >&6
4915 else
4916   echo "$as_me:4916: result: no" >&5
4917 echo "${ECHO_T}no" >&6
4918 fi
4919
4920 fi
4921 if test -z "$ac_cv_prog_AR"; then
4922   ac_ct_AR=$AR
4923   # Extract the first word of "ar", so it can be a program name with args.
4924 set dummy ar; ac_word=$2
4925 echo "$as_me:4925: checking for $ac_word" >&5
4926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4927 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4928   echo $ECHO_N "(cached) $ECHO_C" >&6
4929 else
4930   if test -n "$ac_ct_AR"; then
4931   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4932 else
4933   ac_save_IFS=$IFS; IFS=$ac_path_separator
4934 ac_dummy="$PATH"
4935 for ac_dir in $ac_dummy; do
4936   IFS=$ac_save_IFS
4937   test -z "$ac_dir" && ac_dir=.
4938   $as_executable_p "$ac_dir/$ac_word" || continue
4939 ac_cv_prog_ac_ct_AR="ar"
4940 echo "$as_me:4940: found $ac_dir/$ac_word" >&5
4941 break
4942 done
4943
4944   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4945 fi
4946 fi
4947 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4948 if test -n "$ac_ct_AR"; then
4949   echo "$as_me:4949: result: $ac_ct_AR" >&5
4950 echo "${ECHO_T}$ac_ct_AR" >&6
4951 else
4952   echo "$as_me:4952: result: no" >&5
4953 echo "${ECHO_T}no" >&6
4954 fi
4955
4956   AR=$ac_ct_AR
4957 else
4958   AR="$ac_cv_prog_AR"
4959 fi
4960
4961 echo "$as_me:4961: checking for options to update archives" >&5
4962 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4963 if test "${cf_cv_ar_flags+set}" = set; then
4964   echo $ECHO_N "(cached) $ECHO_C" >&6
4965 else
4966
4967         case "$cf_cv_system_name" in
4968         (*-msvc*)
4969                 cf_cv_ar_flags=''
4970                 cat >mk_static_lib.sh <<-EOF
4971                 #!$SHELL
4972                 MSVC_BIN="$AR"
4973                 out="\$1"
4974                 shift
4975                 exec \$MSVC_BIN -out:"\$out" \$@
4976                 EOF
4977                 chmod +x mk_static_lib.sh
4978                 AR=`pwd`/mk_static_lib.sh
4979                 ;;
4980         (*)
4981                 cf_cv_ar_flags=unknown
4982                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4983                 do
4984
4985                         # check if $ARFLAGS already contains this choice
4986                         if test "x$ARFLAGS" != "x" ; then
4987                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4988                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4989                                         cf_cv_ar_flags=
4990                                         break
4991                                 fi
4992                         fi
4993
4994                         rm -f "conftest.$ac_cv_objext"
4995                         rm -f conftest.a
4996
4997                         cat >"conftest.$ac_ext" <<EOF
4998 #line 4998 "configure"
4999 int     testdata[3] = { 123, 456, 789 };
5000 EOF
5001                         if { (eval echo "$as_me:5001: \"$ac_compile\"") >&5
5002   (eval $ac_compile) 2>&5
5003   ac_status=$?
5004   echo "$as_me:5004: \$? = $ac_status" >&5
5005   (exit "$ac_status"); } ; then
5006                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5007                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5008                                 if test -f conftest.a ; then
5009                                         cf_cv_ar_flags="$cf_ar_flags"
5010                                         break
5011                                 fi
5012                         else
5013                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5014
5015 echo "${as_me:-configure}:5015: testing cannot compile test-program ..." 1>&5
5016
5017                                 break
5018                         fi
5019                 done
5020                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5021                 ;;
5022         esac
5023
5024 fi
5025 echo "$as_me:5025: result: $cf_cv_ar_flags" >&5
5026 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5027
5028 if test -n "$ARFLAGS" ; then
5029         if test -n "$cf_cv_ar_flags" ; then
5030                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5031         fi
5032 else
5033         ARFLAGS=$cf_cv_ar_flags
5034 fi
5035
5036 echo "$as_me:5036: checking if you have specified an install-prefix" >&5
5037 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5038
5039 # Check whether --with-install-prefix or --without-install-prefix was given.
5040 if test "${with_install_prefix+set}" = set; then
5041   withval="$with_install_prefix"
5042   case "x$withval" in
5043         (xyes|xno)
5044                 ;;
5045         (*)     DESTDIR="$withval"
5046                 ;;
5047         esac
5048 fi;
5049 echo "$as_me:5049: result: $DESTDIR" >&5
5050 echo "${ECHO_T}$DESTDIR" >&6
5051
5052 ###############################################################################
5053
5054 # If we're cross-compiling, allow the user to override the tools and their
5055 # options.  The configure script is oriented toward identifying the host
5056 # compiler, etc., but we need a build compiler to generate parts of the source.
5057
5058 case "$cf_cv_system_name" in
5059 (*-msvc*)
5060         LDFLAGS="$LDFLAGS user32.lib"
5061         export LDFLAGS
5062         ;;
5063 esac
5064
5065 if test "$cross_compiling" = yes ; then
5066
5067         # defaults that we might want to override
5068         : ${BUILD_CFLAGS:=''}
5069         : ${BUILD_CPPFLAGS:=''}
5070         : ${BUILD_LDFLAGS:=''}
5071         : ${BUILD_LIBS:=''}
5072         : ${BUILD_EXEEXT:='$x'}
5073         : ${BUILD_OBJEXT:='o'}
5074
5075 # Check whether --with-build-cc or --without-build-cc was given.
5076 if test "${with_build_cc+set}" = set; then
5077   withval="$with_build_cc"
5078   BUILD_CC="$withval"
5079 else
5080   for ac_prog in gcc clang c99 c89 cc cl
5081 do
5082   # Extract the first word of "$ac_prog", so it can be a program name with args.
5083 set dummy $ac_prog; ac_word=$2
5084 echo "$as_me:5084: checking for $ac_word" >&5
5085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5086 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5087   echo $ECHO_N "(cached) $ECHO_C" >&6
5088 else
5089   if test -n "$BUILD_CC"; then
5090   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5091 else
5092   ac_save_IFS=$IFS; IFS=$ac_path_separator
5093 ac_dummy="$PATH"
5094 for ac_dir in $ac_dummy; do
5095   IFS=$ac_save_IFS
5096   test -z "$ac_dir" && ac_dir=.
5097   $as_executable_p "$ac_dir/$ac_word" || continue
5098 ac_cv_prog_BUILD_CC="$ac_prog"
5099 echo "$as_me:5099: found $ac_dir/$ac_word" >&5
5100 break
5101 done
5102
5103 fi
5104 fi
5105 BUILD_CC=$ac_cv_prog_BUILD_CC
5106 if test -n "$BUILD_CC"; then
5107   echo "$as_me:5107: result: $BUILD_CC" >&5
5108 echo "${ECHO_T}$BUILD_CC" >&6
5109 else
5110   echo "$as_me:5110: result: no" >&5
5111 echo "${ECHO_T}no" >&6
5112 fi
5113
5114   test -n "$BUILD_CC" && break
5115 done
5116 test -n "$BUILD_CC" || BUILD_CC="none"
5117
5118 fi;
5119         echo "$as_me:5119: checking for native build C compiler" >&5
5120 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5121         echo "$as_me:5121: result: $BUILD_CC" >&5
5122 echo "${ECHO_T}$BUILD_CC" >&6
5123
5124         echo "$as_me:5124: checking for native build C preprocessor" >&5
5125 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5126
5127 # Check whether --with-build-cpp or --without-build-cpp was given.
5128 if test "${with_build_cpp+set}" = set; then
5129   withval="$with_build_cpp"
5130   BUILD_CPP="$withval"
5131 else
5132   BUILD_CPP='${BUILD_CC} -E'
5133 fi;
5134         echo "$as_me:5134: result: $BUILD_CPP" >&5
5135 echo "${ECHO_T}$BUILD_CPP" >&6
5136
5137         echo "$as_me:5137: checking for native build C flags" >&5
5138 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5139
5140 # Check whether --with-build-cflags or --without-build-cflags was given.
5141 if test "${with_build_cflags+set}" = set; then
5142   withval="$with_build_cflags"
5143   BUILD_CFLAGS="$withval"
5144 fi;
5145         echo "$as_me:5145: result: $BUILD_CFLAGS" >&5
5146 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5147
5148         echo "$as_me:5148: checking for native build C preprocessor-flags" >&5
5149 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5150
5151 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5152 if test "${with_build_cppflags+set}" = set; then
5153   withval="$with_build_cppflags"
5154   BUILD_CPPFLAGS="$withval"
5155 fi;
5156         echo "$as_me:5156: result: $BUILD_CPPFLAGS" >&5
5157 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5158
5159         echo "$as_me:5159: checking for native build linker-flags" >&5
5160 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5161
5162 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5163 if test "${with_build_ldflags+set}" = set; then
5164   withval="$with_build_ldflags"
5165   BUILD_LDFLAGS="$withval"
5166 fi;
5167         echo "$as_me:5167: result: $BUILD_LDFLAGS" >&5
5168 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5169
5170         echo "$as_me:5170: checking for native build linker-libraries" >&5
5171 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5172
5173 # Check whether --with-build-libs or --without-build-libs was given.
5174 if test "${with_build_libs+set}" = set; then
5175   withval="$with_build_libs"
5176   BUILD_LIBS="$withval"
5177 fi;
5178         echo "$as_me:5178: result: $BUILD_LIBS" >&5
5179 echo "${ECHO_T}$BUILD_LIBS" >&6
5180
5181         # this assumes we're on Unix.
5182         BUILD_EXEEXT=
5183         BUILD_OBJEXT=o
5184
5185         : ${BUILD_CC:='${CC}'}
5186
5187         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5188                 { { echo "$as_me:5188: error: Cross-build requires two compilers.
5189 Use --with-build-cc to specify the native compiler." >&5
5190 echo "$as_me: error: Cross-build requires two compilers.
5191 Use --with-build-cc to specify the native compiler." >&2;}
5192    { (exit 1); exit 1; }; }
5193         fi
5194
5195 else
5196         : ${BUILD_CC:='${CC}'}
5197         : ${BUILD_CPP:='${CPP}'}
5198         : ${BUILD_CFLAGS:='${CFLAGS}'}
5199         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5200         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5201         : ${BUILD_LIBS:='${LIBS}'}
5202         : ${BUILD_EXEEXT:='$x'}
5203         : ${BUILD_OBJEXT:='o'}
5204 fi
5205
5206 ###############################################################################
5207
5208 ### Options to allow the user to specify the set of libraries which are used.
5209 ### Use "--without-normal --with-shared" to allow the default model to be
5210 ### shared, for example.
5211 cf_list_models=""
5212
5213 echo "$as_me:5213: checking if libtool -version-number should be used" >&5
5214 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5215
5216 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5217 if test "${enable_libtool_version+set}" = set; then
5218   enableval="$enable_libtool_version"
5219   test "$enableval" != no && enableval=yes
5220         if test "$enableval" != "yes" ; then
5221     cf_libtool_version=no
5222         else
5223                 cf_libtool_version=yes
5224         fi
5225 else
5226   enableval=yes
5227         cf_libtool_version=yes
5228
5229 fi;
5230 echo "$as_me:5230: result: $cf_libtool_version" >&5
5231 echo "${ECHO_T}$cf_libtool_version" >&6
5232
5233 if test "$cf_libtool_version" = yes ; then
5234         LIBTOOL_VERSION="-version-number"
5235 else
5236         LIBTOOL_VERSION="-version-info"
5237         case "x$VERSION" in
5238         (x)
5239                 { echo "$as_me:5239: WARNING: VERSION was not set" >&5
5240 echo "$as_me: WARNING: VERSION was not set" >&2;}
5241                 ;;
5242         (x*.*.*)
5243                 ABI_VERSION="$VERSION"
5244                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5245
5246 echo "${as_me:-configure}:5246: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5247
5248                 ;;
5249         (x*:*:*)
5250                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5251                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5252
5253 echo "${as_me:-configure}:5253: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5254
5255                 ;;
5256         (*)
5257                 { echo "$as_me:5257: WARNING: unexpected VERSION value: $VERSION" >&5
5258 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5259                 ;;
5260         esac
5261 fi
5262
5263 LIBTOOL=
5264
5265 # common library maintenance symbols that are convenient for libtool scripts:
5266 LIB_CREATE='${AR} -cr'
5267 LIB_OBJECT='${OBJECTS}'
5268 LIB_SUFFIX=.a
5269 LIB_PREP="$RANLIB"
5270
5271 # symbols used to prop libtool up to enable it to determine what it should be
5272 # doing:
5273 LIB_CLEAN=
5274 LIB_COMPILE=
5275 LIB_LINK='${CC}'
5276 LIB_INSTALL=
5277 LIB_UNINSTALL=
5278
5279 echo "$as_me:5279: checking if you want to build libraries with libtool" >&5
5280 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5281
5282 # Check whether --with-libtool or --without-libtool was given.
5283 if test "${with_libtool+set}" = set; then
5284   withval="$with_libtool"
5285   with_libtool=$withval
5286 else
5287   with_libtool=no
5288 fi;
5289 echo "$as_me:5289: result: $with_libtool" >&5
5290 echo "${ECHO_T}$with_libtool" >&6
5291 if test "$with_libtool" != "no"; then
5292
5293         if test "$with_libtool" != "yes" ; then
5294
5295 if test "x$prefix" != xNONE; then
5296         cf_path_syntax="$prefix"
5297 else
5298         cf_path_syntax="$ac_default_prefix"
5299 fi
5300
5301 case ".$with_libtool" in
5302 (.\$\(*\)*|.\'*\'*)
5303         ;;
5304 (..|./*|.\\*)
5305         ;;
5306 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5307         ;;
5308 (.\$\{*prefix\}*|.\$\{*dir\}*)
5309         eval with_libtool="$with_libtool"
5310         case ".$with_libtool" in
5311         (.NONE/*)
5312                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5313                 ;;
5314         esac
5315         ;;
5316 (.no|.NONE/*)
5317         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5318         ;;
5319 (*)
5320         { { echo "$as_me:5320: error: expected a pathname, not \"$with_libtool\"" >&5
5321 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5322    { (exit 1); exit 1; }; }
5323         ;;
5324 esac
5325
5326                 LIBTOOL=$with_libtool
5327         else
5328                 if test -n "$ac_tool_prefix"; then
5329   for ac_prog in libtool glibtool
5330   do
5331     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5332 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5333 echo "$as_me:5333: checking for $ac_word" >&5
5334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5335 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5336   echo $ECHO_N "(cached) $ECHO_C" >&6
5337 else
5338   if test -n "$LIBTOOL"; then
5339   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5340 else
5341   ac_save_IFS=$IFS; IFS=$ac_path_separator
5342 ac_dummy="$PATH"
5343 for ac_dir in $ac_dummy; do
5344   IFS=$ac_save_IFS
5345   test -z "$ac_dir" && ac_dir=.
5346   $as_executable_p "$ac_dir/$ac_word" || continue
5347 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5348 echo "$as_me:5348: found $ac_dir/$ac_word" >&5
5349 break
5350 done
5351
5352 fi
5353 fi
5354 LIBTOOL=$ac_cv_prog_LIBTOOL
5355 if test -n "$LIBTOOL"; then
5356   echo "$as_me:5356: result: $LIBTOOL" >&5
5357 echo "${ECHO_T}$LIBTOOL" >&6
5358 else
5359   echo "$as_me:5359: result: no" >&5
5360 echo "${ECHO_T}no" >&6
5361 fi
5362
5363     test -n "$LIBTOOL" && break
5364   done
5365 fi
5366 if test -z "$LIBTOOL"; then
5367   ac_ct_LIBTOOL=$LIBTOOL
5368   for ac_prog in libtool glibtool
5369 do
5370   # Extract the first word of "$ac_prog", so it can be a program name with args.
5371 set dummy $ac_prog; ac_word=$2
5372 echo "$as_me:5372: checking for $ac_word" >&5
5373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5374 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5375   echo $ECHO_N "(cached) $ECHO_C" >&6
5376 else
5377   if test -n "$ac_ct_LIBTOOL"; then
5378   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5379 else
5380   ac_save_IFS=$IFS; IFS=$ac_path_separator
5381 ac_dummy="$PATH"
5382 for ac_dir in $ac_dummy; do
5383   IFS=$ac_save_IFS
5384   test -z "$ac_dir" && ac_dir=.
5385   $as_executable_p "$ac_dir/$ac_word" || continue
5386 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5387 echo "$as_me:5387: found $ac_dir/$ac_word" >&5
5388 break
5389 done
5390
5391 fi
5392 fi
5393 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5394 if test -n "$ac_ct_LIBTOOL"; then
5395   echo "$as_me:5395: result: $ac_ct_LIBTOOL" >&5
5396 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5397 else
5398   echo "$as_me:5398: result: no" >&5
5399 echo "${ECHO_T}no" >&6
5400 fi
5401
5402   test -n "$ac_ct_LIBTOOL" && break
5403 done
5404 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5405
5406   LIBTOOL=$ac_ct_LIBTOOL
5407 fi
5408
5409 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5410 then
5411         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.].*//'`
5412 else
5413         cf_cv_libtool_version=
5414 fi
5415 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5416
5417                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5418                 then
5419
5420 unset ac_cv_prog_ac_ct_LIBTOOL
5421 unset ac_ct_LIBTOOL
5422 unset LIBTOOL
5423
5424                         if test -n "$ac_tool_prefix"; then
5425   for ac_prog in glibtool
5426   do
5427     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5428 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5429 echo "$as_me:5429: checking for $ac_word" >&5
5430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5431 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5432   echo $ECHO_N "(cached) $ECHO_C" >&6
5433 else
5434   if test -n "$LIBTOOL"; then
5435   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5436 else
5437   ac_save_IFS=$IFS; IFS=$ac_path_separator
5438 ac_dummy="$PATH"
5439 for ac_dir in $ac_dummy; do
5440   IFS=$ac_save_IFS
5441   test -z "$ac_dir" && ac_dir=.
5442   $as_executable_p "$ac_dir/$ac_word" || continue
5443 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5444 echo "$as_me:5444: found $ac_dir/$ac_word" >&5
5445 break
5446 done
5447
5448 fi
5449 fi
5450 LIBTOOL=$ac_cv_prog_LIBTOOL
5451 if test -n "$LIBTOOL"; then
5452   echo "$as_me:5452: result: $LIBTOOL" >&5
5453 echo "${ECHO_T}$LIBTOOL" >&6
5454 else
5455   echo "$as_me:5455: result: no" >&5
5456 echo "${ECHO_T}no" >&6
5457 fi
5458
5459     test -n "$LIBTOOL" && break
5460   done
5461 fi
5462 if test -z "$LIBTOOL"; then
5463   ac_ct_LIBTOOL=$LIBTOOL
5464   for ac_prog in glibtool
5465 do
5466   # Extract the first word of "$ac_prog", so it can be a program name with args.
5467 set dummy $ac_prog; ac_word=$2
5468 echo "$as_me:5468: checking for $ac_word" >&5
5469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5470 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5471   echo $ECHO_N "(cached) $ECHO_C" >&6
5472 else
5473   if test -n "$ac_ct_LIBTOOL"; then
5474   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5475 else
5476   ac_save_IFS=$IFS; IFS=$ac_path_separator
5477 ac_dummy="$PATH"
5478 for ac_dir in $ac_dummy; do
5479   IFS=$ac_save_IFS
5480   test -z "$ac_dir" && ac_dir=.
5481   $as_executable_p "$ac_dir/$ac_word" || continue
5482 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5483 echo "$as_me:5483: found $ac_dir/$ac_word" >&5
5484 break
5485 done
5486
5487 fi
5488 fi
5489 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5490 if test -n "$ac_ct_LIBTOOL"; then
5491   echo "$as_me:5491: result: $ac_ct_LIBTOOL" >&5
5492 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5493 else
5494   echo "$as_me:5494: result: no" >&5
5495 echo "${ECHO_T}no" >&6
5496 fi
5497
5498   test -n "$ac_ct_LIBTOOL" && break
5499 done
5500 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5501
5502   LIBTOOL=$ac_ct_LIBTOOL
5503 fi
5504
5505 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5506 then
5507         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.].*//'`
5508 else
5509         cf_cv_libtool_version=
5510 fi
5511 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5512
5513                 fi
5514         fi
5515         if test -z "$LIBTOOL" ; then
5516                 { { echo "$as_me:5516: error: Cannot find libtool" >&5
5517 echo "$as_me: error: Cannot find libtool" >&2;}
5518    { (exit 1); exit 1; }; }
5519         fi
5520         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5521         LIB_OBJECT='${OBJECTS:.o=.lo}'
5522         LIB_SUFFIX=.la
5523         LIB_CLEAN='${LIBTOOL} --mode=clean'
5524         LIB_COMPILE='${LIBTOOL} --mode=compile'
5525         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5526         LIB_INSTALL='${LIBTOOL} --mode=install'
5527         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5528         LIB_PREP=:
5529
5530 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5531 then
5532         echo "$as_me:5532: checking version of $LIBTOOL" >&5
5533 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5534
5535 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5536 then
5537         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.].*//'`
5538 else
5539         cf_cv_libtool_version=
5540 fi
5541 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5542
5543         echo "$as_me:5543: result: $cf_cv_libtool_version" >&5
5544 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5545         if test -z "$cf_cv_libtool_version" ; then
5546                 { { echo "$as_me:5546: error: This is not GNU libtool" >&5
5547 echo "$as_me: error: This is not GNU libtool" >&2;}
5548    { (exit 1); exit 1; }; }
5549         fi
5550 else
5551         { { echo "$as_me:5551: error: GNU libtool has not been found" >&5
5552 echo "$as_me: error: GNU libtool has not been found" >&2;}
5553    { (exit 1); exit 1; }; }
5554 fi
5555
5556         # special hack to add -no-undefined (which libtool should do for itself)
5557         LT_UNDEF=
5558         case "$cf_cv_system_name" in
5559         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5560                 LT_UNDEF=-no-undefined
5561                 ;;
5562         esac
5563
5564         # special hack to add --tag option for C++ compiler
5565         case "$cf_cv_libtool_version" in
5566         (1.[5-9]*|[2-9].[0-9.a-z]*)
5567                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5568                 LIBTOOL="$LIBTOOL --tag=CC"
5569                 ;;
5570         (*)
5571                 LIBTOOL_CXX="$LIBTOOL"
5572                 ;;
5573         esac
5574 else
5575         LIBTOOL=""
5576         LIBTOOL_CXX=""
5577 fi
5578
5579 test -z "$LIBTOOL" && ECHO_LT=
5580
5581 if test "$with_libtool" != "no" ; then
5582
5583 cf_list_models="$cf_list_models libtool"
5584
5585 else
5586
5587 echo "$as_me:5587: checking if you want to build shared libraries" >&5
5588 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5589
5590 # Check whether --with-shared or --without-shared was given.
5591 if test "${with_shared+set}" = set; then
5592   withval="$with_shared"
5593   with_shared=$withval
5594 else
5595   with_shared=no
5596 fi;
5597 echo "$as_me:5597: result: $with_shared" >&5
5598 echo "${ECHO_T}$with_shared" >&6
5599 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5600
5601 echo "$as_me:5601: checking if you want to build static libraries" >&5
5602 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5603
5604 # Check whether --with-normal or --without-normal was given.
5605 if test "${with_normal+set}" = set; then
5606   withval="$with_normal"
5607   with_normal=$withval
5608 else
5609   with_normal=yes
5610 fi;
5611 echo "$as_me:5611: result: $with_normal" >&5
5612 echo "${ECHO_T}$with_normal" >&6
5613 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5614
5615 echo "$as_me:5615: checking if you want to build debug libraries" >&5
5616 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5617
5618 # Check whether --with-debug or --without-debug was given.
5619 if test "${with_debug+set}" = set; then
5620   withval="$with_debug"
5621   with_debug=$withval
5622 else
5623   with_debug=yes
5624 fi;
5625 echo "$as_me:5625: result: $with_debug" >&5
5626 echo "${ECHO_T}$with_debug" >&6
5627 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5628
5629 echo "$as_me:5629: checking if you want to build profiling libraries" >&5
5630 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5631
5632 # Check whether --with-profile or --without-profile was given.
5633 if test "${with_profile+set}" = set; then
5634   withval="$with_profile"
5635   with_profile=$withval
5636 else
5637   with_profile=no
5638 fi;
5639 echo "$as_me:5639: result: $with_profile" >&5
5640 echo "${ECHO_T}$with_profile" >&6
5641 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5642
5643 fi
5644
5645 if test "X$cf_with_cxx_binding" != Xno; then
5646 if test "x$with_shared" = "xyes"; then
5647 echo "$as_me:5647: checking if you want to build C++ shared libraries" >&5
5648 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5649
5650 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5651 if test "${with_cxx_shared+set}" = set; then
5652   withval="$with_cxx_shared"
5653   with_shared_cxx=$withval
5654 else
5655   with_shared_cxx=no
5656 fi;
5657 echo "$as_me:5657: result: $with_shared_cxx" >&5
5658 echo "${ECHO_T}$with_shared_cxx" >&6
5659 fi
5660 fi
5661
5662 ###############################################################################
5663
5664 echo "$as_me:5664: checking for specified models" >&5
5665 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5666 test -z "$cf_list_models" && cf_list_models=normal
5667 test "$with_libtool" != "no" && cf_list_models=libtool
5668 echo "$as_me:5668: result: $cf_list_models" >&5
5669 echo "${ECHO_T}$cf_list_models" >&6
5670
5671 ### Use the first model as the default, and save its suffix for use in building
5672 ### up test-applications.
5673 echo "$as_me:5673: checking for default model" >&5
5674 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5675 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5676 echo "$as_me:5676: result: $DFT_LWR_MODEL" >&5
5677 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5678
5679 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5680
5681 TICS_NAME=tic
5682
5683 TINFO_NAME=tinfo
5684
5685 LIB_NAME=ncurses
5686
5687 LIB_DIR=../lib
5688 LIB_2ND=../../lib
5689
5690 echo "$as_me:5690: checking if you want to have a library-prefix" >&5
5691 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5692
5693 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5694 if test "${with_lib_prefix+set}" = set; then
5695   withval="$with_lib_prefix"
5696   with_lib_prefix=$withval
5697 else
5698   with_lib_prefix=auto
5699 fi;
5700 echo "$as_me:5700: result: $with_lib_prefix" >&5
5701 echo "${ECHO_T}$with_lib_prefix" >&6
5702
5703 if test "$with_lib_prefix" = auto
5704 then
5705
5706         case "$cf_cv_system_name" in
5707         (OS/2*|os2*)
5708                 if test "$DFT_LWR_MODEL" = libtool; then
5709                         LIB_PREFIX='lib'
5710                 else
5711                         LIB_PREFIX=''
5712                 fi
5713                 ;;
5714         (*-msvc*)
5715                 LIB_PREFIX=''
5716                 ;;
5717         (*)     LIB_PREFIX='lib'
5718                 ;;
5719         esac
5720 cf_prefix=$LIB_PREFIX
5721
5722 elif test "$with_lib_prefix" = no
5723 then
5724         LIB_PREFIX=
5725 else
5726         LIB_PREFIX=$with_lib_prefix
5727 fi
5728
5729 LIB_SUFFIX=
5730
5731         echo "$as_me:5731: checking for PATH separator" >&5
5732 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5733         case "$cf_cv_system_name" in
5734         (os2*)  PATH_SEPARATOR=';'  ;;
5735         (*)     ${PATH_SEPARATOR:=':'}  ;;
5736         esac
5737
5738         echo "$as_me:5738: result: $PATH_SEPARATOR" >&5
5739 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5740
5741 ###############################################################################
5742
5743 echo "$as_me:5743: checking if you want to build a separate terminfo library" >&5
5744 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5745
5746 # Check whether --with-termlib or --without-termlib was given.
5747 if test "${with_termlib+set}" = set; then
5748   withval="$with_termlib"
5749   with_termlib=$withval
5750 else
5751   with_termlib=no
5752 fi;
5753 echo "$as_me:5753: result: $with_termlib" >&5
5754 echo "${ECHO_T}$with_termlib" >&6
5755
5756 echo "$as_me:5756: checking if you want to build a separate tic library" >&5
5757 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5758
5759 # Check whether --with-ticlib or --without-ticlib was given.
5760 if test "${with_ticlib+set}" = set; then
5761   withval="$with_ticlib"
5762   with_ticlib=$withval
5763 else
5764   with_ticlib=no
5765 fi;
5766 echo "$as_me:5766: result: $with_ticlib" >&5
5767 echo "${ECHO_T}$with_ticlib" >&6
5768
5769 if test X"$CC_G_OPT" = X"" ; then
5770         CC_G_OPT='-g'
5771         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5772 fi
5773
5774 if test X"$CXX_G_OPT" = X"" ; then
5775         CXX_G_OPT='-g'
5776         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5777 fi
5778
5779 echo "$as_me:5779: checking for default loader flags" >&5
5780 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5781 case "$DFT_LWR_MODEL" in
5782 (libtool) LD_MODEL=''   ;;
5783 (normal)  LD_MODEL=''   ;;
5784 (debug)   LD_MODEL=$CC_G_OPT ;;
5785 (profile) LD_MODEL='-pg';;
5786 (shared)  LD_MODEL=''   ;;
5787 esac
5788 echo "$as_me:5788: result: $LD_MODEL" >&5
5789 echo "${ECHO_T}$LD_MODEL" >&6
5790
5791 case "$DFT_LWR_MODEL" in
5792 (shared)
5793
5794 echo "$as_me:5794: checking if rpath option should be used" >&5
5795 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5796
5797 # Check whether --enable-rpath or --disable-rpath was given.
5798 if test "${enable_rpath+set}" = set; then
5799   enableval="$enable_rpath"
5800   cf_cv_enable_rpath=$enableval
5801 else
5802   cf_cv_enable_rpath=no
5803 fi;
5804 echo "$as_me:5804: result: $cf_cv_enable_rpath" >&5
5805 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5806
5807 echo "$as_me:5807: checking if shared libraries should be relinked during install" >&5
5808 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5809
5810 # Check whether --enable-relink or --disable-relink was given.
5811 if test "${enable_relink+set}" = set; then
5812   enableval="$enable_relink"
5813   cf_cv_do_relink=$enableval
5814 else
5815   cf_cv_do_relink=yes
5816 fi;
5817 echo "$as_me:5817: result: $cf_cv_do_relink" >&5
5818 echo "${ECHO_T}$cf_cv_do_relink" >&6
5819         ;;
5820 esac
5821
5822 # we will build libraries one-level down.
5823 rel_builddir=..
5824
5825 LD_RPATH_OPT=
5826 if test "x$cf_cv_enable_rpath" != xno
5827 then
5828         echo "$as_me:5828: checking for an rpath option" >&5
5829 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5830         case "$cf_cv_system_name" in
5831         (irix*)
5832                 if test "$GCC" = yes; then
5833                         LD_RPATH_OPT="-Wl,-rpath,"
5834                 else
5835                         LD_RPATH_OPT="-rpath "
5836                 fi
5837                 ;;
5838         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5839                 LD_RPATH_OPT="-Wl,-rpath,"
5840                 ;;
5841         (openbsd[2-9].*|mirbsd*)
5842                 LD_RPATH_OPT="-Wl,-rpath,"
5843                 ;;
5844         (dragonfly*)
5845                 LD_RPATH_OPT="-rpath "
5846                 ;;
5847         (netbsd*)
5848                 LD_RPATH_OPT="-Wl,-rpath,"
5849                 ;;
5850         (osf*|mls+*)
5851                 LD_RPATH_OPT="-rpath "
5852                 ;;
5853         (solaris2*)
5854                 LD_RPATH_OPT="-R"
5855                 ;;
5856         (*)
5857                 ;;
5858         esac
5859         echo "$as_me:5859: result: $LD_RPATH_OPT" >&5
5860 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5861
5862         case "x$LD_RPATH_OPT" in
5863         (x-R*)
5864                 echo "$as_me:5864: checking if we need a space after rpath option" >&5
5865 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5866                 cf_save_LIBS="$LIBS"
5867
5868 cf_add_libs="$LIBS"
5869 # reverse order
5870 cf_add_0lib=
5871 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5872 # filter duplicates
5873 for cf_add_1lib in $cf_add_0lib; do
5874         for cf_add_2lib in $cf_add_libs; do
5875                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5876                         cf_add_1lib=
5877                         break
5878                 fi
5879         done
5880         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5881 done
5882 LIBS="$cf_add_libs"
5883
5884                 cat >"conftest.$ac_ext" <<_ACEOF
5885 #line 5885 "configure"
5886 #include "confdefs.h"
5887
5888 int
5889 main (void)
5890 {
5891
5892   ;
5893   return 0;
5894 }
5895 _ACEOF
5896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5897 if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
5898   (eval $ac_link) 2>&5
5899   ac_status=$?
5900   echo "$as_me:5900: \$? = $ac_status" >&5
5901   (exit "$ac_status"); } &&
5902          { ac_try='test -s "conftest$ac_exeext"'
5903   { (eval echo "$as_me:5903: \"$ac_try\"") >&5
5904   (eval $ac_try) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit "$ac_status"); }; }; then
5908   cf_rpath_space=no
5909 else
5910   echo "$as_me: failed program was:" >&5
5911 cat "conftest.$ac_ext" >&5
5912 cf_rpath_space=yes
5913 fi
5914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5915                 LIBS="$cf_save_LIBS"
5916                 echo "$as_me:5916: result: $cf_rpath_space" >&5
5917 echo "${ECHO_T}$cf_rpath_space" >&6
5918                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5919                 ;;
5920         esac
5921 fi
5922
5923         RM_SHARED_OPTS=
5924         LOCAL_LDFLAGS=
5925         LOCAL_LDFLAGS2=
5926         LD_SHARED_OPTS=
5927         INSTALL_LIB="-m 644"
5928         : ${rel_builddir:=.}
5929
5930         shlibdir=$libdir
5931
5932         MAKE_DLLS="#"
5933
5934         cf_cv_do_symlinks=no
5935         cf_ld_rpath_opt=
5936         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5937
5938         echo "$as_me:5938: checking if release/abi version should be used for shared libs" >&5
5939 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5940
5941 # Check whether --with-shlib-version or --without-shlib-version was given.
5942 if test "${with_shlib_version+set}" = set; then
5943   withval="$with_shlib_version"
5944   test -z "$withval" && withval=auto
5945         case "$withval" in
5946         (yes)
5947                 cf_cv_shlib_version=auto
5948                 ;;
5949         (rel|abi|auto)
5950                 cf_cv_shlib_version=$withval
5951                 ;;
5952         (*)
5953                 echo "$as_me:5953: result: $withval" >&5
5954 echo "${ECHO_T}$withval" >&6
5955                 { { echo "$as_me:5955: error: option value must be one of: rel, abi, or auto" >&5
5956 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5957    { (exit 1); exit 1; }; }
5958                 ;;
5959         esac
5960
5961 else
5962   cf_cv_shlib_version=auto
5963 fi;
5964         echo "$as_me:5964: result: $cf_cv_shlib_version" >&5
5965 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5966
5967         cf_cv_rm_so_locs=no
5968         cf_try_cflags=
5969
5970         # Some less-capable ports of gcc support only -fpic
5971         CC_SHARED_OPTS=
5972
5973         cf_try_fPIC=no
5974         if test "$GCC" = yes
5975         then
5976                 cf_try_fPIC=yes
5977         else
5978                 case "$cf_cv_system_name" in
5979                 (*linux*)       # e.g., PGI compiler
5980                         cf_try_fPIC=yes
5981                         ;;
5982                 esac
5983         fi
5984
5985         if test "$cf_try_fPIC" = yes
5986         then
5987                 echo "$as_me:5987: checking which $CC option to use" >&5
5988 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5989                 cf_save_CFLAGS="$CFLAGS"
5990                 for CC_SHARED_OPTS in -fPIC -fpic ''
5991                 do
5992                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5993                         cat >"conftest.$ac_ext" <<_ACEOF
5994 #line 5994 "configure"
5995 #include "confdefs.h"
5996 #include <stdio.h>
5997 int
5998 main (void)
5999 {
6000 int x = 1
6001   ;
6002   return 0;
6003 }
6004 _ACEOF
6005 rm -f "conftest.$ac_objext"
6006 if { (eval echo "$as_me:6006: \"$ac_compile\"") >&5
6007   (eval $ac_compile) 2>&5
6008   ac_status=$?
6009   echo "$as_me:6009: \$? = $ac_status" >&5
6010   (exit "$ac_status"); } &&
6011          { ac_try='test -s "conftest.$ac_objext"'
6012   { (eval echo "$as_me:6012: \"$ac_try\"") >&5
6013   (eval $ac_try) 2>&5
6014   ac_status=$?
6015   echo "$as_me:6015: \$? = $ac_status" >&5
6016   (exit "$ac_status"); }; }; then
6017   break
6018 else
6019   echo "$as_me: failed program was:" >&5
6020 cat "conftest.$ac_ext" >&5
6021 fi
6022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6023                 done
6024                 echo "$as_me:6024: result: $CC_SHARED_OPTS" >&5
6025 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6026                 CFLAGS="$cf_save_CFLAGS"
6027         fi
6028
6029         cf_cv_shlib_version_infix=no
6030
6031         case "$cf_cv_system_name" in
6032         (aix4.3-9*|aix[5-7]*)
6033                 if test "$GCC" = yes; then
6034                         CC_SHARED_OPTS='-Wl,-brtl'
6035                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6036                 else
6037                         CC_SHARED_OPTS='-brtl'
6038                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6039                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6040                 fi
6041                 ;;
6042         (beos*)
6043                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6044                 ;;
6045         (cygwin*)
6046                 CC_SHARED_OPTS=
6047                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6048                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6049                 cf_cv_shlib_version=cygdll
6050                 cf_cv_shlib_version_infix=cygdll
6051                 shlibdir=$bindir
6052                 MAKE_DLLS=
6053                 cat >mk_shared_lib.sh <<-CF_EOF
6054                 #!$SHELL
6055                 SHARED_LIB=\$1
6056                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6057                 shift
6058                 cat <<-EOF
6059                 Linking shared library
6060                 ** SHARED_LIB \$SHARED_LIB
6061                 ** IMPORT_LIB \$IMPORT_LIB
6062 EOF
6063                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6064 CF_EOF
6065                 chmod +x mk_shared_lib.sh
6066                 ;;
6067         (msys*)
6068                 CC_SHARED_OPTS=
6069                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6070                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6071                 cf_cv_shlib_version=msysdll
6072                 cf_cv_shlib_version_infix=msysdll
6073                 shlibdir=$bindir
6074                 MAKE_DLLS=
6075                 cat >mk_shared_lib.sh <<-CF_EOF
6076                 #!$SHELL
6077                 SHARED_LIB=\$1
6078                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6079                 shift
6080                 cat <<-EOF
6081                 Linking shared library
6082                 ** SHARED_LIB \$SHARED_LIB
6083                 ** IMPORT_LIB \$IMPORT_LIB
6084 EOF
6085                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6086 CF_EOF
6087                 chmod +x mk_shared_lib.sh
6088                 ;;
6089         (darwin*)
6090                 cf_try_cflags="no-cpp-precomp"
6091                 CC_SHARED_OPTS="-dynamic"
6092                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6093                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6094                 cf_cv_shlib_version_infix=yes
6095                 echo "$as_me:6095: checking if ld -search_paths_first works" >&5
6096 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6097 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100
6101                         cf_save_LDFLAGS=$LDFLAGS
6102                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6103                         cat >"conftest.$ac_ext" <<_ACEOF
6104 #line 6104 "configure"
6105 #include "confdefs.h"
6106
6107 int
6108 main (void)
6109 {
6110 int i;
6111   ;
6112   return 0;
6113 }
6114 _ACEOF
6115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6116 if { (eval echo "$as_me:6116: \"$ac_link\"") >&5
6117   (eval $ac_link) 2>&5
6118   ac_status=$?
6119   echo "$as_me:6119: \$? = $ac_status" >&5
6120   (exit "$ac_status"); } &&
6121          { ac_try='test -s "conftest$ac_exeext"'
6122   { (eval echo "$as_me:6122: \"$ac_try\"") >&5
6123   (eval $ac_try) 2>&5
6124   ac_status=$?
6125   echo "$as_me:6125: \$? = $ac_status" >&5
6126   (exit "$ac_status"); }; }; then
6127   cf_cv_ldflags_search_paths_first=yes
6128 else
6129   echo "$as_me: failed program was:" >&5
6130 cat "conftest.$ac_ext" >&5
6131 cf_cv_ldflags_search_paths_first=no
6132 fi
6133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6134                                 LDFLAGS=$cf_save_LDFLAGS
6135 fi
6136 echo "$as_me:6136: result: $cf_cv_ldflags_search_paths_first" >&5
6137 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6138                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6139                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6140                 fi
6141                 ;;
6142         (hpux[7-8]*)
6143                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6144                 if test "$GCC" != yes; then
6145                         CC_SHARED_OPTS='+Z'
6146                 fi
6147                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6148                 INSTALL_LIB="-m 555"
6149                 ;;
6150         (hpux*)
6151                 # (tested with gcc 2.7.2 -- I don't have c89)
6152                 if test "$GCC" = yes; then
6153                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6154                 else
6155                         CC_SHARED_OPTS='+Z'
6156                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6157                 fi
6158                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6159                 # HP-UX shared libraries must be executable, and should be
6160                 # readonly to exploit a quirk in the memory manager.
6161                 INSTALL_LIB="-m 555"
6162                 ;;
6163         (interix*)
6164                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6165                 if test "$cf_cv_shlib_version" = rel; then
6166                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6167                 else
6168                         cf_shared_soname='`basename $@`'
6169                 fi
6170                 CC_SHARED_OPTS=
6171                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6172                 ;;
6173         (irix*)
6174                 if test "$cf_cv_enable_rpath" = yes ; then
6175                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6176                 fi
6177                 # tested with IRIX 5.2 and 'cc'.
6178                 if test "$GCC" != yes; then
6179                         CC_SHARED_OPTS='-KPIC'
6180                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6181                 else
6182                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6183                 fi
6184                 cf_cv_rm_so_locs=yes
6185                 ;;
6186         (linux*|gnu*|k*bsd*-gnu)
6187                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6188                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6189                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6190                 fi
6191                 if test "$cf_cv_enable_rpath" = yes ; then
6192                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6193                 fi
6194
6195         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6196         if test "$cf_cv_shlib_version" = rel; then
6197                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6198         else
6199                 cf_cv_shared_soname='`basename $@`'
6200         fi
6201
6202                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6203                 ;;
6204         (mingw*msvc*)
6205                 cf_cv_shlib_version=msvcdll
6206                 cf_cv_shlib_version_infix=msvcdll
6207                 shlibdir=$bindir
6208                 MAKE_DLLS=
6209                 if test "$DFT_LWR_MODEL" = "shared" ; then
6210                         LOCAL_LDFLAGS="-link -dll"
6211                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6212                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6213                 fi
6214                 CC_SHARED_OPTS=
6215                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6216                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6217                 cat >mk_shared_lib.sh <<-CF_EOF
6218                 #!$SHELL
6219                 SHARED_LIB=\$1
6220                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6221                 shift
6222                 my_ld=\$1
6223                 shift
6224                 cat <<-EOF
6225                 Linking shared library
6226                 ** SHARED LIB \$SHARED_LIB
6227                 ** IMPORT_LIB \$IMPORT_LIB
6228 EOF
6229                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6230                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6231                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6232 CF_EOF
6233                 chmod +x mk_shared_lib.sh
6234                 cat >mk_prog.sh <<-CF_EOF
6235                 #!$SHELL
6236                 shift
6237                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6238                 LD="$LD"
6239                 clopts=()
6240                 ldopts=("/subsystem:console")
6241                 libs=()
6242                 isdll=0
6243                 while test \$# -gt 0; do
6244                         case "\$1" in
6245                                 -link)
6246                                         # ignore -link argument
6247                                         ;;
6248                                 -M[TD] | -M[TD]d)
6249                                         # ignore runtime-library option
6250                                         ;;
6251                                 -dll)
6252                                         isdll=1
6253                                         ;;
6254                                 -W* | -w*)
6255                                         # ignore warnings
6256                                         ;;
6257                                 -D*)
6258                                         clopts+=("\$1")
6259                                         ;;
6260                                 -I*)
6261                                         clopts+=("\$1")
6262                                         ;;
6263                                 -l*)
6264                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6265                                         ;;
6266                                 -L*)
6267                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6268                                         ;;
6269                                 *.obj | *.o)
6270                                         ldopts+=("\$1")
6271                                         ;;
6272                                 -Wl,*)
6273                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6274                                                 ldopts+=("\${linkarg}")
6275                                         done
6276                                         ;;
6277                                 *.lib)
6278                                         ldopts+=("\$1")
6279                                         ;;
6280                                 -o)
6281                                         shift
6282                                         ldopts+=("-out:\$1")
6283                                         ;;
6284                                 *)
6285                                         clopts+=("\$1")
6286                                         ldopts+=("\$1")
6287                                         ;;
6288                         esac
6289                         shift
6290                 done
6291                 if [ "\$isdll" -ne 0 ]; then
6292                         for lib in \${libs[*]}; do
6293                                 ldopts+=("\$lib.dll.lib")
6294                         done
6295                 else
6296                         for lib in \${libs[*]}; do
6297                                 ldopts+=("\$lib.lib")
6298                         done
6299                 fi
6300                 cat <<-EOF
6301                 Creating program
6302                 ** ld options:   "\${ldopts[@]}"
6303 EOF
6304                 exec \$LD \${ldopts[@]}
6305 CF_EOF
6306                 chmod +x mk_prog.sh
6307                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6308                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6309                 ;;
6310         (mingw*)
6311                 cf_cv_shlib_version=mingw
6312                 cf_cv_shlib_version_infix=mingw
6313                 shlibdir=$bindir
6314                 MAKE_DLLS=
6315                 if test "$DFT_LWR_MODEL" = "shared" ; then
6316                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6317                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6318                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6319                 fi
6320                 CC_SHARED_OPTS=
6321                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6322                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6323                 cat >mk_shared_lib.sh <<-CF_EOF
6324                 #!$SHELL
6325                 SHARED_LIB=\$1
6326                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6327                 shift
6328                 cat <<-EOF
6329                 Linking shared library
6330                 ** SHARED_LIB \$SHARED_LIB
6331                 ** IMPORT_LIB \$IMPORT_LIB
6332 EOF
6333                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6334 CF_EOF
6335                 chmod +x mk_shared_lib.sh
6336                 ;;
6337         (openbsd[2-9].*|mirbsd*)
6338                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6339                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6340                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6341                 fi
6342                 if test "$cf_cv_enable_rpath" = yes ; then
6343                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6344                 fi
6345                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6346
6347         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6348         if test "$cf_cv_shlib_version" = rel; then
6349                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6350         else
6351                 cf_cv_shared_soname='`basename $@`'
6352         fi
6353
6354                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6355                 ;;
6356         (nskJ*)
6357                 CC_SHARED_OPTS=
6358                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6359                 ;;
6360         (nskL*)
6361                 CC_SHARED_OPTS=
6362                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6363                 ;;
6364         (nto-qnx*|openbsd*|freebsd[12].*)
6365                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6366                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6367                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6368                 ;;
6369         (dragonfly*|freebsd*)
6370                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6371                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6372                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6373                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6374                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6375                 fi
6376
6377         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6378         if test "$cf_cv_shlib_version" = rel; then
6379                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6380         else
6381                 cf_cv_shared_soname='`basename $@`'
6382         fi
6383
6384                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6385                 ;;
6386         (netbsd*)
6387                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6388                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6389                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6390                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6391                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6392                         if test "$cf_cv_shlib_version" = auto; then
6393                         if test -f /usr/libexec/ld.elf_so; then
6394                                 cf_cv_shlib_version=abi
6395                         else
6396                                 cf_cv_shlib_version=rel
6397                         fi
6398                         fi
6399
6400         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6401         if test "$cf_cv_shlib_version" = rel; then
6402                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6403         else
6404                 cf_cv_shared_soname='`basename $@`'
6405         fi
6406
6407                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6408                 else
6409                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6410                 fi
6411                 ;;
6412         (osf*|mls+*)
6413                 # tested with OSF/1 V3.2 and 'cc'
6414                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6415                 # link with shared libs).
6416                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6417                 case "$host_os" in
6418                 (osf4*)
6419                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6420                         ;;
6421                 esac
6422                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6423                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6424                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6425                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6426                 fi
6427                 cf_cv_rm_so_locs=yes
6428                 ;;
6429         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6430                 # tested with osr5.0.5
6431                 if test "$GCC" != yes; then
6432                         CC_SHARED_OPTS='-belf -KPIC'
6433                 fi
6434                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6435                 if test "$cf_cv_enable_rpath" = yes ; then
6436                         # only way is to set LD_RUN_PATH but no switch for it
6437                         RUN_PATH=$libdir
6438                 fi
6439                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6440                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6441                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6442                 ;;
6443         (sunos4*)
6444                 # tested with SunOS 4.1.1 and gcc 2.7.0
6445                 if test "$GCC" != yes; then
6446                         CC_SHARED_OPTS='-KPIC'
6447                 fi
6448                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6449                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6450                 ;;
6451         (solaris2*)
6452                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6453                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6454                 if test "$DFT_LWR_MODEL" = "shared" ; then
6455                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6456                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6457                 fi
6458                 if test "$cf_cv_enable_rpath" = yes ; then
6459                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6460                 fi
6461
6462         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6463         if test "$cf_cv_shlib_version" = rel; then
6464                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6465         else
6466                 cf_cv_shared_soname='`basename $@`'
6467         fi
6468
6469                 if test "$GCC" != yes; then
6470                         cf_save_CFLAGS="$CFLAGS"
6471                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6472                         do
6473                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6474                                 cat >"conftest.$ac_ext" <<_ACEOF
6475 #line 6475 "configure"
6476 #include "confdefs.h"
6477 #include <stdio.h>
6478 int
6479 main (void)
6480 {
6481 printf("Hello\\n");
6482   ;
6483   return 0;
6484 }
6485 _ACEOF
6486 rm -f "conftest.$ac_objext"
6487 if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5
6488   (eval $ac_compile) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit "$ac_status"); } &&
6492          { ac_try='test -s "conftest.$ac_objext"'
6493   { (eval echo "$as_me:6493: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:6496: \$? = $ac_status" >&5
6497   (exit "$ac_status"); }; }; then
6498   break
6499 else
6500   echo "$as_me: failed program was:" >&5
6501 cat "conftest.$ac_ext" >&5
6502 fi
6503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6504                         done
6505                         CFLAGS="$cf_save_CFLAGS"
6506                         CC_SHARED_OPTS=$cf_shared_opts
6507                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6508                 else
6509                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6510                 fi
6511                 ;;
6512         (sysv5uw7*|unix_sv*)
6513                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6514                 if test "$GCC" != yes; then
6515                         CC_SHARED_OPTS='-KPIC'
6516                 fi
6517                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6518                 ;;
6519         (*)
6520                 CC_SHARED_OPTS='unknown'
6521                 MK_SHARED_LIB='echo unknown'
6522                 ;;
6523         esac
6524
6525         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6526         case "$cf_cv_shlib_version" in
6527         (rel|abi)
6528                 case "$MK_SHARED_LIB" in
6529                 (*'-o $@')
6530                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6531                         ;;
6532                 (*)
6533                         { echo "$as_me:6533: WARNING: ignored --with-shlib-version" >&5
6534 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6535                         ;;
6536                 esac
6537                 ;;
6538         esac
6539
6540         if test -n "$cf_try_cflags"
6541         then
6542 cat > conftest.$ac_ext <<EOF
6543 #line 6543 "${as_me:-configure}"
6544 #include <stdio.h>
6545 int main(int argc, char *argv[])
6546 {
6547         printf("hello\\n");
6548         return (argv[argc-1] == 0) ;
6549 }
6550 EOF
6551                 cf_save_CFLAGS="$CFLAGS"
6552                 for cf_opt in $cf_try_cflags
6553                 do
6554                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6555                         echo "$as_me:6555: checking if CFLAGS option -$cf_opt works" >&5
6556 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6557                         if { (eval echo "$as_me:6557: \"$ac_compile\"") >&5
6558   (eval $ac_compile) 2>&5
6559   ac_status=$?
6560   echo "$as_me:6560: \$? = $ac_status" >&5
6561   (exit "$ac_status"); }; then
6562                                 echo "$as_me:6562: result: yes" >&5
6563 echo "${ECHO_T}yes" >&6
6564                                 cf_save_CFLAGS="$CFLAGS"
6565                         else
6566                                 echo "$as_me:6566: result: no" >&5
6567 echo "${ECHO_T}no" >&6
6568                         fi
6569                 done
6570                 CFLAGS="$cf_save_CFLAGS"
6571         fi
6572
6573         # RPATH_LIST is a colon-separated list of directories
6574         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6575         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6576
6577         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6578
6579         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6580
6581 echo "${as_me:-configure}:6581: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6582
6583         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6584
6585 echo "${as_me:-configure}:6585: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6586
6587 for model in $cf_list_models ; do
6588         case "$model" in
6589         (libtool)
6590
6591 echo "$as_me:6591: checking for additional libtool options" >&5
6592 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6593
6594 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6595 if test "${with_libtool_opts+set}" = set; then
6596   withval="$with_libtool_opts"
6597   with_libtool_opts=$withval
6598 else
6599   with_libtool_opts=no
6600 fi;
6601 echo "$as_me:6601: result: $with_libtool_opts" >&5
6602 echo "${ECHO_T}$with_libtool_opts" >&6
6603
6604 case .$with_libtool_opts in
6605 (.yes|.no|.)
6606         ;;
6607 (*)
6608         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6609         ;;
6610 esac
6611
6612 echo "$as_me:6612: checking if exported-symbols file should be used" >&5
6613 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6614
6615 # Check whether --with-export-syms or --without-export-syms was given.
6616 if test "${with_export_syms+set}" = set; then
6617   withval="$with_export_syms"
6618   with_export_syms=$withval
6619 else
6620   with_export_syms=no
6621 fi;
6622 if test "x$with_export_syms" = xyes
6623 then
6624         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6625
6626 fi
6627 echo "$as_me:6627: result: $with_export_syms" >&5
6628 echo "${ECHO_T}$with_export_syms" >&6
6629 if test "x$with_export_syms" != xno
6630 then
6631         EXPORT_SYMS="-export-symbols $with_export_syms"
6632
6633 fi
6634
6635                 ;;
6636         (shared)
6637                 if test "$CC_SHARED_OPTS" = "unknown"; then
6638                         { { echo "$as_me:6638: error: Shared libraries are not supported in this version" >&5
6639 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6640    { (exit 1); exit 1; }; }
6641                 fi
6642                 # workaround for inept transition to PIE vs PIC...
6643                 echo "$as_me:6643: checking if current CFLAGS link properly" >&5
6644 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6645                 cat >"conftest.$ac_ext" <<_ACEOF
6646 #line 6646 "configure"
6647 #include "confdefs.h"
6648 #include <stdio.h>
6649 int
6650 main (void)
6651 {
6652 printf("Hello work\\n");
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6658 if { (eval echo "$as_me:6658: \"$ac_link\"") >&5
6659   (eval $ac_link) 2>&5
6660   ac_status=$?
6661   echo "$as_me:6661: \$? = $ac_status" >&5
6662   (exit "$ac_status"); } &&
6663          { ac_try='test -s "conftest$ac_exeext"'
6664   { (eval echo "$as_me:6664: \"$ac_try\"") >&5
6665   (eval $ac_try) 2>&5
6666   ac_status=$?
6667   echo "$as_me:6667: \$? = $ac_status" >&5
6668   (exit "$ac_status"); }; }; then
6669   cf_cflags_work=yes
6670 else
6671   echo "$as_me: failed program was:" >&5
6672 cat "conftest.$ac_ext" >&5
6673 cf_cflags_work=no
6674 fi
6675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6676                 echo "$as_me:6676: result: $cf_cflags_work" >&5
6677 echo "${ECHO_T}$cf_cflags_work" >&6
6678                 if test "$cf_cflags_work" = no
6679                 then
6680                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6681
6682 echo "${as_me:-configure}:6682: testing try to work around by appending shared-options ..." 1>&5
6683
6684                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6685                 fi
6686
6687 echo "$as_me:6687: checking if versioned-symbols file should be used" >&5
6688 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6689
6690 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6691 if test "${with_versioned_syms+set}" = set; then
6692   withval="$with_versioned_syms"
6693   with_versioned_syms=$withval
6694 else
6695   with_versioned_syms=no
6696 fi;
6697 case "x$with_versioned_syms" in
6698 (xyes)
6699         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6700
6701         ;;
6702 (xno)
6703         ;;
6704 (x/*)
6705         test -f "$with_versioned_syms" || { { echo "$as_me:6705: error: expected a filename: $with_versioned_syms" >&5
6706 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6707    { (exit 1); exit 1; }; }
6708         ;;
6709 (*)
6710         test -f "$with_versioned_syms" || { { echo "$as_me:6710: error: expected a filename: $with_versioned_syms" >&5
6711 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6712    { (exit 1); exit 1; }; }
6713         with_versioned_syms=`pwd`/"$with_versioned_syms"
6714         ;;
6715 esac
6716 echo "$as_me:6716: result: $with_versioned_syms" >&5
6717 echo "${ECHO_T}$with_versioned_syms" >&6
6718
6719 RESULTING_SYMS=
6720 VERSIONED_SYMS=
6721 WILDCARD_SYMS=
6722
6723 if test "x$with_versioned_syms" != xno
6724 then
6725         RESULTING_SYMS=$with_versioned_syms
6726         case "x$MK_SHARED_LIB" in
6727         (*-Wl,*)
6728                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6729                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6730                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6731
6732 echo "${as_me:-configure}:6732: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6733
6734                 ;;
6735         (*-dy\ *)
6736                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6737                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6738                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6739
6740 echo "${as_me:-configure}:6740: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6741
6742                 ;;
6743         (*)
6744                 { echo "$as_me:6744: WARNING: this system does not support versioned-symbols" >&5
6745 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6746                 ;;
6747         esac
6748
6749         # Linux ld can selectively override scope, e.g., of symbols beginning with
6750         # "_" by first declaring some as global, and then using a wildcard to
6751         # declare the others as local.  Some other loaders cannot do this.  Check
6752         # by constructing a (very) simple shared library and inspecting its
6753         # symbols.
6754         if test "x$VERSIONED_SYMS" != "x"
6755         then
6756                 echo "$as_me:6756: checking if wildcards can be used to selectively omit symbols" >&5
6757 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6758                 WILDCARD_SYMS=no
6759
6760                 # make sources
6761                 rm -f conftest.*
6762
6763                 cat >conftest.ver <<EOF
6764 module_1.0 {
6765 global:
6766         globalf1;
6767 local:
6768         localf1;
6769 };
6770 module_2.0 {
6771 global:
6772         globalf2;
6773 local:
6774         localf2;
6775         _*;
6776 } module_1.0;
6777 submodule_1.0 {
6778 global:
6779         subglobalf1;
6780         _ismissing;
6781 local:
6782         sublocalf1;
6783 };
6784 submodule_2.0 {
6785 global:
6786         subglobalf2;
6787 local:
6788         sublocalf2;
6789         _*;
6790 } submodule_1.0;
6791 EOF
6792                 cat >conftest.$ac_ext <<EOF
6793 #line 6793 "configure"
6794 int     _ismissing(void) { return 1; }
6795 int     _localf1(void) { return 1; }
6796 int     _localf2(void) { return 2; }
6797 int     globalf1(void) { return 1; }
6798 int     globalf2(void) { return 2; }
6799 int     _sublocalf1(void) { return 1; }
6800 int     _sublocalf2(void) { return 2; }
6801 int     subglobalf1(void) { return 1; }
6802 int     subglobalf2(void) { return 2; }
6803 EOF
6804                 cat >conftest.mk <<EOF
6805 CC=${CC}
6806 CFLAGS=${CFLAGS}
6807 CPPFLAGS=${CPPFLAGS}
6808 LDFLAGS=${LDFLAGS}
6809 LIBS=${LIBS}
6810 VERSIONED_SYMS=${VERSIONED_SYMS}
6811 RESULTING_SYMS=conftest.ver
6812 MK_SHARED_LIB=${MK_SHARED_LIB}
6813 conftest.so: conftest.$ac_cv_objext
6814                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6815 EOF
6816
6817                 # compile source, make library
6818                 if make -f conftest.mk 2>&5 >/dev/null
6819                 then
6820                         # test for missing symbol in either Data or Text section
6821                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6822                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6823                 fi
6824                 echo "$as_me:6824: result: $WILDCARD_SYMS" >&5
6825 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6826                 rm -f conftest.*
6827         fi
6828 fi
6829
6830                 ;;
6831         esac
6832 done
6833
6834 ### Checks for special libraries, must be done up-front.
6835 SHLIB_LIST=""
6836
6837 echo "$as_me:6837: checking if you want to link with the GPM mouse library" >&5
6838 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6839
6840 # Check whether --with-gpm or --without-gpm was given.
6841 if test "${with_gpm+set}" = set; then
6842   withval="$with_gpm"
6843   with_gpm=$withval
6844 else
6845   with_gpm=maybe
6846 fi;
6847 echo "$as_me:6847: result: $with_gpm" >&5
6848 echo "${ECHO_T}$with_gpm" >&6
6849
6850 if test "$with_gpm" != no ; then
6851         echo "$as_me:6851: checking for gpm.h" >&5
6852 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6853 if test "${ac_cv_header_gpm_h+set}" = set; then
6854   echo $ECHO_N "(cached) $ECHO_C" >&6
6855 else
6856   cat >"conftest.$ac_ext" <<_ACEOF
6857 #line 6857 "configure"
6858 #include "confdefs.h"
6859 #include <gpm.h>
6860 _ACEOF
6861 if { (eval echo "$as_me:6861: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6862   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6863   ac_status=$?
6864   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6865   rm -f conftest.er1
6866   cat conftest.err >&5
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit "$ac_status"); } >/dev/null; then
6869   if test -s conftest.err; then
6870     ac_cpp_err=$ac_c_preproc_warn_flag
6871   else
6872     ac_cpp_err=
6873   fi
6874 else
6875   ac_cpp_err=yes
6876 fi
6877 if test -z "$ac_cpp_err"; then
6878   ac_cv_header_gpm_h=yes
6879 else
6880   echo "$as_me: failed program was:" >&5
6881   cat "conftest.$ac_ext" >&5
6882   ac_cv_header_gpm_h=no
6883 fi
6884 rm -f conftest.err "conftest.$ac_ext"
6885 fi
6886 echo "$as_me:6886: result: $ac_cv_header_gpm_h" >&5
6887 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6888 if test "$ac_cv_header_gpm_h" = yes; then
6889
6890 cat >>confdefs.h <<\EOF
6891 #define HAVE_GPM_H 1
6892 EOF
6893
6894                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6895                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6896
6897 echo "${as_me:-configure}:6897: testing assuming we really have GPM library ..." 1>&5
6898
6899 cat >>confdefs.h <<\EOF
6900 #define HAVE_LIBGPM 1
6901 EOF
6902
6903                         with_gpm=yes
6904                 else
6905                         echo "$as_me:6905: checking for Gpm_Open in -lgpm" >&5
6906 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6907 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6908   echo $ECHO_N "(cached) $ECHO_C" >&6
6909 else
6910   ac_check_lib_save_LIBS=$LIBS
6911 LIBS="-lgpm  $LIBS"
6912 cat >"conftest.$ac_ext" <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915
6916 /* Override any gcc2 internal prototype to avoid an error.  */
6917 #ifdef __cplusplus
6918 extern "C"
6919 #endif
6920 /* We use char because int might match the return type of a gcc2
6921    builtin and then its argument prototype would still apply.  */
6922 char Gpm_Open ();
6923 int
6924 main (void)
6925 {
6926 Gpm_Open ();
6927   ;
6928   return 0;
6929 }
6930 _ACEOF
6931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6932 if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
6933   (eval $ac_link) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit "$ac_status"); } &&
6937          { ac_try='test -s "conftest$ac_exeext"'
6938   { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6939   (eval $ac_try) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit "$ac_status"); }; }; then
6943   ac_cv_lib_gpm_Gpm_Open=yes
6944 else
6945   echo "$as_me: failed program was:" >&5
6946 cat "conftest.$ac_ext" >&5
6947 ac_cv_lib_gpm_Gpm_Open=no
6948 fi
6949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6950 LIBS=$ac_check_lib_save_LIBS
6951 fi
6952 echo "$as_me:6952: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6953 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6954 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6955   with_gpm=yes
6956 else
6957
6958                                 if test "$with_gpm" = maybe; then
6959                                         { echo "$as_me:6959: WARNING: Cannot link with GPM library" >&5
6960 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6961                                         with_gpm=no
6962                                 else
6963                                         { { echo "$as_me:6963: error: Cannot link with GPM library" >&5
6964 echo "$as_me: error: Cannot link with GPM library" >&2;}
6965    { (exit 1); exit 1; }; }
6966                                 fi
6967
6968 fi
6969
6970                 fi
6971
6972 else
6973
6974                 test "$with_gpm" != maybe && { echo "$as_me:6974: WARNING: Cannot find GPM header" >&5
6975 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6976                 with_gpm=no
6977
6978 fi
6979
6980 fi
6981
6982 if test "$with_gpm" != no ; then
6983         echo "$as_me:6983: checking if you want to load GPM dynamically" >&5
6984 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6985
6986 # Check whether --with-dlsym or --without-dlsym was given.
6987 if test "${with_dlsym+set}" = set; then
6988   withval="$with_dlsym"
6989   with_dlsym=$withval
6990 else
6991   with_dlsym=yes
6992 fi;
6993         echo "$as_me:6993: result: $with_dlsym" >&5
6994 echo "${ECHO_T}$with_dlsym" >&6
6995         if test "x$with_dlsym" = xyes ; then
6996
6997 cf_have_dlsym=no
6998 echo "$as_me:6998: checking for dlsym" >&5
6999 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7000 if test "${ac_cv_func_dlsym+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003   cat >"conftest.$ac_ext" <<_ACEOF
7004 #line 7004 "configure"
7005 #include "confdefs.h"
7006 #define dlsym autoconf_temporary
7007 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7008 #undef dlsym
7009
7010 #ifdef __cplusplus
7011 extern "C"
7012 #endif
7013
7014 /* We use char because int might match the return type of a gcc2
7015    builtin and then its argument prototype would still apply.  */
7016 char dlsym (void);
7017
7018 int
7019 main (void)
7020 {
7021
7022 /* The GNU C library defines stubs for functions which it implements
7023     to always fail with ENOSYS.  Some functions are actually named
7024     something starting with __ and the normal name is an alias.  */
7025 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7026 #error found stub for dlsym
7027 #endif
7028
7029         return dlsym ();
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7035 if { (eval echo "$as_me:7035: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit "$ac_status"); } &&
7040          { ac_try='test -s "conftest$ac_exeext"'
7041   { (eval echo "$as_me:7041: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit "$ac_status"); }; }; then
7046   ac_cv_func_dlsym=yes
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 cat "conftest.$ac_ext" >&5
7050 ac_cv_func_dlsym=no
7051 fi
7052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7053 fi
7054 echo "$as_me:7054: result: $ac_cv_func_dlsym" >&5
7055 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7056 if test "$ac_cv_func_dlsym" = yes; then
7057   cf_have_dlsym=yes
7058 else
7059
7060 cf_have_libdl=no
7061 echo "$as_me:7061: checking for dlsym in -ldl" >&5
7062 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7063 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7064   echo $ECHO_N "(cached) $ECHO_C" >&6
7065 else
7066   ac_check_lib_save_LIBS=$LIBS
7067 LIBS="-ldl  $LIBS"
7068 cat >"conftest.$ac_ext" <<_ACEOF
7069 #line 7069 "configure"
7070 #include "confdefs.h"
7071
7072 /* Override any gcc2 internal prototype to avoid an error.  */
7073 #ifdef __cplusplus
7074 extern "C"
7075 #endif
7076 /* We use char because int might match the return type of a gcc2
7077    builtin and then its argument prototype would still apply.  */
7078 char dlsym ();
7079 int
7080 main (void)
7081 {
7082 dlsym ();
7083   ;
7084   return 0;
7085 }
7086 _ACEOF
7087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7088 if { (eval echo "$as_me:7088: \"$ac_link\"") >&5
7089   (eval $ac_link) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit "$ac_status"); } &&
7093          { ac_try='test -s "conftest$ac_exeext"'
7094   { (eval echo "$as_me:7094: \"$ac_try\"") >&5
7095   (eval $ac_try) 2>&5
7096   ac_status=$?
7097   echo "$as_me:7097: \$? = $ac_status" >&5
7098   (exit "$ac_status"); }; }; then
7099   ac_cv_lib_dl_dlsym=yes
7100 else
7101   echo "$as_me: failed program was:" >&5
7102 cat "conftest.$ac_ext" >&5
7103 ac_cv_lib_dl_dlsym=no
7104 fi
7105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7106 LIBS=$ac_check_lib_save_LIBS
7107 fi
7108 echo "$as_me:7108: result: $ac_cv_lib_dl_dlsym" >&5
7109 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7110 if test "$ac_cv_lib_dl_dlsym" = yes; then
7111
7112         cf_have_dlsym=yes
7113         cf_have_libdl=yes
7114 fi
7115
7116 fi
7117
7118 if test "$cf_have_dlsym" = yes ; then
7119         test "$cf_have_libdl" = yes && {
7120 cf_add_libs="$LIBS"
7121 # reverse order
7122 cf_add_0lib=
7123 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7124 # filter duplicates
7125 for cf_add_1lib in $cf_add_0lib; do
7126         for cf_add_2lib in $cf_add_libs; do
7127                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7128                         cf_add_1lib=
7129                         break
7130                 fi
7131         done
7132         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7133 done
7134 LIBS="$cf_add_libs"
7135  }
7136
7137         echo "$as_me:7137: checking whether able to link to dl*() functions" >&5
7138 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7139         cat >"conftest.$ac_ext" <<_ACEOF
7140 #line 7140 "configure"
7141 #include "confdefs.h"
7142 #include <dlfcn.h>
7143 int
7144 main (void)
7145 {
7146
7147                 void *obj;
7148                 if ((obj = dlopen("filename", 0)) != 0) {
7149                         if (dlsym(obj, "symbolname") == 0) {
7150                         dlclose(obj);
7151                         }
7152                 }
7153   ;
7154   return 0;
7155 }
7156 _ACEOF
7157 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7158 if { (eval echo "$as_me:7158: \"$ac_link\"") >&5
7159   (eval $ac_link) 2>&5
7160   ac_status=$?
7161   echo "$as_me:7161: \$? = $ac_status" >&5
7162   (exit "$ac_status"); } &&
7163          { ac_try='test -s "conftest$ac_exeext"'
7164   { (eval echo "$as_me:7164: \"$ac_try\"") >&5
7165   (eval $ac_try) 2>&5
7166   ac_status=$?
7167   echo "$as_me:7167: \$? = $ac_status" >&5
7168   (exit "$ac_status"); }; }; then
7169
7170 cat >>confdefs.h <<\EOF
7171 #define HAVE_LIBDL 1
7172 EOF
7173
7174 else
7175   echo "$as_me: failed program was:" >&5
7176 cat "conftest.$ac_ext" >&5
7177
7178                 { { echo "$as_me:7178: error: Cannot link test program for libdl" >&5
7179 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7180    { (exit 1); exit 1; }; }
7181 fi
7182 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7183         echo "$as_me:7183: result: ok" >&5
7184 echo "${ECHO_T}ok" >&6
7185 else
7186         { { echo "$as_me:7186: error: Cannot find dlsym function" >&5
7187 echo "$as_me: error: Cannot find dlsym function" >&2;}
7188    { (exit 1); exit 1; }; }
7189 fi
7190
7191                 if test "x$with_gpm" != xyes ; then
7192                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7193
7194 echo "${as_me:-configure}:7194: testing assuming soname for gpm is $with_gpm ..." 1>&5
7195
7196                         cf_cv_gpm_soname="$with_gpm"
7197                 else
7198
7199 echo "$as_me:7199: checking for soname of gpm library" >&5
7200 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7201 if test "${cf_cv_gpm_soname+set}" = set; then
7202   echo $ECHO_N "(cached) $ECHO_C" >&6
7203 else
7204
7205 cf_cv_gpm_soname=unknown
7206 if test "$cross_compiling" != yes ; then
7207 cat >conftest.$ac_ext <<CF_EOF
7208 #include <gpm.h>
7209 int main(void)
7210 {
7211 if (Gpm_Open(0,0)) Gpm_Close();
7212         ${cf_cv_main_return:-return}(0);
7213 }
7214 CF_EOF
7215 cf_save_LIBS="$LIBS"
7216
7217 cf_add_libs="$LIBS"
7218 # reverse order
7219 cf_add_0lib=
7220 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7221 # filter duplicates
7222 for cf_add_1lib in $cf_add_0lib; do
7223         for cf_add_2lib in $cf_add_libs; do
7224                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7225                         cf_add_1lib=
7226                         break
7227                 fi
7228         done
7229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7230 done
7231 LIBS="$cf_add_libs"
7232
7233         if { (eval echo "$as_me:7233: \"$ac_compile\"") >&5
7234   (eval $ac_compile) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit "$ac_status"); } ; then
7238                 if { (eval echo "$as_me:7238: \"$ac_link\"") >&5
7239   (eval $ac_link) 2>&5
7240   ac_status=$?
7241   echo "$as_me:7241: \$? = $ac_status" >&5
7242   (exit "$ac_status"); } ; then
7243                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7244                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7245                 fi
7246         fi
7247 rm -rf ./conftest*
7248 LIBS="$cf_save_LIBS"
7249 fi
7250
7251 fi
7252 echo "$as_me:7252: result: $cf_cv_gpm_soname" >&5
7253 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7254
7255                 fi
7256                 test "$cf_cv_gpm_soname" != "unknown" &&
7257 cat >>confdefs.h <<EOF
7258 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7259 EOF
7260
7261                 SHLIB_LIST="-ldl $SHLIB_LIST"
7262
7263 cf_add_libs="$PRIVATE_LIBS"
7264 # reverse order
7265 cf_add_0lib=
7266 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7267 # filter duplicates
7268 for cf_add_1lib in $cf_add_0lib; do
7269         for cf_add_2lib in $cf_add_libs; do
7270                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7271                         cf_add_1lib=
7272                         break
7273                 fi
7274         done
7275         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7276 done
7277 PRIVATE_LIBS="$cf_add_libs"
7278
7279         else
7280                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7281
7282 cf_add_libs="$TEST_LIBS"
7283 # reverse order
7284 cf_add_0lib=
7285 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7286 # filter duplicates
7287 for cf_add_1lib in $cf_add_0lib; do
7288         for cf_add_2lib in $cf_add_libs; do
7289                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7290                         cf_add_1lib=
7291                         break
7292                 fi
7293         done
7294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7295 done
7296 TEST_LIBS="$cf_add_libs"
7297
7298 cf_add_libs="$PRIVATE_LIBS"
7299 # reverse order
7300 cf_add_0lib=
7301 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7302 # filter duplicates
7303 for cf_add_1lib in $cf_add_0lib; do
7304         for cf_add_2lib in $cf_add_libs; do
7305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7306                         cf_add_1lib=
7307                         break
7308                 fi
7309         done
7310         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7311 done
7312 PRIVATE_LIBS="$cf_add_libs"
7313
7314         fi
7315
7316 cat >>confdefs.h <<\EOF
7317 #define HAVE_LIBGPM 1
7318 EOF
7319
7320 echo "$as_me:7320: checking for Gpm_Wgetch in -lgpm" >&5
7321 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7322 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7323   echo $ECHO_N "(cached) $ECHO_C" >&6
7324 else
7325   ac_check_lib_save_LIBS=$LIBS
7326 LIBS="-lgpm  $LIBS"
7327 cat >"conftest.$ac_ext" <<_ACEOF
7328 #line 7328 "configure"
7329 #include "confdefs.h"
7330
7331 /* Override any gcc2 internal prototype to avoid an error.  */
7332 #ifdef __cplusplus
7333 extern "C"
7334 #endif
7335 /* We use char because int might match the return type of a gcc2
7336    builtin and then its argument prototype would still apply.  */
7337 char Gpm_Wgetch ();
7338 int
7339 main (void)
7340 {
7341 Gpm_Wgetch ();
7342   ;
7343   return 0;
7344 }
7345 _ACEOF
7346 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7347 if { (eval echo "$as_me:7347: \"$ac_link\"") >&5
7348   (eval $ac_link) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit "$ac_status"); } &&
7352          { ac_try='test -s "conftest$ac_exeext"'
7353   { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7354   (eval $ac_try) 2>&5
7355   ac_status=$?
7356   echo "$as_me:7356: \$? = $ac_status" >&5
7357   (exit "$ac_status"); }; }; then
7358   ac_cv_lib_gpm_Gpm_Wgetch=yes
7359 else
7360   echo "$as_me: failed program was:" >&5
7361 cat "conftest.$ac_ext" >&5
7362 ac_cv_lib_gpm_Gpm_Wgetch=no
7363 fi
7364 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7365 LIBS=$ac_check_lib_save_LIBS
7366 fi
7367 echo "$as_me:7367: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7368 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7369 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7370
7371 echo "$as_me:7371: checking if GPM is weakly bound to curses library" >&5
7372 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7373 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7374   echo $ECHO_N "(cached) $ECHO_C" >&6
7375 else
7376
7377 cf_cv_check_gpm_wgetch=unknown
7378 if test "$cross_compiling" != yes ; then
7379
7380 cat >conftest.$ac_ext <<CF_EOF
7381 #include <gpm.h>
7382 int main(void)
7383 {
7384         Gpm_Wgetch();
7385         ${cf_cv_main_return:-return}(0);
7386 }
7387 CF_EOF
7388
7389         cf_save_LIBS="$LIBS"
7390         # This only works if we can look at the symbol table.  If a shared
7391         # library is stripped for install, we cannot use that.  So we're forced
7392         # to rely on the static library, noting that some packagers may not
7393         # include it.
7394         LIBS="-static -lgpm -dynamic $LIBS"
7395         if { (eval echo "$as_me:7395: \"$ac_compile\"") >&5
7396   (eval $ac_compile) 2>&5
7397   ac_status=$?
7398   echo "$as_me:7398: \$? = $ac_status" >&5
7399   (exit "$ac_status"); } ; then
7400                 if { (eval echo "$as_me:7400: \"$ac_link\"") >&5
7401   (eval $ac_link) 2>&5
7402   ac_status=$?
7403   echo "$as_me:7403: \$? = $ac_status" >&5
7404   (exit "$ac_status"); } ; then
7405                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7406                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7407                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7408                 fi
7409         fi
7410         rm -rf ./conftest*
7411         LIBS="$cf_save_LIBS"
7412 fi
7413
7414 fi
7415 echo "$as_me:7415: result: $cf_cv_check_gpm_wgetch" >&5
7416 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7417
7418 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7419         { echo "$as_me:7419: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7420 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7421 fi
7422
7423 fi
7424
7425 fi
7426
7427 echo "$as_me:7427: checking if you want to use PCRE2 for regular-expressions" >&5
7428 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7429
7430 # Check whether --with-pcre2 or --without-pcre2 was given.
7431 if test "${with_pcre2+set}" = set; then
7432   withval="$with_pcre2"
7433
7434 fi;
7435 test -z "$with_pcre2" && with_pcre2=no
7436 echo "$as_me:7436: result: $with_pcre2" >&5
7437 echo "${ECHO_T}$with_pcre2" >&6
7438
7439 if test "x$with_pcre2" != xno ; then
7440         cf_with_pcre2_ok=no
7441         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7442         do
7443
7444 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7445         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7446
7447 echo "${as_me:-configure}:7447: testing found package $cf_with_pcre2 ..." 1>&5
7448
7449         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7450         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7451         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7452
7453 echo "${as_me:-configure}:7453: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7454
7455         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7456
7457 echo "${as_me:-configure}:7457: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7458
7459 cf_fix_cppflags=no
7460 cf_new_cflags=
7461 cf_new_cppflags=
7462 cf_new_extra_cppflags=
7463
7464 for cf_add_cflags in $cf_pkgconfig_incs
7465 do
7466 case "$cf_fix_cppflags" in
7467 (no)
7468         case "$cf_add_cflags" in
7469         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7470                 case "$cf_add_cflags" in
7471                 (-D*)
7472                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7473
7474                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7475                                 && test -z "${cf_tst_cflags}" \
7476                                 && cf_fix_cppflags=yes
7477
7478                         if test "$cf_fix_cppflags" = yes ; then
7479
7480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7482
7483                                 continue
7484                         elif test "${cf_tst_cflags}" = "\"'" ; then
7485
7486         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7487         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7488
7489                                 continue
7490                         fi
7491                         ;;
7492                 esac
7493                 case "$CPPFLAGS" in
7494                 (*$cf_add_cflags)
7495                         ;;
7496                 (*)
7497                         case "$cf_add_cflags" in
7498                         (-D*)
7499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7500
7501 CPPFLAGS=`echo "$CPPFLAGS" | \
7502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7504
7505                                 ;;
7506                         esac
7507
7508         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7509         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7510
7511                         ;;
7512                 esac
7513                 ;;
7514         (*)
7515
7516         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7517         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7518
7519                 ;;
7520         esac
7521         ;;
7522 (yes)
7523
7524         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7525         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7526
7527         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7528
7529         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7530                 && test -z "${cf_tst_cflags}" \
7531                 && cf_fix_cppflags=no
7532         ;;
7533 esac
7534 done
7535
7536 if test -n "$cf_new_cflags" ; then
7537
7538         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7539         CFLAGS="${CFLAGS}$cf_new_cflags"
7540
7541 fi
7542
7543 if test -n "$cf_new_cppflags" ; then
7544
7545         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7546         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7547
7548 fi
7549
7550 if test -n "$cf_new_extra_cppflags" ; then
7551
7552         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7553         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7554
7555 fi
7556
7557 cf_add_libs="$LIBS"
7558 # reverse order
7559 cf_add_0lib=
7560 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7561 # filter duplicates
7562 for cf_add_1lib in $cf_add_0lib; do
7563         for cf_add_2lib in $cf_add_libs; do
7564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7565                         cf_add_1lib=
7566                         break
7567                 fi
7568         done
7569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7570 done
7571 LIBS="$cf_add_libs"
7572
7573         cf_with_pcre2_ok=yes; break
7574 else
7575         cf_pkgconfig_incs=
7576         cf_pkgconfig_libs=
7577         :
7578 fi
7579
7580         done
7581         cf_with_pcre2_ok=yes || { { echo "$as_me:7581: error: Cannot find PCRE2 library" >&5
7582 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7583    { (exit 1); exit 1; }; }
7584
7585 cat >>confdefs.h <<\EOF
7586 #define HAVE_LIB_PCRE2 1
7587 EOF
7588
7589         # if pkgconfig gave no results, look for the libraries directly
7590         case "$LIBS" in
7591         (*pcre2-posix*|*pcreposix*)
7592                 ;;
7593         (*)
7594                 echo "$as_me:7594: checking for regcomp in -lpcre2-posix" >&5
7595 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7596 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7597   echo $ECHO_N "(cached) $ECHO_C" >&6
7598 else
7599   ac_check_lib_save_LIBS=$LIBS
7600 LIBS="-lpcre2-posix  $LIBS"
7601 cat >"conftest.$ac_ext" <<_ACEOF
7602 #line 7602 "configure"
7603 #include "confdefs.h"
7604
7605 /* Override any gcc2 internal prototype to avoid an error.  */
7606 #ifdef __cplusplus
7607 extern "C"
7608 #endif
7609 /* We use char because int might match the return type of a gcc2
7610    builtin and then its argument prototype would still apply.  */
7611 char regcomp ();
7612 int
7613 main (void)
7614 {
7615 regcomp ();
7616   ;
7617   return 0;
7618 }
7619 _ACEOF
7620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7621 if { (eval echo "$as_me:7621: \"$ac_link\"") >&5
7622   (eval $ac_link) 2>&5
7623   ac_status=$?
7624   echo "$as_me:7624: \$? = $ac_status" >&5
7625   (exit "$ac_status"); } &&
7626          { ac_try='test -s "conftest$ac_exeext"'
7627   { (eval echo "$as_me:7627: \"$ac_try\"") >&5
7628   (eval $ac_try) 2>&5
7629   ac_status=$?
7630   echo "$as_me:7630: \$? = $ac_status" >&5
7631   (exit "$ac_status"); }; }; then
7632   ac_cv_lib_pcre2_posix_regcomp=yes
7633 else
7634   echo "$as_me: failed program was:" >&5
7635 cat "conftest.$ac_ext" >&5
7636 ac_cv_lib_pcre2_posix_regcomp=no
7637 fi
7638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7639 LIBS=$ac_check_lib_save_LIBS
7640 fi
7641 echo "$as_me:7641: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7642 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7643 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7644
7645 cf_add_libs="$LIBS"
7646 # reverse order
7647 cf_add_0lib=
7648 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7649 # filter duplicates
7650 for cf_add_1lib in $cf_add_0lib; do
7651         for cf_add_2lib in $cf_add_libs; do
7652                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7653                         cf_add_1lib=
7654                         break
7655                 fi
7656         done
7657         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7658 done
7659 LIBS="$cf_add_libs"
7660
7661 else
7662   echo "$as_me:7662: checking for regcomp in -lpcreposix" >&5
7663 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7664 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7665   echo $ECHO_N "(cached) $ECHO_C" >&6
7666 else
7667   ac_check_lib_save_LIBS=$LIBS
7668 LIBS="-lpcreposix  $LIBS"
7669 cat >"conftest.$ac_ext" <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672
7673 /* Override any gcc2 internal prototype to avoid an error.  */
7674 #ifdef __cplusplus
7675 extern "C"
7676 #endif
7677 /* We use char because int might match the return type of a gcc2
7678    builtin and then its argument prototype would still apply.  */
7679 char regcomp ();
7680 int
7681 main (void)
7682 {
7683 regcomp ();
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7689 if { (eval echo "$as_me:7689: \"$ac_link\"") >&5
7690   (eval $ac_link) 2>&5
7691   ac_status=$?
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit "$ac_status"); } &&
7694          { ac_try='test -s "conftest$ac_exeext"'
7695   { (eval echo "$as_me:7695: \"$ac_try\"") >&5
7696   (eval $ac_try) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit "$ac_status"); }; }; then
7700   ac_cv_lib_pcreposix_regcomp=yes
7701 else
7702   echo "$as_me: failed program was:" >&5
7703 cat "conftest.$ac_ext" >&5
7704 ac_cv_lib_pcreposix_regcomp=no
7705 fi
7706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7707 LIBS=$ac_check_lib_save_LIBS
7708 fi
7709 echo "$as_me:7709: result: $ac_cv_lib_pcreposix_regcomp" >&5
7710 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7711 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7712
7713 cf_add_libs="$LIBS"
7714 # reverse order
7715 cf_add_0lib=
7716 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7717 # filter duplicates
7718 for cf_add_1lib in $cf_add_0lib; do
7719         for cf_add_2lib in $cf_add_libs; do
7720                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7721                         cf_add_1lib=
7722                         break
7723                 fi
7724         done
7725         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7726 done
7727 LIBS="$cf_add_libs"
7728
7729 else
7730   { { echo "$as_me:7730: error: Cannot find PCRE2 POSIX library" >&5
7731 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7732    { (exit 1); exit 1; }; }
7733 fi
7734
7735 fi
7736
7737                 ;;
7738         esac
7739
7740         # either way, check for the library header files
7741
7742 for ac_header in pcre2posix.h pcreposix.h
7743 do
7744 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7745 echo "$as_me:7745: checking for $ac_header" >&5
7746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7748   echo $ECHO_N "(cached) $ECHO_C" >&6
7749 else
7750   cat >"conftest.$ac_ext" <<_ACEOF
7751 #line 7751 "configure"
7752 #include "confdefs.h"
7753 #include <$ac_header>
7754 _ACEOF
7755 if { (eval echo "$as_me:7755: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7756   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7757   ac_status=$?
7758   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7759   rm -f conftest.er1
7760   cat conftest.err >&5
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit "$ac_status"); } >/dev/null; then
7763   if test -s conftest.err; then
7764     ac_cpp_err=$ac_c_preproc_warn_flag
7765   else
7766     ac_cpp_err=
7767   fi
7768 else
7769   ac_cpp_err=yes
7770 fi
7771 if test -z "$ac_cpp_err"; then
7772   eval "$as_ac_Header=yes"
7773 else
7774   echo "$as_me: failed program was:" >&5
7775   cat "conftest.$ac_ext" >&5
7776   eval "$as_ac_Header=no"
7777 fi
7778 rm -f conftest.err "conftest.$ac_ext"
7779 fi
7780 echo "$as_me:7780: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7781 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7782 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7783   cat >>confdefs.h <<EOF
7784 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7785 EOF
7786
7787 fi
7788 done
7789
7790 fi
7791
7792 # not everyone has "test -c"
7793 if test -c /dev/sysmouse 2>/dev/null ; then
7794 echo "$as_me:7794: checking if you want to use sysmouse" >&5
7795 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7796
7797 # Check whether --with-sysmouse or --without-sysmouse was given.
7798 if test "${with_sysmouse+set}" = set; then
7799   withval="$with_sysmouse"
7800   cf_with_sysmouse=$withval
7801 else
7802   cf_with_sysmouse=maybe
7803 fi;
7804         if test "$cf_with_sysmouse" != no ; then
7805         cat >"conftest.$ac_ext" <<_ACEOF
7806 #line 7806 "configure"
7807 #include "confdefs.h"
7808
7809 #include <osreldate.h>
7810 #if (__FreeBSD_version >= 400017)
7811 #include <sys/consio.h>
7812 #include <sys/fbio.h>
7813 #else
7814 #include <machine/console.h>
7815 #endif
7816
7817 int
7818 main (void)
7819 {
7820
7821         struct mouse_info the_mouse;
7822         ioctl(0, CONS_MOUSECTL, &the_mouse);
7823
7824   ;
7825   return 0;
7826 }
7827 _ACEOF
7828 rm -f "conftest.$ac_objext"
7829 if { (eval echo "$as_me:7829: \"$ac_compile\"") >&5
7830   (eval $ac_compile) 2>&5
7831   ac_status=$?
7832   echo "$as_me:7832: \$? = $ac_status" >&5
7833   (exit "$ac_status"); } &&
7834          { ac_try='test -s "conftest.$ac_objext"'
7835   { (eval echo "$as_me:7835: \"$ac_try\"") >&5
7836   (eval $ac_try) 2>&5
7837   ac_status=$?
7838   echo "$as_me:7838: \$? = $ac_status" >&5
7839   (exit "$ac_status"); }; }; then
7840   cf_with_sysmouse=yes
7841 else
7842   echo "$as_me: failed program was:" >&5
7843 cat "conftest.$ac_ext" >&5
7844 cf_with_sysmouse=no
7845 fi
7846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7847         fi
7848 echo "$as_me:7848: result: $cf_with_sysmouse" >&5
7849 echo "${ECHO_T}$cf_with_sysmouse" >&6
7850 test "$cf_with_sysmouse" = yes &&
7851 cat >>confdefs.h <<\EOF
7852 #define USE_SYSMOUSE 1
7853 EOF
7854
7855 fi
7856
7857 # pretend that ncurses==ncursesw==ncursest
7858 echo "$as_me:7858: checking if you want to disable library suffixes" >&5
7859 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7860
7861 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7862 if test "${enable_lib_suffixes+set}" = set; then
7863   enableval="$enable_lib_suffixes"
7864   test "$enableval" != no && enableval=yes
7865         if test "$enableval" != "yes" ; then
7866     disable_lib_suffixes=yes
7867         else
7868                 disable_lib_suffixes=no
7869         fi
7870 else
7871   enableval=yes
7872         disable_lib_suffixes=no
7873
7874 fi;
7875 echo "$as_me:7875: result: $disable_lib_suffixes" >&5
7876 echo "${ECHO_T}$disable_lib_suffixes" >&6
7877
7878 ### If we're building with rpath, try to link non-standard libs that way too.
7879 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7880
7881 echo "$as_me:7881: checking if rpath-hack should be disabled" >&5
7882 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7883
7884 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7885 if test "${enable_rpath_hack+set}" = set; then
7886   enableval="$enable_rpath_hack"
7887   test "$enableval" != no && enableval=yes
7888         if test "$enableval" != "yes" ; then
7889     enable_rpath_hack=no
7890         else
7891                 enable_rpath_hack=yes
7892         fi
7893 else
7894   enableval=yes
7895         enable_rpath_hack=yes
7896
7897 fi;
7898 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7899 echo "$as_me:7899: result: $cf_disable_rpath_hack" >&5
7900 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7901
7902 if test "$enable_rpath_hack" = yes ; then
7903
7904 echo "$as_me:7904: checking for updated LDFLAGS" >&5
7905 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7906 if test -n "$LD_RPATH_OPT" ; then
7907         echo "$as_me:7907: result: maybe" >&5
7908 echo "${ECHO_T}maybe" >&6
7909
7910         for ac_prog in ldd
7911 do
7912   # Extract the first word of "$ac_prog", so it can be a program name with args.
7913 set dummy $ac_prog; ac_word=$2
7914 echo "$as_me:7914: checking for $ac_word" >&5
7915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7916 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7917   echo $ECHO_N "(cached) $ECHO_C" >&6
7918 else
7919   if test -n "$cf_ldd_prog"; then
7920   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7921 else
7922   ac_save_IFS=$IFS; IFS=$ac_path_separator
7923 ac_dummy="$PATH"
7924 for ac_dir in $ac_dummy; do
7925   IFS=$ac_save_IFS
7926   test -z "$ac_dir" && ac_dir=.
7927   $as_executable_p "$ac_dir/$ac_word" || continue
7928 ac_cv_prog_cf_ldd_prog="$ac_prog"
7929 echo "$as_me:7929: found $ac_dir/$ac_word" >&5
7930 break
7931 done
7932
7933 fi
7934 fi
7935 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7936 if test -n "$cf_ldd_prog"; then
7937   echo "$as_me:7937: result: $cf_ldd_prog" >&5
7938 echo "${ECHO_T}$cf_ldd_prog" >&6
7939 else
7940   echo "$as_me:7940: result: no" >&5
7941 echo "${ECHO_T}no" >&6
7942 fi
7943
7944   test -n "$cf_ldd_prog" && break
7945 done
7946 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7947
7948         cf_rpath_list="/usr/lib /lib"
7949         if test "$cf_ldd_prog" != no
7950         then
7951                 cf_rpath_oops=
7952
7953 cat >"conftest.$ac_ext" <<_ACEOF
7954 #line 7954 "configure"
7955 #include "confdefs.h"
7956 #include <stdio.h>
7957 int
7958 main (void)
7959 {
7960 printf("Hello");
7961   ;
7962   return 0;
7963 }
7964 _ACEOF
7965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7966 if { (eval echo "$as_me:7966: \"$ac_link\"") >&5
7967   (eval $ac_link) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit "$ac_status"); } &&
7971          { ac_try='test -s "conftest$ac_exeext"'
7972   { (eval echo "$as_me:7972: \"$ac_try\"") >&5
7973   (eval $ac_try) 2>&5
7974   ac_status=$?
7975   echo "$as_me:7975: \$? = $ac_status" >&5
7976   (exit "$ac_status"); }; }; then
7977   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7978                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7979 else
7980   echo "$as_me: failed program was:" >&5
7981 cat "conftest.$ac_ext" >&5
7982 fi
7983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7984
7985                 # If we passed the link-test, but get a "not found" on a given library,
7986                 # this could be due to inept reconfiguration of gcc to make it only
7987                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7988                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7989                 # /usr/local libraries.
7990                 if test -n "$cf_rpath_oops"
7991                 then
7992                         for cf_rpath_src in $cf_rpath_oops
7993                         do
7994                                 for cf_rpath_dir in \
7995                                         /usr/local \
7996                                         /usr/pkg \
7997                                         /opt/sfw
7998                                 do
7999                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8000                                         then
8001                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8002
8003 echo "${as_me:-configure}:8003: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8004
8005                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8006                                                 break
8007                                         fi
8008                                 done
8009                         done
8010                 fi
8011         fi
8012
8013         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8014
8015 echo "${as_me:-configure}:8015: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8016
8017 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8018
8019 echo "${as_me:-configure}:8019: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8020
8021 cf_rpath_dst=
8022 for cf_rpath_src in $LDFLAGS
8023 do
8024         case "$cf_rpath_src" in
8025         (-L*)
8026
8027                 # check if this refers to a directory which we will ignore
8028                 cf_rpath_skip=no
8029                 if test -n "$cf_rpath_list"
8030                 then
8031                         for cf_rpath_item in $cf_rpath_list
8032                         do
8033                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8034                                 then
8035                                         cf_rpath_skip=yes
8036                                         break
8037                                 fi
8038                         done
8039                 fi
8040
8041                 if test "$cf_rpath_skip" = no
8042                 then
8043                         # transform the option
8044                         if test "$LD_RPATH_OPT" = "-R " ; then
8045                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8046                         else
8047                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8048                         fi
8049
8050                         # if we have not already added this, add it now
8051                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8052                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8053                         then
8054                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8055
8056 echo "${as_me:-configure}:8056: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8057
8058                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8059                         fi
8060                 fi
8061                 ;;
8062         esac
8063         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8064 done
8065 LDFLAGS=$cf_rpath_dst
8066
8067 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8068
8069 echo "${as_me:-configure}:8069: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8070
8071 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8072
8073 echo "${as_me:-configure}:8073: testing ...checking LIBS $LIBS ..." 1>&5
8074
8075 cf_rpath_dst=
8076 for cf_rpath_src in $LIBS
8077 do
8078         case "$cf_rpath_src" in
8079         (-L*)
8080
8081                 # check if this refers to a directory which we will ignore
8082                 cf_rpath_skip=no
8083                 if test -n "$cf_rpath_list"
8084                 then
8085                         for cf_rpath_item in $cf_rpath_list
8086                         do
8087                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8088                                 then
8089                                         cf_rpath_skip=yes
8090                                         break
8091                                 fi
8092                         done
8093                 fi
8094
8095                 if test "$cf_rpath_skip" = no
8096                 then
8097                         # transform the option
8098                         if test "$LD_RPATH_OPT" = "-R " ; then
8099                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8100                         else
8101                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8102                         fi
8103
8104                         # if we have not already added this, add it now
8105                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8106                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8107                         then
8108                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8109
8110 echo "${as_me:-configure}:8110: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8111
8112                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8113                         fi
8114                 fi
8115                 ;;
8116         esac
8117         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8118 done
8119 LIBS=$cf_rpath_dst
8120
8121 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8122
8123 echo "${as_me:-configure}:8123: testing ...checked LIBS $LIBS ..." 1>&5
8124
8125         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8126
8127 echo "${as_me:-configure}:8127: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8128
8129 else
8130         echo "$as_me:8130: result: no" >&5
8131 echo "${ECHO_T}no" >&6
8132 fi
8133
8134 fi
8135
8136 fi
8137
8138 ### Depending on the system, someone may use rpath to build ncurses but not
8139 # want users of the package to rely upon that feature.  Give those people an
8140 # option to suppress that detail from EXTRA_LDFLAGS.
8141 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8142 if test -n "$EXTRA_PKG_LDFLAGS"
8143 then
8144         echo "$as_me:8144: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8145 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8146
8147 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8148 if test "${enable_pkg_ldflags+set}" = set; then
8149   enableval="$enable_pkg_ldflags"
8150   test "$enableval" != no && enableval=yes
8151         if test "$enableval" != "yes" ; then
8152     disable_pkg_ldflags=yes
8153         else
8154                 disable_pkg_ldflags=no
8155         fi
8156 else
8157   enableval=yes
8158         disable_pkg_ldflags=no
8159
8160 fi;
8161         echo "$as_me:8161: result: $disable_pkg_ldflags" >&5
8162 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8163         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8164 fi
8165
8166 ###############################################################################
8167
8168 ###     use option --with-extra-suffix to append suffix to headers and libraries
8169 echo "$as_me:8169: checking if you wish to append extra suffix to header/library paths" >&5
8170 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8171 EXTRA_SUFFIX=
8172
8173 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8174 if test "${with_extra_suffix+set}" = set; then
8175   withval="$with_extra_suffix"
8176   case x$withval in
8177         (xno)
8178                 ;;
8179         (xyes|x)
8180                 EXTRA_SUFFIX=$cf_cv_abi_version
8181                 ;;
8182         (*)
8183                 EXTRA_SUFFIX=$withval
8184                 ;;
8185         esac
8186
8187 fi;
8188 echo "$as_me:8188: result: $EXTRA_SUFFIX" >&5
8189 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8190
8191 ###     use option --disable-overwrite to leave out the link to -lcurses
8192 echo "$as_me:8192: checking if you wish to install ncurses overwriting curses" >&5
8193 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8194
8195 # Check whether --enable-overwrite or --disable-overwrite was given.
8196 if test "${enable_overwrite+set}" = set; then
8197   enableval="$enable_overwrite"
8198   with_overwrite=$enableval
8199 else
8200   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8201 fi;
8202 echo "$as_me:8202: result: $with_overwrite" >&5
8203 echo "${ECHO_T}$with_overwrite" >&6
8204
8205 echo "$as_me:8205: checking if external terminfo-database is used" >&5
8206 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8207
8208 # Check whether --enable-database or --disable-database was given.
8209 if test "${enable_database+set}" = set; then
8210   enableval="$enable_database"
8211   use_database=$enableval
8212 else
8213   use_database=yes
8214 fi;
8215 echo "$as_me:8215: result: $use_database" >&5
8216 echo "${ECHO_T}$use_database" >&6
8217
8218 case "$host_os" in
8219 (os2*)
8220         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8221         ;;
8222 (*)
8223         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8224         ;;
8225 esac
8226
8227 NCURSES_USE_DATABASE=0
8228 if test "$use_database" != no ; then
8229         NCURSES_USE_DATABASE=1
8230
8231         echo "$as_me:8231: checking which terminfo source-file will be installed" >&5
8232 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8233
8234 # Check whether --with-database or --without-database was given.
8235 if test "${with_database+set}" = set; then
8236   withval="$with_database"
8237   TERMINFO_SRC=$withval
8238 fi;
8239         echo "$as_me:8239: result: $TERMINFO_SRC" >&5
8240 echo "${ECHO_T}$TERMINFO_SRC" >&6
8241
8242         echo "$as_me:8242: checking whether to use hashed database instead of directory/tree" >&5
8243 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8244
8245 # Check whether --with-hashed-db or --without-hashed-db was given.
8246 if test "${with_hashed_db+set}" = set; then
8247   withval="$with_hashed_db"
8248
8249 else
8250   with_hashed_db=no
8251 fi;
8252         echo "$as_me:8252: result: $with_hashed_db" >&5
8253 echo "${ECHO_T}$with_hashed_db" >&6
8254 else
8255         with_hashed_db=no
8256 fi
8257
8258 echo "$as_me:8258: checking for list of fallback descriptions" >&5
8259 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8260
8261 # Check whether --with-fallbacks or --without-fallbacks was given.
8262 if test "${with_fallbacks+set}" = set; then
8263   withval="$with_fallbacks"
8264   with_fallback=$withval
8265 else
8266   with_fallback=
8267 fi;
8268 echo "$as_me:8268: result: $with_fallback" >&5
8269 echo "${ECHO_T}$with_fallback" >&6
8270
8271 case ".$with_fallback" in
8272 (.|.no)
8273         FALLBACK_LIST=
8274         ;;
8275 (.yes)
8276         { echo "$as_me:8276: WARNING: expected a list of terminal descriptions" >&5
8277 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8278         ;;
8279 (*)
8280         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8281         ;;
8282 esac
8283
8284 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8285 # tree for generating the terminal descriptions that will be compiled into the
8286 # library.  If your toolchain is old, it may not handle current terminal
8287 # databases.  Use configure-options to point to the tools which will be used,
8288 # rather than the first ones found on the $PATH.
8289 if test -n "$ac_tool_prefix"; then
8290   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8291 set dummy ${ac_tool_prefix}tic; ac_word=$2
8292 echo "$as_me:8292: checking for $ac_word" >&5
8293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8294 if test "${ac_cv_prog_TIC+set}" = set; then
8295   echo $ECHO_N "(cached) $ECHO_C" >&6
8296 else
8297   if test -n "$TIC"; then
8298   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8299 else
8300   ac_save_IFS=$IFS; IFS=$ac_path_separator
8301 ac_dummy="$PATH"
8302 for ac_dir in $ac_dummy; do
8303   IFS=$ac_save_IFS
8304   test -z "$ac_dir" && ac_dir=.
8305   $as_executable_p "$ac_dir/$ac_word" || continue
8306 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8307 echo "$as_me:8307: found $ac_dir/$ac_word" >&5
8308 break
8309 done
8310
8311 fi
8312 fi
8313 TIC=$ac_cv_prog_TIC
8314 if test -n "$TIC"; then
8315   echo "$as_me:8315: result: $TIC" >&5
8316 echo "${ECHO_T}$TIC" >&6
8317 else
8318   echo "$as_me:8318: result: no" >&5
8319 echo "${ECHO_T}no" >&6
8320 fi
8321
8322 fi
8323 if test -z "$ac_cv_prog_TIC"; then
8324   ac_ct_TIC=$TIC
8325   # Extract the first word of "tic", so it can be a program name with args.
8326 set dummy tic; ac_word=$2
8327 echo "$as_me:8327: checking for $ac_word" >&5
8328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8329 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8330   echo $ECHO_N "(cached) $ECHO_C" >&6
8331 else
8332   if test -n "$ac_ct_TIC"; then
8333   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8334 else
8335   ac_save_IFS=$IFS; IFS=$ac_path_separator
8336 ac_dummy="$PATH"
8337 for ac_dir in $ac_dummy; do
8338   IFS=$ac_save_IFS
8339   test -z "$ac_dir" && ac_dir=.
8340   $as_executable_p "$ac_dir/$ac_word" || continue
8341 ac_cv_prog_ac_ct_TIC="tic"
8342 echo "$as_me:8342: found $ac_dir/$ac_word" >&5
8343 break
8344 done
8345
8346 fi
8347 fi
8348 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8349 if test -n "$ac_ct_TIC"; then
8350   echo "$as_me:8350: result: $ac_ct_TIC" >&5
8351 echo "${ECHO_T}$ac_ct_TIC" >&6
8352 else
8353   echo "$as_me:8353: result: no" >&5
8354 echo "${ECHO_T}no" >&6
8355 fi
8356
8357   TIC=$ac_ct_TIC
8358 else
8359   TIC="$ac_cv_prog_TIC"
8360 fi
8361
8362 if test -n "$ac_tool_prefix"; then
8363   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8364 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8365 echo "$as_me:8365: checking for $ac_word" >&5
8366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8367 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8368   echo $ECHO_N "(cached) $ECHO_C" >&6
8369 else
8370   if test -n "$INFOCMP"; then
8371   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8372 else
8373   ac_save_IFS=$IFS; IFS=$ac_path_separator
8374 ac_dummy="$PATH"
8375 for ac_dir in $ac_dummy; do
8376   IFS=$ac_save_IFS
8377   test -z "$ac_dir" && ac_dir=.
8378   $as_executable_p "$ac_dir/$ac_word" || continue
8379 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8380 echo "$as_me:8380: found $ac_dir/$ac_word" >&5
8381 break
8382 done
8383
8384 fi
8385 fi
8386 INFOCMP=$ac_cv_prog_INFOCMP
8387 if test -n "$INFOCMP"; then
8388   echo "$as_me:8388: result: $INFOCMP" >&5
8389 echo "${ECHO_T}$INFOCMP" >&6
8390 else
8391   echo "$as_me:8391: result: no" >&5
8392 echo "${ECHO_T}no" >&6
8393 fi
8394
8395 fi
8396 if test -z "$ac_cv_prog_INFOCMP"; then
8397   ac_ct_INFOCMP=$INFOCMP
8398   # Extract the first word of "infocmp", so it can be a program name with args.
8399 set dummy infocmp; ac_word=$2
8400 echo "$as_me:8400: checking for $ac_word" >&5
8401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8402 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8403   echo $ECHO_N "(cached) $ECHO_C" >&6
8404 else
8405   if test -n "$ac_ct_INFOCMP"; then
8406   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8407 else
8408   ac_save_IFS=$IFS; IFS=$ac_path_separator
8409 ac_dummy="$PATH"
8410 for ac_dir in $ac_dummy; do
8411   IFS=$ac_save_IFS
8412   test -z "$ac_dir" && ac_dir=.
8413   $as_executable_p "$ac_dir/$ac_word" || continue
8414 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8415 echo "$as_me:8415: found $ac_dir/$ac_word" >&5
8416 break
8417 done
8418
8419 fi
8420 fi
8421 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8422 if test -n "$ac_ct_INFOCMP"; then
8423   echo "$as_me:8423: result: $ac_ct_INFOCMP" >&5
8424 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8425 else
8426   echo "$as_me:8426: result: no" >&5
8427 echo "${ECHO_T}no" >&6
8428 fi
8429
8430   INFOCMP=$ac_ct_INFOCMP
8431 else
8432   INFOCMP="$ac_cv_prog_INFOCMP"
8433 fi
8434
8435 if test -n "$FALLBACK_LIST"
8436 then
8437
8438 # Check whether --with-tic-path or --without-tic-path was given.
8439 if test "${with_tic_path+set}" = set; then
8440   withval="$with_tic_path"
8441   echo "$as_me:8441: checking for tic program for fallbacks" >&5
8442 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8443                 TIC=$withval
8444                 echo "$as_me:8444: result: $TIC" >&5
8445 echo "${ECHO_T}$TIC" >&6
8446
8447 if test "x$prefix" != xNONE; then
8448         cf_path_syntax="$prefix"
8449 else
8450         cf_path_syntax="$ac_default_prefix"
8451 fi
8452
8453 case ".$TIC" in
8454 (.\$\(*\)*|.\'*\'*)
8455         ;;
8456 (..|./*|.\\*)
8457         ;;
8458 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8459         ;;
8460 (.\$\{*prefix\}*|.\$\{*dir\}*)
8461         eval TIC="$TIC"
8462         case ".$TIC" in
8463         (.NONE/*)
8464                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8465                 ;;
8466         esac
8467         ;;
8468 (.no|.NONE/*)
8469         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8470         ;;
8471 (*)
8472         { { echo "$as_me:8472: error: expected a pathname, not \"$TIC\"" >&5
8473 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8474    { (exit 1); exit 1; }; }
8475         ;;
8476 esac
8477
8478 else
8479
8480 test -z "$TIC" && TIC="tic"
8481 for ac_prog in $TIC tic
8482 do
8483   # Extract the first word of "$ac_prog", so it can be a program name with args.
8484 set dummy $ac_prog; ac_word=$2
8485 echo "$as_me:8485: checking for $ac_word" >&5
8486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8487 if test "${ac_cv_path_TIC+set}" = set; then
8488   echo $ECHO_N "(cached) $ECHO_C" >&6
8489 else
8490   case $TIC in
8491   [\\/]* | ?:[\\/]*)
8492   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8493   ;;
8494   *)
8495   ac_save_IFS=$IFS; IFS=$ac_path_separator
8496 ac_dummy="$PATH:/usr/local/ncurses/bin"
8497 for ac_dir in $ac_dummy; do
8498   IFS=$ac_save_IFS
8499   test -z "$ac_dir" && ac_dir=.
8500   if $as_executable_p "$ac_dir/$ac_word"; then
8501    ac_cv_path_TIC="$ac_dir/$ac_word"
8502    echo "$as_me:8502: found $ac_dir/$ac_word" >&5
8503    break
8504 fi
8505 done
8506
8507   ;;
8508 esac
8509 fi
8510 TIC=$ac_cv_path_TIC
8511
8512 if test -n "$TIC"; then
8513   echo "$as_me:8513: result: $TIC" >&5
8514 echo "${ECHO_T}$TIC" >&6
8515 else
8516   echo "$as_me:8516: result: no" >&5
8517 echo "${ECHO_T}no" >&6
8518 fi
8519
8520   test -n "$TIC" && break
8521 done
8522 test -n "$TIC" || TIC="$TIC"
8523
8524 cf_path_prog=""
8525 cf_path_args=""
8526 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8527 for cf_temp in $ac_cv_path_TIC
8528 do
8529         if test -z "$cf_path_prog" ; then
8530                 if test "$with_full_paths" = yes ; then
8531
8532 if test "x$prefix" != xNONE; then
8533         cf_path_syntax="$prefix"
8534 else
8535         cf_path_syntax="$ac_default_prefix"
8536 fi
8537
8538 case ".$cf_temp" in
8539 (.\$\(*\)*|.\'*\'*)
8540         ;;
8541 (..|./*|.\\*)
8542         ;;
8543 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8544         ;;
8545 (.\$\{*prefix\}*|.\$\{*dir\}*)
8546         eval cf_temp="$cf_temp"
8547         case ".$cf_temp" in
8548         (.NONE/*)
8549                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8550                 ;;
8551         esac
8552         ;;
8553 (.no|.NONE/*)
8554         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8555         ;;
8556 (*)
8557         break
8558         ;;
8559 esac
8560
8561                         cf_path_prog="$cf_temp"
8562                 else
8563                         cf_path_prog="`basename "$cf_temp"`"
8564                 fi
8565         elif test -z "$cf_path_args" ; then
8566                 cf_path_args="$cf_temp"
8567         else
8568                 cf_path_args="$cf_path_args $cf_temp"
8569         fi
8570 done
8571 IFS="$cf_save_ifs"
8572
8573 if test -n "$cf_path_prog" ; then
8574
8575 echo "${as_me:-configure}:8575: testing defining path for ${cf_path_prog} ..." 1>&5
8576
8577 cat >>confdefs.h <<EOF
8578 #define TIC_PATH "$cf_path_prog"
8579 EOF
8580
8581         test -n "$cf_path_args" &&
8582 cat >>confdefs.h <<EOF
8583 #define TIC_ARGS "$cf_path_args"
8584 EOF
8585
8586 fi
8587
8588                 if test -z "$TIC"
8589                 then
8590                         { echo "$as_me:8590: WARNING: no tic program found for fallbacks" >&5
8591 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8592                 fi
8593
8594 fi;
8595
8596 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8597 if test "${with_infocmp_path+set}" = set; then
8598   withval="$with_infocmp_path"
8599   echo "$as_me:8599: checking for infocmp program for fallbacks" >&5
8600 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8601                 INFOCMP=$withval
8602                 echo "$as_me:8602: result: $INFOCMP" >&5
8603 echo "${ECHO_T}$INFOCMP" >&6
8604
8605 if test "x$prefix" != xNONE; then
8606         cf_path_syntax="$prefix"
8607 else
8608         cf_path_syntax="$ac_default_prefix"
8609 fi
8610
8611 case ".$INFOCMP" in
8612 (.\$\(*\)*|.\'*\'*)
8613         ;;
8614 (..|./*|.\\*)
8615         ;;
8616 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8617         ;;
8618 (.\$\{*prefix\}*|.\$\{*dir\}*)
8619         eval INFOCMP="$INFOCMP"
8620         case ".$INFOCMP" in
8621         (.NONE/*)
8622                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8623                 ;;
8624         esac
8625         ;;
8626 (.no|.NONE/*)
8627         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8628         ;;
8629 (*)
8630         { { echo "$as_me:8630: error: expected a pathname, not \"$INFOCMP\"" >&5
8631 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8632    { (exit 1); exit 1; }; }
8633         ;;
8634 esac
8635
8636 else
8637
8638 test -z "$INFOCMP" && INFOCMP="infocmp"
8639 for ac_prog in $INFOCMP infocmp
8640 do
8641   # Extract the first word of "$ac_prog", so it can be a program name with args.
8642 set dummy $ac_prog; ac_word=$2
8643 echo "$as_me:8643: checking for $ac_word" >&5
8644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8645 if test "${ac_cv_path_INFOCMP+set}" = set; then
8646   echo $ECHO_N "(cached) $ECHO_C" >&6
8647 else
8648   case $INFOCMP in
8649   [\\/]* | ?:[\\/]*)
8650   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8651   ;;
8652   *)
8653   ac_save_IFS=$IFS; IFS=$ac_path_separator
8654 ac_dummy="$PATH:/usr/local/ncurses/bin"
8655 for ac_dir in $ac_dummy; do
8656   IFS=$ac_save_IFS
8657   test -z "$ac_dir" && ac_dir=.
8658   if $as_executable_p "$ac_dir/$ac_word"; then
8659    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8660    echo "$as_me:8660: found $ac_dir/$ac_word" >&5
8661    break
8662 fi
8663 done
8664
8665   ;;
8666 esac
8667 fi
8668 INFOCMP=$ac_cv_path_INFOCMP
8669
8670 if test -n "$INFOCMP"; then
8671   echo "$as_me:8671: result: $INFOCMP" >&5
8672 echo "${ECHO_T}$INFOCMP" >&6
8673 else
8674   echo "$as_me:8674: result: no" >&5
8675 echo "${ECHO_T}no" >&6
8676 fi
8677
8678   test -n "$INFOCMP" && break
8679 done
8680 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8681
8682 cf_path_prog=""
8683 cf_path_args=""
8684 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8685 for cf_temp in $ac_cv_path_INFOCMP
8686 do
8687         if test -z "$cf_path_prog" ; then
8688                 if test "$with_full_paths" = yes ; then
8689
8690 if test "x$prefix" != xNONE; then
8691         cf_path_syntax="$prefix"
8692 else
8693         cf_path_syntax="$ac_default_prefix"
8694 fi
8695
8696 case ".$cf_temp" in
8697 (.\$\(*\)*|.\'*\'*)
8698         ;;
8699 (..|./*|.\\*)
8700         ;;
8701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8702         ;;
8703 (.\$\{*prefix\}*|.\$\{*dir\}*)
8704         eval cf_temp="$cf_temp"
8705         case ".$cf_temp" in
8706         (.NONE/*)
8707                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8708                 ;;
8709         esac
8710         ;;
8711 (.no|.NONE/*)
8712         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8713         ;;
8714 (*)
8715         break
8716         ;;
8717 esac
8718
8719                         cf_path_prog="$cf_temp"
8720                 else
8721                         cf_path_prog="`basename "$cf_temp"`"
8722                 fi
8723         elif test -z "$cf_path_args" ; then
8724                 cf_path_args="$cf_temp"
8725         else
8726                 cf_path_args="$cf_path_args $cf_temp"
8727         fi
8728 done
8729 IFS="$cf_save_ifs"
8730
8731 if test -n "$cf_path_prog" ; then
8732
8733 echo "${as_me:-configure}:8733: testing defining path for ${cf_path_prog} ..." 1>&5
8734
8735 cat >>confdefs.h <<EOF
8736 #define INFOCMP_PATH "$cf_path_prog"
8737 EOF
8738
8739         test -n "$cf_path_args" &&
8740 cat >>confdefs.h <<EOF
8741 #define INFOCMP_ARGS "$cf_path_args"
8742 EOF
8743
8744 fi
8745
8746                 if test -z "$INFOCMP"
8747                 then
8748                         { echo "$as_me:8748: WARNING: no infocmp program found for fallbacks" >&5
8749 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8750                 fi
8751
8752 fi;
8753
8754         test -z "$TIC" && FALLBACK_LIST=
8755         test -z "$INFOCMP" && FALLBACK_LIST=
8756         if test -z "$FALLBACK_LIST"
8757         then
8758                 { echo "$as_me:8758: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8759 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8760         fi
8761 fi
8762
8763 USE_FALLBACKS=
8764 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8765
8766 echo "$as_me:8766: checking if you want modern xterm or antique" >&5
8767 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8768
8769 # Check whether --with-xterm-new or --without-xterm-new was given.
8770 if test "${with_xterm_new+set}" = set; then
8771   withval="$with_xterm_new"
8772   with_xterm_new=$withval
8773 else
8774   with_xterm_new=yes
8775 fi;
8776 case "$with_xterm_new" in
8777 (no) with_xterm_new=xterm-old;;
8778 (*)      with_xterm_new=xterm-new;;
8779 esac
8780 echo "$as_me:8780: result: $with_xterm_new" >&5
8781 echo "${ECHO_T}$with_xterm_new" >&6
8782 WHICH_XTERM=$with_xterm_new
8783
8784 echo "$as_me:8784: checking if xterm backspace sends BS or DEL" >&5
8785 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8786
8787 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8788 if test "${with_xterm_kbs+set}" = set; then
8789   withval="$with_xterm_kbs"
8790   with_xterm_kbs=$withval
8791 else
8792   with_xterm_kbs=BS
8793 fi;
8794 case x$with_xterm_kbs in
8795 (xyes|xno|xBS|xbs|x8)
8796         with_xterm_kbs=BS
8797         ;;
8798 (xDEL|xdel|x127)
8799         with_xterm_kbs=DEL
8800         ;;
8801 (*)
8802         with_xterm_kbs=$withval
8803         ;;
8804 esac
8805 echo "$as_me:8805: result: $with_xterm_kbs" >&5
8806 echo "${ECHO_T}$with_xterm_kbs" >&6
8807 XTERM_KBS=$with_xterm_kbs
8808
8809 MAKE_TERMINFO=
8810 if test "$use_database" = no ; then
8811         TERMINFO="${datadir}/terminfo"
8812         MAKE_TERMINFO="#"
8813 else
8814
8815 echo "$as_me:8815: checking for list of terminfo directories" >&5
8816 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8817
8818 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8819 if test "${with_terminfo_dirs+set}" = set; then
8820   withval="$with_terminfo_dirs"
8821
8822 else
8823   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8824 fi;
8825 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8826 cf_dst_path=
8827 for cf_src_path in $withval
8828 do
8829
8830 if test "x$prefix" != xNONE; then
8831         cf_path_syntax="$prefix"
8832 else
8833         cf_path_syntax="$ac_default_prefix"
8834 fi
8835
8836 case ".$cf_src_path" in
8837 (.\$\(*\)*|.\'*\'*)
8838         ;;
8839 (..|./*|.\\*)
8840         ;;
8841 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8842         ;;
8843 (.\$\{*prefix\}*|.\$\{*dir\}*)
8844         eval cf_src_path="$cf_src_path"
8845         case ".$cf_src_path" in
8846         (.NONE/*)
8847                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8848                 ;;
8849         esac
8850         ;;
8851 (.no|.NONE/*)
8852         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8853         ;;
8854 (*)
8855         { { echo "$as_me:8855: error: expected a pathname, not \"$cf_src_path\"" >&5
8856 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8857    { (exit 1); exit 1; }; }
8858         ;;
8859 esac
8860
8861   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8862   cf_dst_path="${cf_dst_path}${cf_src_path}"
8863 done
8864 IFS="$ac_save_ifs"
8865
8866 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8867 # so we have to check/work around.  We do prefer the result of "eval"...
8868 eval cf_dst_eval="$cf_dst_path"
8869 case "x$cf_dst_eval" in
8870 (xNONE*)
8871         TERMINFO_DIRS=$cf_dst_path
8872         ;;
8873 (*)
8874         TERMINFO_DIRS="$cf_dst_eval"
8875         ;;
8876 esac
8877
8878 echo "$as_me:8878: result: $TERMINFO_DIRS" >&5
8879 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8880 test -n "$TERMINFO_DIRS" &&
8881 cat >>confdefs.h <<EOF
8882 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8883 EOF
8884
8885 case "x$TERMINFO" in
8886 x???:*)
8887         { echo "$as_me:8887: WARNING: ignoring non-directory/file TERMINFO value" >&5
8888 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8889         unset TERMINFO
8890         ;;
8891 esac
8892
8893 echo "$as_me:8893: checking for default terminfo directory" >&5
8894 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8895
8896 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8897 if test "${with_default_terminfo_dir+set}" = set; then
8898   withval="$with_default_terminfo_dir"
8899
8900 else
8901   withval="${TERMINFO:-${datadir}/terminfo}"
8902 fi; if test -n "${datadir}/terminfo" ; then
8903
8904 if test "x$prefix" != xNONE; then
8905         cf_path_syntax="$prefix"
8906 else
8907         cf_path_syntax="$ac_default_prefix"
8908 fi
8909
8910 case ".$withval" in
8911 (.\$\(*\)*|.\'*\'*)
8912         ;;
8913 (..|./*|.\\*)
8914         ;;
8915 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8916         ;;
8917 (.\$\{*prefix\}*|.\$\{*dir\}*)
8918         eval withval="$withval"
8919         case ".$withval" in
8920         (.NONE/*)
8921                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8922                 ;;
8923         esac
8924         ;;
8925 (.no|.NONE/*)
8926         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8927         ;;
8928 (*)
8929         { { echo "$as_me:8929: error: expected a pathname, not \"$withval\"" >&5
8930 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8931    { (exit 1); exit 1; }; }
8932         ;;
8933 esac
8934
8935 fi
8936 eval TERMINFO="$withval"
8937
8938 echo "$as_me:8938: result: $TERMINFO" >&5
8939 echo "${ECHO_T}$TERMINFO" >&6
8940
8941 cat >>confdefs.h <<EOF
8942 #define TERMINFO "$TERMINFO"
8943 EOF
8944
8945 fi
8946
8947 ###     use option --disable-big-core to make tic run on small machines
8948 ###     We need 4Mb, check if we can allocate 50% more than that.
8949 echo "$as_me:8949: checking if big-core option selected" >&5
8950 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8951
8952 # Check whether --enable-big-core or --disable-big-core was given.
8953 if test "${enable_big_core+set}" = set; then
8954   enableval="$enable_big_core"
8955   with_big_core=$enableval
8956 else
8957   if test "$cross_compiling" = yes; then
8958   with_big_core=no
8959 else
8960   cat >"conftest.$ac_ext" <<_ACEOF
8961 #line 8961 "configure"
8962 #include "confdefs.h"
8963
8964 #include <stdlib.h>
8965 #include <string.h>
8966 int main() {
8967         unsigned long n = 6000000L;
8968         char *s = malloc(n);
8969         if (s != 0)
8970                 s[0] = s[n-1] = 0;
8971         ${cf_cv_main_return:-return}(s == 0);
8972 }
8973 _ACEOF
8974 rm -f "conftest$ac_exeext"
8975 if { (eval echo "$as_me:8975: \"$ac_link\"") >&5
8976   (eval $ac_link) 2>&5
8977   ac_status=$?
8978   echo "$as_me:8978: \$? = $ac_status" >&5
8979   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8980   { (eval echo "$as_me:8980: \"$ac_try\"") >&5
8981   (eval $ac_try) 2>&5
8982   ac_status=$?
8983   echo "$as_me:8983: \$? = $ac_status" >&5
8984   (exit "$ac_status"); }; }; then
8985   with_big_core=yes
8986 else
8987   echo "$as_me: program exited with status $ac_status" >&5
8988 echo "$as_me: failed program was:" >&5
8989 cat "conftest.$ac_ext" >&5
8990 with_big_core=no
8991 fi
8992 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8993 fi
8994 fi;
8995 echo "$as_me:8995: result: $with_big_core" >&5
8996 echo "${ECHO_T}$with_big_core" >&6
8997 test "x$with_big_core" = "xyes" &&
8998 cat >>confdefs.h <<\EOF
8999 #define HAVE_BIG_CORE 1
9000 EOF
9001
9002 ### ISO C only guarantees 512-char strings, we have tables which load faster
9003 ### when constructed using "big" strings.  More than the C compiler, the awk
9004 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9005 echo "$as_me:9005: checking if big-strings option selected" >&5
9006 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9007
9008 # Check whether --enable-big-strings or --disable-big-strings was given.
9009 if test "${enable_big_strings+set}" = set; then
9010   enableval="$enable_big_strings"
9011   with_big_strings=$enableval
9012 else
9013
9014         case x$AWK in
9015         (x)
9016                 eval with_big_strings=no
9017                 ;;
9018         (*)
9019                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9020                         | $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
9021                         eval with_big_strings=yes
9022                 else
9023                         eval with_big_strings=no
9024                 fi
9025                 ;;
9026         esac
9027
9028 fi;
9029 echo "$as_me:9029: result: $with_big_strings" >&5
9030 echo "${ECHO_T}$with_big_strings" >&6
9031
9032 USE_BIG_STRINGS=0
9033 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9034
9035 ###     use option --enable-termcap to compile in the termcap fallback support
9036 echo "$as_me:9036: checking if you want termcap-fallback support" >&5
9037 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9038
9039 # Check whether --enable-termcap or --disable-termcap was given.
9040 if test "${enable_termcap+set}" = set; then
9041   enableval="$enable_termcap"
9042   with_termcap=$enableval
9043 else
9044   with_termcap=no
9045 fi;
9046 echo "$as_me:9046: result: $with_termcap" >&5
9047 echo "${ECHO_T}$with_termcap" >&6
9048
9049 NCURSES_USE_TERMCAP=0
9050 if test "x$with_termcap" != "xyes" ; then
9051         if test "$use_database" = no ; then
9052                 if test -z "$with_fallback" ; then
9053                         { { echo "$as_me:9053: error: You have disabled the database w/o specifying fallbacks" >&5
9054 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9055    { (exit 1); exit 1; }; }
9056                 fi
9057         fi
9058
9059 cat >>confdefs.h <<\EOF
9060 #define PURE_TERMINFO 1
9061 EOF
9062
9063 else
9064
9065         if test "$with_ticlib" != no ; then
9066                 { { echo "$as_me:9066: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9067 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9068    { (exit 1); exit 1; }; }
9069         fi
9070
9071         NCURSES_USE_TERMCAP=1
9072         echo "$as_me:9072: checking for list of termcap files" >&5
9073 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9074
9075 # Check whether --with-termpath or --without-termpath was given.
9076 if test "${with_termpath+set}" = set; then
9077   withval="$with_termpath"
9078
9079 else
9080   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9081 fi;
9082 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9083 cf_dst_path=
9084 for cf_src_path in $withval
9085 do
9086
9087 if test "x$prefix" != xNONE; then
9088         cf_path_syntax="$prefix"
9089 else
9090         cf_path_syntax="$ac_default_prefix"
9091 fi
9092
9093 case ".$cf_src_path" in
9094 (.\$\(*\)*|.\'*\'*)
9095         ;;
9096 (..|./*|.\\*)
9097         ;;
9098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9099         ;;
9100 (.\$\{*prefix\}*|.\$\{*dir\}*)
9101         eval cf_src_path="$cf_src_path"
9102         case ".$cf_src_path" in
9103         (.NONE/*)
9104                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9105                 ;;
9106         esac
9107         ;;
9108 (.no|.NONE/*)
9109         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9110         ;;
9111 (*)
9112         { { echo "$as_me:9112: error: expected a pathname, not \"$cf_src_path\"" >&5
9113 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9114    { (exit 1); exit 1; }; }
9115         ;;
9116 esac
9117
9118   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9119   cf_dst_path="${cf_dst_path}${cf_src_path}"
9120 done
9121 IFS="$ac_save_ifs"
9122
9123 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9124 # so we have to check/work around.  We do prefer the result of "eval"...
9125 eval cf_dst_eval="$cf_dst_path"
9126 case "x$cf_dst_eval" in
9127 (xNONE*)
9128         TERMPATH=$cf_dst_path
9129         ;;
9130 (*)
9131         TERMPATH="$cf_dst_eval"
9132         ;;
9133 esac
9134
9135         echo "$as_me:9135: result: $TERMPATH" >&5
9136 echo "${ECHO_T}$TERMPATH" >&6
9137         test -n "$TERMPATH" &&
9138 cat >>confdefs.h <<EOF
9139 #define TERMPATH "$TERMPATH"
9140 EOF
9141
9142         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9143         echo "$as_me:9143: checking if fast termcap-loader is needed" >&5
9144 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9145
9146 # Check whether --enable-getcap or --disable-getcap was given.
9147 if test "${enable_getcap+set}" = set; then
9148   enableval="$enable_getcap"
9149   with_getcap=$enableval
9150 else
9151   with_getcap=no
9152 fi;
9153         echo "$as_me:9153: result: $with_getcap" >&5
9154 echo "${ECHO_T}$with_getcap" >&6
9155         test "x$with_getcap" = "xyes" &&
9156 cat >>confdefs.h <<\EOF
9157 #define USE_GETCAP 1
9158 EOF
9159
9160         echo "$as_me:9160: checking if translated termcaps will be cached in ~/.terminfo" >&5
9161 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9162
9163 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9164 if test "${enable_getcap_cache+set}" = set; then
9165   enableval="$enable_getcap_cache"
9166   with_getcap_cache=$enableval
9167 else
9168   with_getcap_cache=no
9169 fi;
9170         echo "$as_me:9170: result: $with_getcap_cache" >&5
9171 echo "${ECHO_T}$with_getcap_cache" >&6
9172         test "x$with_getcap_cache" = "xyes" &&
9173 cat >>confdefs.h <<\EOF
9174 #define USE_GETCAP_CACHE 1
9175 EOF
9176
9177 fi
9178
9179 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9180 echo "$as_me:9180: checking if ~/.terminfo is wanted" >&5
9181 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9182
9183 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9184 if test "${enable_home_terminfo+set}" = set; then
9185   enableval="$enable_home_terminfo"
9186   with_home_terminfo=$enableval
9187 else
9188   with_home_terminfo=yes
9189 fi;
9190 echo "$as_me:9190: result: $with_home_terminfo" >&5
9191 echo "${ECHO_T}$with_home_terminfo" >&6
9192 test "x$with_home_terminfo" = "xyes" &&
9193 cat >>confdefs.h <<\EOF
9194 #define USE_HOME_TERMINFO 1
9195 EOF
9196
9197 echo "$as_me:9197: checking if you want to use restricted environment when running as root" >&5
9198 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9199
9200 # Check whether --enable-root-environ or --disable-root-environ was given.
9201 if test "${enable_root_environ+set}" = set; then
9202   enableval="$enable_root_environ"
9203   with_root_environ=$enableval
9204 else
9205   with_root_environ=yes
9206 fi;
9207 echo "$as_me:9207: result: $with_root_environ" >&5
9208 echo "${ECHO_T}$with_root_environ" >&6
9209 test "x$with_root_environ" = xyes &&
9210 cat >>confdefs.h <<\EOF
9211 #define USE_ROOT_ENVIRON 1
9212 EOF
9213
9214 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9215 ###   to reduce storage requirements for the terminfo database.
9216
9217 for ac_header in \
9218 unistd.h \
9219
9220 do
9221 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9222 echo "$as_me:9222: checking for $ac_header" >&5
9223 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227   cat >"conftest.$ac_ext" <<_ACEOF
9228 #line 9228 "configure"
9229 #include "confdefs.h"
9230 #include <$ac_header>
9231 _ACEOF
9232 if { (eval echo "$as_me:9232: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9233   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9234   ac_status=$?
9235   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9236   rm -f conftest.er1
9237   cat conftest.err >&5
9238   echo "$as_me:9238: \$? = $ac_status" >&5
9239   (exit "$ac_status"); } >/dev/null; then
9240   if test -s conftest.err; then
9241     ac_cpp_err=$ac_c_preproc_warn_flag
9242   else
9243     ac_cpp_err=
9244   fi
9245 else
9246   ac_cpp_err=yes
9247 fi
9248 if test -z "$ac_cpp_err"; then
9249   eval "$as_ac_Header=yes"
9250 else
9251   echo "$as_me: failed program was:" >&5
9252   cat "conftest.$ac_ext" >&5
9253   eval "$as_ac_Header=no"
9254 fi
9255 rm -f conftest.err "conftest.$ac_ext"
9256 fi
9257 echo "$as_me:9257: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9258 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9259 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9260   cat >>confdefs.h <<EOF
9261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9262 EOF
9263
9264 fi
9265 done
9266
9267 for ac_func in \
9268         remove \
9269         unlink
9270 do
9271 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9272 echo "$as_me:9272: checking for $ac_func" >&5
9273 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9274 if eval "test \"\${$as_ac_var+set}\" = set"; then
9275   echo $ECHO_N "(cached) $ECHO_C" >&6
9276 else
9277   cat >"conftest.$ac_ext" <<_ACEOF
9278 #line 9278 "configure"
9279 #include "confdefs.h"
9280 #define $ac_func autoconf_temporary
9281 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9282 #undef $ac_func
9283
9284 #ifdef __cplusplus
9285 extern "C"
9286 #endif
9287
9288 /* We use char because int might match the return type of a gcc2
9289    builtin and then its argument prototype would still apply.  */
9290 char $ac_func (void);
9291
9292 int
9293 main (void)
9294 {
9295
9296 /* The GNU C library defines stubs for functions which it implements
9297     to always fail with ENOSYS.  Some functions are actually named
9298     something starting with __ and the normal name is an alias.  */
9299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9300 #error found stub for $ac_func
9301 #endif
9302
9303         return $ac_func ();
9304   ;
9305   return 0;
9306 }
9307 _ACEOF
9308 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9309 if { (eval echo "$as_me:9309: \"$ac_link\"") >&5
9310   (eval $ac_link) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit "$ac_status"); } &&
9314          { ac_try='test -s "conftest$ac_exeext"'
9315   { (eval echo "$as_me:9315: \"$ac_try\"") >&5
9316   (eval $ac_try) 2>&5
9317   ac_status=$?
9318   echo "$as_me:9318: \$? = $ac_status" >&5
9319   (exit "$ac_status"); }; }; then
9320   eval "$as_ac_var=yes"
9321 else
9322   echo "$as_me: failed program was:" >&5
9323 cat "conftest.$ac_ext" >&5
9324 eval "$as_ac_var=no"
9325 fi
9326 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9327 fi
9328 echo "$as_me:9328: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9329 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9330 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9331   cat >>confdefs.h <<EOF
9332 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9333 EOF
9334
9335 fi
9336 done
9337
9338 if test "$cross_compiling" = yes ; then
9339
9340 for ac_func in \
9341                 link \
9342                 symlink
9343 do
9344 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9345 echo "$as_me:9345: checking for $ac_func" >&5
9346 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9347 if eval "test \"\${$as_ac_var+set}\" = set"; then
9348   echo $ECHO_N "(cached) $ECHO_C" >&6
9349 else
9350   cat >"conftest.$ac_ext" <<_ACEOF
9351 #line 9351 "configure"
9352 #include "confdefs.h"
9353 #define $ac_func autoconf_temporary
9354 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9355 #undef $ac_func
9356
9357 #ifdef __cplusplus
9358 extern "C"
9359 #endif
9360
9361 /* We use char because int might match the return type of a gcc2
9362    builtin and then its argument prototype would still apply.  */
9363 char $ac_func (void);
9364
9365 int
9366 main (void)
9367 {
9368
9369 /* The GNU C library defines stubs for functions which it implements
9370     to always fail with ENOSYS.  Some functions are actually named
9371     something starting with __ and the normal name is an alias.  */
9372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9373 #error found stub for $ac_func
9374 #endif
9375
9376         return $ac_func ();
9377   ;
9378   return 0;
9379 }
9380 _ACEOF
9381 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9382 if { (eval echo "$as_me:9382: \"$ac_link\"") >&5
9383   (eval $ac_link) 2>&5
9384   ac_status=$?
9385   echo "$as_me:9385: \$? = $ac_status" >&5
9386   (exit "$ac_status"); } &&
9387          { ac_try='test -s "conftest$ac_exeext"'
9388   { (eval echo "$as_me:9388: \"$ac_try\"") >&5
9389   (eval $ac_try) 2>&5
9390   ac_status=$?
9391   echo "$as_me:9391: \$? = $ac_status" >&5
9392   (exit "$ac_status"); }; }; then
9393   eval "$as_ac_var=yes"
9394 else
9395   echo "$as_me: failed program was:" >&5
9396 cat "conftest.$ac_ext" >&5
9397 eval "$as_ac_var=no"
9398 fi
9399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9400 fi
9401 echo "$as_me:9401: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9402 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9403 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9404   cat >>confdefs.h <<EOF
9405 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9406 EOF
9407
9408 fi
9409 done
9410
9411 else
9412         echo "$as_me:9412: checking if link/symlink functions work" >&5
9413 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9414 if test "${cf_cv_link_funcs+set}" = set; then
9415   echo $ECHO_N "(cached) $ECHO_C" >&6
9416 else
9417
9418                 cf_cv_link_funcs=
9419                 for cf_func in link symlink ; do
9420                         if test "$cross_compiling" = yes; then
9421
9422                         eval 'ac_cv_func_'$cf_func'=error'
9423 else
9424   cat >"conftest.$ac_ext" <<_ACEOF
9425 #line 9425 "configure"
9426 #include "confdefs.h"
9427
9428 #include <sys/types.h>
9429 #include <sys/stat.h>
9430 #ifdef HAVE_UNISTD_H
9431 #include <unistd.h>
9432 #endif
9433 int main(void)
9434 {
9435         int fail = 0;
9436         char *src = "config.log";
9437         char *dst = "conftest.chk";
9438         struct stat src_sb;
9439         struct stat dst_sb;
9440
9441         stat(src, &src_sb);
9442         fail = ($cf_func("config.log", "conftest.chk") < 0)
9443             || (stat(dst, &dst_sb) < 0)
9444             || (dst_sb.st_mtime != src_sb.st_mtime);
9445 #ifdef HAVE_UNLINK
9446         unlink(dst);
9447 #else
9448         remove(dst);
9449 #endif
9450         ${cf_cv_main_return:-return} (fail);
9451 }
9452
9453 _ACEOF
9454 rm -f "conftest$ac_exeext"
9455 if { (eval echo "$as_me:9455: \"$ac_link\"") >&5
9456   (eval $ac_link) 2>&5
9457   ac_status=$?
9458   echo "$as_me:9458: \$? = $ac_status" >&5
9459   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9460   { (eval echo "$as_me:9460: \"$ac_try\"") >&5
9461   (eval $ac_try) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit "$ac_status"); }; }; then
9465
9466                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9467                         eval 'ac_cv_func_'$cf_func'=yes'
9468 else
9469   echo "$as_me: program exited with status $ac_status" >&5
9470 echo "$as_me: failed program was:" >&5
9471 cat "conftest.$ac_ext" >&5
9472
9473                         eval 'ac_cv_func_'$cf_func'=no'
9474 fi
9475 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9476 fi
9477                 done
9478                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9479
9480 fi
9481 echo "$as_me:9481: result: $cf_cv_link_funcs" >&5
9482 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9483         test "$ac_cv_func_link"    = yes &&
9484 cat >>confdefs.h <<\EOF
9485 #define HAVE_LINK 1
9486 EOF
9487
9488         test "$ac_cv_func_symlink" = yes &&
9489 cat >>confdefs.h <<\EOF
9490 #define HAVE_SYMLINK 1
9491 EOF
9492
9493 fi
9494
9495 with_links=no
9496 with_symlinks=no
9497
9498 # soft links (symbolic links) are useful for some systems where hard links do
9499 # not work, or to make it simpler to copy terminfo trees around.
9500 if test "x$ac_cv_func_symlink" = xyes ; then
9501         echo "$as_me:9501: checking if tic should use symbolic links" >&5
9502 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9503
9504 # Check whether --enable-symlinks or --disable-symlinks was given.
9505 if test "${enable_symlinks+set}" = set; then
9506   enableval="$enable_symlinks"
9507   with_symlinks=$enableval
9508 else
9509   with_symlinks=no
9510 fi;
9511         echo "$as_me:9511: result: $with_symlinks" >&5
9512 echo "${ECHO_T}$with_symlinks" >&6
9513 fi
9514
9515 # If we have hard links and did not choose to use soft links instead, there is
9516 # no reason to make this choice optional - use the hard links.
9517 if test "$with_symlinks" = no ; then
9518         echo "$as_me:9518: checking if tic should use hard links" >&5
9519 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9520         if test "x$ac_cv_func_link" = xyes ; then
9521                 with_links=yes
9522         else
9523                 with_links=no
9524         fi
9525         echo "$as_me:9525: result: $with_links" >&5
9526 echo "${ECHO_T}$with_links" >&6
9527 fi
9528
9529 test "x$with_links" = xyes &&
9530 cat >>confdefs.h <<\EOF
9531 #define USE_LINKS 1
9532 EOF
9533
9534 test "x$with_symlinks" = xyes &&
9535 cat >>confdefs.h <<\EOF
9536 #define USE_SYMLINKS 1
9537 EOF
9538
9539 ###   use option --enable-broken-linker to force on use of broken-linker support
9540
9541 echo "$as_me:9541: checking if you want broken-linker support code" >&5
9542 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9543
9544 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9545 if test "${enable_broken_linker+set}" = set; then
9546   enableval="$enable_broken_linker"
9547   with_broken_linker=$enableval
9548 else
9549   with_broken_linker=no
9550 fi;
9551 echo "$as_me:9551: result: $with_broken_linker" >&5
9552 echo "${ECHO_T}$with_broken_linker" >&6
9553
9554 : "${BROKEN_LINKER:=0}"
9555 if test "x$with_broken_linker" = xyes ; then
9556
9557 cat >>confdefs.h <<\EOF
9558 #define BROKEN_LINKER 1
9559 EOF
9560
9561         BROKEN_LINKER=1
9562 fi
9563
9564 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9565 echo "$as_me:9565: checking if tputs should process BSD-style prefix padding" >&5
9566 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9567
9568 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9569 if test "${enable_bsdpad+set}" = set; then
9570   enableval="$enable_bsdpad"
9571   with_bsdpad=$enableval
9572 else
9573   with_bsdpad=no
9574 fi;
9575 echo "$as_me:9575: result: $with_bsdpad" >&5
9576 echo "${ECHO_T}$with_bsdpad" >&6
9577 test "x$with_bsdpad" = xyes &&
9578 cat >>confdefs.h <<\EOF
9579 #define BSD_TPUTS 1
9580 EOF
9581
9582 ###   use option --enable-widec to turn on use of wide-character support
9583 NCURSES_CH_T=chtype
9584 NCURSES_LIBUTF8=0
9585
9586 NEED_WCHAR_H=0
9587 NCURSES_MBSTATE_T=0
9588 NCURSES_WCHAR_T=0
9589 NCURSES_WINT_T=0
9590
9591 # Check to define _XOPEN_SOURCE "automatically"
9592 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9593
9594 echo "$as_me:9594: checking if the POSIX test-macros are already defined" >&5
9595 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9596 if test "${cf_cv_posix_visible+set}" = set; then
9597   echo $ECHO_N "(cached) $ECHO_C" >&6
9598 else
9599
9600 cat >"conftest.$ac_ext" <<_ACEOF
9601 #line 9601 "configure"
9602 #include "confdefs.h"
9603 #include <stdio.h>
9604 int
9605 main (void)
9606 {
9607
9608 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9609         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9610         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9611         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9612 #error conflicting symbols found
9613 #endif
9614
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -f "conftest.$ac_objext"
9620 if { (eval echo "$as_me:9620: \"$ac_compile\"") >&5
9621   (eval $ac_compile) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit "$ac_status"); } &&
9625          { ac_try='test -s "conftest.$ac_objext"'
9626   { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit "$ac_status"); }; }; then
9631   cf_cv_posix_visible=no
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat "conftest.$ac_ext" >&5
9635 cf_cv_posix_visible=yes
9636 fi
9637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9638
9639 fi
9640 echo "$as_me:9640: result: $cf_cv_posix_visible" >&5
9641 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9642
9643 if test "$cf_cv_posix_visible" = no; then
9644
9645 cf_XOPEN_SOURCE=600
9646 cf_POSIX_C_SOURCE=199506L
9647 cf_xopen_source=
9648
9649 case "$host_os" in
9650 (aix[4-7]*)
9651         cf_xopen_source="-D_ALL_SOURCE"
9652         ;;
9653 (msys)
9654         cf_XOPEN_SOURCE=600
9655         ;;
9656 (darwin[0-8].*)
9657         cf_xopen_source="-D_APPLE_C_SOURCE"
9658         ;;
9659 (darwin*)
9660         cf_xopen_source="-D_DARWIN_C_SOURCE"
9661         cf_XOPEN_SOURCE=
9662         ;;
9663 (freebsd*|dragonfly*|midnightbsd*)
9664         # 5.x headers associate
9665         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9666         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9667         cf_POSIX_C_SOURCE=200112L
9668         cf_XOPEN_SOURCE=600
9669         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9670         ;;
9671 (hpux11*)
9672         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9673         ;;
9674 (hpux*)
9675         cf_xopen_source="-D_HPUX_SOURCE"
9676         ;;
9677 (irix[56].*)
9678         cf_xopen_source="-D_SGI_SOURCE"
9679         cf_XOPEN_SOURCE=
9680         ;;
9681 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9682
9683 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9684
9685 echo "$as_me:9685: checking if this is the GNU C library" >&5
9686 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9687 if test "${cf_cv_gnu_library+set}" = set; then
9688   echo $ECHO_N "(cached) $ECHO_C" >&6
9689 else
9690
9691 cat >"conftest.$ac_ext" <<_ACEOF
9692 #line 9692 "configure"
9693 #include "confdefs.h"
9694 #include <sys/types.h>
9695 int
9696 main (void)
9697 {
9698
9699         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9700                 return 0;
9701         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9702                 return 0;
9703         #else
9704         #       error not GNU C library
9705         #endif
9706   ;
9707   return 0;
9708 }
9709 _ACEOF
9710 rm -f "conftest.$ac_objext"
9711 if { (eval echo "$as_me:9711: \"$ac_compile\"") >&5
9712   (eval $ac_compile) 2>&5
9713   ac_status=$?
9714   echo "$as_me:9714: \$? = $ac_status" >&5
9715   (exit "$ac_status"); } &&
9716          { ac_try='test -s "conftest.$ac_objext"'
9717   { (eval echo "$as_me:9717: \"$ac_try\"") >&5
9718   (eval $ac_try) 2>&5
9719   ac_status=$?
9720   echo "$as_me:9720: \$? = $ac_status" >&5
9721   (exit "$ac_status"); }; }; then
9722   cf_cv_gnu_library=yes
9723 else
9724   echo "$as_me: failed program was:" >&5
9725 cat "conftest.$ac_ext" >&5
9726 cf_cv_gnu_library=no
9727 fi
9728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9729
9730 fi
9731 echo "$as_me:9731: result: $cf_cv_gnu_library" >&5
9732 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9733
9734 if test x$cf_cv_gnu_library = xyes; then
9735
9736         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9737         # was changed to help a little.  newlib incorporated the change about 4
9738         # years later.
9739         echo "$as_me:9739: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9740 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9741 if test "${cf_cv_gnu_library_219+set}" = set; then
9742   echo $ECHO_N "(cached) $ECHO_C" >&6
9743 else
9744
9745                 cf_save="$CPPFLAGS"
9746
9747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9748         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9749
9750                 cat >"conftest.$ac_ext" <<_ACEOF
9751 #line 9751 "configure"
9752 #include "confdefs.h"
9753 #include <sys/types.h>
9754 int
9755 main (void)
9756 {
9757
9758                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9759                                 return 0;
9760                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9761                                 return 0;
9762                         #else
9763                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9764                         #endif
9765   ;
9766   return 0;
9767 }
9768 _ACEOF
9769 rm -f "conftest.$ac_objext"
9770 if { (eval echo "$as_me:9770: \"$ac_compile\"") >&5
9771   (eval $ac_compile) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit "$ac_status"); } &&
9775          { ac_try='test -s "conftest.$ac_objext"'
9776   { (eval echo "$as_me:9776: \"$ac_try\"") >&5
9777   (eval $ac_try) 2>&5
9778   ac_status=$?
9779   echo "$as_me:9779: \$? = $ac_status" >&5
9780   (exit "$ac_status"); }; }; then
9781   cf_cv_gnu_library_219=yes
9782 else
9783   echo "$as_me: failed program was:" >&5
9784 cat "conftest.$ac_ext" >&5
9785 cf_cv_gnu_library_219=no
9786 fi
9787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9788                 CPPFLAGS="$cf_save"
9789
9790 fi
9791 echo "$as_me:9791: result: $cf_cv_gnu_library_219" >&5
9792 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9793
9794         if test "x$cf_cv_gnu_library_219" = xyes; then
9795                 cf_save="$CPPFLAGS"
9796                 echo "$as_me:9796: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9797 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9798 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9799   echo $ECHO_N "(cached) $ECHO_C" >&6
9800 else
9801
9802 cf_fix_cppflags=no
9803 cf_new_cflags=
9804 cf_new_cppflags=
9805 cf_new_extra_cppflags=
9806
9807 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9808 do
9809 case "$cf_fix_cppflags" in
9810 (no)
9811         case "$cf_add_cflags" in
9812         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9813                 case "$cf_add_cflags" in
9814                 (-D*)
9815                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9816
9817                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9818                                 && test -z "${cf_tst_cflags}" \
9819                                 && cf_fix_cppflags=yes
9820
9821                         if test "$cf_fix_cppflags" = yes ; then
9822
9823         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9824         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9825
9826                                 continue
9827                         elif test "${cf_tst_cflags}" = "\"'" ; then
9828
9829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9831
9832                                 continue
9833                         fi
9834                         ;;
9835                 esac
9836                 case "$CPPFLAGS" in
9837                 (*$cf_add_cflags)
9838                         ;;
9839                 (*)
9840                         case "$cf_add_cflags" in
9841                         (-D*)
9842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9843
9844 CPPFLAGS=`echo "$CPPFLAGS" | \
9845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9847
9848                                 ;;
9849                         esac
9850
9851         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9852         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9853
9854                         ;;
9855                 esac
9856                 ;;
9857         (*)
9858
9859         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9860         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9861
9862                 ;;
9863         esac
9864         ;;
9865 (yes)
9866
9867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9869
9870         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9871
9872         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9873                 && test -z "${cf_tst_cflags}" \
9874                 && cf_fix_cppflags=no
9875         ;;
9876 esac
9877 done
9878
9879 if test -n "$cf_new_cflags" ; then
9880
9881         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9882         CFLAGS="${CFLAGS}$cf_new_cflags"
9883
9884 fi
9885
9886 if test -n "$cf_new_cppflags" ; then
9887
9888         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9889         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9890
9891 fi
9892
9893 if test -n "$cf_new_extra_cppflags" ; then
9894
9895         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9896         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9897
9898 fi
9899
9900                         cat >"conftest.$ac_ext" <<_ACEOF
9901 #line 9901 "configure"
9902 #include "confdefs.h"
9903
9904                                 #include <limits.h>
9905                                 #include <sys/types.h>
9906
9907 int
9908 main (void)
9909 {
9910
9911                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9912                                         return 0;
9913                                 #else
9914                                 #       error GNU C library is too old
9915                                 #endif
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -f "conftest.$ac_objext"
9921 if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit "$ac_status"); } &&
9926          { ac_try='test -s "conftest.$ac_objext"'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit "$ac_status"); }; }; then
9932   cf_cv_gnu_dftsrc_219=yes
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat "conftest.$ac_ext" >&5
9936 cf_cv_gnu_dftsrc_219=no
9937 fi
9938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9939
9940 fi
9941 echo "$as_me:9941: result: $cf_cv_gnu_dftsrc_219" >&5
9942 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9943                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9944         else
9945                 cf_cv_gnu_dftsrc_219=maybe
9946         fi
9947
9948         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9949
9950                 echo "$as_me:9950: checking if we must define _GNU_SOURCE" >&5
9951 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9952 if test "${cf_cv_gnu_source+set}" = set; then
9953   echo $ECHO_N "(cached) $ECHO_C" >&6
9954 else
9955
9956                 cat >"conftest.$ac_ext" <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9959 #include <sys/types.h>
9960 int
9961 main (void)
9962 {
9963
9964                         #ifndef _XOPEN_SOURCE
9965                         #error  expected _XOPEN_SOURCE to be defined
9966                         #endif
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 rm -f "conftest.$ac_objext"
9972 if { (eval echo "$as_me:9972: \"$ac_compile\"") >&5
9973   (eval $ac_compile) 2>&5
9974   ac_status=$?
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit "$ac_status"); } &&
9977          { ac_try='test -s "conftest.$ac_objext"'
9978   { (eval echo "$as_me:9978: \"$ac_try\"") >&5
9979   (eval $ac_try) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit "$ac_status"); }; }; then
9983   cf_cv_gnu_source=no
9984 else
9985   echo "$as_me: failed program was:" >&5
9986 cat "conftest.$ac_ext" >&5
9987 cf_save="$CPPFLAGS"
9988
9989 cf_fix_cppflags=no
9990 cf_new_cflags=
9991 cf_new_cppflags=
9992 cf_new_extra_cppflags=
9993
9994 for cf_add_cflags in -D_GNU_SOURCE
9995 do
9996 case "$cf_fix_cppflags" in
9997 (no)
9998         case "$cf_add_cflags" in
9999         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10000                 case "$cf_add_cflags" in
10001                 (-D*)
10002                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10003
10004                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10005                                 && test -z "${cf_tst_cflags}" \
10006                                 && cf_fix_cppflags=yes
10007
10008                         if test "$cf_fix_cppflags" = yes ; then
10009
10010         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10011         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10012
10013                                 continue
10014                         elif test "${cf_tst_cflags}" = "\"'" ; then
10015
10016         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10017         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10018
10019                                 continue
10020                         fi
10021                         ;;
10022                 esac
10023                 case "$CPPFLAGS" in
10024                 (*$cf_add_cflags)
10025                         ;;
10026                 (*)
10027                         case "$cf_add_cflags" in
10028                         (-D*)
10029                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10030
10031 CPPFLAGS=`echo "$CPPFLAGS" | \
10032         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10033                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10034
10035                                 ;;
10036                         esac
10037
10038         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10039         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10040
10041                         ;;
10042                 esac
10043                 ;;
10044         (*)
10045
10046         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10047         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10048
10049                 ;;
10050         esac
10051         ;;
10052 (yes)
10053
10054         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10055         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056
10057         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10058
10059         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10060                 && test -z "${cf_tst_cflags}" \
10061                 && cf_fix_cppflags=no
10062         ;;
10063 esac
10064 done
10065
10066 if test -n "$cf_new_cflags" ; then
10067
10068         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10069         CFLAGS="${CFLAGS}$cf_new_cflags"
10070
10071 fi
10072
10073 if test -n "$cf_new_cppflags" ; then
10074
10075         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10076         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10077
10078 fi
10079
10080 if test -n "$cf_new_extra_cppflags" ; then
10081
10082         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10083         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10084
10085 fi
10086
10087                          cat >"conftest.$ac_ext" <<_ACEOF
10088 #line 10088 "configure"
10089 #include "confdefs.h"
10090 #include <sys/types.h>
10091 int
10092 main (void)
10093 {
10094
10095                                 #ifdef _XOPEN_SOURCE
10096                                 #error  expected _XOPEN_SOURCE to be undefined
10097                                 #endif
10098   ;
10099   return 0;
10100 }
10101 _ACEOF
10102 rm -f "conftest.$ac_objext"
10103 if { (eval echo "$as_me:10103: \"$ac_compile\"") >&5
10104   (eval $ac_compile) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit "$ac_status"); } &&
10108          { ac_try='test -s "conftest.$ac_objext"'
10109   { (eval echo "$as_me:10109: \"$ac_try\"") >&5
10110   (eval $ac_try) 2>&5
10111   ac_status=$?
10112   echo "$as_me:10112: \$? = $ac_status" >&5
10113   (exit "$ac_status"); }; }; then
10114   cf_cv_gnu_source=no
10115 else
10116   echo "$as_me: failed program was:" >&5
10117 cat "conftest.$ac_ext" >&5
10118 cf_cv_gnu_source=yes
10119 fi
10120 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10121                         CPPFLAGS="$cf_save"
10122
10123 fi
10124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10125
10126 fi
10127 echo "$as_me:10127: result: $cf_cv_gnu_source" >&5
10128 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10129
10130                 if test "$cf_cv_gnu_source" = yes
10131                 then
10132                 echo "$as_me:10132: checking if we should also define _DEFAULT_SOURCE" >&5
10133 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10134 if test "${cf_cv_default_source+set}" = set; then
10135   echo $ECHO_N "(cached) $ECHO_C" >&6
10136 else
10137
10138         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10139         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10140
10141                         cat >"conftest.$ac_ext" <<_ACEOF
10142 #line 10142 "configure"
10143 #include "confdefs.h"
10144 #include <sys/types.h>
10145 int
10146 main (void)
10147 {
10148
10149                                 #ifdef _DEFAULT_SOURCE
10150                                 #error  expected _DEFAULT_SOURCE to be undefined
10151                                 #endif
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 rm -f "conftest.$ac_objext"
10157 if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5
10158   (eval $ac_compile) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit "$ac_status"); } &&
10162          { ac_try='test -s "conftest.$ac_objext"'
10163   { (eval echo "$as_me:10163: \"$ac_try\"") >&5
10164   (eval $ac_try) 2>&5
10165   ac_status=$?
10166   echo "$as_me:10166: \$? = $ac_status" >&5
10167   (exit "$ac_status"); }; }; then
10168   cf_cv_default_source=no
10169 else
10170   echo "$as_me: failed program was:" >&5
10171 cat "conftest.$ac_ext" >&5
10172 cf_cv_default_source=yes
10173 fi
10174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10175
10176 fi
10177 echo "$as_me:10177: result: $cf_cv_default_source" >&5
10178 echo "${ECHO_T}$cf_cv_default_source" >&6
10179                         if test "$cf_cv_default_source" = yes
10180                         then
10181
10182         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10183         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10184
10185                         fi
10186                 fi
10187         fi
10188
10189 fi
10190
10191         ;;
10192 (minix*)
10193         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10194         ;;
10195 (mirbsd*)
10196         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10197         cf_XOPEN_SOURCE=
10198
10199 if test "$cf_cv_posix_visible" = no; then
10200
10201 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10202
10203 cf_save_CFLAGS="$CFLAGS"
10204 cf_save_CPPFLAGS="$CPPFLAGS"
10205
10206 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10207         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10208                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10209
10210 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10211         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10212                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10213
10214 echo "$as_me:10214: checking if we should define _POSIX_C_SOURCE" >&5
10215 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10216 if test "${cf_cv_posix_c_source+set}" = set; then
10217   echo $ECHO_N "(cached) $ECHO_C" >&6
10218 else
10219
10220 echo "${as_me:-configure}:10220: testing if the symbol is already defined go no further ..." 1>&5
10221
10222         cat >"conftest.$ac_ext" <<_ACEOF
10223 #line 10223 "configure"
10224 #include "confdefs.h"
10225 #include <sys/types.h>
10226 int
10227 main (void)
10228 {
10229
10230 #ifndef _POSIX_C_SOURCE
10231 make an error
10232 #endif
10233   ;
10234   return 0;
10235 }
10236 _ACEOF
10237 rm -f "conftest.$ac_objext"
10238 if { (eval echo "$as_me:10238: \"$ac_compile\"") >&5
10239   (eval $ac_compile) 2>&5
10240   ac_status=$?
10241   echo "$as_me:10241: \$? = $ac_status" >&5
10242   (exit "$ac_status"); } &&
10243          { ac_try='test -s "conftest.$ac_objext"'
10244   { (eval echo "$as_me:10244: \"$ac_try\"") >&5
10245   (eval $ac_try) 2>&5
10246   ac_status=$?
10247   echo "$as_me:10247: \$? = $ac_status" >&5
10248   (exit "$ac_status"); }; }; then
10249   cf_cv_posix_c_source=no
10250 else
10251   echo "$as_me: failed program was:" >&5
10252 cat "conftest.$ac_ext" >&5
10253 cf_want_posix_source=no
10254          case .$cf_POSIX_C_SOURCE in
10255          (.[12]??*)
10256                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10257                 ;;
10258          (.2)
10259                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10260                 cf_want_posix_source=yes
10261                 ;;
10262          (.*)
10263                 cf_want_posix_source=yes
10264                 ;;
10265          esac
10266          if test "$cf_want_posix_source" = yes ; then
10267                 cat >"conftest.$ac_ext" <<_ACEOF
10268 #line 10268 "configure"
10269 #include "confdefs.h"
10270 #include <sys/types.h>
10271 int
10272 main (void)
10273 {
10274
10275 #ifdef _POSIX_SOURCE
10276 make an error
10277 #endif
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f "conftest.$ac_objext"
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit "$ac_status"); } &&
10288          { ac_try='test -s "conftest.$ac_objext"'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit "$ac_status"); }; }; then
10294   :
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat "conftest.$ac_ext" >&5
10298 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10299 fi
10300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10301          fi
10302
10303 echo "${as_me:-configure}:10303: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10304
10305          CFLAGS="$cf_trim_CFLAGS"
10306          CPPFLAGS="$cf_trim_CPPFLAGS"
10307
10308         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10309         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10310
10311 echo "${as_me:-configure}:10311: testing if the second compile does not leave our definition intact error ..." 1>&5
10312
10313          cat >"conftest.$ac_ext" <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316 #include <sys/types.h>
10317 int
10318 main (void)
10319 {
10320
10321 #ifndef _POSIX_C_SOURCE
10322 make an error
10323 #endif
10324   ;
10325   return 0;
10326 }
10327 _ACEOF
10328 rm -f "conftest.$ac_objext"
10329 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330   (eval $ac_compile) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit "$ac_status"); } &&
10334          { ac_try='test -s "conftest.$ac_objext"'
10335   { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336   (eval $ac_try) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit "$ac_status"); }; }; then
10340   :
10341 else
10342   echo "$as_me: failed program was:" >&5
10343 cat "conftest.$ac_ext" >&5
10344 cf_cv_posix_c_source=no
10345 fi
10346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10347          CFLAGS="$cf_save_CFLAGS"
10348          CPPFLAGS="$cf_save_CPPFLAGS"
10349
10350 fi
10351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10352
10353 fi
10354 echo "$as_me:10354: result: $cf_cv_posix_c_source" >&5
10355 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10356
10357 if test "$cf_cv_posix_c_source" != no ; then
10358         CFLAGS="$cf_trim_CFLAGS"
10359         CPPFLAGS="$cf_trim_CPPFLAGS"
10360
10361 cf_fix_cppflags=no
10362 cf_new_cflags=
10363 cf_new_cppflags=
10364 cf_new_extra_cppflags=
10365
10366 for cf_add_cflags in $cf_cv_posix_c_source
10367 do
10368 case "$cf_fix_cppflags" in
10369 (no)
10370         case "$cf_add_cflags" in
10371         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10372                 case "$cf_add_cflags" in
10373                 (-D*)
10374                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10375
10376                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10377                                 && test -z "${cf_tst_cflags}" \
10378                                 && cf_fix_cppflags=yes
10379
10380                         if test "$cf_fix_cppflags" = yes ; then
10381
10382         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10383         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10384
10385                                 continue
10386                         elif test "${cf_tst_cflags}" = "\"'" ; then
10387
10388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10390
10391                                 continue
10392                         fi
10393                         ;;
10394                 esac
10395                 case "$CPPFLAGS" in
10396                 (*$cf_add_cflags)
10397                         ;;
10398                 (*)
10399                         case "$cf_add_cflags" in
10400                         (-D*)
10401                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10402
10403 CPPFLAGS=`echo "$CPPFLAGS" | \
10404         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10405                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10406
10407                                 ;;
10408                         esac
10409
10410         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10411         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10412
10413                         ;;
10414                 esac
10415                 ;;
10416         (*)
10417
10418         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10419         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10420
10421                 ;;
10422         esac
10423         ;;
10424 (yes)
10425
10426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10428
10429         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10430
10431         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10432                 && test -z "${cf_tst_cflags}" \
10433                 && cf_fix_cppflags=no
10434         ;;
10435 esac
10436 done
10437
10438 if test -n "$cf_new_cflags" ; then
10439
10440         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10441         CFLAGS="${CFLAGS}$cf_new_cflags"
10442
10443 fi
10444
10445 if test -n "$cf_new_cppflags" ; then
10446
10447         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10448         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10449
10450 fi
10451
10452 if test -n "$cf_new_extra_cppflags" ; then
10453
10454         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10455         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10456
10457 fi
10458
10459 fi
10460
10461 fi # cf_cv_posix_visible
10462
10463         ;;
10464 (netbsd*)
10465         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10466         ;;
10467 (openbsd[4-9]*)
10468         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10469         cf_xopen_source="-D_BSD_SOURCE"
10470         cf_XOPEN_SOURCE=600
10471         ;;
10472 (openbsd*)
10473         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10474         ;;
10475 (osf[45]*)
10476         cf_xopen_source="-D_OSF_SOURCE"
10477         ;;
10478 (nto-qnx*)
10479         cf_xopen_source="-D_QNX_SOURCE"
10480         ;;
10481 (sco*)
10482         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10483         ;;
10484 (solaris2.*)
10485         cf_xopen_source="-D__EXTENSIONS__"
10486         cf_cv_xopen_source=broken
10487         ;;
10488 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10489         cf_XOPEN_SOURCE=
10490         cf_POSIX_C_SOURCE=
10491         ;;
10492 (*)
10493
10494 echo "$as_me:10494: checking if we should define _XOPEN_SOURCE" >&5
10495 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10496 if test "${cf_cv_xopen_source+set}" = set; then
10497   echo $ECHO_N "(cached) $ECHO_C" >&6
10498 else
10499
10500         cat >"conftest.$ac_ext" <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503
10504 #include <stdlib.h>
10505 #include <string.h>
10506 #include <sys/types.h>
10507
10508 int
10509 main (void)
10510 {
10511
10512 #ifndef _XOPEN_SOURCE
10513 make an error
10514 #endif
10515   ;
10516   return 0;
10517 }
10518 _ACEOF
10519 rm -f "conftest.$ac_objext"
10520 if { (eval echo "$as_me:10520: \"$ac_compile\"") >&5
10521   (eval $ac_compile) 2>&5
10522   ac_status=$?
10523   echo "$as_me:10523: \$? = $ac_status" >&5
10524   (exit "$ac_status"); } &&
10525          { ac_try='test -s "conftest.$ac_objext"'
10526   { (eval echo "$as_me:10526: \"$ac_try\"") >&5
10527   (eval $ac_try) 2>&5
10528   ac_status=$?
10529   echo "$as_me:10529: \$? = $ac_status" >&5
10530   (exit "$ac_status"); }; }; then
10531   cf_cv_xopen_source=no
10532 else
10533   echo "$as_me: failed program was:" >&5
10534 cat "conftest.$ac_ext" >&5
10535 cf_save="$CPPFLAGS"
10536
10537         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10538         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10539
10540          cat >"conftest.$ac_ext" <<_ACEOF
10541 #line 10541 "configure"
10542 #include "confdefs.h"
10543
10544 #include <stdlib.h>
10545 #include <string.h>
10546 #include <sys/types.h>
10547
10548 int
10549 main (void)
10550 {
10551
10552 #ifdef _XOPEN_SOURCE
10553 make an error
10554 #endif
10555   ;
10556   return 0;
10557 }
10558 _ACEOF
10559 rm -f "conftest.$ac_objext"
10560 if { (eval echo "$as_me:10560: \"$ac_compile\"") >&5
10561   (eval $ac_compile) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit "$ac_status"); } &&
10565          { ac_try='test -s "conftest.$ac_objext"'
10566   { (eval echo "$as_me:10566: \"$ac_try\"") >&5
10567   (eval $ac_try) 2>&5
10568   ac_status=$?
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit "$ac_status"); }; }; then
10571   cf_cv_xopen_source=no
10572 else
10573   echo "$as_me: failed program was:" >&5
10574 cat "conftest.$ac_ext" >&5
10575 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10576 fi
10577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10578         CPPFLAGS="$cf_save"
10579
10580 fi
10581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10582
10583 fi
10584 echo "$as_me:10584: result: $cf_cv_xopen_source" >&5
10585 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10586
10587 if test "$cf_cv_xopen_source" != no ; then
10588
10589 CFLAGS=`echo "$CFLAGS" | \
10590         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10591                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10592
10593 CPPFLAGS=`echo "$CPPFLAGS" | \
10594         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10595                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10596
10597         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10598
10599 cf_fix_cppflags=no
10600 cf_new_cflags=
10601 cf_new_cppflags=
10602 cf_new_extra_cppflags=
10603
10604 for cf_add_cflags in $cf_temp_xopen_source
10605 do
10606 case "$cf_fix_cppflags" in
10607 (no)
10608         case "$cf_add_cflags" in
10609         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10610                 case "$cf_add_cflags" in
10611                 (-D*)
10612                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10613
10614                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10615                                 && test -z "${cf_tst_cflags}" \
10616                                 && cf_fix_cppflags=yes
10617
10618                         if test "$cf_fix_cppflags" = yes ; then
10619
10620         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10621         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10622
10623                                 continue
10624                         elif test "${cf_tst_cflags}" = "\"'" ; then
10625
10626         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10627         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10628
10629                                 continue
10630                         fi
10631                         ;;
10632                 esac
10633                 case "$CPPFLAGS" in
10634                 (*$cf_add_cflags)
10635                         ;;
10636                 (*)
10637                         case "$cf_add_cflags" in
10638                         (-D*)
10639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10640
10641 CPPFLAGS=`echo "$CPPFLAGS" | \
10642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10644
10645                                 ;;
10646                         esac
10647
10648         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10649         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10650
10651                         ;;
10652                 esac
10653                 ;;
10654         (*)
10655
10656         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10657         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10658
10659                 ;;
10660         esac
10661         ;;
10662 (yes)
10663
10664         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10665         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10666
10667         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10668
10669         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10670                 && test -z "${cf_tst_cflags}" \
10671                 && cf_fix_cppflags=no
10672         ;;
10673 esac
10674 done
10675
10676 if test -n "$cf_new_cflags" ; then
10677
10678         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10679         CFLAGS="${CFLAGS}$cf_new_cflags"
10680
10681 fi
10682
10683 if test -n "$cf_new_cppflags" ; then
10684
10685         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10686         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10687
10688 fi
10689
10690 if test -n "$cf_new_extra_cppflags" ; then
10691
10692         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10693         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10694
10695 fi
10696
10697 fi
10698
10699 if test "$cf_cv_posix_visible" = no; then
10700
10701 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10702
10703 cf_save_CFLAGS="$CFLAGS"
10704 cf_save_CPPFLAGS="$CPPFLAGS"
10705
10706 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10707         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10708                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10709
10710 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10711         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10712                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10713
10714 echo "$as_me:10714: checking if we should define _POSIX_C_SOURCE" >&5
10715 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10716 if test "${cf_cv_posix_c_source+set}" = set; then
10717   echo $ECHO_N "(cached) $ECHO_C" >&6
10718 else
10719
10720 echo "${as_me:-configure}:10720: testing if the symbol is already defined go no further ..." 1>&5
10721
10722         cat >"conftest.$ac_ext" <<_ACEOF
10723 #line 10723 "configure"
10724 #include "confdefs.h"
10725 #include <sys/types.h>
10726 int
10727 main (void)
10728 {
10729
10730 #ifndef _POSIX_C_SOURCE
10731 make an error
10732 #endif
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 rm -f "conftest.$ac_objext"
10738 if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5
10739   (eval $ac_compile) 2>&5
10740   ac_status=$?
10741   echo "$as_me:10741: \$? = $ac_status" >&5
10742   (exit "$ac_status"); } &&
10743          { ac_try='test -s "conftest.$ac_objext"'
10744   { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745   (eval $ac_try) 2>&5
10746   ac_status=$?
10747   echo "$as_me:10747: \$? = $ac_status" >&5
10748   (exit "$ac_status"); }; }; then
10749   cf_cv_posix_c_source=no
10750 else
10751   echo "$as_me: failed program was:" >&5
10752 cat "conftest.$ac_ext" >&5
10753 cf_want_posix_source=no
10754          case .$cf_POSIX_C_SOURCE in
10755          (.[12]??*)
10756                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10757                 ;;
10758          (.2)
10759                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10760                 cf_want_posix_source=yes
10761                 ;;
10762          (.*)
10763                 cf_want_posix_source=yes
10764                 ;;
10765          esac
10766          if test "$cf_want_posix_source" = yes ; then
10767                 cat >"conftest.$ac_ext" <<_ACEOF
10768 #line 10768 "configure"
10769 #include "confdefs.h"
10770 #include <sys/types.h>
10771 int
10772 main (void)
10773 {
10774
10775 #ifdef _POSIX_SOURCE
10776 make an error
10777 #endif
10778   ;
10779   return 0;
10780 }
10781 _ACEOF
10782 rm -f "conftest.$ac_objext"
10783 if { (eval echo "$as_me:10783: \"$ac_compile\"") >&5
10784   (eval $ac_compile) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit "$ac_status"); } &&
10788          { ac_try='test -s "conftest.$ac_objext"'
10789   { (eval echo "$as_me:10789: \"$ac_try\"") >&5
10790   (eval $ac_try) 2>&5
10791   ac_status=$?
10792   echo "$as_me:10792: \$? = $ac_status" >&5
10793   (exit "$ac_status"); }; }; then
10794   :
10795 else
10796   echo "$as_me: failed program was:" >&5
10797 cat "conftest.$ac_ext" >&5
10798 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10799 fi
10800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10801          fi
10802
10803 echo "${as_me:-configure}:10803: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10804
10805          CFLAGS="$cf_trim_CFLAGS"
10806          CPPFLAGS="$cf_trim_CPPFLAGS"
10807
10808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10809         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10810
10811 echo "${as_me:-configure}:10811: testing if the second compile does not leave our definition intact error ..." 1>&5
10812
10813          cat >"conftest.$ac_ext" <<_ACEOF
10814 #line 10814 "configure"
10815 #include "confdefs.h"
10816 #include <sys/types.h>
10817 int
10818 main (void)
10819 {
10820
10821 #ifndef _POSIX_C_SOURCE
10822 make an error
10823 #endif
10824   ;
10825   return 0;
10826 }
10827 _ACEOF
10828 rm -f "conftest.$ac_objext"
10829 if { (eval echo "$as_me:10829: \"$ac_compile\"") >&5
10830   (eval $ac_compile) 2>&5
10831   ac_status=$?
10832   echo "$as_me:10832: \$? = $ac_status" >&5
10833   (exit "$ac_status"); } &&
10834          { ac_try='test -s "conftest.$ac_objext"'
10835   { (eval echo "$as_me:10835: \"$ac_try\"") >&5
10836   (eval $ac_try) 2>&5
10837   ac_status=$?
10838   echo "$as_me:10838: \$? = $ac_status" >&5
10839   (exit "$ac_status"); }; }; then
10840   :
10841 else
10842   echo "$as_me: failed program was:" >&5
10843 cat "conftest.$ac_ext" >&5
10844 cf_cv_posix_c_source=no
10845 fi
10846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10847          CFLAGS="$cf_save_CFLAGS"
10848          CPPFLAGS="$cf_save_CPPFLAGS"
10849
10850 fi
10851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10852
10853 fi
10854 echo "$as_me:10854: result: $cf_cv_posix_c_source" >&5
10855 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10856
10857 if test "$cf_cv_posix_c_source" != no ; then
10858         CFLAGS="$cf_trim_CFLAGS"
10859         CPPFLAGS="$cf_trim_CPPFLAGS"
10860
10861 cf_fix_cppflags=no
10862 cf_new_cflags=
10863 cf_new_cppflags=
10864 cf_new_extra_cppflags=
10865
10866 for cf_add_cflags in $cf_cv_posix_c_source
10867 do
10868 case "$cf_fix_cppflags" in
10869 (no)
10870         case "$cf_add_cflags" in
10871         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10872                 case "$cf_add_cflags" in
10873                 (-D*)
10874                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10875
10876                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10877                                 && test -z "${cf_tst_cflags}" \
10878                                 && cf_fix_cppflags=yes
10879
10880                         if test "$cf_fix_cppflags" = yes ; then
10881
10882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10884
10885                                 continue
10886                         elif test "${cf_tst_cflags}" = "\"'" ; then
10887
10888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10890
10891                                 continue
10892                         fi
10893                         ;;
10894                 esac
10895                 case "$CPPFLAGS" in
10896                 (*$cf_add_cflags)
10897                         ;;
10898                 (*)
10899                         case "$cf_add_cflags" in
10900                         (-D*)
10901                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10902
10903 CPPFLAGS=`echo "$CPPFLAGS" | \
10904         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10905                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10906
10907                                 ;;
10908                         esac
10909
10910         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10911         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10912
10913                         ;;
10914                 esac
10915                 ;;
10916         (*)
10917
10918         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10919         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10920
10921                 ;;
10922         esac
10923         ;;
10924 (yes)
10925
10926         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10927         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10928
10929         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10930
10931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10932                 && test -z "${cf_tst_cflags}" \
10933                 && cf_fix_cppflags=no
10934         ;;
10935 esac
10936 done
10937
10938 if test -n "$cf_new_cflags" ; then
10939
10940         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10941         CFLAGS="${CFLAGS}$cf_new_cflags"
10942
10943 fi
10944
10945 if test -n "$cf_new_cppflags" ; then
10946
10947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10948         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10949
10950 fi
10951
10952 if test -n "$cf_new_extra_cppflags" ; then
10953
10954         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10955         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10956
10957 fi
10958
10959 fi
10960
10961 fi # cf_cv_posix_visible
10962
10963         ;;
10964 esac
10965
10966 if test -n "$cf_xopen_source" ; then
10967
10968 cf_fix_cppflags=no
10969 cf_new_cflags=
10970 cf_new_cppflags=
10971 cf_new_extra_cppflags=
10972
10973 for cf_add_cflags in $cf_xopen_source
10974 do
10975 case "$cf_fix_cppflags" in
10976 (no)
10977         case "$cf_add_cflags" in
10978         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10979                 case "$cf_add_cflags" in
10980                 (-D*)
10981                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10982
10983                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10984                                 && test -z "${cf_tst_cflags}" \
10985                                 && cf_fix_cppflags=yes
10986
10987                         if test "$cf_fix_cppflags" = yes ; then
10988
10989         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10990         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10991
10992                                 continue
10993                         elif test "${cf_tst_cflags}" = "\"'" ; then
10994
10995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10997
10998                                 continue
10999                         fi
11000                         ;;
11001                 esac
11002                 case "$CPPFLAGS" in
11003                 (*$cf_add_cflags)
11004                         ;;
11005                 (*)
11006                         case "$cf_add_cflags" in
11007                         (-D*)
11008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11009
11010 CPPFLAGS=`echo "$CPPFLAGS" | \
11011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11013
11014                                 ;;
11015                         esac
11016
11017         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11018         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11019
11020                         ;;
11021                 esac
11022                 ;;
11023         (*)
11024
11025         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11026         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11027
11028                 ;;
11029         esac
11030         ;;
11031 (yes)
11032
11033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11035
11036         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11037
11038         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11039                 && test -z "${cf_tst_cflags}" \
11040                 && cf_fix_cppflags=no
11041         ;;
11042 esac
11043 done
11044
11045 if test -n "$cf_new_cflags" ; then
11046         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11047
11048 echo "${as_me:-configure}:11048: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
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         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11057
11058 echo "${as_me:-configure}:11058: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11059
11060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11061         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11062
11063 fi
11064
11065 if test -n "$cf_new_extra_cppflags" ; then
11066         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11067
11068 echo "${as_me:-configure}:11068: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11069
11070         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11071         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11072
11073 fi
11074
11075 fi
11076
11077 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11078         echo "$as_me:11078: checking if _XOPEN_SOURCE really is set" >&5
11079 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11080         cat >"conftest.$ac_ext" <<_ACEOF
11081 #line 11081 "configure"
11082 #include "confdefs.h"
11083 #include <stdlib.h>
11084 int
11085 main (void)
11086 {
11087
11088 #ifndef _XOPEN_SOURCE
11089 make an error
11090 #endif
11091   ;
11092   return 0;
11093 }
11094 _ACEOF
11095 rm -f "conftest.$ac_objext"
11096 if { (eval echo "$as_me:11096: \"$ac_compile\"") >&5
11097   (eval $ac_compile) 2>&5
11098   ac_status=$?
11099   echo "$as_me:11099: \$? = $ac_status" >&5
11100   (exit "$ac_status"); } &&
11101          { ac_try='test -s "conftest.$ac_objext"'
11102   { (eval echo "$as_me:11102: \"$ac_try\"") >&5
11103   (eval $ac_try) 2>&5
11104   ac_status=$?
11105   echo "$as_me:11105: \$? = $ac_status" >&5
11106   (exit "$ac_status"); }; }; then
11107   cf_XOPEN_SOURCE_set=yes
11108 else
11109   echo "$as_me: failed program was:" >&5
11110 cat "conftest.$ac_ext" >&5
11111 cf_XOPEN_SOURCE_set=no
11112 fi
11113 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11114         echo "$as_me:11114: result: $cf_XOPEN_SOURCE_set" >&5
11115 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11116         if test "$cf_XOPEN_SOURCE_set" = yes
11117         then
11118                 cat >"conftest.$ac_ext" <<_ACEOF
11119 #line 11119 "configure"
11120 #include "confdefs.h"
11121 #include <stdlib.h>
11122 int
11123 main (void)
11124 {
11125
11126 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11127 make an error
11128 #endif
11129   ;
11130   return 0;
11131 }
11132 _ACEOF
11133 rm -f "conftest.$ac_objext"
11134 if { (eval echo "$as_me:11134: \"$ac_compile\"") >&5
11135   (eval $ac_compile) 2>&5
11136   ac_status=$?
11137   echo "$as_me:11137: \$? = $ac_status" >&5
11138   (exit "$ac_status"); } &&
11139          { ac_try='test -s "conftest.$ac_objext"'
11140   { (eval echo "$as_me:11140: \"$ac_try\"") >&5
11141   (eval $ac_try) 2>&5
11142   ac_status=$?
11143   echo "$as_me:11143: \$? = $ac_status" >&5
11144   (exit "$ac_status"); }; }; then
11145   cf_XOPEN_SOURCE_set_ok=yes
11146 else
11147   echo "$as_me: failed program was:" >&5
11148 cat "conftest.$ac_ext" >&5
11149 cf_XOPEN_SOURCE_set_ok=no
11150 fi
11151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11152                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11153                 then
11154                         { echo "$as_me:11154: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11155 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11156                 fi
11157         else
11158
11159 echo "$as_me:11159: checking if we should define _XOPEN_SOURCE" >&5
11160 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11161 if test "${cf_cv_xopen_source+set}" = set; then
11162   echo $ECHO_N "(cached) $ECHO_C" >&6
11163 else
11164
11165         cat >"conftest.$ac_ext" <<_ACEOF
11166 #line 11166 "configure"
11167 #include "confdefs.h"
11168
11169 #include <stdlib.h>
11170 #include <string.h>
11171 #include <sys/types.h>
11172
11173 int
11174 main (void)
11175 {
11176
11177 #ifndef _XOPEN_SOURCE
11178 make an error
11179 #endif
11180   ;
11181   return 0;
11182 }
11183 _ACEOF
11184 rm -f "conftest.$ac_objext"
11185 if { (eval echo "$as_me:11185: \"$ac_compile\"") >&5
11186   (eval $ac_compile) 2>&5
11187   ac_status=$?
11188   echo "$as_me:11188: \$? = $ac_status" >&5
11189   (exit "$ac_status"); } &&
11190          { ac_try='test -s "conftest.$ac_objext"'
11191   { (eval echo "$as_me:11191: \"$ac_try\"") >&5
11192   (eval $ac_try) 2>&5
11193   ac_status=$?
11194   echo "$as_me:11194: \$? = $ac_status" >&5
11195   (exit "$ac_status"); }; }; then
11196   cf_cv_xopen_source=no
11197 else
11198   echo "$as_me: failed program was:" >&5
11199 cat "conftest.$ac_ext" >&5
11200 cf_save="$CPPFLAGS"
11201
11202         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11203         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11204
11205          cat >"conftest.$ac_ext" <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11208
11209 #include <stdlib.h>
11210 #include <string.h>
11211 #include <sys/types.h>
11212
11213 int
11214 main (void)
11215 {
11216
11217 #ifdef _XOPEN_SOURCE
11218 make an error
11219 #endif
11220   ;
11221   return 0;
11222 }
11223 _ACEOF
11224 rm -f "conftest.$ac_objext"
11225 if { (eval echo "$as_me:11225: \"$ac_compile\"") >&5
11226   (eval $ac_compile) 2>&5
11227   ac_status=$?
11228   echo "$as_me:11228: \$? = $ac_status" >&5
11229   (exit "$ac_status"); } &&
11230          { ac_try='test -s "conftest.$ac_objext"'
11231   { (eval echo "$as_me:11231: \"$ac_try\"") >&5
11232   (eval $ac_try) 2>&5
11233   ac_status=$?
11234   echo "$as_me:11234: \$? = $ac_status" >&5
11235   (exit "$ac_status"); }; }; then
11236   cf_cv_xopen_source=no
11237 else
11238   echo "$as_me: failed program was:" >&5
11239 cat "conftest.$ac_ext" >&5
11240 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11241 fi
11242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11243         CPPFLAGS="$cf_save"
11244
11245 fi
11246 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11247
11248 fi
11249 echo "$as_me:11249: result: $cf_cv_xopen_source" >&5
11250 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11251
11252 if test "$cf_cv_xopen_source" != no ; then
11253
11254 CFLAGS=`echo "$CFLAGS" | \
11255         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11256                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11257
11258 CPPFLAGS=`echo "$CPPFLAGS" | \
11259         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11260                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11261
11262         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11263
11264 cf_fix_cppflags=no
11265 cf_new_cflags=
11266 cf_new_cppflags=
11267 cf_new_extra_cppflags=
11268
11269 for cf_add_cflags in $cf_temp_xopen_source
11270 do
11271 case "$cf_fix_cppflags" in
11272 (no)
11273         case "$cf_add_cflags" in
11274         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11275                 case "$cf_add_cflags" in
11276                 (-D*)
11277                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11278
11279                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11280                                 && test -z "${cf_tst_cflags}" \
11281                                 && cf_fix_cppflags=yes
11282
11283                         if test "$cf_fix_cppflags" = yes ; then
11284
11285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11287
11288                                 continue
11289                         elif test "${cf_tst_cflags}" = "\"'" ; then
11290
11291         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11292         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11293
11294                                 continue
11295                         fi
11296                         ;;
11297                 esac
11298                 case "$CPPFLAGS" in
11299                 (*$cf_add_cflags)
11300                         ;;
11301                 (*)
11302                         case "$cf_add_cflags" in
11303                         (-D*)
11304                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11305
11306 CPPFLAGS=`echo "$CPPFLAGS" | \
11307         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11308                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11309
11310                                 ;;
11311                         esac
11312
11313         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11314         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11315
11316                         ;;
11317                 esac
11318                 ;;
11319         (*)
11320
11321         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11322         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11323
11324                 ;;
11325         esac
11326         ;;
11327 (yes)
11328
11329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11331
11332         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11333
11334         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11335                 && test -z "${cf_tst_cflags}" \
11336                 && cf_fix_cppflags=no
11337         ;;
11338 esac
11339 done
11340
11341 if test -n "$cf_new_cflags" ; then
11342
11343         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11344         CFLAGS="${CFLAGS}$cf_new_cflags"
11345
11346 fi
11347
11348 if test -n "$cf_new_cppflags" ; then
11349
11350         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11351         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11352
11353 fi
11354
11355 if test -n "$cf_new_extra_cppflags" ; then
11356
11357         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11358         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11359
11360 fi
11361
11362 fi
11363
11364         fi
11365 fi
11366 fi # cf_cv_posix_visible
11367
11368 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11369
11370 # Work around breakage on OS X
11371
11372 echo "$as_me:11372: checking if SIGWINCH is defined" >&5
11373 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11374 if test "${cf_cv_define_sigwinch+set}" = set; then
11375   echo $ECHO_N "(cached) $ECHO_C" >&6
11376 else
11377
11378         cat >"conftest.$ac_ext" <<_ACEOF
11379 #line 11379 "configure"
11380 #include "confdefs.h"
11381
11382 #include <sys/types.h>
11383 #include <sys/signal.h>
11384
11385 int
11386 main (void)
11387 {
11388 int x = SIGWINCH; (void)x
11389   ;
11390   return 0;
11391 }
11392 _ACEOF
11393 rm -f "conftest.$ac_objext"
11394 if { (eval echo "$as_me:11394: \"$ac_compile\"") >&5
11395   (eval $ac_compile) 2>&5
11396   ac_status=$?
11397   echo "$as_me:11397: \$? = $ac_status" >&5
11398   (exit "$ac_status"); } &&
11399          { ac_try='test -s "conftest.$ac_objext"'
11400   { (eval echo "$as_me:11400: \"$ac_try\"") >&5
11401   (eval $ac_try) 2>&5
11402   ac_status=$?
11403   echo "$as_me:11403: \$? = $ac_status" >&5
11404   (exit "$ac_status"); }; }; then
11405   cf_cv_define_sigwinch=yes
11406 else
11407   echo "$as_me: failed program was:" >&5
11408 cat "conftest.$ac_ext" >&5
11409 cat >"conftest.$ac_ext" <<_ACEOF
11410 #line 11410 "configure"
11411 #include "confdefs.h"
11412
11413 #undef _XOPEN_SOURCE
11414 #undef _POSIX_SOURCE
11415 #undef _POSIX_C_SOURCE
11416 #include <sys/types.h>
11417 #include <sys/signal.h>
11418
11419 int
11420 main (void)
11421 {
11422 int x = SIGWINCH; (void)x
11423   ;
11424   return 0;
11425 }
11426 _ACEOF
11427 rm -f "conftest.$ac_objext"
11428 if { (eval echo "$as_me:11428: \"$ac_compile\"") >&5
11429   (eval $ac_compile) 2>&5
11430   ac_status=$?
11431   echo "$as_me:11431: \$? = $ac_status" >&5
11432   (exit "$ac_status"); } &&
11433          { ac_try='test -s "conftest.$ac_objext"'
11434   { (eval echo "$as_me:11434: \"$ac_try\"") >&5
11435   (eval $ac_try) 2>&5
11436   ac_status=$?
11437   echo "$as_me:11437: \$? = $ac_status" >&5
11438   (exit "$ac_status"); }; }; then
11439   cf_cv_define_sigwinch=maybe
11440 else
11441   echo "$as_me: failed program was:" >&5
11442 cat "conftest.$ac_ext" >&5
11443 cf_cv_define_sigwinch=no
11444 fi
11445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11446
11447 fi
11448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11449
11450 fi
11451 echo "$as_me:11451: result: $cf_cv_define_sigwinch" >&5
11452 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11453
11454 if test "$cf_cv_define_sigwinch" = maybe ; then
11455 echo "$as_me:11455: checking for actual SIGWINCH definition" >&5
11456 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11457 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11458   echo $ECHO_N "(cached) $ECHO_C" >&6
11459 else
11460
11461 cf_cv_fixup_sigwinch=unknown
11462 cf_sigwinch=32
11463 while test "$cf_sigwinch" != 1
11464 do
11465         cat >"conftest.$ac_ext" <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11468
11469 #undef _XOPEN_SOURCE
11470 #undef _POSIX_SOURCE
11471 #undef _POSIX_C_SOURCE
11472 #include <sys/types.h>
11473 #include <sys/signal.h>
11474
11475 int
11476 main (void)
11477 {
11478
11479 #if SIGWINCH != $cf_sigwinch
11480 make an error
11481 #endif
11482 int x = SIGWINCH; (void)x
11483   ;
11484   return 0;
11485 }
11486 _ACEOF
11487 rm -f "conftest.$ac_objext"
11488 if { (eval echo "$as_me:11488: \"$ac_compile\"") >&5
11489   (eval $ac_compile) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit "$ac_status"); } &&
11493          { ac_try='test -s "conftest.$ac_objext"'
11494   { (eval echo "$as_me:11494: \"$ac_try\"") >&5
11495   (eval $ac_try) 2>&5
11496   ac_status=$?
11497   echo "$as_me:11497: \$? = $ac_status" >&5
11498   (exit "$ac_status"); }; }; then
11499   cf_cv_fixup_sigwinch=$cf_sigwinch
11500          break
11501 else
11502   echo "$as_me: failed program was:" >&5
11503 cat "conftest.$ac_ext" >&5
11504 fi
11505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11506
11507 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11508 done
11509
11510 fi
11511 echo "$as_me:11511: result: $cf_cv_fixup_sigwinch" >&5
11512 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11513
11514         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11515                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11516         fi
11517 fi
11518
11519 # Checks for CODESET support.
11520
11521 echo "$as_me:11521: checking for nl_langinfo and CODESET" >&5
11522 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11523 if test "${am_cv_langinfo_codeset+set}" = set; then
11524   echo $ECHO_N "(cached) $ECHO_C" >&6
11525 else
11526   cat >"conftest.$ac_ext" <<_ACEOF
11527 #line 11527 "configure"
11528 #include "confdefs.h"
11529 #include <langinfo.h>
11530 int
11531 main (void)
11532 {
11533 char* cs = nl_langinfo(CODESET); (void)cs
11534   ;
11535   return 0;
11536 }
11537 _ACEOF
11538 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11539 if { (eval echo "$as_me:11539: \"$ac_link\"") >&5
11540   (eval $ac_link) 2>&5
11541   ac_status=$?
11542   echo "$as_me:11542: \$? = $ac_status" >&5
11543   (exit "$ac_status"); } &&
11544          { ac_try='test -s "conftest$ac_exeext"'
11545   { (eval echo "$as_me:11545: \"$ac_try\"") >&5
11546   (eval $ac_try) 2>&5
11547   ac_status=$?
11548   echo "$as_me:11548: \$? = $ac_status" >&5
11549   (exit "$ac_status"); }; }; then
11550   am_cv_langinfo_codeset=yes
11551 else
11552   echo "$as_me: failed program was:" >&5
11553 cat "conftest.$ac_ext" >&5
11554 am_cv_langinfo_codeset=no
11555 fi
11556 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11557
11558 fi
11559 echo "$as_me:11559: result: $am_cv_langinfo_codeset" >&5
11560 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11561         if test "$am_cv_langinfo_codeset" = yes; then
11562
11563 cat >>confdefs.h <<\EOF
11564 #define HAVE_LANGINFO_CODESET 1
11565 EOF
11566
11567         fi
11568
11569 # use these variables to work around a defect in gcc's fixincludes.
11570 NCURSES_OK_WCHAR_T=
11571 NCURSES_OK_WINT_T=
11572
11573 echo "$as_me:11573: checking if you want wide-character code" >&5
11574 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11575
11576 # Check whether --enable-widec or --disable-widec was given.
11577 if test "${enable_widec+set}" = set; then
11578   enableval="$enable_widec"
11579   with_widec=$enableval
11580 else
11581   with_widec=no
11582 fi;
11583 echo "$as_me:11583: result: $with_widec" >&5
11584 echo "${ECHO_T}$with_widec" >&6
11585
11586 NCURSES_WCWIDTH_GRAPHICS=1
11587
11588 if test "x$with_widec" = xyes ; then
11589         if test "x$disable_lib_suffixes" = xno ; then
11590                 LIB_SUFFIX="w${LIB_SUFFIX}"
11591         fi
11592
11593 cat >>confdefs.h <<\EOF
11594 #define USE_WIDEC_SUPPORT 1
11595 EOF
11596
11597 cat >>confdefs.h <<\EOF
11598 #define NCURSES_WIDECHAR 1
11599 EOF
11600
11601 for ac_header in \
11602 wchar.h \
11603 wctype.h \
11604
11605 do
11606 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11607 echo "$as_me:11607: checking for $ac_header" >&5
11608 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11609 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11610   echo $ECHO_N "(cached) $ECHO_C" >&6
11611 else
11612   cat >"conftest.$ac_ext" <<_ACEOF
11613 #line 11613 "configure"
11614 #include "confdefs.h"
11615 #include <$ac_header>
11616 _ACEOF
11617 if { (eval echo "$as_me:11617: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11618   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11619   ac_status=$?
11620   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11621   rm -f conftest.er1
11622   cat conftest.err >&5
11623   echo "$as_me:11623: \$? = $ac_status" >&5
11624   (exit "$ac_status"); } >/dev/null; then
11625   if test -s conftest.err; then
11626     ac_cpp_err=$ac_c_preproc_warn_flag
11627   else
11628     ac_cpp_err=
11629   fi
11630 else
11631   ac_cpp_err=yes
11632 fi
11633 if test -z "$ac_cpp_err"; then
11634   eval "$as_ac_Header=yes"
11635 else
11636   echo "$as_me: failed program was:" >&5
11637   cat "conftest.$ac_ext" >&5
11638   eval "$as_ac_Header=no"
11639 fi
11640 rm -f conftest.err "conftest.$ac_ext"
11641 fi
11642 echo "$as_me:11642: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11643 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11644 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11645   cat >>confdefs.h <<EOF
11646 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11647 EOF
11648
11649 fi
11650 done
11651
11652 echo "$as_me:11652: checking if wchar.h can be used as is" >&5
11653 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11654 if test "${cf_cv_wchar_h_okay+set}" = set; then
11655   echo $ECHO_N "(cached) $ECHO_C" >&6
11656 else
11657
11658 cat >"conftest.$ac_ext" <<_ACEOF
11659 #line 11659 "configure"
11660 #include "confdefs.h"
11661
11662 #include <stdlib.h>
11663 #ifdef HAVE_WCHAR_H
11664 #include <wchar.h>
11665 #endif
11666 #ifdef HAVE_WCTYPE_H
11667 #include <wctype.h>
11668 #endif
11669
11670 int
11671 main (void)
11672 {
11673
11674         wint_t foo = 0;
11675         int bar = iswpunct(foo)
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f "conftest.$ac_objext"
11681 if { (eval echo "$as_me:11681: \"$ac_compile\"") >&5
11682   (eval $ac_compile) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit "$ac_status"); } &&
11686          { ac_try='test -s "conftest.$ac_objext"'
11687   { (eval echo "$as_me:11687: \"$ac_try\"") >&5
11688   (eval $ac_try) 2>&5
11689   ac_status=$?
11690   echo "$as_me:11690: \$? = $ac_status" >&5
11691   (exit "$ac_status"); }; }; then
11692   cf_cv_wchar_h_okay=yes
11693 else
11694   echo "$as_me: failed program was:" >&5
11695 cat "conftest.$ac_ext" >&5
11696 cf_cv_wchar_h_okay=no
11697 fi
11698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11699 fi
11700 echo "$as_me:11700: result: $cf_cv_wchar_h_okay" >&5
11701 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11702
11703 if test "$cf_cv_wchar_h_okay" = no
11704 then
11705
11706 echo "$as_me:11706: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11707 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11708 cat >"conftest.$ac_ext" <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 #include <sys/types.h>
11712
11713 int
11714 main (void)
11715 {
11716
11717 #ifndef _XOPEN_SOURCE_EXTENDED
11718 make an error
11719 #endif
11720   ;
11721   return 0;
11722 }
11723 _ACEOF
11724 rm -f "conftest.$ac_objext"
11725 if { (eval echo "$as_me:11725: \"$ac_compile\"") >&5
11726   (eval $ac_compile) 2>&5
11727   ac_status=$?
11728   echo "$as_me:11728: \$? = $ac_status" >&5
11729   (exit "$ac_status"); } &&
11730          { ac_try='test -s "conftest.$ac_objext"'
11731   { (eval echo "$as_me:11731: \"$ac_try\"") >&5
11732   (eval $ac_try) 2>&5
11733   ac_status=$?
11734   echo "$as_me:11734: \$? = $ac_status" >&5
11735   (exit "$ac_status"); }; }; then
11736   cf_result=no
11737 else
11738   echo "$as_me: failed program was:" >&5
11739 cat "conftest.$ac_ext" >&5
11740 cf_result=yes
11741 fi
11742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11743 echo "$as_me:11743: result: $cf_result" >&5
11744 echo "${ECHO_T}$cf_result" >&6
11745
11746 if test "$cf_result" = yes ; then
11747         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11748 elif test "x" != "x" ; then
11749         echo "$as_me:11749: checking checking for compatible value versus " >&5
11750 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11751         cat >"conftest.$ac_ext" <<_ACEOF
11752 #line 11752 "configure"
11753 #include "confdefs.h"
11754 #include <sys/types.h>
11755
11756 int
11757 main (void)
11758 {
11759
11760 #if _XOPEN_SOURCE_EXTENDED- < 0
11761 make an error
11762 #endif
11763   ;
11764   return 0;
11765 }
11766 _ACEOF
11767 rm -f "conftest.$ac_objext"
11768 if { (eval echo "$as_me:11768: \"$ac_compile\"") >&5
11769   (eval $ac_compile) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit "$ac_status"); } &&
11773          { ac_try='test -s "conftest.$ac_objext"'
11774   { (eval echo "$as_me:11774: \"$ac_try\"") >&5
11775   (eval $ac_try) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit "$ac_status"); }; }; then
11779   cf_result=yes
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 cat "conftest.$ac_ext" >&5
11783 cf_result=no
11784 fi
11785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786         echo "$as_me:11786: result: $cf_result" >&5
11787 echo "${ECHO_T}$cf_result" >&6
11788         if test "$cf_result" = no ; then
11789                 # perhaps we can override it - try...
11790                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11791         fi
11792 fi
11793
11794 fi
11795
11796 echo "$as_me:11796: checking if wcwidth agrees graphics are single-width" >&5
11797 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11798 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11799   echo $ECHO_N "(cached) $ECHO_C" >&6
11800 else
11801
11802 cat >conftest.in <<CF_EOF
11803 -       VT100 symbols
11804 0x250c  upper left corner
11805 0x2514  lower left corner
11806 0x2510  upper right corner
11807 0x2518  lower right corner
11808 0x251c  tee pointing left
11809 0x2524  tee pointing right
11810 0x2534  tee pointing up
11811 0x252c  tee pointing down
11812 0x2500  horizontal line
11813 0x2502  vertical line
11814 0x253c  large plus or crossover
11815 0x23ba  scan line 1
11816 0x23bd  scan line 9
11817 0x25c6  diamond
11818 0x2592  checker board (stipple)
11819 0x00b0  degree symbol
11820 0x00b1  plus/minus
11821 0x00b7  bullet
11822 -       Teletype 5410v1 symbols
11823 0x2190  arrow pointing left
11824 0x2192  arrow pointing right
11825 0x2193  arrow pointing down
11826 0x2191  arrow pointing up
11827 0x2592  board of squares
11828 0x2603  lantern symbol
11829 0x25ae  solid square block
11830 -       these defaults were invented for ncurses
11831 0x23bb  scan line 3
11832 0x23bc  scan line 7
11833 0x2264  less-than-or-equal-to
11834 0x2265  greater-than-or-equal-to
11835 0x03c0  greek pi
11836 0x2260  not-equal
11837 0x00a3  pound-sterling symbol
11838 -       thick-line-drawing
11839 0x250f  upper left corner
11840 0x2517  lower left corner
11841 0x2513  upper right corner
11842 0x251b  lower right corner
11843 0x2523  tee pointing left
11844 0x252b  tee pointing right
11845 0x253b  tee pointing up
11846 0x2533  tee pointing down
11847 0x2501  horizontal line
11848 0x2503  vertical line
11849 0x254b  large plus or crossover
11850 -       double-line-drawing
11851 0x2554  upper left corner
11852 0x255a  lower left corner
11853 0x2557  upper right corner
11854 0x255d  lower right corner
11855 0x2563  tee pointing left
11856 0x2560  tee pointing right
11857 0x2569  tee pointing up
11858 0x2566  tee pointing down
11859 0x2550  horizontal line
11860 0x2551  vertical line
11861 0x256c  large plus or crossover
11862 CF_EOF
11863 if test "$cross_compiling" = yes; then
11864   cf_cv_wcwidth_graphics=unknown
11865 else
11866   cat >"conftest.$ac_ext" <<_ACEOF
11867 #line 11867 "configure"
11868 #include "confdefs.h"
11869
11870 #include <locale.h>
11871 #include <stdio.h>
11872 #include <wchar.h>
11873
11874 #define MY_LEN 80
11875
11876 int
11877 main(void)
11878 {
11879         FILE *fp;
11880         int value;
11881         char buffer[MY_LEN + 1];
11882         char notes[MY_LEN + 1];
11883         int totals = 0;
11884         int passed = 0;
11885
11886         if (setlocale(LC_ALL, "en_US.UTF8") ||
11887                 setlocale(LC_ALL, "en_US.UTF-8") ||
11888                 setlocale(LC_ALL, "en_US.utf8") ||
11889                 setlocale(LC_ALL, "en_US.utf-8")) {
11890                 if ((fp = fopen("conftest.in", "r")) != 0) {
11891                         while (fgets(buffer, MY_LEN, fp) != 0) {
11892                                 if (*buffer == '-') {
11893                                         fprintf(stderr, "\\t%s", buffer);
11894                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11895                                         ++totals;
11896                                         if (wcwidth(value) == 1)
11897                                                 ++passed;
11898                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11899                                 } else {
11900                                         fprintf(stderr, "?\\t%s", buffer);
11901                                 }
11902                         }
11903                 }
11904         }
11905         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11906         return (totals == passed) ? 0 : 1;
11907 }
11908
11909 _ACEOF
11910 rm -f "conftest$ac_exeext"
11911 if { (eval echo "$as_me:11911: \"$ac_link\"") >&5
11912   (eval $ac_link) 2>&5
11913   ac_status=$?
11914   echo "$as_me:11914: \$? = $ac_status" >&5
11915   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11916   { (eval echo "$as_me:11916: \"$ac_try\"") >&5
11917   (eval $ac_try) 2>&5
11918   ac_status=$?
11919   echo "$as_me:11919: \$? = $ac_status" >&5
11920   (exit "$ac_status"); }; }; then
11921   cf_cv_wcwidth_graphics=yes
11922 else
11923   echo "$as_me: program exited with status $ac_status" >&5
11924 echo "$as_me: failed program was:" >&5
11925 cat "conftest.$ac_ext" >&5
11926 cf_cv_wcwidth_graphics=no
11927 fi
11928 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11929 fi
11930
11931 fi
11932 echo "$as_me:11932: result: $cf_cv_wcwidth_graphics" >&5
11933 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11934
11935         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11936
11937         # with_overwrite=no
11938         NCURSES_CH_T=cchar_t
11939
11940 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11941 do
11942 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11943 echo "$as_me:11943: checking for $ac_func" >&5
11944 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11945 if eval "test \"\${$as_ac_var+set}\" = set"; then
11946   echo $ECHO_N "(cached) $ECHO_C" >&6
11947 else
11948   cat >"conftest.$ac_ext" <<_ACEOF
11949 #line 11949 "configure"
11950 #include "confdefs.h"
11951 #define $ac_func autoconf_temporary
11952 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11953 #undef $ac_func
11954
11955 #ifdef __cplusplus
11956 extern "C"
11957 #endif
11958
11959 /* We use char because int might match the return type of a gcc2
11960    builtin and then its argument prototype would still apply.  */
11961 char $ac_func (void);
11962
11963 int
11964 main (void)
11965 {
11966
11967 /* The GNU C library defines stubs for functions which it implements
11968     to always fail with ENOSYS.  Some functions are actually named
11969     something starting with __ and the normal name is an alias.  */
11970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11971 #error found stub for $ac_func
11972 #endif
11973
11974         return $ac_func ();
11975   ;
11976   return 0;
11977 }
11978 _ACEOF
11979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11980 if { (eval echo "$as_me:11980: \"$ac_link\"") >&5
11981   (eval $ac_link) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit "$ac_status"); } &&
11985          { ac_try='test -s "conftest$ac_exeext"'
11986   { (eval echo "$as_me:11986: \"$ac_try\"") >&5
11987   (eval $ac_try) 2>&5
11988   ac_status=$?
11989   echo "$as_me:11989: \$? = $ac_status" >&5
11990   (exit "$ac_status"); }; }; then
11991   eval "$as_ac_var=yes"
11992 else
11993   echo "$as_me: failed program was:" >&5
11994 cat "conftest.$ac_ext" >&5
11995 eval "$as_ac_var=no"
11996 fi
11997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11998 fi
11999 echo "$as_me:11999: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12000 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12001 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12002   cat >>confdefs.h <<EOF
12003 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12004 EOF
12005
12006 fi
12007 done
12008
12009         if test "x$ac_cv_func_putwc" != xyes ; then
12010
12011 echo "$as_me:12011: checking for multibyte character support" >&5
12012 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12013 if test "${cf_cv_utf8_lib+set}" = set; then
12014   echo $ECHO_N "(cached) $ECHO_C" >&6
12015 else
12016
12017         cf_save_LIBS="$LIBS"
12018         cat >"conftest.$ac_ext" <<_ACEOF
12019 #line 12019 "configure"
12020 #include "confdefs.h"
12021
12022 #include <stdlib.h>
12023 int
12024 main (void)
12025 {
12026 putwc(0,0);
12027   ;
12028   return 0;
12029 }
12030 _ACEOF
12031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12032 if { (eval echo "$as_me:12032: \"$ac_link\"") >&5
12033   (eval $ac_link) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit "$ac_status"); } &&
12037          { ac_try='test -s "conftest$ac_exeext"'
12038   { (eval echo "$as_me:12038: \"$ac_try\"") >&5
12039   (eval $ac_try) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit "$ac_status"); }; }; then
12043   cf_cv_utf8_lib=yes
12044 else
12045   echo "$as_me: failed program was:" >&5
12046 cat "conftest.$ac_ext" >&5
12047
12048 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12049 # will be set on completion of the AC_TRY_LINK below.
12050 cf_cv_header_path_utf8=
12051 cf_cv_library_path_utf8=
12052
12053 echo "${as_me:-configure}:12053: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12054
12055 cf_save_LIBS="$LIBS"
12056
12057 cat >"conftest.$ac_ext" <<_ACEOF
12058 #line 12058 "configure"
12059 #include "confdefs.h"
12060
12061 #include <libutf8.h>
12062 int
12063 main (void)
12064 {
12065 putwc(0,0);
12066   ;
12067   return 0;
12068 }
12069 _ACEOF
12070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12071 if { (eval echo "$as_me:12071: \"$ac_link\"") >&5
12072   (eval $ac_link) 2>&5
12073   ac_status=$?
12074   echo "$as_me:12074: \$? = $ac_status" >&5
12075   (exit "$ac_status"); } &&
12076          { ac_try='test -s "conftest$ac_exeext"'
12077   { (eval echo "$as_me:12077: \"$ac_try\"") >&5
12078   (eval $ac_try) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); }; }; then
12082
12083         cf_cv_find_linkage_utf8=yes
12084         cf_cv_header_path_utf8=/usr/include
12085         cf_cv_library_path_utf8=/usr/lib
12086
12087 else
12088   echo "$as_me: failed program was:" >&5
12089 cat "conftest.$ac_ext" >&5
12090
12091 LIBS="-lutf8  $cf_save_LIBS"
12092
12093 cat >"conftest.$ac_ext" <<_ACEOF
12094 #line 12094 "configure"
12095 #include "confdefs.h"
12096
12097 #include <libutf8.h>
12098 int
12099 main (void)
12100 {
12101 putwc(0,0);
12102   ;
12103   return 0;
12104 }
12105 _ACEOF
12106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12107 if { (eval echo "$as_me:12107: \"$ac_link\"") >&5
12108   (eval $ac_link) 2>&5
12109   ac_status=$?
12110   echo "$as_me:12110: \$? = $ac_status" >&5
12111   (exit "$ac_status"); } &&
12112          { ac_try='test -s "conftest$ac_exeext"'
12113   { (eval echo "$as_me:12113: \"$ac_try\"") >&5
12114   (eval $ac_try) 2>&5
12115   ac_status=$?
12116   echo "$as_me:12116: \$? = $ac_status" >&5
12117   (exit "$ac_status"); }; }; then
12118
12119         cf_cv_find_linkage_utf8=yes
12120         cf_cv_header_path_utf8=/usr/include
12121         cf_cv_library_path_utf8=/usr/lib
12122         cf_cv_library_file_utf8="-lutf8"
12123
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 cat "conftest.$ac_ext" >&5
12127
12128         cf_cv_find_linkage_utf8=no
12129         LIBS="$cf_save_LIBS"
12130
12131         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12132
12133 echo "${as_me:-configure}:12133: testing find linkage for utf8 library ..." 1>&5
12134
12135 echo "${as_me:-configure}:12135: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12136
12137         cf_save_CPPFLAGS="$CPPFLAGS"
12138         cf_test_CPPFLAGS="$CPPFLAGS"
12139
12140 cf_search=
12141
12142 # collect the current set of include-directories from compiler flags
12143 cf_header_path_list=""
12144 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12145         for cf_header_path in $CPPFLAGS $CFLAGS
12146         do
12147                 case "$cf_header_path" in
12148                 (-I*)
12149                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12150
12151 test "x$cf_header_path" != "xNONE" && \
12152 test -d "$cf_header_path" && \
12153  {
12154         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12155         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12156         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12157         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12158         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12159         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12160 }
12161
12162                         cf_header_path_list="$cf_header_path_list $cf_search"
12163                         ;;
12164                 esac
12165         done
12166 fi
12167
12168 # add the variations for the package we are looking for
12169
12170 cf_search=
12171
12172 test "x$prefix" != "xNONE" && \
12173 test -d "$prefix" && \
12174  {
12175         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12176         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12177         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12178         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12179         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12180         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12181 }
12182
12183 for cf_subdir_prefix in \
12184         /usr \
12185         /usr/local \
12186         /usr/pkg \
12187         /opt \
12188         /opt/local \
12189         $HOME
12190 do
12191
12192 test "x$cf_subdir_prefix" != "x$prefix" && \
12193 test -d "$cf_subdir_prefix" && \
12194 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12195         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12196         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12197         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12198         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12199         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12200         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12201 }
12202
12203 done
12204
12205 test "$includedir" != NONE && \
12206 test "$includedir" != "/usr/include" && \
12207 test -d "$includedir" && {
12208         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12209         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12210 }
12211
12212 test "$oldincludedir" != NONE && \
12213 test "$oldincludedir" != "/usr/include" && \
12214 test -d "$oldincludedir" && {
12215         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12216         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12217 }
12218
12219 cf_search="$cf_search $cf_header_path_list"
12220
12221         for cf_cv_header_path_utf8 in $cf_search
12222         do
12223                 if test -d "$cf_cv_header_path_utf8" ; then
12224                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12225
12226 echo "${as_me:-configure}:12226: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12227
12228                         CPPFLAGS="$cf_save_CPPFLAGS"
12229
12230         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12231         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12232
12233                         cat >"conftest.$ac_ext" <<_ACEOF
12234 #line 12234 "configure"
12235 #include "confdefs.h"
12236
12237 #include <libutf8.h>
12238 int
12239 main (void)
12240 {
12241 putwc(0,0);
12242   ;
12243   return 0;
12244 }
12245 _ACEOF
12246 rm -f "conftest.$ac_objext"
12247 if { (eval echo "$as_me:12247: \"$ac_compile\"") >&5
12248   (eval $ac_compile) 2>&5
12249   ac_status=$?
12250   echo "$as_me:12250: \$? = $ac_status" >&5
12251   (exit "$ac_status"); } &&
12252          { ac_try='test -s "conftest.$ac_objext"'
12253   { (eval echo "$as_me:12253: \"$ac_try\"") >&5
12254   (eval $ac_try) 2>&5
12255   ac_status=$?
12256   echo "$as_me:12256: \$? = $ac_status" >&5
12257   (exit "$ac_status"); }; }; then
12258
12259                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12260
12261 echo "${as_me:-configure}:12261: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12262
12263                                 cf_cv_find_linkage_utf8=maybe
12264                                 cf_test_CPPFLAGS="$CPPFLAGS"
12265                                 break
12266 else
12267   echo "$as_me: failed program was:" >&5
12268 cat "conftest.$ac_ext" >&5
12269
12270                                 CPPFLAGS="$cf_save_CPPFLAGS"
12271
12272 fi
12273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12274                 fi
12275         done
12276
12277         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12278
12279 echo "${as_me:-configure}:12279: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12280
12281                 cf_save_LIBS="$LIBS"
12282                 cf_save_LDFLAGS="$LDFLAGS"
12283
12284                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12285
12286 cf_search=
12287 cf_library_path_list=""
12288 if test -n "${LDFLAGS}${LIBS}" ; then
12289         for cf_library_path in $LDFLAGS $LIBS
12290         do
12291                 case "$cf_library_path" in
12292                 (-L*)
12293                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12294
12295 test "x$cf_library_path" != "xNONE" && \
12296 test -d "$cf_library_path" && \
12297  {
12298         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12299         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12300         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12301         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12302         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12303         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12304 }
12305
12306                         cf_library_path_list="$cf_library_path_list $cf_search"
12307                         ;;
12308                 esac
12309         done
12310 fi
12311
12312 cf_search=
12313
12314 test "x$prefix" != "xNONE" && \
12315 test -d "$prefix" && \
12316  {
12317         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12318         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12319         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12320         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12321         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12322         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12323 }
12324
12325 for cf_subdir_prefix in \
12326         /usr \
12327         /usr/local \
12328         /usr/pkg \
12329         /opt \
12330         /opt/local \
12331         $HOME
12332 do
12333
12334 test "x$cf_subdir_prefix" != "x$prefix" && \
12335 test -d "$cf_subdir_prefix" && \
12336 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12337         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12338         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12339         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12340         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12341         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12342         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12343 }
12344
12345 done
12346
12347 cf_search="$cf_library_path_list $cf_search"
12348
12349                         for cf_cv_library_path_utf8 in $cf_search
12350                         do
12351                                 if test -d "$cf_cv_library_path_utf8" ; then
12352                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12353
12354 echo "${as_me:-configure}:12354: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12355
12356                                         CPPFLAGS="$cf_test_CPPFLAGS"
12357                                         LIBS="-lutf8  $cf_save_LIBS"
12358                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12359                                         cat >"conftest.$ac_ext" <<_ACEOF
12360 #line 12360 "configure"
12361 #include "confdefs.h"
12362
12363 #include <libutf8.h>
12364 int
12365 main (void)
12366 {
12367 putwc(0,0);
12368   ;
12369   return 0;
12370 }
12371 _ACEOF
12372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12373 if { (eval echo "$as_me:12373: \"$ac_link\"") >&5
12374   (eval $ac_link) 2>&5
12375   ac_status=$?
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit "$ac_status"); } &&
12378          { ac_try='test -s "conftest$ac_exeext"'
12379   { (eval echo "$as_me:12379: \"$ac_try\"") >&5
12380   (eval $ac_try) 2>&5
12381   ac_status=$?
12382   echo "$as_me:12382: \$? = $ac_status" >&5
12383   (exit "$ac_status"); }; }; then
12384
12385                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12386
12387 echo "${as_me:-configure}:12387: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12388
12389                                         cf_cv_find_linkage_utf8=yes
12390                                         cf_cv_library_file_utf8="-lutf8"
12391                                         break
12392 else
12393   echo "$as_me: failed program was:" >&5
12394 cat "conftest.$ac_ext" >&5
12395
12396                                         CPPFLAGS="$cf_save_CPPFLAGS"
12397                                         LIBS="$cf_save_LIBS"
12398                                         LDFLAGS="$cf_save_LDFLAGS"
12399
12400 fi
12401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12402                                 fi
12403                         done
12404                         CPPFLAGS="$cf_save_CPPFLAGS"
12405                         LDFLAGS="$cf_save_LDFLAGS"
12406                 fi
12407
12408         else
12409                 cf_cv_find_linkage_utf8=no
12410         fi
12411
12412 fi
12413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12414
12415 fi
12416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12417
12418 LIBS="$cf_save_LIBS"
12419
12420 if test "$cf_cv_find_linkage_utf8" = yes ; then
12421 cf_cv_utf8_lib=add-on
12422 else
12423 cf_cv_utf8_lib=no
12424 fi
12425
12426 fi
12427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12428 fi
12429 echo "$as_me:12429: result: $cf_cv_utf8_lib" >&5
12430 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12431
12432 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12433 # ncurses/ncursesw:
12434 if test "$cf_cv_utf8_lib" = "add-on" ; then
12435
12436 cat >>confdefs.h <<\EOF
12437 #define HAVE_LIBUTF8_H 1
12438 EOF
12439
12440 if test -n "$cf_cv_header_path_utf8" ; then
12441   for cf_add_incdir in $cf_cv_header_path_utf8
12442   do
12443         while test "$cf_add_incdir" != /usr/include
12444         do
12445           if test -d "$cf_add_incdir"
12446           then
12447                 cf_have_incdir=no
12448                 if test -n "$CFLAGS$CPPFLAGS" ; then
12449                   # a loop is needed to ensure we can add subdirs of existing dirs
12450                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12451                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12452                           cf_have_incdir=yes; break
12453                         fi
12454                   done
12455                 fi
12456
12457                 if test "$cf_have_incdir" = no ; then
12458                   if test "$cf_add_incdir" = /usr/local/include ; then
12459                         if test "$GCC" = yes
12460                         then
12461                           cf_save_CPPFLAGS=$CPPFLAGS
12462
12463         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12464         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12465
12466                           cat >"conftest.$ac_ext" <<_ACEOF
12467 #line 12467 "configure"
12468 #include "confdefs.h"
12469 #include <stdio.h>
12470 int
12471 main (void)
12472 {
12473 printf("Hello")
12474   ;
12475   return 0;
12476 }
12477 _ACEOF
12478 rm -f "conftest.$ac_objext"
12479 if { (eval echo "$as_me:12479: \"$ac_compile\"") >&5
12480   (eval $ac_compile) 2>&5
12481   ac_status=$?
12482   echo "$as_me:12482: \$? = $ac_status" >&5
12483   (exit "$ac_status"); } &&
12484          { ac_try='test -s "conftest.$ac_objext"'
12485   { (eval echo "$as_me:12485: \"$ac_try\"") >&5
12486   (eval $ac_try) 2>&5
12487   ac_status=$?
12488   echo "$as_me:12488: \$? = $ac_status" >&5
12489   (exit "$ac_status"); }; }; then
12490   :
12491 else
12492   echo "$as_me: failed program was:" >&5
12493 cat "conftest.$ac_ext" >&5
12494 cf_have_incdir=yes
12495 fi
12496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12497                           CPPFLAGS=$cf_save_CPPFLAGS
12498                         fi
12499                   fi
12500                 fi
12501
12502                 if test "$cf_have_incdir" = no ; then
12503                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12504
12505 echo "${as_me:-configure}:12505: testing adding $cf_add_incdir to include-path ..." 1>&5
12506
12507                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12508
12509                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12510                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12511                   cf_add_incdir="$cf_top_incdir"
12512                 else
12513                   break
12514                 fi
12515           else
12516                 break
12517           fi
12518         done
12519   done
12520 fi
12521
12522 if test -n "$cf_cv_library_path_utf8" ; then
12523         for cf_add_libdir in $cf_cv_library_path_utf8
12524         do
12525                 if test "$cf_add_libdir" = /usr/lib ; then
12526                         :
12527                 elif test -d "$cf_add_libdir"
12528                 then
12529                         cf_have_libdir=no
12530                         if test -n "$LDFLAGS$LIBS" ; then
12531                                 # a loop is needed to ensure we can add subdirs of existing dirs
12532                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12533                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12534                                                 cf_have_libdir=yes; break
12535                                         fi
12536                                 done
12537                         fi
12538                         if test "$cf_have_libdir" = no ; then
12539                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12540
12541 echo "${as_me:-configure}:12541: testing adding $cf_add_libdir to library-path ..." 1>&5
12542
12543                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12544                         fi
12545                 fi
12546         done
12547 fi
12548
12549 cf_add_libs="$LIBS"
12550 # reverse order
12551 cf_add_0lib=
12552 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12553 # filter duplicates
12554 for cf_add_1lib in $cf_add_0lib; do
12555         for cf_add_2lib in $cf_add_libs; do
12556                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12557                         cf_add_1lib=
12558                         break
12559                 fi
12560         done
12561         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12562 done
12563 LIBS="$cf_add_libs"
12564
12565 fi
12566
12567                 if test "$cf_cv_utf8_lib" != no ; then
12568                         NCURSES_LIBUTF8=1
12569                 fi
12570         fi
12571
12572 # This is needed on Tru64 5.0 to declare mbstate_t
12573 echo "$as_me:12573: checking if we must include wchar.h to declare mbstate_t" >&5
12574 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12575 if test "${cf_cv_mbstate_t+set}" = set; then
12576   echo $ECHO_N "(cached) $ECHO_C" >&6
12577 else
12578
12579 cat >"conftest.$ac_ext" <<_ACEOF
12580 #line 12580 "configure"
12581 #include "confdefs.h"
12582
12583 #include <stdlib.h>
12584 #include <stdarg.h>
12585 #include <stdio.h>
12586 #ifdef HAVE_LIBUTF8_H
12587 #include <libutf8.h>
12588 #endif
12589 int
12590 main (void)
12591 {
12592 mbstate_t state
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 rm -f "conftest.$ac_objext"
12598 if { (eval echo "$as_me:12598: \"$ac_compile\"") >&5
12599   (eval $ac_compile) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit "$ac_status"); } &&
12603          { ac_try='test -s "conftest.$ac_objext"'
12604   { (eval echo "$as_me:12604: \"$ac_try\"") >&5
12605   (eval $ac_try) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit "$ac_status"); }; }; then
12609   cf_cv_mbstate_t=no
12610 else
12611   echo "$as_me: failed program was:" >&5
12612 cat "conftest.$ac_ext" >&5
12613 cat >"conftest.$ac_ext" <<_ACEOF
12614 #line 12614 "configure"
12615 #include "confdefs.h"
12616
12617 #include <stdlib.h>
12618 #include <stdarg.h>
12619 #include <stdio.h>
12620 #include <wchar.h>
12621 #ifdef HAVE_LIBUTF8_H
12622 #include <libutf8.h>
12623 #endif
12624 int
12625 main (void)
12626 {
12627 mbstate_t value
12628   ;
12629   return 0;
12630 }
12631 _ACEOF
12632 rm -f "conftest.$ac_objext"
12633 if { (eval echo "$as_me:12633: \"$ac_compile\"") >&5
12634   (eval $ac_compile) 2>&5
12635   ac_status=$?
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit "$ac_status"); } &&
12638          { ac_try='test -s "conftest.$ac_objext"'
12639   { (eval echo "$as_me:12639: \"$ac_try\"") >&5
12640   (eval $ac_try) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit "$ac_status"); }; }; then
12644   cf_cv_mbstate_t=yes
12645 else
12646   echo "$as_me: failed program was:" >&5
12647 cat "conftest.$ac_ext" >&5
12648 cf_cv_mbstate_t=unknown
12649 fi
12650 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12651 fi
12652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12653 fi
12654 echo "$as_me:12654: result: $cf_cv_mbstate_t" >&5
12655 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12656
12657 if test "$cf_cv_mbstate_t" = yes ; then
12658
12659 cat >>confdefs.h <<\EOF
12660 #define NEED_WCHAR_H 1
12661 EOF
12662
12663         NEED_WCHAR_H=1
12664 fi
12665
12666 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12667 if test "$cf_cv_mbstate_t" = unknown ; then
12668         NCURSES_MBSTATE_T=1
12669 fi
12670
12671 # This is needed on Tru64 5.0 to declare wchar_t
12672 echo "$as_me:12672: checking if we must include wchar.h to declare wchar_t" >&5
12673 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12674 if test "${cf_cv_wchar_t+set}" = set; then
12675   echo $ECHO_N "(cached) $ECHO_C" >&6
12676 else
12677
12678 cat >"conftest.$ac_ext" <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681
12682 #include <stdlib.h>
12683 #include <stdarg.h>
12684 #include <stdio.h>
12685 #ifdef HAVE_LIBUTF8_H
12686 #include <libutf8.h>
12687 #endif
12688 int
12689 main (void)
12690 {
12691 wchar_t state
12692   ;
12693   return 0;
12694 }
12695 _ACEOF
12696 rm -f "conftest.$ac_objext"
12697 if { (eval echo "$as_me:12697: \"$ac_compile\"") >&5
12698   (eval $ac_compile) 2>&5
12699   ac_status=$?
12700   echo "$as_me:12700: \$? = $ac_status" >&5
12701   (exit "$ac_status"); } &&
12702          { ac_try='test -s "conftest.$ac_objext"'
12703   { (eval echo "$as_me:12703: \"$ac_try\"") >&5
12704   (eval $ac_try) 2>&5
12705   ac_status=$?
12706   echo "$as_me:12706: \$? = $ac_status" >&5
12707   (exit "$ac_status"); }; }; then
12708   cf_cv_wchar_t=no
12709 else
12710   echo "$as_me: failed program was:" >&5
12711 cat "conftest.$ac_ext" >&5
12712 cat >"conftest.$ac_ext" <<_ACEOF
12713 #line 12713 "configure"
12714 #include "confdefs.h"
12715
12716 #include <stdlib.h>
12717 #include <stdarg.h>
12718 #include <stdio.h>
12719 #include <wchar.h>
12720 #ifdef HAVE_LIBUTF8_H
12721 #include <libutf8.h>
12722 #endif
12723 int
12724 main (void)
12725 {
12726 wchar_t value
12727   ;
12728   return 0;
12729 }
12730 _ACEOF
12731 rm -f "conftest.$ac_objext"
12732 if { (eval echo "$as_me:12732: \"$ac_compile\"") >&5
12733   (eval $ac_compile) 2>&5
12734   ac_status=$?
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit "$ac_status"); } &&
12737          { ac_try='test -s "conftest.$ac_objext"'
12738   { (eval echo "$as_me:12738: \"$ac_try\"") >&5
12739   (eval $ac_try) 2>&5
12740   ac_status=$?
12741   echo "$as_me:12741: \$? = $ac_status" >&5
12742   (exit "$ac_status"); }; }; then
12743   cf_cv_wchar_t=yes
12744 else
12745   echo "$as_me: failed program was:" >&5
12746 cat "conftest.$ac_ext" >&5
12747 cf_cv_wchar_t=unknown
12748 fi
12749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12750 fi
12751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12752 fi
12753 echo "$as_me:12753: result: $cf_cv_wchar_t" >&5
12754 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12755
12756 if test "$cf_cv_wchar_t" = yes ; then
12757
12758 cat >>confdefs.h <<\EOF
12759 #define NEED_WCHAR_H 1
12760 EOF
12761
12762         NEED_WCHAR_H=1
12763 fi
12764
12765 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12766 if test "$cf_cv_wchar_t" = unknown ; then
12767         NCURSES_WCHAR_T=1
12768 fi
12769
12770 # if we find wchar_t in either place, use substitution to provide a fallback.
12771 if test "$cf_cv_wchar_t" != unknown ; then
12772         NCURSES_OK_WCHAR_T=1
12773 fi
12774
12775 # This is needed on Tru64 5.0 to declare wint_t
12776 echo "$as_me:12776: checking if we must include wchar.h to declare wint_t" >&5
12777 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12778 if test "${cf_cv_wint_t+set}" = set; then
12779   echo $ECHO_N "(cached) $ECHO_C" >&6
12780 else
12781
12782 cat >"conftest.$ac_ext" <<_ACEOF
12783 #line 12783 "configure"
12784 #include "confdefs.h"
12785
12786 #include <stdlib.h>
12787 #include <stdarg.h>
12788 #include <stdio.h>
12789 #ifdef HAVE_LIBUTF8_H
12790 #include <libutf8.h>
12791 #endif
12792 int
12793 main (void)
12794 {
12795 wint_t state
12796   ;
12797   return 0;
12798 }
12799 _ACEOF
12800 rm -f "conftest.$ac_objext"
12801 if { (eval echo "$as_me:12801: \"$ac_compile\"") >&5
12802   (eval $ac_compile) 2>&5
12803   ac_status=$?
12804   echo "$as_me:12804: \$? = $ac_status" >&5
12805   (exit "$ac_status"); } &&
12806          { ac_try='test -s "conftest.$ac_objext"'
12807   { (eval echo "$as_me:12807: \"$ac_try\"") >&5
12808   (eval $ac_try) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit "$ac_status"); }; }; then
12812   cf_cv_wint_t=no
12813 else
12814   echo "$as_me: failed program was:" >&5
12815 cat "conftest.$ac_ext" >&5
12816 cat >"conftest.$ac_ext" <<_ACEOF
12817 #line 12817 "configure"
12818 #include "confdefs.h"
12819
12820 #include <stdlib.h>
12821 #include <stdarg.h>
12822 #include <stdio.h>
12823 #include <wchar.h>
12824 #ifdef HAVE_LIBUTF8_H
12825 #include <libutf8.h>
12826 #endif
12827 int
12828 main (void)
12829 {
12830 wint_t value
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 rm -f "conftest.$ac_objext"
12836 if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5
12837   (eval $ac_compile) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit "$ac_status"); } &&
12841          { ac_try='test -s "conftest.$ac_objext"'
12842   { (eval echo "$as_me:12842: \"$ac_try\"") >&5
12843   (eval $ac_try) 2>&5
12844   ac_status=$?
12845   echo "$as_me:12845: \$? = $ac_status" >&5
12846   (exit "$ac_status"); }; }; then
12847   cf_cv_wint_t=yes
12848 else
12849   echo "$as_me: failed program was:" >&5
12850 cat "conftest.$ac_ext" >&5
12851 cf_cv_wint_t=unknown
12852 fi
12853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12854 fi
12855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12856 fi
12857 echo "$as_me:12857: result: $cf_cv_wint_t" >&5
12858 echo "${ECHO_T}$cf_cv_wint_t" >&6
12859
12860 if test "$cf_cv_wint_t" = yes ; then
12861
12862 cat >>confdefs.h <<\EOF
12863 #define NEED_WCHAR_H 1
12864 EOF
12865
12866         NEED_WCHAR_H=1
12867 fi
12868
12869 # if we do not find wint_t in either place, use substitution to provide a fallback.
12870 if test "$cf_cv_wint_t" = unknown ; then
12871         NCURSES_WINT_T=1
12872 fi
12873
12874 # if we find wint_t in either place, use substitution to provide a fallback.
12875 if test "$cf_cv_wint_t" != unknown ; then
12876         NCURSES_OK_WINT_T=1
12877 fi
12878
12879         if test "$NCURSES_MBSTATE_T" != 0; then
12880
12881 cat >>confdefs.h <<\EOF
12882 #define NEED_MBSTATE_T_DEF 1
12883 EOF
12884
12885         fi
12886 fi
12887
12888 ###   use option --disable-lp64 to allow long chtype
12889 echo "$as_me:12889: checking whether to enable _LP64 definition in curses.h" >&5
12890 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12891
12892 # Check whether --enable-lp64 or --disable-lp64 was given.
12893 if test "${enable_lp64+set}" = set; then
12894   enableval="$enable_lp64"
12895   with_lp64=$enableval
12896 else
12897   with_lp64=$cf_dft_with_lp64
12898 fi;
12899 echo "$as_me:12899: result: $with_lp64" >&5
12900 echo "${ECHO_T}$with_lp64" >&6
12901
12902 if test "x$with_lp64" = xyes ; then
12903         cf_cv_enable_lp64=1
12904 else
12905         cf_cv_enable_lp64=0
12906 fi
12907
12908 # Check whether --enable-largefile or --disable-largefile was given.
12909 if test "${enable_largefile+set}" = set; then
12910   enableval="$enable_largefile"
12911
12912 fi;
12913 if test "$enable_largefile" != no; then
12914
12915   echo "$as_me:12915: checking for special C compiler options needed for large files" >&5
12916 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12917 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12918   echo $ECHO_N "(cached) $ECHO_C" >&6
12919 else
12920   ac_cv_sys_largefile_CC=no
12921      if test "$GCC" != yes; then
12922        ac_save_CC=$CC
12923        while :; do
12924          # IRIX 6.2 and later do not support large files by default,
12925          # so use the C compiler's -n32 option if that helps.
12926          cat >"conftest.$ac_ext" <<_ACEOF
12927 #line 12927 "configure"
12928 #include "confdefs.h"
12929 #include <sys/types.h>
12930  /* Check that off_t can represent 2**63 - 1 correctly.
12931     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12932     since some C++ compilers masquerading as C compilers
12933     incorrectly reject 9223372036854775807.  */
12934 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12935   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12936                        && LARGE_OFF_T % 2147483647 == 1)
12937                       ? 1 : -1];
12938 int
12939 main (void)
12940 {
12941
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946          rm -f "conftest.$ac_objext"
12947 if { (eval echo "$as_me:12947: \"$ac_compile\"") >&5
12948   (eval $ac_compile) 2>&5
12949   ac_status=$?
12950   echo "$as_me:12950: \$? = $ac_status" >&5
12951   (exit "$ac_status"); } &&
12952          { ac_try='test -s "conftest.$ac_objext"'
12953   { (eval echo "$as_me:12953: \"$ac_try\"") >&5
12954   (eval $ac_try) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit "$ac_status"); }; }; then
12958   break
12959 else
12960   echo "$as_me: failed program was:" >&5
12961 cat "conftest.$ac_ext" >&5
12962 fi
12963 rm -f "conftest.$ac_objext"
12964          CC="$CC -n32"
12965          rm -f "conftest.$ac_objext"
12966 if { (eval echo "$as_me:12966: \"$ac_compile\"") >&5
12967   (eval $ac_compile) 2>&5
12968   ac_status=$?
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit "$ac_status"); } &&
12971          { ac_try='test -s "conftest.$ac_objext"'
12972   { (eval echo "$as_me:12972: \"$ac_try\"") >&5
12973   (eval $ac_try) 2>&5
12974   ac_status=$?
12975   echo "$as_me:12975: \$? = $ac_status" >&5
12976   (exit "$ac_status"); }; }; then
12977   ac_cv_sys_largefile_CC=' -n32'; break
12978 else
12979   echo "$as_me: failed program was:" >&5
12980 cat "conftest.$ac_ext" >&5
12981 fi
12982 rm -f "conftest.$ac_objext"
12983          break
12984        done
12985        CC=$ac_save_CC
12986        rm -f "conftest.$ac_ext"
12987     fi
12988 fi
12989 echo "$as_me:12989: result: $ac_cv_sys_largefile_CC" >&5
12990 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12991   if test "$ac_cv_sys_largefile_CC" != no; then
12992     CC=$CC$ac_cv_sys_largefile_CC
12993   fi
12994
12995   echo "$as_me:12995: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12996 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12997 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12998   echo $ECHO_N "(cached) $ECHO_C" >&6
12999 else
13000   while :; do
13001   ac_cv_sys_file_offset_bits=no
13002   cat >"conftest.$ac_ext" <<_ACEOF
13003 #line 13003 "configure"
13004 #include "confdefs.h"
13005 #include <sys/types.h>
13006  /* Check that off_t can represent 2**63 - 1 correctly.
13007     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13008     since some C++ compilers masquerading as C compilers
13009     incorrectly reject 9223372036854775807.  */
13010 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13011   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13012                        && LARGE_OFF_T % 2147483647 == 1)
13013                       ? 1 : -1];
13014 int
13015 main (void)
13016 {
13017
13018   ;
13019   return 0;
13020 }
13021 _ACEOF
13022 rm -f "conftest.$ac_objext"
13023 if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5
13024   (eval $ac_compile) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit "$ac_status"); } &&
13028          { ac_try='test -s "conftest.$ac_objext"'
13029   { (eval echo "$as_me:13029: \"$ac_try\"") >&5
13030   (eval $ac_try) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit "$ac_status"); }; }; then
13034   break
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 cat "conftest.$ac_ext" >&5
13038 fi
13039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13040   cat >"conftest.$ac_ext" <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043 #define _FILE_OFFSET_BITS 64
13044 #include <sys/types.h>
13045  /* Check that off_t can represent 2**63 - 1 correctly.
13046     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13047     since some C++ compilers masquerading as C compilers
13048     incorrectly reject 9223372036854775807.  */
13049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13050   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13051                        && LARGE_OFF_T % 2147483647 == 1)
13052                       ? 1 : -1];
13053 int
13054 main (void)
13055 {
13056
13057   ;
13058   return 0;
13059 }
13060 _ACEOF
13061 rm -f "conftest.$ac_objext"
13062 if { (eval echo "$as_me:13062: \"$ac_compile\"") >&5
13063   (eval $ac_compile) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit "$ac_status"); } &&
13067          { ac_try='test -s "conftest.$ac_objext"'
13068   { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069   (eval $ac_try) 2>&5
13070   ac_status=$?
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit "$ac_status"); }; }; then
13073   ac_cv_sys_file_offset_bits=64; break
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat "conftest.$ac_ext" >&5
13077 fi
13078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13079   break
13080 done
13081 fi
13082 echo "$as_me:13082: result: $ac_cv_sys_file_offset_bits" >&5
13083 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13084 if test "$ac_cv_sys_file_offset_bits" != no; then
13085
13086 cat >>confdefs.h <<EOF
13087 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13088 EOF
13089
13090 fi
13091 rm -rf conftest*
13092   echo "$as_me:13092: checking for _LARGE_FILES value needed for large files" >&5
13093 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13094 if test "${ac_cv_sys_large_files+set}" = set; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   while :; do
13098   ac_cv_sys_large_files=no
13099   cat >"conftest.$ac_ext" <<_ACEOF
13100 #line 13100 "configure"
13101 #include "confdefs.h"
13102 #include <sys/types.h>
13103  /* Check that off_t can represent 2**63 - 1 correctly.
13104     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13105     since some C++ compilers masquerading as C compilers
13106     incorrectly reject 9223372036854775807.  */
13107 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13108   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13109                        && LARGE_OFF_T % 2147483647 == 1)
13110                       ? 1 : -1];
13111 int
13112 main (void)
13113 {
13114
13115   ;
13116   return 0;
13117 }
13118 _ACEOF
13119 rm -f "conftest.$ac_objext"
13120 if { (eval echo "$as_me:13120: \"$ac_compile\"") >&5
13121   (eval $ac_compile) 2>&5
13122   ac_status=$?
13123   echo "$as_me:13123: \$? = $ac_status" >&5
13124   (exit "$ac_status"); } &&
13125          { ac_try='test -s "conftest.$ac_objext"'
13126   { (eval echo "$as_me:13126: \"$ac_try\"") >&5
13127   (eval $ac_try) 2>&5
13128   ac_status=$?
13129   echo "$as_me:13129: \$? = $ac_status" >&5
13130   (exit "$ac_status"); }; }; then
13131   break
13132 else
13133   echo "$as_me: failed program was:" >&5
13134 cat "conftest.$ac_ext" >&5
13135 fi
13136 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13137   cat >"conftest.$ac_ext" <<_ACEOF
13138 #line 13138 "configure"
13139 #include "confdefs.h"
13140 #define _LARGE_FILES 1
13141 #include <sys/types.h>
13142  /* Check that off_t can represent 2**63 - 1 correctly.
13143     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13144     since some C++ compilers masquerading as C compilers
13145     incorrectly reject 9223372036854775807.  */
13146 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13147   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13148                        && LARGE_OFF_T % 2147483647 == 1)
13149                       ? 1 : -1];
13150 int
13151 main (void)
13152 {
13153
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 rm -f "conftest.$ac_objext"
13159 if { (eval echo "$as_me:13159: \"$ac_compile\"") >&5
13160   (eval $ac_compile) 2>&5
13161   ac_status=$?
13162   echo "$as_me:13162: \$? = $ac_status" >&5
13163   (exit "$ac_status"); } &&
13164          { ac_try='test -s "conftest.$ac_objext"'
13165   { (eval echo "$as_me:13165: \"$ac_try\"") >&5
13166   (eval $ac_try) 2>&5
13167   ac_status=$?
13168   echo "$as_me:13168: \$? = $ac_status" >&5
13169   (exit "$ac_status"); }; }; then
13170   ac_cv_sys_large_files=1; break
13171 else
13172   echo "$as_me: failed program was:" >&5
13173 cat "conftest.$ac_ext" >&5
13174 fi
13175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13176   break
13177 done
13178 fi
13179 echo "$as_me:13179: result: $ac_cv_sys_large_files" >&5
13180 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13181 if test "$ac_cv_sys_large_files" != no; then
13182
13183 cat >>confdefs.h <<EOF
13184 #define _LARGE_FILES $ac_cv_sys_large_files
13185 EOF
13186
13187 fi
13188 rm -rf conftest*
13189 fi
13190
13191         if test "$enable_largefile" != no ; then
13192         echo "$as_me:13192: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13193 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13194 if test "${ac_cv_sys_largefile_source+set}" = set; then
13195   echo $ECHO_N "(cached) $ECHO_C" >&6
13196 else
13197   while :; do
13198   ac_cv_sys_largefile_source=no
13199   cat >"conftest.$ac_ext" <<_ACEOF
13200 #line 13200 "configure"
13201 #include "confdefs.h"
13202 #include <stdio.h>
13203 int
13204 main (void)
13205 {
13206 return !fseeko;
13207   ;
13208   return 0;
13209 }
13210 _ACEOF
13211 rm -f "conftest.$ac_objext"
13212 if { (eval echo "$as_me:13212: \"$ac_compile\"") >&5
13213   (eval $ac_compile) 2>&5
13214   ac_status=$?
13215   echo "$as_me:13215: \$? = $ac_status" >&5
13216   (exit "$ac_status"); } &&
13217          { ac_try='test -s "conftest.$ac_objext"'
13218   { (eval echo "$as_me:13218: \"$ac_try\"") >&5
13219   (eval $ac_try) 2>&5
13220   ac_status=$?
13221   echo "$as_me:13221: \$? = $ac_status" >&5
13222   (exit "$ac_status"); }; }; then
13223   break
13224 else
13225   echo "$as_me: failed program was:" >&5
13226 cat "conftest.$ac_ext" >&5
13227 fi
13228 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13229   cat >"conftest.$ac_ext" <<_ACEOF
13230 #line 13230 "configure"
13231 #include "confdefs.h"
13232 #define _LARGEFILE_SOURCE 1
13233 #include <stdio.h>
13234 int
13235 main (void)
13236 {
13237 return !fseeko;
13238   ;
13239   return 0;
13240 }
13241 _ACEOF
13242 rm -f "conftest.$ac_objext"
13243 if { (eval echo "$as_me:13243: \"$ac_compile\"") >&5
13244   (eval $ac_compile) 2>&5
13245   ac_status=$?
13246   echo "$as_me:13246: \$? = $ac_status" >&5
13247   (exit "$ac_status"); } &&
13248          { ac_try='test -s "conftest.$ac_objext"'
13249   { (eval echo "$as_me:13249: \"$ac_try\"") >&5
13250   (eval $ac_try) 2>&5
13251   ac_status=$?
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit "$ac_status"); }; }; then
13254   ac_cv_sys_largefile_source=1; break
13255 else
13256   echo "$as_me: failed program was:" >&5
13257 cat "conftest.$ac_ext" >&5
13258 fi
13259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13260   break
13261 done
13262 fi
13263 echo "$as_me:13263: result: $ac_cv_sys_largefile_source" >&5
13264 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13265 if test "$ac_cv_sys_largefile_source" != no; then
13266
13267 cat >>confdefs.h <<EOF
13268 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13269 EOF
13270
13271 fi
13272 rm -rf conftest*
13273
13274 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13275 # in glibc 2.1.3, but that breaks too many other things.
13276 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13277 echo "$as_me:13277: checking for fseeko" >&5
13278 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13279 if test "${ac_cv_func_fseeko+set}" = set; then
13280   echo $ECHO_N "(cached) $ECHO_C" >&6
13281 else
13282   cat >"conftest.$ac_ext" <<_ACEOF
13283 #line 13283 "configure"
13284 #include "confdefs.h"
13285 #include <stdio.h>
13286 int
13287 main (void)
13288 {
13289 return fseeko && fseeko (stdin, 0, 0);
13290   ;
13291   return 0;
13292 }
13293 _ACEOF
13294 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13295 if { (eval echo "$as_me:13295: \"$ac_link\"") >&5
13296   (eval $ac_link) 2>&5
13297   ac_status=$?
13298   echo "$as_me:13298: \$? = $ac_status" >&5
13299   (exit "$ac_status"); } &&
13300          { ac_try='test -s "conftest$ac_exeext"'
13301   { (eval echo "$as_me:13301: \"$ac_try\"") >&5
13302   (eval $ac_try) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit "$ac_status"); }; }; then
13306   ac_cv_func_fseeko=yes
13307 else
13308   echo "$as_me: failed program was:" >&5
13309 cat "conftest.$ac_ext" >&5
13310 ac_cv_func_fseeko=no
13311 fi
13312 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13313 fi
13314 echo "$as_me:13314: result: $ac_cv_func_fseeko" >&5
13315 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13316 if test $ac_cv_func_fseeko = yes; then
13317
13318 cat >>confdefs.h <<\EOF
13319 #define HAVE_FSEEKO 1
13320 EOF
13321
13322 fi
13323
13324         # Normally we would collect these definitions in the config.h,
13325         # but (like _XOPEN_SOURCE), some environments rely on having these
13326         # defined before any of the system headers are included.  Another
13327         # case comes up with C++, e.g., on AIX the compiler compiles the
13328         # header files by themselves before looking at the body files it is
13329         # told to compile.  For ncurses, those header files do not include
13330         # the config.h
13331         if test "$ac_cv_sys_large_files" != no
13332         then
13333
13334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13335         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13336
13337         fi
13338         if test "$ac_cv_sys_largefile_source" != no
13339         then
13340
13341         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13342         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13343
13344         fi
13345         if test "$ac_cv_sys_file_offset_bits" != no
13346         then
13347
13348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13349         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13350
13351         fi
13352
13353         echo "$as_me:13353: checking whether to use struct dirent64" >&5
13354 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13355 if test "${cf_cv_struct_dirent64+set}" = set; then
13356   echo $ECHO_N "(cached) $ECHO_C" >&6
13357 else
13358
13359                 cat >"conftest.$ac_ext" <<_ACEOF
13360 #line 13360 "configure"
13361 #include "confdefs.h"
13362
13363 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13364 #include <sys/types.h>
13365 #include <dirent.h>
13366
13367 int
13368 main (void)
13369 {
13370
13371                 /* if transitional largefile support is setup, this is true */
13372                 extern struct dirent64 * readdir(DIR *);
13373                 struct dirent64 *x = readdir((DIR *)0);
13374                 struct dirent *y = readdir((DIR *)0);
13375                 int z = x - y;
13376                 (void)z;
13377
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 rm -f "conftest.$ac_objext"
13383 if { (eval echo "$as_me:13383: \"$ac_compile\"") >&5
13384   (eval $ac_compile) 2>&5
13385   ac_status=$?
13386   echo "$as_me:13386: \$? = $ac_status" >&5
13387   (exit "$ac_status"); } &&
13388          { ac_try='test -s "conftest.$ac_objext"'
13389   { (eval echo "$as_me:13389: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:13392: \$? = $ac_status" >&5
13393   (exit "$ac_status"); }; }; then
13394   cf_cv_struct_dirent64=yes
13395 else
13396   echo "$as_me: failed program was:" >&5
13397 cat "conftest.$ac_ext" >&5
13398 cf_cv_struct_dirent64=no
13399 fi
13400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13401
13402 fi
13403 echo "$as_me:13403: result: $cf_cv_struct_dirent64" >&5
13404 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13405         test "$cf_cv_struct_dirent64" = yes &&
13406 cat >>confdefs.h <<\EOF
13407 #define HAVE_STRUCT_DIRENT64 1
13408 EOF
13409
13410         fi
13411
13412 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13413 echo "$as_me:13413: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13414 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13415
13416 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13417 if test "${enable_tparm_varargs+set}" = set; then
13418   enableval="$enable_tparm_varargs"
13419   with_tparm_varargs=$enableval
13420 else
13421   with_tparm_varargs=yes
13422 fi;
13423 echo "$as_me:13423: result: $with_tparm_varargs" >&5
13424 echo "${ECHO_T}$with_tparm_varargs" >&6
13425 NCURSES_TPARM_VARARGS=0
13426 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13427
13428 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13429 if test "$with_ticlib" != no ; then
13430 echo "$as_me:13430: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13431 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13432
13433 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13434 if test "${enable_tic_depends+set}" = set; then
13435   enableval="$enable_tic_depends"
13436   with_tic_depends=$enableval
13437 else
13438   with_tic_depends=yes
13439 fi;
13440 echo "$as_me:13440: result: $with_tic_depends" >&5
13441 echo "${ECHO_T}$with_tic_depends" >&6
13442 else
13443         with_tic_depends=no
13444 fi
13445
13446 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13447 echo "$as_me:13447: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13448 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13449
13450 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13451 if test "${enable_wattr_macros+set}" = set; then
13452   enableval="$enable_wattr_macros"
13453   with_wattr_macros=$enableval
13454 else
13455   with_wattr_macros=yes
13456 fi;
13457 if [ "x$with_wattr_macros" != xyes ]; then
13458         NCURSES_WATTR_MACROS=0
13459         echo "$as_me:13459: result: yes" >&5
13460 echo "${ECHO_T}yes" >&6
13461 else
13462         NCURSES_WATTR_MACROS=1
13463         echo "$as_me:13463: result: no" >&5
13464 echo "${ECHO_T}no" >&6
13465 fi
13466
13467 echo "$as_me:13467: checking for X11 rgb file" >&5
13468 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13469
13470 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13471 if test "${with_x11_rgb+set}" = set; then
13472   withval="$with_x11_rgb"
13473   RGB_PATH=$withval
13474 else
13475   RGB_PATH=auto
13476 fi;
13477
13478 if test "x$RGB_PATH" = xauto
13479 then
13480         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13481         for cf_path in \
13482                 /opt/local/share/X11/rgb.txt \
13483                 /opt/X11/share/X11/rgb.txt \
13484                 /usr/share/X11/rgb.txt \
13485                 /usr/X11/share/X11/rgb.txt \
13486                 /usr/X11/lib/X11/rgb.txt \
13487                 /usr/lib/X11/rgb.txt \
13488                 /etc/X11/rgb.txt \
13489                 /usr/pkg/lib/X11/rgb.txt \
13490                 /usr/X11R7/lib/X11/rgb.txt \
13491                 /usr/X11R6/lib/X11/rgb.txt \
13492                 /usr/X11R5/lib/X11/rgb.txt \
13493                 /usr/X11R4/lib/X11/rgb.txt \
13494                 /usr/local/lib/X11/rgb.txt \
13495                 /usr/local/share/X11/rgb.txt \
13496                 /usr/lib64/X11/rgb.txt
13497         do
13498                 if test -f "$cf_path" ; then
13499                         RGB_PATH="$cf_path"
13500                         break
13501                 fi
13502         done
13503 else
13504         cf_path=$RGB_PATH
13505
13506 if test "x$prefix" != xNONE; then
13507         cf_path_syntax="$prefix"
13508 else
13509         cf_path_syntax="$ac_default_prefix"
13510 fi
13511
13512 case ".$cf_path" in
13513 (.\$\(*\)*|.\'*\'*)
13514         ;;
13515 (..|./*|.\\*)
13516         ;;
13517 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13518         ;;
13519 (.\$\{*prefix\}*|.\$\{*dir\}*)
13520         eval cf_path="$cf_path"
13521         case ".$cf_path" in
13522         (.NONE/*)
13523                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13524                 ;;
13525         esac
13526         ;;
13527 (.no|.NONE/*)
13528         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13529         ;;
13530 (*)
13531         { { echo "$as_me:13531: error: expected a pathname, not \"$cf_path\"" >&5
13532 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13533    { (exit 1); exit 1; }; }
13534         ;;
13535 esac
13536
13537 fi
13538
13539 echo "$as_me:13539: result: $RGB_PATH" >&5
13540 echo "${ECHO_T}$RGB_PATH" >&6
13541
13542 cat >>confdefs.h <<EOF
13543 #define RGB_PATH "$cf_path"
13544 EOF
13545
13546 no_x11_rgb=
13547 if test "$RGB_PATH" = no
13548 then
13549         no_x11_rgb="#"
13550 fi
13551
13552 ###   use option --with-bool to override bool's type
13553 echo "$as_me:13553: checking for type of bool" >&5
13554 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13555
13556 # Check whether --with-bool or --without-bool was given.
13557 if test "${with_bool+set}" = set; then
13558   withval="$with_bool"
13559   NCURSES_BOOL="$withval"
13560 else
13561   NCURSES_BOOL=auto
13562 fi;
13563 echo "$as_me:13563: result: $NCURSES_BOOL" >&5
13564 echo "${ECHO_T}$NCURSES_BOOL" >&6
13565
13566 echo "$as_me:13566: checking for alternate terminal capabilities file" >&5
13567 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13568
13569 # Check whether --with-caps or --without-caps was given.
13570 if test "${with_caps+set}" = set; then
13571   withval="$with_caps"
13572   TERMINFO_CAPS=Caps.$withval
13573 else
13574   TERMINFO_CAPS=Caps
13575 fi;
13576 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13577 echo "$as_me:13577: result: $TERMINFO_CAPS" >&5
13578 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13579
13580 ###   use option --with-chtype to override chtype's type
13581 echo "$as_me:13581: checking for type of chtype" >&5
13582 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13583
13584 # Check whether --with-chtype or --without-chtype was given.
13585 if test "${with_chtype+set}" = set; then
13586   withval="$with_chtype"
13587   NCURSES_CHTYPE="$withval"
13588 else
13589   NCURSES_CHTYPE=$cf_dft_chtype
13590 fi;
13591 echo "$as_me:13591: result: $NCURSES_CHTYPE" >&5
13592 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13593
13594 ###   use option --with-ospeed to override ospeed's type
13595 echo "$as_me:13595: checking for type of ospeed" >&5
13596 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13597
13598 # Check whether --with-ospeed or --without-ospeed was given.
13599 if test "${with_ospeed+set}" = set; then
13600   withval="$with_ospeed"
13601   NCURSES_OSPEED="$withval"
13602 else
13603   NCURSES_OSPEED=short
13604 fi;
13605 echo "$as_me:13605: result: $NCURSES_OSPEED" >&5
13606 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13607
13608 ###   use option --with-mmask-t to override mmask_t's type
13609 echo "$as_me:13609: checking for type of mmask_t" >&5
13610 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13611
13612 # Check whether --with-mmask-t or --without-mmask-t was given.
13613 if test "${with_mmask_t+set}" = set; then
13614   withval="$with_mmask_t"
13615   NCURSES_MMASK_T="$withval"
13616 else
13617   NCURSES_MMASK_T=$cf_dft_mmask_t
13618 fi;
13619 echo "$as_me:13619: result: $NCURSES_MMASK_T" >&5
13620 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13621
13622 ###   use option --with-ccharw-max to override CCHARW_MAX size
13623 echo "$as_me:13623: checking for size CCHARW_MAX" >&5
13624 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13625
13626 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13627 if test "${with_ccharw_max+set}" = set; then
13628   withval="$with_ccharw_max"
13629   NCURSES_CCHARW_MAX="$withval"
13630 else
13631   NCURSES_CCHARW_MAX=5
13632 fi;
13633 echo "$as_me:13633: result: $NCURSES_CCHARW_MAX" >&5
13634 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13635
13636 echo "$as_me:13636: checking for ANSI C header files" >&5
13637 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13638 if test "${ac_cv_header_stdc+set}" = set; then
13639   echo $ECHO_N "(cached) $ECHO_C" >&6
13640 else
13641   cat >"conftest.$ac_ext" <<_ACEOF
13642 #line 13642 "configure"
13643 #include "confdefs.h"
13644 #include <stdlib.h>
13645 #include <stdarg.h>
13646 #include <string.h>
13647 #include <float.h>
13648
13649 _ACEOF
13650 if { (eval echo "$as_me:13650: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13651   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13652   ac_status=$?
13653   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13654   rm -f conftest.er1
13655   cat conftest.err >&5
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit "$ac_status"); } >/dev/null; then
13658   if test -s conftest.err; then
13659     ac_cpp_err=$ac_c_preproc_warn_flag
13660   else
13661     ac_cpp_err=
13662   fi
13663 else
13664   ac_cpp_err=yes
13665 fi
13666 if test -z "$ac_cpp_err"; then
13667   ac_cv_header_stdc=yes
13668 else
13669   echo "$as_me: failed program was:" >&5
13670   cat "conftest.$ac_ext" >&5
13671   ac_cv_header_stdc=no
13672 fi
13673 rm -f conftest.err "conftest.$ac_ext"
13674
13675 if test $ac_cv_header_stdc = yes; then
13676   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13677   cat >"conftest.$ac_ext" <<_ACEOF
13678 #line 13678 "configure"
13679 #include "confdefs.h"
13680 #include <string.h>
13681
13682 _ACEOF
13683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13684   $EGREP "memchr" >/dev/null 2>&1; then
13685   :
13686 else
13687   ac_cv_header_stdc=no
13688 fi
13689 rm -rf conftest*
13690
13691 fi
13692
13693 if test $ac_cv_header_stdc = yes; then
13694   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13695   cat >"conftest.$ac_ext" <<_ACEOF
13696 #line 13696 "configure"
13697 #include "confdefs.h"
13698 #include <stdlib.h>
13699
13700 _ACEOF
13701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13702   $EGREP "free" >/dev/null 2>&1; then
13703   :
13704 else
13705   ac_cv_header_stdc=no
13706 fi
13707 rm -rf conftest*
13708
13709 fi
13710
13711 if test $ac_cv_header_stdc = yes; then
13712   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13713   if test "$cross_compiling" = yes; then
13714   :
13715 else
13716   cat >"conftest.$ac_ext" <<_ACEOF
13717 #line 13717 "configure"
13718 #include "confdefs.h"
13719 #include <ctype.h>
13720 #if ((' ' & 0x0FF) == 0x020)
13721 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13722 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13723 #else
13724 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13725                      || ('j' <= (c) && (c) <= 'r') \
13726                      || ('s' <= (c) && (c) <= 'z'))
13727 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13728 #endif
13729
13730 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13731 int
13732 main (void)
13733 {
13734   int i;
13735   for (i = 0; i < 256; i++)
13736     if (XOR (islower (i), ISLOWER (i))
13737         || toupper (i) != TOUPPER (i))
13738       $ac_main_return(2);
13739   $ac_main_return (0);
13740 }
13741 _ACEOF
13742 rm -f "conftest$ac_exeext"
13743 if { (eval echo "$as_me:13743: \"$ac_link\"") >&5
13744   (eval $ac_link) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13748   { (eval echo "$as_me:13748: \"$ac_try\"") >&5
13749   (eval $ac_try) 2>&5
13750   ac_status=$?
13751   echo "$as_me:13751: \$? = $ac_status" >&5
13752   (exit "$ac_status"); }; }; then
13753   :
13754 else
13755   echo "$as_me: program exited with status $ac_status" >&5
13756 echo "$as_me: failed program was:" >&5
13757 cat "conftest.$ac_ext" >&5
13758 ac_cv_header_stdc=no
13759 fi
13760 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13761 fi
13762 fi
13763 fi
13764 echo "$as_me:13764: result: $ac_cv_header_stdc" >&5
13765 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13766 if test $ac_cv_header_stdc = yes; then
13767
13768 cat >>confdefs.h <<\EOF
13769 #define STDC_HEADERS 1
13770 EOF
13771
13772 fi
13773
13774 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13775
13776 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13777                   inttypes.h stdint.h unistd.h
13778 do
13779 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13780 echo "$as_me:13780: checking for $ac_header" >&5
13781 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13782 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13783   echo $ECHO_N "(cached) $ECHO_C" >&6
13784 else
13785   cat >"conftest.$ac_ext" <<_ACEOF
13786 #line 13786 "configure"
13787 #include "confdefs.h"
13788 $ac_includes_default
13789 #include <$ac_header>
13790 _ACEOF
13791 rm -f "conftest.$ac_objext"
13792 if { (eval echo "$as_me:13792: \"$ac_compile\"") >&5
13793   (eval $ac_compile) 2>&5
13794   ac_status=$?
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit "$ac_status"); } &&
13797          { ac_try='test -s "conftest.$ac_objext"'
13798   { (eval echo "$as_me:13798: \"$ac_try\"") >&5
13799   (eval $ac_try) 2>&5
13800   ac_status=$?
13801   echo "$as_me:13801: \$? = $ac_status" >&5
13802   (exit "$ac_status"); }; }; then
13803   eval "$as_ac_Header=yes"
13804 else
13805   echo "$as_me: failed program was:" >&5
13806 cat "conftest.$ac_ext" >&5
13807 eval "$as_ac_Header=no"
13808 fi
13809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13810 fi
13811 echo "$as_me:13811: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13812 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13813 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13814   cat >>confdefs.h <<EOF
13815 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13816 EOF
13817
13818 fi
13819 done
13820
13821 echo "$as_me:13821: checking for signed char" >&5
13822 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13823 if test "${ac_cv_type_signed_char+set}" = set; then
13824   echo $ECHO_N "(cached) $ECHO_C" >&6
13825 else
13826   cat >"conftest.$ac_ext" <<_ACEOF
13827 #line 13827 "configure"
13828 #include "confdefs.h"
13829 $ac_includes_default
13830 int
13831 main (void)
13832 {
13833 if ((signed char *) 0)
13834   return 0;
13835 if (sizeof (signed char))
13836   return 0;
13837   ;
13838   return 0;
13839 }
13840 _ACEOF
13841 rm -f "conftest.$ac_objext"
13842 if { (eval echo "$as_me:13842: \"$ac_compile\"") >&5
13843   (eval $ac_compile) 2>&5
13844   ac_status=$?
13845   echo "$as_me:13845: \$? = $ac_status" >&5
13846   (exit "$ac_status"); } &&
13847          { ac_try='test -s "conftest.$ac_objext"'
13848   { (eval echo "$as_me:13848: \"$ac_try\"") >&5
13849   (eval $ac_try) 2>&5
13850   ac_status=$?
13851   echo "$as_me:13851: \$? = $ac_status" >&5
13852   (exit "$ac_status"); }; }; then
13853   ac_cv_type_signed_char=yes
13854 else
13855   echo "$as_me: failed program was:" >&5
13856 cat "conftest.$ac_ext" >&5
13857 ac_cv_type_signed_char=no
13858 fi
13859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13860 fi
13861 echo "$as_me:13861: result: $ac_cv_type_signed_char" >&5
13862 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13863
13864 echo "$as_me:13864: checking size of signed char" >&5
13865 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13866 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13867   echo $ECHO_N "(cached) $ECHO_C" >&6
13868 else
13869   if test "$ac_cv_type_signed_char" = yes; then
13870   if test "$cross_compiling" = yes; then
13871   # Depending upon the size, compute the lo and hi bounds.
13872 cat >"conftest.$ac_ext" <<_ACEOF
13873 #line 13873 "configure"
13874 #include "confdefs.h"
13875 $ac_includes_default
13876 int
13877 main (void)
13878 {
13879 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13880   ;
13881   return 0;
13882 }
13883 _ACEOF
13884 rm -f "conftest.$ac_objext"
13885 if { (eval echo "$as_me:13885: \"$ac_compile\"") >&5
13886   (eval $ac_compile) 2>&5
13887   ac_status=$?
13888   echo "$as_me:13888: \$? = $ac_status" >&5
13889   (exit "$ac_status"); } &&
13890          { ac_try='test -s "conftest.$ac_objext"'
13891   { (eval echo "$as_me:13891: \"$ac_try\"") >&5
13892   (eval $ac_try) 2>&5
13893   ac_status=$?
13894   echo "$as_me:13894: \$? = $ac_status" >&5
13895   (exit "$ac_status"); }; }; then
13896   ac_lo=0 ac_mid=0
13897   while :; do
13898     cat >"conftest.$ac_ext" <<_ACEOF
13899 #line 13899 "configure"
13900 #include "confdefs.h"
13901 $ac_includes_default
13902 int
13903 main (void)
13904 {
13905 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13906   ;
13907   return 0;
13908 }
13909 _ACEOF
13910 rm -f "conftest.$ac_objext"
13911 if { (eval echo "$as_me:13911: \"$ac_compile\"") >&5
13912   (eval $ac_compile) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit "$ac_status"); } &&
13916          { ac_try='test -s "conftest.$ac_objext"'
13917   { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit "$ac_status"); }; }; then
13922   ac_hi=$ac_mid; break
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 cat "conftest.$ac_ext" >&5
13926 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
13927 fi
13928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13929   done
13930 else
13931   echo "$as_me: failed program was:" >&5
13932 cat "conftest.$ac_ext" >&5
13933 ac_hi=-1 ac_mid=-1
13934   while :; do
13935     cat >"conftest.$ac_ext" <<_ACEOF
13936 #line 13936 "configure"
13937 #include "confdefs.h"
13938 $ac_includes_default
13939 int
13940 main (void)
13941 {
13942 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 rm -f "conftest.$ac_objext"
13948 if { (eval echo "$as_me:13948: \"$ac_compile\"") >&5
13949   (eval $ac_compile) 2>&5
13950   ac_status=$?
13951   echo "$as_me:13951: \$? = $ac_status" >&5
13952   (exit "$ac_status"); } &&
13953          { ac_try='test -s "conftest.$ac_objext"'
13954   { (eval echo "$as_me:13954: \"$ac_try\"") >&5
13955   (eval $ac_try) 2>&5
13956   ac_status=$?
13957   echo "$as_me:13957: \$? = $ac_status" >&5
13958   (exit "$ac_status"); }; }; then
13959   ac_lo=$ac_mid; break
13960 else
13961   echo "$as_me: failed program was:" >&5
13962 cat "conftest.$ac_ext" >&5
13963 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
13964 fi
13965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13966   done
13967 fi
13968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13969 # Binary search between lo and hi bounds.
13970 while test "x$ac_lo" != "x$ac_hi"; do
13971   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
13972   cat >"conftest.$ac_ext" <<_ACEOF
13973 #line 13973 "configure"
13974 #include "confdefs.h"
13975 $ac_includes_default
13976 int
13977 main (void)
13978 {
13979 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13980   ;
13981   return 0;
13982 }
13983 _ACEOF
13984 rm -f "conftest.$ac_objext"
13985 if { (eval echo "$as_me:13985: \"$ac_compile\"") >&5
13986   (eval $ac_compile) 2>&5
13987   ac_status=$?
13988   echo "$as_me:13988: \$? = $ac_status" >&5
13989   (exit "$ac_status"); } &&
13990          { ac_try='test -s "conftest.$ac_objext"'
13991   { (eval echo "$as_me:13991: \"$ac_try\"") >&5
13992   (eval $ac_try) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit "$ac_status"); }; }; then
13996   ac_hi=$ac_mid
13997 else
13998   echo "$as_me: failed program was:" >&5
13999 cat "conftest.$ac_ext" >&5
14000 ac_lo=`expr "$ac_mid" + 1`
14001 fi
14002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14003 done
14004 ac_cv_sizeof_signed_char=$ac_lo
14005 else
14006   if test "$cross_compiling" = yes; then
14007   { { echo "$as_me:14007: error: cannot run test program while cross compiling" >&5
14008 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14009    { (exit 1); exit 1; }; }
14010 else
14011   cat >"conftest.$ac_ext" <<_ACEOF
14012 #line 14012 "configure"
14013 #include "confdefs.h"
14014 $ac_includes_default
14015 int
14016 main (void)
14017 {
14018 FILE *f = fopen ("conftest.val", "w");
14019 if (!f)
14020   $ac_main_return (1);
14021 fprintf (f, "%d", (sizeof (signed char)));
14022 fclose (f);
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 rm -f "conftest$ac_exeext"
14028 if { (eval echo "$as_me:14028: \"$ac_link\"") >&5
14029   (eval $ac_link) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14033   { (eval echo "$as_me:14033: \"$ac_try\"") >&5
14034   (eval $ac_try) 2>&5
14035   ac_status=$?
14036   echo "$as_me:14036: \$? = $ac_status" >&5
14037   (exit "$ac_status"); }; }; then
14038   ac_cv_sizeof_signed_char=`cat conftest.val`
14039 else
14040   echo "$as_me: program exited with status $ac_status" >&5
14041 echo "$as_me: failed program was:" >&5
14042 cat "conftest.$ac_ext" >&5
14043 fi
14044 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14045 fi
14046 fi
14047 rm -f conftest.val
14048 else
14049   ac_cv_sizeof_signed_char=0
14050 fi
14051 fi
14052 echo "$as_me:14052: result: $ac_cv_sizeof_signed_char" >&5
14053 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14054 cat >>confdefs.h <<EOF
14055 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14056 EOF
14057
14058 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14059         NCURSES_SBOOL="signed char"
14060 else
14061         NCURSES_SBOOL="char"
14062 fi
14063 echo "$as_me:14063: checking if you want to use signed Boolean array in term.h" >&5
14064 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14065
14066 # Check whether --enable-signed-char or --disable-signed-char was given.
14067 if test "${enable_signed_char+set}" = set; then
14068   enableval="$enable_signed_char"
14069   with_signed_char=$enableval
14070 else
14071   with_signed_char=no
14072 fi;
14073 echo "$as_me:14073: result: $with_signed_char" >&5
14074 echo "${ECHO_T}$with_signed_char" >&6
14075 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14076
14077 ###   use option --with-tparm-arg to override tparm's argument type
14078 echo "$as_me:14078: checking for type of tparm args" >&5
14079 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14080
14081 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14082 if test "${with_tparm_arg+set}" = set; then
14083   withval="$with_tparm_arg"
14084   NCURSES_TPARM_ARG="$withval"
14085 else
14086   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14087 fi;
14088 echo "$as_me:14088: result: $NCURSES_TPARM_ARG" >&5
14089 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14090
14091 ### Enable compiling-in rcs id's
14092 echo "$as_me:14092: checking if RCS identifiers should be compiled-in" >&5
14093 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14094
14095 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14096 if test "${with_rcs_ids+set}" = set; then
14097   withval="$with_rcs_ids"
14098   with_rcs_ids=$withval
14099 else
14100   with_rcs_ids=no
14101 fi;
14102 echo "$as_me:14102: result: $with_rcs_ids" >&5
14103 echo "${ECHO_T}$with_rcs_ids" >&6
14104 test "x$with_rcs_ids" = xyes &&
14105 cat >>confdefs.h <<\EOF
14106 #define USE_RCS_IDS 1
14107 EOF
14108
14109 ###############################################################################
14110
14111 echo "$as_me:14111: checking format of man-pages" >&5
14112 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14113
14114 # Check whether --with-manpage-format or --without-manpage-format was given.
14115 if test "${with_manpage_format+set}" = set; then
14116   withval="$with_manpage_format"
14117   MANPAGE_FORMAT=$withval
14118 else
14119   MANPAGE_FORMAT=unknown
14120 fi;
14121
14122 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14123 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14124
14125 cf_unknown=
14126
14127 case "$MANPAGE_FORMAT" in
14128 (unknown)
14129         if test -z "$MANPATH" ; then
14130                 MANPATH="/usr/man:/usr/share/man"
14131         fi
14132
14133         # look for the 'date' man-page (it's most likely to be installed!)
14134         MANPAGE_FORMAT=
14135         cf_preform="no"
14136         cf_catonly="yes"
14137         cf_example="date"
14138
14139         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14140         for cf_dir in $MANPATH; do
14141                 test -z "$cf_dir" && cf_dir=/usr/man
14142                 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
14143                 do
14144                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14145                         if test "x$cf_test" = "x$cf_name" ; then
14146
14147                                 case "$cf_name" in
14148                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14149                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14150                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14151                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14152                                 esac
14153
14154                                 case "$cf_name" in
14155                                 ($cf_dir/man*)
14156                                         cf_catonly=no
14157                                         ;;
14158                                 ($cf_dir/cat*)
14159                                         cf_preform=yes
14160                                         ;;
14161                                 esac
14162                                 break
14163                         fi
14164
14165                         # if we found a match in either man* or cat*, stop looking
14166                         if test -n "$MANPAGE_FORMAT" ; then
14167                                 cf_found=no
14168                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14169                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14170                                 case "$cf_name" in
14171                                 ($cf_dir/cat*)
14172                                         cf_found=yes
14173                                         ;;
14174                                 esac
14175                                 test "$cf_found" = yes && break
14176                         fi
14177                 done
14178                 # only check the first directory in $MANPATH where we find manpages
14179                 if test -n "$MANPAGE_FORMAT" ; then
14180                         break
14181                 fi
14182         done
14183         # if we did not find the example, just assume it is normal
14184         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14185         IFS="$ac_save_ifs"
14186         ;;
14187 (*)
14188         for cf_option in $MANPAGE_FORMAT; do
14189         case "$cf_option" in
14190         (gzip|compress|BSDI|normal|formatted|catonly)
14191                 ;;
14192         (*)
14193                 cf_unknown="$cf_unknown $cf_option"
14194                 ;;
14195         esac
14196         done
14197         ;;
14198 esac
14199
14200 echo "$as_me:14200: result: $MANPAGE_FORMAT" >&5
14201 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14202 if test -n "$cf_unknown" ; then
14203         { echo "$as_me:14203: WARNING: Unexpected manpage-format $cf_unknown" >&5
14204 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14205 fi
14206
14207 echo "$as_me:14207: checking for manpage renaming" >&5
14208 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14209
14210 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14211 if test "${with_manpage_renames+set}" = set; then
14212   withval="$with_manpage_renames"
14213   MANPAGE_RENAMES=$withval
14214 else
14215   MANPAGE_RENAMES=yes
14216 fi;
14217
14218 case ".$MANPAGE_RENAMES" in
14219 (.no)
14220         ;;
14221 (.|.yes)
14222         # Debian 'man' program?
14223         if test -f /etc/debian_version ; then
14224                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14225         else
14226                 MANPAGE_RENAMES=no
14227         fi
14228         ;;
14229 esac
14230
14231 if test "$MANPAGE_RENAMES" != no ; then
14232         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14233                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14234         elif test ! -f "$MANPAGE_RENAMES" ; then
14235                 { { echo "$as_me:14235: error: not a filename: $MANPAGE_RENAMES" >&5
14236 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14237    { (exit 1); exit 1; }; }
14238         fi
14239
14240         test ! -d man && mkdir man
14241
14242         # Construct a sed-script to perform renaming within man-pages
14243         if test -n "$MANPAGE_RENAMES" ; then
14244                 test ! -d man && mkdir man
14245                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14246         fi
14247 fi
14248
14249 echo "$as_me:14249: result: $MANPAGE_RENAMES" >&5
14250 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14251
14252 echo "$as_me:14252: checking if manpage aliases will be installed" >&5
14253 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14254
14255 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14256 if test "${with_manpage_aliases+set}" = set; then
14257   withval="$with_manpage_aliases"
14258   MANPAGE_ALIASES=$withval
14259 else
14260   MANPAGE_ALIASES=yes
14261 fi;
14262
14263 echo "$as_me:14263: result: $MANPAGE_ALIASES" >&5
14264 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14265
14266 case "x$LN_S" in
14267 (xln*)
14268         cf_use_symlinks=yes
14269         ;;
14270 (*)
14271         cf_use_symlinks=no
14272         ;;
14273 esac
14274
14275 MANPAGE_SYMLINKS=no
14276 if test "$MANPAGE_ALIASES" = yes ; then
14277 echo "$as_me:14277: checking if manpage symlinks should be used" >&5
14278 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14279
14280 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14281 if test "${with_manpage_symlinks+set}" = set; then
14282   withval="$with_manpage_symlinks"
14283   MANPAGE_SYMLINKS=$withval
14284 else
14285   MANPAGE_SYMLINKS=$cf_use_symlinks
14286 fi;
14287
14288 if test "$$cf_use_symlinks" = no; then
14289 if test "$MANPAGE_SYMLINKS" = yes ; then
14290         { echo "$as_me:14290: WARNING: cannot make symlinks" >&5
14291 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14292         MANPAGE_SYMLINKS=no
14293 fi
14294 fi
14295
14296 echo "$as_me:14296: result: $MANPAGE_SYMLINKS" >&5
14297 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14298 fi
14299
14300 echo "$as_me:14300: checking for manpage tbl" >&5
14301 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14302
14303 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14304 if test "${with_manpage_tbl+set}" = set; then
14305   withval="$with_manpage_tbl"
14306   MANPAGE_TBL=$withval
14307 else
14308   MANPAGE_TBL=no
14309 fi;
14310
14311 echo "$as_me:14311: result: $MANPAGE_TBL" >&5
14312 echo "${ECHO_T}$MANPAGE_TBL" >&6
14313
14314 if test "$prefix" = "NONE" ; then
14315         cf_prefix="$ac_default_prefix"
14316 else
14317         cf_prefix="$prefix"
14318 fi
14319
14320 case "$MANPAGE_FORMAT" in
14321 (*catonly*)
14322         cf_format=yes
14323         cf_inboth=no
14324         ;;
14325 (*formatted*)
14326         cf_format=yes
14327         cf_inboth=yes
14328         ;;
14329 (*)
14330         cf_format=no
14331         cf_inboth=no
14332         ;;
14333 esac
14334
14335 test ! -d man && mkdir man
14336
14337 cf_so_strip=
14338 cf_compress=
14339 case "$MANPAGE_FORMAT" in
14340 (*compress*)
14341         cf_so_strip="Z"
14342         cf_compress=compress
14343         ;;
14344 (*gzip*)
14345         cf_so_strip="gz"
14346         cf_compress=gzip
14347         ;;
14348 esac
14349
14350 cf_edit_man=./edit_man.sh
14351 cf_man_alias=`pwd`/man_alias.sed
14352
14353 cat >$cf_edit_man <<CF_EOF
14354 #! $SHELL
14355 # this script is generated by the configure-script CF_MAN_PAGES macro.
14356
14357 prefix="$cf_prefix"
14358 datarootdir="$datarootdir"
14359 datadir="$datadir"
14360
14361 NCURSES_MAJOR="$NCURSES_MAJOR"
14362 NCURSES_MINOR="$NCURSES_MINOR"
14363 NCURSES_PATCH="$NCURSES_PATCH"
14364
14365 NCURSES_OSPEED="$NCURSES_OSPEED"
14366 TERMINFO="$TERMINFO"
14367
14368 INSTALL="$INSTALL"
14369 INSTALL_DATA="$INSTALL_DATA"
14370
14371 transform="$program_transform_name"
14372
14373 TMP=\${TMPDIR:=/tmp}/man\$\$
14374 trap "rm -f \$TMP" 0 1 2 3 15
14375
14376 form=\$1
14377 shift || exit 1
14378
14379 verb=\$1
14380 shift || exit 1
14381
14382 mandir=\$1
14383 shift || exit 1
14384
14385 srcdir=\$1
14386 top_srcdir=\$srcdir/..
14387 shift || exit 1
14388
14389 if test "\$form" = normal ; then
14390         if test "$cf_format" = yes ; then
14391         if test "$cf_inboth" = no ; then
14392                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14393                 exit $?
14394         fi
14395         fi
14396         cf_subdir=\$mandir/man
14397         cf_tables=$MANPAGE_TBL
14398 else
14399         cf_subdir=\$mandir/cat
14400         cf_tables=yes
14401 fi
14402
14403 # process the list of source-files
14404 for i in "\$@" ; do
14405 case \$i in
14406 (*.orig|*.rej) ;;
14407 (*.[0-9]*)
14408         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14409         if test "\$verb" = installing ; then
14410         if test ! -d "\$cf_subdir\${section}" ; then
14411                 mkdir -p "\$cf_subdir\$section"
14412         fi
14413         fi
14414
14415         # replace variables in man page
14416         if test ! -f "$cf_man_alias" ; then
14417 cat >>$cf_man_alias <<-CF_EOF2
14418                 s,@DATADIR@,\$datadir,g
14419                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14420                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14421                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14422                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14423                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14424                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14425 CF_EOF
14426
14427         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14428         do
14429                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14430                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14431 cat >>$cf_edit_man <<-CF_EOF
14432                 s,@$cf_NAME@,$cf_name,g
14433 CF_EOF
14434         done
14435
14436 cat >>$cf_edit_man <<CF_EOF
14437 CF_EOF2
14438                 echo "...made $cf_man_alias"
14439         fi
14440
14441         aliases=
14442         cf_source=\`basename "\$i"\`
14443         inalias=\$cf_source
14444         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14445         if test ! -f "\$inalias" ; then
14446                 echo ".. skipped \$cf_source"
14447                 continue
14448         fi
14449 CF_EOF
14450
14451 if test "$MANPAGE_ALIASES" != no ; then
14452 cat >>$cf_edit_man <<CF_EOF
14453         nCurses=ignore.3x
14454         test "$with_curses_h" = yes && nCurses=ncurses.3x
14455         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14456 CF_EOF
14457 fi
14458
14459 if test "$MANPAGE_RENAMES" = no ; then
14460 cat >>$cf_edit_man <<CF_EOF
14461         # perform program transformations for section 1 man pages
14462         if test \$section = 1 ; then
14463                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14464         else
14465                 cf_target=\$cf_subdir\${section}/\$cf_source
14466         fi
14467 CF_EOF
14468 else
14469 cat >>$cf_edit_man <<CF_EOF
14470         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14471         if test -z "\$cf_target" ; then
14472                 echo "? missing rename for \$cf_source"
14473                 cf_target="\$cf_source"
14474         fi
14475         cf_target="\$cf_subdir\${section}/\${cf_target}"
14476
14477 CF_EOF
14478 fi
14479
14480 cat >>$cf_edit_man <<CF_EOF
14481         sed     -f "$cf_man_alias" \\
14482 CF_EOF
14483
14484 if test -f "$MANPAGE_RENAMES" ; then
14485 cat >>$cf_edit_man <<CF_EOF
14486                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14487 CF_EOF
14488 else
14489 cat >>$cf_edit_man <<CF_EOF
14490                 < "\$i" >\$TMP
14491 CF_EOF
14492 fi
14493
14494 cat >>$cf_edit_man <<CF_EOF
14495 if test \$cf_tables = yes ; then
14496         tbl \$TMP >\$TMP.out
14497         mv \$TMP.out \$TMP
14498 fi
14499 CF_EOF
14500
14501 if test "$with_overwrite" != yes ; then
14502 cat >>$cf_edit_man <<CF_EOF
14503         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14504         mv \$TMP.out \$TMP
14505 CF_EOF
14506 fi
14507
14508 if test "$with_curses_h" != yes ; then
14509 cat >>$cf_edit_man <<CF_EOF
14510         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14511         mv \$TMP.out \$TMP
14512 CF_EOF
14513 fi
14514
14515 cat >>$cf_edit_man <<CF_EOF
14516         if test "\$form" = format ; then
14517                 nroff -man \$TMP >\$TMP.out
14518                 mv \$TMP.out \$TMP
14519         fi
14520 CF_EOF
14521
14522 if test -n "$cf_compress" ; then
14523 cat >>$cf_edit_man <<CF_EOF
14524         if test "\$verb" = installing ; then
14525         if ( "$cf_compress" -f \$TMP )
14526         then
14527                 mv \$TMP.$cf_so_strip \$TMP
14528         fi
14529         fi
14530         cf_target="\$cf_target.$cf_so_strip"
14531 CF_EOF
14532 fi
14533
14534 case "$MANPAGE_FORMAT" in
14535 (*BSDI*)
14536 cat >>$cf_edit_man <<CF_EOF
14537         if test "\$form" = format ; then
14538                 # BSDI installs only .0 suffixes in the cat directories
14539                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14540         fi
14541 CF_EOF
14542   ;;
14543 esac
14544
14545 cat >>$cf_edit_man <<CF_EOF
14546         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14547         if test "\$verb" = installing ; then
14548                 echo "\$verb \$cf_target"
14549                 \$INSTALL_DATA \$TMP "\$cf_target"
14550                 test -d "\$cf_subdir\${section}" &&
14551                 test -n "\$aliases" && (
14552                         cd "\$cf_subdir\${section}" && (
14553                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14554                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14555                                 cf_target=\`basename "\$cf_target"\`
14556                                 for cf_alias in \$aliases
14557                                 do
14558                                         if test "\$section" = 1 ; then
14559                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14560                                         fi
14561
14562                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14563                                                 if test -f "\$cf_alias\${suffix}" ; then
14564                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14565                                                         then
14566                                                                 continue
14567                                                         fi
14568                                                 fi
14569                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14570 CF_EOF
14571 case "x$LN_S" in
14572 (*-f)
14573 cat >>$cf_edit_man <<CF_EOF
14574                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14575 CF_EOF
14576         ;;
14577 (*)
14578 cat >>$cf_edit_man <<CF_EOF
14579                                                 rm -f "\$cf_alias\${suffix}"
14580                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14581 CF_EOF
14582         ;;
14583 esac
14584 cat >>$cf_edit_man <<CF_EOF
14585                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14586                                                 echo ".so \$cf_source" >\$TMP
14587 CF_EOF
14588 if test -n "$cf_compress" ; then
14589 cat >>$cf_edit_man <<CF_EOF
14590                                                 if test -n "$cf_so_strip" ; then
14591                                                         "$cf_compress" -f \$TMP
14592                                                         mv \$TMP.$cf_so_strip \$TMP
14593                                                 fi
14594 CF_EOF
14595 fi
14596 cat >>$cf_edit_man <<CF_EOF
14597                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14598                                                 rm -f "\$cf_alias\${suffix}"
14599                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14600                                         fi
14601                                 done
14602                         )
14603                 )
14604         elif test "\$verb" = removing ; then
14605                 test -f "\$cf_target" && (
14606                         echo "\$verb \$cf_target"
14607                         rm -f "\$cf_target"
14608                 )
14609                 test -d "\$cf_subdir\${section}" &&
14610                 test -n "\$aliases" && (
14611                         cd "\$cf_subdir\${section}" && (
14612                                 for cf_alias in \$aliases
14613                                 do
14614                                         if test "\$section" = 1 ; then
14615                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14616                                         fi
14617
14618                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14619                                         rm -f "\$cf_alias\${suffix}"
14620                                 done
14621                         )
14622                 )
14623         else
14624 #               echo ".hy 0"
14625                 cat \$TMP
14626         fi
14627         ;;
14628 esac
14629 done
14630
14631 if test "$cf_inboth" = yes ; then
14632 if test "\$form" != format ; then
14633         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14634 fi
14635 fi
14636
14637 exit 0
14638 CF_EOF
14639 chmod 755 "$cf_edit_man"
14640
14641 ###############################################################################
14642
14643 ### Note that some functions (such as const) are normally disabled anyway.
14644 echo "$as_me:14644: checking if you want to build with function extensions" >&5
14645 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14646
14647 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14648 if test "${enable_ext_funcs+set}" = set; then
14649   enableval="$enable_ext_funcs"
14650   with_ext_funcs=$enableval
14651 else
14652   with_ext_funcs=yes
14653 fi;
14654 echo "$as_me:14654: result: $with_ext_funcs" >&5
14655 echo "${ECHO_T}$with_ext_funcs" >&6
14656 if test "x$with_ext_funcs" = xyes ; then
14657         NCURSES_EXT_FUNCS=1
14658
14659 cat >>confdefs.h <<\EOF
14660 #define NCURSES_EXT_FUNCS 1
14661 EOF
14662
14663 cat >>confdefs.h <<\EOF
14664 #define HAVE_ASSUME_DEFAULT_COLORS 1
14665 EOF
14666
14667 cat >>confdefs.h <<\EOF
14668 #define HAVE_CURSES_VERSION 1
14669 EOF
14670
14671 cat >>confdefs.h <<\EOF
14672 #define HAVE_HAS_KEY 1
14673 EOF
14674
14675 cat >>confdefs.h <<\EOF
14676 #define HAVE_RESIZETERM 1
14677 EOF
14678
14679 cat >>confdefs.h <<\EOF
14680 #define HAVE_RESIZE_TERM 1
14681 EOF
14682
14683 cat >>confdefs.h <<\EOF
14684 #define HAVE_TERM_ENTRY_H 1
14685 EOF
14686
14687 cat >>confdefs.h <<\EOF
14688 #define HAVE_USE_DEFAULT_COLORS 1
14689 EOF
14690
14691 cat >>confdefs.h <<\EOF
14692 #define HAVE_USE_EXTENDED_NAMES 1
14693 EOF
14694
14695 cat >>confdefs.h <<\EOF
14696 #define HAVE_USE_SCREEN 1
14697 EOF
14698
14699 cat >>confdefs.h <<\EOF
14700 #define HAVE_USE_WINDOW 1
14701 EOF
14702
14703 cat >>confdefs.h <<\EOF
14704 #define HAVE_WRESIZE 1
14705 EOF
14706
14707         GENERATED_EXT_FUNCS=generated
14708         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14709 else
14710         NCURSES_EXT_FUNCS=0
14711         GENERATED_EXT_FUNCS=
14712 fi
14713
14714 echo "$as_me:14714: checking if you want to build with SCREEN extensions" >&5
14715 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14716
14717 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14718 if test "${enable_sp_funcs+set}" = set; then
14719   enableval="$enable_sp_funcs"
14720   with_sp_funcs=$enableval
14721 else
14722   with_sp_funcs=$cf_dft_ext_spfuncs
14723 fi;
14724 echo "$as_me:14724: result: $with_sp_funcs" >&5
14725 echo "${ECHO_T}$with_sp_funcs" >&6
14726 if test "x$with_sp_funcs" = xyes ; then
14727         NCURSES_SP_FUNCS=1
14728
14729 cat >>confdefs.h <<\EOF
14730 #define NCURSES_SP_FUNCS 1
14731 EOF
14732
14733 cat >>confdefs.h <<\EOF
14734 #define HAVE_TPUTS_SP 1
14735 EOF
14736
14737         GENERATED_SP_FUNCS=generated
14738 else
14739         NCURSES_SP_FUNCS=0
14740         GENERATED_SP_FUNCS=
14741 fi
14742
14743 echo "$as_me:14743: checking if you want to build with terminal-driver" >&5
14744 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14745
14746 # Check whether --enable-term-driver or --disable-term-driver was given.
14747 if test "${enable_term_driver+set}" = set; then
14748   enableval="$enable_term_driver"
14749   with_term_driver=$enableval
14750 else
14751   with_term_driver=no
14752 fi;
14753 echo "$as_me:14753: result: $with_term_driver" >&5
14754 echo "${ECHO_T}$with_term_driver" >&6
14755 if test "x$with_term_driver" = xyes ; then
14756
14757 cat >>confdefs.h <<\EOF
14758 #define USE_TERM_DRIVER 1
14759 EOF
14760
14761         if test "x$with_termlib" != xno ; then
14762                 { { echo "$as_me:14762: error: The term-driver option conflicts with the termlib option" >&5
14763 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14764    { (exit 1); exit 1; }; }
14765         fi
14766         if test "x$with_sp_funcs" != xyes ; then
14767                 { { echo "$as_me:14767: error: The term-driver option relies upon sp-funcs" >&5
14768 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14769    { (exit 1); exit 1; }; }
14770         fi
14771 fi
14772
14773 ###   use option --enable-const to turn on use of const beyond that in XSI.
14774 echo "$as_me:14774: checking for extended use of const keyword" >&5
14775 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14776
14777 # Check whether --enable-const or --disable-const was given.
14778 if test "${enable_const+set}" = set; then
14779   enableval="$enable_const"
14780   with_ext_const=$enableval
14781 else
14782   with_ext_const=$cf_dft_ext_const
14783 fi;
14784 echo "$as_me:14784: result: $with_ext_const" >&5
14785 echo "${ECHO_T}$with_ext_const" >&6
14786 NCURSES_CONST='/*nothing*/'
14787 if test "x$with_ext_const" = xyes ; then
14788         NCURSES_CONST=const
14789 fi
14790
14791 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14792 echo "$as_me:14792: checking if you want to use extended colors" >&5
14793 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14794
14795 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14796 if test "${enable_ext_colors+set}" = set; then
14797   enableval="$enable_ext_colors"
14798   with_ext_colors=$enableval
14799 else
14800   with_ext_colors=$cf_dft_ext_colors
14801 fi;
14802 echo "$as_me:14802: result: $with_ext_colors" >&5
14803 echo "${ECHO_T}$with_ext_colors" >&6
14804 NCURSES_EXT_COLORS=0
14805 if test "x$with_ext_colors" = xyes ; then
14806         if test "x$with_widec" != xyes ; then
14807                 { echo "$as_me:14807: WARNING: This option applies only to wide-character library" >&5
14808 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14809         else
14810                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14811
14812 if test "${with_abi_version+set}" != set; then
14813         case "$cf_cv_rel_version" in
14814         (5.*)
14815                 cf_cv_rel_version=6.0
14816                 cf_cv_abi_version=6
14817                 { echo "$as_me:14817: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14818 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14819                 ;;
14820         esac
14821 fi
14822
14823                 NCURSES_EXT_COLORS=1
14824
14825 cat >>confdefs.h <<\EOF
14826 #define NCURSES_EXT_COLORS 1
14827 EOF
14828
14829 cat >>confdefs.h <<\EOF
14830 #define HAVE_ALLOC_PAIR 1
14831 EOF
14832
14833 cat >>confdefs.h <<\EOF
14834 #define HAVE_INIT_EXTENDED_COLOR 1
14835 EOF
14836
14837 cat >>confdefs.h <<\EOF
14838 #define HAVE_RESET_COLOR_PAIRS 1
14839 EOF
14840
14841         fi
14842 fi
14843
14844 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14845 echo "$as_me:14845: checking if you want to use extended mouse encoding" >&5
14846 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14847
14848 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14849 if test "${enable_ext_mouse+set}" = set; then
14850   enableval="$enable_ext_mouse"
14851   with_ext_mouse=$enableval
14852 else
14853   with_ext_mouse=$cf_dft_ext_mouse
14854 fi;
14855 echo "$as_me:14855: result: $with_ext_mouse" >&5
14856 echo "${ECHO_T}$with_ext_mouse" >&6
14857 NCURSES_MOUSE_VERSION=1
14858 if test "x$with_ext_mouse" = xyes ; then
14859         NCURSES_MOUSE_VERSION=2
14860
14861 if test "${with_abi_version+set}" != set; then
14862         case "$cf_cv_rel_version" in
14863         (5.*)
14864                 cf_cv_rel_version=6.0
14865                 cf_cv_abi_version=6
14866                 { echo "$as_me:14866: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14867 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14868                 ;;
14869         esac
14870 fi
14871
14872 fi
14873
14874 ###   use option --enable-ext-putwin to turn on extended screendumps
14875 echo "$as_me:14875: checking if you want to use extended putwin/screendump" >&5
14876 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14877
14878 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14879 if test "${enable_ext_putwin+set}" = set; then
14880   enableval="$enable_ext_putwin"
14881   with_ext_putwin=$enableval
14882 else
14883   with_ext_putwin=$cf_dft_ext_putwin
14884 fi;
14885 echo "$as_me:14885: result: $with_ext_putwin" >&5
14886 echo "${ECHO_T}$with_ext_putwin" >&6
14887 if test "x$with_ext_putwin" = xyes ; then
14888
14889 cat >>confdefs.h <<\EOF
14890 #define NCURSES_EXT_PUTWIN 1
14891 EOF
14892
14893 fi
14894
14895 echo "$as_me:14895: checking if you want \$NCURSES_NO_PADDING code" >&5
14896 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14897
14898 # Check whether --enable-no-padding or --disable-no-padding was given.
14899 if test "${enable_no_padding+set}" = set; then
14900   enableval="$enable_no_padding"
14901   with_no_padding=$enableval
14902 else
14903   with_no_padding=$with_ext_funcs
14904 fi;
14905 echo "$as_me:14905: result: $with_no_padding" >&5
14906 echo "${ECHO_T}$with_no_padding" >&6
14907 test "x$with_no_padding" = xyes &&
14908 cat >>confdefs.h <<\EOF
14909 #define NCURSES_NO_PADDING 1
14910 EOF
14911
14912 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14913 echo "$as_me:14913: checking if you want SIGWINCH handler" >&5
14914 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14915
14916 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14917 if test "${enable_sigwinch+set}" = set; then
14918   enableval="$enable_sigwinch"
14919   with_sigwinch=$enableval
14920 else
14921   with_sigwinch=$with_ext_funcs
14922 fi;
14923 echo "$as_me:14923: result: $with_sigwinch" >&5
14924 echo "${ECHO_T}$with_sigwinch" >&6
14925 test "x$with_sigwinch" = xyes &&
14926 cat >>confdefs.h <<\EOF
14927 #define USE_SIGWINCH 1
14928 EOF
14929
14930 ###   use option --enable-tcap-names to allow user to define new capabilities
14931 echo "$as_me:14931: checking if you want user-definable terminal capabilities like termcap" >&5
14932 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14933
14934 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14935 if test "${enable_tcap_names+set}" = set; then
14936   enableval="$enable_tcap_names"
14937   with_tcap_names=$enableval
14938 else
14939   with_tcap_names=$with_ext_funcs
14940 fi;
14941 echo "$as_me:14941: result: $with_tcap_names" >&5
14942 echo "${ECHO_T}$with_tcap_names" >&6
14943 NCURSES_XNAMES=0
14944 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14945
14946 ##############################################################################
14947
14948 echo "$as_me:14948: checking if you want to link with the pthread library" >&5
14949 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14950
14951 # Check whether --with-pthread or --without-pthread was given.
14952 if test "${with_pthread+set}" = set; then
14953   withval="$with_pthread"
14954   with_pthread=$withval
14955 else
14956   with_pthread=no
14957 fi;
14958 echo "$as_me:14958: result: $with_pthread" >&5
14959 echo "${ECHO_T}$with_pthread" >&6
14960
14961 if test "$with_pthread" != no ; then
14962         echo "$as_me:14962: checking for pthread.h" >&5
14963 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14964 if test "${ac_cv_header_pthread_h+set}" = set; then
14965   echo $ECHO_N "(cached) $ECHO_C" >&6
14966 else
14967   cat >"conftest.$ac_ext" <<_ACEOF
14968 #line 14968 "configure"
14969 #include "confdefs.h"
14970 #include <pthread.h>
14971 _ACEOF
14972 if { (eval echo "$as_me:14972: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14973   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14974   ac_status=$?
14975   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14976   rm -f conftest.er1
14977   cat conftest.err >&5
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit "$ac_status"); } >/dev/null; then
14980   if test -s conftest.err; then
14981     ac_cpp_err=$ac_c_preproc_warn_flag
14982   else
14983     ac_cpp_err=
14984   fi
14985 else
14986   ac_cpp_err=yes
14987 fi
14988 if test -z "$ac_cpp_err"; then
14989   ac_cv_header_pthread_h=yes
14990 else
14991   echo "$as_me: failed program was:" >&5
14992   cat "conftest.$ac_ext" >&5
14993   ac_cv_header_pthread_h=no
14994 fi
14995 rm -f conftest.err "conftest.$ac_ext"
14996 fi
14997 echo "$as_me:14997: result: $ac_cv_header_pthread_h" >&5
14998 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14999 if test "$ac_cv_header_pthread_h" = yes; then
15000
15001 cat >>confdefs.h <<\EOF
15002 #define HAVE_PTHREADS_H 1
15003 EOF
15004
15005         for cf_lib_pthread in pthread c_r
15006         do
15007             echo "$as_me:15007: checking if we can link with the $cf_lib_pthread library" >&5
15008 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15009             cf_save_LIBS="$LIBS"
15010
15011 cf_add_libs="$LIBS"
15012 # reverse order
15013 cf_add_0lib=
15014 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15015 # filter duplicates
15016 for cf_add_1lib in $cf_add_0lib; do
15017         for cf_add_2lib in $cf_add_libs; do
15018                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15019                         cf_add_1lib=
15020                         break
15021                 fi
15022         done
15023         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15024 done
15025 LIBS="$cf_add_libs"
15026
15027             cat >"conftest.$ac_ext" <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15030
15031 #include <pthread.h>
15032
15033 int
15034 main (void)
15035 {
15036
15037                 int rc = pthread_create(0,0,0,0);
15038                 int r2 = pthread_mutexattr_settype(0, 0);
15039
15040   ;
15041   return 0;
15042 }
15043 _ACEOF
15044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15045 if { (eval echo "$as_me:15045: \"$ac_link\"") >&5
15046   (eval $ac_link) 2>&5
15047   ac_status=$?
15048   echo "$as_me:15048: \$? = $ac_status" >&5
15049   (exit "$ac_status"); } &&
15050          { ac_try='test -s "conftest$ac_exeext"'
15051   { (eval echo "$as_me:15051: \"$ac_try\"") >&5
15052   (eval $ac_try) 2>&5
15053   ac_status=$?
15054   echo "$as_me:15054: \$? = $ac_status" >&5
15055   (exit "$ac_status"); }; }; then
15056   with_pthread=yes
15057 else
15058   echo "$as_me: failed program was:" >&5
15059 cat "conftest.$ac_ext" >&5
15060 with_pthread=no
15061 fi
15062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15063             LIBS="$cf_save_LIBS"
15064             echo "$as_me:15064: result: $with_pthread" >&5
15065 echo "${ECHO_T}$with_pthread" >&6
15066             test "$with_pthread" = yes && break
15067         done
15068
15069         if test "$with_pthread" = yes ; then
15070
15071 cf_add_libs="$LIBS"
15072 # reverse order
15073 cf_add_0lib=
15074 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15075 # filter duplicates
15076 for cf_add_1lib in $cf_add_0lib; do
15077         for cf_add_2lib in $cf_add_libs; do
15078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15079                         cf_add_1lib=
15080                         break
15081                 fi
15082         done
15083         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15084 done
15085 LIBS="$cf_add_libs"
15086
15087 cat >>confdefs.h <<\EOF
15088 #define HAVE_LIBPTHREADS 1
15089 EOF
15090
15091         else
15092             { { echo "$as_me:15092: error: Cannot link with pthread library" >&5
15093 echo "$as_me: error: Cannot link with pthread library" >&2;}
15094    { (exit 1); exit 1; }; }
15095         fi
15096
15097 fi
15098
15099 fi
15100
15101 if test "x$with_pthread" != xno; then
15102         echo "$as_me:15102: checking for pthread_kill" >&5
15103 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15104 if test "${ac_cv_func_pthread_kill+set}" = set; then
15105   echo $ECHO_N "(cached) $ECHO_C" >&6
15106 else
15107   cat >"conftest.$ac_ext" <<_ACEOF
15108 #line 15108 "configure"
15109 #include "confdefs.h"
15110 #define pthread_kill autoconf_temporary
15111 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15112 #undef pthread_kill
15113
15114 #ifdef __cplusplus
15115 extern "C"
15116 #endif
15117
15118 /* We use char because int might match the return type of a gcc2
15119    builtin and then its argument prototype would still apply.  */
15120 char pthread_kill (void);
15121
15122 int
15123 main (void)
15124 {
15125
15126 /* The GNU C library defines stubs for functions which it implements
15127     to always fail with ENOSYS.  Some functions are actually named
15128     something starting with __ and the normal name is an alias.  */
15129 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15130 #error found stub for pthread_kill
15131 #endif
15132
15133         return pthread_kill ();
15134   ;
15135   return 0;
15136 }
15137 _ACEOF
15138 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15139 if { (eval echo "$as_me:15139: \"$ac_link\"") >&5
15140   (eval $ac_link) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit "$ac_status"); } &&
15144          { ac_try='test -s "conftest$ac_exeext"'
15145   { (eval echo "$as_me:15145: \"$ac_try\"") >&5
15146   (eval $ac_try) 2>&5
15147   ac_status=$?
15148   echo "$as_me:15148: \$? = $ac_status" >&5
15149   (exit "$ac_status"); }; }; then
15150   ac_cv_func_pthread_kill=yes
15151 else
15152   echo "$as_me: failed program was:" >&5
15153 cat "conftest.$ac_ext" >&5
15154 ac_cv_func_pthread_kill=no
15155 fi
15156 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15157 fi
15158 echo "$as_me:15158: result: $ac_cv_func_pthread_kill" >&5
15159 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15160 if test "$ac_cv_func_pthread_kill" = yes; then
15161
15162                 echo "$as_me:15162: checking if you want to allow EINTR in wgetch with pthreads" >&5
15163 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15164
15165 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15166 if test "${enable_pthreads_eintr+set}" = set; then
15167   enableval="$enable_pthreads_eintr"
15168   use_pthreads_eintr=$enableval
15169 else
15170   use_pthreads_eintr=no
15171 fi;
15172                 echo "$as_me:15172: result: $use_pthreads_eintr" >&5
15173 echo "${ECHO_T}$use_pthreads_eintr" >&6
15174                 if test "x$use_pthreads_eintr" = xyes ; then
15175
15176 cat >>confdefs.h <<\EOF
15177 #define USE_PTHREADS_EINTR 1
15178 EOF
15179
15180                 fi
15181 fi
15182
15183         echo "$as_me:15183: checking if you want to use weak-symbols for pthreads" >&5
15184 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15185
15186 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15187 if test "${enable_weak_symbols+set}" = set; then
15188   enableval="$enable_weak_symbols"
15189   use_weak_symbols=$enableval
15190 else
15191   use_weak_symbols=no
15192 fi;
15193         echo "$as_me:15193: result: $use_weak_symbols" >&5
15194 echo "${ECHO_T}$use_weak_symbols" >&6
15195         if test "x$use_weak_symbols" = xyes ; then
15196
15197 echo "$as_me:15197: checking if $CC supports weak symbols" >&5
15198 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15199 if test "${cf_cv_weak_symbols+set}" = set; then
15200   echo $ECHO_N "(cached) $ECHO_C" >&6
15201 else
15202
15203 cat >"conftest.$ac_ext" <<_ACEOF
15204 #line 15204 "configure"
15205 #include "confdefs.h"
15206
15207 #include <stdio.h>
15208 int
15209 main (void)
15210 {
15211
15212 #if defined(__GNUC__)
15213 #  if defined __USE_ISOC99
15214 #    define _cat_pragma(exp)    _Pragma(#exp)
15215 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15216 #  else
15217 #    define _weak_pragma(exp)
15218 #  endif
15219 #  define _declare(name)        __extension__ extern __typeof__(name) name
15220 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15221 #endif
15222
15223 weak_symbol(fopen);
15224
15225   ;
15226   return 0;
15227 }
15228 _ACEOF
15229 rm -f "conftest.$ac_objext"
15230 if { (eval echo "$as_me:15230: \"$ac_compile\"") >&5
15231   (eval $ac_compile) 2>&5
15232   ac_status=$?
15233   echo "$as_me:15233: \$? = $ac_status" >&5
15234   (exit "$ac_status"); } &&
15235          { ac_try='test -s "conftest.$ac_objext"'
15236   { (eval echo "$as_me:15236: \"$ac_try\"") >&5
15237   (eval $ac_try) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit "$ac_status"); }; }; then
15241   cf_cv_weak_symbols=yes
15242 else
15243   echo "$as_me: failed program was:" >&5
15244 cat "conftest.$ac_ext" >&5
15245 cf_cv_weak_symbols=no
15246 fi
15247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15248
15249 fi
15250 echo "$as_me:15250: result: $cf_cv_weak_symbols" >&5
15251 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15252
15253         else
15254                 cf_cv_weak_symbols=no
15255         fi
15256
15257         if test "x$cf_cv_weak_symbols" = xyes ; then
15258
15259 cat >>confdefs.h <<\EOF
15260 #define USE_WEAK_SYMBOLS 1
15261 EOF
15262
15263         fi
15264 fi
15265
15266 PTHREAD=
15267 if test "x$with_pthread" = "xyes" ; then
15268
15269 cat >>confdefs.h <<\EOF
15270 #define USE_PTHREADS 1
15271 EOF
15272
15273         enable_reentrant=yes
15274         if test "x$cf_cv_weak_symbols" = xyes ; then
15275                 PTHREAD=-lpthread
15276
15277 cf_add_libs="$PRIVATE_LIBS"
15278 # reverse order
15279 cf_add_0lib=
15280 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15281 # filter duplicates
15282 for cf_add_1lib in $cf_add_0lib; do
15283         for cf_add_2lib in $cf_add_libs; do
15284                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15285                         cf_add_1lib=
15286                         break
15287                 fi
15288         done
15289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15290 done
15291 PRIVATE_LIBS="$cf_add_libs"
15292
15293         fi
15294 fi
15295
15296 # Reentrant code has to be opaque; there's little advantage to making ncurses
15297 # opaque outside of that, so there is no --enable-opaque option.  We can use
15298 # this option without --with-pthreads, but this will be always set for
15299 # pthreads.
15300 echo "$as_me:15300: checking if you want reentrant code" >&5
15301 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15302
15303 # Check whether --enable-reentrant or --disable-reentrant was given.
15304 if test "${enable_reentrant+set}" = set; then
15305   enableval="$enable_reentrant"
15306   with_reentrant=$enableval
15307 else
15308   with_reentrant=no
15309 fi;
15310 echo "$as_me:15310: result: $with_reentrant" >&5
15311 echo "${ECHO_T}$with_reentrant" >&6
15312 if test "x$with_reentrant" = xyes ; then
15313         cf_cv_enable_reentrant=1
15314         cf_cv_enable_opaque="NCURSES_INTERNALS"
15315         NCURSES_SIZE_T=int
15316         if test "x$cf_cv_weak_symbols" = xyes ; then
15317
15318 # remove pthread library from $LIBS
15319 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15320
15321 cf_add_libs="$TEST_LIBS"
15322 # reverse order
15323 cf_add_0lib=
15324 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15325 # filter duplicates
15326 for cf_add_1lib in $cf_add_0lib; do
15327         for cf_add_2lib in $cf_add_libs; do
15328                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15329                         cf_add_1lib=
15330                         break
15331                 fi
15332         done
15333         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15334 done
15335 TEST_LIBS="$cf_add_libs"
15336
15337 cf_add_libs="$TEST_LIBS2"
15338 # reverse order
15339 cf_add_0lib=
15340 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15341 # filter duplicates
15342 for cf_add_1lib in $cf_add_0lib; do
15343         for cf_add_2lib in $cf_add_libs; do
15344                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15345                         cf_add_1lib=
15346                         break
15347                 fi
15348         done
15349         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15350 done
15351 TEST_LIBS2="$cf_add_libs"
15352
15353 cf_add_libs="$PRIVATE_LIBS"
15354 # reverse order
15355 cf_add_0lib=
15356 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15357 # filter duplicates
15358 for cf_add_1lib in $cf_add_0lib; do
15359         for cf_add_2lib in $cf_add_libs; do
15360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15361                         cf_add_1lib=
15362                         break
15363                 fi
15364         done
15365         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15366 done
15367 PRIVATE_LIBS="$cf_add_libs"
15368
15369         else
15370                 # when not using weak symbols but with_reentrant,
15371                 # add 't' to the library suffix on all platforms
15372                 # except cygwin, where we only do that if ALSO
15373                 # compiling with full thread support.
15374                 case "$host" in
15375                 (*cygwin* | *msys*)
15376                         if test "$with_pthread" = "yes" ; then
15377                                 if test "x$disable_lib_suffixes" = "xno" ; then
15378                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15379                                 fi
15380                         fi ;;
15381                 (*)
15382                         if test "x$disable_lib_suffixes" = "xno" ; then
15383                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15384                         fi
15385                         ;;
15386                 esac
15387         fi
15388
15389 cat >>confdefs.h <<\EOF
15390 #define USE_REENTRANT 1
15391 EOF
15392
15393 if test "${with_abi_version+set}" != set; then
15394         case "$cf_cv_rel_version" in
15395         (5.*)
15396                 cf_cv_rel_version=6.0
15397                 cf_cv_abi_version=6
15398                 { echo "$as_me:15398: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15399 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15400                 ;;
15401         esac
15402 fi
15403
15404 else
15405         cf_cv_enable_reentrant=0
15406         cf_cv_enable_opaque="NCURSES_OPAQUE"
15407         NCURSES_SIZE_T=short
15408 fi
15409
15410 echo "$as_me:15410: checking if you want opaque curses-library structures" >&5
15411 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15412
15413 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15414 if test "${enable_opaque_curses+set}" = set; then
15415   enableval="$enable_opaque_curses"
15416   test "$enableval" != yes && enableval=no
15417         if test "$enableval" != "no" ; then
15418     enable_opaque_curses=yes
15419         else
15420
15421          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15422          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15423
15424         fi
15425 else
15426   enableval=no
15427
15428          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15429          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15430
15431 fi;
15432 echo "$as_me:15432: result: $enable_opaque_curses" >&5
15433 echo "${ECHO_T}$enable_opaque_curses" >&6
15434
15435 test "$cf_cv_enable_reentrant" = 1 && \
15436 test "$enable_opaque_curses" = no && \
15437 { { echo "$as_me:15437: error: reentrant configuration requires opaque library" >&5
15438 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15439    { (exit 1); exit 1; }; }
15440
15441 echo "$as_me:15441: checking if you want opaque form-library structures" >&5
15442 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15443
15444 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15445 if test "${enable_opaque_form+set}" = set; then
15446   enableval="$enable_opaque_form"
15447   enable_opaque_form=yes
15448 else
15449   enable_opaque_form=no
15450 fi;
15451 echo "$as_me:15451: result: $enable_opaque_form" >&5
15452 echo "${ECHO_T}$enable_opaque_form" >&6
15453
15454 echo "$as_me:15454: checking if you want opaque menu-library structures" >&5
15455 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15456
15457 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15458 if test "${enable_opaque_menu+set}" = set; then
15459   enableval="$enable_opaque_menu"
15460   enable_opaque_menu=yes
15461 else
15462   enable_opaque_menu=no
15463 fi;
15464 echo "$as_me:15464: result: $enable_opaque_menu" >&5
15465 echo "${ECHO_T}$enable_opaque_menu" >&6
15466
15467 echo "$as_me:15467: checking if you want opaque panel-library structures" >&5
15468 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15469
15470 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15471 if test "${enable_opaque_panel+set}" = set; then
15472   enableval="$enable_opaque_panel"
15473   enable_opaque_panel=yes
15474 else
15475   enable_opaque_panel=no
15476 fi;
15477 echo "$as_me:15477: result: $enable_opaque_panel" >&5
15478 echo "${ECHO_T}$enable_opaque_panel" >&6
15479
15480 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15481 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15482 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15483 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15484
15485 ### Allow using a different wrap-prefix
15486 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15487         echo "$as_me:15487: checking for prefix used to wrap public variables" >&5
15488 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15489
15490 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15491 if test "${with_wrap_prefix+set}" = set; then
15492   withval="$with_wrap_prefix"
15493   NCURSES_WRAP_PREFIX=$withval
15494 else
15495   NCURSES_WRAP_PREFIX=_nc_
15496 fi;
15497         echo "$as_me:15497: result: $NCURSES_WRAP_PREFIX" >&5
15498 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15499 else
15500         NCURSES_WRAP_PREFIX=_nc_
15501 fi
15502
15503 cat >>confdefs.h <<EOF
15504 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15505 EOF
15506
15507 ###############################################################################
15508 # These options are relatively safe to experiment with.
15509
15510 echo "$as_me:15510: checking if you want all development code" >&5
15511 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15512
15513 # Check whether --with-develop or --without-develop was given.
15514 if test "${with_develop+set}" = set; then
15515   withval="$with_develop"
15516   with_develop=$withval
15517 else
15518   with_develop=no
15519 fi;
15520 echo "$as_me:15520: result: $with_develop" >&5
15521 echo "${ECHO_T}$with_develop" >&6
15522
15523 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15524 echo "$as_me:15524: checking if you want hard-tabs code" >&5
15525 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15526
15527 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15528 if test "${enable_hard_tabs+set}" = set; then
15529   enableval="$enable_hard_tabs"
15530
15531 else
15532   enable_hard_tabs=$with_develop
15533 fi;
15534 echo "$as_me:15534: result: $enable_hard_tabs" >&5
15535 echo "${ECHO_T}$enable_hard_tabs" >&6
15536 test "x$enable_hard_tabs" = xyes &&
15537 cat >>confdefs.h <<\EOF
15538 #define USE_HARD_TABS 1
15539 EOF
15540
15541 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15542 echo "$as_me:15542: checking if you want limited support for xmc" >&5
15543 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15544
15545 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15546 if test "${enable_xmc_glitch+set}" = set; then
15547   enableval="$enable_xmc_glitch"
15548
15549 else
15550   enable_xmc_glitch=$with_develop
15551 fi;
15552 echo "$as_me:15552: result: $enable_xmc_glitch" >&5
15553 echo "${ECHO_T}$enable_xmc_glitch" >&6
15554 test "x$enable_xmc_glitch" = xyes &&
15555 cat >>confdefs.h <<\EOF
15556 #define USE_XMC_SUPPORT 1
15557 EOF
15558
15559 ###############################################################################
15560 # These are just experimental, probably should not be in a package:
15561
15562 echo "$as_me:15562: checking if you do not want to assume colors are white-on-black" >&5
15563 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15564
15565 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15566 if test "${enable_assumed_color+set}" = set; then
15567   enableval="$enable_assumed_color"
15568   with_assumed_color=$enableval
15569 else
15570   with_assumed_color=yes
15571 fi;
15572 echo "$as_me:15572: result: $with_assumed_color" >&5
15573 echo "${ECHO_T}$with_assumed_color" >&6
15574 test "x$with_assumed_color" = xyes &&
15575 cat >>confdefs.h <<\EOF
15576 #define USE_ASSUMED_COLOR 1
15577 EOF
15578
15579 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15580 echo "$as_me:15580: checking if you want hashmap scrolling-optimization code" >&5
15581 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15582
15583 # Check whether --enable-hashmap or --disable-hashmap was given.
15584 if test "${enable_hashmap+set}" = set; then
15585   enableval="$enable_hashmap"
15586   with_hashmap=$enableval
15587 else
15588   with_hashmap=yes
15589 fi;
15590 echo "$as_me:15590: result: $with_hashmap" >&5
15591 echo "${ECHO_T}$with_hashmap" >&6
15592 test "x$with_hashmap" = xyes &&
15593 cat >>confdefs.h <<\EOF
15594 #define USE_HASHMAP 1
15595 EOF
15596
15597 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15598 echo "$as_me:15598: checking if you want colorfgbg code" >&5
15599 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15600
15601 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15602 if test "${enable_colorfgbg+set}" = set; then
15603   enableval="$enable_colorfgbg"
15604   with_colorfgbg=$enableval
15605 else
15606   with_colorfgbg=no
15607 fi;
15608 echo "$as_me:15608: result: $with_colorfgbg" >&5
15609 echo "${ECHO_T}$with_colorfgbg" >&6
15610 test "x$with_colorfgbg" = xyes &&
15611 cat >>confdefs.h <<\EOF
15612 #define USE_COLORFGBG 1
15613 EOF
15614
15615 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15616 echo "$as_me:15616: checking if you want to use gcc -fvisibility option" >&5
15617 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15618
15619 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15620 if test "${enable_fvisibility+set}" = set; then
15621   enableval="$enable_fvisibility"
15622   cf_with_fvisibility=$enableval
15623 else
15624   cf_with_fvisibility=no
15625 fi;
15626 echo "$as_me:15626: result: $cf_with_fvisibility" >&5
15627 echo "${ECHO_T}$cf_with_fvisibility" >&6
15628
15629 NCURSES_IMPEXP=
15630 NCURSES_CXX_IMPEXP=
15631 if test "x$cf_with_fvisibility" = xyes; then
15632
15633 echo "$as_me:15633: checking if $CC -fvisibility=hidden option works" >&5
15634 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15635 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15636   echo $ECHO_N "(cached) $ECHO_C" >&6
15637 else
15638
15639     cf_save_cflags="$CFLAGS"
15640     CFLAGS="$CFLAGS -fvisibility=hidden"
15641     cat >"conftest.$ac_ext" <<_ACEOF
15642 #line 15642 "configure"
15643 #include "confdefs.h"
15644
15645 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15646
15647 int
15648 main (void)
15649 {
15650
15651         if (somefunc()) return 1;
15652
15653   ;
15654   return 0;
15655 }
15656 _ACEOF
15657 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15658 if { (eval echo "$as_me:15658: \"$ac_link\"") >&5
15659   (eval $ac_link) 2>&5
15660   ac_status=$?
15661   echo "$as_me:15661: \$? = $ac_status" >&5
15662   (exit "$ac_status"); } &&
15663          { ac_try='test -s "conftest$ac_exeext"'
15664   { (eval echo "$as_me:15664: \"$ac_try\"") >&5
15665   (eval $ac_try) 2>&5
15666   ac_status=$?
15667   echo "$as_me:15667: \$? = $ac_status" >&5
15668   (exit "$ac_status"); }; }; then
15669   cf_cv_fvisibility_hidden=yes
15670 else
15671   echo "$as_me: failed program was:" >&5
15672 cat "conftest.$ac_ext" >&5
15673 cf_cv_fvisibility_hidden=no
15674 fi
15675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15676     CFLAGS=$cf_save_cflags
15677
15678 fi
15679 echo "$as_me:15679: result: $cf_cv_fvisibility_hidden" >&5
15680 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15681
15682         if test "x$cf_cv_fvisibility_hidden" = xyes
15683         then
15684
15685 cf_fix_cppflags=no
15686 cf_new_cflags=
15687 cf_new_cppflags=
15688 cf_new_extra_cppflags=
15689
15690 for cf_add_cflags in -fvisibility=hidden
15691 do
15692 case "$cf_fix_cppflags" in
15693 (no)
15694         case "$cf_add_cflags" in
15695         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15696                 case "$cf_add_cflags" in
15697                 (-D*)
15698                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15699
15700                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15701                                 && test -z "${cf_tst_cflags}" \
15702                                 && cf_fix_cppflags=yes
15703
15704                         if test "$cf_fix_cppflags" = yes ; then
15705
15706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15708
15709                                 continue
15710                         elif test "${cf_tst_cflags}" = "\"'" ; then
15711
15712         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15713         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15714
15715                                 continue
15716                         fi
15717                         ;;
15718                 esac
15719                 case "$CPPFLAGS" in
15720                 (*$cf_add_cflags)
15721                         ;;
15722                 (*)
15723                         case "$cf_add_cflags" in
15724                         (-D*)
15725                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15726
15727 CPPFLAGS=`echo "$CPPFLAGS" | \
15728         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15729                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15730
15731                                 ;;
15732                         esac
15733
15734         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15735         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15736
15737                         ;;
15738                 esac
15739                 ;;
15740         (*)
15741
15742         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15743         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15744
15745                 ;;
15746         esac
15747         ;;
15748 (yes)
15749
15750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15752
15753         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15754
15755         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15756                 && test -z "${cf_tst_cflags}" \
15757                 && cf_fix_cppflags=no
15758         ;;
15759 esac
15760 done
15761
15762 if test -n "$cf_new_cflags" ; then
15763
15764         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15765         CFLAGS="${CFLAGS}$cf_new_cflags"
15766
15767 fi
15768
15769 if test -n "$cf_new_cppflags" ; then
15770
15771         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15772         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15773
15774 fi
15775
15776 if test -n "$cf_new_extra_cppflags" ; then
15777
15778         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15779         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15780
15781 fi
15782
15783                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15784         fi
15785         if test -n "$CXX"
15786         then
15787                 ac_ext=cc
15788 ac_cpp='$CXXCPP $CPPFLAGS'
15789 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15790 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15791 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15792 ac_main_return="return"
15793
15794 echo "$as_me:15794: checking if $CXX -fvisibility=hidden option works" >&5
15795 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15796 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15797   echo $ECHO_N "(cached) $ECHO_C" >&6
15798 else
15799
15800     cf_save_cflags="$CXXFLAGS"
15801     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15802     cat >"conftest.$ac_ext" <<_ACEOF
15803 #line 15803 "configure"
15804 #include "confdefs.h"
15805
15806 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15807
15808 int
15809 main (void)
15810 {
15811
15812         if (somefunc()) return 1;
15813
15814   ;
15815   return 0;
15816 }
15817 _ACEOF
15818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15819 if { (eval echo "$as_me:15819: \"$ac_link\"") >&5
15820   (eval $ac_link) 2>&5
15821   ac_status=$?
15822   echo "$as_me:15822: \$? = $ac_status" >&5
15823   (exit "$ac_status"); } &&
15824          { ac_try='test -s "conftest$ac_exeext"'
15825   { (eval echo "$as_me:15825: \"$ac_try\"") >&5
15826   (eval $ac_try) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit "$ac_status"); }; }; then
15830   cf_cv_fvisibility_hidden2=yes
15831 else
15832   echo "$as_me: failed program was:" >&5
15833 cat "conftest.$ac_ext" >&5
15834 cf_cv_fvisibility_hidden2=no
15835 fi
15836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15837     CXXFLAGS=$cf_save_cflags
15838
15839 fi
15840 echo "$as_me:15840: result: $cf_cv_fvisibility_hidden2" >&5
15841 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15842
15843                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15844                 then
15845
15846 cf_save_CXXFLAGS="$CFLAGS"
15847 CFLAGS="$CXXFLAGS"
15848
15849 cf_fix_cppflags=no
15850 cf_new_cflags=
15851 cf_new_cppflags=
15852 cf_new_extra_cppflags=
15853
15854 for cf_add_cflags in -fvisibility=hidden
15855 do
15856 case "$cf_fix_cppflags" in
15857 (no)
15858         case "$cf_add_cflags" in
15859         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15860                 case "$cf_add_cflags" in
15861                 (-D*)
15862                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15863
15864                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15865                                 && test -z "${cf_tst_cflags}" \
15866                                 && cf_fix_cppflags=yes
15867
15868                         if test "$cf_fix_cppflags" = yes ; then
15869
15870         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15871         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15872
15873                                 continue
15874                         elif test "${cf_tst_cflags}" = "\"'" ; then
15875
15876         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15877         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15878
15879                                 continue
15880                         fi
15881                         ;;
15882                 esac
15883                 case "$CPPFLAGS" in
15884                 (*$cf_add_cflags)
15885                         ;;
15886                 (*)
15887                         case "$cf_add_cflags" in
15888                         (-D*)
15889                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15890
15891 CPPFLAGS=`echo "$CPPFLAGS" | \
15892         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15893                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15894
15895                                 ;;
15896                         esac
15897
15898         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15899         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15900
15901                         ;;
15902                 esac
15903                 ;;
15904         (*)
15905
15906         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15907         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15908
15909                 ;;
15910         esac
15911         ;;
15912 (yes)
15913
15914         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15915         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15916
15917         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15918
15919         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15920                 && test -z "${cf_tst_cflags}" \
15921                 && cf_fix_cppflags=no
15922         ;;
15923 esac
15924 done
15925
15926 if test -n "$cf_new_cflags" ; then
15927
15928         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15929         CFLAGS="${CFLAGS}$cf_new_cflags"
15930
15931 fi
15932
15933 if test -n "$cf_new_cppflags" ; then
15934
15935         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15936         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15937
15938 fi
15939
15940 if test -n "$cf_new_extra_cppflags" ; then
15941
15942         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15943         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15944
15945 fi
15946
15947 CXXFLAGS="$CFLAGS"
15948 CFLAGS="$cf_save_CXXFLAGS"
15949
15950                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15951                 fi
15952                 ac_ext=c
15953 ac_cpp='$CPP $CPPFLAGS'
15954 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15955 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15956 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15957 ac_main_return="return"
15958
15959         fi
15960 fi
15961
15962 ###   use option --enable-interop to turn on use of bindings used for interop
15963 echo "$as_me:15963: checking if you want interop bindings" >&5
15964 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15965
15966 # Check whether --enable-interop or --disable-interop was given.
15967 if test "${enable_interop+set}" = set; then
15968   enableval="$enable_interop"
15969   with_exp_interop=$enableval
15970 else
15971   with_exp_interop=$cf_dft_interop
15972 fi;
15973 echo "$as_me:15973: result: $with_exp_interop" >&5
15974 echo "${ECHO_T}$with_exp_interop" >&6
15975
15976 NCURSES_INTEROP_FUNCS=0
15977 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15978
15979 echo "$as_me:15979: checking if you want experimental safe-sprintf code" >&5
15980 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15981
15982 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15983 if test "${enable_safe_sprintf+set}" = set; then
15984   enableval="$enable_safe_sprintf"
15985   with_safe_sprintf=$enableval
15986 else
15987   with_safe_sprintf=no
15988 fi;
15989 echo "$as_me:15989: result: $with_safe_sprintf" >&5
15990 echo "${ECHO_T}$with_safe_sprintf" >&6
15991
15992 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15993 # when hashmap is used scroll hints are useless
15994 if test "$with_hashmap" = no ; then
15995 echo "$as_me:15995: checking if you want to experiment without scrolling-hints code" >&5
15996 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15997
15998 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15999 if test "${enable_scroll_hints+set}" = set; then
16000   enableval="$enable_scroll_hints"
16001   with_scroll_hints=$enableval
16002 else
16003   with_scroll_hints=yes
16004 fi;
16005 echo "$as_me:16005: result: $with_scroll_hints" >&5
16006 echo "${ECHO_T}$with_scroll_hints" >&6
16007 test "x$with_scroll_hints" = xyes &&
16008 cat >>confdefs.h <<\EOF
16009 #define USE_SCROLL_HINTS 1
16010 EOF
16011
16012 fi
16013
16014 echo "$as_me:16014: checking if you want wgetch-events code" >&5
16015 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16016
16017 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16018 if test "${enable_wgetch_events+set}" = set; then
16019   enableval="$enable_wgetch_events"
16020   with_wgetch_events=$enableval
16021 else
16022   with_wgetch_events=no
16023 fi;
16024 echo "$as_me:16024: result: $with_wgetch_events" >&5
16025 echo "${ECHO_T}$with_wgetch_events" >&6
16026 if test "x$with_wgetch_events" = xyes ; then
16027
16028 cat >>confdefs.h <<\EOF
16029 #define NCURSES_WGETCH_EVENTS 1
16030 EOF
16031
16032         NCURSES_WGETCH_EVENTS=1
16033 else
16034         NCURSES_WGETCH_EVENTS=0
16035 fi
16036
16037 case "$cf_cv_system_name" in
16038 (*mingw32*|*mingw64*|*-msvc*)
16039         echo "$as_me:16039: checking if you want experimental-Windows driver" >&5
16040 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16041
16042 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16043 if test "${enable_exp_win32+set}" = set; then
16044   enableval="$enable_exp_win32"
16045   with_exp_win32=$enableval
16046 else
16047   with_exp_win32=no
16048 fi;
16049         echo "$as_me:16049: result: $with_exp_win32" >&5
16050 echo "${ECHO_T}$with_exp_win32" >&6
16051         if test "x$with_exp_win32" = xyes
16052         then
16053
16054 cat >>confdefs.h <<\EOF
16055 #define EXP_WIN32_DRIVER 1
16056 EOF
16057
16058                 EXP_WIN32_DRIVER=1
16059                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16060         else
16061                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16062                 EXP_WIN32_DRIVER=0
16063         fi
16064         ;;
16065 (*)
16066         EXP_WIN32_DRIVER=0
16067         INTERNALS_HDR=
16068         ;;
16069 esac
16070
16071 ###############################################################################
16072
16073 ###     use option --disable-echo to suppress full display compiling commands
16074
16075 echo "$as_me:16075: checking if you want to see long compiling messages" >&5
16076 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16077
16078 # Check whether --enable-echo or --disable-echo was given.
16079 if test "${enable_echo+set}" = set; then
16080   enableval="$enable_echo"
16081   test "$enableval" != no && enableval=yes
16082         if test "$enableval" != "yes" ; then
16083
16084         ECHO_LT='--silent'
16085         ECHO_LD='@echo linking $@;'
16086         RULE_CC='@echo compiling $<'
16087         SHOW_CC='@echo compiling $@'
16088         ECHO_CC='@'
16089
16090         else
16091
16092         ECHO_LT=''
16093         ECHO_LD=''
16094         RULE_CC=''
16095         SHOW_CC=''
16096         ECHO_CC=''
16097
16098         fi
16099 else
16100   enableval=yes
16101
16102         ECHO_LT=''
16103         ECHO_LD=''
16104         RULE_CC=''
16105         SHOW_CC=''
16106         ECHO_CC=''
16107
16108 fi;
16109 echo "$as_me:16109: result: $enableval" >&5
16110 echo "${ECHO_T}$enableval" >&6
16111
16112 if test "x$enable_echo" = xyes; then
16113         ECHO_LINK=
16114 else
16115         ECHO_LINK='@ echo linking $@ ... ;'
16116         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16117         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16118 fi
16119
16120 # --disable-stripping is used for debugging
16121
16122 echo "$as_me:16122: checking if you want to install stripped executables" >&5
16123 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16124
16125 # Check whether --enable-stripping or --disable-stripping was given.
16126 if test "${enable_stripping+set}" = set; then
16127   enableval="$enable_stripping"
16128   test "$enableval" != no && enableval=yes
16129         if test "$enableval" != "yes" ; then
16130     enable_stripping=no
16131         else
16132                 enable_stripping=yes
16133         fi
16134 else
16135   enableval=yes
16136         enable_stripping=yes
16137
16138 fi;
16139 echo "$as_me:16139: result: $enable_stripping" >&5
16140 echo "${ECHO_T}$enable_stripping" >&6
16141
16142 if test "$enable_stripping" = yes
16143 then
16144         INSTALL_OPT_S="-s"
16145 else
16146         INSTALL_OPT_S=
16147 fi
16148
16149 : "${INSTALL:=install}"
16150 echo "$as_me:16150: checking if install accepts -p option" >&5
16151 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16152 if test "${cf_cv_install_p+set}" = set; then
16153   echo $ECHO_N "(cached) $ECHO_C" >&6
16154 else
16155
16156         rm -rf ./conftest*
16157         date >conftest.in
16158         mkdir conftest.out
16159         sleep 3
16160         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16161         then
16162                 if test -f conftest.out/conftest.in
16163                 then
16164                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16165                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16166                         if test -s conftest.err
16167                         then
16168                                 cf_cv_install_p=no
16169                         else
16170                                 cf_cv_install_p=yes
16171                         fi
16172                 else
16173                         cf_cv_install_p=no
16174                 fi
16175         else
16176                 cf_cv_install_p=no
16177         fi
16178         rm -rf ./conftest*
16179
16180 fi
16181 echo "$as_me:16181: result: $cf_cv_install_p" >&5
16182 echo "${ECHO_T}$cf_cv_install_p" >&6
16183
16184 echo "$as_me:16184: checking if install needs to be told about ownership" >&5
16185 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16186 case `$ac_config_guess` in
16187 (*minix)
16188         with_install_o=yes
16189         ;;
16190 (*)
16191         with_install_o=no
16192         ;;
16193 esac
16194
16195 echo "$as_me:16195: result: $with_install_o" >&5
16196 echo "${ECHO_T}$with_install_o" >&6
16197 if test "x$with_install_o" = xyes
16198 then
16199         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'`"
16200 else
16201         INSTALL_OPT_O=
16202 fi
16203
16204 # If we're avoiding relinking of shared libraries during install, that is to
16205 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16206 # the install program has "-p" (for preserving timestamps).
16207 cf_cv_do_reranlib=yes
16208 if test "x$cf_cv_install_p" = xyes
16209 then
16210         if test "x$cf_cv_do_relink" != xyes
16211         then
16212                 cf_cv_do_reranlib=no
16213                 INSTALL_OPT_P="-p"
16214                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16215         fi
16216 fi
16217
16218 ###     use option --enable-warnings to turn on all gcc warnings
16219
16220 if test "$GCC" = yes || test "$GXX" = yes
16221 then
16222
16223 if test "$GCC" = yes || test "$GXX" = yes
16224 then
16225         case $CFLAGS in
16226         (*-Werror=*)
16227                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16228
16229 echo "${as_me:-configure}:16229: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16230
16231                 cf_temp_flags=
16232                 for cf_temp_scan in $CFLAGS
16233                 do
16234                         case "x$cf_temp_scan" in
16235                         (x-Werror=*)
16236
16237         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16238         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16239
16240                                 ;;
16241                         (*)
16242
16243         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16244         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16245
16246                                 ;;
16247                         esac
16248                 done
16249                 CFLAGS="$cf_temp_flags"
16250                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16251
16252 echo "${as_me:-configure}:16252: testing ... fixed $CFLAGS ..." 1>&5
16253
16254                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16255
16256 echo "${as_me:-configure}:16256: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16257
16258                 ;;
16259         esac
16260 fi
16261
16262 if test "$GCC" = yes || test "$GXX" = yes
16263 then
16264         case $CPPFLAGS in
16265         (*-Werror=*)
16266                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16267
16268 echo "${as_me:-configure}:16268: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16269
16270                 cf_temp_flags=
16271                 for cf_temp_scan in $CPPFLAGS
16272                 do
16273                         case "x$cf_temp_scan" in
16274                         (x-Werror=*)
16275
16276         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16277         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16278
16279                                 ;;
16280                         (*)
16281
16282         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16283         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16284
16285                                 ;;
16286                         esac
16287                 done
16288                 CPPFLAGS="$cf_temp_flags"
16289                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16290
16291 echo "${as_me:-configure}:16291: testing ... fixed $CPPFLAGS ..." 1>&5
16292
16293                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16294
16295 echo "${as_me:-configure}:16295: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16296
16297                 ;;
16298         esac
16299 fi
16300
16301 if test "$GCC" = yes || test "$GXX" = yes
16302 then
16303         case $LDFLAGS in
16304         (*-Werror=*)
16305                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16306
16307 echo "${as_me:-configure}:16307: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16308
16309                 cf_temp_flags=
16310                 for cf_temp_scan in $LDFLAGS
16311                 do
16312                         case "x$cf_temp_scan" in
16313                         (x-Werror=*)
16314
16315         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16316         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16317
16318                                 ;;
16319                         (*)
16320
16321         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16322         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16323
16324                                 ;;
16325                         esac
16326                 done
16327                 LDFLAGS="$cf_temp_flags"
16328                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16329
16330 echo "${as_me:-configure}:16330: testing ... fixed $LDFLAGS ..." 1>&5
16331
16332                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16333
16334 echo "${as_me:-configure}:16334: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16335
16336                 ;;
16337         esac
16338 fi
16339
16340 echo "$as_me:16340: checking if you want to turn on gcc warnings" >&5
16341 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16342
16343 # Check whether --enable-warnings or --disable-warnings was given.
16344 if test "${enable_warnings+set}" = set; then
16345   enableval="$enable_warnings"
16346   test "$enableval" != yes && enableval=no
16347         if test "$enableval" != "no" ; then
16348     enable_warnings=yes
16349         else
16350                 enable_warnings=no
16351         fi
16352 else
16353   enableval=no
16354         enable_warnings=no
16355
16356 fi;
16357 echo "$as_me:16357: result: $enable_warnings" >&5
16358 echo "${ECHO_T}$enable_warnings" >&6
16359 if test "$enable_warnings" = "yes"
16360 then
16361
16362 if test "x$have_x" = xyes; then
16363
16364 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16365 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16366 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16367 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16368 for cf_X_CFLAGS in $X_CFLAGS
16369 do
16370         case "x$cf_X_CFLAGS" in
16371         x-[IUD]*)
16372                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16373                 ;;
16374         *)
16375                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16376                 ;;
16377         esac
16378 done
16379
16380 cat >"conftest.$ac_ext" <<_ACEOF
16381 #line 16381 "configure"
16382 #include "confdefs.h"
16383
16384 #include <stdlib.h>
16385 #include <X11/Intrinsic.h>
16386
16387 int
16388 main (void)
16389 {
16390 String foo = malloc(1); (void)foo
16391   ;
16392   return 0;
16393 }
16394 _ACEOF
16395 rm -f "conftest.$ac_objext"
16396 if { (eval echo "$as_me:16396: \"$ac_compile\"") >&5
16397   (eval $ac_compile) 2>&5
16398   ac_status=$?
16399   echo "$as_me:16399: \$? = $ac_status" >&5
16400   (exit "$ac_status"); } &&
16401          { ac_try='test -s "conftest.$ac_objext"'
16402   { (eval echo "$as_me:16402: \"$ac_try\"") >&5
16403   (eval $ac_try) 2>&5
16404   ac_status=$?
16405   echo "$as_me:16405: \$? = $ac_status" >&5
16406   (exit "$ac_status"); }; }; then
16407
16408 echo "$as_me:16408: checking for X11/Xt const-feature" >&5
16409 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16410 if test "${cf_cv_const_x_string+set}" = set; then
16411   echo $ECHO_N "(cached) $ECHO_C" >&6
16412 else
16413
16414         cat >"conftest.$ac_ext" <<_ACEOF
16415 #line 16415 "configure"
16416 #include "confdefs.h"
16417
16418 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16419 #undef  XTSTRINGDEFINES /* X11R5 and later */
16420 #include <stdlib.h>
16421 #include <X11/Intrinsic.h>
16422
16423 int
16424 main (void)
16425 {
16426 String foo = malloc(1); *foo = 0
16427   ;
16428   return 0;
16429 }
16430 _ACEOF
16431 rm -f "conftest.$ac_objext"
16432 if { (eval echo "$as_me:16432: \"$ac_compile\"") >&5
16433   (eval $ac_compile) 2>&5
16434   ac_status=$?
16435   echo "$as_me:16435: \$? = $ac_status" >&5
16436   (exit "$ac_status"); } &&
16437          { ac_try='test -s "conftest.$ac_objext"'
16438   { (eval echo "$as_me:16438: \"$ac_try\"") >&5
16439   (eval $ac_try) 2>&5
16440   ac_status=$?
16441   echo "$as_me:16441: \$? = $ac_status" >&5
16442   (exit "$ac_status"); }; }; then
16443
16444                         cf_cv_const_x_string=no
16445
16446 else
16447   echo "$as_me: failed program was:" >&5
16448 cat "conftest.$ac_ext" >&5
16449
16450                         cf_cv_const_x_string=yes
16451
16452 fi
16453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16454
16455 fi
16456 echo "$as_me:16456: result: $cf_cv_const_x_string" >&5
16457 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16458
16459 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16460 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16461 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16462
16463 case "$cf_cv_const_x_string" in
16464 (no)
16465
16466         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16467         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16468
16469         ;;
16470 (*)
16471
16472         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16473         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16474
16475         ;;
16476 esac
16477
16478 else
16479   echo "$as_me: failed program was:" >&5
16480 cat "conftest.$ac_ext" >&5
16481 fi
16482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16483  fi
16484 cat > "conftest.$ac_ext" <<EOF
16485 #line 16485 "${as_me:-configure}"
16486 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16487 EOF
16488 if test "$INTEL_COMPILER" = yes
16489 then
16490 # The "-wdXXX" options suppress warnings:
16491 # remark #1419: external declaration in primary source file
16492 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16493 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16494 # remark #193: zero used for undefined preprocessing identifier
16495 # remark #593: variable "curs_sb_left_arrow" was set but never used
16496 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16497 # remark #869: parameter "tw" was never referenced
16498 # remark #981: operands are evaluated in unspecified order
16499 # warning #279: controlling expression is constant
16500
16501         { echo "$as_me:16501: checking for $CC warning options..." >&5
16502 echo "$as_me: checking for $CC warning options..." >&6;}
16503         cf_save_CFLAGS="$CFLAGS"
16504         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16505         for cf_opt in \
16506                 wd1419 \
16507                 wd1683 \
16508                 wd1684 \
16509                 wd193 \
16510                 wd593 \
16511                 wd279 \
16512                 wd810 \
16513                 wd869 \
16514                 wd981
16515         do
16516                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16517                 if { (eval echo "$as_me:16517: \"$ac_compile\"") >&5
16518   (eval $ac_compile) 2>&5
16519   ac_status=$?
16520   echo "$as_me:16520: \$? = $ac_status" >&5
16521   (exit "$ac_status"); }; then
16522                         test -n "$verbose" && echo "$as_me:16522: result: ... -$cf_opt" >&5
16523 echo "${ECHO_T}... -$cf_opt" >&6
16524                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16525                 fi
16526         done
16527         CFLAGS="$cf_save_CFLAGS"
16528 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16529 then
16530         { echo "$as_me:16530: checking for $CC warning options..." >&5
16531 echo "$as_me: checking for $CC warning options..." >&6;}
16532         cf_save_CFLAGS="$CFLAGS"
16533         cf_warn_CONST=""
16534         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16535         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16536         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16537         for cf_opt in W Wall \
16538                 Wbad-function-cast \
16539                 Wcast-align \
16540                 Wcast-qual \
16541                 Wdeclaration-after-statement \
16542                 Wextra \
16543                 Winline \
16544                 Wmissing-declarations \
16545                 Wmissing-prototypes \
16546                 Wnested-externs \
16547                 Wpointer-arith \
16548                 Wshadow \
16549                 Wstrict-prototypes \
16550                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16551         do
16552                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16553                 if { (eval echo "$as_me:16553: \"$ac_compile\"") >&5
16554   (eval $ac_compile) 2>&5
16555   ac_status=$?
16556   echo "$as_me:16556: \$? = $ac_status" >&5
16557   (exit "$ac_status"); }; then
16558                         test -n "$verbose" && echo "$as_me:16558: result: ... -$cf_opt" >&5
16559 echo "${ECHO_T}... -$cf_opt" >&6
16560                         case "$cf_opt" in
16561                         (Winline)
16562                                 case "$GCC_VERSION" in
16563                                 ([34].*)
16564                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16565
16566 echo "${as_me:-configure}:16566: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16567
16568                                         continue;;
16569                                 esac
16570                                 ;;
16571                         (Wpointer-arith)
16572                                 case "$GCC_VERSION" in
16573                                 ([12].*)
16574                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16575
16576 echo "${as_me:-configure}:16576: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16577
16578                                         continue;;
16579                                 esac
16580                                 ;;
16581                         esac
16582                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16583                 fi
16584         done
16585         CFLAGS="$cf_save_CFLAGS"
16586 fi
16587 rm -rf ./conftest*
16588
16589 fi
16590
16591 if test "$GCC" = yes || test "$GXX" = yes
16592 then
16593 cat > conftest.i <<EOF
16594 #ifndef GCC_PRINTF
16595 #define GCC_PRINTF 0
16596 #endif
16597 #ifndef GCC_SCANF
16598 #define GCC_SCANF 0
16599 #endif
16600 #ifndef GCC_NORETURN
16601 #define GCC_NORETURN /* nothing */
16602 #endif
16603 #ifndef GCC_UNUSED
16604 #define GCC_UNUSED /* nothing */
16605 #endif
16606 EOF
16607 if test "$GCC" = yes
16608 then
16609         { echo "$as_me:16609: checking for $CC __attribute__ directives..." >&5
16610 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16611 cat > "conftest.$ac_ext" <<EOF
16612 #line 16612 "${as_me:-configure}"
16613 #include "confdefs.h"
16614 #include "conftest.h"
16615 #include "conftest.i"
16616 #if     GCC_PRINTF
16617 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16618 #else
16619 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16620 #endif
16621 #if     GCC_SCANF
16622 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16623 #else
16624 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16625 #endif
16626 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16627 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16628 extern void foo(void) GCC_NORETURN;
16629 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16630 EOF
16631         cf_printf_attribute=no
16632         cf_scanf_attribute=no
16633         for cf_attribute in scanf printf unused noreturn
16634         do
16635
16636 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16637
16638                 cf_directive="__attribute__(($cf_attribute))"
16639                 echo "checking for $CC $cf_directive" 1>&5
16640
16641                 case "$cf_attribute" in
16642                 (printf)
16643                         cf_printf_attribute=yes
16644                         cat >conftest.h <<EOF
16645 #define GCC_$cf_ATTRIBUTE 1
16646 EOF
16647                         ;;
16648                 (scanf)
16649                         cf_scanf_attribute=yes
16650                         cat >conftest.h <<EOF
16651 #define GCC_$cf_ATTRIBUTE 1
16652 EOF
16653                         ;;
16654                 (*)
16655                         cat >conftest.h <<EOF
16656 #define GCC_$cf_ATTRIBUTE $cf_directive
16657 EOF
16658                         ;;
16659                 esac
16660
16661                 if { (eval echo "$as_me:16661: \"$ac_compile\"") >&5
16662   (eval $ac_compile) 2>&5
16663   ac_status=$?
16664   echo "$as_me:16664: \$? = $ac_status" >&5
16665   (exit "$ac_status"); }; then
16666                         test -n "$verbose" && echo "$as_me:16666: result: ... $cf_attribute" >&5
16667 echo "${ECHO_T}... $cf_attribute" >&6
16668                         cat conftest.h >>confdefs.h
16669                         case "$cf_attribute" in
16670                         (noreturn)
16671
16672 cat >>confdefs.h <<EOF
16673 #define GCC_NORETURN $cf_directive
16674 EOF
16675
16676                                 ;;
16677                         (printf)
16678                                 cf_value='/* nothing */'
16679                                 if test "$cf_printf_attribute" != no ; then
16680                                         cf_value='__attribute__((format(printf,fmt,var)))'
16681
16682 cat >>confdefs.h <<\EOF
16683 #define GCC_PRINTF 1
16684 EOF
16685
16686                                 fi
16687
16688 cat >>confdefs.h <<EOF
16689 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16690 EOF
16691
16692                                 ;;
16693                         (scanf)
16694                                 cf_value='/* nothing */'
16695                                 if test "$cf_scanf_attribute" != no ; then
16696                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16697
16698 cat >>confdefs.h <<\EOF
16699 #define GCC_SCANF 1
16700 EOF
16701
16702                                 fi
16703
16704 cat >>confdefs.h <<EOF
16705 #define GCC_SCANFLIKE(fmt,var) $cf_value
16706 EOF
16707
16708                                 ;;
16709                         (unused)
16710
16711 cat >>confdefs.h <<EOF
16712 #define GCC_UNUSED $cf_directive
16713 EOF
16714
16715                                 ;;
16716                         esac
16717                 fi
16718         done
16719 else
16720         ${FGREP-fgrep} define conftest.i >>confdefs.h
16721 fi
16722 rm -rf ./conftest*
16723 fi
16724
16725 fi
16726
16727 if test "x$enable_warnings" = "xyes"; then
16728
16729         ADAFLAGS="$ADAFLAGS -gnatg"
16730
16731         if test "x$cf_with_cxx" = xyes ; then
16732
16733 INTEL_CPLUSPLUS=no
16734
16735 if test "$GCC" = yes ; then
16736         case "$host_os" in
16737         (linux*|gnu*)
16738                 echo "$as_me:16738: checking if this is really Intel C++ compiler" >&5
16739 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16740                 cf_save_CFLAGS="$CXXFLAGS"
16741                 CXXFLAGS="$CXXFLAGS -no-gcc"
16742                 cat >"conftest.$ac_ext" <<_ACEOF
16743 #line 16743 "configure"
16744 #include "confdefs.h"
16745
16746 int
16747 main (void)
16748 {
16749
16750 #ifdef __INTEL_COMPILER
16751 #else
16752 make an error
16753 #endif
16754
16755   ;
16756   return 0;
16757 }
16758 _ACEOF
16759 rm -f "conftest.$ac_objext"
16760 if { (eval echo "$as_me:16760: \"$ac_compile\"") >&5
16761   (eval $ac_compile) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit "$ac_status"); } &&
16765          { ac_try='test -s "conftest.$ac_objext"'
16766   { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767   (eval $ac_try) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit "$ac_status"); }; }; then
16771   INTEL_CPLUSPLUS=yes
16772 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16773
16774 else
16775   echo "$as_me: failed program was:" >&5
16776 cat "conftest.$ac_ext" >&5
16777 fi
16778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16779                 CXXFLAGS="$cf_save_CFLAGS"
16780                 echo "$as_me:16780: result: $INTEL_CPLUSPLUS" >&5
16781 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16782                 ;;
16783         esac
16784 fi
16785
16786 CLANG_CPLUSPLUS=no
16787
16788 if test "$GCC" = yes ; then
16789         echo "$as_me:16789: checking if this is really Clang C++ compiler" >&5
16790 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16791         cf_save_CFLAGS="$CXXFLAGS"
16792         cat >"conftest.$ac_ext" <<_ACEOF
16793 #line 16793 "configure"
16794 #include "confdefs.h"
16795
16796 int
16797 main (void)
16798 {
16799
16800 #ifdef __clang__
16801 #else
16802 make an error
16803 #endif
16804
16805   ;
16806   return 0;
16807 }
16808 _ACEOF
16809 rm -f "conftest.$ac_objext"
16810 if { (eval echo "$as_me:16810: \"$ac_compile\"") >&5
16811   (eval $ac_compile) 2>&5
16812   ac_status=$?
16813   echo "$as_me:16813: \$? = $ac_status" >&5
16814   (exit "$ac_status"); } &&
16815          { ac_try='test -s "conftest.$ac_objext"'
16816   { (eval echo "$as_me:16816: \"$ac_try\"") >&5
16817   (eval $ac_try) 2>&5
16818   ac_status=$?
16819   echo "$as_me:16819: \$? = $ac_status" >&5
16820   (exit "$ac_status"); }; }; then
16821   CLANG_CPLUSPLUS=yes
16822
16823 else
16824   echo "$as_me: failed program was:" >&5
16825 cat "conftest.$ac_ext" >&5
16826 fi
16827 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16828         CXXFLAGS="$cf_save_CFLAGS"
16829         echo "$as_me:16829: result: $CLANG_CPLUSPLUS" >&5
16830 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16831 fi
16832
16833 CLANG_VERSION=none
16834
16835 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16836         case "$CC" in
16837         (c[1-9][0-9]|*/c[1-9][0-9])
16838                 { echo "$as_me:16838: WARNING: replacing broken compiler alias $CC" >&5
16839 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16840                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16841                 CC=clang
16842                 ;;
16843         esac
16844
16845         echo "$as_me:16845: checking version of $CC" >&5
16846 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16847         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.].*//'`"
16848         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16849         echo "$as_me:16849: result: $CLANG_VERSION" >&5
16850 echo "${ECHO_T}$CLANG_VERSION" >&6
16851
16852         for cf_clang_opt in \
16853                 -Qunused-arguments \
16854                 -Wno-error=implicit-function-declaration
16855         do
16856                 echo "$as_me:16856: checking if option $cf_clang_opt works" >&5
16857 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16858                 cf_save_CFLAGS="$CFLAGS"
16859                 CFLAGS="$CFLAGS $cf_clang_opt"
16860                 cat >"conftest.$ac_ext" <<_ACEOF
16861 #line 16861 "configure"
16862 #include "confdefs.h"
16863
16864                         #include <stdio.h>
16865 int
16866 main (void)
16867 {
16868
16869                         printf("hello!\\n");
16870   ;
16871   return 0;
16872 }
16873 _ACEOF
16874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16875 if { (eval echo "$as_me:16875: \"$ac_link\"") >&5
16876   (eval $ac_link) 2>&5
16877   ac_status=$?
16878   echo "$as_me:16878: \$? = $ac_status" >&5
16879   (exit "$ac_status"); } &&
16880          { ac_try='test -s "conftest$ac_exeext"'
16881   { (eval echo "$as_me:16881: \"$ac_try\"") >&5
16882   (eval $ac_try) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit "$ac_status"); }; }; then
16886
16887                         cf_clang_optok=yes
16888 else
16889   echo "$as_me: failed program was:" >&5
16890 cat "conftest.$ac_ext" >&5
16891
16892                         cf_clang_optok=no
16893 fi
16894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16895                 echo "$as_me:16895: result: $cf_clang_optok" >&5
16896 echo "${ECHO_T}$cf_clang_optok" >&6
16897                 CFLAGS="$cf_save_CFLAGS"
16898                 if test "$cf_clang_optok" = yes; then
16899                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16900
16901 echo "${as_me:-configure}:16901: testing adding option $cf_clang_opt ..." 1>&5
16902
16903         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16904         CFLAGS="${CFLAGS}$cf_clang_opt"
16905
16906                 fi
16907         done
16908 fi
16909
16910 ac_ext=cc
16911 ac_cpp='$CXXCPP $CPPFLAGS'
16912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16913 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16915 ac_main_return="return"
16916
16917 cat > conftest.$ac_ext <<EOF
16918 #line 16918 "configure"
16919 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16920 EOF
16921
16922 if test "$INTEL_CPLUSPLUS" = yes
16923 then
16924 # The "-wdXXX" options suppress warnings:
16925 # remark #1419: external declaration in primary source file
16926 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16927 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16928 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16929 # remark #193: zero used for undefined preprocessing identifier
16930 # remark #593: variable "curs_sb_left_arrow" was set but never used
16931 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16932 # remark #869: parameter "tw" was never referenced
16933 # remark #981: operands are evaluated in unspecified order
16934 # warning #269: invalid format string conversion
16935
16936         { echo "$as_me:16936: checking for $CC warning options..." >&5
16937 echo "$as_me: checking for $CC warning options..." >&6;}
16938         cf_save_CXXFLAGS="$CXXFLAGS"
16939         EXTRA_CXXFLAGS="-Wall"
16940         for cf_opt in \
16941                 wd1419 \
16942                 wd1682 \
16943                 wd1683 \
16944                 wd1684 \
16945                 wd193 \
16946                 wd279 \
16947                 wd593 \
16948                 wd810 \
16949                 wd869 \
16950                 wd981
16951         do
16952                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16953                 if { (eval echo "$as_me:16953: \"$ac_compile\"") >&5
16954   (eval $ac_compile) 2>&5
16955   ac_status=$?
16956   echo "$as_me:16956: \$? = $ac_status" >&5
16957   (exit "$ac_status"); }; then
16958                         test -n "$verbose" && echo "$as_me:16958: result: ... -$cf_opt" >&5
16959 echo "${ECHO_T}... -$cf_opt" >&6
16960                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16961                 fi
16962         done
16963         CXXFLAGS="$cf_save_CXXFLAGS"
16964
16965 elif test "$GXX" = yes
16966 then
16967         { echo "$as_me:16967: checking for $CXX warning options..." >&5
16968 echo "$as_me: checking for $CXX warning options..." >&6;}
16969         cf_save_CXXFLAGS="$CXXFLAGS"
16970         EXTRA_CXXFLAGS="-W -Wall"
16971         cf_gxx_extra_warnings=""
16972         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16973         case "$GXX_VERSION" in
16974         ([1-2].*)
16975                 ;;
16976         (*)
16977                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16978                 ;;
16979         esac
16980         for cf_opt in \
16981                 Wabi \
16982                 fabi-version=0 \
16983                 Wextra \
16984                 Wignored-qualifiers \
16985                 Wlogical-op \
16986                 Woverloaded-virtual \
16987                 Wsign-promo \
16988                 Wsynth \
16989                 Wold-style-cast \
16990                 Wcast-align \
16991                 Wcast-qual \
16992                 Wpointer-arith \
16993                 Wshadow \
16994                 Wundef $cf_gxx_extra_warnings Wno-unused
16995         do
16996                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16997                 if { (eval echo "$as_me:16997: \"$ac_compile\"") >&5
16998   (eval $ac_compile) 2>&5
16999   ac_status=$?
17000   echo "$as_me:17000: \$? = $ac_status" >&5
17001   (exit "$ac_status"); }; then
17002                         test -n "$verbose" && echo "$as_me:17002: result: ... -$cf_opt" >&5
17003 echo "${ECHO_T}... -$cf_opt" >&6
17004                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17005                 else
17006                         test -n "$verbose" && echo "$as_me:17006: result: ... no -$cf_opt" >&5
17007 echo "${ECHO_T}... no -$cf_opt" >&6
17008                 fi
17009         done
17010         CXXFLAGS="$cf_save_CXXFLAGS"
17011 fi
17012
17013 rm -rf ./conftest*
17014 ac_ext=c
17015 ac_cpp='$CPP $CPPFLAGS'
17016 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17017 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17019 ac_main_return="return"
17020
17021         fi
17022 fi
17023
17024 echo "$as_me:17024: checking if you want to work around bogus compiler/loader warnings" >&5
17025 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17026
17027 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17028 if test "${enable_string_hacks+set}" = set; then
17029   enableval="$enable_string_hacks"
17030   enable_string_hacks=$enableval
17031 else
17032   enable_string_hacks=no
17033 fi;
17034 echo "$as_me:17034: result: $enable_string_hacks" >&5
17035 echo "${ECHO_T}$enable_string_hacks" >&6
17036
17037 if test "x$enable_string_hacks" = "xyes"; then
17038
17039 cat >>confdefs.h <<\EOF
17040 #define USE_STRING_HACKS 1
17041 EOF
17042
17043         { echo "$as_me:17043: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17044 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17045         echo "$as_me:17045: checking for strlcat" >&5
17046 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17047 if test "${ac_cv_func_strlcat+set}" = set; then
17048   echo $ECHO_N "(cached) $ECHO_C" >&6
17049 else
17050   cat >"conftest.$ac_ext" <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17053 #define strlcat autoconf_temporary
17054 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17055 #undef strlcat
17056
17057 #ifdef __cplusplus
17058 extern "C"
17059 #endif
17060
17061 /* We use char because int might match the return type of a gcc2
17062    builtin and then its argument prototype would still apply.  */
17063 char strlcat (void);
17064
17065 int
17066 main (void)
17067 {
17068
17069 /* The GNU C library defines stubs for functions which it implements
17070     to always fail with ENOSYS.  Some functions are actually named
17071     something starting with __ and the normal name is an alias.  */
17072 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17073 #error found stub for strlcat
17074 #endif
17075
17076         return strlcat ();
17077   ;
17078   return 0;
17079 }
17080 _ACEOF
17081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17082 if { (eval echo "$as_me:17082: \"$ac_link\"") >&5
17083   (eval $ac_link) 2>&5
17084   ac_status=$?
17085   echo "$as_me:17085: \$? = $ac_status" >&5
17086   (exit "$ac_status"); } &&
17087          { ac_try='test -s "conftest$ac_exeext"'
17088   { (eval echo "$as_me:17088: \"$ac_try\"") >&5
17089   (eval $ac_try) 2>&5
17090   ac_status=$?
17091   echo "$as_me:17091: \$? = $ac_status" >&5
17092   (exit "$ac_status"); }; }; then
17093   ac_cv_func_strlcat=yes
17094 else
17095   echo "$as_me: failed program was:" >&5
17096 cat "conftest.$ac_ext" >&5
17097 ac_cv_func_strlcat=no
17098 fi
17099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17100 fi
17101 echo "$as_me:17101: result: $ac_cv_func_strlcat" >&5
17102 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17103 if test "$ac_cv_func_strlcat" = yes; then
17104
17105 cat >>confdefs.h <<\EOF
17106 #define HAVE_STRLCAT 1
17107 EOF
17108
17109 else
17110
17111                 echo "$as_me:17111: checking for strlcat in -lbsd" >&5
17112 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17113 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17114   echo $ECHO_N "(cached) $ECHO_C" >&6
17115 else
17116   ac_check_lib_save_LIBS=$LIBS
17117 LIBS="-lbsd  $LIBS"
17118 cat >"conftest.$ac_ext" <<_ACEOF
17119 #line 17119 "configure"
17120 #include "confdefs.h"
17121
17122 /* Override any gcc2 internal prototype to avoid an error.  */
17123 #ifdef __cplusplus
17124 extern "C"
17125 #endif
17126 /* We use char because int might match the return type of a gcc2
17127    builtin and then its argument prototype would still apply.  */
17128 char strlcat ();
17129 int
17130 main (void)
17131 {
17132 strlcat ();
17133   ;
17134   return 0;
17135 }
17136 _ACEOF
17137 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17138 if { (eval echo "$as_me:17138: \"$ac_link\"") >&5
17139   (eval $ac_link) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit "$ac_status"); } &&
17143          { ac_try='test -s "conftest$ac_exeext"'
17144   { (eval echo "$as_me:17144: \"$ac_try\"") >&5
17145   (eval $ac_try) 2>&5
17146   ac_status=$?
17147   echo "$as_me:17147: \$? = $ac_status" >&5
17148   (exit "$ac_status"); }; }; then
17149   ac_cv_lib_bsd_strlcat=yes
17150 else
17151   echo "$as_me: failed program was:" >&5
17152 cat "conftest.$ac_ext" >&5
17153 ac_cv_lib_bsd_strlcat=no
17154 fi
17155 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17156 LIBS=$ac_check_lib_save_LIBS
17157 fi
17158 echo "$as_me:17158: result: $ac_cv_lib_bsd_strlcat" >&5
17159 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17160 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17161
17162 cf_add_libs="$LIBS"
17163 # reverse order
17164 cf_add_0lib=
17165 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17166 # filter duplicates
17167 for cf_add_1lib in $cf_add_0lib; do
17168         for cf_add_2lib in $cf_add_libs; do
17169                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17170                         cf_add_1lib=
17171                         break
17172                 fi
17173         done
17174         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17175 done
17176 LIBS="$cf_add_libs"
17177
17178 for ac_header in bsd/string.h
17179 do
17180 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17181 echo "$as_me:17181: checking for $ac_header" >&5
17182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17184   echo $ECHO_N "(cached) $ECHO_C" >&6
17185 else
17186   cat >"conftest.$ac_ext" <<_ACEOF
17187 #line 17187 "configure"
17188 #include "confdefs.h"
17189 #include <$ac_header>
17190 _ACEOF
17191 if { (eval echo "$as_me:17191: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17192   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17193   ac_status=$?
17194   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17195   rm -f conftest.er1
17196   cat conftest.err >&5
17197   echo "$as_me:17197: \$? = $ac_status" >&5
17198   (exit "$ac_status"); } >/dev/null; then
17199   if test -s conftest.err; then
17200     ac_cpp_err=$ac_c_preproc_warn_flag
17201   else
17202     ac_cpp_err=
17203   fi
17204 else
17205   ac_cpp_err=yes
17206 fi
17207 if test -z "$ac_cpp_err"; then
17208   eval "$as_ac_Header=yes"
17209 else
17210   echo "$as_me: failed program was:" >&5
17211   cat "conftest.$ac_ext" >&5
17212   eval "$as_ac_Header=no"
17213 fi
17214 rm -f conftest.err "conftest.$ac_ext"
17215 fi
17216 echo "$as_me:17216: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17217 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17218 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17219   cat >>confdefs.h <<EOF
17220 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17221 EOF
17222
17223 fi
17224 done
17225
17226 cat >>confdefs.h <<\EOF
17227 #define HAVE_STRLCAT 1
17228 EOF
17229
17230 fi
17231
17232 fi
17233
17234 for ac_func in strlcpy snprintf
17235 do
17236 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17237 echo "$as_me:17237: checking for $ac_func" >&5
17238 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17239 if eval "test \"\${$as_ac_var+set}\" = set"; then
17240   echo $ECHO_N "(cached) $ECHO_C" >&6
17241 else
17242   cat >"conftest.$ac_ext" <<_ACEOF
17243 #line 17243 "configure"
17244 #include "confdefs.h"
17245 #define $ac_func autoconf_temporary
17246 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17247 #undef $ac_func
17248
17249 #ifdef __cplusplus
17250 extern "C"
17251 #endif
17252
17253 /* We use char because int might match the return type of a gcc2
17254    builtin and then its argument prototype would still apply.  */
17255 char $ac_func (void);
17256
17257 int
17258 main (void)
17259 {
17260
17261 /* The GNU C library defines stubs for functions which it implements
17262     to always fail with ENOSYS.  Some functions are actually named
17263     something starting with __ and the normal name is an alias.  */
17264 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17265 #error found stub for $ac_func
17266 #endif
17267
17268         return $ac_func ();
17269   ;
17270   return 0;
17271 }
17272 _ACEOF
17273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17274 if { (eval echo "$as_me:17274: \"$ac_link\"") >&5
17275   (eval $ac_link) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit "$ac_status"); } &&
17279          { ac_try='test -s "conftest$ac_exeext"'
17280   { (eval echo "$as_me:17280: \"$ac_try\"") >&5
17281   (eval $ac_try) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit "$ac_status"); }; }; then
17285   eval "$as_ac_var=yes"
17286 else
17287   echo "$as_me: failed program was:" >&5
17288 cat "conftest.$ac_ext" >&5
17289 eval "$as_ac_var=no"
17290 fi
17291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17292 fi
17293 echo "$as_me:17293: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17294 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17295 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17296   cat >>confdefs.h <<EOF
17297 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17298 EOF
17299
17300 fi
17301 done
17302
17303 fi
17304
17305 ###     use option --enable-assertions to turn on generation of assertion code
17306 echo "$as_me:17306: checking if you want to enable runtime assertions" >&5
17307 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17308
17309 # Check whether --enable-assertions or --disable-assertions was given.
17310 if test "${enable_assertions+set}" = set; then
17311   enableval="$enable_assertions"
17312   with_assertions=$enableval
17313 else
17314   with_assertions=no
17315 fi;
17316 echo "$as_me:17316: result: $with_assertions" >&5
17317 echo "${ECHO_T}$with_assertions" >&6
17318 if test -n "$GCC"
17319 then
17320         if test "$with_assertions" = no
17321         then
17322                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17323         else
17324
17325         ADAFLAGS="$ADAFLAGS -gnata"
17326
17327         fi
17328 fi
17329
17330 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17331
17332 echo "$as_me:17332: checking if you want to use dmalloc for testing" >&5
17333 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17334
17335 # Check whether --with-dmalloc or --without-dmalloc was given.
17336 if test "${with_dmalloc+set}" = set; then
17337   withval="$with_dmalloc"
17338
17339 cat >>confdefs.h <<EOF
17340 #define USE_DMALLOC 1
17341 EOF
17342
17343         : "${with_cflags:=-g}"
17344         : "${enable_leaks:=no}"
17345          with_dmalloc=yes
17346 else
17347   with_dmalloc=
17348 fi;
17349 echo "$as_me:17349: result: ${with_dmalloc:-no}" >&5
17350 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17351
17352 case ".$with_cflags" in
17353 (.*-g*)
17354         case .$CFLAGS in
17355         (.*-g*)
17356                 ;;
17357         (*)
17358
17359 cf_fix_cppflags=no
17360 cf_new_cflags=
17361 cf_new_cppflags=
17362 cf_new_extra_cppflags=
17363
17364 for cf_add_cflags in -g
17365 do
17366 case "$cf_fix_cppflags" in
17367 (no)
17368         case "$cf_add_cflags" in
17369         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17370                 case "$cf_add_cflags" in
17371                 (-D*)
17372                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17373
17374                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17375                                 && test -z "${cf_tst_cflags}" \
17376                                 && cf_fix_cppflags=yes
17377
17378                         if test "$cf_fix_cppflags" = yes ; then
17379
17380         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17381         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17382
17383                                 continue
17384                         elif test "${cf_tst_cflags}" = "\"'" ; then
17385
17386         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17387         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17388
17389                                 continue
17390                         fi
17391                         ;;
17392                 esac
17393                 case "$CPPFLAGS" in
17394                 (*$cf_add_cflags)
17395                         ;;
17396                 (*)
17397                         case "$cf_add_cflags" in
17398                         (-D*)
17399                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17400
17401 CPPFLAGS=`echo "$CPPFLAGS" | \
17402         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17403                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17404
17405                                 ;;
17406                         esac
17407
17408         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17409         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17410
17411                         ;;
17412                 esac
17413                 ;;
17414         (*)
17415
17416         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17417         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17418
17419                 ;;
17420         esac
17421         ;;
17422 (yes)
17423
17424         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17425         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17426
17427         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17428
17429         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17430                 && test -z "${cf_tst_cflags}" \
17431                 && cf_fix_cppflags=no
17432         ;;
17433 esac
17434 done
17435
17436 if test -n "$cf_new_cflags" ; then
17437
17438         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17439         CFLAGS="${CFLAGS}$cf_new_cflags"
17440
17441 fi
17442
17443 if test -n "$cf_new_cppflags" ; then
17444
17445         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17446         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17447
17448 fi
17449
17450 if test -n "$cf_new_extra_cppflags" ; then
17451
17452         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17453         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17454
17455 fi
17456
17457                 ;;
17458         esac
17459         ;;
17460 esac
17461
17462 if test "$with_dmalloc" = yes ; then
17463         echo "$as_me:17463: checking for dmalloc.h" >&5
17464 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17465 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17466   echo $ECHO_N "(cached) $ECHO_C" >&6
17467 else
17468   cat >"conftest.$ac_ext" <<_ACEOF
17469 #line 17469 "configure"
17470 #include "confdefs.h"
17471 #include <dmalloc.h>
17472 _ACEOF
17473 if { (eval echo "$as_me:17473: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17474   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17475   ac_status=$?
17476   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17477   rm -f conftest.er1
17478   cat conftest.err >&5
17479   echo "$as_me:17479: \$? = $ac_status" >&5
17480   (exit "$ac_status"); } >/dev/null; then
17481   if test -s conftest.err; then
17482     ac_cpp_err=$ac_c_preproc_warn_flag
17483   else
17484     ac_cpp_err=
17485   fi
17486 else
17487   ac_cpp_err=yes
17488 fi
17489 if test -z "$ac_cpp_err"; then
17490   ac_cv_header_dmalloc_h=yes
17491 else
17492   echo "$as_me: failed program was:" >&5
17493   cat "conftest.$ac_ext" >&5
17494   ac_cv_header_dmalloc_h=no
17495 fi
17496 rm -f conftest.err "conftest.$ac_ext"
17497 fi
17498 echo "$as_me:17498: result: $ac_cv_header_dmalloc_h" >&5
17499 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17500 if test "$ac_cv_header_dmalloc_h" = yes; then
17501
17502 echo "$as_me:17502: checking for dmalloc_debug in -ldmalloc" >&5
17503 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17504 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17505   echo $ECHO_N "(cached) $ECHO_C" >&6
17506 else
17507   ac_check_lib_save_LIBS=$LIBS
17508 LIBS="-ldmalloc  $LIBS"
17509 cat >"conftest.$ac_ext" <<_ACEOF
17510 #line 17510 "configure"
17511 #include "confdefs.h"
17512
17513 /* Override any gcc2 internal prototype to avoid an error.  */
17514 #ifdef __cplusplus
17515 extern "C"
17516 #endif
17517 /* We use char because int might match the return type of a gcc2
17518    builtin and then its argument prototype would still apply.  */
17519 char dmalloc_debug ();
17520 int
17521 main (void)
17522 {
17523 dmalloc_debug ();
17524   ;
17525   return 0;
17526 }
17527 _ACEOF
17528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17529 if { (eval echo "$as_me:17529: \"$ac_link\"") >&5
17530   (eval $ac_link) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit "$ac_status"); } &&
17534          { ac_try='test -s "conftest$ac_exeext"'
17535   { (eval echo "$as_me:17535: \"$ac_try\"") >&5
17536   (eval $ac_try) 2>&5
17537   ac_status=$?
17538   echo "$as_me:17538: \$? = $ac_status" >&5
17539   (exit "$ac_status"); }; }; then
17540   ac_cv_lib_dmalloc_dmalloc_debug=yes
17541 else
17542   echo "$as_me: failed program was:" >&5
17543 cat "conftest.$ac_ext" >&5
17544 ac_cv_lib_dmalloc_dmalloc_debug=no
17545 fi
17546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17547 LIBS=$ac_check_lib_save_LIBS
17548 fi
17549 echo "$as_me:17549: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17550 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17551 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17552   cat >>confdefs.h <<EOF
17553 #define HAVE_LIBDMALLOC 1
17554 EOF
17555
17556   LIBS="-ldmalloc $LIBS"
17557
17558 fi
17559
17560 fi
17561
17562 fi
17563
17564 echo "$as_me:17564: checking if you want to use dbmalloc for testing" >&5
17565 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17566
17567 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17568 if test "${with_dbmalloc+set}" = set; then
17569   withval="$with_dbmalloc"
17570
17571 cat >>confdefs.h <<EOF
17572 #define USE_DBMALLOC 1
17573 EOF
17574
17575         : "${with_cflags:=-g}"
17576         : "${enable_leaks:=no}"
17577          with_dbmalloc=yes
17578 else
17579   with_dbmalloc=
17580 fi;
17581 echo "$as_me:17581: result: ${with_dbmalloc:-no}" >&5
17582 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17583
17584 case ".$with_cflags" in
17585 (.*-g*)
17586         case .$CFLAGS in
17587         (.*-g*)
17588                 ;;
17589         (*)
17590
17591 cf_fix_cppflags=no
17592 cf_new_cflags=
17593 cf_new_cppflags=
17594 cf_new_extra_cppflags=
17595
17596 for cf_add_cflags in -g
17597 do
17598 case "$cf_fix_cppflags" in
17599 (no)
17600         case "$cf_add_cflags" in
17601         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17602                 case "$cf_add_cflags" in
17603                 (-D*)
17604                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17605
17606                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17607                                 && test -z "${cf_tst_cflags}" \
17608                                 && cf_fix_cppflags=yes
17609
17610                         if test "$cf_fix_cppflags" = yes ; then
17611
17612         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17613         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17614
17615                                 continue
17616                         elif test "${cf_tst_cflags}" = "\"'" ; then
17617
17618         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17619         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17620
17621                                 continue
17622                         fi
17623                         ;;
17624                 esac
17625                 case "$CPPFLAGS" in
17626                 (*$cf_add_cflags)
17627                         ;;
17628                 (*)
17629                         case "$cf_add_cflags" in
17630                         (-D*)
17631                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17632
17633 CPPFLAGS=`echo "$CPPFLAGS" | \
17634         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17635                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17636
17637                                 ;;
17638                         esac
17639
17640         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17641         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17642
17643                         ;;
17644                 esac
17645                 ;;
17646         (*)
17647
17648         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17649         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17650
17651                 ;;
17652         esac
17653         ;;
17654 (yes)
17655
17656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17658
17659         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17660
17661         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17662                 && test -z "${cf_tst_cflags}" \
17663                 && cf_fix_cppflags=no
17664         ;;
17665 esac
17666 done
17667
17668 if test -n "$cf_new_cflags" ; then
17669
17670         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17671         CFLAGS="${CFLAGS}$cf_new_cflags"
17672
17673 fi
17674
17675 if test -n "$cf_new_cppflags" ; then
17676
17677         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17678         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17679
17680 fi
17681
17682 if test -n "$cf_new_extra_cppflags" ; then
17683
17684         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17685         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17686
17687 fi
17688
17689                 ;;
17690         esac
17691         ;;
17692 esac
17693
17694 if test "$with_dbmalloc" = yes ; then
17695         echo "$as_me:17695: checking for dbmalloc.h" >&5
17696 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17697 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17698   echo $ECHO_N "(cached) $ECHO_C" >&6
17699 else
17700   cat >"conftest.$ac_ext" <<_ACEOF
17701 #line 17701 "configure"
17702 #include "confdefs.h"
17703 #include <dbmalloc.h>
17704 _ACEOF
17705 if { (eval echo "$as_me:17705: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17706   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17707   ac_status=$?
17708   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17709   rm -f conftest.er1
17710   cat conftest.err >&5
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit "$ac_status"); } >/dev/null; then
17713   if test -s conftest.err; then
17714     ac_cpp_err=$ac_c_preproc_warn_flag
17715   else
17716     ac_cpp_err=
17717   fi
17718 else
17719   ac_cpp_err=yes
17720 fi
17721 if test -z "$ac_cpp_err"; then
17722   ac_cv_header_dbmalloc_h=yes
17723 else
17724   echo "$as_me: failed program was:" >&5
17725   cat "conftest.$ac_ext" >&5
17726   ac_cv_header_dbmalloc_h=no
17727 fi
17728 rm -f conftest.err "conftest.$ac_ext"
17729 fi
17730 echo "$as_me:17730: result: $ac_cv_header_dbmalloc_h" >&5
17731 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17732 if test "$ac_cv_header_dbmalloc_h" = yes; then
17733
17734 echo "$as_me:17734: checking for debug_malloc in -ldbmalloc" >&5
17735 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17736 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17737   echo $ECHO_N "(cached) $ECHO_C" >&6
17738 else
17739   ac_check_lib_save_LIBS=$LIBS
17740 LIBS="-ldbmalloc  $LIBS"
17741 cat >"conftest.$ac_ext" <<_ACEOF
17742 #line 17742 "configure"
17743 #include "confdefs.h"
17744
17745 /* Override any gcc2 internal prototype to avoid an error.  */
17746 #ifdef __cplusplus
17747 extern "C"
17748 #endif
17749 /* We use char because int might match the return type of a gcc2
17750    builtin and then its argument prototype would still apply.  */
17751 char debug_malloc ();
17752 int
17753 main (void)
17754 {
17755 debug_malloc ();
17756   ;
17757   return 0;
17758 }
17759 _ACEOF
17760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17761 if { (eval echo "$as_me:17761: \"$ac_link\"") >&5
17762   (eval $ac_link) 2>&5
17763   ac_status=$?
17764   echo "$as_me:17764: \$? = $ac_status" >&5
17765   (exit "$ac_status"); } &&
17766          { ac_try='test -s "conftest$ac_exeext"'
17767   { (eval echo "$as_me:17767: \"$ac_try\"") >&5
17768   (eval $ac_try) 2>&5
17769   ac_status=$?
17770   echo "$as_me:17770: \$? = $ac_status" >&5
17771   (exit "$ac_status"); }; }; then
17772   ac_cv_lib_dbmalloc_debug_malloc=yes
17773 else
17774   echo "$as_me: failed program was:" >&5
17775 cat "conftest.$ac_ext" >&5
17776 ac_cv_lib_dbmalloc_debug_malloc=no
17777 fi
17778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17779 LIBS=$ac_check_lib_save_LIBS
17780 fi
17781 echo "$as_me:17781: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17782 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17783 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17784   cat >>confdefs.h <<EOF
17785 #define HAVE_LIBDBMALLOC 1
17786 EOF
17787
17788   LIBS="-ldbmalloc $LIBS"
17789
17790 fi
17791
17792 fi
17793
17794 fi
17795
17796 echo "$as_me:17796: checking if you want to use valgrind for testing" >&5
17797 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17798
17799 # Check whether --with-valgrind or --without-valgrind was given.
17800 if test "${with_valgrind+set}" = set; then
17801   withval="$with_valgrind"
17802
17803 cat >>confdefs.h <<EOF
17804 #define USE_VALGRIND 1
17805 EOF
17806
17807         : "${with_cflags:=-g}"
17808         : "${enable_leaks:=no}"
17809          with_valgrind=yes
17810 else
17811   with_valgrind=
17812 fi;
17813 echo "$as_me:17813: result: ${with_valgrind:-no}" >&5
17814 echo "${ECHO_T}${with_valgrind:-no}" >&6
17815
17816 case ".$with_cflags" in
17817 (.*-g*)
17818         case .$CFLAGS in
17819         (.*-g*)
17820                 ;;
17821         (*)
17822
17823 cf_fix_cppflags=no
17824 cf_new_cflags=
17825 cf_new_cppflags=
17826 cf_new_extra_cppflags=
17827
17828 for cf_add_cflags in -g
17829 do
17830 case "$cf_fix_cppflags" in
17831 (no)
17832         case "$cf_add_cflags" in
17833         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17834                 case "$cf_add_cflags" in
17835                 (-D*)
17836                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17837
17838                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17839                                 && test -z "${cf_tst_cflags}" \
17840                                 && cf_fix_cppflags=yes
17841
17842                         if test "$cf_fix_cppflags" = yes ; then
17843
17844         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17845         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17846
17847                                 continue
17848                         elif test "${cf_tst_cflags}" = "\"'" ; then
17849
17850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17852
17853                                 continue
17854                         fi
17855                         ;;
17856                 esac
17857                 case "$CPPFLAGS" in
17858                 (*$cf_add_cflags)
17859                         ;;
17860                 (*)
17861                         case "$cf_add_cflags" in
17862                         (-D*)
17863                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17864
17865 CPPFLAGS=`echo "$CPPFLAGS" | \
17866         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17867                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17868
17869                                 ;;
17870                         esac
17871
17872         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17873         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17874
17875                         ;;
17876                 esac
17877                 ;;
17878         (*)
17879
17880         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17881         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17882
17883                 ;;
17884         esac
17885         ;;
17886 (yes)
17887
17888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17890
17891         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17892
17893         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17894                 && test -z "${cf_tst_cflags}" \
17895                 && cf_fix_cppflags=no
17896         ;;
17897 esac
17898 done
17899
17900 if test -n "$cf_new_cflags" ; then
17901
17902         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17903         CFLAGS="${CFLAGS}$cf_new_cflags"
17904
17905 fi
17906
17907 if test -n "$cf_new_cppflags" ; then
17908
17909         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17910         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17911
17912 fi
17913
17914 if test -n "$cf_new_extra_cppflags" ; then
17915
17916         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17917         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17918
17919 fi
17920
17921                 ;;
17922         esac
17923         ;;
17924 esac
17925
17926 echo "$as_me:17926: checking if you want to perform memory-leak testing" >&5
17927 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17928
17929 # Check whether --enable-leaks or --disable-leaks was given.
17930 if test "${enable_leaks+set}" = set; then
17931   enableval="$enable_leaks"
17932   enable_leaks=no
17933 else
17934   enable_leaks=yes
17935 fi;
17936 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17937 echo "$as_me:17937: result: $with_no_leaks" >&5
17938 echo "${ECHO_T}$with_no_leaks" >&6
17939
17940 if test "$enable_leaks" = no ; then
17941
17942 cat >>confdefs.h <<\EOF
17943 #define NO_LEAKS 1
17944 EOF
17945
17946 cat >>confdefs.h <<\EOF
17947 #define YY_NO_LEAKS 1
17948 EOF
17949
17950 fi
17951
17952 cat >>confdefs.h <<\EOF
17953 #define HAVE_NC_ALLOC_H 1
17954 EOF
17955
17956 ###     use option --enable-expanded to generate certain macros as functions
17957
17958 # Check whether --enable-expanded or --disable-expanded was given.
17959 if test "${enable_expanded+set}" = set; then
17960   enableval="$enable_expanded"
17961   test "x$enableval" = xyes &&
17962 cat >>confdefs.h <<\EOF
17963 #define NCURSES_EXPANDED 1
17964 EOF
17965
17966 fi;
17967
17968 ###     use option --disable-macros to suppress macros in favor of functions
17969
17970 # Check whether --enable-macros or --disable-macros was given.
17971 if test "${enable_macros+set}" = set; then
17972   enableval="$enable_macros"
17973   test "$enableval" = no &&
17974 cat >>confdefs.h <<\EOF
17975 #define NCURSES_NOMACROS 1
17976 EOF
17977
17978 fi;
17979
17980 # Normally we only add trace() to the debug-library.  Allow this to be
17981 # extended to all models of the ncurses library:
17982 cf_all_traces=no
17983 case "$CFLAGS $CPPFLAGS" in
17984 (*-DTRACE*)
17985         cf_all_traces=yes
17986         ;;
17987 esac
17988
17989 echo "$as_me:17989: checking whether to add trace feature to all models" >&5
17990 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17991
17992 # Check whether --with-trace or --without-trace was given.
17993 if test "${with_trace+set}" = set; then
17994   withval="$with_trace"
17995   cf_with_trace=$withval
17996 else
17997   cf_with_trace=$cf_all_traces
17998 fi;
17999 echo "$as_me:17999: result: $cf_with_trace" >&5
18000 echo "${ECHO_T}$cf_with_trace" >&6
18001
18002 if test "x$cf_with_trace" = xyes ; then
18003         LIB_TRACING=all
18004         ADA_TRACE=TRUE
18005
18006 cf_fix_cppflags=no
18007 cf_new_cflags=
18008 cf_new_cppflags=
18009 cf_new_extra_cppflags=
18010
18011 for cf_add_cflags in -DTRACE
18012 do
18013 case "$cf_fix_cppflags" in
18014 (no)
18015         case "$cf_add_cflags" in
18016         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18017                 case "$cf_add_cflags" in
18018                 (-D*)
18019                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18020
18021                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18022                                 && test -z "${cf_tst_cflags}" \
18023                                 && cf_fix_cppflags=yes
18024
18025                         if test "$cf_fix_cppflags" = yes ; then
18026
18027         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18028         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18029
18030                                 continue
18031                         elif test "${cf_tst_cflags}" = "\"'" ; then
18032
18033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18035
18036                                 continue
18037                         fi
18038                         ;;
18039                 esac
18040                 case "$CPPFLAGS" in
18041                 (*$cf_add_cflags)
18042                         ;;
18043                 (*)
18044                         case "$cf_add_cflags" in
18045                         (-D*)
18046                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18047
18048 CPPFLAGS=`echo "$CPPFLAGS" | \
18049         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18050                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18051
18052                                 ;;
18053                         esac
18054
18055         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18056         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18057
18058                         ;;
18059                 esac
18060                 ;;
18061         (*)
18062
18063         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18064         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18065
18066                 ;;
18067         esac
18068         ;;
18069 (yes)
18070
18071         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18072         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18073
18074         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18075
18076         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18077                 && test -z "${cf_tst_cflags}" \
18078                 && cf_fix_cppflags=no
18079         ;;
18080 esac
18081 done
18082
18083 if test -n "$cf_new_cflags" ; then
18084
18085         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18086         CFLAGS="${CFLAGS}$cf_new_cflags"
18087
18088 fi
18089
18090 if test -n "$cf_new_cppflags" ; then
18091
18092         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18093         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18094
18095 fi
18096
18097 if test -n "$cf_new_extra_cppflags" ; then
18098
18099         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18100         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18101
18102 fi
18103
18104 cat >>confdefs.h <<\EOF
18105 #define HAVE__TRACEF 1
18106 EOF
18107
18108 else
18109         LIB_TRACING=DEBUG
18110         ADA_TRACE=FALSE
18111 fi
18112
18113 echo "$as_me:18113: checking if we want to use GNAT projects" >&5
18114 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18115
18116 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18117 if test "${enable_gnat_projects+set}" = set; then
18118   enableval="$enable_gnat_projects"
18119   test "$enableval" != no && enableval=yes
18120         if test "$enableval" != "yes" ; then
18121     enable_gnat_projects=no
18122         else
18123                 enable_gnat_projects=yes
18124         fi
18125 else
18126   enableval=yes
18127         enable_gnat_projects=yes
18128
18129 fi;
18130 echo "$as_me:18130: result: $enable_gnat_projects" >&5
18131 echo "${ECHO_T}$enable_gnat_projects" >&6
18132
18133 ###     Checks for libraries.
18134 case "$cf_cv_system_name" in
18135 (*mingw32*|*mingw64*)
18136         if test "x$with_exp_win32" = xyes ; then
18137         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18138         else
18139         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18140         fi
18141         # Note: WINVER may be a problem with Windows 10
18142         ;;
18143 (*)
18144 echo "$as_me:18144: checking for gettimeofday" >&5
18145 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18146 if test "${ac_cv_func_gettimeofday+set}" = set; then
18147   echo $ECHO_N "(cached) $ECHO_C" >&6
18148 else
18149   cat >"conftest.$ac_ext" <<_ACEOF
18150 #line 18150 "configure"
18151 #include "confdefs.h"
18152 #define gettimeofday autoconf_temporary
18153 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18154 #undef gettimeofday
18155
18156 #ifdef __cplusplus
18157 extern "C"
18158 #endif
18159
18160 /* We use char because int might match the return type of a gcc2
18161    builtin and then its argument prototype would still apply.  */
18162 char gettimeofday (void);
18163
18164 int
18165 main (void)
18166 {
18167
18168 /* The GNU C library defines stubs for functions which it implements
18169     to always fail with ENOSYS.  Some functions are actually named
18170     something starting with __ and the normal name is an alias.  */
18171 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18172 #error found stub for gettimeofday
18173 #endif
18174
18175         return gettimeofday ();
18176   ;
18177   return 0;
18178 }
18179 _ACEOF
18180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18181 if { (eval echo "$as_me:18181: \"$ac_link\"") >&5
18182   (eval $ac_link) 2>&5
18183   ac_status=$?
18184   echo "$as_me:18184: \$? = $ac_status" >&5
18185   (exit "$ac_status"); } &&
18186          { ac_try='test -s "conftest$ac_exeext"'
18187   { (eval echo "$as_me:18187: \"$ac_try\"") >&5
18188   (eval $ac_try) 2>&5
18189   ac_status=$?
18190   echo "$as_me:18190: \$? = $ac_status" >&5
18191   (exit "$ac_status"); }; }; then
18192   ac_cv_func_gettimeofday=yes
18193 else
18194   echo "$as_me: failed program was:" >&5
18195 cat "conftest.$ac_ext" >&5
18196 ac_cv_func_gettimeofday=no
18197 fi
18198 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18199 fi
18200 echo "$as_me:18200: result: $ac_cv_func_gettimeofday" >&5
18201 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18202 if test "$ac_cv_func_gettimeofday" = yes; then
18203
18204 cat >>confdefs.h <<\EOF
18205 #define HAVE_GETTIMEOFDAY 1
18206 EOF
18207
18208 else
18209
18210 echo "$as_me:18210: checking for gettimeofday in -lbsd" >&5
18211 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18212 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18213   echo $ECHO_N "(cached) $ECHO_C" >&6
18214 else
18215   ac_check_lib_save_LIBS=$LIBS
18216 LIBS="-lbsd  $LIBS"
18217 cat >"conftest.$ac_ext" <<_ACEOF
18218 #line 18218 "configure"
18219 #include "confdefs.h"
18220
18221 /* Override any gcc2 internal prototype to avoid an error.  */
18222 #ifdef __cplusplus
18223 extern "C"
18224 #endif
18225 /* We use char because int might match the return type of a gcc2
18226    builtin and then its argument prototype would still apply.  */
18227 char gettimeofday ();
18228 int
18229 main (void)
18230 {
18231 gettimeofday ();
18232   ;
18233   return 0;
18234 }
18235 _ACEOF
18236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18237 if { (eval echo "$as_me:18237: \"$ac_link\"") >&5
18238   (eval $ac_link) 2>&5
18239   ac_status=$?
18240   echo "$as_me:18240: \$? = $ac_status" >&5
18241   (exit "$ac_status"); } &&
18242          { ac_try='test -s "conftest$ac_exeext"'
18243   { (eval echo "$as_me:18243: \"$ac_try\"") >&5
18244   (eval $ac_try) 2>&5
18245   ac_status=$?
18246   echo "$as_me:18246: \$? = $ac_status" >&5
18247   (exit "$ac_status"); }; }; then
18248   ac_cv_lib_bsd_gettimeofday=yes
18249 else
18250   echo "$as_me: failed program was:" >&5
18251 cat "conftest.$ac_ext" >&5
18252 ac_cv_lib_bsd_gettimeofday=no
18253 fi
18254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18255 LIBS=$ac_check_lib_save_LIBS
18256 fi
18257 echo "$as_me:18257: result: $ac_cv_lib_bsd_gettimeofday" >&5
18258 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18259 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18260
18261 cat >>confdefs.h <<\EOF
18262 #define HAVE_GETTIMEOFDAY 1
18263 EOF
18264
18265 cf_add_libs="$LIBS"
18266 # reverse order
18267 cf_add_0lib=
18268 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18269 # filter duplicates
18270 for cf_add_1lib in $cf_add_0lib; do
18271         for cf_add_2lib in $cf_add_libs; do
18272                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18273                         cf_add_1lib=
18274                         break
18275                 fi
18276         done
18277         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18278 done
18279 LIBS="$cf_add_libs"
18280
18281 fi
18282
18283 fi
18284         ;;
18285 esac
18286
18287 echo "$as_me:18287: checking if -lm needed for math functions" >&5
18288 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18289 if test "${cf_cv_need_libm+set}" = set; then
18290   echo $ECHO_N "(cached) $ECHO_C" >&6
18291 else
18292
18293         cat >"conftest.$ac_ext" <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296
18297         #include <stdio.h>
18298         #include <stdlib.h>
18299         #include <math.h>
18300
18301 int
18302 main (void)
18303 {
18304 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18305   ;
18306   return 0;
18307 }
18308 _ACEOF
18309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18310 if { (eval echo "$as_me:18310: \"$ac_link\"") >&5
18311   (eval $ac_link) 2>&5
18312   ac_status=$?
18313   echo "$as_me:18313: \$? = $ac_status" >&5
18314   (exit "$ac_status"); } &&
18315          { ac_try='test -s "conftest$ac_exeext"'
18316   { (eval echo "$as_me:18316: \"$ac_try\"") >&5
18317   (eval $ac_try) 2>&5
18318   ac_status=$?
18319   echo "$as_me:18319: \$? = $ac_status" >&5
18320   (exit "$ac_status"); }; }; then
18321   cf_cv_need_libm=no
18322 else
18323   echo "$as_me: failed program was:" >&5
18324 cat "conftest.$ac_ext" >&5
18325 cf_cv_need_libm=yes
18326 fi
18327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18328 fi
18329 echo "$as_me:18329: result: $cf_cv_need_libm" >&5
18330 echo "${ECHO_T}$cf_cv_need_libm" >&6
18331 if test "$cf_cv_need_libm" = yes
18332 then
18333 MATH_LIB=-lm
18334 fi
18335
18336 ###     Checks for header files.
18337 echo "$as_me:18337: checking for ANSI C header files" >&5
18338 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18339 if test "${ac_cv_header_stdc+set}" = set; then
18340   echo $ECHO_N "(cached) $ECHO_C" >&6
18341 else
18342   cat >"conftest.$ac_ext" <<_ACEOF
18343 #line 18343 "configure"
18344 #include "confdefs.h"
18345 #include <stdlib.h>
18346 #include <stdarg.h>
18347 #include <string.h>
18348 #include <float.h>
18349
18350 _ACEOF
18351 if { (eval echo "$as_me:18351: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18352   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18353   ac_status=$?
18354   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18355   rm -f conftest.er1
18356   cat conftest.err >&5
18357   echo "$as_me:18357: \$? = $ac_status" >&5
18358   (exit "$ac_status"); } >/dev/null; then
18359   if test -s conftest.err; then
18360     ac_cpp_err=$ac_c_preproc_warn_flag
18361   else
18362     ac_cpp_err=
18363   fi
18364 else
18365   ac_cpp_err=yes
18366 fi
18367 if test -z "$ac_cpp_err"; then
18368   ac_cv_header_stdc=yes
18369 else
18370   echo "$as_me: failed program was:" >&5
18371   cat "conftest.$ac_ext" >&5
18372   ac_cv_header_stdc=no
18373 fi
18374 rm -f conftest.err "conftest.$ac_ext"
18375
18376 if test $ac_cv_header_stdc = yes; then
18377   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18378   cat >"conftest.$ac_ext" <<_ACEOF
18379 #line 18379 "configure"
18380 #include "confdefs.h"
18381 #include <string.h>
18382
18383 _ACEOF
18384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18385   $EGREP "memchr" >/dev/null 2>&1; then
18386   :
18387 else
18388   ac_cv_header_stdc=no
18389 fi
18390 rm -rf conftest*
18391
18392 fi
18393
18394 if test $ac_cv_header_stdc = yes; then
18395   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18396   cat >"conftest.$ac_ext" <<_ACEOF
18397 #line 18397 "configure"
18398 #include "confdefs.h"
18399 #include <stdlib.h>
18400
18401 _ACEOF
18402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18403   $EGREP "free" >/dev/null 2>&1; then
18404   :
18405 else
18406   ac_cv_header_stdc=no
18407 fi
18408 rm -rf conftest*
18409
18410 fi
18411
18412 if test $ac_cv_header_stdc = yes; then
18413   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18414   if test "$cross_compiling" = yes; then
18415   :
18416 else
18417   cat >"conftest.$ac_ext" <<_ACEOF
18418 #line 18418 "configure"
18419 #include "confdefs.h"
18420 #include <ctype.h>
18421 #if ((' ' & 0x0FF) == 0x020)
18422 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18423 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18424 #else
18425 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18426                      || ('j' <= (c) && (c) <= 'r') \
18427                      || ('s' <= (c) && (c) <= 'z'))
18428 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18429 #endif
18430
18431 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18432 int
18433 main (void)
18434 {
18435   int i;
18436   for (i = 0; i < 256; i++)
18437     if (XOR (islower (i), ISLOWER (i))
18438         || toupper (i) != TOUPPER (i))
18439       $ac_main_return(2);
18440   $ac_main_return (0);
18441 }
18442 _ACEOF
18443 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
18449   { (eval echo "$as_me:18449: \"$ac_try\"") >&5
18450   (eval $ac_try) 2>&5
18451   ac_status=$?
18452   echo "$as_me:18452: \$? = $ac_status" >&5
18453   (exit "$ac_status"); }; }; then
18454   :
18455 else
18456   echo "$as_me: program exited with status $ac_status" >&5
18457 echo "$as_me: failed program was:" >&5
18458 cat "conftest.$ac_ext" >&5
18459 ac_cv_header_stdc=no
18460 fi
18461 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18462 fi
18463 fi
18464 fi
18465 echo "$as_me:18465: result: $ac_cv_header_stdc" >&5
18466 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18467 if test $ac_cv_header_stdc = yes; then
18468
18469 cat >>confdefs.h <<\EOF
18470 #define STDC_HEADERS 1
18471 EOF
18472
18473 fi
18474
18475 ac_header_dirent=no
18476 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18477   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18478 echo "$as_me:18478: checking for $ac_hdr that defines DIR" >&5
18479 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18480 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18481   echo $ECHO_N "(cached) $ECHO_C" >&6
18482 else
18483   cat >"conftest.$ac_ext" <<_ACEOF
18484 #line 18484 "configure"
18485 #include "confdefs.h"
18486 #include <sys/types.h>
18487 #include <$ac_hdr>
18488
18489 int
18490 main (void)
18491 {
18492 if ((DIR *) 0)
18493 return 0;
18494   ;
18495   return 0;
18496 }
18497 _ACEOF
18498 rm -f "conftest.$ac_objext"
18499 if { (eval echo "$as_me:18499: \"$ac_compile\"") >&5
18500   (eval $ac_compile) 2>&5
18501   ac_status=$?
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit "$ac_status"); } &&
18504          { ac_try='test -s "conftest.$ac_objext"'
18505   { (eval echo "$as_me:18505: \"$ac_try\"") >&5
18506   (eval $ac_try) 2>&5
18507   ac_status=$?
18508   echo "$as_me:18508: \$? = $ac_status" >&5
18509   (exit "$ac_status"); }; }; then
18510   eval "$as_ac_Header=yes"
18511 else
18512   echo "$as_me: failed program was:" >&5
18513 cat "conftest.$ac_ext" >&5
18514 eval "$as_ac_Header=no"
18515 fi
18516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18517 fi
18518 echo "$as_me:18518: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18519 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18520 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18521   cat >>confdefs.h <<EOF
18522 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18523 EOF
18524
18525 ac_header_dirent=$ac_hdr; break
18526 fi
18527
18528 done
18529 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18530 if test $ac_header_dirent = dirent.h; then
18531   echo "$as_me:18531: checking for opendir in -ldir" >&5
18532 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18533 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18534   echo $ECHO_N "(cached) $ECHO_C" >&6
18535 else
18536   ac_check_lib_save_LIBS=$LIBS
18537 LIBS="-ldir  $LIBS"
18538 cat >"conftest.$ac_ext" <<_ACEOF
18539 #line 18539 "configure"
18540 #include "confdefs.h"
18541
18542 /* Override any gcc2 internal prototype to avoid an error.  */
18543 #ifdef __cplusplus
18544 extern "C"
18545 #endif
18546 /* We use char because int might match the return type of a gcc2
18547    builtin and then its argument prototype would still apply.  */
18548 char opendir ();
18549 int
18550 main (void)
18551 {
18552 opendir ();
18553   ;
18554   return 0;
18555 }
18556 _ACEOF
18557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18558 if { (eval echo "$as_me:18558: \"$ac_link\"") >&5
18559   (eval $ac_link) 2>&5
18560   ac_status=$?
18561   echo "$as_me:18561: \$? = $ac_status" >&5
18562   (exit "$ac_status"); } &&
18563          { ac_try='test -s "conftest$ac_exeext"'
18564   { (eval echo "$as_me:18564: \"$ac_try\"") >&5
18565   (eval $ac_try) 2>&5
18566   ac_status=$?
18567   echo "$as_me:18567: \$? = $ac_status" >&5
18568   (exit "$ac_status"); }; }; then
18569   ac_cv_lib_dir_opendir=yes
18570 else
18571   echo "$as_me: failed program was:" >&5
18572 cat "conftest.$ac_ext" >&5
18573 ac_cv_lib_dir_opendir=no
18574 fi
18575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18576 LIBS=$ac_check_lib_save_LIBS
18577 fi
18578 echo "$as_me:18578: result: $ac_cv_lib_dir_opendir" >&5
18579 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18580 if test "$ac_cv_lib_dir_opendir" = yes; then
18581   LIBS="$LIBS -ldir"
18582 fi
18583
18584 else
18585   echo "$as_me:18585: checking for opendir in -lx" >&5
18586 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18587 if test "${ac_cv_lib_x_opendir+set}" = set; then
18588   echo $ECHO_N "(cached) $ECHO_C" >&6
18589 else
18590   ac_check_lib_save_LIBS=$LIBS
18591 LIBS="-lx  $LIBS"
18592 cat >"conftest.$ac_ext" <<_ACEOF
18593 #line 18593 "configure"
18594 #include "confdefs.h"
18595
18596 /* Override any gcc2 internal prototype to avoid an error.  */
18597 #ifdef __cplusplus
18598 extern "C"
18599 #endif
18600 /* We use char because int might match the return type of a gcc2
18601    builtin and then its argument prototype would still apply.  */
18602 char opendir ();
18603 int
18604 main (void)
18605 {
18606 opendir ();
18607   ;
18608   return 0;
18609 }
18610 _ACEOF
18611 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18612 if { (eval echo "$as_me:18612: \"$ac_link\"") >&5
18613   (eval $ac_link) 2>&5
18614   ac_status=$?
18615   echo "$as_me:18615: \$? = $ac_status" >&5
18616   (exit "$ac_status"); } &&
18617          { ac_try='test -s "conftest$ac_exeext"'
18618   { (eval echo "$as_me:18618: \"$ac_try\"") >&5
18619   (eval $ac_try) 2>&5
18620   ac_status=$?
18621   echo "$as_me:18621: \$? = $ac_status" >&5
18622   (exit "$ac_status"); }; }; then
18623   ac_cv_lib_x_opendir=yes
18624 else
18625   echo "$as_me: failed program was:" >&5
18626 cat "conftest.$ac_ext" >&5
18627 ac_cv_lib_x_opendir=no
18628 fi
18629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18630 LIBS=$ac_check_lib_save_LIBS
18631 fi
18632 echo "$as_me:18632: result: $ac_cv_lib_x_opendir" >&5
18633 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18634 if test "$ac_cv_lib_x_opendir" = yes; then
18635   LIBS="$LIBS -lx"
18636 fi
18637
18638 fi
18639
18640 echo "$as_me:18640: checking whether time.h and sys/time.h may both be included" >&5
18641 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18642 if test "${ac_cv_header_time+set}" = set; then
18643   echo $ECHO_N "(cached) $ECHO_C" >&6
18644 else
18645   cat >"conftest.$ac_ext" <<_ACEOF
18646 #line 18646 "configure"
18647 #include "confdefs.h"
18648 #include <sys/types.h>
18649 #include <sys/time.h>
18650 #include <time.h>
18651
18652 int
18653 main (void)
18654 {
18655 if ((struct tm *) 0)
18656 return 0;
18657   ;
18658   return 0;
18659 }
18660 _ACEOF
18661 rm -f "conftest.$ac_objext"
18662 if { (eval echo "$as_me:18662: \"$ac_compile\"") >&5
18663   (eval $ac_compile) 2>&5
18664   ac_status=$?
18665   echo "$as_me:18665: \$? = $ac_status" >&5
18666   (exit "$ac_status"); } &&
18667          { ac_try='test -s "conftest.$ac_objext"'
18668   { (eval echo "$as_me:18668: \"$ac_try\"") >&5
18669   (eval $ac_try) 2>&5
18670   ac_status=$?
18671   echo "$as_me:18671: \$? = $ac_status" >&5
18672   (exit "$ac_status"); }; }; then
18673   ac_cv_header_time=yes
18674 else
18675   echo "$as_me: failed program was:" >&5
18676 cat "conftest.$ac_ext" >&5
18677 ac_cv_header_time=no
18678 fi
18679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18680 fi
18681 echo "$as_me:18681: result: $ac_cv_header_time" >&5
18682 echo "${ECHO_T}$ac_cv_header_time" >&6
18683 if test $ac_cv_header_time = yes; then
18684
18685 cat >>confdefs.h <<\EOF
18686 #define TIME_WITH_SYS_TIME 1
18687 EOF
18688
18689 fi
18690
18691 cf_regex_func=no
18692 cf_regex_libs=
18693 case "$host_os" in
18694 (mingw*)
18695         # -lsystre -ltre -lintl -liconv
18696         echo "$as_me:18696: checking for regcomp in -lsystre" >&5
18697 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18698 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18699   echo $ECHO_N "(cached) $ECHO_C" >&6
18700 else
18701   ac_check_lib_save_LIBS=$LIBS
18702 LIBS="-lsystre  $LIBS"
18703 cat >"conftest.$ac_ext" <<_ACEOF
18704 #line 18704 "configure"
18705 #include "confdefs.h"
18706
18707 /* Override any gcc2 internal prototype to avoid an error.  */
18708 #ifdef __cplusplus
18709 extern "C"
18710 #endif
18711 /* We use char because int might match the return type of a gcc2
18712    builtin and then its argument prototype would still apply.  */
18713 char regcomp ();
18714 int
18715 main (void)
18716 {
18717 regcomp ();
18718   ;
18719   return 0;
18720 }
18721 _ACEOF
18722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18723 if { (eval echo "$as_me:18723: \"$ac_link\"") >&5
18724   (eval $ac_link) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit "$ac_status"); } &&
18728          { ac_try='test -s "conftest$ac_exeext"'
18729   { (eval echo "$as_me:18729: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:18732: \$? = $ac_status" >&5
18733   (exit "$ac_status"); }; }; then
18734   ac_cv_lib_systre_regcomp=yes
18735 else
18736   echo "$as_me: failed program was:" >&5
18737 cat "conftest.$ac_ext" >&5
18738 ac_cv_lib_systre_regcomp=no
18739 fi
18740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18741 LIBS=$ac_check_lib_save_LIBS
18742 fi
18743 echo "$as_me:18743: result: $ac_cv_lib_systre_regcomp" >&5
18744 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18745 if test "$ac_cv_lib_systre_regcomp" = yes; then
18746
18747                 echo "$as_me:18747: checking for libiconv_open in -liconv" >&5
18748 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18749 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18750   echo $ECHO_N "(cached) $ECHO_C" >&6
18751 else
18752   ac_check_lib_save_LIBS=$LIBS
18753 LIBS="-liconv  $LIBS"
18754 cat >"conftest.$ac_ext" <<_ACEOF
18755 #line 18755 "configure"
18756 #include "confdefs.h"
18757
18758 /* Override any gcc2 internal prototype to avoid an error.  */
18759 #ifdef __cplusplus
18760 extern "C"
18761 #endif
18762 /* We use char because int might match the return type of a gcc2
18763    builtin and then its argument prototype would still apply.  */
18764 char libiconv_open ();
18765 int
18766 main (void)
18767 {
18768 libiconv_open ();
18769   ;
18770   return 0;
18771 }
18772 _ACEOF
18773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18774 if { (eval echo "$as_me:18774: \"$ac_link\"") >&5
18775   (eval $ac_link) 2>&5
18776   ac_status=$?
18777   echo "$as_me:18777: \$? = $ac_status" >&5
18778   (exit "$ac_status"); } &&
18779          { ac_try='test -s "conftest$ac_exeext"'
18780   { (eval echo "$as_me:18780: \"$ac_try\"") >&5
18781   (eval $ac_try) 2>&5
18782   ac_status=$?
18783   echo "$as_me:18783: \$? = $ac_status" >&5
18784   (exit "$ac_status"); }; }; then
18785   ac_cv_lib_iconv_libiconv_open=yes
18786 else
18787   echo "$as_me: failed program was:" >&5
18788 cat "conftest.$ac_ext" >&5
18789 ac_cv_lib_iconv_libiconv_open=no
18790 fi
18791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18792 LIBS=$ac_check_lib_save_LIBS
18793 fi
18794 echo "$as_me:18794: result: $ac_cv_lib_iconv_libiconv_open" >&5
18795 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18796 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18797
18798 cf_add_libs="$LIBS"
18799 # reverse order
18800 cf_add_0lib=
18801 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18802 # filter duplicates
18803 for cf_add_1lib in $cf_add_0lib; do
18804         for cf_add_2lib in $cf_add_libs; do
18805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18806                         cf_add_1lib=
18807                         break
18808                 fi
18809         done
18810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18811 done
18812 LIBS="$cf_add_libs"
18813
18814 fi
18815
18816                 echo "$as_me:18816: checking for libintl_gettext in -lintl" >&5
18817 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18818 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18819   echo $ECHO_N "(cached) $ECHO_C" >&6
18820 else
18821   ac_check_lib_save_LIBS=$LIBS
18822 LIBS="-lintl  $LIBS"
18823 cat >"conftest.$ac_ext" <<_ACEOF
18824 #line 18824 "configure"
18825 #include "confdefs.h"
18826
18827 /* Override any gcc2 internal prototype to avoid an error.  */
18828 #ifdef __cplusplus
18829 extern "C"
18830 #endif
18831 /* We use char because int might match the return type of a gcc2
18832    builtin and then its argument prototype would still apply.  */
18833 char libintl_gettext ();
18834 int
18835 main (void)
18836 {
18837 libintl_gettext ();
18838   ;
18839   return 0;
18840 }
18841 _ACEOF
18842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18843 if { (eval echo "$as_me:18843: \"$ac_link\"") >&5
18844   (eval $ac_link) 2>&5
18845   ac_status=$?
18846   echo "$as_me:18846: \$? = $ac_status" >&5
18847   (exit "$ac_status"); } &&
18848          { ac_try='test -s "conftest$ac_exeext"'
18849   { (eval echo "$as_me:18849: \"$ac_try\"") >&5
18850   (eval $ac_try) 2>&5
18851   ac_status=$?
18852   echo "$as_me:18852: \$? = $ac_status" >&5
18853   (exit "$ac_status"); }; }; then
18854   ac_cv_lib_intl_libintl_gettext=yes
18855 else
18856   echo "$as_me: failed program was:" >&5
18857 cat "conftest.$ac_ext" >&5
18858 ac_cv_lib_intl_libintl_gettext=no
18859 fi
18860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18861 LIBS=$ac_check_lib_save_LIBS
18862 fi
18863 echo "$as_me:18863: result: $ac_cv_lib_intl_libintl_gettext" >&5
18864 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18865 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
18866
18867 cf_add_libs="$LIBS"
18868 # reverse order
18869 cf_add_0lib=
18870 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18871 # filter duplicates
18872 for cf_add_1lib in $cf_add_0lib; do
18873         for cf_add_2lib in $cf_add_libs; do
18874                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18875                         cf_add_1lib=
18876                         break
18877                 fi
18878         done
18879         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18880 done
18881 LIBS="$cf_add_libs"
18882
18883 fi
18884
18885                 echo "$as_me:18885: checking for tre_regcomp in -ltre" >&5
18886 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18887 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18888   echo $ECHO_N "(cached) $ECHO_C" >&6
18889 else
18890   ac_check_lib_save_LIBS=$LIBS
18891 LIBS="-ltre  $LIBS"
18892 cat >"conftest.$ac_ext" <<_ACEOF
18893 #line 18893 "configure"
18894 #include "confdefs.h"
18895
18896 /* Override any gcc2 internal prototype to avoid an error.  */
18897 #ifdef __cplusplus
18898 extern "C"
18899 #endif
18900 /* We use char because int might match the return type of a gcc2
18901    builtin and then its argument prototype would still apply.  */
18902 char tre_regcomp ();
18903 int
18904 main (void)
18905 {
18906 tre_regcomp ();
18907   ;
18908   return 0;
18909 }
18910 _ACEOF
18911 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18912 if { (eval echo "$as_me:18912: \"$ac_link\"") >&5
18913   (eval $ac_link) 2>&5
18914   ac_status=$?
18915   echo "$as_me:18915: \$? = $ac_status" >&5
18916   (exit "$ac_status"); } &&
18917          { ac_try='test -s "conftest$ac_exeext"'
18918   { (eval echo "$as_me:18918: \"$ac_try\"") >&5
18919   (eval $ac_try) 2>&5
18920   ac_status=$?
18921   echo "$as_me:18921: \$? = $ac_status" >&5
18922   (exit "$ac_status"); }; }; then
18923   ac_cv_lib_tre_tre_regcomp=yes
18924 else
18925   echo "$as_me: failed program was:" >&5
18926 cat "conftest.$ac_ext" >&5
18927 ac_cv_lib_tre_tre_regcomp=no
18928 fi
18929 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18930 LIBS=$ac_check_lib_save_LIBS
18931 fi
18932 echo "$as_me:18932: result: $ac_cv_lib_tre_tre_regcomp" >&5
18933 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
18934 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
18935
18936 cf_add_libs="$LIBS"
18937 # reverse order
18938 cf_add_0lib=
18939 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18940 # filter duplicates
18941 for cf_add_1lib in $cf_add_0lib; do
18942         for cf_add_2lib in $cf_add_libs; do
18943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18944                         cf_add_1lib=
18945                         break
18946                 fi
18947         done
18948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18949 done
18950 LIBS="$cf_add_libs"
18951
18952 fi
18953
18954 cf_add_libs="$LIBS"
18955 # reverse order
18956 cf_add_0lib=
18957 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18958 # filter duplicates
18959 for cf_add_1lib in $cf_add_0lib; do
18960         for cf_add_2lib in $cf_add_libs; do
18961                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18962                         cf_add_1lib=
18963                         break
18964                 fi
18965         done
18966         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18967 done
18968 LIBS="$cf_add_libs"
18969
18970                 cf_regex_func=regcomp
18971
18972 else
18973
18974                 echo "$as_me:18974: checking for regcomp in -lgnurx" >&5
18975 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
18976 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
18977   echo $ECHO_N "(cached) $ECHO_C" >&6
18978 else
18979   ac_check_lib_save_LIBS=$LIBS
18980 LIBS="-lgnurx  $LIBS"
18981 cat >"conftest.$ac_ext" <<_ACEOF
18982 #line 18982 "configure"
18983 #include "confdefs.h"
18984
18985 /* Override any gcc2 internal prototype to avoid an error.  */
18986 #ifdef __cplusplus
18987 extern "C"
18988 #endif
18989 /* We use char because int might match the return type of a gcc2
18990    builtin and then its argument prototype would still apply.  */
18991 char regcomp ();
18992 int
18993 main (void)
18994 {
18995 regcomp ();
18996   ;
18997   return 0;
18998 }
18999 _ACEOF
19000 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19001 if { (eval echo "$as_me:19001: \"$ac_link\"") >&5
19002   (eval $ac_link) 2>&5
19003   ac_status=$?
19004   echo "$as_me:19004: \$? = $ac_status" >&5
19005   (exit "$ac_status"); } &&
19006          { ac_try='test -s "conftest$ac_exeext"'
19007   { (eval echo "$as_me:19007: \"$ac_try\"") >&5
19008   (eval $ac_try) 2>&5
19009   ac_status=$?
19010   echo "$as_me:19010: \$? = $ac_status" >&5
19011   (exit "$ac_status"); }; }; then
19012   ac_cv_lib_gnurx_regcomp=yes
19013 else
19014   echo "$as_me: failed program was:" >&5
19015 cat "conftest.$ac_ext" >&5
19016 ac_cv_lib_gnurx_regcomp=no
19017 fi
19018 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19019 LIBS=$ac_check_lib_save_LIBS
19020 fi
19021 echo "$as_me:19021: result: $ac_cv_lib_gnurx_regcomp" >&5
19022 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19023 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19024
19025 cf_add_libs="$LIBS"
19026 # reverse order
19027 cf_add_0lib=
19028 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19029 # filter duplicates
19030 for cf_add_1lib in $cf_add_0lib; do
19031         for cf_add_2lib in $cf_add_libs; do
19032                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19033                         cf_add_1lib=
19034                         break
19035                 fi
19036         done
19037         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19038 done
19039 LIBS="$cf_add_libs"
19040
19041                         cf_regex_func=regcomp
19042 fi
19043
19044 fi
19045
19046         ;;
19047 (*)
19048         cf_regex_libs="regex re"
19049         echo "$as_me:19049: checking for regcomp" >&5
19050 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19051 if test "${ac_cv_func_regcomp+set}" = set; then
19052   echo $ECHO_N "(cached) $ECHO_C" >&6
19053 else
19054   cat >"conftest.$ac_ext" <<_ACEOF
19055 #line 19055 "configure"
19056 #include "confdefs.h"
19057 #define regcomp autoconf_temporary
19058 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19059 #undef regcomp
19060
19061 #ifdef __cplusplus
19062 extern "C"
19063 #endif
19064
19065 /* We use char because int might match the return type of a gcc2
19066    builtin and then its argument prototype would still apply.  */
19067 char regcomp (void);
19068
19069 int
19070 main (void)
19071 {
19072
19073 /* The GNU C library defines stubs for functions which it implements
19074     to always fail with ENOSYS.  Some functions are actually named
19075     something starting with __ and the normal name is an alias.  */
19076 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19077 #error found stub for regcomp
19078 #endif
19079
19080         return regcomp ();
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19086 if { (eval echo "$as_me:19086: \"$ac_link\"") >&5
19087   (eval $ac_link) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit "$ac_status"); } &&
19091          { ac_try='test -s "conftest$ac_exeext"'
19092   { (eval echo "$as_me:19092: \"$ac_try\"") >&5
19093   (eval $ac_try) 2>&5
19094   ac_status=$?
19095   echo "$as_me:19095: \$? = $ac_status" >&5
19096   (exit "$ac_status"); }; }; then
19097   ac_cv_func_regcomp=yes
19098 else
19099   echo "$as_me: failed program was:" >&5
19100 cat "conftest.$ac_ext" >&5
19101 ac_cv_func_regcomp=no
19102 fi
19103 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19104 fi
19105 echo "$as_me:19105: result: $ac_cv_func_regcomp" >&5
19106 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19107 if test "$ac_cv_func_regcomp" = yes; then
19108   cf_regex_func=regcomp
19109 else
19110
19111                 for cf_regex_lib in $cf_regex_libs
19112                 do
19113                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19114 echo "$as_me:19114: checking for regcomp in -l$cf_regex_lib" >&5
19115 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19116 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19117   echo $ECHO_N "(cached) $ECHO_C" >&6
19118 else
19119   ac_check_lib_save_LIBS=$LIBS
19120 LIBS="-l$cf_regex_lib  $LIBS"
19121 cat >"conftest.$ac_ext" <<_ACEOF
19122 #line 19122 "configure"
19123 #include "confdefs.h"
19124
19125 /* Override any gcc2 internal prototype to avoid an error.  */
19126 #ifdef __cplusplus
19127 extern "C"
19128 #endif
19129 /* We use char because int might match the return type of a gcc2
19130    builtin and then its argument prototype would still apply.  */
19131 char regcomp ();
19132 int
19133 main (void)
19134 {
19135 regcomp ();
19136   ;
19137   return 0;
19138 }
19139 _ACEOF
19140 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19141 if { (eval echo "$as_me:19141: \"$ac_link\"") >&5
19142   (eval $ac_link) 2>&5
19143   ac_status=$?
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit "$ac_status"); } &&
19146          { ac_try='test -s "conftest$ac_exeext"'
19147   { (eval echo "$as_me:19147: \"$ac_try\"") >&5
19148   (eval $ac_try) 2>&5
19149   ac_status=$?
19150   echo "$as_me:19150: \$? = $ac_status" >&5
19151   (exit "$ac_status"); }; }; then
19152   eval "$as_ac_Lib=yes"
19153 else
19154   echo "$as_me: failed program was:" >&5
19155 cat "conftest.$ac_ext" >&5
19156 eval "$as_ac_Lib=no"
19157 fi
19158 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19159 LIBS=$ac_check_lib_save_LIBS
19160 fi
19161 echo "$as_me:19161: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19162 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19163 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19164
19165 cf_add_libs="$LIBS"
19166 # reverse order
19167 cf_add_0lib=
19168 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19169 # filter duplicates
19170 for cf_add_1lib in $cf_add_0lib; do
19171         for cf_add_2lib in $cf_add_libs; do
19172                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19173                         cf_add_1lib=
19174                         break
19175                 fi
19176         done
19177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19178 done
19179 LIBS="$cf_add_libs"
19180
19181                                         cf_regex_func=regcomp
19182                                         break
19183 fi
19184
19185                 done
19186
19187 fi
19188
19189         ;;
19190 esac
19191
19192 if test "$cf_regex_func" = no ; then
19193         echo "$as_me:19193: checking for compile" >&5
19194 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19195 if test "${ac_cv_func_compile+set}" = set; then
19196   echo $ECHO_N "(cached) $ECHO_C" >&6
19197 else
19198   cat >"conftest.$ac_ext" <<_ACEOF
19199 #line 19199 "configure"
19200 #include "confdefs.h"
19201 #define compile autoconf_temporary
19202 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19203 #undef compile
19204
19205 #ifdef __cplusplus
19206 extern "C"
19207 #endif
19208
19209 /* We use char because int might match the return type of a gcc2
19210    builtin and then its argument prototype would still apply.  */
19211 char compile (void);
19212
19213 int
19214 main (void)
19215 {
19216
19217 /* The GNU C library defines stubs for functions which it implements
19218     to always fail with ENOSYS.  Some functions are actually named
19219     something starting with __ and the normal name is an alias.  */
19220 #if defined (__stub_compile) || defined (__stub___compile)
19221 #error found stub for compile
19222 #endif
19223
19224         return compile ();
19225   ;
19226   return 0;
19227 }
19228 _ACEOF
19229 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19230 if { (eval echo "$as_me:19230: \"$ac_link\"") >&5
19231   (eval $ac_link) 2>&5
19232   ac_status=$?
19233   echo "$as_me:19233: \$? = $ac_status" >&5
19234   (exit "$ac_status"); } &&
19235          { ac_try='test -s "conftest$ac_exeext"'
19236   { (eval echo "$as_me:19236: \"$ac_try\"") >&5
19237   (eval $ac_try) 2>&5
19238   ac_status=$?
19239   echo "$as_me:19239: \$? = $ac_status" >&5
19240   (exit "$ac_status"); }; }; then
19241   ac_cv_func_compile=yes
19242 else
19243   echo "$as_me: failed program was:" >&5
19244 cat "conftest.$ac_ext" >&5
19245 ac_cv_func_compile=no
19246 fi
19247 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19248 fi
19249 echo "$as_me:19249: result: $ac_cv_func_compile" >&5
19250 echo "${ECHO_T}$ac_cv_func_compile" >&6
19251 if test "$ac_cv_func_compile" = yes; then
19252   cf_regex_func=compile
19253 else
19254
19255                 echo "$as_me:19255: checking for compile in -lgen" >&5
19256 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19257 if test "${ac_cv_lib_gen_compile+set}" = set; then
19258   echo $ECHO_N "(cached) $ECHO_C" >&6
19259 else
19260   ac_check_lib_save_LIBS=$LIBS
19261 LIBS="-lgen  $LIBS"
19262 cat >"conftest.$ac_ext" <<_ACEOF
19263 #line 19263 "configure"
19264 #include "confdefs.h"
19265
19266 /* Override any gcc2 internal prototype to avoid an error.  */
19267 #ifdef __cplusplus
19268 extern "C"
19269 #endif
19270 /* We use char because int might match the return type of a gcc2
19271    builtin and then its argument prototype would still apply.  */
19272 char compile ();
19273 int
19274 main (void)
19275 {
19276 compile ();
19277   ;
19278   return 0;
19279 }
19280 _ACEOF
19281 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19282 if { (eval echo "$as_me:19282: \"$ac_link\"") >&5
19283   (eval $ac_link) 2>&5
19284   ac_status=$?
19285   echo "$as_me:19285: \$? = $ac_status" >&5
19286   (exit "$ac_status"); } &&
19287          { ac_try='test -s "conftest$ac_exeext"'
19288   { (eval echo "$as_me:19288: \"$ac_try\"") >&5
19289   (eval $ac_try) 2>&5
19290   ac_status=$?
19291   echo "$as_me:19291: \$? = $ac_status" >&5
19292   (exit "$ac_status"); }; }; then
19293   ac_cv_lib_gen_compile=yes
19294 else
19295   echo "$as_me: failed program was:" >&5
19296 cat "conftest.$ac_ext" >&5
19297 ac_cv_lib_gen_compile=no
19298 fi
19299 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19300 LIBS=$ac_check_lib_save_LIBS
19301 fi
19302 echo "$as_me:19302: result: $ac_cv_lib_gen_compile" >&5
19303 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19304 if test "$ac_cv_lib_gen_compile" = yes; then
19305
19306 cf_add_libs="$LIBS"
19307 # reverse order
19308 cf_add_0lib=
19309 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19310 # filter duplicates
19311 for cf_add_1lib in $cf_add_0lib; do
19312         for cf_add_2lib in $cf_add_libs; do
19313                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19314                         cf_add_1lib=
19315                         break
19316                 fi
19317         done
19318         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19319 done
19320 LIBS="$cf_add_libs"
19321
19322                                 cf_regex_func=compile
19323 fi
19324
19325 fi
19326
19327 fi
19328
19329 if test "$cf_regex_func" = no ; then
19330         { echo "$as_me:19330: WARNING: cannot find regular expression library" >&5
19331 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19332 fi
19333
19334 echo "$as_me:19334: checking for regular-expression headers" >&5
19335 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19336 if test "${cf_cv_regex_hdrs+set}" = set; then
19337   echo $ECHO_N "(cached) $ECHO_C" >&6
19338 else
19339
19340 cf_cv_regex_hdrs=no
19341 case "$cf_regex_func" in
19342 (compile)
19343         for cf_regex_hdr in regexp.h regexpr.h
19344         do
19345                 cat >"conftest.$ac_ext" <<_ACEOF
19346 #line 19346 "configure"
19347 #include "confdefs.h"
19348 #include <$cf_regex_hdr>
19349 int
19350 main (void)
19351 {
19352
19353                         char *p = compile("", "", "", 0);
19354                         int x = step("", "");
19355                         (void)p;
19356                         (void)x;
19357
19358   ;
19359   return 0;
19360 }
19361 _ACEOF
19362 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19363 if { (eval echo "$as_me:19363: \"$ac_link\"") >&5
19364   (eval $ac_link) 2>&5
19365   ac_status=$?
19366   echo "$as_me:19366: \$? = $ac_status" >&5
19367   (exit "$ac_status"); } &&
19368          { ac_try='test -s "conftest$ac_exeext"'
19369   { (eval echo "$as_me:19369: \"$ac_try\"") >&5
19370   (eval $ac_try) 2>&5
19371   ac_status=$?
19372   echo "$as_me:19372: \$? = $ac_status" >&5
19373   (exit "$ac_status"); }; }; then
19374
19375                         cf_cv_regex_hdrs=$cf_regex_hdr
19376                         break
19377
19378 else
19379   echo "$as_me: failed program was:" >&5
19380 cat "conftest.$ac_ext" >&5
19381 fi
19382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19383         done
19384         ;;
19385 (*)
19386         for cf_regex_hdr in regex.h
19387         do
19388                 cat >"conftest.$ac_ext" <<_ACEOF
19389 #line 19389 "configure"
19390 #include "confdefs.h"
19391 #include <sys/types.h>
19392 #include <$cf_regex_hdr>
19393 int
19394 main (void)
19395 {
19396
19397                         regex_t *p = 0;
19398                         int x = regcomp(p, "", 0);
19399                         int y = regexec(p, "", 0, 0, 0);
19400                         (void)x;
19401                         (void)y;
19402                         regfree(p);
19403
19404   ;
19405   return 0;
19406 }
19407 _ACEOF
19408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19409 if { (eval echo "$as_me:19409: \"$ac_link\"") >&5
19410   (eval $ac_link) 2>&5
19411   ac_status=$?
19412   echo "$as_me:19412: \$? = $ac_status" >&5
19413   (exit "$ac_status"); } &&
19414          { ac_try='test -s "conftest$ac_exeext"'
19415   { (eval echo "$as_me:19415: \"$ac_try\"") >&5
19416   (eval $ac_try) 2>&5
19417   ac_status=$?
19418   echo "$as_me:19418: \$? = $ac_status" >&5
19419   (exit "$ac_status"); }; }; then
19420
19421                         cf_cv_regex_hdrs=$cf_regex_hdr
19422                         break
19423
19424 else
19425   echo "$as_me: failed program was:" >&5
19426 cat "conftest.$ac_ext" >&5
19427 fi
19428 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19429         done
19430         ;;
19431 esac
19432
19433 fi
19434 echo "$as_me:19434: result: $cf_cv_regex_hdrs" >&5
19435 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19436
19437 case "$cf_cv_regex_hdrs" in
19438         (no)            { echo "$as_me:19438: WARNING: no regular expression header found" >&5
19439 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19440         (regex.h)
19441 cat >>confdefs.h <<\EOF
19442 #define HAVE_REGEX_H_FUNCS 1
19443 EOF
19444  ;;
19445         (regexp.h)
19446 cat >>confdefs.h <<\EOF
19447 #define HAVE_REGEXP_H_FUNCS 1
19448 EOF
19449  ;;
19450         (regexpr.h)
19451 cat >>confdefs.h <<\EOF
19452 #define HAVE_REGEXPR_H_FUNCS 1
19453 EOF
19454  ;;
19455 esac
19456
19457 for ac_header in \
19458 fcntl.h \
19459 getopt.h \
19460 limits.h \
19461 locale.h \
19462 math.h \
19463 poll.h \
19464 sys/ioctl.h \
19465 sys/param.h \
19466 sys/poll.h \
19467 sys/select.h \
19468 sys/time.h \
19469 sys/times.h \
19470 ttyent.h \
19471 unistd.h \
19472 wctype.h \
19473
19474 do
19475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19476 echo "$as_me:19476: checking for $ac_header" >&5
19477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19479   echo $ECHO_N "(cached) $ECHO_C" >&6
19480 else
19481   cat >"conftest.$ac_ext" <<_ACEOF
19482 #line 19482 "configure"
19483 #include "confdefs.h"
19484 #include <$ac_header>
19485 _ACEOF
19486 if { (eval echo "$as_me:19486: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19487   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19488   ac_status=$?
19489   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19490   rm -f conftest.er1
19491   cat conftest.err >&5
19492   echo "$as_me:19492: \$? = $ac_status" >&5
19493   (exit "$ac_status"); } >/dev/null; then
19494   if test -s conftest.err; then
19495     ac_cpp_err=$ac_c_preproc_warn_flag
19496   else
19497     ac_cpp_err=
19498   fi
19499 else
19500   ac_cpp_err=yes
19501 fi
19502 if test -z "$ac_cpp_err"; then
19503   eval "$as_ac_Header=yes"
19504 else
19505   echo "$as_me: failed program was:" >&5
19506   cat "conftest.$ac_ext" >&5
19507   eval "$as_ac_Header=no"
19508 fi
19509 rm -f conftest.err "conftest.$ac_ext"
19510 fi
19511 echo "$as_me:19511: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19512 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19513 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19514   cat >>confdefs.h <<EOF
19515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19516 EOF
19517
19518 fi
19519 done
19520
19521 for ac_header in unistd.h getopt.h
19522 do
19523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19524 echo "$as_me:19524: checking for $ac_header" >&5
19525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19526 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19527   echo $ECHO_N "(cached) $ECHO_C" >&6
19528 else
19529   cat >"conftest.$ac_ext" <<_ACEOF
19530 #line 19530 "configure"
19531 #include "confdefs.h"
19532 #include <$ac_header>
19533 _ACEOF
19534 if { (eval echo "$as_me:19534: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19535   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19536   ac_status=$?
19537   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19538   rm -f conftest.er1
19539   cat conftest.err >&5
19540   echo "$as_me:19540: \$? = $ac_status" >&5
19541   (exit "$ac_status"); } >/dev/null; then
19542   if test -s conftest.err; then
19543     ac_cpp_err=$ac_c_preproc_warn_flag
19544   else
19545     ac_cpp_err=
19546   fi
19547 else
19548   ac_cpp_err=yes
19549 fi
19550 if test -z "$ac_cpp_err"; then
19551   eval "$as_ac_Header=yes"
19552 else
19553   echo "$as_me: failed program was:" >&5
19554   cat "conftest.$ac_ext" >&5
19555   eval "$as_ac_Header=no"
19556 fi
19557 rm -f conftest.err "conftest.$ac_ext"
19558 fi
19559 echo "$as_me:19559: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19560 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19561 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19562   cat >>confdefs.h <<EOF
19563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19564 EOF
19565
19566 fi
19567 done
19568
19569 echo "$as_me:19569: checking for header declaring getopt variables" >&5
19570 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19571 if test "${cf_cv_getopt_header+set}" = set; then
19572   echo $ECHO_N "(cached) $ECHO_C" >&6
19573 else
19574
19575 cf_cv_getopt_header=none
19576 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19577 do
19578 cat >"conftest.$ac_ext" <<_ACEOF
19579 #line 19579 "configure"
19580 #include "confdefs.h"
19581
19582 #include <$cf_header>
19583 int
19584 main (void)
19585 {
19586 int x = optind; char *y = optarg
19587   ;
19588   return 0;
19589 }
19590 _ACEOF
19591 rm -f "conftest.$ac_objext"
19592 if { (eval echo "$as_me:19592: \"$ac_compile\"") >&5
19593   (eval $ac_compile) 2>&5
19594   ac_status=$?
19595   echo "$as_me:19595: \$? = $ac_status" >&5
19596   (exit "$ac_status"); } &&
19597          { ac_try='test -s "conftest.$ac_objext"'
19598   { (eval echo "$as_me:19598: \"$ac_try\"") >&5
19599   (eval $ac_try) 2>&5
19600   ac_status=$?
19601   echo "$as_me:19601: \$? = $ac_status" >&5
19602   (exit "$ac_status"); }; }; then
19603   cf_cv_getopt_header=$cf_header
19604  break
19605 else
19606   echo "$as_me: failed program was:" >&5
19607 cat "conftest.$ac_ext" >&5
19608 fi
19609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19610 done
19611
19612 fi
19613 echo "$as_me:19613: result: $cf_cv_getopt_header" >&5
19614 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19615 if test "$cf_cv_getopt_header" != none ; then
19616
19617 cat >>confdefs.h <<\EOF
19618 #define HAVE_GETOPT_HEADER 1
19619 EOF
19620
19621 fi
19622 if test "$cf_cv_getopt_header" = getopt.h ; then
19623
19624 cat >>confdefs.h <<\EOF
19625 #define NEED_GETOPT_H 1
19626 EOF
19627
19628 fi
19629
19630 echo "$as_me:19630: checking if external environ is declared" >&5
19631 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19632 if test "${cf_cv_dcl_environ+set}" = set; then
19633   echo $ECHO_N "(cached) $ECHO_C" >&6
19634 else
19635
19636     cat >"conftest.$ac_ext" <<_ACEOF
19637 #line 19637 "configure"
19638 #include "confdefs.h"
19639
19640 #ifdef HAVE_STDLIB_H
19641 #include <stdlib.h>
19642 #endif
19643 #include <unistd.h>
19644 int
19645 main (void)
19646 {
19647 int x = (int) environ
19648   ;
19649   return 0;
19650 }
19651 _ACEOF
19652 rm -f "conftest.$ac_objext"
19653 if { (eval echo "$as_me:19653: \"$ac_compile\"") >&5
19654   (eval $ac_compile) 2>&5
19655   ac_status=$?
19656   echo "$as_me:19656: \$? = $ac_status" >&5
19657   (exit "$ac_status"); } &&
19658          { ac_try='test -s "conftest.$ac_objext"'
19659   { (eval echo "$as_me:19659: \"$ac_try\"") >&5
19660   (eval $ac_try) 2>&5
19661   ac_status=$?
19662   echo "$as_me:19662: \$? = $ac_status" >&5
19663   (exit "$ac_status"); }; }; then
19664   cf_cv_dcl_environ=yes
19665 else
19666   echo "$as_me: failed program was:" >&5
19667 cat "conftest.$ac_ext" >&5
19668 cf_cv_dcl_environ=no
19669 fi
19670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19671
19672 fi
19673 echo "$as_me:19673: result: $cf_cv_dcl_environ" >&5
19674 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19675
19676 if test "$cf_cv_dcl_environ" = no ; then
19677
19678 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19679
19680     cat >>confdefs.h <<EOF
19681 #define $cf_result 1
19682 EOF
19683
19684 fi
19685
19686 # It's possible (for near-UNIX clones) that the data doesn't exist
19687
19688 echo "$as_me:19688: checking if external environ exists" >&5
19689 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19690 if test "${cf_cv_have_environ+set}" = set; then
19691   echo $ECHO_N "(cached) $ECHO_C" >&6
19692 else
19693
19694         cat >"conftest.$ac_ext" <<_ACEOF
19695 #line 19695 "configure"
19696 #include "confdefs.h"
19697
19698 #undef environ
19699 extern int environ;
19700
19701 int
19702 main (void)
19703 {
19704 environ = 2
19705   ;
19706   return 0;
19707 }
19708 _ACEOF
19709 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19710 if { (eval echo "$as_me:19710: \"$ac_link\"") >&5
19711   (eval $ac_link) 2>&5
19712   ac_status=$?
19713   echo "$as_me:19713: \$? = $ac_status" >&5
19714   (exit "$ac_status"); } &&
19715          { ac_try='test -s "conftest$ac_exeext"'
19716   { (eval echo "$as_me:19716: \"$ac_try\"") >&5
19717   (eval $ac_try) 2>&5
19718   ac_status=$?
19719   echo "$as_me:19719: \$? = $ac_status" >&5
19720   (exit "$ac_status"); }; }; then
19721   cf_cv_have_environ=yes
19722 else
19723   echo "$as_me: failed program was:" >&5
19724 cat "conftest.$ac_ext" >&5
19725 cf_cv_have_environ=no
19726 fi
19727 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19728
19729 fi
19730 echo "$as_me:19730: result: $cf_cv_have_environ" >&5
19731 echo "${ECHO_T}$cf_cv_have_environ" >&6
19732
19733 if test "$cf_cv_have_environ" = yes ; then
19734
19735 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19736
19737         cat >>confdefs.h <<EOF
19738 #define $cf_result 1
19739 EOF
19740
19741 fi
19742
19743 echo "$as_me:19743: checking for getenv" >&5
19744 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19745 if test "${ac_cv_func_getenv+set}" = set; then
19746   echo $ECHO_N "(cached) $ECHO_C" >&6
19747 else
19748   cat >"conftest.$ac_ext" <<_ACEOF
19749 #line 19749 "configure"
19750 #include "confdefs.h"
19751 #define getenv autoconf_temporary
19752 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19753 #undef getenv
19754
19755 #ifdef __cplusplus
19756 extern "C"
19757 #endif
19758
19759 /* We use char because int might match the return type of a gcc2
19760    builtin and then its argument prototype would still apply.  */
19761 char getenv (void);
19762
19763 int
19764 main (void)
19765 {
19766
19767 /* The GNU C library defines stubs for functions which it implements
19768     to always fail with ENOSYS.  Some functions are actually named
19769     something starting with __ and the normal name is an alias.  */
19770 #if defined (__stub_getenv) || defined (__stub___getenv)
19771 #error found stub for getenv
19772 #endif
19773
19774         return getenv ();
19775   ;
19776   return 0;
19777 }
19778 _ACEOF
19779 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19780 if { (eval echo "$as_me:19780: \"$ac_link\"") >&5
19781   (eval $ac_link) 2>&5
19782   ac_status=$?
19783   echo "$as_me:19783: \$? = $ac_status" >&5
19784   (exit "$ac_status"); } &&
19785          { ac_try='test -s "conftest$ac_exeext"'
19786   { (eval echo "$as_me:19786: \"$ac_try\"") >&5
19787   (eval $ac_try) 2>&5
19788   ac_status=$?
19789   echo "$as_me:19789: \$? = $ac_status" >&5
19790   (exit "$ac_status"); }; }; then
19791   ac_cv_func_getenv=yes
19792 else
19793   echo "$as_me: failed program was:" >&5
19794 cat "conftest.$ac_ext" >&5
19795 ac_cv_func_getenv=no
19796 fi
19797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19798 fi
19799 echo "$as_me:19799: result: $ac_cv_func_getenv" >&5
19800 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19801
19802 for ac_func in putenv setenv strdup
19803 do
19804 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19805 echo "$as_me:19805: checking for $ac_func" >&5
19806 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19807 if eval "test \"\${$as_ac_var+set}\" = set"; then
19808   echo $ECHO_N "(cached) $ECHO_C" >&6
19809 else
19810   cat >"conftest.$ac_ext" <<_ACEOF
19811 #line 19811 "configure"
19812 #include "confdefs.h"
19813 #define $ac_func autoconf_temporary
19814 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19815 #undef $ac_func
19816
19817 #ifdef __cplusplus
19818 extern "C"
19819 #endif
19820
19821 /* We use char because int might match the return type of a gcc2
19822    builtin and then its argument prototype would still apply.  */
19823 char $ac_func (void);
19824
19825 int
19826 main (void)
19827 {
19828
19829 /* The GNU C library defines stubs for functions which it implements
19830     to always fail with ENOSYS.  Some functions are actually named
19831     something starting with __ and the normal name is an alias.  */
19832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19833 #error found stub for $ac_func
19834 #endif
19835
19836         return $ac_func ();
19837   ;
19838   return 0;
19839 }
19840 _ACEOF
19841 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19842 if { (eval echo "$as_me:19842: \"$ac_link\"") >&5
19843   (eval $ac_link) 2>&5
19844   ac_status=$?
19845   echo "$as_me:19845: \$? = $ac_status" >&5
19846   (exit "$ac_status"); } &&
19847          { ac_try='test -s "conftest$ac_exeext"'
19848   { (eval echo "$as_me:19848: \"$ac_try\"") >&5
19849   (eval $ac_try) 2>&5
19850   ac_status=$?
19851   echo "$as_me:19851: \$? = $ac_status" >&5
19852   (exit "$ac_status"); }; }; then
19853   eval "$as_ac_var=yes"
19854 else
19855   echo "$as_me: failed program was:" >&5
19856 cat "conftest.$ac_ext" >&5
19857 eval "$as_ac_var=no"
19858 fi
19859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19860 fi
19861 echo "$as_me:19861: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19862 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19863 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19864   cat >>confdefs.h <<EOF
19865 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19866 EOF
19867
19868 fi
19869 done
19870
19871 echo "$as_me:19871: checking if getenv returns consistent values" >&5
19872 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19873 if test "${cf_cv_consistent_getenv+set}" = set; then
19874   echo $ECHO_N "(cached) $ECHO_C" >&6
19875 else
19876
19877 if test "$cross_compiling" = yes; then
19878   cf_cv_consistent_getenv=unknown
19879 else
19880   cat >"conftest.$ac_ext" <<_ACEOF
19881 #line 19881 "configure"
19882 #include "confdefs.h"
19883
19884 #include <stdlib.h>
19885 #include <unistd.h>
19886 #include <stdio.h>
19887 #include <string.h>
19888 #include <sys/types.h>
19889
19890 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19891 extern char **environ;  /* POSIX, but some systems are not... */
19892 #endif
19893
19894 #if defined(HAVE_STRDUP)
19895 #define str_alloc(s) strdup(s)
19896 #else
19897 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19898 #endif
19899
19900 static void set_value(const char *name, const char *value)
19901 {
19902 #if defined(HAVE_SETENV)
19903         setenv(name, value, 1);
19904 #elif defined(HAVE_PUTENV)
19905         char buffer[1024];
19906         sprintf(buffer, "%s=%s", name, value);
19907         putenv(str_alloc(buffer));
19908 #else
19909 #error neither putenv/setenv found
19910 #endif
19911 }
19912 int main(void)
19913 {
19914         int pass;
19915         size_t numenv, limit, j;
19916         char **mynames;
19917         char **myvalues;
19918         char **mypointer;
19919         char *equals;
19920         for (numenv = 0; environ[numenv]; ++numenv) ;
19921         limit = numenv + 10;
19922         mynames = (char **) calloc(limit + 1, sizeof(char *));
19923         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19924         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19925 #if defined(HAVE_ENVIRON)
19926         for (j = 0; environ[j]; ++j) {
19927                 mynames[j] = str_alloc(environ[j]);
19928                 equals = strchr(mynames[j], '=');
19929                 if (equals != 0) {
19930                         *equals++ = '\\0';
19931                         myvalues[j] = str_alloc(equals);
19932                 } else {
19933                         myvalues[j] = str_alloc("");
19934                 }
19935         }
19936 #endif
19937         for (j = numenv; j < limit; ++j) {
19938                 char name[80];
19939                 char value[80];
19940                 size_t found;
19941                 size_t k = 0;
19942                 do {
19943                         size_t jk;
19944                         found = 0;
19945                         sprintf(name, "TERM%lu", (unsigned long) k);
19946                         for (jk = 0; jk < j; ++jk) {
19947                                 if (!strcmp(name, mynames[jk])) {
19948                                         found = 1;
19949                                         ++k;
19950                                         break;
19951                                 }
19952                         }
19953                 } while (found);
19954                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19955                 set_value(name, value);
19956                 mynames[j] = str_alloc(name);
19957                 myvalues[j] = str_alloc(value);
19958         }
19959         for (pass = 0; pass < 3; ++pass) {
19960                 for (j = 0; j < limit; ++j) {
19961                         char *value = getenv(mynames[j]);
19962                         if (pass) {
19963                                 if (value == 0) {
19964                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
19965                                         ${cf_cv_main_return:-return}(1);
19966                                 } else if (value != mypointer[j]) {
19967                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
19968                                         ${cf_cv_main_return:-return}(1);
19969                                 } else if (strcmp(value, myvalues[j])) {
19970                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
19971                                         ${cf_cv_main_return:-return}(1);
19972                                 }
19973                         } else {
19974                                 size_t k;
19975                                 mypointer[j] = value;
19976                                 for (k = 0; k < j; ++k) {
19977                                         if (mypointer[j] == mypointer[k]) {
19978                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
19979                                                 ${cf_cv_main_return:-return}(1);
19980                                         }
19981                                 }
19982                         }
19983                 }
19984         }
19985         ${cf_cv_main_return:-return}(0);
19986 }
19987
19988 _ACEOF
19989 rm -f "conftest$ac_exeext"
19990 if { (eval echo "$as_me:19990: \"$ac_link\"") >&5
19991   (eval $ac_link) 2>&5
19992   ac_status=$?
19993   echo "$as_me:19993: \$? = $ac_status" >&5
19994   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19995   { (eval echo "$as_me:19995: \"$ac_try\"") >&5
19996   (eval $ac_try) 2>&5
19997   ac_status=$?
19998   echo "$as_me:19998: \$? = $ac_status" >&5
19999   (exit "$ac_status"); }; }; then
20000   cf_cv_consistent_getenv=yes
20001 else
20002   echo "$as_me: program exited with status $ac_status" >&5
20003 echo "$as_me: failed program was:" >&5
20004 cat "conftest.$ac_ext" >&5
20005 cf_cv_consistent_getenv=no
20006 fi
20007 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20008 fi
20009
20010 fi
20011 echo "$as_me:20011: result: $cf_cv_consistent_getenv" >&5
20012 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20013
20014 if test "x$cf_cv_consistent_getenv" = xno
20015 then
20016
20017 cat >>confdefs.h <<\EOF
20018 #define HAVE_CONSISTENT_GETENV 1
20019 EOF
20020
20021 fi
20022
20023 if test "x$cf_cv_consistent_getenv" = xno && \
20024         test "x$cf_with_trace" = xyes
20025 then
20026         { echo "$as_me:20026: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20027 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20028 fi
20029
20030 echo "$as_me:20030: checking if sys/time.h works with sys/select.h" >&5
20031 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20032 if test "${cf_cv_sys_time_select+set}" = set; then
20033   echo $ECHO_N "(cached) $ECHO_C" >&6
20034 else
20035
20036 cat >"conftest.$ac_ext" <<_ACEOF
20037 #line 20037 "configure"
20038 #include "confdefs.h"
20039
20040 #include <sys/types.h>
20041 #ifdef HAVE_SYS_TIME_H
20042 #include <sys/time.h>
20043 #endif
20044 #ifdef HAVE_SYS_SELECT_H
20045 #include <sys/select.h>
20046 #endif
20047
20048 int
20049 main (void)
20050 {
20051
20052   ;
20053   return 0;
20054 }
20055 _ACEOF
20056 rm -f "conftest.$ac_objext"
20057 if { (eval echo "$as_me:20057: \"$ac_compile\"") >&5
20058   (eval $ac_compile) 2>&5
20059   ac_status=$?
20060   echo "$as_me:20060: \$? = $ac_status" >&5
20061   (exit "$ac_status"); } &&
20062          { ac_try='test -s "conftest.$ac_objext"'
20063   { (eval echo "$as_me:20063: \"$ac_try\"") >&5
20064   (eval $ac_try) 2>&5
20065   ac_status=$?
20066   echo "$as_me:20066: \$? = $ac_status" >&5
20067   (exit "$ac_status"); }; }; then
20068   cf_cv_sys_time_select=yes
20069 else
20070   echo "$as_me: failed program was:" >&5
20071 cat "conftest.$ac_ext" >&5
20072 cf_cv_sys_time_select=no
20073 fi
20074 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20075
20076 fi
20077
20078 echo "$as_me:20078: result: $cf_cv_sys_time_select" >&5
20079 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20080 test "$cf_cv_sys_time_select" = yes &&
20081 cat >>confdefs.h <<\EOF
20082 #define HAVE_SYS_TIME_SELECT 1
20083 EOF
20084
20085 ###     checks for compiler characteristics
20086 ac_ext=c
20087 ac_cpp='$CPP $CPPFLAGS'
20088 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20089 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20090 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20091 ac_main_return="return"
20092
20093 echo "$as_me:20093: checking for an ANSI C-conforming const" >&5
20094 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20095 if test "${ac_cv_c_const+set}" = set; then
20096   echo $ECHO_N "(cached) $ECHO_C" >&6
20097 else
20098   cat >"conftest.$ac_ext" <<_ACEOF
20099 #line 20099 "configure"
20100 #include "confdefs.h"
20101
20102 int
20103 main (void)
20104 {
20105 /* FIXME: Include the comments suggested by Paul. */
20106 #ifndef __cplusplus
20107   /* Ultrix mips cc rejects this.  */
20108   typedef int charset[2];
20109   const charset x;
20110   /* SunOS 4.1.1 cc rejects this.  */
20111   char const *const *ccp;
20112   char **p;
20113   /* NEC SVR4.0.2 mips cc rejects this.  */
20114   struct point {int x, y;};
20115   static struct point const zero = {0,0};
20116   /* AIX XL C 1.02.0.0 rejects this.
20117      It does not let you subtract one const X* pointer from another in
20118      an arm of an if-expression whose if-part is not a constant
20119      expression */
20120   const char *g = "string";
20121   ccp = &g + (g ? g-g : 0);
20122   /* HPUX 7.0 cc rejects these. */
20123   ++ccp;
20124   p = (char**) ccp;
20125   ccp = (char const *const *) p;
20126   { /* SCO 3.2v4 cc rejects this.  */
20127     char *t;
20128     char const *s = 0 ? (char *) 0 : (char const *) 0;
20129
20130     *t++ = 0;
20131   }
20132   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20133     int x[] = {25, 17};
20134     const int *foo = &x[0];
20135     ++foo;
20136   }
20137   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20138     typedef const int *iptr;
20139     iptr p = 0;
20140     ++p;
20141   }
20142   { /* AIX XL C 1.02.0.0 rejects this saying
20143        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20144     struct s { int j; const int *ap[3]; };
20145     struct s *b; b->j = 5;
20146   }
20147   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20148     const int foo = 10;
20149   }
20150 #endif
20151
20152   ;
20153   return 0;
20154 }
20155 _ACEOF
20156 rm -f "conftest.$ac_objext"
20157 if { (eval echo "$as_me:20157: \"$ac_compile\"") >&5
20158   (eval $ac_compile) 2>&5
20159   ac_status=$?
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit "$ac_status"); } &&
20162          { ac_try='test -s "conftest.$ac_objext"'
20163   { (eval echo "$as_me:20163: \"$ac_try\"") >&5
20164   (eval $ac_try) 2>&5
20165   ac_status=$?
20166   echo "$as_me:20166: \$? = $ac_status" >&5
20167   (exit "$ac_status"); }; }; then
20168   ac_cv_c_const=yes
20169 else
20170   echo "$as_me: failed program was:" >&5
20171 cat "conftest.$ac_ext" >&5
20172 ac_cv_c_const=no
20173 fi
20174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20175 fi
20176 echo "$as_me:20176: result: $ac_cv_c_const" >&5
20177 echo "${ECHO_T}$ac_cv_c_const" >&6
20178 if test $ac_cv_c_const = no; then
20179
20180 cat >>confdefs.h <<\EOF
20181 #define const
20182 EOF
20183
20184 fi
20185
20186 echo "$as_me:20186: checking for inline" >&5
20187 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20188 if test "${ac_cv_c_inline+set}" = set; then
20189   echo $ECHO_N "(cached) $ECHO_C" >&6
20190 else
20191   ac_cv_c_inline=no
20192 for ac_kw in inline __inline__ __inline; do
20193   cat >"conftest.$ac_ext" <<_ACEOF
20194 #line 20194 "configure"
20195 #include "confdefs.h"
20196 #ifndef __cplusplus
20197 static $ac_kw int static_foo () {return 0; }
20198 $ac_kw int foo () {return 0; }
20199 #endif
20200
20201 _ACEOF
20202 rm -f "conftest.$ac_objext"
20203 if { (eval echo "$as_me:20203: \"$ac_compile\"") >&5
20204   (eval $ac_compile) 2>&5
20205   ac_status=$?
20206   echo "$as_me:20206: \$? = $ac_status" >&5
20207   (exit "$ac_status"); } &&
20208          { ac_try='test -s "conftest.$ac_objext"'
20209   { (eval echo "$as_me:20209: \"$ac_try\"") >&5
20210   (eval $ac_try) 2>&5
20211   ac_status=$?
20212   echo "$as_me:20212: \$? = $ac_status" >&5
20213   (exit "$ac_status"); }; }; then
20214   ac_cv_c_inline=$ac_kw; break
20215 else
20216   echo "$as_me: failed program was:" >&5
20217 cat "conftest.$ac_ext" >&5
20218 fi
20219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20220 done
20221
20222 fi
20223 echo "$as_me:20223: result: $ac_cv_c_inline" >&5
20224 echo "${ECHO_T}$ac_cv_c_inline" >&6
20225 case $ac_cv_c_inline in
20226   inline | yes) ;;
20227   no)
20228 cat >>confdefs.h <<\EOF
20229 #define inline
20230 EOF
20231  ;;
20232   *)  cat >>confdefs.h <<EOF
20233 #define inline $ac_cv_c_inline
20234 EOF
20235  ;;
20236 esac
20237
20238 NCURSES_INLINE=
20239 if test "$ac_cv_c_inline" != no ; then
20240         NCURSES_INLINE=inline
20241         if test "$INTEL_COMPILER" = yes
20242         then
20243                 :
20244         elif test "$CLANG_COMPILER" = yes
20245         then
20246                 :
20247         elif test "$GCC" = yes
20248         then
20249                 echo "$as_me:20249: checking if $CC supports options to tune inlining" >&5
20250 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20251 if test "${cf_cv_gcc_inline+set}" = set; then
20252   echo $ECHO_N "(cached) $ECHO_C" >&6
20253 else
20254
20255                 cf_save_CFLAGS=$CFLAGS
20256                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20257                 cat >"conftest.$ac_ext" <<_ACEOF
20258 #line 20258 "configure"
20259 #include "confdefs.h"
20260 inline int foo(void) { return 1; }
20261 int
20262 main (void)
20263 {
20264 ${cf_cv_main_return:-return} foo()
20265   ;
20266   return 0;
20267 }
20268 _ACEOF
20269 rm -f "conftest.$ac_objext"
20270 if { (eval echo "$as_me:20270: \"$ac_compile\"") >&5
20271   (eval $ac_compile) 2>&5
20272   ac_status=$?
20273   echo "$as_me:20273: \$? = $ac_status" >&5
20274   (exit "$ac_status"); } &&
20275          { ac_try='test -s "conftest.$ac_objext"'
20276   { (eval echo "$as_me:20276: \"$ac_try\"") >&5
20277   (eval $ac_try) 2>&5
20278   ac_status=$?
20279   echo "$as_me:20279: \$? = $ac_status" >&5
20280   (exit "$ac_status"); }; }; then
20281   cf_cv_gcc_inline=yes
20282 else
20283   echo "$as_me: failed program was:" >&5
20284 cat "conftest.$ac_ext" >&5
20285 cf_cv_gcc_inline=no
20286 fi
20287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20288                 CFLAGS=$cf_save_CFLAGS
20289
20290 fi
20291 echo "$as_me:20291: result: $cf_cv_gcc_inline" >&5
20292 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20293                 if test "$cf_cv_gcc_inline" = yes ; then
20294
20295 cf_fix_cppflags=no
20296 cf_new_cflags=
20297 cf_new_cppflags=
20298 cf_new_extra_cppflags=
20299
20300 for cf_add_cflags in --param max-inline-insns-single=1200
20301 do
20302 case "$cf_fix_cppflags" in
20303 (no)
20304         case "$cf_add_cflags" in
20305         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20306                 case "$cf_add_cflags" in
20307                 (-D*)
20308                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20309
20310                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20311                                 && test -z "${cf_tst_cflags}" \
20312                                 && cf_fix_cppflags=yes
20313
20314                         if test "$cf_fix_cppflags" = yes ; then
20315
20316         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20317         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20318
20319                                 continue
20320                         elif test "${cf_tst_cflags}" = "\"'" ; then
20321
20322         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20323         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20324
20325                                 continue
20326                         fi
20327                         ;;
20328                 esac
20329                 case "$CPPFLAGS" in
20330                 (*$cf_add_cflags)
20331                         ;;
20332                 (*)
20333                         case "$cf_add_cflags" in
20334                         (-D*)
20335                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20336
20337 CPPFLAGS=`echo "$CPPFLAGS" | \
20338         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20339                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20340
20341                                 ;;
20342                         esac
20343
20344         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20345         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20346
20347                         ;;
20348                 esac
20349                 ;;
20350         (*)
20351
20352         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20353         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20354
20355                 ;;
20356         esac
20357         ;;
20358 (yes)
20359
20360         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20361         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20362
20363         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20364
20365         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20366                 && test -z "${cf_tst_cflags}" \
20367                 && cf_fix_cppflags=no
20368         ;;
20369 esac
20370 done
20371
20372 if test -n "$cf_new_cflags" ; then
20373
20374         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20375         CFLAGS="${CFLAGS}$cf_new_cflags"
20376
20377 fi
20378
20379 if test -n "$cf_new_cppflags" ; then
20380
20381         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20382         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20383
20384 fi
20385
20386 if test -n "$cf_new_extra_cppflags" ; then
20387
20388         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20389         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20390
20391 fi
20392
20393                 fi
20394         fi
20395 fi
20396
20397 echo "$as_me:20397: checking for signal global datatype" >&5
20398 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20399 if test "${cf_cv_sig_atomic_t+set}" = set; then
20400   echo $ECHO_N "(cached) $ECHO_C" >&6
20401 else
20402
20403         for cf_type in \
20404                 "volatile sig_atomic_t" \
20405                 "sig_atomic_t" \
20406                 "int"
20407         do
20408         cat >"conftest.$ac_ext" <<_ACEOF
20409 #line 20409 "configure"
20410 #include "confdefs.h"
20411
20412 #include <sys/types.h>
20413 #include <signal.h>
20414 #include <stdio.h>
20415
20416 extern $cf_type x;
20417 $cf_type x;
20418 static void handler(int sig)
20419 {
20420         (void)sig;
20421         x = 5;
20422 }
20423 int
20424 main (void)
20425 {
20426 signal(SIGINT, handler);
20427                  x = 1
20428   ;
20429   return 0;
20430 }
20431 _ACEOF
20432 rm -f "conftest.$ac_objext"
20433 if { (eval echo "$as_me:20433: \"$ac_compile\"") >&5
20434   (eval $ac_compile) 2>&5
20435   ac_status=$?
20436   echo "$as_me:20436: \$? = $ac_status" >&5
20437   (exit "$ac_status"); } &&
20438          { ac_try='test -s "conftest.$ac_objext"'
20439   { (eval echo "$as_me:20439: \"$ac_try\"") >&5
20440   (eval $ac_try) 2>&5
20441   ac_status=$?
20442   echo "$as_me:20442: \$? = $ac_status" >&5
20443   (exit "$ac_status"); }; }; then
20444   cf_cv_sig_atomic_t=$cf_type
20445 else
20446   echo "$as_me: failed program was:" >&5
20447 cat "conftest.$ac_ext" >&5
20448 cf_cv_sig_atomic_t=no
20449 fi
20450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20451                 test "$cf_cv_sig_atomic_t" != no && break
20452         done
20453
20454 fi
20455
20456 echo "$as_me:20456: result: $cf_cv_sig_atomic_t" >&5
20457 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20458 test "$cf_cv_sig_atomic_t" != no &&
20459 cat >>confdefs.h <<EOF
20460 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20461 EOF
20462
20463 if test "$NCURSES_CHTYPE" = auto ; then
20464
20465 echo "$as_me:20465: checking for type of chtype" >&5
20466 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20467 if test "${cf_cv_typeof_chtype+set}" = set; then
20468   echo $ECHO_N "(cached) $ECHO_C" >&6
20469 else
20470
20471                 if test "$cross_compiling" = yes; then
20472   cf_cv_typeof_chtype=long
20473 else
20474   cat >"conftest.$ac_ext" <<_ACEOF
20475 #line 20475 "configure"
20476 #include "confdefs.h"
20477
20478 #define WANT_BITS 31
20479 #include <stdio.h>
20480 int main(void)
20481 {
20482         FILE *fp = fopen("cf_test.out", "w");
20483         if (fp != 0) {
20484                 char *result = "long";
20485                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20486                         int n;
20487                         unsigned int x, y;
20488                         for (n = 0; n < WANT_BITS; n++) {
20489                                 x = (1 << n);
20490                                 y = (x >> n);
20491                                 if (y != 1 || x == 0) {
20492                                         x = 0;
20493                                         break;
20494                                 }
20495                         }
20496                         /*
20497                          * If x is nonzero, an int is big enough for the bits
20498                          * that we want.
20499                          */
20500                         result = (x != 0) ? "int" : "long";
20501                 }
20502                 fputs(result, fp);
20503                 fclose(fp);
20504         }
20505         ${cf_cv_main_return:-return}(0);
20506 }
20507
20508 _ACEOF
20509 rm -f "conftest$ac_exeext"
20510 if { (eval echo "$as_me:20510: \"$ac_link\"") >&5
20511   (eval $ac_link) 2>&5
20512   ac_status=$?
20513   echo "$as_me:20513: \$? = $ac_status" >&5
20514   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20515   { (eval echo "$as_me:20515: \"$ac_try\"") >&5
20516   (eval $ac_try) 2>&5
20517   ac_status=$?
20518   echo "$as_me:20518: \$? = $ac_status" >&5
20519   (exit "$ac_status"); }; }; then
20520   cf_cv_typeof_chtype=`cat cf_test.out`
20521 else
20522   echo "$as_me: program exited with status $ac_status" >&5
20523 echo "$as_me: failed program was:" >&5
20524 cat "conftest.$ac_ext" >&5
20525 cf_cv_typeof_chtype=long
20526 fi
20527 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20528 fi
20529                 rm -f cf_test.out
20530
20531 fi
20532
20533 echo "$as_me:20533: result: $cf_cv_typeof_chtype" >&5
20534 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20535
20536 cat >>confdefs.h <<EOF
20537 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20538 EOF
20539
20540 else
20541         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20542 fi
20543 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20544
20545 echo "$as_me:20545: checking if unsigned literals are legal" >&5
20546 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20547 if test "${cf_cv_unsigned_literals+set}" = set; then
20548   echo $ECHO_N "(cached) $ECHO_C" >&6
20549 else
20550
20551         cat >"conftest.$ac_ext" <<_ACEOF
20552 #line 20552 "configure"
20553 #include "confdefs.h"
20554
20555 int
20556 main (void)
20557 {
20558 long x = 1L + 1UL + 1U + 1
20559   ;
20560   return 0;
20561 }
20562 _ACEOF
20563 rm -f "conftest.$ac_objext"
20564 if { (eval echo "$as_me:20564: \"$ac_compile\"") >&5
20565   (eval $ac_compile) 2>&5
20566   ac_status=$?
20567   echo "$as_me:20567: \$? = $ac_status" >&5
20568   (exit "$ac_status"); } &&
20569          { ac_try='test -s "conftest.$ac_objext"'
20570   { (eval echo "$as_me:20570: \"$ac_try\"") >&5
20571   (eval $ac_try) 2>&5
20572   ac_status=$?
20573   echo "$as_me:20573: \$? = $ac_status" >&5
20574   (exit "$ac_status"); }; }; then
20575   cf_cv_unsigned_literals=yes
20576 else
20577   echo "$as_me: failed program was:" >&5
20578 cat "conftest.$ac_ext" >&5
20579 cf_cv_unsigned_literals=no
20580 fi
20581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20582
20583 fi
20584
20585 echo "$as_me:20585: result: $cf_cv_unsigned_literals" >&5
20586 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20587
20588 cf_cv_1UL="1"
20589 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20590 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20591
20592 if test "$NCURSES_MMASK_T" = auto ; then
20593         cf_cv_typeof_mmask_t=long
20594 else
20595         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20596 fi
20597 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20598
20599 ###     Checks for external-data
20600
20601 echo "$as_me:20601: checking if external errno is declared" >&5
20602 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20603 if test "${cf_cv_dcl_errno+set}" = set; then
20604   echo $ECHO_N "(cached) $ECHO_C" >&6
20605 else
20606
20607         cat >"conftest.$ac_ext" <<_ACEOF
20608 #line 20608 "configure"
20609 #include "confdefs.h"
20610
20611 #ifdef HAVE_STDLIB_H
20612 #include <stdlib.h>
20613 #endif
20614 #include <stdio.h>
20615 #include <sys/types.h>
20616 #include <errno.h>
20617 int
20618 main (void)
20619 {
20620 int x = (int) errno; (void)x
20621   ;
20622   return 0;
20623 }
20624 _ACEOF
20625 rm -f "conftest.$ac_objext"
20626 if { (eval echo "$as_me:20626: \"$ac_compile\"") >&5
20627   (eval $ac_compile) 2>&5
20628   ac_status=$?
20629   echo "$as_me:20629: \$? = $ac_status" >&5
20630   (exit "$ac_status"); } &&
20631          { ac_try='test -s "conftest.$ac_objext"'
20632   { (eval echo "$as_me:20632: \"$ac_try\"") >&5
20633   (eval $ac_try) 2>&5
20634   ac_status=$?
20635   echo "$as_me:20635: \$? = $ac_status" >&5
20636   (exit "$ac_status"); }; }; then
20637   cf_cv_dcl_errno=yes
20638 else
20639   echo "$as_me: failed program was:" >&5
20640 cat "conftest.$ac_ext" >&5
20641 cf_cv_dcl_errno=no
20642 fi
20643 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20644
20645 fi
20646 echo "$as_me:20646: result: $cf_cv_dcl_errno" >&5
20647 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20648
20649 if test "$cf_cv_dcl_errno" = no ; then
20650
20651 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20652
20653         cat >>confdefs.h <<EOF
20654 #define $cf_result 1
20655 EOF
20656
20657 fi
20658
20659 # It's possible (for near-UNIX clones) that the data doesn't exist
20660
20661 echo "$as_me:20661: checking if external errno exists" >&5
20662 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20663 if test "${cf_cv_have_errno+set}" = set; then
20664   echo $ECHO_N "(cached) $ECHO_C" >&6
20665 else
20666
20667         cat >"conftest.$ac_ext" <<_ACEOF
20668 #line 20668 "configure"
20669 #include "confdefs.h"
20670
20671 #undef errno
20672 extern int errno;
20673
20674 int
20675 main (void)
20676 {
20677 errno = 2
20678   ;
20679   return 0;
20680 }
20681 _ACEOF
20682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20683 if { (eval echo "$as_me:20683: \"$ac_link\"") >&5
20684   (eval $ac_link) 2>&5
20685   ac_status=$?
20686   echo "$as_me:20686: \$? = $ac_status" >&5
20687   (exit "$ac_status"); } &&
20688          { ac_try='test -s "conftest$ac_exeext"'
20689   { (eval echo "$as_me:20689: \"$ac_try\"") >&5
20690   (eval $ac_try) 2>&5
20691   ac_status=$?
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit "$ac_status"); }; }; then
20694   cf_cv_have_errno=yes
20695 else
20696   echo "$as_me: failed program was:" >&5
20697 cat "conftest.$ac_ext" >&5
20698 cf_cv_have_errno=no
20699 fi
20700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20701
20702 fi
20703 echo "$as_me:20703: result: $cf_cv_have_errno" >&5
20704 echo "${ECHO_T}$cf_cv_have_errno" >&6
20705
20706 if test "$cf_cv_have_errno" = yes ; then
20707
20708 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20709
20710         cat >>confdefs.h <<EOF
20711 #define $cf_result 1
20712 EOF
20713
20714 fi
20715
20716 echo "$as_me:20716: checking if data-only library module links" >&5
20717 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20718 if test "${cf_cv_link_dataonly+set}" = set; then
20719   echo $ECHO_N "(cached) $ECHO_C" >&6
20720 else
20721
20722         rm -f conftest.a
20723         cat >conftest.$ac_ext <<EOF
20724 #line 20724 "configure"
20725 int     testdata[3] = { 123, 456, 789 };
20726 EOF
20727         if { (eval echo "$as_me:20727: \"$ac_compile\"") >&5
20728   (eval $ac_compile) 2>&5
20729   ac_status=$?
20730   echo "$as_me:20730: \$? = $ac_status" >&5
20731   (exit "$ac_status"); } ; then
20732                 mv conftest.o data.o && \
20733                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20734         fi
20735         rm -f conftest.$ac_ext data.o
20736         cat >conftest.$ac_ext <<EOF
20737 #line 20737 "configure"
20738 int     testfunc(void)
20739 {
20740 #if defined(NeXT)
20741         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20742 #else
20743         extern int testdata[3];
20744         return testdata[0] == 123
20745            &&  testdata[1] == 456
20746            &&  testdata[2] == 789;
20747 #endif
20748 }
20749 EOF
20750         if { (eval echo "$as_me:20750: \"$ac_compile\"") >&5
20751   (eval $ac_compile) 2>&5
20752   ac_status=$?
20753   echo "$as_me:20753: \$? = $ac_status" >&5
20754   (exit "$ac_status"); }; then
20755                 mv conftest.o func.o && \
20756                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20757         fi
20758         rm -f conftest.$ac_ext func.o
20759         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20760         cf_saveLIBS="$LIBS"
20761         LIBS="conftest.a $LIBS"
20762         if test "$cross_compiling" = yes; then
20763   cf_cv_link_dataonly=unknown
20764 else
20765   cat >"conftest.$ac_ext" <<_ACEOF
20766 #line 20766 "configure"
20767 #include "confdefs.h"
20768
20769         int main(void)
20770         {
20771                 extern int testfunc();
20772                 ${cf_cv_main_return:-return} (!testfunc());
20773         }
20774
20775 _ACEOF
20776 rm -f "conftest$ac_exeext"
20777 if { (eval echo "$as_me:20777: \"$ac_link\"") >&5
20778   (eval $ac_link) 2>&5
20779   ac_status=$?
20780   echo "$as_me:20780: \$? = $ac_status" >&5
20781   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20782   { (eval echo "$as_me:20782: \"$ac_try\"") >&5
20783   (eval $ac_try) 2>&5
20784   ac_status=$?
20785   echo "$as_me:20785: \$? = $ac_status" >&5
20786   (exit "$ac_status"); }; }; then
20787   cf_cv_link_dataonly=yes
20788 else
20789   echo "$as_me: program exited with status $ac_status" >&5
20790 echo "$as_me: failed program was:" >&5
20791 cat "conftest.$ac_ext" >&5
20792 cf_cv_link_dataonly=no
20793 fi
20794 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20795 fi
20796         LIBS="$cf_saveLIBS"
20797
20798 fi
20799
20800 echo "$as_me:20800: result: $cf_cv_link_dataonly" >&5
20801 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20802
20803 if test "$cf_cv_link_dataonly" = no ; then
20804
20805 cat >>confdefs.h <<\EOF
20806 #define BROKEN_LINKER 1
20807 EOF
20808
20809         BROKEN_LINKER=1
20810 fi
20811
20812 ###     Checks for library functions.
20813
20814 for ac_func in \
20815 getcwd \
20816 getegid \
20817 geteuid \
20818 getopt \
20819 getttynam \
20820 issetugid \
20821 localeconv \
20822 poll \
20823 putenv \
20824 remove \
20825 select \
20826 setbuf \
20827 setbuffer \
20828 setenv \
20829 setvbuf \
20830 sigaction \
20831 sigvec \
20832 snprintf \
20833 strdup \
20834 strstr \
20835 sysconf \
20836 tcgetpgrp \
20837 times \
20838 tsearch \
20839 vsnprintf \
20840
20841 do
20842 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20843 echo "$as_me:20843: checking for $ac_func" >&5
20844 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20845 if eval "test \"\${$as_ac_var+set}\" = set"; then
20846   echo $ECHO_N "(cached) $ECHO_C" >&6
20847 else
20848   cat >"conftest.$ac_ext" <<_ACEOF
20849 #line 20849 "configure"
20850 #include "confdefs.h"
20851 #define $ac_func autoconf_temporary
20852 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20853 #undef $ac_func
20854
20855 #ifdef __cplusplus
20856 extern "C"
20857 #endif
20858
20859 /* We use char because int might match the return type of a gcc2
20860    builtin and then its argument prototype would still apply.  */
20861 char $ac_func (void);
20862
20863 int
20864 main (void)
20865 {
20866
20867 /* The GNU C library defines stubs for functions which it implements
20868     to always fail with ENOSYS.  Some functions are actually named
20869     something starting with __ and the normal name is an alias.  */
20870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20871 #error found stub for $ac_func
20872 #endif
20873
20874         return $ac_func ();
20875   ;
20876   return 0;
20877 }
20878 _ACEOF
20879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20880 if { (eval echo "$as_me:20880: \"$ac_link\"") >&5
20881   (eval $ac_link) 2>&5
20882   ac_status=$?
20883   echo "$as_me:20883: \$? = $ac_status" >&5
20884   (exit "$ac_status"); } &&
20885          { ac_try='test -s "conftest$ac_exeext"'
20886   { (eval echo "$as_me:20886: \"$ac_try\"") >&5
20887   (eval $ac_try) 2>&5
20888   ac_status=$?
20889   echo "$as_me:20889: \$? = $ac_status" >&5
20890   (exit "$ac_status"); }; }; then
20891   eval "$as_ac_var=yes"
20892 else
20893   echo "$as_me: failed program was:" >&5
20894 cat "conftest.$ac_ext" >&5
20895 eval "$as_ac_var=no"
20896 fi
20897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20898 fi
20899 echo "$as_me:20899: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20900 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20901 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20902   cat >>confdefs.h <<EOF
20903 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20904 EOF
20905
20906 fi
20907 done
20908
20909 if test "x$ac_cv_func_getopt" = xno && \
20910    test "x$cf_with_progs$cf_with_tests" != xnono; then
20911         { { echo "$as_me:20911: error: getopt is required for building programs" >&5
20912 echo "$as_me: error: getopt is required for building programs" >&2;}
20913    { (exit 1); exit 1; }; }
20914 fi
20915
20916 if test "x$with_safe_sprintf" = xyes
20917 then
20918         if test "x$ac_cv_func_vsnprintf" = xyes
20919         then
20920                 { echo "$as_me:20920: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20921 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20922         else
20923
20924 cat >>confdefs.h <<\EOF
20925 #define USE_SAFE_SPRINTF 1
20926 EOF
20927
20928         fi
20929 fi
20930
20931 if test "x$with_getcap" = "xyes" ; then
20932
20933 echo "$as_me:20933: checking for terminal-capability database functions" >&5
20934 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20935 if test "${cf_cv_cgetent+set}" = set; then
20936   echo $ECHO_N "(cached) $ECHO_C" >&6
20937 else
20938
20939 cat >"conftest.$ac_ext" <<_ACEOF
20940 #line 20940 "configure"
20941 #include "confdefs.h"
20942
20943 #include <stdlib.h>
20944 int
20945 main (void)
20946 {
20947
20948         char temp[128];
20949         char *buf = temp;
20950         char *db_array = temp;
20951         cgetent(&buf, &db_array, "vt100");
20952         cgetcap(buf, "tc", '=');
20953         cgetmatch(buf, "tc");
20954
20955   ;
20956   return 0;
20957 }
20958 _ACEOF
20959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20960 if { (eval echo "$as_me:20960: \"$ac_link\"") >&5
20961   (eval $ac_link) 2>&5
20962   ac_status=$?
20963   echo "$as_me:20963: \$? = $ac_status" >&5
20964   (exit "$ac_status"); } &&
20965          { ac_try='test -s "conftest$ac_exeext"'
20966   { (eval echo "$as_me:20966: \"$ac_try\"") >&5
20967   (eval $ac_try) 2>&5
20968   ac_status=$?
20969   echo "$as_me:20969: \$? = $ac_status" >&5
20970   (exit "$ac_status"); }; }; then
20971   cf_cv_cgetent=yes
20972 else
20973   echo "$as_me: failed program was:" >&5
20974 cat "conftest.$ac_ext" >&5
20975 cf_cv_cgetent=no
20976 fi
20977 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20978
20979 fi
20980 echo "$as_me:20980: result: $cf_cv_cgetent" >&5
20981 echo "${ECHO_T}$cf_cv_cgetent" >&6
20982
20983 if test "$cf_cv_cgetent" = yes
20984 then
20985
20986 cat >>confdefs.h <<\EOF
20987 #define HAVE_BSD_CGETENT 1
20988 EOF
20989
20990 echo "$as_me:20990: checking if cgetent uses const parameter" >&5
20991 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20992 if test "${cf_cv_cgetent_const+set}" = set; then
20993   echo $ECHO_N "(cached) $ECHO_C" >&6
20994 else
20995
20996 cat >"conftest.$ac_ext" <<_ACEOF
20997 #line 20997 "configure"
20998 #include "confdefs.h"
20999
21000 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21001 #include <stdlib.h>
21002 int
21003 main (void)
21004 {
21005
21006         char temp[128];
21007         char *buf = temp;
21008 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21009         const char *db_array = temp;
21010         cgetent(&buf, &db_array, "vt100");
21011 #endif
21012         cgetcap(buf, "tc", '=');
21013         cgetmatch(buf, "tc");
21014
21015   ;
21016   return 0;
21017 }
21018 _ACEOF
21019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21020 if { (eval echo "$as_me:21020: \"$ac_link\"") >&5
21021   (eval $ac_link) 2>&5
21022   ac_status=$?
21023   echo "$as_me:21023: \$? = $ac_status" >&5
21024   (exit "$ac_status"); } &&
21025          { ac_try='test -s "conftest$ac_exeext"'
21026   { (eval echo "$as_me:21026: \"$ac_try\"") >&5
21027   (eval $ac_try) 2>&5
21028   ac_status=$?
21029   echo "$as_me:21029: \$? = $ac_status" >&5
21030   (exit "$ac_status"); }; }; then
21031   cf_cv_cgetent_const=yes
21032 else
21033   echo "$as_me: failed program was:" >&5
21034 cat "conftest.$ac_ext" >&5
21035 cf_cv_cgetent_const=no
21036 fi
21037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21038
21039 fi
21040 echo "$as_me:21040: result: $cf_cv_cgetent_const" >&5
21041 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21042         if test "$cf_cv_cgetent_const" = yes
21043         then
21044
21045 cat >>confdefs.h <<EOF
21046 #define CGETENT_CONST const
21047 EOF
21048
21049         fi
21050 fi
21051
21052 fi
21053
21054 echo "$as_me:21054: checking for isascii" >&5
21055 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21056 if test "${cf_cv_have_isascii+set}" = set; then
21057   echo $ECHO_N "(cached) $ECHO_C" >&6
21058 else
21059
21060         cat >"conftest.$ac_ext" <<_ACEOF
21061 #line 21061 "configure"
21062 #include "confdefs.h"
21063 #include <ctype.h>
21064 int
21065 main (void)
21066 {
21067 int x = isascii(' ')
21068   ;
21069   return 0;
21070 }
21071 _ACEOF
21072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21073 if { (eval echo "$as_me:21073: \"$ac_link\"") >&5
21074   (eval $ac_link) 2>&5
21075   ac_status=$?
21076   echo "$as_me:21076: \$? = $ac_status" >&5
21077   (exit "$ac_status"); } &&
21078          { ac_try='test -s "conftest$ac_exeext"'
21079   { (eval echo "$as_me:21079: \"$ac_try\"") >&5
21080   (eval $ac_try) 2>&5
21081   ac_status=$?
21082   echo "$as_me:21082: \$? = $ac_status" >&5
21083   (exit "$ac_status"); }; }; then
21084   cf_cv_have_isascii=yes
21085 else
21086   echo "$as_me: failed program was:" >&5
21087 cat "conftest.$ac_ext" >&5
21088 cf_cv_have_isascii=no
21089 fi
21090 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21091
21092 fi
21093 echo "$as_me:21093: result: $cf_cv_have_isascii" >&5
21094 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21095 test "$cf_cv_have_isascii" = yes &&
21096 cat >>confdefs.h <<\EOF
21097 #define HAVE_ISASCII 1
21098 EOF
21099
21100 if test "$ac_cv_func_sigaction" = yes; then
21101 echo "$as_me:21101: checking whether sigaction needs _POSIX_SOURCE" >&5
21102 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21103 cat >"conftest.$ac_ext" <<_ACEOF
21104 #line 21104 "configure"
21105 #include "confdefs.h"
21106
21107 #include <sys/types.h>
21108 #include <signal.h>
21109 int
21110 main (void)
21111 {
21112 struct sigaction act
21113   ;
21114   return 0;
21115 }
21116 _ACEOF
21117 rm -f "conftest.$ac_objext"
21118 if { (eval echo "$as_me:21118: \"$ac_compile\"") >&5
21119   (eval $ac_compile) 2>&5
21120   ac_status=$?
21121   echo "$as_me:21121: \$? = $ac_status" >&5
21122   (exit "$ac_status"); } &&
21123          { ac_try='test -s "conftest.$ac_objext"'
21124   { (eval echo "$as_me:21124: \"$ac_try\"") >&5
21125   (eval $ac_try) 2>&5
21126   ac_status=$?
21127   echo "$as_me:21127: \$? = $ac_status" >&5
21128   (exit "$ac_status"); }; }; then
21129   sigact_bad=no
21130 else
21131   echo "$as_me: failed program was:" >&5
21132 cat "conftest.$ac_ext" >&5
21133
21134 cat >"conftest.$ac_ext" <<_ACEOF
21135 #line 21135 "configure"
21136 #include "confdefs.h"
21137
21138 #define _POSIX_SOURCE
21139 #include <sys/types.h>
21140 #include <signal.h>
21141 int
21142 main (void)
21143 {
21144 struct sigaction act
21145   ;
21146   return 0;
21147 }
21148 _ACEOF
21149 rm -f "conftest.$ac_objext"
21150 if { (eval echo "$as_me:21150: \"$ac_compile\"") >&5
21151   (eval $ac_compile) 2>&5
21152   ac_status=$?
21153   echo "$as_me:21153: \$? = $ac_status" >&5
21154   (exit "$ac_status"); } &&
21155          { ac_try='test -s "conftest.$ac_objext"'
21156   { (eval echo "$as_me:21156: \"$ac_try\"") >&5
21157   (eval $ac_try) 2>&5
21158   ac_status=$?
21159   echo "$as_me:21159: \$? = $ac_status" >&5
21160   (exit "$ac_status"); }; }; then
21161   sigact_bad=yes
21162
21163 cat >>confdefs.h <<\EOF
21164 #define _POSIX_SOURCE 1
21165 EOF
21166
21167 else
21168   echo "$as_me: failed program was:" >&5
21169 cat "conftest.$ac_ext" >&5
21170 sigact_bad=unknown
21171 fi
21172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21173 fi
21174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21175 echo "$as_me:21175: result: $sigact_bad" >&5
21176 echo "${ECHO_T}$sigact_bad" >&6
21177 fi
21178
21179 echo "$as_me:21179: checking if nanosleep really works" >&5
21180 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21181 if test "${cf_cv_func_nanosleep+set}" = set; then
21182   echo $ECHO_N "(cached) $ECHO_C" >&6
21183 else
21184
21185 if test "$cross_compiling" = yes; then
21186   cf_cv_func_nanosleep=unknown
21187 else
21188   cat >"conftest.$ac_ext" <<_ACEOF
21189 #line 21189 "configure"
21190 #include "confdefs.h"
21191
21192 #include <stdio.h>
21193 #include <errno.h>
21194 #include <time.h>
21195
21196 #ifdef HAVE_SYS_TIME_H
21197 #include <sys/time.h>
21198 #endif
21199
21200 int main(void) {
21201         struct timespec ts1, ts2;
21202         int code;
21203         ts1.tv_sec  = 0;
21204         ts1.tv_nsec = 750000000;
21205         ts2.tv_sec  = 0;
21206         ts2.tv_nsec = 0;
21207         errno = 0;
21208         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21209         ${cf_cv_main_return:-return}(code != 0);
21210 }
21211
21212 _ACEOF
21213 rm -f "conftest$ac_exeext"
21214 if { (eval echo "$as_me:21214: \"$ac_link\"") >&5
21215   (eval $ac_link) 2>&5
21216   ac_status=$?
21217   echo "$as_me:21217: \$? = $ac_status" >&5
21218   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21219   { (eval echo "$as_me:21219: \"$ac_try\"") >&5
21220   (eval $ac_try) 2>&5
21221   ac_status=$?
21222   echo "$as_me:21222: \$? = $ac_status" >&5
21223   (exit "$ac_status"); }; }; then
21224   cf_cv_func_nanosleep=yes
21225 else
21226   echo "$as_me: program exited with status $ac_status" >&5
21227 echo "$as_me: failed program was:" >&5
21228 cat "conftest.$ac_ext" >&5
21229 cf_cv_func_nanosleep=no
21230 fi
21231 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21232 fi
21233 fi
21234 echo "$as_me:21234: result: $cf_cv_func_nanosleep" >&5
21235 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21236
21237 test "$cf_cv_func_nanosleep" = "yes" &&
21238 cat >>confdefs.h <<\EOF
21239 #define HAVE_NANOSLEEP 1
21240 EOF
21241
21242 for ac_header in \
21243 termio.h \
21244 termios.h \
21245 unistd.h \
21246 sys/ioctl.h \
21247 sys/termio.h \
21248
21249 do
21250 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21251 echo "$as_me:21251: checking for $ac_header" >&5
21252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21254   echo $ECHO_N "(cached) $ECHO_C" >&6
21255 else
21256   cat >"conftest.$ac_ext" <<_ACEOF
21257 #line 21257 "configure"
21258 #include "confdefs.h"
21259 #include <$ac_header>
21260 _ACEOF
21261 if { (eval echo "$as_me:21261: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21262   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21263   ac_status=$?
21264   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21265   rm -f conftest.er1
21266   cat conftest.err >&5
21267   echo "$as_me:21267: \$? = $ac_status" >&5
21268   (exit "$ac_status"); } >/dev/null; then
21269   if test -s conftest.err; then
21270     ac_cpp_err=$ac_c_preproc_warn_flag
21271   else
21272     ac_cpp_err=
21273   fi
21274 else
21275   ac_cpp_err=yes
21276 fi
21277 if test -z "$ac_cpp_err"; then
21278   eval "$as_ac_Header=yes"
21279 else
21280   echo "$as_me: failed program was:" >&5
21281   cat "conftest.$ac_ext" >&5
21282   eval "$as_ac_Header=no"
21283 fi
21284 rm -f conftest.err "conftest.$ac_ext"
21285 fi
21286 echo "$as_me:21286: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21287 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21288 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21289   cat >>confdefs.h <<EOF
21290 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21291 EOF
21292
21293 fi
21294 done
21295
21296 if test "$ac_cv_header_termios_h" = yes ; then
21297         case "$CFLAGS $CPPFLAGS" in
21298         (*-D_POSIX_SOURCE*)
21299                 termios_bad=dunno ;;
21300         (*)     termios_bad=maybe ;;
21301         esac
21302         if test "$termios_bad" = maybe ; then
21303         echo "$as_me:21303: checking whether termios.h needs _POSIX_SOURCE" >&5
21304 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21305         cat >"conftest.$ac_ext" <<_ACEOF
21306 #line 21306 "configure"
21307 #include "confdefs.h"
21308 #include <termios.h>
21309 int
21310 main (void)
21311 {
21312 struct termios foo; int x = foo.c_iflag = 1; (void)x
21313   ;
21314   return 0;
21315 }
21316 _ACEOF
21317 rm -f "conftest.$ac_objext"
21318 if { (eval echo "$as_me:21318: \"$ac_compile\"") >&5
21319   (eval $ac_compile) 2>&5
21320   ac_status=$?
21321   echo "$as_me:21321: \$? = $ac_status" >&5
21322   (exit "$ac_status"); } &&
21323          { ac_try='test -s "conftest.$ac_objext"'
21324   { (eval echo "$as_me:21324: \"$ac_try\"") >&5
21325   (eval $ac_try) 2>&5
21326   ac_status=$?
21327   echo "$as_me:21327: \$? = $ac_status" >&5
21328   (exit "$ac_status"); }; }; then
21329   termios_bad=no
21330 else
21331   echo "$as_me: failed program was:" >&5
21332 cat "conftest.$ac_ext" >&5
21333
21334                 cat >"conftest.$ac_ext" <<_ACEOF
21335 #line 21335 "configure"
21336 #include "confdefs.h"
21337
21338 #define _POSIX_SOURCE
21339 #include <termios.h>
21340 int
21341 main (void)
21342 {
21343 struct termios foo; int x = foo.c_iflag = 2; (void)x
21344   ;
21345   return 0;
21346 }
21347 _ACEOF
21348 rm -f "conftest.$ac_objext"
21349 if { (eval echo "$as_me:21349: \"$ac_compile\"") >&5
21350   (eval $ac_compile) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit "$ac_status"); } &&
21354          { ac_try='test -s "conftest.$ac_objext"'
21355   { (eval echo "$as_me:21355: \"$ac_try\"") >&5
21356   (eval $ac_try) 2>&5
21357   ac_status=$?
21358   echo "$as_me:21358: \$? = $ac_status" >&5
21359   (exit "$ac_status"); }; }; then
21360   termios_bad=unknown
21361 else
21362   echo "$as_me: failed program was:" >&5
21363 cat "conftest.$ac_ext" >&5
21364 termios_bad=yes
21365 cat >>confdefs.h <<\EOF
21366 #define _POSIX_SOURCE 1
21367 EOF
21368
21369 fi
21370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21371
21372 fi
21373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21374         echo "$as_me:21374: result: $termios_bad" >&5
21375 echo "${ECHO_T}$termios_bad" >&6
21376         fi
21377 fi
21378
21379 echo "$as_me:21379: checking for tcgetattr" >&5
21380 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21381 if test "${cf_cv_have_tcgetattr+set}" = set; then
21382   echo $ECHO_N "(cached) $ECHO_C" >&6
21383 else
21384
21385 cat >"conftest.$ac_ext" <<_ACEOF
21386 #line 21386 "configure"
21387 #include "confdefs.h"
21388
21389 #include <sys/types.h>
21390 #ifdef HAVE_UNISTD_H
21391 #include <unistd.h>
21392 #endif
21393 #ifdef HAVE_TERMIOS_H
21394 #include <termios.h>
21395 #define TTY struct termios
21396 #else
21397 #ifdef HAVE_TERMIO_H
21398 #include <termio.h>
21399 #define TTY struct termio
21400 #endif
21401 #endif
21402
21403 int
21404 main (void)
21405 {
21406
21407 TTY foo;
21408 tcgetattr(1, &foo);
21409   ;
21410   return 0;
21411 }
21412 _ACEOF
21413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21414 if { (eval echo "$as_me:21414: \"$ac_link\"") >&5
21415   (eval $ac_link) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit "$ac_status"); } &&
21419          { ac_try='test -s "conftest$ac_exeext"'
21420   { (eval echo "$as_me:21420: \"$ac_try\"") >&5
21421   (eval $ac_try) 2>&5
21422   ac_status=$?
21423   echo "$as_me:21423: \$? = $ac_status" >&5
21424   (exit "$ac_status"); }; }; then
21425   cf_cv_have_tcgetattr=yes
21426 else
21427   echo "$as_me: failed program was:" >&5
21428 cat "conftest.$ac_ext" >&5
21429 cf_cv_have_tcgetattr=no
21430 fi
21431 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21432 fi
21433 echo "$as_me:21433: result: $cf_cv_have_tcgetattr" >&5
21434 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21435 test "$cf_cv_have_tcgetattr" = yes &&
21436 cat >>confdefs.h <<\EOF
21437 #define HAVE_TCGETATTR 1
21438 EOF
21439
21440 echo "$as_me:21440: checking for vsscanf function or workaround" >&5
21441 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21442 if test "${cf_cv_func_vsscanf+set}" = set; then
21443   echo $ECHO_N "(cached) $ECHO_C" >&6
21444 else
21445
21446 cat >"conftest.$ac_ext" <<_ACEOF
21447 #line 21447 "configure"
21448 #include "confdefs.h"
21449
21450 #include <stdarg.h>
21451 #include <stdio.h>
21452 int
21453 main (void)
21454 {
21455
21456         va_list ap;
21457         vsscanf("from", "%d", ap)
21458   ;
21459   return 0;
21460 }
21461 _ACEOF
21462 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21463 if { (eval echo "$as_me:21463: \"$ac_link\"") >&5
21464   (eval $ac_link) 2>&5
21465   ac_status=$?
21466   echo "$as_me:21466: \$? = $ac_status" >&5
21467   (exit "$ac_status"); } &&
21468          { ac_try='test -s "conftest$ac_exeext"'
21469   { (eval echo "$as_me:21469: \"$ac_try\"") >&5
21470   (eval $ac_try) 2>&5
21471   ac_status=$?
21472   echo "$as_me:21472: \$? = $ac_status" >&5
21473   (exit "$ac_status"); }; }; then
21474   cf_cv_func_vsscanf=vsscanf
21475 else
21476   echo "$as_me: failed program was:" >&5
21477 cat "conftest.$ac_ext" >&5
21478
21479 cat >"conftest.$ac_ext" <<_ACEOF
21480 #line 21480 "configure"
21481 #include "confdefs.h"
21482
21483 #include <stdarg.h>
21484 #include <stdio.h>
21485 int
21486 main (void)
21487 {
21488
21489         FILE strbuf;
21490         char *str = "from";
21491
21492         strbuf._flag = _IOREAD;
21493         strbuf._ptr = strbuf._base = (unsigned char *) str;
21494         strbuf._cnt = strlen(str);
21495         strbuf._file = _NFILE;
21496         return (vfscanf(&strbuf, "%d", ap))
21497   ;
21498   return 0;
21499 }
21500 _ACEOF
21501 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21502 if { (eval echo "$as_me:21502: \"$ac_link\"") >&5
21503   (eval $ac_link) 2>&5
21504   ac_status=$?
21505   echo "$as_me:21505: \$? = $ac_status" >&5
21506   (exit "$ac_status"); } &&
21507          { ac_try='test -s "conftest$ac_exeext"'
21508   { (eval echo "$as_me:21508: \"$ac_try\"") >&5
21509   (eval $ac_try) 2>&5
21510   ac_status=$?
21511   echo "$as_me:21511: \$? = $ac_status" >&5
21512   (exit "$ac_status"); }; }; then
21513   cf_cv_func_vsscanf=vfscanf
21514 else
21515   echo "$as_me: failed program was:" >&5
21516 cat "conftest.$ac_ext" >&5
21517
21518 cat >"conftest.$ac_ext" <<_ACEOF
21519 #line 21519 "configure"
21520 #include "confdefs.h"
21521
21522 #include <stdarg.h>
21523 #include <stdio.h>
21524 int
21525 main (void)
21526 {
21527
21528         FILE strbuf;
21529         char *str = "from";
21530
21531         strbuf._flag = _IOREAD;
21532         strbuf._ptr = strbuf._base = (unsigned char *) str;
21533         strbuf._cnt = strlen(str);
21534         strbuf._file = _NFILE;
21535         return (_doscan(&strbuf, "%d", ap))
21536   ;
21537   return 0;
21538 }
21539 _ACEOF
21540 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21541 if { (eval echo "$as_me:21541: \"$ac_link\"") >&5
21542   (eval $ac_link) 2>&5
21543   ac_status=$?
21544   echo "$as_me:21544: \$? = $ac_status" >&5
21545   (exit "$ac_status"); } &&
21546          { ac_try='test -s "conftest$ac_exeext"'
21547   { (eval echo "$as_me:21547: \"$ac_try\"") >&5
21548   (eval $ac_try) 2>&5
21549   ac_status=$?
21550   echo "$as_me:21550: \$? = $ac_status" >&5
21551   (exit "$ac_status"); }; }; then
21552   cf_cv_func_vsscanf=_doscan
21553 else
21554   echo "$as_me: failed program was:" >&5
21555 cat "conftest.$ac_ext" >&5
21556
21557 cf_cv_func_vsscanf=no
21558 fi
21559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21560 fi
21561 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21562 fi
21563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21564 fi
21565 echo "$as_me:21565: result: $cf_cv_func_vsscanf" >&5
21566 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21567
21568 case "$cf_cv_func_vsscanf" in
21569 (vsscanf)
21570 cat >>confdefs.h <<\EOF
21571 #define HAVE_VSSCANF 1
21572 EOF
21573 ;;
21574 (vfscanf)
21575 cat >>confdefs.h <<\EOF
21576 #define HAVE_VFSCANF 1
21577 EOF
21578 ;;
21579 (_doscan)
21580 cat >>confdefs.h <<\EOF
21581 #define HAVE__DOSCAN 1
21582 EOF
21583 ;;
21584 esac
21585
21586 for ac_header in \
21587 unistd.h \
21588
21589 do
21590 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21591 echo "$as_me:21591: checking for $ac_header" >&5
21592 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21593 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21594   echo $ECHO_N "(cached) $ECHO_C" >&6
21595 else
21596   cat >"conftest.$ac_ext" <<_ACEOF
21597 #line 21597 "configure"
21598 #include "confdefs.h"
21599 #include <$ac_header>
21600 _ACEOF
21601 if { (eval echo "$as_me:21601: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21602   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21603   ac_status=$?
21604   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21605   rm -f conftest.er1
21606   cat conftest.err >&5
21607   echo "$as_me:21607: \$? = $ac_status" >&5
21608   (exit "$ac_status"); } >/dev/null; then
21609   if test -s conftest.err; then
21610     ac_cpp_err=$ac_c_preproc_warn_flag
21611   else
21612     ac_cpp_err=
21613   fi
21614 else
21615   ac_cpp_err=yes
21616 fi
21617 if test -z "$ac_cpp_err"; then
21618   eval "$as_ac_Header=yes"
21619 else
21620   echo "$as_me: failed program was:" >&5
21621   cat "conftest.$ac_ext" >&5
21622   eval "$as_ac_Header=no"
21623 fi
21624 rm -f conftest.err "conftest.$ac_ext"
21625 fi
21626 echo "$as_me:21626: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21627 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21628 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21629   cat >>confdefs.h <<EOF
21630 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21631 EOF
21632
21633 fi
21634 done
21635
21636 echo "$as_me:21636: checking for working mkstemp" >&5
21637 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21638 if test "${cf_cv_func_mkstemp+set}" = set; then
21639   echo $ECHO_N "(cached) $ECHO_C" >&6
21640 else
21641
21642 rm -rf ./conftest*
21643 if test "$cross_compiling" = yes; then
21644   cf_cv_func_mkstemp=maybe
21645 else
21646   cat >"conftest.$ac_ext" <<_ACEOF
21647 #line 21647 "configure"
21648 #include "confdefs.h"
21649
21650 #include <sys/types.h>
21651 #ifdef HAVE_UNISTD_H
21652 #include <unistd.h>
21653 #endif
21654 #include <stdlib.h>
21655 #include <stdio.h>
21656 #include <string.h>
21657 #include <sys/stat.h>
21658 int main(void)
21659 {
21660         char *tmpl = "conftestXXXXXX";
21661         char name[2][80];
21662         int n;
21663         int result = 0;
21664         int fd;
21665         struct stat sb;
21666
21667         umask(077);
21668         for (n = 0; n < 2; ++n) {
21669                 strcpy(name[n], tmpl);
21670                 if ((fd = mkstemp(name[n])) >= 0) {
21671                         if (!strcmp(name[n], tmpl)
21672                          || stat(name[n], &sb) != 0
21673                          || (sb.st_mode & S_IFMT) != S_IFREG
21674                          || (sb.st_mode & 077) != 0) {
21675                                 result = 1;
21676                         }
21677                         close(fd);
21678                 }
21679         }
21680         if (result == 0
21681          && !strcmp(name[0], name[1]))
21682                 result = 1;
21683         ${cf_cv_main_return:-return}(result);
21684 }
21685
21686 _ACEOF
21687 rm -f "conftest$ac_exeext"
21688 if { (eval echo "$as_me:21688: \"$ac_link\"") >&5
21689   (eval $ac_link) 2>&5
21690   ac_status=$?
21691   echo "$as_me:21691: \$? = $ac_status" >&5
21692   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21693   { (eval echo "$as_me:21693: \"$ac_try\"") >&5
21694   (eval $ac_try) 2>&5
21695   ac_status=$?
21696   echo "$as_me:21696: \$? = $ac_status" >&5
21697   (exit "$ac_status"); }; }; then
21698   cf_cv_func_mkstemp=yes
21699
21700 else
21701   echo "$as_me: program exited with status $ac_status" >&5
21702 echo "$as_me: failed program was:" >&5
21703 cat "conftest.$ac_ext" >&5
21704 cf_cv_func_mkstemp=no
21705
21706 fi
21707 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21708 fi
21709
21710 fi
21711 echo "$as_me:21711: result: $cf_cv_func_mkstemp" >&5
21712 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21713 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21714         echo "$as_me:21714: checking for mkstemp" >&5
21715 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21716 if test "${ac_cv_func_mkstemp+set}" = set; then
21717   echo $ECHO_N "(cached) $ECHO_C" >&6
21718 else
21719   cat >"conftest.$ac_ext" <<_ACEOF
21720 #line 21720 "configure"
21721 #include "confdefs.h"
21722 #define mkstemp autoconf_temporary
21723 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21724 #undef mkstemp
21725
21726 #ifdef __cplusplus
21727 extern "C"
21728 #endif
21729
21730 /* We use char because int might match the return type of a gcc2
21731    builtin and then its argument prototype would still apply.  */
21732 char mkstemp (void);
21733
21734 int
21735 main (void)
21736 {
21737
21738 /* The GNU C library defines stubs for functions which it implements
21739     to always fail with ENOSYS.  Some functions are actually named
21740     something starting with __ and the normal name is an alias.  */
21741 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21742 #error found stub for mkstemp
21743 #endif
21744
21745         return mkstemp ();
21746   ;
21747   return 0;
21748 }
21749 _ACEOF
21750 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21751 if { (eval echo "$as_me:21751: \"$ac_link\"") >&5
21752   (eval $ac_link) 2>&5
21753   ac_status=$?
21754   echo "$as_me:21754: \$? = $ac_status" >&5
21755   (exit "$ac_status"); } &&
21756          { ac_try='test -s "conftest$ac_exeext"'
21757   { (eval echo "$as_me:21757: \"$ac_try\"") >&5
21758   (eval $ac_try) 2>&5
21759   ac_status=$?
21760   echo "$as_me:21760: \$? = $ac_status" >&5
21761   (exit "$ac_status"); }; }; then
21762   ac_cv_func_mkstemp=yes
21763 else
21764   echo "$as_me: failed program was:" >&5
21765 cat "conftest.$ac_ext" >&5
21766 ac_cv_func_mkstemp=no
21767 fi
21768 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21769 fi
21770 echo "$as_me:21770: result: $ac_cv_func_mkstemp" >&5
21771 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21772
21773 fi
21774 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21775
21776 cat >>confdefs.h <<\EOF
21777 #define HAVE_MKSTEMP 1
21778 EOF
21779
21780 fi
21781
21782 # setup for prototype of fallback for vsscanf()
21783
21784 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21785         HAVE_VSSCANF=1
21786 else
21787         HAVE_VSSCANF=0
21788 fi
21789
21790 if test "x$cross_compiling" = xyes ; then
21791         { echo "$as_me:21791: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21792 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21793 else
21794         echo "$as_me:21794: checking whether setvbuf arguments are reversed" >&5
21795 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21796 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21797   echo $ECHO_N "(cached) $ECHO_C" >&6
21798 else
21799   if test "$cross_compiling" = yes; then
21800   { { echo "$as_me:21800: error: cannot run test program while cross compiling" >&5
21801 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21802    { (exit 1); exit 1; }; }
21803 else
21804   cat >"conftest.$ac_ext" <<_ACEOF
21805 #line 21805 "configure"
21806 #include "confdefs.h"
21807 #include <stdio.h>
21808 /* If setvbuf has the reversed format, exit 0. */
21809 int
21810 main (void)
21811 {
21812   /* This call has the arguments reversed.
21813      A reversed system may check and see that the address of main
21814      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21815   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21816     $ac_main_return(1);
21817   putc('\r', stdout);
21818   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21819 }
21820 _ACEOF
21821 rm -f "conftest$ac_exeext"
21822 if { (eval echo "$as_me:21822: \"$ac_link\"") >&5
21823   (eval $ac_link) 2>&5
21824   ac_status=$?
21825   echo "$as_me:21825: \$? = $ac_status" >&5
21826   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21827   { (eval echo "$as_me:21827: \"$ac_try\"") >&5
21828   (eval $ac_try) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit "$ac_status"); }; }; then
21832   ac_cv_func_setvbuf_reversed=yes
21833 else
21834   echo "$as_me: program exited with status $ac_status" >&5
21835 echo "$as_me: failed program was:" >&5
21836 cat "conftest.$ac_ext" >&5
21837 ac_cv_func_setvbuf_reversed=no
21838 fi
21839 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21840 fi
21841 rm -f core ./core.* ./*.core
21842 fi
21843 echo "$as_me:21843: result: $ac_cv_func_setvbuf_reversed" >&5
21844 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21845 if test $ac_cv_func_setvbuf_reversed = yes; then
21846
21847 cat >>confdefs.h <<\EOF
21848 #define SETVBUF_REVERSED 1
21849 EOF
21850
21851 fi
21852
21853 fi
21854 echo "$as_me:21854: checking for intptr_t" >&5
21855 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21856 if test "${ac_cv_type_intptr_t+set}" = set; then
21857   echo $ECHO_N "(cached) $ECHO_C" >&6
21858 else
21859   cat >"conftest.$ac_ext" <<_ACEOF
21860 #line 21860 "configure"
21861 #include "confdefs.h"
21862 $ac_includes_default
21863 int
21864 main (void)
21865 {
21866 if ((intptr_t *) 0)
21867   return 0;
21868 if (sizeof (intptr_t))
21869   return 0;
21870   ;
21871   return 0;
21872 }
21873 _ACEOF
21874 rm -f "conftest.$ac_objext"
21875 if { (eval echo "$as_me:21875: \"$ac_compile\"") >&5
21876   (eval $ac_compile) 2>&5
21877   ac_status=$?
21878   echo "$as_me:21878: \$? = $ac_status" >&5
21879   (exit "$ac_status"); } &&
21880          { ac_try='test -s "conftest.$ac_objext"'
21881   { (eval echo "$as_me:21881: \"$ac_try\"") >&5
21882   (eval $ac_try) 2>&5
21883   ac_status=$?
21884   echo "$as_me:21884: \$? = $ac_status" >&5
21885   (exit "$ac_status"); }; }; then
21886   ac_cv_type_intptr_t=yes
21887 else
21888   echo "$as_me: failed program was:" >&5
21889 cat "conftest.$ac_ext" >&5
21890 ac_cv_type_intptr_t=no
21891 fi
21892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21893 fi
21894 echo "$as_me:21894: result: $ac_cv_type_intptr_t" >&5
21895 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21896 if test "$ac_cv_type_intptr_t" = yes; then
21897   :
21898 else
21899
21900 cat >>confdefs.h <<EOF
21901 #define intptr_t long
21902 EOF
21903
21904 fi
21905
21906 echo "$as_me:21906: checking for ssize_t" >&5
21907 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21908 if test "${ac_cv_type_ssize_t+set}" = set; then
21909   echo $ECHO_N "(cached) $ECHO_C" >&6
21910 else
21911   cat >"conftest.$ac_ext" <<_ACEOF
21912 #line 21912 "configure"
21913 #include "confdefs.h"
21914 $ac_includes_default
21915 int
21916 main (void)
21917 {
21918 if ((ssize_t *) 0)
21919   return 0;
21920 if (sizeof (ssize_t))
21921   return 0;
21922   ;
21923   return 0;
21924 }
21925 _ACEOF
21926 rm -f "conftest.$ac_objext"
21927 if { (eval echo "$as_me:21927: \"$ac_compile\"") >&5
21928   (eval $ac_compile) 2>&5
21929   ac_status=$?
21930   echo "$as_me:21930: \$? = $ac_status" >&5
21931   (exit "$ac_status"); } &&
21932          { ac_try='test -s "conftest.$ac_objext"'
21933   { (eval echo "$as_me:21933: \"$ac_try\"") >&5
21934   (eval $ac_try) 2>&5
21935   ac_status=$?
21936   echo "$as_me:21936: \$? = $ac_status" >&5
21937   (exit "$ac_status"); }; }; then
21938   ac_cv_type_ssize_t=yes
21939 else
21940   echo "$as_me: failed program was:" >&5
21941 cat "conftest.$ac_ext" >&5
21942 ac_cv_type_ssize_t=no
21943 fi
21944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21945 fi
21946 echo "$as_me:21946: result: $ac_cv_type_ssize_t" >&5
21947 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21948 if test "$ac_cv_type_ssize_t" = yes; then
21949   :
21950 else
21951
21952 cat >>confdefs.h <<EOF
21953 #define ssize_t int
21954 EOF
21955
21956 fi
21957
21958 echo "$as_me:21958: checking for type sigaction_t" >&5
21959 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21960 if test "${cf_cv_type_sigaction+set}" = set; then
21961   echo $ECHO_N "(cached) $ECHO_C" >&6
21962 else
21963
21964         cat >"conftest.$ac_ext" <<_ACEOF
21965 #line 21965 "configure"
21966 #include "confdefs.h"
21967
21968 #include <signal.h>
21969 int
21970 main (void)
21971 {
21972 sigaction_t x
21973   ;
21974   return 0;
21975 }
21976 _ACEOF
21977 rm -f "conftest.$ac_objext"
21978 if { (eval echo "$as_me:21978: \"$ac_compile\"") >&5
21979   (eval $ac_compile) 2>&5
21980   ac_status=$?
21981   echo "$as_me:21981: \$? = $ac_status" >&5
21982   (exit "$ac_status"); } &&
21983          { ac_try='test -s "conftest.$ac_objext"'
21984   { (eval echo "$as_me:21984: \"$ac_try\"") >&5
21985   (eval $ac_try) 2>&5
21986   ac_status=$?
21987   echo "$as_me:21987: \$? = $ac_status" >&5
21988   (exit "$ac_status"); }; }; then
21989   cf_cv_type_sigaction=yes
21990 else
21991   echo "$as_me: failed program was:" >&5
21992 cat "conftest.$ac_ext" >&5
21993 cf_cv_type_sigaction=no
21994 fi
21995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21996 fi
21997
21998 echo "$as_me:21998: result: $cf_cv_type_sigaction" >&5
21999 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22000 test "$cf_cv_type_sigaction" = yes &&
22001 cat >>confdefs.h <<\EOF
22002 #define HAVE_TYPE_SIGACTION 1
22003 EOF
22004
22005 echo "$as_me:22005: checking declaration of size-change" >&5
22006 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22007 if test "${cf_cv_sizechange+set}" = set; then
22008   echo $ECHO_N "(cached) $ECHO_C" >&6
22009 else
22010
22011         cf_cv_sizechange=unknown
22012         cf_save_CPPFLAGS="$CPPFLAGS"
22013
22014 for cf_opts in "" "NEED_PTEM_H"
22015 do
22016
22017         CPPFLAGS="$cf_save_CPPFLAGS"
22018         if test -n "$cf_opts"
22019         then
22020
22021         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22022         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22023
22024         fi
22025         cat >"conftest.$ac_ext" <<_ACEOF
22026 #line 22026 "configure"
22027 #include "confdefs.h"
22028 #include <sys/types.h>
22029 #ifdef HAVE_TERMIOS_H
22030 #include <termios.h>
22031 #else
22032 #ifdef HAVE_TERMIO_H
22033 #include <termio.h>
22034 #endif
22035 #endif
22036
22037 #ifdef NEED_PTEM_H
22038 /* This is a workaround for SCO:  they neglected to define struct winsize in
22039  * termios.h -- it's only in termio.h and ptem.h
22040  */
22041 #include <sys/stream.h>
22042 #include <sys/ptem.h>
22043 #endif
22044
22045 #ifdef HAVE_SYS_IOCTL_H
22046 #include <sys/ioctl.h>
22047 #endif
22048
22049 int
22050 main (void)
22051 {
22052
22053 #ifdef TIOCGSIZE
22054         struct ttysize win;     /* SunOS 3.0... */
22055         int y = win.ts_lines = 2;
22056         int x = win.ts_cols = 1;
22057         (void)y;
22058         (void)x;
22059 #else
22060 #ifdef TIOCGWINSZ
22061         struct winsize win;     /* everything else */
22062         int y = win.ws_row = 2;
22063         int x = win.ws_col = 1;
22064         (void)y;
22065         (void)x;
22066 #else
22067         no TIOCGSIZE or TIOCGWINSZ
22068 #endif /* TIOCGWINSZ */
22069 #endif /* TIOCGSIZE */
22070
22071   ;
22072   return 0;
22073 }
22074 _ACEOF
22075 rm -f "conftest.$ac_objext"
22076 if { (eval echo "$as_me:22076: \"$ac_compile\"") >&5
22077   (eval $ac_compile) 2>&5
22078   ac_status=$?
22079   echo "$as_me:22079: \$? = $ac_status" >&5
22080   (exit "$ac_status"); } &&
22081          { ac_try='test -s "conftest.$ac_objext"'
22082   { (eval echo "$as_me:22082: \"$ac_try\"") >&5
22083   (eval $ac_try) 2>&5
22084   ac_status=$?
22085   echo "$as_me:22085: \$? = $ac_status" >&5
22086   (exit "$ac_status"); }; }; then
22087   cf_cv_sizechange=yes
22088 else
22089   echo "$as_me: failed program was:" >&5
22090 cat "conftest.$ac_ext" >&5
22091 cf_cv_sizechange=no
22092 fi
22093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22094
22095         CPPFLAGS="$cf_save_CPPFLAGS"
22096         if test "$cf_cv_sizechange" = yes ; then
22097                 echo "size-change succeeded ($cf_opts)" >&5
22098                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22099                 break
22100         fi
22101 done
22102
22103 fi
22104 echo "$as_me:22104: result: $cf_cv_sizechange" >&5
22105 echo "${ECHO_T}$cf_cv_sizechange" >&6
22106 if test "$cf_cv_sizechange" != no ; then
22107
22108 cat >>confdefs.h <<\EOF
22109 #define HAVE_SIZECHANGE 1
22110 EOF
22111
22112         case "$cf_cv_sizechange" in
22113         (NEED*)
22114                 cat >>confdefs.h <<EOF
22115 #define $cf_cv_sizechange  1
22116 EOF
22117
22118                 ;;
22119         esac
22120 fi
22121
22122 echo "$as_me:22122: checking for memmove" >&5
22123 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22124 if test "${ac_cv_func_memmove+set}" = set; then
22125   echo $ECHO_N "(cached) $ECHO_C" >&6
22126 else
22127   cat >"conftest.$ac_ext" <<_ACEOF
22128 #line 22128 "configure"
22129 #include "confdefs.h"
22130 #define memmove autoconf_temporary
22131 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22132 #undef memmove
22133
22134 #ifdef __cplusplus
22135 extern "C"
22136 #endif
22137
22138 /* We use char because int might match the return type of a gcc2
22139    builtin and then its argument prototype would still apply.  */
22140 char memmove (void);
22141
22142 int
22143 main (void)
22144 {
22145
22146 /* The GNU C library defines stubs for functions which it implements
22147     to always fail with ENOSYS.  Some functions are actually named
22148     something starting with __ and the normal name is an alias.  */
22149 #if defined (__stub_memmove) || defined (__stub___memmove)
22150 #error found stub for memmove
22151 #endif
22152
22153         return memmove ();
22154   ;
22155   return 0;
22156 }
22157 _ACEOF
22158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22159 if { (eval echo "$as_me:22159: \"$ac_link\"") >&5
22160   (eval $ac_link) 2>&5
22161   ac_status=$?
22162   echo "$as_me:22162: \$? = $ac_status" >&5
22163   (exit "$ac_status"); } &&
22164          { ac_try='test -s "conftest$ac_exeext"'
22165   { (eval echo "$as_me:22165: \"$ac_try\"") >&5
22166   (eval $ac_try) 2>&5
22167   ac_status=$?
22168   echo "$as_me:22168: \$? = $ac_status" >&5
22169   (exit "$ac_status"); }; }; then
22170   ac_cv_func_memmove=yes
22171 else
22172   echo "$as_me: failed program was:" >&5
22173 cat "conftest.$ac_ext" >&5
22174 ac_cv_func_memmove=no
22175 fi
22176 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22177 fi
22178 echo "$as_me:22178: result: $ac_cv_func_memmove" >&5
22179 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22180 if test "$ac_cv_func_memmove" = yes; then
22181   :
22182 else
22183
22184 echo "$as_me:22184: checking for bcopy" >&5
22185 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22186 if test "${ac_cv_func_bcopy+set}" = set; then
22187   echo $ECHO_N "(cached) $ECHO_C" >&6
22188 else
22189   cat >"conftest.$ac_ext" <<_ACEOF
22190 #line 22190 "configure"
22191 #include "confdefs.h"
22192 #define bcopy autoconf_temporary
22193 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22194 #undef bcopy
22195
22196 #ifdef __cplusplus
22197 extern "C"
22198 #endif
22199
22200 /* We use char because int might match the return type of a gcc2
22201    builtin and then its argument prototype would still apply.  */
22202 char bcopy (void);
22203
22204 int
22205 main (void)
22206 {
22207
22208 /* The GNU C library defines stubs for functions which it implements
22209     to always fail with ENOSYS.  Some functions are actually named
22210     something starting with __ and the normal name is an alias.  */
22211 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22212 #error found stub for bcopy
22213 #endif
22214
22215         return bcopy ();
22216   ;
22217   return 0;
22218 }
22219 _ACEOF
22220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22221 if { (eval echo "$as_me:22221: \"$ac_link\"") >&5
22222   (eval $ac_link) 2>&5
22223   ac_status=$?
22224   echo "$as_me:22224: \$? = $ac_status" >&5
22225   (exit "$ac_status"); } &&
22226          { ac_try='test -s "conftest$ac_exeext"'
22227   { (eval echo "$as_me:22227: \"$ac_try\"") >&5
22228   (eval $ac_try) 2>&5
22229   ac_status=$?
22230   echo "$as_me:22230: \$? = $ac_status" >&5
22231   (exit "$ac_status"); }; }; then
22232   ac_cv_func_bcopy=yes
22233 else
22234   echo "$as_me: failed program was:" >&5
22235 cat "conftest.$ac_ext" >&5
22236 ac_cv_func_bcopy=no
22237 fi
22238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22239 fi
22240 echo "$as_me:22240: result: $ac_cv_func_bcopy" >&5
22241 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22242 if test "$ac_cv_func_bcopy" = yes; then
22243
22244         echo "$as_me:22244: checking if bcopy does overlapping moves" >&5
22245 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22246 if test "${cf_cv_good_bcopy+set}" = set; then
22247   echo $ECHO_N "(cached) $ECHO_C" >&6
22248 else
22249
22250                 if test "$cross_compiling" = yes; then
22251   cf_cv_good_bcopy=unknown
22252 else
22253   cat >"conftest.$ac_ext" <<_ACEOF
22254 #line 22254 "configure"
22255 #include "confdefs.h"
22256
22257 int main(void) {
22258         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22259         char temp[40];
22260         bcopy(data, temp, sizeof(data));
22261         bcopy(temp+10, temp, 15);
22262         bcopy(temp+5, temp+15, 10);
22263         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22264 }
22265
22266 _ACEOF
22267 rm -f "conftest$ac_exeext"
22268 if { (eval echo "$as_me:22268: \"$ac_link\"") >&5
22269   (eval $ac_link) 2>&5
22270   ac_status=$?
22271   echo "$as_me:22271: \$? = $ac_status" >&5
22272   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22273   { (eval echo "$as_me:22273: \"$ac_try\"") >&5
22274   (eval $ac_try) 2>&5
22275   ac_status=$?
22276   echo "$as_me:22276: \$? = $ac_status" >&5
22277   (exit "$ac_status"); }; }; then
22278   cf_cv_good_bcopy=yes
22279 else
22280   echo "$as_me: program exited with status $ac_status" >&5
22281 echo "$as_me: failed program was:" >&5
22282 cat "conftest.$ac_ext" >&5
22283 cf_cv_good_bcopy=no
22284 fi
22285 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22286 fi
22287
22288 fi
22289 echo "$as_me:22289: result: $cf_cv_good_bcopy" >&5
22290 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22291
22292 else
22293   cf_cv_good_bcopy=no
22294 fi
22295
22296         if test "$cf_cv_good_bcopy" = yes ; then
22297
22298 cat >>confdefs.h <<\EOF
22299 #define USE_OK_BCOPY 1
22300 EOF
22301
22302         else
22303
22304 cat >>confdefs.h <<\EOF
22305 #define USE_MY_MEMMOVE 1
22306 EOF
22307
22308         fi
22309
22310 fi
22311
22312 tty >/dev/null 2>&1 || {
22313 for ac_func in posix_openpt
22314 do
22315 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22316 echo "$as_me:22316: checking for $ac_func" >&5
22317 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22318 if eval "test \"\${$as_ac_var+set}\" = set"; then
22319   echo $ECHO_N "(cached) $ECHO_C" >&6
22320 else
22321   cat >"conftest.$ac_ext" <<_ACEOF
22322 #line 22322 "configure"
22323 #include "confdefs.h"
22324 #define $ac_func autoconf_temporary
22325 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22326 #undef $ac_func
22327
22328 #ifdef __cplusplus
22329 extern "C"
22330 #endif
22331
22332 /* We use char because int might match the return type of a gcc2
22333    builtin and then its argument prototype would still apply.  */
22334 char $ac_func (void);
22335
22336 int
22337 main (void)
22338 {
22339
22340 /* The GNU C library defines stubs for functions which it implements
22341     to always fail with ENOSYS.  Some functions are actually named
22342     something starting with __ and the normal name is an alias.  */
22343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22344 #error found stub for $ac_func
22345 #endif
22346
22347         return $ac_func ();
22348   ;
22349   return 0;
22350 }
22351 _ACEOF
22352 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22353 if { (eval echo "$as_me:22353: \"$ac_link\"") >&5
22354   (eval $ac_link) 2>&5
22355   ac_status=$?
22356   echo "$as_me:22356: \$? = $ac_status" >&5
22357   (exit "$ac_status"); } &&
22358          { ac_try='test -s "conftest$ac_exeext"'
22359   { (eval echo "$as_me:22359: \"$ac_try\"") >&5
22360   (eval $ac_try) 2>&5
22361   ac_status=$?
22362   echo "$as_me:22362: \$? = $ac_status" >&5
22363   (exit "$ac_status"); }; }; then
22364   eval "$as_ac_var=yes"
22365 else
22366   echo "$as_me: failed program was:" >&5
22367 cat "conftest.$ac_ext" >&5
22368 eval "$as_ac_var=no"
22369 fi
22370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22371 fi
22372 echo "$as_me:22372: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22373 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22374 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22375   cat >>confdefs.h <<EOF
22376 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22377 EOF
22378
22379 fi
22380 done
22381  }
22382 echo "$as_me:22382: checking if poll really works" >&5
22383 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22384 if test "${cf_cv_working_poll+set}" = set; then
22385   echo $ECHO_N "(cached) $ECHO_C" >&6
22386 else
22387
22388 if test "$cross_compiling" = yes; then
22389   cf_cv_working_poll=unknown
22390 else
22391   cat >"conftest.$ac_ext" <<_ACEOF
22392 #line 22392 "configure"
22393 #include "confdefs.h"
22394
22395 #include <stdlib.h>
22396 #include <stdio.h>
22397 #include <unistd.h>
22398 #include <fcntl.h>
22399 #ifdef HAVE_POLL_H
22400 #include <poll.h>
22401 #else
22402 #include <sys/poll.h>
22403 #endif
22404 int main(void) {
22405         struct pollfd myfds;
22406         int ret;
22407
22408         /* check for Darwin bug with respect to "devices" */
22409         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22410         if (myfds.fd < 0)
22411                 myfds.fd = 0;
22412         myfds.events = POLLIN;
22413         myfds.revents = 0;
22414
22415         ret = poll(&myfds, 1, 100);
22416
22417         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22418                 ret = -1;
22419         } else {
22420                 int fd = 0;
22421                 if (!isatty(fd)) {
22422                         fd = open("/dev/tty", 2);       /* O_RDWR */
22423                 }
22424 #ifdef HAVE_POSIX_OPENPT
22425                 if (fd < 0) {
22426                         fd = posix_openpt(O_RDWR);
22427                 }
22428 #endif
22429
22430                 if (fd >= 0) {
22431                         /* also check with standard input */
22432                         myfds.fd = fd;
22433                         myfds.events = POLLIN;
22434                         myfds.revents = 0;
22435                         ret = poll(&myfds, 1, 100);
22436                 } else {
22437                         ret = -1;
22438                 }
22439         }
22440         ${cf_cv_main_return:-return}(ret < 0);
22441 }
22442 _ACEOF
22443 rm -f "conftest$ac_exeext"
22444 if { (eval echo "$as_me:22444: \"$ac_link\"") >&5
22445   (eval $ac_link) 2>&5
22446   ac_status=$?
22447   echo "$as_me:22447: \$? = $ac_status" >&5
22448   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22449   { (eval echo "$as_me:22449: \"$ac_try\"") >&5
22450   (eval $ac_try) 2>&5
22451   ac_status=$?
22452   echo "$as_me:22452: \$? = $ac_status" >&5
22453   (exit "$ac_status"); }; }; then
22454   cf_cv_working_poll=yes
22455 else
22456   echo "$as_me: program exited with status $ac_status" >&5
22457 echo "$as_me: failed program was:" >&5
22458 cat "conftest.$ac_ext" >&5
22459 cf_cv_working_poll=no
22460 fi
22461 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22462 fi
22463 fi
22464 echo "$as_me:22464: result: $cf_cv_working_poll" >&5
22465 echo "${ECHO_T}$cf_cv_working_poll" >&6
22466 test "$cf_cv_working_poll" = "yes" &&
22467 cat >>confdefs.h <<\EOF
22468 #define HAVE_WORKING_POLL 1
22469 EOF
22470
22471 echo "$as_me:22471: checking for va_copy" >&5
22472 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22473 if test "${cf_cv_have_va_copy+set}" = set; then
22474   echo $ECHO_N "(cached) $ECHO_C" >&6
22475 else
22476
22477 cat >"conftest.$ac_ext" <<_ACEOF
22478 #line 22478 "configure"
22479 #include "confdefs.h"
22480
22481 #include <stdarg.h>
22482
22483 int
22484 main (void)
22485 {
22486
22487         static va_list dst;
22488         static va_list src;
22489         va_copy(dst, src)
22490   ;
22491   return 0;
22492 }
22493 _ACEOF
22494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22495 if { (eval echo "$as_me:22495: \"$ac_link\"") >&5
22496   (eval $ac_link) 2>&5
22497   ac_status=$?
22498   echo "$as_me:22498: \$? = $ac_status" >&5
22499   (exit "$ac_status"); } &&
22500          { ac_try='test -s "conftest$ac_exeext"'
22501   { (eval echo "$as_me:22501: \"$ac_try\"") >&5
22502   (eval $ac_try) 2>&5
22503   ac_status=$?
22504   echo "$as_me:22504: \$? = $ac_status" >&5
22505   (exit "$ac_status"); }; }; then
22506   cf_cv_have_va_copy=yes
22507 else
22508   echo "$as_me: failed program was:" >&5
22509 cat "conftest.$ac_ext" >&5
22510 cf_cv_have_va_copy=no
22511 fi
22512 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22513 fi
22514 echo "$as_me:22514: result: $cf_cv_have_va_copy" >&5
22515 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22516
22517 if test "$cf_cv_have_va_copy" = yes;
22518 then
22519
22520 cat >>confdefs.h <<\EOF
22521 #define HAVE_VA_COPY 1
22522 EOF
22523
22524 else # !cf_cv_have_va_copy
22525
22526 echo "$as_me:22526: checking for __va_copy" >&5
22527 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22528 if test "${cf_cv_have___va_copy+set}" = set; then
22529   echo $ECHO_N "(cached) $ECHO_C" >&6
22530 else
22531
22532 cat >"conftest.$ac_ext" <<_ACEOF
22533 #line 22533 "configure"
22534 #include "confdefs.h"
22535
22536 #include <stdarg.h>
22537
22538 int
22539 main (void)
22540 {
22541
22542         static va_list dst;
22543         static va_list src;
22544         __va_copy(dst, src)
22545   ;
22546   return 0;
22547 }
22548 _ACEOF
22549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22550 if { (eval echo "$as_me:22550: \"$ac_link\"") >&5
22551   (eval $ac_link) 2>&5
22552   ac_status=$?
22553   echo "$as_me:22553: \$? = $ac_status" >&5
22554   (exit "$ac_status"); } &&
22555          { ac_try='test -s "conftest$ac_exeext"'
22556   { (eval echo "$as_me:22556: \"$ac_try\"") >&5
22557   (eval $ac_try) 2>&5
22558   ac_status=$?
22559   echo "$as_me:22559: \$? = $ac_status" >&5
22560   (exit "$ac_status"); }; }; then
22561   cf_cv_have___va_copy=yes
22562 else
22563   echo "$as_me: failed program was:" >&5
22564 cat "conftest.$ac_ext" >&5
22565 cf_cv_have___va_copy=no
22566 fi
22567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22568 fi
22569 echo "$as_me:22569: result: $cf_cv_have___va_copy" >&5
22570 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22571
22572 if test "$cf_cv_have___va_copy" = yes
22573 then
22574
22575 cat >>confdefs.h <<\EOF
22576 #define HAVE___VA_COPY 1
22577 EOF
22578
22579 else # !cf_cv_have___va_copy
22580
22581 echo "$as_me:22581: checking for __builtin_va_copy" >&5
22582 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22583 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22584   echo $ECHO_N "(cached) $ECHO_C" >&6
22585 else
22586
22587 cat >"conftest.$ac_ext" <<_ACEOF
22588 #line 22588 "configure"
22589 #include "confdefs.h"
22590
22591 #include <stdarg.h>
22592
22593 int
22594 main (void)
22595 {
22596
22597         static va_list dst;
22598         static va_list src;
22599         __builtin_va_copy(dst, src)
22600   ;
22601   return 0;
22602 }
22603 _ACEOF
22604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22605 if { (eval echo "$as_me:22605: \"$ac_link\"") >&5
22606   (eval $ac_link) 2>&5
22607   ac_status=$?
22608   echo "$as_me:22608: \$? = $ac_status" >&5
22609   (exit "$ac_status"); } &&
22610          { ac_try='test -s "conftest$ac_exeext"'
22611   { (eval echo "$as_me:22611: \"$ac_try\"") >&5
22612   (eval $ac_try) 2>&5
22613   ac_status=$?
22614   echo "$as_me:22614: \$? = $ac_status" >&5
22615   (exit "$ac_status"); }; }; then
22616   cf_cv_have___builtin_va_copy=yes
22617 else
22618   echo "$as_me: failed program was:" >&5
22619 cat "conftest.$ac_ext" >&5
22620 cf_cv_have___builtin_va_copy=no
22621 fi
22622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22623 fi
22624 echo "$as_me:22624: result: $cf_cv_have___builtin_va_copy" >&5
22625 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22626
22627 test "$cf_cv_have___builtin_va_copy" = yes &&
22628
22629 cat >>confdefs.h <<\EOF
22630 #define HAVE___BUILTIN_VA_COPY 1
22631 EOF
22632
22633 fi # cf_cv_have___va_copy
22634
22635 fi # cf_cv_have_va_copy
22636
22637 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22638 (*yes*)
22639         ;;
22640
22641 (*)
22642         echo "$as_me:22642: checking if we can simply copy va_list" >&5
22643 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22644 if test "${cf_cv_pointer_va_list+set}" = set; then
22645   echo $ECHO_N "(cached) $ECHO_C" >&6
22646 else
22647
22648 cat >"conftest.$ac_ext" <<_ACEOF
22649 #line 22649 "configure"
22650 #include "confdefs.h"
22651
22652 #include <stdarg.h>
22653
22654 int
22655 main (void)
22656 {
22657
22658         va_list dst;
22659         va_list src;
22660         dst = src
22661   ;
22662   return 0;
22663 }
22664 _ACEOF
22665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22666 if { (eval echo "$as_me:22666: \"$ac_link\"") >&5
22667   (eval $ac_link) 2>&5
22668   ac_status=$?
22669   echo "$as_me:22669: \$? = $ac_status" >&5
22670   (exit "$ac_status"); } &&
22671          { ac_try='test -s "conftest$ac_exeext"'
22672   { (eval echo "$as_me:22672: \"$ac_try\"") >&5
22673   (eval $ac_try) 2>&5
22674   ac_status=$?
22675   echo "$as_me:22675: \$? = $ac_status" >&5
22676   (exit "$ac_status"); }; }; then
22677   cf_cv_pointer_va_list=yes
22678 else
22679   echo "$as_me: failed program was:" >&5
22680 cat "conftest.$ac_ext" >&5
22681 cf_cv_pointer_va_list=no
22682 fi
22683 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22684 fi
22685 echo "$as_me:22685: result: $cf_cv_pointer_va_list" >&5
22686 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22687
22688         if test "$cf_cv_pointer_va_list" = no
22689         then
22690                 echo "$as_me:22690: checking if we can copy va_list indirectly" >&5
22691 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22692 if test "${cf_cv_array_va_list+set}" = set; then
22693   echo $ECHO_N "(cached) $ECHO_C" >&6
22694 else
22695
22696 cat >"conftest.$ac_ext" <<_ACEOF
22697 #line 22697 "configure"
22698 #include "confdefs.h"
22699
22700 #include <stdarg.h>
22701
22702 int
22703 main (void)
22704 {
22705
22706         va_list dst;
22707         va_list src;
22708         *dst = *src
22709   ;
22710   return 0;
22711 }
22712 _ACEOF
22713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22714 if { (eval echo "$as_me:22714: \"$ac_link\"") >&5
22715   (eval $ac_link) 2>&5
22716   ac_status=$?
22717   echo "$as_me:22717: \$? = $ac_status" >&5
22718   (exit "$ac_status"); } &&
22719          { ac_try='test -s "conftest$ac_exeext"'
22720   { (eval echo "$as_me:22720: \"$ac_try\"") >&5
22721   (eval $ac_try) 2>&5
22722   ac_status=$?
22723   echo "$as_me:22723: \$? = $ac_status" >&5
22724   (exit "$ac_status"); }; }; then
22725   cf_cv_array_va_list=yes
22726 else
22727   echo "$as_me: failed program was:" >&5
22728 cat "conftest.$ac_ext" >&5
22729 cf_cv_array_va_list=no
22730 fi
22731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22732 fi
22733 echo "$as_me:22733: result: $cf_cv_array_va_list" >&5
22734 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22735                 test "$cf_cv_array_va_list" = yes &&
22736 cat >>confdefs.h <<\EOF
22737 #define ARRAY_VA_LIST 1
22738 EOF
22739
22740         fi
22741         ;;
22742 esac
22743
22744 echo "$as_me:22744: checking for pid_t" >&5
22745 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22746 if test "${ac_cv_type_pid_t+set}" = set; then
22747   echo $ECHO_N "(cached) $ECHO_C" >&6
22748 else
22749   cat >"conftest.$ac_ext" <<_ACEOF
22750 #line 22750 "configure"
22751 #include "confdefs.h"
22752 $ac_includes_default
22753 int
22754 main (void)
22755 {
22756 if ((pid_t *) 0)
22757   return 0;
22758 if (sizeof (pid_t))
22759   return 0;
22760   ;
22761   return 0;
22762 }
22763 _ACEOF
22764 rm -f "conftest.$ac_objext"
22765 if { (eval echo "$as_me:22765: \"$ac_compile\"") >&5
22766   (eval $ac_compile) 2>&5
22767   ac_status=$?
22768   echo "$as_me:22768: \$? = $ac_status" >&5
22769   (exit "$ac_status"); } &&
22770          { ac_try='test -s "conftest.$ac_objext"'
22771   { (eval echo "$as_me:22771: \"$ac_try\"") >&5
22772   (eval $ac_try) 2>&5
22773   ac_status=$?
22774   echo "$as_me:22774: \$? = $ac_status" >&5
22775   (exit "$ac_status"); }; }; then
22776   ac_cv_type_pid_t=yes
22777 else
22778   echo "$as_me: failed program was:" >&5
22779 cat "conftest.$ac_ext" >&5
22780 ac_cv_type_pid_t=no
22781 fi
22782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22783 fi
22784 echo "$as_me:22784: result: $ac_cv_type_pid_t" >&5
22785 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22786 if test "$ac_cv_type_pid_t" = yes; then
22787   :
22788 else
22789
22790 cat >>confdefs.h <<EOF
22791 #define pid_t int
22792 EOF
22793
22794 fi
22795
22796 for ac_header in unistd.h vfork.h
22797 do
22798 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22799 echo "$as_me:22799: checking for $ac_header" >&5
22800 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22801 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22802   echo $ECHO_N "(cached) $ECHO_C" >&6
22803 else
22804   cat >"conftest.$ac_ext" <<_ACEOF
22805 #line 22805 "configure"
22806 #include "confdefs.h"
22807 #include <$ac_header>
22808 _ACEOF
22809 if { (eval echo "$as_me:22809: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22810   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22811   ac_status=$?
22812   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22813   rm -f conftest.er1
22814   cat conftest.err >&5
22815   echo "$as_me:22815: \$? = $ac_status" >&5
22816   (exit "$ac_status"); } >/dev/null; then
22817   if test -s conftest.err; then
22818     ac_cpp_err=$ac_c_preproc_warn_flag
22819   else
22820     ac_cpp_err=
22821   fi
22822 else
22823   ac_cpp_err=yes
22824 fi
22825 if test -z "$ac_cpp_err"; then
22826   eval "$as_ac_Header=yes"
22827 else
22828   echo "$as_me: failed program was:" >&5
22829   cat "conftest.$ac_ext" >&5
22830   eval "$as_ac_Header=no"
22831 fi
22832 rm -f conftest.err "conftest.$ac_ext"
22833 fi
22834 echo "$as_me:22834: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22835 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22836 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22837   cat >>confdefs.h <<EOF
22838 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22839 EOF
22840
22841 fi
22842 done
22843
22844 for ac_func in fork vfork
22845 do
22846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22847 echo "$as_me:22847: checking for $ac_func" >&5
22848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22849 if eval "test \"\${$as_ac_var+set}\" = set"; then
22850   echo $ECHO_N "(cached) $ECHO_C" >&6
22851 else
22852   cat >"conftest.$ac_ext" <<_ACEOF
22853 #line 22853 "configure"
22854 #include "confdefs.h"
22855 #define $ac_func autoconf_temporary
22856 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22857 #undef $ac_func
22858
22859 #ifdef __cplusplus
22860 extern "C"
22861 #endif
22862
22863 /* We use char because int might match the return type of a gcc2
22864    builtin and then its argument prototype would still apply.  */
22865 char $ac_func (void);
22866
22867 int
22868 main (void)
22869 {
22870
22871 /* The GNU C library defines stubs for functions which it implements
22872     to always fail with ENOSYS.  Some functions are actually named
22873     something starting with __ and the normal name is an alias.  */
22874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22875 #error found stub for $ac_func
22876 #endif
22877
22878         return $ac_func ();
22879   ;
22880   return 0;
22881 }
22882 _ACEOF
22883 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22884 if { (eval echo "$as_me:22884: \"$ac_link\"") >&5
22885   (eval $ac_link) 2>&5
22886   ac_status=$?
22887   echo "$as_me:22887: \$? = $ac_status" >&5
22888   (exit "$ac_status"); } &&
22889          { ac_try='test -s "conftest$ac_exeext"'
22890   { (eval echo "$as_me:22890: \"$ac_try\"") >&5
22891   (eval $ac_try) 2>&5
22892   ac_status=$?
22893   echo "$as_me:22893: \$? = $ac_status" >&5
22894   (exit "$ac_status"); }; }; then
22895   eval "$as_ac_var=yes"
22896 else
22897   echo "$as_me: failed program was:" >&5
22898 cat "conftest.$ac_ext" >&5
22899 eval "$as_ac_var=no"
22900 fi
22901 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22902 fi
22903 echo "$as_me:22903: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22904 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22905 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22906   cat >>confdefs.h <<EOF
22907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22908 EOF
22909
22910 fi
22911 done
22912
22913 ac_cv_func_fork_works=$ac_cv_func_fork
22914 if test "x$ac_cv_func_fork" = xyes; then
22915   echo "$as_me:22915: checking for working fork" >&5
22916 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22917 if test "${ac_cv_func_fork_works+set}" = set; then
22918   echo $ECHO_N "(cached) $ECHO_C" >&6
22919 else
22920   if test "$cross_compiling" = yes; then
22921   ac_cv_func_fork_works=cross
22922 else
22923   cat >"conftest.$ac_ext" <<_ACEOF
22924 /* By Rüdiger Kuhlmann. */
22925       #include <sys/types.h>
22926       #if HAVE_UNISTD_H
22927       # include <unistd.h>
22928       #endif
22929       /* Some systems only have a dummy stub for fork() */
22930       int main (void)
22931       {
22932         if (fork() < 0)
22933           $ac_main_return (1);
22934         $ac_main_return (0);
22935       }
22936 _ACEOF
22937 rm -f "conftest$ac_exeext"
22938 if { (eval echo "$as_me:22938: \"$ac_link\"") >&5
22939   (eval $ac_link) 2>&5
22940   ac_status=$?
22941   echo "$as_me:22941: \$? = $ac_status" >&5
22942   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22943   { (eval echo "$as_me:22943: \"$ac_try\"") >&5
22944   (eval $ac_try) 2>&5
22945   ac_status=$?
22946   echo "$as_me:22946: \$? = $ac_status" >&5
22947   (exit "$ac_status"); }; }; then
22948   ac_cv_func_fork_works=yes
22949 else
22950   echo "$as_me: program exited with status $ac_status" >&5
22951 echo "$as_me: failed program was:" >&5
22952 cat "conftest.$ac_ext" >&5
22953 ac_cv_func_fork_works=no
22954 fi
22955 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22956 fi
22957 fi
22958 echo "$as_me:22958: result: $ac_cv_func_fork_works" >&5
22959 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22960
22961 fi
22962 if test "x$ac_cv_func_fork_works" = xcross; then
22963   case $host in
22964     *-*-amigaos* | *-*-msdosdjgpp*)
22965       # Override, as these systems have only a dummy fork() stub
22966       ac_cv_func_fork_works=no
22967       ;;
22968     *)
22969       ac_cv_func_fork_works=yes
22970       ;;
22971   esac
22972   { echo "$as_me:22972: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22973 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22974 fi
22975 ac_cv_func_vfork_works=$ac_cv_func_vfork
22976 if test "x$ac_cv_func_vfork" = xyes; then
22977   echo "$as_me:22977: checking for working vfork" >&5
22978 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22979 if test "${ac_cv_func_vfork_works+set}" = set; then
22980   echo $ECHO_N "(cached) $ECHO_C" >&6
22981 else
22982   if test "$cross_compiling" = yes; then
22983   ac_cv_func_vfork_works=cross
22984 else
22985   cat >"conftest.$ac_ext" <<_ACEOF
22986 #line 22986 "configure"
22987 #include "confdefs.h"
22988 /* Thanks to Paul Eggert for this test.  */
22989 #include <stdio.h>
22990 #include <sys/types.h>
22991 #include <sys/stat.h>
22992 #if HAVE_UNISTD_H
22993 # include <unistd.h>
22994 #endif
22995 #if HAVE_VFORK_H
22996 # include <vfork.h>
22997 #endif
22998 /* On some sparc systems, changes by the child to local and incoming
22999    argument registers are propagated back to the parent.  The compiler
23000    is told about this with #include <vfork.h>, but some compilers
23001    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23002    static variable whose address is put into a register that is
23003    clobbered by the vfork.  */
23004 static
23005 #ifdef __cplusplus
23006 sparc_address_test (int arg)
23007 # else
23008 sparc_address_test (arg) int arg;
23009 #endif
23010 {
23011   static pid_t child;
23012   if (!child) {
23013     child = vfork ();
23014     if (child < 0) {
23015       perror ("vfork");
23016       _exit(2);
23017     }
23018     if (!child) {
23019       arg = getpid();
23020       write(-1, "", 0);
23021       _exit (arg);
23022     }
23023   }
23024 }
23025
23026 int
23027 main (void)
23028 {
23029   pid_t parent = getpid ();
23030   pid_t child;
23031
23032   sparc_address_test ();
23033
23034   child = vfork ();
23035
23036   if (child == 0) {
23037     /* Here is another test for sparc vfork register problems.  This
23038        test uses lots of local variables, at least as many local
23039        variables as main has allocated so far including compiler
23040        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23041        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23042        reuse the register of parent for one of the local variables,
23043        since it will think that parent can't possibly be used any more
23044        in this routine.  Assigning to the local variable will thus
23045        munge parent in the parent process.  */
23046     pid_t
23047       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23048       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23049     /* Convince the compiler that p..p7 are live; otherwise, it might
23050        use the same hardware register for all 8 local variables.  */
23051     if (p != p1 || p != p2 || p != p3 || p != p4
23052         || p != p5 || p != p6 || p != p7)
23053       _exit(1);
23054
23055     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23056        from child file descriptors.  If the child closes a descriptor
23057        before it execs or exits, this munges the parent's descriptor
23058        as well.  Test for this by closing stdout in the child.  */
23059     _exit(close(fileno(stdout)) != 0);
23060   } else {
23061     int status;
23062     struct stat st;
23063
23064     while (wait(&status) != child)
23065       ;
23066     $ac_main_return(
23067          /* Was there some problem with vforking?  */
23068          child < 0
23069
23070          /* Did the child fail?  (This shouldn't happen.)  */
23071          || status
23072
23073          /* Did the vfork/compiler bug occur?  */
23074          || parent != getpid()
23075
23076          /* Did the file descriptor bug occur?  */
23077          || fstat(fileno(stdout), &st) != 0
23078          );
23079   }
23080 }
23081 _ACEOF
23082 rm -f "conftest$ac_exeext"
23083 if { (eval echo "$as_me:23083: \"$ac_link\"") >&5
23084   (eval $ac_link) 2>&5
23085   ac_status=$?
23086   echo "$as_me:23086: \$? = $ac_status" >&5
23087   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23088   { (eval echo "$as_me:23088: \"$ac_try\"") >&5
23089   (eval $ac_try) 2>&5
23090   ac_status=$?
23091   echo "$as_me:23091: \$? = $ac_status" >&5
23092   (exit "$ac_status"); }; }; then
23093   ac_cv_func_vfork_works=yes
23094 else
23095   echo "$as_me: program exited with status $ac_status" >&5
23096 echo "$as_me: failed program was:" >&5
23097 cat "conftest.$ac_ext" >&5
23098 ac_cv_func_vfork_works=no
23099 fi
23100 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23101 fi
23102 fi
23103 echo "$as_me:23103: result: $ac_cv_func_vfork_works" >&5
23104 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23105
23106 fi;
23107 if test "x$ac_cv_func_fork_works" = xcross; then
23108   ac_cv_func_vfork_works=ac_cv_func_vfork
23109   { echo "$as_me:23109: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23110 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23111 fi
23112
23113 if test "x$ac_cv_func_vfork_works" = xyes; then
23114
23115 cat >>confdefs.h <<\EOF
23116 #define HAVE_WORKING_VFORK 1
23117 EOF
23118
23119 else
23120
23121 cat >>confdefs.h <<\EOF
23122 #define vfork fork
23123 EOF
23124
23125 fi
23126 if test "x$ac_cv_func_fork_works" = xyes; then
23127
23128 cat >>confdefs.h <<\EOF
23129 #define HAVE_WORKING_FORK 1
23130 EOF
23131
23132 fi
23133
23134 echo "$as_me:23134: checking if fopen accepts explicit binary mode" >&5
23135 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23136 if test "${cf_cv_fopen_bin_r+set}" = set; then
23137   echo $ECHO_N "(cached) $ECHO_C" >&6
23138 else
23139
23140         if test "$cross_compiling" = yes; then
23141   cf_cv_fopen_bin_r=unknown
23142 else
23143   cat >"conftest.$ac_ext" <<_ACEOF
23144 #line 23144 "configure"
23145 #include "confdefs.h"
23146
23147 #include <stdio.h>
23148 int main(void) {
23149         FILE *fp = fopen("conftest.tmp", "wb");
23150         int rc = 0;
23151         if (fp != 0) {
23152                 int p, q;
23153                 for (p = 0; p < 256; ++p) {
23154                         fputc(p, fp);
23155                 }
23156                 fclose(fp);
23157                 fp = fopen("conftest.tmp", "rb");
23158                 if (fp != 0) {
23159                         for (p = 0; p < 256; ++p) {
23160                                 q = fgetc(fp);
23161                                 if (q != p) {
23162                                         rc = 1;
23163                                         break;
23164                                 }
23165                         }
23166                 } else {
23167                         rc = 1;
23168                 }
23169         } else {
23170                 rc = 1;
23171         }
23172         ${cf_cv_main_return:-return} (rc);
23173 }
23174
23175 _ACEOF
23176 rm -f "conftest$ac_exeext"
23177 if { (eval echo "$as_me:23177: \"$ac_link\"") >&5
23178   (eval $ac_link) 2>&5
23179   ac_status=$?
23180   echo "$as_me:23180: \$? = $ac_status" >&5
23181   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23182   { (eval echo "$as_me:23182: \"$ac_try\"") >&5
23183   (eval $ac_try) 2>&5
23184   ac_status=$?
23185   echo "$as_me:23185: \$? = $ac_status" >&5
23186   (exit "$ac_status"); }; }; then
23187   cf_cv_fopen_bin_r=yes
23188 else
23189   echo "$as_me: program exited with status $ac_status" >&5
23190 echo "$as_me: failed program was:" >&5
23191 cat "conftest.$ac_ext" >&5
23192 cf_cv_fopen_bin_r=no
23193 fi
23194 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23195 fi
23196
23197 fi
23198 echo "$as_me:23198: result: $cf_cv_fopen_bin_r" >&5
23199 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23200 test "x$cf_cv_fopen_bin_r" != xno &&
23201 cat >>confdefs.h <<\EOF
23202 #define USE_FOPEN_BIN_R 1
23203 EOF
23204
23205 # special check for test/ditto.c
23206
23207 echo "$as_me:23207: checking for openpty in -lutil" >&5
23208 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23209 if test "${ac_cv_lib_util_openpty+set}" = set; then
23210   echo $ECHO_N "(cached) $ECHO_C" >&6
23211 else
23212   ac_check_lib_save_LIBS=$LIBS
23213 LIBS="-lutil  $LIBS"
23214 cat >"conftest.$ac_ext" <<_ACEOF
23215 #line 23215 "configure"
23216 #include "confdefs.h"
23217
23218 /* Override any gcc2 internal prototype to avoid an error.  */
23219 #ifdef __cplusplus
23220 extern "C"
23221 #endif
23222 /* We use char because int might match the return type of a gcc2
23223    builtin and then its argument prototype would still apply.  */
23224 char openpty ();
23225 int
23226 main (void)
23227 {
23228 openpty ();
23229   ;
23230   return 0;
23231 }
23232 _ACEOF
23233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23234 if { (eval echo "$as_me:23234: \"$ac_link\"") >&5
23235   (eval $ac_link) 2>&5
23236   ac_status=$?
23237   echo "$as_me:23237: \$? = $ac_status" >&5
23238   (exit "$ac_status"); } &&
23239          { ac_try='test -s "conftest$ac_exeext"'
23240   { (eval echo "$as_me:23240: \"$ac_try\"") >&5
23241   (eval $ac_try) 2>&5
23242   ac_status=$?
23243   echo "$as_me:23243: \$? = $ac_status" >&5
23244   (exit "$ac_status"); }; }; then
23245   ac_cv_lib_util_openpty=yes
23246 else
23247   echo "$as_me: failed program was:" >&5
23248 cat "conftest.$ac_ext" >&5
23249 ac_cv_lib_util_openpty=no
23250 fi
23251 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23252 LIBS=$ac_check_lib_save_LIBS
23253 fi
23254 echo "$as_me:23254: result: $ac_cv_lib_util_openpty" >&5
23255 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23256 if test "$ac_cv_lib_util_openpty" = yes; then
23257   cf_cv_lib_util=yes
23258 else
23259   cf_cv_lib_util=no
23260 fi
23261
23262 echo "$as_me:23262: checking for openpty header" >&5
23263 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23264 if test "${cf_cv_func_openpty+set}" = set; then
23265   echo $ECHO_N "(cached) $ECHO_C" >&6
23266 else
23267
23268         cf_save_LIBS="$LIBS"
23269         test "$cf_cv_lib_util" = yes && {
23270 cf_add_libs="$LIBS"
23271 # reverse order
23272 cf_add_0lib=
23273 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23274 # filter duplicates
23275 for cf_add_1lib in $cf_add_0lib; do
23276         for cf_add_2lib in $cf_add_libs; do
23277                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23278                         cf_add_1lib=
23279                         break
23280                 fi
23281         done
23282         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23283 done
23284 LIBS="$cf_add_libs"
23285  }
23286         for cf_header in pty.h libutil.h util.h
23287         do
23288         cat >"conftest.$ac_ext" <<_ACEOF
23289 #line 23289 "configure"
23290 #include "confdefs.h"
23291
23292 #include <$cf_header>
23293
23294 int
23295 main (void)
23296 {
23297
23298         int x = openpty((int *)0, (int *)0, (char *)0,
23299                                    (struct termios *)0, (struct winsize *)0);
23300
23301   ;
23302   return 0;
23303 }
23304 _ACEOF
23305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23306 if { (eval echo "$as_me:23306: \"$ac_link\"") >&5
23307   (eval $ac_link) 2>&5
23308   ac_status=$?
23309   echo "$as_me:23309: \$? = $ac_status" >&5
23310   (exit "$ac_status"); } &&
23311          { ac_try='test -s "conftest$ac_exeext"'
23312   { (eval echo "$as_me:23312: \"$ac_try\"") >&5
23313   (eval $ac_try) 2>&5
23314   ac_status=$?
23315   echo "$as_me:23315: \$? = $ac_status" >&5
23316   (exit "$ac_status"); }; }; then
23317
23318                 cf_cv_func_openpty=$cf_header
23319                 break
23320
23321 else
23322   echo "$as_me: failed program was:" >&5
23323 cat "conftest.$ac_ext" >&5
23324
23325                 cf_cv_func_openpty=no
23326
23327 fi
23328 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23329         done
23330         LIBS="$cf_save_LIBS"
23331
23332 fi
23333 echo "$as_me:23333: result: $cf_cv_func_openpty" >&5
23334 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23335
23336 if test "$cf_cv_func_openpty" != no ; then
23337
23338 cat >>confdefs.h <<EOF
23339 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23340 EOF
23341
23342 cat >>confdefs.h <<\EOF
23343 #define USE_XTERM_PTY 1
23344 EOF
23345
23346         if test "x$cf_cv_lib_util" = xyes ; then
23347
23348 cf_add_libs="$TEST_LIBS"
23349 # reverse order
23350 cf_add_0lib=
23351 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23352 # filter duplicates
23353 for cf_add_1lib in $cf_add_0lib; do
23354         for cf_add_2lib in $cf_add_libs; do
23355                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23356                         cf_add_1lib=
23357                         break
23358                 fi
23359         done
23360         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23361 done
23362 TEST_LIBS="$cf_add_libs"
23363
23364         fi
23365 fi
23366
23367 if test "$with_hashed_db" != no ; then
23368
23369 cat >>confdefs.h <<\EOF
23370 #define USE_HASHED_DB 1
23371 EOF
23372
23373 case $with_hashed_db in
23374 (yes|*able*)
23375         ;;
23376 (*)
23377         if test -d "$with_hashed_db" ; then
23378
23379 if test -n "$with_hashed_db/include" ; then
23380   for cf_add_incdir in $with_hashed_db/include
23381   do
23382         while test "$cf_add_incdir" != /usr/include
23383         do
23384           if test -d "$cf_add_incdir"
23385           then
23386                 cf_have_incdir=no
23387                 if test -n "$CFLAGS$CPPFLAGS" ; then
23388                   # a loop is needed to ensure we can add subdirs of existing dirs
23389                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23390                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23391                           cf_have_incdir=yes; break
23392                         fi
23393                   done
23394                 fi
23395
23396                 if test "$cf_have_incdir" = no ; then
23397                   if test "$cf_add_incdir" = /usr/local/include ; then
23398                         if test "$GCC" = yes
23399                         then
23400                           cf_save_CPPFLAGS=$CPPFLAGS
23401
23402         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23403         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23404
23405                           cat >"conftest.$ac_ext" <<_ACEOF
23406 #line 23406 "configure"
23407 #include "confdefs.h"
23408 #include <stdio.h>
23409 int
23410 main (void)
23411 {
23412 printf("Hello")
23413   ;
23414   return 0;
23415 }
23416 _ACEOF
23417 rm -f "conftest.$ac_objext"
23418 if { (eval echo "$as_me:23418: \"$ac_compile\"") >&5
23419   (eval $ac_compile) 2>&5
23420   ac_status=$?
23421   echo "$as_me:23421: \$? = $ac_status" >&5
23422   (exit "$ac_status"); } &&
23423          { ac_try='test -s "conftest.$ac_objext"'
23424   { (eval echo "$as_me:23424: \"$ac_try\"") >&5
23425   (eval $ac_try) 2>&5
23426   ac_status=$?
23427   echo "$as_me:23427: \$? = $ac_status" >&5
23428   (exit "$ac_status"); }; }; then
23429   :
23430 else
23431   echo "$as_me: failed program was:" >&5
23432 cat "conftest.$ac_ext" >&5
23433 cf_have_incdir=yes
23434 fi
23435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23436                           CPPFLAGS=$cf_save_CPPFLAGS
23437                         fi
23438                   fi
23439                 fi
23440
23441                 if test "$cf_have_incdir" = no ; then
23442                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23443
23444 echo "${as_me:-configure}:23444: testing adding $cf_add_incdir to include-path ..." 1>&5
23445
23446                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23447
23448                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23449                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23450                   cf_add_incdir="$cf_top_incdir"
23451                 else
23452                   break
23453                 fi
23454           else
23455                 break
23456           fi
23457         done
23458   done
23459 fi
23460
23461 if test -n "$with_hashed_db/lib" ; then
23462         for cf_add_libdir in $with_hashed_db/lib
23463         do
23464                 if test "$cf_add_libdir" = /usr/lib ; then
23465                         :
23466                 elif test -d "$cf_add_libdir"
23467                 then
23468                         cf_have_libdir=no
23469                         if test -n "$LDFLAGS$LIBS" ; then
23470                                 # a loop is needed to ensure we can add subdirs of existing dirs
23471                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23472                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23473                                                 cf_have_libdir=yes; break
23474                                         fi
23475                                 done
23476                         fi
23477                         if test "$cf_have_libdir" = no ; then
23478                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23479
23480 echo "${as_me:-configure}:23480: testing adding $cf_add_libdir to library-path ..." 1>&5
23481
23482                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23483                         fi
23484                 fi
23485         done
23486 fi
23487
23488         else
23489                 case "$with_hashed_db" in
23490                 (./*|../*|/*)
23491                         { echo "$as_me:23491: WARNING: no such directory $with_hashed_db" >&5
23492 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23493                         ;;
23494                 (*)
23495
23496 cf_search=
23497
23498 test "x$prefix" != "xNONE" && \
23499 test -d "$prefix" && \
23500  {
23501         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23502         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23503         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23504         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23505         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23506         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23507 }
23508
23509 for cf_subdir_prefix in \
23510         /usr \
23511         /usr/local \
23512         /usr/pkg \
23513         /opt \
23514         /opt/local \
23515         $HOME
23516 do
23517
23518 test "x$cf_subdir_prefix" != "x$prefix" && \
23519 test -d "$cf_subdir_prefix" && \
23520 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23521         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23522         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23523         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23524         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23525         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23526         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"
23527 }
23528
23529 done
23530
23531         for cf_item in $cf_search
23532         do
23533                 case "$cf_item" in
23534                 (*/$with_hashed_db)
23535
23536 if test -n "$cf_item" ; then
23537   for cf_add_incdir in $cf_item
23538   do
23539         while test "$cf_add_incdir" != /usr/include
23540         do
23541           if test -d "$cf_add_incdir"
23542           then
23543                 cf_have_incdir=no
23544                 if test -n "$CFLAGS$CPPFLAGS" ; then
23545                   # a loop is needed to ensure we can add subdirs of existing dirs
23546                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23547                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23548                           cf_have_incdir=yes; break
23549                         fi
23550                   done
23551                 fi
23552
23553                 if test "$cf_have_incdir" = no ; then
23554                   if test "$cf_add_incdir" = /usr/local/include ; then
23555                         if test "$GCC" = yes
23556                         then
23557                           cf_save_CPPFLAGS=$CPPFLAGS
23558
23559         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23560         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23561
23562                           cat >"conftest.$ac_ext" <<_ACEOF
23563 #line 23563 "configure"
23564 #include "confdefs.h"
23565 #include <stdio.h>
23566 int
23567 main (void)
23568 {
23569 printf("Hello")
23570   ;
23571   return 0;
23572 }
23573 _ACEOF
23574 rm -f "conftest.$ac_objext"
23575 if { (eval echo "$as_me:23575: \"$ac_compile\"") >&5
23576   (eval $ac_compile) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit "$ac_status"); } &&
23580          { ac_try='test -s "conftest.$ac_objext"'
23581   { (eval echo "$as_me:23581: \"$ac_try\"") >&5
23582   (eval $ac_try) 2>&5
23583   ac_status=$?
23584   echo "$as_me:23584: \$? = $ac_status" >&5
23585   (exit "$ac_status"); }; }; then
23586   :
23587 else
23588   echo "$as_me: failed program was:" >&5
23589 cat "conftest.$ac_ext" >&5
23590 cf_have_incdir=yes
23591 fi
23592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23593                           CPPFLAGS=$cf_save_CPPFLAGS
23594                         fi
23595                   fi
23596                 fi
23597
23598                 if test "$cf_have_incdir" = no ; then
23599                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23600
23601 echo "${as_me:-configure}:23601: testing adding $cf_add_incdir to include-path ..." 1>&5
23602
23603                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23604
23605                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23606                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23607                   cf_add_incdir="$cf_top_incdir"
23608                 else
23609                   break
23610                 fi
23611           else
23612                 break
23613           fi
23614         done
23615   done
23616 fi
23617
23618                         ;;
23619                 esac
23620         done
23621
23622 cf_search=
23623
23624 test "x$prefix" != "xNONE" && \
23625 test -d "$prefix" && \
23626  {
23627         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23628         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23629         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23630         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23631         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23632         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23633 }
23634
23635 for cf_subdir_prefix in \
23636         /usr \
23637         /usr/local \
23638         /usr/pkg \
23639         /opt \
23640         /opt/local \
23641         $HOME
23642 do
23643
23644 test "x$cf_subdir_prefix" != "x$prefix" && \
23645 test -d "$cf_subdir_prefix" && \
23646 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23647         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23648         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23649         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23650         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23651         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23652         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"
23653 }
23654
23655 done
23656
23657         for cf_item in $cf_search
23658         do
23659                 case "$cf_item" in
23660                 (*/$with_hashed_db)
23661
23662 if test -n "$cf_item" ; then
23663         for cf_add_libdir in $cf_item
23664         do
23665                 if test "$cf_add_libdir" = /usr/lib ; then
23666                         :
23667                 elif test -d "$cf_add_libdir"
23668                 then
23669                         cf_have_libdir=no
23670                         if test -n "$LDFLAGS$LIBS" ; then
23671                                 # a loop is needed to ensure we can add subdirs of existing dirs
23672                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23673                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23674                                                 cf_have_libdir=yes; break
23675                                         fi
23676                                 done
23677                         fi
23678                         if test "$cf_have_libdir" = no ; then
23679                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23680
23681 echo "${as_me:-configure}:23681: testing adding $cf_add_libdir to library-path ..." 1>&5
23682
23683                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23684                         fi
23685                 fi
23686         done
23687 fi
23688
23689                         ;;
23690                 esac
23691         done
23692
23693                         ;;
23694                 esac
23695         fi
23696 esac
23697
23698 echo "$as_me:23698: checking for db.h" >&5
23699 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23700 if test "${ac_cv_header_db_h+set}" = set; then
23701   echo $ECHO_N "(cached) $ECHO_C" >&6
23702 else
23703   cat >"conftest.$ac_ext" <<_ACEOF
23704 #line 23704 "configure"
23705 #include "confdefs.h"
23706 #include <db.h>
23707 _ACEOF
23708 if { (eval echo "$as_me:23708: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23709   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23710   ac_status=$?
23711   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23712   rm -f conftest.er1
23713   cat conftest.err >&5
23714   echo "$as_me:23714: \$? = $ac_status" >&5
23715   (exit "$ac_status"); } >/dev/null; then
23716   if test -s conftest.err; then
23717     ac_cpp_err=$ac_c_preproc_warn_flag
23718   else
23719     ac_cpp_err=
23720   fi
23721 else
23722   ac_cpp_err=yes
23723 fi
23724 if test -z "$ac_cpp_err"; then
23725   ac_cv_header_db_h=yes
23726 else
23727   echo "$as_me: failed program was:" >&5
23728   cat "conftest.$ac_ext" >&5
23729   ac_cv_header_db_h=no
23730 fi
23731 rm -f conftest.err "conftest.$ac_ext"
23732 fi
23733 echo "$as_me:23733: result: $ac_cv_header_db_h" >&5
23734 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23735 if test "$ac_cv_header_db_h" = yes; then
23736
23737 echo "$as_me:23737: checking for version of db" >&5
23738 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23739 if test "${cf_cv_hashed_db_version+set}" = set; then
23740   echo $ECHO_N "(cached) $ECHO_C" >&6
23741 else
23742
23743 cf_cv_hashed_db_version=unknown
23744
23745 for cf_db_version in 1 2 3 4 5 6
23746 do
23747
23748 echo "${as_me:-configure}:23748: testing checking for db version $cf_db_version ..." 1>&5
23749
23750         cat >"conftest.$ac_ext" <<_ACEOF
23751 #line 23751 "configure"
23752 #include "confdefs.h"
23753
23754 $ac_includes_default
23755 #include <db.h>
23756
23757 #ifdef DB_VERSION_MAJOR
23758         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23759 #if $cf_db_version == DB_VERSION_MAJOR
23760         /* ok */
23761 #else
23762         make an error
23763 #endif
23764 #else
23765 #if $cf_db_version == 1
23766         /* ok: assuming this is DB 1.8.5 */
23767 #else
23768         make an error
23769 #endif
23770 #endif
23771
23772 int
23773 main (void)
23774 {
23775 DBT *foo = 0
23776   ;
23777   return 0;
23778 }
23779 _ACEOF
23780 rm -f "conftest.$ac_objext"
23781 if { (eval echo "$as_me:23781: \"$ac_compile\"") >&5
23782   (eval $ac_compile) 2>&5
23783   ac_status=$?
23784   echo "$as_me:23784: \$? = $ac_status" >&5
23785   (exit "$ac_status"); } &&
23786          { ac_try='test -s "conftest.$ac_objext"'
23787   { (eval echo "$as_me:23787: \"$ac_try\"") >&5
23788   (eval $ac_try) 2>&5
23789   ac_status=$?
23790   echo "$as_me:23790: \$? = $ac_status" >&5
23791   (exit "$ac_status"); }; }; then
23792
23793         cf_cv_hashed_db_version=$cf_db_version
23794         break
23795
23796 else
23797   echo "$as_me: failed program was:" >&5
23798 cat "conftest.$ac_ext" >&5
23799 fi
23800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23801 done
23802
23803 fi
23804 echo "$as_me:23804: result: $cf_cv_hashed_db_version" >&5
23805 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23806
23807 if test "$cf_cv_hashed_db_version" = unknown ; then
23808         { { echo "$as_me:23808: error: Cannot determine version of db" >&5
23809 echo "$as_me: error: Cannot determine version of db" >&2;}
23810    { (exit 1); exit 1; }; }
23811 else
23812
23813 echo "$as_me:23813: checking for db libraries" >&5
23814 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23815 if test "${cf_cv_hashed_db_libs+set}" = set; then
23816   echo $ECHO_N "(cached) $ECHO_C" >&6
23817 else
23818
23819 cf_cv_hashed_db_libs=unknown
23820 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23821 do
23822         cf_save_libs="$LIBS"
23823         if test -n "$cf_db_libs"; then
23824
23825 cf_add_libs="$LIBS"
23826 # reverse order
23827 cf_add_0lib=
23828 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23829 # filter duplicates
23830 for cf_add_1lib in $cf_add_0lib; do
23831         for cf_add_2lib in $cf_add_libs; do
23832                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23833                         cf_add_1lib=
23834                         break
23835                 fi
23836         done
23837         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23838 done
23839 LIBS="$cf_add_libs"
23840
23841         fi
23842
23843 echo "${as_me:-configure}:23843: testing checking for library $cf_db_libs ..." 1>&5
23844
23845         cat >"conftest.$ac_ext" <<_ACEOF
23846 #line 23846 "configure"
23847 #include "confdefs.h"
23848
23849 $ac_includes_default
23850 #include <db.h>
23851
23852 int
23853 main (void)
23854 {
23855
23856         char *path = "/tmp/foo";
23857 #ifdef DB_VERSION_MAJOR
23858 #if DB_VERSION_MAJOR >= 4
23859         DB *result = 0;
23860         db_create(&result, NULL, 0);
23861         result->open(result,
23862                 NULL,
23863                 path,
23864                 path,
23865                 DB_HASH,
23866                 DB_CREATE,
23867                 0644);
23868 #elif DB_VERSION_MAJOR >= 3
23869         DB *result = 0;
23870         db_create(&result, NULL, 0);
23871         result->open(result,
23872                 path,
23873                 path,
23874                 DB_HASH,
23875                 DB_CREATE,
23876                 0644);
23877 #elif DB_VERSION_MAJOR >= 2
23878         DB *result = 0;
23879         db_open(path,
23880                 DB_HASH,
23881                 DB_CREATE,
23882                 0644,
23883                 (DB_ENV *) 0,
23884                 (DB_INFO *) 0,
23885                 &result);
23886 #endif /* DB_VERSION_MAJOR */
23887 #else
23888         DB *result = dbopen(path,
23889                      2,
23890                      0644,
23891                      DB_HASH,
23892                      0);
23893 #endif
23894         ${cf_cv_main_return:-return}(result != 0)
23895
23896   ;
23897   return 0;
23898 }
23899 _ACEOF
23900 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23901 if { (eval echo "$as_me:23901: \"$ac_link\"") >&5
23902   (eval $ac_link) 2>&5
23903   ac_status=$?
23904   echo "$as_me:23904: \$? = $ac_status" >&5
23905   (exit "$ac_status"); } &&
23906          { ac_try='test -s "conftest$ac_exeext"'
23907   { (eval echo "$as_me:23907: \"$ac_try\"") >&5
23908   (eval $ac_try) 2>&5
23909   ac_status=$?
23910   echo "$as_me:23910: \$? = $ac_status" >&5
23911   (exit "$ac_status"); }; }; then
23912
23913         if test -n "$cf_db_libs" ; then
23914                 cf_cv_hashed_db_libs=$cf_db_libs
23915         else
23916                 cf_cv_hashed_db_libs=default
23917         fi
23918         LIBS="$cf_save_libs"
23919         break
23920
23921 else
23922   echo "$as_me: failed program was:" >&5
23923 cat "conftest.$ac_ext" >&5
23924 fi
23925 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23926         LIBS="$cf_save_libs"
23927 done
23928
23929 fi
23930 echo "$as_me:23930: result: $cf_cv_hashed_db_libs" >&5
23931 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23932
23933         if test "$cf_cv_hashed_db_libs" = unknown ; then
23934                 { { echo "$as_me:23934: error: Cannot determine library for db" >&5
23935 echo "$as_me: error: Cannot determine library for db" >&2;}
23936    { (exit 1); exit 1; }; }
23937         elif test "$cf_cv_hashed_db_libs" != default ; then
23938
23939 cf_add_libs="$LIBS"
23940 # reverse order
23941 cf_add_0lib=
23942 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23943 # filter duplicates
23944 for cf_add_1lib in $cf_add_0lib; do
23945         for cf_add_2lib in $cf_add_libs; do
23946                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23947                         cf_add_1lib=
23948                         break
23949                 fi
23950         done
23951         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23952 done
23953 LIBS="$cf_add_libs"
23954
23955         fi
23956 fi
23957
23958 else
23959
23960         { { echo "$as_me:23960: error: Cannot find db.h" >&5
23961 echo "$as_me: error: Cannot find db.h" >&2;}
23962    { (exit 1); exit 1; }; }
23963
23964 fi
23965
23966 fi
23967
23968 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
23969         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
23970         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
23971 fi
23972
23973 # Just in case, check if the C compiler has a bool type.
23974
23975 echo "$as_me:23975: checking if we should include stdbool.h" >&5
23976 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23977
23978 if test "${cf_cv_header_stdbool_h+set}" = set; then
23979   echo $ECHO_N "(cached) $ECHO_C" >&6
23980 else
23981
23982         cat >"conftest.$ac_ext" <<_ACEOF
23983 #line 23983 "configure"
23984 #include "confdefs.h"
23985
23986 int
23987 main (void)
23988 {
23989 bool foo = false
23990   ;
23991   return 0;
23992 }
23993 _ACEOF
23994 rm -f "conftest.$ac_objext"
23995 if { (eval echo "$as_me:23995: \"$ac_compile\"") >&5
23996   (eval $ac_compile) 2>&5
23997   ac_status=$?
23998   echo "$as_me:23998: \$? = $ac_status" >&5
23999   (exit "$ac_status"); } &&
24000          { ac_try='test -s "conftest.$ac_objext"'
24001   { (eval echo "$as_me:24001: \"$ac_try\"") >&5
24002   (eval $ac_try) 2>&5
24003   ac_status=$?
24004   echo "$as_me:24004: \$? = $ac_status" >&5
24005   (exit "$ac_status"); }; }; then
24006   cf_cv_header_stdbool_h=0
24007 else
24008   echo "$as_me: failed program was:" >&5
24009 cat "conftest.$ac_ext" >&5
24010 cat >"conftest.$ac_ext" <<_ACEOF
24011 #line 24011 "configure"
24012 #include "confdefs.h"
24013
24014 #ifndef __BEOS__
24015 #include <stdbool.h>
24016 #endif
24017
24018 int
24019 main (void)
24020 {
24021 bool foo = false
24022   ;
24023   return 0;
24024 }
24025 _ACEOF
24026 rm -f "conftest.$ac_objext"
24027 if { (eval echo "$as_me:24027: \"$ac_compile\"") >&5
24028   (eval $ac_compile) 2>&5
24029   ac_status=$?
24030   echo "$as_me:24030: \$? = $ac_status" >&5
24031   (exit "$ac_status"); } &&
24032          { ac_try='test -s "conftest.$ac_objext"'
24033   { (eval echo "$as_me:24033: \"$ac_try\"") >&5
24034   (eval $ac_try) 2>&5
24035   ac_status=$?
24036   echo "$as_me:24036: \$? = $ac_status" >&5
24037   (exit "$ac_status"); }; }; then
24038   cf_cv_header_stdbool_h=1
24039 else
24040   echo "$as_me: failed program was:" >&5
24041 cat "conftest.$ac_ext" >&5
24042 cf_cv_header_stdbool_h=0
24043 fi
24044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24045 fi
24046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24047 fi
24048
24049 if test "$cf_cv_header_stdbool_h" = 1
24050 then    echo "$as_me:24050: result: yes" >&5
24051 echo "${ECHO_T}yes" >&6
24052 else    echo "$as_me:24052: result: no" >&5
24053 echo "${ECHO_T}no" >&6
24054 fi
24055
24056 echo "$as_me:24056: checking for builtin bool type" >&5
24057 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24058
24059 if test "${cf_cv_cc_bool_type+set}" = set; then
24060   echo $ECHO_N "(cached) $ECHO_C" >&6
24061 else
24062
24063         cat >"conftest.$ac_ext" <<_ACEOF
24064 #line 24064 "configure"
24065 #include "confdefs.h"
24066
24067 #include <stdio.h>
24068 #include <sys/types.h>
24069
24070 int
24071 main (void)
24072 {
24073 bool x = false
24074   ;
24075   return 0;
24076 }
24077 _ACEOF
24078 rm -f "conftest.$ac_objext"
24079 if { (eval echo "$as_me:24079: \"$ac_compile\"") >&5
24080   (eval $ac_compile) 2>&5
24081   ac_status=$?
24082   echo "$as_me:24082: \$? = $ac_status" >&5
24083   (exit "$ac_status"); } &&
24084          { ac_try='test -s "conftest.$ac_objext"'
24085   { (eval echo "$as_me:24085: \"$ac_try\"") >&5
24086   (eval $ac_try) 2>&5
24087   ac_status=$?
24088   echo "$as_me:24088: \$? = $ac_status" >&5
24089   (exit "$ac_status"); }; }; then
24090   cf_cv_cc_bool_type=1
24091 else
24092   echo "$as_me: failed program was:" >&5
24093 cat "conftest.$ac_ext" >&5
24094 cf_cv_cc_bool_type=0
24095 fi
24096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24097
24098 fi
24099
24100 if test "$cf_cv_cc_bool_type" = 1
24101 then    echo "$as_me:24101: result: yes" >&5
24102 echo "${ECHO_T}yes" >&6
24103 else    echo "$as_me:24103: result: no" >&5
24104 echo "${ECHO_T}no" >&6
24105 fi
24106
24107 # Check for C++ compiler characteristics (and ensure that it's there!)
24108 if test -n "$CXX" ; then
24109         ac_ext=cc
24110 ac_cpp='$CXXCPP $CPPFLAGS'
24111 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24112 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24113 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24114 ac_main_return="return"
24115
24116 if test -n "$GXX" ; then
24117
24118         cf_save="$LIBS"
24119         LIBS="$LIBS $CXXLIBS"
24120         echo "$as_me:24120: checking if we already have C++ library" >&5
24121 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24122         cat >"conftest.$ac_ext" <<_ACEOF
24123 #line 24123 "configure"
24124 #include "confdefs.h"
24125
24126                         #include <iostream>
24127 int
24128 main (void)
24129 {
24130
24131                         std::cout << "Hello World!" << std::endl;
24132   ;
24133   return 0;
24134 }
24135 _ACEOF
24136 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24137 if { (eval echo "$as_me:24137: \"$ac_link\"") >&5
24138   (eval $ac_link) 2>&5
24139   ac_status=$?
24140   echo "$as_me:24140: \$? = $ac_status" >&5
24141   (exit "$ac_status"); } &&
24142          { ac_try='test -s "conftest$ac_exeext"'
24143   { (eval echo "$as_me:24143: \"$ac_try\"") >&5
24144   (eval $ac_try) 2>&5
24145   ac_status=$?
24146   echo "$as_me:24146: \$? = $ac_status" >&5
24147   (exit "$ac_status"); }; }; then
24148   cf_have_libstdcpp=yes
24149 else
24150   echo "$as_me: failed program was:" >&5
24151 cat "conftest.$ac_ext" >&5
24152 cf_have_libstdcpp=no
24153 fi
24154 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24155         echo "$as_me:24155: result: $cf_have_libstdcpp" >&5
24156 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24157         LIBS="$cf_save"
24158
24159         if test "$cf_have_libstdcpp" != yes
24160         then
24161                 case "$cf_cv_system_name" in
24162                 (os2*)
24163                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24164                                 cf_stdcpp_libname=stdcpp
24165                         else
24166                                 cf_stdcpp_libname=stdc++
24167                         fi
24168                         ;;
24169                 (*)
24170                         cf_stdcpp_libname=stdc++
24171                         ;;
24172                 esac
24173
24174                 echo "$as_me:24174: checking for library $cf_stdcpp_libname" >&5
24175 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24176 if test "${cf_cv_libstdcpp+set}" = set; then
24177   echo $ECHO_N "(cached) $ECHO_C" >&6
24178 else
24179
24180                         cf_save="$LIBS"
24181                         LIBS="$LIBS $CXXLIBS"
24182
24183 cf_add_libs="$LIBS"
24184 # reverse order
24185 cf_add_0lib=
24186 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24187 # filter duplicates
24188 for cf_add_1lib in $cf_add_0lib; do
24189         for cf_add_2lib in $cf_add_libs; do
24190                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24191                         cf_add_1lib=
24192                         break
24193                 fi
24194         done
24195         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24196 done
24197 LIBS="$cf_add_libs"
24198
24199                 cat >"conftest.$ac_ext" <<_ACEOF
24200 #line 24200 "configure"
24201 #include "confdefs.h"
24202
24203                                 #include <iostream>
24204 int
24205 main (void)
24206 {
24207
24208                                 std::cout << "Hello World!" << std::endl;
24209   ;
24210   return 0;
24211 }
24212 _ACEOF
24213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24214 if { (eval echo "$as_me:24214: \"$ac_link\"") >&5
24215   (eval $ac_link) 2>&5
24216   ac_status=$?
24217   echo "$as_me:24217: \$? = $ac_status" >&5
24218   (exit "$ac_status"); } &&
24219          { ac_try='test -s "conftest$ac_exeext"'
24220   { (eval echo "$as_me:24220: \"$ac_try\"") >&5
24221   (eval $ac_try) 2>&5
24222   ac_status=$?
24223   echo "$as_me:24223: \$? = $ac_status" >&5
24224   (exit "$ac_status"); }; }; then
24225   cf_cv_libstdcpp=yes
24226 else
24227   echo "$as_me: failed program was:" >&5
24228 cat "conftest.$ac_ext" >&5
24229 cf_cv_libstdcpp=no
24230 fi
24231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24232                         LIBS="$cf_save"
24233
24234 fi
24235 echo "$as_me:24235: result: $cf_cv_libstdcpp" >&5
24236 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24237                 test "$cf_cv_libstdcpp" = yes && {
24238 cf_add_libs="$CXXLIBS"
24239 # reverse order
24240 cf_add_0lib=
24241 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24242 # filter duplicates
24243 for cf_add_1lib in $cf_add_0lib; do
24244         for cf_add_2lib in $cf_add_libs; do
24245                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24246                         cf_add_1lib=
24247                         break
24248                 fi
24249         done
24250         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24251 done
24252 CXXLIBS="$cf_add_libs"
24253  }
24254         fi
24255 fi
24256
24257         echo "$as_me:24257: checking whether $CXX understands -c and -o together" >&5
24258 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24259 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24260   echo $ECHO_N "(cached) $ECHO_C" >&6
24261 else
24262
24263 cat > conftest.$ac_ext <<CF_EOF
24264 int main(void)
24265 {
24266         ${cf_cv_main_return:-return}(0);
24267 }
24268 CF_EOF
24269 # We do the test twice because some compilers refuse to overwrite an
24270 # existing .o file with -o, though they will create one.
24271 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24272 if { (eval echo "$as_me:24272: \"$ac_try\"") >&5
24273   (eval $ac_try) 2>&5
24274   ac_status=$?
24275   echo "$as_me:24275: \$? = $ac_status" >&5
24276   (exit "$ac_status"); } &&
24277   test -f conftest2.$ac_objext && { (eval echo "$as_me:24277: \"$ac_try\"") >&5
24278   (eval $ac_try) 2>&5
24279   ac_status=$?
24280   echo "$as_me:24280: \$? = $ac_status" >&5
24281   (exit "$ac_status"); };
24282 then
24283   eval cf_cv_prog_CXX_c_o=yes
24284 else
24285   eval cf_cv_prog_CXX_c_o=no
24286 fi
24287 rm -rf ./conftest*
24288
24289 fi
24290 if test "$cf_cv_prog_CXX_c_o" = yes; then
24291   echo "$as_me:24291: result: yes" >&5
24292 echo "${ECHO_T}yes" >&6
24293 else
24294   echo "$as_me:24294: result: no" >&5
24295 echo "${ECHO_T}no" >&6
24296 fi
24297
24298         case "$GXX_VERSION" in
24299         (1.*|2.[0-6]*|[1-9][0-9].*)
24300                 cf_cxx_library=yes
24301                 ;;
24302         (*-2.7*|2.7*)
24303
24304 cf_cxx_library=unknown
24305 case "$cf_cv_system_name" in
24306 (os2*)
24307         cf_gpp_libname=gpp
24308         ;;
24309 (*)
24310         cf_gpp_libname=g++
24311         ;;
24312 esac
24313 if test "$GXX" = yes; then
24314         echo "$as_me:24314: checking for lib$cf_gpp_libname" >&5
24315 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24316         cf_save="$LIBS"
24317
24318 cf_add_libs="$LIBS"
24319 # reverse order
24320 cf_add_0lib=
24321 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24322 # filter duplicates
24323 for cf_add_1lib in $cf_add_0lib; do
24324         for cf_add_2lib in $cf_add_libs; do
24325                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24326                         cf_add_1lib=
24327                         break
24328                 fi
24329         done
24330         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24331 done
24332 LIBS="$cf_add_libs"
24333
24334         cat >"conftest.$ac_ext" <<_ACEOF
24335 #line 24335 "configure"
24336 #include "confdefs.h"
24337
24338 #include <$cf_gpp_libname/builtin.h>
24339
24340 int
24341 main (void)
24342 {
24343 two_arg_error_handler_t foo2 = lib_error_handler
24344   ;
24345   return 0;
24346 }
24347 _ACEOF
24348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24349 if { (eval echo "$as_me:24349: \"$ac_link\"") >&5
24350   (eval $ac_link) 2>&5
24351   ac_status=$?
24352   echo "$as_me:24352: \$? = $ac_status" >&5
24353   (exit "$ac_status"); } &&
24354          { ac_try='test -s "conftest$ac_exeext"'
24355   { (eval echo "$as_me:24355: \"$ac_try\"") >&5
24356   (eval $ac_try) 2>&5
24357   ac_status=$?
24358   echo "$as_me:24358: \$? = $ac_status" >&5
24359   (exit "$ac_status"); }; }; then
24360   cf_cxx_library=yes
24361
24362 cf_add_libs="$CXXLIBS"
24363 # reverse order
24364 cf_add_0lib=
24365 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24366 # filter duplicates
24367 for cf_add_1lib in $cf_add_0lib; do
24368         for cf_add_2lib in $cf_add_libs; do
24369                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24370                         cf_add_1lib=
24371                         break
24372                 fi
24373         done
24374         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24375 done
24376 CXXLIBS="$cf_add_libs"
24377
24378          if test "$cf_gpp_libname" = cpp ; then
24379
24380 cat >>confdefs.h <<\EOF
24381 #define HAVE_GPP_BUILTIN_H 1
24382 EOF
24383
24384          else
24385
24386 cat >>confdefs.h <<\EOF
24387 #define HAVE_GXX_BUILTIN_H 1
24388 EOF
24389
24390          fi
24391 else
24392   echo "$as_me: failed program was:" >&5
24393 cat "conftest.$ac_ext" >&5
24394 cat >"conftest.$ac_ext" <<_ACEOF
24395 #line 24395 "configure"
24396 #include "confdefs.h"
24397
24398 #include <builtin.h>
24399
24400 int
24401 main (void)
24402 {
24403 two_arg_error_handler_t foo2 = lib_error_handler
24404   ;
24405   return 0;
24406 }
24407 _ACEOF
24408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24409 if { (eval echo "$as_me:24409: \"$ac_link\"") >&5
24410   (eval $ac_link) 2>&5
24411   ac_status=$?
24412   echo "$as_me:24412: \$? = $ac_status" >&5
24413   (exit "$ac_status"); } &&
24414          { ac_try='test -s "conftest$ac_exeext"'
24415   { (eval echo "$as_me:24415: \"$ac_try\"") >&5
24416   (eval $ac_try) 2>&5
24417   ac_status=$?
24418   echo "$as_me:24418: \$? = $ac_status" >&5
24419   (exit "$ac_status"); }; }; then
24420   cf_cxx_library=yes
24421
24422 cf_add_libs="$CXXLIBS"
24423 # reverse order
24424 cf_add_0lib=
24425 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24426 # filter duplicates
24427 for cf_add_1lib in $cf_add_0lib; do
24428         for cf_add_2lib in $cf_add_libs; do
24429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24430                         cf_add_1lib=
24431                         break
24432                 fi
24433         done
24434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24435 done
24436 CXXLIBS="$cf_add_libs"
24437
24438 cat >>confdefs.h <<\EOF
24439 #define HAVE_BUILTIN_H 1
24440 EOF
24441
24442 else
24443   echo "$as_me: failed program was:" >&5
24444 cat "conftest.$ac_ext" >&5
24445 cf_cxx_library=no
24446 fi
24447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24448 fi
24449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24450         LIBS="$cf_save"
24451         echo "$as_me:24451: result: $cf_cxx_library" >&5
24452 echo "${ECHO_T}$cf_cxx_library" >&6
24453 fi
24454
24455                 ;;
24456         (*)
24457                 cf_cxx_library=no
24458                 ;;
24459         esac
24460
24461         ac_ext=cc
24462 ac_cpp='$CXXCPP $CPPFLAGS'
24463 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24464 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24465 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24466 ac_main_return="return"
24467 echo "$as_me:24467: checking how to run the C++ preprocessor" >&5
24468 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24469 if test -z "$CXXCPP"; then
24470   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24471   echo $ECHO_N "(cached) $ECHO_C" >&6
24472 else
24473       # Double quotes because CXXCPP needs to be expanded
24474     for CXXCPP in "$CXX -E" "/lib/cpp"
24475     do
24476       ac_preproc_ok=false
24477 for ac_cxx_preproc_warn_flag in '' yes
24478 do
24479   # Use a header file that comes with gcc, so configuring glibc
24480   # with a fresh cross-compiler works.
24481   # On the NeXT, cc -E runs the code through the compiler's parser,
24482   # not just through cpp. "Syntax error" is here to catch this case.
24483   cat >"conftest.$ac_ext" <<_ACEOF
24484 #line 24484 "configure"
24485 #include "confdefs.h"
24486 #include <assert.h>
24487                      Syntax error
24488 _ACEOF
24489 if { (eval echo "$as_me:24489: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24490   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24491   ac_status=$?
24492   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24493   rm -f conftest.er1
24494   cat conftest.err >&5
24495   echo "$as_me:24495: \$? = $ac_status" >&5
24496   (exit "$ac_status"); } >/dev/null; then
24497   if test -s conftest.err; then
24498     ac_cpp_err=$ac_cxx_preproc_warn_flag
24499   else
24500     ac_cpp_err=
24501   fi
24502 else
24503   ac_cpp_err=yes
24504 fi
24505 if test -z "$ac_cpp_err"; then
24506   :
24507 else
24508   echo "$as_me: failed program was:" >&5
24509   cat "conftest.$ac_ext" >&5
24510   # Broken: fails on valid input.
24511 continue
24512 fi
24513 rm -f conftest.err "conftest.$ac_ext"
24514
24515   # OK, works on sane cases.  Now check whether non-existent headers
24516   # can be detected and how.
24517   cat >"conftest.$ac_ext" <<_ACEOF
24518 #line 24518 "configure"
24519 #include "confdefs.h"
24520 #include <ac_nonexistent.h>
24521 _ACEOF
24522 if { (eval echo "$as_me:24522: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24523   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24524   ac_status=$?
24525   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24526   rm -f conftest.er1
24527   cat conftest.err >&5
24528   echo "$as_me:24528: \$? = $ac_status" >&5
24529   (exit "$ac_status"); } >/dev/null; then
24530   if test -s conftest.err; then
24531     ac_cpp_err=$ac_cxx_preproc_warn_flag
24532   else
24533     ac_cpp_err=
24534   fi
24535 else
24536   ac_cpp_err=yes
24537 fi
24538 if test -z "$ac_cpp_err"; then
24539   # Broken: success on invalid input.
24540 continue
24541 else
24542   echo "$as_me: failed program was:" >&5
24543   cat "conftest.$ac_ext" >&5
24544   # Passes both tests.
24545 ac_preproc_ok=:
24546 break
24547 fi
24548 rm -f conftest.err "conftest.$ac_ext"
24549
24550 done
24551 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24552 rm -f conftest.err "conftest.$ac_ext"
24553 if $ac_preproc_ok; then
24554   break
24555 fi
24556
24557     done
24558     ac_cv_prog_CXXCPP=$CXXCPP
24559
24560 fi
24561   CXXCPP=$ac_cv_prog_CXXCPP
24562 else
24563   ac_cv_prog_CXXCPP=$CXXCPP
24564 fi
24565 echo "$as_me:24565: result: $CXXCPP" >&5
24566 echo "${ECHO_T}$CXXCPP" >&6
24567 ac_preproc_ok=false
24568 for ac_cxx_preproc_warn_flag in '' yes
24569 do
24570   # Use a header file that comes with gcc, so configuring glibc
24571   # with a fresh cross-compiler works.
24572   # On the NeXT, cc -E runs the code through the compiler's parser,
24573   # not just through cpp. "Syntax error" is here to catch this case.
24574   cat >"conftest.$ac_ext" <<_ACEOF
24575 #line 24575 "configure"
24576 #include "confdefs.h"
24577 #include <assert.h>
24578                      Syntax error
24579 _ACEOF
24580 if { (eval echo "$as_me:24580: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24581   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24582   ac_status=$?
24583   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24584   rm -f conftest.er1
24585   cat conftest.err >&5
24586   echo "$as_me:24586: \$? = $ac_status" >&5
24587   (exit "$ac_status"); } >/dev/null; then
24588   if test -s conftest.err; then
24589     ac_cpp_err=$ac_cxx_preproc_warn_flag
24590   else
24591     ac_cpp_err=
24592   fi
24593 else
24594   ac_cpp_err=yes
24595 fi
24596 if test -z "$ac_cpp_err"; then
24597   :
24598 else
24599   echo "$as_me: failed program was:" >&5
24600   cat "conftest.$ac_ext" >&5
24601   # Broken: fails on valid input.
24602 continue
24603 fi
24604 rm -f conftest.err "conftest.$ac_ext"
24605
24606   # OK, works on sane cases.  Now check whether non-existent headers
24607   # can be detected and how.
24608   cat >"conftest.$ac_ext" <<_ACEOF
24609 #line 24609 "configure"
24610 #include "confdefs.h"
24611 #include <ac_nonexistent.h>
24612 _ACEOF
24613 if { (eval echo "$as_me:24613: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24614   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24615   ac_status=$?
24616   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24617   rm -f conftest.er1
24618   cat conftest.err >&5
24619   echo "$as_me:24619: \$? = $ac_status" >&5
24620   (exit "$ac_status"); } >/dev/null; then
24621   if test -s conftest.err; then
24622     ac_cpp_err=$ac_cxx_preproc_warn_flag
24623   else
24624     ac_cpp_err=
24625   fi
24626 else
24627   ac_cpp_err=yes
24628 fi
24629 if test -z "$ac_cpp_err"; then
24630   # Broken: success on invalid input.
24631 continue
24632 else
24633   echo "$as_me: failed program was:" >&5
24634   cat "conftest.$ac_ext" >&5
24635   # Passes both tests.
24636 ac_preproc_ok=:
24637 break
24638 fi
24639 rm -f conftest.err "conftest.$ac_ext"
24640
24641 done
24642 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24643 rm -f conftest.err "conftest.$ac_ext"
24644 if $ac_preproc_ok; then
24645   :
24646 else
24647   { { echo "$as_me:24647: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24648 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24649    { (exit 1); exit 1; }; }
24650 fi
24651
24652 ac_ext=cc
24653 ac_cpp='$CXXCPP $CPPFLAGS'
24654 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24655 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24656 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24657 ac_main_return="return"
24658
24659 for ac_header in typeinfo
24660 do
24661 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24662 echo "$as_me:24662: checking for $ac_header" >&5
24663 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24664 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24665   echo $ECHO_N "(cached) $ECHO_C" >&6
24666 else
24667   cat >"conftest.$ac_ext" <<_ACEOF
24668 #line 24668 "configure"
24669 #include "confdefs.h"
24670 #include <$ac_header>
24671 _ACEOF
24672 if { (eval echo "$as_me:24672: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24673   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24674   ac_status=$?
24675   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24676   rm -f conftest.er1
24677   cat conftest.err >&5
24678   echo "$as_me:24678: \$? = $ac_status" >&5
24679   (exit "$ac_status"); } >/dev/null; then
24680   if test -s conftest.err; then
24681     ac_cpp_err=$ac_cxx_preproc_warn_flag
24682   else
24683     ac_cpp_err=
24684   fi
24685 else
24686   ac_cpp_err=yes
24687 fi
24688 if test -z "$ac_cpp_err"; then
24689   eval "$as_ac_Header=yes"
24690 else
24691   echo "$as_me: failed program was:" >&5
24692   cat "conftest.$ac_ext" >&5
24693   eval "$as_ac_Header=no"
24694 fi
24695 rm -f conftest.err "conftest.$ac_ext"
24696 fi
24697 echo "$as_me:24697: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24698 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24699 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24700   cat >>confdefs.h <<EOF
24701 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24702 EOF
24703
24704 fi
24705 done
24706
24707 for ac_header in iostream
24708 do
24709 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24710 echo "$as_me:24710: checking for $ac_header" >&5
24711 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24712 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24713   echo $ECHO_N "(cached) $ECHO_C" >&6
24714 else
24715   cat >"conftest.$ac_ext" <<_ACEOF
24716 #line 24716 "configure"
24717 #include "confdefs.h"
24718 #include <$ac_header>
24719 _ACEOF
24720 if { (eval echo "$as_me:24720: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24721   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24722   ac_status=$?
24723   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24724   rm -f conftest.er1
24725   cat conftest.err >&5
24726   echo "$as_me:24726: \$? = $ac_status" >&5
24727   (exit "$ac_status"); } >/dev/null; then
24728   if test -s conftest.err; then
24729     ac_cpp_err=$ac_cxx_preproc_warn_flag
24730   else
24731     ac_cpp_err=
24732   fi
24733 else
24734   ac_cpp_err=yes
24735 fi
24736 if test -z "$ac_cpp_err"; then
24737   eval "$as_ac_Header=yes"
24738 else
24739   echo "$as_me: failed program was:" >&5
24740   cat "conftest.$ac_ext" >&5
24741   eval "$as_ac_Header=no"
24742 fi
24743 rm -f conftest.err "conftest.$ac_ext"
24744 fi
24745 echo "$as_me:24745: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24746 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24747 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24748   cat >>confdefs.h <<EOF
24749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24750 EOF
24751
24752 fi
24753 done
24754
24755 if test x"$ac_cv_header_iostream" = xyes ; then
24756         echo "$as_me:24756: checking if iostream uses std-namespace" >&5
24757 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24758         cat >"conftest.$ac_ext" <<_ACEOF
24759 #line 24759 "configure"
24760 #include "confdefs.h"
24761
24762 #include <iostream>
24763 using std::endl;
24764 using std::cerr;
24765 int
24766 main (void)
24767 {
24768
24769 cerr << "testing" << endl;
24770
24771   ;
24772   return 0;
24773 }
24774 _ACEOF
24775 rm -f "conftest.$ac_objext"
24776 if { (eval echo "$as_me:24776: \"$ac_compile\"") >&5
24777   (eval $ac_compile) 2>&5
24778   ac_status=$?
24779   echo "$as_me:24779: \$? = $ac_status" >&5
24780   (exit "$ac_status"); } &&
24781          { ac_try='test -s "conftest.$ac_objext"'
24782   { (eval echo "$as_me:24782: \"$ac_try\"") >&5
24783   (eval $ac_try) 2>&5
24784   ac_status=$?
24785   echo "$as_me:24785: \$? = $ac_status" >&5
24786   (exit "$ac_status"); }; }; then
24787   cf_iostream_namespace=yes
24788 else
24789   echo "$as_me: failed program was:" >&5
24790 cat "conftest.$ac_ext" >&5
24791 cf_iostream_namespace=no
24792 fi
24793 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24794         echo "$as_me:24794: result: $cf_iostream_namespace" >&5
24795 echo "${ECHO_T}$cf_iostream_namespace" >&6
24796         if test "$cf_iostream_namespace" = yes ; then
24797
24798 cat >>confdefs.h <<\EOF
24799 #define IOSTREAM_NAMESPACE 1
24800 EOF
24801
24802         fi
24803 fi
24804
24805 echo "$as_me:24805: checking if we should include stdbool.h" >&5
24806 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24807
24808 if test "${cf_cv_header_stdbool_h+set}" = set; then
24809   echo $ECHO_N "(cached) $ECHO_C" >&6
24810 else
24811
24812         cat >"conftest.$ac_ext" <<_ACEOF
24813 #line 24813 "configure"
24814 #include "confdefs.h"
24815
24816 int
24817 main (void)
24818 {
24819 bool foo = false
24820   ;
24821   return 0;
24822 }
24823 _ACEOF
24824 rm -f "conftest.$ac_objext"
24825 if { (eval echo "$as_me:24825: \"$ac_compile\"") >&5
24826   (eval $ac_compile) 2>&5
24827   ac_status=$?
24828   echo "$as_me:24828: \$? = $ac_status" >&5
24829   (exit "$ac_status"); } &&
24830          { ac_try='test -s "conftest.$ac_objext"'
24831   { (eval echo "$as_me:24831: \"$ac_try\"") >&5
24832   (eval $ac_try) 2>&5
24833   ac_status=$?
24834   echo "$as_me:24834: \$? = $ac_status" >&5
24835   (exit "$ac_status"); }; }; then
24836   cf_cv_header_stdbool_h=0
24837 else
24838   echo "$as_me: failed program was:" >&5
24839 cat "conftest.$ac_ext" >&5
24840 cat >"conftest.$ac_ext" <<_ACEOF
24841 #line 24841 "configure"
24842 #include "confdefs.h"
24843
24844 #ifndef __BEOS__
24845 #include <stdbool.h>
24846 #endif
24847
24848 int
24849 main (void)
24850 {
24851 bool foo = false
24852   ;
24853   return 0;
24854 }
24855 _ACEOF
24856 rm -f "conftest.$ac_objext"
24857 if { (eval echo "$as_me:24857: \"$ac_compile\"") >&5
24858   (eval $ac_compile) 2>&5
24859   ac_status=$?
24860   echo "$as_me:24860: \$? = $ac_status" >&5
24861   (exit "$ac_status"); } &&
24862          { ac_try='test -s "conftest.$ac_objext"'
24863   { (eval echo "$as_me:24863: \"$ac_try\"") >&5
24864   (eval $ac_try) 2>&5
24865   ac_status=$?
24866   echo "$as_me:24866: \$? = $ac_status" >&5
24867   (exit "$ac_status"); }; }; then
24868   cf_cv_header_stdbool_h=1
24869 else
24870   echo "$as_me: failed program was:" >&5
24871 cat "conftest.$ac_ext" >&5
24872 cf_cv_header_stdbool_h=0
24873 fi
24874 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24875 fi
24876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24877 fi
24878
24879 if test "$cf_cv_header_stdbool_h" = 1
24880 then    echo "$as_me:24880: result: yes" >&5
24881 echo "${ECHO_T}yes" >&6
24882 else    echo "$as_me:24882: result: no" >&5
24883 echo "${ECHO_T}no" >&6
24884 fi
24885
24886 echo "$as_me:24886: checking for builtin bool type" >&5
24887 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24888
24889 if test "${cf_cv_builtin_bool+set}" = set; then
24890   echo $ECHO_N "(cached) $ECHO_C" >&6
24891 else
24892
24893         cat >"conftest.$ac_ext" <<_ACEOF
24894 #line 24894 "configure"
24895 #include "confdefs.h"
24896
24897 #include <stdio.h>
24898 #include <sys/types.h>
24899
24900 int
24901 main (void)
24902 {
24903 bool x = false
24904   ;
24905   return 0;
24906 }
24907 _ACEOF
24908 rm -f "conftest.$ac_objext"
24909 if { (eval echo "$as_me:24909: \"$ac_compile\"") >&5
24910   (eval $ac_compile) 2>&5
24911   ac_status=$?
24912   echo "$as_me:24912: \$? = $ac_status" >&5
24913   (exit "$ac_status"); } &&
24914          { ac_try='test -s "conftest.$ac_objext"'
24915   { (eval echo "$as_me:24915: \"$ac_try\"") >&5
24916   (eval $ac_try) 2>&5
24917   ac_status=$?
24918   echo "$as_me:24918: \$? = $ac_status" >&5
24919   (exit "$ac_status"); }; }; then
24920   cf_cv_builtin_bool=1
24921 else
24922   echo "$as_me: failed program was:" >&5
24923 cat "conftest.$ac_ext" >&5
24924 cf_cv_builtin_bool=0
24925 fi
24926 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24927
24928 fi
24929
24930 if test "$cf_cv_builtin_bool" = 1
24931 then    echo "$as_me:24931: result: yes" >&5
24932 echo "${ECHO_T}yes" >&6
24933 else    echo "$as_me:24933: result: no" >&5
24934 echo "${ECHO_T}no" >&6
24935 fi
24936
24937 echo "$as_me:24937: checking for bool" >&5
24938 echo $ECHO_N "checking for bool... $ECHO_C" >&6
24939 if test "${ac_cv_type_bool+set}" = set; then
24940   echo $ECHO_N "(cached) $ECHO_C" >&6
24941 else
24942   cat >"conftest.$ac_ext" <<_ACEOF
24943 #line 24943 "configure"
24944 #include "confdefs.h"
24945
24946 #include <stdlib.h>
24947 #include <stdio.h>
24948
24949 #if defined(__cplusplus)
24950
24951 #ifdef HAVE_GXX_BUILTIN_H
24952 #include <g++/builtin.h>
24953 #elif HAVE_GPP_BUILTIN_H
24954 #include <gpp/builtin.h>
24955 #elif HAVE_BUILTIN_H
24956 #include <builtin.h>
24957 #endif
24958
24959 #else
24960
24961 #if $cf_cv_header_stdbool_h
24962 #include <stdbool.h>
24963 #endif
24964
24965 #endif
24966
24967 int
24968 main (void)
24969 {
24970 if ((bool *) 0)
24971   return 0;
24972 if (sizeof (bool))
24973   return 0;
24974   ;
24975   return 0;
24976 }
24977 _ACEOF
24978 rm -f "conftest.$ac_objext"
24979 if { (eval echo "$as_me:24979: \"$ac_compile\"") >&5
24980   (eval $ac_compile) 2>&5
24981   ac_status=$?
24982   echo "$as_me:24982: \$? = $ac_status" >&5
24983   (exit "$ac_status"); } &&
24984          { ac_try='test -s "conftest.$ac_objext"'
24985   { (eval echo "$as_me:24985: \"$ac_try\"") >&5
24986   (eval $ac_try) 2>&5
24987   ac_status=$?
24988   echo "$as_me:24988: \$? = $ac_status" >&5
24989   (exit "$ac_status"); }; }; then
24990   ac_cv_type_bool=yes
24991 else
24992   echo "$as_me: failed program was:" >&5
24993 cat "conftest.$ac_ext" >&5
24994 ac_cv_type_bool=no
24995 fi
24996 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24997 fi
24998 echo "$as_me:24998: result: $ac_cv_type_bool" >&5
24999 echo "${ECHO_T}$ac_cv_type_bool" >&6
25000
25001 echo "$as_me:25001: checking size of bool" >&5
25002 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25003 if test "${ac_cv_sizeof_bool+set}" = set; then
25004   echo $ECHO_N "(cached) $ECHO_C" >&6
25005 else
25006   if test "$ac_cv_type_bool" = yes; then
25007   if test "$cross_compiling" = yes; then
25008   # Depending upon the size, compute the lo and hi bounds.
25009 cat >"conftest.$ac_ext" <<_ACEOF
25010 #line 25010 "configure"
25011 #include "confdefs.h"
25012
25013 #include <stdlib.h>
25014 #include <stdio.h>
25015
25016 #if defined(__cplusplus)
25017
25018 #ifdef HAVE_GXX_BUILTIN_H
25019 #include <g++/builtin.h>
25020 #elif HAVE_GPP_BUILTIN_H
25021 #include <gpp/builtin.h>
25022 #elif HAVE_BUILTIN_H
25023 #include <builtin.h>
25024 #endif
25025
25026 #else
25027
25028 #if $cf_cv_header_stdbool_h
25029 #include <stdbool.h>
25030 #endif
25031
25032 #endif
25033
25034 int
25035 main (void)
25036 {
25037 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25038   ;
25039   return 0;
25040 }
25041 _ACEOF
25042 rm -f "conftest.$ac_objext"
25043 if { (eval echo "$as_me:25043: \"$ac_compile\"") >&5
25044   (eval $ac_compile) 2>&5
25045   ac_status=$?
25046   echo "$as_me:25046: \$? = $ac_status" >&5
25047   (exit "$ac_status"); } &&
25048          { ac_try='test -s "conftest.$ac_objext"'
25049   { (eval echo "$as_me:25049: \"$ac_try\"") >&5
25050   (eval $ac_try) 2>&5
25051   ac_status=$?
25052   echo "$as_me:25052: \$? = $ac_status" >&5
25053   (exit "$ac_status"); }; }; then
25054   ac_lo=0 ac_mid=0
25055   while :; do
25056     cat >"conftest.$ac_ext" <<_ACEOF
25057 #line 25057 "configure"
25058 #include "confdefs.h"
25059
25060 #include <stdlib.h>
25061 #include <stdio.h>
25062
25063 #if defined(__cplusplus)
25064
25065 #ifdef HAVE_GXX_BUILTIN_H
25066 #include <g++/builtin.h>
25067 #elif HAVE_GPP_BUILTIN_H
25068 #include <gpp/builtin.h>
25069 #elif HAVE_BUILTIN_H
25070 #include <builtin.h>
25071 #endif
25072
25073 #else
25074
25075 #if $cf_cv_header_stdbool_h
25076 #include <stdbool.h>
25077 #endif
25078
25079 #endif
25080
25081 int
25082 main (void)
25083 {
25084 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25085   ;
25086   return 0;
25087 }
25088 _ACEOF
25089 rm -f "conftest.$ac_objext"
25090 if { (eval echo "$as_me:25090: \"$ac_compile\"") >&5
25091   (eval $ac_compile) 2>&5
25092   ac_status=$?
25093   echo "$as_me:25093: \$? = $ac_status" >&5
25094   (exit "$ac_status"); } &&
25095          { ac_try='test -s "conftest.$ac_objext"'
25096   { (eval echo "$as_me:25096: \"$ac_try\"") >&5
25097   (eval $ac_try) 2>&5
25098   ac_status=$?
25099   echo "$as_me:25099: \$? = $ac_status" >&5
25100   (exit "$ac_status"); }; }; then
25101   ac_hi=$ac_mid; break
25102 else
25103   echo "$as_me: failed program was:" >&5
25104 cat "conftest.$ac_ext" >&5
25105 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25106 fi
25107 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25108   done
25109 else
25110   echo "$as_me: failed program was:" >&5
25111 cat "conftest.$ac_ext" >&5
25112 ac_hi=-1 ac_mid=-1
25113   while :; do
25114     cat >"conftest.$ac_ext" <<_ACEOF
25115 #line 25115 "configure"
25116 #include "confdefs.h"
25117
25118 #include <stdlib.h>
25119 #include <stdio.h>
25120
25121 #if defined(__cplusplus)
25122
25123 #ifdef HAVE_GXX_BUILTIN_H
25124 #include <g++/builtin.h>
25125 #elif HAVE_GPP_BUILTIN_H
25126 #include <gpp/builtin.h>
25127 #elif HAVE_BUILTIN_H
25128 #include <builtin.h>
25129 #endif
25130
25131 #else
25132
25133 #if $cf_cv_header_stdbool_h
25134 #include <stdbool.h>
25135 #endif
25136
25137 #endif
25138
25139 int
25140 main (void)
25141 {
25142 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25143   ;
25144   return 0;
25145 }
25146 _ACEOF
25147 rm -f "conftest.$ac_objext"
25148 if { (eval echo "$as_me:25148: \"$ac_compile\"") >&5
25149   (eval $ac_compile) 2>&5
25150   ac_status=$?
25151   echo "$as_me:25151: \$? = $ac_status" >&5
25152   (exit "$ac_status"); } &&
25153          { ac_try='test -s "conftest.$ac_objext"'
25154   { (eval echo "$as_me:25154: \"$ac_try\"") >&5
25155   (eval $ac_try) 2>&5
25156   ac_status=$?
25157   echo "$as_me:25157: \$? = $ac_status" >&5
25158   (exit "$ac_status"); }; }; then
25159   ac_lo=$ac_mid; break
25160 else
25161   echo "$as_me: failed program was:" >&5
25162 cat "conftest.$ac_ext" >&5
25163 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25164 fi
25165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25166   done
25167 fi
25168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25169 # Binary search between lo and hi bounds.
25170 while test "x$ac_lo" != "x$ac_hi"; do
25171   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25172   cat >"conftest.$ac_ext" <<_ACEOF
25173 #line 25173 "configure"
25174 #include "confdefs.h"
25175
25176 #include <stdlib.h>
25177 #include <stdio.h>
25178
25179 #if defined(__cplusplus)
25180
25181 #ifdef HAVE_GXX_BUILTIN_H
25182 #include <g++/builtin.h>
25183 #elif HAVE_GPP_BUILTIN_H
25184 #include <gpp/builtin.h>
25185 #elif HAVE_BUILTIN_H
25186 #include <builtin.h>
25187 #endif
25188
25189 #else
25190
25191 #if $cf_cv_header_stdbool_h
25192 #include <stdbool.h>
25193 #endif
25194
25195 #endif
25196
25197 int
25198 main (void)
25199 {
25200 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25201   ;
25202   return 0;
25203 }
25204 _ACEOF
25205 rm -f "conftest.$ac_objext"
25206 if { (eval echo "$as_me:25206: \"$ac_compile\"") >&5
25207   (eval $ac_compile) 2>&5
25208   ac_status=$?
25209   echo "$as_me:25209: \$? = $ac_status" >&5
25210   (exit "$ac_status"); } &&
25211          { ac_try='test -s "conftest.$ac_objext"'
25212   { (eval echo "$as_me:25212: \"$ac_try\"") >&5
25213   (eval $ac_try) 2>&5
25214   ac_status=$?
25215   echo "$as_me:25215: \$? = $ac_status" >&5
25216   (exit "$ac_status"); }; }; then
25217   ac_hi=$ac_mid
25218 else
25219   echo "$as_me: failed program was:" >&5
25220 cat "conftest.$ac_ext" >&5
25221 ac_lo=`expr "$ac_mid" + 1`
25222 fi
25223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25224 done
25225 ac_cv_sizeof_bool=$ac_lo
25226 else
25227   if test "$cross_compiling" = yes; then
25228   { { echo "$as_me:25228: error: cannot run test program while cross compiling" >&5
25229 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25230    { (exit 1); exit 1; }; }
25231 else
25232   cat >"conftest.$ac_ext" <<_ACEOF
25233 #line 25233 "configure"
25234 #include "confdefs.h"
25235
25236 #include <stdlib.h>
25237 #include <stdio.h>
25238
25239 #if defined(__cplusplus)
25240
25241 #ifdef HAVE_GXX_BUILTIN_H
25242 #include <g++/builtin.h>
25243 #elif HAVE_GPP_BUILTIN_H
25244 #include <gpp/builtin.h>
25245 #elif HAVE_BUILTIN_H
25246 #include <builtin.h>
25247 #endif
25248
25249 #else
25250
25251 #if $cf_cv_header_stdbool_h
25252 #include <stdbool.h>
25253 #endif
25254
25255 #endif
25256
25257 int
25258 main (void)
25259 {
25260 FILE *f = fopen ("conftest.val", "w");
25261 if (!f)
25262   $ac_main_return (1);
25263 fprintf (f, "%d", (sizeof (bool)));
25264 fclose (f);
25265   ;
25266   return 0;
25267 }
25268 _ACEOF
25269 rm -f "conftest$ac_exeext"
25270 if { (eval echo "$as_me:25270: \"$ac_link\"") >&5
25271   (eval $ac_link) 2>&5
25272   ac_status=$?
25273   echo "$as_me:25273: \$? = $ac_status" >&5
25274   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25275   { (eval echo "$as_me:25275: \"$ac_try\"") >&5
25276   (eval $ac_try) 2>&5
25277   ac_status=$?
25278   echo "$as_me:25278: \$? = $ac_status" >&5
25279   (exit "$ac_status"); }; }; then
25280   ac_cv_sizeof_bool=`cat conftest.val`
25281 else
25282   echo "$as_me: program exited with status $ac_status" >&5
25283 echo "$as_me: failed program was:" >&5
25284 cat "conftest.$ac_ext" >&5
25285 fi
25286 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25287 fi
25288 fi
25289 rm -f conftest.val
25290 else
25291   ac_cv_sizeof_bool=0
25292 fi
25293 fi
25294 echo "$as_me:25294: result: $ac_cv_sizeof_bool" >&5
25295 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25296 cat >>confdefs.h <<EOF
25297 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25298 EOF
25299
25300 echo "$as_me:25300: checking for type of bool" >&5
25301 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25302 if test "${cf_cv_type_of_bool+set}" = set; then
25303   echo $ECHO_N "(cached) $ECHO_C" >&6
25304 else
25305
25306         rm -f cf_test.out
25307         if test "$cross_compiling" = yes; then
25308
25309                 case x$ac_cv_sizeof_bool in
25310                 (x1) cf_cv_type_of_bool="unsigned char";;
25311                 (x2) cf_cv_type_of_bool="unsigned short";;
25312                 (x4) cf_cv_type_of_bool="unsigned int";;
25313                 (x8) cf_cv_type_of_bool="unsigned long";;
25314                 (*)  cf_cv_type_of_bool=unknown;;
25315                 esac
25316
25317 else
25318   cat >"conftest.$ac_ext" <<_ACEOF
25319 #line 25319 "configure"
25320 #include "confdefs.h"
25321
25322 #include <stdlib.h>
25323 #include <stdio.h>
25324
25325 #if defined(__cplusplus)
25326
25327 #ifdef HAVE_GXX_BUILTIN_H
25328 #include <g++/builtin.h>
25329 #elif HAVE_GPP_BUILTIN_H
25330 #include <gpp/builtin.h>
25331 #elif HAVE_BUILTIN_H
25332 #include <builtin.h>
25333 #endif
25334
25335 #else
25336
25337 #if $cf_cv_header_stdbool_h
25338 #include <stdbool.h>
25339 #endif
25340
25341 #endif
25342
25343 int main(void)
25344 {
25345         FILE *fp = fopen("cf_test.out", "w");
25346         if (fp != 0) {
25347                 bool x = true;
25348                 if ((bool)(-x) >= 0)
25349                         fputs("unsigned ", fp);
25350                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25351                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25352                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25353                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25354                 fclose(fp);
25355         }
25356         ${cf_cv_main_return:-return}(0);
25357 }
25358
25359 _ACEOF
25360 rm -f "conftest$ac_exeext"
25361 if { (eval echo "$as_me:25361: \"$ac_link\"") >&5
25362   (eval $ac_link) 2>&5
25363   ac_status=$?
25364   echo "$as_me:25364: \$? = $ac_status" >&5
25365   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25366   { (eval echo "$as_me:25366: \"$ac_try\"") >&5
25367   (eval $ac_try) 2>&5
25368   ac_status=$?
25369   echo "$as_me:25369: \$? = $ac_status" >&5
25370   (exit "$ac_status"); }; }; then
25371   cf_cv_type_of_bool=`cat cf_test.out`
25372                  if test -z "$cf_cv_type_of_bool"; then
25373                    cf_cv_type_of_bool=unknown
25374                  fi
25375 else
25376   echo "$as_me: program exited with status $ac_status" >&5
25377 echo "$as_me: failed program was:" >&5
25378 cat "conftest.$ac_ext" >&5
25379 cf_cv_type_of_bool=unknown
25380 fi
25381 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25382 fi
25383         rm -f cf_test.out
25384
25385 fi
25386 echo "$as_me:25386: result: $cf_cv_type_of_bool" >&5
25387 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25388
25389 if test "$cf_cv_type_of_bool" = unknown ; then
25390         case .$NCURSES_BOOL in
25391         (.auto|.) NCURSES_BOOL=unsigned;;
25392         esac
25393         { echo "$as_me:25393: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25394 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25395         cf_cv_type_of_bool=$NCURSES_BOOL
25396 fi
25397
25398 echo "$as_me:25398: checking for special defines needed for etip.h" >&5
25399 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25400 cf_save_CXXFLAGS="$CXXFLAGS"
25401 cf_result="none"
25402
25403 # etip.h includes ncurses.h which includes ncurses_dll.h
25404 # But ncurses_dll.h is generated - fix here.
25405 test -d include || mkdir include
25406 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
25407
25408 for cf_math in "" MATH_H
25409 do
25410 for cf_excp in "" MATH_EXCEPTION
25411 do
25412         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25413         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25414         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25415 cat >"conftest.$ac_ext" <<_ACEOF
25416 #line 25416 "configure"
25417 #include "confdefs.h"
25418
25419 #include <etip.h.in>
25420
25421 int
25422 main (void)
25423 {
25424
25425   ;
25426   return 0;
25427 }
25428 _ACEOF
25429 rm -f "conftest.$ac_objext"
25430 if { (eval echo "$as_me:25430: \"$ac_compile\"") >&5
25431   (eval $ac_compile) 2>&5
25432   ac_status=$?
25433   echo "$as_me:25433: \$? = $ac_status" >&5
25434   (exit "$ac_status"); } &&
25435          { ac_try='test -s "conftest.$ac_objext"'
25436   { (eval echo "$as_me:25436: \"$ac_try\"") >&5
25437   (eval $ac_try) 2>&5
25438   ac_status=$?
25439   echo "$as_me:25439: \$? = $ac_status" >&5
25440   (exit "$ac_status"); }; }; then
25441
25442         test -n "$cf_math" && cat >>confdefs.h <<EOF
25443 #define ETIP_NEEDS_${cf_math} 1
25444 EOF
25445
25446         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25447 #define ETIP_NEEDS_${cf_excp} 1
25448 EOF
25449
25450         cf_result="$cf_math $cf_excp"
25451         break 2
25452
25453 else
25454   echo "$as_me: failed program was:" >&5
25455 cat "conftest.$ac_ext" >&5
25456 fi
25457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25458 done
25459 done
25460 echo "$as_me:25460: result: $cf_result" >&5
25461 echo "${ECHO_T}$cf_result" >&6
25462 CXXFLAGS="$cf_save_CXXFLAGS"
25463
25464 if test -n "$CXX"; then
25465 echo "$as_me:25465: checking if $CXX accepts parameter initialization" >&5
25466 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25467 if test "${cf_cv_cpp_param_init+set}" = set; then
25468   echo $ECHO_N "(cached) $ECHO_C" >&6
25469 else
25470
25471         ac_ext=cc
25472 ac_cpp='$CXXCPP $CPPFLAGS'
25473 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25474 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25475 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25476 ac_main_return="return"
25477
25478         if test "$cross_compiling" = yes; then
25479   cf_cv_cpp_param_init=unknown
25480 else
25481   cat >"conftest.$ac_ext" <<_ACEOF
25482 #line 25482 "configure"
25483 #include "confdefs.h"
25484
25485 class TEST {
25486 private:
25487         int value;
25488 public:
25489         TEST(int x = 1);
25490         ~TEST();
25491 };
25492
25493 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25494 {
25495         value = x;
25496 }
25497 int main(void) { }
25498
25499 _ACEOF
25500 rm -f "conftest$ac_exeext"
25501 if { (eval echo "$as_me:25501: \"$ac_link\"") >&5
25502   (eval $ac_link) 2>&5
25503   ac_status=$?
25504   echo "$as_me:25504: \$? = $ac_status" >&5
25505   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25506   { (eval echo "$as_me:25506: \"$ac_try\"") >&5
25507   (eval $ac_try) 2>&5
25508   ac_status=$?
25509   echo "$as_me:25509: \$? = $ac_status" >&5
25510   (exit "$ac_status"); }; }; then
25511   cf_cv_cpp_param_init=yes
25512 else
25513   echo "$as_me: program exited with status $ac_status" >&5
25514 echo "$as_me: failed program was:" >&5
25515 cat "conftest.$ac_ext" >&5
25516 cf_cv_cpp_param_init=no
25517 fi
25518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25519 fi
25520         ac_ext=cc
25521 ac_cpp='$CXXCPP $CPPFLAGS'
25522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25523 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25525 ac_main_return="return"
25526
25527 fi
25528 echo "$as_me:25528: result: $cf_cv_cpp_param_init" >&5
25529 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25530 fi
25531 test "$cf_cv_cpp_param_init" = yes &&
25532 cat >>confdefs.h <<\EOF
25533 #define CPP_HAS_PARAM_INIT 1
25534 EOF
25535
25536 if test -n "$CXX"; then
25537
25538 echo "$as_me:25538: checking if $CXX accepts static_cast" >&5
25539 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25540 if test "${cf_cv_cpp_static_cast+set}" = set; then
25541   echo $ECHO_N "(cached) $ECHO_C" >&6
25542 else
25543
25544         ac_ext=cc
25545 ac_cpp='$CXXCPP $CPPFLAGS'
25546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25547 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25549 ac_main_return="return"
25550
25551         cat >"conftest.$ac_ext" <<_ACEOF
25552 #line 25552 "configure"
25553 #include "confdefs.h"
25554
25555 class NCursesPanel
25556 {
25557 public:
25558   NCursesPanel(int nlines,
25559                int ncols,
25560                int begin_y = 0,
25561                int begin_x = 0)
25562   {
25563   }
25564   NCursesPanel();
25565   ~NCursesPanel();
25566 };
25567
25568 template<class T> class NCursesUserPanel : public NCursesPanel
25569 {
25570 public:
25571   NCursesUserPanel (int nlines,
25572                     int ncols,
25573                     int begin_y = 0,
25574                     int begin_x = 0,
25575                     const T* p_UserData = static_cast<T*>(0))
25576     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25577   {
25578   };
25579   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25580   {
25581   };
25582
25583   virtual ~NCursesUserPanel() {};
25584 };
25585
25586 int
25587 main (void)
25588 {
25589
25590         const char* p_UserData = static_cast<char*>(0)
25591   ;
25592   return 0;
25593 }
25594 _ACEOF
25595 rm -f "conftest.$ac_objext"
25596 if { (eval echo "$as_me:25596: \"$ac_compile\"") >&5
25597   (eval $ac_compile) 2>&5
25598   ac_status=$?
25599   echo "$as_me:25599: \$? = $ac_status" >&5
25600   (exit "$ac_status"); } &&
25601          { ac_try='test -s "conftest.$ac_objext"'
25602   { (eval echo "$as_me:25602: \"$ac_try\"") >&5
25603   (eval $ac_try) 2>&5
25604   ac_status=$?
25605   echo "$as_me:25605: \$? = $ac_status" >&5
25606   (exit "$ac_status"); }; }; then
25607   cf_cv_cpp_static_cast=yes
25608 else
25609   echo "$as_me: failed program was:" >&5
25610 cat "conftest.$ac_ext" >&5
25611 cf_cv_cpp_static_cast=no
25612 fi
25613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25614
25615         ac_ext=cc
25616 ac_cpp='$CXXCPP $CPPFLAGS'
25617 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25618 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25619 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25620 ac_main_return="return"
25621
25622 fi
25623 echo "$as_me:25623: result: $cf_cv_cpp_static_cast" >&5
25624 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25625
25626 fi
25627
25628 test "$cf_cv_cpp_static_cast" = yes &&
25629 cat >>confdefs.h <<\EOF
25630 #define CPP_HAS_STATIC_CAST 1
25631 EOF
25632
25633         CXX_AR='$(AR)'
25634         CXX_ARFLAGS='$(ARFLAGS)'
25635         case "$cf_cv_system_name" in
25636         (irix*)
25637             if test "$GXX" != yes ; then
25638                 CXX_AR='$(CXX)'
25639                 CXX_ARFLAGS='-ar -o'
25640             fi
25641             ;;
25642         (sco3.2v5*)
25643             CXXLDFLAGS="-u main"
25644             ;;
25645         (solaris2*)
25646             if test "$GXX" != yes ; then
25647                 CXX_AR='$(CXX)'
25648                 CXX_ARFLAGS='-xar -o'
25649             fi
25650             ;;
25651         esac
25652
25653 else
25654         cf_cxx_library=no
25655         cf_cv_builtin_bool=1
25656
25657         # Just because we are not configuring against C++ right now does not
25658         # mean that a user will not want to use C++.  Some distributors disable
25659         # the C++ portion of this configuration as a shortcut (or just to avoid
25660         # compiling the demo in the c++ directory).  So we need a reasonable
25661         # default for the 'bool' type.
25662         #
25663         # Caveat: since the storage of the bool type is not standardized, it
25664         # may change.
25665
25666         if test "$NCURSES_BOOL" != auto ; then
25667                 cf_cv_type_of_bool=$NCURSES_BOOL
25668                 cf_cv_header_stdbool_h=0
25669         else
25670                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25671
25672 echo "$as_me:25672: checking for bool" >&5
25673 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25674 if test "${ac_cv_type_bool+set}" = set; then
25675   echo $ECHO_N "(cached) $ECHO_C" >&6
25676 else
25677   cat >"conftest.$ac_ext" <<_ACEOF
25678 #line 25678 "configure"
25679 #include "confdefs.h"
25680
25681 #include <stdlib.h>
25682 #include <stdio.h>
25683
25684 #if defined(__cplusplus)
25685
25686 #ifdef HAVE_GXX_BUILTIN_H
25687 #include <g++/builtin.h>
25688 #elif HAVE_GPP_BUILTIN_H
25689 #include <gpp/builtin.h>
25690 #elif HAVE_BUILTIN_H
25691 #include <builtin.h>
25692 #endif
25693
25694 #else
25695
25696 #if $cf_cv_header_stdbool_h
25697 #include <stdbool.h>
25698 #endif
25699
25700 #endif
25701
25702 int
25703 main (void)
25704 {
25705 if ((bool *) 0)
25706   return 0;
25707 if (sizeof (bool))
25708   return 0;
25709   ;
25710   return 0;
25711 }
25712 _ACEOF
25713 rm -f "conftest.$ac_objext"
25714 if { (eval echo "$as_me:25714: \"$ac_compile\"") >&5
25715   (eval $ac_compile) 2>&5
25716   ac_status=$?
25717   echo "$as_me:25717: \$? = $ac_status" >&5
25718   (exit "$ac_status"); } &&
25719          { ac_try='test -s "conftest.$ac_objext"'
25720   { (eval echo "$as_me:25720: \"$ac_try\"") >&5
25721   (eval $ac_try) 2>&5
25722   ac_status=$?
25723   echo "$as_me:25723: \$? = $ac_status" >&5
25724   (exit "$ac_status"); }; }; then
25725   ac_cv_type_bool=yes
25726 else
25727   echo "$as_me: failed program was:" >&5
25728 cat "conftest.$ac_ext" >&5
25729 ac_cv_type_bool=no
25730 fi
25731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25732 fi
25733 echo "$as_me:25733: result: $ac_cv_type_bool" >&5
25734 echo "${ECHO_T}$ac_cv_type_bool" >&6
25735
25736 echo "$as_me:25736: checking size of bool" >&5
25737 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25738 if test "${ac_cv_sizeof_bool+set}" = set; then
25739   echo $ECHO_N "(cached) $ECHO_C" >&6
25740 else
25741   if test "$ac_cv_type_bool" = yes; then
25742   if test "$cross_compiling" = yes; then
25743   # Depending upon the size, compute the lo and hi bounds.
25744 cat >"conftest.$ac_ext" <<_ACEOF
25745 #line 25745 "configure"
25746 #include "confdefs.h"
25747
25748 #include <stdlib.h>
25749 #include <stdio.h>
25750
25751 #if defined(__cplusplus)
25752
25753 #ifdef HAVE_GXX_BUILTIN_H
25754 #include <g++/builtin.h>
25755 #elif HAVE_GPP_BUILTIN_H
25756 #include <gpp/builtin.h>
25757 #elif HAVE_BUILTIN_H
25758 #include <builtin.h>
25759 #endif
25760
25761 #else
25762
25763 #if $cf_cv_header_stdbool_h
25764 #include <stdbool.h>
25765 #endif
25766
25767 #endif
25768
25769 int
25770 main (void)
25771 {
25772 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25773   ;
25774   return 0;
25775 }
25776 _ACEOF
25777 rm -f "conftest.$ac_objext"
25778 if { (eval echo "$as_me:25778: \"$ac_compile\"") >&5
25779   (eval $ac_compile) 2>&5
25780   ac_status=$?
25781   echo "$as_me:25781: \$? = $ac_status" >&5
25782   (exit "$ac_status"); } &&
25783          { ac_try='test -s "conftest.$ac_objext"'
25784   { (eval echo "$as_me:25784: \"$ac_try\"") >&5
25785   (eval $ac_try) 2>&5
25786   ac_status=$?
25787   echo "$as_me:25787: \$? = $ac_status" >&5
25788   (exit "$ac_status"); }; }; then
25789   ac_lo=0 ac_mid=0
25790   while :; do
25791     cat >"conftest.$ac_ext" <<_ACEOF
25792 #line 25792 "configure"
25793 #include "confdefs.h"
25794
25795 #include <stdlib.h>
25796 #include <stdio.h>
25797
25798 #if defined(__cplusplus)
25799
25800 #ifdef HAVE_GXX_BUILTIN_H
25801 #include <g++/builtin.h>
25802 #elif HAVE_GPP_BUILTIN_H
25803 #include <gpp/builtin.h>
25804 #elif HAVE_BUILTIN_H
25805 #include <builtin.h>
25806 #endif
25807
25808 #else
25809
25810 #if $cf_cv_header_stdbool_h
25811 #include <stdbool.h>
25812 #endif
25813
25814 #endif
25815
25816 int
25817 main (void)
25818 {
25819 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25820   ;
25821   return 0;
25822 }
25823 _ACEOF
25824 rm -f "conftest.$ac_objext"
25825 if { (eval echo "$as_me:25825: \"$ac_compile\"") >&5
25826   (eval $ac_compile) 2>&5
25827   ac_status=$?
25828   echo "$as_me:25828: \$? = $ac_status" >&5
25829   (exit "$ac_status"); } &&
25830          { ac_try='test -s "conftest.$ac_objext"'
25831   { (eval echo "$as_me:25831: \"$ac_try\"") >&5
25832   (eval $ac_try) 2>&5
25833   ac_status=$?
25834   echo "$as_me:25834: \$? = $ac_status" >&5
25835   (exit "$ac_status"); }; }; then
25836   ac_hi=$ac_mid; break
25837 else
25838   echo "$as_me: failed program was:" >&5
25839 cat "conftest.$ac_ext" >&5
25840 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25841 fi
25842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25843   done
25844 else
25845   echo "$as_me: failed program was:" >&5
25846 cat "conftest.$ac_ext" >&5
25847 ac_hi=-1 ac_mid=-1
25848   while :; do
25849     cat >"conftest.$ac_ext" <<_ACEOF
25850 #line 25850 "configure"
25851 #include "confdefs.h"
25852
25853 #include <stdlib.h>
25854 #include <stdio.h>
25855
25856 #if defined(__cplusplus)
25857
25858 #ifdef HAVE_GXX_BUILTIN_H
25859 #include <g++/builtin.h>
25860 #elif HAVE_GPP_BUILTIN_H
25861 #include <gpp/builtin.h>
25862 #elif HAVE_BUILTIN_H
25863 #include <builtin.h>
25864 #endif
25865
25866 #else
25867
25868 #if $cf_cv_header_stdbool_h
25869 #include <stdbool.h>
25870 #endif
25871
25872 #endif
25873
25874 int
25875 main (void)
25876 {
25877 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25878   ;
25879   return 0;
25880 }
25881 _ACEOF
25882 rm -f "conftest.$ac_objext"
25883 if { (eval echo "$as_me:25883: \"$ac_compile\"") >&5
25884   (eval $ac_compile) 2>&5
25885   ac_status=$?
25886   echo "$as_me:25886: \$? = $ac_status" >&5
25887   (exit "$ac_status"); } &&
25888          { ac_try='test -s "conftest.$ac_objext"'
25889   { (eval echo "$as_me:25889: \"$ac_try\"") >&5
25890   (eval $ac_try) 2>&5
25891   ac_status=$?
25892   echo "$as_me:25892: \$? = $ac_status" >&5
25893   (exit "$ac_status"); }; }; then
25894   ac_lo=$ac_mid; break
25895 else
25896   echo "$as_me: failed program was:" >&5
25897 cat "conftest.$ac_ext" >&5
25898 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25899 fi
25900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25901   done
25902 fi
25903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25904 # Binary search between lo and hi bounds.
25905 while test "x$ac_lo" != "x$ac_hi"; do
25906   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25907   cat >"conftest.$ac_ext" <<_ACEOF
25908 #line 25908 "configure"
25909 #include "confdefs.h"
25910
25911 #include <stdlib.h>
25912 #include <stdio.h>
25913
25914 #if defined(__cplusplus)
25915
25916 #ifdef HAVE_GXX_BUILTIN_H
25917 #include <g++/builtin.h>
25918 #elif HAVE_GPP_BUILTIN_H
25919 #include <gpp/builtin.h>
25920 #elif HAVE_BUILTIN_H
25921 #include <builtin.h>
25922 #endif
25923
25924 #else
25925
25926 #if $cf_cv_header_stdbool_h
25927 #include <stdbool.h>
25928 #endif
25929
25930 #endif
25931
25932 int
25933 main (void)
25934 {
25935 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25936   ;
25937   return 0;
25938 }
25939 _ACEOF
25940 rm -f "conftest.$ac_objext"
25941 if { (eval echo "$as_me:25941: \"$ac_compile\"") >&5
25942   (eval $ac_compile) 2>&5
25943   ac_status=$?
25944   echo "$as_me:25944: \$? = $ac_status" >&5
25945   (exit "$ac_status"); } &&
25946          { ac_try='test -s "conftest.$ac_objext"'
25947   { (eval echo "$as_me:25947: \"$ac_try\"") >&5
25948   (eval $ac_try) 2>&5
25949   ac_status=$?
25950   echo "$as_me:25950: \$? = $ac_status" >&5
25951   (exit "$ac_status"); }; }; then
25952   ac_hi=$ac_mid
25953 else
25954   echo "$as_me: failed program was:" >&5
25955 cat "conftest.$ac_ext" >&5
25956 ac_lo=`expr "$ac_mid" + 1`
25957 fi
25958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25959 done
25960 ac_cv_sizeof_bool=$ac_lo
25961 else
25962   if test "$cross_compiling" = yes; then
25963   { { echo "$as_me:25963: error: cannot run test program while cross compiling" >&5
25964 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25965    { (exit 1); exit 1; }; }
25966 else
25967   cat >"conftest.$ac_ext" <<_ACEOF
25968 #line 25968 "configure"
25969 #include "confdefs.h"
25970
25971 #include <stdlib.h>
25972 #include <stdio.h>
25973
25974 #if defined(__cplusplus)
25975
25976 #ifdef HAVE_GXX_BUILTIN_H
25977 #include <g++/builtin.h>
25978 #elif HAVE_GPP_BUILTIN_H
25979 #include <gpp/builtin.h>
25980 #elif HAVE_BUILTIN_H
25981 #include <builtin.h>
25982 #endif
25983
25984 #else
25985
25986 #if $cf_cv_header_stdbool_h
25987 #include <stdbool.h>
25988 #endif
25989
25990 #endif
25991
25992 int
25993 main (void)
25994 {
25995 FILE *f = fopen ("conftest.val", "w");
25996 if (!f)
25997   $ac_main_return (1);
25998 fprintf (f, "%d", (sizeof (bool)));
25999 fclose (f);
26000   ;
26001   return 0;
26002 }
26003 _ACEOF
26004 rm -f "conftest$ac_exeext"
26005 if { (eval echo "$as_me:26005: \"$ac_link\"") >&5
26006   (eval $ac_link) 2>&5
26007   ac_status=$?
26008   echo "$as_me:26008: \$? = $ac_status" >&5
26009   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26010   { (eval echo "$as_me:26010: \"$ac_try\"") >&5
26011   (eval $ac_try) 2>&5
26012   ac_status=$?
26013   echo "$as_me:26013: \$? = $ac_status" >&5
26014   (exit "$ac_status"); }; }; then
26015   ac_cv_sizeof_bool=`cat conftest.val`
26016 else
26017   echo "$as_me: program exited with status $ac_status" >&5
26018 echo "$as_me: failed program was:" >&5
26019 cat "conftest.$ac_ext" >&5
26020 fi
26021 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26022 fi
26023 fi
26024 rm -f conftest.val
26025 else
26026   ac_cv_sizeof_bool=0
26027 fi
26028 fi
26029 echo "$as_me:26029: result: $ac_cv_sizeof_bool" >&5
26030 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26031 cat >>confdefs.h <<EOF
26032 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26033 EOF
26034
26035 echo "$as_me:26035: checking for type of bool" >&5
26036 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26037 if test "${cf_cv_type_of_bool+set}" = set; then
26038   echo $ECHO_N "(cached) $ECHO_C" >&6
26039 else
26040
26041         rm -f cf_test.out
26042         if test "$cross_compiling" = yes; then
26043
26044                 case x$ac_cv_sizeof_bool in
26045                 (x1) cf_cv_type_of_bool="unsigned char";;
26046                 (x2) cf_cv_type_of_bool="unsigned short";;
26047                 (x4) cf_cv_type_of_bool="unsigned int";;
26048                 (x8) cf_cv_type_of_bool="unsigned long";;
26049                 (*)  cf_cv_type_of_bool=unknown;;
26050                 esac
26051
26052 else
26053   cat >"conftest.$ac_ext" <<_ACEOF
26054 #line 26054 "configure"
26055 #include "confdefs.h"
26056
26057 #include <stdlib.h>
26058 #include <stdio.h>
26059
26060 #if defined(__cplusplus)
26061
26062 #ifdef HAVE_GXX_BUILTIN_H
26063 #include <g++/builtin.h>
26064 #elif HAVE_GPP_BUILTIN_H
26065 #include <gpp/builtin.h>
26066 #elif HAVE_BUILTIN_H
26067 #include <builtin.h>
26068 #endif
26069
26070 #else
26071
26072 #if $cf_cv_header_stdbool_h
26073 #include <stdbool.h>
26074 #endif
26075
26076 #endif
26077
26078 int main(void)
26079 {
26080         FILE *fp = fopen("cf_test.out", "w");
26081         if (fp != 0) {
26082                 bool x = true;
26083                 if ((bool)(-x) >= 0)
26084                         fputs("unsigned ", fp);
26085                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26086                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26087                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26088                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26089                 fclose(fp);
26090         }
26091         ${cf_cv_main_return:-return}(0);
26092 }
26093
26094 _ACEOF
26095 rm -f "conftest$ac_exeext"
26096 if { (eval echo "$as_me:26096: \"$ac_link\"") >&5
26097   (eval $ac_link) 2>&5
26098   ac_status=$?
26099   echo "$as_me:26099: \$? = $ac_status" >&5
26100   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26101   { (eval echo "$as_me:26101: \"$ac_try\"") >&5
26102   (eval $ac_try) 2>&5
26103   ac_status=$?
26104   echo "$as_me:26104: \$? = $ac_status" >&5
26105   (exit "$ac_status"); }; }; then
26106   cf_cv_type_of_bool=`cat cf_test.out`
26107                  if test -z "$cf_cv_type_of_bool"; then
26108                    cf_cv_type_of_bool=unknown
26109                  fi
26110 else
26111   echo "$as_me: program exited with status $ac_status" >&5
26112 echo "$as_me: failed program was:" >&5
26113 cat "conftest.$ac_ext" >&5
26114 cf_cv_type_of_bool=unknown
26115 fi
26116 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26117 fi
26118         rm -f cf_test.out
26119
26120 fi
26121 echo "$as_me:26121: result: $cf_cv_type_of_bool" >&5
26122 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26123
26124 if test "$cf_cv_type_of_bool" = unknown ; then
26125         case .$NCURSES_BOOL in
26126         (.auto|.) NCURSES_BOOL=unsigned;;
26127         esac
26128         { echo "$as_me:26128: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26129 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26130         cf_cv_type_of_bool=$NCURSES_BOOL
26131 fi
26132
26133                 else
26134                         echo "$as_me:26134: checking for fallback type of bool" >&5
26135 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26136                         case "$host_cpu" in
26137                         (i?86)  cf_cv_type_of_bool=char ;;
26138                         (*)     cf_cv_type_of_bool=int  ;;
26139                         esac
26140                         echo "$as_me:26140: result: $cf_cv_type_of_bool" >&5
26141 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26142                 fi
26143         fi
26144 fi
26145
26146 # If the C compiler did not declare bool, and we did not determine that the C++
26147 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26148 # ncurses library use the same type as C++ bool.  Note that this allows one to
26149 # specify the type of bool in a configure-script option and postpone
26150 # integration with the C++ compiler provided that the types are compatible.
26151 USE_CXX_BOOL=1
26152 if test "$cf_cv_cc_bool_type" = 1
26153 then
26154         # oops: C has a bool.  Unlikely, but C++ could differ.
26155         USE_CXX_BOOL=0
26156 elif test "$cf_cv_builtin_bool" = 0
26157 then
26158         # C++ has no bool
26159         USE_CXX_BOOL=0
26160 else
26161         # this is the normal case
26162         USE_CXX_BOOL='defined(__cplusplus)'
26163 fi
26164
26165 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26166
26167         if test "$cf_with_ada" != "no" ; then
26168                 if test "$with_libtool" != "no"; then
26169                         { echo "$as_me:26169: WARNING: libtool does not support Ada - disabling feature" >&5
26170 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26171                         cf_with_ada=no
26172                 fi
26173         fi
26174
26175         if test "$cf_with_ada" != "no" ; then
26176
26177 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26178 do
26179
26180 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26181
26182         unset ac_cv_path_cf_TEMP_gnat
26183         unset cf_TEMP_gnat
26184         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26185 set dummy $cf_prog_gnat; ac_word=$2
26186 echo "$as_me:26186: checking for $ac_word" >&5
26187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26188 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26189   echo $ECHO_N "(cached) $ECHO_C" >&6
26190 else
26191   case $cf_TEMP_gnat in
26192   [\\/]* | ?:[\\/]*)
26193   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26194   ;;
26195   *)
26196   ac_save_IFS=$IFS; IFS=$ac_path_separator
26197 ac_dummy="$PATH"
26198 for ac_dir in $ac_dummy; do
26199   IFS=$ac_save_IFS
26200   test -z "$ac_dir" && ac_dir=.
26201   if $as_executable_p "$ac_dir/$ac_word"; then
26202    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26203    echo "$as_me:26203: found $ac_dir/$ac_word" >&5
26204    break
26205 fi
26206 done
26207
26208   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26209   ;;
26210 esac
26211 fi
26212 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26213
26214 if test -n "$cf_TEMP_gnat"; then
26215   echo "$as_me:26215: result: $cf_TEMP_gnat" >&5
26216 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26217 else
26218   echo "$as_me:26218: result: no" >&5
26219 echo "${ECHO_T}no" >&6
26220 fi
26221
26222         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26223
26224         if test "x$cf_TEMP_gnat" != xno; then
26225                 unset cf_cv_gnat_version
26226                 unset cf_TEMP_gnat
26227
26228 echo "$as_me:26228: checking for $cf_prog_gnat version" >&5
26229 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26230 if test "${cf_cv_gnat_version+set}" = set; then
26231   echo $ECHO_N "(cached) $ECHO_C" >&6
26232 else
26233
26234 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26235         grep '[0-9].[0-9][0-9]*' |\
26236         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26237
26238 fi
26239 echo "$as_me:26239: result: $cf_cv_gnat_version" >&5
26240 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26241 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26242 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26243
26244         fi
26245         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26246
26247         unset cf_TEMP_gnat
26248         unset cf_cv_gnat_version
26249         unset ac_cv_path_cf_TEMP_gnat
26250 done
26251
26252 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26253         cf_ada_make=
26254         cf_cv_prog_gnat_correct=no
26255 else
26256         cf_ada_make=gnatmake
26257         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26258                 # gprconfig is newer than gnatmake; we can continue...
26259                 cf_ada_config="##"
26260         else
26261                 rm -rf ./conftest* ./*~conftest*
26262                 if mkdir conftest.src
26263                 then
26264                         cf_ada_config=""
26265                         cd conftest.src
26266                         for cf_gprconfig in Ada C
26267                         do
26268                                 echo "$as_me:26268: checking for gprconfig name for $cf_gprconfig" >&5
26269 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26270                                 if test "$cf_gprconfig" = C
26271                                 then
26272                                         for cf_gprconfig_param in \
26273                                                 "$cf_gprconfig,,,,GNATGCC" \
26274                                                 "$cf_gprconfig,,,,GCC" \
26275                                                 "$cf_gprconfig"
26276                                         do
26277                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26278                                                 test -n "$cf_gprconfig_value" && break
26279                                         done
26280                                 else
26281                                         cf_gprconfig_param=$cf_gprconfig
26282                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26283                                 fi
26284                                 if test -n "$cf_gprconfig_value"
26285                                 then
26286                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26287                                         echo "$as_me:26287: result: $cf_gprconfig_value" >&5
26288 echo "${ECHO_T}$cf_gprconfig_value" >&6
26289                                 else
26290                                         echo "$as_me:26290: result: missing" >&5
26291 echo "${ECHO_T}missing" >&6
26292                                         cf_ada_config="#"
26293                                         break
26294                                 fi
26295                         done
26296                         cd ..
26297                         rm -rf ./conftest* ./*~conftest*
26298                 fi
26299         fi
26300         if test "x$cf_ada_config" != "x#"
26301         then
26302
26303 echo "$as_me:26303: checking for gnat version" >&5
26304 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26305 if test "${cf_cv_gnat_version+set}" = set; then
26306   echo $ECHO_N "(cached) $ECHO_C" >&6
26307 else
26308
26309 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26310         grep '[0-9].[0-9][0-9]*' |\
26311         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26312
26313 fi
26314 echo "$as_me:26314: result: $cf_cv_gnat_version" >&5
26315 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26316 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26317
26318 case "$cf_cv_gnat_version" in
26319 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26320         cf_cv_prog_gnat_correct=yes
26321         ;;
26322 (*)
26323         { echo "$as_me:26323: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26324 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26325         cf_cv_prog_gnat_correct=no
26326         ;;
26327 esac
26328
26329                 # Extract the first word of "m4", so it can be a program name with args.
26330 set dummy m4; ac_word=$2
26331 echo "$as_me:26331: checking for $ac_word" >&5
26332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26333 if test "${ac_cv_prog_M4_exists+set}" = set; then
26334   echo $ECHO_N "(cached) $ECHO_C" >&6
26335 else
26336   if test -n "$M4_exists"; then
26337   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26338 else
26339   ac_save_IFS=$IFS; IFS=$ac_path_separator
26340 ac_dummy="$PATH"
26341 for ac_dir in $ac_dummy; do
26342   IFS=$ac_save_IFS
26343   test -z "$ac_dir" && ac_dir=.
26344   $as_executable_p "$ac_dir/$ac_word" || continue
26345 ac_cv_prog_M4_exists="yes"
26346 echo "$as_me:26346: found $ac_dir/$ac_word" >&5
26347 break
26348 done
26349
26350   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26351 fi
26352 fi
26353 M4_exists=$ac_cv_prog_M4_exists
26354 if test -n "$M4_exists"; then
26355   echo "$as_me:26355: result: $M4_exists" >&5
26356 echo "${ECHO_T}$M4_exists" >&6
26357 else
26358   echo "$as_me:26358: result: no" >&5
26359 echo "${ECHO_T}no" >&6
26360 fi
26361
26362                 if test "$ac_cv_prog_M4_exists" = no; then
26363                         cf_cv_prog_gnat_correct=no
26364                         { echo "$as_me:26364: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26365 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26366                 fi
26367                 if test "$cf_cv_prog_gnat_correct" = yes; then
26368                         echo "$as_me:26368: checking if GNAT works" >&5
26369 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26370
26371 rm -rf ./conftest* ./*~conftest*
26372 cat >>conftest.ads <<CF_EOF
26373 procedure conftest;
26374 CF_EOF
26375 cat >>conftest.adb <<CF_EOF
26376 with Text_IO;
26377 with GNAT.OS_Lib;
26378 procedure conftest is
26379 begin
26380    Text_IO.Put ("Hello World");
26381    Text_IO.New_Line;
26382    GNAT.OS_Lib.OS_Exit (0);
26383 end conftest;
26384 CF_EOF
26385 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26386    if ( ./conftest 1>&5 2>&1 ) ; then
26387       cf_cv_prog_gnat_correct=yes
26388    else
26389       cf_cv_prog_gnat_correct=no
26390    fi
26391 else
26392    cf_cv_prog_gnat_correct=no
26393 fi
26394 rm -rf ./conftest* ./*~conftest*
26395
26396                         echo "$as_me:26396: result: $cf_cv_prog_gnat_correct" >&5
26397 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26398                 fi
26399         else
26400                 cf_cv_prog_gnat_correct=no
26401         fi
26402 fi
26403
26404                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26405
26406         ADAFLAGS="$ADAFLAGS -gnatpn"
26407
26408         echo "$as_me:26408: checking optimization options for ADAFLAGS" >&5
26409 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26410         case "$CFLAGS" in
26411         (*-g*)
26412
26413         ADAFLAGS="$ADAFLAGS -g"
26414
26415                 ;;
26416         esac
26417         case "$CFLAGS" in
26418         (*-O*)
26419                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26420
26421         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26422
26423                 ;;
26424         esac
26425         echo "$as_me:26425: result: $ADAFLAGS" >&5
26426 echo "${ECHO_T}$ADAFLAGS" >&6
26427
26428 echo "$as_me:26428: checking if GNATPREP supports -T option" >&5
26429 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26430 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26431   echo $ECHO_N "(cached) $ECHO_C" >&6
26432 else
26433
26434 cf_cv_gnatprep_opt_t=no
26435 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26436
26437 fi
26438 echo "$as_me:26438: result: $cf_cv_gnatprep_opt_t" >&5
26439 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26440 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26441
26442 echo "$as_me:26442: checking if GNAT supports generics" >&5
26443 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26444 case "$cf_cv_gnat_version" in
26445 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26446         cf_gnat_generics=yes
26447         ;;
26448 (*)
26449         cf_gnat_generics=no
26450         ;;
26451 esac
26452 echo "$as_me:26452: result: $cf_gnat_generics" >&5
26453 echo "${ECHO_T}$cf_gnat_generics" >&6
26454
26455 if test "$cf_gnat_generics" = yes
26456 then
26457         cf_compile_generics=generics
26458         cf_generic_objects="\${GENOBJS}"
26459 else
26460         cf_compile_generics=
26461         cf_generic_objects=
26462 fi
26463
26464 echo "$as_me:26464: checking if GNAT supports SIGINT" >&5
26465 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26466 if test "${cf_cv_gnat_sigint+set}" = set; then
26467   echo $ECHO_N "(cached) $ECHO_C" >&6
26468 else
26469
26470 rm -rf ./conftest* ./*~conftest*
26471 cat >>conftest.ads <<CF_EOF
26472 with Ada.Interrupts.Names;
26473
26474 package ConfTest is
26475
26476    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26477    pragma Unreserve_All_Interrupts;
26478    pragma Warnings (On);
26479
26480    protected Process is
26481       procedure Stop;
26482       function Continue return Boolean;
26483       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26484    private
26485       Done : Boolean := False;
26486    end Process;
26487
26488 end ConfTest;
26489 CF_EOF
26490 cat >>conftest.adb <<CF_EOF
26491 package body ConfTest is
26492    protected body Process is
26493       procedure Stop is
26494       begin
26495          Done := True;
26496       end Stop;
26497       function Continue return Boolean is
26498       begin
26499          return not Done;
26500       end Continue;
26501    end Process;
26502 end ConfTest;
26503 CF_EOF
26504 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26505       cf_cv_gnat_sigint=yes
26506 else
26507    cf_cv_gnat_sigint=no
26508 fi
26509 rm -rf ./conftest* ./*~conftest*
26510
26511 fi
26512 echo "$as_me:26512: result: $cf_cv_gnat_sigint" >&5
26513 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26514
26515 if test "$cf_cv_gnat_sigint" = yes ; then
26516         USE_GNAT_SIGINT=""
26517 else
26518         USE_GNAT_SIGINT="#"
26519 fi
26520
26521 cf_gnat_libraries=no
26522 cf_gnat_projects=no
26523
26524 if test "$enable_gnat_projects" != no ; then
26525 echo "$as_me:26525: checking if GNAT supports project files" >&5
26526 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26527 case "$cf_cv_gnat_version" in
26528 (3.[0-9]*)
26529         ;;
26530 (*)
26531         case "$cf_cv_system_name" in
26532         (cygwin*|msys*)
26533                 ;;
26534         (*)
26535                 rm -rf ./conftest* ./*~conftest*
26536                 if mkdir conftest.src conftest.bin conftest.lib
26537                 then
26538                         cd conftest.src
26539                         rm -rf ./conftest* ./*~conftest*
26540                         cat >>library.gpr <<CF_EOF
26541 project Library is
26542   Kind := External ("LIB_KIND");
26543   for Library_Name use "ConfTest";
26544   for Object_Dir use ".";
26545   for Library_ALI_Dir use External("LIBRARY_DIR");
26546   for Library_Version use External ("SONAME");
26547   for Library_Kind use Kind;
26548   for Library_Dir use External("BUILD_DIR");
26549   Source_Dir := External ("SOURCE_DIR");
26550   for Source_Dirs use (Source_Dir);
26551 end Library;
26552 CF_EOF
26553                         cat >>confpackage.ads <<CF_EOF
26554 package ConfPackage is
26555    procedure conftest;
26556 end ConfPackage;
26557 CF_EOF
26558                         cat >>confpackage.adb <<CF_EOF
26559 with Text_IO;
26560 package body ConfPackage is
26561    procedure conftest is
26562    begin
26563       Text_IO.Put ("Hello World");
26564       Text_IO.New_Line;
26565    end conftest;
26566 end ConfPackage;
26567 CF_EOF
26568                         if ( "$cf_ada_make" $ADAFLAGS \
26569                                         -Plibrary.gpr \
26570                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26571                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26572                                         -XSOURCE_DIR="`pwd`" \
26573                                         -XSONAME=libConfTest.so.1 \
26574                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26575                                 cf_gnat_projects=yes
26576                         fi
26577                         cd ..
26578                 fi
26579                 if test -f conftest.lib/confpackage.ali
26580                 then
26581                         cf_gnat_libraries=yes
26582                 fi
26583                 rm -rf ./conftest* ./*~conftest*
26584                 ;;
26585         esac
26586         ;;
26587 esac
26588 echo "$as_me:26588: result: $cf_gnat_projects" >&5
26589 echo "${ECHO_T}$cf_gnat_projects" >&6
26590 fi # enable_gnat_projects
26591
26592 if test "$cf_gnat_projects" = yes
26593 then
26594         echo "$as_me:26594: checking if GNAT supports libraries" >&5
26595 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26596         echo "$as_me:26596: result: $cf_gnat_libraries" >&5
26597 echo "${ECHO_T}$cf_gnat_libraries" >&6
26598 fi
26599
26600 USE_OLD_MAKERULES=""
26601 USE_GNAT_PROJECTS="#"
26602 USE_GNAT_MAKE_GPR="#"
26603 USE_GNAT_GPRBUILD="#"
26604
26605 if test "$cf_gnat_projects" = yes
26606 then
26607         USE_OLD_MAKERULES="#"
26608         USE_GNAT_PROJECTS=""
26609         if test "$cf_cv_VERSION_GPRBUILD" != no
26610         then
26611                 USE_GNAT_GPRBUILD=""
26612         elif test "$cf_cv_VERSION_GNATMAKE" != no
26613         then
26614                 USE_GNAT_MAKE_GPR=""
26615         else
26616                 { echo "$as_me:26616: WARNING: use old makefile rules since tools are missing" >&5
26617 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26618         fi
26619 fi
26620
26621 if test "$cf_gnat_libraries" = yes
26622 then
26623         USE_GNAT_LIBRARIES=""
26624 else
26625         USE_GNAT_LIBRARIES="#"
26626 fi
26627
26628 echo "$as_me:26628: checking for ada-compiler" >&5
26629 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26630
26631 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26632 if test "${with_ada_compiler+set}" = set; then
26633   withval="$with_ada_compiler"
26634   cf_ada_compiler=$withval
26635 else
26636   cf_ada_compiler=gnatmake
26637 fi;
26638
26639 echo "$as_me:26639: result: $cf_ada_compiler" >&5
26640 echo "${ECHO_T}$cf_ada_compiler" >&6
26641
26642                         cf_ada_package=terminal_interface
26643
26644 echo "$as_me:26644: checking for ada-include" >&5
26645 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26646
26647 # Check whether --with-ada-include or --without-ada-include was given.
26648 if test "${with_ada_include+set}" = set; then
26649   withval="$with_ada_include"
26650
26651 else
26652   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26653 fi; if test -n "$prefix/share/ada/adainclude" ; then
26654
26655 if test "x$prefix" != xNONE; then
26656         cf_path_syntax="$prefix"
26657 else
26658         cf_path_syntax="$ac_default_prefix"
26659 fi
26660
26661 case ".$withval" in
26662 (.\$\(*\)*|.\'*\'*)
26663         ;;
26664 (..|./*|.\\*)
26665         ;;
26666 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26667         ;;
26668 (.\$\{*prefix\}*|.\$\{*dir\}*)
26669         eval withval="$withval"
26670         case ".$withval" in
26671         (.NONE/*)
26672                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26673                 ;;
26674         esac
26675         ;;
26676 (.no|.NONE/*)
26677         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26678         ;;
26679 (*)
26680         { { echo "$as_me:26680: error: expected a pathname, not \"$withval\"" >&5
26681 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26682    { (exit 1); exit 1; }; }
26683         ;;
26684 esac
26685
26686 fi
26687 eval ADA_INCLUDE="$withval"
26688
26689 echo "$as_me:26689: result: $ADA_INCLUDE" >&5
26690 echo "${ECHO_T}$ADA_INCLUDE" >&6
26691
26692 echo "$as_me:26692: checking for ada-objects" >&5
26693 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26694
26695 # Check whether --with-ada-objects or --without-ada-objects was given.
26696 if test "${with_ada_objects+set}" = set; then
26697   withval="$with_ada_objects"
26698
26699 else
26700   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26701 fi; if test -n "$prefix/lib/ada/adalib" ; then
26702
26703 if test "x$prefix" != xNONE; then
26704         cf_path_syntax="$prefix"
26705 else
26706         cf_path_syntax="$ac_default_prefix"
26707 fi
26708
26709 case ".$withval" in
26710 (.\$\(*\)*|.\'*\'*)
26711         ;;
26712 (..|./*|.\\*)
26713         ;;
26714 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26715         ;;
26716 (.\$\{*prefix\}*|.\$\{*dir\}*)
26717         eval withval="$withval"
26718         case ".$withval" in
26719         (.NONE/*)
26720                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26721                 ;;
26722         esac
26723         ;;
26724 (.no|.NONE/*)
26725         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26726         ;;
26727 (*)
26728         { { echo "$as_me:26728: error: expected a pathname, not \"$withval\"" >&5
26729 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26730    { (exit 1); exit 1; }; }
26731         ;;
26732 esac
26733
26734 fi
26735 eval ADA_OBJECTS="$withval"
26736
26737 echo "$as_me:26737: result: $ADA_OBJECTS" >&5
26738 echo "${ECHO_T}$ADA_OBJECTS" >&6
26739
26740 echo "$as_me:26740: checking if an Ada95 shared-library should be built" >&5
26741 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26742
26743 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26744 if test "${with_ada_sharedlib+set}" = set; then
26745   withval="$with_ada_sharedlib"
26746   with_ada_sharedlib=$withval
26747 else
26748   with_ada_sharedlib=no
26749 fi;
26750 echo "$as_me:26750: result: $with_ada_sharedlib" >&5
26751 echo "${ECHO_T}$with_ada_sharedlib" >&6
26752
26753 if test "x$with_ada_sharedlib" != xno
26754 then
26755         if test "x$cf_gnat_projects" != xyes
26756         then
26757                 { echo "$as_me:26757: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26758 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26759                 with_ada_sharedlib=no
26760         fi
26761 fi
26762
26763 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26764 MAKE_ADA_SHAREDLIB="#"
26765
26766 if test "x$with_ada_sharedlib" != xno
26767 then
26768         MAKE_ADA_SHAREDLIB=
26769         if test "x$with_ada_sharedlib" != xyes
26770         then
26771                 ADA_SHAREDLIB="$with_ada_sharedlib"
26772         fi
26773 fi
26774
26775                         # allow the Ada binding to be renamed
26776
26777 echo "$as_me:26777: checking for ada-libname" >&5
26778 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26779
26780 # Check whether --with-ada-libname or --without-ada-libname was given.
26781 if test "${with_ada_libname+set}" = set; then
26782   withval="$with_ada_libname"
26783   ADA_LIBNAME=$withval
26784 else
26785   ADA_LIBNAME=AdaCurses
26786 fi;
26787 case "x$ADA_LIBNAME" in
26788 (x|xyes|xno)
26789         ADA_LIBNAME=AdaCurses
26790         ;;
26791 esac
26792
26793 echo "$as_me:26793: result: $ADA_LIBNAME" >&5
26794 echo "${ECHO_T}$ADA_LIBNAME" >&6
26795
26796                 fi
26797         fi
26798 else
26799         cf_with_ada=no
26800 fi
26801
26802 # do this "late" to avoid conflict with header-checks
26803 if test "x$with_widec" = xyes ; then
26804         echo "$as_me:26804: checking for wchar_t" >&5
26805 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26806 if test "${ac_cv_type_wchar_t+set}" = set; then
26807   echo $ECHO_N "(cached) $ECHO_C" >&6
26808 else
26809   cat >"conftest.$ac_ext" <<_ACEOF
26810 #line 26810 "configure"
26811 #include "confdefs.h"
26812 $ac_includes_default
26813 int
26814 main (void)
26815 {
26816 if ((wchar_t *) 0)
26817   return 0;
26818 if (sizeof (wchar_t))
26819   return 0;
26820   ;
26821   return 0;
26822 }
26823 _ACEOF
26824 rm -f "conftest.$ac_objext"
26825 if { (eval echo "$as_me:26825: \"$ac_compile\"") >&5
26826   (eval $ac_compile) 2>&5
26827   ac_status=$?
26828   echo "$as_me:26828: \$? = $ac_status" >&5
26829   (exit "$ac_status"); } &&
26830          { ac_try='test -s "conftest.$ac_objext"'
26831   { (eval echo "$as_me:26831: \"$ac_try\"") >&5
26832   (eval $ac_try) 2>&5
26833   ac_status=$?
26834   echo "$as_me:26834: \$? = $ac_status" >&5
26835   (exit "$ac_status"); }; }; then
26836   ac_cv_type_wchar_t=yes
26837 else
26838   echo "$as_me: failed program was:" >&5
26839 cat "conftest.$ac_ext" >&5
26840 ac_cv_type_wchar_t=no
26841 fi
26842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26843 fi
26844 echo "$as_me:26844: result: $ac_cv_type_wchar_t" >&5
26845 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26846
26847 echo "$as_me:26847: checking size of wchar_t" >&5
26848 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26849 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26850   echo $ECHO_N "(cached) $ECHO_C" >&6
26851 else
26852   if test "$ac_cv_type_wchar_t" = yes; then
26853   if test "$cross_compiling" = yes; then
26854   # Depending upon the size, compute the lo and hi bounds.
26855 cat >"conftest.$ac_ext" <<_ACEOF
26856 #line 26856 "configure"
26857 #include "confdefs.h"
26858 $ac_includes_default
26859 int
26860 main (void)
26861 {
26862 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26863   ;
26864   return 0;
26865 }
26866 _ACEOF
26867 rm -f "conftest.$ac_objext"
26868 if { (eval echo "$as_me:26868: \"$ac_compile\"") >&5
26869   (eval $ac_compile) 2>&5
26870   ac_status=$?
26871   echo "$as_me:26871: \$? = $ac_status" >&5
26872   (exit "$ac_status"); } &&
26873          { ac_try='test -s "conftest.$ac_objext"'
26874   { (eval echo "$as_me:26874: \"$ac_try\"") >&5
26875   (eval $ac_try) 2>&5
26876   ac_status=$?
26877   echo "$as_me:26877: \$? = $ac_status" >&5
26878   (exit "$ac_status"); }; }; then
26879   ac_lo=0 ac_mid=0
26880   while :; do
26881     cat >"conftest.$ac_ext" <<_ACEOF
26882 #line 26882 "configure"
26883 #include "confdefs.h"
26884 $ac_includes_default
26885 int
26886 main (void)
26887 {
26888 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26889   ;
26890   return 0;
26891 }
26892 _ACEOF
26893 rm -f "conftest.$ac_objext"
26894 if { (eval echo "$as_me:26894: \"$ac_compile\"") >&5
26895   (eval $ac_compile) 2>&5
26896   ac_status=$?
26897   echo "$as_me:26897: \$? = $ac_status" >&5
26898   (exit "$ac_status"); } &&
26899          { ac_try='test -s "conftest.$ac_objext"'
26900   { (eval echo "$as_me:26900: \"$ac_try\"") >&5
26901   (eval $ac_try) 2>&5
26902   ac_status=$?
26903   echo "$as_me:26903: \$? = $ac_status" >&5
26904   (exit "$ac_status"); }; }; then
26905   ac_hi=$ac_mid; break
26906 else
26907   echo "$as_me: failed program was:" >&5
26908 cat "conftest.$ac_ext" >&5
26909 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26910 fi
26911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26912   done
26913 else
26914   echo "$as_me: failed program was:" >&5
26915 cat "conftest.$ac_ext" >&5
26916 ac_hi=-1 ac_mid=-1
26917   while :; do
26918     cat >"conftest.$ac_ext" <<_ACEOF
26919 #line 26919 "configure"
26920 #include "confdefs.h"
26921 $ac_includes_default
26922 int
26923 main (void)
26924 {
26925 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
26926   ;
26927   return 0;
26928 }
26929 _ACEOF
26930 rm -f "conftest.$ac_objext"
26931 if { (eval echo "$as_me:26931: \"$ac_compile\"") >&5
26932   (eval $ac_compile) 2>&5
26933   ac_status=$?
26934   echo "$as_me:26934: \$? = $ac_status" >&5
26935   (exit "$ac_status"); } &&
26936          { ac_try='test -s "conftest.$ac_objext"'
26937   { (eval echo "$as_me:26937: \"$ac_try\"") >&5
26938   (eval $ac_try) 2>&5
26939   ac_status=$?
26940   echo "$as_me:26940: \$? = $ac_status" >&5
26941   (exit "$ac_status"); }; }; then
26942   ac_lo=$ac_mid; break
26943 else
26944   echo "$as_me: failed program was:" >&5
26945 cat "conftest.$ac_ext" >&5
26946 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26947 fi
26948 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26949   done
26950 fi
26951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26952 # Binary search between lo and hi bounds.
26953 while test "x$ac_lo" != "x$ac_hi"; do
26954   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26955   cat >"conftest.$ac_ext" <<_ACEOF
26956 #line 26956 "configure"
26957 #include "confdefs.h"
26958 $ac_includes_default
26959 int
26960 main (void)
26961 {
26962 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26963   ;
26964   return 0;
26965 }
26966 _ACEOF
26967 rm -f "conftest.$ac_objext"
26968 if { (eval echo "$as_me:26968: \"$ac_compile\"") >&5
26969   (eval $ac_compile) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); } &&
26973          { ac_try='test -s "conftest.$ac_objext"'
26974   { (eval echo "$as_me:26974: \"$ac_try\"") >&5
26975   (eval $ac_try) 2>&5
26976   ac_status=$?
26977   echo "$as_me:26977: \$? = $ac_status" >&5
26978   (exit "$ac_status"); }; }; then
26979   ac_hi=$ac_mid
26980 else
26981   echo "$as_me: failed program was:" >&5
26982 cat "conftest.$ac_ext" >&5
26983 ac_lo=`expr "$ac_mid" + 1`
26984 fi
26985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26986 done
26987 ac_cv_sizeof_wchar_t=$ac_lo
26988 else
26989   if test "$cross_compiling" = yes; then
26990   { { echo "$as_me:26990: error: cannot run test program while cross compiling" >&5
26991 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26992    { (exit 1); exit 1; }; }
26993 else
26994   cat >"conftest.$ac_ext" <<_ACEOF
26995 #line 26995 "configure"
26996 #include "confdefs.h"
26997 $ac_includes_default
26998 int
26999 main (void)
27000 {
27001 FILE *f = fopen ("conftest.val", "w");
27002 if (!f)
27003   $ac_main_return (1);
27004 fprintf (f, "%d", (sizeof (wchar_t)));
27005 fclose (f);
27006   ;
27007   return 0;
27008 }
27009 _ACEOF
27010 rm -f "conftest$ac_exeext"
27011 if { (eval echo "$as_me:27011: \"$ac_link\"") >&5
27012   (eval $ac_link) 2>&5
27013   ac_status=$?
27014   echo "$as_me:27014: \$? = $ac_status" >&5
27015   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27016   { (eval echo "$as_me:27016: \"$ac_try\"") >&5
27017   (eval $ac_try) 2>&5
27018   ac_status=$?
27019   echo "$as_me:27019: \$? = $ac_status" >&5
27020   (exit "$ac_status"); }; }; then
27021   ac_cv_sizeof_wchar_t=`cat conftest.val`
27022 else
27023   echo "$as_me: program exited with status $ac_status" >&5
27024 echo "$as_me: failed program was:" >&5
27025 cat "conftest.$ac_ext" >&5
27026 fi
27027 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27028 fi
27029 fi
27030 rm -f conftest.val
27031 else
27032   ac_cv_sizeof_wchar_t=0
27033 fi
27034 fi
27035 echo "$as_me:27035: result: $ac_cv_sizeof_wchar_t" >&5
27036 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27037 cat >>confdefs.h <<EOF
27038 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27039 EOF
27040
27041         # cross-compiling to mingw can run into the problem that attempting to
27042         # link with the regex library fails, causing the test to not set this to
27043         # a number.  "recent" autoconf does not address this problem either -TD
27044         if test -z "$ac_cv_sizeof_wchar_t"
27045         then
27046                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27047
27048 echo "${as_me:-configure}:27048: testing test failed (assume 2) ..." 1>&5
27049
27050                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27051                 mv confdefs.tmp confdefs.h
27052                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27053         fi
27054 fi
27055
27056 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27057 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27058 ###
27059 ### ticlib modules may be a separate library, otherwise contained in termlib.
27060 ### termlib modules may be a separate library, otherwise contained in ncurses.
27061 ###
27062 ### The of "+" or " " between the tokens controls the way the script
27063 ### chooses to split module lists into libraries.
27064 ###
27065 ### (see CF_LIB_RULES).
27066 echo "$as_me:27066: checking for library subsets" >&5
27067 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27068 LIB_SUBSETS=
27069
27070 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27071         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27072         if test "$with_ticlib" != no ; then
27073                 LIB_SUBSETS="${LIB_SUBSETS} "
27074         else
27075                 LIB_SUBSETS="${LIB_SUBSETS}+"
27076         fi
27077 fi
27078
27079 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27080 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27081
27082 if test "$with_termlib" != no ; then
27083         LIB_SUBSETS="${LIB_SUBSETS} "
27084 else
27085         LIB_SUBSETS="${LIB_SUBSETS}+"
27086 fi
27087
27088 LIB_SUBSETS="${LIB_SUBSETS}base"
27089
27090 # Most term-driver calls are to tinfo, but some like init_pair are to the
27091 # base library (so it resides in base).
27092 if test "$with_term_driver" != no ; then
27093         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27094         case "$cf_cv_system_name" in
27095         (*mingw32*|*mingw64*)
27096                 if test "x$with_exp_win32" = xyes ; then
27097                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27098                 else
27099                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27100                 fi
27101                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27102                 ;;
27103         (*)
27104                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27105                 ;;
27106         esac
27107 elif test "x$with_exp_win32" = xyes ; then
27108         case "$cf_cv_system_name" in
27109         (*mingw32*|*mingw64*)
27110                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27111                 ;;
27112         (*)
27113                 ;;
27114         esac
27115 fi
27116
27117 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27118 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27119
27120 echo "$as_me:27120: result: $LIB_SUBSETS" >&5
27121 echo "${ECHO_T}$LIB_SUBSETS" >&6
27122
27123 ### Construct the list of include-directories to be generated
27124
27125 if test "$srcdir" != "."; then
27126         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27127 fi
27128 CPPFLAGS="-I../include $CPPFLAGS"
27129 if test "$srcdir" != "."; then
27130         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27131 fi
27132 CPPFLAGS="-I. $CPPFLAGS"
27133
27134 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27135 if test "$srcdir" != "."; then
27136         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27137 fi
27138 if test "$GCC" != yes; then
27139         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27140 elif test "$includedir" != "/usr/include"; then
27141         if test "$includedir" = '${prefix}/include' ; then
27142                 if test x$prefix != x/usr ; then
27143                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27144                 fi
27145         else
27146                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27147         fi
27148 fi
27149
27150 ### Build up pieces for makefile rules
27151 echo "$as_me:27151: checking default library suffix" >&5
27152 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27153
27154         case $DFT_LWR_MODEL in
27155         (libtool) DFT_ARG_SUFFIX=''   ;;
27156         (normal)  DFT_ARG_SUFFIX=''   ;;
27157         (debug)   DFT_ARG_SUFFIX='_g' ;;
27158         (profile) DFT_ARG_SUFFIX='_p' ;;
27159         (shared)  DFT_ARG_SUFFIX=''   ;;
27160         esac
27161         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27162 echo "$as_me:27162: result: $DFT_ARG_SUFFIX" >&5
27163 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27164
27165 echo "$as_me:27165: checking default library-dependency suffix" >&5
27166 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27167
27168         case X$DFT_LWR_MODEL in
27169         (Xlibtool)
27170                 DFT_LIB_SUFFIX='.la'
27171                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27172                 ;;
27173         (Xdebug)
27174                 case "$cf_cv_system_name" in
27175                 (*-msvc*)
27176                         DFT_LIB_SUFFIX='_g.lib'
27177                         ;;
27178                 (*)
27179                         DFT_LIB_SUFFIX='_g.a'
27180                         ;;
27181                 esac
27182                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27183                 ;;
27184         (Xprofile)
27185                 case "$cf_cv_system_name" in
27186                 (*-msvc*)
27187                         DFT_LIB_SUFFIX='_p.lib'
27188                         ;;
27189                 (*)
27190                         DFT_LIB_SUFFIX='_p.a'
27191                         ;;
27192                 esac
27193                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27194                 ;;
27195         (Xshared)
27196                 case "$cf_cv_system_name" in
27197                 (aix[5-7]*)
27198                         DFT_LIB_SUFFIX='.so'
27199                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27200                         ;;
27201                 (*-msvc*)
27202                         DFT_LIB_SUFFIX='.dll'
27203                         DFT_DEP_SUFFIX='.dll.lib'
27204                         ;;
27205                 (cygwin*|msys*|mingw*)
27206                         DFT_LIB_SUFFIX='.dll'
27207                         DFT_DEP_SUFFIX='.dll.a'
27208                         ;;
27209                 (darwin*)
27210                         DFT_LIB_SUFFIX='.dylib'
27211                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27212                         ;;
27213                 (hpux*)
27214                         case "$target" in
27215                         (ia64*)
27216                                 DFT_LIB_SUFFIX='.so'
27217                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27218                                 ;;
27219                         (*)
27220                                 DFT_LIB_SUFFIX='.sl'
27221                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27222                                 ;;
27223                         esac
27224                         ;;
27225                 (*)
27226                         DFT_LIB_SUFFIX='.so'
27227                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27228                         ;;
27229                 esac
27230                 ;;
27231         (*)
27232                 case "$target" in
27233                 (*-msvc*)
27234                         DFT_LIB_SUFFIX='.lib'
27235                         ;;
27236                 (*)
27237                         DFT_LIB_SUFFIX='.a'
27238                         ;;
27239                 esac
27240                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27241                 ;;
27242         esac
27243         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27244         then
27245                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27246                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27247         fi
27248 echo "$as_me:27248: result: $DFT_DEP_SUFFIX" >&5
27249 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27250
27251 echo "$as_me:27251: checking default object directory" >&5
27252 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27253
27254         case $DFT_LWR_MODEL in
27255         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27256         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27257         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27258         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27259         (shared)
27260                 case "$cf_cv_system_name" in
27261                 (cygwin|msys)
27262                         DFT_OBJ_SUBDIR='objects' ;;
27263                 (*)
27264                         DFT_OBJ_SUBDIR='obj_s' ;;
27265                 esac
27266         esac
27267 echo "$as_me:27267: result: $DFT_OBJ_SUBDIR" >&5
27268 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27269
27270 if test "x$cf_with_cxx" = xyes ; then
27271 echo "$as_me:27271: checking c++ library-dependency suffix" >&5
27272 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27273 if test "$with_libtool" != "no"; then
27274         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27275         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27276 elif test "$with_shared_cxx" != "no"; then
27277         # also for g++ users...
27278         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27279 else
27280         # we normally make a static library because C/C++ library rules differ
27281
27282         case Xnormal in
27283         (Xlibtool)
27284                 CXX_LIB_SUFFIX='.la'
27285                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27286                 ;;
27287         (Xdebug)
27288                 case "$cf_cv_system_name" in
27289                 (*-msvc*)
27290                         CXX_LIB_SUFFIX='_g.lib'
27291                         ;;
27292                 (*)
27293                         CXX_LIB_SUFFIX='_g.a'
27294                         ;;
27295                 esac
27296                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27297                 ;;
27298         (Xprofile)
27299                 case "$cf_cv_system_name" in
27300                 (*-msvc*)
27301                         CXX_LIB_SUFFIX='_p.lib'
27302                         ;;
27303                 (*)
27304                         CXX_LIB_SUFFIX='_p.a'
27305                         ;;
27306                 esac
27307                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27308                 ;;
27309         (Xshared)
27310                 case "$cf_cv_system_name" in
27311                 (aix[5-7]*)
27312                         CXX_LIB_SUFFIX='.so'
27313                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27314                         ;;
27315                 (*-msvc*)
27316                         CXX_LIB_SUFFIX='.dll'
27317                         CXX_DEP_SUFFIX='.dll.lib'
27318                         ;;
27319                 (cygwin*|msys*|mingw*)
27320                         CXX_LIB_SUFFIX='.dll'
27321                         CXX_DEP_SUFFIX='.dll.a'
27322                         ;;
27323                 (darwin*)
27324                         CXX_LIB_SUFFIX='.dylib'
27325                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27326                         ;;
27327                 (hpux*)
27328                         case "$target" in
27329                         (ia64*)
27330                                 CXX_LIB_SUFFIX='.so'
27331                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27332                                 ;;
27333                         (*)
27334                                 CXX_LIB_SUFFIX='.sl'
27335                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27336                                 ;;
27337                         esac
27338                         ;;
27339                 (*)
27340                         CXX_LIB_SUFFIX='.so'
27341                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27342                         ;;
27343                 esac
27344                 ;;
27345         (*)
27346                 case "$target" in
27347                 (*-msvc*)
27348                         CXX_LIB_SUFFIX='.lib'
27349                         ;;
27350                 (*)
27351                         CXX_LIB_SUFFIX='.a'
27352                         ;;
27353                 esac
27354                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27355                 ;;
27356         esac
27357         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27358         then
27359                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27360                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27361         fi
27362
27363 fi
27364 echo "$as_me:27364: result: $CXX_LIB_SUFFIX" >&5
27365 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27366
27367 fi
27368
27369 # do not want -ldl in build except as needed for -lncurses dependency
27370 if test "x$with_dlsym" = xyes ; then
27371 if test "$DFT_LWR_MODEL" = shared || \
27372    test "$DFT_LWR_MODEL" = libtool ; then
27373
27374 # remove dl library from $LIBS
27375 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27376
27377 fi
27378 fi
27379 ### Set up low-level terminfo dependencies for makefiles.
27380
27381 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27382 # do not need libdl
27383 TICS_LIST=
27384 if test "x$with_dlsym" = xyes ; then
27385
27386 # remove dl library from $SHLIB_LIST
27387 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27388
27389 fi
27390
27391 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27392 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27393 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27394 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27395 then
27396         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27397 fi
27398
27399 if test "$with_ticlib" != no ; then
27400
27401         if test "x$with_ticlib" != xyes ; then
27402                 TICS_NAME=$with_ticlib
27403                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27404                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27405                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27406                 TICS_LIB_SUFFIX="${with_ticlib}"
27407         else
27408                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27409                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27410                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27411                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27412         fi
27413         TICS_LDFLAGS="-L${LIB_DIR}"
27414         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27415 else
27416         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27417         TICS_LDFLAGS="-L${LIB_DIR}"
27418         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27419 fi
27420
27421 if test "$with_termlib" != no ; then
27422
27423         if test "x$with_termlib" != xyes ; then
27424                 TINFO_NAME=$with_termlib
27425                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27426                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27427                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27428                 TINFO_LIB_SUFFIX="${with_termlib}"
27429         else
27430                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27431                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27432                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27433                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27434         fi
27435
27436         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27437         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27438         if test "$DFT_LWR_MODEL" = "libtool"; then
27439                 TEST_ARGS="${TEST_DEPS}"
27440                 TEST_ARG2="${TEST_DEP2}"
27441                 TINFO_LDFLAGS="-L${LIB_DIR}"
27442                 TINFO_LIBS="$TEST_ARGS"
27443                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27444                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27445         else
27446                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27447                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27448                 if test "x$with_term_driver" != xno ; then
27449                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27450                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27451                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27452                 else
27453                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27454                         TINFO_LIBS="$TEST_ARGS"
27455                 fi
27456                 TINFO_LDFLAGS="-L${LIB_DIR}"
27457                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27458         fi
27459 else
27460         # the next lines are needed for linking libtic over libncurses
27461         TINFO_NAME=${LIB_NAME}
27462         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27463         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27464         if test "x$with_tic_depends" = xyes ; then
27465                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27466         else
27467                 TICS_LIST="$SHLIB_LIST"
27468         fi
27469
27470         TINFO_LDFLAGS="-L${LIB_DIR}"
27471         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27472 fi
27473
27474 if test "$DFT_LWR_MODEL" = shared ; then
27475         case "$cf_cv_system_name" in
27476         (cygwin*|msys*)
27477                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27478                 TINFO_SUFFIX=.dll
27479                 ;;
27480         esac
27481 fi
27482
27483 if test "x$with_dlsym" = xyes ; then
27484
27485 # remove dl library from $TICS_LIST
27486 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27487
27488 fi
27489
27490 if test "$DFT_LWR_MODEL" = "libtool"; then
27491         OBJEXT=lo
27492 fi
27493
27494 # needed for Ada95
27495 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27496
27497 case "$DFT_LWR_MODEL" in
27498 (normal|debug|profile)
27499
27500 if test "$GCC" = yes ; then
27501         case "$cf_cv_system_name" in
27502         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27503                 LDFLAGS_STATIC=
27504                 LDFLAGS_SHARED=
27505                 ;;
27506         (*)     # normally, except when broken
27507                 LDFLAGS_STATIC=-static
27508                 LDFLAGS_SHARED=-dynamic
27509                 ;;
27510         esac
27511 else
27512         case "$cf_cv_system_name" in
27513         (aix[4-7]*)     # from ld manpage
27514                 LDFLAGS_STATIC=-bstatic
27515                 LDFLAGS_SHARED=-bdynamic
27516                 ;;
27517         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27518                 # We could also use just "archive" and "shared".
27519                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27520                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27521                 ;;
27522         (irix*)         # from ld manpage IRIX64
27523                 LDFLAGS_STATIC=-Bstatic
27524                 LDFLAGS_SHARED=-Bdynamic
27525                 ;;
27526         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27527                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27528                 LDFLAGS_STATIC=-noso
27529                 LDFLAGS_SHARED=-so_archive
27530                 ;;
27531         (solaris2*)
27532                 LDFLAGS_STATIC=-Bstatic
27533                 LDFLAGS_SHARED=-Bdynamic
27534                 ;;
27535         esac
27536 fi
27537
27538 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27539 then
27540         echo "$as_me:27540: checking if linker supports switching between static/dynamic" >&5
27541 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27542
27543         rm -f libconftest.a
27544         cat >conftest.$ac_ext <<EOF
27545 #line 27545 "configure"
27546 #include <stdio.h>
27547 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27548 EOF
27549         if { (eval echo "$as_me:27549: \"$ac_compile\"") >&5
27550   (eval $ac_compile) 2>&5
27551   ac_status=$?
27552   echo "$as_me:27552: \$? = $ac_status" >&5
27553   (exit "$ac_status"); } ; then
27554                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27555                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27556         fi
27557         rm -f conftest.*
27558
27559         cf_save_LIBS="$LIBS"
27560
27561         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27562         cat >"conftest.$ac_ext" <<_ACEOF
27563 #line 27563 "configure"
27564 #include "confdefs.h"
27565
27566 #line 27566 "configure"
27567 #include <stdio.h>
27568 int cf_ldflags_static(FILE *fp);
27569
27570 int
27571 main (void)
27572 {
27573
27574         return cf_ldflags_static(stdin);
27575
27576   ;
27577   return 0;
27578 }
27579 _ACEOF
27580 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27581 if { (eval echo "$as_me:27581: \"$ac_link\"") >&5
27582   (eval $ac_link) 2>&5
27583   ac_status=$?
27584   echo "$as_me:27584: \$? = $ac_status" >&5
27585   (exit "$ac_status"); } &&
27586          { ac_try='test -s "conftest$ac_exeext"'
27587   { (eval echo "$as_me:27587: \"$ac_try\"") >&5
27588   (eval $ac_try) 2>&5
27589   ac_status=$?
27590   echo "$as_me:27590: \$? = $ac_status" >&5
27591   (exit "$ac_status"); }; }; then
27592
27593         # some linkers simply ignore the -dynamic
27594         case x`file "conftest$ac_exeext" 2>/dev/null` in
27595         (*static*)
27596                 cf_ldflags_static=no
27597                 ;;
27598         (*)
27599                 cf_ldflags_static=yes
27600                 ;;
27601         esac
27602
27603 else
27604   echo "$as_me: failed program was:" >&5
27605 cat "conftest.$ac_ext" >&5
27606 cf_ldflags_static=no
27607 fi
27608 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27609
27610         rm -f libconftest.*
27611         LIBS="$cf_save_LIBS"
27612
27613         echo "$as_me:27613: result: $cf_ldflags_static" >&5
27614 echo "${ECHO_T}$cf_ldflags_static" >&6
27615
27616         if test "$cf_ldflags_static" != yes
27617         then
27618                 LDFLAGS_STATIC=
27619                 LDFLAGS_SHARED=
27620         fi
27621 else
27622         LDFLAGS_STATIC=
27623         LDFLAGS_SHARED=
27624 fi
27625
27626         ;;
27627 esac
27628
27629 echo "$as_me:27629: checking where we will install curses.h" >&5
27630 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27631
27632 includesubdir=
27633 if test "$with_overwrite" = no && \
27634  { test "x$includedir" = 'x${prefix}/include' || \
27635    test "x$includedir" = "x${prefix}/include"; }
27636 then
27637         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27638 fi
27639 echo "$as_me:27639: result: ${includedir}${includesubdir}" >&5
27640 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27641
27642 ### Resolve a conflict between normal and wide-curses by forcing applications
27643 ### that will need libutf8 to add it to their configure script.
27644 if test "$with_overwrite" != no ; then
27645 if test "$NCURSES_LIBUTF8" = 1 ; then
27646         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27647         { echo "$as_me:27647: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27648 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27649 fi
27650 fi
27651 WITH_OVERWRITE=$with_overwrite
27652
27653 ### At least on MinGW a shared library build without libtool
27654 ### requires adding the additional libs to the link list.
27655 case "$cf_cv_system_name" in
27656 (*mingw32*|*mingw64*)
27657         if test "$DFT_LWR_MODEL" != "libtool"; then
27658            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27659         fi
27660         ;;
27661 *)      ;;
27662 esac
27663
27664 # used to separate tack out of the tree
27665 NCURSES_TREE=
27666
27667 ### predefined stuff for the test programs
27668
27669 cat >>confdefs.h <<\EOF
27670 #define HAVE_SLK_COLOR 1
27671 EOF
27672
27673 # pkgsrc uses these
27674
27675 echo "$as_me:27675: checking for desired basename for form library" >&5
27676 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27677
27678 # Check whether --with-form-libname or --without-form-libname was given.
27679 if test "${with_form_libname+set}" = set; then
27680   withval="$with_form_libname"
27681   with_lib_basename=$withval
27682 else
27683   with_lib_basename=form
27684 fi;
27685 FORM_NAME="$with_lib_basename"
27686
27687 case "x$FORM_NAME" in
27688 (x|xno|xnone|xyes)
27689         FORM_NAME=form
27690         ;;
27691 (*)
27692         ;;
27693 esac
27694
27695 echo "$as_me:27695: result: $FORM_NAME" >&5
27696 echo "${ECHO_T}$FORM_NAME" >&6
27697
27698 echo "$as_me:27698: checking for desired basename for menu library" >&5
27699 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27700
27701 # Check whether --with-menu-libname or --without-menu-libname was given.
27702 if test "${with_menu_libname+set}" = set; then
27703   withval="$with_menu_libname"
27704   with_lib_basename=$withval
27705 else
27706   with_lib_basename=menu
27707 fi;
27708 MENU_NAME="$with_lib_basename"
27709
27710 case "x$MENU_NAME" in
27711 (x|xno|xnone|xyes)
27712         MENU_NAME=menu
27713         ;;
27714 (*)
27715         ;;
27716 esac
27717
27718 echo "$as_me:27718: result: $MENU_NAME" >&5
27719 echo "${ECHO_T}$MENU_NAME" >&6
27720
27721 echo "$as_me:27721: checking for desired basename for panel library" >&5
27722 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27723
27724 # Check whether --with-panel-libname or --without-panel-libname was given.
27725 if test "${with_panel_libname+set}" = set; then
27726   withval="$with_panel_libname"
27727   with_lib_basename=$withval
27728 else
27729   with_lib_basename=panel
27730 fi;
27731 PANEL_NAME="$with_lib_basename"
27732
27733 case "x$PANEL_NAME" in
27734 (x|xno|xnone|xyes)
27735         PANEL_NAME=panel
27736         ;;
27737 (*)
27738         ;;
27739 esac
27740
27741 echo "$as_me:27741: result: $PANEL_NAME" >&5
27742 echo "${ECHO_T}$PANEL_NAME" >&6
27743
27744 echo "$as_me:27744: checking for desired basename for cxx library" >&5
27745 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27746
27747 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27748 if test "${with_cxx_libname+set}" = set; then
27749   withval="$with_cxx_libname"
27750   with_lib_basename=$withval
27751 else
27752   with_lib_basename=ncurses++
27753 fi;
27754 CXX_NAME="$with_lib_basename"
27755
27756 case "x$CXX_NAME" in
27757 (x|xno|xnone|xyes)
27758         CXX_NAME=ncurses++
27759         ;;
27760 (*)
27761         ;;
27762 esac
27763
27764 echo "$as_me:27764: result: $CXX_NAME" >&5
27765 echo "${ECHO_T}$CXX_NAME" >&6
27766
27767 ### Construct the list of subdirectories for which we'll customize makefiles
27768 ### with the appropriate compile-rules.
27769
27770 echo "$as_me:27770: checking for src modules" >&5
27771 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27772
27773 # dependencies and linker-arguments for test-programs
27774 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27775 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27776 if test "$DFT_LWR_MODEL" = "libtool"; then
27777         TEST_ARGS="${TEST_DEPS}"
27778         TEST_ARG2="${TEST_DEP2}"
27779 else
27780         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27781         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27782 fi
27783
27784 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27785 cf_cv_src_modules=
27786 for cf_dir in $modules_to_build
27787 do
27788         if test -f "$srcdir/$cf_dir/modules" ; then
27789
27790                 # We may/may not have tack in the distribution, though the
27791                 # makefile is.
27792                 if test "$cf_dir" = tack ; then
27793                         if test "x$cf_with_tack" != "xyes"; then
27794                                 continue
27795                         fi
27796                 fi
27797
27798                 if test -z "$cf_cv_src_modules"; then
27799                         cf_cv_src_modules=$cf_dir
27800                 else
27801                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27802                 fi
27803
27804                 # Make the ncurses_cfg.h file record the library interface files as
27805                 # well.  These are header files that are the same name as their
27806                 # directory.  Ncurses is the only library that does not follow
27807                 # that pattern.
27808                 if test "$cf_dir" = tack ; then
27809                         continue
27810                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27811
27812 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27813
27814                         cat >>confdefs.h <<EOF
27815 #define HAVE_${cf_have_include}_H 1
27816 EOF
27817
27818                         cat >>confdefs.h <<EOF
27819 #define HAVE_LIB${cf_have_include} 1
27820 EOF
27821
27822 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27823
27824 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
27825
27826                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27827                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27828                         if test "$DFT_LWR_MODEL" = "libtool"; then
27829                                 TEST_ARGS="${TEST_DEPS}"
27830                                 TEST_ARG2="${TEST_DEP2}"
27831                         else
27832                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27833                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27834                         fi
27835                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27836                 fi
27837         fi
27838 done
27839 echo "$as_me:27839: result: $cf_cv_src_modules" >&5
27840 echo "${ECHO_T}$cf_cv_src_modules" >&6
27841
27842 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27843 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27844
27845 SRC_SUBDIRS=
27846 if test "x$cf_with_manpages" != xno ; then
27847         SRC_SUBDIRS="$SRC_SUBDIRS man"
27848 fi
27849 SRC_SUBDIRS="$SRC_SUBDIRS include"
27850 for cf_dir in $cf_cv_src_modules
27851 do
27852         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27853 done
27854 if test "x$cf_with_tests" != "xno" ; then
27855         SRC_SUBDIRS="$SRC_SUBDIRS test"
27856 fi
27857 # always make this, to install the ncurses-config script
27858 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27859 if test "$cf_with_cxx_binding" != no; then
27860         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27861         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27862 fi
27863
27864 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27865 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27866
27867 ADA_SUBDIRS=
27868 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
27869         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27870         ADA_SUBDIRS="gen src"
27871         if test "x$cf_with_tests" != "xno" ; then
27872                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27873         fi
27874 fi
27875
27876 SUB_MAKEFILES=
27877 for cf_dir in $SRC_SUBDIRS
27878 do
27879         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27880 done
27881
27882 if test -n "$ADA_SUBDIRS"; then
27883         for cf_dir in $ADA_SUBDIRS
27884         do
27885                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27886         done
27887
27888 fi
27889
27890 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27891    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27892    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27893    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27894 fi
27895
27896 DIRS_TO_MAKE="lib"
27897 for cf_item in $cf_list_models
27898 do
27899
27900         case $cf_item in
27901         (libtool) cf_subdir='obj_lo'  ;;
27902         (normal)  cf_subdir='objects' ;;
27903         (debug)   cf_subdir='obj_g' ;;
27904         (profile) cf_subdir='obj_p' ;;
27905         (shared)
27906                 case "$cf_cv_system_name" in
27907                 (cygwin|msys)
27908                         cf_subdir='objects' ;;
27909                 (*)
27910                         cf_subdir='obj_s' ;;
27911                 esac
27912         esac
27913
27914         for cf_item2 in $DIRS_TO_MAKE
27915         do
27916                 test "$cf_item2" = "$cf_subdir" && break
27917         done
27918         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
27919 done
27920 for cf_dir in $DIRS_TO_MAKE
27921 do
27922         test ! -d "$cf_dir" && mkdir "$cf_dir"
27923 done
27924
27925 # symbols that differ when compiling Ada95 by itself.
27926 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
27927
27928 # values to use as strings
27929
27930 cat >>confdefs.h <<EOF
27931 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
27932 EOF
27933
27934 cat >>confdefs.h <<EOF
27935 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
27936 EOF
27937
27938 ### Define substitutions for header files to avoid name-pollution
27939
27940 if test "x$cf_cv_have_tcgetattr" = xyes ; then
27941         HAVE_TCGETATTR=1
27942 else
27943         HAVE_TCGETATTR=0
27944 fi
27945
27946 if test "x$ac_cv_header_stdint_h" = xyes ; then
27947         HAVE_STDINT_H=1
27948 else
27949         HAVE_STDINT_H=0
27950 fi
27951
27952 if test "x$ac_cv_header_termio_h" = xyes ; then
27953         HAVE_TERMIO_H=1
27954 else
27955         HAVE_TERMIO_H=0
27956 fi
27957
27958 if test "x$ac_cv_header_termios_h" = xyes ; then
27959         HAVE_TERMIOS_H=1
27960 else
27961         HAVE_TERMIOS_H=0
27962 fi
27963
27964 ################################################################################
27965 test "x$use_database" = xyes && \
27966 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
27967
27968 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
27969 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
27970
27971 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
27972 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
27973 fi
27974
27975 if test "x$cf_with_tests" != xno ; then
27976         MAKE_TESTS=
27977 else
27978         MAKE_TESTS="#"
27979 fi
27980
27981 ADAHTML_DIR=../../doc/html/ada
27982
27983 # workaround for OS/2 (20151017)
27984 case "$cf_cv_system_name" in
27985 (os2*)
27986         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
27987         ;;
27988 (*)
27989         LIBTOOL_OPTS_CXX=
27990         ;;
27991 esac
27992
27993 # workaround for g++ versus Solaris (20131116)
27994 case "$cf_cv_system_name" in
27995 (solaris2*)
27996         case "x$CPPFLAGS" in
27997         (*-D_XOPEN_SOURCE_EXTENDED*)
27998                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
27999
28000 echo "${as_me:-configure}:28000: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28001
28002                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28003                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28004                 ;;
28005         esac
28006         ;;
28007 esac
28008
28009 # Help to automatically enable the extended curses features when using either
28010 # the *-config or the ".pc" files by adding defines.
28011 echo "$as_me:28011: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28012 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28013 PKG_CFLAGS=
28014 for cf_loop1 in $CPPFLAGS_after_XOPEN
28015 do
28016         cf_found=no
28017         for cf_loop2 in $CPPFLAGS_before_XOPEN
28018         do
28019                 if test "x$cf_loop1" = "x$cf_loop2"
28020                 then
28021                         cf_found=yes
28022                         break
28023                 fi
28024         done
28025         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28026 done
28027 echo "$as_me:28027: result: $PKG_CFLAGS" >&5
28028 echo "${ECHO_T}$PKG_CFLAGS" >&6
28029
28030 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28031 case "x$NCURSES_OSPEED" in
28032 (*short*)
28033         cf_compatible=1
28034         ;;
28035 (*)
28036         cf_compatible=0
28037         ;;
28038 esac
28039
28040 cat >>confdefs.h <<EOF
28041 #define NCURSES_OSPEED_COMPAT $cf_compatible
28042 EOF
28043
28044 case "x$cf_cv_typeof_chtype" in
28045 (xshort|xint|xlong)
28046         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28047         ;;
28048 esac
28049
28050 case "x$cf_cv_typeof_mmask_t" in
28051 (xshort|xint|xlong)
28052         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28053         ;;
28054 esac
28055
28056 # substitute into misc/Makefile to suppress
28057 # (un)install.data from the
28058 # (un)install rules.
28059 if test "x$cf_with_db_install" = "xno"; then
28060         MISC_INSTALL_DATA=
28061         MISC_UNINSTALL_DATA=
28062 else
28063         MISC_INSTALL_DATA=install.data
28064         MISC_UNINSTALL_DATA=uninstall.data
28065 fi
28066
28067 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28068         MAKE_DATABASE="#"
28069 else
28070         MAKE_DATABASE="$MAKE_TERMINFO"
28071 fi
28072
28073 if test -n "$PACKAGE"
28074 then
28075         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28076         export PACKAGE
28077         echo "package: $PACKAGE"
28078 fi
28079
28080 UNALTERED_SYMS=
28081 cf_filter_syms=no
28082
28083 if test -n "$RESULTING_SYMS"
28084 then
28085         cf_filter_syms=$cf_dft_filter_syms
28086         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28087
28088 echo "${as_me:-configure}:28088: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28089
28090 fi
28091
28092 if test "x$WILDCARD_SYMS" = xno
28093 then
28094         cf_filter_syms=yes
28095 fi
28096
28097 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28098
28099 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28100 if test "$cf_filter_syms" = yes
28101 then
28102         RESULTING_SYMS=resulting.map
28103 fi
28104
28105 if test "x$cross_compiling" = xyes ; then
28106         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28107         CHECK_BUILD="#"
28108 else
28109         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28110         CHECK_BUILD=
28111 fi
28112
28113 # This is used for the *-config script and *.pc data files.
28114
28115 echo "$as_me:28115: checking for linker search path" >&5
28116 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28117 if test "${cf_cv_ld_searchpath+set}" = set; then
28118   echo $ECHO_N "(cached) $ECHO_C" >&6
28119 else
28120
28121 if test "$cross_compiling" != yes ; then
28122
28123 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28124 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28125
28126 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28127 # update the cache, which makes it run faster.
28128 test -z "$cf_pathlist" && \
28129         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
28130
28131 test -z "$cf_pathlist" &&
28132         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
28133
28134 # This works with OpenBSD 6.5, which lists only filenames
28135 test -z "$cf_pathlist" &&
28136         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28137
28138 if test -z "$cf_pathlist"
28139 then
28140         # dyld default path with MacOS
28141         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28142         then
28143                 # do this to bypass check
28144                 cf_cv_ld_searchpath='$HOME/lib'
28145                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28146         fi
28147 fi
28148
28149 if test -z "$cf_pathlist"
28150 then
28151         # Solaris is hardcoded
28152         if test -d /opt/SUNWspro/lib
28153         then
28154                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
28155         elif test -d /usr/ccs/lib
28156         then
28157                 cf_pathlist="/usr/ccs/lib /usr/lib"
28158         fi
28159 fi
28160
28161 fi
28162
28163 # If nothing else, assume it is conventional
28164 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28165
28166 # Finally, check that this is only directories
28167 for cf_path in $0 $cf_pathlist
28168 do
28169         if test -d "$cf_path"; then
28170                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28171                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28172         fi
28173 done
28174
28175 # Ensure that it is nonempty
28176 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28177
28178 fi
28179 echo "$as_me:28179: result: $cf_cv_ld_searchpath" >&5
28180 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28181
28182 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28183
28184 cat >>confdefs.h <<\EOF
28185 #define HAVE_CURSES_DATA_BOOLNAMES 1
28186 EOF
28187
28188 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"
28189 ac_config_commands="$ac_config_commands default"
28190 cat >confcache <<\_ACEOF
28191 # This file is a shell script that caches the results of configure
28192 # tests run on this system so they can be shared between configure
28193 # scripts and configure runs, see configure's option --config-cache.
28194 # It is not useful on other systems.  If it contains results you don't
28195 # want to keep, you may remove or edit it.
28196 #
28197 # config.status only pays attention to the cache file if you give it
28198 # the --recheck option to rerun configure.
28199 #
28200 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28201 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28202 # following values.
28203
28204 _ACEOF
28205
28206 # The following way of writing the cache mishandles newlines in values,
28207 # but we know of no workaround that is simple, portable, and efficient.
28208 # So, don't put newlines in cache variables' values.
28209 # Ultrix sh set writes to stderr and can't be redirected directly,
28210 # and sets the high bit in the cache file unless we assign to the vars.
28211 {
28212   (set) 2>&1 |
28213     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28214     *ac_space=\ *)
28215       # `set' does not quote correctly, so add quotes (double-quote
28216       # substitution turns \\\\ into \\, and sed turns \\ into \).
28217       sed -n \
28218         "s/'/'\\\\''/g;
28219           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28220       ;;
28221     *)
28222       # `set' quotes correctly as required by POSIX, so do not add quotes.
28223       sed -n \
28224         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28225       ;;
28226     esac;
28227 } |
28228   sed '
28229      t clear
28230      : clear
28231      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28232      t end
28233      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28234      : end' >>confcache
28235 if cmp -s $cache_file confcache; then :; else
28236   if test -w $cache_file; then
28237     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28238     cat confcache >$cache_file
28239   else
28240     echo "not updating unwritable cache $cache_file"
28241   fi
28242 fi
28243 rm -f confcache
28244
28245 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28246 # Let make expand exec_prefix.
28247 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28248
28249 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28250 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28251 # trailing colons and then remove the whole line if VPATH becomes empty
28252 # (actually we leave an empty line to preserve line numbers).
28253 if test "x$srcdir" = x.; then
28254   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28255 s/:*\$(srcdir):*/:/;
28256 s/:*\${srcdir}:*/:/;
28257 s/:*@srcdir@:*/:/;
28258 s/^\([^=]*=[    ]*\):*/\1/;
28259 s/:*$//;
28260 s/^[^=]*=[      ]*$//;
28261 }'
28262 fi
28263
28264 DEFS=-DHAVE_CONFIG_H
28265
28266 : "${CONFIG_STATUS=./config.status}"
28267 ac_clean_files_save=$ac_clean_files
28268 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28269 { echo "$as_me:28269: creating $CONFIG_STATUS" >&5
28270 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28271 cat >"$CONFIG_STATUS" <<_ACEOF
28272 #! $SHELL
28273 # Generated automatically by configure.
28274 # Run this file to recreate the current configuration.
28275 # Compiler output produced by configure, useful for debugging
28276 # configure, is in config.log if it exists.
28277
28278 debug=false
28279 SHELL=\${CONFIG_SHELL-$SHELL}
28280 ac_cs_invocation="\$0 \$@"
28281
28282 CLICOLOR_FORCE= GREP_OPTIONS=
28283 unset CLICOLOR_FORCE GREP_OPTIONS
28284 _ACEOF
28285
28286 cat >>"$CONFIG_STATUS" <<\_ACEOF
28287 # Be Bourne compatible
28288 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28289   emulate sh
28290   NULLCMD=:
28291 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28292   set -o posix
28293 fi
28294
28295 # Name of the executable.
28296 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28297
28298 if expr a : '\(a\)' >/dev/null 2>&1; then
28299   as_expr=expr
28300 else
28301   as_expr=false
28302 fi
28303
28304 rm -f conf$$ conf$$.exe conf$$.file
28305 echo >conf$$.file
28306 if ln -s conf$$.file conf$$ 2>/dev/null; then
28307   # We could just check for DJGPP; but this test a) works b) is more generic
28308   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28309   if test -f conf$$.exe; then
28310     # Don't use ln at all; we don't have any links
28311     as_ln_s='cp -p'
28312   else
28313     as_ln_s='ln -s'
28314   fi
28315 elif ln conf$$.file conf$$ 2>/dev/null; then
28316   as_ln_s=ln
28317 else
28318   as_ln_s='cp -p'
28319 fi
28320 rm -f conf$$ conf$$.exe conf$$.file
28321
28322 as_executable_p="test -f"
28323
28324 # Support unset when possible.
28325 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28326   as_unset="unset"
28327 else
28328   as_unset="false"
28329 fi
28330
28331 # NLS nuisances.
28332 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28333 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28334 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28335 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28336 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28337 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28338 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28339 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28340
28341 # IFS
28342 # We need space, tab and new line, in precisely that order.
28343 as_nl='
28344 '
28345 IFS="   $as_nl"
28346
28347 # CDPATH.
28348 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28349
28350 exec 6>&1
28351
28352 _ACEOF
28353
28354 # Files that config.status was made for.
28355 if test -n "$ac_config_files"; then
28356   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28357 fi
28358
28359 if test -n "$ac_config_headers"; then
28360   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28361 fi
28362
28363 if test -n "$ac_config_links"; then
28364   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28365 fi
28366
28367 if test -n "$ac_config_commands"; then
28368   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28369 fi
28370
28371 cat >>"$CONFIG_STATUS" <<\EOF
28372
28373 ac_cs_usage="\
28374 \`$as_me' instantiates files from templates according to the
28375 current configuration.
28376
28377 Usage: $0 [OPTIONS] [FILE]...
28378
28379   -h, --help       print this help, then exit
28380   -V, --version    print version number, then exit
28381   -d, --debug      don't remove temporary files
28382       --recheck    update $as_me by reconfiguring in the same conditions
28383   --file=FILE[:TEMPLATE]
28384                    instantiate the configuration file FILE
28385   --header=FILE[:TEMPLATE]
28386                    instantiate the configuration header FILE
28387
28388 Configuration files:
28389 $config_files
28390
28391 Configuration headers:
28392 $config_headers
28393
28394 Configuration commands:
28395 $config_commands
28396
28397 Report bugs to <dickey@invisible-island.net>."
28398 EOF
28399
28400 cat >>"$CONFIG_STATUS" <<EOF
28401 ac_cs_version="\\
28402 config.status
28403 configured by $0, generated by GNU Autoconf 2.52.20210105,
28404   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28405
28406 Copyright 2003-2020,2021        Thomas E. Dickey
28407 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28408 Free Software Foundation, Inc.
28409 This config.status script is free software; the Free Software Foundation
28410 gives unlimited permission to copy, distribute and modify it."
28411 srcdir="$srcdir"
28412 INSTALL="$INSTALL"
28413 EOF
28414
28415 cat >>"$CONFIG_STATUS" <<\EOF
28416 # If no file are specified by the user, then we need to provide default
28417 # value.  By we need to know if files were specified by the user.
28418 ac_need_defaults=:
28419 while test $# != 0
28420 do
28421   case $1 in
28422   --*=*)
28423     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28424     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28425     shift
28426     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28427     shift
28428     ;;
28429   -*);;
28430   *) # This is not an option, so the user has probably given explicit
28431      # arguments.
28432      ac_need_defaults=false;;
28433   esac
28434
28435   case $1 in
28436   # Handling of the options.
28437 EOF
28438 cat >>"$CONFIG_STATUS" <<EOF
28439   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28440     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28441     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28442 EOF
28443 cat >>"$CONFIG_STATUS" <<\EOF
28444   --version | --vers* | -V )
28445     echo "$ac_cs_version"; exit 0 ;;
28446   --he | --h)
28447     # Conflict between --help and --header
28448     { { echo "$as_me:28448: error: ambiguous option: $1
28449 Try \`$0 --help' for more information." >&5
28450 echo "$as_me: error: ambiguous option: $1
28451 Try \`$0 --help' for more information." >&2;}
28452    { (exit 1); exit 1; }; };;
28453   --help | --hel | -h )
28454     echo "$ac_cs_usage"; exit 0 ;;
28455   --debug | --d* | -d )
28456     debug=: ;;
28457   --file | --fil | --fi | --f )
28458     shift
28459     CONFIG_FILES="$CONFIG_FILES $1"
28460     ac_need_defaults=false;;
28461   --header | --heade | --head | --hea )
28462     shift
28463     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28464     ac_need_defaults=false;;
28465
28466   # This is an error.
28467   -*) { { echo "$as_me:28467: error: unrecognized option: $1
28468 Try \`$0 --help' for more information." >&5
28469 echo "$as_me: error: unrecognized option: $1
28470 Try \`$0 --help' for more information." >&2;}
28471    { (exit 1); exit 1; }; } ;;
28472
28473   *) ac_config_targets="$ac_config_targets $1" ;;
28474
28475   esac
28476   shift
28477 done
28478
28479 exec 5>>config.log
28480 cat >&5 << _ACEOF
28481
28482 ## ----------------------- ##
28483 ## Running config.status.  ##
28484 ## ----------------------- ##
28485
28486 This file was extended by $as_me 2.52.20210105, executed with
28487   CONFIG_FILES    = $CONFIG_FILES
28488   CONFIG_HEADERS  = $CONFIG_HEADERS
28489   CONFIG_LINKS    = $CONFIG_LINKS
28490   CONFIG_COMMANDS = $CONFIG_COMMANDS
28491   > "$ac_cs_invocation"
28492 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28493
28494 _ACEOF
28495 EOF
28496
28497 cat >>"$CONFIG_STATUS" <<EOF
28498 #
28499 # INIT-COMMANDS section.
28500 #
28501
28502 ### Special initialization commands, used to pass information from the
28503 ### configuration-run into config.status
28504
28505 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28506 AWK="$AWK"
28507 CXX_NAME="$CXX_NAME"
28508 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28509 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28510 ECHO_LD="$ECHO_LD"
28511 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28512 FORM_NAME="$FORM_NAME"
28513 LDCONFIG="$LDCONFIG"
28514 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28515 LIB_NAME="$LIB_NAME"
28516 LIB_PREFIX="$LIB_PREFIX"
28517 LIB_SUBSETS="$LIB_SUBSETS"
28518 LIB_SUFFIX="$LIB_SUFFIX"
28519 LIB_TRACING="$LIB_TRACING"
28520 LN_S="$LN_S"
28521 MAKE_TERMINFO="$MAKE_TERMINFO"
28522 MENU_NAME="$MENU_NAME"
28523 NCURSES_MAJOR="$NCURSES_MAJOR"
28524 NCURSES_MINOR="$NCURSES_MINOR"
28525 NCURSES_OSPEED="$NCURSES_OSPEED"
28526 NCURSES_PATCH="$NCURSES_PATCH"
28527 PANEL_NAME="$PANEL_NAME"
28528 SRC_SUBDIRS="$SRC_SUBDIRS"
28529 TERMINFO="$TERMINFO"
28530 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28531 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28532 TICS_NAME="$TICS_NAME"
28533 TICS_SUFFIX="$TICS_SUFFIX"
28534 TIC_PATH="$TIC_PATH"
28535 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28536 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28537 TINFO_NAME="$TINFO_NAME"
28538 TINFO_SUFFIX="$TINFO_SUFFIX"
28539 UNALTERED_SYMS="$UNALTERED_SYMS"
28540 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28541 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28542 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28543 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28544 WILDCARD_SYMS="$WILDCARD_SYMS"
28545 WITH_CURSES_H="$with_curses_h"
28546 WITH_ECHO="${enable_echo:=yes}"
28547 WITH_OVERWRITE="$with_overwrite"
28548 cf_LIST_MODELS="$cf_list_models"
28549 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28550 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28551 cf_cv_abi_version="$cf_cv_abi_version"
28552 cf_cv_do_relink="$cf_cv_do_relink"
28553 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28554 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28555 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28556 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28557 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28558 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28559 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28560 cf_cv_rel_version="$cf_cv_rel_version"
28561 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28562 cf_cv_shared_soname='$cf_cv_shared_soname'
28563 cf_cv_shlib_version="$cf_cv_shlib_version"
28564 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28565 cf_cv_system_name="$cf_cv_system_name"
28566 cf_cv_term_driver="$with_term_driver"
28567 cf_with_ada="$cf_with_ada"
28568 cf_with_cxx_binding="$cf_with_cxx_binding"
28569 cf_with_db_install="$cf_with_db_install"
28570 cf_with_manpages="$cf_with_manpages"
28571 cf_with_tests="$cf_with_tests"
28572 host="$host"
28573 target="$target"
28574 with_shared_cxx="$with_shared_cxx"
28575
28576 EOF
28577
28578 cat >>"$CONFIG_STATUS" <<\EOF
28579 for ac_config_target in $ac_config_targets
28580 do
28581   case "$ac_config_target" in
28582   # Handling of arguments.
28583   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28584   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28585   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28586   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28587   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28588   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28589   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28590   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28591   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28592   *) { { echo "$as_me:28592: error: invalid argument: $ac_config_target" >&5
28593 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28594    { (exit 1); exit 1; }; };;
28595   esac
28596 done
28597
28598 # If the user did not use the arguments to specify the items to instantiate,
28599 # then the envvar interface is used.  Set only those that are not.
28600 # We use the long form for the default assignment because of an extremely
28601 # bizarre bug on SunOS 4.1.3.
28602 if "$ac_need_defaults"; then
28603   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28604   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28605   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28606 fi
28607
28608 # Create a temporary directory, and hook for its removal unless debugging.
28609 $debug ||
28610 {
28611   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28612   trap '{ (exit 1); exit 1; }' 1 2 13 15
28613 }
28614
28615 # Create a (secure) tmp directory for tmp files.
28616 : ${TMPDIR=/tmp}
28617 {
28618   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28619   test -n "$tmp" && test -d "$tmp"
28620 }  ||
28621 {
28622   tmp=$TMPDIR/cs$$-$RANDOM
28623   (umask 077 && mkdir $tmp)
28624 } ||
28625 {
28626    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28627    { (exit 1); exit 1; }
28628 }
28629
28630 EOF
28631
28632 cat >>"$CONFIG_STATUS" <<EOF
28633
28634 #
28635 # CONFIG_FILES section.
28636 #
28637
28638 # No need to generate the scripts if there are no CONFIG_FILES.
28639 # This happens for instance when ./config.status config.h
28640 if test -n "\$CONFIG_FILES"; then
28641   # Protect against being on the right side of a sed subst in config.status.
28642   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28643    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28644 s,@SHELL@,$SHELL,;t t
28645 s,@exec_prefix@,$exec_prefix,;t t
28646 s,@prefix@,$prefix,;t t
28647 s,@program_transform_name@,$program_transform_name,;t t
28648 s,@bindir@,$bindir,;t t
28649 s,@sbindir@,$sbindir,;t t
28650 s,@libexecdir@,$libexecdir,;t t
28651 s,@datarootdir@,$datarootdir,;t t
28652 s,@datadir@,$datadir,;t t
28653 s,@sysconfdir@,$sysconfdir,;t t
28654 s,@sharedstatedir@,$sharedstatedir,;t t
28655 s,@localstatedir@,$localstatedir,;t t
28656 s,@runstatedir@,$runstatedir,;t t
28657 s,@libdir@,$libdir,;t t
28658 s,@includedir@,$includedir,;t t
28659 s,@oldincludedir@,$oldincludedir,;t t
28660 s,@infodir@,$infodir,;t t
28661 s,@mandir@,$mandir,;t t
28662 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28663 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28664 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28665 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28666 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28667 s,@build_alias@,$build_alias,;t t
28668 s,@host_alias@,$host_alias,;t t
28669 s,@target_alias@,$target_alias,;t t
28670 s,@ECHO_C@,$ECHO_C,;t t
28671 s,@ECHO_N@,$ECHO_N,;t t
28672 s,@ECHO_T@,$ECHO_T,;t t
28673 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28674 s,@DEFS@,$DEFS,;t t
28675 s,@LIBS@,$LIBS,;t t
28676 s,@top_builddir@,$top_builddir,;t t
28677 s,@GREP@,$GREP,;t t
28678 s,@EGREP@,$EGREP,;t t
28679 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28680 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28681 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28682 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28683 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28684 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28685 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28686 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28687 s,@VERSION@,$VERSION,;t t
28688 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28689 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28690 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28691 s,@PACKAGE@,$PACKAGE,;t t
28692 s,@build@,$build,;t t
28693 s,@build_cpu@,$build_cpu,;t t
28694 s,@build_vendor@,$build_vendor,;t t
28695 s,@build_os@,$build_os,;t t
28696 s,@host@,$host,;t t
28697 s,@host_cpu@,$host_cpu,;t t
28698 s,@host_vendor@,$host_vendor,;t t
28699 s,@host_os@,$host_os,;t t
28700 s,@target@,$target,;t t
28701 s,@target_cpu@,$target_cpu,;t t
28702 s,@target_vendor@,$target_vendor,;t t
28703 s,@target_os@,$target_os,;t t
28704 s,@FGREP@,$FGREP,;t t
28705 s,@CC@,$CC,;t t
28706 s,@CFLAGS@,$CFLAGS,;t t
28707 s,@LDFLAGS@,$LDFLAGS,;t t
28708 s,@CPPFLAGS@,$CPPFLAGS,;t t
28709 s,@ac_ct_CC@,$ac_ct_CC,;t t
28710 s,@EXEEXT@,$EXEEXT,;t t
28711 s,@OBJEXT@,$OBJEXT,;t t
28712 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28713 s,@CPP@,$CPP,;t t
28714 s,@LDCONFIG@,$LDCONFIG,;t t
28715 s,@CXX@,$CXX,;t t
28716 s,@CXXFLAGS@,$CXXFLAGS,;t t
28717 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28718 s,@AWK@,$AWK,;t t
28719 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28720 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28721 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28722 s,@LINT@,$LINT,;t t
28723 s,@LINT_OPTS@,$LINT_OPTS,;t t
28724 s,@LN_S@,$LN_S,;t t
28725 s,@cf_config_suffix@,$cf_config_suffix,;t t
28726 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28727 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28728 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28729 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28730 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28731 s,@SET_MAKE@,$SET_MAKE,;t t
28732 s,@CTAGS@,$CTAGS,;t t
28733 s,@ETAGS@,$ETAGS,;t t
28734 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28735 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28736 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28737 s,@RANLIB@,$RANLIB,;t t
28738 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28739 s,@LD@,$LD,;t t
28740 s,@ac_ct_LD@,$ac_ct_LD,;t t
28741 s,@AR@,$AR,;t t
28742 s,@ac_ct_AR@,$ac_ct_AR,;t t
28743 s,@NM@,$NM,;t t
28744 s,@ac_ct_NM@,$ac_ct_NM,;t t
28745 s,@ARFLAGS@,$ARFLAGS,;t t
28746 s,@DESTDIR@,$DESTDIR,;t t
28747 s,@BUILD_CC@,$BUILD_CC,;t t
28748 s,@BUILD_CPP@,$BUILD_CPP,;t t
28749 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28750 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28751 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28752 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28753 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28754 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28755 s,@cf_list_models@,$cf_list_models,;t t
28756 s,@ABI_VERSION@,$ABI_VERSION,;t t
28757 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28758 s,@LIBTOOL@,$LIBTOOL,;t t
28759 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28760 s,@LT_UNDEF@,$LT_UNDEF,;t t
28761 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28762 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28763 s,@LIB_CREATE@,$LIB_CREATE,;t t
28764 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28765 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28766 s,@LIB_PREP@,$LIB_PREP,;t t
28767 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28768 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28769 s,@LIB_LINK@,$LIB_LINK,;t t
28770 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28771 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28772 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28773 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28774 s,@TICS_NAME@,$TICS_NAME,;t t
28775 s,@TINFO_NAME@,$TINFO_NAME,;t t
28776 s,@LIB_NAME@,$LIB_NAME,;t t
28777 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28778 s,@CC_G_OPT@,$CC_G_OPT,;t t
28779 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28780 s,@LD_MODEL@,$LD_MODEL,;t t
28781 s,@shlibdir@,$shlibdir,;t t
28782 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28783 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28784 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28785 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28786 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28787 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28788 s,@LINK_PROGS@,$LINK_PROGS,;t t
28789 s,@LINK_TESTS@,$LINK_TESTS,;t t
28790 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28791 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28792 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28793 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28794 s,@RPATH_LIST@,$RPATH_LIST,;t t
28795 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28796 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28797 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28798 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28799 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28800 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28801 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28802 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28803 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28804 s,@TIC@,$TIC,;t t
28805 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28806 s,@INFOCMP@,$INFOCMP,;t t
28807 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28808 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28809 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28810 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28811 s,@XTERM_KBS@,$XTERM_KBS,;t t
28812 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28813 s,@TERMINFO@,$TERMINFO,;t t
28814 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28815 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28816 s,@TERMPATH@,$TERMPATH,;t t
28817 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28818 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28819 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28820 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28821 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28822 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28823 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28824 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28825 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28826 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28827 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28828 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28829 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28830 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28831 s,@RGB_PATH@,$RGB_PATH,;t t
28832 s,@no_x11_rgb@,$no_x11_rgb,;t t
28833 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28834 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28835 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28836 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28837 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28838 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28839 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28840 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28841 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28842 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28843 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28844 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28845 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28846 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28847 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28848 s,@PTHREAD@,$PTHREAD,;t t
28849 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28850 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28851 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28852 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28853 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28854 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28855 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28856 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28857 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28858 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28859 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28860 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28861 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28862 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28863 s,@ECHO_LT@,$ECHO_LT,;t t
28864 s,@ECHO_LD@,$ECHO_LD,;t t
28865 s,@RULE_CC@,$RULE_CC,;t t
28866 s,@SHOW_CC@,$SHOW_CC,;t t
28867 s,@ECHO_CC@,$ECHO_CC,;t t
28868 s,@ECHO_LINK@,$ECHO_LINK,;t t
28869 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28870 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28871 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28872 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28873 s,@ADAFLAGS@,$ADAFLAGS,;t t
28874 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28875 s,@ADA_TRACE@,$ADA_TRACE,;t t
28876 s,@MATH_LIB@,$MATH_LIB,;t t
28877 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28878 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
28879 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
28880 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
28881 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
28882 s,@TEST_LIBS@,$TEST_LIBS,;t t
28883 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
28884 s,@CXXCPP@,$CXXCPP,;t t
28885 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
28886 s,@CXX_AR@,$CXX_AR,;t t
28887 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
28888 s,@CXXLIBS@,$CXXLIBS,;t t
28889 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
28890 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
28891 s,@M4_exists@,$M4_exists,;t t
28892 s,@cf_ada_make@,$cf_ada_make,;t t
28893 s,@cf_ada_config@,$cf_ada_config,;t t
28894 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
28895 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
28896 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
28897 s,@cf_compile_generics@,$cf_compile_generics,;t t
28898 s,@cf_generic_objects@,$cf_generic_objects,;t t
28899 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
28900 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
28901 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
28902 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
28903 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
28904 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
28905 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
28906 s,@cf_ada_package@,$cf_ada_package,;t t
28907 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
28908 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
28909 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
28910 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
28911 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
28912 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
28913 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
28914 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
28915 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
28916 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
28917 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
28918 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
28919 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
28920 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
28921 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
28922 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
28923 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
28924 s,@TICS_LIBS@,$TICS_LIBS,;t t
28925 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
28926 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
28927 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
28928 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
28929 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
28930 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
28931 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
28932 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
28933 s,@includesubdir@,$includesubdir,;t t
28934 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
28935 s,@TICS_LIST@,$TICS_LIST,;t t
28936 s,@TINFO_LIST@,$TINFO_LIST,;t t
28937 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
28938 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
28939 s,@FORM_NAME@,$FORM_NAME,;t t
28940 s,@MENU_NAME@,$MENU_NAME,;t t
28941 s,@PANEL_NAME@,$PANEL_NAME,;t t
28942 s,@CXX_NAME@,$CXX_NAME,;t t
28943 s,@TEST_ARGS@,$TEST_ARGS,;t t
28944 s,@TEST_DEPS@,$TEST_DEPS,;t t
28945 s,@TEST_ARG2@,$TEST_ARG2,;t t
28946 s,@TEST_DEP2@,$TEST_DEP2,;t t
28947 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
28948 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
28949 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
28950 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
28951 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
28952 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
28953 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
28954 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
28955 s,@cross_compiling@,$cross_compiling,;t t
28956 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
28957 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
28958 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
28959 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
28960 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
28961 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
28962 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
28963 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
28964 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
28965 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
28966 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
28967 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
28968 CEOF
28969
28970 EOF
28971
28972   cat >>"$CONFIG_STATUS" <<\EOF
28973   # Split the substitutions into bite-sized pieces for seds with
28974   # small command number limits, like on Digital OSF/1 and HP-UX.
28975   ac_max_sed_lines=48
28976   ac_sed_frag=1 # Number of current file.
28977   ac_beg=1 # First line for current file.
28978   ac_end=$ac_max_sed_lines # Line after last line for current file.
28979   ac_more_lines=:
28980   ac_sed_cmds=
28981   while "$ac_more_lines"; do
28982     if test "$ac_beg" -gt 1; then
28983       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28984     else
28985       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28986     fi
28987     if test ! -s $tmp/subs.frag; then
28988       ac_more_lines=false
28989     else
28990       # The purpose of the label and of the branching condition is to
28991       # speed up the sed processing (if there are no `@' at all, there
28992       # is no need to browse any of the substitutions).
28993       # These are the two extra sed commands mentioned above.
28994       (echo ':t
28995   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
28996       # It is possible to make a multiline substitution using escaped newlines.
28997       # Ensure that we do not split the substitution between script fragments.
28998       ac_BEG=$ac_end
28999       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29000       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29001       if test -s $tmp/subs.next; then
29002         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29003         if test ! -s $tmp/subs.edit; then
29004           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29005           if test ! -s $tmp/subs.edit; then
29006             if test "$ac_beg" -gt 1; then
29007               ac_end=`expr "$ac_end" - 1`
29008               continue
29009             fi
29010           fi
29011         fi
29012       fi
29013
29014       if test -z "$ac_sed_cmds"; then
29015         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29016       else
29017         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29018       fi
29019       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29020       ac_beg=$ac_end
29021       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29022     fi
29023   done
29024   if test -z "$ac_sed_cmds"; then
29025     ac_sed_cmds=cat
29026   fi
29027 fi # test -n "$CONFIG_FILES"
29028
29029 EOF
29030 cat >>"$CONFIG_STATUS" <<\EOF
29031 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29032   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29033   case "$ac_file" in
29034   - | *:- | *:-:* ) # input from stdin
29035         cat >$tmp/stdin
29036         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29037         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29038   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29039         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29040   * )   ac_file_in=$ac_file.in ;;
29041   esac
29042
29043   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29044   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29045          X"$ac_file" : 'X\(//\)[^/]' \| \
29046          X"$ac_file" : 'X\(//\)$' \| \
29047          X"$ac_file" : 'X\(/\)' \| \
29048          .     : '\(.\)' 2>/dev/null ||
29049 echo X"$ac_file" |
29050     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29051           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29052           /^X\(\/\/\)$/{ s//\1/; q; }
29053           /^X\(\/\).*/{ s//\1/; q; }
29054           s/.*/./; q'`
29055   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29056     { case "$ac_dir" in
29057   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29058   *)                      as_incr_dir=.;;
29059 esac
29060 as_dummy="$ac_dir"
29061 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29062   case $as_mkdir_dir in
29063     # Skip DOS drivespec
29064     ?:) as_incr_dir=$as_mkdir_dir ;;
29065     *)
29066       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29067       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29068     ;;
29069   esac
29070 done; }
29071
29072     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29073     # A "../" for each directory in $ac_dir_suffix.
29074     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29075   else
29076     ac_dir_suffix= ac_dots=
29077   fi
29078
29079   case "$srcdir" in
29080   .)  ac_srcdir=.
29081       if test -z "$ac_dots"; then
29082          ac_top_srcdir=.
29083       else
29084          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29085       fi ;;
29086   [\\/]* | ?:[\\/]* )
29087       ac_srcdir="$srcdir$ac_dir_suffix";
29088       ac_top_srcdir="$srcdir" ;;
29089   *) # Relative path.
29090     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29091     ac_top_srcdir="$ac_dots$srcdir" ;;
29092   esac
29093
29094   case $INSTALL in
29095   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29096   *) ac_INSTALL=$ac_dots$INSTALL ;;
29097   esac
29098
29099   if test x"$ac_file" != x-; then
29100     { echo "$as_me:29100: creating $ac_file" >&5
29101 echo "$as_me: creating $ac_file" >&6;}
29102     rm -f "$ac_file"
29103   fi
29104   # Let's still pretend it is `configure' which instantiates (i.e., don't
29105   # use $as_me), people would be surprised to read:
29106   #    /* config.h.  Generated automatically by config.status.  */
29107   configure_input="Generated automatically from `echo $ac_file_in |
29108                                                  sed 's,.*/,,'` by configure."
29109
29110   # First look for the input files in the build tree, otherwise in the
29111   # src tree.
29112   ac_file_inputs=`IFS=:
29113     for f in $ac_file_in; do
29114       case $f in
29115       -) echo $tmp/stdin ;;
29116       [\\/$]*)
29117          # Absolute (can't be DOS-style, as IFS=:)
29118          test -f "$f" || { { echo "$as_me:29118: error: cannot find input file: $f" >&5
29119 echo "$as_me: error: cannot find input file: $f" >&2;}
29120    { (exit 1); exit 1; }; }
29121          echo $f;;
29122       *) # Relative
29123          if test -f "$f"; then
29124            # Build tree
29125            echo $f
29126          elif test -f "$srcdir/$f"; then
29127            # Source tree
29128            echo "$srcdir/$f"
29129          else
29130            # /dev/null tree
29131            { { echo "$as_me:29131: error: cannot find input file: $f" >&5
29132 echo "$as_me: error: cannot find input file: $f" >&2;}
29133    { (exit 1); exit 1; }; }
29134          fi;;
29135       esac
29136     done` || { (exit 1); exit 1; }
29137 EOF
29138 cat >>"$CONFIG_STATUS" <<\EOF
29139   ac_warn_datarootdir=no
29140   if test x"$ac_file" != x-; then
29141     for ac_item in $ac_file_inputs
29142     do
29143       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29144       if test -n "$ac_seen"; then
29145         ac_used=`grep '@datarootdir@' "$ac_item"`
29146         if test -z "$ac_used"; then
29147           { echo "$as_me:29147: WARNING: datarootdir was used implicitly but not set:
29148 $ac_seen" >&5
29149 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29150 $ac_seen" >&2;}
29151           ac_warn_datarootdir=yes
29152         fi
29153       fi
29154       ac_seen=`grep '${datarootdir}' "$ac_item"`
29155       if test -n "$ac_seen"; then
29156         { echo "$as_me:29156: WARNING: datarootdir was used explicitly but not set:
29157 $ac_seen" >&5
29158 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29159 $ac_seen" >&2;}
29160         ac_warn_datarootdir=yes
29161       fi
29162     done
29163   fi
29164
29165 if test "x$ac_warn_datarootdir" = xyes; then
29166   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29167 fi
29168
29169 EOF
29170 cat >>"$CONFIG_STATUS" <<EOF
29171   sed "$ac_vpsub
29172 $extrasub
29173 EOF
29174 cat >>"$CONFIG_STATUS" <<\EOF
29175 :t
29176 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29177 s,@configure_input@,$configure_input,;t t
29178 s,@srcdir@,$ac_srcdir,;t t
29179 s,@top_srcdir@,$ac_top_srcdir,;t t
29180 s,@INSTALL@,$ac_INSTALL,;t t
29181 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29182   rm -f $tmp/stdin
29183   if test x"$ac_file" != x-; then
29184     cp "$tmp/out" "$ac_file"
29185
29186     for ac_name in prefix exec_prefix datarootdir
29187     do
29188         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29189         if test -n "$ac_seen"; then
29190             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29191             if test -z "$ac_init"; then
29192               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29193               { echo "$as_me:29193: WARNING: Variable $ac_name is used but was not set:
29194 $ac_seen" >&5
29195 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29196 $ac_seen" >&2;}
29197             fi
29198         fi
29199     done
29200     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29201     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29202     if test -s $tmp/out; then
29203       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29204       { echo "$as_me:29204: WARNING: Some variables may not be substituted:
29205 $ac_seen" >&5
29206 echo "$as_me: WARNING: Some variables may not be substituted:
29207 $ac_seen" >&2;}
29208     fi
29209   else
29210     cat $tmp/out
29211   fi
29212   rm -f $tmp/out
29213
29214 done
29215 EOF
29216 cat >>"$CONFIG_STATUS" <<\EOF
29217
29218 #
29219 # CONFIG_HEADER section.
29220 #
29221
29222 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29223 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29224 #
29225 # ac_d sets the value in "#define NAME VALUE" lines.
29226 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29227 ac_dB='[        ].*$,\1#\2'
29228 ac_dC=' '
29229 ac_dD=',;t'
29230 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29231 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29232 ac_iB='\([      ]\),\1#\2define\3'
29233 ac_iC=' '
29234 ac_iD='\4,;t'
29235 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29236 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29237 ac_uB='$,\1#\2define\3'
29238 ac_uC=' '
29239 ac_uD=',;t'
29240
29241 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29242   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29243   case "$ac_file" in
29244   - | *:- | *:-:* ) # input from stdin
29245         cat >$tmp/stdin
29246         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29247         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29248   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29249         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29250   * )   ac_file_in=$ac_file.in ;;
29251   esac
29252
29253   test x"$ac_file" != x- && { echo "$as_me:29253: creating $ac_file" >&5
29254 echo "$as_me: creating $ac_file" >&6;}
29255
29256   # First look for the input files in the build tree, otherwise in the
29257   # src tree.
29258   ac_file_inputs=`IFS=:
29259     for f in $ac_file_in; do
29260       case $f in
29261       -) echo $tmp/stdin ;;
29262       [\\/$]*)
29263          # Absolute (can't be DOS-style, as IFS=:)
29264          test -f "$f" || { { echo "$as_me:29264: error: cannot find input file: $f" >&5
29265 echo "$as_me: error: cannot find input file: $f" >&2;}
29266    { (exit 1); exit 1; }; }
29267          echo $f;;
29268       *) # Relative
29269          if test -f "$f"; then
29270            # Build tree
29271            echo $f
29272          elif test -f "$srcdir/$f"; then
29273            # Source tree
29274            echo "$srcdir/$f"
29275          else
29276            # /dev/null tree
29277            { { echo "$as_me:29277: error: cannot find input file: $f" >&5
29278 echo "$as_me: error: cannot find input file: $f" >&2;}
29279    { (exit 1); exit 1; }; }
29280          fi;;
29281       esac
29282     done` || { (exit 1); exit 1; }
29283   # Remove the trailing spaces.
29284   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29285
29286 EOF
29287
29288 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29289 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29290 # be either 'cat' or 'sort'.
29291 cat confdefs.h | uniq >conftest.vals
29292
29293 # Break up conftest.vals because some shells have a limit on
29294 # the size of here documents, and old seds have small limits too.
29295
29296 rm -f conftest.tail
29297 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29298 while grep . conftest.vals >/dev/null
29299 do
29300   # Write chunks of a limited-size here document to conftest.frag.
29301   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29302   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29303   echo 'CEOF' >> "$CONFIG_STATUS"
29304   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29305   rm -f conftest.vals
29306   mv conftest.tail conftest.vals
29307 done
29308 rm -f conftest.vals
29309
29310 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29311 # marker @DEFS@.
29312 echo '  cat >> conftest.edit <<CEOF
29313 /@DEFS@/r conftest.frag
29314 /@DEFS@/d
29315 CEOF
29316 sed -f conftest.edit $tmp/in > $tmp/out
29317 rm -f $tmp/in
29318 mv $tmp/out $tmp/in
29319 rm -f conftest.edit conftest.frag
29320 ' >> "$CONFIG_STATUS"
29321
29322 cat >>"$CONFIG_STATUS" <<\EOF
29323   # Let's still pretend it is `configure' which instantiates (i.e., don't
29324   # use $as_me), people would be surprised to read:
29325   #    /* config.h.  Generated automatically by config.status.  */
29326   if test x"$ac_file" = x-; then
29327     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29328   else
29329     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29330   fi
29331   cat $tmp/in >>$tmp/config.h
29332   rm -f $tmp/in
29333   if test x"$ac_file" != x-; then
29334     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29335       { echo "$as_me:29335: $ac_file is unchanged" >&5
29336 echo "$as_me: $ac_file is unchanged" >&6;}
29337     else
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       fi
29367       rm -f "$ac_file"
29368       mv "$tmp/config.h" "$ac_file"
29369     fi
29370   else
29371     cat $tmp/config.h
29372     rm -f $tmp/config.h
29373   fi
29374 done
29375 EOF
29376 cat >>"$CONFIG_STATUS" <<\EOF
29377 #
29378 # CONFIG_COMMANDS section.
29379 #
29380 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29381   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29382   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29383
29384   case "$ac_dest" in
29385     default )
29386 if test "x$cf_with_tests" != xno ; then
29387
29388 for cf_dir in test
29389 do
29390         if test ! -d "$srcdir/$cf_dir" ; then
29391                 continue
29392         elif test -f "$srcdir/$cf_dir/programs" ; then
29393                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29394         fi
29395 done
29396
29397 fi
29398
29399 cf_prefix=$LIB_PREFIX
29400
29401 case "$cf_cv_shlib_version" in
29402 (cygdll|msysdll|mingw|msvcdll)
29403         TINFO_NAME=$TINFO_ARG_SUFFIX
29404         TINFO_SUFFIX=.dll
29405         ;;
29406 esac
29407
29408 if test -n "$TINFO_SUFFIX" ; then
29409         case "$TINFO_SUFFIX" in
29410         (tw*)
29411                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29412                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29413                 ;;
29414         (t*)
29415                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29416                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29417                 ;;
29418         (w*)
29419                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29420                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29421                 ;;
29422         esac
29423 fi
29424
29425 for cf_dir in $SRC_SUBDIRS
29426 do
29427         if test ! -d "$srcdir/$cf_dir" ; then
29428                 continue
29429         elif test -f "$srcdir/$cf_dir/modules" ; then
29430
29431                 SHARED_LIB=
29432                 Libs_To_Make=
29433                 cf_awk_program=
29434                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29435                 then
29436                         cf_awk_program="$cf_awk_program\
29437 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29438 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29439 "
29440                 fi
29441
29442                 if test "x$WILDCARD_SYMS" = xno
29443                 then
29444                         cf_awk_program="$cf_awk_program\
29445 /[      ]_\\*;/ { skip=1; next; }\
29446 "
29447                 fi
29448
29449                 if test "x$cf_awk_program" != "x"
29450                 then
29451                         cat >>$cf_dir/Makefile <<CF_EOF
29452
29453 # Generated by CF_LIB_RULES
29454 resulting.map: $UNALTERED_SYMS
29455         $AWK 'BEGIN { skip = 1; last=""; } \
29456 $cf_awk_program \
29457 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29458  skip = 0; last = \$\$0; } \
29459 END { print last; }' < "$UNALTERED_SYMS" >\$@
29460
29461 distclean::
29462         rm -f resulting.map
29463 CF_EOF
29464                 fi
29465
29466                 for cf_item in $cf_LIST_MODELS
29467                 do
29468
29469         case X$cf_item in
29470         (Xlibtool)
29471                 cf_suffix='.la'
29472                 cf_depsuf=$cf_suffix
29473                 ;;
29474         (Xdebug)
29475                 case "$cf_cv_system_name" in
29476                 (*-msvc*)
29477                         cf_suffix='_g.lib'
29478                         ;;
29479                 (*)
29480                         cf_suffix='_g.a'
29481                         ;;
29482                 esac
29483                 cf_depsuf=$cf_suffix
29484                 ;;
29485         (Xprofile)
29486                 case "$cf_cv_system_name" in
29487                 (*-msvc*)
29488                         cf_suffix='_p.lib'
29489                         ;;
29490                 (*)
29491                         cf_suffix='_p.a'
29492                         ;;
29493                 esac
29494                 cf_depsuf=$cf_suffix
29495                 ;;
29496         (Xshared)
29497                 case "$cf_cv_system_name" in
29498                 (aix[5-7]*)
29499                         cf_suffix='.so'
29500                         cf_depsuf=$cf_suffix
29501                         ;;
29502                 (*-msvc*)
29503                         cf_suffix='.dll'
29504                         cf_depsuf='.dll.lib'
29505                         ;;
29506                 (cygwin*|msys*|mingw*)
29507                         cf_suffix='.dll'
29508                         cf_depsuf='.dll.a'
29509                         ;;
29510                 (darwin*)
29511                         cf_suffix='.dylib'
29512                         cf_depsuf=$cf_suffix
29513                         ;;
29514                 (hpux*)
29515                         case "$target" in
29516                         (ia64*)
29517                                 cf_suffix='.so'
29518                                 cf_depsuf=$cf_suffix
29519                                 ;;
29520                         (*)
29521                                 cf_suffix='.sl'
29522                                 cf_depsuf=$cf_suffix
29523                                 ;;
29524                         esac
29525                         ;;
29526                 (*)
29527                         cf_suffix='.so'
29528                         cf_depsuf=$cf_suffix
29529                         ;;
29530                 esac
29531                 ;;
29532         (*)
29533                 case "$target" in
29534                 (*-msvc*)
29535                         cf_suffix='.lib'
29536                         ;;
29537                 (*)
29538                         cf_suffix='.a'
29539                         ;;
29540                 esac
29541                 cf_depsuf=$cf_suffix
29542                 ;;
29543         esac
29544         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29545         then
29546                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29547                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29548         fi
29549
29550                         if test "$cf_dir" = "c++"
29551                         then
29552
29553 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29554
29555 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29556
29557                         else
29558
29559 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29560
29561 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29562
29563                         fi
29564                         test -z "$cf_libname" && cf_libname="$cf_dir"
29565                         if test "$cf_item" = shared ; then
29566                                 if test -n "${LIB_SUFFIX}"
29567                                 then
29568                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29569                                 else
29570                                         cf_shared_suffix="$cf_suffix"
29571                                 fi
29572                                 if test "$cf_cv_do_symlinks" = yes ; then
29573                                         cf_version_name=
29574
29575                                         case "$cf_cv_shlib_version" in
29576                                         (rel)
29577                                                 cf_version_name=REL_VERSION
29578                                                 ;;
29579                                         (abi)
29580                                                 cf_version_name=ABI_VERSION
29581                                                 ;;
29582                                         esac
29583
29584                                         if test -n "$cf_version_name"
29585                                         then
29586                                                 case "$cf_cv_system_name" in
29587                                                 (darwin*)
29588                                                         # "w", etc?
29589                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29590                                                         ;;
29591                                                 (*)
29592                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29593                                                         ;;
29594                                                 esac
29595                                         fi
29596                                         if test -n "${USE_LIB_SUFFIX}"
29597                                         then
29598                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29599                                         else
29600                                                 cf_shared_suffix="$cf_suffix"
29601                                         fi
29602                                 fi
29603                                 # cygwin needs import library, and has unique naming convention
29604                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29605                                 # use 'cyg' prefix for shared lib.
29606                                 case "$cf_cv_shlib_version" in
29607                                 (cygdll)
29608                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29609                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29610                                         ;;
29611                                 (msysdll)
29612                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29613                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29614                                         ;;
29615                                 (mingw)
29616                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29617                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29618                                         ;;
29619                                 (msvcdll)
29620                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29621                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29622                                         ;;
29623                                 (*)
29624                                         cf_add_lib=
29625                                         ;;
29626                                 esac
29627                                 if test -n "$cf_add_lib"
29628                                 then
29629                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29630                                         continue
29631                                 fi
29632                         fi
29633                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29634                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29635                 done
29636
29637                 if test "$cf_dir" = ncurses ; then
29638                         cf_subsets="$LIB_SUBSETS"
29639                         cf_r_parts="$cf_subsets"
29640                         cf_liblist="$Libs_To_Make"
29641
29642                         while test -n "$cf_r_parts"
29643                         do
29644                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29645                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29646                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29647                                         cf_add_lib=
29648                                         case "$cf_l_parts" in
29649                                         (*termlib*)
29650                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29651                                                 ;;
29652                                         (*ticlib*)
29653                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29654                                                 ;;
29655                                         (*)
29656                                                 break
29657                                                 ;;
29658                                         esac
29659                                         if test -n "$cf_add_lib"; then
29660                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29661                                         fi
29662                                 else
29663                                         break
29664                                 fi
29665                         done
29666                 else
29667                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29668                 fi
29669
29670                 if test "$cf_dir" = c++; then
29671                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29672                                 cf_list=
29673                                 for cf_item in $Libs_To_Make
29674                                 do
29675                                         case "$cf_item" in
29676                                         (*.a)
29677                                                 ;;
29678                                         (*)
29679                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29680                                                 ;;
29681                                         esac
29682                                         for cf_test in $cf_list
29683                                         do
29684                                                 if test "$cf_test" = "$cf_item"
29685                                                 then
29686                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29687                                                         cf_item=
29688                                                         break
29689                                                 fi
29690                                         done
29691                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29692                                 done
29693                                 Libs_To_Make="$cf_list"
29694                         fi
29695                 fi
29696
29697                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29698                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29699                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29700                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29701
29702                 $AWK -f "$srcdir/mk-0th.awk" \
29703                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29704                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29705
29706                 for cf_subset in $cf_subsets
29707                 do
29708                         cf_subdirs=
29709                         for cf_item in $cf_LIST_MODELS
29710                         do
29711
29712                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29713
29714 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29715
29716                         CXX_MODEL=$cf_ITEM
29717                         if test "$CXX_MODEL" = SHARED; then
29718                                 case "$cf_cv_shlib_version" in
29719                                 (cygdll|msysdll|mingw|msvcdll)
29720                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29721
29722 echo "${as_me:-configure}:29722: testing overriding CXX_MODEL to SHARED ..." 1>&5
29723
29724                                         with_shared_cxx=yes
29725                                         ;;
29726                                 (*)
29727                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29728                                         ;;
29729                                 esac
29730                         fi
29731
29732         case X$cf_item in
29733         (Xlibtool)
29734                 cf_suffix='.la'
29735                 cf_depsuf=$cf_suffix
29736                 ;;
29737         (Xdebug)
29738                 case "$cf_cv_system_name" in
29739                 (*-msvc*)
29740                         cf_suffix='_g.lib'
29741                         ;;
29742                 (*)
29743                         cf_suffix='_g.a'
29744                         ;;
29745                 esac
29746                 cf_depsuf=$cf_suffix
29747                 ;;
29748         (Xprofile)
29749                 case "$cf_cv_system_name" in
29750                 (*-msvc*)
29751                         cf_suffix='_p.lib'
29752                         ;;
29753                 (*)
29754                         cf_suffix='_p.a'
29755                         ;;
29756                 esac
29757                 cf_depsuf=$cf_suffix
29758                 ;;
29759         (Xshared)
29760                 case "$cf_cv_system_name" in
29761                 (aix[5-7]*)
29762                         cf_suffix='.so'
29763                         cf_depsuf=$cf_suffix
29764                         ;;
29765                 (*-msvc*)
29766                         cf_suffix='.dll'
29767                         cf_depsuf='.dll.lib'
29768                         ;;
29769                 (cygwin*|msys*|mingw*)
29770                         cf_suffix='.dll'
29771                         cf_depsuf='.dll.a'
29772                         ;;
29773                 (darwin*)
29774                         cf_suffix='.dylib'
29775                         cf_depsuf=$cf_suffix
29776                         ;;
29777                 (hpux*)
29778                         case "$target" in
29779                         (ia64*)
29780                                 cf_suffix='.so'
29781                                 cf_depsuf=$cf_suffix
29782                                 ;;
29783                         (*)
29784                                 cf_suffix='.sl'
29785                                 cf_depsuf=$cf_suffix
29786                                 ;;
29787                         esac
29788                         ;;
29789                 (*)
29790                         cf_suffix='.so'
29791                         cf_depsuf=$cf_suffix
29792                         ;;
29793                 esac
29794                 ;;
29795         (*)
29796                 case "$target" in
29797                 (*-msvc*)
29798                         cf_suffix='.lib'
29799                         ;;
29800                 (*)
29801                         cf_suffix='.a'
29802                         ;;
29803                 esac
29804                 cf_depsuf=$cf_suffix
29805                 ;;
29806         esac
29807         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29808         then
29809                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29810                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29811         fi
29812
29813         case $cf_item in
29814         (libtool) cf_subdir='obj_lo'  ;;
29815         (normal)  cf_subdir='objects' ;;
29816         (debug)   cf_subdir='obj_g' ;;
29817         (profile) cf_subdir='obj_p' ;;
29818         (shared)
29819                 case "$cf_cv_system_name" in
29820                 (cygwin|msys)
29821                         cf_subdir='objects' ;;
29822                 (*)
29823                         cf_subdir='obj_s' ;;
29824                 esac
29825         esac
29826
29827                         # Test for case where we build libtinfo with a different name.
29828                         cf_libname=$cf_dir
29829                         if test "$cf_dir" = ncurses ; then
29830                                 case "$cf_subset" in
29831                                 (*base*)
29832                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29833                                         ;;
29834                                 (*termlib*)
29835                                         cf_libname=$TINFO_LIB_SUFFIX
29836                                         ;;
29837                                 (ticlib*)
29838                                         cf_libname=$TICS_LIB_SUFFIX
29839                                         ;;
29840                                 esac
29841                         elif test "$cf_dir" = c++ ; then
29842
29843 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29844
29845 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29846
29847                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29848                         else
29849
29850 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29851
29852 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29853
29854                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29855                         fi
29856                         if test -n "${USE_ARG_SUFFIX}" ; then
29857                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29858                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29859                         fi
29860
29861                         # These dependencies really are for development, not
29862                         # builds, but they are useful in porting, too.
29863                         cf_depend="../include/ncurses_cfg.h"
29864                         if test "$srcdir" = "."; then
29865                                 cf_reldir="."
29866                         else
29867                                 cf_reldir="\${srcdir}"
29868                         fi
29869
29870                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
29871                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29872                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
29873                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29874                         fi
29875
29876                         cf_dir_suffix=
29877                         old_cf_suffix="$cf_suffix"
29878                         if test "$cf_cv_shlib_version_infix" = yes ; then
29879                         if test -n "$USE_LIB_SUFFIX" ; then
29880                                 case "$USE_LIB_SUFFIX" in
29881                                 (tw*)
29882                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
29883                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29884                                         cf_dir_suffix=tw$EXTRA_SUFFIX
29885                                         ;;
29886                                 (t*)
29887                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
29888                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
29889                                         cf_dir_suffix=t$EXTRA_SUFFIX
29890                                         ;;
29891                                 (w*)
29892                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
29893                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
29894                                         cf_dir_suffix=w$EXTRA_SUFFIX
29895                                         ;;
29896                                 (*)
29897                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
29898                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
29899                                         cf_dir_suffix=$EXTRA_SUFFIX
29900                                         ;;
29901                                 esac
29902                         fi
29903                         fi
29904
29905                         $AWK -f "$srcdir/mk-1st.awk" \
29906                                 name=${cf_libname}${cf_dir_suffix} \
29907                                 traces=$LIB_TRACING \
29908                                 MODEL=$cf_ITEM \
29909                                 CXX_MODEL=$CXX_MODEL \
29910                                 model=$cf_subdir \
29911                                 prefix=$cf_prefix \
29912                                 suffix=$cf_suffix \
29913                                 subset=$cf_subset \
29914                                 driver=$cf_cv_term_driver \
29915                                 SymLink="$LN_S" \
29916                                 TermlibRoot=$TINFO_NAME \
29917                                 TermlibSuffix=$TINFO_SUFFIX \
29918                                 ShlibVer=$cf_cv_shlib_version \
29919                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
29920                                 ReLink=${cf_cv_do_relink:-no} \
29921                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
29922                                 DoLinks=$cf_cv_do_symlinks \
29923                                 rmSoLocs=$cf_cv_rm_so_locs \
29924                                 ldconfig="$LDCONFIG" \
29925                                 overwrite=$WITH_OVERWRITE \
29926                                 depend="$cf_depend" \
29927                                 host="$host" \
29928                                 libtool_version="$LIBTOOL_VERSION" \
29929                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29930
29931                         cf_suffix="$old_cf_suffix"
29932
29933                         for cf_subdir2 in $cf_subdirs lib
29934                         do
29935                                 test "$cf_subdir" = "$cf_subdir2" && break
29936                         done
29937                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
29938                         $AWK -f "$srcdir/mk-2nd.awk" \
29939                                 name=$cf_dir \
29940                                 traces=$LIB_TRACING \
29941                                 MODEL=$cf_ITEM \
29942                                 model=$cf_subdir \
29943                                 subset=$cf_subset \
29944                                 srcdir=$srcdir \
29945                                 echo=$WITH_ECHO \
29946                                 crenames=$cf_cv_prog_CC_c_o \
29947                                 cxxrenames=$cf_cv_prog_CXX_c_o \
29948                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29949                         cf_subdirs="$cf_subdirs $cf_subdir"
29950                         done
29951                 done
29952         fi
29953
29954         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
29955 done
29956
29957 for cf_dir in $SRC_SUBDIRS
29958 do
29959         if test ! -d "$srcdir/$cf_dir" ; then
29960                 continue
29961         fi
29962
29963         if test -f "$cf_dir/Makefile" ; then
29964                 case "$cf_dir" in
29965                 (Ada95)
29966                         echo 'libs \' >> Makefile
29967                         echo 'install.libs \' >> Makefile
29968                         echo 'uninstall.libs ::' >> Makefile
29969                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
29970                         ;;
29971                 esac
29972         fi
29973
29974         if test -f "$srcdir/$cf_dir/modules" ; then
29975                 echo >> Makefile
29976                 if test -f "$srcdir/$cf_dir/headers" ; then
29977 cat >> Makefile <<CF_EOF
29978 install.includes \\
29979 uninstall.includes \\
29980 CF_EOF
29981                 fi
29982 if test "$cf_dir" != "c++" ; then
29983 echo 'lint \' >> Makefile
29984 fi
29985 cat >> Makefile <<CF_EOF
29986 libs \\
29987 lintlib \\
29988 install.libs \\
29989 uninstall.libs \\
29990 install.$cf_dir \\
29991 uninstall.$cf_dir ::
29992         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
29993 CF_EOF
29994         elif test -f "$srcdir/$cf_dir/headers" ; then
29995 cat >> Makefile <<CF_EOF
29996
29997 libs \\
29998 install.libs \\
29999 uninstall.libs \\
30000 install.includes \\
30001 uninstall.includes ::
30002         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30003 CF_EOF
30004 fi
30005 done
30006
30007 if test "x$cf_with_db_install" = xyes; then
30008 cat >> Makefile <<CF_EOF
30009
30010 install.libs uninstall.libs \\
30011 install.data uninstall.data ::
30012 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30013 CF_EOF
30014 else
30015 cat >> Makefile <<CF_EOF
30016
30017 install.libs uninstall.libs ::
30018         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30019 CF_EOF
30020 fi
30021
30022 if test "x$cf_with_manpages" = xyes; then
30023 cat >> Makefile <<CF_EOF
30024
30025 install.man \\
30026 uninstall.man ::
30027         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30028 CF_EOF
30029 fi
30030
30031 cat >> Makefile <<CF_EOF
30032
30033 distclean ::
30034         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30035         rm -f headers.sh headers.sed mk_shared_lib.sh
30036         rm -f edit_man.* man_alias.*
30037         rm -rf \${DIRS_TO_MAKE}
30038 CF_EOF
30039
30040 # Special case: tack's manpage lives in its own directory.
30041 if test "x$cf_with_manpages" = xyes; then
30042 if test "x$cf_with_tack" = "xyes"; then
30043 cat >> Makefile <<CF_EOF
30044
30045 install.man \\
30046 uninstall.man ::
30047         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30048 CF_EOF
30049 fi
30050 fi
30051
30052 rm -f headers.sed headers.sh
30053
30054 echo creating headers.sh
30055 cat >headers.sh <<CF_EOF
30056 #! $SHELL
30057 # This shell script is generated by the 'configure' script.  It is invoked in a
30058 # subdirectory of the build tree.  It generates a sed-script in the parent
30059 # directory that is used to adjust includes for header files that reside in a
30060 # subdirectory of /usr/include, etc.
30061 PRG=""
30062 while test \$# != 3
30063 do
30064 PRG="\$PRG \$1"; shift
30065 done
30066 DST=\$1
30067 REF=\$2
30068 SRC=\$3
30069 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30070 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30071 echo installing \$SRC in \$DST
30072 CF_EOF
30073
30074 if test "$WITH_CURSES_H" = yes; then
30075         cat >>headers.sh <<CF_EOF
30076 case \$DST in
30077 (/*/include/*)
30078         END=\`basename \$DST\`
30079         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30080         do
30081                 NAME=\`basename \$i\`
30082                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30083         done
30084         ;;
30085 (*)
30086         echo "" >> \$TMPSED
30087         ;;
30088 esac
30089 CF_EOF
30090
30091 else
30092         cat >>headers.sh <<CF_EOF
30093 case \$DST in
30094 (/*/include/*)
30095         END=\`basename \$DST\`
30096         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30097         do
30098                 NAME=\`basename \$i\`
30099                 if test "\$NAME" = "curses.h"
30100                 then
30101                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30102                         NAME=ncurses.h
30103                 fi
30104                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30105         done
30106         ;;
30107 (*)
30108         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30109         ;;
30110 esac
30111 CF_EOF
30112 fi
30113 cat >>headers.sh <<CF_EOF
30114 rm -f \$TMPSRC
30115 sed -f \$TMPSED \$SRC > \$TMPSRC
30116 NAME=\`basename \$SRC\`
30117 CF_EOF
30118 if test "$WITH_CURSES_H" != yes; then
30119         cat >>headers.sh <<CF_EOF
30120 test "\$NAME" = "curses.h" && NAME=ncurses.h
30121 CF_EOF
30122 fi
30123 cat >>headers.sh <<CF_EOF
30124 # Just in case someone gzip'd manpages, remove the conflicting copy.
30125 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30126
30127 eval \$PRG \$TMPSRC \$DST/\$NAME
30128 rm -f \$TMPSRC \$TMPSED
30129 CF_EOF
30130
30131 chmod 0755 headers.sh
30132
30133 for cf_dir in $SRC_SUBDIRS
30134 do
30135         if test ! -d "$srcdir/$cf_dir" ; then
30136                 continue
30137         fi
30138
30139         if test -f "$srcdir/$cf_dir/headers" ; then
30140                 $AWK -f "$srcdir/mk-hdr.awk" \
30141                         subset="$LIB_SUBSETS" \
30142                         compat="$WITH_CURSES_H" \
30143                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30144         fi
30145
30146         if test -f "$srcdir/$cf_dir/modules" ; then
30147                 if test "$cf_dir" != "c++" ; then
30148                         cat >>$cf_dir/Makefile <<"CF_EOF"
30149 depend : ${AUTO_SRC}
30150         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30151
30152 # DO NOT DELETE THIS LINE -- make depend depends on it.
30153 CF_EOF
30154                 fi
30155         fi
30156 done
30157
30158 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30159 if test -z "$USE_OLD_MAKERULES" ; then
30160         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30161 fi
30162 fi
30163  ;;
30164   esac
30165 done
30166 EOF
30167
30168 cat >>"$CONFIG_STATUS" <<\EOF
30169
30170 { (exit 0); exit 0; }
30171 EOF
30172 chmod +x "$CONFIG_STATUS"
30173 ac_clean_files=$ac_clean_files_save
30174
30175 # configure is writing to config.log, and then calls config.status.
30176 # config.status does its own redirection, appending to config.log.
30177 # Unfortunately, on DOS this fails, as config.log is still kept open
30178 # by configure, so config.status won't be able to write to it; its
30179 # output is simply discarded.  So we exec the FD to /dev/null,
30180 # effectively closing config.log, so it can be properly (re)opened and
30181 # appended to by config.status.  When coming back to configure, we
30182 # need to make the FD available again.
30183 if test "$no_create" != yes; then
30184   ac_cs_success=:
30185   exec 5>/dev/null
30186   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30187   exec 5>>config.log
30188   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30189   # would make configure fail if this is the last instruction.
30190   "$ac_cs_success" || { (exit 1); exit 1; }
30191 fi
30192 ${MAKE:-make} preinstall