]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210109
[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
7441 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre2"; then
7442         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7443
7444 echo "${as_me:-configure}:7444: testing found package libpcre2 ..." 1>&5
7445
7446         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre2" 2>/dev/null`"
7447         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre2" 2>/dev/null`"
7448         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7449
7450 echo "${as_me:-configure}:7450: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7451
7452         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7453
7454 echo "${as_me:-configure}:7454: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7455
7456 cf_fix_cppflags=no
7457 cf_new_cflags=
7458 cf_new_cppflags=
7459 cf_new_extra_cppflags=
7460
7461 for cf_add_cflags in $cf_pkgconfig_incs
7462 do
7463 case "$cf_fix_cppflags" in
7464 (no)
7465         case "$cf_add_cflags" in
7466         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7467                 case "$cf_add_cflags" in
7468                 (-D*)
7469                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7470
7471                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7472                                 && test -z "${cf_tst_cflags}" \
7473                                 && cf_fix_cppflags=yes
7474
7475                         if test "$cf_fix_cppflags" = yes ; then
7476
7477         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7478         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7479
7480                                 continue
7481                         elif test "${cf_tst_cflags}" = "\"'" ; then
7482
7483         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7484         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7485
7486                                 continue
7487                         fi
7488                         ;;
7489                 esac
7490                 case "$CPPFLAGS" in
7491                 (*$cf_add_cflags)
7492                         ;;
7493                 (*)
7494                         case "$cf_add_cflags" in
7495                         (-D*)
7496                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7497
7498 CPPFLAGS=`echo "$CPPFLAGS" | \
7499         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7500                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7501
7502                                 ;;
7503                         esac
7504
7505         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7506         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7507
7508                         ;;
7509                 esac
7510                 ;;
7511         (*)
7512
7513         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7514         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7515
7516                 ;;
7517         esac
7518         ;;
7519 (yes)
7520
7521         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7522         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7523
7524         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7525
7526         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7527                 && test -z "${cf_tst_cflags}" \
7528                 && cf_fix_cppflags=no
7529         ;;
7530 esac
7531 done
7532
7533 if test -n "$cf_new_cflags" ; then
7534
7535         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7536         CFLAGS="${CFLAGS}$cf_new_cflags"
7537
7538 fi
7539
7540 if test -n "$cf_new_cppflags" ; then
7541
7542         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7543         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7544
7545 fi
7546
7547 if test -n "$cf_new_extra_cppflags" ; then
7548
7549         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7550         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7551
7552 fi
7553
7554 cf_add_libs="$LIBS"
7555 # reverse order
7556 cf_add_0lib=
7557 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7558 # filter duplicates
7559 for cf_add_1lib in $cf_add_0lib; do
7560         for cf_add_2lib in $cf_add_libs; do
7561                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7562                         cf_add_1lib=
7563                         break
7564                 fi
7565         done
7566         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7567 done
7568 LIBS="$cf_add_libs"
7569
7570         :
7571 else
7572         cf_pkgconfig_incs=
7573         cf_pkgconfig_libs=
7574
7575 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
7576         test -n "$verbose" && echo "    found package libpcre" 1>&6
7577
7578 echo "${as_me:-configure}:7578: testing found package libpcre ..." 1>&5
7579
7580         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
7581         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre" 2>/dev/null`"
7582         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7583
7584 echo "${as_me:-configure}:7584: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7585
7586         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7587
7588 echo "${as_me:-configure}:7588: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7589
7590 cf_fix_cppflags=no
7591 cf_new_cflags=
7592 cf_new_cppflags=
7593 cf_new_extra_cppflags=
7594
7595 for cf_add_cflags in $cf_pkgconfig_incs
7596 do
7597 case "$cf_fix_cppflags" in
7598 (no)
7599         case "$cf_add_cflags" in
7600         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7601                 case "$cf_add_cflags" in
7602                 (-D*)
7603                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7604
7605                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7606                                 && test -z "${cf_tst_cflags}" \
7607                                 && cf_fix_cppflags=yes
7608
7609                         if test "$cf_fix_cppflags" = yes ; then
7610
7611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7613
7614                                 continue
7615                         elif test "${cf_tst_cflags}" = "\"'" ; then
7616
7617         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7618         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7619
7620                                 continue
7621                         fi
7622                         ;;
7623                 esac
7624                 case "$CPPFLAGS" in
7625                 (*$cf_add_cflags)
7626                         ;;
7627                 (*)
7628                         case "$cf_add_cflags" in
7629                         (-D*)
7630                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7631
7632 CPPFLAGS=`echo "$CPPFLAGS" | \
7633         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7634                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7635
7636                                 ;;
7637                         esac
7638
7639         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7640         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7641
7642                         ;;
7643                 esac
7644                 ;;
7645         (*)
7646
7647         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7648         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7649
7650                 ;;
7651         esac
7652         ;;
7653 (yes)
7654
7655         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7656         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7657
7658         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7659
7660         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7661                 && test -z "${cf_tst_cflags}" \
7662                 && cf_fix_cppflags=no
7663         ;;
7664 esac
7665 done
7666
7667 if test -n "$cf_new_cflags" ; then
7668
7669         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7670         CFLAGS="${CFLAGS}$cf_new_cflags"
7671
7672 fi
7673
7674 if test -n "$cf_new_cppflags" ; then
7675
7676         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7677         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7678
7679 fi
7680
7681 if test -n "$cf_new_extra_cppflags" ; then
7682
7683         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7684         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7685
7686 fi
7687
7688 cf_add_libs="$LIBS"
7689 # reverse order
7690 cf_add_0lib=
7691 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7692 # filter duplicates
7693 for cf_add_1lib in $cf_add_0lib; do
7694         for cf_add_2lib in $cf_add_libs; do
7695                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7696                         cf_add_1lib=
7697                         break
7698                 fi
7699         done
7700         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7701 done
7702 LIBS="$cf_add_libs"
7703
7704         :
7705 else
7706         cf_pkgconfig_incs=
7707         cf_pkgconfig_libs=
7708
7709                         { { echo "$as_me:7709: error: Cannot find PCRE2 library" >&5
7710 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7711    { (exit 1); exit 1; }; }
7712 fi
7713
7714 fi
7715
7716 cat >>confdefs.h <<\EOF
7717 #define HAVE_LIB_PCRE2 1
7718 EOF
7719
7720         # if pkgconfig gave no results, look for the libraries directly
7721         case "$LIBS" in
7722         (*pcre2-posix*|*pcreposix*)
7723                 ;;
7724         (*)
7725                 echo "$as_me:7725: checking for regcomp in -lpcre2-posix" >&5
7726 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7727 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7728   echo $ECHO_N "(cached) $ECHO_C" >&6
7729 else
7730   ac_check_lib_save_LIBS=$LIBS
7731 LIBS="-lpcre2-posix  $LIBS"
7732 cat >"conftest.$ac_ext" <<_ACEOF
7733 #line 7733 "configure"
7734 #include "confdefs.h"
7735
7736 /* Override any gcc2 internal prototype to avoid an error.  */
7737 #ifdef __cplusplus
7738 extern "C"
7739 #endif
7740 /* We use char because int might match the return type of a gcc2
7741    builtin and then its argument prototype would still apply.  */
7742 char regcomp ();
7743 int
7744 main (void)
7745 {
7746 regcomp ();
7747   ;
7748   return 0;
7749 }
7750 _ACEOF
7751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7752 if { (eval echo "$as_me:7752: \"$ac_link\"") >&5
7753   (eval $ac_link) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit "$ac_status"); } &&
7757          { ac_try='test -s "conftest$ac_exeext"'
7758   { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7759   (eval $ac_try) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit "$ac_status"); }; }; then
7763   ac_cv_lib_pcre2_posix_regcomp=yes
7764 else
7765   echo "$as_me: failed program was:" >&5
7766 cat "conftest.$ac_ext" >&5
7767 ac_cv_lib_pcre2_posix_regcomp=no
7768 fi
7769 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7770 LIBS=$ac_check_lib_save_LIBS
7771 fi
7772 echo "$as_me:7772: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7773 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7774 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7775
7776 cf_add_libs="$LIBS"
7777 # reverse order
7778 cf_add_0lib=
7779 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7780 # filter duplicates
7781 for cf_add_1lib in $cf_add_0lib; do
7782         for cf_add_2lib in $cf_add_libs; do
7783                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7784                         cf_add_1lib=
7785                         break
7786                 fi
7787         done
7788         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7789 done
7790 LIBS="$cf_add_libs"
7791
7792 else
7793   echo "$as_me:7793: checking for regcomp in -lpcreposix" >&5
7794 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7795 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7796   echo $ECHO_N "(cached) $ECHO_C" >&6
7797 else
7798   ac_check_lib_save_LIBS=$LIBS
7799 LIBS="-lpcreposix  $LIBS"
7800 cat >"conftest.$ac_ext" <<_ACEOF
7801 #line 7801 "configure"
7802 #include "confdefs.h"
7803
7804 /* Override any gcc2 internal prototype to avoid an error.  */
7805 #ifdef __cplusplus
7806 extern "C"
7807 #endif
7808 /* We use char because int might match the return type of a gcc2
7809    builtin and then its argument prototype would still apply.  */
7810 char regcomp ();
7811 int
7812 main (void)
7813 {
7814 regcomp ();
7815   ;
7816   return 0;
7817 }
7818 _ACEOF
7819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7820 if { (eval echo "$as_me:7820: \"$ac_link\"") >&5
7821   (eval $ac_link) 2>&5
7822   ac_status=$?
7823   echo "$as_me:7823: \$? = $ac_status" >&5
7824   (exit "$ac_status"); } &&
7825          { ac_try='test -s "conftest$ac_exeext"'
7826   { (eval echo "$as_me:7826: \"$ac_try\"") >&5
7827   (eval $ac_try) 2>&5
7828   ac_status=$?
7829   echo "$as_me:7829: \$? = $ac_status" >&5
7830   (exit "$ac_status"); }; }; then
7831   ac_cv_lib_pcreposix_regcomp=yes
7832 else
7833   echo "$as_me: failed program was:" >&5
7834 cat "conftest.$ac_ext" >&5
7835 ac_cv_lib_pcreposix_regcomp=no
7836 fi
7837 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7838 LIBS=$ac_check_lib_save_LIBS
7839 fi
7840 echo "$as_me:7840: result: $ac_cv_lib_pcreposix_regcomp" >&5
7841 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7842 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7843
7844 cf_add_libs="$LIBS"
7845 # reverse order
7846 cf_add_0lib=
7847 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7848 # filter duplicates
7849 for cf_add_1lib in $cf_add_0lib; do
7850         for cf_add_2lib in $cf_add_libs; do
7851                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7852                         cf_add_1lib=
7853                         break
7854                 fi
7855         done
7856         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7857 done
7858 LIBS="$cf_add_libs"
7859
7860 else
7861   { { echo "$as_me:7861: error: Cannot find PCRE2 POSIX library" >&5
7862 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7863    { (exit 1); exit 1; }; }
7864 fi
7865
7866 fi
7867
7868                 ;;
7869         esac
7870
7871         # either way, check for the library header files
7872
7873 for ac_header in pcre2posix.h pcreposix.h
7874 do
7875 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7876 echo "$as_me:7876: checking for $ac_header" >&5
7877 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7878 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7879   echo $ECHO_N "(cached) $ECHO_C" >&6
7880 else
7881   cat >"conftest.$ac_ext" <<_ACEOF
7882 #line 7882 "configure"
7883 #include "confdefs.h"
7884 #include <$ac_header>
7885 _ACEOF
7886 if { (eval echo "$as_me:7886: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7887   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7888   ac_status=$?
7889   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7890   rm -f conftest.er1
7891   cat conftest.err >&5
7892   echo "$as_me:7892: \$? = $ac_status" >&5
7893   (exit "$ac_status"); } >/dev/null; then
7894   if test -s conftest.err; then
7895     ac_cpp_err=$ac_c_preproc_warn_flag
7896   else
7897     ac_cpp_err=
7898   fi
7899 else
7900   ac_cpp_err=yes
7901 fi
7902 if test -z "$ac_cpp_err"; then
7903   eval "$as_ac_Header=yes"
7904 else
7905   echo "$as_me: failed program was:" >&5
7906   cat "conftest.$ac_ext" >&5
7907   eval "$as_ac_Header=no"
7908 fi
7909 rm -f conftest.err "conftest.$ac_ext"
7910 fi
7911 echo "$as_me:7911: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7912 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7913 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7914   cat >>confdefs.h <<EOF
7915 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7916 EOF
7917
7918 fi
7919 done
7920
7921 fi
7922
7923 # not everyone has "test -c"
7924 if test -c /dev/sysmouse 2>/dev/null ; then
7925 echo "$as_me:7925: checking if you want to use sysmouse" >&5
7926 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7927
7928 # Check whether --with-sysmouse or --without-sysmouse was given.
7929 if test "${with_sysmouse+set}" = set; then
7930   withval="$with_sysmouse"
7931   cf_with_sysmouse=$withval
7932 else
7933   cf_with_sysmouse=maybe
7934 fi;
7935         if test "$cf_with_sysmouse" != no ; then
7936         cat >"conftest.$ac_ext" <<_ACEOF
7937 #line 7937 "configure"
7938 #include "confdefs.h"
7939
7940 #include <osreldate.h>
7941 #if (__FreeBSD_version >= 400017)
7942 #include <sys/consio.h>
7943 #include <sys/fbio.h>
7944 #else
7945 #include <machine/console.h>
7946 #endif
7947
7948 int
7949 main (void)
7950 {
7951
7952         struct mouse_info the_mouse;
7953         ioctl(0, CONS_MOUSECTL, &the_mouse);
7954
7955   ;
7956   return 0;
7957 }
7958 _ACEOF
7959 rm -f "conftest.$ac_objext"
7960 if { (eval echo "$as_me:7960: \"$ac_compile\"") >&5
7961   (eval $ac_compile) 2>&5
7962   ac_status=$?
7963   echo "$as_me:7963: \$? = $ac_status" >&5
7964   (exit "$ac_status"); } &&
7965          { ac_try='test -s "conftest.$ac_objext"'
7966   { (eval echo "$as_me:7966: \"$ac_try\"") >&5
7967   (eval $ac_try) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit "$ac_status"); }; }; then
7971   cf_with_sysmouse=yes
7972 else
7973   echo "$as_me: failed program was:" >&5
7974 cat "conftest.$ac_ext" >&5
7975 cf_with_sysmouse=no
7976 fi
7977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7978         fi
7979 echo "$as_me:7979: result: $cf_with_sysmouse" >&5
7980 echo "${ECHO_T}$cf_with_sysmouse" >&6
7981 test "$cf_with_sysmouse" = yes &&
7982 cat >>confdefs.h <<\EOF
7983 #define USE_SYSMOUSE 1
7984 EOF
7985
7986 fi
7987
7988 # pretend that ncurses==ncursesw==ncursest
7989 echo "$as_me:7989: checking if you want to disable library suffixes" >&5
7990 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7991
7992 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7993 if test "${enable_lib_suffixes+set}" = set; then
7994   enableval="$enable_lib_suffixes"
7995   test "$enableval" != no && enableval=yes
7996         if test "$enableval" != "yes" ; then
7997     disable_lib_suffixes=yes
7998         else
7999                 disable_lib_suffixes=no
8000         fi
8001 else
8002   enableval=yes
8003         disable_lib_suffixes=no
8004
8005 fi;
8006 echo "$as_me:8006: result: $disable_lib_suffixes" >&5
8007 echo "${ECHO_T}$disable_lib_suffixes" >&6
8008
8009 ### If we're building with rpath, try to link non-standard libs that way too.
8010 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8011
8012 echo "$as_me:8012: checking if rpath-hack should be disabled" >&5
8013 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8014
8015 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8016 if test "${enable_rpath_hack+set}" = set; then
8017   enableval="$enable_rpath_hack"
8018   test "$enableval" != no && enableval=yes
8019         if test "$enableval" != "yes" ; then
8020     enable_rpath_hack=no
8021         else
8022                 enable_rpath_hack=yes
8023         fi
8024 else
8025   enableval=yes
8026         enable_rpath_hack=yes
8027
8028 fi;
8029 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8030 echo "$as_me:8030: result: $cf_disable_rpath_hack" >&5
8031 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8032
8033 if test "$enable_rpath_hack" = yes ; then
8034
8035 echo "$as_me:8035: checking for updated LDFLAGS" >&5
8036 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8037 if test -n "$LD_RPATH_OPT" ; then
8038         echo "$as_me:8038: result: maybe" >&5
8039 echo "${ECHO_T}maybe" >&6
8040
8041         for ac_prog in ldd
8042 do
8043   # Extract the first word of "$ac_prog", so it can be a program name with args.
8044 set dummy $ac_prog; ac_word=$2
8045 echo "$as_me:8045: checking for $ac_word" >&5
8046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8047 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8048   echo $ECHO_N "(cached) $ECHO_C" >&6
8049 else
8050   if test -n "$cf_ldd_prog"; then
8051   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8052 else
8053   ac_save_IFS=$IFS; IFS=$ac_path_separator
8054 ac_dummy="$PATH"
8055 for ac_dir in $ac_dummy; do
8056   IFS=$ac_save_IFS
8057   test -z "$ac_dir" && ac_dir=.
8058   $as_executable_p "$ac_dir/$ac_word" || continue
8059 ac_cv_prog_cf_ldd_prog="$ac_prog"
8060 echo "$as_me:8060: found $ac_dir/$ac_word" >&5
8061 break
8062 done
8063
8064 fi
8065 fi
8066 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8067 if test -n "$cf_ldd_prog"; then
8068   echo "$as_me:8068: result: $cf_ldd_prog" >&5
8069 echo "${ECHO_T}$cf_ldd_prog" >&6
8070 else
8071   echo "$as_me:8071: result: no" >&5
8072 echo "${ECHO_T}no" >&6
8073 fi
8074
8075   test -n "$cf_ldd_prog" && break
8076 done
8077 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8078
8079         cf_rpath_list="/usr/lib /lib"
8080         if test "$cf_ldd_prog" != no
8081         then
8082                 cf_rpath_oops=
8083
8084 cat >"conftest.$ac_ext" <<_ACEOF
8085 #line 8085 "configure"
8086 #include "confdefs.h"
8087 #include <stdio.h>
8088 int
8089 main (void)
8090 {
8091 printf("Hello");
8092   ;
8093   return 0;
8094 }
8095 _ACEOF
8096 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8097 if { (eval echo "$as_me:8097: \"$ac_link\"") >&5
8098   (eval $ac_link) 2>&5
8099   ac_status=$?
8100   echo "$as_me:8100: \$? = $ac_status" >&5
8101   (exit "$ac_status"); } &&
8102          { ac_try='test -s "conftest$ac_exeext"'
8103   { (eval echo "$as_me:8103: \"$ac_try\"") >&5
8104   (eval $ac_try) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit "$ac_status"); }; }; then
8108   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8109                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8110 else
8111   echo "$as_me: failed program was:" >&5
8112 cat "conftest.$ac_ext" >&5
8113 fi
8114 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8115
8116                 # If we passed the link-test, but get a "not found" on a given library,
8117                 # this could be due to inept reconfiguration of gcc to make it only
8118                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8119                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8120                 # /usr/local libraries.
8121                 if test -n "$cf_rpath_oops"
8122                 then
8123                         for cf_rpath_src in $cf_rpath_oops
8124                         do
8125                                 for cf_rpath_dir in \
8126                                         /usr/local \
8127                                         /usr/pkg \
8128                                         /opt/sfw
8129                                 do
8130                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8131                                         then
8132                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8133
8134 echo "${as_me:-configure}:8134: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8135
8136                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8137                                                 break
8138                                         fi
8139                                 done
8140                         done
8141                 fi
8142         fi
8143
8144         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8145
8146 echo "${as_me:-configure}:8146: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8147
8148 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8149
8150 echo "${as_me:-configure}:8150: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8151
8152 cf_rpath_dst=
8153 for cf_rpath_src in $LDFLAGS
8154 do
8155         case "$cf_rpath_src" in
8156         (-L*)
8157
8158                 # check if this refers to a directory which we will ignore
8159                 cf_rpath_skip=no
8160                 if test -n "$cf_rpath_list"
8161                 then
8162                         for cf_rpath_item in $cf_rpath_list
8163                         do
8164                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8165                                 then
8166                                         cf_rpath_skip=yes
8167                                         break
8168                                 fi
8169                         done
8170                 fi
8171
8172                 if test "$cf_rpath_skip" = no
8173                 then
8174                         # transform the option
8175                         if test "$LD_RPATH_OPT" = "-R " ; then
8176                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8177                         else
8178                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8179                         fi
8180
8181                         # if we have not already added this, add it now
8182                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8183                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8184                         then
8185                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8186
8187 echo "${as_me:-configure}:8187: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8188
8189                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8190                         fi
8191                 fi
8192                 ;;
8193         esac
8194         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8195 done
8196 LDFLAGS=$cf_rpath_dst
8197
8198 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8199
8200 echo "${as_me:-configure}:8200: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8201
8202 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8203
8204 echo "${as_me:-configure}:8204: testing ...checking LIBS $LIBS ..." 1>&5
8205
8206 cf_rpath_dst=
8207 for cf_rpath_src in $LIBS
8208 do
8209         case "$cf_rpath_src" in
8210         (-L*)
8211
8212                 # check if this refers to a directory which we will ignore
8213                 cf_rpath_skip=no
8214                 if test -n "$cf_rpath_list"
8215                 then
8216                         for cf_rpath_item in $cf_rpath_list
8217                         do
8218                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8219                                 then
8220                                         cf_rpath_skip=yes
8221                                         break
8222                                 fi
8223                         done
8224                 fi
8225
8226                 if test "$cf_rpath_skip" = no
8227                 then
8228                         # transform the option
8229                         if test "$LD_RPATH_OPT" = "-R " ; then
8230                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8231                         else
8232                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8233                         fi
8234
8235                         # if we have not already added this, add it now
8236                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8237                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8238                         then
8239                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8240
8241 echo "${as_me:-configure}:8241: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8242
8243                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8244                         fi
8245                 fi
8246                 ;;
8247         esac
8248         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8249 done
8250 LIBS=$cf_rpath_dst
8251
8252 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8253
8254 echo "${as_me:-configure}:8254: testing ...checked LIBS $LIBS ..." 1>&5
8255
8256         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8257
8258 echo "${as_me:-configure}:8258: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8259
8260 else
8261         echo "$as_me:8261: result: no" >&5
8262 echo "${ECHO_T}no" >&6
8263 fi
8264
8265 fi
8266
8267 fi
8268
8269 ### Depending on the system, someone may use rpath to build ncurses but not
8270 # want users of the package to rely upon that feature.  Give those people an
8271 # option to suppress that detail from EXTRA_LDFLAGS.
8272 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8273 if test -n "$EXTRA_PKG_LDFLAGS"
8274 then
8275         echo "$as_me:8275: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8276 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8277
8278 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8279 if test "${enable_pkg_ldflags+set}" = set; then
8280   enableval="$enable_pkg_ldflags"
8281   test "$enableval" != no && enableval=yes
8282         if test "$enableval" != "yes" ; then
8283     disable_pkg_ldflags=yes
8284         else
8285                 disable_pkg_ldflags=no
8286         fi
8287 else
8288   enableval=yes
8289         disable_pkg_ldflags=no
8290
8291 fi;
8292         echo "$as_me:8292: result: $disable_pkg_ldflags" >&5
8293 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8294         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8295 fi
8296
8297 ###############################################################################
8298
8299 ###     use option --with-extra-suffix to append suffix to headers and libraries
8300 echo "$as_me:8300: checking if you wish to append extra suffix to header/library paths" >&5
8301 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8302 EXTRA_SUFFIX=
8303
8304 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8305 if test "${with_extra_suffix+set}" = set; then
8306   withval="$with_extra_suffix"
8307   case x$withval in
8308         (xno)
8309                 ;;
8310         (xyes|x)
8311                 EXTRA_SUFFIX=$cf_cv_abi_version
8312                 ;;
8313         (*)
8314                 EXTRA_SUFFIX=$withval
8315                 ;;
8316         esac
8317
8318 fi;
8319 echo "$as_me:8319: result: $EXTRA_SUFFIX" >&5
8320 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8321
8322 ###     use option --disable-overwrite to leave out the link to -lcurses
8323 echo "$as_me:8323: checking if you wish to install ncurses overwriting curses" >&5
8324 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8325
8326 # Check whether --enable-overwrite or --disable-overwrite was given.
8327 if test "${enable_overwrite+set}" = set; then
8328   enableval="$enable_overwrite"
8329   with_overwrite=$enableval
8330 else
8331   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8332 fi;
8333 echo "$as_me:8333: result: $with_overwrite" >&5
8334 echo "${ECHO_T}$with_overwrite" >&6
8335
8336 echo "$as_me:8336: checking if external terminfo-database is used" >&5
8337 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8338
8339 # Check whether --enable-database or --disable-database was given.
8340 if test "${enable_database+set}" = set; then
8341   enableval="$enable_database"
8342   use_database=$enableval
8343 else
8344   use_database=yes
8345 fi;
8346 echo "$as_me:8346: result: $use_database" >&5
8347 echo "${ECHO_T}$use_database" >&6
8348
8349 case "$host_os" in
8350 (os2*)
8351         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8352         ;;
8353 (*)
8354         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8355         ;;
8356 esac
8357
8358 NCURSES_USE_DATABASE=0
8359 if test "$use_database" != no ; then
8360         NCURSES_USE_DATABASE=1
8361
8362         echo "$as_me:8362: checking which terminfo source-file will be installed" >&5
8363 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8364
8365 # Check whether --with-database or --without-database was given.
8366 if test "${with_database+set}" = set; then
8367   withval="$with_database"
8368   TERMINFO_SRC=$withval
8369 fi;
8370         echo "$as_me:8370: result: $TERMINFO_SRC" >&5
8371 echo "${ECHO_T}$TERMINFO_SRC" >&6
8372
8373         echo "$as_me:8373: checking whether to use hashed database instead of directory/tree" >&5
8374 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8375
8376 # Check whether --with-hashed-db or --without-hashed-db was given.
8377 if test "${with_hashed_db+set}" = set; then
8378   withval="$with_hashed_db"
8379
8380 else
8381   with_hashed_db=no
8382 fi;
8383         echo "$as_me:8383: result: $with_hashed_db" >&5
8384 echo "${ECHO_T}$with_hashed_db" >&6
8385 else
8386         with_hashed_db=no
8387 fi
8388
8389 echo "$as_me:8389: checking for list of fallback descriptions" >&5
8390 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8391
8392 # Check whether --with-fallbacks or --without-fallbacks was given.
8393 if test "${with_fallbacks+set}" = set; then
8394   withval="$with_fallbacks"
8395   with_fallback=$withval
8396 else
8397   with_fallback=
8398 fi;
8399 echo "$as_me:8399: result: $with_fallback" >&5
8400 echo "${ECHO_T}$with_fallback" >&6
8401
8402 case ".$with_fallback" in
8403 (.|.no)
8404         FALLBACK_LIST=
8405         ;;
8406 (.yes)
8407         { echo "$as_me:8407: WARNING: expected a list of terminal descriptions" >&5
8408 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8409         ;;
8410 (*)
8411         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8412         ;;
8413 esac
8414
8415 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8416 # tree for generating the terminal descriptions that will be compiled into the
8417 # library.  If your toolchain is old, it may not handle current terminal
8418 # databases.  Use configure-options to point to the tools which will be used,
8419 # rather than the first ones found on the $PATH.
8420 if test -n "$ac_tool_prefix"; then
8421   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8422 set dummy ${ac_tool_prefix}tic; ac_word=$2
8423 echo "$as_me:8423: checking for $ac_word" >&5
8424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8425 if test "${ac_cv_prog_TIC+set}" = set; then
8426   echo $ECHO_N "(cached) $ECHO_C" >&6
8427 else
8428   if test -n "$TIC"; then
8429   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8430 else
8431   ac_save_IFS=$IFS; IFS=$ac_path_separator
8432 ac_dummy="$PATH"
8433 for ac_dir in $ac_dummy; do
8434   IFS=$ac_save_IFS
8435   test -z "$ac_dir" && ac_dir=.
8436   $as_executable_p "$ac_dir/$ac_word" || continue
8437 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8438 echo "$as_me:8438: found $ac_dir/$ac_word" >&5
8439 break
8440 done
8441
8442 fi
8443 fi
8444 TIC=$ac_cv_prog_TIC
8445 if test -n "$TIC"; then
8446   echo "$as_me:8446: result: $TIC" >&5
8447 echo "${ECHO_T}$TIC" >&6
8448 else
8449   echo "$as_me:8449: result: no" >&5
8450 echo "${ECHO_T}no" >&6
8451 fi
8452
8453 fi
8454 if test -z "$ac_cv_prog_TIC"; then
8455   ac_ct_TIC=$TIC
8456   # Extract the first word of "tic", so it can be a program name with args.
8457 set dummy tic; ac_word=$2
8458 echo "$as_me:8458: checking for $ac_word" >&5
8459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8460 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8461   echo $ECHO_N "(cached) $ECHO_C" >&6
8462 else
8463   if test -n "$ac_ct_TIC"; then
8464   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8465 else
8466   ac_save_IFS=$IFS; IFS=$ac_path_separator
8467 ac_dummy="$PATH"
8468 for ac_dir in $ac_dummy; do
8469   IFS=$ac_save_IFS
8470   test -z "$ac_dir" && ac_dir=.
8471   $as_executable_p "$ac_dir/$ac_word" || continue
8472 ac_cv_prog_ac_ct_TIC="tic"
8473 echo "$as_me:8473: found $ac_dir/$ac_word" >&5
8474 break
8475 done
8476
8477 fi
8478 fi
8479 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8480 if test -n "$ac_ct_TIC"; then
8481   echo "$as_me:8481: result: $ac_ct_TIC" >&5
8482 echo "${ECHO_T}$ac_ct_TIC" >&6
8483 else
8484   echo "$as_me:8484: result: no" >&5
8485 echo "${ECHO_T}no" >&6
8486 fi
8487
8488   TIC=$ac_ct_TIC
8489 else
8490   TIC="$ac_cv_prog_TIC"
8491 fi
8492
8493 if test -n "$ac_tool_prefix"; then
8494   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8495 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8496 echo "$as_me:8496: checking for $ac_word" >&5
8497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8498 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8499   echo $ECHO_N "(cached) $ECHO_C" >&6
8500 else
8501   if test -n "$INFOCMP"; then
8502   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8503 else
8504   ac_save_IFS=$IFS; IFS=$ac_path_separator
8505 ac_dummy="$PATH"
8506 for ac_dir in $ac_dummy; do
8507   IFS=$ac_save_IFS
8508   test -z "$ac_dir" && ac_dir=.
8509   $as_executable_p "$ac_dir/$ac_word" || continue
8510 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8511 echo "$as_me:8511: found $ac_dir/$ac_word" >&5
8512 break
8513 done
8514
8515 fi
8516 fi
8517 INFOCMP=$ac_cv_prog_INFOCMP
8518 if test -n "$INFOCMP"; then
8519   echo "$as_me:8519: result: $INFOCMP" >&5
8520 echo "${ECHO_T}$INFOCMP" >&6
8521 else
8522   echo "$as_me:8522: result: no" >&5
8523 echo "${ECHO_T}no" >&6
8524 fi
8525
8526 fi
8527 if test -z "$ac_cv_prog_INFOCMP"; then
8528   ac_ct_INFOCMP=$INFOCMP
8529   # Extract the first word of "infocmp", so it can be a program name with args.
8530 set dummy infocmp; ac_word=$2
8531 echo "$as_me:8531: checking for $ac_word" >&5
8532 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8533 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8534   echo $ECHO_N "(cached) $ECHO_C" >&6
8535 else
8536   if test -n "$ac_ct_INFOCMP"; then
8537   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8538 else
8539   ac_save_IFS=$IFS; IFS=$ac_path_separator
8540 ac_dummy="$PATH"
8541 for ac_dir in $ac_dummy; do
8542   IFS=$ac_save_IFS
8543   test -z "$ac_dir" && ac_dir=.
8544   $as_executable_p "$ac_dir/$ac_word" || continue
8545 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8546 echo "$as_me:8546: found $ac_dir/$ac_word" >&5
8547 break
8548 done
8549
8550 fi
8551 fi
8552 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8553 if test -n "$ac_ct_INFOCMP"; then
8554   echo "$as_me:8554: result: $ac_ct_INFOCMP" >&5
8555 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8556 else
8557   echo "$as_me:8557: result: no" >&5
8558 echo "${ECHO_T}no" >&6
8559 fi
8560
8561   INFOCMP=$ac_ct_INFOCMP
8562 else
8563   INFOCMP="$ac_cv_prog_INFOCMP"
8564 fi
8565
8566 if test -n "$FALLBACK_LIST"
8567 then
8568
8569 # Check whether --with-tic-path or --without-tic-path was given.
8570 if test "${with_tic_path+set}" = set; then
8571   withval="$with_tic_path"
8572   echo "$as_me:8572: checking for tic program for fallbacks" >&5
8573 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8574                 TIC=$withval
8575                 echo "$as_me:8575: result: $TIC" >&5
8576 echo "${ECHO_T}$TIC" >&6
8577
8578 if test "x$prefix" != xNONE; then
8579         cf_path_syntax="$prefix"
8580 else
8581         cf_path_syntax="$ac_default_prefix"
8582 fi
8583
8584 case ".$TIC" in
8585 (.\$\(*\)*|.\'*\'*)
8586         ;;
8587 (..|./*|.\\*)
8588         ;;
8589 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8590         ;;
8591 (.\$\{*prefix\}*|.\$\{*dir\}*)
8592         eval TIC="$TIC"
8593         case ".$TIC" in
8594         (.NONE/*)
8595                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8596                 ;;
8597         esac
8598         ;;
8599 (.no|.NONE/*)
8600         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8601         ;;
8602 (*)
8603         { { echo "$as_me:8603: error: expected a pathname, not \"$TIC\"" >&5
8604 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8605    { (exit 1); exit 1; }; }
8606         ;;
8607 esac
8608
8609 else
8610
8611 test -z "$TIC" && TIC="tic"
8612 for ac_prog in $TIC tic
8613 do
8614   # Extract the first word of "$ac_prog", so it can be a program name with args.
8615 set dummy $ac_prog; ac_word=$2
8616 echo "$as_me:8616: checking for $ac_word" >&5
8617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8618 if test "${ac_cv_path_TIC+set}" = set; then
8619   echo $ECHO_N "(cached) $ECHO_C" >&6
8620 else
8621   case $TIC in
8622   [\\/]* | ?:[\\/]*)
8623   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8624   ;;
8625   *)
8626   ac_save_IFS=$IFS; IFS=$ac_path_separator
8627 ac_dummy="$PATH:/usr/local/ncurses/bin"
8628 for ac_dir in $ac_dummy; do
8629   IFS=$ac_save_IFS
8630   test -z "$ac_dir" && ac_dir=.
8631   if $as_executable_p "$ac_dir/$ac_word"; then
8632    ac_cv_path_TIC="$ac_dir/$ac_word"
8633    echo "$as_me:8633: found $ac_dir/$ac_word" >&5
8634    break
8635 fi
8636 done
8637
8638   ;;
8639 esac
8640 fi
8641 TIC=$ac_cv_path_TIC
8642
8643 if test -n "$TIC"; then
8644   echo "$as_me:8644: result: $TIC" >&5
8645 echo "${ECHO_T}$TIC" >&6
8646 else
8647   echo "$as_me:8647: result: no" >&5
8648 echo "${ECHO_T}no" >&6
8649 fi
8650
8651   test -n "$TIC" && break
8652 done
8653 test -n "$TIC" || TIC="$TIC"
8654
8655 cf_path_prog=""
8656 cf_path_args=""
8657 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8658 for cf_temp in $ac_cv_path_TIC
8659 do
8660         if test -z "$cf_path_prog" ; then
8661                 if test "$with_full_paths" = yes ; then
8662
8663 if test "x$prefix" != xNONE; then
8664         cf_path_syntax="$prefix"
8665 else
8666         cf_path_syntax="$ac_default_prefix"
8667 fi
8668
8669 case ".$cf_temp" in
8670 (.\$\(*\)*|.\'*\'*)
8671         ;;
8672 (..|./*|.\\*)
8673         ;;
8674 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8675         ;;
8676 (.\$\{*prefix\}*|.\$\{*dir\}*)
8677         eval cf_temp="$cf_temp"
8678         case ".$cf_temp" in
8679         (.NONE/*)
8680                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8681                 ;;
8682         esac
8683         ;;
8684 (.no|.NONE/*)
8685         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8686         ;;
8687 (*)
8688         break
8689         ;;
8690 esac
8691
8692                         cf_path_prog="$cf_temp"
8693                 else
8694                         cf_path_prog="`basename "$cf_temp"`"
8695                 fi
8696         elif test -z "$cf_path_args" ; then
8697                 cf_path_args="$cf_temp"
8698         else
8699                 cf_path_args="$cf_path_args $cf_temp"
8700         fi
8701 done
8702 IFS="$cf_save_ifs"
8703
8704 if test -n "$cf_path_prog" ; then
8705
8706 echo "${as_me:-configure}:8706: testing defining path for ${cf_path_prog} ..." 1>&5
8707
8708 cat >>confdefs.h <<EOF
8709 #define TIC_PATH "$cf_path_prog"
8710 EOF
8711
8712         test -n "$cf_path_args" &&
8713 cat >>confdefs.h <<EOF
8714 #define TIC_ARGS "$cf_path_args"
8715 EOF
8716
8717 fi
8718
8719                 if test -z "$TIC"
8720                 then
8721                         { echo "$as_me:8721: WARNING: no tic program found for fallbacks" >&5
8722 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8723                 fi
8724
8725 fi;
8726
8727 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8728 if test "${with_infocmp_path+set}" = set; then
8729   withval="$with_infocmp_path"
8730   echo "$as_me:8730: checking for infocmp program for fallbacks" >&5
8731 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8732                 INFOCMP=$withval
8733                 echo "$as_me:8733: result: $INFOCMP" >&5
8734 echo "${ECHO_T}$INFOCMP" >&6
8735
8736 if test "x$prefix" != xNONE; then
8737         cf_path_syntax="$prefix"
8738 else
8739         cf_path_syntax="$ac_default_prefix"
8740 fi
8741
8742 case ".$INFOCMP" in
8743 (.\$\(*\)*|.\'*\'*)
8744         ;;
8745 (..|./*|.\\*)
8746         ;;
8747 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8748         ;;
8749 (.\$\{*prefix\}*|.\$\{*dir\}*)
8750         eval INFOCMP="$INFOCMP"
8751         case ".$INFOCMP" in
8752         (.NONE/*)
8753                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8754                 ;;
8755         esac
8756         ;;
8757 (.no|.NONE/*)
8758         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8759         ;;
8760 (*)
8761         { { echo "$as_me:8761: error: expected a pathname, not \"$INFOCMP\"" >&5
8762 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8763    { (exit 1); exit 1; }; }
8764         ;;
8765 esac
8766
8767 else
8768
8769 test -z "$INFOCMP" && INFOCMP="infocmp"
8770 for ac_prog in $INFOCMP infocmp
8771 do
8772   # Extract the first word of "$ac_prog", so it can be a program name with args.
8773 set dummy $ac_prog; ac_word=$2
8774 echo "$as_me:8774: checking for $ac_word" >&5
8775 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8776 if test "${ac_cv_path_INFOCMP+set}" = set; then
8777   echo $ECHO_N "(cached) $ECHO_C" >&6
8778 else
8779   case $INFOCMP in
8780   [\\/]* | ?:[\\/]*)
8781   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8782   ;;
8783   *)
8784   ac_save_IFS=$IFS; IFS=$ac_path_separator
8785 ac_dummy="$PATH:/usr/local/ncurses/bin"
8786 for ac_dir in $ac_dummy; do
8787   IFS=$ac_save_IFS
8788   test -z "$ac_dir" && ac_dir=.
8789   if $as_executable_p "$ac_dir/$ac_word"; then
8790    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8791    echo "$as_me:8791: found $ac_dir/$ac_word" >&5
8792    break
8793 fi
8794 done
8795
8796   ;;
8797 esac
8798 fi
8799 INFOCMP=$ac_cv_path_INFOCMP
8800
8801 if test -n "$INFOCMP"; then
8802   echo "$as_me:8802: result: $INFOCMP" >&5
8803 echo "${ECHO_T}$INFOCMP" >&6
8804 else
8805   echo "$as_me:8805: result: no" >&5
8806 echo "${ECHO_T}no" >&6
8807 fi
8808
8809   test -n "$INFOCMP" && break
8810 done
8811 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8812
8813 cf_path_prog=""
8814 cf_path_args=""
8815 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8816 for cf_temp in $ac_cv_path_INFOCMP
8817 do
8818         if test -z "$cf_path_prog" ; then
8819                 if test "$with_full_paths" = yes ; then
8820
8821 if test "x$prefix" != xNONE; then
8822         cf_path_syntax="$prefix"
8823 else
8824         cf_path_syntax="$ac_default_prefix"
8825 fi
8826
8827 case ".$cf_temp" in
8828 (.\$\(*\)*|.\'*\'*)
8829         ;;
8830 (..|./*|.\\*)
8831         ;;
8832 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8833         ;;
8834 (.\$\{*prefix\}*|.\$\{*dir\}*)
8835         eval cf_temp="$cf_temp"
8836         case ".$cf_temp" in
8837         (.NONE/*)
8838                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8839                 ;;
8840         esac
8841         ;;
8842 (.no|.NONE/*)
8843         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8844         ;;
8845 (*)
8846         break
8847         ;;
8848 esac
8849
8850                         cf_path_prog="$cf_temp"
8851                 else
8852                         cf_path_prog="`basename "$cf_temp"`"
8853                 fi
8854         elif test -z "$cf_path_args" ; then
8855                 cf_path_args="$cf_temp"
8856         else
8857                 cf_path_args="$cf_path_args $cf_temp"
8858         fi
8859 done
8860 IFS="$cf_save_ifs"
8861
8862 if test -n "$cf_path_prog" ; then
8863
8864 echo "${as_me:-configure}:8864: testing defining path for ${cf_path_prog} ..." 1>&5
8865
8866 cat >>confdefs.h <<EOF
8867 #define INFOCMP_PATH "$cf_path_prog"
8868 EOF
8869
8870         test -n "$cf_path_args" &&
8871 cat >>confdefs.h <<EOF
8872 #define INFOCMP_ARGS "$cf_path_args"
8873 EOF
8874
8875 fi
8876
8877                 if test -z "$INFOCMP"
8878                 then
8879                         { echo "$as_me:8879: WARNING: no infocmp program found for fallbacks" >&5
8880 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8881                 fi
8882
8883 fi;
8884
8885         test -z "$TIC" && FALLBACK_LIST=
8886         test -z "$INFOCMP" && FALLBACK_LIST=
8887         if test -z "$FALLBACK_LIST"
8888         then
8889                 { echo "$as_me:8889: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8890 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8891         fi
8892 fi
8893
8894 USE_FALLBACKS=
8895 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8896
8897 echo "$as_me:8897: checking if you want modern xterm or antique" >&5
8898 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8899
8900 # Check whether --with-xterm-new or --without-xterm-new was given.
8901 if test "${with_xterm_new+set}" = set; then
8902   withval="$with_xterm_new"
8903   with_xterm_new=$withval
8904 else
8905   with_xterm_new=yes
8906 fi;
8907 case "$with_xterm_new" in
8908 (no) with_xterm_new=xterm-old;;
8909 (*)      with_xterm_new=xterm-new;;
8910 esac
8911 echo "$as_me:8911: result: $with_xterm_new" >&5
8912 echo "${ECHO_T}$with_xterm_new" >&6
8913 WHICH_XTERM=$with_xterm_new
8914
8915 echo "$as_me:8915: checking if xterm backspace sends BS or DEL" >&5
8916 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8917
8918 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8919 if test "${with_xterm_kbs+set}" = set; then
8920   withval="$with_xterm_kbs"
8921   with_xterm_kbs=$withval
8922 else
8923   with_xterm_kbs=BS
8924 fi;
8925 case x$with_xterm_kbs in
8926 (xyes|xno|xBS|xbs|x8)
8927         with_xterm_kbs=BS
8928         ;;
8929 (xDEL|xdel|x127)
8930         with_xterm_kbs=DEL
8931         ;;
8932 (*)
8933         with_xterm_kbs=$withval
8934         ;;
8935 esac
8936 echo "$as_me:8936: result: $with_xterm_kbs" >&5
8937 echo "${ECHO_T}$with_xterm_kbs" >&6
8938 XTERM_KBS=$with_xterm_kbs
8939
8940 MAKE_TERMINFO=
8941 if test "$use_database" = no ; then
8942         TERMINFO="${datadir}/terminfo"
8943         MAKE_TERMINFO="#"
8944 else
8945
8946 echo "$as_me:8946: checking for list of terminfo directories" >&5
8947 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8948
8949 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8950 if test "${with_terminfo_dirs+set}" = set; then
8951   withval="$with_terminfo_dirs"
8952
8953 else
8954   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8955 fi;
8956 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8957 cf_dst_path=
8958 for cf_src_path in $withval
8959 do
8960
8961 if test "x$prefix" != xNONE; then
8962         cf_path_syntax="$prefix"
8963 else
8964         cf_path_syntax="$ac_default_prefix"
8965 fi
8966
8967 case ".$cf_src_path" in
8968 (.\$\(*\)*|.\'*\'*)
8969         ;;
8970 (..|./*|.\\*)
8971         ;;
8972 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8973         ;;
8974 (.\$\{*prefix\}*|.\$\{*dir\}*)
8975         eval cf_src_path="$cf_src_path"
8976         case ".$cf_src_path" in
8977         (.NONE/*)
8978                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8979                 ;;
8980         esac
8981         ;;
8982 (.no|.NONE/*)
8983         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8984         ;;
8985 (*)
8986         { { echo "$as_me:8986: error: expected a pathname, not \"$cf_src_path\"" >&5
8987 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8988    { (exit 1); exit 1; }; }
8989         ;;
8990 esac
8991
8992   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8993   cf_dst_path="${cf_dst_path}${cf_src_path}"
8994 done
8995 IFS="$ac_save_ifs"
8996
8997 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8998 # so we have to check/work around.  We do prefer the result of "eval"...
8999 eval cf_dst_eval="$cf_dst_path"
9000 case "x$cf_dst_eval" in
9001 (xNONE*)
9002         TERMINFO_DIRS=$cf_dst_path
9003         ;;
9004 (*)
9005         TERMINFO_DIRS="$cf_dst_eval"
9006         ;;
9007 esac
9008
9009 echo "$as_me:9009: result: $TERMINFO_DIRS" >&5
9010 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9011 test -n "$TERMINFO_DIRS" &&
9012 cat >>confdefs.h <<EOF
9013 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9014 EOF
9015
9016 case "x$TERMINFO" in
9017 x???:*)
9018         { echo "$as_me:9018: WARNING: ignoring non-directory/file TERMINFO value" >&5
9019 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9020         unset TERMINFO
9021         ;;
9022 esac
9023
9024 echo "$as_me:9024: checking for default terminfo directory" >&5
9025 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9026
9027 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9028 if test "${with_default_terminfo_dir+set}" = set; then
9029   withval="$with_default_terminfo_dir"
9030
9031 else
9032   withval="${TERMINFO:-${datadir}/terminfo}"
9033 fi; if test -n "${datadir}/terminfo" ; then
9034
9035 if test "x$prefix" != xNONE; then
9036         cf_path_syntax="$prefix"
9037 else
9038         cf_path_syntax="$ac_default_prefix"
9039 fi
9040
9041 case ".$withval" in
9042 (.\$\(*\)*|.\'*\'*)
9043         ;;
9044 (..|./*|.\\*)
9045         ;;
9046 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9047         ;;
9048 (.\$\{*prefix\}*|.\$\{*dir\}*)
9049         eval withval="$withval"
9050         case ".$withval" in
9051         (.NONE/*)
9052                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9053                 ;;
9054         esac
9055         ;;
9056 (.no|.NONE/*)
9057         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9058         ;;
9059 (*)
9060         { { echo "$as_me:9060: error: expected a pathname, not \"$withval\"" >&5
9061 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9062    { (exit 1); exit 1; }; }
9063         ;;
9064 esac
9065
9066 fi
9067 eval TERMINFO="$withval"
9068
9069 echo "$as_me:9069: result: $TERMINFO" >&5
9070 echo "${ECHO_T}$TERMINFO" >&6
9071
9072 cat >>confdefs.h <<EOF
9073 #define TERMINFO "$TERMINFO"
9074 EOF
9075
9076 fi
9077
9078 ###     use option --disable-big-core to make tic run on small machines
9079 ###     We need 4Mb, check if we can allocate 50% more than that.
9080 echo "$as_me:9080: checking if big-core option selected" >&5
9081 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9082
9083 # Check whether --enable-big-core or --disable-big-core was given.
9084 if test "${enable_big_core+set}" = set; then
9085   enableval="$enable_big_core"
9086   with_big_core=$enableval
9087 else
9088   if test "$cross_compiling" = yes; then
9089   with_big_core=no
9090 else
9091   cat >"conftest.$ac_ext" <<_ACEOF
9092 #line 9092 "configure"
9093 #include "confdefs.h"
9094
9095 #include <stdlib.h>
9096 #include <string.h>
9097 int main() {
9098         unsigned long n = 6000000L;
9099         char *s = malloc(n);
9100         if (s != 0)
9101                 s[0] = s[n-1] = 0;
9102         ${cf_cv_main_return:-return}(s == 0);
9103 }
9104 _ACEOF
9105 rm -f "conftest$ac_exeext"
9106 if { (eval echo "$as_me:9106: \"$ac_link\"") >&5
9107   (eval $ac_link) 2>&5
9108   ac_status=$?
9109   echo "$as_me:9109: \$? = $ac_status" >&5
9110   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9111   { (eval echo "$as_me:9111: \"$ac_try\"") >&5
9112   (eval $ac_try) 2>&5
9113   ac_status=$?
9114   echo "$as_me:9114: \$? = $ac_status" >&5
9115   (exit "$ac_status"); }; }; then
9116   with_big_core=yes
9117 else
9118   echo "$as_me: program exited with status $ac_status" >&5
9119 echo "$as_me: failed program was:" >&5
9120 cat "conftest.$ac_ext" >&5
9121 with_big_core=no
9122 fi
9123 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9124 fi
9125 fi;
9126 echo "$as_me:9126: result: $with_big_core" >&5
9127 echo "${ECHO_T}$with_big_core" >&6
9128 test "x$with_big_core" = "xyes" &&
9129 cat >>confdefs.h <<\EOF
9130 #define HAVE_BIG_CORE 1
9131 EOF
9132
9133 ### ISO C only guarantees 512-char strings, we have tables which load faster
9134 ### when constructed using "big" strings.  More than the C compiler, the awk
9135 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9136 echo "$as_me:9136: checking if big-strings option selected" >&5
9137 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9138
9139 # Check whether --enable-big-strings or --disable-big-strings was given.
9140 if test "${enable_big_strings+set}" = set; then
9141   enableval="$enable_big_strings"
9142   with_big_strings=$enableval
9143 else
9144
9145         case x$AWK in
9146         (x)
9147                 eval with_big_strings=no
9148                 ;;
9149         (*)
9150                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9151                         | $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
9152                         eval with_big_strings=yes
9153                 else
9154                         eval with_big_strings=no
9155                 fi
9156                 ;;
9157         esac
9158
9159 fi;
9160 echo "$as_me:9160: result: $with_big_strings" >&5
9161 echo "${ECHO_T}$with_big_strings" >&6
9162
9163 USE_BIG_STRINGS=0
9164 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9165
9166 ###     use option --enable-termcap to compile in the termcap fallback support
9167 echo "$as_me:9167: checking if you want termcap-fallback support" >&5
9168 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9169
9170 # Check whether --enable-termcap or --disable-termcap was given.
9171 if test "${enable_termcap+set}" = set; then
9172   enableval="$enable_termcap"
9173   with_termcap=$enableval
9174 else
9175   with_termcap=no
9176 fi;
9177 echo "$as_me:9177: result: $with_termcap" >&5
9178 echo "${ECHO_T}$with_termcap" >&6
9179
9180 NCURSES_USE_TERMCAP=0
9181 if test "x$with_termcap" != "xyes" ; then
9182         if test "$use_database" = no ; then
9183                 if test -z "$with_fallback" ; then
9184                         { { echo "$as_me:9184: error: You have disabled the database w/o specifying fallbacks" >&5
9185 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9186    { (exit 1); exit 1; }; }
9187                 fi
9188         fi
9189
9190 cat >>confdefs.h <<\EOF
9191 #define PURE_TERMINFO 1
9192 EOF
9193
9194 else
9195
9196         if test "$with_ticlib" != no ; then
9197                 { { echo "$as_me:9197: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9198 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9199    { (exit 1); exit 1; }; }
9200         fi
9201
9202         NCURSES_USE_TERMCAP=1
9203         echo "$as_me:9203: checking for list of termcap files" >&5
9204 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9205
9206 # Check whether --with-termpath or --without-termpath was given.
9207 if test "${with_termpath+set}" = set; then
9208   withval="$with_termpath"
9209
9210 else
9211   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9212 fi;
9213 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9214 cf_dst_path=
9215 for cf_src_path in $withval
9216 do
9217
9218 if test "x$prefix" != xNONE; then
9219         cf_path_syntax="$prefix"
9220 else
9221         cf_path_syntax="$ac_default_prefix"
9222 fi
9223
9224 case ".$cf_src_path" in
9225 (.\$\(*\)*|.\'*\'*)
9226         ;;
9227 (..|./*|.\\*)
9228         ;;
9229 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9230         ;;
9231 (.\$\{*prefix\}*|.\$\{*dir\}*)
9232         eval cf_src_path="$cf_src_path"
9233         case ".$cf_src_path" in
9234         (.NONE/*)
9235                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9236                 ;;
9237         esac
9238         ;;
9239 (.no|.NONE/*)
9240         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9241         ;;
9242 (*)
9243         { { echo "$as_me:9243: error: expected a pathname, not \"$cf_src_path\"" >&5
9244 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9245    { (exit 1); exit 1; }; }
9246         ;;
9247 esac
9248
9249   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9250   cf_dst_path="${cf_dst_path}${cf_src_path}"
9251 done
9252 IFS="$ac_save_ifs"
9253
9254 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9255 # so we have to check/work around.  We do prefer the result of "eval"...
9256 eval cf_dst_eval="$cf_dst_path"
9257 case "x$cf_dst_eval" in
9258 (xNONE*)
9259         TERMPATH=$cf_dst_path
9260         ;;
9261 (*)
9262         TERMPATH="$cf_dst_eval"
9263         ;;
9264 esac
9265
9266         echo "$as_me:9266: result: $TERMPATH" >&5
9267 echo "${ECHO_T}$TERMPATH" >&6
9268         test -n "$TERMPATH" &&
9269 cat >>confdefs.h <<EOF
9270 #define TERMPATH "$TERMPATH"
9271 EOF
9272
9273         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9274         echo "$as_me:9274: checking if fast termcap-loader is needed" >&5
9275 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9276
9277 # Check whether --enable-getcap or --disable-getcap was given.
9278 if test "${enable_getcap+set}" = set; then
9279   enableval="$enable_getcap"
9280   with_getcap=$enableval
9281 else
9282   with_getcap=no
9283 fi;
9284         echo "$as_me:9284: result: $with_getcap" >&5
9285 echo "${ECHO_T}$with_getcap" >&6
9286         test "x$with_getcap" = "xyes" &&
9287 cat >>confdefs.h <<\EOF
9288 #define USE_GETCAP 1
9289 EOF
9290
9291         echo "$as_me:9291: checking if translated termcaps will be cached in ~/.terminfo" >&5
9292 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9293
9294 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9295 if test "${enable_getcap_cache+set}" = set; then
9296   enableval="$enable_getcap_cache"
9297   with_getcap_cache=$enableval
9298 else
9299   with_getcap_cache=no
9300 fi;
9301         echo "$as_me:9301: result: $with_getcap_cache" >&5
9302 echo "${ECHO_T}$with_getcap_cache" >&6
9303         test "x$with_getcap_cache" = "xyes" &&
9304 cat >>confdefs.h <<\EOF
9305 #define USE_GETCAP_CACHE 1
9306 EOF
9307
9308 fi
9309
9310 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9311 echo "$as_me:9311: checking if ~/.terminfo is wanted" >&5
9312 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9313
9314 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9315 if test "${enable_home_terminfo+set}" = set; then
9316   enableval="$enable_home_terminfo"
9317   with_home_terminfo=$enableval
9318 else
9319   with_home_terminfo=yes
9320 fi;
9321 echo "$as_me:9321: result: $with_home_terminfo" >&5
9322 echo "${ECHO_T}$with_home_terminfo" >&6
9323 test "x$with_home_terminfo" = "xyes" &&
9324 cat >>confdefs.h <<\EOF
9325 #define USE_HOME_TERMINFO 1
9326 EOF
9327
9328 echo "$as_me:9328: checking if you want to use restricted environment when running as root" >&5
9329 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9330
9331 # Check whether --enable-root-environ or --disable-root-environ was given.
9332 if test "${enable_root_environ+set}" = set; then
9333   enableval="$enable_root_environ"
9334   with_root_environ=$enableval
9335 else
9336   with_root_environ=yes
9337 fi;
9338 echo "$as_me:9338: result: $with_root_environ" >&5
9339 echo "${ECHO_T}$with_root_environ" >&6
9340 test "x$with_root_environ" = xyes &&
9341 cat >>confdefs.h <<\EOF
9342 #define USE_ROOT_ENVIRON 1
9343 EOF
9344
9345 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9346 ###   to reduce storage requirements for the terminfo database.
9347
9348 for ac_header in \
9349 unistd.h \
9350
9351 do
9352 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9353 echo "$as_me:9353: checking for $ac_header" >&5
9354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9356   echo $ECHO_N "(cached) $ECHO_C" >&6
9357 else
9358   cat >"conftest.$ac_ext" <<_ACEOF
9359 #line 9359 "configure"
9360 #include "confdefs.h"
9361 #include <$ac_header>
9362 _ACEOF
9363 if { (eval echo "$as_me:9363: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9364   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9365   ac_status=$?
9366   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9367   rm -f conftest.er1
9368   cat conftest.err >&5
9369   echo "$as_me:9369: \$? = $ac_status" >&5
9370   (exit "$ac_status"); } >/dev/null; then
9371   if test -s conftest.err; then
9372     ac_cpp_err=$ac_c_preproc_warn_flag
9373   else
9374     ac_cpp_err=
9375   fi
9376 else
9377   ac_cpp_err=yes
9378 fi
9379 if test -z "$ac_cpp_err"; then
9380   eval "$as_ac_Header=yes"
9381 else
9382   echo "$as_me: failed program was:" >&5
9383   cat "conftest.$ac_ext" >&5
9384   eval "$as_ac_Header=no"
9385 fi
9386 rm -f conftest.err "conftest.$ac_ext"
9387 fi
9388 echo "$as_me:9388: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9389 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9390 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9391   cat >>confdefs.h <<EOF
9392 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9393 EOF
9394
9395 fi
9396 done
9397
9398 for ac_func in \
9399         remove \
9400         unlink
9401 do
9402 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9403 echo "$as_me:9403: checking for $ac_func" >&5
9404 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9405 if eval "test \"\${$as_ac_var+set}\" = set"; then
9406   echo $ECHO_N "(cached) $ECHO_C" >&6
9407 else
9408   cat >"conftest.$ac_ext" <<_ACEOF
9409 #line 9409 "configure"
9410 #include "confdefs.h"
9411 #define $ac_func autoconf_temporary
9412 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9413 #undef $ac_func
9414
9415 #ifdef __cplusplus
9416 extern "C"
9417 #endif
9418
9419 /* We use char because int might match the return type of a gcc2
9420    builtin and then its argument prototype would still apply.  */
9421 char $ac_func (void);
9422
9423 int
9424 main (void)
9425 {
9426
9427 /* The GNU C library defines stubs for functions which it implements
9428     to always fail with ENOSYS.  Some functions are actually named
9429     something starting with __ and the normal name is an alias.  */
9430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9431 #error found stub for $ac_func
9432 #endif
9433
9434         return $ac_func ();
9435   ;
9436   return 0;
9437 }
9438 _ACEOF
9439 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9440 if { (eval echo "$as_me:9440: \"$ac_link\"") >&5
9441   (eval $ac_link) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit "$ac_status"); } &&
9445          { ac_try='test -s "conftest$ac_exeext"'
9446   { (eval echo "$as_me:9446: \"$ac_try\"") >&5
9447   (eval $ac_try) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit "$ac_status"); }; }; then
9451   eval "$as_ac_var=yes"
9452 else
9453   echo "$as_me: failed program was:" >&5
9454 cat "conftest.$ac_ext" >&5
9455 eval "$as_ac_var=no"
9456 fi
9457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9458 fi
9459 echo "$as_me:9459: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9460 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9461 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9462   cat >>confdefs.h <<EOF
9463 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9464 EOF
9465
9466 fi
9467 done
9468
9469 if test "$cross_compiling" = yes ; then
9470
9471 for ac_func in \
9472                 link \
9473                 symlink
9474 do
9475 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9476 echo "$as_me:9476: checking for $ac_func" >&5
9477 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9478 if eval "test \"\${$as_ac_var+set}\" = set"; then
9479   echo $ECHO_N "(cached) $ECHO_C" >&6
9480 else
9481   cat >"conftest.$ac_ext" <<_ACEOF
9482 #line 9482 "configure"
9483 #include "confdefs.h"
9484 #define $ac_func autoconf_temporary
9485 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9486 #undef $ac_func
9487
9488 #ifdef __cplusplus
9489 extern "C"
9490 #endif
9491
9492 /* We use char because int might match the return type of a gcc2
9493    builtin and then its argument prototype would still apply.  */
9494 char $ac_func (void);
9495
9496 int
9497 main (void)
9498 {
9499
9500 /* The GNU C library defines stubs for functions which it implements
9501     to always fail with ENOSYS.  Some functions are actually named
9502     something starting with __ and the normal name is an alias.  */
9503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9504 #error found stub for $ac_func
9505 #endif
9506
9507         return $ac_func ();
9508   ;
9509   return 0;
9510 }
9511 _ACEOF
9512 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9513 if { (eval echo "$as_me:9513: \"$ac_link\"") >&5
9514   (eval $ac_link) 2>&5
9515   ac_status=$?
9516   echo "$as_me:9516: \$? = $ac_status" >&5
9517   (exit "$ac_status"); } &&
9518          { ac_try='test -s "conftest$ac_exeext"'
9519   { (eval echo "$as_me:9519: \"$ac_try\"") >&5
9520   (eval $ac_try) 2>&5
9521   ac_status=$?
9522   echo "$as_me:9522: \$? = $ac_status" >&5
9523   (exit "$ac_status"); }; }; then
9524   eval "$as_ac_var=yes"
9525 else
9526   echo "$as_me: failed program was:" >&5
9527 cat "conftest.$ac_ext" >&5
9528 eval "$as_ac_var=no"
9529 fi
9530 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9531 fi
9532 echo "$as_me:9532: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9533 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9534 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9535   cat >>confdefs.h <<EOF
9536 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9537 EOF
9538
9539 fi
9540 done
9541
9542 else
9543         echo "$as_me:9543: checking if link/symlink functions work" >&5
9544 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9545 if test "${cf_cv_link_funcs+set}" = set; then
9546   echo $ECHO_N "(cached) $ECHO_C" >&6
9547 else
9548
9549                 cf_cv_link_funcs=
9550                 for cf_func in link symlink ; do
9551                         if test "$cross_compiling" = yes; then
9552
9553                         eval 'ac_cv_func_'$cf_func'=error'
9554 else
9555   cat >"conftest.$ac_ext" <<_ACEOF
9556 #line 9556 "configure"
9557 #include "confdefs.h"
9558
9559 #include <sys/types.h>
9560 #include <sys/stat.h>
9561 #ifdef HAVE_UNISTD_H
9562 #include <unistd.h>
9563 #endif
9564 int main(void)
9565 {
9566         int fail = 0;
9567         char *src = "config.log";
9568         char *dst = "conftest.chk";
9569         struct stat src_sb;
9570         struct stat dst_sb;
9571
9572         stat(src, &src_sb);
9573         fail = ($cf_func("config.log", "conftest.chk") < 0)
9574             || (stat(dst, &dst_sb) < 0)
9575             || (dst_sb.st_mtime != src_sb.st_mtime);
9576 #ifdef HAVE_UNLINK
9577         unlink(dst);
9578 #else
9579         remove(dst);
9580 #endif
9581         ${cf_cv_main_return:-return} (fail);
9582 }
9583
9584 _ACEOF
9585 rm -f "conftest$ac_exeext"
9586 if { (eval echo "$as_me:9586: \"$ac_link\"") >&5
9587   (eval $ac_link) 2>&5
9588   ac_status=$?
9589   echo "$as_me:9589: \$? = $ac_status" >&5
9590   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9591   { (eval echo "$as_me:9591: \"$ac_try\"") >&5
9592   (eval $ac_try) 2>&5
9593   ac_status=$?
9594   echo "$as_me:9594: \$? = $ac_status" >&5
9595   (exit "$ac_status"); }; }; then
9596
9597                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9598                         eval 'ac_cv_func_'$cf_func'=yes'
9599 else
9600   echo "$as_me: program exited with status $ac_status" >&5
9601 echo "$as_me: failed program was:" >&5
9602 cat "conftest.$ac_ext" >&5
9603
9604                         eval 'ac_cv_func_'$cf_func'=no'
9605 fi
9606 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9607 fi
9608                 done
9609                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9610
9611 fi
9612 echo "$as_me:9612: result: $cf_cv_link_funcs" >&5
9613 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9614         test "$ac_cv_func_link"    = yes &&
9615 cat >>confdefs.h <<\EOF
9616 #define HAVE_LINK 1
9617 EOF
9618
9619         test "$ac_cv_func_symlink" = yes &&
9620 cat >>confdefs.h <<\EOF
9621 #define HAVE_SYMLINK 1
9622 EOF
9623
9624 fi
9625
9626 with_links=no
9627 with_symlinks=no
9628
9629 # soft links (symbolic links) are useful for some systems where hard links do
9630 # not work, or to make it simpler to copy terminfo trees around.
9631 if test "x$ac_cv_func_symlink" = xyes ; then
9632         echo "$as_me:9632: checking if tic should use symbolic links" >&5
9633 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9634
9635 # Check whether --enable-symlinks or --disable-symlinks was given.
9636 if test "${enable_symlinks+set}" = set; then
9637   enableval="$enable_symlinks"
9638   with_symlinks=$enableval
9639 else
9640   with_symlinks=no
9641 fi;
9642         echo "$as_me:9642: result: $with_symlinks" >&5
9643 echo "${ECHO_T}$with_symlinks" >&6
9644 fi
9645
9646 # If we have hard links and did not choose to use soft links instead, there is
9647 # no reason to make this choice optional - use the hard links.
9648 if test "$with_symlinks" = no ; then
9649         echo "$as_me:9649: checking if tic should use hard links" >&5
9650 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9651         if test "x$ac_cv_func_link" = xyes ; then
9652                 with_links=yes
9653         else
9654                 with_links=no
9655         fi
9656         echo "$as_me:9656: result: $with_links" >&5
9657 echo "${ECHO_T}$with_links" >&6
9658 fi
9659
9660 test "x$with_links" = xyes &&
9661 cat >>confdefs.h <<\EOF
9662 #define USE_LINKS 1
9663 EOF
9664
9665 test "x$with_symlinks" = xyes &&
9666 cat >>confdefs.h <<\EOF
9667 #define USE_SYMLINKS 1
9668 EOF
9669
9670 ###   use option --enable-broken-linker to force on use of broken-linker support
9671
9672 echo "$as_me:9672: checking if you want broken-linker support code" >&5
9673 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9674
9675 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9676 if test "${enable_broken_linker+set}" = set; then
9677   enableval="$enable_broken_linker"
9678   with_broken_linker=$enableval
9679 else
9680   with_broken_linker=no
9681 fi;
9682 echo "$as_me:9682: result: $with_broken_linker" >&5
9683 echo "${ECHO_T}$with_broken_linker" >&6
9684
9685 : "${BROKEN_LINKER:=0}"
9686 if test "x$with_broken_linker" = xyes ; then
9687
9688 cat >>confdefs.h <<\EOF
9689 #define BROKEN_LINKER 1
9690 EOF
9691
9692         BROKEN_LINKER=1
9693 fi
9694
9695 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9696 echo "$as_me:9696: checking if tputs should process BSD-style prefix padding" >&5
9697 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9698
9699 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9700 if test "${enable_bsdpad+set}" = set; then
9701   enableval="$enable_bsdpad"
9702   with_bsdpad=$enableval
9703 else
9704   with_bsdpad=no
9705 fi;
9706 echo "$as_me:9706: result: $with_bsdpad" >&5
9707 echo "${ECHO_T}$with_bsdpad" >&6
9708 test "x$with_bsdpad" = xyes &&
9709 cat >>confdefs.h <<\EOF
9710 #define BSD_TPUTS 1
9711 EOF
9712
9713 ###   use option --enable-widec to turn on use of wide-character support
9714 NCURSES_CH_T=chtype
9715 NCURSES_LIBUTF8=0
9716
9717 NEED_WCHAR_H=0
9718 NCURSES_MBSTATE_T=0
9719 NCURSES_WCHAR_T=0
9720 NCURSES_WINT_T=0
9721
9722 # Check to define _XOPEN_SOURCE "automatically"
9723 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9724
9725 echo "$as_me:9725: checking if the POSIX test-macros are already defined" >&5
9726 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9727 if test "${cf_cv_posix_visible+set}" = set; then
9728   echo $ECHO_N "(cached) $ECHO_C" >&6
9729 else
9730
9731 cat >"conftest.$ac_ext" <<_ACEOF
9732 #line 9732 "configure"
9733 #include "confdefs.h"
9734 #include <stdio.h>
9735 int
9736 main (void)
9737 {
9738
9739 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9740         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9741         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9742         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9743 #error conflicting symbols found
9744 #endif
9745
9746   ;
9747   return 0;
9748 }
9749 _ACEOF
9750 rm -f "conftest.$ac_objext"
9751 if { (eval echo "$as_me:9751: \"$ac_compile\"") >&5
9752   (eval $ac_compile) 2>&5
9753   ac_status=$?
9754   echo "$as_me:9754: \$? = $ac_status" >&5
9755   (exit "$ac_status"); } &&
9756          { ac_try='test -s "conftest.$ac_objext"'
9757   { (eval echo "$as_me:9757: \"$ac_try\"") >&5
9758   (eval $ac_try) 2>&5
9759   ac_status=$?
9760   echo "$as_me:9760: \$? = $ac_status" >&5
9761   (exit "$ac_status"); }; }; then
9762   cf_cv_posix_visible=no
9763 else
9764   echo "$as_me: failed program was:" >&5
9765 cat "conftest.$ac_ext" >&5
9766 cf_cv_posix_visible=yes
9767 fi
9768 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9769
9770 fi
9771 echo "$as_me:9771: result: $cf_cv_posix_visible" >&5
9772 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9773
9774 if test "$cf_cv_posix_visible" = no; then
9775
9776 cf_XOPEN_SOURCE=600
9777 cf_POSIX_C_SOURCE=199506L
9778 cf_xopen_source=
9779
9780 case "$host_os" in
9781 (aix[4-7]*)
9782         cf_xopen_source="-D_ALL_SOURCE"
9783         ;;
9784 (msys)
9785         cf_XOPEN_SOURCE=600
9786         ;;
9787 (darwin[0-8].*)
9788         cf_xopen_source="-D_APPLE_C_SOURCE"
9789         ;;
9790 (darwin*)
9791         cf_xopen_source="-D_DARWIN_C_SOURCE"
9792         cf_XOPEN_SOURCE=
9793         ;;
9794 (freebsd*|dragonfly*|midnightbsd*)
9795         # 5.x headers associate
9796         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9797         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9798         cf_POSIX_C_SOURCE=200112L
9799         cf_XOPEN_SOURCE=600
9800         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9801         ;;
9802 (hpux11*)
9803         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9804         ;;
9805 (hpux*)
9806         cf_xopen_source="-D_HPUX_SOURCE"
9807         ;;
9808 (irix[56].*)
9809         cf_xopen_source="-D_SGI_SOURCE"
9810         cf_XOPEN_SOURCE=
9811         ;;
9812 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9813
9814 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9815
9816 echo "$as_me:9816: checking if this is the GNU C library" >&5
9817 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9818 if test "${cf_cv_gnu_library+set}" = set; then
9819   echo $ECHO_N "(cached) $ECHO_C" >&6
9820 else
9821
9822 cat >"conftest.$ac_ext" <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 #include <sys/types.h>
9826 int
9827 main (void)
9828 {
9829
9830         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9831                 return 0;
9832         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9833                 return 0;
9834         #else
9835         #       error not GNU C library
9836         #endif
9837   ;
9838   return 0;
9839 }
9840 _ACEOF
9841 rm -f "conftest.$ac_objext"
9842 if { (eval echo "$as_me:9842: \"$ac_compile\"") >&5
9843   (eval $ac_compile) 2>&5
9844   ac_status=$?
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit "$ac_status"); } &&
9847          { ac_try='test -s "conftest.$ac_objext"'
9848   { (eval echo "$as_me:9848: \"$ac_try\"") >&5
9849   (eval $ac_try) 2>&5
9850   ac_status=$?
9851   echo "$as_me:9851: \$? = $ac_status" >&5
9852   (exit "$ac_status"); }; }; then
9853   cf_cv_gnu_library=yes
9854 else
9855   echo "$as_me: failed program was:" >&5
9856 cat "conftest.$ac_ext" >&5
9857 cf_cv_gnu_library=no
9858 fi
9859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9860
9861 fi
9862 echo "$as_me:9862: result: $cf_cv_gnu_library" >&5
9863 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9864
9865 if test x$cf_cv_gnu_library = xyes; then
9866
9867         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9868         # was changed to help a little.  newlib incorporated the change about 4
9869         # years later.
9870         echo "$as_me:9870: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9871 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9872 if test "${cf_cv_gnu_library_219+set}" = set; then
9873   echo $ECHO_N "(cached) $ECHO_C" >&6
9874 else
9875
9876                 cf_save="$CPPFLAGS"
9877
9878         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9879         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9880
9881                 cat >"conftest.$ac_ext" <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884 #include <sys/types.h>
9885 int
9886 main (void)
9887 {
9888
9889                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9890                                 return 0;
9891                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9892                                 return 0;
9893                         #else
9894                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9895                         #endif
9896   ;
9897   return 0;
9898 }
9899 _ACEOF
9900 rm -f "conftest.$ac_objext"
9901 if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
9902   (eval $ac_compile) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit "$ac_status"); } &&
9906          { ac_try='test -s "conftest.$ac_objext"'
9907   { (eval echo "$as_me:9907: \"$ac_try\"") >&5
9908   (eval $ac_try) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit "$ac_status"); }; }; then
9912   cf_cv_gnu_library_219=yes
9913 else
9914   echo "$as_me: failed program was:" >&5
9915 cat "conftest.$ac_ext" >&5
9916 cf_cv_gnu_library_219=no
9917 fi
9918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9919                 CPPFLAGS="$cf_save"
9920
9921 fi
9922 echo "$as_me:9922: result: $cf_cv_gnu_library_219" >&5
9923 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9924
9925         if test "x$cf_cv_gnu_library_219" = xyes; then
9926                 cf_save="$CPPFLAGS"
9927                 echo "$as_me:9927: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9928 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9929 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9930   echo $ECHO_N "(cached) $ECHO_C" >&6
9931 else
9932
9933 cf_fix_cppflags=no
9934 cf_new_cflags=
9935 cf_new_cppflags=
9936 cf_new_extra_cppflags=
9937
9938 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9939 do
9940 case "$cf_fix_cppflags" in
9941 (no)
9942         case "$cf_add_cflags" in
9943         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9944                 case "$cf_add_cflags" in
9945                 (-D*)
9946                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9947
9948                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9949                                 && test -z "${cf_tst_cflags}" \
9950                                 && cf_fix_cppflags=yes
9951
9952                         if test "$cf_fix_cppflags" = yes ; then
9953
9954         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9955         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9956
9957                                 continue
9958                         elif test "${cf_tst_cflags}" = "\"'" ; then
9959
9960         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9961         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9962
9963                                 continue
9964                         fi
9965                         ;;
9966                 esac
9967                 case "$CPPFLAGS" in
9968                 (*$cf_add_cflags)
9969                         ;;
9970                 (*)
9971                         case "$cf_add_cflags" in
9972                         (-D*)
9973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9974
9975 CPPFLAGS=`echo "$CPPFLAGS" | \
9976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9978
9979                                 ;;
9980                         esac
9981
9982         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9983         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9984
9985                         ;;
9986                 esac
9987                 ;;
9988         (*)
9989
9990         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9991         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9992
9993                 ;;
9994         esac
9995         ;;
9996 (yes)
9997
9998         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9999         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10000
10001         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10002
10003         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10004                 && test -z "${cf_tst_cflags}" \
10005                 && cf_fix_cppflags=no
10006         ;;
10007 esac
10008 done
10009
10010 if test -n "$cf_new_cflags" ; then
10011
10012         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10013         CFLAGS="${CFLAGS}$cf_new_cflags"
10014
10015 fi
10016
10017 if test -n "$cf_new_cppflags" ; then
10018
10019         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10020         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10021
10022 fi
10023
10024 if test -n "$cf_new_extra_cppflags" ; then
10025
10026         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10027         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10028
10029 fi
10030
10031                         cat >"conftest.$ac_ext" <<_ACEOF
10032 #line 10032 "configure"
10033 #include "confdefs.h"
10034
10035                                 #include <limits.h>
10036                                 #include <sys/types.h>
10037
10038 int
10039 main (void)
10040 {
10041
10042                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10043                                         return 0;
10044                                 #else
10045                                 #       error GNU C library is too old
10046                                 #endif
10047   ;
10048   return 0;
10049 }
10050 _ACEOF
10051 rm -f "conftest.$ac_objext"
10052 if { (eval echo "$as_me:10052: \"$ac_compile\"") >&5
10053   (eval $ac_compile) 2>&5
10054   ac_status=$?
10055   echo "$as_me:10055: \$? = $ac_status" >&5
10056   (exit "$ac_status"); } &&
10057          { ac_try='test -s "conftest.$ac_objext"'
10058   { (eval echo "$as_me:10058: \"$ac_try\"") >&5
10059   (eval $ac_try) 2>&5
10060   ac_status=$?
10061   echo "$as_me:10061: \$? = $ac_status" >&5
10062   (exit "$ac_status"); }; }; then
10063   cf_cv_gnu_dftsrc_219=yes
10064 else
10065   echo "$as_me: failed program was:" >&5
10066 cat "conftest.$ac_ext" >&5
10067 cf_cv_gnu_dftsrc_219=no
10068 fi
10069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10070
10071 fi
10072 echo "$as_me:10072: result: $cf_cv_gnu_dftsrc_219" >&5
10073 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10074                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10075         else
10076                 cf_cv_gnu_dftsrc_219=maybe
10077         fi
10078
10079         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10080
10081                 echo "$as_me:10081: checking if we must define _GNU_SOURCE" >&5
10082 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10083 if test "${cf_cv_gnu_source+set}" = set; then
10084   echo $ECHO_N "(cached) $ECHO_C" >&6
10085 else
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                         #ifndef _XOPEN_SOURCE
10096                         #error  expected _XOPEN_SOURCE to be defined
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_save="$CPPFLAGS"
10119
10120 cf_fix_cppflags=no
10121 cf_new_cflags=
10122 cf_new_cppflags=
10123 cf_new_extra_cppflags=
10124
10125 for cf_add_cflags in -D_GNU_SOURCE
10126 do
10127 case "$cf_fix_cppflags" in
10128 (no)
10129         case "$cf_add_cflags" in
10130         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10131                 case "$cf_add_cflags" in
10132                 (-D*)
10133                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10134
10135                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10136                                 && test -z "${cf_tst_cflags}" \
10137                                 && cf_fix_cppflags=yes
10138
10139                         if test "$cf_fix_cppflags" = yes ; then
10140
10141         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10142         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10143
10144                                 continue
10145                         elif test "${cf_tst_cflags}" = "\"'" ; then
10146
10147         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10148         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10149
10150                                 continue
10151                         fi
10152                         ;;
10153                 esac
10154                 case "$CPPFLAGS" in
10155                 (*$cf_add_cflags)
10156                         ;;
10157                 (*)
10158                         case "$cf_add_cflags" in
10159                         (-D*)
10160                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10161
10162 CPPFLAGS=`echo "$CPPFLAGS" | \
10163         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10164                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10165
10166                                 ;;
10167                         esac
10168
10169         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10170         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10171
10172                         ;;
10173                 esac
10174                 ;;
10175         (*)
10176
10177         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10178         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10179
10180                 ;;
10181         esac
10182         ;;
10183 (yes)
10184
10185         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10186         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10187
10188         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10189
10190         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10191                 && test -z "${cf_tst_cflags}" \
10192                 && cf_fix_cppflags=no
10193         ;;
10194 esac
10195 done
10196
10197 if test -n "$cf_new_cflags" ; then
10198
10199         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10200         CFLAGS="${CFLAGS}$cf_new_cflags"
10201
10202 fi
10203
10204 if test -n "$cf_new_cppflags" ; then
10205
10206         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10207         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10208
10209 fi
10210
10211 if test -n "$cf_new_extra_cppflags" ; then
10212
10213         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10214         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10215
10216 fi
10217
10218                          cat >"conftest.$ac_ext" <<_ACEOF
10219 #line 10219 "configure"
10220 #include "confdefs.h"
10221 #include <sys/types.h>
10222 int
10223 main (void)
10224 {
10225
10226                                 #ifdef _XOPEN_SOURCE
10227                                 #error  expected _XOPEN_SOURCE to be undefined
10228                                 #endif
10229   ;
10230   return 0;
10231 }
10232 _ACEOF
10233 rm -f "conftest.$ac_objext"
10234 if { (eval echo "$as_me:10234: \"$ac_compile\"") >&5
10235   (eval $ac_compile) 2>&5
10236   ac_status=$?
10237   echo "$as_me:10237: \$? = $ac_status" >&5
10238   (exit "$ac_status"); } &&
10239          { ac_try='test -s "conftest.$ac_objext"'
10240   { (eval echo "$as_me:10240: \"$ac_try\"") >&5
10241   (eval $ac_try) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit "$ac_status"); }; }; then
10245   cf_cv_gnu_source=no
10246 else
10247   echo "$as_me: failed program was:" >&5
10248 cat "conftest.$ac_ext" >&5
10249 cf_cv_gnu_source=yes
10250 fi
10251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10252                         CPPFLAGS="$cf_save"
10253
10254 fi
10255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10256
10257 fi
10258 echo "$as_me:10258: result: $cf_cv_gnu_source" >&5
10259 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10260
10261                 if test "$cf_cv_gnu_source" = yes
10262                 then
10263                 echo "$as_me:10263: checking if we should also define _DEFAULT_SOURCE" >&5
10264 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10265 if test "${cf_cv_default_source+set}" = set; then
10266   echo $ECHO_N "(cached) $ECHO_C" >&6
10267 else
10268
10269         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10270         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10271
10272                         cat >"conftest.$ac_ext" <<_ACEOF
10273 #line 10273 "configure"
10274 #include "confdefs.h"
10275 #include <sys/types.h>
10276 int
10277 main (void)
10278 {
10279
10280                                 #ifdef _DEFAULT_SOURCE
10281                                 #error  expected _DEFAULT_SOURCE to be undefined
10282                                 #endif
10283   ;
10284   return 0;
10285 }
10286 _ACEOF
10287 rm -f "conftest.$ac_objext"
10288 if { (eval echo "$as_me:10288: \"$ac_compile\"") >&5
10289   (eval $ac_compile) 2>&5
10290   ac_status=$?
10291   echo "$as_me:10291: \$? = $ac_status" >&5
10292   (exit "$ac_status"); } &&
10293          { ac_try='test -s "conftest.$ac_objext"'
10294   { (eval echo "$as_me:10294: \"$ac_try\"") >&5
10295   (eval $ac_try) 2>&5
10296   ac_status=$?
10297   echo "$as_me:10297: \$? = $ac_status" >&5
10298   (exit "$ac_status"); }; }; then
10299   cf_cv_default_source=no
10300 else
10301   echo "$as_me: failed program was:" >&5
10302 cat "conftest.$ac_ext" >&5
10303 cf_cv_default_source=yes
10304 fi
10305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10306
10307 fi
10308 echo "$as_me:10308: result: $cf_cv_default_source" >&5
10309 echo "${ECHO_T}$cf_cv_default_source" >&6
10310                         if test "$cf_cv_default_source" = yes
10311                         then
10312
10313         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10314         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10315
10316                         fi
10317                 fi
10318         fi
10319
10320 fi
10321
10322         ;;
10323 (minix*)
10324         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10325         ;;
10326 (mirbsd*)
10327         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10328         cf_XOPEN_SOURCE=
10329
10330 if test "$cf_cv_posix_visible" = no; then
10331
10332 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10333
10334 cf_save_CFLAGS="$CFLAGS"
10335 cf_save_CPPFLAGS="$CPPFLAGS"
10336
10337 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10338         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10339                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10340
10341 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10342         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10343                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10344
10345 echo "$as_me:10345: checking if we should define _POSIX_C_SOURCE" >&5
10346 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10347 if test "${cf_cv_posix_c_source+set}" = set; then
10348   echo $ECHO_N "(cached) $ECHO_C" >&6
10349 else
10350
10351 echo "${as_me:-configure}:10351: testing if the symbol is already defined go no further ..." 1>&5
10352
10353         cat >"conftest.$ac_ext" <<_ACEOF
10354 #line 10354 "configure"
10355 #include "confdefs.h"
10356 #include <sys/types.h>
10357 int
10358 main (void)
10359 {
10360
10361 #ifndef _POSIX_C_SOURCE
10362 make an error
10363 #endif
10364   ;
10365   return 0;
10366 }
10367 _ACEOF
10368 rm -f "conftest.$ac_objext"
10369 if { (eval echo "$as_me:10369: \"$ac_compile\"") >&5
10370   (eval $ac_compile) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit "$ac_status"); } &&
10374          { ac_try='test -s "conftest.$ac_objext"'
10375   { (eval echo "$as_me:10375: \"$ac_try\"") >&5
10376   (eval $ac_try) 2>&5
10377   ac_status=$?
10378   echo "$as_me:10378: \$? = $ac_status" >&5
10379   (exit "$ac_status"); }; }; then
10380   cf_cv_posix_c_source=no
10381 else
10382   echo "$as_me: failed program was:" >&5
10383 cat "conftest.$ac_ext" >&5
10384 cf_want_posix_source=no
10385          case .$cf_POSIX_C_SOURCE in
10386          (.[12]??*)
10387                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10388                 ;;
10389          (.2)
10390                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10391                 cf_want_posix_source=yes
10392                 ;;
10393          (.*)
10394                 cf_want_posix_source=yes
10395                 ;;
10396          esac
10397          if test "$cf_want_posix_source" = yes ; then
10398                 cat >"conftest.$ac_ext" <<_ACEOF
10399 #line 10399 "configure"
10400 #include "confdefs.h"
10401 #include <sys/types.h>
10402 int
10403 main (void)
10404 {
10405
10406 #ifdef _POSIX_SOURCE
10407 make an error
10408 #endif
10409   ;
10410   return 0;
10411 }
10412 _ACEOF
10413 rm -f "conftest.$ac_objext"
10414 if { (eval echo "$as_me:10414: \"$ac_compile\"") >&5
10415   (eval $ac_compile) 2>&5
10416   ac_status=$?
10417   echo "$as_me:10417: \$? = $ac_status" >&5
10418   (exit "$ac_status"); } &&
10419          { ac_try='test -s "conftest.$ac_objext"'
10420   { (eval echo "$as_me:10420: \"$ac_try\"") >&5
10421   (eval $ac_try) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit "$ac_status"); }; }; then
10425   :
10426 else
10427   echo "$as_me: failed program was:" >&5
10428 cat "conftest.$ac_ext" >&5
10429 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10430 fi
10431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10432          fi
10433
10434 echo "${as_me:-configure}:10434: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10435
10436          CFLAGS="$cf_trim_CFLAGS"
10437          CPPFLAGS="$cf_trim_CPPFLAGS"
10438
10439         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10440         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10441
10442 echo "${as_me:-configure}:10442: testing if the second compile does not leave our definition intact error ..." 1>&5
10443
10444          cat >"conftest.$ac_ext" <<_ACEOF
10445 #line 10445 "configure"
10446 #include "confdefs.h"
10447 #include <sys/types.h>
10448 int
10449 main (void)
10450 {
10451
10452 #ifndef _POSIX_C_SOURCE
10453 make an error
10454 #endif
10455   ;
10456   return 0;
10457 }
10458 _ACEOF
10459 rm -f "conftest.$ac_objext"
10460 if { (eval echo "$as_me:10460: \"$ac_compile\"") >&5
10461   (eval $ac_compile) 2>&5
10462   ac_status=$?
10463   echo "$as_me:10463: \$? = $ac_status" >&5
10464   (exit "$ac_status"); } &&
10465          { ac_try='test -s "conftest.$ac_objext"'
10466   { (eval echo "$as_me:10466: \"$ac_try\"") >&5
10467   (eval $ac_try) 2>&5
10468   ac_status=$?
10469   echo "$as_me:10469: \$? = $ac_status" >&5
10470   (exit "$ac_status"); }; }; then
10471   :
10472 else
10473   echo "$as_me: failed program was:" >&5
10474 cat "conftest.$ac_ext" >&5
10475 cf_cv_posix_c_source=no
10476 fi
10477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10478          CFLAGS="$cf_save_CFLAGS"
10479          CPPFLAGS="$cf_save_CPPFLAGS"
10480
10481 fi
10482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10483
10484 fi
10485 echo "$as_me:10485: result: $cf_cv_posix_c_source" >&5
10486 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10487
10488 if test "$cf_cv_posix_c_source" != no ; then
10489         CFLAGS="$cf_trim_CFLAGS"
10490         CPPFLAGS="$cf_trim_CPPFLAGS"
10491
10492 cf_fix_cppflags=no
10493 cf_new_cflags=
10494 cf_new_cppflags=
10495 cf_new_extra_cppflags=
10496
10497 for cf_add_cflags in $cf_cv_posix_c_source
10498 do
10499 case "$cf_fix_cppflags" in
10500 (no)
10501         case "$cf_add_cflags" in
10502         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10503                 case "$cf_add_cflags" in
10504                 (-D*)
10505                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10506
10507                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10508                                 && test -z "${cf_tst_cflags}" \
10509                                 && cf_fix_cppflags=yes
10510
10511                         if test "$cf_fix_cppflags" = yes ; then
10512
10513         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10514         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10515
10516                                 continue
10517                         elif test "${cf_tst_cflags}" = "\"'" ; then
10518
10519         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10520         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10521
10522                                 continue
10523                         fi
10524                         ;;
10525                 esac
10526                 case "$CPPFLAGS" in
10527                 (*$cf_add_cflags)
10528                         ;;
10529                 (*)
10530                         case "$cf_add_cflags" in
10531                         (-D*)
10532                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10533
10534 CPPFLAGS=`echo "$CPPFLAGS" | \
10535         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10536                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10537
10538                                 ;;
10539                         esac
10540
10541         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10542         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10543
10544                         ;;
10545                 esac
10546                 ;;
10547         (*)
10548
10549         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10550         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10551
10552                 ;;
10553         esac
10554         ;;
10555 (yes)
10556
10557         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10558         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10559
10560         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10561
10562         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10563                 && test -z "${cf_tst_cflags}" \
10564                 && cf_fix_cppflags=no
10565         ;;
10566 esac
10567 done
10568
10569 if test -n "$cf_new_cflags" ; then
10570
10571         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10572         CFLAGS="${CFLAGS}$cf_new_cflags"
10573
10574 fi
10575
10576 if test -n "$cf_new_cppflags" ; then
10577
10578         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10579         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10580
10581 fi
10582
10583 if test -n "$cf_new_extra_cppflags" ; then
10584
10585         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10586         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10587
10588 fi
10589
10590 fi
10591
10592 fi # cf_cv_posix_visible
10593
10594         ;;
10595 (netbsd*)
10596         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10597         ;;
10598 (openbsd[4-9]*)
10599         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10600         cf_xopen_source="-D_BSD_SOURCE"
10601         cf_XOPEN_SOURCE=600
10602         ;;
10603 (openbsd*)
10604         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10605         ;;
10606 (osf[45]*)
10607         cf_xopen_source="-D_OSF_SOURCE"
10608         ;;
10609 (nto-qnx*)
10610         cf_xopen_source="-D_QNX_SOURCE"
10611         ;;
10612 (sco*)
10613         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10614         ;;
10615 (solaris2.*)
10616         cf_xopen_source="-D__EXTENSIONS__"
10617         cf_cv_xopen_source=broken
10618         ;;
10619 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10620         cf_XOPEN_SOURCE=
10621         cf_POSIX_C_SOURCE=
10622         ;;
10623 (*)
10624
10625 echo "$as_me:10625: checking if we should define _XOPEN_SOURCE" >&5
10626 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10627 if test "${cf_cv_xopen_source+set}" = set; then
10628   echo $ECHO_N "(cached) $ECHO_C" >&6
10629 else
10630
10631         cat >"conftest.$ac_ext" <<_ACEOF
10632 #line 10632 "configure"
10633 #include "confdefs.h"
10634
10635 #include <stdlib.h>
10636 #include <string.h>
10637 #include <sys/types.h>
10638
10639 int
10640 main (void)
10641 {
10642
10643 #ifndef _XOPEN_SOURCE
10644 make an error
10645 #endif
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 rm -f "conftest.$ac_objext"
10651 if { (eval echo "$as_me:10651: \"$ac_compile\"") >&5
10652   (eval $ac_compile) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit "$ac_status"); } &&
10656          { ac_try='test -s "conftest.$ac_objext"'
10657   { (eval echo "$as_me:10657: \"$ac_try\"") >&5
10658   (eval $ac_try) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit "$ac_status"); }; }; then
10662   cf_cv_xopen_source=no
10663 else
10664   echo "$as_me: failed program was:" >&5
10665 cat "conftest.$ac_ext" >&5
10666 cf_save="$CPPFLAGS"
10667
10668         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10669         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10670
10671          cat >"conftest.$ac_ext" <<_ACEOF
10672 #line 10672 "configure"
10673 #include "confdefs.h"
10674
10675 #include <stdlib.h>
10676 #include <string.h>
10677 #include <sys/types.h>
10678
10679 int
10680 main (void)
10681 {
10682
10683 #ifdef _XOPEN_SOURCE
10684 make an error
10685 #endif
10686   ;
10687   return 0;
10688 }
10689 _ACEOF
10690 rm -f "conftest.$ac_objext"
10691 if { (eval echo "$as_me:10691: \"$ac_compile\"") >&5
10692   (eval $ac_compile) 2>&5
10693   ac_status=$?
10694   echo "$as_me:10694: \$? = $ac_status" >&5
10695   (exit "$ac_status"); } &&
10696          { ac_try='test -s "conftest.$ac_objext"'
10697   { (eval echo "$as_me:10697: \"$ac_try\"") >&5
10698   (eval $ac_try) 2>&5
10699   ac_status=$?
10700   echo "$as_me:10700: \$? = $ac_status" >&5
10701   (exit "$ac_status"); }; }; then
10702   cf_cv_xopen_source=no
10703 else
10704   echo "$as_me: failed program was:" >&5
10705 cat "conftest.$ac_ext" >&5
10706 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10707 fi
10708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10709         CPPFLAGS="$cf_save"
10710
10711 fi
10712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10713
10714 fi
10715 echo "$as_me:10715: result: $cf_cv_xopen_source" >&5
10716 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10717
10718 if test "$cf_cv_xopen_source" != no ; then
10719
10720 CFLAGS=`echo "$CFLAGS" | \
10721         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10722                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10723
10724 CPPFLAGS=`echo "$CPPFLAGS" | \
10725         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10726                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10727
10728         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10729
10730 cf_fix_cppflags=no
10731 cf_new_cflags=
10732 cf_new_cppflags=
10733 cf_new_extra_cppflags=
10734
10735 for cf_add_cflags in $cf_temp_xopen_source
10736 do
10737 case "$cf_fix_cppflags" in
10738 (no)
10739         case "$cf_add_cflags" in
10740         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10741                 case "$cf_add_cflags" in
10742                 (-D*)
10743                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10744
10745                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10746                                 && test -z "${cf_tst_cflags}" \
10747                                 && cf_fix_cppflags=yes
10748
10749                         if test "$cf_fix_cppflags" = yes ; then
10750
10751         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10752         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10753
10754                                 continue
10755                         elif test "${cf_tst_cflags}" = "\"'" ; then
10756
10757         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10758         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10759
10760                                 continue
10761                         fi
10762                         ;;
10763                 esac
10764                 case "$CPPFLAGS" in
10765                 (*$cf_add_cflags)
10766                         ;;
10767                 (*)
10768                         case "$cf_add_cflags" in
10769                         (-D*)
10770                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10771
10772 CPPFLAGS=`echo "$CPPFLAGS" | \
10773         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10774                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10775
10776                                 ;;
10777                         esac
10778
10779         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10780         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10781
10782                         ;;
10783                 esac
10784                 ;;
10785         (*)
10786
10787         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10788         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10789
10790                 ;;
10791         esac
10792         ;;
10793 (yes)
10794
10795         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10796         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10797
10798         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10799
10800         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10801                 && test -z "${cf_tst_cflags}" \
10802                 && cf_fix_cppflags=no
10803         ;;
10804 esac
10805 done
10806
10807 if test -n "$cf_new_cflags" ; then
10808
10809         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10810         CFLAGS="${CFLAGS}$cf_new_cflags"
10811
10812 fi
10813
10814 if test -n "$cf_new_cppflags" ; then
10815
10816         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10817         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10818
10819 fi
10820
10821 if test -n "$cf_new_extra_cppflags" ; then
10822
10823         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10824         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10825
10826 fi
10827
10828 fi
10829
10830 if test "$cf_cv_posix_visible" = no; then
10831
10832 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10833
10834 cf_save_CFLAGS="$CFLAGS"
10835 cf_save_CPPFLAGS="$CPPFLAGS"
10836
10837 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10838         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10839                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10840
10841 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10842         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10843                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10844
10845 echo "$as_me:10845: checking if we should define _POSIX_C_SOURCE" >&5
10846 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10847 if test "${cf_cv_posix_c_source+set}" = set; then
10848   echo $ECHO_N "(cached) $ECHO_C" >&6
10849 else
10850
10851 echo "${as_me:-configure}:10851: testing if the symbol is already defined go no further ..." 1>&5
10852
10853         cat >"conftest.$ac_ext" <<_ACEOF
10854 #line 10854 "configure"
10855 #include "confdefs.h"
10856 #include <sys/types.h>
10857 int
10858 main (void)
10859 {
10860
10861 #ifndef _POSIX_C_SOURCE
10862 make an error
10863 #endif
10864   ;
10865   return 0;
10866 }
10867 _ACEOF
10868 rm -f "conftest.$ac_objext"
10869 if { (eval echo "$as_me:10869: \"$ac_compile\"") >&5
10870   (eval $ac_compile) 2>&5
10871   ac_status=$?
10872   echo "$as_me:10872: \$? = $ac_status" >&5
10873   (exit "$ac_status"); } &&
10874          { ac_try='test -s "conftest.$ac_objext"'
10875   { (eval echo "$as_me:10875: \"$ac_try\"") >&5
10876   (eval $ac_try) 2>&5
10877   ac_status=$?
10878   echo "$as_me:10878: \$? = $ac_status" >&5
10879   (exit "$ac_status"); }; }; then
10880   cf_cv_posix_c_source=no
10881 else
10882   echo "$as_me: failed program was:" >&5
10883 cat "conftest.$ac_ext" >&5
10884 cf_want_posix_source=no
10885          case .$cf_POSIX_C_SOURCE in
10886          (.[12]??*)
10887                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10888                 ;;
10889          (.2)
10890                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10891                 cf_want_posix_source=yes
10892                 ;;
10893          (.*)
10894                 cf_want_posix_source=yes
10895                 ;;
10896          esac
10897          if test "$cf_want_posix_source" = yes ; then
10898                 cat >"conftest.$ac_ext" <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901 #include <sys/types.h>
10902 int
10903 main (void)
10904 {
10905
10906 #ifdef _POSIX_SOURCE
10907 make an error
10908 #endif
10909   ;
10910   return 0;
10911 }
10912 _ACEOF
10913 rm -f "conftest.$ac_objext"
10914 if { (eval echo "$as_me:10914: \"$ac_compile\"") >&5
10915   (eval $ac_compile) 2>&5
10916   ac_status=$?
10917   echo "$as_me:10917: \$? = $ac_status" >&5
10918   (exit "$ac_status"); } &&
10919          { ac_try='test -s "conftest.$ac_objext"'
10920   { (eval echo "$as_me:10920: \"$ac_try\"") >&5
10921   (eval $ac_try) 2>&5
10922   ac_status=$?
10923   echo "$as_me:10923: \$? = $ac_status" >&5
10924   (exit "$ac_status"); }; }; then
10925   :
10926 else
10927   echo "$as_me: failed program was:" >&5
10928 cat "conftest.$ac_ext" >&5
10929 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10930 fi
10931 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10932          fi
10933
10934 echo "${as_me:-configure}:10934: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10935
10936          CFLAGS="$cf_trim_CFLAGS"
10937          CPPFLAGS="$cf_trim_CPPFLAGS"
10938
10939         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10940         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10941
10942 echo "${as_me:-configure}:10942: testing if the second compile does not leave our definition intact error ..." 1>&5
10943
10944          cat >"conftest.$ac_ext" <<_ACEOF
10945 #line 10945 "configure"
10946 #include "confdefs.h"
10947 #include <sys/types.h>
10948 int
10949 main (void)
10950 {
10951
10952 #ifndef _POSIX_C_SOURCE
10953 make an error
10954 #endif
10955   ;
10956   return 0;
10957 }
10958 _ACEOF
10959 rm -f "conftest.$ac_objext"
10960 if { (eval echo "$as_me:10960: \"$ac_compile\"") >&5
10961   (eval $ac_compile) 2>&5
10962   ac_status=$?
10963   echo "$as_me:10963: \$? = $ac_status" >&5
10964   (exit "$ac_status"); } &&
10965          { ac_try='test -s "conftest.$ac_objext"'
10966   { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967   (eval $ac_try) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit "$ac_status"); }; }; then
10971   :
10972 else
10973   echo "$as_me: failed program was:" >&5
10974 cat "conftest.$ac_ext" >&5
10975 cf_cv_posix_c_source=no
10976 fi
10977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10978          CFLAGS="$cf_save_CFLAGS"
10979          CPPFLAGS="$cf_save_CPPFLAGS"
10980
10981 fi
10982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10983
10984 fi
10985 echo "$as_me:10985: result: $cf_cv_posix_c_source" >&5
10986 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10987
10988 if test "$cf_cv_posix_c_source" != no ; then
10989         CFLAGS="$cf_trim_CFLAGS"
10990         CPPFLAGS="$cf_trim_CPPFLAGS"
10991
10992 cf_fix_cppflags=no
10993 cf_new_cflags=
10994 cf_new_cppflags=
10995 cf_new_extra_cppflags=
10996
10997 for cf_add_cflags in $cf_cv_posix_c_source
10998 do
10999 case "$cf_fix_cppflags" in
11000 (no)
11001         case "$cf_add_cflags" in
11002         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11003                 case "$cf_add_cflags" in
11004                 (-D*)
11005                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11006
11007                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11008                                 && test -z "${cf_tst_cflags}" \
11009                                 && cf_fix_cppflags=yes
11010
11011                         if test "$cf_fix_cppflags" = yes ; then
11012
11013         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11014         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11015
11016                                 continue
11017                         elif test "${cf_tst_cflags}" = "\"'" ; then
11018
11019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11021
11022                                 continue
11023                         fi
11024                         ;;
11025                 esac
11026                 case "$CPPFLAGS" in
11027                 (*$cf_add_cflags)
11028                         ;;
11029                 (*)
11030                         case "$cf_add_cflags" in
11031                         (-D*)
11032                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11033
11034 CPPFLAGS=`echo "$CPPFLAGS" | \
11035         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11036                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11037
11038                                 ;;
11039                         esac
11040
11041         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11042         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11043
11044                         ;;
11045                 esac
11046                 ;;
11047         (*)
11048
11049         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11050         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11051
11052                 ;;
11053         esac
11054         ;;
11055 (yes)
11056
11057         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11058         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11059
11060         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11061
11062         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11063                 && test -z "${cf_tst_cflags}" \
11064                 && cf_fix_cppflags=no
11065         ;;
11066 esac
11067 done
11068
11069 if test -n "$cf_new_cflags" ; then
11070
11071         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11072         CFLAGS="${CFLAGS}$cf_new_cflags"
11073
11074 fi
11075
11076 if test -n "$cf_new_cppflags" ; then
11077
11078         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11079         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11080
11081 fi
11082
11083 if test -n "$cf_new_extra_cppflags" ; then
11084
11085         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11086         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11087
11088 fi
11089
11090 fi
11091
11092 fi # cf_cv_posix_visible
11093
11094         ;;
11095 esac
11096
11097 if test -n "$cf_xopen_source" ; then
11098
11099 cf_fix_cppflags=no
11100 cf_new_cflags=
11101 cf_new_cppflags=
11102 cf_new_extra_cppflags=
11103
11104 for cf_add_cflags in $cf_xopen_source
11105 do
11106 case "$cf_fix_cppflags" in
11107 (no)
11108         case "$cf_add_cflags" in
11109         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11110                 case "$cf_add_cflags" in
11111                 (-D*)
11112                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11113
11114                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11115                                 && test -z "${cf_tst_cflags}" \
11116                                 && cf_fix_cppflags=yes
11117
11118                         if test "$cf_fix_cppflags" = yes ; then
11119
11120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11122
11123                                 continue
11124                         elif test "${cf_tst_cflags}" = "\"'" ; then
11125
11126         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11127         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11128
11129                                 continue
11130                         fi
11131                         ;;
11132                 esac
11133                 case "$CPPFLAGS" in
11134                 (*$cf_add_cflags)
11135                         ;;
11136                 (*)
11137                         case "$cf_add_cflags" in
11138                         (-D*)
11139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11140
11141 CPPFLAGS=`echo "$CPPFLAGS" | \
11142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11144
11145                                 ;;
11146                         esac
11147
11148         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11149         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11150
11151                         ;;
11152                 esac
11153                 ;;
11154         (*)
11155
11156         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11157         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11158
11159                 ;;
11160         esac
11161         ;;
11162 (yes)
11163
11164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11166
11167         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11168
11169         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11170                 && test -z "${cf_tst_cflags}" \
11171                 && cf_fix_cppflags=no
11172         ;;
11173 esac
11174 done
11175
11176 if test -n "$cf_new_cflags" ; then
11177         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11178
11179 echo "${as_me:-configure}:11179: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11180
11181         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11182         CFLAGS="${CFLAGS}$cf_new_cflags"
11183
11184 fi
11185
11186 if test -n "$cf_new_cppflags" ; then
11187         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11188
11189 echo "${as_me:-configure}:11189: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11190
11191         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11192         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11193
11194 fi
11195
11196 if test -n "$cf_new_extra_cppflags" ; then
11197         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11198
11199 echo "${as_me:-configure}:11199: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11200
11201         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11202         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11203
11204 fi
11205
11206 fi
11207
11208 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11209         echo "$as_me:11209: checking if _XOPEN_SOURCE really is set" >&5
11210 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11211         cat >"conftest.$ac_ext" <<_ACEOF
11212 #line 11212 "configure"
11213 #include "confdefs.h"
11214 #include <stdlib.h>
11215 int
11216 main (void)
11217 {
11218
11219 #ifndef _XOPEN_SOURCE
11220 make an error
11221 #endif
11222   ;
11223   return 0;
11224 }
11225 _ACEOF
11226 rm -f "conftest.$ac_objext"
11227 if { (eval echo "$as_me:11227: \"$ac_compile\"") >&5
11228   (eval $ac_compile) 2>&5
11229   ac_status=$?
11230   echo "$as_me:11230: \$? = $ac_status" >&5
11231   (exit "$ac_status"); } &&
11232          { ac_try='test -s "conftest.$ac_objext"'
11233   { (eval echo "$as_me:11233: \"$ac_try\"") >&5
11234   (eval $ac_try) 2>&5
11235   ac_status=$?
11236   echo "$as_me:11236: \$? = $ac_status" >&5
11237   (exit "$ac_status"); }; }; then
11238   cf_XOPEN_SOURCE_set=yes
11239 else
11240   echo "$as_me: failed program was:" >&5
11241 cat "conftest.$ac_ext" >&5
11242 cf_XOPEN_SOURCE_set=no
11243 fi
11244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11245         echo "$as_me:11245: result: $cf_XOPEN_SOURCE_set" >&5
11246 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11247         if test "$cf_XOPEN_SOURCE_set" = yes
11248         then
11249                 cat >"conftest.$ac_ext" <<_ACEOF
11250 #line 11250 "configure"
11251 #include "confdefs.h"
11252 #include <stdlib.h>
11253 int
11254 main (void)
11255 {
11256
11257 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11258 make an error
11259 #endif
11260   ;
11261   return 0;
11262 }
11263 _ACEOF
11264 rm -f "conftest.$ac_objext"
11265 if { (eval echo "$as_me:11265: \"$ac_compile\"") >&5
11266   (eval $ac_compile) 2>&5
11267   ac_status=$?
11268   echo "$as_me:11268: \$? = $ac_status" >&5
11269   (exit "$ac_status"); } &&
11270          { ac_try='test -s "conftest.$ac_objext"'
11271   { (eval echo "$as_me:11271: \"$ac_try\"") >&5
11272   (eval $ac_try) 2>&5
11273   ac_status=$?
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit "$ac_status"); }; }; then
11276   cf_XOPEN_SOURCE_set_ok=yes
11277 else
11278   echo "$as_me: failed program was:" >&5
11279 cat "conftest.$ac_ext" >&5
11280 cf_XOPEN_SOURCE_set_ok=no
11281 fi
11282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11283                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11284                 then
11285                         { echo "$as_me:11285: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11286 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11287                 fi
11288         else
11289
11290 echo "$as_me:11290: checking if we should define _XOPEN_SOURCE" >&5
11291 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11292 if test "${cf_cv_xopen_source+set}" = set; then
11293   echo $ECHO_N "(cached) $ECHO_C" >&6
11294 else
11295
11296         cat >"conftest.$ac_ext" <<_ACEOF
11297 #line 11297 "configure"
11298 #include "confdefs.h"
11299
11300 #include <stdlib.h>
11301 #include <string.h>
11302 #include <sys/types.h>
11303
11304 int
11305 main (void)
11306 {
11307
11308 #ifndef _XOPEN_SOURCE
11309 make an error
11310 #endif
11311   ;
11312   return 0;
11313 }
11314 _ACEOF
11315 rm -f "conftest.$ac_objext"
11316 if { (eval echo "$as_me:11316: \"$ac_compile\"") >&5
11317   (eval $ac_compile) 2>&5
11318   ac_status=$?
11319   echo "$as_me:11319: \$? = $ac_status" >&5
11320   (exit "$ac_status"); } &&
11321          { ac_try='test -s "conftest.$ac_objext"'
11322   { (eval echo "$as_me:11322: \"$ac_try\"") >&5
11323   (eval $ac_try) 2>&5
11324   ac_status=$?
11325   echo "$as_me:11325: \$? = $ac_status" >&5
11326   (exit "$ac_status"); }; }; then
11327   cf_cv_xopen_source=no
11328 else
11329   echo "$as_me: failed program was:" >&5
11330 cat "conftest.$ac_ext" >&5
11331 cf_save="$CPPFLAGS"
11332
11333         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11334         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11335
11336          cat >"conftest.$ac_ext" <<_ACEOF
11337 #line 11337 "configure"
11338 #include "confdefs.h"
11339
11340 #include <stdlib.h>
11341 #include <string.h>
11342 #include <sys/types.h>
11343
11344 int
11345 main (void)
11346 {
11347
11348 #ifdef _XOPEN_SOURCE
11349 make an error
11350 #endif
11351   ;
11352   return 0;
11353 }
11354 _ACEOF
11355 rm -f "conftest.$ac_objext"
11356 if { (eval echo "$as_me:11356: \"$ac_compile\"") >&5
11357   (eval $ac_compile) 2>&5
11358   ac_status=$?
11359   echo "$as_me:11359: \$? = $ac_status" >&5
11360   (exit "$ac_status"); } &&
11361          { ac_try='test -s "conftest.$ac_objext"'
11362   { (eval echo "$as_me:11362: \"$ac_try\"") >&5
11363   (eval $ac_try) 2>&5
11364   ac_status=$?
11365   echo "$as_me:11365: \$? = $ac_status" >&5
11366   (exit "$ac_status"); }; }; then
11367   cf_cv_xopen_source=no
11368 else
11369   echo "$as_me: failed program was:" >&5
11370 cat "conftest.$ac_ext" >&5
11371 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11372 fi
11373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11374         CPPFLAGS="$cf_save"
11375
11376 fi
11377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11378
11379 fi
11380 echo "$as_me:11380: result: $cf_cv_xopen_source" >&5
11381 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11382
11383 if test "$cf_cv_xopen_source" != no ; then
11384
11385 CFLAGS=`echo "$CFLAGS" | \
11386         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11387                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11388
11389 CPPFLAGS=`echo "$CPPFLAGS" | \
11390         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11391                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11392
11393         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11394
11395 cf_fix_cppflags=no
11396 cf_new_cflags=
11397 cf_new_cppflags=
11398 cf_new_extra_cppflags=
11399
11400 for cf_add_cflags in $cf_temp_xopen_source
11401 do
11402 case "$cf_fix_cppflags" in
11403 (no)
11404         case "$cf_add_cflags" in
11405         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11406                 case "$cf_add_cflags" in
11407                 (-D*)
11408                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11409
11410                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11411                                 && test -z "${cf_tst_cflags}" \
11412                                 && cf_fix_cppflags=yes
11413
11414                         if test "$cf_fix_cppflags" = yes ; then
11415
11416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11418
11419                                 continue
11420                         elif test "${cf_tst_cflags}" = "\"'" ; then
11421
11422         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11423         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11424
11425                                 continue
11426                         fi
11427                         ;;
11428                 esac
11429                 case "$CPPFLAGS" in
11430                 (*$cf_add_cflags)
11431                         ;;
11432                 (*)
11433                         case "$cf_add_cflags" in
11434                         (-D*)
11435                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11436
11437 CPPFLAGS=`echo "$CPPFLAGS" | \
11438         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11439                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11440
11441                                 ;;
11442                         esac
11443
11444         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11445         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11446
11447                         ;;
11448                 esac
11449                 ;;
11450         (*)
11451
11452         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11453         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11454
11455                 ;;
11456         esac
11457         ;;
11458 (yes)
11459
11460         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11461         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11462
11463         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11464
11465         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11466                 && test -z "${cf_tst_cflags}" \
11467                 && cf_fix_cppflags=no
11468         ;;
11469 esac
11470 done
11471
11472 if test -n "$cf_new_cflags" ; then
11473
11474         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11475         CFLAGS="${CFLAGS}$cf_new_cflags"
11476
11477 fi
11478
11479 if test -n "$cf_new_cppflags" ; then
11480
11481         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11482         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11483
11484 fi
11485
11486 if test -n "$cf_new_extra_cppflags" ; then
11487
11488         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11489         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11490
11491 fi
11492
11493 fi
11494
11495         fi
11496 fi
11497 fi # cf_cv_posix_visible
11498
11499 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11500
11501 # Work around breakage on OS X
11502
11503 echo "$as_me:11503: checking if SIGWINCH is defined" >&5
11504 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11505 if test "${cf_cv_define_sigwinch+set}" = set; then
11506   echo $ECHO_N "(cached) $ECHO_C" >&6
11507 else
11508
11509         cat >"conftest.$ac_ext" <<_ACEOF
11510 #line 11510 "configure"
11511 #include "confdefs.h"
11512
11513 #include <sys/types.h>
11514 #include <sys/signal.h>
11515
11516 int
11517 main (void)
11518 {
11519 int x = SIGWINCH; (void)x
11520   ;
11521   return 0;
11522 }
11523 _ACEOF
11524 rm -f "conftest.$ac_objext"
11525 if { (eval echo "$as_me:11525: \"$ac_compile\"") >&5
11526   (eval $ac_compile) 2>&5
11527   ac_status=$?
11528   echo "$as_me:11528: \$? = $ac_status" >&5
11529   (exit "$ac_status"); } &&
11530          { ac_try='test -s "conftest.$ac_objext"'
11531   { (eval echo "$as_me:11531: \"$ac_try\"") >&5
11532   (eval $ac_try) 2>&5
11533   ac_status=$?
11534   echo "$as_me:11534: \$? = $ac_status" >&5
11535   (exit "$ac_status"); }; }; then
11536   cf_cv_define_sigwinch=yes
11537 else
11538   echo "$as_me: failed program was:" >&5
11539 cat "conftest.$ac_ext" >&5
11540 cat >"conftest.$ac_ext" <<_ACEOF
11541 #line 11541 "configure"
11542 #include "confdefs.h"
11543
11544 #undef _XOPEN_SOURCE
11545 #undef _POSIX_SOURCE
11546 #undef _POSIX_C_SOURCE
11547 #include <sys/types.h>
11548 #include <sys/signal.h>
11549
11550 int
11551 main (void)
11552 {
11553 int x = SIGWINCH; (void)x
11554   ;
11555   return 0;
11556 }
11557 _ACEOF
11558 rm -f "conftest.$ac_objext"
11559 if { (eval echo "$as_me:11559: \"$ac_compile\"") >&5
11560   (eval $ac_compile) 2>&5
11561   ac_status=$?
11562   echo "$as_me:11562: \$? = $ac_status" >&5
11563   (exit "$ac_status"); } &&
11564          { ac_try='test -s "conftest.$ac_objext"'
11565   { (eval echo "$as_me:11565: \"$ac_try\"") >&5
11566   (eval $ac_try) 2>&5
11567   ac_status=$?
11568   echo "$as_me:11568: \$? = $ac_status" >&5
11569   (exit "$ac_status"); }; }; then
11570   cf_cv_define_sigwinch=maybe
11571 else
11572   echo "$as_me: failed program was:" >&5
11573 cat "conftest.$ac_ext" >&5
11574 cf_cv_define_sigwinch=no
11575 fi
11576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11577
11578 fi
11579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11580
11581 fi
11582 echo "$as_me:11582: result: $cf_cv_define_sigwinch" >&5
11583 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11584
11585 if test "$cf_cv_define_sigwinch" = maybe ; then
11586 echo "$as_me:11586: checking for actual SIGWINCH definition" >&5
11587 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11588 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11589   echo $ECHO_N "(cached) $ECHO_C" >&6
11590 else
11591
11592 cf_cv_fixup_sigwinch=unknown
11593 cf_sigwinch=32
11594 while test "$cf_sigwinch" != 1
11595 do
11596         cat >"conftest.$ac_ext" <<_ACEOF
11597 #line 11597 "configure"
11598 #include "confdefs.h"
11599
11600 #undef _XOPEN_SOURCE
11601 #undef _POSIX_SOURCE
11602 #undef _POSIX_C_SOURCE
11603 #include <sys/types.h>
11604 #include <sys/signal.h>
11605
11606 int
11607 main (void)
11608 {
11609
11610 #if SIGWINCH != $cf_sigwinch
11611 make an error
11612 #endif
11613 int x = SIGWINCH; (void)x
11614   ;
11615   return 0;
11616 }
11617 _ACEOF
11618 rm -f "conftest.$ac_objext"
11619 if { (eval echo "$as_me:11619: \"$ac_compile\"") >&5
11620   (eval $ac_compile) 2>&5
11621   ac_status=$?
11622   echo "$as_me:11622: \$? = $ac_status" >&5
11623   (exit "$ac_status"); } &&
11624          { ac_try='test -s "conftest.$ac_objext"'
11625   { (eval echo "$as_me:11625: \"$ac_try\"") >&5
11626   (eval $ac_try) 2>&5
11627   ac_status=$?
11628   echo "$as_me:11628: \$? = $ac_status" >&5
11629   (exit "$ac_status"); }; }; then
11630   cf_cv_fixup_sigwinch=$cf_sigwinch
11631          break
11632 else
11633   echo "$as_me: failed program was:" >&5
11634 cat "conftest.$ac_ext" >&5
11635 fi
11636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11637
11638 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11639 done
11640
11641 fi
11642 echo "$as_me:11642: result: $cf_cv_fixup_sigwinch" >&5
11643 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11644
11645         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11646                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11647         fi
11648 fi
11649
11650 # Checks for CODESET support.
11651
11652 echo "$as_me:11652: checking for nl_langinfo and CODESET" >&5
11653 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11654 if test "${am_cv_langinfo_codeset+set}" = set; then
11655   echo $ECHO_N "(cached) $ECHO_C" >&6
11656 else
11657   cat >"conftest.$ac_ext" <<_ACEOF
11658 #line 11658 "configure"
11659 #include "confdefs.h"
11660 #include <langinfo.h>
11661 int
11662 main (void)
11663 {
11664 char* cs = nl_langinfo(CODESET); (void)cs
11665   ;
11666   return 0;
11667 }
11668 _ACEOF
11669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11670 if { (eval echo "$as_me:11670: \"$ac_link\"") >&5
11671   (eval $ac_link) 2>&5
11672   ac_status=$?
11673   echo "$as_me:11673: \$? = $ac_status" >&5
11674   (exit "$ac_status"); } &&
11675          { ac_try='test -s "conftest$ac_exeext"'
11676   { (eval echo "$as_me:11676: \"$ac_try\"") >&5
11677   (eval $ac_try) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit "$ac_status"); }; }; then
11681   am_cv_langinfo_codeset=yes
11682 else
11683   echo "$as_me: failed program was:" >&5
11684 cat "conftest.$ac_ext" >&5
11685 am_cv_langinfo_codeset=no
11686 fi
11687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11688
11689 fi
11690 echo "$as_me:11690: result: $am_cv_langinfo_codeset" >&5
11691 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11692         if test "$am_cv_langinfo_codeset" = yes; then
11693
11694 cat >>confdefs.h <<\EOF
11695 #define HAVE_LANGINFO_CODESET 1
11696 EOF
11697
11698         fi
11699
11700 # use these variables to work around a defect in gcc's fixincludes.
11701 NCURSES_OK_WCHAR_T=
11702 NCURSES_OK_WINT_T=
11703
11704 echo "$as_me:11704: checking if you want wide-character code" >&5
11705 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11706
11707 # Check whether --enable-widec or --disable-widec was given.
11708 if test "${enable_widec+set}" = set; then
11709   enableval="$enable_widec"
11710   with_widec=$enableval
11711 else
11712   with_widec=no
11713 fi;
11714 echo "$as_me:11714: result: $with_widec" >&5
11715 echo "${ECHO_T}$with_widec" >&6
11716
11717 NCURSES_WCWIDTH_GRAPHICS=1
11718
11719 if test "x$with_widec" = xyes ; then
11720         if test "x$disable_lib_suffixes" = xno ; then
11721                 LIB_SUFFIX="w${LIB_SUFFIX}"
11722         fi
11723
11724 cat >>confdefs.h <<\EOF
11725 #define USE_WIDEC_SUPPORT 1
11726 EOF
11727
11728 cat >>confdefs.h <<\EOF
11729 #define NCURSES_WIDECHAR 1
11730 EOF
11731
11732 for ac_header in \
11733 wchar.h \
11734 wctype.h \
11735
11736 do
11737 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11738 echo "$as_me:11738: checking for $ac_header" >&5
11739 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11740 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11741   echo $ECHO_N "(cached) $ECHO_C" >&6
11742 else
11743   cat >"conftest.$ac_ext" <<_ACEOF
11744 #line 11744 "configure"
11745 #include "confdefs.h"
11746 #include <$ac_header>
11747 _ACEOF
11748 if { (eval echo "$as_me:11748: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11749   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11750   ac_status=$?
11751   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11752   rm -f conftest.er1
11753   cat conftest.err >&5
11754   echo "$as_me:11754: \$? = $ac_status" >&5
11755   (exit "$ac_status"); } >/dev/null; then
11756   if test -s conftest.err; then
11757     ac_cpp_err=$ac_c_preproc_warn_flag
11758   else
11759     ac_cpp_err=
11760   fi
11761 else
11762   ac_cpp_err=yes
11763 fi
11764 if test -z "$ac_cpp_err"; then
11765   eval "$as_ac_Header=yes"
11766 else
11767   echo "$as_me: failed program was:" >&5
11768   cat "conftest.$ac_ext" >&5
11769   eval "$as_ac_Header=no"
11770 fi
11771 rm -f conftest.err "conftest.$ac_ext"
11772 fi
11773 echo "$as_me:11773: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11774 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11775 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11776   cat >>confdefs.h <<EOF
11777 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11778 EOF
11779
11780 fi
11781 done
11782
11783 echo "$as_me:11783: checking if wchar.h can be used as is" >&5
11784 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11785 if test "${cf_cv_wchar_h_okay+set}" = set; then
11786   echo $ECHO_N "(cached) $ECHO_C" >&6
11787 else
11788
11789 cat >"conftest.$ac_ext" <<_ACEOF
11790 #line 11790 "configure"
11791 #include "confdefs.h"
11792
11793 #include <stdlib.h>
11794 #ifdef HAVE_WCHAR_H
11795 #include <wchar.h>
11796 #endif
11797 #ifdef HAVE_WCTYPE_H
11798 #include <wctype.h>
11799 #endif
11800
11801 int
11802 main (void)
11803 {
11804
11805         wint_t foo = 0;
11806         int bar = iswpunct(foo)
11807   ;
11808   return 0;
11809 }
11810 _ACEOF
11811 rm -f "conftest.$ac_objext"
11812 if { (eval echo "$as_me:11812: \"$ac_compile\"") >&5
11813   (eval $ac_compile) 2>&5
11814   ac_status=$?
11815   echo "$as_me:11815: \$? = $ac_status" >&5
11816   (exit "$ac_status"); } &&
11817          { ac_try='test -s "conftest.$ac_objext"'
11818   { (eval echo "$as_me:11818: \"$ac_try\"") >&5
11819   (eval $ac_try) 2>&5
11820   ac_status=$?
11821   echo "$as_me:11821: \$? = $ac_status" >&5
11822   (exit "$ac_status"); }; }; then
11823   cf_cv_wchar_h_okay=yes
11824 else
11825   echo "$as_me: failed program was:" >&5
11826 cat "conftest.$ac_ext" >&5
11827 cf_cv_wchar_h_okay=no
11828 fi
11829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11830 fi
11831 echo "$as_me:11831: result: $cf_cv_wchar_h_okay" >&5
11832 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11833
11834 if test "$cf_cv_wchar_h_okay" = no
11835 then
11836
11837 echo "$as_me:11837: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11838 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11839 cat >"conftest.$ac_ext" <<_ACEOF
11840 #line 11840 "configure"
11841 #include "confdefs.h"
11842 #include <sys/types.h>
11843
11844 int
11845 main (void)
11846 {
11847
11848 #ifndef _XOPEN_SOURCE_EXTENDED
11849 make an error
11850 #endif
11851   ;
11852   return 0;
11853 }
11854 _ACEOF
11855 rm -f "conftest.$ac_objext"
11856 if { (eval echo "$as_me:11856: \"$ac_compile\"") >&5
11857   (eval $ac_compile) 2>&5
11858   ac_status=$?
11859   echo "$as_me:11859: \$? = $ac_status" >&5
11860   (exit "$ac_status"); } &&
11861          { ac_try='test -s "conftest.$ac_objext"'
11862   { (eval echo "$as_me:11862: \"$ac_try\"") >&5
11863   (eval $ac_try) 2>&5
11864   ac_status=$?
11865   echo "$as_me:11865: \$? = $ac_status" >&5
11866   (exit "$ac_status"); }; }; then
11867   cf_result=no
11868 else
11869   echo "$as_me: failed program was:" >&5
11870 cat "conftest.$ac_ext" >&5
11871 cf_result=yes
11872 fi
11873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11874 echo "$as_me:11874: result: $cf_result" >&5
11875 echo "${ECHO_T}$cf_result" >&6
11876
11877 if test "$cf_result" = yes ; then
11878         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11879 elif test "x" != "x" ; then
11880         echo "$as_me:11880: checking checking for compatible value versus " >&5
11881 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11882         cat >"conftest.$ac_ext" <<_ACEOF
11883 #line 11883 "configure"
11884 #include "confdefs.h"
11885 #include <sys/types.h>
11886
11887 int
11888 main (void)
11889 {
11890
11891 #if _XOPEN_SOURCE_EXTENDED- < 0
11892 make an error
11893 #endif
11894   ;
11895   return 0;
11896 }
11897 _ACEOF
11898 rm -f "conftest.$ac_objext"
11899 if { (eval echo "$as_me:11899: \"$ac_compile\"") >&5
11900   (eval $ac_compile) 2>&5
11901   ac_status=$?
11902   echo "$as_me:11902: \$? = $ac_status" >&5
11903   (exit "$ac_status"); } &&
11904          { ac_try='test -s "conftest.$ac_objext"'
11905   { (eval echo "$as_me:11905: \"$ac_try\"") >&5
11906   (eval $ac_try) 2>&5
11907   ac_status=$?
11908   echo "$as_me:11908: \$? = $ac_status" >&5
11909   (exit "$ac_status"); }; }; then
11910   cf_result=yes
11911 else
11912   echo "$as_me: failed program was:" >&5
11913 cat "conftest.$ac_ext" >&5
11914 cf_result=no
11915 fi
11916 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11917         echo "$as_me:11917: result: $cf_result" >&5
11918 echo "${ECHO_T}$cf_result" >&6
11919         if test "$cf_result" = no ; then
11920                 # perhaps we can override it - try...
11921                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11922         fi
11923 fi
11924
11925 fi
11926
11927 echo "$as_me:11927: checking if wcwidth agrees graphics are single-width" >&5
11928 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11929 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11930   echo $ECHO_N "(cached) $ECHO_C" >&6
11931 else
11932
11933 cat >conftest.in <<CF_EOF
11934 -       VT100 symbols
11935 0x250c  upper left corner
11936 0x2514  lower left corner
11937 0x2510  upper right corner
11938 0x2518  lower right corner
11939 0x251c  tee pointing left
11940 0x2524  tee pointing right
11941 0x2534  tee pointing up
11942 0x252c  tee pointing down
11943 0x2500  horizontal line
11944 0x2502  vertical line
11945 0x253c  large plus or crossover
11946 0x23ba  scan line 1
11947 0x23bd  scan line 9
11948 0x25c6  diamond
11949 0x2592  checker board (stipple)
11950 0x00b0  degree symbol
11951 0x00b1  plus/minus
11952 0x00b7  bullet
11953 -       Teletype 5410v1 symbols
11954 0x2190  arrow pointing left
11955 0x2192  arrow pointing right
11956 0x2193  arrow pointing down
11957 0x2191  arrow pointing up
11958 0x2592  board of squares
11959 0x2603  lantern symbol
11960 0x25ae  solid square block
11961 -       these defaults were invented for ncurses
11962 0x23bb  scan line 3
11963 0x23bc  scan line 7
11964 0x2264  less-than-or-equal-to
11965 0x2265  greater-than-or-equal-to
11966 0x03c0  greek pi
11967 0x2260  not-equal
11968 0x00a3  pound-sterling symbol
11969 -       thick-line-drawing
11970 0x250f  upper left corner
11971 0x2517  lower left corner
11972 0x2513  upper right corner
11973 0x251b  lower right corner
11974 0x2523  tee pointing left
11975 0x252b  tee pointing right
11976 0x253b  tee pointing up
11977 0x2533  tee pointing down
11978 0x2501  horizontal line
11979 0x2503  vertical line
11980 0x254b  large plus or crossover
11981 -       double-line-drawing
11982 0x2554  upper left corner
11983 0x255a  lower left corner
11984 0x2557  upper right corner
11985 0x255d  lower right corner
11986 0x2563  tee pointing left
11987 0x2560  tee pointing right
11988 0x2569  tee pointing up
11989 0x2566  tee pointing down
11990 0x2550  horizontal line
11991 0x2551  vertical line
11992 0x256c  large plus or crossover
11993 CF_EOF
11994 if test "$cross_compiling" = yes; then
11995   cf_cv_wcwidth_graphics=unknown
11996 else
11997   cat >"conftest.$ac_ext" <<_ACEOF
11998 #line 11998 "configure"
11999 #include "confdefs.h"
12000
12001 #include <locale.h>
12002 #include <stdio.h>
12003 #include <wchar.h>
12004
12005 #define MY_LEN 80
12006
12007 int
12008 main(void)
12009 {
12010         FILE *fp;
12011         int value;
12012         char buffer[MY_LEN + 1];
12013         char notes[MY_LEN + 1];
12014         int totals = 0;
12015         int passed = 0;
12016
12017         if (setlocale(LC_ALL, "en_US.UTF8") ||
12018                 setlocale(LC_ALL, "en_US.UTF-8") ||
12019                 setlocale(LC_ALL, "en_US.utf8") ||
12020                 setlocale(LC_ALL, "en_US.utf-8")) {
12021                 if ((fp = fopen("conftest.in", "r")) != 0) {
12022                         while (fgets(buffer, MY_LEN, fp) != 0) {
12023                                 if (*buffer == '-') {
12024                                         fprintf(stderr, "\\t%s", buffer);
12025                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12026                                         ++totals;
12027                                         if (wcwidth(value) == 1)
12028                                                 ++passed;
12029                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12030                                 } else {
12031                                         fprintf(stderr, "?\\t%s", buffer);
12032                                 }
12033                         }
12034                 }
12035         }
12036         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12037         return (totals == passed) ? 0 : 1;
12038 }
12039
12040 _ACEOF
12041 rm -f "conftest$ac_exeext"
12042 if { (eval echo "$as_me:12042: \"$ac_link\"") >&5
12043   (eval $ac_link) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12047   { (eval echo "$as_me:12047: \"$ac_try\"") >&5
12048   (eval $ac_try) 2>&5
12049   ac_status=$?
12050   echo "$as_me:12050: \$? = $ac_status" >&5
12051   (exit "$ac_status"); }; }; then
12052   cf_cv_wcwidth_graphics=yes
12053 else
12054   echo "$as_me: program exited with status $ac_status" >&5
12055 echo "$as_me: failed program was:" >&5
12056 cat "conftest.$ac_ext" >&5
12057 cf_cv_wcwidth_graphics=no
12058 fi
12059 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12060 fi
12061
12062 fi
12063 echo "$as_me:12063: result: $cf_cv_wcwidth_graphics" >&5
12064 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12065
12066         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12067
12068         # with_overwrite=no
12069         NCURSES_CH_T=cchar_t
12070
12071 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12072 do
12073 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12074 echo "$as_me:12074: checking for $ac_func" >&5
12075 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12076 if eval "test \"\${$as_ac_var+set}\" = set"; then
12077   echo $ECHO_N "(cached) $ECHO_C" >&6
12078 else
12079   cat >"conftest.$ac_ext" <<_ACEOF
12080 #line 12080 "configure"
12081 #include "confdefs.h"
12082 #define $ac_func autoconf_temporary
12083 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12084 #undef $ac_func
12085
12086 #ifdef __cplusplus
12087 extern "C"
12088 #endif
12089
12090 /* We use char because int might match the return type of a gcc2
12091    builtin and then its argument prototype would still apply.  */
12092 char $ac_func (void);
12093
12094 int
12095 main (void)
12096 {
12097
12098 /* The GNU C library defines stubs for functions which it implements
12099     to always fail with ENOSYS.  Some functions are actually named
12100     something starting with __ and the normal name is an alias.  */
12101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12102 #error found stub for $ac_func
12103 #endif
12104
12105         return $ac_func ();
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12111 if { (eval echo "$as_me:12111: \"$ac_link\"") >&5
12112   (eval $ac_link) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit "$ac_status"); } &&
12116          { ac_try='test -s "conftest$ac_exeext"'
12117   { (eval echo "$as_me:12117: \"$ac_try\"") >&5
12118   (eval $ac_try) 2>&5
12119   ac_status=$?
12120   echo "$as_me:12120: \$? = $ac_status" >&5
12121   (exit "$ac_status"); }; }; then
12122   eval "$as_ac_var=yes"
12123 else
12124   echo "$as_me: failed program was:" >&5
12125 cat "conftest.$ac_ext" >&5
12126 eval "$as_ac_var=no"
12127 fi
12128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12129 fi
12130 echo "$as_me:12130: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12131 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12132 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12133   cat >>confdefs.h <<EOF
12134 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12135 EOF
12136
12137 fi
12138 done
12139
12140         if test "x$ac_cv_func_putwc" != xyes ; then
12141
12142 echo "$as_me:12142: checking for multibyte character support" >&5
12143 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12144 if test "${cf_cv_utf8_lib+set}" = set; then
12145   echo $ECHO_N "(cached) $ECHO_C" >&6
12146 else
12147
12148         cf_save_LIBS="$LIBS"
12149         cat >"conftest.$ac_ext" <<_ACEOF
12150 #line 12150 "configure"
12151 #include "confdefs.h"
12152
12153 #include <stdlib.h>
12154 int
12155 main (void)
12156 {
12157 putwc(0,0);
12158   ;
12159   return 0;
12160 }
12161 _ACEOF
12162 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12163 if { (eval echo "$as_me:12163: \"$ac_link\"") >&5
12164   (eval $ac_link) 2>&5
12165   ac_status=$?
12166   echo "$as_me:12166: \$? = $ac_status" >&5
12167   (exit "$ac_status"); } &&
12168          { ac_try='test -s "conftest$ac_exeext"'
12169   { (eval echo "$as_me:12169: \"$ac_try\"") >&5
12170   (eval $ac_try) 2>&5
12171   ac_status=$?
12172   echo "$as_me:12172: \$? = $ac_status" >&5
12173   (exit "$ac_status"); }; }; then
12174   cf_cv_utf8_lib=yes
12175 else
12176   echo "$as_me: failed program was:" >&5
12177 cat "conftest.$ac_ext" >&5
12178
12179 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12180 # will be set on completion of the AC_TRY_LINK below.
12181 cf_cv_header_path_utf8=
12182 cf_cv_library_path_utf8=
12183
12184 echo "${as_me:-configure}:12184: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12185
12186 cf_save_LIBS="$LIBS"
12187
12188 cat >"conftest.$ac_ext" <<_ACEOF
12189 #line 12189 "configure"
12190 #include "confdefs.h"
12191
12192 #include <libutf8.h>
12193 int
12194 main (void)
12195 {
12196 putwc(0,0);
12197   ;
12198   return 0;
12199 }
12200 _ACEOF
12201 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12202 if { (eval echo "$as_me:12202: \"$ac_link\"") >&5
12203   (eval $ac_link) 2>&5
12204   ac_status=$?
12205   echo "$as_me:12205: \$? = $ac_status" >&5
12206   (exit "$ac_status"); } &&
12207          { ac_try='test -s "conftest$ac_exeext"'
12208   { (eval echo "$as_me:12208: \"$ac_try\"") >&5
12209   (eval $ac_try) 2>&5
12210   ac_status=$?
12211   echo "$as_me:12211: \$? = $ac_status" >&5
12212   (exit "$ac_status"); }; }; then
12213
12214         cf_cv_find_linkage_utf8=yes
12215         cf_cv_header_path_utf8=/usr/include
12216         cf_cv_library_path_utf8=/usr/lib
12217
12218 else
12219   echo "$as_me: failed program was:" >&5
12220 cat "conftest.$ac_ext" >&5
12221
12222 LIBS="-lutf8  $cf_save_LIBS"
12223
12224 cat >"conftest.$ac_ext" <<_ACEOF
12225 #line 12225 "configure"
12226 #include "confdefs.h"
12227
12228 #include <libutf8.h>
12229 int
12230 main (void)
12231 {
12232 putwc(0,0);
12233   ;
12234   return 0;
12235 }
12236 _ACEOF
12237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12238 if { (eval echo "$as_me:12238: \"$ac_link\"") >&5
12239   (eval $ac_link) 2>&5
12240   ac_status=$?
12241   echo "$as_me:12241: \$? = $ac_status" >&5
12242   (exit "$ac_status"); } &&
12243          { ac_try='test -s "conftest$ac_exeext"'
12244   { (eval echo "$as_me:12244: \"$ac_try\"") >&5
12245   (eval $ac_try) 2>&5
12246   ac_status=$?
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit "$ac_status"); }; }; then
12249
12250         cf_cv_find_linkage_utf8=yes
12251         cf_cv_header_path_utf8=/usr/include
12252         cf_cv_library_path_utf8=/usr/lib
12253         cf_cv_library_file_utf8="-lutf8"
12254
12255 else
12256   echo "$as_me: failed program was:" >&5
12257 cat "conftest.$ac_ext" >&5
12258
12259         cf_cv_find_linkage_utf8=no
12260         LIBS="$cf_save_LIBS"
12261
12262         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12263
12264 echo "${as_me:-configure}:12264: testing find linkage for utf8 library ..." 1>&5
12265
12266 echo "${as_me:-configure}:12266: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12267
12268         cf_save_CPPFLAGS="$CPPFLAGS"
12269         cf_test_CPPFLAGS="$CPPFLAGS"
12270
12271 cf_search=
12272
12273 # collect the current set of include-directories from compiler flags
12274 cf_header_path_list=""
12275 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12276         for cf_header_path in $CPPFLAGS $CFLAGS
12277         do
12278                 case "$cf_header_path" in
12279                 (-I*)
12280                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12281
12282 test "x$cf_header_path" != "xNONE" && \
12283 test -d "$cf_header_path" && \
12284  {
12285         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12286         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12287         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12288         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12289         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12290         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12291 }
12292
12293                         cf_header_path_list="$cf_header_path_list $cf_search"
12294                         ;;
12295                 esac
12296         done
12297 fi
12298
12299 # add the variations for the package we are looking for
12300
12301 cf_search=
12302
12303 test "x$prefix" != "xNONE" && \
12304 test -d "$prefix" && \
12305  {
12306         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12307         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12308         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12309         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12310         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12311         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12312 }
12313
12314 for cf_subdir_prefix in \
12315         /usr \
12316         /usr/local \
12317         /usr/pkg \
12318         /opt \
12319         /opt/local \
12320         $HOME
12321 do
12322
12323 test "x$cf_subdir_prefix" != "x$prefix" && \
12324 test -d "$cf_subdir_prefix" && \
12325 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12326         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12327         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12328         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12329         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12330         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12331         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12332 }
12333
12334 done
12335
12336 test "$includedir" != NONE && \
12337 test "$includedir" != "/usr/include" && \
12338 test -d "$includedir" && {
12339         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12340         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12341 }
12342
12343 test "$oldincludedir" != NONE && \
12344 test "$oldincludedir" != "/usr/include" && \
12345 test -d "$oldincludedir" && {
12346         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12347         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12348 }
12349
12350 cf_search="$cf_search $cf_header_path_list"
12351
12352         for cf_cv_header_path_utf8 in $cf_search
12353         do
12354                 if test -d "$cf_cv_header_path_utf8" ; then
12355                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12356
12357 echo "${as_me:-configure}:12357: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12358
12359                         CPPFLAGS="$cf_save_CPPFLAGS"
12360
12361         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12362         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12363
12364                         cat >"conftest.$ac_ext" <<_ACEOF
12365 #line 12365 "configure"
12366 #include "confdefs.h"
12367
12368 #include <libutf8.h>
12369 int
12370 main (void)
12371 {
12372 putwc(0,0);
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 rm -f "conftest.$ac_objext"
12378 if { (eval echo "$as_me:12378: \"$ac_compile\"") >&5
12379   (eval $ac_compile) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit "$ac_status"); } &&
12383          { ac_try='test -s "conftest.$ac_objext"'
12384   { (eval echo "$as_me:12384: \"$ac_try\"") >&5
12385   (eval $ac_try) 2>&5
12386   ac_status=$?
12387   echo "$as_me:12387: \$? = $ac_status" >&5
12388   (exit "$ac_status"); }; }; then
12389
12390                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12391
12392 echo "${as_me:-configure}:12392: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12393
12394                                 cf_cv_find_linkage_utf8=maybe
12395                                 cf_test_CPPFLAGS="$CPPFLAGS"
12396                                 break
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat "conftest.$ac_ext" >&5
12400
12401                                 CPPFLAGS="$cf_save_CPPFLAGS"
12402
12403 fi
12404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12405                 fi
12406         done
12407
12408         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12409
12410 echo "${as_me:-configure}:12410: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12411
12412                 cf_save_LIBS="$LIBS"
12413                 cf_save_LDFLAGS="$LDFLAGS"
12414
12415                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12416
12417 cf_search=
12418 cf_library_path_list=""
12419 if test -n "${LDFLAGS}${LIBS}" ; then
12420         for cf_library_path in $LDFLAGS $LIBS
12421         do
12422                 case "$cf_library_path" in
12423                 (-L*)
12424                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12425
12426 test "x$cf_library_path" != "xNONE" && \
12427 test -d "$cf_library_path" && \
12428  {
12429         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12430         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12431         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12432         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12433         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12434         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12435 }
12436
12437                         cf_library_path_list="$cf_library_path_list $cf_search"
12438                         ;;
12439                 esac
12440         done
12441 fi
12442
12443 cf_search=
12444
12445 test "x$prefix" != "xNONE" && \
12446 test -d "$prefix" && \
12447  {
12448         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12449         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12450         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12451         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12452         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12453         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12454 }
12455
12456 for cf_subdir_prefix in \
12457         /usr \
12458         /usr/local \
12459         /usr/pkg \
12460         /opt \
12461         /opt/local \
12462         $HOME
12463 do
12464
12465 test "x$cf_subdir_prefix" != "x$prefix" && \
12466 test -d "$cf_subdir_prefix" && \
12467 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12468         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12469         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12470         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12471         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12472         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12473         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12474 }
12475
12476 done
12477
12478 cf_search="$cf_library_path_list $cf_search"
12479
12480                         for cf_cv_library_path_utf8 in $cf_search
12481                         do
12482                                 if test -d "$cf_cv_library_path_utf8" ; then
12483                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12484
12485 echo "${as_me:-configure}:12485: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12486
12487                                         CPPFLAGS="$cf_test_CPPFLAGS"
12488                                         LIBS="-lutf8  $cf_save_LIBS"
12489                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12490                                         cat >"conftest.$ac_ext" <<_ACEOF
12491 #line 12491 "configure"
12492 #include "confdefs.h"
12493
12494 #include <libutf8.h>
12495 int
12496 main (void)
12497 {
12498 putwc(0,0);
12499   ;
12500   return 0;
12501 }
12502 _ACEOF
12503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12504 if { (eval echo "$as_me:12504: \"$ac_link\"") >&5
12505   (eval $ac_link) 2>&5
12506   ac_status=$?
12507   echo "$as_me:12507: \$? = $ac_status" >&5
12508   (exit "$ac_status"); } &&
12509          { ac_try='test -s "conftest$ac_exeext"'
12510   { (eval echo "$as_me:12510: \"$ac_try\"") >&5
12511   (eval $ac_try) 2>&5
12512   ac_status=$?
12513   echo "$as_me:12513: \$? = $ac_status" >&5
12514   (exit "$ac_status"); }; }; then
12515
12516                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12517
12518 echo "${as_me:-configure}:12518: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12519
12520                                         cf_cv_find_linkage_utf8=yes
12521                                         cf_cv_library_file_utf8="-lutf8"
12522                                         break
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat "conftest.$ac_ext" >&5
12526
12527                                         CPPFLAGS="$cf_save_CPPFLAGS"
12528                                         LIBS="$cf_save_LIBS"
12529                                         LDFLAGS="$cf_save_LDFLAGS"
12530
12531 fi
12532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12533                                 fi
12534                         done
12535                         CPPFLAGS="$cf_save_CPPFLAGS"
12536                         LDFLAGS="$cf_save_LDFLAGS"
12537                 fi
12538
12539         else
12540                 cf_cv_find_linkage_utf8=no
12541         fi
12542
12543 fi
12544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12545
12546 fi
12547 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12548
12549 LIBS="$cf_save_LIBS"
12550
12551 if test "$cf_cv_find_linkage_utf8" = yes ; then
12552 cf_cv_utf8_lib=add-on
12553 else
12554 cf_cv_utf8_lib=no
12555 fi
12556
12557 fi
12558 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12559 fi
12560 echo "$as_me:12560: result: $cf_cv_utf8_lib" >&5
12561 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12562
12563 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12564 # ncurses/ncursesw:
12565 if test "$cf_cv_utf8_lib" = "add-on" ; then
12566
12567 cat >>confdefs.h <<\EOF
12568 #define HAVE_LIBUTF8_H 1
12569 EOF
12570
12571 if test -n "$cf_cv_header_path_utf8" ; then
12572   for cf_add_incdir in $cf_cv_header_path_utf8
12573   do
12574         while test "$cf_add_incdir" != /usr/include
12575         do
12576           if test -d "$cf_add_incdir"
12577           then
12578                 cf_have_incdir=no
12579                 if test -n "$CFLAGS$CPPFLAGS" ; then
12580                   # a loop is needed to ensure we can add subdirs of existing dirs
12581                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12582                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12583                           cf_have_incdir=yes; break
12584                         fi
12585                   done
12586                 fi
12587
12588                 if test "$cf_have_incdir" = no ; then
12589                   if test "$cf_add_incdir" = /usr/local/include ; then
12590                         if test "$GCC" = yes
12591                         then
12592                           cf_save_CPPFLAGS=$CPPFLAGS
12593
12594         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12595         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12596
12597                           cat >"conftest.$ac_ext" <<_ACEOF
12598 #line 12598 "configure"
12599 #include "confdefs.h"
12600 #include <stdio.h>
12601 int
12602 main (void)
12603 {
12604 printf("Hello")
12605   ;
12606   return 0;
12607 }
12608 _ACEOF
12609 rm -f "conftest.$ac_objext"
12610 if { (eval echo "$as_me:12610: \"$ac_compile\"") >&5
12611   (eval $ac_compile) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit "$ac_status"); } &&
12615          { ac_try='test -s "conftest.$ac_objext"'
12616   { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617   (eval $ac_try) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit "$ac_status"); }; }; then
12621   :
12622 else
12623   echo "$as_me: failed program was:" >&5
12624 cat "conftest.$ac_ext" >&5
12625 cf_have_incdir=yes
12626 fi
12627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12628                           CPPFLAGS=$cf_save_CPPFLAGS
12629                         fi
12630                   fi
12631                 fi
12632
12633                 if test "$cf_have_incdir" = no ; then
12634                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12635
12636 echo "${as_me:-configure}:12636: testing adding $cf_add_incdir to include-path ..." 1>&5
12637
12638                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12639
12640                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12641                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12642                   cf_add_incdir="$cf_top_incdir"
12643                 else
12644                   break
12645                 fi
12646           else
12647                 break
12648           fi
12649         done
12650   done
12651 fi
12652
12653 if test -n "$cf_cv_library_path_utf8" ; then
12654         for cf_add_libdir in $cf_cv_library_path_utf8
12655         do
12656                 if test "$cf_add_libdir" = /usr/lib ; then
12657                         :
12658                 elif test -d "$cf_add_libdir"
12659                 then
12660                         cf_have_libdir=no
12661                         if test -n "$LDFLAGS$LIBS" ; then
12662                                 # a loop is needed to ensure we can add subdirs of existing dirs
12663                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12664                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12665                                                 cf_have_libdir=yes; break
12666                                         fi
12667                                 done
12668                         fi
12669                         if test "$cf_have_libdir" = no ; then
12670                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12671
12672 echo "${as_me:-configure}:12672: testing adding $cf_add_libdir to library-path ..." 1>&5
12673
12674                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12675                         fi
12676                 fi
12677         done
12678 fi
12679
12680 cf_add_libs="$LIBS"
12681 # reverse order
12682 cf_add_0lib=
12683 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12684 # filter duplicates
12685 for cf_add_1lib in $cf_add_0lib; do
12686         for cf_add_2lib in $cf_add_libs; do
12687                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12688                         cf_add_1lib=
12689                         break
12690                 fi
12691         done
12692         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12693 done
12694 LIBS="$cf_add_libs"
12695
12696 fi
12697
12698                 if test "$cf_cv_utf8_lib" != no ; then
12699                         NCURSES_LIBUTF8=1
12700                 fi
12701         fi
12702
12703 # This is needed on Tru64 5.0 to declare mbstate_t
12704 echo "$as_me:12704: checking if we must include wchar.h to declare mbstate_t" >&5
12705 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12706 if test "${cf_cv_mbstate_t+set}" = set; then
12707   echo $ECHO_N "(cached) $ECHO_C" >&6
12708 else
12709
12710 cat >"conftest.$ac_ext" <<_ACEOF
12711 #line 12711 "configure"
12712 #include "confdefs.h"
12713
12714 #include <stdlib.h>
12715 #include <stdarg.h>
12716 #include <stdio.h>
12717 #ifdef HAVE_LIBUTF8_H
12718 #include <libutf8.h>
12719 #endif
12720 int
12721 main (void)
12722 {
12723 mbstate_t state
12724   ;
12725   return 0;
12726 }
12727 _ACEOF
12728 rm -f "conftest.$ac_objext"
12729 if { (eval echo "$as_me:12729: \"$ac_compile\"") >&5
12730   (eval $ac_compile) 2>&5
12731   ac_status=$?
12732   echo "$as_me:12732: \$? = $ac_status" >&5
12733   (exit "$ac_status"); } &&
12734          { ac_try='test -s "conftest.$ac_objext"'
12735   { (eval echo "$as_me:12735: \"$ac_try\"") >&5
12736   (eval $ac_try) 2>&5
12737   ac_status=$?
12738   echo "$as_me:12738: \$? = $ac_status" >&5
12739   (exit "$ac_status"); }; }; then
12740   cf_cv_mbstate_t=no
12741 else
12742   echo "$as_me: failed program was:" >&5
12743 cat "conftest.$ac_ext" >&5
12744 cat >"conftest.$ac_ext" <<_ACEOF
12745 #line 12745 "configure"
12746 #include "confdefs.h"
12747
12748 #include <stdlib.h>
12749 #include <stdarg.h>
12750 #include <stdio.h>
12751 #include <wchar.h>
12752 #ifdef HAVE_LIBUTF8_H
12753 #include <libutf8.h>
12754 #endif
12755 int
12756 main (void)
12757 {
12758 mbstate_t value
12759   ;
12760   return 0;
12761 }
12762 _ACEOF
12763 rm -f "conftest.$ac_objext"
12764 if { (eval echo "$as_me:12764: \"$ac_compile\"") >&5
12765   (eval $ac_compile) 2>&5
12766   ac_status=$?
12767   echo "$as_me:12767: \$? = $ac_status" >&5
12768   (exit "$ac_status"); } &&
12769          { ac_try='test -s "conftest.$ac_objext"'
12770   { (eval echo "$as_me:12770: \"$ac_try\"") >&5
12771   (eval $ac_try) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit "$ac_status"); }; }; then
12775   cf_cv_mbstate_t=yes
12776 else
12777   echo "$as_me: failed program was:" >&5
12778 cat "conftest.$ac_ext" >&5
12779 cf_cv_mbstate_t=unknown
12780 fi
12781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12782 fi
12783 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12784 fi
12785 echo "$as_me:12785: result: $cf_cv_mbstate_t" >&5
12786 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12787
12788 if test "$cf_cv_mbstate_t" = yes ; then
12789
12790 cat >>confdefs.h <<\EOF
12791 #define NEED_WCHAR_H 1
12792 EOF
12793
12794         NEED_WCHAR_H=1
12795 fi
12796
12797 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12798 if test "$cf_cv_mbstate_t" = unknown ; then
12799         NCURSES_MBSTATE_T=1
12800 fi
12801
12802 # This is needed on Tru64 5.0 to declare wchar_t
12803 echo "$as_me:12803: checking if we must include wchar.h to declare wchar_t" >&5
12804 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12805 if test "${cf_cv_wchar_t+set}" = set; then
12806   echo $ECHO_N "(cached) $ECHO_C" >&6
12807 else
12808
12809 cat >"conftest.$ac_ext" <<_ACEOF
12810 #line 12810 "configure"
12811 #include "confdefs.h"
12812
12813 #include <stdlib.h>
12814 #include <stdarg.h>
12815 #include <stdio.h>
12816 #ifdef HAVE_LIBUTF8_H
12817 #include <libutf8.h>
12818 #endif
12819 int
12820 main (void)
12821 {
12822 wchar_t state
12823   ;
12824   return 0;
12825 }
12826 _ACEOF
12827 rm -f "conftest.$ac_objext"
12828 if { (eval echo "$as_me:12828: \"$ac_compile\"") >&5
12829   (eval $ac_compile) 2>&5
12830   ac_status=$?
12831   echo "$as_me:12831: \$? = $ac_status" >&5
12832   (exit "$ac_status"); } &&
12833          { ac_try='test -s "conftest.$ac_objext"'
12834   { (eval echo "$as_me:12834: \"$ac_try\"") >&5
12835   (eval $ac_try) 2>&5
12836   ac_status=$?
12837   echo "$as_me:12837: \$? = $ac_status" >&5
12838   (exit "$ac_status"); }; }; then
12839   cf_cv_wchar_t=no
12840 else
12841   echo "$as_me: failed program was:" >&5
12842 cat "conftest.$ac_ext" >&5
12843 cat >"conftest.$ac_ext" <<_ACEOF
12844 #line 12844 "configure"
12845 #include "confdefs.h"
12846
12847 #include <stdlib.h>
12848 #include <stdarg.h>
12849 #include <stdio.h>
12850 #include <wchar.h>
12851 #ifdef HAVE_LIBUTF8_H
12852 #include <libutf8.h>
12853 #endif
12854 int
12855 main (void)
12856 {
12857 wchar_t value
12858   ;
12859   return 0;
12860 }
12861 _ACEOF
12862 rm -f "conftest.$ac_objext"
12863 if { (eval echo "$as_me:12863: \"$ac_compile\"") >&5
12864   (eval $ac_compile) 2>&5
12865   ac_status=$?
12866   echo "$as_me:12866: \$? = $ac_status" >&5
12867   (exit "$ac_status"); } &&
12868          { ac_try='test -s "conftest.$ac_objext"'
12869   { (eval echo "$as_me:12869: \"$ac_try\"") >&5
12870   (eval $ac_try) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit "$ac_status"); }; }; then
12874   cf_cv_wchar_t=yes
12875 else
12876   echo "$as_me: failed program was:" >&5
12877 cat "conftest.$ac_ext" >&5
12878 cf_cv_wchar_t=unknown
12879 fi
12880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12881 fi
12882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12883 fi
12884 echo "$as_me:12884: result: $cf_cv_wchar_t" >&5
12885 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12886
12887 if test "$cf_cv_wchar_t" = yes ; then
12888
12889 cat >>confdefs.h <<\EOF
12890 #define NEED_WCHAR_H 1
12891 EOF
12892
12893         NEED_WCHAR_H=1
12894 fi
12895
12896 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12897 if test "$cf_cv_wchar_t" = unknown ; then
12898         NCURSES_WCHAR_T=1
12899 fi
12900
12901 # if we find wchar_t in either place, use substitution to provide a fallback.
12902 if test "$cf_cv_wchar_t" != unknown ; then
12903         NCURSES_OK_WCHAR_T=1
12904 fi
12905
12906 # This is needed on Tru64 5.0 to declare wint_t
12907 echo "$as_me:12907: checking if we must include wchar.h to declare wint_t" >&5
12908 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12909 if test "${cf_cv_wint_t+set}" = set; then
12910   echo $ECHO_N "(cached) $ECHO_C" >&6
12911 else
12912
12913 cat >"conftest.$ac_ext" <<_ACEOF
12914 #line 12914 "configure"
12915 #include "confdefs.h"
12916
12917 #include <stdlib.h>
12918 #include <stdarg.h>
12919 #include <stdio.h>
12920 #ifdef HAVE_LIBUTF8_H
12921 #include <libutf8.h>
12922 #endif
12923 int
12924 main (void)
12925 {
12926 wint_t state
12927   ;
12928   return 0;
12929 }
12930 _ACEOF
12931 rm -f "conftest.$ac_objext"
12932 if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933   (eval $ac_compile) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit "$ac_status"); } &&
12937          { ac_try='test -s "conftest.$ac_objext"'
12938   { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939   (eval $ac_try) 2>&5
12940   ac_status=$?
12941   echo "$as_me:12941: \$? = $ac_status" >&5
12942   (exit "$ac_status"); }; }; then
12943   cf_cv_wint_t=no
12944 else
12945   echo "$as_me: failed program was:" >&5
12946 cat "conftest.$ac_ext" >&5
12947 cat >"conftest.$ac_ext" <<_ACEOF
12948 #line 12948 "configure"
12949 #include "confdefs.h"
12950
12951 #include <stdlib.h>
12952 #include <stdarg.h>
12953 #include <stdio.h>
12954 #include <wchar.h>
12955 #ifdef HAVE_LIBUTF8_H
12956 #include <libutf8.h>
12957 #endif
12958 int
12959 main (void)
12960 {
12961 wint_t value
12962   ;
12963   return 0;
12964 }
12965 _ACEOF
12966 rm -f "conftest.$ac_objext"
12967 if { (eval echo "$as_me:12967: \"$ac_compile\"") >&5
12968   (eval $ac_compile) 2>&5
12969   ac_status=$?
12970   echo "$as_me:12970: \$? = $ac_status" >&5
12971   (exit "$ac_status"); } &&
12972          { ac_try='test -s "conftest.$ac_objext"'
12973   { (eval echo "$as_me:12973: \"$ac_try\"") >&5
12974   (eval $ac_try) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit "$ac_status"); }; }; then
12978   cf_cv_wint_t=yes
12979 else
12980   echo "$as_me: failed program was:" >&5
12981 cat "conftest.$ac_ext" >&5
12982 cf_cv_wint_t=unknown
12983 fi
12984 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12985 fi
12986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12987 fi
12988 echo "$as_me:12988: result: $cf_cv_wint_t" >&5
12989 echo "${ECHO_T}$cf_cv_wint_t" >&6
12990
12991 if test "$cf_cv_wint_t" = yes ; then
12992
12993 cat >>confdefs.h <<\EOF
12994 #define NEED_WCHAR_H 1
12995 EOF
12996
12997         NEED_WCHAR_H=1
12998 fi
12999
13000 # if we do not find wint_t in either place, use substitution to provide a fallback.
13001 if test "$cf_cv_wint_t" = unknown ; then
13002         NCURSES_WINT_T=1
13003 fi
13004
13005 # if we find wint_t in either place, use substitution to provide a fallback.
13006 if test "$cf_cv_wint_t" != unknown ; then
13007         NCURSES_OK_WINT_T=1
13008 fi
13009
13010         if test "$NCURSES_MBSTATE_T" != 0; then
13011
13012 cat >>confdefs.h <<\EOF
13013 #define NEED_MBSTATE_T_DEF 1
13014 EOF
13015
13016         fi
13017 fi
13018
13019 ###   use option --disable-lp64 to allow long chtype
13020 echo "$as_me:13020: checking whether to enable _LP64 definition in curses.h" >&5
13021 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13022
13023 # Check whether --enable-lp64 or --disable-lp64 was given.
13024 if test "${enable_lp64+set}" = set; then
13025   enableval="$enable_lp64"
13026   with_lp64=$enableval
13027 else
13028   with_lp64=$cf_dft_with_lp64
13029 fi;
13030 echo "$as_me:13030: result: $with_lp64" >&5
13031 echo "${ECHO_T}$with_lp64" >&6
13032
13033 if test "x$with_lp64" = xyes ; then
13034         cf_cv_enable_lp64=1
13035 else
13036         cf_cv_enable_lp64=0
13037 fi
13038
13039 # Check whether --enable-largefile or --disable-largefile was given.
13040 if test "${enable_largefile+set}" = set; then
13041   enableval="$enable_largefile"
13042
13043 fi;
13044 if test "$enable_largefile" != no; then
13045
13046   echo "$as_me:13046: checking for special C compiler options needed for large files" >&5
13047 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13048 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13049   echo $ECHO_N "(cached) $ECHO_C" >&6
13050 else
13051   ac_cv_sys_largefile_CC=no
13052      if test "$GCC" != yes; then
13053        ac_save_CC=$CC
13054        while :; do
13055          # IRIX 6.2 and later do not support large files by default,
13056          # so use the C compiler's -n32 option if that helps.
13057          cat >"conftest.$ac_ext" <<_ACEOF
13058 #line 13058 "configure"
13059 #include "confdefs.h"
13060 #include <sys/types.h>
13061  /* Check that off_t can represent 2**63 - 1 correctly.
13062     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13063     since some C++ compilers masquerading as C compilers
13064     incorrectly reject 9223372036854775807.  */
13065 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13066   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13067                        && LARGE_OFF_T % 2147483647 == 1)
13068                       ? 1 : -1];
13069 int
13070 main (void)
13071 {
13072
13073   ;
13074   return 0;
13075 }
13076 _ACEOF
13077          rm -f "conftest.$ac_objext"
13078 if { (eval echo "$as_me:13078: \"$ac_compile\"") >&5
13079   (eval $ac_compile) 2>&5
13080   ac_status=$?
13081   echo "$as_me:13081: \$? = $ac_status" >&5
13082   (exit "$ac_status"); } &&
13083          { ac_try='test -s "conftest.$ac_objext"'
13084   { (eval echo "$as_me:13084: \"$ac_try\"") >&5
13085   (eval $ac_try) 2>&5
13086   ac_status=$?
13087   echo "$as_me:13087: \$? = $ac_status" >&5
13088   (exit "$ac_status"); }; }; then
13089   break
13090 else
13091   echo "$as_me: failed program was:" >&5
13092 cat "conftest.$ac_ext" >&5
13093 fi
13094 rm -f "conftest.$ac_objext"
13095          CC="$CC -n32"
13096          rm -f "conftest.$ac_objext"
13097 if { (eval echo "$as_me:13097: \"$ac_compile\"") >&5
13098   (eval $ac_compile) 2>&5
13099   ac_status=$?
13100   echo "$as_me:13100: \$? = $ac_status" >&5
13101   (exit "$ac_status"); } &&
13102          { ac_try='test -s "conftest.$ac_objext"'
13103   { (eval echo "$as_me:13103: \"$ac_try\"") >&5
13104   (eval $ac_try) 2>&5
13105   ac_status=$?
13106   echo "$as_me:13106: \$? = $ac_status" >&5
13107   (exit "$ac_status"); }; }; then
13108   ac_cv_sys_largefile_CC=' -n32'; break
13109 else
13110   echo "$as_me: failed program was:" >&5
13111 cat "conftest.$ac_ext" >&5
13112 fi
13113 rm -f "conftest.$ac_objext"
13114          break
13115        done
13116        CC=$ac_save_CC
13117        rm -f "conftest.$ac_ext"
13118     fi
13119 fi
13120 echo "$as_me:13120: result: $ac_cv_sys_largefile_CC" >&5
13121 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13122   if test "$ac_cv_sys_largefile_CC" != no; then
13123     CC=$CC$ac_cv_sys_largefile_CC
13124   fi
13125
13126   echo "$as_me:13126: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13127 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13128 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13129   echo $ECHO_N "(cached) $ECHO_C" >&6
13130 else
13131   while :; do
13132   ac_cv_sys_file_offset_bits=no
13133   cat >"conftest.$ac_ext" <<_ACEOF
13134 #line 13134 "configure"
13135 #include "confdefs.h"
13136 #include <sys/types.h>
13137  /* Check that off_t can represent 2**63 - 1 correctly.
13138     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13139     since some C++ compilers masquerading as C compilers
13140     incorrectly reject 9223372036854775807.  */
13141 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13142   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13143                        && LARGE_OFF_T % 2147483647 == 1)
13144                       ? 1 : -1];
13145 int
13146 main (void)
13147 {
13148
13149   ;
13150   return 0;
13151 }
13152 _ACEOF
13153 rm -f "conftest.$ac_objext"
13154 if { (eval echo "$as_me:13154: \"$ac_compile\"") >&5
13155   (eval $ac_compile) 2>&5
13156   ac_status=$?
13157   echo "$as_me:13157: \$? = $ac_status" >&5
13158   (exit "$ac_status"); } &&
13159          { ac_try='test -s "conftest.$ac_objext"'
13160   { (eval echo "$as_me:13160: \"$ac_try\"") >&5
13161   (eval $ac_try) 2>&5
13162   ac_status=$?
13163   echo "$as_me:13163: \$? = $ac_status" >&5
13164   (exit "$ac_status"); }; }; then
13165   break
13166 else
13167   echo "$as_me: failed program was:" >&5
13168 cat "conftest.$ac_ext" >&5
13169 fi
13170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13171   cat >"conftest.$ac_ext" <<_ACEOF
13172 #line 13172 "configure"
13173 #include "confdefs.h"
13174 #define _FILE_OFFSET_BITS 64
13175 #include <sys/types.h>
13176  /* Check that off_t can represent 2**63 - 1 correctly.
13177     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13178     since some C++ compilers masquerading as C compilers
13179     incorrectly reject 9223372036854775807.  */
13180 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13181   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13182                        && LARGE_OFF_T % 2147483647 == 1)
13183                       ? 1 : -1];
13184 int
13185 main (void)
13186 {
13187
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f "conftest.$ac_objext"
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194   (eval $ac_compile) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit "$ac_status"); } &&
13198          { ac_try='test -s "conftest.$ac_objext"'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit "$ac_status"); }; }; then
13204   ac_cv_sys_file_offset_bits=64; break
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 cat "conftest.$ac_ext" >&5
13208 fi
13209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13210   break
13211 done
13212 fi
13213 echo "$as_me:13213: result: $ac_cv_sys_file_offset_bits" >&5
13214 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13215 if test "$ac_cv_sys_file_offset_bits" != no; then
13216
13217 cat >>confdefs.h <<EOF
13218 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13219 EOF
13220
13221 fi
13222 rm -rf conftest*
13223   echo "$as_me:13223: checking for _LARGE_FILES value needed for large files" >&5
13224 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13225 if test "${ac_cv_sys_large_files+set}" = set; then
13226   echo $ECHO_N "(cached) $ECHO_C" >&6
13227 else
13228   while :; do
13229   ac_cv_sys_large_files=no
13230   cat >"conftest.$ac_ext" <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13233 #include <sys/types.h>
13234  /* Check that off_t can represent 2**63 - 1 correctly.
13235     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13236     since some C++ compilers masquerading as C compilers
13237     incorrectly reject 9223372036854775807.  */
13238 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13239   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13240                        && LARGE_OFF_T % 2147483647 == 1)
13241                       ? 1 : -1];
13242 int
13243 main (void)
13244 {
13245
13246   ;
13247   return 0;
13248 }
13249 _ACEOF
13250 rm -f "conftest.$ac_objext"
13251 if { (eval echo "$as_me:13251: \"$ac_compile\"") >&5
13252   (eval $ac_compile) 2>&5
13253   ac_status=$?
13254   echo "$as_me:13254: \$? = $ac_status" >&5
13255   (exit "$ac_status"); } &&
13256          { ac_try='test -s "conftest.$ac_objext"'
13257   { (eval echo "$as_me:13257: \"$ac_try\"") >&5
13258   (eval $ac_try) 2>&5
13259   ac_status=$?
13260   echo "$as_me:13260: \$? = $ac_status" >&5
13261   (exit "$ac_status"); }; }; then
13262   break
13263 else
13264   echo "$as_me: failed program was:" >&5
13265 cat "conftest.$ac_ext" >&5
13266 fi
13267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13268   cat >"conftest.$ac_ext" <<_ACEOF
13269 #line 13269 "configure"
13270 #include "confdefs.h"
13271 #define _LARGE_FILES 1
13272 #include <sys/types.h>
13273  /* Check that off_t can represent 2**63 - 1 correctly.
13274     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13275     since some C++ compilers masquerading as C compilers
13276     incorrectly reject 9223372036854775807.  */
13277 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13278   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13279                        && LARGE_OFF_T % 2147483647 == 1)
13280                       ? 1 : -1];
13281 int
13282 main (void)
13283 {
13284
13285   ;
13286   return 0;
13287 }
13288 _ACEOF
13289 rm -f "conftest.$ac_objext"
13290 if { (eval echo "$as_me:13290: \"$ac_compile\"") >&5
13291   (eval $ac_compile) 2>&5
13292   ac_status=$?
13293   echo "$as_me:13293: \$? = $ac_status" >&5
13294   (exit "$ac_status"); } &&
13295          { ac_try='test -s "conftest.$ac_objext"'
13296   { (eval echo "$as_me:13296: \"$ac_try\"") >&5
13297   (eval $ac_try) 2>&5
13298   ac_status=$?
13299   echo "$as_me:13299: \$? = $ac_status" >&5
13300   (exit "$ac_status"); }; }; then
13301   ac_cv_sys_large_files=1; break
13302 else
13303   echo "$as_me: failed program was:" >&5
13304 cat "conftest.$ac_ext" >&5
13305 fi
13306 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13307   break
13308 done
13309 fi
13310 echo "$as_me:13310: result: $ac_cv_sys_large_files" >&5
13311 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13312 if test "$ac_cv_sys_large_files" != no; then
13313
13314 cat >>confdefs.h <<EOF
13315 #define _LARGE_FILES $ac_cv_sys_large_files
13316 EOF
13317
13318 fi
13319 rm -rf conftest*
13320 fi
13321
13322         if test "$enable_largefile" != no ; then
13323         echo "$as_me:13323: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13324 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13325 if test "${ac_cv_sys_largefile_source+set}" = set; then
13326   echo $ECHO_N "(cached) $ECHO_C" >&6
13327 else
13328   while :; do
13329   ac_cv_sys_largefile_source=no
13330   cat >"conftest.$ac_ext" <<_ACEOF
13331 #line 13331 "configure"
13332 #include "confdefs.h"
13333 #include <stdio.h>
13334 int
13335 main (void)
13336 {
13337 return !fseeko;
13338   ;
13339   return 0;
13340 }
13341 _ACEOF
13342 rm -f "conftest.$ac_objext"
13343 if { (eval echo "$as_me:13343: \"$ac_compile\"") >&5
13344   (eval $ac_compile) 2>&5
13345   ac_status=$?
13346   echo "$as_me:13346: \$? = $ac_status" >&5
13347   (exit "$ac_status"); } &&
13348          { ac_try='test -s "conftest.$ac_objext"'
13349   { (eval echo "$as_me:13349: \"$ac_try\"") >&5
13350   (eval $ac_try) 2>&5
13351   ac_status=$?
13352   echo "$as_me:13352: \$? = $ac_status" >&5
13353   (exit "$ac_status"); }; }; then
13354   break
13355 else
13356   echo "$as_me: failed program was:" >&5
13357 cat "conftest.$ac_ext" >&5
13358 fi
13359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13360   cat >"conftest.$ac_ext" <<_ACEOF
13361 #line 13361 "configure"
13362 #include "confdefs.h"
13363 #define _LARGEFILE_SOURCE 1
13364 #include <stdio.h>
13365 int
13366 main (void)
13367 {
13368 return !fseeko;
13369   ;
13370   return 0;
13371 }
13372 _ACEOF
13373 rm -f "conftest.$ac_objext"
13374 if { (eval echo "$as_me:13374: \"$ac_compile\"") >&5
13375   (eval $ac_compile) 2>&5
13376   ac_status=$?
13377   echo "$as_me:13377: \$? = $ac_status" >&5
13378   (exit "$ac_status"); } &&
13379          { ac_try='test -s "conftest.$ac_objext"'
13380   { (eval echo "$as_me:13380: \"$ac_try\"") >&5
13381   (eval $ac_try) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit "$ac_status"); }; }; then
13385   ac_cv_sys_largefile_source=1; break
13386 else
13387   echo "$as_me: failed program was:" >&5
13388 cat "conftest.$ac_ext" >&5
13389 fi
13390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13391   break
13392 done
13393 fi
13394 echo "$as_me:13394: result: $ac_cv_sys_largefile_source" >&5
13395 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13396 if test "$ac_cv_sys_largefile_source" != no; then
13397
13398 cat >>confdefs.h <<EOF
13399 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13400 EOF
13401
13402 fi
13403 rm -rf conftest*
13404
13405 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13406 # in glibc 2.1.3, but that breaks too many other things.
13407 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13408 echo "$as_me:13408: checking for fseeko" >&5
13409 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13410 if test "${ac_cv_func_fseeko+set}" = set; then
13411   echo $ECHO_N "(cached) $ECHO_C" >&6
13412 else
13413   cat >"conftest.$ac_ext" <<_ACEOF
13414 #line 13414 "configure"
13415 #include "confdefs.h"
13416 #include <stdio.h>
13417 int
13418 main (void)
13419 {
13420 return fseeko && fseeko (stdin, 0, 0);
13421   ;
13422   return 0;
13423 }
13424 _ACEOF
13425 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13426 if { (eval echo "$as_me:13426: \"$ac_link\"") >&5
13427   (eval $ac_link) 2>&5
13428   ac_status=$?
13429   echo "$as_me:13429: \$? = $ac_status" >&5
13430   (exit "$ac_status"); } &&
13431          { ac_try='test -s "conftest$ac_exeext"'
13432   { (eval echo "$as_me:13432: \"$ac_try\"") >&5
13433   (eval $ac_try) 2>&5
13434   ac_status=$?
13435   echo "$as_me:13435: \$? = $ac_status" >&5
13436   (exit "$ac_status"); }; }; then
13437   ac_cv_func_fseeko=yes
13438 else
13439   echo "$as_me: failed program was:" >&5
13440 cat "conftest.$ac_ext" >&5
13441 ac_cv_func_fseeko=no
13442 fi
13443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13444 fi
13445 echo "$as_me:13445: result: $ac_cv_func_fseeko" >&5
13446 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13447 if test $ac_cv_func_fseeko = yes; then
13448
13449 cat >>confdefs.h <<\EOF
13450 #define HAVE_FSEEKO 1
13451 EOF
13452
13453 fi
13454
13455         # Normally we would collect these definitions in the config.h,
13456         # but (like _XOPEN_SOURCE), some environments rely on having these
13457         # defined before any of the system headers are included.  Another
13458         # case comes up with C++, e.g., on AIX the compiler compiles the
13459         # header files by themselves before looking at the body files it is
13460         # told to compile.  For ncurses, those header files do not include
13461         # the config.h
13462         if test "$ac_cv_sys_large_files" != no
13463         then
13464
13465         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13466         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13467
13468         fi
13469         if test "$ac_cv_sys_largefile_source" != no
13470         then
13471
13472         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13473         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13474
13475         fi
13476         if test "$ac_cv_sys_file_offset_bits" != no
13477         then
13478
13479         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13480         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13481
13482         fi
13483
13484         echo "$as_me:13484: checking whether to use struct dirent64" >&5
13485 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13486 if test "${cf_cv_struct_dirent64+set}" = set; then
13487   echo $ECHO_N "(cached) $ECHO_C" >&6
13488 else
13489
13490                 cat >"conftest.$ac_ext" <<_ACEOF
13491 #line 13491 "configure"
13492 #include "confdefs.h"
13493
13494 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13495 #include <sys/types.h>
13496 #include <dirent.h>
13497
13498 int
13499 main (void)
13500 {
13501
13502                 /* if transitional largefile support is setup, this is true */
13503                 extern struct dirent64 * readdir(DIR *);
13504                 struct dirent64 *x = readdir((DIR *)0);
13505                 struct dirent *y = readdir((DIR *)0);
13506                 int z = x - y;
13507                 (void)z;
13508
13509   ;
13510   return 0;
13511 }
13512 _ACEOF
13513 rm -f "conftest.$ac_objext"
13514 if { (eval echo "$as_me:13514: \"$ac_compile\"") >&5
13515   (eval $ac_compile) 2>&5
13516   ac_status=$?
13517   echo "$as_me:13517: \$? = $ac_status" >&5
13518   (exit "$ac_status"); } &&
13519          { ac_try='test -s "conftest.$ac_objext"'
13520   { (eval echo "$as_me:13520: \"$ac_try\"") >&5
13521   (eval $ac_try) 2>&5
13522   ac_status=$?
13523   echo "$as_me:13523: \$? = $ac_status" >&5
13524   (exit "$ac_status"); }; }; then
13525   cf_cv_struct_dirent64=yes
13526 else
13527   echo "$as_me: failed program was:" >&5
13528 cat "conftest.$ac_ext" >&5
13529 cf_cv_struct_dirent64=no
13530 fi
13531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13532
13533 fi
13534 echo "$as_me:13534: result: $cf_cv_struct_dirent64" >&5
13535 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13536         test "$cf_cv_struct_dirent64" = yes &&
13537 cat >>confdefs.h <<\EOF
13538 #define HAVE_STRUCT_DIRENT64 1
13539 EOF
13540
13541         fi
13542
13543 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13544 echo "$as_me:13544: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13545 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13546
13547 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13548 if test "${enable_tparm_varargs+set}" = set; then
13549   enableval="$enable_tparm_varargs"
13550   with_tparm_varargs=$enableval
13551 else
13552   with_tparm_varargs=yes
13553 fi;
13554 echo "$as_me:13554: result: $with_tparm_varargs" >&5
13555 echo "${ECHO_T}$with_tparm_varargs" >&6
13556 NCURSES_TPARM_VARARGS=0
13557 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13558
13559 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13560 if test "$with_ticlib" != no ; then
13561 echo "$as_me:13561: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13562 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13563
13564 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13565 if test "${enable_tic_depends+set}" = set; then
13566   enableval="$enable_tic_depends"
13567   with_tic_depends=$enableval
13568 else
13569   with_tic_depends=yes
13570 fi;
13571 echo "$as_me:13571: result: $with_tic_depends" >&5
13572 echo "${ECHO_T}$with_tic_depends" >&6
13573 else
13574         with_tic_depends=no
13575 fi
13576
13577 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13578 echo "$as_me:13578: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13579 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13580
13581 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13582 if test "${enable_wattr_macros+set}" = set; then
13583   enableval="$enable_wattr_macros"
13584   with_wattr_macros=$enableval
13585 else
13586   with_wattr_macros=yes
13587 fi;
13588 if [ "x$with_wattr_macros" != xyes ]; then
13589         NCURSES_WATTR_MACROS=0
13590         echo "$as_me:13590: result: yes" >&5
13591 echo "${ECHO_T}yes" >&6
13592 else
13593         NCURSES_WATTR_MACROS=1
13594         echo "$as_me:13594: result: no" >&5
13595 echo "${ECHO_T}no" >&6
13596 fi
13597
13598 echo "$as_me:13598: checking for X11 rgb file" >&5
13599 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13600
13601 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13602 if test "${with_x11_rgb+set}" = set; then
13603   withval="$with_x11_rgb"
13604   RGB_PATH=$withval
13605 else
13606   RGB_PATH=auto
13607 fi;
13608
13609 if test "x$RGB_PATH" = xauto
13610 then
13611         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13612         for cf_path in \
13613                 /opt/local/share/X11/rgb.txt \
13614                 /opt/X11/share/X11/rgb.txt \
13615                 /usr/share/X11/rgb.txt \
13616                 /usr/X11/share/X11/rgb.txt \
13617                 /usr/X11/lib/X11/rgb.txt \
13618                 /usr/lib/X11/rgb.txt \
13619                 /etc/X11/rgb.txt \
13620                 /usr/pkg/lib/X11/rgb.txt \
13621                 /usr/X11R7/lib/X11/rgb.txt \
13622                 /usr/X11R6/lib/X11/rgb.txt \
13623                 /usr/X11R5/lib/X11/rgb.txt \
13624                 /usr/X11R4/lib/X11/rgb.txt \
13625                 /usr/local/lib/X11/rgb.txt \
13626                 /usr/local/share/X11/rgb.txt \
13627                 /usr/lib64/X11/rgb.txt
13628         do
13629                 if test -f "$cf_path" ; then
13630                         RGB_PATH="$cf_path"
13631                         break
13632                 fi
13633         done
13634 else
13635         cf_path=$RGB_PATH
13636
13637 if test "x$prefix" != xNONE; then
13638         cf_path_syntax="$prefix"
13639 else
13640         cf_path_syntax="$ac_default_prefix"
13641 fi
13642
13643 case ".$cf_path" in
13644 (.\$\(*\)*|.\'*\'*)
13645         ;;
13646 (..|./*|.\\*)
13647         ;;
13648 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13649         ;;
13650 (.\$\{*prefix\}*|.\$\{*dir\}*)
13651         eval cf_path="$cf_path"
13652         case ".$cf_path" in
13653         (.NONE/*)
13654                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13655                 ;;
13656         esac
13657         ;;
13658 (.no|.NONE/*)
13659         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13660         ;;
13661 (*)
13662         { { echo "$as_me:13662: error: expected a pathname, not \"$cf_path\"" >&5
13663 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13664    { (exit 1); exit 1; }; }
13665         ;;
13666 esac
13667
13668 fi
13669
13670 echo "$as_me:13670: result: $RGB_PATH" >&5
13671 echo "${ECHO_T}$RGB_PATH" >&6
13672
13673 cat >>confdefs.h <<EOF
13674 #define RGB_PATH "$cf_path"
13675 EOF
13676
13677 no_x11_rgb=
13678 if test "$RGB_PATH" = no
13679 then
13680         no_x11_rgb="#"
13681 fi
13682
13683 ###   use option --with-bool to override bool's type
13684 echo "$as_me:13684: checking for type of bool" >&5
13685 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13686
13687 # Check whether --with-bool or --without-bool was given.
13688 if test "${with_bool+set}" = set; then
13689   withval="$with_bool"
13690   NCURSES_BOOL="$withval"
13691 else
13692   NCURSES_BOOL=auto
13693 fi;
13694 echo "$as_me:13694: result: $NCURSES_BOOL" >&5
13695 echo "${ECHO_T}$NCURSES_BOOL" >&6
13696
13697 echo "$as_me:13697: checking for alternate terminal capabilities file" >&5
13698 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13699
13700 # Check whether --with-caps or --without-caps was given.
13701 if test "${with_caps+set}" = set; then
13702   withval="$with_caps"
13703   TERMINFO_CAPS=Caps.$withval
13704 else
13705   TERMINFO_CAPS=Caps
13706 fi;
13707 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13708 echo "$as_me:13708: result: $TERMINFO_CAPS" >&5
13709 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13710
13711 ###   use option --with-chtype to override chtype's type
13712 echo "$as_me:13712: checking for type of chtype" >&5
13713 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13714
13715 # Check whether --with-chtype or --without-chtype was given.
13716 if test "${with_chtype+set}" = set; then
13717   withval="$with_chtype"
13718   NCURSES_CHTYPE="$withval"
13719 else
13720   NCURSES_CHTYPE=$cf_dft_chtype
13721 fi;
13722 echo "$as_me:13722: result: $NCURSES_CHTYPE" >&5
13723 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13724
13725 ###   use option --with-ospeed to override ospeed's type
13726 echo "$as_me:13726: checking for type of ospeed" >&5
13727 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13728
13729 # Check whether --with-ospeed or --without-ospeed was given.
13730 if test "${with_ospeed+set}" = set; then
13731   withval="$with_ospeed"
13732   NCURSES_OSPEED="$withval"
13733 else
13734   NCURSES_OSPEED=short
13735 fi;
13736 echo "$as_me:13736: result: $NCURSES_OSPEED" >&5
13737 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13738
13739 ###   use option --with-mmask-t to override mmask_t's type
13740 echo "$as_me:13740: checking for type of mmask_t" >&5
13741 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13742
13743 # Check whether --with-mmask-t or --without-mmask-t was given.
13744 if test "${with_mmask_t+set}" = set; then
13745   withval="$with_mmask_t"
13746   NCURSES_MMASK_T="$withval"
13747 else
13748   NCURSES_MMASK_T=$cf_dft_mmask_t
13749 fi;
13750 echo "$as_me:13750: result: $NCURSES_MMASK_T" >&5
13751 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13752
13753 ###   use option --with-ccharw-max to override CCHARW_MAX size
13754 echo "$as_me:13754: checking for size CCHARW_MAX" >&5
13755 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13756
13757 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13758 if test "${with_ccharw_max+set}" = set; then
13759   withval="$with_ccharw_max"
13760   NCURSES_CCHARW_MAX="$withval"
13761 else
13762   NCURSES_CCHARW_MAX=5
13763 fi;
13764 echo "$as_me:13764: result: $NCURSES_CCHARW_MAX" >&5
13765 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13766
13767 echo "$as_me:13767: checking for ANSI C header files" >&5
13768 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13769 if test "${ac_cv_header_stdc+set}" = set; then
13770   echo $ECHO_N "(cached) $ECHO_C" >&6
13771 else
13772   cat >"conftest.$ac_ext" <<_ACEOF
13773 #line 13773 "configure"
13774 #include "confdefs.h"
13775 #include <stdlib.h>
13776 #include <stdarg.h>
13777 #include <string.h>
13778 #include <float.h>
13779
13780 _ACEOF
13781 if { (eval echo "$as_me:13781: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13782   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13783   ac_status=$?
13784   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13785   rm -f conftest.er1
13786   cat conftest.err >&5
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit "$ac_status"); } >/dev/null; then
13789   if test -s conftest.err; then
13790     ac_cpp_err=$ac_c_preproc_warn_flag
13791   else
13792     ac_cpp_err=
13793   fi
13794 else
13795   ac_cpp_err=yes
13796 fi
13797 if test -z "$ac_cpp_err"; then
13798   ac_cv_header_stdc=yes
13799 else
13800   echo "$as_me: failed program was:" >&5
13801   cat "conftest.$ac_ext" >&5
13802   ac_cv_header_stdc=no
13803 fi
13804 rm -f conftest.err "conftest.$ac_ext"
13805
13806 if test $ac_cv_header_stdc = yes; then
13807   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13808   cat >"conftest.$ac_ext" <<_ACEOF
13809 #line 13809 "configure"
13810 #include "confdefs.h"
13811 #include <string.h>
13812
13813 _ACEOF
13814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13815   $EGREP "memchr" >/dev/null 2>&1; then
13816   :
13817 else
13818   ac_cv_header_stdc=no
13819 fi
13820 rm -rf conftest*
13821
13822 fi
13823
13824 if test $ac_cv_header_stdc = yes; then
13825   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13826   cat >"conftest.$ac_ext" <<_ACEOF
13827 #line 13827 "configure"
13828 #include "confdefs.h"
13829 #include <stdlib.h>
13830
13831 _ACEOF
13832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13833   $EGREP "free" >/dev/null 2>&1; then
13834   :
13835 else
13836   ac_cv_header_stdc=no
13837 fi
13838 rm -rf conftest*
13839
13840 fi
13841
13842 if test $ac_cv_header_stdc = yes; then
13843   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13844   if test "$cross_compiling" = yes; then
13845   :
13846 else
13847   cat >"conftest.$ac_ext" <<_ACEOF
13848 #line 13848 "configure"
13849 #include "confdefs.h"
13850 #include <ctype.h>
13851 #if ((' ' & 0x0FF) == 0x020)
13852 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13853 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13854 #else
13855 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13856                      || ('j' <= (c) && (c) <= 'r') \
13857                      || ('s' <= (c) && (c) <= 'z'))
13858 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13859 #endif
13860
13861 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13862 int
13863 main (void)
13864 {
13865   int i;
13866   for (i = 0; i < 256; i++)
13867     if (XOR (islower (i), ISLOWER (i))
13868         || toupper (i) != TOUPPER (i))
13869       $ac_main_return(2);
13870   $ac_main_return (0);
13871 }
13872 _ACEOF
13873 rm -f "conftest$ac_exeext"
13874 if { (eval echo "$as_me:13874: \"$ac_link\"") >&5
13875   (eval $ac_link) 2>&5
13876   ac_status=$?
13877   echo "$as_me:13877: \$? = $ac_status" >&5
13878   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13879   { (eval echo "$as_me:13879: \"$ac_try\"") >&5
13880   (eval $ac_try) 2>&5
13881   ac_status=$?
13882   echo "$as_me:13882: \$? = $ac_status" >&5
13883   (exit "$ac_status"); }; }; then
13884   :
13885 else
13886   echo "$as_me: program exited with status $ac_status" >&5
13887 echo "$as_me: failed program was:" >&5
13888 cat "conftest.$ac_ext" >&5
13889 ac_cv_header_stdc=no
13890 fi
13891 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13892 fi
13893 fi
13894 fi
13895 echo "$as_me:13895: result: $ac_cv_header_stdc" >&5
13896 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13897 if test $ac_cv_header_stdc = yes; then
13898
13899 cat >>confdefs.h <<\EOF
13900 #define STDC_HEADERS 1
13901 EOF
13902
13903 fi
13904
13905 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13906
13907 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13908                   inttypes.h stdint.h unistd.h
13909 do
13910 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13911 echo "$as_me:13911: checking for $ac_header" >&5
13912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13913 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13914   echo $ECHO_N "(cached) $ECHO_C" >&6
13915 else
13916   cat >"conftest.$ac_ext" <<_ACEOF
13917 #line 13917 "configure"
13918 #include "confdefs.h"
13919 $ac_includes_default
13920 #include <$ac_header>
13921 _ACEOF
13922 rm -f "conftest.$ac_objext"
13923 if { (eval echo "$as_me:13923: \"$ac_compile\"") >&5
13924   (eval $ac_compile) 2>&5
13925   ac_status=$?
13926   echo "$as_me:13926: \$? = $ac_status" >&5
13927   (exit "$ac_status"); } &&
13928          { ac_try='test -s "conftest.$ac_objext"'
13929   { (eval echo "$as_me:13929: \"$ac_try\"") >&5
13930   (eval $ac_try) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit "$ac_status"); }; }; then
13934   eval "$as_ac_Header=yes"
13935 else
13936   echo "$as_me: failed program was:" >&5
13937 cat "conftest.$ac_ext" >&5
13938 eval "$as_ac_Header=no"
13939 fi
13940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13941 fi
13942 echo "$as_me:13942: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13943 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13944 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13945   cat >>confdefs.h <<EOF
13946 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13947 EOF
13948
13949 fi
13950 done
13951
13952 echo "$as_me:13952: checking for signed char" >&5
13953 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13954 if test "${ac_cv_type_signed_char+set}" = set; then
13955   echo $ECHO_N "(cached) $ECHO_C" >&6
13956 else
13957   cat >"conftest.$ac_ext" <<_ACEOF
13958 #line 13958 "configure"
13959 #include "confdefs.h"
13960 $ac_includes_default
13961 int
13962 main (void)
13963 {
13964 if ((signed char *) 0)
13965   return 0;
13966 if (sizeof (signed char))
13967   return 0;
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 rm -f "conftest.$ac_objext"
13973 if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5
13974   (eval $ac_compile) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit "$ac_status"); } &&
13978          { ac_try='test -s "conftest.$ac_objext"'
13979   { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980   (eval $ac_try) 2>&5
13981   ac_status=$?
13982   echo "$as_me:13982: \$? = $ac_status" >&5
13983   (exit "$ac_status"); }; }; then
13984   ac_cv_type_signed_char=yes
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat "conftest.$ac_ext" >&5
13988 ac_cv_type_signed_char=no
13989 fi
13990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13991 fi
13992 echo "$as_me:13992: result: $ac_cv_type_signed_char" >&5
13993 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13994
13995 echo "$as_me:13995: checking size of signed char" >&5
13996 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13997 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13998   echo $ECHO_N "(cached) $ECHO_C" >&6
13999 else
14000   if test "$ac_cv_type_signed_char" = yes; then
14001   if test "$cross_compiling" = yes; then
14002   # Depending upon the size, compute the lo and hi bounds.
14003 cat >"conftest.$ac_ext" <<_ACEOF
14004 #line 14004 "configure"
14005 #include "confdefs.h"
14006 $ac_includes_default
14007 int
14008 main (void)
14009 {
14010 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14011   ;
14012   return 0;
14013 }
14014 _ACEOF
14015 rm -f "conftest.$ac_objext"
14016 if { (eval echo "$as_me:14016: \"$ac_compile\"") >&5
14017   (eval $ac_compile) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit "$ac_status"); } &&
14021          { ac_try='test -s "conftest.$ac_objext"'
14022   { (eval echo "$as_me:14022: \"$ac_try\"") >&5
14023   (eval $ac_try) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit "$ac_status"); }; }; then
14027   ac_lo=0 ac_mid=0
14028   while :; do
14029     cat >"conftest.$ac_ext" <<_ACEOF
14030 #line 14030 "configure"
14031 #include "confdefs.h"
14032 $ac_includes_default
14033 int
14034 main (void)
14035 {
14036 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14037   ;
14038   return 0;
14039 }
14040 _ACEOF
14041 rm -f "conftest.$ac_objext"
14042 if { (eval echo "$as_me:14042: \"$ac_compile\"") >&5
14043   (eval $ac_compile) 2>&5
14044   ac_status=$?
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit "$ac_status"); } &&
14047          { ac_try='test -s "conftest.$ac_objext"'
14048   { (eval echo "$as_me:14048: \"$ac_try\"") >&5
14049   (eval $ac_try) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit "$ac_status"); }; }; then
14053   ac_hi=$ac_mid; break
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 cat "conftest.$ac_ext" >&5
14057 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14058 fi
14059 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14060   done
14061 else
14062   echo "$as_me: failed program was:" >&5
14063 cat "conftest.$ac_ext" >&5
14064 ac_hi=-1 ac_mid=-1
14065   while :; do
14066     cat >"conftest.$ac_ext" <<_ACEOF
14067 #line 14067 "configure"
14068 #include "confdefs.h"
14069 $ac_includes_default
14070 int
14071 main (void)
14072 {
14073 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14074   ;
14075   return 0;
14076 }
14077 _ACEOF
14078 rm -f "conftest.$ac_objext"
14079 if { (eval echo "$as_me:14079: \"$ac_compile\"") >&5
14080   (eval $ac_compile) 2>&5
14081   ac_status=$?
14082   echo "$as_me:14082: \$? = $ac_status" >&5
14083   (exit "$ac_status"); } &&
14084          { ac_try='test -s "conftest.$ac_objext"'
14085   { (eval echo "$as_me:14085: \"$ac_try\"") >&5
14086   (eval $ac_try) 2>&5
14087   ac_status=$?
14088   echo "$as_me:14088: \$? = $ac_status" >&5
14089   (exit "$ac_status"); }; }; then
14090   ac_lo=$ac_mid; break
14091 else
14092   echo "$as_me: failed program was:" >&5
14093 cat "conftest.$ac_ext" >&5
14094 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14095 fi
14096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14097   done
14098 fi
14099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14100 # Binary search between lo and hi bounds.
14101 while test "x$ac_lo" != "x$ac_hi"; do
14102   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14103   cat >"conftest.$ac_ext" <<_ACEOF
14104 #line 14104 "configure"
14105 #include "confdefs.h"
14106 $ac_includes_default
14107 int
14108 main (void)
14109 {
14110 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14111   ;
14112   return 0;
14113 }
14114 _ACEOF
14115 rm -f "conftest.$ac_objext"
14116 if { (eval echo "$as_me:14116: \"$ac_compile\"") >&5
14117   (eval $ac_compile) 2>&5
14118   ac_status=$?
14119   echo "$as_me:14119: \$? = $ac_status" >&5
14120   (exit "$ac_status"); } &&
14121          { ac_try='test -s "conftest.$ac_objext"'
14122   { (eval echo "$as_me:14122: \"$ac_try\"") >&5
14123   (eval $ac_try) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit "$ac_status"); }; }; then
14127   ac_hi=$ac_mid
14128 else
14129   echo "$as_me: failed program was:" >&5
14130 cat "conftest.$ac_ext" >&5
14131 ac_lo=`expr "$ac_mid" + 1`
14132 fi
14133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14134 done
14135 ac_cv_sizeof_signed_char=$ac_lo
14136 else
14137   if test "$cross_compiling" = yes; then
14138   { { echo "$as_me:14138: error: cannot run test program while cross compiling" >&5
14139 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14140    { (exit 1); exit 1; }; }
14141 else
14142   cat >"conftest.$ac_ext" <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145 $ac_includes_default
14146 int
14147 main (void)
14148 {
14149 FILE *f = fopen ("conftest.val", "w");
14150 if (!f)
14151   $ac_main_return (1);
14152 fprintf (f, "%d", (sizeof (signed char)));
14153 fclose (f);
14154   ;
14155   return 0;
14156 }
14157 _ACEOF
14158 rm -f "conftest$ac_exeext"
14159 if { (eval echo "$as_me:14159: \"$ac_link\"") >&5
14160   (eval $ac_link) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14164   { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit "$ac_status"); }; }; then
14169   ac_cv_sizeof_signed_char=`cat conftest.val`
14170 else
14171   echo "$as_me: program exited with status $ac_status" >&5
14172 echo "$as_me: failed program was:" >&5
14173 cat "conftest.$ac_ext" >&5
14174 fi
14175 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14176 fi
14177 fi
14178 rm -f conftest.val
14179 else
14180   ac_cv_sizeof_signed_char=0
14181 fi
14182 fi
14183 echo "$as_me:14183: result: $ac_cv_sizeof_signed_char" >&5
14184 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14185 cat >>confdefs.h <<EOF
14186 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14187 EOF
14188
14189 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14190         NCURSES_SBOOL="signed char"
14191 else
14192         NCURSES_SBOOL="char"
14193 fi
14194 echo "$as_me:14194: checking if you want to use signed Boolean array in term.h" >&5
14195 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14196
14197 # Check whether --enable-signed-char or --disable-signed-char was given.
14198 if test "${enable_signed_char+set}" = set; then
14199   enableval="$enable_signed_char"
14200   with_signed_char=$enableval
14201 else
14202   with_signed_char=no
14203 fi;
14204 echo "$as_me:14204: result: $with_signed_char" >&5
14205 echo "${ECHO_T}$with_signed_char" >&6
14206 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14207
14208 ###   use option --with-tparm-arg to override tparm's argument type
14209 echo "$as_me:14209: checking for type of tparm args" >&5
14210 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14211
14212 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14213 if test "${with_tparm_arg+set}" = set; then
14214   withval="$with_tparm_arg"
14215   NCURSES_TPARM_ARG="$withval"
14216 else
14217   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14218 fi;
14219 echo "$as_me:14219: result: $NCURSES_TPARM_ARG" >&5
14220 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14221
14222 ### Enable compiling-in rcs id's
14223 echo "$as_me:14223: checking if RCS identifiers should be compiled-in" >&5
14224 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14225
14226 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14227 if test "${with_rcs_ids+set}" = set; then
14228   withval="$with_rcs_ids"
14229   with_rcs_ids=$withval
14230 else
14231   with_rcs_ids=no
14232 fi;
14233 echo "$as_me:14233: result: $with_rcs_ids" >&5
14234 echo "${ECHO_T}$with_rcs_ids" >&6
14235 test "x$with_rcs_ids" = xyes &&
14236 cat >>confdefs.h <<\EOF
14237 #define USE_RCS_IDS 1
14238 EOF
14239
14240 ###############################################################################
14241
14242 echo "$as_me:14242: checking format of man-pages" >&5
14243 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14244
14245 # Check whether --with-manpage-format or --without-manpage-format was given.
14246 if test "${with_manpage_format+set}" = set; then
14247   withval="$with_manpage_format"
14248   MANPAGE_FORMAT=$withval
14249 else
14250   MANPAGE_FORMAT=unknown
14251 fi;
14252
14253 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14254 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14255
14256 cf_unknown=
14257
14258 case "$MANPAGE_FORMAT" in
14259 (unknown)
14260         if test -z "$MANPATH" ; then
14261                 MANPATH="/usr/man:/usr/share/man"
14262         fi
14263
14264         # look for the 'date' man-page (it's most likely to be installed!)
14265         MANPAGE_FORMAT=
14266         cf_preform="no"
14267         cf_catonly="yes"
14268         cf_example="date"
14269
14270         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14271         for cf_dir in $MANPATH; do
14272                 test -z "$cf_dir" && cf_dir=/usr/man
14273                 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
14274                 do
14275                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14276                         if test "x$cf_test" = "x$cf_name" ; then
14277
14278                                 case "$cf_name" in
14279                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14280                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14281                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14282                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14283                                 esac
14284
14285                                 case "$cf_name" in
14286                                 ($cf_dir/man*)
14287                                         cf_catonly=no
14288                                         ;;
14289                                 ($cf_dir/cat*)
14290                                         cf_preform=yes
14291                                         ;;
14292                                 esac
14293                                 break
14294                         fi
14295
14296                         # if we found a match in either man* or cat*, stop looking
14297                         if test -n "$MANPAGE_FORMAT" ; then
14298                                 cf_found=no
14299                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14300                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14301                                 case "$cf_name" in
14302                                 ($cf_dir/cat*)
14303                                         cf_found=yes
14304                                         ;;
14305                                 esac
14306                                 test "$cf_found" = yes && break
14307                         fi
14308                 done
14309                 # only check the first directory in $MANPATH where we find manpages
14310                 if test -n "$MANPAGE_FORMAT" ; then
14311                         break
14312                 fi
14313         done
14314         # if we did not find the example, just assume it is normal
14315         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14316         IFS="$ac_save_ifs"
14317         ;;
14318 (*)
14319         for cf_option in $MANPAGE_FORMAT; do
14320         case "$cf_option" in
14321         (gzip|compress|BSDI|normal|formatted|catonly)
14322                 ;;
14323         (*)
14324                 cf_unknown="$cf_unknown $cf_option"
14325                 ;;
14326         esac
14327         done
14328         ;;
14329 esac
14330
14331 echo "$as_me:14331: result: $MANPAGE_FORMAT" >&5
14332 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14333 if test -n "$cf_unknown" ; then
14334         { echo "$as_me:14334: WARNING: Unexpected manpage-format $cf_unknown" >&5
14335 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14336 fi
14337
14338 echo "$as_me:14338: checking for manpage renaming" >&5
14339 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14340
14341 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14342 if test "${with_manpage_renames+set}" = set; then
14343   withval="$with_manpage_renames"
14344   MANPAGE_RENAMES=$withval
14345 else
14346   MANPAGE_RENAMES=yes
14347 fi;
14348
14349 case ".$MANPAGE_RENAMES" in
14350 (.no)
14351         ;;
14352 (.|.yes)
14353         # Debian 'man' program?
14354         if test -f /etc/debian_version ; then
14355                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14356         else
14357                 MANPAGE_RENAMES=no
14358         fi
14359         ;;
14360 esac
14361
14362 if test "$MANPAGE_RENAMES" != no ; then
14363         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14364                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14365         elif test ! -f "$MANPAGE_RENAMES" ; then
14366                 { { echo "$as_me:14366: error: not a filename: $MANPAGE_RENAMES" >&5
14367 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14368    { (exit 1); exit 1; }; }
14369         fi
14370
14371         test ! -d man && mkdir man
14372
14373         # Construct a sed-script to perform renaming within man-pages
14374         if test -n "$MANPAGE_RENAMES" ; then
14375                 test ! -d man && mkdir man
14376                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14377         fi
14378 fi
14379
14380 echo "$as_me:14380: result: $MANPAGE_RENAMES" >&5
14381 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14382
14383 echo "$as_me:14383: checking if manpage aliases will be installed" >&5
14384 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14385
14386 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14387 if test "${with_manpage_aliases+set}" = set; then
14388   withval="$with_manpage_aliases"
14389   MANPAGE_ALIASES=$withval
14390 else
14391   MANPAGE_ALIASES=yes
14392 fi;
14393
14394 echo "$as_me:14394: result: $MANPAGE_ALIASES" >&5
14395 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14396
14397 case "x$LN_S" in
14398 (xln*)
14399         cf_use_symlinks=yes
14400         ;;
14401 (*)
14402         cf_use_symlinks=no
14403         ;;
14404 esac
14405
14406 MANPAGE_SYMLINKS=no
14407 if test "$MANPAGE_ALIASES" = yes ; then
14408 echo "$as_me:14408: checking if manpage symlinks should be used" >&5
14409 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14410
14411 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14412 if test "${with_manpage_symlinks+set}" = set; then
14413   withval="$with_manpage_symlinks"
14414   MANPAGE_SYMLINKS=$withval
14415 else
14416   MANPAGE_SYMLINKS=$cf_use_symlinks
14417 fi;
14418
14419 if test "$$cf_use_symlinks" = no; then
14420 if test "$MANPAGE_SYMLINKS" = yes ; then
14421         { echo "$as_me:14421: WARNING: cannot make symlinks" >&5
14422 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14423         MANPAGE_SYMLINKS=no
14424 fi
14425 fi
14426
14427 echo "$as_me:14427: result: $MANPAGE_SYMLINKS" >&5
14428 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14429 fi
14430
14431 echo "$as_me:14431: checking for manpage tbl" >&5
14432 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14433
14434 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14435 if test "${with_manpage_tbl+set}" = set; then
14436   withval="$with_manpage_tbl"
14437   MANPAGE_TBL=$withval
14438 else
14439   MANPAGE_TBL=no
14440 fi;
14441
14442 echo "$as_me:14442: result: $MANPAGE_TBL" >&5
14443 echo "${ECHO_T}$MANPAGE_TBL" >&6
14444
14445 if test "$prefix" = "NONE" ; then
14446         cf_prefix="$ac_default_prefix"
14447 else
14448         cf_prefix="$prefix"
14449 fi
14450
14451 case "$MANPAGE_FORMAT" in
14452 (*catonly*)
14453         cf_format=yes
14454         cf_inboth=no
14455         ;;
14456 (*formatted*)
14457         cf_format=yes
14458         cf_inboth=yes
14459         ;;
14460 (*)
14461         cf_format=no
14462         cf_inboth=no
14463         ;;
14464 esac
14465
14466 test ! -d man && mkdir man
14467
14468 cf_so_strip=
14469 cf_compress=
14470 case "$MANPAGE_FORMAT" in
14471 (*compress*)
14472         cf_so_strip="Z"
14473         cf_compress=compress
14474         ;;
14475 (*gzip*)
14476         cf_so_strip="gz"
14477         cf_compress=gzip
14478         ;;
14479 esac
14480
14481 cf_edit_man=./edit_man.sh
14482 cf_man_alias=`pwd`/man_alias.sed
14483
14484 cat >$cf_edit_man <<CF_EOF
14485 #! $SHELL
14486 # this script is generated by the configure-script CF_MAN_PAGES macro.
14487
14488 prefix="$cf_prefix"
14489 datarootdir="$datarootdir"
14490 datadir="$datadir"
14491
14492 NCURSES_MAJOR="$NCURSES_MAJOR"
14493 NCURSES_MINOR="$NCURSES_MINOR"
14494 NCURSES_PATCH="$NCURSES_PATCH"
14495
14496 NCURSES_OSPEED="$NCURSES_OSPEED"
14497 TERMINFO="$TERMINFO"
14498
14499 INSTALL="$INSTALL"
14500 INSTALL_DATA="$INSTALL_DATA"
14501
14502 transform="$program_transform_name"
14503
14504 TMP=\${TMPDIR:=/tmp}/man\$\$
14505 trap "rm -f \$TMP" 0 1 2 3 15
14506
14507 form=\$1
14508 shift || exit 1
14509
14510 verb=\$1
14511 shift || exit 1
14512
14513 mandir=\$1
14514 shift || exit 1
14515
14516 srcdir=\$1
14517 top_srcdir=\$srcdir/..
14518 shift || exit 1
14519
14520 if test "\$form" = normal ; then
14521         if test "$cf_format" = yes ; then
14522         if test "$cf_inboth" = no ; then
14523                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14524                 exit $?
14525         fi
14526         fi
14527         cf_subdir=\$mandir/man
14528         cf_tables=$MANPAGE_TBL
14529 else
14530         cf_subdir=\$mandir/cat
14531         cf_tables=yes
14532 fi
14533
14534 # process the list of source-files
14535 for i in "\$@" ; do
14536 case \$i in
14537 (*.orig|*.rej) ;;
14538 (*.[0-9]*)
14539         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14540         if test "\$verb" = installing ; then
14541         if test ! -d "\$cf_subdir\${section}" ; then
14542                 mkdir -p "\$cf_subdir\$section"
14543         fi
14544         fi
14545
14546         # replace variables in man page
14547         if test ! -f "$cf_man_alias" ; then
14548 cat >>$cf_man_alias <<-CF_EOF2
14549                 s,@DATADIR@,\$datadir,g
14550                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14551                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14552                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14553                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14554                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14555                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14556 CF_EOF
14557
14558         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14559         do
14560                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14561                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14562 cat >>$cf_edit_man <<-CF_EOF
14563                 s,@$cf_NAME@,$cf_name,g
14564 CF_EOF
14565         done
14566
14567 cat >>$cf_edit_man <<CF_EOF
14568 CF_EOF2
14569                 echo "...made $cf_man_alias"
14570         fi
14571
14572         aliases=
14573         cf_source=\`basename "\$i"\`
14574         inalias=\$cf_source
14575         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14576         if test ! -f "\$inalias" ; then
14577                 echo ".. skipped \$cf_source"
14578                 continue
14579         fi
14580 CF_EOF
14581
14582 if test "$MANPAGE_ALIASES" != no ; then
14583 cat >>$cf_edit_man <<CF_EOF
14584         nCurses=ignore.3x
14585         test "$with_curses_h" = yes && nCurses=ncurses.3x
14586         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14587 CF_EOF
14588 fi
14589
14590 if test "$MANPAGE_RENAMES" = no ; then
14591 cat >>$cf_edit_man <<CF_EOF
14592         # perform program transformations for section 1 man pages
14593         if test \$section = 1 ; then
14594                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14595         else
14596                 cf_target=\$cf_subdir\${section}/\$cf_source
14597         fi
14598 CF_EOF
14599 else
14600 cat >>$cf_edit_man <<CF_EOF
14601         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14602         if test -z "\$cf_target" ; then
14603                 echo "? missing rename for \$cf_source"
14604                 cf_target="\$cf_source"
14605         fi
14606         cf_target="\$cf_subdir\${section}/\${cf_target}"
14607
14608 CF_EOF
14609 fi
14610
14611 cat >>$cf_edit_man <<CF_EOF
14612         sed     -f "$cf_man_alias" \\
14613 CF_EOF
14614
14615 if test -f "$MANPAGE_RENAMES" ; then
14616 cat >>$cf_edit_man <<CF_EOF
14617                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14618 CF_EOF
14619 else
14620 cat >>$cf_edit_man <<CF_EOF
14621                 < "\$i" >\$TMP
14622 CF_EOF
14623 fi
14624
14625 cat >>$cf_edit_man <<CF_EOF
14626 if test \$cf_tables = yes ; then
14627         tbl \$TMP >\$TMP.out
14628         mv \$TMP.out \$TMP
14629 fi
14630 CF_EOF
14631
14632 if test "$with_overwrite" != yes ; then
14633 cat >>$cf_edit_man <<CF_EOF
14634         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14635         mv \$TMP.out \$TMP
14636 CF_EOF
14637 fi
14638
14639 if test "$with_curses_h" != yes ; then
14640 cat >>$cf_edit_man <<CF_EOF
14641         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14642         mv \$TMP.out \$TMP
14643 CF_EOF
14644 fi
14645
14646 cat >>$cf_edit_man <<CF_EOF
14647         if test "\$form" = format ; then
14648                 nroff -man \$TMP >\$TMP.out
14649                 mv \$TMP.out \$TMP
14650         fi
14651 CF_EOF
14652
14653 if test -n "$cf_compress" ; then
14654 cat >>$cf_edit_man <<CF_EOF
14655         if test "\$verb" = installing ; then
14656         if ( "$cf_compress" -f \$TMP )
14657         then
14658                 mv \$TMP.$cf_so_strip \$TMP
14659         fi
14660         fi
14661         cf_target="\$cf_target.$cf_so_strip"
14662 CF_EOF
14663 fi
14664
14665 case "$MANPAGE_FORMAT" in
14666 (*BSDI*)
14667 cat >>$cf_edit_man <<CF_EOF
14668         if test "\$form" = format ; then
14669                 # BSDI installs only .0 suffixes in the cat directories
14670                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14671         fi
14672 CF_EOF
14673   ;;
14674 esac
14675
14676 cat >>$cf_edit_man <<CF_EOF
14677         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14678         if test "\$verb" = installing ; then
14679                 echo "\$verb \$cf_target"
14680                 \$INSTALL_DATA \$TMP "\$cf_target"
14681                 test -d "\$cf_subdir\${section}" &&
14682                 test -n "\$aliases" && (
14683                         cd "\$cf_subdir\${section}" && (
14684                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14685                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14686                                 cf_target=\`basename "\$cf_target"\`
14687                                 for cf_alias in \$aliases
14688                                 do
14689                                         if test "\$section" = 1 ; then
14690                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14691                                         fi
14692
14693                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14694                                                 if test -f "\$cf_alias\${suffix}" ; then
14695                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14696                                                         then
14697                                                                 continue
14698                                                         fi
14699                                                 fi
14700                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14701 CF_EOF
14702 case "x$LN_S" in
14703 (*-f)
14704 cat >>$cf_edit_man <<CF_EOF
14705                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14706 CF_EOF
14707         ;;
14708 (*)
14709 cat >>$cf_edit_man <<CF_EOF
14710                                                 rm -f "\$cf_alias\${suffix}"
14711                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14712 CF_EOF
14713         ;;
14714 esac
14715 cat >>$cf_edit_man <<CF_EOF
14716                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14717                                                 echo ".so \$cf_source" >\$TMP
14718 CF_EOF
14719 if test -n "$cf_compress" ; then
14720 cat >>$cf_edit_man <<CF_EOF
14721                                                 if test -n "$cf_so_strip" ; then
14722                                                         "$cf_compress" -f \$TMP
14723                                                         mv \$TMP.$cf_so_strip \$TMP
14724                                                 fi
14725 CF_EOF
14726 fi
14727 cat >>$cf_edit_man <<CF_EOF
14728                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14729                                                 rm -f "\$cf_alias\${suffix}"
14730                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14731                                         fi
14732                                 done
14733                         )
14734                 )
14735         elif test "\$verb" = removing ; then
14736                 test -f "\$cf_target" && (
14737                         echo "\$verb \$cf_target"
14738                         rm -f "\$cf_target"
14739                 )
14740                 test -d "\$cf_subdir\${section}" &&
14741                 test -n "\$aliases" && (
14742                         cd "\$cf_subdir\${section}" && (
14743                                 for cf_alias in \$aliases
14744                                 do
14745                                         if test "\$section" = 1 ; then
14746                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14747                                         fi
14748
14749                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14750                                         rm -f "\$cf_alias\${suffix}"
14751                                 done
14752                         )
14753                 )
14754         else
14755 #               echo ".hy 0"
14756                 cat \$TMP
14757         fi
14758         ;;
14759 esac
14760 done
14761
14762 if test "$cf_inboth" = yes ; then
14763 if test "\$form" != format ; then
14764         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14765 fi
14766 fi
14767
14768 exit 0
14769 CF_EOF
14770 chmod 755 "$cf_edit_man"
14771
14772 ###############################################################################
14773
14774 ### Note that some functions (such as const) are normally disabled anyway.
14775 echo "$as_me:14775: checking if you want to build with function extensions" >&5
14776 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14777
14778 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14779 if test "${enable_ext_funcs+set}" = set; then
14780   enableval="$enable_ext_funcs"
14781   with_ext_funcs=$enableval
14782 else
14783   with_ext_funcs=yes
14784 fi;
14785 echo "$as_me:14785: result: $with_ext_funcs" >&5
14786 echo "${ECHO_T}$with_ext_funcs" >&6
14787 if test "x$with_ext_funcs" = xyes ; then
14788         NCURSES_EXT_FUNCS=1
14789
14790 cat >>confdefs.h <<\EOF
14791 #define NCURSES_EXT_FUNCS 1
14792 EOF
14793
14794 cat >>confdefs.h <<\EOF
14795 #define HAVE_ASSUME_DEFAULT_COLORS 1
14796 EOF
14797
14798 cat >>confdefs.h <<\EOF
14799 #define HAVE_CURSES_VERSION 1
14800 EOF
14801
14802 cat >>confdefs.h <<\EOF
14803 #define HAVE_HAS_KEY 1
14804 EOF
14805
14806 cat >>confdefs.h <<\EOF
14807 #define HAVE_RESIZETERM 1
14808 EOF
14809
14810 cat >>confdefs.h <<\EOF
14811 #define HAVE_RESIZE_TERM 1
14812 EOF
14813
14814 cat >>confdefs.h <<\EOF
14815 #define HAVE_TERM_ENTRY_H 1
14816 EOF
14817
14818 cat >>confdefs.h <<\EOF
14819 #define HAVE_USE_DEFAULT_COLORS 1
14820 EOF
14821
14822 cat >>confdefs.h <<\EOF
14823 #define HAVE_USE_EXTENDED_NAMES 1
14824 EOF
14825
14826 cat >>confdefs.h <<\EOF
14827 #define HAVE_USE_SCREEN 1
14828 EOF
14829
14830 cat >>confdefs.h <<\EOF
14831 #define HAVE_USE_WINDOW 1
14832 EOF
14833
14834 cat >>confdefs.h <<\EOF
14835 #define HAVE_WRESIZE 1
14836 EOF
14837
14838         GENERATED_EXT_FUNCS=generated
14839         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14840 else
14841         NCURSES_EXT_FUNCS=0
14842         GENERATED_EXT_FUNCS=
14843 fi
14844
14845 echo "$as_me:14845: checking if you want to build with SCREEN extensions" >&5
14846 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14847
14848 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14849 if test "${enable_sp_funcs+set}" = set; then
14850   enableval="$enable_sp_funcs"
14851   with_sp_funcs=$enableval
14852 else
14853   with_sp_funcs=$cf_dft_ext_spfuncs
14854 fi;
14855 echo "$as_me:14855: result: $with_sp_funcs" >&5
14856 echo "${ECHO_T}$with_sp_funcs" >&6
14857 if test "x$with_sp_funcs" = xyes ; then
14858         NCURSES_SP_FUNCS=1
14859
14860 cat >>confdefs.h <<\EOF
14861 #define NCURSES_SP_FUNCS 1
14862 EOF
14863
14864 cat >>confdefs.h <<\EOF
14865 #define HAVE_TPUTS_SP 1
14866 EOF
14867
14868         GENERATED_SP_FUNCS=generated
14869 else
14870         NCURSES_SP_FUNCS=0
14871         GENERATED_SP_FUNCS=
14872 fi
14873
14874 echo "$as_me:14874: checking if you want to build with terminal-driver" >&5
14875 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14876
14877 # Check whether --enable-term-driver or --disable-term-driver was given.
14878 if test "${enable_term_driver+set}" = set; then
14879   enableval="$enable_term_driver"
14880   with_term_driver=$enableval
14881 else
14882   with_term_driver=no
14883 fi;
14884 echo "$as_me:14884: result: $with_term_driver" >&5
14885 echo "${ECHO_T}$with_term_driver" >&6
14886 if test "x$with_term_driver" = xyes ; then
14887
14888 cat >>confdefs.h <<\EOF
14889 #define USE_TERM_DRIVER 1
14890 EOF
14891
14892         if test "x$with_termlib" != xno ; then
14893                 { { echo "$as_me:14893: error: The term-driver option conflicts with the termlib option" >&5
14894 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14895    { (exit 1); exit 1; }; }
14896         fi
14897         if test "x$with_sp_funcs" != xyes ; then
14898                 { { echo "$as_me:14898: error: The term-driver option relies upon sp-funcs" >&5
14899 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14900    { (exit 1); exit 1; }; }
14901         fi
14902 fi
14903
14904 ###   use option --enable-const to turn on use of const beyond that in XSI.
14905 echo "$as_me:14905: checking for extended use of const keyword" >&5
14906 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14907
14908 # Check whether --enable-const or --disable-const was given.
14909 if test "${enable_const+set}" = set; then
14910   enableval="$enable_const"
14911   with_ext_const=$enableval
14912 else
14913   with_ext_const=$cf_dft_ext_const
14914 fi;
14915 echo "$as_me:14915: result: $with_ext_const" >&5
14916 echo "${ECHO_T}$with_ext_const" >&6
14917 NCURSES_CONST='/*nothing*/'
14918 if test "x$with_ext_const" = xyes ; then
14919         NCURSES_CONST=const
14920 fi
14921
14922 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14923 echo "$as_me:14923: checking if you want to use extended colors" >&5
14924 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14925
14926 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14927 if test "${enable_ext_colors+set}" = set; then
14928   enableval="$enable_ext_colors"
14929   with_ext_colors=$enableval
14930 else
14931   with_ext_colors=$cf_dft_ext_colors
14932 fi;
14933 echo "$as_me:14933: result: $with_ext_colors" >&5
14934 echo "${ECHO_T}$with_ext_colors" >&6
14935 NCURSES_EXT_COLORS=0
14936 if test "x$with_ext_colors" = xyes ; then
14937         if test "x$with_widec" != xyes ; then
14938                 { echo "$as_me:14938: WARNING: This option applies only to wide-character library" >&5
14939 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14940         else
14941                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14942
14943 if test "${with_abi_version+set}" != set; then
14944         case "$cf_cv_rel_version" in
14945         (5.*)
14946                 cf_cv_rel_version=6.0
14947                 cf_cv_abi_version=6
14948                 { echo "$as_me:14948: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14949 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14950                 ;;
14951         esac
14952 fi
14953
14954                 NCURSES_EXT_COLORS=1
14955
14956 cat >>confdefs.h <<\EOF
14957 #define NCURSES_EXT_COLORS 1
14958 EOF
14959
14960 cat >>confdefs.h <<\EOF
14961 #define HAVE_ALLOC_PAIR 1
14962 EOF
14963
14964 cat >>confdefs.h <<\EOF
14965 #define HAVE_INIT_EXTENDED_COLOR 1
14966 EOF
14967
14968 cat >>confdefs.h <<\EOF
14969 #define HAVE_RESET_COLOR_PAIRS 1
14970 EOF
14971
14972         fi
14973 fi
14974
14975 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14976 echo "$as_me:14976: checking if you want to use extended mouse encoding" >&5
14977 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14978
14979 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14980 if test "${enable_ext_mouse+set}" = set; then
14981   enableval="$enable_ext_mouse"
14982   with_ext_mouse=$enableval
14983 else
14984   with_ext_mouse=$cf_dft_ext_mouse
14985 fi;
14986 echo "$as_me:14986: result: $with_ext_mouse" >&5
14987 echo "${ECHO_T}$with_ext_mouse" >&6
14988 NCURSES_MOUSE_VERSION=1
14989 if test "x$with_ext_mouse" = xyes ; then
14990         NCURSES_MOUSE_VERSION=2
14991
14992 if test "${with_abi_version+set}" != set; then
14993         case "$cf_cv_rel_version" in
14994         (5.*)
14995                 cf_cv_rel_version=6.0
14996                 cf_cv_abi_version=6
14997                 { echo "$as_me:14997: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14998 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14999                 ;;
15000         esac
15001 fi
15002
15003 fi
15004
15005 ###   use option --enable-ext-putwin to turn on extended screendumps
15006 echo "$as_me:15006: checking if you want to use extended putwin/screendump" >&5
15007 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15008
15009 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15010 if test "${enable_ext_putwin+set}" = set; then
15011   enableval="$enable_ext_putwin"
15012   with_ext_putwin=$enableval
15013 else
15014   with_ext_putwin=$cf_dft_ext_putwin
15015 fi;
15016 echo "$as_me:15016: result: $with_ext_putwin" >&5
15017 echo "${ECHO_T}$with_ext_putwin" >&6
15018 if test "x$with_ext_putwin" = xyes ; then
15019
15020 cat >>confdefs.h <<\EOF
15021 #define NCURSES_EXT_PUTWIN 1
15022 EOF
15023
15024 fi
15025
15026 echo "$as_me:15026: checking if you want \$NCURSES_NO_PADDING code" >&5
15027 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15028
15029 # Check whether --enable-no-padding or --disable-no-padding was given.
15030 if test "${enable_no_padding+set}" = set; then
15031   enableval="$enable_no_padding"
15032   with_no_padding=$enableval
15033 else
15034   with_no_padding=$with_ext_funcs
15035 fi;
15036 echo "$as_me:15036: result: $with_no_padding" >&5
15037 echo "${ECHO_T}$with_no_padding" >&6
15038 test "x$with_no_padding" = xyes &&
15039 cat >>confdefs.h <<\EOF
15040 #define NCURSES_NO_PADDING 1
15041 EOF
15042
15043 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15044 echo "$as_me:15044: checking if you want SIGWINCH handler" >&5
15045 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15046
15047 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15048 if test "${enable_sigwinch+set}" = set; then
15049   enableval="$enable_sigwinch"
15050   with_sigwinch=$enableval
15051 else
15052   with_sigwinch=$with_ext_funcs
15053 fi;
15054 echo "$as_me:15054: result: $with_sigwinch" >&5
15055 echo "${ECHO_T}$with_sigwinch" >&6
15056 test "x$with_sigwinch" = xyes &&
15057 cat >>confdefs.h <<\EOF
15058 #define USE_SIGWINCH 1
15059 EOF
15060
15061 ###   use option --enable-tcap-names to allow user to define new capabilities
15062 echo "$as_me:15062: checking if you want user-definable terminal capabilities like termcap" >&5
15063 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15064
15065 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15066 if test "${enable_tcap_names+set}" = set; then
15067   enableval="$enable_tcap_names"
15068   with_tcap_names=$enableval
15069 else
15070   with_tcap_names=$with_ext_funcs
15071 fi;
15072 echo "$as_me:15072: result: $with_tcap_names" >&5
15073 echo "${ECHO_T}$with_tcap_names" >&6
15074 NCURSES_XNAMES=0
15075 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15076
15077 ##############################################################################
15078
15079 echo "$as_me:15079: checking if you want to link with the pthread library" >&5
15080 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15081
15082 # Check whether --with-pthread or --without-pthread was given.
15083 if test "${with_pthread+set}" = set; then
15084   withval="$with_pthread"
15085   with_pthread=$withval
15086 else
15087   with_pthread=no
15088 fi;
15089 echo "$as_me:15089: result: $with_pthread" >&5
15090 echo "${ECHO_T}$with_pthread" >&6
15091
15092 if test "$with_pthread" != no ; then
15093         echo "$as_me:15093: checking for pthread.h" >&5
15094 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15095 if test "${ac_cv_header_pthread_h+set}" = set; then
15096   echo $ECHO_N "(cached) $ECHO_C" >&6
15097 else
15098   cat >"conftest.$ac_ext" <<_ACEOF
15099 #line 15099 "configure"
15100 #include "confdefs.h"
15101 #include <pthread.h>
15102 _ACEOF
15103 if { (eval echo "$as_me:15103: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15104   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15105   ac_status=$?
15106   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15107   rm -f conftest.er1
15108   cat conftest.err >&5
15109   echo "$as_me:15109: \$? = $ac_status" >&5
15110   (exit "$ac_status"); } >/dev/null; then
15111   if test -s conftest.err; then
15112     ac_cpp_err=$ac_c_preproc_warn_flag
15113   else
15114     ac_cpp_err=
15115   fi
15116 else
15117   ac_cpp_err=yes
15118 fi
15119 if test -z "$ac_cpp_err"; then
15120   ac_cv_header_pthread_h=yes
15121 else
15122   echo "$as_me: failed program was:" >&5
15123   cat "conftest.$ac_ext" >&5
15124   ac_cv_header_pthread_h=no
15125 fi
15126 rm -f conftest.err "conftest.$ac_ext"
15127 fi
15128 echo "$as_me:15128: result: $ac_cv_header_pthread_h" >&5
15129 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15130 if test "$ac_cv_header_pthread_h" = yes; then
15131
15132 cat >>confdefs.h <<\EOF
15133 #define HAVE_PTHREADS_H 1
15134 EOF
15135
15136         for cf_lib_pthread in pthread c_r
15137         do
15138             echo "$as_me:15138: checking if we can link with the $cf_lib_pthread library" >&5
15139 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15140             cf_save_LIBS="$LIBS"
15141
15142 cf_add_libs="$LIBS"
15143 # reverse order
15144 cf_add_0lib=
15145 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15146 # filter duplicates
15147 for cf_add_1lib in $cf_add_0lib; do
15148         for cf_add_2lib in $cf_add_libs; do
15149                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15150                         cf_add_1lib=
15151                         break
15152                 fi
15153         done
15154         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15155 done
15156 LIBS="$cf_add_libs"
15157
15158             cat >"conftest.$ac_ext" <<_ACEOF
15159 #line 15159 "configure"
15160 #include "confdefs.h"
15161
15162 #include <pthread.h>
15163
15164 int
15165 main (void)
15166 {
15167
15168                 int rc = pthread_create(0,0,0,0);
15169                 int r2 = pthread_mutexattr_settype(0, 0);
15170
15171   ;
15172   return 0;
15173 }
15174 _ACEOF
15175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15176 if { (eval echo "$as_me:15176: \"$ac_link\"") >&5
15177   (eval $ac_link) 2>&5
15178   ac_status=$?
15179   echo "$as_me:15179: \$? = $ac_status" >&5
15180   (exit "$ac_status"); } &&
15181          { ac_try='test -s "conftest$ac_exeext"'
15182   { (eval echo "$as_me:15182: \"$ac_try\"") >&5
15183   (eval $ac_try) 2>&5
15184   ac_status=$?
15185   echo "$as_me:15185: \$? = $ac_status" >&5
15186   (exit "$ac_status"); }; }; then
15187   with_pthread=yes
15188 else
15189   echo "$as_me: failed program was:" >&5
15190 cat "conftest.$ac_ext" >&5
15191 with_pthread=no
15192 fi
15193 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15194             LIBS="$cf_save_LIBS"
15195             echo "$as_me:15195: result: $with_pthread" >&5
15196 echo "${ECHO_T}$with_pthread" >&6
15197             test "$with_pthread" = yes && break
15198         done
15199
15200         if test "$with_pthread" = yes ; then
15201
15202 cf_add_libs="$LIBS"
15203 # reverse order
15204 cf_add_0lib=
15205 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15206 # filter duplicates
15207 for cf_add_1lib in $cf_add_0lib; do
15208         for cf_add_2lib in $cf_add_libs; do
15209                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15210                         cf_add_1lib=
15211                         break
15212                 fi
15213         done
15214         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15215 done
15216 LIBS="$cf_add_libs"
15217
15218 cat >>confdefs.h <<\EOF
15219 #define HAVE_LIBPTHREADS 1
15220 EOF
15221
15222         else
15223             { { echo "$as_me:15223: error: Cannot link with pthread library" >&5
15224 echo "$as_me: error: Cannot link with pthread library" >&2;}
15225    { (exit 1); exit 1; }; }
15226         fi
15227
15228 fi
15229
15230 fi
15231
15232 if test "x$with_pthread" != xno; then
15233         echo "$as_me:15233: checking for pthread_kill" >&5
15234 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15235 if test "${ac_cv_func_pthread_kill+set}" = set; then
15236   echo $ECHO_N "(cached) $ECHO_C" >&6
15237 else
15238   cat >"conftest.$ac_ext" <<_ACEOF
15239 #line 15239 "configure"
15240 #include "confdefs.h"
15241 #define pthread_kill autoconf_temporary
15242 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15243 #undef pthread_kill
15244
15245 #ifdef __cplusplus
15246 extern "C"
15247 #endif
15248
15249 /* We use char because int might match the return type of a gcc2
15250    builtin and then its argument prototype would still apply.  */
15251 char pthread_kill (void);
15252
15253 int
15254 main (void)
15255 {
15256
15257 /* The GNU C library defines stubs for functions which it implements
15258     to always fail with ENOSYS.  Some functions are actually named
15259     something starting with __ and the normal name is an alias.  */
15260 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15261 #error found stub for pthread_kill
15262 #endif
15263
15264         return pthread_kill ();
15265   ;
15266   return 0;
15267 }
15268 _ACEOF
15269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15270 if { (eval echo "$as_me:15270: \"$ac_link\"") >&5
15271   (eval $ac_link) 2>&5
15272   ac_status=$?
15273   echo "$as_me:15273: \$? = $ac_status" >&5
15274   (exit "$ac_status"); } &&
15275          { ac_try='test -s "conftest$ac_exeext"'
15276   { (eval echo "$as_me:15276: \"$ac_try\"") >&5
15277   (eval $ac_try) 2>&5
15278   ac_status=$?
15279   echo "$as_me:15279: \$? = $ac_status" >&5
15280   (exit "$ac_status"); }; }; then
15281   ac_cv_func_pthread_kill=yes
15282 else
15283   echo "$as_me: failed program was:" >&5
15284 cat "conftest.$ac_ext" >&5
15285 ac_cv_func_pthread_kill=no
15286 fi
15287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15288 fi
15289 echo "$as_me:15289: result: $ac_cv_func_pthread_kill" >&5
15290 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15291 if test "$ac_cv_func_pthread_kill" = yes; then
15292
15293                 echo "$as_me:15293: checking if you want to allow EINTR in wgetch with pthreads" >&5
15294 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15295
15296 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15297 if test "${enable_pthreads_eintr+set}" = set; then
15298   enableval="$enable_pthreads_eintr"
15299   use_pthreads_eintr=$enableval
15300 else
15301   use_pthreads_eintr=no
15302 fi;
15303                 echo "$as_me:15303: result: $use_pthreads_eintr" >&5
15304 echo "${ECHO_T}$use_pthreads_eintr" >&6
15305                 if test "x$use_pthreads_eintr" = xyes ; then
15306
15307 cat >>confdefs.h <<\EOF
15308 #define USE_PTHREADS_EINTR 1
15309 EOF
15310
15311                 fi
15312 fi
15313
15314         echo "$as_me:15314: checking if you want to use weak-symbols for pthreads" >&5
15315 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15316
15317 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15318 if test "${enable_weak_symbols+set}" = set; then
15319   enableval="$enable_weak_symbols"
15320   use_weak_symbols=$enableval
15321 else
15322   use_weak_symbols=no
15323 fi;
15324         echo "$as_me:15324: result: $use_weak_symbols" >&5
15325 echo "${ECHO_T}$use_weak_symbols" >&6
15326         if test "x$use_weak_symbols" = xyes ; then
15327
15328 echo "$as_me:15328: checking if $CC supports weak symbols" >&5
15329 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15330 if test "${cf_cv_weak_symbols+set}" = set; then
15331   echo $ECHO_N "(cached) $ECHO_C" >&6
15332 else
15333
15334 cat >"conftest.$ac_ext" <<_ACEOF
15335 #line 15335 "configure"
15336 #include "confdefs.h"
15337
15338 #include <stdio.h>
15339 int
15340 main (void)
15341 {
15342
15343 #if defined(__GNUC__)
15344 #  if defined __USE_ISOC99
15345 #    define _cat_pragma(exp)    _Pragma(#exp)
15346 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15347 #  else
15348 #    define _weak_pragma(exp)
15349 #  endif
15350 #  define _declare(name)        __extension__ extern __typeof__(name) name
15351 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15352 #endif
15353
15354 weak_symbol(fopen);
15355
15356   ;
15357   return 0;
15358 }
15359 _ACEOF
15360 rm -f "conftest.$ac_objext"
15361 if { (eval echo "$as_me:15361: \"$ac_compile\"") >&5
15362   (eval $ac_compile) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit "$ac_status"); } &&
15366          { ac_try='test -s "conftest.$ac_objext"'
15367   { (eval echo "$as_me:15367: \"$ac_try\"") >&5
15368   (eval $ac_try) 2>&5
15369   ac_status=$?
15370   echo "$as_me:15370: \$? = $ac_status" >&5
15371   (exit "$ac_status"); }; }; then
15372   cf_cv_weak_symbols=yes
15373 else
15374   echo "$as_me: failed program was:" >&5
15375 cat "conftest.$ac_ext" >&5
15376 cf_cv_weak_symbols=no
15377 fi
15378 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15379
15380 fi
15381 echo "$as_me:15381: result: $cf_cv_weak_symbols" >&5
15382 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15383
15384         else
15385                 cf_cv_weak_symbols=no
15386         fi
15387
15388         if test "x$cf_cv_weak_symbols" = xyes ; then
15389
15390 cat >>confdefs.h <<\EOF
15391 #define USE_WEAK_SYMBOLS 1
15392 EOF
15393
15394         fi
15395 fi
15396
15397 PTHREAD=
15398 if test "x$with_pthread" = "xyes" ; then
15399
15400 cat >>confdefs.h <<\EOF
15401 #define USE_PTHREADS 1
15402 EOF
15403
15404         enable_reentrant=yes
15405         if test "x$cf_cv_weak_symbols" = xyes ; then
15406                 PTHREAD=-lpthread
15407
15408 cf_add_libs="$PRIVATE_LIBS"
15409 # reverse order
15410 cf_add_0lib=
15411 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15412 # filter duplicates
15413 for cf_add_1lib in $cf_add_0lib; do
15414         for cf_add_2lib in $cf_add_libs; do
15415                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15416                         cf_add_1lib=
15417                         break
15418                 fi
15419         done
15420         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15421 done
15422 PRIVATE_LIBS="$cf_add_libs"
15423
15424         fi
15425 fi
15426
15427 # Reentrant code has to be opaque; there's little advantage to making ncurses
15428 # opaque outside of that, so there is no --enable-opaque option.  We can use
15429 # this option without --with-pthreads, but this will be always set for
15430 # pthreads.
15431 echo "$as_me:15431: checking if you want reentrant code" >&5
15432 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15433
15434 # Check whether --enable-reentrant or --disable-reentrant was given.
15435 if test "${enable_reentrant+set}" = set; then
15436   enableval="$enable_reentrant"
15437   with_reentrant=$enableval
15438 else
15439   with_reentrant=no
15440 fi;
15441 echo "$as_me:15441: result: $with_reentrant" >&5
15442 echo "${ECHO_T}$with_reentrant" >&6
15443 if test "x$with_reentrant" = xyes ; then
15444         cf_cv_enable_reentrant=1
15445         cf_cv_enable_opaque="NCURSES_INTERNALS"
15446         NCURSES_SIZE_T=int
15447         if test "x$cf_cv_weak_symbols" = xyes ; then
15448
15449 # remove pthread library from $LIBS
15450 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15451
15452 cf_add_libs="$TEST_LIBS"
15453 # reverse order
15454 cf_add_0lib=
15455 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15456 # filter duplicates
15457 for cf_add_1lib in $cf_add_0lib; do
15458         for cf_add_2lib in $cf_add_libs; do
15459                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15460                         cf_add_1lib=
15461                         break
15462                 fi
15463         done
15464         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15465 done
15466 TEST_LIBS="$cf_add_libs"
15467
15468 cf_add_libs="$TEST_LIBS2"
15469 # reverse order
15470 cf_add_0lib=
15471 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15472 # filter duplicates
15473 for cf_add_1lib in $cf_add_0lib; do
15474         for cf_add_2lib in $cf_add_libs; do
15475                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15476                         cf_add_1lib=
15477                         break
15478                 fi
15479         done
15480         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15481 done
15482 TEST_LIBS2="$cf_add_libs"
15483
15484 cf_add_libs="$PRIVATE_LIBS"
15485 # reverse order
15486 cf_add_0lib=
15487 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15488 # filter duplicates
15489 for cf_add_1lib in $cf_add_0lib; do
15490         for cf_add_2lib in $cf_add_libs; do
15491                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15492                         cf_add_1lib=
15493                         break
15494                 fi
15495         done
15496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15497 done
15498 PRIVATE_LIBS="$cf_add_libs"
15499
15500         else
15501                 # when not using weak symbols but with_reentrant,
15502                 # add 't' to the library suffix on all platforms
15503                 # except cygwin, where we only do that if ALSO
15504                 # compiling with full thread support.
15505                 case "$host" in
15506                 (*cygwin* | *msys*)
15507                         if test "$with_pthread" = "yes" ; then
15508                                 if test "x$disable_lib_suffixes" = "xno" ; then
15509                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15510                                 fi
15511                         fi ;;
15512                 (*)
15513                         if test "x$disable_lib_suffixes" = "xno" ; then
15514                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15515                         fi
15516                         ;;
15517                 esac
15518         fi
15519
15520 cat >>confdefs.h <<\EOF
15521 #define USE_REENTRANT 1
15522 EOF
15523
15524 if test "${with_abi_version+set}" != set; then
15525         case "$cf_cv_rel_version" in
15526         (5.*)
15527                 cf_cv_rel_version=6.0
15528                 cf_cv_abi_version=6
15529                 { echo "$as_me:15529: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15530 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15531                 ;;
15532         esac
15533 fi
15534
15535 else
15536         cf_cv_enable_reentrant=0
15537         cf_cv_enable_opaque="NCURSES_OPAQUE"
15538         NCURSES_SIZE_T=short
15539 fi
15540
15541 echo "$as_me:15541: checking if you want opaque curses-library structures" >&5
15542 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15543
15544 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15545 if test "${enable_opaque_curses+set}" = set; then
15546   enableval="$enable_opaque_curses"
15547   test "$enableval" != yes && enableval=no
15548         if test "$enableval" != "no" ; then
15549     enable_opaque_curses=yes
15550         else
15551
15552          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15553          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15554
15555         fi
15556 else
15557   enableval=no
15558
15559          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15560          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15561
15562 fi;
15563 echo "$as_me:15563: result: $enable_opaque_curses" >&5
15564 echo "${ECHO_T}$enable_opaque_curses" >&6
15565
15566 test "$cf_cv_enable_reentrant" = 1 && \
15567 test "$enable_opaque_curses" = no && \
15568 { { echo "$as_me:15568: error: reentrant configuration requires opaque library" >&5
15569 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15570    { (exit 1); exit 1; }; }
15571
15572 echo "$as_me:15572: checking if you want opaque form-library structures" >&5
15573 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15574
15575 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15576 if test "${enable_opaque_form+set}" = set; then
15577   enableval="$enable_opaque_form"
15578   enable_opaque_form=yes
15579 else
15580   enable_opaque_form=no
15581 fi;
15582 echo "$as_me:15582: result: $enable_opaque_form" >&5
15583 echo "${ECHO_T}$enable_opaque_form" >&6
15584
15585 echo "$as_me:15585: checking if you want opaque menu-library structures" >&5
15586 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15587
15588 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15589 if test "${enable_opaque_menu+set}" = set; then
15590   enableval="$enable_opaque_menu"
15591   enable_opaque_menu=yes
15592 else
15593   enable_opaque_menu=no
15594 fi;
15595 echo "$as_me:15595: result: $enable_opaque_menu" >&5
15596 echo "${ECHO_T}$enable_opaque_menu" >&6
15597
15598 echo "$as_me:15598: checking if you want opaque panel-library structures" >&5
15599 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15600
15601 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15602 if test "${enable_opaque_panel+set}" = set; then
15603   enableval="$enable_opaque_panel"
15604   enable_opaque_panel=yes
15605 else
15606   enable_opaque_panel=no
15607 fi;
15608 echo "$as_me:15608: result: $enable_opaque_panel" >&5
15609 echo "${ECHO_T}$enable_opaque_panel" >&6
15610
15611 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15612 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15613 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15614 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15615
15616 ### Allow using a different wrap-prefix
15617 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15618         echo "$as_me:15618: checking for prefix used to wrap public variables" >&5
15619 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15620
15621 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15622 if test "${with_wrap_prefix+set}" = set; then
15623   withval="$with_wrap_prefix"
15624   NCURSES_WRAP_PREFIX=$withval
15625 else
15626   NCURSES_WRAP_PREFIX=_nc_
15627 fi;
15628         echo "$as_me:15628: result: $NCURSES_WRAP_PREFIX" >&5
15629 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15630 else
15631         NCURSES_WRAP_PREFIX=_nc_
15632 fi
15633
15634 cat >>confdefs.h <<EOF
15635 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15636 EOF
15637
15638 ###############################################################################
15639 # These options are relatively safe to experiment with.
15640
15641 echo "$as_me:15641: checking if you want all development code" >&5
15642 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15643
15644 # Check whether --with-develop or --without-develop was given.
15645 if test "${with_develop+set}" = set; then
15646   withval="$with_develop"
15647   with_develop=$withval
15648 else
15649   with_develop=no
15650 fi;
15651 echo "$as_me:15651: result: $with_develop" >&5
15652 echo "${ECHO_T}$with_develop" >&6
15653
15654 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15655 echo "$as_me:15655: checking if you want hard-tabs code" >&5
15656 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15657
15658 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15659 if test "${enable_hard_tabs+set}" = set; then
15660   enableval="$enable_hard_tabs"
15661
15662 else
15663   enable_hard_tabs=$with_develop
15664 fi;
15665 echo "$as_me:15665: result: $enable_hard_tabs" >&5
15666 echo "${ECHO_T}$enable_hard_tabs" >&6
15667 test "x$enable_hard_tabs" = xyes &&
15668 cat >>confdefs.h <<\EOF
15669 #define USE_HARD_TABS 1
15670 EOF
15671
15672 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15673 echo "$as_me:15673: checking if you want limited support for xmc" >&5
15674 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15675
15676 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15677 if test "${enable_xmc_glitch+set}" = set; then
15678   enableval="$enable_xmc_glitch"
15679
15680 else
15681   enable_xmc_glitch=$with_develop
15682 fi;
15683 echo "$as_me:15683: result: $enable_xmc_glitch" >&5
15684 echo "${ECHO_T}$enable_xmc_glitch" >&6
15685 test "x$enable_xmc_glitch" = xyes &&
15686 cat >>confdefs.h <<\EOF
15687 #define USE_XMC_SUPPORT 1
15688 EOF
15689
15690 ###############################################################################
15691 # These are just experimental, probably should not be in a package:
15692
15693 echo "$as_me:15693: checking if you do not want to assume colors are white-on-black" >&5
15694 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15695
15696 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15697 if test "${enable_assumed_color+set}" = set; then
15698   enableval="$enable_assumed_color"
15699   with_assumed_color=$enableval
15700 else
15701   with_assumed_color=yes
15702 fi;
15703 echo "$as_me:15703: result: $with_assumed_color" >&5
15704 echo "${ECHO_T}$with_assumed_color" >&6
15705 test "x$with_assumed_color" = xyes &&
15706 cat >>confdefs.h <<\EOF
15707 #define USE_ASSUMED_COLOR 1
15708 EOF
15709
15710 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15711 echo "$as_me:15711: checking if you want hashmap scrolling-optimization code" >&5
15712 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15713
15714 # Check whether --enable-hashmap or --disable-hashmap was given.
15715 if test "${enable_hashmap+set}" = set; then
15716   enableval="$enable_hashmap"
15717   with_hashmap=$enableval
15718 else
15719   with_hashmap=yes
15720 fi;
15721 echo "$as_me:15721: result: $with_hashmap" >&5
15722 echo "${ECHO_T}$with_hashmap" >&6
15723 test "x$with_hashmap" = xyes &&
15724 cat >>confdefs.h <<\EOF
15725 #define USE_HASHMAP 1
15726 EOF
15727
15728 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15729 echo "$as_me:15729: checking if you want colorfgbg code" >&5
15730 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15731
15732 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15733 if test "${enable_colorfgbg+set}" = set; then
15734   enableval="$enable_colorfgbg"
15735   with_colorfgbg=$enableval
15736 else
15737   with_colorfgbg=no
15738 fi;
15739 echo "$as_me:15739: result: $with_colorfgbg" >&5
15740 echo "${ECHO_T}$with_colorfgbg" >&6
15741 test "x$with_colorfgbg" = xyes &&
15742 cat >>confdefs.h <<\EOF
15743 #define USE_COLORFGBG 1
15744 EOF
15745
15746 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15747 echo "$as_me:15747: checking if you want to use gcc -fvisibility option" >&5
15748 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15749
15750 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15751 if test "${enable_fvisibility+set}" = set; then
15752   enableval="$enable_fvisibility"
15753   cf_with_fvisibility=$enableval
15754 else
15755   cf_with_fvisibility=no
15756 fi;
15757 echo "$as_me:15757: result: $cf_with_fvisibility" >&5
15758 echo "${ECHO_T}$cf_with_fvisibility" >&6
15759
15760 NCURSES_IMPEXP=
15761 NCURSES_CXX_IMPEXP=
15762 if test "x$cf_with_fvisibility" = xyes; then
15763
15764 echo "$as_me:15764: checking if $CC -fvisibility=hidden option works" >&5
15765 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15766 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15767   echo $ECHO_N "(cached) $ECHO_C" >&6
15768 else
15769
15770     cf_save_cflags="$CFLAGS"
15771     CFLAGS="$CFLAGS -fvisibility=hidden"
15772     cat >"conftest.$ac_ext" <<_ACEOF
15773 #line 15773 "configure"
15774 #include "confdefs.h"
15775
15776 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15777
15778 int
15779 main (void)
15780 {
15781
15782         if (somefunc()) return 1;
15783
15784   ;
15785   return 0;
15786 }
15787 _ACEOF
15788 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15789 if { (eval echo "$as_me:15789: \"$ac_link\"") >&5
15790   (eval $ac_link) 2>&5
15791   ac_status=$?
15792   echo "$as_me:15792: \$? = $ac_status" >&5
15793   (exit "$ac_status"); } &&
15794          { ac_try='test -s "conftest$ac_exeext"'
15795   { (eval echo "$as_me:15795: \"$ac_try\"") >&5
15796   (eval $ac_try) 2>&5
15797   ac_status=$?
15798   echo "$as_me:15798: \$? = $ac_status" >&5
15799   (exit "$ac_status"); }; }; then
15800   cf_cv_fvisibility_hidden=yes
15801 else
15802   echo "$as_me: failed program was:" >&5
15803 cat "conftest.$ac_ext" >&5
15804 cf_cv_fvisibility_hidden=no
15805 fi
15806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15807     CFLAGS=$cf_save_cflags
15808
15809 fi
15810 echo "$as_me:15810: result: $cf_cv_fvisibility_hidden" >&5
15811 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15812
15813         if test "x$cf_cv_fvisibility_hidden" = xyes
15814         then
15815
15816 cf_fix_cppflags=no
15817 cf_new_cflags=
15818 cf_new_cppflags=
15819 cf_new_extra_cppflags=
15820
15821 for cf_add_cflags in -fvisibility=hidden
15822 do
15823 case "$cf_fix_cppflags" in
15824 (no)
15825         case "$cf_add_cflags" in
15826         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15827                 case "$cf_add_cflags" in
15828                 (-D*)
15829                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15830
15831                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15832                                 && test -z "${cf_tst_cflags}" \
15833                                 && cf_fix_cppflags=yes
15834
15835                         if test "$cf_fix_cppflags" = yes ; then
15836
15837         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15838         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15839
15840                                 continue
15841                         elif test "${cf_tst_cflags}" = "\"'" ; then
15842
15843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15845
15846                                 continue
15847                         fi
15848                         ;;
15849                 esac
15850                 case "$CPPFLAGS" in
15851                 (*$cf_add_cflags)
15852                         ;;
15853                 (*)
15854                         case "$cf_add_cflags" in
15855                         (-D*)
15856                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15857
15858 CPPFLAGS=`echo "$CPPFLAGS" | \
15859         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15860                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15861
15862                                 ;;
15863                         esac
15864
15865         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15866         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15867
15868                         ;;
15869                 esac
15870                 ;;
15871         (*)
15872
15873         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15874         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15875
15876                 ;;
15877         esac
15878         ;;
15879 (yes)
15880
15881         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15882         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15883
15884         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15885
15886         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15887                 && test -z "${cf_tst_cflags}" \
15888                 && cf_fix_cppflags=no
15889         ;;
15890 esac
15891 done
15892
15893 if test -n "$cf_new_cflags" ; then
15894
15895         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15896         CFLAGS="${CFLAGS}$cf_new_cflags"
15897
15898 fi
15899
15900 if test -n "$cf_new_cppflags" ; then
15901
15902         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15903         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15904
15905 fi
15906
15907 if test -n "$cf_new_extra_cppflags" ; then
15908
15909         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15910         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15911
15912 fi
15913
15914                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15915         fi
15916         if test -n "$CXX"
15917         then
15918                 ac_ext=cc
15919 ac_cpp='$CXXCPP $CPPFLAGS'
15920 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15921 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15922 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15923 ac_main_return="return"
15924
15925 echo "$as_me:15925: checking if $CXX -fvisibility=hidden option works" >&5
15926 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15927 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15928   echo $ECHO_N "(cached) $ECHO_C" >&6
15929 else
15930
15931     cf_save_cflags="$CXXFLAGS"
15932     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15933     cat >"conftest.$ac_ext" <<_ACEOF
15934 #line 15934 "configure"
15935 #include "confdefs.h"
15936
15937 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15938
15939 int
15940 main (void)
15941 {
15942
15943         if (somefunc()) return 1;
15944
15945   ;
15946   return 0;
15947 }
15948 _ACEOF
15949 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15950 if { (eval echo "$as_me:15950: \"$ac_link\"") >&5
15951   (eval $ac_link) 2>&5
15952   ac_status=$?
15953   echo "$as_me:15953: \$? = $ac_status" >&5
15954   (exit "$ac_status"); } &&
15955          { ac_try='test -s "conftest$ac_exeext"'
15956   { (eval echo "$as_me:15956: \"$ac_try\"") >&5
15957   (eval $ac_try) 2>&5
15958   ac_status=$?
15959   echo "$as_me:15959: \$? = $ac_status" >&5
15960   (exit "$ac_status"); }; }; then
15961   cf_cv_fvisibility_hidden2=yes
15962 else
15963   echo "$as_me: failed program was:" >&5
15964 cat "conftest.$ac_ext" >&5
15965 cf_cv_fvisibility_hidden2=no
15966 fi
15967 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15968     CXXFLAGS=$cf_save_cflags
15969
15970 fi
15971 echo "$as_me:15971: result: $cf_cv_fvisibility_hidden2" >&5
15972 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15973
15974                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15975                 then
15976
15977 cf_save_CXXFLAGS="$CFLAGS"
15978 CFLAGS="$CXXFLAGS"
15979
15980 cf_fix_cppflags=no
15981 cf_new_cflags=
15982 cf_new_cppflags=
15983 cf_new_extra_cppflags=
15984
15985 for cf_add_cflags in -fvisibility=hidden
15986 do
15987 case "$cf_fix_cppflags" in
15988 (no)
15989         case "$cf_add_cflags" in
15990         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15991                 case "$cf_add_cflags" in
15992                 (-D*)
15993                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15994
15995                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15996                                 && test -z "${cf_tst_cflags}" \
15997                                 && cf_fix_cppflags=yes
15998
15999                         if test "$cf_fix_cppflags" = yes ; then
16000
16001         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16002         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16003
16004                                 continue
16005                         elif test "${cf_tst_cflags}" = "\"'" ; then
16006
16007         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16008         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16009
16010                                 continue
16011                         fi
16012                         ;;
16013                 esac
16014                 case "$CPPFLAGS" in
16015                 (*$cf_add_cflags)
16016                         ;;
16017                 (*)
16018                         case "$cf_add_cflags" in
16019                         (-D*)
16020                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16021
16022 CPPFLAGS=`echo "$CPPFLAGS" | \
16023         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16024                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16025
16026                                 ;;
16027                         esac
16028
16029         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16030         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16031
16032                         ;;
16033                 esac
16034                 ;;
16035         (*)
16036
16037         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16038         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16039
16040                 ;;
16041         esac
16042         ;;
16043 (yes)
16044
16045         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16046         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16047
16048         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16049
16050         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16051                 && test -z "${cf_tst_cflags}" \
16052                 && cf_fix_cppflags=no
16053         ;;
16054 esac
16055 done
16056
16057 if test -n "$cf_new_cflags" ; then
16058
16059         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16060         CFLAGS="${CFLAGS}$cf_new_cflags"
16061
16062 fi
16063
16064 if test -n "$cf_new_cppflags" ; then
16065
16066         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16067         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16068
16069 fi
16070
16071 if test -n "$cf_new_extra_cppflags" ; then
16072
16073         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16074         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16075
16076 fi
16077
16078 CXXFLAGS="$CFLAGS"
16079 CFLAGS="$cf_save_CXXFLAGS"
16080
16081                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16082                 fi
16083                 ac_ext=c
16084 ac_cpp='$CPP $CPPFLAGS'
16085 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16086 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16088 ac_main_return="return"
16089
16090         fi
16091 fi
16092
16093 ###   use option --enable-interop to turn on use of bindings used for interop
16094 echo "$as_me:16094: checking if you want interop bindings" >&5
16095 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16096
16097 # Check whether --enable-interop or --disable-interop was given.
16098 if test "${enable_interop+set}" = set; then
16099   enableval="$enable_interop"
16100   with_exp_interop=$enableval
16101 else
16102   with_exp_interop=$cf_dft_interop
16103 fi;
16104 echo "$as_me:16104: result: $with_exp_interop" >&5
16105 echo "${ECHO_T}$with_exp_interop" >&6
16106
16107 NCURSES_INTEROP_FUNCS=0
16108 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16109
16110 echo "$as_me:16110: checking if you want experimental safe-sprintf code" >&5
16111 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16112
16113 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16114 if test "${enable_safe_sprintf+set}" = set; then
16115   enableval="$enable_safe_sprintf"
16116   with_safe_sprintf=$enableval
16117 else
16118   with_safe_sprintf=no
16119 fi;
16120 echo "$as_me:16120: result: $with_safe_sprintf" >&5
16121 echo "${ECHO_T}$with_safe_sprintf" >&6
16122
16123 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16124 # when hashmap is used scroll hints are useless
16125 if test "$with_hashmap" = no ; then
16126 echo "$as_me:16126: checking if you want to experiment without scrolling-hints code" >&5
16127 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16128
16129 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16130 if test "${enable_scroll_hints+set}" = set; then
16131   enableval="$enable_scroll_hints"
16132   with_scroll_hints=$enableval
16133 else
16134   with_scroll_hints=yes
16135 fi;
16136 echo "$as_me:16136: result: $with_scroll_hints" >&5
16137 echo "${ECHO_T}$with_scroll_hints" >&6
16138 test "x$with_scroll_hints" = xyes &&
16139 cat >>confdefs.h <<\EOF
16140 #define USE_SCROLL_HINTS 1
16141 EOF
16142
16143 fi
16144
16145 echo "$as_me:16145: checking if you want wgetch-events code" >&5
16146 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16147
16148 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16149 if test "${enable_wgetch_events+set}" = set; then
16150   enableval="$enable_wgetch_events"
16151   with_wgetch_events=$enableval
16152 else
16153   with_wgetch_events=no
16154 fi;
16155 echo "$as_me:16155: result: $with_wgetch_events" >&5
16156 echo "${ECHO_T}$with_wgetch_events" >&6
16157 if test "x$with_wgetch_events" = xyes ; then
16158
16159 cat >>confdefs.h <<\EOF
16160 #define NCURSES_WGETCH_EVENTS 1
16161 EOF
16162
16163         NCURSES_WGETCH_EVENTS=1
16164 else
16165         NCURSES_WGETCH_EVENTS=0
16166 fi
16167
16168 case "$cf_cv_system_name" in
16169 (*mingw32*|*mingw64*|*-msvc*)
16170         echo "$as_me:16170: checking if you want experimental-Windows driver" >&5
16171 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16172
16173 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16174 if test "${enable_exp_win32+set}" = set; then
16175   enableval="$enable_exp_win32"
16176   with_exp_win32=$enableval
16177 else
16178   with_exp_win32=no
16179 fi;
16180         echo "$as_me:16180: result: $with_exp_win32" >&5
16181 echo "${ECHO_T}$with_exp_win32" >&6
16182         if test "x$with_exp_win32" = xyes
16183         then
16184
16185 cat >>confdefs.h <<\EOF
16186 #define EXP_WIN32_DRIVER 1
16187 EOF
16188
16189                 EXP_WIN32_DRIVER=1
16190                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16191         else
16192                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16193                 EXP_WIN32_DRIVER=0
16194         fi
16195         ;;
16196 (*)
16197         EXP_WIN32_DRIVER=0
16198         INTERNALS_HDR=
16199         ;;
16200 esac
16201
16202 ###############################################################################
16203
16204 ###     use option --disable-echo to suppress full display compiling commands
16205
16206 echo "$as_me:16206: checking if you want to see long compiling messages" >&5
16207 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16208
16209 # Check whether --enable-echo or --disable-echo was given.
16210 if test "${enable_echo+set}" = set; then
16211   enableval="$enable_echo"
16212   test "$enableval" != no && enableval=yes
16213         if test "$enableval" != "yes" ; then
16214
16215         ECHO_LT='--silent'
16216         ECHO_LD='@echo linking $@;'
16217         RULE_CC='@echo compiling $<'
16218         SHOW_CC='@echo compiling $@'
16219         ECHO_CC='@'
16220
16221         else
16222
16223         ECHO_LT=''
16224         ECHO_LD=''
16225         RULE_CC=''
16226         SHOW_CC=''
16227         ECHO_CC=''
16228
16229         fi
16230 else
16231   enableval=yes
16232
16233         ECHO_LT=''
16234         ECHO_LD=''
16235         RULE_CC=''
16236         SHOW_CC=''
16237         ECHO_CC=''
16238
16239 fi;
16240 echo "$as_me:16240: result: $enableval" >&5
16241 echo "${ECHO_T}$enableval" >&6
16242
16243 if test "x$enable_echo" = xyes; then
16244         ECHO_LINK=
16245 else
16246         ECHO_LINK='@ echo linking $@ ... ;'
16247         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16248         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16249 fi
16250
16251 # --disable-stripping is used for debugging
16252
16253 echo "$as_me:16253: checking if you want to install stripped executables" >&5
16254 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16255
16256 # Check whether --enable-stripping or --disable-stripping was given.
16257 if test "${enable_stripping+set}" = set; then
16258   enableval="$enable_stripping"
16259   test "$enableval" != no && enableval=yes
16260         if test "$enableval" != "yes" ; then
16261     enable_stripping=no
16262         else
16263                 enable_stripping=yes
16264         fi
16265 else
16266   enableval=yes
16267         enable_stripping=yes
16268
16269 fi;
16270 echo "$as_me:16270: result: $enable_stripping" >&5
16271 echo "${ECHO_T}$enable_stripping" >&6
16272
16273 if test "$enable_stripping" = yes
16274 then
16275         INSTALL_OPT_S="-s"
16276 else
16277         INSTALL_OPT_S=
16278 fi
16279
16280 : "${INSTALL:=install}"
16281 echo "$as_me:16281: checking if install accepts -p option" >&5
16282 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16283 if test "${cf_cv_install_p+set}" = set; then
16284   echo $ECHO_N "(cached) $ECHO_C" >&6
16285 else
16286
16287         rm -rf ./conftest*
16288         date >conftest.in
16289         mkdir conftest.out
16290         sleep 3
16291         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16292         then
16293                 if test -f conftest.out/conftest.in
16294                 then
16295                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16296                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16297                         if test -s conftest.err
16298                         then
16299                                 cf_cv_install_p=no
16300                         else
16301                                 cf_cv_install_p=yes
16302                         fi
16303                 else
16304                         cf_cv_install_p=no
16305                 fi
16306         else
16307                 cf_cv_install_p=no
16308         fi
16309         rm -rf ./conftest*
16310
16311 fi
16312 echo "$as_me:16312: result: $cf_cv_install_p" >&5
16313 echo "${ECHO_T}$cf_cv_install_p" >&6
16314
16315 echo "$as_me:16315: checking if install needs to be told about ownership" >&5
16316 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16317 case `$ac_config_guess` in
16318 (*minix)
16319         with_install_o=yes
16320         ;;
16321 (*)
16322         with_install_o=no
16323         ;;
16324 esac
16325
16326 echo "$as_me:16326: result: $with_install_o" >&5
16327 echo "${ECHO_T}$with_install_o" >&6
16328 if test "x$with_install_o" = xyes
16329 then
16330         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'`"
16331 else
16332         INSTALL_OPT_O=
16333 fi
16334
16335 # If we're avoiding relinking of shared libraries during install, that is to
16336 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16337 # the install program has "-p" (for preserving timestamps).
16338 cf_cv_do_reranlib=yes
16339 if test "x$cf_cv_install_p" = xyes
16340 then
16341         if test "x$cf_cv_do_relink" != xyes
16342         then
16343                 cf_cv_do_reranlib=no
16344                 INSTALL_OPT_P="-p"
16345                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16346         fi
16347 fi
16348
16349 ###     use option --enable-warnings to turn on all gcc warnings
16350
16351 if test "$GCC" = yes || test "$GXX" = yes
16352 then
16353
16354 if test "$GCC" = yes || test "$GXX" = yes
16355 then
16356         case $CFLAGS in
16357         (*-Werror=*)
16358                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16359
16360 echo "${as_me:-configure}:16360: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16361
16362                 cf_temp_flags=
16363                 for cf_temp_scan in $CFLAGS
16364                 do
16365                         case "x$cf_temp_scan" in
16366                         (x-Werror=*)
16367
16368         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16369         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16370
16371                                 ;;
16372                         (*)
16373
16374         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16375         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16376
16377                                 ;;
16378                         esac
16379                 done
16380                 CFLAGS="$cf_temp_flags"
16381                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16382
16383 echo "${as_me:-configure}:16383: testing ... fixed $CFLAGS ..." 1>&5
16384
16385                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16386
16387 echo "${as_me:-configure}:16387: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16388
16389                 ;;
16390         esac
16391 fi
16392
16393 if test "$GCC" = yes || test "$GXX" = yes
16394 then
16395         case $CPPFLAGS in
16396         (*-Werror=*)
16397                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16398
16399 echo "${as_me:-configure}:16399: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16400
16401                 cf_temp_flags=
16402                 for cf_temp_scan in $CPPFLAGS
16403                 do
16404                         case "x$cf_temp_scan" in
16405                         (x-Werror=*)
16406
16407         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16408         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16409
16410                                 ;;
16411                         (*)
16412
16413         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16414         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16415
16416                                 ;;
16417                         esac
16418                 done
16419                 CPPFLAGS="$cf_temp_flags"
16420                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16421
16422 echo "${as_me:-configure}:16422: testing ... fixed $CPPFLAGS ..." 1>&5
16423
16424                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16425
16426 echo "${as_me:-configure}:16426: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16427
16428                 ;;
16429         esac
16430 fi
16431
16432 if test "$GCC" = yes || test "$GXX" = yes
16433 then
16434         case $LDFLAGS in
16435         (*-Werror=*)
16436                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16437
16438 echo "${as_me:-configure}:16438: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16439
16440                 cf_temp_flags=
16441                 for cf_temp_scan in $LDFLAGS
16442                 do
16443                         case "x$cf_temp_scan" in
16444                         (x-Werror=*)
16445
16446         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16447         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16448
16449                                 ;;
16450                         (*)
16451
16452         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16453         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16454
16455                                 ;;
16456                         esac
16457                 done
16458                 LDFLAGS="$cf_temp_flags"
16459                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16460
16461 echo "${as_me:-configure}:16461: testing ... fixed $LDFLAGS ..." 1>&5
16462
16463                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16464
16465 echo "${as_me:-configure}:16465: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16466
16467                 ;;
16468         esac
16469 fi
16470
16471 echo "$as_me:16471: checking if you want to turn on gcc warnings" >&5
16472 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16473
16474 # Check whether --enable-warnings or --disable-warnings was given.
16475 if test "${enable_warnings+set}" = set; then
16476   enableval="$enable_warnings"
16477   test "$enableval" != yes && enableval=no
16478         if test "$enableval" != "no" ; then
16479     enable_warnings=yes
16480         else
16481                 enable_warnings=no
16482         fi
16483 else
16484   enableval=no
16485         enable_warnings=no
16486
16487 fi;
16488 echo "$as_me:16488: result: $enable_warnings" >&5
16489 echo "${ECHO_T}$enable_warnings" >&6
16490 if test "$enable_warnings" = "yes"
16491 then
16492
16493 if test "x$have_x" = xyes; then
16494
16495 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16496 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16497 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16498 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16499 for cf_X_CFLAGS in $X_CFLAGS
16500 do
16501         case "x$cf_X_CFLAGS" in
16502         x-[IUD]*)
16503                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16504                 ;;
16505         *)
16506                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16507                 ;;
16508         esac
16509 done
16510
16511 cat >"conftest.$ac_ext" <<_ACEOF
16512 #line 16512 "configure"
16513 #include "confdefs.h"
16514
16515 #include <stdlib.h>
16516 #include <X11/Intrinsic.h>
16517
16518 int
16519 main (void)
16520 {
16521 String foo = malloc(1); (void)foo
16522   ;
16523   return 0;
16524 }
16525 _ACEOF
16526 rm -f "conftest.$ac_objext"
16527 if { (eval echo "$as_me:16527: \"$ac_compile\"") >&5
16528   (eval $ac_compile) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit "$ac_status"); } &&
16532          { ac_try='test -s "conftest.$ac_objext"'
16533   { (eval echo "$as_me:16533: \"$ac_try\"") >&5
16534   (eval $ac_try) 2>&5
16535   ac_status=$?
16536   echo "$as_me:16536: \$? = $ac_status" >&5
16537   (exit "$ac_status"); }; }; then
16538
16539 echo "$as_me:16539: checking for X11/Xt const-feature" >&5
16540 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16541 if test "${cf_cv_const_x_string+set}" = set; then
16542   echo $ECHO_N "(cached) $ECHO_C" >&6
16543 else
16544
16545         cat >"conftest.$ac_ext" <<_ACEOF
16546 #line 16546 "configure"
16547 #include "confdefs.h"
16548
16549 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16550 #undef  XTSTRINGDEFINES /* X11R5 and later */
16551 #include <stdlib.h>
16552 #include <X11/Intrinsic.h>
16553
16554 int
16555 main (void)
16556 {
16557 String foo = malloc(1); *foo = 0
16558   ;
16559   return 0;
16560 }
16561 _ACEOF
16562 rm -f "conftest.$ac_objext"
16563 if { (eval echo "$as_me:16563: \"$ac_compile\"") >&5
16564   (eval $ac_compile) 2>&5
16565   ac_status=$?
16566   echo "$as_me:16566: \$? = $ac_status" >&5
16567   (exit "$ac_status"); } &&
16568          { ac_try='test -s "conftest.$ac_objext"'
16569   { (eval echo "$as_me:16569: \"$ac_try\"") >&5
16570   (eval $ac_try) 2>&5
16571   ac_status=$?
16572   echo "$as_me:16572: \$? = $ac_status" >&5
16573   (exit "$ac_status"); }; }; then
16574
16575                         cf_cv_const_x_string=no
16576
16577 else
16578   echo "$as_me: failed program was:" >&5
16579 cat "conftest.$ac_ext" >&5
16580
16581                         cf_cv_const_x_string=yes
16582
16583 fi
16584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16585
16586 fi
16587 echo "$as_me:16587: result: $cf_cv_const_x_string" >&5
16588 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16589
16590 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16591 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16592 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16593
16594 case "$cf_cv_const_x_string" in
16595 (no)
16596
16597         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16598         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16599
16600         ;;
16601 (*)
16602
16603         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16604         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16605
16606         ;;
16607 esac
16608
16609 else
16610   echo "$as_me: failed program was:" >&5
16611 cat "conftest.$ac_ext" >&5
16612 fi
16613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16614  fi
16615 cat > "conftest.$ac_ext" <<EOF
16616 #line 16616 "${as_me:-configure}"
16617 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16618 EOF
16619 if test "$INTEL_COMPILER" = yes
16620 then
16621 # The "-wdXXX" options suppress warnings:
16622 # remark #1419: external declaration in primary source file
16623 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16624 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16625 # remark #193: zero used for undefined preprocessing identifier
16626 # remark #593: variable "curs_sb_left_arrow" was set but never used
16627 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16628 # remark #869: parameter "tw" was never referenced
16629 # remark #981: operands are evaluated in unspecified order
16630 # warning #279: controlling expression is constant
16631
16632         { echo "$as_me:16632: checking for $CC warning options..." >&5
16633 echo "$as_me: checking for $CC warning options..." >&6;}
16634         cf_save_CFLAGS="$CFLAGS"
16635         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16636         for cf_opt in \
16637                 wd1419 \
16638                 wd1683 \
16639                 wd1684 \
16640                 wd193 \
16641                 wd593 \
16642                 wd279 \
16643                 wd810 \
16644                 wd869 \
16645                 wd981
16646         do
16647                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16648                 if { (eval echo "$as_me:16648: \"$ac_compile\"") >&5
16649   (eval $ac_compile) 2>&5
16650   ac_status=$?
16651   echo "$as_me:16651: \$? = $ac_status" >&5
16652   (exit "$ac_status"); }; then
16653                         test -n "$verbose" && echo "$as_me:16653: result: ... -$cf_opt" >&5
16654 echo "${ECHO_T}... -$cf_opt" >&6
16655                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16656                 fi
16657         done
16658         CFLAGS="$cf_save_CFLAGS"
16659 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16660 then
16661         { echo "$as_me:16661: checking for $CC warning options..." >&5
16662 echo "$as_me: checking for $CC warning options..." >&6;}
16663         cf_save_CFLAGS="$CFLAGS"
16664         cf_warn_CONST=""
16665         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16666         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16667         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16668         for cf_opt in W Wall \
16669                 Wbad-function-cast \
16670                 Wcast-align \
16671                 Wcast-qual \
16672                 Wdeclaration-after-statement \
16673                 Wextra \
16674                 Winline \
16675                 Wmissing-declarations \
16676                 Wmissing-prototypes \
16677                 Wnested-externs \
16678                 Wpointer-arith \
16679                 Wshadow \
16680                 Wstrict-prototypes \
16681                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16682         do
16683                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16684                 if { (eval echo "$as_me:16684: \"$ac_compile\"") >&5
16685   (eval $ac_compile) 2>&5
16686   ac_status=$?
16687   echo "$as_me:16687: \$? = $ac_status" >&5
16688   (exit "$ac_status"); }; then
16689                         test -n "$verbose" && echo "$as_me:16689: result: ... -$cf_opt" >&5
16690 echo "${ECHO_T}... -$cf_opt" >&6
16691                         case "$cf_opt" in
16692                         (Winline)
16693                                 case "$GCC_VERSION" in
16694                                 ([34].*)
16695                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16696
16697 echo "${as_me:-configure}:16697: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16698
16699                                         continue;;
16700                                 esac
16701                                 ;;
16702                         (Wpointer-arith)
16703                                 case "$GCC_VERSION" in
16704                                 ([12].*)
16705                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16706
16707 echo "${as_me:-configure}:16707: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16708
16709                                         continue;;
16710                                 esac
16711                                 ;;
16712                         esac
16713                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16714                 fi
16715         done
16716         CFLAGS="$cf_save_CFLAGS"
16717 fi
16718 rm -rf ./conftest*
16719
16720 fi
16721
16722 if test "$GCC" = yes || test "$GXX" = yes
16723 then
16724 cat > conftest.i <<EOF
16725 #ifndef GCC_PRINTF
16726 #define GCC_PRINTF 0
16727 #endif
16728 #ifndef GCC_SCANF
16729 #define GCC_SCANF 0
16730 #endif
16731 #ifndef GCC_NORETURN
16732 #define GCC_NORETURN /* nothing */
16733 #endif
16734 #ifndef GCC_UNUSED
16735 #define GCC_UNUSED /* nothing */
16736 #endif
16737 EOF
16738 if test "$GCC" = yes
16739 then
16740         { echo "$as_me:16740: checking for $CC __attribute__ directives..." >&5
16741 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16742 cat > "conftest.$ac_ext" <<EOF
16743 #line 16743 "${as_me:-configure}"
16744 #include "confdefs.h"
16745 #include "conftest.h"
16746 #include "conftest.i"
16747 #if     GCC_PRINTF
16748 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16749 #else
16750 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16751 #endif
16752 #if     GCC_SCANF
16753 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16754 #else
16755 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16756 #endif
16757 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16758 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16759 extern void foo(void) GCC_NORETURN;
16760 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16761 EOF
16762         cf_printf_attribute=no
16763         cf_scanf_attribute=no
16764         for cf_attribute in scanf printf unused noreturn
16765         do
16766
16767 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16768
16769                 cf_directive="__attribute__(($cf_attribute))"
16770                 echo "checking for $CC $cf_directive" 1>&5
16771
16772                 case "$cf_attribute" in
16773                 (printf)
16774                         cf_printf_attribute=yes
16775                         cat >conftest.h <<EOF
16776 #define GCC_$cf_ATTRIBUTE 1
16777 EOF
16778                         ;;
16779                 (scanf)
16780                         cf_scanf_attribute=yes
16781                         cat >conftest.h <<EOF
16782 #define GCC_$cf_ATTRIBUTE 1
16783 EOF
16784                         ;;
16785                 (*)
16786                         cat >conftest.h <<EOF
16787 #define GCC_$cf_ATTRIBUTE $cf_directive
16788 EOF
16789                         ;;
16790                 esac
16791
16792                 if { (eval echo "$as_me:16792: \"$ac_compile\"") >&5
16793   (eval $ac_compile) 2>&5
16794   ac_status=$?
16795   echo "$as_me:16795: \$? = $ac_status" >&5
16796   (exit "$ac_status"); }; then
16797                         test -n "$verbose" && echo "$as_me:16797: result: ... $cf_attribute" >&5
16798 echo "${ECHO_T}... $cf_attribute" >&6
16799                         cat conftest.h >>confdefs.h
16800                         case "$cf_attribute" in
16801                         (noreturn)
16802
16803 cat >>confdefs.h <<EOF
16804 #define GCC_NORETURN $cf_directive
16805 EOF
16806
16807                                 ;;
16808                         (printf)
16809                                 cf_value='/* nothing */'
16810                                 if test "$cf_printf_attribute" != no ; then
16811                                         cf_value='__attribute__((format(printf,fmt,var)))'
16812
16813 cat >>confdefs.h <<\EOF
16814 #define GCC_PRINTF 1
16815 EOF
16816
16817                                 fi
16818
16819 cat >>confdefs.h <<EOF
16820 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16821 EOF
16822
16823                                 ;;
16824                         (scanf)
16825                                 cf_value='/* nothing */'
16826                                 if test "$cf_scanf_attribute" != no ; then
16827                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16828
16829 cat >>confdefs.h <<\EOF
16830 #define GCC_SCANF 1
16831 EOF
16832
16833                                 fi
16834
16835 cat >>confdefs.h <<EOF
16836 #define GCC_SCANFLIKE(fmt,var) $cf_value
16837 EOF
16838
16839                                 ;;
16840                         (unused)
16841
16842 cat >>confdefs.h <<EOF
16843 #define GCC_UNUSED $cf_directive
16844 EOF
16845
16846                                 ;;
16847                         esac
16848                 fi
16849         done
16850 else
16851         ${FGREP-fgrep} define conftest.i >>confdefs.h
16852 fi
16853 rm -rf ./conftest*
16854 fi
16855
16856 fi
16857
16858 if test "x$enable_warnings" = "xyes"; then
16859
16860         ADAFLAGS="$ADAFLAGS -gnatg"
16861
16862         if test "x$cf_with_cxx" = xyes ; then
16863
16864 INTEL_CPLUSPLUS=no
16865
16866 if test "$GCC" = yes ; then
16867         case "$host_os" in
16868         (linux*|gnu*)
16869                 echo "$as_me:16869: checking if this is really Intel C++ compiler" >&5
16870 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16871                 cf_save_CFLAGS="$CXXFLAGS"
16872                 CXXFLAGS="$CXXFLAGS -no-gcc"
16873                 cat >"conftest.$ac_ext" <<_ACEOF
16874 #line 16874 "configure"
16875 #include "confdefs.h"
16876
16877 int
16878 main (void)
16879 {
16880
16881 #ifdef __INTEL_COMPILER
16882 #else
16883 make an error
16884 #endif
16885
16886   ;
16887   return 0;
16888 }
16889 _ACEOF
16890 rm -f "conftest.$ac_objext"
16891 if { (eval echo "$as_me:16891: \"$ac_compile\"") >&5
16892   (eval $ac_compile) 2>&5
16893   ac_status=$?
16894   echo "$as_me:16894: \$? = $ac_status" >&5
16895   (exit "$ac_status"); } &&
16896          { ac_try='test -s "conftest.$ac_objext"'
16897   { (eval echo "$as_me:16897: \"$ac_try\"") >&5
16898   (eval $ac_try) 2>&5
16899   ac_status=$?
16900   echo "$as_me:16900: \$? = $ac_status" >&5
16901   (exit "$ac_status"); }; }; then
16902   INTEL_CPLUSPLUS=yes
16903 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16904
16905 else
16906   echo "$as_me: failed program was:" >&5
16907 cat "conftest.$ac_ext" >&5
16908 fi
16909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16910                 CXXFLAGS="$cf_save_CFLAGS"
16911                 echo "$as_me:16911: result: $INTEL_CPLUSPLUS" >&5
16912 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16913                 ;;
16914         esac
16915 fi
16916
16917 CLANG_CPLUSPLUS=no
16918
16919 if test "$GCC" = yes ; then
16920         echo "$as_me:16920: checking if this is really Clang C++ compiler" >&5
16921 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16922         cf_save_CFLAGS="$CXXFLAGS"
16923         cat >"conftest.$ac_ext" <<_ACEOF
16924 #line 16924 "configure"
16925 #include "confdefs.h"
16926
16927 int
16928 main (void)
16929 {
16930
16931 #ifdef __clang__
16932 #else
16933 make an error
16934 #endif
16935
16936   ;
16937   return 0;
16938 }
16939 _ACEOF
16940 rm -f "conftest.$ac_objext"
16941 if { (eval echo "$as_me:16941: \"$ac_compile\"") >&5
16942   (eval $ac_compile) 2>&5
16943   ac_status=$?
16944   echo "$as_me:16944: \$? = $ac_status" >&5
16945   (exit "$ac_status"); } &&
16946          { ac_try='test -s "conftest.$ac_objext"'
16947   { (eval echo "$as_me:16947: \"$ac_try\"") >&5
16948   (eval $ac_try) 2>&5
16949   ac_status=$?
16950   echo "$as_me:16950: \$? = $ac_status" >&5
16951   (exit "$ac_status"); }; }; then
16952   CLANG_CPLUSPLUS=yes
16953
16954 else
16955   echo "$as_me: failed program was:" >&5
16956 cat "conftest.$ac_ext" >&5
16957 fi
16958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16959         CXXFLAGS="$cf_save_CFLAGS"
16960         echo "$as_me:16960: result: $CLANG_CPLUSPLUS" >&5
16961 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16962 fi
16963
16964 CLANG_VERSION=none
16965
16966 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16967         case "$CC" in
16968         (c[1-9][0-9]|*/c[1-9][0-9])
16969                 { echo "$as_me:16969: WARNING: replacing broken compiler alias $CC" >&5
16970 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16971                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16972                 CC=clang
16973                 ;;
16974         esac
16975
16976         echo "$as_me:16976: checking version of $CC" >&5
16977 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16978         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.].*//'`"
16979         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16980         echo "$as_me:16980: result: $CLANG_VERSION" >&5
16981 echo "${ECHO_T}$CLANG_VERSION" >&6
16982
16983         for cf_clang_opt in \
16984                 -Qunused-arguments \
16985                 -Wno-error=implicit-function-declaration
16986         do
16987                 echo "$as_me:16987: checking if option $cf_clang_opt works" >&5
16988 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16989                 cf_save_CFLAGS="$CFLAGS"
16990                 CFLAGS="$CFLAGS $cf_clang_opt"
16991                 cat >"conftest.$ac_ext" <<_ACEOF
16992 #line 16992 "configure"
16993 #include "confdefs.h"
16994
16995                         #include <stdio.h>
16996 int
16997 main (void)
16998 {
16999
17000                         printf("hello!\\n");
17001   ;
17002   return 0;
17003 }
17004 _ACEOF
17005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17006 if { (eval echo "$as_me:17006: \"$ac_link\"") >&5
17007   (eval $ac_link) 2>&5
17008   ac_status=$?
17009   echo "$as_me:17009: \$? = $ac_status" >&5
17010   (exit "$ac_status"); } &&
17011          { ac_try='test -s "conftest$ac_exeext"'
17012   { (eval echo "$as_me:17012: \"$ac_try\"") >&5
17013   (eval $ac_try) 2>&5
17014   ac_status=$?
17015   echo "$as_me:17015: \$? = $ac_status" >&5
17016   (exit "$ac_status"); }; }; then
17017
17018                         cf_clang_optok=yes
17019 else
17020   echo "$as_me: failed program was:" >&5
17021 cat "conftest.$ac_ext" >&5
17022
17023                         cf_clang_optok=no
17024 fi
17025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17026                 echo "$as_me:17026: result: $cf_clang_optok" >&5
17027 echo "${ECHO_T}$cf_clang_optok" >&6
17028                 CFLAGS="$cf_save_CFLAGS"
17029                 if test "$cf_clang_optok" = yes; then
17030                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17031
17032 echo "${as_me:-configure}:17032: testing adding option $cf_clang_opt ..." 1>&5
17033
17034         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17035         CFLAGS="${CFLAGS}$cf_clang_opt"
17036
17037                 fi
17038         done
17039 fi
17040
17041 ac_ext=cc
17042 ac_cpp='$CXXCPP $CPPFLAGS'
17043 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17044 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17045 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17046 ac_main_return="return"
17047
17048 cat > conftest.$ac_ext <<EOF
17049 #line 17049 "configure"
17050 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17051 EOF
17052
17053 if test "$INTEL_CPLUSPLUS" = yes
17054 then
17055 # The "-wdXXX" options suppress warnings:
17056 # remark #1419: external declaration in primary source file
17057 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17058 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17059 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17060 # remark #193: zero used for undefined preprocessing identifier
17061 # remark #593: variable "curs_sb_left_arrow" was set but never used
17062 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17063 # remark #869: parameter "tw" was never referenced
17064 # remark #981: operands are evaluated in unspecified order
17065 # warning #269: invalid format string conversion
17066
17067         { echo "$as_me:17067: checking for $CC warning options..." >&5
17068 echo "$as_me: checking for $CC warning options..." >&6;}
17069         cf_save_CXXFLAGS="$CXXFLAGS"
17070         EXTRA_CXXFLAGS="-Wall"
17071         for cf_opt in \
17072                 wd1419 \
17073                 wd1682 \
17074                 wd1683 \
17075                 wd1684 \
17076                 wd193 \
17077                 wd279 \
17078                 wd593 \
17079                 wd810 \
17080                 wd869 \
17081                 wd981
17082         do
17083                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17084                 if { (eval echo "$as_me:17084: \"$ac_compile\"") >&5
17085   (eval $ac_compile) 2>&5
17086   ac_status=$?
17087   echo "$as_me:17087: \$? = $ac_status" >&5
17088   (exit "$ac_status"); }; then
17089                         test -n "$verbose" && echo "$as_me:17089: result: ... -$cf_opt" >&5
17090 echo "${ECHO_T}... -$cf_opt" >&6
17091                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17092                 fi
17093         done
17094         CXXFLAGS="$cf_save_CXXFLAGS"
17095
17096 elif test "$GXX" = yes
17097 then
17098         { echo "$as_me:17098: checking for $CXX warning options..." >&5
17099 echo "$as_me: checking for $CXX warning options..." >&6;}
17100         cf_save_CXXFLAGS="$CXXFLAGS"
17101         EXTRA_CXXFLAGS="-W -Wall"
17102         cf_gxx_extra_warnings=""
17103         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17104         case "$GXX_VERSION" in
17105         ([1-2].*)
17106                 ;;
17107         (*)
17108                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17109                 ;;
17110         esac
17111         for cf_opt in \
17112                 Wabi \
17113                 fabi-version=0 \
17114                 Wextra \
17115                 Wignored-qualifiers \
17116                 Wlogical-op \
17117                 Woverloaded-virtual \
17118                 Wsign-promo \
17119                 Wsynth \
17120                 Wold-style-cast \
17121                 Wcast-align \
17122                 Wcast-qual \
17123                 Wpointer-arith \
17124                 Wshadow \
17125                 Wundef $cf_gxx_extra_warnings Wno-unused
17126         do
17127                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17128                 if { (eval echo "$as_me:17128: \"$ac_compile\"") >&5
17129   (eval $ac_compile) 2>&5
17130   ac_status=$?
17131   echo "$as_me:17131: \$? = $ac_status" >&5
17132   (exit "$ac_status"); }; then
17133                         test -n "$verbose" && echo "$as_me:17133: result: ... -$cf_opt" >&5
17134 echo "${ECHO_T}... -$cf_opt" >&6
17135                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17136                 else
17137                         test -n "$verbose" && echo "$as_me:17137: result: ... no -$cf_opt" >&5
17138 echo "${ECHO_T}... no -$cf_opt" >&6
17139                 fi
17140         done
17141         CXXFLAGS="$cf_save_CXXFLAGS"
17142 fi
17143
17144 rm -rf ./conftest*
17145 ac_ext=c
17146 ac_cpp='$CPP $CPPFLAGS'
17147 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17148 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17150 ac_main_return="return"
17151
17152         fi
17153 fi
17154
17155 echo "$as_me:17155: checking if you want to work around bogus compiler/loader warnings" >&5
17156 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17157
17158 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17159 if test "${enable_string_hacks+set}" = set; then
17160   enableval="$enable_string_hacks"
17161   enable_string_hacks=$enableval
17162 else
17163   enable_string_hacks=no
17164 fi;
17165 echo "$as_me:17165: result: $enable_string_hacks" >&5
17166 echo "${ECHO_T}$enable_string_hacks" >&6
17167
17168 if test "x$enable_string_hacks" = "xyes"; then
17169
17170 cat >>confdefs.h <<\EOF
17171 #define USE_STRING_HACKS 1
17172 EOF
17173
17174         { echo "$as_me:17174: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17175 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17176         echo "$as_me:17176: checking for strlcat" >&5
17177 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17178 if test "${ac_cv_func_strlcat+set}" = set; then
17179   echo $ECHO_N "(cached) $ECHO_C" >&6
17180 else
17181   cat >"conftest.$ac_ext" <<_ACEOF
17182 #line 17182 "configure"
17183 #include "confdefs.h"
17184 #define strlcat autoconf_temporary
17185 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17186 #undef strlcat
17187
17188 #ifdef __cplusplus
17189 extern "C"
17190 #endif
17191
17192 /* We use char because int might match the return type of a gcc2
17193    builtin and then its argument prototype would still apply.  */
17194 char strlcat (void);
17195
17196 int
17197 main (void)
17198 {
17199
17200 /* The GNU C library defines stubs for functions which it implements
17201     to always fail with ENOSYS.  Some functions are actually named
17202     something starting with __ and the normal name is an alias.  */
17203 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17204 #error found stub for strlcat
17205 #endif
17206
17207         return strlcat ();
17208   ;
17209   return 0;
17210 }
17211 _ACEOF
17212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17213 if { (eval echo "$as_me:17213: \"$ac_link\"") >&5
17214   (eval $ac_link) 2>&5
17215   ac_status=$?
17216   echo "$as_me:17216: \$? = $ac_status" >&5
17217   (exit "$ac_status"); } &&
17218          { ac_try='test -s "conftest$ac_exeext"'
17219   { (eval echo "$as_me:17219: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:17222: \$? = $ac_status" >&5
17223   (exit "$ac_status"); }; }; then
17224   ac_cv_func_strlcat=yes
17225 else
17226   echo "$as_me: failed program was:" >&5
17227 cat "conftest.$ac_ext" >&5
17228 ac_cv_func_strlcat=no
17229 fi
17230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17231 fi
17232 echo "$as_me:17232: result: $ac_cv_func_strlcat" >&5
17233 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17234 if test "$ac_cv_func_strlcat" = yes; then
17235
17236 cat >>confdefs.h <<\EOF
17237 #define HAVE_STRLCAT 1
17238 EOF
17239
17240 else
17241
17242                 echo "$as_me:17242: checking for strlcat in -lbsd" >&5
17243 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17244 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17245   echo $ECHO_N "(cached) $ECHO_C" >&6
17246 else
17247   ac_check_lib_save_LIBS=$LIBS
17248 LIBS="-lbsd  $LIBS"
17249 cat >"conftest.$ac_ext" <<_ACEOF
17250 #line 17250 "configure"
17251 #include "confdefs.h"
17252
17253 /* Override any gcc2 internal prototype to avoid an error.  */
17254 #ifdef __cplusplus
17255 extern "C"
17256 #endif
17257 /* We use char because int might match the return type of a gcc2
17258    builtin and then its argument prototype would still apply.  */
17259 char strlcat ();
17260 int
17261 main (void)
17262 {
17263 strlcat ();
17264   ;
17265   return 0;
17266 }
17267 _ACEOF
17268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17269 if { (eval echo "$as_me:17269: \"$ac_link\"") >&5
17270   (eval $ac_link) 2>&5
17271   ac_status=$?
17272   echo "$as_me:17272: \$? = $ac_status" >&5
17273   (exit "$ac_status"); } &&
17274          { ac_try='test -s "conftest$ac_exeext"'
17275   { (eval echo "$as_me:17275: \"$ac_try\"") >&5
17276   (eval $ac_try) 2>&5
17277   ac_status=$?
17278   echo "$as_me:17278: \$? = $ac_status" >&5
17279   (exit "$ac_status"); }; }; then
17280   ac_cv_lib_bsd_strlcat=yes
17281 else
17282   echo "$as_me: failed program was:" >&5
17283 cat "conftest.$ac_ext" >&5
17284 ac_cv_lib_bsd_strlcat=no
17285 fi
17286 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17287 LIBS=$ac_check_lib_save_LIBS
17288 fi
17289 echo "$as_me:17289: result: $ac_cv_lib_bsd_strlcat" >&5
17290 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17291 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17292
17293 cf_add_libs="$LIBS"
17294 # reverse order
17295 cf_add_0lib=
17296 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17297 # filter duplicates
17298 for cf_add_1lib in $cf_add_0lib; do
17299         for cf_add_2lib in $cf_add_libs; do
17300                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17301                         cf_add_1lib=
17302                         break
17303                 fi
17304         done
17305         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17306 done
17307 LIBS="$cf_add_libs"
17308
17309 for ac_header in bsd/string.h
17310 do
17311 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17312 echo "$as_me:17312: checking for $ac_header" >&5
17313 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17315   echo $ECHO_N "(cached) $ECHO_C" >&6
17316 else
17317   cat >"conftest.$ac_ext" <<_ACEOF
17318 #line 17318 "configure"
17319 #include "confdefs.h"
17320 #include <$ac_header>
17321 _ACEOF
17322 if { (eval echo "$as_me:17322: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17323   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17324   ac_status=$?
17325   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17326   rm -f conftest.er1
17327   cat conftest.err >&5
17328   echo "$as_me:17328: \$? = $ac_status" >&5
17329   (exit "$ac_status"); } >/dev/null; then
17330   if test -s conftest.err; then
17331     ac_cpp_err=$ac_c_preproc_warn_flag
17332   else
17333     ac_cpp_err=
17334   fi
17335 else
17336   ac_cpp_err=yes
17337 fi
17338 if test -z "$ac_cpp_err"; then
17339   eval "$as_ac_Header=yes"
17340 else
17341   echo "$as_me: failed program was:" >&5
17342   cat "conftest.$ac_ext" >&5
17343   eval "$as_ac_Header=no"
17344 fi
17345 rm -f conftest.err "conftest.$ac_ext"
17346 fi
17347 echo "$as_me:17347: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17348 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17349 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17350   cat >>confdefs.h <<EOF
17351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17352 EOF
17353
17354 fi
17355 done
17356
17357 cat >>confdefs.h <<\EOF
17358 #define HAVE_STRLCAT 1
17359 EOF
17360
17361 fi
17362
17363 fi
17364
17365 for ac_func in strlcpy snprintf
17366 do
17367 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17368 echo "$as_me:17368: checking for $ac_func" >&5
17369 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17370 if eval "test \"\${$as_ac_var+set}\" = set"; then
17371   echo $ECHO_N "(cached) $ECHO_C" >&6
17372 else
17373   cat >"conftest.$ac_ext" <<_ACEOF
17374 #line 17374 "configure"
17375 #include "confdefs.h"
17376 #define $ac_func autoconf_temporary
17377 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17378 #undef $ac_func
17379
17380 #ifdef __cplusplus
17381 extern "C"
17382 #endif
17383
17384 /* We use char because int might match the return type of a gcc2
17385    builtin and then its argument prototype would still apply.  */
17386 char $ac_func (void);
17387
17388 int
17389 main (void)
17390 {
17391
17392 /* The GNU C library defines stubs for functions which it implements
17393     to always fail with ENOSYS.  Some functions are actually named
17394     something starting with __ and the normal name is an alias.  */
17395 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17396 #error found stub for $ac_func
17397 #endif
17398
17399         return $ac_func ();
17400   ;
17401   return 0;
17402 }
17403 _ACEOF
17404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17405 if { (eval echo "$as_me:17405: \"$ac_link\"") >&5
17406   (eval $ac_link) 2>&5
17407   ac_status=$?
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit "$ac_status"); } &&
17410          { ac_try='test -s "conftest$ac_exeext"'
17411   { (eval echo "$as_me:17411: \"$ac_try\"") >&5
17412   (eval $ac_try) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit "$ac_status"); }; }; then
17416   eval "$as_ac_var=yes"
17417 else
17418   echo "$as_me: failed program was:" >&5
17419 cat "conftest.$ac_ext" >&5
17420 eval "$as_ac_var=no"
17421 fi
17422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17423 fi
17424 echo "$as_me:17424: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17425 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17426 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17427   cat >>confdefs.h <<EOF
17428 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17429 EOF
17430
17431 fi
17432 done
17433
17434 fi
17435
17436 ###     use option --enable-assertions to turn on generation of assertion code
17437 echo "$as_me:17437: checking if you want to enable runtime assertions" >&5
17438 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17439
17440 # Check whether --enable-assertions or --disable-assertions was given.
17441 if test "${enable_assertions+set}" = set; then
17442   enableval="$enable_assertions"
17443   with_assertions=$enableval
17444 else
17445   with_assertions=no
17446 fi;
17447 echo "$as_me:17447: result: $with_assertions" >&5
17448 echo "${ECHO_T}$with_assertions" >&6
17449 if test -n "$GCC"
17450 then
17451         if test "$with_assertions" = no
17452         then
17453                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17454         else
17455
17456         ADAFLAGS="$ADAFLAGS -gnata"
17457
17458         fi
17459 fi
17460
17461 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17462
17463 echo "$as_me:17463: checking if you want to use dmalloc for testing" >&5
17464 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17465
17466 # Check whether --with-dmalloc or --without-dmalloc was given.
17467 if test "${with_dmalloc+set}" = set; then
17468   withval="$with_dmalloc"
17469
17470 cat >>confdefs.h <<EOF
17471 #define USE_DMALLOC 1
17472 EOF
17473
17474         : "${with_cflags:=-g}"
17475         : "${enable_leaks:=no}"
17476          with_dmalloc=yes
17477 else
17478   with_dmalloc=
17479 fi;
17480 echo "$as_me:17480: result: ${with_dmalloc:-no}" >&5
17481 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17482
17483 case ".$with_cflags" in
17484 (.*-g*)
17485         case .$CFLAGS in
17486         (.*-g*)
17487                 ;;
17488         (*)
17489
17490 cf_fix_cppflags=no
17491 cf_new_cflags=
17492 cf_new_cppflags=
17493 cf_new_extra_cppflags=
17494
17495 for cf_add_cflags in -g
17496 do
17497 case "$cf_fix_cppflags" in
17498 (no)
17499         case "$cf_add_cflags" in
17500         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17501                 case "$cf_add_cflags" in
17502                 (-D*)
17503                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17504
17505                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17506                                 && test -z "${cf_tst_cflags}" \
17507                                 && cf_fix_cppflags=yes
17508
17509                         if test "$cf_fix_cppflags" = yes ; then
17510
17511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17513
17514                                 continue
17515                         elif test "${cf_tst_cflags}" = "\"'" ; then
17516
17517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17519
17520                                 continue
17521                         fi
17522                         ;;
17523                 esac
17524                 case "$CPPFLAGS" in
17525                 (*$cf_add_cflags)
17526                         ;;
17527                 (*)
17528                         case "$cf_add_cflags" in
17529                         (-D*)
17530                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17531
17532 CPPFLAGS=`echo "$CPPFLAGS" | \
17533         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17534                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17535
17536                                 ;;
17537                         esac
17538
17539         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17540         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17541
17542                         ;;
17543                 esac
17544                 ;;
17545         (*)
17546
17547         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17548         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17549
17550                 ;;
17551         esac
17552         ;;
17553 (yes)
17554
17555         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17556         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17557
17558         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17559
17560         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17561                 && test -z "${cf_tst_cflags}" \
17562                 && cf_fix_cppflags=no
17563         ;;
17564 esac
17565 done
17566
17567 if test -n "$cf_new_cflags" ; then
17568
17569         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17570         CFLAGS="${CFLAGS}$cf_new_cflags"
17571
17572 fi
17573
17574 if test -n "$cf_new_cppflags" ; then
17575
17576         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17577         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17578
17579 fi
17580
17581 if test -n "$cf_new_extra_cppflags" ; then
17582
17583         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17584         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17585
17586 fi
17587
17588                 ;;
17589         esac
17590         ;;
17591 esac
17592
17593 if test "$with_dmalloc" = yes ; then
17594         echo "$as_me:17594: checking for dmalloc.h" >&5
17595 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17596 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17597   echo $ECHO_N "(cached) $ECHO_C" >&6
17598 else
17599   cat >"conftest.$ac_ext" <<_ACEOF
17600 #line 17600 "configure"
17601 #include "confdefs.h"
17602 #include <dmalloc.h>
17603 _ACEOF
17604 if { (eval echo "$as_me:17604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17605   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17606   ac_status=$?
17607   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17608   rm -f conftest.er1
17609   cat conftest.err >&5
17610   echo "$as_me:17610: \$? = $ac_status" >&5
17611   (exit "$ac_status"); } >/dev/null; then
17612   if test -s conftest.err; then
17613     ac_cpp_err=$ac_c_preproc_warn_flag
17614   else
17615     ac_cpp_err=
17616   fi
17617 else
17618   ac_cpp_err=yes
17619 fi
17620 if test -z "$ac_cpp_err"; then
17621   ac_cv_header_dmalloc_h=yes
17622 else
17623   echo "$as_me: failed program was:" >&5
17624   cat "conftest.$ac_ext" >&5
17625   ac_cv_header_dmalloc_h=no
17626 fi
17627 rm -f conftest.err "conftest.$ac_ext"
17628 fi
17629 echo "$as_me:17629: result: $ac_cv_header_dmalloc_h" >&5
17630 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17631 if test "$ac_cv_header_dmalloc_h" = yes; then
17632
17633 echo "$as_me:17633: checking for dmalloc_debug in -ldmalloc" >&5
17634 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17635 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17636   echo $ECHO_N "(cached) $ECHO_C" >&6
17637 else
17638   ac_check_lib_save_LIBS=$LIBS
17639 LIBS="-ldmalloc  $LIBS"
17640 cat >"conftest.$ac_ext" <<_ACEOF
17641 #line 17641 "configure"
17642 #include "confdefs.h"
17643
17644 /* Override any gcc2 internal prototype to avoid an error.  */
17645 #ifdef __cplusplus
17646 extern "C"
17647 #endif
17648 /* We use char because int might match the return type of a gcc2
17649    builtin and then its argument prototype would still apply.  */
17650 char dmalloc_debug ();
17651 int
17652 main (void)
17653 {
17654 dmalloc_debug ();
17655   ;
17656   return 0;
17657 }
17658 _ACEOF
17659 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17660 if { (eval echo "$as_me:17660: \"$ac_link\"") >&5
17661   (eval $ac_link) 2>&5
17662   ac_status=$?
17663   echo "$as_me:17663: \$? = $ac_status" >&5
17664   (exit "$ac_status"); } &&
17665          { ac_try='test -s "conftest$ac_exeext"'
17666   { (eval echo "$as_me:17666: \"$ac_try\"") >&5
17667   (eval $ac_try) 2>&5
17668   ac_status=$?
17669   echo "$as_me:17669: \$? = $ac_status" >&5
17670   (exit "$ac_status"); }; }; then
17671   ac_cv_lib_dmalloc_dmalloc_debug=yes
17672 else
17673   echo "$as_me: failed program was:" >&5
17674 cat "conftest.$ac_ext" >&5
17675 ac_cv_lib_dmalloc_dmalloc_debug=no
17676 fi
17677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17678 LIBS=$ac_check_lib_save_LIBS
17679 fi
17680 echo "$as_me:17680: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17681 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17682 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17683   cat >>confdefs.h <<EOF
17684 #define HAVE_LIBDMALLOC 1
17685 EOF
17686
17687   LIBS="-ldmalloc $LIBS"
17688
17689 fi
17690
17691 fi
17692
17693 fi
17694
17695 echo "$as_me:17695: checking if you want to use dbmalloc for testing" >&5
17696 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17697
17698 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17699 if test "${with_dbmalloc+set}" = set; then
17700   withval="$with_dbmalloc"
17701
17702 cat >>confdefs.h <<EOF
17703 #define USE_DBMALLOC 1
17704 EOF
17705
17706         : "${with_cflags:=-g}"
17707         : "${enable_leaks:=no}"
17708          with_dbmalloc=yes
17709 else
17710   with_dbmalloc=
17711 fi;
17712 echo "$as_me:17712: result: ${with_dbmalloc:-no}" >&5
17713 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17714
17715 case ".$with_cflags" in
17716 (.*-g*)
17717         case .$CFLAGS in
17718         (.*-g*)
17719                 ;;
17720         (*)
17721
17722 cf_fix_cppflags=no
17723 cf_new_cflags=
17724 cf_new_cppflags=
17725 cf_new_extra_cppflags=
17726
17727 for cf_add_cflags in -g
17728 do
17729 case "$cf_fix_cppflags" in
17730 (no)
17731         case "$cf_add_cflags" in
17732         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17733                 case "$cf_add_cflags" in
17734                 (-D*)
17735                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17736
17737                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17738                                 && test -z "${cf_tst_cflags}" \
17739                                 && cf_fix_cppflags=yes
17740
17741                         if test "$cf_fix_cppflags" = yes ; then
17742
17743         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17744         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17745
17746                                 continue
17747                         elif test "${cf_tst_cflags}" = "\"'" ; then
17748
17749         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17750         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17751
17752                                 continue
17753                         fi
17754                         ;;
17755                 esac
17756                 case "$CPPFLAGS" in
17757                 (*$cf_add_cflags)
17758                         ;;
17759                 (*)
17760                         case "$cf_add_cflags" in
17761                         (-D*)
17762                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17763
17764 CPPFLAGS=`echo "$CPPFLAGS" | \
17765         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17766                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17767
17768                                 ;;
17769                         esac
17770
17771         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17772         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17773
17774                         ;;
17775                 esac
17776                 ;;
17777         (*)
17778
17779         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17780         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17781
17782                 ;;
17783         esac
17784         ;;
17785 (yes)
17786
17787         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17788         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17789
17790         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17791
17792         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17793                 && test -z "${cf_tst_cflags}" \
17794                 && cf_fix_cppflags=no
17795         ;;
17796 esac
17797 done
17798
17799 if test -n "$cf_new_cflags" ; then
17800
17801         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17802         CFLAGS="${CFLAGS}$cf_new_cflags"
17803
17804 fi
17805
17806 if test -n "$cf_new_cppflags" ; then
17807
17808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17809         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17810
17811 fi
17812
17813 if test -n "$cf_new_extra_cppflags" ; then
17814
17815         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17816         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17817
17818 fi
17819
17820                 ;;
17821         esac
17822         ;;
17823 esac
17824
17825 if test "$with_dbmalloc" = yes ; then
17826         echo "$as_me:17826: checking for dbmalloc.h" >&5
17827 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17828 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17829   echo $ECHO_N "(cached) $ECHO_C" >&6
17830 else
17831   cat >"conftest.$ac_ext" <<_ACEOF
17832 #line 17832 "configure"
17833 #include "confdefs.h"
17834 #include <dbmalloc.h>
17835 _ACEOF
17836 if { (eval echo "$as_me:17836: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17837   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17838   ac_status=$?
17839   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17840   rm -f conftest.er1
17841   cat conftest.err >&5
17842   echo "$as_me:17842: \$? = $ac_status" >&5
17843   (exit "$ac_status"); } >/dev/null; then
17844   if test -s conftest.err; then
17845     ac_cpp_err=$ac_c_preproc_warn_flag
17846   else
17847     ac_cpp_err=
17848   fi
17849 else
17850   ac_cpp_err=yes
17851 fi
17852 if test -z "$ac_cpp_err"; then
17853   ac_cv_header_dbmalloc_h=yes
17854 else
17855   echo "$as_me: failed program was:" >&5
17856   cat "conftest.$ac_ext" >&5
17857   ac_cv_header_dbmalloc_h=no
17858 fi
17859 rm -f conftest.err "conftest.$ac_ext"
17860 fi
17861 echo "$as_me:17861: result: $ac_cv_header_dbmalloc_h" >&5
17862 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17863 if test "$ac_cv_header_dbmalloc_h" = yes; then
17864
17865 echo "$as_me:17865: checking for debug_malloc in -ldbmalloc" >&5
17866 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17867 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17868   echo $ECHO_N "(cached) $ECHO_C" >&6
17869 else
17870   ac_check_lib_save_LIBS=$LIBS
17871 LIBS="-ldbmalloc  $LIBS"
17872 cat >"conftest.$ac_ext" <<_ACEOF
17873 #line 17873 "configure"
17874 #include "confdefs.h"
17875
17876 /* Override any gcc2 internal prototype to avoid an error.  */
17877 #ifdef __cplusplus
17878 extern "C"
17879 #endif
17880 /* We use char because int might match the return type of a gcc2
17881    builtin and then its argument prototype would still apply.  */
17882 char debug_malloc ();
17883 int
17884 main (void)
17885 {
17886 debug_malloc ();
17887   ;
17888   return 0;
17889 }
17890 _ACEOF
17891 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17892 if { (eval echo "$as_me:17892: \"$ac_link\"") >&5
17893   (eval $ac_link) 2>&5
17894   ac_status=$?
17895   echo "$as_me:17895: \$? = $ac_status" >&5
17896   (exit "$ac_status"); } &&
17897          { ac_try='test -s "conftest$ac_exeext"'
17898   { (eval echo "$as_me:17898: \"$ac_try\"") >&5
17899   (eval $ac_try) 2>&5
17900   ac_status=$?
17901   echo "$as_me:17901: \$? = $ac_status" >&5
17902   (exit "$ac_status"); }; }; then
17903   ac_cv_lib_dbmalloc_debug_malloc=yes
17904 else
17905   echo "$as_me: failed program was:" >&5
17906 cat "conftest.$ac_ext" >&5
17907 ac_cv_lib_dbmalloc_debug_malloc=no
17908 fi
17909 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17910 LIBS=$ac_check_lib_save_LIBS
17911 fi
17912 echo "$as_me:17912: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17913 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17914 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17915   cat >>confdefs.h <<EOF
17916 #define HAVE_LIBDBMALLOC 1
17917 EOF
17918
17919   LIBS="-ldbmalloc $LIBS"
17920
17921 fi
17922
17923 fi
17924
17925 fi
17926
17927 echo "$as_me:17927: checking if you want to use valgrind for testing" >&5
17928 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17929
17930 # Check whether --with-valgrind or --without-valgrind was given.
17931 if test "${with_valgrind+set}" = set; then
17932   withval="$with_valgrind"
17933
17934 cat >>confdefs.h <<EOF
17935 #define USE_VALGRIND 1
17936 EOF
17937
17938         : "${with_cflags:=-g}"
17939         : "${enable_leaks:=no}"
17940          with_valgrind=yes
17941 else
17942   with_valgrind=
17943 fi;
17944 echo "$as_me:17944: result: ${with_valgrind:-no}" >&5
17945 echo "${ECHO_T}${with_valgrind:-no}" >&6
17946
17947 case ".$with_cflags" in
17948 (.*-g*)
17949         case .$CFLAGS in
17950         (.*-g*)
17951                 ;;
17952         (*)
17953
17954 cf_fix_cppflags=no
17955 cf_new_cflags=
17956 cf_new_cppflags=
17957 cf_new_extra_cppflags=
17958
17959 for cf_add_cflags in -g
17960 do
17961 case "$cf_fix_cppflags" in
17962 (no)
17963         case "$cf_add_cflags" in
17964         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17965                 case "$cf_add_cflags" in
17966                 (-D*)
17967                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17968
17969                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17970                                 && test -z "${cf_tst_cflags}" \
17971                                 && cf_fix_cppflags=yes
17972
17973                         if test "$cf_fix_cppflags" = yes ; then
17974
17975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17977
17978                                 continue
17979                         elif test "${cf_tst_cflags}" = "\"'" ; then
17980
17981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17983
17984                                 continue
17985                         fi
17986                         ;;
17987                 esac
17988                 case "$CPPFLAGS" in
17989                 (*$cf_add_cflags)
17990                         ;;
17991                 (*)
17992                         case "$cf_add_cflags" in
17993                         (-D*)
17994                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17995
17996 CPPFLAGS=`echo "$CPPFLAGS" | \
17997         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17998                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17999
18000                                 ;;
18001                         esac
18002
18003         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18004         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18005
18006                         ;;
18007                 esac
18008                 ;;
18009         (*)
18010
18011         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18012         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18013
18014                 ;;
18015         esac
18016         ;;
18017 (yes)
18018
18019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18021
18022         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18023
18024         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18025                 && test -z "${cf_tst_cflags}" \
18026                 && cf_fix_cppflags=no
18027         ;;
18028 esac
18029 done
18030
18031 if test -n "$cf_new_cflags" ; then
18032
18033         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18034         CFLAGS="${CFLAGS}$cf_new_cflags"
18035
18036 fi
18037
18038 if test -n "$cf_new_cppflags" ; then
18039
18040         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18041         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18042
18043 fi
18044
18045 if test -n "$cf_new_extra_cppflags" ; then
18046
18047         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18048         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18049
18050 fi
18051
18052                 ;;
18053         esac
18054         ;;
18055 esac
18056
18057 echo "$as_me:18057: checking if you want to perform memory-leak testing" >&5
18058 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18059
18060 # Check whether --enable-leaks or --disable-leaks was given.
18061 if test "${enable_leaks+set}" = set; then
18062   enableval="$enable_leaks"
18063   enable_leaks=no
18064 else
18065   enable_leaks=yes
18066 fi;
18067 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18068 echo "$as_me:18068: result: $with_no_leaks" >&5
18069 echo "${ECHO_T}$with_no_leaks" >&6
18070
18071 if test "$enable_leaks" = no ; then
18072
18073 cat >>confdefs.h <<\EOF
18074 #define NO_LEAKS 1
18075 EOF
18076
18077 cat >>confdefs.h <<\EOF
18078 #define YY_NO_LEAKS 1
18079 EOF
18080
18081 fi
18082
18083 cat >>confdefs.h <<\EOF
18084 #define HAVE_NC_ALLOC_H 1
18085 EOF
18086
18087 ###     use option --enable-expanded to generate certain macros as functions
18088
18089 # Check whether --enable-expanded or --disable-expanded was given.
18090 if test "${enable_expanded+set}" = set; then
18091   enableval="$enable_expanded"
18092   test "x$enableval" = xyes &&
18093 cat >>confdefs.h <<\EOF
18094 #define NCURSES_EXPANDED 1
18095 EOF
18096
18097 fi;
18098
18099 ###     use option --disable-macros to suppress macros in favor of functions
18100
18101 # Check whether --enable-macros or --disable-macros was given.
18102 if test "${enable_macros+set}" = set; then
18103   enableval="$enable_macros"
18104   test "$enableval" = no &&
18105 cat >>confdefs.h <<\EOF
18106 #define NCURSES_NOMACROS 1
18107 EOF
18108
18109 fi;
18110
18111 # Normally we only add trace() to the debug-library.  Allow this to be
18112 # extended to all models of the ncurses library:
18113 cf_all_traces=no
18114 case "$CFLAGS $CPPFLAGS" in
18115 (*-DTRACE*)
18116         cf_all_traces=yes
18117         ;;
18118 esac
18119
18120 echo "$as_me:18120: checking whether to add trace feature to all models" >&5
18121 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18122
18123 # Check whether --with-trace or --without-trace was given.
18124 if test "${with_trace+set}" = set; then
18125   withval="$with_trace"
18126   cf_with_trace=$withval
18127 else
18128   cf_with_trace=$cf_all_traces
18129 fi;
18130 echo "$as_me:18130: result: $cf_with_trace" >&5
18131 echo "${ECHO_T}$cf_with_trace" >&6
18132
18133 if test "x$cf_with_trace" = xyes ; then
18134         LIB_TRACING=all
18135         ADA_TRACE=TRUE
18136
18137 cf_fix_cppflags=no
18138 cf_new_cflags=
18139 cf_new_cppflags=
18140 cf_new_extra_cppflags=
18141
18142 for cf_add_cflags in -DTRACE
18143 do
18144 case "$cf_fix_cppflags" in
18145 (no)
18146         case "$cf_add_cflags" in
18147         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18148                 case "$cf_add_cflags" in
18149                 (-D*)
18150                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18151
18152                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18153                                 && test -z "${cf_tst_cflags}" \
18154                                 && cf_fix_cppflags=yes
18155
18156                         if test "$cf_fix_cppflags" = yes ; then
18157
18158         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18159         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18160
18161                                 continue
18162                         elif test "${cf_tst_cflags}" = "\"'" ; then
18163
18164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18166
18167                                 continue
18168                         fi
18169                         ;;
18170                 esac
18171                 case "$CPPFLAGS" in
18172                 (*$cf_add_cflags)
18173                         ;;
18174                 (*)
18175                         case "$cf_add_cflags" in
18176                         (-D*)
18177                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18178
18179 CPPFLAGS=`echo "$CPPFLAGS" | \
18180         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18181                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18182
18183                                 ;;
18184                         esac
18185
18186         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18187         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18188
18189                         ;;
18190                 esac
18191                 ;;
18192         (*)
18193
18194         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18195         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18196
18197                 ;;
18198         esac
18199         ;;
18200 (yes)
18201
18202         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18203         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18204
18205         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18206
18207         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18208                 && test -z "${cf_tst_cflags}" \
18209                 && cf_fix_cppflags=no
18210         ;;
18211 esac
18212 done
18213
18214 if test -n "$cf_new_cflags" ; then
18215
18216         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18217         CFLAGS="${CFLAGS}$cf_new_cflags"
18218
18219 fi
18220
18221 if test -n "$cf_new_cppflags" ; then
18222
18223         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18224         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18225
18226 fi
18227
18228 if test -n "$cf_new_extra_cppflags" ; then
18229
18230         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18231         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18232
18233 fi
18234
18235 cat >>confdefs.h <<\EOF
18236 #define HAVE__TRACEF 1
18237 EOF
18238
18239 else
18240         LIB_TRACING=DEBUG
18241         ADA_TRACE=FALSE
18242 fi
18243
18244 echo "$as_me:18244: checking if we want to use GNAT projects" >&5
18245 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18246
18247 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18248 if test "${enable_gnat_projects+set}" = set; then
18249   enableval="$enable_gnat_projects"
18250   test "$enableval" != no && enableval=yes
18251         if test "$enableval" != "yes" ; then
18252     enable_gnat_projects=no
18253         else
18254                 enable_gnat_projects=yes
18255         fi
18256 else
18257   enableval=yes
18258         enable_gnat_projects=yes
18259
18260 fi;
18261 echo "$as_me:18261: result: $enable_gnat_projects" >&5
18262 echo "${ECHO_T}$enable_gnat_projects" >&6
18263
18264 ###     Checks for libraries.
18265 case "$cf_cv_system_name" in
18266 (*mingw32*|*mingw64*)
18267         if test "x$with_exp_win32" = xyes ; then
18268         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18269         else
18270         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18271         fi
18272         # Note: WINVER may be a problem with Windows 10
18273         ;;
18274 (*)
18275 echo "$as_me:18275: checking for gettimeofday" >&5
18276 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18277 if test "${ac_cv_func_gettimeofday+set}" = set; then
18278   echo $ECHO_N "(cached) $ECHO_C" >&6
18279 else
18280   cat >"conftest.$ac_ext" <<_ACEOF
18281 #line 18281 "configure"
18282 #include "confdefs.h"
18283 #define gettimeofday autoconf_temporary
18284 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18285 #undef gettimeofday
18286
18287 #ifdef __cplusplus
18288 extern "C"
18289 #endif
18290
18291 /* We use char because int might match the return type of a gcc2
18292    builtin and then its argument prototype would still apply.  */
18293 char gettimeofday (void);
18294
18295 int
18296 main (void)
18297 {
18298
18299 /* The GNU C library defines stubs for functions which it implements
18300     to always fail with ENOSYS.  Some functions are actually named
18301     something starting with __ and the normal name is an alias.  */
18302 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18303 #error found stub for gettimeofday
18304 #endif
18305
18306         return gettimeofday ();
18307   ;
18308   return 0;
18309 }
18310 _ACEOF
18311 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18312 if { (eval echo "$as_me:18312: \"$ac_link\"") >&5
18313   (eval $ac_link) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit "$ac_status"); } &&
18317          { ac_try='test -s "conftest$ac_exeext"'
18318   { (eval echo "$as_me:18318: \"$ac_try\"") >&5
18319   (eval $ac_try) 2>&5
18320   ac_status=$?
18321   echo "$as_me:18321: \$? = $ac_status" >&5
18322   (exit "$ac_status"); }; }; then
18323   ac_cv_func_gettimeofday=yes
18324 else
18325   echo "$as_me: failed program was:" >&5
18326 cat "conftest.$ac_ext" >&5
18327 ac_cv_func_gettimeofday=no
18328 fi
18329 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18330 fi
18331 echo "$as_me:18331: result: $ac_cv_func_gettimeofday" >&5
18332 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18333 if test "$ac_cv_func_gettimeofday" = yes; then
18334
18335 cat >>confdefs.h <<\EOF
18336 #define HAVE_GETTIMEOFDAY 1
18337 EOF
18338
18339 else
18340
18341 echo "$as_me:18341: checking for gettimeofday in -lbsd" >&5
18342 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18343 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18344   echo $ECHO_N "(cached) $ECHO_C" >&6
18345 else
18346   ac_check_lib_save_LIBS=$LIBS
18347 LIBS="-lbsd  $LIBS"
18348 cat >"conftest.$ac_ext" <<_ACEOF
18349 #line 18349 "configure"
18350 #include "confdefs.h"
18351
18352 /* Override any gcc2 internal prototype to avoid an error.  */
18353 #ifdef __cplusplus
18354 extern "C"
18355 #endif
18356 /* We use char because int might match the return type of a gcc2
18357    builtin and then its argument prototype would still apply.  */
18358 char gettimeofday ();
18359 int
18360 main (void)
18361 {
18362 gettimeofday ();
18363   ;
18364   return 0;
18365 }
18366 _ACEOF
18367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18368 if { (eval echo "$as_me:18368: \"$ac_link\"") >&5
18369   (eval $ac_link) 2>&5
18370   ac_status=$?
18371   echo "$as_me:18371: \$? = $ac_status" >&5
18372   (exit "$ac_status"); } &&
18373          { ac_try='test -s "conftest$ac_exeext"'
18374   { (eval echo "$as_me:18374: \"$ac_try\"") >&5
18375   (eval $ac_try) 2>&5
18376   ac_status=$?
18377   echo "$as_me:18377: \$? = $ac_status" >&5
18378   (exit "$ac_status"); }; }; then
18379   ac_cv_lib_bsd_gettimeofday=yes
18380 else
18381   echo "$as_me: failed program was:" >&5
18382 cat "conftest.$ac_ext" >&5
18383 ac_cv_lib_bsd_gettimeofday=no
18384 fi
18385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18386 LIBS=$ac_check_lib_save_LIBS
18387 fi
18388 echo "$as_me:18388: result: $ac_cv_lib_bsd_gettimeofday" >&5
18389 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18390 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18391
18392 cat >>confdefs.h <<\EOF
18393 #define HAVE_GETTIMEOFDAY 1
18394 EOF
18395
18396 cf_add_libs="$LIBS"
18397 # reverse order
18398 cf_add_0lib=
18399 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18400 # filter duplicates
18401 for cf_add_1lib in $cf_add_0lib; do
18402         for cf_add_2lib in $cf_add_libs; do
18403                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18404                         cf_add_1lib=
18405                         break
18406                 fi
18407         done
18408         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18409 done
18410 LIBS="$cf_add_libs"
18411
18412 fi
18413
18414 fi
18415         ;;
18416 esac
18417
18418 echo "$as_me:18418: checking if -lm needed for math functions" >&5
18419 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18420 if test "${cf_cv_need_libm+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423
18424         cat >"conftest.$ac_ext" <<_ACEOF
18425 #line 18425 "configure"
18426 #include "confdefs.h"
18427
18428         #include <stdio.h>
18429         #include <stdlib.h>
18430         #include <math.h>
18431
18432 int
18433 main (void)
18434 {
18435 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18436   ;
18437   return 0;
18438 }
18439 _ACEOF
18440 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18441 if { (eval echo "$as_me:18441: \"$ac_link\"") >&5
18442   (eval $ac_link) 2>&5
18443   ac_status=$?
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit "$ac_status"); } &&
18446          { ac_try='test -s "conftest$ac_exeext"'
18447   { (eval echo "$as_me:18447: \"$ac_try\"") >&5
18448   (eval $ac_try) 2>&5
18449   ac_status=$?
18450   echo "$as_me:18450: \$? = $ac_status" >&5
18451   (exit "$ac_status"); }; }; then
18452   cf_cv_need_libm=no
18453 else
18454   echo "$as_me: failed program was:" >&5
18455 cat "conftest.$ac_ext" >&5
18456 cf_cv_need_libm=yes
18457 fi
18458 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18459 fi
18460 echo "$as_me:18460: result: $cf_cv_need_libm" >&5
18461 echo "${ECHO_T}$cf_cv_need_libm" >&6
18462 if test "$cf_cv_need_libm" = yes
18463 then
18464 MATH_LIB=-lm
18465 fi
18466
18467 ###     Checks for header files.
18468 echo "$as_me:18468: checking for ANSI C header files" >&5
18469 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18470 if test "${ac_cv_header_stdc+set}" = set; then
18471   echo $ECHO_N "(cached) $ECHO_C" >&6
18472 else
18473   cat >"conftest.$ac_ext" <<_ACEOF
18474 #line 18474 "configure"
18475 #include "confdefs.h"
18476 #include <stdlib.h>
18477 #include <stdarg.h>
18478 #include <string.h>
18479 #include <float.h>
18480
18481 _ACEOF
18482 if { (eval echo "$as_me:18482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18483   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18484   ac_status=$?
18485   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18486   rm -f conftest.er1
18487   cat conftest.err >&5
18488   echo "$as_me:18488: \$? = $ac_status" >&5
18489   (exit "$ac_status"); } >/dev/null; then
18490   if test -s conftest.err; then
18491     ac_cpp_err=$ac_c_preproc_warn_flag
18492   else
18493     ac_cpp_err=
18494   fi
18495 else
18496   ac_cpp_err=yes
18497 fi
18498 if test -z "$ac_cpp_err"; then
18499   ac_cv_header_stdc=yes
18500 else
18501   echo "$as_me: failed program was:" >&5
18502   cat "conftest.$ac_ext" >&5
18503   ac_cv_header_stdc=no
18504 fi
18505 rm -f conftest.err "conftest.$ac_ext"
18506
18507 if test $ac_cv_header_stdc = yes; then
18508   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18509   cat >"conftest.$ac_ext" <<_ACEOF
18510 #line 18510 "configure"
18511 #include "confdefs.h"
18512 #include <string.h>
18513
18514 _ACEOF
18515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18516   $EGREP "memchr" >/dev/null 2>&1; then
18517   :
18518 else
18519   ac_cv_header_stdc=no
18520 fi
18521 rm -rf conftest*
18522
18523 fi
18524
18525 if test $ac_cv_header_stdc = yes; then
18526   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18527   cat >"conftest.$ac_ext" <<_ACEOF
18528 #line 18528 "configure"
18529 #include "confdefs.h"
18530 #include <stdlib.h>
18531
18532 _ACEOF
18533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18534   $EGREP "free" >/dev/null 2>&1; then
18535   :
18536 else
18537   ac_cv_header_stdc=no
18538 fi
18539 rm -rf conftest*
18540
18541 fi
18542
18543 if test $ac_cv_header_stdc = yes; then
18544   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18545   if test "$cross_compiling" = yes; then
18546   :
18547 else
18548   cat >"conftest.$ac_ext" <<_ACEOF
18549 #line 18549 "configure"
18550 #include "confdefs.h"
18551 #include <ctype.h>
18552 #if ((' ' & 0x0FF) == 0x020)
18553 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18554 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18555 #else
18556 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18557                      || ('j' <= (c) && (c) <= 'r') \
18558                      || ('s' <= (c) && (c) <= 'z'))
18559 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18560 #endif
18561
18562 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18563 int
18564 main (void)
18565 {
18566   int i;
18567   for (i = 0; i < 256; i++)
18568     if (XOR (islower (i), ISLOWER (i))
18569         || toupper (i) != TOUPPER (i))
18570       $ac_main_return(2);
18571   $ac_main_return (0);
18572 }
18573 _ACEOF
18574 rm -f "conftest$ac_exeext"
18575 if { (eval echo "$as_me:18575: \"$ac_link\"") >&5
18576   (eval $ac_link) 2>&5
18577   ac_status=$?
18578   echo "$as_me:18578: \$? = $ac_status" >&5
18579   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18580   { (eval echo "$as_me:18580: \"$ac_try\"") >&5
18581   (eval $ac_try) 2>&5
18582   ac_status=$?
18583   echo "$as_me:18583: \$? = $ac_status" >&5
18584   (exit "$ac_status"); }; }; then
18585   :
18586 else
18587   echo "$as_me: program exited with status $ac_status" >&5
18588 echo "$as_me: failed program was:" >&5
18589 cat "conftest.$ac_ext" >&5
18590 ac_cv_header_stdc=no
18591 fi
18592 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18593 fi
18594 fi
18595 fi
18596 echo "$as_me:18596: result: $ac_cv_header_stdc" >&5
18597 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18598 if test $ac_cv_header_stdc = yes; then
18599
18600 cat >>confdefs.h <<\EOF
18601 #define STDC_HEADERS 1
18602 EOF
18603
18604 fi
18605
18606 ac_header_dirent=no
18607 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18608   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18609 echo "$as_me:18609: checking for $ac_hdr that defines DIR" >&5
18610 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18612   echo $ECHO_N "(cached) $ECHO_C" >&6
18613 else
18614   cat >"conftest.$ac_ext" <<_ACEOF
18615 #line 18615 "configure"
18616 #include "confdefs.h"
18617 #include <sys/types.h>
18618 #include <$ac_hdr>
18619
18620 int
18621 main (void)
18622 {
18623 if ((DIR *) 0)
18624 return 0;
18625   ;
18626   return 0;
18627 }
18628 _ACEOF
18629 rm -f "conftest.$ac_objext"
18630 if { (eval echo "$as_me:18630: \"$ac_compile\"") >&5
18631   (eval $ac_compile) 2>&5
18632   ac_status=$?
18633   echo "$as_me:18633: \$? = $ac_status" >&5
18634   (exit "$ac_status"); } &&
18635          { ac_try='test -s "conftest.$ac_objext"'
18636   { (eval echo "$as_me:18636: \"$ac_try\"") >&5
18637   (eval $ac_try) 2>&5
18638   ac_status=$?
18639   echo "$as_me:18639: \$? = $ac_status" >&5
18640   (exit "$ac_status"); }; }; then
18641   eval "$as_ac_Header=yes"
18642 else
18643   echo "$as_me: failed program was:" >&5
18644 cat "conftest.$ac_ext" >&5
18645 eval "$as_ac_Header=no"
18646 fi
18647 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18648 fi
18649 echo "$as_me:18649: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18650 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18651 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18652   cat >>confdefs.h <<EOF
18653 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18654 EOF
18655
18656 ac_header_dirent=$ac_hdr; break
18657 fi
18658
18659 done
18660 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18661 if test $ac_header_dirent = dirent.h; then
18662   echo "$as_me:18662: checking for opendir in -ldir" >&5
18663 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18664 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18665   echo $ECHO_N "(cached) $ECHO_C" >&6
18666 else
18667   ac_check_lib_save_LIBS=$LIBS
18668 LIBS="-ldir  $LIBS"
18669 cat >"conftest.$ac_ext" <<_ACEOF
18670 #line 18670 "configure"
18671 #include "confdefs.h"
18672
18673 /* Override any gcc2 internal prototype to avoid an error.  */
18674 #ifdef __cplusplus
18675 extern "C"
18676 #endif
18677 /* We use char because int might match the return type of a gcc2
18678    builtin and then its argument prototype would still apply.  */
18679 char opendir ();
18680 int
18681 main (void)
18682 {
18683 opendir ();
18684   ;
18685   return 0;
18686 }
18687 _ACEOF
18688 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18689 if { (eval echo "$as_me:18689: \"$ac_link\"") >&5
18690   (eval $ac_link) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit "$ac_status"); } &&
18694          { ac_try='test -s "conftest$ac_exeext"'
18695   { (eval echo "$as_me:18695: \"$ac_try\"") >&5
18696   (eval $ac_try) 2>&5
18697   ac_status=$?
18698   echo "$as_me:18698: \$? = $ac_status" >&5
18699   (exit "$ac_status"); }; }; then
18700   ac_cv_lib_dir_opendir=yes
18701 else
18702   echo "$as_me: failed program was:" >&5
18703 cat "conftest.$ac_ext" >&5
18704 ac_cv_lib_dir_opendir=no
18705 fi
18706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18707 LIBS=$ac_check_lib_save_LIBS
18708 fi
18709 echo "$as_me:18709: result: $ac_cv_lib_dir_opendir" >&5
18710 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18711 if test "$ac_cv_lib_dir_opendir" = yes; then
18712   LIBS="$LIBS -ldir"
18713 fi
18714
18715 else
18716   echo "$as_me:18716: checking for opendir in -lx" >&5
18717 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18718 if test "${ac_cv_lib_x_opendir+set}" = set; then
18719   echo $ECHO_N "(cached) $ECHO_C" >&6
18720 else
18721   ac_check_lib_save_LIBS=$LIBS
18722 LIBS="-lx  $LIBS"
18723 cat >"conftest.$ac_ext" <<_ACEOF
18724 #line 18724 "configure"
18725 #include "confdefs.h"
18726
18727 /* Override any gcc2 internal prototype to avoid an error.  */
18728 #ifdef __cplusplus
18729 extern "C"
18730 #endif
18731 /* We use char because int might match the return type of a gcc2
18732    builtin and then its argument prototype would still apply.  */
18733 char opendir ();
18734 int
18735 main (void)
18736 {
18737 opendir ();
18738   ;
18739   return 0;
18740 }
18741 _ACEOF
18742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18743 if { (eval echo "$as_me:18743: \"$ac_link\"") >&5
18744   (eval $ac_link) 2>&5
18745   ac_status=$?
18746   echo "$as_me:18746: \$? = $ac_status" >&5
18747   (exit "$ac_status"); } &&
18748          { ac_try='test -s "conftest$ac_exeext"'
18749   { (eval echo "$as_me:18749: \"$ac_try\"") >&5
18750   (eval $ac_try) 2>&5
18751   ac_status=$?
18752   echo "$as_me:18752: \$? = $ac_status" >&5
18753   (exit "$ac_status"); }; }; then
18754   ac_cv_lib_x_opendir=yes
18755 else
18756   echo "$as_me: failed program was:" >&5
18757 cat "conftest.$ac_ext" >&5
18758 ac_cv_lib_x_opendir=no
18759 fi
18760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18761 LIBS=$ac_check_lib_save_LIBS
18762 fi
18763 echo "$as_me:18763: result: $ac_cv_lib_x_opendir" >&5
18764 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18765 if test "$ac_cv_lib_x_opendir" = yes; then
18766   LIBS="$LIBS -lx"
18767 fi
18768
18769 fi
18770
18771 echo "$as_me:18771: checking whether time.h and sys/time.h may both be included" >&5
18772 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18773 if test "${ac_cv_header_time+set}" = set; then
18774   echo $ECHO_N "(cached) $ECHO_C" >&6
18775 else
18776   cat >"conftest.$ac_ext" <<_ACEOF
18777 #line 18777 "configure"
18778 #include "confdefs.h"
18779 #include <sys/types.h>
18780 #include <sys/time.h>
18781 #include <time.h>
18782
18783 int
18784 main (void)
18785 {
18786 if ((struct tm *) 0)
18787 return 0;
18788   ;
18789   return 0;
18790 }
18791 _ACEOF
18792 rm -f "conftest.$ac_objext"
18793 if { (eval echo "$as_me:18793: \"$ac_compile\"") >&5
18794   (eval $ac_compile) 2>&5
18795   ac_status=$?
18796   echo "$as_me:18796: \$? = $ac_status" >&5
18797   (exit "$ac_status"); } &&
18798          { ac_try='test -s "conftest.$ac_objext"'
18799   { (eval echo "$as_me:18799: \"$ac_try\"") >&5
18800   (eval $ac_try) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit "$ac_status"); }; }; then
18804   ac_cv_header_time=yes
18805 else
18806   echo "$as_me: failed program was:" >&5
18807 cat "conftest.$ac_ext" >&5
18808 ac_cv_header_time=no
18809 fi
18810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18811 fi
18812 echo "$as_me:18812: result: $ac_cv_header_time" >&5
18813 echo "${ECHO_T}$ac_cv_header_time" >&6
18814 if test $ac_cv_header_time = yes; then
18815
18816 cat >>confdefs.h <<\EOF
18817 #define TIME_WITH_SYS_TIME 1
18818 EOF
18819
18820 fi
18821
18822 cf_regex_func=no
18823 cf_regex_libs=
18824 case "$host_os" in
18825 (mingw*)
18826         # -lsystre -ltre -lintl -liconv
18827         echo "$as_me:18827: checking for regcomp in -lsystre" >&5
18828 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18829 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18830   echo $ECHO_N "(cached) $ECHO_C" >&6
18831 else
18832   ac_check_lib_save_LIBS=$LIBS
18833 LIBS="-lsystre  $LIBS"
18834 cat >"conftest.$ac_ext" <<_ACEOF
18835 #line 18835 "configure"
18836 #include "confdefs.h"
18837
18838 /* Override any gcc2 internal prototype to avoid an error.  */
18839 #ifdef __cplusplus
18840 extern "C"
18841 #endif
18842 /* We use char because int might match the return type of a gcc2
18843    builtin and then its argument prototype would still apply.  */
18844 char regcomp ();
18845 int
18846 main (void)
18847 {
18848 regcomp ();
18849   ;
18850   return 0;
18851 }
18852 _ACEOF
18853 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18854 if { (eval echo "$as_me:18854: \"$ac_link\"") >&5
18855   (eval $ac_link) 2>&5
18856   ac_status=$?
18857   echo "$as_me:18857: \$? = $ac_status" >&5
18858   (exit "$ac_status"); } &&
18859          { ac_try='test -s "conftest$ac_exeext"'
18860   { (eval echo "$as_me:18860: \"$ac_try\"") >&5
18861   (eval $ac_try) 2>&5
18862   ac_status=$?
18863   echo "$as_me:18863: \$? = $ac_status" >&5
18864   (exit "$ac_status"); }; }; then
18865   ac_cv_lib_systre_regcomp=yes
18866 else
18867   echo "$as_me: failed program was:" >&5
18868 cat "conftest.$ac_ext" >&5
18869 ac_cv_lib_systre_regcomp=no
18870 fi
18871 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18872 LIBS=$ac_check_lib_save_LIBS
18873 fi
18874 echo "$as_me:18874: result: $ac_cv_lib_systre_regcomp" >&5
18875 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18876 if test "$ac_cv_lib_systre_regcomp" = yes; then
18877
18878                 echo "$as_me:18878: checking for libiconv_open in -liconv" >&5
18879 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18880 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18881   echo $ECHO_N "(cached) $ECHO_C" >&6
18882 else
18883   ac_check_lib_save_LIBS=$LIBS
18884 LIBS="-liconv  $LIBS"
18885 cat >"conftest.$ac_ext" <<_ACEOF
18886 #line 18886 "configure"
18887 #include "confdefs.h"
18888
18889 /* Override any gcc2 internal prototype to avoid an error.  */
18890 #ifdef __cplusplus
18891 extern "C"
18892 #endif
18893 /* We use char because int might match the return type of a gcc2
18894    builtin and then its argument prototype would still apply.  */
18895 char libiconv_open ();
18896 int
18897 main (void)
18898 {
18899 libiconv_open ();
18900   ;
18901   return 0;
18902 }
18903 _ACEOF
18904 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18905 if { (eval echo "$as_me:18905: \"$ac_link\"") >&5
18906   (eval $ac_link) 2>&5
18907   ac_status=$?
18908   echo "$as_me:18908: \$? = $ac_status" >&5
18909   (exit "$ac_status"); } &&
18910          { ac_try='test -s "conftest$ac_exeext"'
18911   { (eval echo "$as_me:18911: \"$ac_try\"") >&5
18912   (eval $ac_try) 2>&5
18913   ac_status=$?
18914   echo "$as_me:18914: \$? = $ac_status" >&5
18915   (exit "$ac_status"); }; }; then
18916   ac_cv_lib_iconv_libiconv_open=yes
18917 else
18918   echo "$as_me: failed program was:" >&5
18919 cat "conftest.$ac_ext" >&5
18920 ac_cv_lib_iconv_libiconv_open=no
18921 fi
18922 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18923 LIBS=$ac_check_lib_save_LIBS
18924 fi
18925 echo "$as_me:18925: result: $ac_cv_lib_iconv_libiconv_open" >&5
18926 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18927 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18928
18929 cf_add_libs="$LIBS"
18930 # reverse order
18931 cf_add_0lib=
18932 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18933 # filter duplicates
18934 for cf_add_1lib in $cf_add_0lib; do
18935         for cf_add_2lib in $cf_add_libs; do
18936                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18937                         cf_add_1lib=
18938                         break
18939                 fi
18940         done
18941         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18942 done
18943 LIBS="$cf_add_libs"
18944
18945 fi
18946
18947                 echo "$as_me:18947: checking for libintl_gettext in -lintl" >&5
18948 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18949 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18950   echo $ECHO_N "(cached) $ECHO_C" >&6
18951 else
18952   ac_check_lib_save_LIBS=$LIBS
18953 LIBS="-lintl  $LIBS"
18954 cat >"conftest.$ac_ext" <<_ACEOF
18955 #line 18955 "configure"
18956 #include "confdefs.h"
18957
18958 /* Override any gcc2 internal prototype to avoid an error.  */
18959 #ifdef __cplusplus
18960 extern "C"
18961 #endif
18962 /* We use char because int might match the return type of a gcc2
18963    builtin and then its argument prototype would still apply.  */
18964 char libintl_gettext ();
18965 int
18966 main (void)
18967 {
18968 libintl_gettext ();
18969   ;
18970   return 0;
18971 }
18972 _ACEOF
18973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18974 if { (eval echo "$as_me:18974: \"$ac_link\"") >&5
18975   (eval $ac_link) 2>&5
18976   ac_status=$?
18977   echo "$as_me:18977: \$? = $ac_status" >&5
18978   (exit "$ac_status"); } &&
18979          { ac_try='test -s "conftest$ac_exeext"'
18980   { (eval echo "$as_me:18980: \"$ac_try\"") >&5
18981   (eval $ac_try) 2>&5
18982   ac_status=$?
18983   echo "$as_me:18983: \$? = $ac_status" >&5
18984   (exit "$ac_status"); }; }; then
18985   ac_cv_lib_intl_libintl_gettext=yes
18986 else
18987   echo "$as_me: failed program was:" >&5
18988 cat "conftest.$ac_ext" >&5
18989 ac_cv_lib_intl_libintl_gettext=no
18990 fi
18991 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18992 LIBS=$ac_check_lib_save_LIBS
18993 fi
18994 echo "$as_me:18994: result: $ac_cv_lib_intl_libintl_gettext" >&5
18995 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18996 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
18997
18998 cf_add_libs="$LIBS"
18999 # reverse order
19000 cf_add_0lib=
19001 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19002 # filter duplicates
19003 for cf_add_1lib in $cf_add_0lib; do
19004         for cf_add_2lib in $cf_add_libs; do
19005                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19006                         cf_add_1lib=
19007                         break
19008                 fi
19009         done
19010         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19011 done
19012 LIBS="$cf_add_libs"
19013
19014 fi
19015
19016                 echo "$as_me:19016: checking for tre_regcomp in -ltre" >&5
19017 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19018 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19019   echo $ECHO_N "(cached) $ECHO_C" >&6
19020 else
19021   ac_check_lib_save_LIBS=$LIBS
19022 LIBS="-ltre  $LIBS"
19023 cat >"conftest.$ac_ext" <<_ACEOF
19024 #line 19024 "configure"
19025 #include "confdefs.h"
19026
19027 /* Override any gcc2 internal prototype to avoid an error.  */
19028 #ifdef __cplusplus
19029 extern "C"
19030 #endif
19031 /* We use char because int might match the return type of a gcc2
19032    builtin and then its argument prototype would still apply.  */
19033 char tre_regcomp ();
19034 int
19035 main (void)
19036 {
19037 tre_regcomp ();
19038   ;
19039   return 0;
19040 }
19041 _ACEOF
19042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19043 if { (eval echo "$as_me:19043: \"$ac_link\"") >&5
19044   (eval $ac_link) 2>&5
19045   ac_status=$?
19046   echo "$as_me:19046: \$? = $ac_status" >&5
19047   (exit "$ac_status"); } &&
19048          { ac_try='test -s "conftest$ac_exeext"'
19049   { (eval echo "$as_me:19049: \"$ac_try\"") >&5
19050   (eval $ac_try) 2>&5
19051   ac_status=$?
19052   echo "$as_me:19052: \$? = $ac_status" >&5
19053   (exit "$ac_status"); }; }; then
19054   ac_cv_lib_tre_tre_regcomp=yes
19055 else
19056   echo "$as_me: failed program was:" >&5
19057 cat "conftest.$ac_ext" >&5
19058 ac_cv_lib_tre_tre_regcomp=no
19059 fi
19060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19061 LIBS=$ac_check_lib_save_LIBS
19062 fi
19063 echo "$as_me:19063: result: $ac_cv_lib_tre_tre_regcomp" >&5
19064 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19065 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19066
19067 cf_add_libs="$LIBS"
19068 # reverse order
19069 cf_add_0lib=
19070 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19071 # filter duplicates
19072 for cf_add_1lib in $cf_add_0lib; do
19073         for cf_add_2lib in $cf_add_libs; do
19074                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19075                         cf_add_1lib=
19076                         break
19077                 fi
19078         done
19079         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19080 done
19081 LIBS="$cf_add_libs"
19082
19083 fi
19084
19085 cf_add_libs="$LIBS"
19086 # reverse order
19087 cf_add_0lib=
19088 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19089 # filter duplicates
19090 for cf_add_1lib in $cf_add_0lib; do
19091         for cf_add_2lib in $cf_add_libs; do
19092                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19093                         cf_add_1lib=
19094                         break
19095                 fi
19096         done
19097         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19098 done
19099 LIBS="$cf_add_libs"
19100
19101                 cf_regex_func=regcomp
19102
19103 else
19104
19105                 echo "$as_me:19105: checking for regcomp in -lgnurx" >&5
19106 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19107 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19108   echo $ECHO_N "(cached) $ECHO_C" >&6
19109 else
19110   ac_check_lib_save_LIBS=$LIBS
19111 LIBS="-lgnurx  $LIBS"
19112 cat >"conftest.$ac_ext" <<_ACEOF
19113 #line 19113 "configure"
19114 #include "confdefs.h"
19115
19116 /* Override any gcc2 internal prototype to avoid an error.  */
19117 #ifdef __cplusplus
19118 extern "C"
19119 #endif
19120 /* We use char because int might match the return type of a gcc2
19121    builtin and then its argument prototype would still apply.  */
19122 char regcomp ();
19123 int
19124 main (void)
19125 {
19126 regcomp ();
19127   ;
19128   return 0;
19129 }
19130 _ACEOF
19131 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19132 if { (eval echo "$as_me:19132: \"$ac_link\"") >&5
19133   (eval $ac_link) 2>&5
19134   ac_status=$?
19135   echo "$as_me:19135: \$? = $ac_status" >&5
19136   (exit "$ac_status"); } &&
19137          { ac_try='test -s "conftest$ac_exeext"'
19138   { (eval echo "$as_me:19138: \"$ac_try\"") >&5
19139   (eval $ac_try) 2>&5
19140   ac_status=$?
19141   echo "$as_me:19141: \$? = $ac_status" >&5
19142   (exit "$ac_status"); }; }; then
19143   ac_cv_lib_gnurx_regcomp=yes
19144 else
19145   echo "$as_me: failed program was:" >&5
19146 cat "conftest.$ac_ext" >&5
19147 ac_cv_lib_gnurx_regcomp=no
19148 fi
19149 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19150 LIBS=$ac_check_lib_save_LIBS
19151 fi
19152 echo "$as_me:19152: result: $ac_cv_lib_gnurx_regcomp" >&5
19153 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19154 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19155
19156 cf_add_libs="$LIBS"
19157 # reverse order
19158 cf_add_0lib=
19159 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19160 # filter duplicates
19161 for cf_add_1lib in $cf_add_0lib; do
19162         for cf_add_2lib in $cf_add_libs; do
19163                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19164                         cf_add_1lib=
19165                         break
19166                 fi
19167         done
19168         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19169 done
19170 LIBS="$cf_add_libs"
19171
19172                         cf_regex_func=regcomp
19173 fi
19174
19175 fi
19176
19177         ;;
19178 (*)
19179         cf_regex_libs="regex re"
19180         echo "$as_me:19180: checking for regcomp" >&5
19181 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19182 if test "${ac_cv_func_regcomp+set}" = set; then
19183   echo $ECHO_N "(cached) $ECHO_C" >&6
19184 else
19185   cat >"conftest.$ac_ext" <<_ACEOF
19186 #line 19186 "configure"
19187 #include "confdefs.h"
19188 #define regcomp autoconf_temporary
19189 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19190 #undef regcomp
19191
19192 #ifdef __cplusplus
19193 extern "C"
19194 #endif
19195
19196 /* We use char because int might match the return type of a gcc2
19197    builtin and then its argument prototype would still apply.  */
19198 char regcomp (void);
19199
19200 int
19201 main (void)
19202 {
19203
19204 /* The GNU C library defines stubs for functions which it implements
19205     to always fail with ENOSYS.  Some functions are actually named
19206     something starting with __ and the normal name is an alias.  */
19207 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19208 #error found stub for regcomp
19209 #endif
19210
19211         return regcomp ();
19212   ;
19213   return 0;
19214 }
19215 _ACEOF
19216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19217 if { (eval echo "$as_me:19217: \"$ac_link\"") >&5
19218   (eval $ac_link) 2>&5
19219   ac_status=$?
19220   echo "$as_me:19220: \$? = $ac_status" >&5
19221   (exit "$ac_status"); } &&
19222          { ac_try='test -s "conftest$ac_exeext"'
19223   { (eval echo "$as_me:19223: \"$ac_try\"") >&5
19224   (eval $ac_try) 2>&5
19225   ac_status=$?
19226   echo "$as_me:19226: \$? = $ac_status" >&5
19227   (exit "$ac_status"); }; }; then
19228   ac_cv_func_regcomp=yes
19229 else
19230   echo "$as_me: failed program was:" >&5
19231 cat "conftest.$ac_ext" >&5
19232 ac_cv_func_regcomp=no
19233 fi
19234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19235 fi
19236 echo "$as_me:19236: result: $ac_cv_func_regcomp" >&5
19237 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19238 if test "$ac_cv_func_regcomp" = yes; then
19239   cf_regex_func=regcomp
19240 else
19241
19242                 for cf_regex_lib in $cf_regex_libs
19243                 do
19244                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19245 echo "$as_me:19245: checking for regcomp in -l$cf_regex_lib" >&5
19246 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19247 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19248   echo $ECHO_N "(cached) $ECHO_C" >&6
19249 else
19250   ac_check_lib_save_LIBS=$LIBS
19251 LIBS="-l$cf_regex_lib  $LIBS"
19252 cat >"conftest.$ac_ext" <<_ACEOF
19253 #line 19253 "configure"
19254 #include "confdefs.h"
19255
19256 /* Override any gcc2 internal prototype to avoid an error.  */
19257 #ifdef __cplusplus
19258 extern "C"
19259 #endif
19260 /* We use char because int might match the return type of a gcc2
19261    builtin and then its argument prototype would still apply.  */
19262 char regcomp ();
19263 int
19264 main (void)
19265 {
19266 regcomp ();
19267   ;
19268   return 0;
19269 }
19270 _ACEOF
19271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19272 if { (eval echo "$as_me:19272: \"$ac_link\"") >&5
19273   (eval $ac_link) 2>&5
19274   ac_status=$?
19275   echo "$as_me:19275: \$? = $ac_status" >&5
19276   (exit "$ac_status"); } &&
19277          { ac_try='test -s "conftest$ac_exeext"'
19278   { (eval echo "$as_me:19278: \"$ac_try\"") >&5
19279   (eval $ac_try) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit "$ac_status"); }; }; then
19283   eval "$as_ac_Lib=yes"
19284 else
19285   echo "$as_me: failed program was:" >&5
19286 cat "conftest.$ac_ext" >&5
19287 eval "$as_ac_Lib=no"
19288 fi
19289 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19290 LIBS=$ac_check_lib_save_LIBS
19291 fi
19292 echo "$as_me:19292: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19293 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19294 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19295
19296 cf_add_libs="$LIBS"
19297 # reverse order
19298 cf_add_0lib=
19299 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19300 # filter duplicates
19301 for cf_add_1lib in $cf_add_0lib; do
19302         for cf_add_2lib in $cf_add_libs; do
19303                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19304                         cf_add_1lib=
19305                         break
19306                 fi
19307         done
19308         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19309 done
19310 LIBS="$cf_add_libs"
19311
19312                                         cf_regex_func=regcomp
19313                                         break
19314 fi
19315
19316                 done
19317
19318 fi
19319
19320         ;;
19321 esac
19322
19323 if test "$cf_regex_func" = no ; then
19324         echo "$as_me:19324: checking for compile" >&5
19325 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19326 if test "${ac_cv_func_compile+set}" = set; then
19327   echo $ECHO_N "(cached) $ECHO_C" >&6
19328 else
19329   cat >"conftest.$ac_ext" <<_ACEOF
19330 #line 19330 "configure"
19331 #include "confdefs.h"
19332 #define compile autoconf_temporary
19333 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19334 #undef compile
19335
19336 #ifdef __cplusplus
19337 extern "C"
19338 #endif
19339
19340 /* We use char because int might match the return type of a gcc2
19341    builtin and then its argument prototype would still apply.  */
19342 char compile (void);
19343
19344 int
19345 main (void)
19346 {
19347
19348 /* The GNU C library defines stubs for functions which it implements
19349     to always fail with ENOSYS.  Some functions are actually named
19350     something starting with __ and the normal name is an alias.  */
19351 #if defined (__stub_compile) || defined (__stub___compile)
19352 #error found stub for compile
19353 #endif
19354
19355         return compile ();
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19361 if { (eval echo "$as_me:19361: \"$ac_link\"") >&5
19362   (eval $ac_link) 2>&5
19363   ac_status=$?
19364   echo "$as_me:19364: \$? = $ac_status" >&5
19365   (exit "$ac_status"); } &&
19366          { ac_try='test -s "conftest$ac_exeext"'
19367   { (eval echo "$as_me:19367: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit "$ac_status"); }; }; then
19372   ac_cv_func_compile=yes
19373 else
19374   echo "$as_me: failed program was:" >&5
19375 cat "conftest.$ac_ext" >&5
19376 ac_cv_func_compile=no
19377 fi
19378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19379 fi
19380 echo "$as_me:19380: result: $ac_cv_func_compile" >&5
19381 echo "${ECHO_T}$ac_cv_func_compile" >&6
19382 if test "$ac_cv_func_compile" = yes; then
19383   cf_regex_func=compile
19384 else
19385
19386                 echo "$as_me:19386: checking for compile in -lgen" >&5
19387 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19388 if test "${ac_cv_lib_gen_compile+set}" = set; then
19389   echo $ECHO_N "(cached) $ECHO_C" >&6
19390 else
19391   ac_check_lib_save_LIBS=$LIBS
19392 LIBS="-lgen  $LIBS"
19393 cat >"conftest.$ac_ext" <<_ACEOF
19394 #line 19394 "configure"
19395 #include "confdefs.h"
19396
19397 /* Override any gcc2 internal prototype to avoid an error.  */
19398 #ifdef __cplusplus
19399 extern "C"
19400 #endif
19401 /* We use char because int might match the return type of a gcc2
19402    builtin and then its argument prototype would still apply.  */
19403 char compile ();
19404 int
19405 main (void)
19406 {
19407 compile ();
19408   ;
19409   return 0;
19410 }
19411 _ACEOF
19412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19413 if { (eval echo "$as_me:19413: \"$ac_link\"") >&5
19414   (eval $ac_link) 2>&5
19415   ac_status=$?
19416   echo "$as_me:19416: \$? = $ac_status" >&5
19417   (exit "$ac_status"); } &&
19418          { ac_try='test -s "conftest$ac_exeext"'
19419   { (eval echo "$as_me:19419: \"$ac_try\"") >&5
19420   (eval $ac_try) 2>&5
19421   ac_status=$?
19422   echo "$as_me:19422: \$? = $ac_status" >&5
19423   (exit "$ac_status"); }; }; then
19424   ac_cv_lib_gen_compile=yes
19425 else
19426   echo "$as_me: failed program was:" >&5
19427 cat "conftest.$ac_ext" >&5
19428 ac_cv_lib_gen_compile=no
19429 fi
19430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19431 LIBS=$ac_check_lib_save_LIBS
19432 fi
19433 echo "$as_me:19433: result: $ac_cv_lib_gen_compile" >&5
19434 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19435 if test "$ac_cv_lib_gen_compile" = yes; then
19436
19437 cf_add_libs="$LIBS"
19438 # reverse order
19439 cf_add_0lib=
19440 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19441 # filter duplicates
19442 for cf_add_1lib in $cf_add_0lib; do
19443         for cf_add_2lib in $cf_add_libs; do
19444                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19445                         cf_add_1lib=
19446                         break
19447                 fi
19448         done
19449         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19450 done
19451 LIBS="$cf_add_libs"
19452
19453                                 cf_regex_func=compile
19454 fi
19455
19456 fi
19457
19458 fi
19459
19460 if test "$cf_regex_func" = no ; then
19461         { echo "$as_me:19461: WARNING: cannot find regular expression library" >&5
19462 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19463 fi
19464
19465 echo "$as_me:19465: checking for regular-expression headers" >&5
19466 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19467 if test "${cf_cv_regex_hdrs+set}" = set; then
19468   echo $ECHO_N "(cached) $ECHO_C" >&6
19469 else
19470
19471 cf_cv_regex_hdrs=no
19472 case "$cf_regex_func" in
19473 (compile)
19474         for cf_regex_hdr in regexp.h regexpr.h
19475         do
19476                 cat >"conftest.$ac_ext" <<_ACEOF
19477 #line 19477 "configure"
19478 #include "confdefs.h"
19479 #include <$cf_regex_hdr>
19480 int
19481 main (void)
19482 {
19483
19484                         char *p = compile("", "", "", 0);
19485                         int x = step("", "");
19486                         (void)p;
19487                         (void)x;
19488
19489   ;
19490   return 0;
19491 }
19492 _ACEOF
19493 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19494 if { (eval echo "$as_me:19494: \"$ac_link\"") >&5
19495   (eval $ac_link) 2>&5
19496   ac_status=$?
19497   echo "$as_me:19497: \$? = $ac_status" >&5
19498   (exit "$ac_status"); } &&
19499          { ac_try='test -s "conftest$ac_exeext"'
19500   { (eval echo "$as_me:19500: \"$ac_try\"") >&5
19501   (eval $ac_try) 2>&5
19502   ac_status=$?
19503   echo "$as_me:19503: \$? = $ac_status" >&5
19504   (exit "$ac_status"); }; }; then
19505
19506                         cf_cv_regex_hdrs=$cf_regex_hdr
19507                         break
19508
19509 else
19510   echo "$as_me: failed program was:" >&5
19511 cat "conftest.$ac_ext" >&5
19512 fi
19513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19514         done
19515         ;;
19516 (*)
19517         for cf_regex_hdr in regex.h
19518         do
19519                 cat >"conftest.$ac_ext" <<_ACEOF
19520 #line 19520 "configure"
19521 #include "confdefs.h"
19522 #include <sys/types.h>
19523 #include <$cf_regex_hdr>
19524 int
19525 main (void)
19526 {
19527
19528                         regex_t *p = 0;
19529                         int x = regcomp(p, "", 0);
19530                         int y = regexec(p, "", 0, 0, 0);
19531                         (void)x;
19532                         (void)y;
19533                         regfree(p);
19534
19535   ;
19536   return 0;
19537 }
19538 _ACEOF
19539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19540 if { (eval echo "$as_me:19540: \"$ac_link\"") >&5
19541   (eval $ac_link) 2>&5
19542   ac_status=$?
19543   echo "$as_me:19543: \$? = $ac_status" >&5
19544   (exit "$ac_status"); } &&
19545          { ac_try='test -s "conftest$ac_exeext"'
19546   { (eval echo "$as_me:19546: \"$ac_try\"") >&5
19547   (eval $ac_try) 2>&5
19548   ac_status=$?
19549   echo "$as_me:19549: \$? = $ac_status" >&5
19550   (exit "$ac_status"); }; }; then
19551
19552                         cf_cv_regex_hdrs=$cf_regex_hdr
19553                         break
19554
19555 else
19556   echo "$as_me: failed program was:" >&5
19557 cat "conftest.$ac_ext" >&5
19558 fi
19559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19560         done
19561         ;;
19562 esac
19563
19564 fi
19565 echo "$as_me:19565: result: $cf_cv_regex_hdrs" >&5
19566 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19567
19568 case "$cf_cv_regex_hdrs" in
19569         (no)            { echo "$as_me:19569: WARNING: no regular expression header found" >&5
19570 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19571         (regex.h)
19572 cat >>confdefs.h <<\EOF
19573 #define HAVE_REGEX_H_FUNCS 1
19574 EOF
19575  ;;
19576         (regexp.h)
19577 cat >>confdefs.h <<\EOF
19578 #define HAVE_REGEXP_H_FUNCS 1
19579 EOF
19580  ;;
19581         (regexpr.h)
19582 cat >>confdefs.h <<\EOF
19583 #define HAVE_REGEXPR_H_FUNCS 1
19584 EOF
19585  ;;
19586 esac
19587
19588 for ac_header in \
19589 fcntl.h \
19590 getopt.h \
19591 limits.h \
19592 locale.h \
19593 math.h \
19594 poll.h \
19595 sys/ioctl.h \
19596 sys/param.h \
19597 sys/poll.h \
19598 sys/select.h \
19599 sys/time.h \
19600 sys/times.h \
19601 ttyent.h \
19602 unistd.h \
19603 wctype.h \
19604
19605 do
19606 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19607 echo "$as_me:19607: checking for $ac_header" >&5
19608 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19609 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19610   echo $ECHO_N "(cached) $ECHO_C" >&6
19611 else
19612   cat >"conftest.$ac_ext" <<_ACEOF
19613 #line 19613 "configure"
19614 #include "confdefs.h"
19615 #include <$ac_header>
19616 _ACEOF
19617 if { (eval echo "$as_me:19617: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19618   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19619   ac_status=$?
19620   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19621   rm -f conftest.er1
19622   cat conftest.err >&5
19623   echo "$as_me:19623: \$? = $ac_status" >&5
19624   (exit "$ac_status"); } >/dev/null; then
19625   if test -s conftest.err; then
19626     ac_cpp_err=$ac_c_preproc_warn_flag
19627   else
19628     ac_cpp_err=
19629   fi
19630 else
19631   ac_cpp_err=yes
19632 fi
19633 if test -z "$ac_cpp_err"; then
19634   eval "$as_ac_Header=yes"
19635 else
19636   echo "$as_me: failed program was:" >&5
19637   cat "conftest.$ac_ext" >&5
19638   eval "$as_ac_Header=no"
19639 fi
19640 rm -f conftest.err "conftest.$ac_ext"
19641 fi
19642 echo "$as_me:19642: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19643 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19644 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19645   cat >>confdefs.h <<EOF
19646 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19647 EOF
19648
19649 fi
19650 done
19651
19652 for ac_header in unistd.h getopt.h
19653 do
19654 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19655 echo "$as_me:19655: checking for $ac_header" >&5
19656 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19657 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19658   echo $ECHO_N "(cached) $ECHO_C" >&6
19659 else
19660   cat >"conftest.$ac_ext" <<_ACEOF
19661 #line 19661 "configure"
19662 #include "confdefs.h"
19663 #include <$ac_header>
19664 _ACEOF
19665 if { (eval echo "$as_me:19665: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19666   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19667   ac_status=$?
19668   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19669   rm -f conftest.er1
19670   cat conftest.err >&5
19671   echo "$as_me:19671: \$? = $ac_status" >&5
19672   (exit "$ac_status"); } >/dev/null; then
19673   if test -s conftest.err; then
19674     ac_cpp_err=$ac_c_preproc_warn_flag
19675   else
19676     ac_cpp_err=
19677   fi
19678 else
19679   ac_cpp_err=yes
19680 fi
19681 if test -z "$ac_cpp_err"; then
19682   eval "$as_ac_Header=yes"
19683 else
19684   echo "$as_me: failed program was:" >&5
19685   cat "conftest.$ac_ext" >&5
19686   eval "$as_ac_Header=no"
19687 fi
19688 rm -f conftest.err "conftest.$ac_ext"
19689 fi
19690 echo "$as_me:19690: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19691 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19692 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19693   cat >>confdefs.h <<EOF
19694 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19695 EOF
19696
19697 fi
19698 done
19699
19700 echo "$as_me:19700: checking for header declaring getopt variables" >&5
19701 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19702 if test "${cf_cv_getopt_header+set}" = set; then
19703   echo $ECHO_N "(cached) $ECHO_C" >&6
19704 else
19705
19706 cf_cv_getopt_header=none
19707 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19708 do
19709 cat >"conftest.$ac_ext" <<_ACEOF
19710 #line 19710 "configure"
19711 #include "confdefs.h"
19712
19713 #include <$cf_header>
19714 int
19715 main (void)
19716 {
19717 int x = optind; char *y = optarg
19718   ;
19719   return 0;
19720 }
19721 _ACEOF
19722 rm -f "conftest.$ac_objext"
19723 if { (eval echo "$as_me:19723: \"$ac_compile\"") >&5
19724   (eval $ac_compile) 2>&5
19725   ac_status=$?
19726   echo "$as_me:19726: \$? = $ac_status" >&5
19727   (exit "$ac_status"); } &&
19728          { ac_try='test -s "conftest.$ac_objext"'
19729   { (eval echo "$as_me:19729: \"$ac_try\"") >&5
19730   (eval $ac_try) 2>&5
19731   ac_status=$?
19732   echo "$as_me:19732: \$? = $ac_status" >&5
19733   (exit "$ac_status"); }; }; then
19734   cf_cv_getopt_header=$cf_header
19735  break
19736 else
19737   echo "$as_me: failed program was:" >&5
19738 cat "conftest.$ac_ext" >&5
19739 fi
19740 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19741 done
19742
19743 fi
19744 echo "$as_me:19744: result: $cf_cv_getopt_header" >&5
19745 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19746 if test "$cf_cv_getopt_header" != none ; then
19747
19748 cat >>confdefs.h <<\EOF
19749 #define HAVE_GETOPT_HEADER 1
19750 EOF
19751
19752 fi
19753 if test "$cf_cv_getopt_header" = getopt.h ; then
19754
19755 cat >>confdefs.h <<\EOF
19756 #define NEED_GETOPT_H 1
19757 EOF
19758
19759 fi
19760
19761 echo "$as_me:19761: checking if external environ is declared" >&5
19762 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19763 if test "${cf_cv_dcl_environ+set}" = set; then
19764   echo $ECHO_N "(cached) $ECHO_C" >&6
19765 else
19766
19767     cat >"conftest.$ac_ext" <<_ACEOF
19768 #line 19768 "configure"
19769 #include "confdefs.h"
19770
19771 #ifdef HAVE_STDLIB_H
19772 #include <stdlib.h>
19773 #endif
19774 #include <unistd.h>
19775 int
19776 main (void)
19777 {
19778 int x = (int) environ
19779   ;
19780   return 0;
19781 }
19782 _ACEOF
19783 rm -f "conftest.$ac_objext"
19784 if { (eval echo "$as_me:19784: \"$ac_compile\"") >&5
19785   (eval $ac_compile) 2>&5
19786   ac_status=$?
19787   echo "$as_me:19787: \$? = $ac_status" >&5
19788   (exit "$ac_status"); } &&
19789          { ac_try='test -s "conftest.$ac_objext"'
19790   { (eval echo "$as_me:19790: \"$ac_try\"") >&5
19791   (eval $ac_try) 2>&5
19792   ac_status=$?
19793   echo "$as_me:19793: \$? = $ac_status" >&5
19794   (exit "$ac_status"); }; }; then
19795   cf_cv_dcl_environ=yes
19796 else
19797   echo "$as_me: failed program was:" >&5
19798 cat "conftest.$ac_ext" >&5
19799 cf_cv_dcl_environ=no
19800 fi
19801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19802
19803 fi
19804 echo "$as_me:19804: result: $cf_cv_dcl_environ" >&5
19805 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19806
19807 if test "$cf_cv_dcl_environ" = no ; then
19808
19809 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19810
19811     cat >>confdefs.h <<EOF
19812 #define $cf_result 1
19813 EOF
19814
19815 fi
19816
19817 # It's possible (for near-UNIX clones) that the data doesn't exist
19818
19819 echo "$as_me:19819: checking if external environ exists" >&5
19820 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19821 if test "${cf_cv_have_environ+set}" = set; then
19822   echo $ECHO_N "(cached) $ECHO_C" >&6
19823 else
19824
19825         cat >"conftest.$ac_ext" <<_ACEOF
19826 #line 19826 "configure"
19827 #include "confdefs.h"
19828
19829 #undef environ
19830 extern int environ;
19831
19832 int
19833 main (void)
19834 {
19835 environ = 2
19836   ;
19837   return 0;
19838 }
19839 _ACEOF
19840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19841 if { (eval echo "$as_me:19841: \"$ac_link\"") >&5
19842   (eval $ac_link) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit "$ac_status"); } &&
19846          { ac_try='test -s "conftest$ac_exeext"'
19847   { (eval echo "$as_me:19847: \"$ac_try\"") >&5
19848   (eval $ac_try) 2>&5
19849   ac_status=$?
19850   echo "$as_me:19850: \$? = $ac_status" >&5
19851   (exit "$ac_status"); }; }; then
19852   cf_cv_have_environ=yes
19853 else
19854   echo "$as_me: failed program was:" >&5
19855 cat "conftest.$ac_ext" >&5
19856 cf_cv_have_environ=no
19857 fi
19858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19859
19860 fi
19861 echo "$as_me:19861: result: $cf_cv_have_environ" >&5
19862 echo "${ECHO_T}$cf_cv_have_environ" >&6
19863
19864 if test "$cf_cv_have_environ" = yes ; then
19865
19866 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19867
19868         cat >>confdefs.h <<EOF
19869 #define $cf_result 1
19870 EOF
19871
19872 fi
19873
19874 echo "$as_me:19874: checking for getenv" >&5
19875 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19876 if test "${ac_cv_func_getenv+set}" = set; then
19877   echo $ECHO_N "(cached) $ECHO_C" >&6
19878 else
19879   cat >"conftest.$ac_ext" <<_ACEOF
19880 #line 19880 "configure"
19881 #include "confdefs.h"
19882 #define getenv autoconf_temporary
19883 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19884 #undef getenv
19885
19886 #ifdef __cplusplus
19887 extern "C"
19888 #endif
19889
19890 /* We use char because int might match the return type of a gcc2
19891    builtin and then its argument prototype would still apply.  */
19892 char getenv (void);
19893
19894 int
19895 main (void)
19896 {
19897
19898 /* The GNU C library defines stubs for functions which it implements
19899     to always fail with ENOSYS.  Some functions are actually named
19900     something starting with __ and the normal name is an alias.  */
19901 #if defined (__stub_getenv) || defined (__stub___getenv)
19902 #error found stub for getenv
19903 #endif
19904
19905         return getenv ();
19906   ;
19907   return 0;
19908 }
19909 _ACEOF
19910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19911 if { (eval echo "$as_me:19911: \"$ac_link\"") >&5
19912   (eval $ac_link) 2>&5
19913   ac_status=$?
19914   echo "$as_me:19914: \$? = $ac_status" >&5
19915   (exit "$ac_status"); } &&
19916          { ac_try='test -s "conftest$ac_exeext"'
19917   { (eval echo "$as_me:19917: \"$ac_try\"") >&5
19918   (eval $ac_try) 2>&5
19919   ac_status=$?
19920   echo "$as_me:19920: \$? = $ac_status" >&5
19921   (exit "$ac_status"); }; }; then
19922   ac_cv_func_getenv=yes
19923 else
19924   echo "$as_me: failed program was:" >&5
19925 cat "conftest.$ac_ext" >&5
19926 ac_cv_func_getenv=no
19927 fi
19928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19929 fi
19930 echo "$as_me:19930: result: $ac_cv_func_getenv" >&5
19931 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19932
19933 for ac_func in putenv setenv strdup
19934 do
19935 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19936 echo "$as_me:19936: checking for $ac_func" >&5
19937 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19938 if eval "test \"\${$as_ac_var+set}\" = set"; then
19939   echo $ECHO_N "(cached) $ECHO_C" >&6
19940 else
19941   cat >"conftest.$ac_ext" <<_ACEOF
19942 #line 19942 "configure"
19943 #include "confdefs.h"
19944 #define $ac_func autoconf_temporary
19945 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19946 #undef $ac_func
19947
19948 #ifdef __cplusplus
19949 extern "C"
19950 #endif
19951
19952 /* We use char because int might match the return type of a gcc2
19953    builtin and then its argument prototype would still apply.  */
19954 char $ac_func (void);
19955
19956 int
19957 main (void)
19958 {
19959
19960 /* The GNU C library defines stubs for functions which it implements
19961     to always fail with ENOSYS.  Some functions are actually named
19962     something starting with __ and the normal name is an alias.  */
19963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19964 #error found stub for $ac_func
19965 #endif
19966
19967         return $ac_func ();
19968   ;
19969   return 0;
19970 }
19971 _ACEOF
19972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19973 if { (eval echo "$as_me:19973: \"$ac_link\"") >&5
19974   (eval $ac_link) 2>&5
19975   ac_status=$?
19976   echo "$as_me:19976: \$? = $ac_status" >&5
19977   (exit "$ac_status"); } &&
19978          { ac_try='test -s "conftest$ac_exeext"'
19979   { (eval echo "$as_me:19979: \"$ac_try\"") >&5
19980   (eval $ac_try) 2>&5
19981   ac_status=$?
19982   echo "$as_me:19982: \$? = $ac_status" >&5
19983   (exit "$ac_status"); }; }; then
19984   eval "$as_ac_var=yes"
19985 else
19986   echo "$as_me: failed program was:" >&5
19987 cat "conftest.$ac_ext" >&5
19988 eval "$as_ac_var=no"
19989 fi
19990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19991 fi
19992 echo "$as_me:19992: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19993 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19994 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19995   cat >>confdefs.h <<EOF
19996 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19997 EOF
19998
19999 fi
20000 done
20001
20002 echo "$as_me:20002: checking if getenv returns consistent values" >&5
20003 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20004 if test "${cf_cv_consistent_getenv+set}" = set; then
20005   echo $ECHO_N "(cached) $ECHO_C" >&6
20006 else
20007
20008 if test "$cross_compiling" = yes; then
20009   cf_cv_consistent_getenv=unknown
20010 else
20011   cat >"conftest.$ac_ext" <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014
20015 #include <stdlib.h>
20016 #include <unistd.h>
20017 #include <stdio.h>
20018 #include <string.h>
20019 #include <sys/types.h>
20020
20021 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20022 extern char **environ;  /* POSIX, but some systems are not... */
20023 #endif
20024
20025 #if defined(HAVE_STRDUP)
20026 #define str_alloc(s) strdup(s)
20027 #else
20028 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20029 #endif
20030
20031 static void set_value(const char *name, const char *value)
20032 {
20033 #if defined(HAVE_SETENV)
20034         setenv(name, value, 1);
20035 #elif defined(HAVE_PUTENV)
20036         char buffer[1024];
20037         sprintf(buffer, "%s=%s", name, value);
20038         putenv(str_alloc(buffer));
20039 #else
20040 #error neither putenv/setenv found
20041 #endif
20042 }
20043 int main(void)
20044 {
20045         int pass;
20046         size_t numenv, limit, j;
20047         char **mynames;
20048         char **myvalues;
20049         char **mypointer;
20050         char *equals;
20051         for (numenv = 0; environ[numenv]; ++numenv) ;
20052         limit = numenv + 10;
20053         mynames = (char **) calloc(limit + 1, sizeof(char *));
20054         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20055         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20056 #if defined(HAVE_ENVIRON)
20057         for (j = 0; environ[j]; ++j) {
20058                 mynames[j] = str_alloc(environ[j]);
20059                 equals = strchr(mynames[j], '=');
20060                 if (equals != 0) {
20061                         *equals++ = '\\0';
20062                         myvalues[j] = str_alloc(equals);
20063                 } else {
20064                         myvalues[j] = str_alloc("");
20065                 }
20066         }
20067 #endif
20068         for (j = numenv; j < limit; ++j) {
20069                 char name[80];
20070                 char value[80];
20071                 size_t found;
20072                 size_t k = 0;
20073                 do {
20074                         size_t jk;
20075                         found = 0;
20076                         sprintf(name, "TERM%lu", (unsigned long) k);
20077                         for (jk = 0; jk < j; ++jk) {
20078                                 if (!strcmp(name, mynames[jk])) {
20079                                         found = 1;
20080                                         ++k;
20081                                         break;
20082                                 }
20083                         }
20084                 } while (found);
20085                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20086                 set_value(name, value);
20087                 mynames[j] = str_alloc(name);
20088                 myvalues[j] = str_alloc(value);
20089         }
20090         for (pass = 0; pass < 3; ++pass) {
20091                 for (j = 0; j < limit; ++j) {
20092                         char *value = getenv(mynames[j]);
20093                         if (pass) {
20094                                 if (value == 0) {
20095                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20096                                         ${cf_cv_main_return:-return}(1);
20097                                 } else if (value != mypointer[j]) {
20098                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20099                                         ${cf_cv_main_return:-return}(1);
20100                                 } else if (strcmp(value, myvalues[j])) {
20101                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20102                                         ${cf_cv_main_return:-return}(1);
20103                                 }
20104                         } else {
20105                                 size_t k;
20106                                 mypointer[j] = value;
20107                                 for (k = 0; k < j; ++k) {
20108                                         if (mypointer[j] == mypointer[k]) {
20109                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20110                                                 ${cf_cv_main_return:-return}(1);
20111                                         }
20112                                 }
20113                         }
20114                 }
20115         }
20116         ${cf_cv_main_return:-return}(0);
20117 }
20118
20119 _ACEOF
20120 rm -f "conftest$ac_exeext"
20121 if { (eval echo "$as_me:20121: \"$ac_link\"") >&5
20122   (eval $ac_link) 2>&5
20123   ac_status=$?
20124   echo "$as_me:20124: \$? = $ac_status" >&5
20125   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20126   { (eval echo "$as_me:20126: \"$ac_try\"") >&5
20127   (eval $ac_try) 2>&5
20128   ac_status=$?
20129   echo "$as_me:20129: \$? = $ac_status" >&5
20130   (exit "$ac_status"); }; }; then
20131   cf_cv_consistent_getenv=yes
20132 else
20133   echo "$as_me: program exited with status $ac_status" >&5
20134 echo "$as_me: failed program was:" >&5
20135 cat "conftest.$ac_ext" >&5
20136 cf_cv_consistent_getenv=no
20137 fi
20138 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20139 fi
20140
20141 fi
20142 echo "$as_me:20142: result: $cf_cv_consistent_getenv" >&5
20143 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20144
20145 if test "x$cf_cv_consistent_getenv" = xno
20146 then
20147
20148 cat >>confdefs.h <<\EOF
20149 #define HAVE_CONSISTENT_GETENV 1
20150 EOF
20151
20152 fi
20153
20154 if test "x$cf_cv_consistent_getenv" = xno && \
20155         test "x$cf_with_trace" = xyes
20156 then
20157         { echo "$as_me:20157: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20158 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20159 fi
20160
20161 echo "$as_me:20161: checking if sys/time.h works with sys/select.h" >&5
20162 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20163 if test "${cf_cv_sys_time_select+set}" = set; then
20164   echo $ECHO_N "(cached) $ECHO_C" >&6
20165 else
20166
20167 cat >"conftest.$ac_ext" <<_ACEOF
20168 #line 20168 "configure"
20169 #include "confdefs.h"
20170
20171 #include <sys/types.h>
20172 #ifdef HAVE_SYS_TIME_H
20173 #include <sys/time.h>
20174 #endif
20175 #ifdef HAVE_SYS_SELECT_H
20176 #include <sys/select.h>
20177 #endif
20178
20179 int
20180 main (void)
20181 {
20182
20183   ;
20184   return 0;
20185 }
20186 _ACEOF
20187 rm -f "conftest.$ac_objext"
20188 if { (eval echo "$as_me:20188: \"$ac_compile\"") >&5
20189   (eval $ac_compile) 2>&5
20190   ac_status=$?
20191   echo "$as_me:20191: \$? = $ac_status" >&5
20192   (exit "$ac_status"); } &&
20193          { ac_try='test -s "conftest.$ac_objext"'
20194   { (eval echo "$as_me:20194: \"$ac_try\"") >&5
20195   (eval $ac_try) 2>&5
20196   ac_status=$?
20197   echo "$as_me:20197: \$? = $ac_status" >&5
20198   (exit "$ac_status"); }; }; then
20199   cf_cv_sys_time_select=yes
20200 else
20201   echo "$as_me: failed program was:" >&5
20202 cat "conftest.$ac_ext" >&5
20203 cf_cv_sys_time_select=no
20204 fi
20205 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20206
20207 fi
20208
20209 echo "$as_me:20209: result: $cf_cv_sys_time_select" >&5
20210 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20211 test "$cf_cv_sys_time_select" = yes &&
20212 cat >>confdefs.h <<\EOF
20213 #define HAVE_SYS_TIME_SELECT 1
20214 EOF
20215
20216 ###     checks for compiler characteristics
20217 ac_ext=c
20218 ac_cpp='$CPP $CPPFLAGS'
20219 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20220 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20222 ac_main_return="return"
20223
20224 echo "$as_me:20224: checking for an ANSI C-conforming const" >&5
20225 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20226 if test "${ac_cv_c_const+set}" = set; then
20227   echo $ECHO_N "(cached) $ECHO_C" >&6
20228 else
20229   cat >"conftest.$ac_ext" <<_ACEOF
20230 #line 20230 "configure"
20231 #include "confdefs.h"
20232
20233 int
20234 main (void)
20235 {
20236 /* FIXME: Include the comments suggested by Paul. */
20237 #ifndef __cplusplus
20238   /* Ultrix mips cc rejects this.  */
20239   typedef int charset[2];
20240   const charset x;
20241   /* SunOS 4.1.1 cc rejects this.  */
20242   char const *const *ccp;
20243   char **p;
20244   /* NEC SVR4.0.2 mips cc rejects this.  */
20245   struct point {int x, y;};
20246   static struct point const zero = {0,0};
20247   /* AIX XL C 1.02.0.0 rejects this.
20248      It does not let you subtract one const X* pointer from another in
20249      an arm of an if-expression whose if-part is not a constant
20250      expression */
20251   const char *g = "string";
20252   ccp = &g + (g ? g-g : 0);
20253   /* HPUX 7.0 cc rejects these. */
20254   ++ccp;
20255   p = (char**) ccp;
20256   ccp = (char const *const *) p;
20257   { /* SCO 3.2v4 cc rejects this.  */
20258     char *t;
20259     char const *s = 0 ? (char *) 0 : (char const *) 0;
20260
20261     *t++ = 0;
20262   }
20263   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20264     int x[] = {25, 17};
20265     const int *foo = &x[0];
20266     ++foo;
20267   }
20268   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20269     typedef const int *iptr;
20270     iptr p = 0;
20271     ++p;
20272   }
20273   { /* AIX XL C 1.02.0.0 rejects this saying
20274        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20275     struct s { int j; const int *ap[3]; };
20276     struct s *b; b->j = 5;
20277   }
20278   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20279     const int foo = 10;
20280   }
20281 #endif
20282
20283   ;
20284   return 0;
20285 }
20286 _ACEOF
20287 rm -f "conftest.$ac_objext"
20288 if { (eval echo "$as_me:20288: \"$ac_compile\"") >&5
20289   (eval $ac_compile) 2>&5
20290   ac_status=$?
20291   echo "$as_me:20291: \$? = $ac_status" >&5
20292   (exit "$ac_status"); } &&
20293          { ac_try='test -s "conftest.$ac_objext"'
20294   { (eval echo "$as_me:20294: \"$ac_try\"") >&5
20295   (eval $ac_try) 2>&5
20296   ac_status=$?
20297   echo "$as_me:20297: \$? = $ac_status" >&5
20298   (exit "$ac_status"); }; }; then
20299   ac_cv_c_const=yes
20300 else
20301   echo "$as_me: failed program was:" >&5
20302 cat "conftest.$ac_ext" >&5
20303 ac_cv_c_const=no
20304 fi
20305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20306 fi
20307 echo "$as_me:20307: result: $ac_cv_c_const" >&5
20308 echo "${ECHO_T}$ac_cv_c_const" >&6
20309 if test $ac_cv_c_const = no; then
20310
20311 cat >>confdefs.h <<\EOF
20312 #define const
20313 EOF
20314
20315 fi
20316
20317 echo "$as_me:20317: checking for inline" >&5
20318 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20319 if test "${ac_cv_c_inline+set}" = set; then
20320   echo $ECHO_N "(cached) $ECHO_C" >&6
20321 else
20322   ac_cv_c_inline=no
20323 for ac_kw in inline __inline__ __inline; do
20324   cat >"conftest.$ac_ext" <<_ACEOF
20325 #line 20325 "configure"
20326 #include "confdefs.h"
20327 #ifndef __cplusplus
20328 static $ac_kw int static_foo () {return 0; }
20329 $ac_kw int foo () {return 0; }
20330 #endif
20331
20332 _ACEOF
20333 rm -f "conftest.$ac_objext"
20334 if { (eval echo "$as_me:20334: \"$ac_compile\"") >&5
20335   (eval $ac_compile) 2>&5
20336   ac_status=$?
20337   echo "$as_me:20337: \$? = $ac_status" >&5
20338   (exit "$ac_status"); } &&
20339          { ac_try='test -s "conftest.$ac_objext"'
20340   { (eval echo "$as_me:20340: \"$ac_try\"") >&5
20341   (eval $ac_try) 2>&5
20342   ac_status=$?
20343   echo "$as_me:20343: \$? = $ac_status" >&5
20344   (exit "$ac_status"); }; }; then
20345   ac_cv_c_inline=$ac_kw; break
20346 else
20347   echo "$as_me: failed program was:" >&5
20348 cat "conftest.$ac_ext" >&5
20349 fi
20350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20351 done
20352
20353 fi
20354 echo "$as_me:20354: result: $ac_cv_c_inline" >&5
20355 echo "${ECHO_T}$ac_cv_c_inline" >&6
20356 case $ac_cv_c_inline in
20357   inline | yes) ;;
20358   no)
20359 cat >>confdefs.h <<\EOF
20360 #define inline
20361 EOF
20362  ;;
20363   *)  cat >>confdefs.h <<EOF
20364 #define inline $ac_cv_c_inline
20365 EOF
20366  ;;
20367 esac
20368
20369 NCURSES_INLINE=
20370 if test "$ac_cv_c_inline" != no ; then
20371         NCURSES_INLINE=inline
20372         if test "$INTEL_COMPILER" = yes
20373         then
20374                 :
20375         elif test "$CLANG_COMPILER" = yes
20376         then
20377                 :
20378         elif test "$GCC" = yes
20379         then
20380                 echo "$as_me:20380: checking if $CC supports options to tune inlining" >&5
20381 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20382 if test "${cf_cv_gcc_inline+set}" = set; then
20383   echo $ECHO_N "(cached) $ECHO_C" >&6
20384 else
20385
20386                 cf_save_CFLAGS=$CFLAGS
20387                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20388                 cat >"conftest.$ac_ext" <<_ACEOF
20389 #line 20389 "configure"
20390 #include "confdefs.h"
20391 inline int foo(void) { return 1; }
20392 int
20393 main (void)
20394 {
20395 ${cf_cv_main_return:-return} foo()
20396   ;
20397   return 0;
20398 }
20399 _ACEOF
20400 rm -f "conftest.$ac_objext"
20401 if { (eval echo "$as_me:20401: \"$ac_compile\"") >&5
20402   (eval $ac_compile) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit "$ac_status"); } &&
20406          { ac_try='test -s "conftest.$ac_objext"'
20407   { (eval echo "$as_me:20407: \"$ac_try\"") >&5
20408   (eval $ac_try) 2>&5
20409   ac_status=$?
20410   echo "$as_me:20410: \$? = $ac_status" >&5
20411   (exit "$ac_status"); }; }; then
20412   cf_cv_gcc_inline=yes
20413 else
20414   echo "$as_me: failed program was:" >&5
20415 cat "conftest.$ac_ext" >&5
20416 cf_cv_gcc_inline=no
20417 fi
20418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20419                 CFLAGS=$cf_save_CFLAGS
20420
20421 fi
20422 echo "$as_me:20422: result: $cf_cv_gcc_inline" >&5
20423 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20424                 if test "$cf_cv_gcc_inline" = yes ; then
20425
20426 cf_fix_cppflags=no
20427 cf_new_cflags=
20428 cf_new_cppflags=
20429 cf_new_extra_cppflags=
20430
20431 for cf_add_cflags in --param max-inline-insns-single=1200
20432 do
20433 case "$cf_fix_cppflags" in
20434 (no)
20435         case "$cf_add_cflags" in
20436         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20437                 case "$cf_add_cflags" in
20438                 (-D*)
20439                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20440
20441                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20442                                 && test -z "${cf_tst_cflags}" \
20443                                 && cf_fix_cppflags=yes
20444
20445                         if test "$cf_fix_cppflags" = yes ; then
20446
20447         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20448         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20449
20450                                 continue
20451                         elif test "${cf_tst_cflags}" = "\"'" ; then
20452
20453         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20454         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20455
20456                                 continue
20457                         fi
20458                         ;;
20459                 esac
20460                 case "$CPPFLAGS" in
20461                 (*$cf_add_cflags)
20462                         ;;
20463                 (*)
20464                         case "$cf_add_cflags" in
20465                         (-D*)
20466                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20467
20468 CPPFLAGS=`echo "$CPPFLAGS" | \
20469         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20470                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20471
20472                                 ;;
20473                         esac
20474
20475         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20476         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20477
20478                         ;;
20479                 esac
20480                 ;;
20481         (*)
20482
20483         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20484         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20485
20486                 ;;
20487         esac
20488         ;;
20489 (yes)
20490
20491         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20492         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20493
20494         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20495
20496         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20497                 && test -z "${cf_tst_cflags}" \
20498                 && cf_fix_cppflags=no
20499         ;;
20500 esac
20501 done
20502
20503 if test -n "$cf_new_cflags" ; then
20504
20505         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20506         CFLAGS="${CFLAGS}$cf_new_cflags"
20507
20508 fi
20509
20510 if test -n "$cf_new_cppflags" ; then
20511
20512         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20513         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20514
20515 fi
20516
20517 if test -n "$cf_new_extra_cppflags" ; then
20518
20519         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20520         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20521
20522 fi
20523
20524                 fi
20525         fi
20526 fi
20527
20528 echo "$as_me:20528: checking for signal global datatype" >&5
20529 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20530 if test "${cf_cv_sig_atomic_t+set}" = set; then
20531   echo $ECHO_N "(cached) $ECHO_C" >&6
20532 else
20533
20534         for cf_type in \
20535                 "volatile sig_atomic_t" \
20536                 "sig_atomic_t" \
20537                 "int"
20538         do
20539         cat >"conftest.$ac_ext" <<_ACEOF
20540 #line 20540 "configure"
20541 #include "confdefs.h"
20542
20543 #include <sys/types.h>
20544 #include <signal.h>
20545 #include <stdio.h>
20546
20547 extern $cf_type x;
20548 $cf_type x;
20549 static void handler(int sig)
20550 {
20551         (void)sig;
20552         x = 5;
20553 }
20554 int
20555 main (void)
20556 {
20557 signal(SIGINT, handler);
20558                  x = 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_sig_atomic_t=$cf_type
20576 else
20577   echo "$as_me: failed program was:" >&5
20578 cat "conftest.$ac_ext" >&5
20579 cf_cv_sig_atomic_t=no
20580 fi
20581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20582                 test "$cf_cv_sig_atomic_t" != no && break
20583         done
20584
20585 fi
20586
20587 echo "$as_me:20587: result: $cf_cv_sig_atomic_t" >&5
20588 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20589 test "$cf_cv_sig_atomic_t" != no &&
20590 cat >>confdefs.h <<EOF
20591 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20592 EOF
20593
20594 if test "$NCURSES_CHTYPE" = auto ; then
20595
20596 echo "$as_me:20596: checking for type of chtype" >&5
20597 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20598 if test "${cf_cv_typeof_chtype+set}" = set; then
20599   echo $ECHO_N "(cached) $ECHO_C" >&6
20600 else
20601
20602                 if test "$cross_compiling" = yes; then
20603   cf_cv_typeof_chtype=long
20604 else
20605   cat >"conftest.$ac_ext" <<_ACEOF
20606 #line 20606 "configure"
20607 #include "confdefs.h"
20608
20609 #define WANT_BITS 31
20610 #include <stdio.h>
20611 int main(void)
20612 {
20613         FILE *fp = fopen("cf_test.out", "w");
20614         if (fp != 0) {
20615                 char *result = "long";
20616                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20617                         int n;
20618                         unsigned int x, y;
20619                         for (n = 0; n < WANT_BITS; n++) {
20620                                 x = (1 << n);
20621                                 y = (x >> n);
20622                                 if (y != 1 || x == 0) {
20623                                         x = 0;
20624                                         break;
20625                                 }
20626                         }
20627                         /*
20628                          * If x is nonzero, an int is big enough for the bits
20629                          * that we want.
20630                          */
20631                         result = (x != 0) ? "int" : "long";
20632                 }
20633                 fputs(result, fp);
20634                 fclose(fp);
20635         }
20636         ${cf_cv_main_return:-return}(0);
20637 }
20638
20639 _ACEOF
20640 rm -f "conftest$ac_exeext"
20641 if { (eval echo "$as_me:20641: \"$ac_link\"") >&5
20642   (eval $ac_link) 2>&5
20643   ac_status=$?
20644   echo "$as_me:20644: \$? = $ac_status" >&5
20645   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20646   { (eval echo "$as_me:20646: \"$ac_try\"") >&5
20647   (eval $ac_try) 2>&5
20648   ac_status=$?
20649   echo "$as_me:20649: \$? = $ac_status" >&5
20650   (exit "$ac_status"); }; }; then
20651   cf_cv_typeof_chtype=`cat cf_test.out`
20652 else
20653   echo "$as_me: program exited with status $ac_status" >&5
20654 echo "$as_me: failed program was:" >&5
20655 cat "conftest.$ac_ext" >&5
20656 cf_cv_typeof_chtype=long
20657 fi
20658 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20659 fi
20660                 rm -f cf_test.out
20661
20662 fi
20663
20664 echo "$as_me:20664: result: $cf_cv_typeof_chtype" >&5
20665 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20666
20667 cat >>confdefs.h <<EOF
20668 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20669 EOF
20670
20671 else
20672         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20673 fi
20674 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20675
20676 echo "$as_me:20676: checking if unsigned literals are legal" >&5
20677 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20678 if test "${cf_cv_unsigned_literals+set}" = set; then
20679   echo $ECHO_N "(cached) $ECHO_C" >&6
20680 else
20681
20682         cat >"conftest.$ac_ext" <<_ACEOF
20683 #line 20683 "configure"
20684 #include "confdefs.h"
20685
20686 int
20687 main (void)
20688 {
20689 long x = 1L + 1UL + 1U + 1
20690   ;
20691   return 0;
20692 }
20693 _ACEOF
20694 rm -f "conftest.$ac_objext"
20695 if { (eval echo "$as_me:20695: \"$ac_compile\"") >&5
20696   (eval $ac_compile) 2>&5
20697   ac_status=$?
20698   echo "$as_me:20698: \$? = $ac_status" >&5
20699   (exit "$ac_status"); } &&
20700          { ac_try='test -s "conftest.$ac_objext"'
20701   { (eval echo "$as_me:20701: \"$ac_try\"") >&5
20702   (eval $ac_try) 2>&5
20703   ac_status=$?
20704   echo "$as_me:20704: \$? = $ac_status" >&5
20705   (exit "$ac_status"); }; }; then
20706   cf_cv_unsigned_literals=yes
20707 else
20708   echo "$as_me: failed program was:" >&5
20709 cat "conftest.$ac_ext" >&5
20710 cf_cv_unsigned_literals=no
20711 fi
20712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20713
20714 fi
20715
20716 echo "$as_me:20716: result: $cf_cv_unsigned_literals" >&5
20717 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20718
20719 cf_cv_1UL="1"
20720 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20721 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20722
20723 if test "$NCURSES_MMASK_T" = auto ; then
20724         cf_cv_typeof_mmask_t=long
20725 else
20726         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20727 fi
20728 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20729
20730 ###     Checks for external-data
20731
20732 echo "$as_me:20732: checking if external errno is declared" >&5
20733 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20734 if test "${cf_cv_dcl_errno+set}" = set; then
20735   echo $ECHO_N "(cached) $ECHO_C" >&6
20736 else
20737
20738         cat >"conftest.$ac_ext" <<_ACEOF
20739 #line 20739 "configure"
20740 #include "confdefs.h"
20741
20742 #ifdef HAVE_STDLIB_H
20743 #include <stdlib.h>
20744 #endif
20745 #include <stdio.h>
20746 #include <sys/types.h>
20747 #include <errno.h>
20748 int
20749 main (void)
20750 {
20751 int x = (int) errno; (void)x
20752   ;
20753   return 0;
20754 }
20755 _ACEOF
20756 rm -f "conftest.$ac_objext"
20757 if { (eval echo "$as_me:20757: \"$ac_compile\"") >&5
20758   (eval $ac_compile) 2>&5
20759   ac_status=$?
20760   echo "$as_me:20760: \$? = $ac_status" >&5
20761   (exit "$ac_status"); } &&
20762          { ac_try='test -s "conftest.$ac_objext"'
20763   { (eval echo "$as_me:20763: \"$ac_try\"") >&5
20764   (eval $ac_try) 2>&5
20765   ac_status=$?
20766   echo "$as_me:20766: \$? = $ac_status" >&5
20767   (exit "$ac_status"); }; }; then
20768   cf_cv_dcl_errno=yes
20769 else
20770   echo "$as_me: failed program was:" >&5
20771 cat "conftest.$ac_ext" >&5
20772 cf_cv_dcl_errno=no
20773 fi
20774 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20775
20776 fi
20777 echo "$as_me:20777: result: $cf_cv_dcl_errno" >&5
20778 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20779
20780 if test "$cf_cv_dcl_errno" = no ; then
20781
20782 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20783
20784         cat >>confdefs.h <<EOF
20785 #define $cf_result 1
20786 EOF
20787
20788 fi
20789
20790 # It's possible (for near-UNIX clones) that the data doesn't exist
20791
20792 echo "$as_me:20792: checking if external errno exists" >&5
20793 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20794 if test "${cf_cv_have_errno+set}" = set; then
20795   echo $ECHO_N "(cached) $ECHO_C" >&6
20796 else
20797
20798         cat >"conftest.$ac_ext" <<_ACEOF
20799 #line 20799 "configure"
20800 #include "confdefs.h"
20801
20802 #undef errno
20803 extern int errno;
20804
20805 int
20806 main (void)
20807 {
20808 errno = 2
20809   ;
20810   return 0;
20811 }
20812 _ACEOF
20813 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20814 if { (eval echo "$as_me:20814: \"$ac_link\"") >&5
20815   (eval $ac_link) 2>&5
20816   ac_status=$?
20817   echo "$as_me:20817: \$? = $ac_status" >&5
20818   (exit "$ac_status"); } &&
20819          { ac_try='test -s "conftest$ac_exeext"'
20820   { (eval echo "$as_me:20820: \"$ac_try\"") >&5
20821   (eval $ac_try) 2>&5
20822   ac_status=$?
20823   echo "$as_me:20823: \$? = $ac_status" >&5
20824   (exit "$ac_status"); }; }; then
20825   cf_cv_have_errno=yes
20826 else
20827   echo "$as_me: failed program was:" >&5
20828 cat "conftest.$ac_ext" >&5
20829 cf_cv_have_errno=no
20830 fi
20831 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20832
20833 fi
20834 echo "$as_me:20834: result: $cf_cv_have_errno" >&5
20835 echo "${ECHO_T}$cf_cv_have_errno" >&6
20836
20837 if test "$cf_cv_have_errno" = yes ; then
20838
20839 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20840
20841         cat >>confdefs.h <<EOF
20842 #define $cf_result 1
20843 EOF
20844
20845 fi
20846
20847 echo "$as_me:20847: checking if data-only library module links" >&5
20848 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20849 if test "${cf_cv_link_dataonly+set}" = set; then
20850   echo $ECHO_N "(cached) $ECHO_C" >&6
20851 else
20852
20853         rm -f conftest.a
20854         cat >conftest.$ac_ext <<EOF
20855 #line 20855 "configure"
20856 int     testdata[3] = { 123, 456, 789 };
20857 EOF
20858         if { (eval echo "$as_me:20858: \"$ac_compile\"") >&5
20859   (eval $ac_compile) 2>&5
20860   ac_status=$?
20861   echo "$as_me:20861: \$? = $ac_status" >&5
20862   (exit "$ac_status"); } ; then
20863                 mv conftest.o data.o && \
20864                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20865         fi
20866         rm -f conftest.$ac_ext data.o
20867         cat >conftest.$ac_ext <<EOF
20868 #line 20868 "configure"
20869 int     testfunc(void)
20870 {
20871 #if defined(NeXT)
20872         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20873 #else
20874         extern int testdata[3];
20875         return testdata[0] == 123
20876            &&  testdata[1] == 456
20877            &&  testdata[2] == 789;
20878 #endif
20879 }
20880 EOF
20881         if { (eval echo "$as_me:20881: \"$ac_compile\"") >&5
20882   (eval $ac_compile) 2>&5
20883   ac_status=$?
20884   echo "$as_me:20884: \$? = $ac_status" >&5
20885   (exit "$ac_status"); }; then
20886                 mv conftest.o func.o && \
20887                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20888         fi
20889         rm -f conftest.$ac_ext func.o
20890         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20891         cf_saveLIBS="$LIBS"
20892         LIBS="conftest.a $LIBS"
20893         if test "$cross_compiling" = yes; then
20894   cf_cv_link_dataonly=unknown
20895 else
20896   cat >"conftest.$ac_ext" <<_ACEOF
20897 #line 20897 "configure"
20898 #include "confdefs.h"
20899
20900         int main(void)
20901         {
20902                 extern int testfunc();
20903                 ${cf_cv_main_return:-return} (!testfunc());
20904         }
20905
20906 _ACEOF
20907 rm -f "conftest$ac_exeext"
20908 if { (eval echo "$as_me:20908: \"$ac_link\"") >&5
20909   (eval $ac_link) 2>&5
20910   ac_status=$?
20911   echo "$as_me:20911: \$? = $ac_status" >&5
20912   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20913   { (eval echo "$as_me:20913: \"$ac_try\"") >&5
20914   (eval $ac_try) 2>&5
20915   ac_status=$?
20916   echo "$as_me:20916: \$? = $ac_status" >&5
20917   (exit "$ac_status"); }; }; then
20918   cf_cv_link_dataonly=yes
20919 else
20920   echo "$as_me: program exited with status $ac_status" >&5
20921 echo "$as_me: failed program was:" >&5
20922 cat "conftest.$ac_ext" >&5
20923 cf_cv_link_dataonly=no
20924 fi
20925 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20926 fi
20927         LIBS="$cf_saveLIBS"
20928
20929 fi
20930
20931 echo "$as_me:20931: result: $cf_cv_link_dataonly" >&5
20932 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20933
20934 if test "$cf_cv_link_dataonly" = no ; then
20935
20936 cat >>confdefs.h <<\EOF
20937 #define BROKEN_LINKER 1
20938 EOF
20939
20940         BROKEN_LINKER=1
20941 fi
20942
20943 ###     Checks for library functions.
20944
20945 for ac_func in \
20946 getcwd \
20947 getegid \
20948 geteuid \
20949 getopt \
20950 getttynam \
20951 issetugid \
20952 localeconv \
20953 poll \
20954 putenv \
20955 remove \
20956 select \
20957 setbuf \
20958 setbuffer \
20959 setenv \
20960 setvbuf \
20961 sigaction \
20962 sigvec \
20963 snprintf \
20964 strdup \
20965 strstr \
20966 sysconf \
20967 tcgetpgrp \
20968 times \
20969 tsearch \
20970 vsnprintf \
20971
20972 do
20973 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20974 echo "$as_me:20974: checking for $ac_func" >&5
20975 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20976 if eval "test \"\${$as_ac_var+set}\" = set"; then
20977   echo $ECHO_N "(cached) $ECHO_C" >&6
20978 else
20979   cat >"conftest.$ac_ext" <<_ACEOF
20980 #line 20980 "configure"
20981 #include "confdefs.h"
20982 #define $ac_func autoconf_temporary
20983 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20984 #undef $ac_func
20985
20986 #ifdef __cplusplus
20987 extern "C"
20988 #endif
20989
20990 /* We use char because int might match the return type of a gcc2
20991    builtin and then its argument prototype would still apply.  */
20992 char $ac_func (void);
20993
20994 int
20995 main (void)
20996 {
20997
20998 /* The GNU C library defines stubs for functions which it implements
20999     to always fail with ENOSYS.  Some functions are actually named
21000     something starting with __ and the normal name is an alias.  */
21001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21002 #error found stub for $ac_func
21003 #endif
21004
21005         return $ac_func ();
21006   ;
21007   return 0;
21008 }
21009 _ACEOF
21010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21011 if { (eval echo "$as_me:21011: \"$ac_link\"") >&5
21012   (eval $ac_link) 2>&5
21013   ac_status=$?
21014   echo "$as_me:21014: \$? = $ac_status" >&5
21015   (exit "$ac_status"); } &&
21016          { ac_try='test -s "conftest$ac_exeext"'
21017   { (eval echo "$as_me:21017: \"$ac_try\"") >&5
21018   (eval $ac_try) 2>&5
21019   ac_status=$?
21020   echo "$as_me:21020: \$? = $ac_status" >&5
21021   (exit "$ac_status"); }; }; then
21022   eval "$as_ac_var=yes"
21023 else
21024   echo "$as_me: failed program was:" >&5
21025 cat "conftest.$ac_ext" >&5
21026 eval "$as_ac_var=no"
21027 fi
21028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21029 fi
21030 echo "$as_me:21030: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21031 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21032 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21033   cat >>confdefs.h <<EOF
21034 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21035 EOF
21036
21037 fi
21038 done
21039
21040 if test "x$ac_cv_func_getopt" = xno && \
21041    test "x$cf_with_progs$cf_with_tests" != xnono; then
21042         { { echo "$as_me:21042: error: getopt is required for building programs" >&5
21043 echo "$as_me: error: getopt is required for building programs" >&2;}
21044    { (exit 1); exit 1; }; }
21045 fi
21046
21047 if test "x$with_safe_sprintf" = xyes
21048 then
21049         if test "x$ac_cv_func_vsnprintf" = xyes
21050         then
21051                 { echo "$as_me:21051: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21052 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21053         else
21054
21055 cat >>confdefs.h <<\EOF
21056 #define USE_SAFE_SPRINTF 1
21057 EOF
21058
21059         fi
21060 fi
21061
21062 if test "x$with_getcap" = "xyes" ; then
21063
21064 echo "$as_me:21064: checking for terminal-capability database functions" >&5
21065 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21066 if test "${cf_cv_cgetent+set}" = set; then
21067   echo $ECHO_N "(cached) $ECHO_C" >&6
21068 else
21069
21070 cat >"conftest.$ac_ext" <<_ACEOF
21071 #line 21071 "configure"
21072 #include "confdefs.h"
21073
21074 #include <stdlib.h>
21075 int
21076 main (void)
21077 {
21078
21079         char temp[128];
21080         char *buf = temp;
21081         char *db_array = temp;
21082         cgetent(&buf, &db_array, "vt100");
21083         cgetcap(buf, "tc", '=');
21084         cgetmatch(buf, "tc");
21085
21086   ;
21087   return 0;
21088 }
21089 _ACEOF
21090 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21091 if { (eval echo "$as_me:21091: \"$ac_link\"") >&5
21092   (eval $ac_link) 2>&5
21093   ac_status=$?
21094   echo "$as_me:21094: \$? = $ac_status" >&5
21095   (exit "$ac_status"); } &&
21096          { ac_try='test -s "conftest$ac_exeext"'
21097   { (eval echo "$as_me:21097: \"$ac_try\"") >&5
21098   (eval $ac_try) 2>&5
21099   ac_status=$?
21100   echo "$as_me:21100: \$? = $ac_status" >&5
21101   (exit "$ac_status"); }; }; then
21102   cf_cv_cgetent=yes
21103 else
21104   echo "$as_me: failed program was:" >&5
21105 cat "conftest.$ac_ext" >&5
21106 cf_cv_cgetent=no
21107 fi
21108 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21109
21110 fi
21111 echo "$as_me:21111: result: $cf_cv_cgetent" >&5
21112 echo "${ECHO_T}$cf_cv_cgetent" >&6
21113
21114 if test "$cf_cv_cgetent" = yes
21115 then
21116
21117 cat >>confdefs.h <<\EOF
21118 #define HAVE_BSD_CGETENT 1
21119 EOF
21120
21121 echo "$as_me:21121: checking if cgetent uses const parameter" >&5
21122 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21123 if test "${cf_cv_cgetent_const+set}" = set; then
21124   echo $ECHO_N "(cached) $ECHO_C" >&6
21125 else
21126
21127 cat >"conftest.$ac_ext" <<_ACEOF
21128 #line 21128 "configure"
21129 #include "confdefs.h"
21130
21131 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21132 #include <stdlib.h>
21133 int
21134 main (void)
21135 {
21136
21137         char temp[128];
21138         char *buf = temp;
21139 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21140         const char *db_array = temp;
21141         cgetent(&buf, &db_array, "vt100");
21142 #endif
21143         cgetcap(buf, "tc", '=');
21144         cgetmatch(buf, "tc");
21145
21146   ;
21147   return 0;
21148 }
21149 _ACEOF
21150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21151 if { (eval echo "$as_me:21151: \"$ac_link\"") >&5
21152   (eval $ac_link) 2>&5
21153   ac_status=$?
21154   echo "$as_me:21154: \$? = $ac_status" >&5
21155   (exit "$ac_status"); } &&
21156          { ac_try='test -s "conftest$ac_exeext"'
21157   { (eval echo "$as_me:21157: \"$ac_try\"") >&5
21158   (eval $ac_try) 2>&5
21159   ac_status=$?
21160   echo "$as_me:21160: \$? = $ac_status" >&5
21161   (exit "$ac_status"); }; }; then
21162   cf_cv_cgetent_const=yes
21163 else
21164   echo "$as_me: failed program was:" >&5
21165 cat "conftest.$ac_ext" >&5
21166 cf_cv_cgetent_const=no
21167 fi
21168 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21169
21170 fi
21171 echo "$as_me:21171: result: $cf_cv_cgetent_const" >&5
21172 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21173         if test "$cf_cv_cgetent_const" = yes
21174         then
21175
21176 cat >>confdefs.h <<EOF
21177 #define CGETENT_CONST const
21178 EOF
21179
21180         fi
21181 fi
21182
21183 fi
21184
21185 echo "$as_me:21185: checking for isascii" >&5
21186 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21187 if test "${cf_cv_have_isascii+set}" = set; then
21188   echo $ECHO_N "(cached) $ECHO_C" >&6
21189 else
21190
21191         cat >"conftest.$ac_ext" <<_ACEOF
21192 #line 21192 "configure"
21193 #include "confdefs.h"
21194 #include <ctype.h>
21195 int
21196 main (void)
21197 {
21198 int x = isascii(' ')
21199   ;
21200   return 0;
21201 }
21202 _ACEOF
21203 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21204 if { (eval echo "$as_me:21204: \"$ac_link\"") >&5
21205   (eval $ac_link) 2>&5
21206   ac_status=$?
21207   echo "$as_me:21207: \$? = $ac_status" >&5
21208   (exit "$ac_status"); } &&
21209          { ac_try='test -s "conftest$ac_exeext"'
21210   { (eval echo "$as_me:21210: \"$ac_try\"") >&5
21211   (eval $ac_try) 2>&5
21212   ac_status=$?
21213   echo "$as_me:21213: \$? = $ac_status" >&5
21214   (exit "$ac_status"); }; }; then
21215   cf_cv_have_isascii=yes
21216 else
21217   echo "$as_me: failed program was:" >&5
21218 cat "conftest.$ac_ext" >&5
21219 cf_cv_have_isascii=no
21220 fi
21221 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21222
21223 fi
21224 echo "$as_me:21224: result: $cf_cv_have_isascii" >&5
21225 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21226 test "$cf_cv_have_isascii" = yes &&
21227 cat >>confdefs.h <<\EOF
21228 #define HAVE_ISASCII 1
21229 EOF
21230
21231 if test "$ac_cv_func_sigaction" = yes; then
21232 echo "$as_me:21232: checking whether sigaction needs _POSIX_SOURCE" >&5
21233 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21234 cat >"conftest.$ac_ext" <<_ACEOF
21235 #line 21235 "configure"
21236 #include "confdefs.h"
21237
21238 #include <sys/types.h>
21239 #include <signal.h>
21240 int
21241 main (void)
21242 {
21243 struct sigaction act
21244   ;
21245   return 0;
21246 }
21247 _ACEOF
21248 rm -f "conftest.$ac_objext"
21249 if { (eval echo "$as_me:21249: \"$ac_compile\"") >&5
21250   (eval $ac_compile) 2>&5
21251   ac_status=$?
21252   echo "$as_me:21252: \$? = $ac_status" >&5
21253   (exit "$ac_status"); } &&
21254          { ac_try='test -s "conftest.$ac_objext"'
21255   { (eval echo "$as_me:21255: \"$ac_try\"") >&5
21256   (eval $ac_try) 2>&5
21257   ac_status=$?
21258   echo "$as_me:21258: \$? = $ac_status" >&5
21259   (exit "$ac_status"); }; }; then
21260   sigact_bad=no
21261 else
21262   echo "$as_me: failed program was:" >&5
21263 cat "conftest.$ac_ext" >&5
21264
21265 cat >"conftest.$ac_ext" <<_ACEOF
21266 #line 21266 "configure"
21267 #include "confdefs.h"
21268
21269 #define _POSIX_SOURCE
21270 #include <sys/types.h>
21271 #include <signal.h>
21272 int
21273 main (void)
21274 {
21275 struct sigaction act
21276   ;
21277   return 0;
21278 }
21279 _ACEOF
21280 rm -f "conftest.$ac_objext"
21281 if { (eval echo "$as_me:21281: \"$ac_compile\"") >&5
21282   (eval $ac_compile) 2>&5
21283   ac_status=$?
21284   echo "$as_me:21284: \$? = $ac_status" >&5
21285   (exit "$ac_status"); } &&
21286          { ac_try='test -s "conftest.$ac_objext"'
21287   { (eval echo "$as_me:21287: \"$ac_try\"") >&5
21288   (eval $ac_try) 2>&5
21289   ac_status=$?
21290   echo "$as_me:21290: \$? = $ac_status" >&5
21291   (exit "$ac_status"); }; }; then
21292   sigact_bad=yes
21293
21294 cat >>confdefs.h <<\EOF
21295 #define _POSIX_SOURCE 1
21296 EOF
21297
21298 else
21299   echo "$as_me: failed program was:" >&5
21300 cat "conftest.$ac_ext" >&5
21301 sigact_bad=unknown
21302 fi
21303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21304 fi
21305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21306 echo "$as_me:21306: result: $sigact_bad" >&5
21307 echo "${ECHO_T}$sigact_bad" >&6
21308 fi
21309
21310 echo "$as_me:21310: checking if nanosleep really works" >&5
21311 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21312 if test "${cf_cv_func_nanosleep+set}" = set; then
21313   echo $ECHO_N "(cached) $ECHO_C" >&6
21314 else
21315
21316 if test "$cross_compiling" = yes; then
21317   cf_cv_func_nanosleep=unknown
21318 else
21319   cat >"conftest.$ac_ext" <<_ACEOF
21320 #line 21320 "configure"
21321 #include "confdefs.h"
21322
21323 #include <stdio.h>
21324 #include <errno.h>
21325 #include <time.h>
21326
21327 #ifdef HAVE_SYS_TIME_H
21328 #include <sys/time.h>
21329 #endif
21330
21331 int main(void) {
21332         struct timespec ts1, ts2;
21333         int code;
21334         ts1.tv_sec  = 0;
21335         ts1.tv_nsec = 750000000;
21336         ts2.tv_sec  = 0;
21337         ts2.tv_nsec = 0;
21338         errno = 0;
21339         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21340         ${cf_cv_main_return:-return}(code != 0);
21341 }
21342
21343 _ACEOF
21344 rm -f "conftest$ac_exeext"
21345 if { (eval echo "$as_me:21345: \"$ac_link\"") >&5
21346   (eval $ac_link) 2>&5
21347   ac_status=$?
21348   echo "$as_me:21348: \$? = $ac_status" >&5
21349   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21350   { (eval echo "$as_me:21350: \"$ac_try\"") >&5
21351   (eval $ac_try) 2>&5
21352   ac_status=$?
21353   echo "$as_me:21353: \$? = $ac_status" >&5
21354   (exit "$ac_status"); }; }; then
21355   cf_cv_func_nanosleep=yes
21356 else
21357   echo "$as_me: program exited with status $ac_status" >&5
21358 echo "$as_me: failed program was:" >&5
21359 cat "conftest.$ac_ext" >&5
21360 cf_cv_func_nanosleep=no
21361 fi
21362 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21363 fi
21364 fi
21365 echo "$as_me:21365: result: $cf_cv_func_nanosleep" >&5
21366 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21367
21368 test "$cf_cv_func_nanosleep" = "yes" &&
21369 cat >>confdefs.h <<\EOF
21370 #define HAVE_NANOSLEEP 1
21371 EOF
21372
21373 for ac_header in \
21374 termio.h \
21375 termios.h \
21376 unistd.h \
21377 sys/ioctl.h \
21378 sys/termio.h \
21379
21380 do
21381 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21382 echo "$as_me:21382: checking for $ac_header" >&5
21383 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21384 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21385   echo $ECHO_N "(cached) $ECHO_C" >&6
21386 else
21387   cat >"conftest.$ac_ext" <<_ACEOF
21388 #line 21388 "configure"
21389 #include "confdefs.h"
21390 #include <$ac_header>
21391 _ACEOF
21392 if { (eval echo "$as_me:21392: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21393   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21394   ac_status=$?
21395   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21396   rm -f conftest.er1
21397   cat conftest.err >&5
21398   echo "$as_me:21398: \$? = $ac_status" >&5
21399   (exit "$ac_status"); } >/dev/null; then
21400   if test -s conftest.err; then
21401     ac_cpp_err=$ac_c_preproc_warn_flag
21402   else
21403     ac_cpp_err=
21404   fi
21405 else
21406   ac_cpp_err=yes
21407 fi
21408 if test -z "$ac_cpp_err"; then
21409   eval "$as_ac_Header=yes"
21410 else
21411   echo "$as_me: failed program was:" >&5
21412   cat "conftest.$ac_ext" >&5
21413   eval "$as_ac_Header=no"
21414 fi
21415 rm -f conftest.err "conftest.$ac_ext"
21416 fi
21417 echo "$as_me:21417: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21418 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21419 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21420   cat >>confdefs.h <<EOF
21421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21422 EOF
21423
21424 fi
21425 done
21426
21427 if test "$ac_cv_header_termios_h" = yes ; then
21428         case "$CFLAGS $CPPFLAGS" in
21429         (*-D_POSIX_SOURCE*)
21430                 termios_bad=dunno ;;
21431         (*)     termios_bad=maybe ;;
21432         esac
21433         if test "$termios_bad" = maybe ; then
21434         echo "$as_me:21434: checking whether termios.h needs _POSIX_SOURCE" >&5
21435 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21436         cat >"conftest.$ac_ext" <<_ACEOF
21437 #line 21437 "configure"
21438 #include "confdefs.h"
21439 #include <termios.h>
21440 int
21441 main (void)
21442 {
21443 struct termios foo; int x = foo.c_iflag = 1; (void)x
21444   ;
21445   return 0;
21446 }
21447 _ACEOF
21448 rm -f "conftest.$ac_objext"
21449 if { (eval echo "$as_me:21449: \"$ac_compile\"") >&5
21450   (eval $ac_compile) 2>&5
21451   ac_status=$?
21452   echo "$as_me:21452: \$? = $ac_status" >&5
21453   (exit "$ac_status"); } &&
21454          { ac_try='test -s "conftest.$ac_objext"'
21455   { (eval echo "$as_me:21455: \"$ac_try\"") >&5
21456   (eval $ac_try) 2>&5
21457   ac_status=$?
21458   echo "$as_me:21458: \$? = $ac_status" >&5
21459   (exit "$ac_status"); }; }; then
21460   termios_bad=no
21461 else
21462   echo "$as_me: failed program was:" >&5
21463 cat "conftest.$ac_ext" >&5
21464
21465                 cat >"conftest.$ac_ext" <<_ACEOF
21466 #line 21466 "configure"
21467 #include "confdefs.h"
21468
21469 #define _POSIX_SOURCE
21470 #include <termios.h>
21471 int
21472 main (void)
21473 {
21474 struct termios foo; int x = foo.c_iflag = 2; (void)x
21475   ;
21476   return 0;
21477 }
21478 _ACEOF
21479 rm -f "conftest.$ac_objext"
21480 if { (eval echo "$as_me:21480: \"$ac_compile\"") >&5
21481   (eval $ac_compile) 2>&5
21482   ac_status=$?
21483   echo "$as_me:21483: \$? = $ac_status" >&5
21484   (exit "$ac_status"); } &&
21485          { ac_try='test -s "conftest.$ac_objext"'
21486   { (eval echo "$as_me:21486: \"$ac_try\"") >&5
21487   (eval $ac_try) 2>&5
21488   ac_status=$?
21489   echo "$as_me:21489: \$? = $ac_status" >&5
21490   (exit "$ac_status"); }; }; then
21491   termios_bad=unknown
21492 else
21493   echo "$as_me: failed program was:" >&5
21494 cat "conftest.$ac_ext" >&5
21495 termios_bad=yes
21496 cat >>confdefs.h <<\EOF
21497 #define _POSIX_SOURCE 1
21498 EOF
21499
21500 fi
21501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21502
21503 fi
21504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21505         echo "$as_me:21505: result: $termios_bad" >&5
21506 echo "${ECHO_T}$termios_bad" >&6
21507         fi
21508 fi
21509
21510 echo "$as_me:21510: checking for tcgetattr" >&5
21511 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21512 if test "${cf_cv_have_tcgetattr+set}" = set; then
21513   echo $ECHO_N "(cached) $ECHO_C" >&6
21514 else
21515
21516 cat >"conftest.$ac_ext" <<_ACEOF
21517 #line 21517 "configure"
21518 #include "confdefs.h"
21519
21520 #include <sys/types.h>
21521 #ifdef HAVE_UNISTD_H
21522 #include <unistd.h>
21523 #endif
21524 #ifdef HAVE_TERMIOS_H
21525 #include <termios.h>
21526 #define TTY struct termios
21527 #else
21528 #ifdef HAVE_TERMIO_H
21529 #include <termio.h>
21530 #define TTY struct termio
21531 #endif
21532 #endif
21533
21534 int
21535 main (void)
21536 {
21537
21538 TTY foo;
21539 tcgetattr(1, &foo);
21540   ;
21541   return 0;
21542 }
21543 _ACEOF
21544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21545 if { (eval echo "$as_me:21545: \"$ac_link\"") >&5
21546   (eval $ac_link) 2>&5
21547   ac_status=$?
21548   echo "$as_me:21548: \$? = $ac_status" >&5
21549   (exit "$ac_status"); } &&
21550          { ac_try='test -s "conftest$ac_exeext"'
21551   { (eval echo "$as_me:21551: \"$ac_try\"") >&5
21552   (eval $ac_try) 2>&5
21553   ac_status=$?
21554   echo "$as_me:21554: \$? = $ac_status" >&5
21555   (exit "$ac_status"); }; }; then
21556   cf_cv_have_tcgetattr=yes
21557 else
21558   echo "$as_me: failed program was:" >&5
21559 cat "conftest.$ac_ext" >&5
21560 cf_cv_have_tcgetattr=no
21561 fi
21562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21563 fi
21564 echo "$as_me:21564: result: $cf_cv_have_tcgetattr" >&5
21565 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21566 test "$cf_cv_have_tcgetattr" = yes &&
21567 cat >>confdefs.h <<\EOF
21568 #define HAVE_TCGETATTR 1
21569 EOF
21570
21571 echo "$as_me:21571: checking for vsscanf function or workaround" >&5
21572 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21573 if test "${cf_cv_func_vsscanf+set}" = set; then
21574   echo $ECHO_N "(cached) $ECHO_C" >&6
21575 else
21576
21577 cat >"conftest.$ac_ext" <<_ACEOF
21578 #line 21578 "configure"
21579 #include "confdefs.h"
21580
21581 #include <stdarg.h>
21582 #include <stdio.h>
21583 int
21584 main (void)
21585 {
21586
21587         va_list ap;
21588         vsscanf("from", "%d", ap)
21589   ;
21590   return 0;
21591 }
21592 _ACEOF
21593 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21594 if { (eval echo "$as_me:21594: \"$ac_link\"") >&5
21595   (eval $ac_link) 2>&5
21596   ac_status=$?
21597   echo "$as_me:21597: \$? = $ac_status" >&5
21598   (exit "$ac_status"); } &&
21599          { ac_try='test -s "conftest$ac_exeext"'
21600   { (eval echo "$as_me:21600: \"$ac_try\"") >&5
21601   (eval $ac_try) 2>&5
21602   ac_status=$?
21603   echo "$as_me:21603: \$? = $ac_status" >&5
21604   (exit "$ac_status"); }; }; then
21605   cf_cv_func_vsscanf=vsscanf
21606 else
21607   echo "$as_me: failed program was:" >&5
21608 cat "conftest.$ac_ext" >&5
21609
21610 cat >"conftest.$ac_ext" <<_ACEOF
21611 #line 21611 "configure"
21612 #include "confdefs.h"
21613
21614 #include <stdarg.h>
21615 #include <stdio.h>
21616 int
21617 main (void)
21618 {
21619
21620         FILE strbuf;
21621         char *str = "from";
21622
21623         strbuf._flag = _IOREAD;
21624         strbuf._ptr = strbuf._base = (unsigned char *) str;
21625         strbuf._cnt = strlen(str);
21626         strbuf._file = _NFILE;
21627         return (vfscanf(&strbuf, "%d", ap))
21628   ;
21629   return 0;
21630 }
21631 _ACEOF
21632 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21633 if { (eval echo "$as_me:21633: \"$ac_link\"") >&5
21634   (eval $ac_link) 2>&5
21635   ac_status=$?
21636   echo "$as_me:21636: \$? = $ac_status" >&5
21637   (exit "$ac_status"); } &&
21638          { ac_try='test -s "conftest$ac_exeext"'
21639   { (eval echo "$as_me:21639: \"$ac_try\"") >&5
21640   (eval $ac_try) 2>&5
21641   ac_status=$?
21642   echo "$as_me:21642: \$? = $ac_status" >&5
21643   (exit "$ac_status"); }; }; then
21644   cf_cv_func_vsscanf=vfscanf
21645 else
21646   echo "$as_me: failed program was:" >&5
21647 cat "conftest.$ac_ext" >&5
21648
21649 cat >"conftest.$ac_ext" <<_ACEOF
21650 #line 21650 "configure"
21651 #include "confdefs.h"
21652
21653 #include <stdarg.h>
21654 #include <stdio.h>
21655 int
21656 main (void)
21657 {
21658
21659         FILE strbuf;
21660         char *str = "from";
21661
21662         strbuf._flag = _IOREAD;
21663         strbuf._ptr = strbuf._base = (unsigned char *) str;
21664         strbuf._cnt = strlen(str);
21665         strbuf._file = _NFILE;
21666         return (_doscan(&strbuf, "%d", ap))
21667   ;
21668   return 0;
21669 }
21670 _ACEOF
21671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21672 if { (eval echo "$as_me:21672: \"$ac_link\"") >&5
21673   (eval $ac_link) 2>&5
21674   ac_status=$?
21675   echo "$as_me:21675: \$? = $ac_status" >&5
21676   (exit "$ac_status"); } &&
21677          { ac_try='test -s "conftest$ac_exeext"'
21678   { (eval echo "$as_me:21678: \"$ac_try\"") >&5
21679   (eval $ac_try) 2>&5
21680   ac_status=$?
21681   echo "$as_me:21681: \$? = $ac_status" >&5
21682   (exit "$ac_status"); }; }; then
21683   cf_cv_func_vsscanf=_doscan
21684 else
21685   echo "$as_me: failed program was:" >&5
21686 cat "conftest.$ac_ext" >&5
21687
21688 cf_cv_func_vsscanf=no
21689 fi
21690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21691 fi
21692 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21693 fi
21694 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21695 fi
21696 echo "$as_me:21696: result: $cf_cv_func_vsscanf" >&5
21697 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21698
21699 case "$cf_cv_func_vsscanf" in
21700 (vsscanf)
21701 cat >>confdefs.h <<\EOF
21702 #define HAVE_VSSCANF 1
21703 EOF
21704 ;;
21705 (vfscanf)
21706 cat >>confdefs.h <<\EOF
21707 #define HAVE_VFSCANF 1
21708 EOF
21709 ;;
21710 (_doscan)
21711 cat >>confdefs.h <<\EOF
21712 #define HAVE__DOSCAN 1
21713 EOF
21714 ;;
21715 esac
21716
21717 for ac_header in \
21718 unistd.h \
21719
21720 do
21721 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21722 echo "$as_me:21722: checking for $ac_header" >&5
21723 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21724 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21725   echo $ECHO_N "(cached) $ECHO_C" >&6
21726 else
21727   cat >"conftest.$ac_ext" <<_ACEOF
21728 #line 21728 "configure"
21729 #include "confdefs.h"
21730 #include <$ac_header>
21731 _ACEOF
21732 if { (eval echo "$as_me:21732: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21733   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21734   ac_status=$?
21735   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21736   rm -f conftest.er1
21737   cat conftest.err >&5
21738   echo "$as_me:21738: \$? = $ac_status" >&5
21739   (exit "$ac_status"); } >/dev/null; then
21740   if test -s conftest.err; then
21741     ac_cpp_err=$ac_c_preproc_warn_flag
21742   else
21743     ac_cpp_err=
21744   fi
21745 else
21746   ac_cpp_err=yes
21747 fi
21748 if test -z "$ac_cpp_err"; then
21749   eval "$as_ac_Header=yes"
21750 else
21751   echo "$as_me: failed program was:" >&5
21752   cat "conftest.$ac_ext" >&5
21753   eval "$as_ac_Header=no"
21754 fi
21755 rm -f conftest.err "conftest.$ac_ext"
21756 fi
21757 echo "$as_me:21757: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21758 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21759 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21760   cat >>confdefs.h <<EOF
21761 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21762 EOF
21763
21764 fi
21765 done
21766
21767 echo "$as_me:21767: checking for working mkstemp" >&5
21768 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21769 if test "${cf_cv_func_mkstemp+set}" = set; then
21770   echo $ECHO_N "(cached) $ECHO_C" >&6
21771 else
21772
21773 rm -rf ./conftest*
21774 if test "$cross_compiling" = yes; then
21775   cf_cv_func_mkstemp=maybe
21776 else
21777   cat >"conftest.$ac_ext" <<_ACEOF
21778 #line 21778 "configure"
21779 #include "confdefs.h"
21780
21781 #include <sys/types.h>
21782 #ifdef HAVE_UNISTD_H
21783 #include <unistd.h>
21784 #endif
21785 #include <stdlib.h>
21786 #include <stdio.h>
21787 #include <string.h>
21788 #include <sys/stat.h>
21789 int main(void)
21790 {
21791         char *tmpl = "conftestXXXXXX";
21792         char name[2][80];
21793         int n;
21794         int result = 0;
21795         int fd;
21796         struct stat sb;
21797
21798         umask(077);
21799         for (n = 0; n < 2; ++n) {
21800                 strcpy(name[n], tmpl);
21801                 if ((fd = mkstemp(name[n])) >= 0) {
21802                         if (!strcmp(name[n], tmpl)
21803                          || stat(name[n], &sb) != 0
21804                          || (sb.st_mode & S_IFMT) != S_IFREG
21805                          || (sb.st_mode & 077) != 0) {
21806                                 result = 1;
21807                         }
21808                         close(fd);
21809                 }
21810         }
21811         if (result == 0
21812          && !strcmp(name[0], name[1]))
21813                 result = 1;
21814         ${cf_cv_main_return:-return}(result);
21815 }
21816
21817 _ACEOF
21818 rm -f "conftest$ac_exeext"
21819 if { (eval echo "$as_me:21819: \"$ac_link\"") >&5
21820   (eval $ac_link) 2>&5
21821   ac_status=$?
21822   echo "$as_me:21822: \$? = $ac_status" >&5
21823   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21824   { (eval echo "$as_me:21824: \"$ac_try\"") >&5
21825   (eval $ac_try) 2>&5
21826   ac_status=$?
21827   echo "$as_me:21827: \$? = $ac_status" >&5
21828   (exit "$ac_status"); }; }; then
21829   cf_cv_func_mkstemp=yes
21830
21831 else
21832   echo "$as_me: program exited with status $ac_status" >&5
21833 echo "$as_me: failed program was:" >&5
21834 cat "conftest.$ac_ext" >&5
21835 cf_cv_func_mkstemp=no
21836
21837 fi
21838 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21839 fi
21840
21841 fi
21842 echo "$as_me:21842: result: $cf_cv_func_mkstemp" >&5
21843 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21844 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21845         echo "$as_me:21845: checking for mkstemp" >&5
21846 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21847 if test "${ac_cv_func_mkstemp+set}" = set; then
21848   echo $ECHO_N "(cached) $ECHO_C" >&6
21849 else
21850   cat >"conftest.$ac_ext" <<_ACEOF
21851 #line 21851 "configure"
21852 #include "confdefs.h"
21853 #define mkstemp autoconf_temporary
21854 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21855 #undef mkstemp
21856
21857 #ifdef __cplusplus
21858 extern "C"
21859 #endif
21860
21861 /* We use char because int might match the return type of a gcc2
21862    builtin and then its argument prototype would still apply.  */
21863 char mkstemp (void);
21864
21865 int
21866 main (void)
21867 {
21868
21869 /* The GNU C library defines stubs for functions which it implements
21870     to always fail with ENOSYS.  Some functions are actually named
21871     something starting with __ and the normal name is an alias.  */
21872 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21873 #error found stub for mkstemp
21874 #endif
21875
21876         return mkstemp ();
21877   ;
21878   return 0;
21879 }
21880 _ACEOF
21881 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21882 if { (eval echo "$as_me:21882: \"$ac_link\"") >&5
21883   (eval $ac_link) 2>&5
21884   ac_status=$?
21885   echo "$as_me:21885: \$? = $ac_status" >&5
21886   (exit "$ac_status"); } &&
21887          { ac_try='test -s "conftest$ac_exeext"'
21888   { (eval echo "$as_me:21888: \"$ac_try\"") >&5
21889   (eval $ac_try) 2>&5
21890   ac_status=$?
21891   echo "$as_me:21891: \$? = $ac_status" >&5
21892   (exit "$ac_status"); }; }; then
21893   ac_cv_func_mkstemp=yes
21894 else
21895   echo "$as_me: failed program was:" >&5
21896 cat "conftest.$ac_ext" >&5
21897 ac_cv_func_mkstemp=no
21898 fi
21899 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21900 fi
21901 echo "$as_me:21901: result: $ac_cv_func_mkstemp" >&5
21902 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21903
21904 fi
21905 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21906
21907 cat >>confdefs.h <<\EOF
21908 #define HAVE_MKSTEMP 1
21909 EOF
21910
21911 fi
21912
21913 # setup for prototype of fallback for vsscanf()
21914
21915 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21916         HAVE_VSSCANF=1
21917 else
21918         HAVE_VSSCANF=0
21919 fi
21920
21921 if test "x$cross_compiling" = xyes ; then
21922         { echo "$as_me:21922: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21923 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21924 else
21925         echo "$as_me:21925: checking whether setvbuf arguments are reversed" >&5
21926 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21927 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21928   echo $ECHO_N "(cached) $ECHO_C" >&6
21929 else
21930   if test "$cross_compiling" = yes; then
21931   { { echo "$as_me:21931: error: cannot run test program while cross compiling" >&5
21932 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21933    { (exit 1); exit 1; }; }
21934 else
21935   cat >"conftest.$ac_ext" <<_ACEOF
21936 #line 21936 "configure"
21937 #include "confdefs.h"
21938 #include <stdio.h>
21939 /* If setvbuf has the reversed format, exit 0. */
21940 int
21941 main (void)
21942 {
21943   /* This call has the arguments reversed.
21944      A reversed system may check and see that the address of main
21945      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21946   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21947     $ac_main_return(1);
21948   putc('\r', stdout);
21949   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21950 }
21951 _ACEOF
21952 rm -f "conftest$ac_exeext"
21953 if { (eval echo "$as_me:21953: \"$ac_link\"") >&5
21954   (eval $ac_link) 2>&5
21955   ac_status=$?
21956   echo "$as_me:21956: \$? = $ac_status" >&5
21957   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21958   { (eval echo "$as_me:21958: \"$ac_try\"") >&5
21959   (eval $ac_try) 2>&5
21960   ac_status=$?
21961   echo "$as_me:21961: \$? = $ac_status" >&5
21962   (exit "$ac_status"); }; }; then
21963   ac_cv_func_setvbuf_reversed=yes
21964 else
21965   echo "$as_me: program exited with status $ac_status" >&5
21966 echo "$as_me: failed program was:" >&5
21967 cat "conftest.$ac_ext" >&5
21968 ac_cv_func_setvbuf_reversed=no
21969 fi
21970 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21971 fi
21972 rm -f core ./core.* ./*.core
21973 fi
21974 echo "$as_me:21974: result: $ac_cv_func_setvbuf_reversed" >&5
21975 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21976 if test $ac_cv_func_setvbuf_reversed = yes; then
21977
21978 cat >>confdefs.h <<\EOF
21979 #define SETVBUF_REVERSED 1
21980 EOF
21981
21982 fi
21983
21984 fi
21985 echo "$as_me:21985: checking for intptr_t" >&5
21986 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21987 if test "${ac_cv_type_intptr_t+set}" = set; then
21988   echo $ECHO_N "(cached) $ECHO_C" >&6
21989 else
21990   cat >"conftest.$ac_ext" <<_ACEOF
21991 #line 21991 "configure"
21992 #include "confdefs.h"
21993 $ac_includes_default
21994 int
21995 main (void)
21996 {
21997 if ((intptr_t *) 0)
21998   return 0;
21999 if (sizeof (intptr_t))
22000   return 0;
22001   ;
22002   return 0;
22003 }
22004 _ACEOF
22005 rm -f "conftest.$ac_objext"
22006 if { (eval echo "$as_me:22006: \"$ac_compile\"") >&5
22007   (eval $ac_compile) 2>&5
22008   ac_status=$?
22009   echo "$as_me:22009: \$? = $ac_status" >&5
22010   (exit "$ac_status"); } &&
22011          { ac_try='test -s "conftest.$ac_objext"'
22012   { (eval echo "$as_me:22012: \"$ac_try\"") >&5
22013   (eval $ac_try) 2>&5
22014   ac_status=$?
22015   echo "$as_me:22015: \$? = $ac_status" >&5
22016   (exit "$ac_status"); }; }; then
22017   ac_cv_type_intptr_t=yes
22018 else
22019   echo "$as_me: failed program was:" >&5
22020 cat "conftest.$ac_ext" >&5
22021 ac_cv_type_intptr_t=no
22022 fi
22023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22024 fi
22025 echo "$as_me:22025: result: $ac_cv_type_intptr_t" >&5
22026 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22027 if test "$ac_cv_type_intptr_t" = yes; then
22028   :
22029 else
22030
22031 cat >>confdefs.h <<EOF
22032 #define intptr_t long
22033 EOF
22034
22035 fi
22036
22037 echo "$as_me:22037: checking for ssize_t" >&5
22038 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22039 if test "${ac_cv_type_ssize_t+set}" = set; then
22040   echo $ECHO_N "(cached) $ECHO_C" >&6
22041 else
22042   cat >"conftest.$ac_ext" <<_ACEOF
22043 #line 22043 "configure"
22044 #include "confdefs.h"
22045 $ac_includes_default
22046 int
22047 main (void)
22048 {
22049 if ((ssize_t *) 0)
22050   return 0;
22051 if (sizeof (ssize_t))
22052   return 0;
22053   ;
22054   return 0;
22055 }
22056 _ACEOF
22057 rm -f "conftest.$ac_objext"
22058 if { (eval echo "$as_me:22058: \"$ac_compile\"") >&5
22059   (eval $ac_compile) 2>&5
22060   ac_status=$?
22061   echo "$as_me:22061: \$? = $ac_status" >&5
22062   (exit "$ac_status"); } &&
22063          { ac_try='test -s "conftest.$ac_objext"'
22064   { (eval echo "$as_me:22064: \"$ac_try\"") >&5
22065   (eval $ac_try) 2>&5
22066   ac_status=$?
22067   echo "$as_me:22067: \$? = $ac_status" >&5
22068   (exit "$ac_status"); }; }; then
22069   ac_cv_type_ssize_t=yes
22070 else
22071   echo "$as_me: failed program was:" >&5
22072 cat "conftest.$ac_ext" >&5
22073 ac_cv_type_ssize_t=no
22074 fi
22075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22076 fi
22077 echo "$as_me:22077: result: $ac_cv_type_ssize_t" >&5
22078 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22079 if test "$ac_cv_type_ssize_t" = yes; then
22080   :
22081 else
22082
22083 cat >>confdefs.h <<EOF
22084 #define ssize_t int
22085 EOF
22086
22087 fi
22088
22089 echo "$as_me:22089: checking for type sigaction_t" >&5
22090 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22091 if test "${cf_cv_type_sigaction+set}" = set; then
22092   echo $ECHO_N "(cached) $ECHO_C" >&6
22093 else
22094
22095         cat >"conftest.$ac_ext" <<_ACEOF
22096 #line 22096 "configure"
22097 #include "confdefs.h"
22098
22099 #include <signal.h>
22100 int
22101 main (void)
22102 {
22103 sigaction_t x
22104   ;
22105   return 0;
22106 }
22107 _ACEOF
22108 rm -f "conftest.$ac_objext"
22109 if { (eval echo "$as_me:22109: \"$ac_compile\"") >&5
22110   (eval $ac_compile) 2>&5
22111   ac_status=$?
22112   echo "$as_me:22112: \$? = $ac_status" >&5
22113   (exit "$ac_status"); } &&
22114          { ac_try='test -s "conftest.$ac_objext"'
22115   { (eval echo "$as_me:22115: \"$ac_try\"") >&5
22116   (eval $ac_try) 2>&5
22117   ac_status=$?
22118   echo "$as_me:22118: \$? = $ac_status" >&5
22119   (exit "$ac_status"); }; }; then
22120   cf_cv_type_sigaction=yes
22121 else
22122   echo "$as_me: failed program was:" >&5
22123 cat "conftest.$ac_ext" >&5
22124 cf_cv_type_sigaction=no
22125 fi
22126 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22127 fi
22128
22129 echo "$as_me:22129: result: $cf_cv_type_sigaction" >&5
22130 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22131 test "$cf_cv_type_sigaction" = yes &&
22132 cat >>confdefs.h <<\EOF
22133 #define HAVE_TYPE_SIGACTION 1
22134 EOF
22135
22136 echo "$as_me:22136: checking declaration of size-change" >&5
22137 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22138 if test "${cf_cv_sizechange+set}" = set; then
22139   echo $ECHO_N "(cached) $ECHO_C" >&6
22140 else
22141
22142         cf_cv_sizechange=unknown
22143         cf_save_CPPFLAGS="$CPPFLAGS"
22144
22145 for cf_opts in "" "NEED_PTEM_H"
22146 do
22147
22148         CPPFLAGS="$cf_save_CPPFLAGS"
22149         if test -n "$cf_opts"
22150         then
22151
22152         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22153         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22154
22155         fi
22156         cat >"conftest.$ac_ext" <<_ACEOF
22157 #line 22157 "configure"
22158 #include "confdefs.h"
22159 #include <sys/types.h>
22160 #ifdef HAVE_TERMIOS_H
22161 #include <termios.h>
22162 #else
22163 #ifdef HAVE_TERMIO_H
22164 #include <termio.h>
22165 #endif
22166 #endif
22167
22168 #ifdef NEED_PTEM_H
22169 /* This is a workaround for SCO:  they neglected to define struct winsize in
22170  * termios.h -- it's only in termio.h and ptem.h
22171  */
22172 #include <sys/stream.h>
22173 #include <sys/ptem.h>
22174 #endif
22175
22176 #ifdef HAVE_SYS_IOCTL_H
22177 #include <sys/ioctl.h>
22178 #endif
22179
22180 int
22181 main (void)
22182 {
22183
22184 #ifdef TIOCGSIZE
22185         struct ttysize win;     /* SunOS 3.0... */
22186         int y = win.ts_lines = 2;
22187         int x = win.ts_cols = 1;
22188         (void)y;
22189         (void)x;
22190 #else
22191 #ifdef TIOCGWINSZ
22192         struct winsize win;     /* everything else */
22193         int y = win.ws_row = 2;
22194         int x = win.ws_col = 1;
22195         (void)y;
22196         (void)x;
22197 #else
22198         no TIOCGSIZE or TIOCGWINSZ
22199 #endif /* TIOCGWINSZ */
22200 #endif /* TIOCGSIZE */
22201
22202   ;
22203   return 0;
22204 }
22205 _ACEOF
22206 rm -f "conftest.$ac_objext"
22207 if { (eval echo "$as_me:22207: \"$ac_compile\"") >&5
22208   (eval $ac_compile) 2>&5
22209   ac_status=$?
22210   echo "$as_me:22210: \$? = $ac_status" >&5
22211   (exit "$ac_status"); } &&
22212          { ac_try='test -s "conftest.$ac_objext"'
22213   { (eval echo "$as_me:22213: \"$ac_try\"") >&5
22214   (eval $ac_try) 2>&5
22215   ac_status=$?
22216   echo "$as_me:22216: \$? = $ac_status" >&5
22217   (exit "$ac_status"); }; }; then
22218   cf_cv_sizechange=yes
22219 else
22220   echo "$as_me: failed program was:" >&5
22221 cat "conftest.$ac_ext" >&5
22222 cf_cv_sizechange=no
22223 fi
22224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22225
22226         CPPFLAGS="$cf_save_CPPFLAGS"
22227         if test "$cf_cv_sizechange" = yes ; then
22228                 echo "size-change succeeded ($cf_opts)" >&5
22229                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22230                 break
22231         fi
22232 done
22233
22234 fi
22235 echo "$as_me:22235: result: $cf_cv_sizechange" >&5
22236 echo "${ECHO_T}$cf_cv_sizechange" >&6
22237 if test "$cf_cv_sizechange" != no ; then
22238
22239 cat >>confdefs.h <<\EOF
22240 #define HAVE_SIZECHANGE 1
22241 EOF
22242
22243         case "$cf_cv_sizechange" in
22244         (NEED*)
22245                 cat >>confdefs.h <<EOF
22246 #define $cf_cv_sizechange  1
22247 EOF
22248
22249                 ;;
22250         esac
22251 fi
22252
22253 echo "$as_me:22253: checking for memmove" >&5
22254 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22255 if test "${ac_cv_func_memmove+set}" = set; then
22256   echo $ECHO_N "(cached) $ECHO_C" >&6
22257 else
22258   cat >"conftest.$ac_ext" <<_ACEOF
22259 #line 22259 "configure"
22260 #include "confdefs.h"
22261 #define memmove autoconf_temporary
22262 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22263 #undef memmove
22264
22265 #ifdef __cplusplus
22266 extern "C"
22267 #endif
22268
22269 /* We use char because int might match the return type of a gcc2
22270    builtin and then its argument prototype would still apply.  */
22271 char memmove (void);
22272
22273 int
22274 main (void)
22275 {
22276
22277 /* The GNU C library defines stubs for functions which it implements
22278     to always fail with ENOSYS.  Some functions are actually named
22279     something starting with __ and the normal name is an alias.  */
22280 #if defined (__stub_memmove) || defined (__stub___memmove)
22281 #error found stub for memmove
22282 #endif
22283
22284         return memmove ();
22285   ;
22286   return 0;
22287 }
22288 _ACEOF
22289 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22290 if { (eval echo "$as_me:22290: \"$ac_link\"") >&5
22291   (eval $ac_link) 2>&5
22292   ac_status=$?
22293   echo "$as_me:22293: \$? = $ac_status" >&5
22294   (exit "$ac_status"); } &&
22295          { ac_try='test -s "conftest$ac_exeext"'
22296   { (eval echo "$as_me:22296: \"$ac_try\"") >&5
22297   (eval $ac_try) 2>&5
22298   ac_status=$?
22299   echo "$as_me:22299: \$? = $ac_status" >&5
22300   (exit "$ac_status"); }; }; then
22301   ac_cv_func_memmove=yes
22302 else
22303   echo "$as_me: failed program was:" >&5
22304 cat "conftest.$ac_ext" >&5
22305 ac_cv_func_memmove=no
22306 fi
22307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22308 fi
22309 echo "$as_me:22309: result: $ac_cv_func_memmove" >&5
22310 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22311 if test "$ac_cv_func_memmove" = yes; then
22312   :
22313 else
22314
22315 echo "$as_me:22315: checking for bcopy" >&5
22316 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22317 if test "${ac_cv_func_bcopy+set}" = set; then
22318   echo $ECHO_N "(cached) $ECHO_C" >&6
22319 else
22320   cat >"conftest.$ac_ext" <<_ACEOF
22321 #line 22321 "configure"
22322 #include "confdefs.h"
22323 #define bcopy autoconf_temporary
22324 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22325 #undef bcopy
22326
22327 #ifdef __cplusplus
22328 extern "C"
22329 #endif
22330
22331 /* We use char because int might match the return type of a gcc2
22332    builtin and then its argument prototype would still apply.  */
22333 char bcopy (void);
22334
22335 int
22336 main (void)
22337 {
22338
22339 /* The GNU C library defines stubs for functions which it implements
22340     to always fail with ENOSYS.  Some functions are actually named
22341     something starting with __ and the normal name is an alias.  */
22342 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22343 #error found stub for bcopy
22344 #endif
22345
22346         return bcopy ();
22347   ;
22348   return 0;
22349 }
22350 _ACEOF
22351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22352 if { (eval echo "$as_me:22352: \"$ac_link\"") >&5
22353   (eval $ac_link) 2>&5
22354   ac_status=$?
22355   echo "$as_me:22355: \$? = $ac_status" >&5
22356   (exit "$ac_status"); } &&
22357          { ac_try='test -s "conftest$ac_exeext"'
22358   { (eval echo "$as_me:22358: \"$ac_try\"") >&5
22359   (eval $ac_try) 2>&5
22360   ac_status=$?
22361   echo "$as_me:22361: \$? = $ac_status" >&5
22362   (exit "$ac_status"); }; }; then
22363   ac_cv_func_bcopy=yes
22364 else
22365   echo "$as_me: failed program was:" >&5
22366 cat "conftest.$ac_ext" >&5
22367 ac_cv_func_bcopy=no
22368 fi
22369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22370 fi
22371 echo "$as_me:22371: result: $ac_cv_func_bcopy" >&5
22372 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22373 if test "$ac_cv_func_bcopy" = yes; then
22374
22375         echo "$as_me:22375: checking if bcopy does overlapping moves" >&5
22376 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22377 if test "${cf_cv_good_bcopy+set}" = set; then
22378   echo $ECHO_N "(cached) $ECHO_C" >&6
22379 else
22380
22381                 if test "$cross_compiling" = yes; then
22382   cf_cv_good_bcopy=unknown
22383 else
22384   cat >"conftest.$ac_ext" <<_ACEOF
22385 #line 22385 "configure"
22386 #include "confdefs.h"
22387
22388 int main(void) {
22389         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22390         char temp[40];
22391         bcopy(data, temp, sizeof(data));
22392         bcopy(temp+10, temp, 15);
22393         bcopy(temp+5, temp+15, 10);
22394         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22395 }
22396
22397 _ACEOF
22398 rm -f "conftest$ac_exeext"
22399 if { (eval echo "$as_me:22399: \"$ac_link\"") >&5
22400   (eval $ac_link) 2>&5
22401   ac_status=$?
22402   echo "$as_me:22402: \$? = $ac_status" >&5
22403   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22404   { (eval echo "$as_me:22404: \"$ac_try\"") >&5
22405   (eval $ac_try) 2>&5
22406   ac_status=$?
22407   echo "$as_me:22407: \$? = $ac_status" >&5
22408   (exit "$ac_status"); }; }; then
22409   cf_cv_good_bcopy=yes
22410 else
22411   echo "$as_me: program exited with status $ac_status" >&5
22412 echo "$as_me: failed program was:" >&5
22413 cat "conftest.$ac_ext" >&5
22414 cf_cv_good_bcopy=no
22415 fi
22416 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22417 fi
22418
22419 fi
22420 echo "$as_me:22420: result: $cf_cv_good_bcopy" >&5
22421 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22422
22423 else
22424   cf_cv_good_bcopy=no
22425 fi
22426
22427         if test "$cf_cv_good_bcopy" = yes ; then
22428
22429 cat >>confdefs.h <<\EOF
22430 #define USE_OK_BCOPY 1
22431 EOF
22432
22433         else
22434
22435 cat >>confdefs.h <<\EOF
22436 #define USE_MY_MEMMOVE 1
22437 EOF
22438
22439         fi
22440
22441 fi
22442
22443 tty >/dev/null 2>&1 || {
22444 for ac_func in posix_openpt
22445 do
22446 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22447 echo "$as_me:22447: checking for $ac_func" >&5
22448 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22449 if eval "test \"\${$as_ac_var+set}\" = set"; then
22450   echo $ECHO_N "(cached) $ECHO_C" >&6
22451 else
22452   cat >"conftest.$ac_ext" <<_ACEOF
22453 #line 22453 "configure"
22454 #include "confdefs.h"
22455 #define $ac_func autoconf_temporary
22456 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22457 #undef $ac_func
22458
22459 #ifdef __cplusplus
22460 extern "C"
22461 #endif
22462
22463 /* We use char because int might match the return type of a gcc2
22464    builtin and then its argument prototype would still apply.  */
22465 char $ac_func (void);
22466
22467 int
22468 main (void)
22469 {
22470
22471 /* The GNU C library defines stubs for functions which it implements
22472     to always fail with ENOSYS.  Some functions are actually named
22473     something starting with __ and the normal name is an alias.  */
22474 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22475 #error found stub for $ac_func
22476 #endif
22477
22478         return $ac_func ();
22479   ;
22480   return 0;
22481 }
22482 _ACEOF
22483 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22484 if { (eval echo "$as_me:22484: \"$ac_link\"") >&5
22485   (eval $ac_link) 2>&5
22486   ac_status=$?
22487   echo "$as_me:22487: \$? = $ac_status" >&5
22488   (exit "$ac_status"); } &&
22489          { ac_try='test -s "conftest$ac_exeext"'
22490   { (eval echo "$as_me:22490: \"$ac_try\"") >&5
22491   (eval $ac_try) 2>&5
22492   ac_status=$?
22493   echo "$as_me:22493: \$? = $ac_status" >&5
22494   (exit "$ac_status"); }; }; then
22495   eval "$as_ac_var=yes"
22496 else
22497   echo "$as_me: failed program was:" >&5
22498 cat "conftest.$ac_ext" >&5
22499 eval "$as_ac_var=no"
22500 fi
22501 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22502 fi
22503 echo "$as_me:22503: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22504 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22505 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22506   cat >>confdefs.h <<EOF
22507 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22508 EOF
22509
22510 fi
22511 done
22512  }
22513 echo "$as_me:22513: checking if poll really works" >&5
22514 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22515 if test "${cf_cv_working_poll+set}" = set; then
22516   echo $ECHO_N "(cached) $ECHO_C" >&6
22517 else
22518
22519 if test "$cross_compiling" = yes; then
22520   cf_cv_working_poll=unknown
22521 else
22522   cat >"conftest.$ac_ext" <<_ACEOF
22523 #line 22523 "configure"
22524 #include "confdefs.h"
22525
22526 #include <stdlib.h>
22527 #include <stdio.h>
22528 #include <unistd.h>
22529 #include <fcntl.h>
22530 #ifdef HAVE_POLL_H
22531 #include <poll.h>
22532 #else
22533 #include <sys/poll.h>
22534 #endif
22535 int main(void) {
22536         struct pollfd myfds;
22537         int ret;
22538
22539         /* check for Darwin bug with respect to "devices" */
22540         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22541         if (myfds.fd < 0)
22542                 myfds.fd = 0;
22543         myfds.events = POLLIN;
22544         myfds.revents = 0;
22545
22546         ret = poll(&myfds, 1, 100);
22547
22548         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22549                 ret = -1;
22550         } else {
22551                 int fd = 0;
22552                 if (!isatty(fd)) {
22553                         fd = open("/dev/tty", 2);       /* O_RDWR */
22554                 }
22555 #ifdef HAVE_POSIX_OPENPT
22556                 if (fd < 0) {
22557                         fd = posix_openpt(O_RDWR);
22558                 }
22559 #endif
22560
22561                 if (fd >= 0) {
22562                         /* also check with standard input */
22563                         myfds.fd = fd;
22564                         myfds.events = POLLIN;
22565                         myfds.revents = 0;
22566                         ret = poll(&myfds, 1, 100);
22567                 } else {
22568                         ret = -1;
22569                 }
22570         }
22571         ${cf_cv_main_return:-return}(ret < 0);
22572 }
22573 _ACEOF
22574 rm -f "conftest$ac_exeext"
22575 if { (eval echo "$as_me:22575: \"$ac_link\"") >&5
22576   (eval $ac_link) 2>&5
22577   ac_status=$?
22578   echo "$as_me:22578: \$? = $ac_status" >&5
22579   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22580   { (eval echo "$as_me:22580: \"$ac_try\"") >&5
22581   (eval $ac_try) 2>&5
22582   ac_status=$?
22583   echo "$as_me:22583: \$? = $ac_status" >&5
22584   (exit "$ac_status"); }; }; then
22585   cf_cv_working_poll=yes
22586 else
22587   echo "$as_me: program exited with status $ac_status" >&5
22588 echo "$as_me: failed program was:" >&5
22589 cat "conftest.$ac_ext" >&5
22590 cf_cv_working_poll=no
22591 fi
22592 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22593 fi
22594 fi
22595 echo "$as_me:22595: result: $cf_cv_working_poll" >&5
22596 echo "${ECHO_T}$cf_cv_working_poll" >&6
22597 test "$cf_cv_working_poll" = "yes" &&
22598 cat >>confdefs.h <<\EOF
22599 #define HAVE_WORKING_POLL 1
22600 EOF
22601
22602 echo "$as_me:22602: checking for va_copy" >&5
22603 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22604 if test "${cf_cv_have_va_copy+set}" = set; then
22605   echo $ECHO_N "(cached) $ECHO_C" >&6
22606 else
22607
22608 cat >"conftest.$ac_ext" <<_ACEOF
22609 #line 22609 "configure"
22610 #include "confdefs.h"
22611
22612 #include <stdarg.h>
22613
22614 int
22615 main (void)
22616 {
22617
22618         static va_list dst;
22619         static va_list src;
22620         va_copy(dst, src)
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22626 if { (eval echo "$as_me:22626: \"$ac_link\"") >&5
22627   (eval $ac_link) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit "$ac_status"); } &&
22631          { ac_try='test -s "conftest$ac_exeext"'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit "$ac_status"); }; }; then
22637   cf_cv_have_va_copy=yes
22638 else
22639   echo "$as_me: failed program was:" >&5
22640 cat "conftest.$ac_ext" >&5
22641 cf_cv_have_va_copy=no
22642 fi
22643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22644 fi
22645 echo "$as_me:22645: result: $cf_cv_have_va_copy" >&5
22646 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22647
22648 if test "$cf_cv_have_va_copy" = yes;
22649 then
22650
22651 cat >>confdefs.h <<\EOF
22652 #define HAVE_VA_COPY 1
22653 EOF
22654
22655 else # !cf_cv_have_va_copy
22656
22657 echo "$as_me:22657: checking for __va_copy" >&5
22658 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22659 if test "${cf_cv_have___va_copy+set}" = set; then
22660   echo $ECHO_N "(cached) $ECHO_C" >&6
22661 else
22662
22663 cat >"conftest.$ac_ext" <<_ACEOF
22664 #line 22664 "configure"
22665 #include "confdefs.h"
22666
22667 #include <stdarg.h>
22668
22669 int
22670 main (void)
22671 {
22672
22673         static va_list dst;
22674         static va_list src;
22675         __va_copy(dst, src)
22676   ;
22677   return 0;
22678 }
22679 _ACEOF
22680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22681 if { (eval echo "$as_me:22681: \"$ac_link\"") >&5
22682   (eval $ac_link) 2>&5
22683   ac_status=$?
22684   echo "$as_me:22684: \$? = $ac_status" >&5
22685   (exit "$ac_status"); } &&
22686          { ac_try='test -s "conftest$ac_exeext"'
22687   { (eval echo "$as_me:22687: \"$ac_try\"") >&5
22688   (eval $ac_try) 2>&5
22689   ac_status=$?
22690   echo "$as_me:22690: \$? = $ac_status" >&5
22691   (exit "$ac_status"); }; }; then
22692   cf_cv_have___va_copy=yes
22693 else
22694   echo "$as_me: failed program was:" >&5
22695 cat "conftest.$ac_ext" >&5
22696 cf_cv_have___va_copy=no
22697 fi
22698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22699 fi
22700 echo "$as_me:22700: result: $cf_cv_have___va_copy" >&5
22701 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22702
22703 if test "$cf_cv_have___va_copy" = yes
22704 then
22705
22706 cat >>confdefs.h <<\EOF
22707 #define HAVE___VA_COPY 1
22708 EOF
22709
22710 else # !cf_cv_have___va_copy
22711
22712 echo "$as_me:22712: checking for __builtin_va_copy" >&5
22713 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22714 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22715   echo $ECHO_N "(cached) $ECHO_C" >&6
22716 else
22717
22718 cat >"conftest.$ac_ext" <<_ACEOF
22719 #line 22719 "configure"
22720 #include "confdefs.h"
22721
22722 #include <stdarg.h>
22723
22724 int
22725 main (void)
22726 {
22727
22728         static va_list dst;
22729         static va_list src;
22730         __builtin_va_copy(dst, src)
22731   ;
22732   return 0;
22733 }
22734 _ACEOF
22735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22736 if { (eval echo "$as_me:22736: \"$ac_link\"") >&5
22737   (eval $ac_link) 2>&5
22738   ac_status=$?
22739   echo "$as_me:22739: \$? = $ac_status" >&5
22740   (exit "$ac_status"); } &&
22741          { ac_try='test -s "conftest$ac_exeext"'
22742   { (eval echo "$as_me:22742: \"$ac_try\"") >&5
22743   (eval $ac_try) 2>&5
22744   ac_status=$?
22745   echo "$as_me:22745: \$? = $ac_status" >&5
22746   (exit "$ac_status"); }; }; then
22747   cf_cv_have___builtin_va_copy=yes
22748 else
22749   echo "$as_me: failed program was:" >&5
22750 cat "conftest.$ac_ext" >&5
22751 cf_cv_have___builtin_va_copy=no
22752 fi
22753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22754 fi
22755 echo "$as_me:22755: result: $cf_cv_have___builtin_va_copy" >&5
22756 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22757
22758 test "$cf_cv_have___builtin_va_copy" = yes &&
22759
22760 cat >>confdefs.h <<\EOF
22761 #define HAVE___BUILTIN_VA_COPY 1
22762 EOF
22763
22764 fi # cf_cv_have___va_copy
22765
22766 fi # cf_cv_have_va_copy
22767
22768 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22769 (*yes*)
22770         ;;
22771
22772 (*)
22773         echo "$as_me:22773: checking if we can simply copy va_list" >&5
22774 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22775 if test "${cf_cv_pointer_va_list+set}" = set; then
22776   echo $ECHO_N "(cached) $ECHO_C" >&6
22777 else
22778
22779 cat >"conftest.$ac_ext" <<_ACEOF
22780 #line 22780 "configure"
22781 #include "confdefs.h"
22782
22783 #include <stdarg.h>
22784
22785 int
22786 main (void)
22787 {
22788
22789         va_list dst;
22790         va_list src;
22791         dst = src
22792   ;
22793   return 0;
22794 }
22795 _ACEOF
22796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22797 if { (eval echo "$as_me:22797: \"$ac_link\"") >&5
22798   (eval $ac_link) 2>&5
22799   ac_status=$?
22800   echo "$as_me:22800: \$? = $ac_status" >&5
22801   (exit "$ac_status"); } &&
22802          { ac_try='test -s "conftest$ac_exeext"'
22803   { (eval echo "$as_me:22803: \"$ac_try\"") >&5
22804   (eval $ac_try) 2>&5
22805   ac_status=$?
22806   echo "$as_me:22806: \$? = $ac_status" >&5
22807   (exit "$ac_status"); }; }; then
22808   cf_cv_pointer_va_list=yes
22809 else
22810   echo "$as_me: failed program was:" >&5
22811 cat "conftest.$ac_ext" >&5
22812 cf_cv_pointer_va_list=no
22813 fi
22814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22815 fi
22816 echo "$as_me:22816: result: $cf_cv_pointer_va_list" >&5
22817 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22818
22819         if test "$cf_cv_pointer_va_list" = no
22820         then
22821                 echo "$as_me:22821: checking if we can copy va_list indirectly" >&5
22822 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22823 if test "${cf_cv_array_va_list+set}" = set; then
22824   echo $ECHO_N "(cached) $ECHO_C" >&6
22825 else
22826
22827 cat >"conftest.$ac_ext" <<_ACEOF
22828 #line 22828 "configure"
22829 #include "confdefs.h"
22830
22831 #include <stdarg.h>
22832
22833 int
22834 main (void)
22835 {
22836
22837         va_list dst;
22838         va_list src;
22839         *dst = *src
22840   ;
22841   return 0;
22842 }
22843 _ACEOF
22844 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22845 if { (eval echo "$as_me:22845: \"$ac_link\"") >&5
22846   (eval $ac_link) 2>&5
22847   ac_status=$?
22848   echo "$as_me:22848: \$? = $ac_status" >&5
22849   (exit "$ac_status"); } &&
22850          { ac_try='test -s "conftest$ac_exeext"'
22851   { (eval echo "$as_me:22851: \"$ac_try\"") >&5
22852   (eval $ac_try) 2>&5
22853   ac_status=$?
22854   echo "$as_me:22854: \$? = $ac_status" >&5
22855   (exit "$ac_status"); }; }; then
22856   cf_cv_array_va_list=yes
22857 else
22858   echo "$as_me: failed program was:" >&5
22859 cat "conftest.$ac_ext" >&5
22860 cf_cv_array_va_list=no
22861 fi
22862 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22863 fi
22864 echo "$as_me:22864: result: $cf_cv_array_va_list" >&5
22865 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22866                 test "$cf_cv_array_va_list" = yes &&
22867 cat >>confdefs.h <<\EOF
22868 #define ARRAY_VA_LIST 1
22869 EOF
22870
22871         fi
22872         ;;
22873 esac
22874
22875 echo "$as_me:22875: checking for pid_t" >&5
22876 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22877 if test "${ac_cv_type_pid_t+set}" = set; then
22878   echo $ECHO_N "(cached) $ECHO_C" >&6
22879 else
22880   cat >"conftest.$ac_ext" <<_ACEOF
22881 #line 22881 "configure"
22882 #include "confdefs.h"
22883 $ac_includes_default
22884 int
22885 main (void)
22886 {
22887 if ((pid_t *) 0)
22888   return 0;
22889 if (sizeof (pid_t))
22890   return 0;
22891   ;
22892   return 0;
22893 }
22894 _ACEOF
22895 rm -f "conftest.$ac_objext"
22896 if { (eval echo "$as_me:22896: \"$ac_compile\"") >&5
22897   (eval $ac_compile) 2>&5
22898   ac_status=$?
22899   echo "$as_me:22899: \$? = $ac_status" >&5
22900   (exit "$ac_status"); } &&
22901          { ac_try='test -s "conftest.$ac_objext"'
22902   { (eval echo "$as_me:22902: \"$ac_try\"") >&5
22903   (eval $ac_try) 2>&5
22904   ac_status=$?
22905   echo "$as_me:22905: \$? = $ac_status" >&5
22906   (exit "$ac_status"); }; }; then
22907   ac_cv_type_pid_t=yes
22908 else
22909   echo "$as_me: failed program was:" >&5
22910 cat "conftest.$ac_ext" >&5
22911 ac_cv_type_pid_t=no
22912 fi
22913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22914 fi
22915 echo "$as_me:22915: result: $ac_cv_type_pid_t" >&5
22916 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22917 if test "$ac_cv_type_pid_t" = yes; then
22918   :
22919 else
22920
22921 cat >>confdefs.h <<EOF
22922 #define pid_t int
22923 EOF
22924
22925 fi
22926
22927 for ac_header in unistd.h vfork.h
22928 do
22929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22930 echo "$as_me:22930: checking for $ac_header" >&5
22931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22933   echo $ECHO_N "(cached) $ECHO_C" >&6
22934 else
22935   cat >"conftest.$ac_ext" <<_ACEOF
22936 #line 22936 "configure"
22937 #include "confdefs.h"
22938 #include <$ac_header>
22939 _ACEOF
22940 if { (eval echo "$as_me:22940: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22941   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22942   ac_status=$?
22943   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22944   rm -f conftest.er1
22945   cat conftest.err >&5
22946   echo "$as_me:22946: \$? = $ac_status" >&5
22947   (exit "$ac_status"); } >/dev/null; then
22948   if test -s conftest.err; then
22949     ac_cpp_err=$ac_c_preproc_warn_flag
22950   else
22951     ac_cpp_err=
22952   fi
22953 else
22954   ac_cpp_err=yes
22955 fi
22956 if test -z "$ac_cpp_err"; then
22957   eval "$as_ac_Header=yes"
22958 else
22959   echo "$as_me: failed program was:" >&5
22960   cat "conftest.$ac_ext" >&5
22961   eval "$as_ac_Header=no"
22962 fi
22963 rm -f conftest.err "conftest.$ac_ext"
22964 fi
22965 echo "$as_me:22965: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22966 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22967 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22968   cat >>confdefs.h <<EOF
22969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22970 EOF
22971
22972 fi
22973 done
22974
22975 for ac_func in fork vfork
22976 do
22977 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22978 echo "$as_me:22978: checking for $ac_func" >&5
22979 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22980 if eval "test \"\${$as_ac_var+set}\" = set"; then
22981   echo $ECHO_N "(cached) $ECHO_C" >&6
22982 else
22983   cat >"conftest.$ac_ext" <<_ACEOF
22984 #line 22984 "configure"
22985 #include "confdefs.h"
22986 #define $ac_func autoconf_temporary
22987 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22988 #undef $ac_func
22989
22990 #ifdef __cplusplus
22991 extern "C"
22992 #endif
22993
22994 /* We use char because int might match the return type of a gcc2
22995    builtin and then its argument prototype would still apply.  */
22996 char $ac_func (void);
22997
22998 int
22999 main (void)
23000 {
23001
23002 /* The GNU C library defines stubs for functions which it implements
23003     to always fail with ENOSYS.  Some functions are actually named
23004     something starting with __ and the normal name is an alias.  */
23005 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23006 #error found stub for $ac_func
23007 #endif
23008
23009         return $ac_func ();
23010   ;
23011   return 0;
23012 }
23013 _ACEOF
23014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23015 if { (eval echo "$as_me:23015: \"$ac_link\"") >&5
23016   (eval $ac_link) 2>&5
23017   ac_status=$?
23018   echo "$as_me:23018: \$? = $ac_status" >&5
23019   (exit "$ac_status"); } &&
23020          { ac_try='test -s "conftest$ac_exeext"'
23021   { (eval echo "$as_me:23021: \"$ac_try\"") >&5
23022   (eval $ac_try) 2>&5
23023   ac_status=$?
23024   echo "$as_me:23024: \$? = $ac_status" >&5
23025   (exit "$ac_status"); }; }; then
23026   eval "$as_ac_var=yes"
23027 else
23028   echo "$as_me: failed program was:" >&5
23029 cat "conftest.$ac_ext" >&5
23030 eval "$as_ac_var=no"
23031 fi
23032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23033 fi
23034 echo "$as_me:23034: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23035 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23036 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23037   cat >>confdefs.h <<EOF
23038 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23039 EOF
23040
23041 fi
23042 done
23043
23044 ac_cv_func_fork_works=$ac_cv_func_fork
23045 if test "x$ac_cv_func_fork" = xyes; then
23046   echo "$as_me:23046: checking for working fork" >&5
23047 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23048 if test "${ac_cv_func_fork_works+set}" = set; then
23049   echo $ECHO_N "(cached) $ECHO_C" >&6
23050 else
23051   if test "$cross_compiling" = yes; then
23052   ac_cv_func_fork_works=cross
23053 else
23054   cat >"conftest.$ac_ext" <<_ACEOF
23055 /* By Rüdiger Kuhlmann. */
23056       #include <sys/types.h>
23057       #if HAVE_UNISTD_H
23058       # include <unistd.h>
23059       #endif
23060       /* Some systems only have a dummy stub for fork() */
23061       int main (void)
23062       {
23063         if (fork() < 0)
23064           $ac_main_return (1);
23065         $ac_main_return (0);
23066       }
23067 _ACEOF
23068 rm -f "conftest$ac_exeext"
23069 if { (eval echo "$as_me:23069: \"$ac_link\"") >&5
23070   (eval $ac_link) 2>&5
23071   ac_status=$?
23072   echo "$as_me:23072: \$? = $ac_status" >&5
23073   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23074   { (eval echo "$as_me:23074: \"$ac_try\"") >&5
23075   (eval $ac_try) 2>&5
23076   ac_status=$?
23077   echo "$as_me:23077: \$? = $ac_status" >&5
23078   (exit "$ac_status"); }; }; then
23079   ac_cv_func_fork_works=yes
23080 else
23081   echo "$as_me: program exited with status $ac_status" >&5
23082 echo "$as_me: failed program was:" >&5
23083 cat "conftest.$ac_ext" >&5
23084 ac_cv_func_fork_works=no
23085 fi
23086 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23087 fi
23088 fi
23089 echo "$as_me:23089: result: $ac_cv_func_fork_works" >&5
23090 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23091
23092 fi
23093 if test "x$ac_cv_func_fork_works" = xcross; then
23094   case $host in
23095     *-*-amigaos* | *-*-msdosdjgpp*)
23096       # Override, as these systems have only a dummy fork() stub
23097       ac_cv_func_fork_works=no
23098       ;;
23099     *)
23100       ac_cv_func_fork_works=yes
23101       ;;
23102   esac
23103   { echo "$as_me:23103: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23104 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23105 fi
23106 ac_cv_func_vfork_works=$ac_cv_func_vfork
23107 if test "x$ac_cv_func_vfork" = xyes; then
23108   echo "$as_me:23108: checking for working vfork" >&5
23109 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23110 if test "${ac_cv_func_vfork_works+set}" = set; then
23111   echo $ECHO_N "(cached) $ECHO_C" >&6
23112 else
23113   if test "$cross_compiling" = yes; then
23114   ac_cv_func_vfork_works=cross
23115 else
23116   cat >"conftest.$ac_ext" <<_ACEOF
23117 #line 23117 "configure"
23118 #include "confdefs.h"
23119 /* Thanks to Paul Eggert for this test.  */
23120 #include <stdio.h>
23121 #include <sys/types.h>
23122 #include <sys/stat.h>
23123 #if HAVE_UNISTD_H
23124 # include <unistd.h>
23125 #endif
23126 #if HAVE_VFORK_H
23127 # include <vfork.h>
23128 #endif
23129 /* On some sparc systems, changes by the child to local and incoming
23130    argument registers are propagated back to the parent.  The compiler
23131    is told about this with #include <vfork.h>, but some compilers
23132    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23133    static variable whose address is put into a register that is
23134    clobbered by the vfork.  */
23135 static
23136 #ifdef __cplusplus
23137 sparc_address_test (int arg)
23138 # else
23139 sparc_address_test (arg) int arg;
23140 #endif
23141 {
23142   static pid_t child;
23143   if (!child) {
23144     child = vfork ();
23145     if (child < 0) {
23146       perror ("vfork");
23147       _exit(2);
23148     }
23149     if (!child) {
23150       arg = getpid();
23151       write(-1, "", 0);
23152       _exit (arg);
23153     }
23154   }
23155 }
23156
23157 int
23158 main (void)
23159 {
23160   pid_t parent = getpid ();
23161   pid_t child;
23162
23163   sparc_address_test ();
23164
23165   child = vfork ();
23166
23167   if (child == 0) {
23168     /* Here is another test for sparc vfork register problems.  This
23169        test uses lots of local variables, at least as many local
23170        variables as main has allocated so far including compiler
23171        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23172        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23173        reuse the register of parent for one of the local variables,
23174        since it will think that parent can't possibly be used any more
23175        in this routine.  Assigning to the local variable will thus
23176        munge parent in the parent process.  */
23177     pid_t
23178       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23179       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23180     /* Convince the compiler that p..p7 are live; otherwise, it might
23181        use the same hardware register for all 8 local variables.  */
23182     if (p != p1 || p != p2 || p != p3 || p != p4
23183         || p != p5 || p != p6 || p != p7)
23184       _exit(1);
23185
23186     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23187        from child file descriptors.  If the child closes a descriptor
23188        before it execs or exits, this munges the parent's descriptor
23189        as well.  Test for this by closing stdout in the child.  */
23190     _exit(close(fileno(stdout)) != 0);
23191   } else {
23192     int status;
23193     struct stat st;
23194
23195     while (wait(&status) != child)
23196       ;
23197     $ac_main_return(
23198          /* Was there some problem with vforking?  */
23199          child < 0
23200
23201          /* Did the child fail?  (This shouldn't happen.)  */
23202          || status
23203
23204          /* Did the vfork/compiler bug occur?  */
23205          || parent != getpid()
23206
23207          /* Did the file descriptor bug occur?  */
23208          || fstat(fileno(stdout), &st) != 0
23209          );
23210   }
23211 }
23212 _ACEOF
23213 rm -f "conftest$ac_exeext"
23214 if { (eval echo "$as_me:23214: \"$ac_link\"") >&5
23215   (eval $ac_link) 2>&5
23216   ac_status=$?
23217   echo "$as_me:23217: \$? = $ac_status" >&5
23218   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23219   { (eval echo "$as_me:23219: \"$ac_try\"") >&5
23220   (eval $ac_try) 2>&5
23221   ac_status=$?
23222   echo "$as_me:23222: \$? = $ac_status" >&5
23223   (exit "$ac_status"); }; }; then
23224   ac_cv_func_vfork_works=yes
23225 else
23226   echo "$as_me: program exited with status $ac_status" >&5
23227 echo "$as_me: failed program was:" >&5
23228 cat "conftest.$ac_ext" >&5
23229 ac_cv_func_vfork_works=no
23230 fi
23231 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23232 fi
23233 fi
23234 echo "$as_me:23234: result: $ac_cv_func_vfork_works" >&5
23235 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23236
23237 fi;
23238 if test "x$ac_cv_func_fork_works" = xcross; then
23239   ac_cv_func_vfork_works=ac_cv_func_vfork
23240   { echo "$as_me:23240: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23241 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23242 fi
23243
23244 if test "x$ac_cv_func_vfork_works" = xyes; then
23245
23246 cat >>confdefs.h <<\EOF
23247 #define HAVE_WORKING_VFORK 1
23248 EOF
23249
23250 else
23251
23252 cat >>confdefs.h <<\EOF
23253 #define vfork fork
23254 EOF
23255
23256 fi
23257 if test "x$ac_cv_func_fork_works" = xyes; then
23258
23259 cat >>confdefs.h <<\EOF
23260 #define HAVE_WORKING_FORK 1
23261 EOF
23262
23263 fi
23264
23265 echo "$as_me:23265: checking if fopen accepts explicit binary mode" >&5
23266 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23267 if test "${cf_cv_fopen_bin_r+set}" = set; then
23268   echo $ECHO_N "(cached) $ECHO_C" >&6
23269 else
23270
23271         if test "$cross_compiling" = yes; then
23272   cf_cv_fopen_bin_r=unknown
23273 else
23274   cat >"conftest.$ac_ext" <<_ACEOF
23275 #line 23275 "configure"
23276 #include "confdefs.h"
23277
23278 #include <stdio.h>
23279 int main(void) {
23280         FILE *fp = fopen("conftest.tmp", "wb");
23281         int rc = 0;
23282         if (fp != 0) {
23283                 int p, q;
23284                 for (p = 0; p < 256; ++p) {
23285                         fputc(p, fp);
23286                 }
23287                 fclose(fp);
23288                 fp = fopen("conftest.tmp", "rb");
23289                 if (fp != 0) {
23290                         for (p = 0; p < 256; ++p) {
23291                                 q = fgetc(fp);
23292                                 if (q != p) {
23293                                         rc = 1;
23294                                         break;
23295                                 }
23296                         }
23297                 } else {
23298                         rc = 1;
23299                 }
23300         } else {
23301                 rc = 1;
23302         }
23303         ${cf_cv_main_return:-return} (rc);
23304 }
23305
23306 _ACEOF
23307 rm -f "conftest$ac_exeext"
23308 if { (eval echo "$as_me:23308: \"$ac_link\"") >&5
23309   (eval $ac_link) 2>&5
23310   ac_status=$?
23311   echo "$as_me:23311: \$? = $ac_status" >&5
23312   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23313   { (eval echo "$as_me:23313: \"$ac_try\"") >&5
23314   (eval $ac_try) 2>&5
23315   ac_status=$?
23316   echo "$as_me:23316: \$? = $ac_status" >&5
23317   (exit "$ac_status"); }; }; then
23318   cf_cv_fopen_bin_r=yes
23319 else
23320   echo "$as_me: program exited with status $ac_status" >&5
23321 echo "$as_me: failed program was:" >&5
23322 cat "conftest.$ac_ext" >&5
23323 cf_cv_fopen_bin_r=no
23324 fi
23325 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23326 fi
23327
23328 fi
23329 echo "$as_me:23329: result: $cf_cv_fopen_bin_r" >&5
23330 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23331 test "x$cf_cv_fopen_bin_r" != xno &&
23332 cat >>confdefs.h <<\EOF
23333 #define USE_FOPEN_BIN_R 1
23334 EOF
23335
23336 # special check for test/ditto.c
23337
23338 echo "$as_me:23338: checking for openpty in -lutil" >&5
23339 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23340 if test "${ac_cv_lib_util_openpty+set}" = set; then
23341   echo $ECHO_N "(cached) $ECHO_C" >&6
23342 else
23343   ac_check_lib_save_LIBS=$LIBS
23344 LIBS="-lutil  $LIBS"
23345 cat >"conftest.$ac_ext" <<_ACEOF
23346 #line 23346 "configure"
23347 #include "confdefs.h"
23348
23349 /* Override any gcc2 internal prototype to avoid an error.  */
23350 #ifdef __cplusplus
23351 extern "C"
23352 #endif
23353 /* We use char because int might match the return type of a gcc2
23354    builtin and then its argument prototype would still apply.  */
23355 char openpty ();
23356 int
23357 main (void)
23358 {
23359 openpty ();
23360   ;
23361   return 0;
23362 }
23363 _ACEOF
23364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23365 if { (eval echo "$as_me:23365: \"$ac_link\"") >&5
23366   (eval $ac_link) 2>&5
23367   ac_status=$?
23368   echo "$as_me:23368: \$? = $ac_status" >&5
23369   (exit "$ac_status"); } &&
23370          { ac_try='test -s "conftest$ac_exeext"'
23371   { (eval echo "$as_me:23371: \"$ac_try\"") >&5
23372   (eval $ac_try) 2>&5
23373   ac_status=$?
23374   echo "$as_me:23374: \$? = $ac_status" >&5
23375   (exit "$ac_status"); }; }; then
23376   ac_cv_lib_util_openpty=yes
23377 else
23378   echo "$as_me: failed program was:" >&5
23379 cat "conftest.$ac_ext" >&5
23380 ac_cv_lib_util_openpty=no
23381 fi
23382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23383 LIBS=$ac_check_lib_save_LIBS
23384 fi
23385 echo "$as_me:23385: result: $ac_cv_lib_util_openpty" >&5
23386 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23387 if test "$ac_cv_lib_util_openpty" = yes; then
23388   cf_cv_lib_util=yes
23389 else
23390   cf_cv_lib_util=no
23391 fi
23392
23393 echo "$as_me:23393: checking for openpty header" >&5
23394 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23395 if test "${cf_cv_func_openpty+set}" = set; then
23396   echo $ECHO_N "(cached) $ECHO_C" >&6
23397 else
23398
23399         cf_save_LIBS="$LIBS"
23400         test "$cf_cv_lib_util" = yes && {
23401 cf_add_libs="$LIBS"
23402 # reverse order
23403 cf_add_0lib=
23404 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23405 # filter duplicates
23406 for cf_add_1lib in $cf_add_0lib; do
23407         for cf_add_2lib in $cf_add_libs; do
23408                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23409                         cf_add_1lib=
23410                         break
23411                 fi
23412         done
23413         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23414 done
23415 LIBS="$cf_add_libs"
23416  }
23417         for cf_header in pty.h libutil.h util.h
23418         do
23419         cat >"conftest.$ac_ext" <<_ACEOF
23420 #line 23420 "configure"
23421 #include "confdefs.h"
23422
23423 #include <$cf_header>
23424
23425 int
23426 main (void)
23427 {
23428
23429         int x = openpty((int *)0, (int *)0, (char *)0,
23430                                    (struct termios *)0, (struct winsize *)0);
23431
23432   ;
23433   return 0;
23434 }
23435 _ACEOF
23436 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23437 if { (eval echo "$as_me:23437: \"$ac_link\"") >&5
23438   (eval $ac_link) 2>&5
23439   ac_status=$?
23440   echo "$as_me:23440: \$? = $ac_status" >&5
23441   (exit "$ac_status"); } &&
23442          { ac_try='test -s "conftest$ac_exeext"'
23443   { (eval echo "$as_me:23443: \"$ac_try\"") >&5
23444   (eval $ac_try) 2>&5
23445   ac_status=$?
23446   echo "$as_me:23446: \$? = $ac_status" >&5
23447   (exit "$ac_status"); }; }; then
23448
23449                 cf_cv_func_openpty=$cf_header
23450                 break
23451
23452 else
23453   echo "$as_me: failed program was:" >&5
23454 cat "conftest.$ac_ext" >&5
23455
23456                 cf_cv_func_openpty=no
23457
23458 fi
23459 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23460         done
23461         LIBS="$cf_save_LIBS"
23462
23463 fi
23464 echo "$as_me:23464: result: $cf_cv_func_openpty" >&5
23465 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23466
23467 if test "$cf_cv_func_openpty" != no ; then
23468
23469 cat >>confdefs.h <<EOF
23470 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23471 EOF
23472
23473 cat >>confdefs.h <<\EOF
23474 #define USE_XTERM_PTY 1
23475 EOF
23476
23477         if test "x$cf_cv_lib_util" = xyes ; then
23478
23479 cf_add_libs="$TEST_LIBS"
23480 # reverse order
23481 cf_add_0lib=
23482 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23483 # filter duplicates
23484 for cf_add_1lib in $cf_add_0lib; do
23485         for cf_add_2lib in $cf_add_libs; do
23486                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23487                         cf_add_1lib=
23488                         break
23489                 fi
23490         done
23491         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23492 done
23493 TEST_LIBS="$cf_add_libs"
23494
23495         fi
23496 fi
23497
23498 if test "$with_hashed_db" != no ; then
23499
23500 cat >>confdefs.h <<\EOF
23501 #define USE_HASHED_DB 1
23502 EOF
23503
23504 case $with_hashed_db in
23505 (yes|*able*)
23506         ;;
23507 (*)
23508         if test -d "$with_hashed_db" ; then
23509
23510 if test -n "$with_hashed_db/include" ; then
23511   for cf_add_incdir in $with_hashed_db/include
23512   do
23513         while test "$cf_add_incdir" != /usr/include
23514         do
23515           if test -d "$cf_add_incdir"
23516           then
23517                 cf_have_incdir=no
23518                 if test -n "$CFLAGS$CPPFLAGS" ; then
23519                   # a loop is needed to ensure we can add subdirs of existing dirs
23520                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23521                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23522                           cf_have_incdir=yes; break
23523                         fi
23524                   done
23525                 fi
23526
23527                 if test "$cf_have_incdir" = no ; then
23528                   if test "$cf_add_incdir" = /usr/local/include ; then
23529                         if test "$GCC" = yes
23530                         then
23531                           cf_save_CPPFLAGS=$CPPFLAGS
23532
23533         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23534         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23535
23536                           cat >"conftest.$ac_ext" <<_ACEOF
23537 #line 23537 "configure"
23538 #include "confdefs.h"
23539 #include <stdio.h>
23540 int
23541 main (void)
23542 {
23543 printf("Hello")
23544   ;
23545   return 0;
23546 }
23547 _ACEOF
23548 rm -f "conftest.$ac_objext"
23549 if { (eval echo "$as_me:23549: \"$ac_compile\"") >&5
23550   (eval $ac_compile) 2>&5
23551   ac_status=$?
23552   echo "$as_me:23552: \$? = $ac_status" >&5
23553   (exit "$ac_status"); } &&
23554          { ac_try='test -s "conftest.$ac_objext"'
23555   { (eval echo "$as_me:23555: \"$ac_try\"") >&5
23556   (eval $ac_try) 2>&5
23557   ac_status=$?
23558   echo "$as_me:23558: \$? = $ac_status" >&5
23559   (exit "$ac_status"); }; }; then
23560   :
23561 else
23562   echo "$as_me: failed program was:" >&5
23563 cat "conftest.$ac_ext" >&5
23564 cf_have_incdir=yes
23565 fi
23566 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23567                           CPPFLAGS=$cf_save_CPPFLAGS
23568                         fi
23569                   fi
23570                 fi
23571
23572                 if test "$cf_have_incdir" = no ; then
23573                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23574
23575 echo "${as_me:-configure}:23575: testing adding $cf_add_incdir to include-path ..." 1>&5
23576
23577                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23578
23579                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23580                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23581                   cf_add_incdir="$cf_top_incdir"
23582                 else
23583                   break
23584                 fi
23585           else
23586                 break
23587           fi
23588         done
23589   done
23590 fi
23591
23592 if test -n "$with_hashed_db/lib" ; then
23593         for cf_add_libdir in $with_hashed_db/lib
23594         do
23595                 if test "$cf_add_libdir" = /usr/lib ; then
23596                         :
23597                 elif test -d "$cf_add_libdir"
23598                 then
23599                         cf_have_libdir=no
23600                         if test -n "$LDFLAGS$LIBS" ; then
23601                                 # a loop is needed to ensure we can add subdirs of existing dirs
23602                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23603                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23604                                                 cf_have_libdir=yes; break
23605                                         fi
23606                                 done
23607                         fi
23608                         if test "$cf_have_libdir" = no ; then
23609                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23610
23611 echo "${as_me:-configure}:23611: testing adding $cf_add_libdir to library-path ..." 1>&5
23612
23613                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23614                         fi
23615                 fi
23616         done
23617 fi
23618
23619         else
23620                 case "$with_hashed_db" in
23621                 (./*|../*|/*)
23622                         { echo "$as_me:23622: WARNING: no such directory $with_hashed_db" >&5
23623 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23624                         ;;
23625                 (*)
23626
23627 cf_search=
23628
23629 test "x$prefix" != "xNONE" && \
23630 test -d "$prefix" && \
23631  {
23632         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23633         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23634         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23635         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23636         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23637         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23638 }
23639
23640 for cf_subdir_prefix in \
23641         /usr \
23642         /usr/local \
23643         /usr/pkg \
23644         /opt \
23645         /opt/local \
23646         $HOME
23647 do
23648
23649 test "x$cf_subdir_prefix" != "x$prefix" && \
23650 test -d "$cf_subdir_prefix" && \
23651 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23652         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23653         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23654         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23655         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23656         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23657         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"
23658 }
23659
23660 done
23661
23662         for cf_item in $cf_search
23663         do
23664                 case "$cf_item" in
23665                 (*/$with_hashed_db)
23666
23667 if test -n "$cf_item" ; then
23668   for cf_add_incdir in $cf_item
23669   do
23670         while test "$cf_add_incdir" != /usr/include
23671         do
23672           if test -d "$cf_add_incdir"
23673           then
23674                 cf_have_incdir=no
23675                 if test -n "$CFLAGS$CPPFLAGS" ; then
23676                   # a loop is needed to ensure we can add subdirs of existing dirs
23677                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23678                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23679                           cf_have_incdir=yes; break
23680                         fi
23681                   done
23682                 fi
23683
23684                 if test "$cf_have_incdir" = no ; then
23685                   if test "$cf_add_incdir" = /usr/local/include ; then
23686                         if test "$GCC" = yes
23687                         then
23688                           cf_save_CPPFLAGS=$CPPFLAGS
23689
23690         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23691         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23692
23693                           cat >"conftest.$ac_ext" <<_ACEOF
23694 #line 23694 "configure"
23695 #include "confdefs.h"
23696 #include <stdio.h>
23697 int
23698 main (void)
23699 {
23700 printf("Hello")
23701   ;
23702   return 0;
23703 }
23704 _ACEOF
23705 rm -f "conftest.$ac_objext"
23706 if { (eval echo "$as_me:23706: \"$ac_compile\"") >&5
23707   (eval $ac_compile) 2>&5
23708   ac_status=$?
23709   echo "$as_me:23709: \$? = $ac_status" >&5
23710   (exit "$ac_status"); } &&
23711          { ac_try='test -s "conftest.$ac_objext"'
23712   { (eval echo "$as_me:23712: \"$ac_try\"") >&5
23713   (eval $ac_try) 2>&5
23714   ac_status=$?
23715   echo "$as_me:23715: \$? = $ac_status" >&5
23716   (exit "$ac_status"); }; }; then
23717   :
23718 else
23719   echo "$as_me: failed program was:" >&5
23720 cat "conftest.$ac_ext" >&5
23721 cf_have_incdir=yes
23722 fi
23723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23724                           CPPFLAGS=$cf_save_CPPFLAGS
23725                         fi
23726                   fi
23727                 fi
23728
23729                 if test "$cf_have_incdir" = no ; then
23730                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23731
23732 echo "${as_me:-configure}:23732: testing adding $cf_add_incdir to include-path ..." 1>&5
23733
23734                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23735
23736                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23737                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23738                   cf_add_incdir="$cf_top_incdir"
23739                 else
23740                   break
23741                 fi
23742           else
23743                 break
23744           fi
23745         done
23746   done
23747 fi
23748
23749                         ;;
23750                 esac
23751         done
23752
23753 cf_search=
23754
23755 test "x$prefix" != "xNONE" && \
23756 test -d "$prefix" && \
23757  {
23758         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23759         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23760         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23761         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23762         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23763         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23764 }
23765
23766 for cf_subdir_prefix in \
23767         /usr \
23768         /usr/local \
23769         /usr/pkg \
23770         /opt \
23771         /opt/local \
23772         $HOME
23773 do
23774
23775 test "x$cf_subdir_prefix" != "x$prefix" && \
23776 test -d "$cf_subdir_prefix" && \
23777 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23778         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23779         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23780         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23781         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23782         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23783         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"
23784 }
23785
23786 done
23787
23788         for cf_item in $cf_search
23789         do
23790                 case "$cf_item" in
23791                 (*/$with_hashed_db)
23792
23793 if test -n "$cf_item" ; then
23794         for cf_add_libdir in $cf_item
23795         do
23796                 if test "$cf_add_libdir" = /usr/lib ; then
23797                         :
23798                 elif test -d "$cf_add_libdir"
23799                 then
23800                         cf_have_libdir=no
23801                         if test -n "$LDFLAGS$LIBS" ; then
23802                                 # a loop is needed to ensure we can add subdirs of existing dirs
23803                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23804                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23805                                                 cf_have_libdir=yes; break
23806                                         fi
23807                                 done
23808                         fi
23809                         if test "$cf_have_libdir" = no ; then
23810                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23811
23812 echo "${as_me:-configure}:23812: testing adding $cf_add_libdir to library-path ..." 1>&5
23813
23814                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23815                         fi
23816                 fi
23817         done
23818 fi
23819
23820                         ;;
23821                 esac
23822         done
23823
23824                         ;;
23825                 esac
23826         fi
23827 esac
23828
23829 echo "$as_me:23829: checking for db.h" >&5
23830 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23831 if test "${ac_cv_header_db_h+set}" = set; then
23832   echo $ECHO_N "(cached) $ECHO_C" >&6
23833 else
23834   cat >"conftest.$ac_ext" <<_ACEOF
23835 #line 23835 "configure"
23836 #include "confdefs.h"
23837 #include <db.h>
23838 _ACEOF
23839 if { (eval echo "$as_me:23839: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23840   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23841   ac_status=$?
23842   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23843   rm -f conftest.er1
23844   cat conftest.err >&5
23845   echo "$as_me:23845: \$? = $ac_status" >&5
23846   (exit "$ac_status"); } >/dev/null; then
23847   if test -s conftest.err; then
23848     ac_cpp_err=$ac_c_preproc_warn_flag
23849   else
23850     ac_cpp_err=
23851   fi
23852 else
23853   ac_cpp_err=yes
23854 fi
23855 if test -z "$ac_cpp_err"; then
23856   ac_cv_header_db_h=yes
23857 else
23858   echo "$as_me: failed program was:" >&5
23859   cat "conftest.$ac_ext" >&5
23860   ac_cv_header_db_h=no
23861 fi
23862 rm -f conftest.err "conftest.$ac_ext"
23863 fi
23864 echo "$as_me:23864: result: $ac_cv_header_db_h" >&5
23865 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23866 if test "$ac_cv_header_db_h" = yes; then
23867
23868 echo "$as_me:23868: checking for version of db" >&5
23869 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23870 if test "${cf_cv_hashed_db_version+set}" = set; then
23871   echo $ECHO_N "(cached) $ECHO_C" >&6
23872 else
23873
23874 cf_cv_hashed_db_version=unknown
23875
23876 for cf_db_version in 1 2 3 4 5 6
23877 do
23878
23879 echo "${as_me:-configure}:23879: testing checking for db version $cf_db_version ..." 1>&5
23880
23881         cat >"conftest.$ac_ext" <<_ACEOF
23882 #line 23882 "configure"
23883 #include "confdefs.h"
23884
23885 $ac_includes_default
23886 #include <db.h>
23887
23888 #ifdef DB_VERSION_MAJOR
23889         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23890 #if $cf_db_version == DB_VERSION_MAJOR
23891         /* ok */
23892 #else
23893         make an error
23894 #endif
23895 #else
23896 #if $cf_db_version == 1
23897         /* ok: assuming this is DB 1.8.5 */
23898 #else
23899         make an error
23900 #endif
23901 #endif
23902
23903 int
23904 main (void)
23905 {
23906 DBT *foo = 0
23907   ;
23908   return 0;
23909 }
23910 _ACEOF
23911 rm -f "conftest.$ac_objext"
23912 if { (eval echo "$as_me:23912: \"$ac_compile\"") >&5
23913   (eval $ac_compile) 2>&5
23914   ac_status=$?
23915   echo "$as_me:23915: \$? = $ac_status" >&5
23916   (exit "$ac_status"); } &&
23917          { ac_try='test -s "conftest.$ac_objext"'
23918   { (eval echo "$as_me:23918: \"$ac_try\"") >&5
23919   (eval $ac_try) 2>&5
23920   ac_status=$?
23921   echo "$as_me:23921: \$? = $ac_status" >&5
23922   (exit "$ac_status"); }; }; then
23923
23924         cf_cv_hashed_db_version=$cf_db_version
23925         break
23926
23927 else
23928   echo "$as_me: failed program was:" >&5
23929 cat "conftest.$ac_ext" >&5
23930 fi
23931 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23932 done
23933
23934 fi
23935 echo "$as_me:23935: result: $cf_cv_hashed_db_version" >&5
23936 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23937
23938 if test "$cf_cv_hashed_db_version" = unknown ; then
23939         { { echo "$as_me:23939: error: Cannot determine version of db" >&5
23940 echo "$as_me: error: Cannot determine version of db" >&2;}
23941    { (exit 1); exit 1; }; }
23942 else
23943
23944 echo "$as_me:23944: checking for db libraries" >&5
23945 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23946 if test "${cf_cv_hashed_db_libs+set}" = set; then
23947   echo $ECHO_N "(cached) $ECHO_C" >&6
23948 else
23949
23950 cf_cv_hashed_db_libs=unknown
23951 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23952 do
23953         cf_save_libs="$LIBS"
23954         if test -n "$cf_db_libs"; then
23955
23956 cf_add_libs="$LIBS"
23957 # reverse order
23958 cf_add_0lib=
23959 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23960 # filter duplicates
23961 for cf_add_1lib in $cf_add_0lib; do
23962         for cf_add_2lib in $cf_add_libs; do
23963                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23964                         cf_add_1lib=
23965                         break
23966                 fi
23967         done
23968         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23969 done
23970 LIBS="$cf_add_libs"
23971
23972         fi
23973
23974 echo "${as_me:-configure}:23974: testing checking for library $cf_db_libs ..." 1>&5
23975
23976         cat >"conftest.$ac_ext" <<_ACEOF
23977 #line 23977 "configure"
23978 #include "confdefs.h"
23979
23980 $ac_includes_default
23981 #include <db.h>
23982
23983 int
23984 main (void)
23985 {
23986
23987         char *path = "/tmp/foo";
23988 #ifdef DB_VERSION_MAJOR
23989 #if DB_VERSION_MAJOR >= 4
23990         DB *result = 0;
23991         db_create(&result, NULL, 0);
23992         result->open(result,
23993                 NULL,
23994                 path,
23995                 path,
23996                 DB_HASH,
23997                 DB_CREATE,
23998                 0644);
23999 #elif DB_VERSION_MAJOR >= 3
24000         DB *result = 0;
24001         db_create(&result, NULL, 0);
24002         result->open(result,
24003                 path,
24004                 path,
24005                 DB_HASH,
24006                 DB_CREATE,
24007                 0644);
24008 #elif DB_VERSION_MAJOR >= 2
24009         DB *result = 0;
24010         db_open(path,
24011                 DB_HASH,
24012                 DB_CREATE,
24013                 0644,
24014                 (DB_ENV *) 0,
24015                 (DB_INFO *) 0,
24016                 &result);
24017 #endif /* DB_VERSION_MAJOR */
24018 #else
24019         DB *result = dbopen(path,
24020                      2,
24021                      0644,
24022                      DB_HASH,
24023                      0);
24024 #endif
24025         ${cf_cv_main_return:-return}(result != 0)
24026
24027   ;
24028   return 0;
24029 }
24030 _ACEOF
24031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24032 if { (eval echo "$as_me:24032: \"$ac_link\"") >&5
24033   (eval $ac_link) 2>&5
24034   ac_status=$?
24035   echo "$as_me:24035: \$? = $ac_status" >&5
24036   (exit "$ac_status"); } &&
24037          { ac_try='test -s "conftest$ac_exeext"'
24038   { (eval echo "$as_me:24038: \"$ac_try\"") >&5
24039   (eval $ac_try) 2>&5
24040   ac_status=$?
24041   echo "$as_me:24041: \$? = $ac_status" >&5
24042   (exit "$ac_status"); }; }; then
24043
24044         if test -n "$cf_db_libs" ; then
24045                 cf_cv_hashed_db_libs=$cf_db_libs
24046         else
24047                 cf_cv_hashed_db_libs=default
24048         fi
24049         LIBS="$cf_save_libs"
24050         break
24051
24052 else
24053   echo "$as_me: failed program was:" >&5
24054 cat "conftest.$ac_ext" >&5
24055 fi
24056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24057         LIBS="$cf_save_libs"
24058 done
24059
24060 fi
24061 echo "$as_me:24061: result: $cf_cv_hashed_db_libs" >&5
24062 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24063
24064         if test "$cf_cv_hashed_db_libs" = unknown ; then
24065                 { { echo "$as_me:24065: error: Cannot determine library for db" >&5
24066 echo "$as_me: error: Cannot determine library for db" >&2;}
24067    { (exit 1); exit 1; }; }
24068         elif test "$cf_cv_hashed_db_libs" != default ; then
24069
24070 cf_add_libs="$LIBS"
24071 # reverse order
24072 cf_add_0lib=
24073 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24074 # filter duplicates
24075 for cf_add_1lib in $cf_add_0lib; do
24076         for cf_add_2lib in $cf_add_libs; do
24077                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24078                         cf_add_1lib=
24079                         break
24080                 fi
24081         done
24082         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24083 done
24084 LIBS="$cf_add_libs"
24085
24086         fi
24087 fi
24088
24089 else
24090
24091         { { echo "$as_me:24091: error: Cannot find db.h" >&5
24092 echo "$as_me: error: Cannot find db.h" >&2;}
24093    { (exit 1); exit 1; }; }
24094
24095 fi
24096
24097 fi
24098
24099 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24100         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24101         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24102 fi
24103
24104 # Just in case, check if the C compiler has a bool type.
24105
24106 echo "$as_me:24106: checking if we should include stdbool.h" >&5
24107 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24108
24109 if test "${cf_cv_header_stdbool_h+set}" = set; then
24110   echo $ECHO_N "(cached) $ECHO_C" >&6
24111 else
24112
24113         cat >"conftest.$ac_ext" <<_ACEOF
24114 #line 24114 "configure"
24115 #include "confdefs.h"
24116
24117 int
24118 main (void)
24119 {
24120 bool foo = false
24121   ;
24122   return 0;
24123 }
24124 _ACEOF
24125 rm -f "conftest.$ac_objext"
24126 if { (eval echo "$as_me:24126: \"$ac_compile\"") >&5
24127   (eval $ac_compile) 2>&5
24128   ac_status=$?
24129   echo "$as_me:24129: \$? = $ac_status" >&5
24130   (exit "$ac_status"); } &&
24131          { ac_try='test -s "conftest.$ac_objext"'
24132   { (eval echo "$as_me:24132: \"$ac_try\"") >&5
24133   (eval $ac_try) 2>&5
24134   ac_status=$?
24135   echo "$as_me:24135: \$? = $ac_status" >&5
24136   (exit "$ac_status"); }; }; then
24137   cf_cv_header_stdbool_h=0
24138 else
24139   echo "$as_me: failed program was:" >&5
24140 cat "conftest.$ac_ext" >&5
24141 cat >"conftest.$ac_ext" <<_ACEOF
24142 #line 24142 "configure"
24143 #include "confdefs.h"
24144
24145 #ifndef __BEOS__
24146 #include <stdbool.h>
24147 #endif
24148
24149 int
24150 main (void)
24151 {
24152 bool foo = false
24153   ;
24154   return 0;
24155 }
24156 _ACEOF
24157 rm -f "conftest.$ac_objext"
24158 if { (eval echo "$as_me:24158: \"$ac_compile\"") >&5
24159   (eval $ac_compile) 2>&5
24160   ac_status=$?
24161   echo "$as_me:24161: \$? = $ac_status" >&5
24162   (exit "$ac_status"); } &&
24163          { ac_try='test -s "conftest.$ac_objext"'
24164   { (eval echo "$as_me:24164: \"$ac_try\"") >&5
24165   (eval $ac_try) 2>&5
24166   ac_status=$?
24167   echo "$as_me:24167: \$? = $ac_status" >&5
24168   (exit "$ac_status"); }; }; then
24169   cf_cv_header_stdbool_h=1
24170 else
24171   echo "$as_me: failed program was:" >&5
24172 cat "conftest.$ac_ext" >&5
24173 cf_cv_header_stdbool_h=0
24174 fi
24175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24176 fi
24177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24178 fi
24179
24180 if test "$cf_cv_header_stdbool_h" = 1
24181 then    echo "$as_me:24181: result: yes" >&5
24182 echo "${ECHO_T}yes" >&6
24183 else    echo "$as_me:24183: result: no" >&5
24184 echo "${ECHO_T}no" >&6
24185 fi
24186
24187 echo "$as_me:24187: checking for builtin bool type" >&5
24188 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24189
24190 if test "${cf_cv_cc_bool_type+set}" = set; then
24191   echo $ECHO_N "(cached) $ECHO_C" >&6
24192 else
24193
24194         cat >"conftest.$ac_ext" <<_ACEOF
24195 #line 24195 "configure"
24196 #include "confdefs.h"
24197
24198 #include <stdio.h>
24199 #include <sys/types.h>
24200
24201 int
24202 main (void)
24203 {
24204 bool x = false
24205   ;
24206   return 0;
24207 }
24208 _ACEOF
24209 rm -f "conftest.$ac_objext"
24210 if { (eval echo "$as_me:24210: \"$ac_compile\"") >&5
24211   (eval $ac_compile) 2>&5
24212   ac_status=$?
24213   echo "$as_me:24213: \$? = $ac_status" >&5
24214   (exit "$ac_status"); } &&
24215          { ac_try='test -s "conftest.$ac_objext"'
24216   { (eval echo "$as_me:24216: \"$ac_try\"") >&5
24217   (eval $ac_try) 2>&5
24218   ac_status=$?
24219   echo "$as_me:24219: \$? = $ac_status" >&5
24220   (exit "$ac_status"); }; }; then
24221   cf_cv_cc_bool_type=1
24222 else
24223   echo "$as_me: failed program was:" >&5
24224 cat "conftest.$ac_ext" >&5
24225 cf_cv_cc_bool_type=0
24226 fi
24227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24228
24229 fi
24230
24231 if test "$cf_cv_cc_bool_type" = 1
24232 then    echo "$as_me:24232: result: yes" >&5
24233 echo "${ECHO_T}yes" >&6
24234 else    echo "$as_me:24234: result: no" >&5
24235 echo "${ECHO_T}no" >&6
24236 fi
24237
24238 # Check for C++ compiler characteristics (and ensure that it's there!)
24239 if test -n "$CXX" ; then
24240         ac_ext=cc
24241 ac_cpp='$CXXCPP $CPPFLAGS'
24242 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24243 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24244 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24245 ac_main_return="return"
24246
24247 if test -n "$GXX" ; then
24248
24249         cf_save="$LIBS"
24250         LIBS="$LIBS $CXXLIBS"
24251         echo "$as_me:24251: checking if we already have C++ library" >&5
24252 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24253         cat >"conftest.$ac_ext" <<_ACEOF
24254 #line 24254 "configure"
24255 #include "confdefs.h"
24256
24257                         #include <iostream>
24258 int
24259 main (void)
24260 {
24261
24262                         std::cout << "Hello World!" << std::endl;
24263   ;
24264   return 0;
24265 }
24266 _ACEOF
24267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24268 if { (eval echo "$as_me:24268: \"$ac_link\"") >&5
24269   (eval $ac_link) 2>&5
24270   ac_status=$?
24271   echo "$as_me:24271: \$? = $ac_status" >&5
24272   (exit "$ac_status"); } &&
24273          { ac_try='test -s "conftest$ac_exeext"'
24274   { (eval echo "$as_me:24274: \"$ac_try\"") >&5
24275   (eval $ac_try) 2>&5
24276   ac_status=$?
24277   echo "$as_me:24277: \$? = $ac_status" >&5
24278   (exit "$ac_status"); }; }; then
24279   cf_have_libstdcpp=yes
24280 else
24281   echo "$as_me: failed program was:" >&5
24282 cat "conftest.$ac_ext" >&5
24283 cf_have_libstdcpp=no
24284 fi
24285 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24286         echo "$as_me:24286: result: $cf_have_libstdcpp" >&5
24287 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24288         LIBS="$cf_save"
24289
24290         if test "$cf_have_libstdcpp" != yes
24291         then
24292                 case "$cf_cv_system_name" in
24293                 (os2*)
24294                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24295                                 cf_stdcpp_libname=stdcpp
24296                         else
24297                                 cf_stdcpp_libname=stdc++
24298                         fi
24299                         ;;
24300                 (*)
24301                         cf_stdcpp_libname=stdc++
24302                         ;;
24303                 esac
24304
24305                 echo "$as_me:24305: checking for library $cf_stdcpp_libname" >&5
24306 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24307 if test "${cf_cv_libstdcpp+set}" = set; then
24308   echo $ECHO_N "(cached) $ECHO_C" >&6
24309 else
24310
24311                         cf_save="$LIBS"
24312                         LIBS="$LIBS $CXXLIBS"
24313
24314 cf_add_libs="$LIBS"
24315 # reverse order
24316 cf_add_0lib=
24317 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24318 # filter duplicates
24319 for cf_add_1lib in $cf_add_0lib; do
24320         for cf_add_2lib in $cf_add_libs; do
24321                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24322                         cf_add_1lib=
24323                         break
24324                 fi
24325         done
24326         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24327 done
24328 LIBS="$cf_add_libs"
24329
24330                 cat >"conftest.$ac_ext" <<_ACEOF
24331 #line 24331 "configure"
24332 #include "confdefs.h"
24333
24334                                 #include <iostream>
24335 int
24336 main (void)
24337 {
24338
24339                                 std::cout << "Hello World!" << std::endl;
24340   ;
24341   return 0;
24342 }
24343 _ACEOF
24344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24345 if { (eval echo "$as_me:24345: \"$ac_link\"") >&5
24346   (eval $ac_link) 2>&5
24347   ac_status=$?
24348   echo "$as_me:24348: \$? = $ac_status" >&5
24349   (exit "$ac_status"); } &&
24350          { ac_try='test -s "conftest$ac_exeext"'
24351   { (eval echo "$as_me:24351: \"$ac_try\"") >&5
24352   (eval $ac_try) 2>&5
24353   ac_status=$?
24354   echo "$as_me:24354: \$? = $ac_status" >&5
24355   (exit "$ac_status"); }; }; then
24356   cf_cv_libstdcpp=yes
24357 else
24358   echo "$as_me: failed program was:" >&5
24359 cat "conftest.$ac_ext" >&5
24360 cf_cv_libstdcpp=no
24361 fi
24362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24363                         LIBS="$cf_save"
24364
24365 fi
24366 echo "$as_me:24366: result: $cf_cv_libstdcpp" >&5
24367 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24368                 test "$cf_cv_libstdcpp" = yes && {
24369 cf_add_libs="$CXXLIBS"
24370 # reverse order
24371 cf_add_0lib=
24372 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24373 # filter duplicates
24374 for cf_add_1lib in $cf_add_0lib; do
24375         for cf_add_2lib in $cf_add_libs; do
24376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24377                         cf_add_1lib=
24378                         break
24379                 fi
24380         done
24381         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24382 done
24383 CXXLIBS="$cf_add_libs"
24384  }
24385         fi
24386 fi
24387
24388         echo "$as_me:24388: checking whether $CXX understands -c and -o together" >&5
24389 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24390 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24391   echo $ECHO_N "(cached) $ECHO_C" >&6
24392 else
24393
24394 cat > conftest.$ac_ext <<CF_EOF
24395 int main(void)
24396 {
24397         ${cf_cv_main_return:-return}(0);
24398 }
24399 CF_EOF
24400 # We do the test twice because some compilers refuse to overwrite an
24401 # existing .o file with -o, though they will create one.
24402 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24403 if { (eval echo "$as_me:24403: \"$ac_try\"") >&5
24404   (eval $ac_try) 2>&5
24405   ac_status=$?
24406   echo "$as_me:24406: \$? = $ac_status" >&5
24407   (exit "$ac_status"); } &&
24408   test -f conftest2.$ac_objext && { (eval echo "$as_me:24408: \"$ac_try\"") >&5
24409   (eval $ac_try) 2>&5
24410   ac_status=$?
24411   echo "$as_me:24411: \$? = $ac_status" >&5
24412   (exit "$ac_status"); };
24413 then
24414   eval cf_cv_prog_CXX_c_o=yes
24415 else
24416   eval cf_cv_prog_CXX_c_o=no
24417 fi
24418 rm -rf ./conftest*
24419
24420 fi
24421 if test "$cf_cv_prog_CXX_c_o" = yes; then
24422   echo "$as_me:24422: result: yes" >&5
24423 echo "${ECHO_T}yes" >&6
24424 else
24425   echo "$as_me:24425: result: no" >&5
24426 echo "${ECHO_T}no" >&6
24427 fi
24428
24429         case "$GXX_VERSION" in
24430         (1.*|2.[0-6]*|[1-9][0-9].*)
24431                 cf_cxx_library=yes
24432                 ;;
24433         (*-2.7*|2.7*)
24434
24435 cf_cxx_library=unknown
24436 case "$cf_cv_system_name" in
24437 (os2*)
24438         cf_gpp_libname=gpp
24439         ;;
24440 (*)
24441         cf_gpp_libname=g++
24442         ;;
24443 esac
24444 if test "$GXX" = yes; then
24445         echo "$as_me:24445: checking for lib$cf_gpp_libname" >&5
24446 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24447         cf_save="$LIBS"
24448
24449 cf_add_libs="$LIBS"
24450 # reverse order
24451 cf_add_0lib=
24452 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24453 # filter duplicates
24454 for cf_add_1lib in $cf_add_0lib; do
24455         for cf_add_2lib in $cf_add_libs; do
24456                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24457                         cf_add_1lib=
24458                         break
24459                 fi
24460         done
24461         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24462 done
24463 LIBS="$cf_add_libs"
24464
24465         cat >"conftest.$ac_ext" <<_ACEOF
24466 #line 24466 "configure"
24467 #include "confdefs.h"
24468
24469 #include <$cf_gpp_libname/builtin.h>
24470
24471 int
24472 main (void)
24473 {
24474 two_arg_error_handler_t foo2 = lib_error_handler
24475   ;
24476   return 0;
24477 }
24478 _ACEOF
24479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24480 if { (eval echo "$as_me:24480: \"$ac_link\"") >&5
24481   (eval $ac_link) 2>&5
24482   ac_status=$?
24483   echo "$as_me:24483: \$? = $ac_status" >&5
24484   (exit "$ac_status"); } &&
24485          { ac_try='test -s "conftest$ac_exeext"'
24486   { (eval echo "$as_me:24486: \"$ac_try\"") >&5
24487   (eval $ac_try) 2>&5
24488   ac_status=$?
24489   echo "$as_me:24489: \$? = $ac_status" >&5
24490   (exit "$ac_status"); }; }; then
24491   cf_cxx_library=yes
24492
24493 cf_add_libs="$CXXLIBS"
24494 # reverse order
24495 cf_add_0lib=
24496 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24497 # filter duplicates
24498 for cf_add_1lib in $cf_add_0lib; do
24499         for cf_add_2lib in $cf_add_libs; do
24500                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24501                         cf_add_1lib=
24502                         break
24503                 fi
24504         done
24505         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24506 done
24507 CXXLIBS="$cf_add_libs"
24508
24509          if test "$cf_gpp_libname" = cpp ; then
24510
24511 cat >>confdefs.h <<\EOF
24512 #define HAVE_GPP_BUILTIN_H 1
24513 EOF
24514
24515          else
24516
24517 cat >>confdefs.h <<\EOF
24518 #define HAVE_GXX_BUILTIN_H 1
24519 EOF
24520
24521          fi
24522 else
24523   echo "$as_me: failed program was:" >&5
24524 cat "conftest.$ac_ext" >&5
24525 cat >"conftest.$ac_ext" <<_ACEOF
24526 #line 24526 "configure"
24527 #include "confdefs.h"
24528
24529 #include <builtin.h>
24530
24531 int
24532 main (void)
24533 {
24534 two_arg_error_handler_t foo2 = lib_error_handler
24535   ;
24536   return 0;
24537 }
24538 _ACEOF
24539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24540 if { (eval echo "$as_me:24540: \"$ac_link\"") >&5
24541   (eval $ac_link) 2>&5
24542   ac_status=$?
24543   echo "$as_me:24543: \$? = $ac_status" >&5
24544   (exit "$ac_status"); } &&
24545          { ac_try='test -s "conftest$ac_exeext"'
24546   { (eval echo "$as_me:24546: \"$ac_try\"") >&5
24547   (eval $ac_try) 2>&5
24548   ac_status=$?
24549   echo "$as_me:24549: \$? = $ac_status" >&5
24550   (exit "$ac_status"); }; }; then
24551   cf_cxx_library=yes
24552
24553 cf_add_libs="$CXXLIBS"
24554 # reverse order
24555 cf_add_0lib=
24556 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24557 # filter duplicates
24558 for cf_add_1lib in $cf_add_0lib; do
24559         for cf_add_2lib in $cf_add_libs; do
24560                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24561                         cf_add_1lib=
24562                         break
24563                 fi
24564         done
24565         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24566 done
24567 CXXLIBS="$cf_add_libs"
24568
24569 cat >>confdefs.h <<\EOF
24570 #define HAVE_BUILTIN_H 1
24571 EOF
24572
24573 else
24574   echo "$as_me: failed program was:" >&5
24575 cat "conftest.$ac_ext" >&5
24576 cf_cxx_library=no
24577 fi
24578 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24579 fi
24580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24581         LIBS="$cf_save"
24582         echo "$as_me:24582: result: $cf_cxx_library" >&5
24583 echo "${ECHO_T}$cf_cxx_library" >&6
24584 fi
24585
24586                 ;;
24587         (*)
24588                 cf_cxx_library=no
24589                 ;;
24590         esac
24591
24592         ac_ext=cc
24593 ac_cpp='$CXXCPP $CPPFLAGS'
24594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24595 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24597 ac_main_return="return"
24598 echo "$as_me:24598: checking how to run the C++ preprocessor" >&5
24599 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24600 if test -z "$CXXCPP"; then
24601   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24602   echo $ECHO_N "(cached) $ECHO_C" >&6
24603 else
24604       # Double quotes because CXXCPP needs to be expanded
24605     for CXXCPP in "$CXX -E" "/lib/cpp"
24606     do
24607       ac_preproc_ok=false
24608 for ac_cxx_preproc_warn_flag in '' yes
24609 do
24610   # Use a header file that comes with gcc, so configuring glibc
24611   # with a fresh cross-compiler works.
24612   # On the NeXT, cc -E runs the code through the compiler's parser,
24613   # not just through cpp. "Syntax error" is here to catch this case.
24614   cat >"conftest.$ac_ext" <<_ACEOF
24615 #line 24615 "configure"
24616 #include "confdefs.h"
24617 #include <assert.h>
24618                      Syntax error
24619 _ACEOF
24620 if { (eval echo "$as_me:24620: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24621   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24622   ac_status=$?
24623   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24624   rm -f conftest.er1
24625   cat conftest.err >&5
24626   echo "$as_me:24626: \$? = $ac_status" >&5
24627   (exit "$ac_status"); } >/dev/null; then
24628   if test -s conftest.err; then
24629     ac_cpp_err=$ac_cxx_preproc_warn_flag
24630   else
24631     ac_cpp_err=
24632   fi
24633 else
24634   ac_cpp_err=yes
24635 fi
24636 if test -z "$ac_cpp_err"; then
24637   :
24638 else
24639   echo "$as_me: failed program was:" >&5
24640   cat "conftest.$ac_ext" >&5
24641   # Broken: fails on valid input.
24642 continue
24643 fi
24644 rm -f conftest.err "conftest.$ac_ext"
24645
24646   # OK, works on sane cases.  Now check whether non-existent headers
24647   # can be detected and how.
24648   cat >"conftest.$ac_ext" <<_ACEOF
24649 #line 24649 "configure"
24650 #include "confdefs.h"
24651 #include <ac_nonexistent.h>
24652 _ACEOF
24653 if { (eval echo "$as_me:24653: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24654   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24655   ac_status=$?
24656   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24657   rm -f conftest.er1
24658   cat conftest.err >&5
24659   echo "$as_me:24659: \$? = $ac_status" >&5
24660   (exit "$ac_status"); } >/dev/null; then
24661   if test -s conftest.err; then
24662     ac_cpp_err=$ac_cxx_preproc_warn_flag
24663   else
24664     ac_cpp_err=
24665   fi
24666 else
24667   ac_cpp_err=yes
24668 fi
24669 if test -z "$ac_cpp_err"; then
24670   # Broken: success on invalid input.
24671 continue
24672 else
24673   echo "$as_me: failed program was:" >&5
24674   cat "conftest.$ac_ext" >&5
24675   # Passes both tests.
24676 ac_preproc_ok=:
24677 break
24678 fi
24679 rm -f conftest.err "conftest.$ac_ext"
24680
24681 done
24682 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24683 rm -f conftest.err "conftest.$ac_ext"
24684 if $ac_preproc_ok; then
24685   break
24686 fi
24687
24688     done
24689     ac_cv_prog_CXXCPP=$CXXCPP
24690
24691 fi
24692   CXXCPP=$ac_cv_prog_CXXCPP
24693 else
24694   ac_cv_prog_CXXCPP=$CXXCPP
24695 fi
24696 echo "$as_me:24696: result: $CXXCPP" >&5
24697 echo "${ECHO_T}$CXXCPP" >&6
24698 ac_preproc_ok=false
24699 for ac_cxx_preproc_warn_flag in '' yes
24700 do
24701   # Use a header file that comes with gcc, so configuring glibc
24702   # with a fresh cross-compiler works.
24703   # On the NeXT, cc -E runs the code through the compiler's parser,
24704   # not just through cpp. "Syntax error" is here to catch this case.
24705   cat >"conftest.$ac_ext" <<_ACEOF
24706 #line 24706 "configure"
24707 #include "confdefs.h"
24708 #include <assert.h>
24709                      Syntax error
24710 _ACEOF
24711 if { (eval echo "$as_me:24711: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24712   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24713   ac_status=$?
24714   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24715   rm -f conftest.er1
24716   cat conftest.err >&5
24717   echo "$as_me:24717: \$? = $ac_status" >&5
24718   (exit "$ac_status"); } >/dev/null; then
24719   if test -s conftest.err; then
24720     ac_cpp_err=$ac_cxx_preproc_warn_flag
24721   else
24722     ac_cpp_err=
24723   fi
24724 else
24725   ac_cpp_err=yes
24726 fi
24727 if test -z "$ac_cpp_err"; then
24728   :
24729 else
24730   echo "$as_me: failed program was:" >&5
24731   cat "conftest.$ac_ext" >&5
24732   # Broken: fails on valid input.
24733 continue
24734 fi
24735 rm -f conftest.err "conftest.$ac_ext"
24736
24737   # OK, works on sane cases.  Now check whether non-existent headers
24738   # can be detected and how.
24739   cat >"conftest.$ac_ext" <<_ACEOF
24740 #line 24740 "configure"
24741 #include "confdefs.h"
24742 #include <ac_nonexistent.h>
24743 _ACEOF
24744 if { (eval echo "$as_me:24744: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24745   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24746   ac_status=$?
24747   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24748   rm -f conftest.er1
24749   cat conftest.err >&5
24750   echo "$as_me:24750: \$? = $ac_status" >&5
24751   (exit "$ac_status"); } >/dev/null; then
24752   if test -s conftest.err; then
24753     ac_cpp_err=$ac_cxx_preproc_warn_flag
24754   else
24755     ac_cpp_err=
24756   fi
24757 else
24758   ac_cpp_err=yes
24759 fi
24760 if test -z "$ac_cpp_err"; then
24761   # Broken: success on invalid input.
24762 continue
24763 else
24764   echo "$as_me: failed program was:" >&5
24765   cat "conftest.$ac_ext" >&5
24766   # Passes both tests.
24767 ac_preproc_ok=:
24768 break
24769 fi
24770 rm -f conftest.err "conftest.$ac_ext"
24771
24772 done
24773 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24774 rm -f conftest.err "conftest.$ac_ext"
24775 if $ac_preproc_ok; then
24776   :
24777 else
24778   { { echo "$as_me:24778: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24779 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24780    { (exit 1); exit 1; }; }
24781 fi
24782
24783 ac_ext=cc
24784 ac_cpp='$CXXCPP $CPPFLAGS'
24785 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24786 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24787 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24788 ac_main_return="return"
24789
24790 for ac_header in typeinfo
24791 do
24792 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24793 echo "$as_me:24793: checking for $ac_header" >&5
24794 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24795 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24796   echo $ECHO_N "(cached) $ECHO_C" >&6
24797 else
24798   cat >"conftest.$ac_ext" <<_ACEOF
24799 #line 24799 "configure"
24800 #include "confdefs.h"
24801 #include <$ac_header>
24802 _ACEOF
24803 if { (eval echo "$as_me:24803: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24804   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24805   ac_status=$?
24806   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24807   rm -f conftest.er1
24808   cat conftest.err >&5
24809   echo "$as_me:24809: \$? = $ac_status" >&5
24810   (exit "$ac_status"); } >/dev/null; then
24811   if test -s conftest.err; then
24812     ac_cpp_err=$ac_cxx_preproc_warn_flag
24813   else
24814     ac_cpp_err=
24815   fi
24816 else
24817   ac_cpp_err=yes
24818 fi
24819 if test -z "$ac_cpp_err"; then
24820   eval "$as_ac_Header=yes"
24821 else
24822   echo "$as_me: failed program was:" >&5
24823   cat "conftest.$ac_ext" >&5
24824   eval "$as_ac_Header=no"
24825 fi
24826 rm -f conftest.err "conftest.$ac_ext"
24827 fi
24828 echo "$as_me:24828: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24829 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24830 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24831   cat >>confdefs.h <<EOF
24832 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24833 EOF
24834
24835 fi
24836 done
24837
24838 for ac_header in iostream
24839 do
24840 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24841 echo "$as_me:24841: checking for $ac_header" >&5
24842 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24843 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24844   echo $ECHO_N "(cached) $ECHO_C" >&6
24845 else
24846   cat >"conftest.$ac_ext" <<_ACEOF
24847 #line 24847 "configure"
24848 #include "confdefs.h"
24849 #include <$ac_header>
24850 _ACEOF
24851 if { (eval echo "$as_me:24851: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24852   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24853   ac_status=$?
24854   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24855   rm -f conftest.er1
24856   cat conftest.err >&5
24857   echo "$as_me:24857: \$? = $ac_status" >&5
24858   (exit "$ac_status"); } >/dev/null; then
24859   if test -s conftest.err; then
24860     ac_cpp_err=$ac_cxx_preproc_warn_flag
24861   else
24862     ac_cpp_err=
24863   fi
24864 else
24865   ac_cpp_err=yes
24866 fi
24867 if test -z "$ac_cpp_err"; then
24868   eval "$as_ac_Header=yes"
24869 else
24870   echo "$as_me: failed program was:" >&5
24871   cat "conftest.$ac_ext" >&5
24872   eval "$as_ac_Header=no"
24873 fi
24874 rm -f conftest.err "conftest.$ac_ext"
24875 fi
24876 echo "$as_me:24876: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24877 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24878 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24879   cat >>confdefs.h <<EOF
24880 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24881 EOF
24882
24883 fi
24884 done
24885
24886 if test x"$ac_cv_header_iostream" = xyes ; then
24887         echo "$as_me:24887: checking if iostream uses std-namespace" >&5
24888 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24889         cat >"conftest.$ac_ext" <<_ACEOF
24890 #line 24890 "configure"
24891 #include "confdefs.h"
24892
24893 #include <iostream>
24894 using std::endl;
24895 using std::cerr;
24896 int
24897 main (void)
24898 {
24899
24900 cerr << "testing" << endl;
24901
24902   ;
24903   return 0;
24904 }
24905 _ACEOF
24906 rm -f "conftest.$ac_objext"
24907 if { (eval echo "$as_me:24907: \"$ac_compile\"") >&5
24908   (eval $ac_compile) 2>&5
24909   ac_status=$?
24910   echo "$as_me:24910: \$? = $ac_status" >&5
24911   (exit "$ac_status"); } &&
24912          { ac_try='test -s "conftest.$ac_objext"'
24913   { (eval echo "$as_me:24913: \"$ac_try\"") >&5
24914   (eval $ac_try) 2>&5
24915   ac_status=$?
24916   echo "$as_me:24916: \$? = $ac_status" >&5
24917   (exit "$ac_status"); }; }; then
24918   cf_iostream_namespace=yes
24919 else
24920   echo "$as_me: failed program was:" >&5
24921 cat "conftest.$ac_ext" >&5
24922 cf_iostream_namespace=no
24923 fi
24924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24925         echo "$as_me:24925: result: $cf_iostream_namespace" >&5
24926 echo "${ECHO_T}$cf_iostream_namespace" >&6
24927         if test "$cf_iostream_namespace" = yes ; then
24928
24929 cat >>confdefs.h <<\EOF
24930 #define IOSTREAM_NAMESPACE 1
24931 EOF
24932
24933         fi
24934 fi
24935
24936 echo "$as_me:24936: checking if we should include stdbool.h" >&5
24937 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24938
24939 if test "${cf_cv_header_stdbool_h+set}" = set; then
24940   echo $ECHO_N "(cached) $ECHO_C" >&6
24941 else
24942
24943         cat >"conftest.$ac_ext" <<_ACEOF
24944 #line 24944 "configure"
24945 #include "confdefs.h"
24946
24947 int
24948 main (void)
24949 {
24950 bool foo = false
24951   ;
24952   return 0;
24953 }
24954 _ACEOF
24955 rm -f "conftest.$ac_objext"
24956 if { (eval echo "$as_me:24956: \"$ac_compile\"") >&5
24957   (eval $ac_compile) 2>&5
24958   ac_status=$?
24959   echo "$as_me:24959: \$? = $ac_status" >&5
24960   (exit "$ac_status"); } &&
24961          { ac_try='test -s "conftest.$ac_objext"'
24962   { (eval echo "$as_me:24962: \"$ac_try\"") >&5
24963   (eval $ac_try) 2>&5
24964   ac_status=$?
24965   echo "$as_me:24965: \$? = $ac_status" >&5
24966   (exit "$ac_status"); }; }; then
24967   cf_cv_header_stdbool_h=0
24968 else
24969   echo "$as_me: failed program was:" >&5
24970 cat "conftest.$ac_ext" >&5
24971 cat >"conftest.$ac_ext" <<_ACEOF
24972 #line 24972 "configure"
24973 #include "confdefs.h"
24974
24975 #ifndef __BEOS__
24976 #include <stdbool.h>
24977 #endif
24978
24979 int
24980 main (void)
24981 {
24982 bool foo = false
24983   ;
24984   return 0;
24985 }
24986 _ACEOF
24987 rm -f "conftest.$ac_objext"
24988 if { (eval echo "$as_me:24988: \"$ac_compile\"") >&5
24989   (eval $ac_compile) 2>&5
24990   ac_status=$?
24991   echo "$as_me:24991: \$? = $ac_status" >&5
24992   (exit "$ac_status"); } &&
24993          { ac_try='test -s "conftest.$ac_objext"'
24994   { (eval echo "$as_me:24994: \"$ac_try\"") >&5
24995   (eval $ac_try) 2>&5
24996   ac_status=$?
24997   echo "$as_me:24997: \$? = $ac_status" >&5
24998   (exit "$ac_status"); }; }; then
24999   cf_cv_header_stdbool_h=1
25000 else
25001   echo "$as_me: failed program was:" >&5
25002 cat "conftest.$ac_ext" >&5
25003 cf_cv_header_stdbool_h=0
25004 fi
25005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25006 fi
25007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25008 fi
25009
25010 if test "$cf_cv_header_stdbool_h" = 1
25011 then    echo "$as_me:25011: result: yes" >&5
25012 echo "${ECHO_T}yes" >&6
25013 else    echo "$as_me:25013: result: no" >&5
25014 echo "${ECHO_T}no" >&6
25015 fi
25016
25017 echo "$as_me:25017: checking for builtin bool type" >&5
25018 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25019
25020 if test "${cf_cv_builtin_bool+set}" = set; then
25021   echo $ECHO_N "(cached) $ECHO_C" >&6
25022 else
25023
25024         cat >"conftest.$ac_ext" <<_ACEOF
25025 #line 25025 "configure"
25026 #include "confdefs.h"
25027
25028 #include <stdio.h>
25029 #include <sys/types.h>
25030
25031 int
25032 main (void)
25033 {
25034 bool x = false
25035   ;
25036   return 0;
25037 }
25038 _ACEOF
25039 rm -f "conftest.$ac_objext"
25040 if { (eval echo "$as_me:25040: \"$ac_compile\"") >&5
25041   (eval $ac_compile) 2>&5
25042   ac_status=$?
25043   echo "$as_me:25043: \$? = $ac_status" >&5
25044   (exit "$ac_status"); } &&
25045          { ac_try='test -s "conftest.$ac_objext"'
25046   { (eval echo "$as_me:25046: \"$ac_try\"") >&5
25047   (eval $ac_try) 2>&5
25048   ac_status=$?
25049   echo "$as_me:25049: \$? = $ac_status" >&5
25050   (exit "$ac_status"); }; }; then
25051   cf_cv_builtin_bool=1
25052 else
25053   echo "$as_me: failed program was:" >&5
25054 cat "conftest.$ac_ext" >&5
25055 cf_cv_builtin_bool=0
25056 fi
25057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25058
25059 fi
25060
25061 if test "$cf_cv_builtin_bool" = 1
25062 then    echo "$as_me:25062: result: yes" >&5
25063 echo "${ECHO_T}yes" >&6
25064 else    echo "$as_me:25064: result: no" >&5
25065 echo "${ECHO_T}no" >&6
25066 fi
25067
25068 echo "$as_me:25068: checking for bool" >&5
25069 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25070 if test "${ac_cv_type_bool+set}" = set; then
25071   echo $ECHO_N "(cached) $ECHO_C" >&6
25072 else
25073   cat >"conftest.$ac_ext" <<_ACEOF
25074 #line 25074 "configure"
25075 #include "confdefs.h"
25076
25077 #include <stdlib.h>
25078 #include <stdio.h>
25079
25080 #if defined(__cplusplus)
25081
25082 #ifdef HAVE_GXX_BUILTIN_H
25083 #include <g++/builtin.h>
25084 #elif HAVE_GPP_BUILTIN_H
25085 #include <gpp/builtin.h>
25086 #elif HAVE_BUILTIN_H
25087 #include <builtin.h>
25088 #endif
25089
25090 #else
25091
25092 #if $cf_cv_header_stdbool_h
25093 #include <stdbool.h>
25094 #endif
25095
25096 #endif
25097
25098 int
25099 main (void)
25100 {
25101 if ((bool *) 0)
25102   return 0;
25103 if (sizeof (bool))
25104   return 0;
25105   ;
25106   return 0;
25107 }
25108 _ACEOF
25109 rm -f "conftest.$ac_objext"
25110 if { (eval echo "$as_me:25110: \"$ac_compile\"") >&5
25111   (eval $ac_compile) 2>&5
25112   ac_status=$?
25113   echo "$as_me:25113: \$? = $ac_status" >&5
25114   (exit "$ac_status"); } &&
25115          { ac_try='test -s "conftest.$ac_objext"'
25116   { (eval echo "$as_me:25116: \"$ac_try\"") >&5
25117   (eval $ac_try) 2>&5
25118   ac_status=$?
25119   echo "$as_me:25119: \$? = $ac_status" >&5
25120   (exit "$ac_status"); }; }; then
25121   ac_cv_type_bool=yes
25122 else
25123   echo "$as_me: failed program was:" >&5
25124 cat "conftest.$ac_ext" >&5
25125 ac_cv_type_bool=no
25126 fi
25127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25128 fi
25129 echo "$as_me:25129: result: $ac_cv_type_bool" >&5
25130 echo "${ECHO_T}$ac_cv_type_bool" >&6
25131
25132 echo "$as_me:25132: checking size of bool" >&5
25133 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25134 if test "${ac_cv_sizeof_bool+set}" = set; then
25135   echo $ECHO_N "(cached) $ECHO_C" >&6
25136 else
25137   if test "$ac_cv_type_bool" = yes; then
25138   if test "$cross_compiling" = yes; then
25139   # Depending upon the size, compute the lo and hi bounds.
25140 cat >"conftest.$ac_ext" <<_ACEOF
25141 #line 25141 "configure"
25142 #include "confdefs.h"
25143
25144 #include <stdlib.h>
25145 #include <stdio.h>
25146
25147 #if defined(__cplusplus)
25148
25149 #ifdef HAVE_GXX_BUILTIN_H
25150 #include <g++/builtin.h>
25151 #elif HAVE_GPP_BUILTIN_H
25152 #include <gpp/builtin.h>
25153 #elif HAVE_BUILTIN_H
25154 #include <builtin.h>
25155 #endif
25156
25157 #else
25158
25159 #if $cf_cv_header_stdbool_h
25160 #include <stdbool.h>
25161 #endif
25162
25163 #endif
25164
25165 int
25166 main (void)
25167 {
25168 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25169   ;
25170   return 0;
25171 }
25172 _ACEOF
25173 rm -f "conftest.$ac_objext"
25174 if { (eval echo "$as_me:25174: \"$ac_compile\"") >&5
25175   (eval $ac_compile) 2>&5
25176   ac_status=$?
25177   echo "$as_me:25177: \$? = $ac_status" >&5
25178   (exit "$ac_status"); } &&
25179          { ac_try='test -s "conftest.$ac_objext"'
25180   { (eval echo "$as_me:25180: \"$ac_try\"") >&5
25181   (eval $ac_try) 2>&5
25182   ac_status=$?
25183   echo "$as_me:25183: \$? = $ac_status" >&5
25184   (exit "$ac_status"); }; }; then
25185   ac_lo=0 ac_mid=0
25186   while :; do
25187     cat >"conftest.$ac_ext" <<_ACEOF
25188 #line 25188 "configure"
25189 #include "confdefs.h"
25190
25191 #include <stdlib.h>
25192 #include <stdio.h>
25193
25194 #if defined(__cplusplus)
25195
25196 #ifdef HAVE_GXX_BUILTIN_H
25197 #include <g++/builtin.h>
25198 #elif HAVE_GPP_BUILTIN_H
25199 #include <gpp/builtin.h>
25200 #elif HAVE_BUILTIN_H
25201 #include <builtin.h>
25202 #endif
25203
25204 #else
25205
25206 #if $cf_cv_header_stdbool_h
25207 #include <stdbool.h>
25208 #endif
25209
25210 #endif
25211
25212 int
25213 main (void)
25214 {
25215 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25216   ;
25217   return 0;
25218 }
25219 _ACEOF
25220 rm -f "conftest.$ac_objext"
25221 if { (eval echo "$as_me:25221: \"$ac_compile\"") >&5
25222   (eval $ac_compile) 2>&5
25223   ac_status=$?
25224   echo "$as_me:25224: \$? = $ac_status" >&5
25225   (exit "$ac_status"); } &&
25226          { ac_try='test -s "conftest.$ac_objext"'
25227   { (eval echo "$as_me:25227: \"$ac_try\"") >&5
25228   (eval $ac_try) 2>&5
25229   ac_status=$?
25230   echo "$as_me:25230: \$? = $ac_status" >&5
25231   (exit "$ac_status"); }; }; then
25232   ac_hi=$ac_mid; break
25233 else
25234   echo "$as_me: failed program was:" >&5
25235 cat "conftest.$ac_ext" >&5
25236 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25237 fi
25238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25239   done
25240 else
25241   echo "$as_me: failed program was:" >&5
25242 cat "conftest.$ac_ext" >&5
25243 ac_hi=-1 ac_mid=-1
25244   while :; do
25245     cat >"conftest.$ac_ext" <<_ACEOF
25246 #line 25246 "configure"
25247 #include "confdefs.h"
25248
25249 #include <stdlib.h>
25250 #include <stdio.h>
25251
25252 #if defined(__cplusplus)
25253
25254 #ifdef HAVE_GXX_BUILTIN_H
25255 #include <g++/builtin.h>
25256 #elif HAVE_GPP_BUILTIN_H
25257 #include <gpp/builtin.h>
25258 #elif HAVE_BUILTIN_H
25259 #include <builtin.h>
25260 #endif
25261
25262 #else
25263
25264 #if $cf_cv_header_stdbool_h
25265 #include <stdbool.h>
25266 #endif
25267
25268 #endif
25269
25270 int
25271 main (void)
25272 {
25273 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25274   ;
25275   return 0;
25276 }
25277 _ACEOF
25278 rm -f "conftest.$ac_objext"
25279 if { (eval echo "$as_me:25279: \"$ac_compile\"") >&5
25280   (eval $ac_compile) 2>&5
25281   ac_status=$?
25282   echo "$as_me:25282: \$? = $ac_status" >&5
25283   (exit "$ac_status"); } &&
25284          { ac_try='test -s "conftest.$ac_objext"'
25285   { (eval echo "$as_me:25285: \"$ac_try\"") >&5
25286   (eval $ac_try) 2>&5
25287   ac_status=$?
25288   echo "$as_me:25288: \$? = $ac_status" >&5
25289   (exit "$ac_status"); }; }; then
25290   ac_lo=$ac_mid; break
25291 else
25292   echo "$as_me: failed program was:" >&5
25293 cat "conftest.$ac_ext" >&5
25294 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25295 fi
25296 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25297   done
25298 fi
25299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25300 # Binary search between lo and hi bounds.
25301 while test "x$ac_lo" != "x$ac_hi"; do
25302   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25303   cat >"conftest.$ac_ext" <<_ACEOF
25304 #line 25304 "configure"
25305 #include "confdefs.h"
25306
25307 #include <stdlib.h>
25308 #include <stdio.h>
25309
25310 #if defined(__cplusplus)
25311
25312 #ifdef HAVE_GXX_BUILTIN_H
25313 #include <g++/builtin.h>
25314 #elif HAVE_GPP_BUILTIN_H
25315 #include <gpp/builtin.h>
25316 #elif HAVE_BUILTIN_H
25317 #include <builtin.h>
25318 #endif
25319
25320 #else
25321
25322 #if $cf_cv_header_stdbool_h
25323 #include <stdbool.h>
25324 #endif
25325
25326 #endif
25327
25328 int
25329 main (void)
25330 {
25331 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25332   ;
25333   return 0;
25334 }
25335 _ACEOF
25336 rm -f "conftest.$ac_objext"
25337 if { (eval echo "$as_me:25337: \"$ac_compile\"") >&5
25338   (eval $ac_compile) 2>&5
25339   ac_status=$?
25340   echo "$as_me:25340: \$? = $ac_status" >&5
25341   (exit "$ac_status"); } &&
25342          { ac_try='test -s "conftest.$ac_objext"'
25343   { (eval echo "$as_me:25343: \"$ac_try\"") >&5
25344   (eval $ac_try) 2>&5
25345   ac_status=$?
25346   echo "$as_me:25346: \$? = $ac_status" >&5
25347   (exit "$ac_status"); }; }; then
25348   ac_hi=$ac_mid
25349 else
25350   echo "$as_me: failed program was:" >&5
25351 cat "conftest.$ac_ext" >&5
25352 ac_lo=`expr "$ac_mid" + 1`
25353 fi
25354 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25355 done
25356 ac_cv_sizeof_bool=$ac_lo
25357 else
25358   if test "$cross_compiling" = yes; then
25359   { { echo "$as_me:25359: error: cannot run test program while cross compiling" >&5
25360 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25361    { (exit 1); exit 1; }; }
25362 else
25363   cat >"conftest.$ac_ext" <<_ACEOF
25364 #line 25364 "configure"
25365 #include "confdefs.h"
25366
25367 #include <stdlib.h>
25368 #include <stdio.h>
25369
25370 #if defined(__cplusplus)
25371
25372 #ifdef HAVE_GXX_BUILTIN_H
25373 #include <g++/builtin.h>
25374 #elif HAVE_GPP_BUILTIN_H
25375 #include <gpp/builtin.h>
25376 #elif HAVE_BUILTIN_H
25377 #include <builtin.h>
25378 #endif
25379
25380 #else
25381
25382 #if $cf_cv_header_stdbool_h
25383 #include <stdbool.h>
25384 #endif
25385
25386 #endif
25387
25388 int
25389 main (void)
25390 {
25391 FILE *f = fopen ("conftest.val", "w");
25392 if (!f)
25393   $ac_main_return (1);
25394 fprintf (f, "%d", (sizeof (bool)));
25395 fclose (f);
25396   ;
25397   return 0;
25398 }
25399 _ACEOF
25400 rm -f "conftest$ac_exeext"
25401 if { (eval echo "$as_me:25401: \"$ac_link\"") >&5
25402   (eval $ac_link) 2>&5
25403   ac_status=$?
25404   echo "$as_me:25404: \$? = $ac_status" >&5
25405   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25406   { (eval echo "$as_me:25406: \"$ac_try\"") >&5
25407   (eval $ac_try) 2>&5
25408   ac_status=$?
25409   echo "$as_me:25409: \$? = $ac_status" >&5
25410   (exit "$ac_status"); }; }; then
25411   ac_cv_sizeof_bool=`cat conftest.val`
25412 else
25413   echo "$as_me: program exited with status $ac_status" >&5
25414 echo "$as_me: failed program was:" >&5
25415 cat "conftest.$ac_ext" >&5
25416 fi
25417 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25418 fi
25419 fi
25420 rm -f conftest.val
25421 else
25422   ac_cv_sizeof_bool=0
25423 fi
25424 fi
25425 echo "$as_me:25425: result: $ac_cv_sizeof_bool" >&5
25426 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25427 cat >>confdefs.h <<EOF
25428 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25429 EOF
25430
25431 echo "$as_me:25431: checking for type of bool" >&5
25432 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25433 if test "${cf_cv_type_of_bool+set}" = set; then
25434   echo $ECHO_N "(cached) $ECHO_C" >&6
25435 else
25436
25437         rm -f cf_test.out
25438         if test "$cross_compiling" = yes; then
25439
25440                 case x$ac_cv_sizeof_bool in
25441                 (x1) cf_cv_type_of_bool="unsigned char";;
25442                 (x2) cf_cv_type_of_bool="unsigned short";;
25443                 (x4) cf_cv_type_of_bool="unsigned int";;
25444                 (x8) cf_cv_type_of_bool="unsigned long";;
25445                 (*)  cf_cv_type_of_bool=unknown;;
25446                 esac
25447
25448 else
25449   cat >"conftest.$ac_ext" <<_ACEOF
25450 #line 25450 "configure"
25451 #include "confdefs.h"
25452
25453 #include <stdlib.h>
25454 #include <stdio.h>
25455
25456 #if defined(__cplusplus)
25457
25458 #ifdef HAVE_GXX_BUILTIN_H
25459 #include <g++/builtin.h>
25460 #elif HAVE_GPP_BUILTIN_H
25461 #include <gpp/builtin.h>
25462 #elif HAVE_BUILTIN_H
25463 #include <builtin.h>
25464 #endif
25465
25466 #else
25467
25468 #if $cf_cv_header_stdbool_h
25469 #include <stdbool.h>
25470 #endif
25471
25472 #endif
25473
25474 int main(void)
25475 {
25476         FILE *fp = fopen("cf_test.out", "w");
25477         if (fp != 0) {
25478                 bool x = true;
25479                 if ((bool)(-x) >= 0)
25480                         fputs("unsigned ", fp);
25481                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25482                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25483                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25484                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25485                 fclose(fp);
25486         }
25487         ${cf_cv_main_return:-return}(0);
25488 }
25489
25490 _ACEOF
25491 rm -f "conftest$ac_exeext"
25492 if { (eval echo "$as_me:25492: \"$ac_link\"") >&5
25493   (eval $ac_link) 2>&5
25494   ac_status=$?
25495   echo "$as_me:25495: \$? = $ac_status" >&5
25496   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25497   { (eval echo "$as_me:25497: \"$ac_try\"") >&5
25498   (eval $ac_try) 2>&5
25499   ac_status=$?
25500   echo "$as_me:25500: \$? = $ac_status" >&5
25501   (exit "$ac_status"); }; }; then
25502   cf_cv_type_of_bool=`cat cf_test.out`
25503                  if test -z "$cf_cv_type_of_bool"; then
25504                    cf_cv_type_of_bool=unknown
25505                  fi
25506 else
25507   echo "$as_me: program exited with status $ac_status" >&5
25508 echo "$as_me: failed program was:" >&5
25509 cat "conftest.$ac_ext" >&5
25510 cf_cv_type_of_bool=unknown
25511 fi
25512 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25513 fi
25514         rm -f cf_test.out
25515
25516 fi
25517 echo "$as_me:25517: result: $cf_cv_type_of_bool" >&5
25518 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25519
25520 if test "$cf_cv_type_of_bool" = unknown ; then
25521         case .$NCURSES_BOOL in
25522         (.auto|.) NCURSES_BOOL=unsigned;;
25523         esac
25524         { echo "$as_me:25524: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25525 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25526         cf_cv_type_of_bool=$NCURSES_BOOL
25527 fi
25528
25529 echo "$as_me:25529: checking for special defines needed for etip.h" >&5
25530 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25531 cf_save_CXXFLAGS="$CXXFLAGS"
25532 cf_result="none"
25533
25534 # etip.h includes ncurses.h which includes ncurses_dll.h
25535 # But ncurses_dll.h is generated - fix here.
25536 test -d include || mkdir include
25537 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
25538
25539 for cf_math in "" MATH_H
25540 do
25541 for cf_excp in "" MATH_EXCEPTION
25542 do
25543         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25544         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25545         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25546 cat >"conftest.$ac_ext" <<_ACEOF
25547 #line 25547 "configure"
25548 #include "confdefs.h"
25549
25550 #include <etip.h.in>
25551
25552 int
25553 main (void)
25554 {
25555
25556   ;
25557   return 0;
25558 }
25559 _ACEOF
25560 rm -f "conftest.$ac_objext"
25561 if { (eval echo "$as_me:25561: \"$ac_compile\"") >&5
25562   (eval $ac_compile) 2>&5
25563   ac_status=$?
25564   echo "$as_me:25564: \$? = $ac_status" >&5
25565   (exit "$ac_status"); } &&
25566          { ac_try='test -s "conftest.$ac_objext"'
25567   { (eval echo "$as_me:25567: \"$ac_try\"") >&5
25568   (eval $ac_try) 2>&5
25569   ac_status=$?
25570   echo "$as_me:25570: \$? = $ac_status" >&5
25571   (exit "$ac_status"); }; }; then
25572
25573         test -n "$cf_math" && cat >>confdefs.h <<EOF
25574 #define ETIP_NEEDS_${cf_math} 1
25575 EOF
25576
25577         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25578 #define ETIP_NEEDS_${cf_excp} 1
25579 EOF
25580
25581         cf_result="$cf_math $cf_excp"
25582         break 2
25583
25584 else
25585   echo "$as_me: failed program was:" >&5
25586 cat "conftest.$ac_ext" >&5
25587 fi
25588 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25589 done
25590 done
25591 echo "$as_me:25591: result: $cf_result" >&5
25592 echo "${ECHO_T}$cf_result" >&6
25593 CXXFLAGS="$cf_save_CXXFLAGS"
25594
25595 if test -n "$CXX"; then
25596 echo "$as_me:25596: checking if $CXX accepts parameter initialization" >&5
25597 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25598 if test "${cf_cv_cpp_param_init+set}" = set; then
25599   echo $ECHO_N "(cached) $ECHO_C" >&6
25600 else
25601
25602         ac_ext=cc
25603 ac_cpp='$CXXCPP $CPPFLAGS'
25604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25605 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25607 ac_main_return="return"
25608
25609         if test "$cross_compiling" = yes; then
25610   cf_cv_cpp_param_init=unknown
25611 else
25612   cat >"conftest.$ac_ext" <<_ACEOF
25613 #line 25613 "configure"
25614 #include "confdefs.h"
25615
25616 class TEST {
25617 private:
25618         int value;
25619 public:
25620         TEST(int x = 1);
25621         ~TEST();
25622 };
25623
25624 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25625 {
25626         value = x;
25627 }
25628 int main(void) { }
25629
25630 _ACEOF
25631 rm -f "conftest$ac_exeext"
25632 if { (eval echo "$as_me:25632: \"$ac_link\"") >&5
25633   (eval $ac_link) 2>&5
25634   ac_status=$?
25635   echo "$as_me:25635: \$? = $ac_status" >&5
25636   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25637   { (eval echo "$as_me:25637: \"$ac_try\"") >&5
25638   (eval $ac_try) 2>&5
25639   ac_status=$?
25640   echo "$as_me:25640: \$? = $ac_status" >&5
25641   (exit "$ac_status"); }; }; then
25642   cf_cv_cpp_param_init=yes
25643 else
25644   echo "$as_me: program exited with status $ac_status" >&5
25645 echo "$as_me: failed program was:" >&5
25646 cat "conftest.$ac_ext" >&5
25647 cf_cv_cpp_param_init=no
25648 fi
25649 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25650 fi
25651         ac_ext=cc
25652 ac_cpp='$CXXCPP $CPPFLAGS'
25653 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25654 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25655 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25656 ac_main_return="return"
25657
25658 fi
25659 echo "$as_me:25659: result: $cf_cv_cpp_param_init" >&5
25660 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25661 fi
25662 test "$cf_cv_cpp_param_init" = yes &&
25663 cat >>confdefs.h <<\EOF
25664 #define CPP_HAS_PARAM_INIT 1
25665 EOF
25666
25667 if test -n "$CXX"; then
25668
25669 echo "$as_me:25669: checking if $CXX accepts static_cast" >&5
25670 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25671 if test "${cf_cv_cpp_static_cast+set}" = set; then
25672   echo $ECHO_N "(cached) $ECHO_C" >&6
25673 else
25674
25675         ac_ext=cc
25676 ac_cpp='$CXXCPP $CPPFLAGS'
25677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25678 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25680 ac_main_return="return"
25681
25682         cat >"conftest.$ac_ext" <<_ACEOF
25683 #line 25683 "configure"
25684 #include "confdefs.h"
25685
25686 class NCursesPanel
25687 {
25688 public:
25689   NCursesPanel(int nlines,
25690                int ncols,
25691                int begin_y = 0,
25692                int begin_x = 0)
25693   {
25694   }
25695   NCursesPanel();
25696   ~NCursesPanel();
25697 };
25698
25699 template<class T> class NCursesUserPanel : public NCursesPanel
25700 {
25701 public:
25702   NCursesUserPanel (int nlines,
25703                     int ncols,
25704                     int begin_y = 0,
25705                     int begin_x = 0,
25706                     const T* p_UserData = static_cast<T*>(0))
25707     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25708   {
25709   };
25710   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25711   {
25712   };
25713
25714   virtual ~NCursesUserPanel() {};
25715 };
25716
25717 int
25718 main (void)
25719 {
25720
25721         const char* p_UserData = static_cast<char*>(0)
25722   ;
25723   return 0;
25724 }
25725 _ACEOF
25726 rm -f "conftest.$ac_objext"
25727 if { (eval echo "$as_me:25727: \"$ac_compile\"") >&5
25728   (eval $ac_compile) 2>&5
25729   ac_status=$?
25730   echo "$as_me:25730: \$? = $ac_status" >&5
25731   (exit "$ac_status"); } &&
25732          { ac_try='test -s "conftest.$ac_objext"'
25733   { (eval echo "$as_me:25733: \"$ac_try\"") >&5
25734   (eval $ac_try) 2>&5
25735   ac_status=$?
25736   echo "$as_me:25736: \$? = $ac_status" >&5
25737   (exit "$ac_status"); }; }; then
25738   cf_cv_cpp_static_cast=yes
25739 else
25740   echo "$as_me: failed program was:" >&5
25741 cat "conftest.$ac_ext" >&5
25742 cf_cv_cpp_static_cast=no
25743 fi
25744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25745
25746         ac_ext=cc
25747 ac_cpp='$CXXCPP $CPPFLAGS'
25748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25749 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25751 ac_main_return="return"
25752
25753 fi
25754 echo "$as_me:25754: result: $cf_cv_cpp_static_cast" >&5
25755 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25756
25757 fi
25758
25759 test "$cf_cv_cpp_static_cast" = yes &&
25760 cat >>confdefs.h <<\EOF
25761 #define CPP_HAS_STATIC_CAST 1
25762 EOF
25763
25764         CXX_AR='$(AR)'
25765         CXX_ARFLAGS='$(ARFLAGS)'
25766         case "$cf_cv_system_name" in
25767         (irix*)
25768             if test "$GXX" != yes ; then
25769                 CXX_AR='$(CXX)'
25770                 CXX_ARFLAGS='-ar -o'
25771             fi
25772             ;;
25773         (sco3.2v5*)
25774             CXXLDFLAGS="-u main"
25775             ;;
25776         (solaris2*)
25777             if test "$GXX" != yes ; then
25778                 CXX_AR='$(CXX)'
25779                 CXX_ARFLAGS='-xar -o'
25780             fi
25781             ;;
25782         esac
25783
25784 else
25785         cf_cxx_library=no
25786         cf_cv_builtin_bool=1
25787
25788         # Just because we are not configuring against C++ right now does not
25789         # mean that a user will not want to use C++.  Some distributors disable
25790         # the C++ portion of this configuration as a shortcut (or just to avoid
25791         # compiling the demo in the c++ directory).  So we need a reasonable
25792         # default for the 'bool' type.
25793         #
25794         # Caveat: since the storage of the bool type is not standardized, it
25795         # may change.
25796
25797         if test "$NCURSES_BOOL" != auto ; then
25798                 cf_cv_type_of_bool=$NCURSES_BOOL
25799                 cf_cv_header_stdbool_h=0
25800         else
25801                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25802
25803 echo "$as_me:25803: checking for bool" >&5
25804 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25805 if test "${ac_cv_type_bool+set}" = set; then
25806   echo $ECHO_N "(cached) $ECHO_C" >&6
25807 else
25808   cat >"conftest.$ac_ext" <<_ACEOF
25809 #line 25809 "configure"
25810 #include "confdefs.h"
25811
25812 #include <stdlib.h>
25813 #include <stdio.h>
25814
25815 #if defined(__cplusplus)
25816
25817 #ifdef HAVE_GXX_BUILTIN_H
25818 #include <g++/builtin.h>
25819 #elif HAVE_GPP_BUILTIN_H
25820 #include <gpp/builtin.h>
25821 #elif HAVE_BUILTIN_H
25822 #include <builtin.h>
25823 #endif
25824
25825 #else
25826
25827 #if $cf_cv_header_stdbool_h
25828 #include <stdbool.h>
25829 #endif
25830
25831 #endif
25832
25833 int
25834 main (void)
25835 {
25836 if ((bool *) 0)
25837   return 0;
25838 if (sizeof (bool))
25839   return 0;
25840   ;
25841   return 0;
25842 }
25843 _ACEOF
25844 rm -f "conftest.$ac_objext"
25845 if { (eval echo "$as_me:25845: \"$ac_compile\"") >&5
25846   (eval $ac_compile) 2>&5
25847   ac_status=$?
25848   echo "$as_me:25848: \$? = $ac_status" >&5
25849   (exit "$ac_status"); } &&
25850          { ac_try='test -s "conftest.$ac_objext"'
25851   { (eval echo "$as_me:25851: \"$ac_try\"") >&5
25852   (eval $ac_try) 2>&5
25853   ac_status=$?
25854   echo "$as_me:25854: \$? = $ac_status" >&5
25855   (exit "$ac_status"); }; }; then
25856   ac_cv_type_bool=yes
25857 else
25858   echo "$as_me: failed program was:" >&5
25859 cat "conftest.$ac_ext" >&5
25860 ac_cv_type_bool=no
25861 fi
25862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25863 fi
25864 echo "$as_me:25864: result: $ac_cv_type_bool" >&5
25865 echo "${ECHO_T}$ac_cv_type_bool" >&6
25866
25867 echo "$as_me:25867: checking size of bool" >&5
25868 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25869 if test "${ac_cv_sizeof_bool+set}" = set; then
25870   echo $ECHO_N "(cached) $ECHO_C" >&6
25871 else
25872   if test "$ac_cv_type_bool" = yes; then
25873   if test "$cross_compiling" = yes; then
25874   # Depending upon the size, compute the lo and hi bounds.
25875 cat >"conftest.$ac_ext" <<_ACEOF
25876 #line 25876 "configure"
25877 #include "confdefs.h"
25878
25879 #include <stdlib.h>
25880 #include <stdio.h>
25881
25882 #if defined(__cplusplus)
25883
25884 #ifdef HAVE_GXX_BUILTIN_H
25885 #include <g++/builtin.h>
25886 #elif HAVE_GPP_BUILTIN_H
25887 #include <gpp/builtin.h>
25888 #elif HAVE_BUILTIN_H
25889 #include <builtin.h>
25890 #endif
25891
25892 #else
25893
25894 #if $cf_cv_header_stdbool_h
25895 #include <stdbool.h>
25896 #endif
25897
25898 #endif
25899
25900 int
25901 main (void)
25902 {
25903 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25904   ;
25905   return 0;
25906 }
25907 _ACEOF
25908 rm -f "conftest.$ac_objext"
25909 if { (eval echo "$as_me:25909: \"$ac_compile\"") >&5
25910   (eval $ac_compile) 2>&5
25911   ac_status=$?
25912   echo "$as_me:25912: \$? = $ac_status" >&5
25913   (exit "$ac_status"); } &&
25914          { ac_try='test -s "conftest.$ac_objext"'
25915   { (eval echo "$as_me:25915: \"$ac_try\"") >&5
25916   (eval $ac_try) 2>&5
25917   ac_status=$?
25918   echo "$as_me:25918: \$? = $ac_status" >&5
25919   (exit "$ac_status"); }; }; then
25920   ac_lo=0 ac_mid=0
25921   while :; do
25922     cat >"conftest.$ac_ext" <<_ACEOF
25923 #line 25923 "configure"
25924 #include "confdefs.h"
25925
25926 #include <stdlib.h>
25927 #include <stdio.h>
25928
25929 #if defined(__cplusplus)
25930
25931 #ifdef HAVE_GXX_BUILTIN_H
25932 #include <g++/builtin.h>
25933 #elif HAVE_GPP_BUILTIN_H
25934 #include <gpp/builtin.h>
25935 #elif HAVE_BUILTIN_H
25936 #include <builtin.h>
25937 #endif
25938
25939 #else
25940
25941 #if $cf_cv_header_stdbool_h
25942 #include <stdbool.h>
25943 #endif
25944
25945 #endif
25946
25947 int
25948 main (void)
25949 {
25950 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25951   ;
25952   return 0;
25953 }
25954 _ACEOF
25955 rm -f "conftest.$ac_objext"
25956 if { (eval echo "$as_me:25956: \"$ac_compile\"") >&5
25957   (eval $ac_compile) 2>&5
25958   ac_status=$?
25959   echo "$as_me:25959: \$? = $ac_status" >&5
25960   (exit "$ac_status"); } &&
25961          { ac_try='test -s "conftest.$ac_objext"'
25962   { (eval echo "$as_me:25962: \"$ac_try\"") >&5
25963   (eval $ac_try) 2>&5
25964   ac_status=$?
25965   echo "$as_me:25965: \$? = $ac_status" >&5
25966   (exit "$ac_status"); }; }; then
25967   ac_hi=$ac_mid; break
25968 else
25969   echo "$as_me: failed program was:" >&5
25970 cat "conftest.$ac_ext" >&5
25971 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25972 fi
25973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25974   done
25975 else
25976   echo "$as_me: failed program was:" >&5
25977 cat "conftest.$ac_ext" >&5
25978 ac_hi=-1 ac_mid=-1
25979   while :; do
25980     cat >"conftest.$ac_ext" <<_ACEOF
25981 #line 25981 "configure"
25982 #include "confdefs.h"
25983
25984 #include <stdlib.h>
25985 #include <stdio.h>
25986
25987 #if defined(__cplusplus)
25988
25989 #ifdef HAVE_GXX_BUILTIN_H
25990 #include <g++/builtin.h>
25991 #elif HAVE_GPP_BUILTIN_H
25992 #include <gpp/builtin.h>
25993 #elif HAVE_BUILTIN_H
25994 #include <builtin.h>
25995 #endif
25996
25997 #else
25998
25999 #if $cf_cv_header_stdbool_h
26000 #include <stdbool.h>
26001 #endif
26002
26003 #endif
26004
26005 int
26006 main (void)
26007 {
26008 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26009   ;
26010   return 0;
26011 }
26012 _ACEOF
26013 rm -f "conftest.$ac_objext"
26014 if { (eval echo "$as_me:26014: \"$ac_compile\"") >&5
26015   (eval $ac_compile) 2>&5
26016   ac_status=$?
26017   echo "$as_me:26017: \$? = $ac_status" >&5
26018   (exit "$ac_status"); } &&
26019          { ac_try='test -s "conftest.$ac_objext"'
26020   { (eval echo "$as_me:26020: \"$ac_try\"") >&5
26021   (eval $ac_try) 2>&5
26022   ac_status=$?
26023   echo "$as_me:26023: \$? = $ac_status" >&5
26024   (exit "$ac_status"); }; }; then
26025   ac_lo=$ac_mid; break
26026 else
26027   echo "$as_me: failed program was:" >&5
26028 cat "conftest.$ac_ext" >&5
26029 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26030 fi
26031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26032   done
26033 fi
26034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26035 # Binary search between lo and hi bounds.
26036 while test "x$ac_lo" != "x$ac_hi"; do
26037   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26038   cat >"conftest.$ac_ext" <<_ACEOF
26039 #line 26039 "configure"
26040 #include "confdefs.h"
26041
26042 #include <stdlib.h>
26043 #include <stdio.h>
26044
26045 #if defined(__cplusplus)
26046
26047 #ifdef HAVE_GXX_BUILTIN_H
26048 #include <g++/builtin.h>
26049 #elif HAVE_GPP_BUILTIN_H
26050 #include <gpp/builtin.h>
26051 #elif HAVE_BUILTIN_H
26052 #include <builtin.h>
26053 #endif
26054
26055 #else
26056
26057 #if $cf_cv_header_stdbool_h
26058 #include <stdbool.h>
26059 #endif
26060
26061 #endif
26062
26063 int
26064 main (void)
26065 {
26066 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26067   ;
26068   return 0;
26069 }
26070 _ACEOF
26071 rm -f "conftest.$ac_objext"
26072 if { (eval echo "$as_me:26072: \"$ac_compile\"") >&5
26073   (eval $ac_compile) 2>&5
26074   ac_status=$?
26075   echo "$as_me:26075: \$? = $ac_status" >&5
26076   (exit "$ac_status"); } &&
26077          { ac_try='test -s "conftest.$ac_objext"'
26078   { (eval echo "$as_me:26078: \"$ac_try\"") >&5
26079   (eval $ac_try) 2>&5
26080   ac_status=$?
26081   echo "$as_me:26081: \$? = $ac_status" >&5
26082   (exit "$ac_status"); }; }; then
26083   ac_hi=$ac_mid
26084 else
26085   echo "$as_me: failed program was:" >&5
26086 cat "conftest.$ac_ext" >&5
26087 ac_lo=`expr "$ac_mid" + 1`
26088 fi
26089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26090 done
26091 ac_cv_sizeof_bool=$ac_lo
26092 else
26093   if test "$cross_compiling" = yes; then
26094   { { echo "$as_me:26094: error: cannot run test program while cross compiling" >&5
26095 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26096    { (exit 1); exit 1; }; }
26097 else
26098   cat >"conftest.$ac_ext" <<_ACEOF
26099 #line 26099 "configure"
26100 #include "confdefs.h"
26101
26102 #include <stdlib.h>
26103 #include <stdio.h>
26104
26105 #if defined(__cplusplus)
26106
26107 #ifdef HAVE_GXX_BUILTIN_H
26108 #include <g++/builtin.h>
26109 #elif HAVE_GPP_BUILTIN_H
26110 #include <gpp/builtin.h>
26111 #elif HAVE_BUILTIN_H
26112 #include <builtin.h>
26113 #endif
26114
26115 #else
26116
26117 #if $cf_cv_header_stdbool_h
26118 #include <stdbool.h>
26119 #endif
26120
26121 #endif
26122
26123 int
26124 main (void)
26125 {
26126 FILE *f = fopen ("conftest.val", "w");
26127 if (!f)
26128   $ac_main_return (1);
26129 fprintf (f, "%d", (sizeof (bool)));
26130 fclose (f);
26131   ;
26132   return 0;
26133 }
26134 _ACEOF
26135 rm -f "conftest$ac_exeext"
26136 if { (eval echo "$as_me:26136: \"$ac_link\"") >&5
26137   (eval $ac_link) 2>&5
26138   ac_status=$?
26139   echo "$as_me:26139: \$? = $ac_status" >&5
26140   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26141   { (eval echo "$as_me:26141: \"$ac_try\"") >&5
26142   (eval $ac_try) 2>&5
26143   ac_status=$?
26144   echo "$as_me:26144: \$? = $ac_status" >&5
26145   (exit "$ac_status"); }; }; then
26146   ac_cv_sizeof_bool=`cat conftest.val`
26147 else
26148   echo "$as_me: program exited with status $ac_status" >&5
26149 echo "$as_me: failed program was:" >&5
26150 cat "conftest.$ac_ext" >&5
26151 fi
26152 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26153 fi
26154 fi
26155 rm -f conftest.val
26156 else
26157   ac_cv_sizeof_bool=0
26158 fi
26159 fi
26160 echo "$as_me:26160: result: $ac_cv_sizeof_bool" >&5
26161 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26162 cat >>confdefs.h <<EOF
26163 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26164 EOF
26165
26166 echo "$as_me:26166: checking for type of bool" >&5
26167 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26168 if test "${cf_cv_type_of_bool+set}" = set; then
26169   echo $ECHO_N "(cached) $ECHO_C" >&6
26170 else
26171
26172         rm -f cf_test.out
26173         if test "$cross_compiling" = yes; then
26174
26175                 case x$ac_cv_sizeof_bool in
26176                 (x1) cf_cv_type_of_bool="unsigned char";;
26177                 (x2) cf_cv_type_of_bool="unsigned short";;
26178                 (x4) cf_cv_type_of_bool="unsigned int";;
26179                 (x8) cf_cv_type_of_bool="unsigned long";;
26180                 (*)  cf_cv_type_of_bool=unknown;;
26181                 esac
26182
26183 else
26184   cat >"conftest.$ac_ext" <<_ACEOF
26185 #line 26185 "configure"
26186 #include "confdefs.h"
26187
26188 #include <stdlib.h>
26189 #include <stdio.h>
26190
26191 #if defined(__cplusplus)
26192
26193 #ifdef HAVE_GXX_BUILTIN_H
26194 #include <g++/builtin.h>
26195 #elif HAVE_GPP_BUILTIN_H
26196 #include <gpp/builtin.h>
26197 #elif HAVE_BUILTIN_H
26198 #include <builtin.h>
26199 #endif
26200
26201 #else
26202
26203 #if $cf_cv_header_stdbool_h
26204 #include <stdbool.h>
26205 #endif
26206
26207 #endif
26208
26209 int main(void)
26210 {
26211         FILE *fp = fopen("cf_test.out", "w");
26212         if (fp != 0) {
26213                 bool x = true;
26214                 if ((bool)(-x) >= 0)
26215                         fputs("unsigned ", fp);
26216                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26217                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26218                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26219                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26220                 fclose(fp);
26221         }
26222         ${cf_cv_main_return:-return}(0);
26223 }
26224
26225 _ACEOF
26226 rm -f "conftest$ac_exeext"
26227 if { (eval echo "$as_me:26227: \"$ac_link\"") >&5
26228   (eval $ac_link) 2>&5
26229   ac_status=$?
26230   echo "$as_me:26230: \$? = $ac_status" >&5
26231   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26232   { (eval echo "$as_me:26232: \"$ac_try\"") >&5
26233   (eval $ac_try) 2>&5
26234   ac_status=$?
26235   echo "$as_me:26235: \$? = $ac_status" >&5
26236   (exit "$ac_status"); }; }; then
26237   cf_cv_type_of_bool=`cat cf_test.out`
26238                  if test -z "$cf_cv_type_of_bool"; then
26239                    cf_cv_type_of_bool=unknown
26240                  fi
26241 else
26242   echo "$as_me: program exited with status $ac_status" >&5
26243 echo "$as_me: failed program was:" >&5
26244 cat "conftest.$ac_ext" >&5
26245 cf_cv_type_of_bool=unknown
26246 fi
26247 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26248 fi
26249         rm -f cf_test.out
26250
26251 fi
26252 echo "$as_me:26252: result: $cf_cv_type_of_bool" >&5
26253 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26254
26255 if test "$cf_cv_type_of_bool" = unknown ; then
26256         case .$NCURSES_BOOL in
26257         (.auto|.) NCURSES_BOOL=unsigned;;
26258         esac
26259         { echo "$as_me:26259: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26260 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26261         cf_cv_type_of_bool=$NCURSES_BOOL
26262 fi
26263
26264                 else
26265                         echo "$as_me:26265: checking for fallback type of bool" >&5
26266 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26267                         case "$host_cpu" in
26268                         (i?86)  cf_cv_type_of_bool=char ;;
26269                         (*)     cf_cv_type_of_bool=int  ;;
26270                         esac
26271                         echo "$as_me:26271: result: $cf_cv_type_of_bool" >&5
26272 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26273                 fi
26274         fi
26275 fi
26276
26277 # If the C compiler did not declare bool, and we did not determine that the C++
26278 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26279 # ncurses library use the same type as C++ bool.  Note that this allows one to
26280 # specify the type of bool in a configure-script option and postpone
26281 # integration with the C++ compiler provided that the types are compatible.
26282 USE_CXX_BOOL=1
26283 if test "$cf_cv_cc_bool_type" = 1
26284 then
26285         # oops: C has a bool.  Unlikely, but C++ could differ.
26286         USE_CXX_BOOL=0
26287 elif test "$cf_cv_builtin_bool" = 0
26288 then
26289         # C++ has no bool
26290         USE_CXX_BOOL=0
26291 else
26292         # this is the normal case
26293         USE_CXX_BOOL='defined(__cplusplus)'
26294 fi
26295
26296 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26297
26298         if test "$cf_with_ada" != "no" ; then
26299                 if test "$with_libtool" != "no"; then
26300                         { echo "$as_me:26300: WARNING: libtool does not support Ada - disabling feature" >&5
26301 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26302                         cf_with_ada=no
26303                 fi
26304         fi
26305
26306         if test "$cf_with_ada" != "no" ; then
26307
26308 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26309 do
26310
26311 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26312
26313         unset ac_cv_path_cf_TEMP_gnat
26314         unset cf_TEMP_gnat
26315         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26316 set dummy $cf_prog_gnat; ac_word=$2
26317 echo "$as_me:26317: checking for $ac_word" >&5
26318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26319 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26320   echo $ECHO_N "(cached) $ECHO_C" >&6
26321 else
26322   case $cf_TEMP_gnat in
26323   [\\/]* | ?:[\\/]*)
26324   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26325   ;;
26326   *)
26327   ac_save_IFS=$IFS; IFS=$ac_path_separator
26328 ac_dummy="$PATH"
26329 for ac_dir in $ac_dummy; do
26330   IFS=$ac_save_IFS
26331   test -z "$ac_dir" && ac_dir=.
26332   if $as_executable_p "$ac_dir/$ac_word"; then
26333    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26334    echo "$as_me:26334: found $ac_dir/$ac_word" >&5
26335    break
26336 fi
26337 done
26338
26339   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26340   ;;
26341 esac
26342 fi
26343 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26344
26345 if test -n "$cf_TEMP_gnat"; then
26346   echo "$as_me:26346: result: $cf_TEMP_gnat" >&5
26347 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26348 else
26349   echo "$as_me:26349: result: no" >&5
26350 echo "${ECHO_T}no" >&6
26351 fi
26352
26353         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26354
26355         if test "x$cf_TEMP_gnat" != xno; then
26356                 unset cf_cv_gnat_version
26357                 unset cf_TEMP_gnat
26358
26359 echo "$as_me:26359: checking for $cf_prog_gnat version" >&5
26360 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26361 if test "${cf_cv_gnat_version+set}" = set; then
26362   echo $ECHO_N "(cached) $ECHO_C" >&6
26363 else
26364
26365 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26366         grep '[0-9].[0-9][0-9]*' |\
26367         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26368
26369 fi
26370 echo "$as_me:26370: result: $cf_cv_gnat_version" >&5
26371 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26372 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26373 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26374
26375         fi
26376         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26377
26378         unset cf_TEMP_gnat
26379         unset cf_cv_gnat_version
26380         unset ac_cv_path_cf_TEMP_gnat
26381 done
26382
26383 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26384         cf_ada_make=
26385         cf_cv_prog_gnat_correct=no
26386 else
26387         cf_ada_make=gnatmake
26388         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26389                 # gprconfig is newer than gnatmake; we can continue...
26390                 cf_ada_config="##"
26391         else
26392                 rm -rf ./conftest* ./*~conftest*
26393                 if mkdir conftest.src
26394                 then
26395                         cf_ada_config=""
26396                         cd conftest.src
26397                         for cf_gprconfig in Ada C
26398                         do
26399                                 echo "$as_me:26399: checking for gprconfig name for $cf_gprconfig" >&5
26400 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26401                                 if test "$cf_gprconfig" = C
26402                                 then
26403                                         for cf_gprconfig_param in \
26404                                                 "$cf_gprconfig,,,,GNATGCC" \
26405                                                 "$cf_gprconfig,,,,GCC" \
26406                                                 "$cf_gprconfig"
26407                                         do
26408                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26409                                                 test -n "$cf_gprconfig_value" && break
26410                                         done
26411                                 else
26412                                         cf_gprconfig_param=$cf_gprconfig
26413                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26414                                 fi
26415                                 if test -n "$cf_gprconfig_value"
26416                                 then
26417                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26418                                         echo "$as_me:26418: result: $cf_gprconfig_value" >&5
26419 echo "${ECHO_T}$cf_gprconfig_value" >&6
26420                                 else
26421                                         echo "$as_me:26421: result: missing" >&5
26422 echo "${ECHO_T}missing" >&6
26423                                         cf_ada_config="#"
26424                                         break
26425                                 fi
26426                         done
26427                         cd ..
26428                         rm -rf ./conftest* ./*~conftest*
26429                 fi
26430         fi
26431         if test "x$cf_ada_config" != "x#"
26432         then
26433
26434 echo "$as_me:26434: checking for gnat version" >&5
26435 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26436 if test "${cf_cv_gnat_version+set}" = set; then
26437   echo $ECHO_N "(cached) $ECHO_C" >&6
26438 else
26439
26440 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26441         grep '[0-9].[0-9][0-9]*' |\
26442         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26443
26444 fi
26445 echo "$as_me:26445: result: $cf_cv_gnat_version" >&5
26446 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26447 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26448
26449 case "$cf_cv_gnat_version" in
26450 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26451         cf_cv_prog_gnat_correct=yes
26452         ;;
26453 (*)
26454         { echo "$as_me:26454: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26455 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26456         cf_cv_prog_gnat_correct=no
26457         ;;
26458 esac
26459
26460                 # Extract the first word of "m4", so it can be a program name with args.
26461 set dummy m4; ac_word=$2
26462 echo "$as_me:26462: checking for $ac_word" >&5
26463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26464 if test "${ac_cv_prog_M4_exists+set}" = set; then
26465   echo $ECHO_N "(cached) $ECHO_C" >&6
26466 else
26467   if test -n "$M4_exists"; then
26468   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26469 else
26470   ac_save_IFS=$IFS; IFS=$ac_path_separator
26471 ac_dummy="$PATH"
26472 for ac_dir in $ac_dummy; do
26473   IFS=$ac_save_IFS
26474   test -z "$ac_dir" && ac_dir=.
26475   $as_executable_p "$ac_dir/$ac_word" || continue
26476 ac_cv_prog_M4_exists="yes"
26477 echo "$as_me:26477: found $ac_dir/$ac_word" >&5
26478 break
26479 done
26480
26481   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26482 fi
26483 fi
26484 M4_exists=$ac_cv_prog_M4_exists
26485 if test -n "$M4_exists"; then
26486   echo "$as_me:26486: result: $M4_exists" >&5
26487 echo "${ECHO_T}$M4_exists" >&6
26488 else
26489   echo "$as_me:26489: result: no" >&5
26490 echo "${ECHO_T}no" >&6
26491 fi
26492
26493                 if test "$ac_cv_prog_M4_exists" = no; then
26494                         cf_cv_prog_gnat_correct=no
26495                         { echo "$as_me:26495: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26496 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26497                 fi
26498                 if test "$cf_cv_prog_gnat_correct" = yes; then
26499                         echo "$as_me:26499: checking if GNAT works" >&5
26500 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26501
26502 rm -rf ./conftest* ./*~conftest*
26503 cat >>conftest.ads <<CF_EOF
26504 procedure conftest;
26505 CF_EOF
26506 cat >>conftest.adb <<CF_EOF
26507 with Text_IO;
26508 with GNAT.OS_Lib;
26509 procedure conftest is
26510 begin
26511    Text_IO.Put ("Hello World");
26512    Text_IO.New_Line;
26513    GNAT.OS_Lib.OS_Exit (0);
26514 end conftest;
26515 CF_EOF
26516 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26517    if ( ./conftest 1>&5 2>&1 ) ; then
26518       cf_cv_prog_gnat_correct=yes
26519    else
26520       cf_cv_prog_gnat_correct=no
26521    fi
26522 else
26523    cf_cv_prog_gnat_correct=no
26524 fi
26525 rm -rf ./conftest* ./*~conftest*
26526
26527                         echo "$as_me:26527: result: $cf_cv_prog_gnat_correct" >&5
26528 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26529                 fi
26530         else
26531                 cf_cv_prog_gnat_correct=no
26532         fi
26533 fi
26534
26535                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26536
26537         ADAFLAGS="$ADAFLAGS -gnatpn"
26538
26539         echo "$as_me:26539: checking optimization options for ADAFLAGS" >&5
26540 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26541         case "$CFLAGS" in
26542         (*-g*)
26543
26544         ADAFLAGS="$ADAFLAGS -g"
26545
26546                 ;;
26547         esac
26548         case "$CFLAGS" in
26549         (*-O*)
26550                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26551
26552         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26553
26554                 ;;
26555         esac
26556         echo "$as_me:26556: result: $ADAFLAGS" >&5
26557 echo "${ECHO_T}$ADAFLAGS" >&6
26558
26559 echo "$as_me:26559: checking if GNATPREP supports -T option" >&5
26560 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26561 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26562   echo $ECHO_N "(cached) $ECHO_C" >&6
26563 else
26564
26565 cf_cv_gnatprep_opt_t=no
26566 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26567
26568 fi
26569 echo "$as_me:26569: result: $cf_cv_gnatprep_opt_t" >&5
26570 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26571 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26572
26573 echo "$as_me:26573: checking if GNAT supports generics" >&5
26574 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26575 case "$cf_cv_gnat_version" in
26576 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26577         cf_gnat_generics=yes
26578         ;;
26579 (*)
26580         cf_gnat_generics=no
26581         ;;
26582 esac
26583 echo "$as_me:26583: result: $cf_gnat_generics" >&5
26584 echo "${ECHO_T}$cf_gnat_generics" >&6
26585
26586 if test "$cf_gnat_generics" = yes
26587 then
26588         cf_compile_generics=generics
26589         cf_generic_objects="\${GENOBJS}"
26590 else
26591         cf_compile_generics=
26592         cf_generic_objects=
26593 fi
26594
26595 echo "$as_me:26595: checking if GNAT supports SIGINT" >&5
26596 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26597 if test "${cf_cv_gnat_sigint+set}" = set; then
26598   echo $ECHO_N "(cached) $ECHO_C" >&6
26599 else
26600
26601 rm -rf ./conftest* ./*~conftest*
26602 cat >>conftest.ads <<CF_EOF
26603 with Ada.Interrupts.Names;
26604
26605 package ConfTest is
26606
26607    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26608    pragma Unreserve_All_Interrupts;
26609    pragma Warnings (On);
26610
26611    protected Process is
26612       procedure Stop;
26613       function Continue return Boolean;
26614       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26615    private
26616       Done : Boolean := False;
26617    end Process;
26618
26619 end ConfTest;
26620 CF_EOF
26621 cat >>conftest.adb <<CF_EOF
26622 package body ConfTest is
26623    protected body Process is
26624       procedure Stop is
26625       begin
26626          Done := True;
26627       end Stop;
26628       function Continue return Boolean is
26629       begin
26630          return not Done;
26631       end Continue;
26632    end Process;
26633 end ConfTest;
26634 CF_EOF
26635 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26636       cf_cv_gnat_sigint=yes
26637 else
26638    cf_cv_gnat_sigint=no
26639 fi
26640 rm -rf ./conftest* ./*~conftest*
26641
26642 fi
26643 echo "$as_me:26643: result: $cf_cv_gnat_sigint" >&5
26644 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26645
26646 if test "$cf_cv_gnat_sigint" = yes ; then
26647         USE_GNAT_SIGINT=""
26648 else
26649         USE_GNAT_SIGINT="#"
26650 fi
26651
26652 cf_gnat_libraries=no
26653 cf_gnat_projects=no
26654
26655 if test "$enable_gnat_projects" != no ; then
26656 echo "$as_me:26656: checking if GNAT supports project files" >&5
26657 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26658 case "$cf_cv_gnat_version" in
26659 (3.[0-9]*)
26660         ;;
26661 (*)
26662         case "$cf_cv_system_name" in
26663         (cygwin*|msys*)
26664                 ;;
26665         (*)
26666                 rm -rf ./conftest* ./*~conftest*
26667                 if mkdir conftest.src conftest.bin conftest.lib
26668                 then
26669                         cd conftest.src
26670                         rm -rf ./conftest* ./*~conftest*
26671                         cat >>library.gpr <<CF_EOF
26672 project Library is
26673   Kind := External ("LIB_KIND");
26674   for Library_Name use "ConfTest";
26675   for Object_Dir use ".";
26676   for Library_ALI_Dir use External("LIBRARY_DIR");
26677   for Library_Version use External ("SONAME");
26678   for Library_Kind use Kind;
26679   for Library_Dir use External("BUILD_DIR");
26680   Source_Dir := External ("SOURCE_DIR");
26681   for Source_Dirs use (Source_Dir);
26682 end Library;
26683 CF_EOF
26684                         cat >>confpackage.ads <<CF_EOF
26685 package ConfPackage is
26686    procedure conftest;
26687 end ConfPackage;
26688 CF_EOF
26689                         cat >>confpackage.adb <<CF_EOF
26690 with Text_IO;
26691 package body ConfPackage is
26692    procedure conftest is
26693    begin
26694       Text_IO.Put ("Hello World");
26695       Text_IO.New_Line;
26696    end conftest;
26697 end ConfPackage;
26698 CF_EOF
26699                         if ( "$cf_ada_make" $ADAFLAGS \
26700                                         -Plibrary.gpr \
26701                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26702                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26703                                         -XSOURCE_DIR="`pwd`" \
26704                                         -XSONAME=libConfTest.so.1 \
26705                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26706                                 cf_gnat_projects=yes
26707                         fi
26708                         cd ..
26709                 fi
26710                 if test -f conftest.lib/confpackage.ali
26711                 then
26712                         cf_gnat_libraries=yes
26713                 fi
26714                 rm -rf ./conftest* ./*~conftest*
26715                 ;;
26716         esac
26717         ;;
26718 esac
26719 echo "$as_me:26719: result: $cf_gnat_projects" >&5
26720 echo "${ECHO_T}$cf_gnat_projects" >&6
26721 fi # enable_gnat_projects
26722
26723 if test "$cf_gnat_projects" = yes
26724 then
26725         echo "$as_me:26725: checking if GNAT supports libraries" >&5
26726 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26727         echo "$as_me:26727: result: $cf_gnat_libraries" >&5
26728 echo "${ECHO_T}$cf_gnat_libraries" >&6
26729 fi
26730
26731 USE_OLD_MAKERULES=""
26732 USE_GNAT_PROJECTS="#"
26733 USE_GNAT_MAKE_GPR="#"
26734 USE_GNAT_GPRBUILD="#"
26735
26736 if test "$cf_gnat_projects" = yes
26737 then
26738         USE_OLD_MAKERULES="#"
26739         USE_GNAT_PROJECTS=""
26740         if test "$cf_cv_VERSION_GPRBUILD" != no
26741         then
26742                 USE_GNAT_GPRBUILD=""
26743         elif test "$cf_cv_VERSION_GNATMAKE" != no
26744         then
26745                 USE_GNAT_MAKE_GPR=""
26746         else
26747                 { echo "$as_me:26747: WARNING: use old makefile rules since tools are missing" >&5
26748 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26749         fi
26750 fi
26751
26752 if test "$cf_gnat_libraries" = yes
26753 then
26754         USE_GNAT_LIBRARIES=""
26755 else
26756         USE_GNAT_LIBRARIES="#"
26757 fi
26758
26759 echo "$as_me:26759: checking for ada-compiler" >&5
26760 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26761
26762 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26763 if test "${with_ada_compiler+set}" = set; then
26764   withval="$with_ada_compiler"
26765   cf_ada_compiler=$withval
26766 else
26767   cf_ada_compiler=gnatmake
26768 fi;
26769
26770 echo "$as_me:26770: result: $cf_ada_compiler" >&5
26771 echo "${ECHO_T}$cf_ada_compiler" >&6
26772
26773                         cf_ada_package=terminal_interface
26774
26775 echo "$as_me:26775: checking for ada-include" >&5
26776 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26777
26778 # Check whether --with-ada-include or --without-ada-include was given.
26779 if test "${with_ada_include+set}" = set; then
26780   withval="$with_ada_include"
26781
26782 else
26783   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26784 fi; if test -n "$prefix/share/ada/adainclude" ; then
26785
26786 if test "x$prefix" != xNONE; then
26787         cf_path_syntax="$prefix"
26788 else
26789         cf_path_syntax="$ac_default_prefix"
26790 fi
26791
26792 case ".$withval" in
26793 (.\$\(*\)*|.\'*\'*)
26794         ;;
26795 (..|./*|.\\*)
26796         ;;
26797 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26798         ;;
26799 (.\$\{*prefix\}*|.\$\{*dir\}*)
26800         eval withval="$withval"
26801         case ".$withval" in
26802         (.NONE/*)
26803                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26804                 ;;
26805         esac
26806         ;;
26807 (.no|.NONE/*)
26808         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26809         ;;
26810 (*)
26811         { { echo "$as_me:26811: error: expected a pathname, not \"$withval\"" >&5
26812 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26813    { (exit 1); exit 1; }; }
26814         ;;
26815 esac
26816
26817 fi
26818 eval ADA_INCLUDE="$withval"
26819
26820 echo "$as_me:26820: result: $ADA_INCLUDE" >&5
26821 echo "${ECHO_T}$ADA_INCLUDE" >&6
26822
26823 echo "$as_me:26823: checking for ada-objects" >&5
26824 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26825
26826 # Check whether --with-ada-objects or --without-ada-objects was given.
26827 if test "${with_ada_objects+set}" = set; then
26828   withval="$with_ada_objects"
26829
26830 else
26831   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26832 fi; if test -n "$prefix/lib/ada/adalib" ; then
26833
26834 if test "x$prefix" != xNONE; then
26835         cf_path_syntax="$prefix"
26836 else
26837         cf_path_syntax="$ac_default_prefix"
26838 fi
26839
26840 case ".$withval" in
26841 (.\$\(*\)*|.\'*\'*)
26842         ;;
26843 (..|./*|.\\*)
26844         ;;
26845 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26846         ;;
26847 (.\$\{*prefix\}*|.\$\{*dir\}*)
26848         eval withval="$withval"
26849         case ".$withval" in
26850         (.NONE/*)
26851                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26852                 ;;
26853         esac
26854         ;;
26855 (.no|.NONE/*)
26856         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26857         ;;
26858 (*)
26859         { { echo "$as_me:26859: error: expected a pathname, not \"$withval\"" >&5
26860 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26861    { (exit 1); exit 1; }; }
26862         ;;
26863 esac
26864
26865 fi
26866 eval ADA_OBJECTS="$withval"
26867
26868 echo "$as_me:26868: result: $ADA_OBJECTS" >&5
26869 echo "${ECHO_T}$ADA_OBJECTS" >&6
26870
26871 echo "$as_me:26871: checking if an Ada95 shared-library should be built" >&5
26872 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26873
26874 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26875 if test "${with_ada_sharedlib+set}" = set; then
26876   withval="$with_ada_sharedlib"
26877   with_ada_sharedlib=$withval
26878 else
26879   with_ada_sharedlib=no
26880 fi;
26881 echo "$as_me:26881: result: $with_ada_sharedlib" >&5
26882 echo "${ECHO_T}$with_ada_sharedlib" >&6
26883
26884 if test "x$with_ada_sharedlib" != xno
26885 then
26886         if test "x$cf_gnat_projects" != xyes
26887         then
26888                 { echo "$as_me:26888: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26889 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26890                 with_ada_sharedlib=no
26891         fi
26892 fi
26893
26894 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26895 MAKE_ADA_SHAREDLIB="#"
26896
26897 if test "x$with_ada_sharedlib" != xno
26898 then
26899         MAKE_ADA_SHAREDLIB=
26900         if test "x$with_ada_sharedlib" != xyes
26901         then
26902                 ADA_SHAREDLIB="$with_ada_sharedlib"
26903         fi
26904 fi
26905
26906                         # allow the Ada binding to be renamed
26907
26908 echo "$as_me:26908: checking for ada-libname" >&5
26909 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26910
26911 # Check whether --with-ada-libname or --without-ada-libname was given.
26912 if test "${with_ada_libname+set}" = set; then
26913   withval="$with_ada_libname"
26914   ADA_LIBNAME=$withval
26915 else
26916   ADA_LIBNAME=AdaCurses
26917 fi;
26918 case "x$ADA_LIBNAME" in
26919 (x|xyes|xno)
26920         ADA_LIBNAME=AdaCurses
26921         ;;
26922 esac
26923
26924 echo "$as_me:26924: result: $ADA_LIBNAME" >&5
26925 echo "${ECHO_T}$ADA_LIBNAME" >&6
26926
26927                 fi
26928         fi
26929 else
26930         cf_with_ada=no
26931 fi
26932
26933 # do this "late" to avoid conflict with header-checks
26934 if test "x$with_widec" = xyes ; then
26935         echo "$as_me:26935: checking for wchar_t" >&5
26936 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26937 if test "${ac_cv_type_wchar_t+set}" = set; then
26938   echo $ECHO_N "(cached) $ECHO_C" >&6
26939 else
26940   cat >"conftest.$ac_ext" <<_ACEOF
26941 #line 26941 "configure"
26942 #include "confdefs.h"
26943 $ac_includes_default
26944 int
26945 main (void)
26946 {
26947 if ((wchar_t *) 0)
26948   return 0;
26949 if (sizeof (wchar_t))
26950   return 0;
26951   ;
26952   return 0;
26953 }
26954 _ACEOF
26955 rm -f "conftest.$ac_objext"
26956 if { (eval echo "$as_me:26956: \"$ac_compile\"") >&5
26957   (eval $ac_compile) 2>&5
26958   ac_status=$?
26959   echo "$as_me:26959: \$? = $ac_status" >&5
26960   (exit "$ac_status"); } &&
26961          { ac_try='test -s "conftest.$ac_objext"'
26962   { (eval echo "$as_me:26962: \"$ac_try\"") >&5
26963   (eval $ac_try) 2>&5
26964   ac_status=$?
26965   echo "$as_me:26965: \$? = $ac_status" >&5
26966   (exit "$ac_status"); }; }; then
26967   ac_cv_type_wchar_t=yes
26968 else
26969   echo "$as_me: failed program was:" >&5
26970 cat "conftest.$ac_ext" >&5
26971 ac_cv_type_wchar_t=no
26972 fi
26973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26974 fi
26975 echo "$as_me:26975: result: $ac_cv_type_wchar_t" >&5
26976 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26977
26978 echo "$as_me:26978: checking size of wchar_t" >&5
26979 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26980 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26981   echo $ECHO_N "(cached) $ECHO_C" >&6
26982 else
26983   if test "$ac_cv_type_wchar_t" = yes; then
26984   if test "$cross_compiling" = yes; then
26985   # Depending upon the size, compute the lo and hi bounds.
26986 cat >"conftest.$ac_ext" <<_ACEOF
26987 #line 26987 "configure"
26988 #include "confdefs.h"
26989 $ac_includes_default
26990 int
26991 main (void)
26992 {
26993 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26994   ;
26995   return 0;
26996 }
26997 _ACEOF
26998 rm -f "conftest.$ac_objext"
26999 if { (eval echo "$as_me:26999: \"$ac_compile\"") >&5
27000   (eval $ac_compile) 2>&5
27001   ac_status=$?
27002   echo "$as_me:27002: \$? = $ac_status" >&5
27003   (exit "$ac_status"); } &&
27004          { ac_try='test -s "conftest.$ac_objext"'
27005   { (eval echo "$as_me:27005: \"$ac_try\"") >&5
27006   (eval $ac_try) 2>&5
27007   ac_status=$?
27008   echo "$as_me:27008: \$? = $ac_status" >&5
27009   (exit "$ac_status"); }; }; then
27010   ac_lo=0 ac_mid=0
27011   while :; do
27012     cat >"conftest.$ac_ext" <<_ACEOF
27013 #line 27013 "configure"
27014 #include "confdefs.h"
27015 $ac_includes_default
27016 int
27017 main (void)
27018 {
27019 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27020   ;
27021   return 0;
27022 }
27023 _ACEOF
27024 rm -f "conftest.$ac_objext"
27025 if { (eval echo "$as_me:27025: \"$ac_compile\"") >&5
27026   (eval $ac_compile) 2>&5
27027   ac_status=$?
27028   echo "$as_me:27028: \$? = $ac_status" >&5
27029   (exit "$ac_status"); } &&
27030          { ac_try='test -s "conftest.$ac_objext"'
27031   { (eval echo "$as_me:27031: \"$ac_try\"") >&5
27032   (eval $ac_try) 2>&5
27033   ac_status=$?
27034   echo "$as_me:27034: \$? = $ac_status" >&5
27035   (exit "$ac_status"); }; }; then
27036   ac_hi=$ac_mid; break
27037 else
27038   echo "$as_me: failed program was:" >&5
27039 cat "conftest.$ac_ext" >&5
27040 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27041 fi
27042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27043   done
27044 else
27045   echo "$as_me: failed program was:" >&5
27046 cat "conftest.$ac_ext" >&5
27047 ac_hi=-1 ac_mid=-1
27048   while :; do
27049     cat >"conftest.$ac_ext" <<_ACEOF
27050 #line 27050 "configure"
27051 #include "confdefs.h"
27052 $ac_includes_default
27053 int
27054 main (void)
27055 {
27056 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27057   ;
27058   return 0;
27059 }
27060 _ACEOF
27061 rm -f "conftest.$ac_objext"
27062 if { (eval echo "$as_me:27062: \"$ac_compile\"") >&5
27063   (eval $ac_compile) 2>&5
27064   ac_status=$?
27065   echo "$as_me:27065: \$? = $ac_status" >&5
27066   (exit "$ac_status"); } &&
27067          { ac_try='test -s "conftest.$ac_objext"'
27068   { (eval echo "$as_me:27068: \"$ac_try\"") >&5
27069   (eval $ac_try) 2>&5
27070   ac_status=$?
27071   echo "$as_me:27071: \$? = $ac_status" >&5
27072   (exit "$ac_status"); }; }; then
27073   ac_lo=$ac_mid; break
27074 else
27075   echo "$as_me: failed program was:" >&5
27076 cat "conftest.$ac_ext" >&5
27077 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27078 fi
27079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27080   done
27081 fi
27082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27083 # Binary search between lo and hi bounds.
27084 while test "x$ac_lo" != "x$ac_hi"; do
27085   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27086   cat >"conftest.$ac_ext" <<_ACEOF
27087 #line 27087 "configure"
27088 #include "confdefs.h"
27089 $ac_includes_default
27090 int
27091 main (void)
27092 {
27093 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27094   ;
27095   return 0;
27096 }
27097 _ACEOF
27098 rm -f "conftest.$ac_objext"
27099 if { (eval echo "$as_me:27099: \"$ac_compile\"") >&5
27100   (eval $ac_compile) 2>&5
27101   ac_status=$?
27102   echo "$as_me:27102: \$? = $ac_status" >&5
27103   (exit "$ac_status"); } &&
27104          { ac_try='test -s "conftest.$ac_objext"'
27105   { (eval echo "$as_me:27105: \"$ac_try\"") >&5
27106   (eval $ac_try) 2>&5
27107   ac_status=$?
27108   echo "$as_me:27108: \$? = $ac_status" >&5
27109   (exit "$ac_status"); }; }; then
27110   ac_hi=$ac_mid
27111 else
27112   echo "$as_me: failed program was:" >&5
27113 cat "conftest.$ac_ext" >&5
27114 ac_lo=`expr "$ac_mid" + 1`
27115 fi
27116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27117 done
27118 ac_cv_sizeof_wchar_t=$ac_lo
27119 else
27120   if test "$cross_compiling" = yes; then
27121   { { echo "$as_me:27121: error: cannot run test program while cross compiling" >&5
27122 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27123    { (exit 1); exit 1; }; }
27124 else
27125   cat >"conftest.$ac_ext" <<_ACEOF
27126 #line 27126 "configure"
27127 #include "confdefs.h"
27128 $ac_includes_default
27129 int
27130 main (void)
27131 {
27132 FILE *f = fopen ("conftest.val", "w");
27133 if (!f)
27134   $ac_main_return (1);
27135 fprintf (f, "%d", (sizeof (wchar_t)));
27136 fclose (f);
27137   ;
27138   return 0;
27139 }
27140 _ACEOF
27141 rm -f "conftest$ac_exeext"
27142 if { (eval echo "$as_me:27142: \"$ac_link\"") >&5
27143   (eval $ac_link) 2>&5
27144   ac_status=$?
27145   echo "$as_me:27145: \$? = $ac_status" >&5
27146   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27147   { (eval echo "$as_me:27147: \"$ac_try\"") >&5
27148   (eval $ac_try) 2>&5
27149   ac_status=$?
27150   echo "$as_me:27150: \$? = $ac_status" >&5
27151   (exit "$ac_status"); }; }; then
27152   ac_cv_sizeof_wchar_t=`cat conftest.val`
27153 else
27154   echo "$as_me: program exited with status $ac_status" >&5
27155 echo "$as_me: failed program was:" >&5
27156 cat "conftest.$ac_ext" >&5
27157 fi
27158 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27159 fi
27160 fi
27161 rm -f conftest.val
27162 else
27163   ac_cv_sizeof_wchar_t=0
27164 fi
27165 fi
27166 echo "$as_me:27166: result: $ac_cv_sizeof_wchar_t" >&5
27167 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27168 cat >>confdefs.h <<EOF
27169 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27170 EOF
27171
27172         # cross-compiling to mingw can run into the problem that attempting to
27173         # link with the regex library fails, causing the test to not set this to
27174         # a number.  "recent" autoconf does not address this problem either -TD
27175         if test -z "$ac_cv_sizeof_wchar_t"
27176         then
27177                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27178
27179 echo "${as_me:-configure}:27179: testing test failed (assume 2) ..." 1>&5
27180
27181                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27182                 mv confdefs.tmp confdefs.h
27183                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27184         fi
27185 fi
27186
27187 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27188 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27189 ###
27190 ### ticlib modules may be a separate library, otherwise contained in termlib.
27191 ### termlib modules may be a separate library, otherwise contained in ncurses.
27192 ###
27193 ### The of "+" or " " between the tokens controls the way the script
27194 ### chooses to split module lists into libraries.
27195 ###
27196 ### (see CF_LIB_RULES).
27197 echo "$as_me:27197: checking for library subsets" >&5
27198 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27199 LIB_SUBSETS=
27200
27201 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27202         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27203         if test "$with_ticlib" != no ; then
27204                 LIB_SUBSETS="${LIB_SUBSETS} "
27205         else
27206                 LIB_SUBSETS="${LIB_SUBSETS}+"
27207         fi
27208 fi
27209
27210 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27211 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27212
27213 if test "$with_termlib" != no ; then
27214         LIB_SUBSETS="${LIB_SUBSETS} "
27215 else
27216         LIB_SUBSETS="${LIB_SUBSETS}+"
27217 fi
27218
27219 LIB_SUBSETS="${LIB_SUBSETS}base"
27220
27221 # Most term-driver calls are to tinfo, but some like init_pair are to the
27222 # base library (so it resides in base).
27223 if test "$with_term_driver" != no ; then
27224         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27225         case "$cf_cv_system_name" in
27226         (*mingw32*|*mingw64*)
27227                 if test "x$with_exp_win32" = xyes ; then
27228                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27229                 else
27230                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27231                 fi
27232                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27233                 ;;
27234         (*)
27235                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27236                 ;;
27237         esac
27238 elif test "x$with_exp_win32" = xyes ; then
27239         case "$cf_cv_system_name" in
27240         (*mingw32*|*mingw64*)
27241                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27242                 ;;
27243         (*)
27244                 ;;
27245         esac
27246 fi
27247
27248 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27249 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27250
27251 echo "$as_me:27251: result: $LIB_SUBSETS" >&5
27252 echo "${ECHO_T}$LIB_SUBSETS" >&6
27253
27254 ### Construct the list of include-directories to be generated
27255
27256 if test "$srcdir" != "."; then
27257         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27258 fi
27259 CPPFLAGS="-I../include $CPPFLAGS"
27260 if test "$srcdir" != "."; then
27261         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27262 fi
27263 CPPFLAGS="-I. $CPPFLAGS"
27264
27265 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27266 if test "$srcdir" != "."; then
27267         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27268 fi
27269 if test "$GCC" != yes; then
27270         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27271 elif test "$includedir" != "/usr/include"; then
27272         if test "$includedir" = '${prefix}/include' ; then
27273                 if test x$prefix != x/usr ; then
27274                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27275                 fi
27276         else
27277                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27278         fi
27279 fi
27280
27281 ### Build up pieces for makefile rules
27282 echo "$as_me:27282: checking default library suffix" >&5
27283 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27284
27285         case $DFT_LWR_MODEL in
27286         (libtool) DFT_ARG_SUFFIX=''   ;;
27287         (normal)  DFT_ARG_SUFFIX=''   ;;
27288         (debug)   DFT_ARG_SUFFIX='_g' ;;
27289         (profile) DFT_ARG_SUFFIX='_p' ;;
27290         (shared)  DFT_ARG_SUFFIX=''   ;;
27291         esac
27292         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27293 echo "$as_me:27293: result: $DFT_ARG_SUFFIX" >&5
27294 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27295
27296 echo "$as_me:27296: checking default library-dependency suffix" >&5
27297 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27298
27299         case X$DFT_LWR_MODEL in
27300         (Xlibtool)
27301                 DFT_LIB_SUFFIX='.la'
27302                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27303                 ;;
27304         (Xdebug)
27305                 case "$cf_cv_system_name" in
27306                 (*-msvc*)
27307                         DFT_LIB_SUFFIX='_g.lib'
27308                         ;;
27309                 (*)
27310                         DFT_LIB_SUFFIX='_g.a'
27311                         ;;
27312                 esac
27313                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27314                 ;;
27315         (Xprofile)
27316                 case "$cf_cv_system_name" in
27317                 (*-msvc*)
27318                         DFT_LIB_SUFFIX='_p.lib'
27319                         ;;
27320                 (*)
27321                         DFT_LIB_SUFFIX='_p.a'
27322                         ;;
27323                 esac
27324                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27325                 ;;
27326         (Xshared)
27327                 case "$cf_cv_system_name" in
27328                 (aix[5-7]*)
27329                         DFT_LIB_SUFFIX='.so'
27330                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27331                         ;;
27332                 (*-msvc*)
27333                         DFT_LIB_SUFFIX='.dll'
27334                         DFT_DEP_SUFFIX='.dll.lib'
27335                         ;;
27336                 (cygwin*|msys*|mingw*)
27337                         DFT_LIB_SUFFIX='.dll'
27338                         DFT_DEP_SUFFIX='.dll.a'
27339                         ;;
27340                 (darwin*)
27341                         DFT_LIB_SUFFIX='.dylib'
27342                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27343                         ;;
27344                 (hpux*)
27345                         case "$target" in
27346                         (ia64*)
27347                                 DFT_LIB_SUFFIX='.so'
27348                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27349                                 ;;
27350                         (*)
27351                                 DFT_LIB_SUFFIX='.sl'
27352                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27353                                 ;;
27354                         esac
27355                         ;;
27356                 (*)
27357                         DFT_LIB_SUFFIX='.so'
27358                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27359                         ;;
27360                 esac
27361                 ;;
27362         (*)
27363                 case "$target" in
27364                 (*-msvc*)
27365                         DFT_LIB_SUFFIX='.lib'
27366                         ;;
27367                 (*)
27368                         DFT_LIB_SUFFIX='.a'
27369                         ;;
27370                 esac
27371                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27372                 ;;
27373         esac
27374         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27375         then
27376                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27377                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27378         fi
27379 echo "$as_me:27379: result: $DFT_DEP_SUFFIX" >&5
27380 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27381
27382 echo "$as_me:27382: checking default object directory" >&5
27383 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27384
27385         case $DFT_LWR_MODEL in
27386         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27387         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27388         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27389         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27390         (shared)
27391                 case "$cf_cv_system_name" in
27392                 (cygwin|msys)
27393                         DFT_OBJ_SUBDIR='objects' ;;
27394                 (*)
27395                         DFT_OBJ_SUBDIR='obj_s' ;;
27396                 esac
27397         esac
27398 echo "$as_me:27398: result: $DFT_OBJ_SUBDIR" >&5
27399 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27400
27401 if test "x$cf_with_cxx" = xyes ; then
27402 echo "$as_me:27402: checking c++ library-dependency suffix" >&5
27403 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27404 if test "$with_libtool" != "no"; then
27405         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27406         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27407 elif test "$with_shared_cxx" != "no"; then
27408         # also for g++ users...
27409         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27410 else
27411         # we normally make a static library because C/C++ library rules differ
27412
27413         case Xnormal in
27414         (Xlibtool)
27415                 CXX_LIB_SUFFIX='.la'
27416                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27417                 ;;
27418         (Xdebug)
27419                 case "$cf_cv_system_name" in
27420                 (*-msvc*)
27421                         CXX_LIB_SUFFIX='_g.lib'
27422                         ;;
27423                 (*)
27424                         CXX_LIB_SUFFIX='_g.a'
27425                         ;;
27426                 esac
27427                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27428                 ;;
27429         (Xprofile)
27430                 case "$cf_cv_system_name" in
27431                 (*-msvc*)
27432                         CXX_LIB_SUFFIX='_p.lib'
27433                         ;;
27434                 (*)
27435                         CXX_LIB_SUFFIX='_p.a'
27436                         ;;
27437                 esac
27438                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27439                 ;;
27440         (Xshared)
27441                 case "$cf_cv_system_name" in
27442                 (aix[5-7]*)
27443                         CXX_LIB_SUFFIX='.so'
27444                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27445                         ;;
27446                 (*-msvc*)
27447                         CXX_LIB_SUFFIX='.dll'
27448                         CXX_DEP_SUFFIX='.dll.lib'
27449                         ;;
27450                 (cygwin*|msys*|mingw*)
27451                         CXX_LIB_SUFFIX='.dll'
27452                         CXX_DEP_SUFFIX='.dll.a'
27453                         ;;
27454                 (darwin*)
27455                         CXX_LIB_SUFFIX='.dylib'
27456                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27457                         ;;
27458                 (hpux*)
27459                         case "$target" in
27460                         (ia64*)
27461                                 CXX_LIB_SUFFIX='.so'
27462                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27463                                 ;;
27464                         (*)
27465                                 CXX_LIB_SUFFIX='.sl'
27466                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27467                                 ;;
27468                         esac
27469                         ;;
27470                 (*)
27471                         CXX_LIB_SUFFIX='.so'
27472                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27473                         ;;
27474                 esac
27475                 ;;
27476         (*)
27477                 case "$target" in
27478                 (*-msvc*)
27479                         CXX_LIB_SUFFIX='.lib'
27480                         ;;
27481                 (*)
27482                         CXX_LIB_SUFFIX='.a'
27483                         ;;
27484                 esac
27485                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27486                 ;;
27487         esac
27488         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27489         then
27490                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27491                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27492         fi
27493
27494 fi
27495 echo "$as_me:27495: result: $CXX_LIB_SUFFIX" >&5
27496 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27497
27498 fi
27499
27500 # do not want -ldl in build except as needed for -lncurses dependency
27501 if test "x$with_dlsym" = xyes ; then
27502 if test "$DFT_LWR_MODEL" = shared || \
27503    test "$DFT_LWR_MODEL" = libtool ; then
27504
27505 # remove dl library from $LIBS
27506 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27507
27508 fi
27509 fi
27510 ### Set up low-level terminfo dependencies for makefiles.
27511
27512 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27513 # do not need libdl
27514 TICS_LIST=
27515 if test "x$with_dlsym" = xyes ; then
27516
27517 # remove dl library from $SHLIB_LIST
27518 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27519
27520 fi
27521
27522 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27523 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27524 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27525 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27526 then
27527         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27528 fi
27529
27530 if test "$with_ticlib" != no ; then
27531
27532         if test "x$with_ticlib" != xyes ; then
27533                 TICS_NAME=$with_ticlib
27534                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27535                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27536                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27537                 TICS_LIB_SUFFIX="${with_ticlib}"
27538         else
27539                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27540                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27541                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27542                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27543         fi
27544         TICS_LDFLAGS="-L${LIB_DIR}"
27545         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27546 else
27547         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27548         TICS_LDFLAGS="-L${LIB_DIR}"
27549         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27550 fi
27551
27552 if test "$with_termlib" != no ; then
27553
27554         if test "x$with_termlib" != xyes ; then
27555                 TINFO_NAME=$with_termlib
27556                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27557                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27558                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27559                 TINFO_LIB_SUFFIX="${with_termlib}"
27560         else
27561                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27562                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27563                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27564                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27565         fi
27566
27567         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27568         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27569         if test "$DFT_LWR_MODEL" = "libtool"; then
27570                 TEST_ARGS="${TEST_DEPS}"
27571                 TEST_ARG2="${TEST_DEP2}"
27572                 TINFO_LDFLAGS="-L${LIB_DIR}"
27573                 TINFO_LIBS="$TEST_ARGS"
27574                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27575                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27576         else
27577                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27578                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27579                 if test "x$with_term_driver" != xno ; then
27580                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27581                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27582                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27583                 else
27584                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27585                         TINFO_LIBS="$TEST_ARGS"
27586                 fi
27587                 TINFO_LDFLAGS="-L${LIB_DIR}"
27588                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27589         fi
27590 else
27591         # the next lines are needed for linking libtic over libncurses
27592         TINFO_NAME=${LIB_NAME}
27593         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27594         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27595         if test "x$with_tic_depends" = xyes ; then
27596                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27597         else
27598                 TICS_LIST="$SHLIB_LIST"
27599         fi
27600
27601         TINFO_LDFLAGS="-L${LIB_DIR}"
27602         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27603 fi
27604
27605 if test "$DFT_LWR_MODEL" = shared ; then
27606         case "$cf_cv_system_name" in
27607         (cygwin*|msys*)
27608                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27609                 TINFO_SUFFIX=.dll
27610                 ;;
27611         esac
27612 fi
27613
27614 if test "x$with_dlsym" = xyes ; then
27615
27616 # remove dl library from $TICS_LIST
27617 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27618
27619 fi
27620
27621 if test "$DFT_LWR_MODEL" = "libtool"; then
27622         OBJEXT=lo
27623 fi
27624
27625 # needed for Ada95
27626 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27627
27628 case "$DFT_LWR_MODEL" in
27629 (normal|debug|profile)
27630
27631 if test "$GCC" = yes ; then
27632         case "$cf_cv_system_name" in
27633         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27634                 LDFLAGS_STATIC=
27635                 LDFLAGS_SHARED=
27636                 ;;
27637         (*)     # normally, except when broken
27638                 LDFLAGS_STATIC=-static
27639                 LDFLAGS_SHARED=-dynamic
27640                 ;;
27641         esac
27642 else
27643         case "$cf_cv_system_name" in
27644         (aix[4-7]*)     # from ld manpage
27645                 LDFLAGS_STATIC=-bstatic
27646                 LDFLAGS_SHARED=-bdynamic
27647                 ;;
27648         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27649                 # We could also use just "archive" and "shared".
27650                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27651                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27652                 ;;
27653         (irix*)         # from ld manpage IRIX64
27654                 LDFLAGS_STATIC=-Bstatic
27655                 LDFLAGS_SHARED=-Bdynamic
27656                 ;;
27657         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27658                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27659                 LDFLAGS_STATIC=-noso
27660                 LDFLAGS_SHARED=-so_archive
27661                 ;;
27662         (solaris2*)
27663                 LDFLAGS_STATIC=-Bstatic
27664                 LDFLAGS_SHARED=-Bdynamic
27665                 ;;
27666         esac
27667 fi
27668
27669 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27670 then
27671         echo "$as_me:27671: checking if linker supports switching between static/dynamic" >&5
27672 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27673
27674         rm -f libconftest.a
27675         cat >conftest.$ac_ext <<EOF
27676 #line 27676 "configure"
27677 #include <stdio.h>
27678 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27679 EOF
27680         if { (eval echo "$as_me:27680: \"$ac_compile\"") >&5
27681   (eval $ac_compile) 2>&5
27682   ac_status=$?
27683   echo "$as_me:27683: \$? = $ac_status" >&5
27684   (exit "$ac_status"); } ; then
27685                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27686                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27687         fi
27688         rm -f conftest.*
27689
27690         cf_save_LIBS="$LIBS"
27691
27692         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27693         cat >"conftest.$ac_ext" <<_ACEOF
27694 #line 27694 "configure"
27695 #include "confdefs.h"
27696
27697 #line 27697 "configure"
27698 #include <stdio.h>
27699 int cf_ldflags_static(FILE *fp);
27700
27701 int
27702 main (void)
27703 {
27704
27705         return cf_ldflags_static(stdin);
27706
27707   ;
27708   return 0;
27709 }
27710 _ACEOF
27711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27712 if { (eval echo "$as_me:27712: \"$ac_link\"") >&5
27713   (eval $ac_link) 2>&5
27714   ac_status=$?
27715   echo "$as_me:27715: \$? = $ac_status" >&5
27716   (exit "$ac_status"); } &&
27717          { ac_try='test -s "conftest$ac_exeext"'
27718   { (eval echo "$as_me:27718: \"$ac_try\"") >&5
27719   (eval $ac_try) 2>&5
27720   ac_status=$?
27721   echo "$as_me:27721: \$? = $ac_status" >&5
27722   (exit "$ac_status"); }; }; then
27723
27724         # some linkers simply ignore the -dynamic
27725         case x`file "conftest$ac_exeext" 2>/dev/null` in
27726         (*static*)
27727                 cf_ldflags_static=no
27728                 ;;
27729         (*)
27730                 cf_ldflags_static=yes
27731                 ;;
27732         esac
27733
27734 else
27735   echo "$as_me: failed program was:" >&5
27736 cat "conftest.$ac_ext" >&5
27737 cf_ldflags_static=no
27738 fi
27739 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27740
27741         rm -f libconftest.*
27742         LIBS="$cf_save_LIBS"
27743
27744         echo "$as_me:27744: result: $cf_ldflags_static" >&5
27745 echo "${ECHO_T}$cf_ldflags_static" >&6
27746
27747         if test "$cf_ldflags_static" != yes
27748         then
27749                 LDFLAGS_STATIC=
27750                 LDFLAGS_SHARED=
27751         fi
27752 else
27753         LDFLAGS_STATIC=
27754         LDFLAGS_SHARED=
27755 fi
27756
27757         ;;
27758 esac
27759
27760 echo "$as_me:27760: checking where we will install curses.h" >&5
27761 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27762
27763 includesubdir=
27764 if test "$with_overwrite" = no && \
27765  { test "x$includedir" = 'x${prefix}/include' || \
27766    test "x$includedir" = "x${prefix}/include"; }
27767 then
27768         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27769 fi
27770 echo "$as_me:27770: result: ${includedir}${includesubdir}" >&5
27771 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27772
27773 ### Resolve a conflict between normal and wide-curses by forcing applications
27774 ### that will need libutf8 to add it to their configure script.
27775 if test "$with_overwrite" != no ; then
27776 if test "$NCURSES_LIBUTF8" = 1 ; then
27777         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27778         { echo "$as_me:27778: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27779 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27780 fi
27781 fi
27782 WITH_OVERWRITE=$with_overwrite
27783
27784 ### At least on MinGW a shared library build without libtool
27785 ### requires adding the additional libs to the link list.
27786 case "$cf_cv_system_name" in
27787 (*mingw32*|*mingw64*)
27788         if test "$DFT_LWR_MODEL" != "libtool"; then
27789            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27790         fi
27791         ;;
27792 *)      ;;
27793 esac
27794
27795 # used to separate tack out of the tree
27796 NCURSES_TREE=
27797
27798 ### predefined stuff for the test programs
27799
27800 cat >>confdefs.h <<\EOF
27801 #define HAVE_SLK_COLOR 1
27802 EOF
27803
27804 # pkgsrc uses these
27805
27806 echo "$as_me:27806: checking for desired basename for form library" >&5
27807 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27808
27809 # Check whether --with-form-libname or --without-form-libname was given.
27810 if test "${with_form_libname+set}" = set; then
27811   withval="$with_form_libname"
27812   with_lib_basename=$withval
27813 else
27814   with_lib_basename=form
27815 fi;
27816 FORM_NAME="$with_lib_basename"
27817
27818 case "x$FORM_NAME" in
27819 (x|xno|xnone|xyes)
27820         FORM_NAME=form
27821         ;;
27822 (*)
27823         ;;
27824 esac
27825
27826 echo "$as_me:27826: result: $FORM_NAME" >&5
27827 echo "${ECHO_T}$FORM_NAME" >&6
27828
27829 echo "$as_me:27829: checking for desired basename for menu library" >&5
27830 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27831
27832 # Check whether --with-menu-libname or --without-menu-libname was given.
27833 if test "${with_menu_libname+set}" = set; then
27834   withval="$with_menu_libname"
27835   with_lib_basename=$withval
27836 else
27837   with_lib_basename=menu
27838 fi;
27839 MENU_NAME="$with_lib_basename"
27840
27841 case "x$MENU_NAME" in
27842 (x|xno|xnone|xyes)
27843         MENU_NAME=menu
27844         ;;
27845 (*)
27846         ;;
27847 esac
27848
27849 echo "$as_me:27849: result: $MENU_NAME" >&5
27850 echo "${ECHO_T}$MENU_NAME" >&6
27851
27852 echo "$as_me:27852: checking for desired basename for panel library" >&5
27853 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27854
27855 # Check whether --with-panel-libname or --without-panel-libname was given.
27856 if test "${with_panel_libname+set}" = set; then
27857   withval="$with_panel_libname"
27858   with_lib_basename=$withval
27859 else
27860   with_lib_basename=panel
27861 fi;
27862 PANEL_NAME="$with_lib_basename"
27863
27864 case "x$PANEL_NAME" in
27865 (x|xno|xnone|xyes)
27866         PANEL_NAME=panel
27867         ;;
27868 (*)
27869         ;;
27870 esac
27871
27872 echo "$as_me:27872: result: $PANEL_NAME" >&5
27873 echo "${ECHO_T}$PANEL_NAME" >&6
27874
27875 echo "$as_me:27875: checking for desired basename for cxx library" >&5
27876 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27877
27878 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27879 if test "${with_cxx_libname+set}" = set; then
27880   withval="$with_cxx_libname"
27881   with_lib_basename=$withval
27882 else
27883   with_lib_basename=ncurses++
27884 fi;
27885 CXX_NAME="$with_lib_basename"
27886
27887 case "x$CXX_NAME" in
27888 (x|xno|xnone|xyes)
27889         CXX_NAME=ncurses++
27890         ;;
27891 (*)
27892         ;;
27893 esac
27894
27895 echo "$as_me:27895: result: $CXX_NAME" >&5
27896 echo "${ECHO_T}$CXX_NAME" >&6
27897
27898 ### Construct the list of subdirectories for which we'll customize makefiles
27899 ### with the appropriate compile-rules.
27900
27901 echo "$as_me:27901: checking for src modules" >&5
27902 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27903
27904 # dependencies and linker-arguments for test-programs
27905 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27906 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27907 if test "$DFT_LWR_MODEL" = "libtool"; then
27908         TEST_ARGS="${TEST_DEPS}"
27909         TEST_ARG2="${TEST_DEP2}"
27910 else
27911         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27912         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27913 fi
27914
27915 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27916 cf_cv_src_modules=
27917 for cf_dir in $modules_to_build
27918 do
27919         if test -f "$srcdir/$cf_dir/modules" ; then
27920
27921                 # We may/may not have tack in the distribution, though the
27922                 # makefile is.
27923                 if test "$cf_dir" = tack ; then
27924                         if test "x$cf_with_tack" != "xyes"; then
27925                                 continue
27926                         fi
27927                 fi
27928
27929                 if test -z "$cf_cv_src_modules"; then
27930                         cf_cv_src_modules=$cf_dir
27931                 else
27932                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27933                 fi
27934
27935                 # Make the ncurses_cfg.h file record the library interface files as
27936                 # well.  These are header files that are the same name as their
27937                 # directory.  Ncurses is the only library that does not follow
27938                 # that pattern.
27939                 if test "$cf_dir" = tack ; then
27940                         continue
27941                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27942
27943 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27944
27945                         cat >>confdefs.h <<EOF
27946 #define HAVE_${cf_have_include}_H 1
27947 EOF
27948
27949                         cat >>confdefs.h <<EOF
27950 #define HAVE_LIB${cf_have_include} 1
27951 EOF
27952
27953 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27954
27955 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
27956
27957                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27958                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27959                         if test "$DFT_LWR_MODEL" = "libtool"; then
27960                                 TEST_ARGS="${TEST_DEPS}"
27961                                 TEST_ARG2="${TEST_DEP2}"
27962                         else
27963                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27964                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27965                         fi
27966                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27967                 fi
27968         fi
27969 done
27970 echo "$as_me:27970: result: $cf_cv_src_modules" >&5
27971 echo "${ECHO_T}$cf_cv_src_modules" >&6
27972
27973 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27974 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27975
27976 SRC_SUBDIRS=
27977 if test "x$cf_with_manpages" != xno ; then
27978         SRC_SUBDIRS="$SRC_SUBDIRS man"
27979 fi
27980 SRC_SUBDIRS="$SRC_SUBDIRS include"
27981 for cf_dir in $cf_cv_src_modules
27982 do
27983         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27984 done
27985 if test "x$cf_with_tests" != "xno" ; then
27986         SRC_SUBDIRS="$SRC_SUBDIRS test"
27987 fi
27988 # always make this, to install the ncurses-config script
27989 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27990 if test "$cf_with_cxx_binding" != no; then
27991         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27992         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27993 fi
27994
27995 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27996 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27997
27998 ADA_SUBDIRS=
27999 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28000         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28001         ADA_SUBDIRS="gen src"
28002         if test "x$cf_with_tests" != "xno" ; then
28003                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28004         fi
28005 fi
28006
28007 SUB_MAKEFILES=
28008 for cf_dir in $SRC_SUBDIRS
28009 do
28010         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28011 done
28012
28013 if test -n "$ADA_SUBDIRS"; then
28014         for cf_dir in $ADA_SUBDIRS
28015         do
28016                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28017         done
28018
28019 fi
28020
28021 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28022    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28023    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28024    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28025 fi
28026
28027 DIRS_TO_MAKE="lib"
28028 for cf_item in $cf_list_models
28029 do
28030
28031         case $cf_item in
28032         (libtool) cf_subdir='obj_lo'  ;;
28033         (normal)  cf_subdir='objects' ;;
28034         (debug)   cf_subdir='obj_g' ;;
28035         (profile) cf_subdir='obj_p' ;;
28036         (shared)
28037                 case "$cf_cv_system_name" in
28038                 (cygwin|msys)
28039                         cf_subdir='objects' ;;
28040                 (*)
28041                         cf_subdir='obj_s' ;;
28042                 esac
28043         esac
28044
28045         for cf_item2 in $DIRS_TO_MAKE
28046         do
28047                 test "$cf_item2" = "$cf_subdir" && break
28048         done
28049         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28050 done
28051 for cf_dir in $DIRS_TO_MAKE
28052 do
28053         test ! -d "$cf_dir" && mkdir "$cf_dir"
28054 done
28055
28056 # symbols that differ when compiling Ada95 by itself.
28057 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28058
28059 # values to use as strings
28060
28061 cat >>confdefs.h <<EOF
28062 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28063 EOF
28064
28065 cat >>confdefs.h <<EOF
28066 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28067 EOF
28068
28069 ### Define substitutions for header files to avoid name-pollution
28070
28071 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28072         HAVE_TCGETATTR=1
28073 else
28074         HAVE_TCGETATTR=0
28075 fi
28076
28077 if test "x$ac_cv_header_stdint_h" = xyes ; then
28078         HAVE_STDINT_H=1
28079 else
28080         HAVE_STDINT_H=0
28081 fi
28082
28083 if test "x$ac_cv_header_termio_h" = xyes ; then
28084         HAVE_TERMIO_H=1
28085 else
28086         HAVE_TERMIO_H=0
28087 fi
28088
28089 if test "x$ac_cv_header_termios_h" = xyes ; then
28090         HAVE_TERMIOS_H=1
28091 else
28092         HAVE_TERMIOS_H=0
28093 fi
28094
28095 ################################################################################
28096 test "x$use_database" = xyes && \
28097 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28098
28099 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28100 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28101
28102 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28103 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28104 fi
28105
28106 if test "x$cf_with_tests" != xno ; then
28107         MAKE_TESTS=
28108 else
28109         MAKE_TESTS="#"
28110 fi
28111
28112 ADAHTML_DIR=../../doc/html/ada
28113
28114 # workaround for OS/2 (20151017)
28115 case "$cf_cv_system_name" in
28116 (os2*)
28117         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28118         ;;
28119 (*)
28120         LIBTOOL_OPTS_CXX=
28121         ;;
28122 esac
28123
28124 # workaround for g++ versus Solaris (20131116)
28125 case "$cf_cv_system_name" in
28126 (solaris2*)
28127         case "x$CPPFLAGS" in
28128         (*-D_XOPEN_SOURCE_EXTENDED*)
28129                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28130
28131 echo "${as_me:-configure}:28131: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28132
28133                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28134                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28135                 ;;
28136         esac
28137         ;;
28138 esac
28139
28140 # Help to automatically enable the extended curses features when using either
28141 # the *-config or the ".pc" files by adding defines.
28142 echo "$as_me:28142: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28143 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28144 PKG_CFLAGS=
28145 for cf_loop1 in $CPPFLAGS_after_XOPEN
28146 do
28147         cf_found=no
28148         for cf_loop2 in $CPPFLAGS_before_XOPEN
28149         do
28150                 if test "x$cf_loop1" = "x$cf_loop2"
28151                 then
28152                         cf_found=yes
28153                         break
28154                 fi
28155         done
28156         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28157 done
28158 echo "$as_me:28158: result: $PKG_CFLAGS" >&5
28159 echo "${ECHO_T}$PKG_CFLAGS" >&6
28160
28161 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28162 case "x$NCURSES_OSPEED" in
28163 (*short*)
28164         cf_compatible=1
28165         ;;
28166 (*)
28167         cf_compatible=0
28168         ;;
28169 esac
28170
28171 cat >>confdefs.h <<EOF
28172 #define NCURSES_OSPEED_COMPAT $cf_compatible
28173 EOF
28174
28175 case "x$cf_cv_typeof_chtype" in
28176 (xshort|xint|xlong)
28177         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28178         ;;
28179 esac
28180
28181 case "x$cf_cv_typeof_mmask_t" in
28182 (xshort|xint|xlong)
28183         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28184         ;;
28185 esac
28186
28187 # substitute into misc/Makefile to suppress
28188 # (un)install.data from the
28189 # (un)install rules.
28190 if test "x$cf_with_db_install" = "xno"; then
28191         MISC_INSTALL_DATA=
28192         MISC_UNINSTALL_DATA=
28193 else
28194         MISC_INSTALL_DATA=install.data
28195         MISC_UNINSTALL_DATA=uninstall.data
28196 fi
28197
28198 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28199         MAKE_DATABASE="#"
28200 else
28201         MAKE_DATABASE="$MAKE_TERMINFO"
28202 fi
28203
28204 if test -n "$PACKAGE"
28205 then
28206         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28207         export PACKAGE
28208         echo "package: $PACKAGE"
28209 fi
28210
28211 UNALTERED_SYMS=
28212 cf_filter_syms=no
28213
28214 if test -n "$RESULTING_SYMS"
28215 then
28216         cf_filter_syms=$cf_dft_filter_syms
28217         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28218
28219 echo "${as_me:-configure}:28219: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28220
28221 fi
28222
28223 if test "x$WILDCARD_SYMS" = xno
28224 then
28225         cf_filter_syms=yes
28226 fi
28227
28228 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28229
28230 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28231 if test "$cf_filter_syms" = yes
28232 then
28233         RESULTING_SYMS=resulting.map
28234 fi
28235
28236 if test "x$cross_compiling" = xyes ; then
28237         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28238         CHECK_BUILD="#"
28239 else
28240         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28241         CHECK_BUILD=
28242 fi
28243
28244 # This is used for the *-config script and *.pc data files.
28245
28246 echo "$as_me:28246: checking for linker search path" >&5
28247 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28248 if test "${cf_cv_ld_searchpath+set}" = set; then
28249   echo $ECHO_N "(cached) $ECHO_C" >&6
28250 else
28251
28252 if test "$cross_compiling" != yes ; then
28253
28254 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28255 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28256
28257 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28258 # update the cache, which makes it run faster.
28259 test -z "$cf_pathlist" && \
28260         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
28261
28262 test -z "$cf_pathlist" &&
28263         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
28264
28265 # This works with OpenBSD 6.5, which lists only filenames
28266 test -z "$cf_pathlist" &&
28267         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28268
28269 if test -z "$cf_pathlist"
28270 then
28271         # dyld default path with MacOS
28272         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28273         then
28274                 # do this to bypass check
28275                 cf_cv_ld_searchpath='$HOME/lib'
28276                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28277         fi
28278 fi
28279
28280 if test -z "$cf_pathlist"
28281 then
28282         # Solaris is hardcoded
28283         if test -d /opt/SUNWspro/lib
28284         then
28285                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
28286         elif test -d /usr/ccs/lib
28287         then
28288                 cf_pathlist="/usr/ccs/lib /usr/lib"
28289         fi
28290 fi
28291
28292 fi
28293
28294 # If nothing else, assume it is conventional
28295 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28296
28297 # Finally, check that this is only directories
28298 for cf_path in $0 $cf_pathlist
28299 do
28300         if test -d "$cf_path"; then
28301                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28302                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28303         fi
28304 done
28305
28306 # Ensure that it is nonempty
28307 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28308
28309 fi
28310 echo "$as_me:28310: result: $cf_cv_ld_searchpath" >&5
28311 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28312
28313 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28314
28315 cat >>confdefs.h <<\EOF
28316 #define HAVE_CURSES_DATA_BOOLNAMES 1
28317 EOF
28318
28319 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"
28320 ac_config_commands="$ac_config_commands default"
28321 cat >confcache <<\_ACEOF
28322 # This file is a shell script that caches the results of configure
28323 # tests run on this system so they can be shared between configure
28324 # scripts and configure runs, see configure's option --config-cache.
28325 # It is not useful on other systems.  If it contains results you don't
28326 # want to keep, you may remove or edit it.
28327 #
28328 # config.status only pays attention to the cache file if you give it
28329 # the --recheck option to rerun configure.
28330 #
28331 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28332 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28333 # following values.
28334
28335 _ACEOF
28336
28337 # The following way of writing the cache mishandles newlines in values,
28338 # but we know of no workaround that is simple, portable, and efficient.
28339 # So, don't put newlines in cache variables' values.
28340 # Ultrix sh set writes to stderr and can't be redirected directly,
28341 # and sets the high bit in the cache file unless we assign to the vars.
28342 {
28343   (set) 2>&1 |
28344     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28345     *ac_space=\ *)
28346       # `set' does not quote correctly, so add quotes (double-quote
28347       # substitution turns \\\\ into \\, and sed turns \\ into \).
28348       sed -n \
28349         "s/'/'\\\\''/g;
28350           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28351       ;;
28352     *)
28353       # `set' quotes correctly as required by POSIX, so do not add quotes.
28354       sed -n \
28355         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28356       ;;
28357     esac;
28358 } |
28359   sed '
28360      t clear
28361      : clear
28362      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28363      t end
28364      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28365      : end' >>confcache
28366 if cmp -s $cache_file confcache; then :; else
28367   if test -w $cache_file; then
28368     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28369     cat confcache >$cache_file
28370   else
28371     echo "not updating unwritable cache $cache_file"
28372   fi
28373 fi
28374 rm -f confcache
28375
28376 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28377 # Let make expand exec_prefix.
28378 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28379
28380 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28381 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28382 # trailing colons and then remove the whole line if VPATH becomes empty
28383 # (actually we leave an empty line to preserve line numbers).
28384 if test "x$srcdir" = x.; then
28385   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28386 s/:*\$(srcdir):*/:/;
28387 s/:*\${srcdir}:*/:/;
28388 s/:*@srcdir@:*/:/;
28389 s/^\([^=]*=[    ]*\):*/\1/;
28390 s/:*$//;
28391 s/^[^=]*=[      ]*$//;
28392 }'
28393 fi
28394
28395 DEFS=-DHAVE_CONFIG_H
28396
28397 : "${CONFIG_STATUS=./config.status}"
28398 ac_clean_files_save=$ac_clean_files
28399 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28400 { echo "$as_me:28400: creating $CONFIG_STATUS" >&5
28401 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28402 cat >"$CONFIG_STATUS" <<_ACEOF
28403 #! $SHELL
28404 # Generated automatically by configure.
28405 # Run this file to recreate the current configuration.
28406 # Compiler output produced by configure, useful for debugging
28407 # configure, is in config.log if it exists.
28408
28409 debug=false
28410 SHELL=\${CONFIG_SHELL-$SHELL}
28411 ac_cs_invocation="\$0 \$@"
28412
28413 CLICOLOR_FORCE= GREP_OPTIONS=
28414 unset CLICOLOR_FORCE GREP_OPTIONS
28415 _ACEOF
28416
28417 cat >>"$CONFIG_STATUS" <<\_ACEOF
28418 # Be Bourne compatible
28419 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28420   emulate sh
28421   NULLCMD=:
28422 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28423   set -o posix
28424 fi
28425
28426 # Name of the executable.
28427 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28428
28429 if expr a : '\(a\)' >/dev/null 2>&1; then
28430   as_expr=expr
28431 else
28432   as_expr=false
28433 fi
28434
28435 rm -f conf$$ conf$$.exe conf$$.file
28436 echo >conf$$.file
28437 if ln -s conf$$.file conf$$ 2>/dev/null; then
28438   # We could just check for DJGPP; but this test a) works b) is more generic
28439   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28440   if test -f conf$$.exe; then
28441     # Don't use ln at all; we don't have any links
28442     as_ln_s='cp -p'
28443   else
28444     as_ln_s='ln -s'
28445   fi
28446 elif ln conf$$.file conf$$ 2>/dev/null; then
28447   as_ln_s=ln
28448 else
28449   as_ln_s='cp -p'
28450 fi
28451 rm -f conf$$ conf$$.exe conf$$.file
28452
28453 as_executable_p="test -f"
28454
28455 # Support unset when possible.
28456 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28457   as_unset="unset"
28458 else
28459   as_unset="false"
28460 fi
28461
28462 # NLS nuisances.
28463 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28464 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28465 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28466 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28467 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28468 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28469 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28470 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28471
28472 # IFS
28473 # We need space, tab and new line, in precisely that order.
28474 as_nl='
28475 '
28476 IFS="   $as_nl"
28477
28478 # CDPATH.
28479 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28480
28481 exec 6>&1
28482
28483 _ACEOF
28484
28485 # Files that config.status was made for.
28486 if test -n "$ac_config_files"; then
28487   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28488 fi
28489
28490 if test -n "$ac_config_headers"; then
28491   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28492 fi
28493
28494 if test -n "$ac_config_links"; then
28495   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28496 fi
28497
28498 if test -n "$ac_config_commands"; then
28499   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28500 fi
28501
28502 cat >>"$CONFIG_STATUS" <<\EOF
28503
28504 ac_cs_usage="\
28505 \`$as_me' instantiates files from templates according to the
28506 current configuration.
28507
28508 Usage: $0 [OPTIONS] [FILE]...
28509
28510   -h, --help       print this help, then exit
28511   -V, --version    print version number, then exit
28512   -d, --debug      don't remove temporary files
28513       --recheck    update $as_me by reconfiguring in the same conditions
28514   --file=FILE[:TEMPLATE]
28515                    instantiate the configuration file FILE
28516   --header=FILE[:TEMPLATE]
28517                    instantiate the configuration header FILE
28518
28519 Configuration files:
28520 $config_files
28521
28522 Configuration headers:
28523 $config_headers
28524
28525 Configuration commands:
28526 $config_commands
28527
28528 Report bugs to <dickey@invisible-island.net>."
28529 EOF
28530
28531 cat >>"$CONFIG_STATUS" <<EOF
28532 ac_cs_version="\\
28533 config.status
28534 configured by $0, generated by GNU Autoconf 2.52.20210105,
28535   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28536
28537 Copyright 2003-2020,2021        Thomas E. Dickey
28538 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28539 Free Software Foundation, Inc.
28540 This config.status script is free software; the Free Software Foundation
28541 gives unlimited permission to copy, distribute and modify it."
28542 srcdir="$srcdir"
28543 INSTALL="$INSTALL"
28544 EOF
28545
28546 cat >>"$CONFIG_STATUS" <<\EOF
28547 # If no file are specified by the user, then we need to provide default
28548 # value.  By we need to know if files were specified by the user.
28549 ac_need_defaults=:
28550 while test $# != 0
28551 do
28552   case $1 in
28553   --*=*)
28554     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28555     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28556     shift
28557     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28558     shift
28559     ;;
28560   -*);;
28561   *) # This is not an option, so the user has probably given explicit
28562      # arguments.
28563      ac_need_defaults=false;;
28564   esac
28565
28566   case $1 in
28567   # Handling of the options.
28568 EOF
28569 cat >>"$CONFIG_STATUS" <<EOF
28570   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28571     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28572     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28573 EOF
28574 cat >>"$CONFIG_STATUS" <<\EOF
28575   --version | --vers* | -V )
28576     echo "$ac_cs_version"; exit 0 ;;
28577   --he | --h)
28578     # Conflict between --help and --header
28579     { { echo "$as_me:28579: error: ambiguous option: $1
28580 Try \`$0 --help' for more information." >&5
28581 echo "$as_me: error: ambiguous option: $1
28582 Try \`$0 --help' for more information." >&2;}
28583    { (exit 1); exit 1; }; };;
28584   --help | --hel | -h )
28585     echo "$ac_cs_usage"; exit 0 ;;
28586   --debug | --d* | -d )
28587     debug=: ;;
28588   --file | --fil | --fi | --f )
28589     shift
28590     CONFIG_FILES="$CONFIG_FILES $1"
28591     ac_need_defaults=false;;
28592   --header | --heade | --head | --hea )
28593     shift
28594     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28595     ac_need_defaults=false;;
28596
28597   # This is an error.
28598   -*) { { echo "$as_me:28598: error: unrecognized option: $1
28599 Try \`$0 --help' for more information." >&5
28600 echo "$as_me: error: unrecognized option: $1
28601 Try \`$0 --help' for more information." >&2;}
28602    { (exit 1); exit 1; }; } ;;
28603
28604   *) ac_config_targets="$ac_config_targets $1" ;;
28605
28606   esac
28607   shift
28608 done
28609
28610 exec 5>>config.log
28611 cat >&5 << _ACEOF
28612
28613 ## ----------------------- ##
28614 ## Running config.status.  ##
28615 ## ----------------------- ##
28616
28617 This file was extended by $as_me 2.52.20210105, executed with
28618   CONFIG_FILES    = $CONFIG_FILES
28619   CONFIG_HEADERS  = $CONFIG_HEADERS
28620   CONFIG_LINKS    = $CONFIG_LINKS
28621   CONFIG_COMMANDS = $CONFIG_COMMANDS
28622   > "$ac_cs_invocation"
28623 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28624
28625 _ACEOF
28626 EOF
28627
28628 cat >>"$CONFIG_STATUS" <<EOF
28629 #
28630 # INIT-COMMANDS section.
28631 #
28632
28633 ### Special initialization commands, used to pass information from the
28634 ### configuration-run into config.status
28635
28636 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28637 AWK="$AWK"
28638 CXX_NAME="$CXX_NAME"
28639 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28640 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28641 ECHO_LD="$ECHO_LD"
28642 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28643 FORM_NAME="$FORM_NAME"
28644 LDCONFIG="$LDCONFIG"
28645 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28646 LIB_NAME="$LIB_NAME"
28647 LIB_PREFIX="$LIB_PREFIX"
28648 LIB_SUBSETS="$LIB_SUBSETS"
28649 LIB_SUFFIX="$LIB_SUFFIX"
28650 LIB_TRACING="$LIB_TRACING"
28651 LN_S="$LN_S"
28652 MAKE_TERMINFO="$MAKE_TERMINFO"
28653 MENU_NAME="$MENU_NAME"
28654 NCURSES_MAJOR="$NCURSES_MAJOR"
28655 NCURSES_MINOR="$NCURSES_MINOR"
28656 NCURSES_OSPEED="$NCURSES_OSPEED"
28657 NCURSES_PATCH="$NCURSES_PATCH"
28658 PANEL_NAME="$PANEL_NAME"
28659 SRC_SUBDIRS="$SRC_SUBDIRS"
28660 TERMINFO="$TERMINFO"
28661 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28662 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28663 TICS_NAME="$TICS_NAME"
28664 TICS_SUFFIX="$TICS_SUFFIX"
28665 TIC_PATH="$TIC_PATH"
28666 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28667 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28668 TINFO_NAME="$TINFO_NAME"
28669 TINFO_SUFFIX="$TINFO_SUFFIX"
28670 UNALTERED_SYMS="$UNALTERED_SYMS"
28671 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28672 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28673 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28674 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28675 WILDCARD_SYMS="$WILDCARD_SYMS"
28676 WITH_CURSES_H="$with_curses_h"
28677 WITH_ECHO="${enable_echo:=yes}"
28678 WITH_OVERWRITE="$with_overwrite"
28679 cf_LIST_MODELS="$cf_list_models"
28680 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28681 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28682 cf_cv_abi_version="$cf_cv_abi_version"
28683 cf_cv_do_relink="$cf_cv_do_relink"
28684 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28685 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28686 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28687 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28688 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28689 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28690 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28691 cf_cv_rel_version="$cf_cv_rel_version"
28692 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28693 cf_cv_shared_soname='$cf_cv_shared_soname'
28694 cf_cv_shlib_version="$cf_cv_shlib_version"
28695 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28696 cf_cv_system_name="$cf_cv_system_name"
28697 cf_cv_term_driver="$with_term_driver"
28698 cf_with_ada="$cf_with_ada"
28699 cf_with_cxx_binding="$cf_with_cxx_binding"
28700 cf_with_db_install="$cf_with_db_install"
28701 cf_with_manpages="$cf_with_manpages"
28702 cf_with_tests="$cf_with_tests"
28703 host="$host"
28704 target="$target"
28705 with_shared_cxx="$with_shared_cxx"
28706
28707 EOF
28708
28709 cat >>"$CONFIG_STATUS" <<\EOF
28710 for ac_config_target in $ac_config_targets
28711 do
28712   case "$ac_config_target" in
28713   # Handling of arguments.
28714   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28715   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28716   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28717   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28718   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28719   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28720   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28721   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28722   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28723   *) { { echo "$as_me:28723: error: invalid argument: $ac_config_target" >&5
28724 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28725    { (exit 1); exit 1; }; };;
28726   esac
28727 done
28728
28729 # If the user did not use the arguments to specify the items to instantiate,
28730 # then the envvar interface is used.  Set only those that are not.
28731 # We use the long form for the default assignment because of an extremely
28732 # bizarre bug on SunOS 4.1.3.
28733 if "$ac_need_defaults"; then
28734   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28735   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28736   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28737 fi
28738
28739 # Create a temporary directory, and hook for its removal unless debugging.
28740 $debug ||
28741 {
28742   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28743   trap '{ (exit 1); exit 1; }' 1 2 13 15
28744 }
28745
28746 # Create a (secure) tmp directory for tmp files.
28747 : ${TMPDIR=/tmp}
28748 {
28749   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28750   test -n "$tmp" && test -d "$tmp"
28751 }  ||
28752 {
28753   tmp=$TMPDIR/cs$$-$RANDOM
28754   (umask 077 && mkdir $tmp)
28755 } ||
28756 {
28757    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28758    { (exit 1); exit 1; }
28759 }
28760
28761 EOF
28762
28763 cat >>"$CONFIG_STATUS" <<EOF
28764
28765 #
28766 # CONFIG_FILES section.
28767 #
28768
28769 # No need to generate the scripts if there are no CONFIG_FILES.
28770 # This happens for instance when ./config.status config.h
28771 if test -n "\$CONFIG_FILES"; then
28772   # Protect against being on the right side of a sed subst in config.status.
28773   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28774    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28775 s,@SHELL@,$SHELL,;t t
28776 s,@exec_prefix@,$exec_prefix,;t t
28777 s,@prefix@,$prefix,;t t
28778 s,@program_transform_name@,$program_transform_name,;t t
28779 s,@bindir@,$bindir,;t t
28780 s,@sbindir@,$sbindir,;t t
28781 s,@libexecdir@,$libexecdir,;t t
28782 s,@datarootdir@,$datarootdir,;t t
28783 s,@datadir@,$datadir,;t t
28784 s,@sysconfdir@,$sysconfdir,;t t
28785 s,@sharedstatedir@,$sharedstatedir,;t t
28786 s,@localstatedir@,$localstatedir,;t t
28787 s,@runstatedir@,$runstatedir,;t t
28788 s,@libdir@,$libdir,;t t
28789 s,@includedir@,$includedir,;t t
28790 s,@oldincludedir@,$oldincludedir,;t t
28791 s,@infodir@,$infodir,;t t
28792 s,@mandir@,$mandir,;t t
28793 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28794 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28795 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28796 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28797 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28798 s,@build_alias@,$build_alias,;t t
28799 s,@host_alias@,$host_alias,;t t
28800 s,@target_alias@,$target_alias,;t t
28801 s,@ECHO_C@,$ECHO_C,;t t
28802 s,@ECHO_N@,$ECHO_N,;t t
28803 s,@ECHO_T@,$ECHO_T,;t t
28804 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28805 s,@DEFS@,$DEFS,;t t
28806 s,@LIBS@,$LIBS,;t t
28807 s,@top_builddir@,$top_builddir,;t t
28808 s,@GREP@,$GREP,;t t
28809 s,@EGREP@,$EGREP,;t t
28810 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28811 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28812 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28813 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28814 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28815 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28816 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28817 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28818 s,@VERSION@,$VERSION,;t t
28819 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28820 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28821 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28822 s,@PACKAGE@,$PACKAGE,;t t
28823 s,@build@,$build,;t t
28824 s,@build_cpu@,$build_cpu,;t t
28825 s,@build_vendor@,$build_vendor,;t t
28826 s,@build_os@,$build_os,;t t
28827 s,@host@,$host,;t t
28828 s,@host_cpu@,$host_cpu,;t t
28829 s,@host_vendor@,$host_vendor,;t t
28830 s,@host_os@,$host_os,;t t
28831 s,@target@,$target,;t t
28832 s,@target_cpu@,$target_cpu,;t t
28833 s,@target_vendor@,$target_vendor,;t t
28834 s,@target_os@,$target_os,;t t
28835 s,@FGREP@,$FGREP,;t t
28836 s,@CC@,$CC,;t t
28837 s,@CFLAGS@,$CFLAGS,;t t
28838 s,@LDFLAGS@,$LDFLAGS,;t t
28839 s,@CPPFLAGS@,$CPPFLAGS,;t t
28840 s,@ac_ct_CC@,$ac_ct_CC,;t t
28841 s,@EXEEXT@,$EXEEXT,;t t
28842 s,@OBJEXT@,$OBJEXT,;t t
28843 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28844 s,@CPP@,$CPP,;t t
28845 s,@LDCONFIG@,$LDCONFIG,;t t
28846 s,@CXX@,$CXX,;t t
28847 s,@CXXFLAGS@,$CXXFLAGS,;t t
28848 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28849 s,@AWK@,$AWK,;t t
28850 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28851 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28852 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28853 s,@LINT@,$LINT,;t t
28854 s,@LINT_OPTS@,$LINT_OPTS,;t t
28855 s,@LN_S@,$LN_S,;t t
28856 s,@cf_config_suffix@,$cf_config_suffix,;t t
28857 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28858 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28859 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28860 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28861 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28862 s,@SET_MAKE@,$SET_MAKE,;t t
28863 s,@CTAGS@,$CTAGS,;t t
28864 s,@ETAGS@,$ETAGS,;t t
28865 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28866 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28867 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28868 s,@RANLIB@,$RANLIB,;t t
28869 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28870 s,@LD@,$LD,;t t
28871 s,@ac_ct_LD@,$ac_ct_LD,;t t
28872 s,@AR@,$AR,;t t
28873 s,@ac_ct_AR@,$ac_ct_AR,;t t
28874 s,@NM@,$NM,;t t
28875 s,@ac_ct_NM@,$ac_ct_NM,;t t
28876 s,@ARFLAGS@,$ARFLAGS,;t t
28877 s,@DESTDIR@,$DESTDIR,;t t
28878 s,@BUILD_CC@,$BUILD_CC,;t t
28879 s,@BUILD_CPP@,$BUILD_CPP,;t t
28880 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28881 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28882 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28883 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28884 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28885 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28886 s,@cf_list_models@,$cf_list_models,;t t
28887 s,@ABI_VERSION@,$ABI_VERSION,;t t
28888 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28889 s,@LIBTOOL@,$LIBTOOL,;t t
28890 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28891 s,@LT_UNDEF@,$LT_UNDEF,;t t
28892 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28893 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28894 s,@LIB_CREATE@,$LIB_CREATE,;t t
28895 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28896 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28897 s,@LIB_PREP@,$LIB_PREP,;t t
28898 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28899 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28900 s,@LIB_LINK@,$LIB_LINK,;t t
28901 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28902 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28903 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28904 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28905 s,@TICS_NAME@,$TICS_NAME,;t t
28906 s,@TINFO_NAME@,$TINFO_NAME,;t t
28907 s,@LIB_NAME@,$LIB_NAME,;t t
28908 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28909 s,@CC_G_OPT@,$CC_G_OPT,;t t
28910 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28911 s,@LD_MODEL@,$LD_MODEL,;t t
28912 s,@shlibdir@,$shlibdir,;t t
28913 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28914 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28915 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28916 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28917 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28918 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28919 s,@LINK_PROGS@,$LINK_PROGS,;t t
28920 s,@LINK_TESTS@,$LINK_TESTS,;t t
28921 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28922 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28923 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28924 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28925 s,@RPATH_LIST@,$RPATH_LIST,;t t
28926 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28927 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28928 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28929 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28930 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28931 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28932 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28933 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28934 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28935 s,@TIC@,$TIC,;t t
28936 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28937 s,@INFOCMP@,$INFOCMP,;t t
28938 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28939 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28940 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28941 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28942 s,@XTERM_KBS@,$XTERM_KBS,;t t
28943 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28944 s,@TERMINFO@,$TERMINFO,;t t
28945 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28946 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28947 s,@TERMPATH@,$TERMPATH,;t t
28948 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28949 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28950 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28951 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28952 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28953 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28954 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28955 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28956 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28957 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28958 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28959 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28960 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28961 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28962 s,@RGB_PATH@,$RGB_PATH,;t t
28963 s,@no_x11_rgb@,$no_x11_rgb,;t t
28964 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28965 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28966 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28967 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28968 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28969 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28970 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28971 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28972 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28973 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28974 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28975 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28976 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28977 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28978 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28979 s,@PTHREAD@,$PTHREAD,;t t
28980 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28981 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28982 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28983 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28984 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28985 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28986 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28987 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28988 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28989 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28990 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28991 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28992 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28993 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28994 s,@ECHO_LT@,$ECHO_LT,;t t
28995 s,@ECHO_LD@,$ECHO_LD,;t t
28996 s,@RULE_CC@,$RULE_CC,;t t
28997 s,@SHOW_CC@,$SHOW_CC,;t t
28998 s,@ECHO_CC@,$ECHO_CC,;t t
28999 s,@ECHO_LINK@,$ECHO_LINK,;t t
29000 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29001 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29002 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29003 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29004 s,@ADAFLAGS@,$ADAFLAGS,;t t
29005 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29006 s,@ADA_TRACE@,$ADA_TRACE,;t t
29007 s,@MATH_LIB@,$MATH_LIB,;t t
29008 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29009 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29010 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29011 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29012 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29013 s,@TEST_LIBS@,$TEST_LIBS,;t t
29014 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29015 s,@CXXCPP@,$CXXCPP,;t t
29016 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29017 s,@CXX_AR@,$CXX_AR,;t t
29018 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29019 s,@CXXLIBS@,$CXXLIBS,;t t
29020 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29021 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29022 s,@M4_exists@,$M4_exists,;t t
29023 s,@cf_ada_make@,$cf_ada_make,;t t
29024 s,@cf_ada_config@,$cf_ada_config,;t t
29025 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29026 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29027 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29028 s,@cf_compile_generics@,$cf_compile_generics,;t t
29029 s,@cf_generic_objects@,$cf_generic_objects,;t t
29030 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29031 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29032 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29033 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29034 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29035 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29036 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29037 s,@cf_ada_package@,$cf_ada_package,;t t
29038 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29039 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29040 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29041 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29042 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29043 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29044 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29045 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29046 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29047 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29048 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29049 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29050 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29051 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29052 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29053 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29054 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29055 s,@TICS_LIBS@,$TICS_LIBS,;t t
29056 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29057 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29058 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29059 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29060 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29061 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29062 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29063 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29064 s,@includesubdir@,$includesubdir,;t t
29065 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29066 s,@TICS_LIST@,$TICS_LIST,;t t
29067 s,@TINFO_LIST@,$TINFO_LIST,;t t
29068 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29069 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29070 s,@FORM_NAME@,$FORM_NAME,;t t
29071 s,@MENU_NAME@,$MENU_NAME,;t t
29072 s,@PANEL_NAME@,$PANEL_NAME,;t t
29073 s,@CXX_NAME@,$CXX_NAME,;t t
29074 s,@TEST_ARGS@,$TEST_ARGS,;t t
29075 s,@TEST_DEPS@,$TEST_DEPS,;t t
29076 s,@TEST_ARG2@,$TEST_ARG2,;t t
29077 s,@TEST_DEP2@,$TEST_DEP2,;t t
29078 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29079 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29080 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29081 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29082 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29083 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29084 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29085 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29086 s,@cross_compiling@,$cross_compiling,;t t
29087 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29088 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29089 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29090 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29091 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29092 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29093 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29094 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29095 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29096 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29097 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29098 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29099 CEOF
29100
29101 EOF
29102
29103   cat >>"$CONFIG_STATUS" <<\EOF
29104   # Split the substitutions into bite-sized pieces for seds with
29105   # small command number limits, like on Digital OSF/1 and HP-UX.
29106   ac_max_sed_lines=48
29107   ac_sed_frag=1 # Number of current file.
29108   ac_beg=1 # First line for current file.
29109   ac_end=$ac_max_sed_lines # Line after last line for current file.
29110   ac_more_lines=:
29111   ac_sed_cmds=
29112   while "$ac_more_lines"; do
29113     if test "$ac_beg" -gt 1; then
29114       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29115     else
29116       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29117     fi
29118     if test ! -s $tmp/subs.frag; then
29119       ac_more_lines=false
29120     else
29121       # The purpose of the label and of the branching condition is to
29122       # speed up the sed processing (if there are no `@' at all, there
29123       # is no need to browse any of the substitutions).
29124       # These are the two extra sed commands mentioned above.
29125       (echo ':t
29126   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29127       # It is possible to make a multiline substitution using escaped newlines.
29128       # Ensure that we do not split the substitution between script fragments.
29129       ac_BEG=$ac_end
29130       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29131       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29132       if test -s $tmp/subs.next; then
29133         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29134         if test ! -s $tmp/subs.edit; then
29135           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29136           if test ! -s $tmp/subs.edit; then
29137             if test "$ac_beg" -gt 1; then
29138               ac_end=`expr "$ac_end" - 1`
29139               continue
29140             fi
29141           fi
29142         fi
29143       fi
29144
29145       if test -z "$ac_sed_cmds"; then
29146         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29147       else
29148         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29149       fi
29150       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29151       ac_beg=$ac_end
29152       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29153     fi
29154   done
29155   if test -z "$ac_sed_cmds"; then
29156     ac_sed_cmds=cat
29157   fi
29158 fi # test -n "$CONFIG_FILES"
29159
29160 EOF
29161 cat >>"$CONFIG_STATUS" <<\EOF
29162 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29163   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29164   case "$ac_file" in
29165   - | *:- | *:-:* ) # input from stdin
29166         cat >$tmp/stdin
29167         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29168         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29169   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29170         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29171   * )   ac_file_in=$ac_file.in ;;
29172   esac
29173
29174   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29175   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29176          X"$ac_file" : 'X\(//\)[^/]' \| \
29177          X"$ac_file" : 'X\(//\)$' \| \
29178          X"$ac_file" : 'X\(/\)' \| \
29179          .     : '\(.\)' 2>/dev/null ||
29180 echo X"$ac_file" |
29181     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29182           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29183           /^X\(\/\/\)$/{ s//\1/; q; }
29184           /^X\(\/\).*/{ s//\1/; q; }
29185           s/.*/./; q'`
29186   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29187     { case "$ac_dir" in
29188   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29189   *)                      as_incr_dir=.;;
29190 esac
29191 as_dummy="$ac_dir"
29192 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29193   case $as_mkdir_dir in
29194     # Skip DOS drivespec
29195     ?:) as_incr_dir=$as_mkdir_dir ;;
29196     *)
29197       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29198       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29199     ;;
29200   esac
29201 done; }
29202
29203     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29204     # A "../" for each directory in $ac_dir_suffix.
29205     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29206   else
29207     ac_dir_suffix= ac_dots=
29208   fi
29209
29210   case "$srcdir" in
29211   .)  ac_srcdir=.
29212       if test -z "$ac_dots"; then
29213          ac_top_srcdir=.
29214       else
29215          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29216       fi ;;
29217   [\\/]* | ?:[\\/]* )
29218       ac_srcdir="$srcdir$ac_dir_suffix";
29219       ac_top_srcdir="$srcdir" ;;
29220   *) # Relative path.
29221     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29222     ac_top_srcdir="$ac_dots$srcdir" ;;
29223   esac
29224
29225   case $INSTALL in
29226   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29227   *) ac_INSTALL=$ac_dots$INSTALL ;;
29228   esac
29229
29230   if test x"$ac_file" != x-; then
29231     { echo "$as_me:29231: creating $ac_file" >&5
29232 echo "$as_me: creating $ac_file" >&6;}
29233     rm -f "$ac_file"
29234   fi
29235   # Let's still pretend it is `configure' which instantiates (i.e., don't
29236   # use $as_me), people would be surprised to read:
29237   #    /* config.h.  Generated automatically by config.status.  */
29238   configure_input="Generated automatically from `echo $ac_file_in |
29239                                                  sed 's,.*/,,'` by configure."
29240
29241   # First look for the input files in the build tree, otherwise in the
29242   # src tree.
29243   ac_file_inputs=`IFS=:
29244     for f in $ac_file_in; do
29245       case $f in
29246       -) echo $tmp/stdin ;;
29247       [\\/$]*)
29248          # Absolute (can't be DOS-style, as IFS=:)
29249          test -f "$f" || { { echo "$as_me:29249: error: cannot find input file: $f" >&5
29250 echo "$as_me: error: cannot find input file: $f" >&2;}
29251    { (exit 1); exit 1; }; }
29252          echo $f;;
29253       *) # Relative
29254          if test -f "$f"; then
29255            # Build tree
29256            echo $f
29257          elif test -f "$srcdir/$f"; then
29258            # Source tree
29259            echo "$srcdir/$f"
29260          else
29261            # /dev/null tree
29262            { { echo "$as_me:29262: error: cannot find input file: $f" >&5
29263 echo "$as_me: error: cannot find input file: $f" >&2;}
29264    { (exit 1); exit 1; }; }
29265          fi;;
29266       esac
29267     done` || { (exit 1); exit 1; }
29268 EOF
29269 cat >>"$CONFIG_STATUS" <<\EOF
29270   ac_warn_datarootdir=no
29271   if test x"$ac_file" != x-; then
29272     for ac_item in $ac_file_inputs
29273     do
29274       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29275       if test -n "$ac_seen"; then
29276         ac_used=`grep '@datarootdir@' "$ac_item"`
29277         if test -z "$ac_used"; then
29278           { echo "$as_me:29278: WARNING: datarootdir was used implicitly but not set:
29279 $ac_seen" >&5
29280 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29281 $ac_seen" >&2;}
29282           ac_warn_datarootdir=yes
29283         fi
29284       fi
29285       ac_seen=`grep '${datarootdir}' "$ac_item"`
29286       if test -n "$ac_seen"; then
29287         { echo "$as_me:29287: WARNING: datarootdir was used explicitly but not set:
29288 $ac_seen" >&5
29289 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29290 $ac_seen" >&2;}
29291         ac_warn_datarootdir=yes
29292       fi
29293     done
29294   fi
29295
29296 if test "x$ac_warn_datarootdir" = xyes; then
29297   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29298 fi
29299
29300 EOF
29301 cat >>"$CONFIG_STATUS" <<EOF
29302   sed "$ac_vpsub
29303 $extrasub
29304 EOF
29305 cat >>"$CONFIG_STATUS" <<\EOF
29306 :t
29307 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29308 s,@configure_input@,$configure_input,;t t
29309 s,@srcdir@,$ac_srcdir,;t t
29310 s,@top_srcdir@,$ac_top_srcdir,;t t
29311 s,@INSTALL@,$ac_INSTALL,;t t
29312 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29313   rm -f $tmp/stdin
29314   if test x"$ac_file" != x-; then
29315     cp "$tmp/out" "$ac_file"
29316
29317     for ac_name in prefix exec_prefix datarootdir
29318     do
29319         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29320         if test -n "$ac_seen"; then
29321             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29322             if test -z "$ac_init"; then
29323               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29324               { echo "$as_me:29324: WARNING: Variable $ac_name is used but was not set:
29325 $ac_seen" >&5
29326 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29327 $ac_seen" >&2;}
29328             fi
29329         fi
29330     done
29331     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29332     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29333     if test -s $tmp/out; then
29334       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29335       { echo "$as_me:29335: WARNING: Some variables may not be substituted:
29336 $ac_seen" >&5
29337 echo "$as_me: WARNING: Some variables may not be substituted:
29338 $ac_seen" >&2;}
29339     fi
29340   else
29341     cat $tmp/out
29342   fi
29343   rm -f $tmp/out
29344
29345 done
29346 EOF
29347 cat >>"$CONFIG_STATUS" <<\EOF
29348
29349 #
29350 # CONFIG_HEADER section.
29351 #
29352
29353 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29354 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29355 #
29356 # ac_d sets the value in "#define NAME VALUE" lines.
29357 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29358 ac_dB='[        ].*$,\1#\2'
29359 ac_dC=' '
29360 ac_dD=',;t'
29361 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29362 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29363 ac_iB='\([      ]\),\1#\2define\3'
29364 ac_iC=' '
29365 ac_iD='\4,;t'
29366 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29367 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29368 ac_uB='$,\1#\2define\3'
29369 ac_uC=' '
29370 ac_uD=',;t'
29371
29372 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29373   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29374   case "$ac_file" in
29375   - | *:- | *:-:* ) # input from stdin
29376         cat >$tmp/stdin
29377         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29378         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29379   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29380         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29381   * )   ac_file_in=$ac_file.in ;;
29382   esac
29383
29384   test x"$ac_file" != x- && { echo "$as_me:29384: creating $ac_file" >&5
29385 echo "$as_me: creating $ac_file" >&6;}
29386
29387   # First look for the input files in the build tree, otherwise in the
29388   # src tree.
29389   ac_file_inputs=`IFS=:
29390     for f in $ac_file_in; do
29391       case $f in
29392       -) echo $tmp/stdin ;;
29393       [\\/$]*)
29394          # Absolute (can't be DOS-style, as IFS=:)
29395          test -f "$f" || { { echo "$as_me:29395: error: cannot find input file: $f" >&5
29396 echo "$as_me: error: cannot find input file: $f" >&2;}
29397    { (exit 1); exit 1; }; }
29398          echo $f;;
29399       *) # Relative
29400          if test -f "$f"; then
29401            # Build tree
29402            echo $f
29403          elif test -f "$srcdir/$f"; then
29404            # Source tree
29405            echo "$srcdir/$f"
29406          else
29407            # /dev/null tree
29408            { { echo "$as_me:29408: error: cannot find input file: $f" >&5
29409 echo "$as_me: error: cannot find input file: $f" >&2;}
29410    { (exit 1); exit 1; }; }
29411          fi;;
29412       esac
29413     done` || { (exit 1); exit 1; }
29414   # Remove the trailing spaces.
29415   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29416
29417 EOF
29418
29419 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29420 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29421 # be either 'cat' or 'sort'.
29422 cat confdefs.h | uniq >conftest.vals
29423
29424 # Break up conftest.vals because some shells have a limit on
29425 # the size of here documents, and old seds have small limits too.
29426
29427 rm -f conftest.tail
29428 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29429 while grep . conftest.vals >/dev/null
29430 do
29431   # Write chunks of a limited-size here document to conftest.frag.
29432   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29433   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29434   echo 'CEOF' >> "$CONFIG_STATUS"
29435   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29436   rm -f conftest.vals
29437   mv conftest.tail conftest.vals
29438 done
29439 rm -f conftest.vals
29440
29441 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29442 # marker @DEFS@.
29443 echo '  cat >> conftest.edit <<CEOF
29444 /@DEFS@/r conftest.frag
29445 /@DEFS@/d
29446 CEOF
29447 sed -f conftest.edit $tmp/in > $tmp/out
29448 rm -f $tmp/in
29449 mv $tmp/out $tmp/in
29450 rm -f conftest.edit conftest.frag
29451 ' >> "$CONFIG_STATUS"
29452
29453 cat >>"$CONFIG_STATUS" <<\EOF
29454   # Let's still pretend it is `configure' which instantiates (i.e., don't
29455   # use $as_me), people would be surprised to read:
29456   #    /* config.h.  Generated automatically by config.status.  */
29457   if test x"$ac_file" = x-; then
29458     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29459   else
29460     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29461   fi
29462   cat $tmp/in >>$tmp/config.h
29463   rm -f $tmp/in
29464   if test x"$ac_file" != x-; then
29465     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29466       { echo "$as_me:29466: $ac_file is unchanged" >&5
29467 echo "$as_me: $ac_file is unchanged" >&6;}
29468     else
29469       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29470          X"$ac_file" : 'X\(//\)[^/]' \| \
29471          X"$ac_file" : 'X\(//\)$' \| \
29472          X"$ac_file" : 'X\(/\)' \| \
29473          .     : '\(.\)' 2>/dev/null ||
29474 echo X"$ac_file" |
29475     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29476           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29477           /^X\(\/\/\)$/{ s//\1/; q; }
29478           /^X\(\/\).*/{ s//\1/; q; }
29479           s/.*/./; q'`
29480       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29481         { case "$ac_dir" in
29482   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29483   *)                      as_incr_dir=.;;
29484 esac
29485 as_dummy="$ac_dir"
29486 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29487   case $as_mkdir_dir in
29488     # Skip DOS drivespec
29489     ?:) as_incr_dir=$as_mkdir_dir ;;
29490     *)
29491       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29492       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29493     ;;
29494   esac
29495 done; }
29496
29497       fi
29498       rm -f "$ac_file"
29499       mv "$tmp/config.h" "$ac_file"
29500     fi
29501   else
29502     cat $tmp/config.h
29503     rm -f $tmp/config.h
29504   fi
29505 done
29506 EOF
29507 cat >>"$CONFIG_STATUS" <<\EOF
29508 #
29509 # CONFIG_COMMANDS section.
29510 #
29511 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29512   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29513   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29514
29515   case "$ac_dest" in
29516     default )
29517 if test "x$cf_with_tests" != xno ; then
29518
29519 for cf_dir in test
29520 do
29521         if test ! -d "$srcdir/$cf_dir" ; then
29522                 continue
29523         elif test -f "$srcdir/$cf_dir/programs" ; then
29524                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29525         fi
29526 done
29527
29528 fi
29529
29530 cf_prefix=$LIB_PREFIX
29531
29532 case "$cf_cv_shlib_version" in
29533 (cygdll|msysdll|mingw|msvcdll)
29534         TINFO_NAME=$TINFO_ARG_SUFFIX
29535         TINFO_SUFFIX=.dll
29536         ;;
29537 esac
29538
29539 if test -n "$TINFO_SUFFIX" ; then
29540         case "$TINFO_SUFFIX" in
29541         (tw*)
29542                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29543                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29544                 ;;
29545         (t*)
29546                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29547                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29548                 ;;
29549         (w*)
29550                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29551                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29552                 ;;
29553         esac
29554 fi
29555
29556 for cf_dir in $SRC_SUBDIRS
29557 do
29558         if test ! -d "$srcdir/$cf_dir" ; then
29559                 continue
29560         elif test -f "$srcdir/$cf_dir/modules" ; then
29561
29562                 SHARED_LIB=
29563                 Libs_To_Make=
29564                 cf_awk_program=
29565                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29566                 then
29567                         cf_awk_program="$cf_awk_program\
29568 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29569 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29570 "
29571                 fi
29572
29573                 if test "x$WILDCARD_SYMS" = xno
29574                 then
29575                         cf_awk_program="$cf_awk_program\
29576 /[      ]_\\*;/ { skip=1; next; }\
29577 "
29578                 fi
29579
29580                 if test "x$cf_awk_program" != "x"
29581                 then
29582                         cat >>$cf_dir/Makefile <<CF_EOF
29583
29584 # Generated by CF_LIB_RULES
29585 resulting.map: $UNALTERED_SYMS
29586         $AWK 'BEGIN { skip = 1; last=""; } \
29587 $cf_awk_program \
29588 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29589  skip = 0; last = \$\$0; } \
29590 END { print last; }' < "$UNALTERED_SYMS" >\$@
29591
29592 distclean::
29593         rm -f resulting.map
29594 CF_EOF
29595                 fi
29596
29597                 for cf_item in $cf_LIST_MODELS
29598                 do
29599
29600         case X$cf_item in
29601         (Xlibtool)
29602                 cf_suffix='.la'
29603                 cf_depsuf=$cf_suffix
29604                 ;;
29605         (Xdebug)
29606                 case "$cf_cv_system_name" in
29607                 (*-msvc*)
29608                         cf_suffix='_g.lib'
29609                         ;;
29610                 (*)
29611                         cf_suffix='_g.a'
29612                         ;;
29613                 esac
29614                 cf_depsuf=$cf_suffix
29615                 ;;
29616         (Xprofile)
29617                 case "$cf_cv_system_name" in
29618                 (*-msvc*)
29619                         cf_suffix='_p.lib'
29620                         ;;
29621                 (*)
29622                         cf_suffix='_p.a'
29623                         ;;
29624                 esac
29625                 cf_depsuf=$cf_suffix
29626                 ;;
29627         (Xshared)
29628                 case "$cf_cv_system_name" in
29629                 (aix[5-7]*)
29630                         cf_suffix='.so'
29631                         cf_depsuf=$cf_suffix
29632                         ;;
29633                 (*-msvc*)
29634                         cf_suffix='.dll'
29635                         cf_depsuf='.dll.lib'
29636                         ;;
29637                 (cygwin*|msys*|mingw*)
29638                         cf_suffix='.dll'
29639                         cf_depsuf='.dll.a'
29640                         ;;
29641                 (darwin*)
29642                         cf_suffix='.dylib'
29643                         cf_depsuf=$cf_suffix
29644                         ;;
29645                 (hpux*)
29646                         case "$target" in
29647                         (ia64*)
29648                                 cf_suffix='.so'
29649                                 cf_depsuf=$cf_suffix
29650                                 ;;
29651                         (*)
29652                                 cf_suffix='.sl'
29653                                 cf_depsuf=$cf_suffix
29654                                 ;;
29655                         esac
29656                         ;;
29657                 (*)
29658                         cf_suffix='.so'
29659                         cf_depsuf=$cf_suffix
29660                         ;;
29661                 esac
29662                 ;;
29663         (*)
29664                 case "$target" in
29665                 (*-msvc*)
29666                         cf_suffix='.lib'
29667                         ;;
29668                 (*)
29669                         cf_suffix='.a'
29670                         ;;
29671                 esac
29672                 cf_depsuf=$cf_suffix
29673                 ;;
29674         esac
29675         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29676         then
29677                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29678                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29679         fi
29680
29681                         if test "$cf_dir" = "c++"
29682                         then
29683
29684 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29685
29686 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29687
29688                         else
29689
29690 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29691
29692 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29693
29694                         fi
29695                         test -z "$cf_libname" && cf_libname="$cf_dir"
29696                         if test "$cf_item" = shared ; then
29697                                 if test -n "${LIB_SUFFIX}"
29698                                 then
29699                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29700                                 else
29701                                         cf_shared_suffix="$cf_suffix"
29702                                 fi
29703                                 if test "$cf_cv_do_symlinks" = yes ; then
29704                                         cf_version_name=
29705
29706                                         case "$cf_cv_shlib_version" in
29707                                         (rel)
29708                                                 cf_version_name=REL_VERSION
29709                                                 ;;
29710                                         (abi)
29711                                                 cf_version_name=ABI_VERSION
29712                                                 ;;
29713                                         esac
29714
29715                                         if test -n "$cf_version_name"
29716                                         then
29717                                                 case "$cf_cv_system_name" in
29718                                                 (darwin*)
29719                                                         # "w", etc?
29720                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29721                                                         ;;
29722                                                 (*)
29723                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29724                                                         ;;
29725                                                 esac
29726                                         fi
29727                                         if test -n "${USE_LIB_SUFFIX}"
29728                                         then
29729                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29730                                         else
29731                                                 cf_shared_suffix="$cf_suffix"
29732                                         fi
29733                                 fi
29734                                 # cygwin needs import library, and has unique naming convention
29735                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29736                                 # use 'cyg' prefix for shared lib.
29737                                 case "$cf_cv_shlib_version" in
29738                                 (cygdll)
29739                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29740                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29741                                         ;;
29742                                 (msysdll)
29743                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29744                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29745                                         ;;
29746                                 (mingw)
29747                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29748                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29749                                         ;;
29750                                 (msvcdll)
29751                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29752                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29753                                         ;;
29754                                 (*)
29755                                         cf_add_lib=
29756                                         ;;
29757                                 esac
29758                                 if test -n "$cf_add_lib"
29759                                 then
29760                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29761                                         continue
29762                                 fi
29763                         fi
29764                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29765                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29766                 done
29767
29768                 if test "$cf_dir" = ncurses ; then
29769                         cf_subsets="$LIB_SUBSETS"
29770                         cf_r_parts="$cf_subsets"
29771                         cf_liblist="$Libs_To_Make"
29772
29773                         while test -n "$cf_r_parts"
29774                         do
29775                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29776                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29777                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29778                                         cf_add_lib=
29779                                         case "$cf_l_parts" in
29780                                         (*termlib*)
29781                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29782                                                 ;;
29783                                         (*ticlib*)
29784                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29785                                                 ;;
29786                                         (*)
29787                                                 break
29788                                                 ;;
29789                                         esac
29790                                         if test -n "$cf_add_lib"; then
29791                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29792                                         fi
29793                                 else
29794                                         break
29795                                 fi
29796                         done
29797                 else
29798                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29799                 fi
29800
29801                 if test "$cf_dir" = c++; then
29802                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29803                                 cf_list=
29804                                 for cf_item in $Libs_To_Make
29805                                 do
29806                                         case "$cf_item" in
29807                                         (*.a)
29808                                                 ;;
29809                                         (*)
29810                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29811                                                 ;;
29812                                         esac
29813                                         for cf_test in $cf_list
29814                                         do
29815                                                 if test "$cf_test" = "$cf_item"
29816                                                 then
29817                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29818                                                         cf_item=
29819                                                         break
29820                                                 fi
29821                                         done
29822                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29823                                 done
29824                                 Libs_To_Make="$cf_list"
29825                         fi
29826                 fi
29827
29828                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29829                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29830                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29831                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29832
29833                 $AWK -f "$srcdir/mk-0th.awk" \
29834                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29835                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29836
29837                 for cf_subset in $cf_subsets
29838                 do
29839                         cf_subdirs=
29840                         for cf_item in $cf_LIST_MODELS
29841                         do
29842
29843                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29844
29845 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29846
29847                         CXX_MODEL=$cf_ITEM
29848                         if test "$CXX_MODEL" = SHARED; then
29849                                 case "$cf_cv_shlib_version" in
29850                                 (cygdll|msysdll|mingw|msvcdll)
29851                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29852
29853 echo "${as_me:-configure}:29853: testing overriding CXX_MODEL to SHARED ..." 1>&5
29854
29855                                         with_shared_cxx=yes
29856                                         ;;
29857                                 (*)
29858                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29859                                         ;;
29860                                 esac
29861                         fi
29862
29863         case X$cf_item in
29864         (Xlibtool)
29865                 cf_suffix='.la'
29866                 cf_depsuf=$cf_suffix
29867                 ;;
29868         (Xdebug)
29869                 case "$cf_cv_system_name" in
29870                 (*-msvc*)
29871                         cf_suffix='_g.lib'
29872                         ;;
29873                 (*)
29874                         cf_suffix='_g.a'
29875                         ;;
29876                 esac
29877                 cf_depsuf=$cf_suffix
29878                 ;;
29879         (Xprofile)
29880                 case "$cf_cv_system_name" in
29881                 (*-msvc*)
29882                         cf_suffix='_p.lib'
29883                         ;;
29884                 (*)
29885                         cf_suffix='_p.a'
29886                         ;;
29887                 esac
29888                 cf_depsuf=$cf_suffix
29889                 ;;
29890         (Xshared)
29891                 case "$cf_cv_system_name" in
29892                 (aix[5-7]*)
29893                         cf_suffix='.so'
29894                         cf_depsuf=$cf_suffix
29895                         ;;
29896                 (*-msvc*)
29897                         cf_suffix='.dll'
29898                         cf_depsuf='.dll.lib'
29899                         ;;
29900                 (cygwin*|msys*|mingw*)
29901                         cf_suffix='.dll'
29902                         cf_depsuf='.dll.a'
29903                         ;;
29904                 (darwin*)
29905                         cf_suffix='.dylib'
29906                         cf_depsuf=$cf_suffix
29907                         ;;
29908                 (hpux*)
29909                         case "$target" in
29910                         (ia64*)
29911                                 cf_suffix='.so'
29912                                 cf_depsuf=$cf_suffix
29913                                 ;;
29914                         (*)
29915                                 cf_suffix='.sl'
29916                                 cf_depsuf=$cf_suffix
29917                                 ;;
29918                         esac
29919                         ;;
29920                 (*)
29921                         cf_suffix='.so'
29922                         cf_depsuf=$cf_suffix
29923                         ;;
29924                 esac
29925                 ;;
29926         (*)
29927                 case "$target" in
29928                 (*-msvc*)
29929                         cf_suffix='.lib'
29930                         ;;
29931                 (*)
29932                         cf_suffix='.a'
29933                         ;;
29934                 esac
29935                 cf_depsuf=$cf_suffix
29936                 ;;
29937         esac
29938         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29939         then
29940                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29941                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29942         fi
29943
29944         case $cf_item in
29945         (libtool) cf_subdir='obj_lo'  ;;
29946         (normal)  cf_subdir='objects' ;;
29947         (debug)   cf_subdir='obj_g' ;;
29948         (profile) cf_subdir='obj_p' ;;
29949         (shared)
29950                 case "$cf_cv_system_name" in
29951                 (cygwin|msys)
29952                         cf_subdir='objects' ;;
29953                 (*)
29954                         cf_subdir='obj_s' ;;
29955                 esac
29956         esac
29957
29958                         # Test for case where we build libtinfo with a different name.
29959                         cf_libname=$cf_dir
29960                         if test "$cf_dir" = ncurses ; then
29961                                 case "$cf_subset" in
29962                                 (*base*)
29963                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29964                                         ;;
29965                                 (*termlib*)
29966                                         cf_libname=$TINFO_LIB_SUFFIX
29967                                         ;;
29968                                 (ticlib*)
29969                                         cf_libname=$TICS_LIB_SUFFIX
29970                                         ;;
29971                                 esac
29972                         elif test "$cf_dir" = c++ ; then
29973
29974 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29975
29976 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29977
29978                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29979                         else
29980
29981 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29982
29983 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29984
29985                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29986                         fi
29987                         if test -n "${USE_ARG_SUFFIX}" ; then
29988                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29989                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29990                         fi
29991
29992                         # These dependencies really are for development, not
29993                         # builds, but they are useful in porting, too.
29994                         cf_depend="../include/ncurses_cfg.h"
29995                         if test "$srcdir" = "."; then
29996                                 cf_reldir="."
29997                         else
29998                                 cf_reldir="\${srcdir}"
29999                         fi
30000
30001                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30002                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30003                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30004                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30005                         fi
30006
30007                         cf_dir_suffix=
30008                         old_cf_suffix="$cf_suffix"
30009                         if test "$cf_cv_shlib_version_infix" = yes ; then
30010                         if test -n "$USE_LIB_SUFFIX" ; then
30011                                 case "$USE_LIB_SUFFIX" in
30012                                 (tw*)
30013                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30014                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30015                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30016                                         ;;
30017                                 (t*)
30018                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30019                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30020                                         cf_dir_suffix=t$EXTRA_SUFFIX
30021                                         ;;
30022                                 (w*)
30023                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30024                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30025                                         cf_dir_suffix=w$EXTRA_SUFFIX
30026                                         ;;
30027                                 (*)
30028                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30029                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30030                                         cf_dir_suffix=$EXTRA_SUFFIX
30031                                         ;;
30032                                 esac
30033                         fi
30034                         fi
30035
30036                         $AWK -f "$srcdir/mk-1st.awk" \
30037                                 name=${cf_libname}${cf_dir_suffix} \
30038                                 traces=$LIB_TRACING \
30039                                 MODEL=$cf_ITEM \
30040                                 CXX_MODEL=$CXX_MODEL \
30041                                 model=$cf_subdir \
30042                                 prefix=$cf_prefix \
30043                                 suffix=$cf_suffix \
30044                                 subset=$cf_subset \
30045                                 driver=$cf_cv_term_driver \
30046                                 SymLink="$LN_S" \
30047                                 TermlibRoot=$TINFO_NAME \
30048                                 TermlibSuffix=$TINFO_SUFFIX \
30049                                 ShlibVer=$cf_cv_shlib_version \
30050                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30051                                 ReLink=${cf_cv_do_relink:-no} \
30052                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30053                                 DoLinks=$cf_cv_do_symlinks \
30054                                 rmSoLocs=$cf_cv_rm_so_locs \
30055                                 ldconfig="$LDCONFIG" \
30056                                 overwrite=$WITH_OVERWRITE \
30057                                 depend="$cf_depend" \
30058                                 host="$host" \
30059                                 libtool_version="$LIBTOOL_VERSION" \
30060                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30061
30062                         cf_suffix="$old_cf_suffix"
30063
30064                         for cf_subdir2 in $cf_subdirs lib
30065                         do
30066                                 test "$cf_subdir" = "$cf_subdir2" && break
30067                         done
30068                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30069                         $AWK -f "$srcdir/mk-2nd.awk" \
30070                                 name=$cf_dir \
30071                                 traces=$LIB_TRACING \
30072                                 MODEL=$cf_ITEM \
30073                                 model=$cf_subdir \
30074                                 subset=$cf_subset \
30075                                 srcdir=$srcdir \
30076                                 echo=$WITH_ECHO \
30077                                 crenames=$cf_cv_prog_CC_c_o \
30078                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30079                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30080                         cf_subdirs="$cf_subdirs $cf_subdir"
30081                         done
30082                 done
30083         fi
30084
30085         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
30086 done
30087
30088 for cf_dir in $SRC_SUBDIRS
30089 do
30090         if test ! -d "$srcdir/$cf_dir" ; then
30091                 continue
30092         fi
30093
30094         if test -f "$cf_dir/Makefile" ; then
30095                 case "$cf_dir" in
30096                 (Ada95)
30097                         echo 'libs \' >> Makefile
30098                         echo 'install.libs \' >> Makefile
30099                         echo 'uninstall.libs ::' >> Makefile
30100                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
30101                         ;;
30102                 esac
30103         fi
30104
30105         if test -f "$srcdir/$cf_dir/modules" ; then
30106                 echo >> Makefile
30107                 if test -f "$srcdir/$cf_dir/headers" ; then
30108 cat >> Makefile <<CF_EOF
30109 install.includes \\
30110 uninstall.includes \\
30111 CF_EOF
30112                 fi
30113 if test "$cf_dir" != "c++" ; then
30114 echo 'lint \' >> Makefile
30115 fi
30116 cat >> Makefile <<CF_EOF
30117 libs \\
30118 lintlib \\
30119 install.libs \\
30120 uninstall.libs \\
30121 install.$cf_dir \\
30122 uninstall.$cf_dir ::
30123         cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@
30124 CF_EOF
30125         elif test -f "$srcdir/$cf_dir/headers" ; then
30126 cat >> Makefile <<CF_EOF
30127
30128 libs \\
30129 install.libs \\
30130 uninstall.libs \\
30131 install.includes \\
30132 uninstall.includes ::
30133         cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@
30134 CF_EOF
30135 fi
30136 done
30137
30138 if test "x$cf_with_db_install" = xyes; then
30139 cat >> Makefile <<CF_EOF
30140
30141 install.libs uninstall.libs \\
30142 install.data uninstall.data ::
30143 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
30144 CF_EOF
30145 else
30146 cat >> Makefile <<CF_EOF
30147
30148 install.libs uninstall.libs ::
30149         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
30150 CF_EOF
30151 fi
30152
30153 if test "x$cf_with_manpages" = xyes; then
30154 cat >> Makefile <<CF_EOF
30155
30156 install.man \\
30157 uninstall.man ::
30158         cd man && \${MAKE} \${TOP_MFLAGS} \$@
30159 CF_EOF
30160 fi
30161
30162 cat >> Makefile <<CF_EOF
30163
30164 distclean ::
30165         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30166         rm -f headers.sh headers.sed mk_shared_lib.sh
30167         rm -f edit_man.* man_alias.*
30168         rm -rf \${DIRS_TO_MAKE}
30169 CF_EOF
30170
30171 # Special case: tack's manpage lives in its own directory.
30172 if test "x$cf_with_manpages" = xyes; then
30173 if test "x$cf_with_tack" = "xyes"; then
30174 cat >> Makefile <<CF_EOF
30175
30176 install.man \\
30177 uninstall.man ::
30178         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
30179 CF_EOF
30180 fi
30181 fi
30182
30183 rm -f headers.sed headers.sh
30184
30185 echo creating headers.sh
30186 cat >headers.sh <<CF_EOF
30187 #! $SHELL
30188 # This shell script is generated by the 'configure' script.  It is invoked in a
30189 # subdirectory of the build tree.  It generates a sed-script in the parent
30190 # directory that is used to adjust includes for header files that reside in a
30191 # subdirectory of /usr/include, etc.
30192 PRG=""
30193 while test \$# != 3
30194 do
30195 PRG="\$PRG \$1"; shift
30196 done
30197 DST=\$1
30198 REF=\$2
30199 SRC=\$3
30200 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30201 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30202 echo installing \$SRC in \$DST
30203 CF_EOF
30204
30205 if test "$WITH_CURSES_H" = yes; then
30206         cat >>headers.sh <<CF_EOF
30207 case \$DST in
30208 (/*/include/*)
30209         END=\`basename \$DST\`
30210         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30211         do
30212                 NAME=\`basename \$i\`
30213                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30214         done
30215         ;;
30216 (*)
30217         echo "" >> \$TMPSED
30218         ;;
30219 esac
30220 CF_EOF
30221
30222 else
30223         cat >>headers.sh <<CF_EOF
30224 case \$DST in
30225 (/*/include/*)
30226         END=\`basename \$DST\`
30227         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30228         do
30229                 NAME=\`basename \$i\`
30230                 if test "\$NAME" = "curses.h"
30231                 then
30232                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30233                         NAME=ncurses.h
30234                 fi
30235                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30236         done
30237         ;;
30238 (*)
30239         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30240         ;;
30241 esac
30242 CF_EOF
30243 fi
30244 cat >>headers.sh <<CF_EOF
30245 rm -f \$TMPSRC
30246 sed -f \$TMPSED \$SRC > \$TMPSRC
30247 NAME=\`basename \$SRC\`
30248 CF_EOF
30249 if test "$WITH_CURSES_H" != yes; then
30250         cat >>headers.sh <<CF_EOF
30251 test "\$NAME" = "curses.h" && NAME=ncurses.h
30252 CF_EOF
30253 fi
30254 cat >>headers.sh <<CF_EOF
30255 # Just in case someone gzip'd manpages, remove the conflicting copy.
30256 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30257
30258 eval \$PRG \$TMPSRC \$DST/\$NAME
30259 rm -f \$TMPSRC \$TMPSED
30260 CF_EOF
30261
30262 chmod 0755 headers.sh
30263
30264 for cf_dir in $SRC_SUBDIRS
30265 do
30266         if test ! -d "$srcdir/$cf_dir" ; then
30267                 continue
30268         fi
30269
30270         if test -f "$srcdir/$cf_dir/headers" ; then
30271                 $AWK -f "$srcdir/mk-hdr.awk" \
30272                         subset="$LIB_SUBSETS" \
30273                         compat="$WITH_CURSES_H" \
30274                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30275         fi
30276
30277         if test -f "$srcdir/$cf_dir/modules" ; then
30278                 if test "$cf_dir" != "c++" ; then
30279                         cat >>$cf_dir/Makefile <<"CF_EOF"
30280 depend : ${AUTO_SRC}
30281         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30282
30283 # DO NOT DELETE THIS LINE -- make depend depends on it.
30284 CF_EOF
30285                 fi
30286         fi
30287 done
30288
30289 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30290 if test -z "$USE_OLD_MAKERULES" ; then
30291         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30292 fi
30293 fi
30294  ;;
30295   esac
30296 done
30297 EOF
30298
30299 cat >>"$CONFIG_STATUS" <<\EOF
30300
30301 { (exit 0); exit 0; }
30302 EOF
30303 chmod +x "$CONFIG_STATUS"
30304 ac_clean_files=$ac_clean_files_save
30305
30306 # configure is writing to config.log, and then calls config.status.
30307 # config.status does its own redirection, appending to config.log.
30308 # Unfortunately, on DOS this fails, as config.log is still kept open
30309 # by configure, so config.status won't be able to write to it; its
30310 # output is simply discarded.  So we exec the FD to /dev/null,
30311 # effectively closing config.log, so it can be properly (re)opened and
30312 # appended to by config.status.  When coming back to configure, we
30313 # need to make the FD available again.
30314 if test "$no_create" != yes; then
30315   ac_cs_success=:
30316   exec 5>/dev/null
30317   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30318   exec 5>>config.log
30319   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30320   # would make configure fail if this is the last instruction.
30321   "$ac_cs_success" || { (exit 1); exit 1; }
30322 fi
30323 ${MAKE:-make} preinstall