]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20240420
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.748 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 # ABI 5 defaults:
1724 cf_dft_ccharw_max=5
1725 cf_dft_chtype=auto
1726 cf_dft_ext_colors=no
1727 cf_dft_ext_const=no
1728 cf_dft_ext_mouse=no
1729 cf_dft_ext_putwin=no
1730 cf_dft_ext_spfuncs=no
1731 cf_dft_filter_syms=no
1732 cf_dft_interop=no
1733 cf_dft_mmask_t=auto
1734 cf_dft_opaque_curses=no
1735 cf_dft_ordinate_type=short
1736 cf_dft_signed_char=no
1737 cf_dft_tparm_arg=long
1738 cf_dft_with_lp64=no
1739
1740 # ABI 6 defaults:
1741 case x$cf_cv_abi_version in
1742 (x[6789])
1743         cf_dft_chtype=uint32_t
1744         cf_dft_ext_colors=yes
1745         cf_dft_ext_const=yes
1746         cf_dft_ext_mouse=yes
1747         cf_dft_ext_putwin=yes
1748         cf_dft_ext_spfuncs=yes
1749         cf_dft_filter_syms=yes
1750         cf_dft_interop=yes
1751         cf_dft_mmask_t=uint32_t
1752         cf_dft_tparm_arg=intptr_t
1753         cf_dft_with_lp64=yes
1754         ;;
1755 esac
1756
1757 # ABI 7 defaults:
1758 case x$cf_cv_abi_version in
1759 (x[789])
1760         cf_dft_ccharw_max=6
1761         cf_dft_mmask_t=uint64_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_ordinate_type=int
1764         cf_dft_signed_char=yes
1765         # also: remove the wgetch-events feature in ABI 7
1766         ;;
1767 esac
1768
1769 ###     Checks for programs.
1770
1771 # Check whether --with-ada or --without-ada was given.
1772 if test "${with_ada+set}" = set; then
1773   withval="$with_ada"
1774   cf_with_ada=$withval
1775 else
1776   cf_with_ada=yes
1777 fi;
1778
1779 if test "x$cf_with_ada" = xyes
1780 then
1781         cf_prog_cc="gnatgcc gcc cc"
1782 else
1783         cf_prog_cc="gcc cc"
1784 fi
1785
1786 ac_ext=c
1787 ac_cpp='$CPP $CPPFLAGS'
1788 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1789 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1791 ac_main_return="return"
1792 if test -n "$ac_tool_prefix"; then
1793   for ac_prog in $cf_prog_cc
1794   do
1795     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1796 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1797 echo "$as_me:1797: checking for $ac_word" >&5
1798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1799 if test "${ac_cv_prog_CC+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   ac_save_IFS=$IFS; IFS=$ac_path_separator
1806 ac_dummy="$PATH"
1807 for ac_dir in $ac_dummy; do
1808   IFS=$ac_save_IFS
1809   test -z "$ac_dir" && ac_dir=.
1810   $as_executable_p "$ac_dir/$ac_word" || continue
1811 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1812 echo "$as_me:1812: found $ac_dir/$ac_word" >&5
1813 break
1814 done
1815
1816 fi
1817 fi
1818 CC=$ac_cv_prog_CC
1819 if test -n "$CC"; then
1820   echo "$as_me:1820: result: $CC" >&5
1821 echo "${ECHO_T}$CC" >&6
1822 else
1823   echo "$as_me:1823: result: no" >&5
1824 echo "${ECHO_T}no" >&6
1825 fi
1826
1827     test -n "$CC" && break
1828   done
1829 fi
1830 if test -z "$CC"; then
1831   ac_ct_CC=$CC
1832   for ac_prog in $cf_prog_cc
1833 do
1834   # Extract the first word of "$ac_prog", so it can be a program name with args.
1835 set dummy $ac_prog; ac_word=$2
1836 echo "$as_me:1836: checking for $ac_word" >&5
1837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1839   echo $ECHO_N "(cached) $ECHO_C" >&6
1840 else
1841   if test -n "$ac_ct_CC"; then
1842   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1843 else
1844   ac_save_IFS=$IFS; IFS=$ac_path_separator
1845 ac_dummy="$PATH"
1846 for ac_dir in $ac_dummy; do
1847   IFS=$ac_save_IFS
1848   test -z "$ac_dir" && ac_dir=.
1849   $as_executable_p "$ac_dir/$ac_word" || continue
1850 ac_cv_prog_ac_ct_CC="$ac_prog"
1851 echo "$as_me:1851: found $ac_dir/$ac_word" >&5
1852 break
1853 done
1854
1855 fi
1856 fi
1857 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1858 if test -n "$ac_ct_CC"; then
1859   echo "$as_me:1859: result: $ac_ct_CC" >&5
1860 echo "${ECHO_T}$ac_ct_CC" >&6
1861 else
1862   echo "$as_me:1862: result: no" >&5
1863 echo "${ECHO_T}no" >&6
1864 fi
1865
1866   test -n "$ac_ct_CC" && break
1867 done
1868
1869   CC=$ac_ct_CC
1870 fi
1871
1872 test -z "$CC" && { { echo "$as_me:1872: error: no acceptable cc found in \$PATH" >&5
1873 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1874    { (exit 1); exit 1; }; }
1875
1876 # Provide some information about the compiler.
1877 echo "$as_me:1877:" \
1878      "checking for C compiler version" >&5
1879 ac_compiler=`set X $ac_compile; echo "$2"`
1880 { (eval echo "$as_me:1880: \"$ac_compiler --version </dev/null >&5\"") >&5
1881   (eval $ac_compiler --version </dev/null >&5) 2>&5
1882   ac_status=$?
1883   echo "$as_me:1883: \$? = $ac_status" >&5
1884   (exit "$ac_status"); }
1885 { (eval echo "$as_me:1885: \"$ac_compiler -v </dev/null >&5\"") >&5
1886   (eval $ac_compiler -v </dev/null >&5) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit "$ac_status"); }
1890 { (eval echo "$as_me:1890: \"$ac_compiler -V </dev/null >&5\"") >&5
1891   (eval $ac_compiler -V </dev/null >&5) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit "$ac_status"); }
1895
1896 cat >"conftest.$ac_ext" <<_ACEOF
1897 #line 1897 "configure"
1898 #include "confdefs.h"
1899
1900 int
1901 main (void)
1902 {
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 ac_clean_files_save=$ac_clean_files
1909 ac_clean_files="$ac_clean_files a.out a.exe"
1910 # Try to create an executable without -o first, disregard a.out.
1911 # It will help us diagnose broken compilers, and finding out an intuition
1912 # of exeext.
1913 echo "$as_me:1913: checking for C compiler default output" >&5
1914 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1915 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1916 if { (eval echo "$as_me:1916: \"$ac_link_default\"") >&5
1917   (eval $ac_link_default) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }; then
1921   # Find the output, starting from the most likely.  This scheme is
1922 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1923 # resort.
1924 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1925                 ls a.out conftest 2>/dev/null;
1926                 ls a.* conftest.* 2>/dev/null`; do
1927   case $ac_file in
1928     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1929     a.out ) # We found the default executable, but exeext='' is most
1930             # certainly right.
1931             break;;
1932     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1933           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1934           export ac_cv_exeext
1935           break;;
1936     * ) break;;
1937   esac
1938 done
1939 else
1940   echo "$as_me: failed program was:" >&5
1941 cat "conftest.$ac_ext" >&5
1942 { { echo "$as_me:1942: error: C compiler cannot create executables" >&5
1943 echo "$as_me: error: C compiler cannot create executables" >&2;}
1944    { (exit 77); exit 77; }; }
1945 fi
1946
1947 ac_exeext=$ac_cv_exeext
1948 echo "$as_me:1948: result: $ac_file" >&5
1949 echo "${ECHO_T}$ac_file" >&6
1950
1951 # Check the compiler produces executables we can run.  If not, either
1952 # the compiler is broken, or we cross compile.
1953 echo "$as_me:1953: checking whether the C compiler works" >&5
1954 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1955 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1956 # If not cross compiling, check that we can run a simple program.
1957 if test "$cross_compiling" != yes; then
1958   if { ac_try='./$ac_file'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit "$ac_status"); }; }; then
1964     cross_compiling=no
1965   else
1966     if test "$cross_compiling" = maybe; then
1967         cross_compiling=yes
1968     else
1969         { { echo "$as_me:1969: error: cannot run C compiled programs.
1970 If you meant to cross compile, use \`--host'." >&5
1971 echo "$as_me: error: cannot run C compiled programs.
1972 If you meant to cross compile, use \`--host'." >&2;}
1973    { (exit 1); exit 1; }; }
1974     fi
1975   fi
1976 fi
1977 echo "$as_me:1977: result: yes" >&5
1978 echo "${ECHO_T}yes" >&6
1979
1980 rm -f a.out a.exe "conftest$ac_cv_exeext"
1981 ac_clean_files=$ac_clean_files_save
1982 # Check the compiler produces executables we can run.  If not, either
1983 # the compiler is broken, or we cross compile.
1984 echo "$as_me:1984: checking whether we are cross compiling" >&5
1985 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1986 echo "$as_me:1986: result: $cross_compiling" >&5
1987 echo "${ECHO_T}$cross_compiling" >&6
1988
1989 echo "$as_me:1989: checking for executable suffix" >&5
1990 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1991 if { (eval echo "$as_me:1991: \"$ac_link\"") >&5
1992   (eval $ac_link) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit "$ac_status"); }; then
1996   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1997 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1998 # work properly (i.e., refer to `conftest.exe'), while it won't with
1999 # `rm'.
2000 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2001   case $ac_file in
2002     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2003     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2004           export ac_cv_exeext
2005           break;;
2006     * ) break;;
2007   esac
2008 done
2009 else
2010   { { echo "$as_me:2010: error: cannot compute EXEEXT: cannot compile and link" >&5
2011 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2012    { (exit 1); exit 1; }; }
2013 fi
2014
2015 rm -f "conftest$ac_cv_exeext"
2016 echo "$as_me:2016: result: $ac_cv_exeext" >&5
2017 echo "${ECHO_T}$ac_cv_exeext" >&6
2018
2019 rm -f "conftest.$ac_ext"
2020 EXEEXT=$ac_cv_exeext
2021 ac_exeext=$EXEEXT
2022 echo "$as_me:2022: checking for object suffix" >&5
2023 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2024 if test "${ac_cv_objext+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   cat >"conftest.$ac_ext" <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030
2031 int
2032 main (void)
2033 {
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.o conftest.obj
2040 if { (eval echo "$as_me:2040: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit "$ac_status"); }; then
2045   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2046   case $ac_file in
2047     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2048     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2049        break;;
2050   esac
2051 done
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat "conftest.$ac_ext" >&5
2055 { { echo "$as_me:2055: error: cannot compute OBJEXT: cannot compile" >&5
2056 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2057    { (exit 1); exit 1; }; }
2058 fi
2059
2060 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2061 fi
2062 echo "$as_me:2062: result: $ac_cv_objext" >&5
2063 echo "${ECHO_T}$ac_cv_objext" >&6
2064 OBJEXT=$ac_cv_objext
2065 ac_objext=$OBJEXT
2066 echo "$as_me:2066: checking whether we are using the GNU C compiler" >&5
2067 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2068 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2069   echo $ECHO_N "(cached) $ECHO_C" >&6
2070 else
2071   cat >"conftest.$ac_ext" <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2074
2075 int
2076 main (void)
2077 {
2078 #ifndef __GNUC__
2079        choke me
2080 #endif
2081
2082   ;
2083   return 0;
2084 }
2085 _ACEOF
2086 rm -f "conftest.$ac_objext"
2087 if { (eval echo "$as_me:2087: \"$ac_compile\"") >&5
2088   (eval $ac_compile) 2>&5
2089   ac_status=$?
2090   echo "$as_me:2090: \$? = $ac_status" >&5
2091   (exit "$ac_status"); } &&
2092          { ac_try='test -s "conftest.$ac_objext"'
2093   { (eval echo "$as_me:2093: \"$ac_try\"") >&5
2094   (eval $ac_try) 2>&5
2095   ac_status=$?
2096   echo "$as_me:2096: \$? = $ac_status" >&5
2097   (exit "$ac_status"); }; }; then
2098   ac_compiler_gnu=yes
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat "conftest.$ac_ext" >&5
2102 ac_compiler_gnu=no
2103 fi
2104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2105 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2106
2107 fi
2108 echo "$as_me:2108: result: $ac_cv_c_compiler_gnu" >&5
2109 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2110 GCC=`test $ac_compiler_gnu = yes && echo yes`
2111 ac_test_CFLAGS=${CFLAGS+set}
2112 ac_save_CFLAGS=$CFLAGS
2113 CFLAGS="-g"
2114 echo "$as_me:2114: checking whether $CC accepts -g" >&5
2115 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2116 if test "${ac_cv_prog_cc_g+set}" = set; then
2117   echo $ECHO_N "(cached) $ECHO_C" >&6
2118 else
2119   cat >"conftest.$ac_ext" <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122
2123 int
2124 main (void)
2125 {
2126
2127   ;
2128   return 0;
2129 }
2130 _ACEOF
2131 rm -f "conftest.$ac_objext"
2132 if { (eval echo "$as_me:2132: \"$ac_compile\"") >&5
2133   (eval $ac_compile) 2>&5
2134   ac_status=$?
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit "$ac_status"); } &&
2137          { ac_try='test -s "conftest.$ac_objext"'
2138   { (eval echo "$as_me:2138: \"$ac_try\"") >&5
2139   (eval $ac_try) 2>&5
2140   ac_status=$?
2141   echo "$as_me:2141: \$? = $ac_status" >&5
2142   (exit "$ac_status"); }; }; then
2143   ac_cv_prog_cc_g=yes
2144 else
2145   echo "$as_me: failed program was:" >&5
2146 cat "conftest.$ac_ext" >&5
2147 ac_cv_prog_cc_g=no
2148 fi
2149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2150 fi
2151 echo "$as_me:2151: result: $ac_cv_prog_cc_g" >&5
2152 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2153 if test "$ac_test_CFLAGS" = set; then
2154   CFLAGS=$ac_save_CFLAGS
2155 elif test $ac_cv_prog_cc_g = yes; then
2156   if test "$GCC" = yes; then
2157     CFLAGS="-g -O2"
2158   else
2159     CFLAGS="-g"
2160   fi
2161 else
2162   if test "$GCC" = yes; then
2163     CFLAGS="-O2"
2164   else
2165     CFLAGS=
2166   fi
2167 fi
2168 # Some people use a C++ compiler to compile C.  Since we use `exit',
2169 # in C++ we need to declare it.  In case someone uses the same compiler
2170 # for both compiling C and C++ we need to have the C++ compiler decide
2171 # the declaration of exit, since it's the most demanding environment.
2172 cat >"conftest.$ac_ext" <<_ACEOF
2173 #ifndef __cplusplus
2174   choke me
2175 #endif
2176 _ACEOF
2177 rm -f "conftest.$ac_objext"
2178 if { (eval echo "$as_me:2178: \"$ac_compile\"") >&5
2179   (eval $ac_compile) 2>&5
2180   ac_status=$?
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit "$ac_status"); } &&
2183          { ac_try='test -s "conftest.$ac_objext"'
2184   { (eval echo "$as_me:2184: \"$ac_try\"") >&5
2185   (eval $ac_try) 2>&5
2186   ac_status=$?
2187   echo "$as_me:2187: \$? = $ac_status" >&5
2188   (exit "$ac_status"); }; }; then
2189   for ac_declaration in \
2190    ''\
2191    '#include <stdlib.h>' \
2192    'extern "C" void std::exit (int) throw (); using std::exit;' \
2193    'extern "C" void std::exit (int); using std::exit;' \
2194    'extern "C" void exit (int) throw ();' \
2195    'extern "C" void exit (int);' \
2196    'void exit (int);'
2197 do
2198   cat >"conftest.$ac_ext" <<_ACEOF
2199 #line 2199 "configure"
2200 #include "confdefs.h"
2201 #include <stdlib.h>
2202 $ac_declaration
2203 int
2204 main (void)
2205 {
2206 exit (42);
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 rm -f "conftest.$ac_objext"
2212 if { (eval echo "$as_me:2212: \"$ac_compile\"") >&5
2213   (eval $ac_compile) 2>&5
2214   ac_status=$?
2215   echo "$as_me:2215: \$? = $ac_status" >&5
2216   (exit "$ac_status"); } &&
2217          { ac_try='test -s "conftest.$ac_objext"'
2218   { (eval echo "$as_me:2218: \"$ac_try\"") >&5
2219   (eval $ac_try) 2>&5
2220   ac_status=$?
2221   echo "$as_me:2221: \$? = $ac_status" >&5
2222   (exit "$ac_status"); }; }; then
2223   :
2224 else
2225   echo "$as_me: failed program was:" >&5
2226 cat "conftest.$ac_ext" >&5
2227 continue
2228 fi
2229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2230   cat >"conftest.$ac_ext" <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 $ac_declaration
2234 int
2235 main (void)
2236 {
2237 exit (42);
2238   ;
2239   return 0;
2240 }
2241 _ACEOF
2242 rm -f "conftest.$ac_objext"
2243 if { (eval echo "$as_me:2243: \"$ac_compile\"") >&5
2244   (eval $ac_compile) 2>&5
2245   ac_status=$?
2246   echo "$as_me:2246: \$? = $ac_status" >&5
2247   (exit "$ac_status"); } &&
2248          { ac_try='test -s "conftest.$ac_objext"'
2249   { (eval echo "$as_me:2249: \"$ac_try\"") >&5
2250   (eval $ac_try) 2>&5
2251   ac_status=$?
2252   echo "$as_me:2252: \$? = $ac_status" >&5
2253   (exit "$ac_status"); }; }; then
2254   break
2255 else
2256   echo "$as_me: failed program was:" >&5
2257 cat "conftest.$ac_ext" >&5
2258 fi
2259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2260 done
2261 rm -rf conftest*
2262 if test -n "$ac_declaration"; then
2263   echo '#ifdef __cplusplus' >>confdefs.h
2264   echo "$ac_declaration"    >>confdefs.h
2265   echo '#endif'             >>confdefs.h
2266 fi
2267
2268 else
2269   echo "$as_me: failed program was:" >&5
2270 cat "conftest.$ac_ext" >&5
2271 fi
2272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2273 ac_ext=c
2274 ac_cpp='$CPP $CPPFLAGS'
2275 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2276 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2278 ac_main_return="return"
2279
2280 GCC_VERSION=none
2281 if test "$GCC" = yes ; then
2282         echo "$as_me:2282: checking version of $CC" >&5
2283 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2284         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2285         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2286         echo "$as_me:2286: result: $GCC_VERSION" >&5
2287 echo "${ECHO_T}$GCC_VERSION" >&6
2288 fi
2289
2290 INTEL_COMPILER=no
2291
2292 if test "$GCC" = yes ; then
2293         case "$host_os" in
2294         (linux*|gnu*)
2295                 echo "$as_me:2295: checking if this is really Intel C compiler" >&5
2296 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2297                 cf_save_CFLAGS="$CFLAGS"
2298                 CFLAGS="$CFLAGS -no-gcc"
2299                 cat >"conftest.$ac_ext" <<_ACEOF
2300 #line 2300 "configure"
2301 #include "confdefs.h"
2302
2303 int
2304 main (void)
2305 {
2306
2307 #ifdef __INTEL_COMPILER
2308 #else
2309 make an error
2310 #endif
2311
2312   ;
2313   return 0;
2314 }
2315 _ACEOF
2316 rm -f "conftest.$ac_objext"
2317 if { (eval echo "$as_me:2317: \"$ac_compile\"") >&5
2318   (eval $ac_compile) 2>&5
2319   ac_status=$?
2320   echo "$as_me:2320: \$? = $ac_status" >&5
2321   (exit "$ac_status"); } &&
2322          { ac_try='test -s "conftest.$ac_objext"'
2323   { (eval echo "$as_me:2323: \"$ac_try\"") >&5
2324   (eval $ac_try) 2>&5
2325   ac_status=$?
2326   echo "$as_me:2326: \$? = $ac_status" >&5
2327   (exit "$ac_status"); }; }; then
2328   INTEL_COMPILER=yes
2329 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2330
2331 else
2332   echo "$as_me: failed program was:" >&5
2333 cat "conftest.$ac_ext" >&5
2334 fi
2335 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2336                 CFLAGS="$cf_save_CFLAGS"
2337                 echo "$as_me:2337: result: $INTEL_COMPILER" >&5
2338 echo "${ECHO_T}$INTEL_COMPILER" >&6
2339                 ;;
2340         esac
2341 fi
2342
2343 CLANG_COMPILER=no
2344
2345 if test "$GCC" = yes ; then
2346         echo "$as_me:2346: checking if this is really Clang C compiler" >&5
2347 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2348         cf_save_CFLAGS="$CFLAGS"
2349         cat >"conftest.$ac_ext" <<_ACEOF
2350 #line 2350 "configure"
2351 #include "confdefs.h"
2352
2353 int
2354 main (void)
2355 {
2356
2357 #ifdef __clang__
2358 #else
2359 make an error
2360 #endif
2361
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 rm -f "conftest.$ac_objext"
2367 if { (eval echo "$as_me:2367: \"$ac_compile\"") >&5
2368   (eval $ac_compile) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit "$ac_status"); } &&
2372          { ac_try='test -s "conftest.$ac_objext"'
2373   { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit "$ac_status"); }; }; then
2378   CLANG_COMPILER=yes
2379
2380 else
2381   echo "$as_me: failed program was:" >&5
2382 cat "conftest.$ac_ext" >&5
2383 fi
2384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2385         CFLAGS="$cf_save_CFLAGS"
2386         echo "$as_me:2386: result: $CLANG_COMPILER" >&5
2387 echo "${ECHO_T}$CLANG_COMPILER" >&6
2388 fi
2389
2390 CLANG_VERSION=none
2391
2392 if test "x$CLANG_COMPILER" = "xyes" ; then
2393         case "$CC" in
2394         (c[1-9][0-9]|*/c[1-9][0-9])
2395                 { echo "$as_me:2395: WARNING: replacing broken compiler alias $CC" >&5
2396 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2397                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2398                 CC=clang
2399                 ;;
2400         esac
2401
2402         echo "$as_me:2402: checking version of $CC" >&5
2403 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2404         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2405         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2406         echo "$as_me:2406: result: $CLANG_VERSION" >&5
2407 echo "${ECHO_T}$CLANG_VERSION" >&6
2408
2409         for cf_clang_opt in \
2410                 -Qunused-arguments \
2411                 -Wno-error=implicit-function-declaration
2412         do
2413                 echo "$as_me:2413: checking if option $cf_clang_opt works" >&5
2414 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2415                 cf_save_CFLAGS="$CFLAGS"
2416                 CFLAGS="$CFLAGS $cf_clang_opt"
2417                 cat >"conftest.$ac_ext" <<_ACEOF
2418 #line 2418 "configure"
2419 #include "confdefs.h"
2420
2421                         #include <stdio.h>
2422 int
2423 main (void)
2424 {
2425
2426                         printf("hello!\\n");
2427   ;
2428   return 0;
2429 }
2430 _ACEOF
2431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2432 if { (eval echo "$as_me:2432: \"$ac_link\"") >&5
2433   (eval $ac_link) 2>&5
2434   ac_status=$?
2435   echo "$as_me:2435: \$? = $ac_status" >&5
2436   (exit "$ac_status"); } &&
2437          { ac_try='test -s "conftest$ac_exeext"'
2438   { (eval echo "$as_me:2438: \"$ac_try\"") >&5
2439   (eval $ac_try) 2>&5
2440   ac_status=$?
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit "$ac_status"); }; }; then
2443
2444                         cf_clang_optok=yes
2445 else
2446   echo "$as_me: failed program was:" >&5
2447 cat "conftest.$ac_ext" >&5
2448
2449                         cf_clang_optok=no
2450 fi
2451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2452                 echo "$as_me:2452: result: $cf_clang_optok" >&5
2453 echo "${ECHO_T}$cf_clang_optok" >&6
2454                 CFLAGS="$cf_save_CFLAGS"
2455                 if test "$cf_clang_optok" = yes; then
2456                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2457
2458 echo "${as_me:-configure}:2458: testing adding option $cf_clang_opt ..." 1>&5
2459
2460         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2461         CFLAGS="${CFLAGS}$cf_clang_opt"
2462
2463                 fi
2464         done
2465 fi
2466
2467 echo "$as_me:2467: checking for $CC option to accept ANSI C" >&5
2468 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2469 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2470   echo $ECHO_N "(cached) $ECHO_C" >&6
2471 else
2472   ac_cv_prog_cc_stdc=no
2473 ac_save_CC=$CC
2474 cat >"conftest.$ac_ext" <<_ACEOF
2475 #line 2475 "configure"
2476 #include "confdefs.h"
2477 #include <stdarg.h>
2478 #include <stdio.h>
2479 #include <sys/types.h>
2480 #include <sys/stat.h>
2481 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2482 struct buf { int x; };
2483 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2484 static char *e (p, i)
2485      char **p;
2486      int i;
2487 {
2488   return p[i];
2489 }
2490 static char *f (char * (*g) (char **, int), char **p, ...)
2491 {
2492   char *s;
2493   va_list v;
2494   va_start (v,p);
2495   s = g (p, va_arg (v,int));
2496   va_end (v);
2497   return s;
2498 }
2499 int test (int i, double x);
2500 struct s1 {int (*f) (int a);};
2501 struct s2 {int (*f) (double a);};
2502 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2503 int argc;
2504 char **argv;
2505 int
2506 main (void)
2507 {
2508 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2509   ;
2510   return 0;
2511 }
2512 _ACEOF
2513 # Don't try gcc -ansi; that turns off useful extensions and
2514 # breaks some systems' header files.
2515 # AIX                   -qlanglvl=ansi
2516 # Ultrix and OSF/1      -std1
2517 # HP-UX 10.20 and later -Ae
2518 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2519 # SVR4                  -Xc -D__EXTENSIONS__
2520 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2521 do
2522   CC="$ac_save_CC $ac_arg"
2523   rm -f "conftest.$ac_objext"
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525   (eval $ac_compile) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit "$ac_status"); } &&
2529          { ac_try='test -s "conftest.$ac_objext"'
2530   { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531   (eval $ac_try) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit "$ac_status"); }; }; then
2535   ac_cv_prog_cc_stdc=$ac_arg
2536 break
2537 else
2538   echo "$as_me: failed program was:" >&5
2539 cat "conftest.$ac_ext" >&5
2540 fi
2541 rm -f "conftest.$ac_objext"
2542 done
2543 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2544 CC=$ac_save_CC
2545
2546 fi
2547
2548 case "x$ac_cv_prog_cc_stdc" in
2549   x|xno)
2550     echo "$as_me:2550: result: none needed" >&5
2551 echo "${ECHO_T}none needed" >&6 ;;
2552   *)
2553     echo "$as_me:2553: result: $ac_cv_prog_cc_stdc" >&5
2554 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2555     CC="$CC $ac_cv_prog_cc_stdc" ;;
2556 esac
2557
2558 # This should have been defined by AC_PROG_CC
2559 : "${CC:=cc}"
2560
2561 echo "$as_me:2561: checking \$CFLAGS variable" >&5
2562 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2563 case "x$CFLAGS" in
2564 (*-[IUD]*)
2565         echo "$as_me:2565: result: broken" >&5
2566 echo "${ECHO_T}broken" >&6
2567         { echo "$as_me:2567: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2568 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2569         cf_flags="$CFLAGS"
2570         CFLAGS=
2571         for cf_arg in $cf_flags
2572         do
2573
2574 cf_fix_cppflags=no
2575 cf_new_cflags=
2576 cf_new_cppflags=
2577 cf_new_extra_cppflags=
2578
2579 for cf_add_cflags in $cf_arg
2580 do
2581 case "$cf_fix_cppflags" in
2582 (no)
2583         case "$cf_add_cflags" in
2584         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2585                 case "$cf_add_cflags" in
2586                 (-D*)
2587                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2588
2589                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2590                                 && test -z "${cf_tst_cflags}" \
2591                                 && cf_fix_cppflags=yes
2592
2593                         if test "$cf_fix_cppflags" = yes ; then
2594
2595         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2596         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2597
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600
2601         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2602         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2603
2604                                 continue
2605                         fi
2606                         ;;
2607                 esac
2608                 case "$CPPFLAGS" in
2609                 (*$cf_add_cflags)
2610                         ;;
2611                 (*)
2612                         case "$cf_add_cflags" in
2613                         (-D*)
2614                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2615
2616 CPPFLAGS=`echo "$CPPFLAGS" | \
2617         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2618                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2619
2620                                 ;;
2621                         esac
2622
2623         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2624         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2625
2626                         ;;
2627                 esac
2628                 ;;
2629         (*)
2630
2631         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2632         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2633
2634                 ;;
2635         esac
2636         ;;
2637 (yes)
2638
2639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2641
2642         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2643
2644         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2645                 && test -z "${cf_tst_cflags}" \
2646                 && cf_fix_cppflags=no
2647         ;;
2648 esac
2649 done
2650
2651 if test -n "$cf_new_cflags" ; then
2652
2653         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2654         CFLAGS="${CFLAGS}$cf_new_cflags"
2655
2656 fi
2657
2658 if test -n "$cf_new_cppflags" ; then
2659
2660         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2661         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2662
2663 fi
2664
2665 if test -n "$cf_new_extra_cppflags" ; then
2666
2667         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2668         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2669
2670 fi
2671
2672         done
2673         ;;
2674 (*)
2675         echo "$as_me:2675: result: ok" >&5
2676 echo "${ECHO_T}ok" >&6
2677         ;;
2678 esac
2679
2680 echo "$as_me:2680: checking \$CC variable" >&5
2681 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2682 case "$CC" in
2683 (*[\ \  ]-*)
2684         echo "$as_me:2684: result: broken" >&5
2685 echo "${ECHO_T}broken" >&6
2686         { echo "$as_me:2686: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2687 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2688         # humor him...
2689         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2690         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2691         CC="$cf_prog"
2692         for cf_arg in $cf_flags
2693         do
2694                 case "x$cf_arg" in
2695                 (x-[IUDfgOW]*)
2696
2697 cf_fix_cppflags=no
2698 cf_new_cflags=
2699 cf_new_cppflags=
2700 cf_new_extra_cppflags=
2701
2702 for cf_add_cflags in $cf_arg
2703 do
2704 case "$cf_fix_cppflags" in
2705 (no)
2706         case "$cf_add_cflags" in
2707         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2708                 case "$cf_add_cflags" in
2709                 (-D*)
2710                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2711
2712                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2713                                 && test -z "${cf_tst_cflags}" \
2714                                 && cf_fix_cppflags=yes
2715
2716                         if test "$cf_fix_cppflags" = yes ; then
2717
2718         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2719         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2720
2721                                 continue
2722                         elif test "${cf_tst_cflags}" = "\"'" ; then
2723
2724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2726
2727                                 continue
2728                         fi
2729                         ;;
2730                 esac
2731                 case "$CPPFLAGS" in
2732                 (*$cf_add_cflags)
2733                         ;;
2734                 (*)
2735                         case "$cf_add_cflags" in
2736                         (-D*)
2737                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2738
2739 CPPFLAGS=`echo "$CPPFLAGS" | \
2740         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2741                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2742
2743                                 ;;
2744                         esac
2745
2746         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2747         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2748
2749                         ;;
2750                 esac
2751                 ;;
2752         (*)
2753
2754         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2755         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2756
2757                 ;;
2758         esac
2759         ;;
2760 (yes)
2761
2762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2764
2765         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2766
2767         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2768                 && test -z "${cf_tst_cflags}" \
2769                 && cf_fix_cppflags=no
2770         ;;
2771 esac
2772 done
2773
2774 if test -n "$cf_new_cflags" ; then
2775
2776         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2777         CFLAGS="${CFLAGS}$cf_new_cflags"
2778
2779 fi
2780
2781 if test -n "$cf_new_cppflags" ; then
2782
2783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2784         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2785
2786 fi
2787
2788 if test -n "$cf_new_extra_cppflags" ; then
2789
2790         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2791         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2792
2793 fi
2794
2795                         ;;
2796                 (*)
2797                         CC="$CC $cf_arg"
2798                         ;;
2799                 esac
2800         done
2801         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2802
2803 echo "${as_me:-configure}:2803: testing resulting CC: '$CC' ..." 1>&5
2804
2805         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2806
2807 echo "${as_me:-configure}:2807: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2808
2809         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2810
2811 echo "${as_me:-configure}:2811: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2812
2813         ;;
2814 (*)
2815         echo "$as_me:2815: result: ok" >&5
2816 echo "${ECHO_T}ok" >&6
2817         ;;
2818 esac
2819
2820 ac_ext=c
2821 ac_cpp='$CPP $CPPFLAGS'
2822 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2823 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2824 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2825 ac_main_return="return"
2826 echo "$as_me:2826: checking how to run the C preprocessor" >&5
2827 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2828 # On Suns, sometimes $CPP names a directory.
2829 if test -n "$CPP" && test -d "$CPP"; then
2830   CPP=
2831 fi
2832 if test -z "$CPP"; then
2833   if test "${ac_cv_prog_CPP+set}" = set; then
2834   echo $ECHO_N "(cached) $ECHO_C" >&6
2835 else
2836       # Double quotes because CPP needs to be expanded
2837     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2838     do
2839       ac_preproc_ok=false
2840 for ac_c_preproc_warn_flag in '' yes
2841 do
2842   # Use a header file that comes with gcc, so configuring glibc
2843   # with a fresh cross-compiler works.
2844   # On the NeXT, cc -E runs the code through the compiler's parser,
2845   # not just through cpp. "Syntax error" is here to catch this case.
2846   cat >"conftest.$ac_ext" <<_ACEOF
2847 #line 2847 "configure"
2848 #include "confdefs.h"
2849 #include <assert.h>
2850                      Syntax error
2851 _ACEOF
2852 if { (eval echo "$as_me:2852: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2853   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2854   ac_status=$?
2855   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2856   rm -f conftest.er1
2857   cat conftest.err >&5
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit "$ac_status"); } >/dev/null; then
2860   if test -s conftest.err; then
2861     ac_cpp_err=$ac_c_preproc_warn_flag
2862   else
2863     ac_cpp_err=
2864   fi
2865 else
2866   ac_cpp_err=yes
2867 fi
2868 if test -z "$ac_cpp_err"; then
2869   :
2870 else
2871   echo "$as_me: failed program was:" >&5
2872   cat "conftest.$ac_ext" >&5
2873   # Broken: fails on valid input.
2874 continue
2875 fi
2876 rm -f conftest.err "conftest.$ac_ext"
2877
2878   # OK, works on sane cases.  Now check whether non-existent headers
2879   # can be detected and how.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <ac_nonexistent.h>
2884 _ACEOF
2885 if { (eval echo "$as_me:2885: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2886   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2887   ac_status=$?
2888   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2889   rm -f conftest.er1
2890   cat conftest.err >&5
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit "$ac_status"); } >/dev/null; then
2893   if test -s conftest.err; then
2894     ac_cpp_err=$ac_c_preproc_warn_flag
2895   else
2896     ac_cpp_err=
2897   fi
2898 else
2899   ac_cpp_err=yes
2900 fi
2901 if test -z "$ac_cpp_err"; then
2902   # Broken: success on invalid input.
2903 continue
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Passes both tests.
2908 ac_preproc_ok=:
2909 break
2910 fi
2911 rm -f conftest.err "conftest.$ac_ext"
2912
2913 done
2914 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2915 rm -f conftest.err "conftest.$ac_ext"
2916 if $ac_preproc_ok; then
2917   break
2918 fi
2919
2920     done
2921     ac_cv_prog_CPP=$CPP
2922
2923 fi
2924   CPP=$ac_cv_prog_CPP
2925 else
2926   ac_cv_prog_CPP=$CPP
2927 fi
2928 echo "$as_me:2928: result: $CPP" >&5
2929 echo "${ECHO_T}$CPP" >&6
2930 ac_preproc_ok=false
2931 for ac_c_preproc_warn_flag in '' yes
2932 do
2933   # Use a header file that comes with gcc, so configuring glibc
2934   # with a fresh cross-compiler works.
2935   # On the NeXT, cc -E runs the code through the compiler's parser,
2936   # not just through cpp. "Syntax error" is here to catch this case.
2937   cat >"conftest.$ac_ext" <<_ACEOF
2938 #line 2938 "configure"
2939 #include "confdefs.h"
2940 #include <assert.h>
2941                      Syntax error
2942 _ACEOF
2943 if { (eval echo "$as_me:2943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2945   ac_status=$?
2946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:2949: \$? = $ac_status" >&5
2950   (exit "$ac_status"); } >/dev/null; then
2951   if test -s conftest.err; then
2952     ac_cpp_err=$ac_c_preproc_warn_flag
2953   else
2954     ac_cpp_err=
2955   fi
2956 else
2957   ac_cpp_err=yes
2958 fi
2959 if test -z "$ac_cpp_err"; then
2960   :
2961 else
2962   echo "$as_me: failed program was:" >&5
2963   cat "conftest.$ac_ext" >&5
2964   # Broken: fails on valid input.
2965 continue
2966 fi
2967 rm -f conftest.err "conftest.$ac_ext"
2968
2969   # OK, works on sane cases.  Now check whether non-existent headers
2970   # can be detected and how.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <ac_nonexistent.h>
2975 _ACEOF
2976 if { (eval echo "$as_me:2976: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2977   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2978   ac_status=$?
2979   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2980   rm -f conftest.er1
2981   cat conftest.err >&5
2982   echo "$as_me:2982: \$? = $ac_status" >&5
2983   (exit "$ac_status"); } >/dev/null; then
2984   if test -s conftest.err; then
2985     ac_cpp_err=$ac_c_preproc_warn_flag
2986   else
2987     ac_cpp_err=
2988   fi
2989 else
2990   ac_cpp_err=yes
2991 fi
2992 if test -z "$ac_cpp_err"; then
2993   # Broken: success on invalid input.
2994 continue
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Passes both tests.
2999 ac_preproc_ok=:
3000 break
3001 fi
3002 rm -f conftest.err "conftest.$ac_ext"
3003
3004 done
3005 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3006 rm -f conftest.err "conftest.$ac_ext"
3007 if $ac_preproc_ok; then
3008   :
3009 else
3010   { { echo "$as_me:3010: error: C preprocessor \"$CPP\" fails sanity check" >&5
3011 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3012    { (exit 1); exit 1; }; }
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3018 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return="return"
3021
3022 if test $ac_cv_c_compiler_gnu = yes; then
3023     echo "$as_me:3023: checking whether $CC needs -traditional" >&5
3024 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3025 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028     ac_pattern="Autoconf.*'x'"
3029   cat >"conftest.$ac_ext" <<_ACEOF
3030 #line 3030 "configure"
3031 #include "confdefs.h"
3032 #include <sgtty.h>
3033 int Autoconf = TIOCGETP;
3034 _ACEOF
3035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3036   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3037   ac_cv_prog_gcc_traditional=yes
3038 else
3039   ac_cv_prog_gcc_traditional=no
3040 fi
3041 rm -rf conftest*
3042
3043   if test $ac_cv_prog_gcc_traditional = no; then
3044     cat >"conftest.$ac_ext" <<_ACEOF
3045 #line 3045 "configure"
3046 #include "confdefs.h"
3047 #include <termio.h>
3048 int Autoconf = TCGETA;
3049 _ACEOF
3050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3051   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3052   ac_cv_prog_gcc_traditional=yes
3053 fi
3054 rm -rf conftest*
3055
3056   fi
3057 fi
3058 echo "$as_me:3058: result: $ac_cv_prog_gcc_traditional" >&5
3059 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3060   if test $ac_cv_prog_gcc_traditional = yes; then
3061     CC="$CC -traditional"
3062   fi
3063 fi
3064
3065 echo "$as_me:3065: checking whether $CC understands -c and -o together" >&5
3066 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3067 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3068   echo $ECHO_N "(cached) $ECHO_C" >&6
3069 else
3070
3071 cat > conftest.$ac_ext <<CF_EOF
3072 int main(void)
3073 {
3074         ${cf_cv_main_return:-return}(0);
3075 }
3076 CF_EOF
3077 # We do the test twice because some compilers refuse to overwrite an
3078 # existing .o file with -o, though they will create one.
3079 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3080 if { (eval echo "$as_me:3080: \"$ac_try\"") >&5
3081   (eval $ac_try) 2>&5
3082   ac_status=$?
3083   echo "$as_me:3083: \$? = $ac_status" >&5
3084   (exit "$ac_status"); } &&
3085   test -f conftest2.$ac_objext && { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit "$ac_status"); };
3090 then
3091   eval cf_cv_prog_CC_c_o=yes
3092 else
3093   eval cf_cv_prog_CC_c_o=no
3094 fi
3095 rm -rf ./conftest*
3096
3097 fi
3098 if test "$cf_cv_prog_CC_c_o" = yes; then
3099   echo "$as_me:3099: result: yes" >&5
3100 echo "${ECHO_T}yes" >&6
3101 else
3102   echo "$as_me:3102: result: no" >&5
3103 echo "${ECHO_T}no" >&6
3104 fi
3105
3106 if test "$cross_compiling" = yes ; then
3107         LDCONFIG=:
3108 else
3109         case "$cf_cv_system_name" in
3110         (dragonfly*|mirbsd*|freebsd*)
3111                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3112                 ;;
3113         (*) LDPATH=$PATH:/sbin:/usr/sbin
3114                 # Extract the first word of "ldconfig", so it can be a program name with args.
3115 set dummy ldconfig; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3119   echo $ECHO_N "(cached) $ECHO_C" >&6
3120 else
3121   case $LDCONFIG in
3122   [\\/]* | ?:[\\/]*)
3123   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3124   ;;
3125   *)
3126   ac_save_IFS=$IFS; IFS=$ac_path_separator
3127 ac_dummy="$LDPATH"
3128 for ac_dir in $ac_dummy; do
3129   IFS=$ac_save_IFS
3130   test -z "$ac_dir" && ac_dir=.
3131   if $as_executable_p "$ac_dir/$ac_word"; then
3132    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3133    echo "$as_me:3133: found $ac_dir/$ac_word" >&5
3134    break
3135 fi
3136 done
3137
3138   ;;
3139 esac
3140 fi
3141 LDCONFIG=$ac_cv_path_LDCONFIG
3142
3143 if test -n "$LDCONFIG"; then
3144   echo "$as_me:3144: result: $LDCONFIG" >&5
3145 echo "${ECHO_T}$LDCONFIG" >&6
3146 else
3147   echo "$as_me:3147: result: no" >&5
3148 echo "${ECHO_T}no" >&6
3149 fi
3150
3151                 ;;
3152         esac
3153 fi
3154
3155 echo "$as_me:3155: checking if you want to ensure bool is consistent with C++" >&5
3156 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3157
3158 # Check whether --with-cxx or --without-cxx was given.
3159 if test "${with_cxx+set}" = set; then
3160   withval="$with_cxx"
3161   cf_with_cxx=$withval
3162 else
3163   cf_with_cxx=yes
3164 fi;
3165 echo "$as_me:3165: result: $cf_with_cxx" >&5
3166 echo "${ECHO_T}$cf_with_cxx" >&6
3167 if test "X$cf_with_cxx" = Xno ; then
3168         CXX=""
3169         GXX=""
3170 else
3171         # with autoconf 2.13, we can change the error to a warning:
3172                 ac_ext=cc
3173 ac_cpp='$CXXCPP $CPPFLAGS'
3174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3175 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3177 ac_main_return="return"
3178 if test -n "$ac_tool_prefix"; then
3179   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3180   do
3181     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3182 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3183 echo "$as_me:3183: checking for $ac_word" >&5
3184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3185 if test "${ac_cv_prog_CXX+set}" = set; then
3186   echo $ECHO_N "(cached) $ECHO_C" >&6
3187 else
3188   if test -n "$CXX"; then
3189   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3190 else
3191   ac_save_IFS=$IFS; IFS=$ac_path_separator
3192 ac_dummy="$PATH"
3193 for ac_dir in $ac_dummy; do
3194   IFS=$ac_save_IFS
3195   test -z "$ac_dir" && ac_dir=.
3196   $as_executable_p "$ac_dir/$ac_word" || continue
3197 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3198 echo "$as_me:3198: found $ac_dir/$ac_word" >&5
3199 break
3200 done
3201
3202 fi
3203 fi
3204 CXX=$ac_cv_prog_CXX
3205 if test -n "$CXX"; then
3206   echo "$as_me:3206: result: $CXX" >&5
3207 echo "${ECHO_T}$CXX" >&6
3208 else
3209   echo "$as_me:3209: result: no" >&5
3210 echo "${ECHO_T}no" >&6
3211 fi
3212
3213     test -n "$CXX" && break
3214   done
3215 fi
3216 if test -z "$CXX"; then
3217   ac_ct_CXX=$CXX
3218   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3219 do
3220   # Extract the first word of "$ac_prog", so it can be a program name with args.
3221 set dummy $ac_prog; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3225   echo $ECHO_N "(cached) $ECHO_C" >&6
3226 else
3227   if test -n "$ac_ct_CXX"; then
3228   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3229 else
3230   ac_save_IFS=$IFS; IFS=$ac_path_separator
3231 ac_dummy="$PATH"
3232 for ac_dir in $ac_dummy; do
3233   IFS=$ac_save_IFS
3234   test -z "$ac_dir" && ac_dir=.
3235   $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_ac_ct_CXX="$ac_prog"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3238 break
3239 done
3240
3241 fi
3242 fi
3243 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3244 if test -n "$ac_ct_CXX"; then
3245   echo "$as_me:3245: result: $ac_ct_CXX" >&5
3246 echo "${ECHO_T}$ac_ct_CXX" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252   test -n "$ac_ct_CXX" && break
3253 done
3254 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3255
3256   CXX=$ac_ct_CXX
3257 fi
3258
3259 # Provide some information about the compiler.
3260 echo "$as_me:3260:" \
3261      "checking for C++ compiler version" >&5
3262 ac_compiler=`set X $ac_compile; echo $2`
3263 { (eval echo "$as_me:3263: \"$ac_compiler --version </dev/null >&5\"") >&5
3264   (eval $ac_compiler --version </dev/null >&5) 2>&5
3265   ac_status=$?
3266   echo "$as_me:3266: \$? = $ac_status" >&5
3267   (exit "$ac_status"); }
3268 { (eval echo "$as_me:3268: \"$ac_compiler -v </dev/null >&5\"") >&5
3269   (eval $ac_compiler -v </dev/null >&5) 2>&5
3270   ac_status=$?
3271   echo "$as_me:3271: \$? = $ac_status" >&5
3272   (exit "$ac_status"); }
3273 { (eval echo "$as_me:3273: \"$ac_compiler -V </dev/null >&5\"") >&5
3274   (eval $ac_compiler -V </dev/null >&5) 2>&5
3275   ac_status=$?
3276   echo "$as_me:3276: \$? = $ac_status" >&5
3277   (exit "$ac_status"); }
3278
3279 echo "$as_me:3279: checking whether we are using the GNU C++ compiler" >&5
3280 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3281 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3282   echo $ECHO_N "(cached) $ECHO_C" >&6
3283 else
3284   cat >"conftest.$ac_ext" <<_ACEOF
3285 #line 3285 "configure"
3286 #include "confdefs.h"
3287
3288 int
3289 main (void)
3290 {
3291 #ifndef __GNUC__
3292        choke me
3293 #endif
3294
3295   ;
3296   return 0;
3297 }
3298 _ACEOF
3299 rm -f "conftest.$ac_objext"
3300 if { (eval echo "$as_me:3300: \"$ac_compile\"") >&5
3301   (eval $ac_compile) 2>&5
3302   ac_status=$?
3303   echo "$as_me:3303: \$? = $ac_status" >&5
3304   (exit "$ac_status"); } &&
3305          { ac_try='test -s "conftest.$ac_objext"'
3306   { (eval echo "$as_me:3306: \"$ac_try\"") >&5
3307   (eval $ac_try) 2>&5
3308   ac_status=$?
3309   echo "$as_me:3309: \$? = $ac_status" >&5
3310   (exit "$ac_status"); }; }; then
3311   ac_compiler_gnu=yes
3312 else
3313   echo "$as_me: failed program was:" >&5
3314 cat "conftest.$ac_ext" >&5
3315 ac_compiler_gnu=no
3316 fi
3317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3318 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3319
3320 fi
3321 echo "$as_me:3321: result: $ac_cv_cxx_compiler_gnu" >&5
3322 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3323 GXX=`test $ac_compiler_gnu = yes && echo yes`
3324 ac_test_CXXFLAGS=${CXXFLAGS+set}
3325 ac_save_CXXFLAGS=$CXXFLAGS
3326 CXXFLAGS="-g"
3327 echo "$as_me:3327: checking whether $CXX accepts -g" >&5
3328 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3329 if test "${ac_cv_prog_cxx_g+set}" = set; then
3330   echo $ECHO_N "(cached) $ECHO_C" >&6
3331 else
3332   cat >"conftest.$ac_ext" <<_ACEOF
3333 #line 3333 "configure"
3334 #include "confdefs.h"
3335
3336 int
3337 main (void)
3338 {
3339
3340   ;
3341   return 0;
3342 }
3343 _ACEOF
3344 rm -f "conftest.$ac_objext"
3345 if { (eval echo "$as_me:3345: \"$ac_compile\"") >&5
3346   (eval $ac_compile) 2>&5
3347   ac_status=$?
3348   echo "$as_me:3348: \$? = $ac_status" >&5
3349   (exit "$ac_status"); } &&
3350          { ac_try='test -s "conftest.$ac_objext"'
3351   { (eval echo "$as_me:3351: \"$ac_try\"") >&5
3352   (eval $ac_try) 2>&5
3353   ac_status=$?
3354   echo "$as_me:3354: \$? = $ac_status" >&5
3355   (exit "$ac_status"); }; }; then
3356   ac_cv_prog_cxx_g=yes
3357 else
3358   echo "$as_me: failed program was:" >&5
3359 cat "conftest.$ac_ext" >&5
3360 ac_cv_prog_cxx_g=no
3361 fi
3362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3363 fi
3364 echo "$as_me:3364: result: $ac_cv_prog_cxx_g" >&5
3365 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3366 if test "$ac_test_CXXFLAGS" = set; then
3367   CXXFLAGS=$ac_save_CXXFLAGS
3368 elif test $ac_cv_prog_cxx_g = yes; then
3369   if test "$GXX" = yes; then
3370     CXXFLAGS="-g -O2"
3371   else
3372     CXXFLAGS="-g"
3373   fi
3374 else
3375   if test "$GXX" = yes; then
3376     CXXFLAGS="-O2"
3377   else
3378     CXXFLAGS=
3379   fi
3380 fi
3381 for ac_declaration in \
3382    ''\
3383    '#include <stdlib.h>' \
3384    'extern "C" void std::exit (int) throw (); using std::exit;' \
3385    'extern "C" void std::exit (int); using std::exit;' \
3386    'extern "C" void exit (int) throw ();' \
3387    'extern "C" void exit (int);' \
3388    'void exit (int);'
3389 do
3390   cat >"conftest.$ac_ext" <<_ACEOF
3391 #line 3391 "configure"
3392 #include "confdefs.h"
3393 #include <stdlib.h>
3394 $ac_declaration
3395 int
3396 main (void)
3397 {
3398 exit (42);
3399   ;
3400   return 0;
3401 }
3402 _ACEOF
3403 rm -f "conftest.$ac_objext"
3404 if { (eval echo "$as_me:3404: \"$ac_compile\"") >&5
3405   (eval $ac_compile) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3407: \$? = $ac_status" >&5
3408   (exit "$ac_status"); } &&
3409          { ac_try='test -s "conftest.$ac_objext"'
3410   { (eval echo "$as_me:3410: \"$ac_try\"") >&5
3411   (eval $ac_try) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3413: \$? = $ac_status" >&5
3414   (exit "$ac_status"); }; }; then
3415   :
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 cat "conftest.$ac_ext" >&5
3419 continue
3420 fi
3421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3422   cat >"conftest.$ac_ext" <<_ACEOF
3423 #line 3423 "configure"
3424 #include "confdefs.h"
3425 $ac_declaration
3426 int
3427 main (void)
3428 {
3429 exit (42);
3430   ;
3431   return 0;
3432 }
3433 _ACEOF
3434 rm -f "conftest.$ac_objext"
3435 if { (eval echo "$as_me:3435: \"$ac_compile\"") >&5
3436   (eval $ac_compile) 2>&5
3437   ac_status=$?
3438   echo "$as_me:3438: \$? = $ac_status" >&5
3439   (exit "$ac_status"); } &&
3440          { ac_try='test -s "conftest.$ac_objext"'
3441   { (eval echo "$as_me:3441: \"$ac_try\"") >&5
3442   (eval $ac_try) 2>&5
3443   ac_status=$?
3444   echo "$as_me:3444: \$? = $ac_status" >&5
3445   (exit "$ac_status"); }; }; then
3446   break
3447 else
3448   echo "$as_me: failed program was:" >&5
3449 cat "conftest.$ac_ext" >&5
3450 fi
3451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3452 done
3453 rm -rf conftest*
3454 if test -n "$ac_declaration"; then
3455   echo '#ifdef __cplusplus' >>confdefs.h
3456   echo "$ac_declaration"    >>confdefs.h
3457   echo '#endif'             >>confdefs.h
3458 fi
3459
3460 ac_ext=c
3461 ac_cpp='$CPP $CPPFLAGS'
3462 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3463 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3465 ac_main_return="return"
3466
3467         ac_ext=cc
3468 ac_cpp='$CXXCPP $CPPFLAGS'
3469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3470 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3472 ac_main_return="return"
3473
3474         if test "x$cf_with_cxx" != xno
3475         then
3476                 # Several of the C++ configurations do not work, particularly when
3477                 # cross-compiling (20140913 -TD)
3478                 echo "$as_me:3478: checking if $CXX works" >&5
3479 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3480
3481                 save_CPPFLAGS="$CPPFLAGS"
3482                 eval cf_includedir=${includedir}
3483                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3484
3485 cat >"conftest.$ac_ext" <<_ACEOF
3486 #line 3486 "configure"
3487 #include "confdefs.h"
3488
3489 #include <stdlib.h>
3490 #include <stdio.h>
3491
3492 int
3493 main (void)
3494 {
3495
3496                 printf("Hello world!\n")
3497
3498   ;
3499   return 0;
3500 }
3501 _ACEOF
3502 rm -f "conftest.$ac_objext"
3503 if { (eval echo "$as_me:3503: \"$ac_compile\"") >&5
3504   (eval $ac_compile) 2>&5
3505   ac_status=$?
3506   echo "$as_me:3506: \$? = $ac_status" >&5
3507   (exit "$ac_status"); } &&
3508          { ac_try='test -s "conftest.$ac_objext"'
3509   { (eval echo "$as_me:3509: \"$ac_try\"") >&5
3510   (eval $ac_try) 2>&5
3511   ac_status=$?
3512   echo "$as_me:3512: \$? = $ac_status" >&5
3513   (exit "$ac_status"); }; }; then
3514   cf_cxx_works=yes
3515 else
3516   echo "$as_me: failed program was:" >&5
3517 cat "conftest.$ac_ext" >&5
3518 cf_cxx_works=no
3519 fi
3520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3521                 CPPFLAGS="$save_CPPFLAGS"
3522
3523                 echo "$as_me:3523: result: $cf_cxx_works" >&5
3524 echo "${ECHO_T}$cf_cxx_works" >&6
3525                 if test "x$cf_cxx_works" = xno
3526                 then
3527                         { echo "$as_me:3527: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3528 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3529                         cf_with_cxx=no; CXX=""; GXX="";
3530                 fi
3531         fi
3532         ac_ext=c
3533 ac_cpp='$CPP $CPPFLAGS'
3534 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3535 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3537 ac_main_return="return"
3538
3539         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3540         if test "$CXX" = "g++" ; then
3541                 # Extract the first word of "g++", so it can be a program name with args.
3542 set dummy g++; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_path_CXX+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   case $CXX in
3549   [\\/]* | ?:[\\/]*)
3550   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3551   ;;
3552   *)
3553   ac_save_IFS=$IFS; IFS=$ac_path_separator
3554 ac_dummy="$PATH"
3555 for ac_dir in $ac_dummy; do
3556   IFS=$ac_save_IFS
3557   test -z "$ac_dir" && ac_dir=.
3558   if $as_executable_p "$ac_dir/$ac_word"; then
3559    ac_cv_path_CXX="$ac_dir/$ac_word"
3560    echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3561    break
3562 fi
3563 done
3564
3565   ;;
3566 esac
3567 fi
3568 CXX=$ac_cv_path_CXX
3569
3570 if test -n "$CXX"; then
3571   echo "$as_me:3571: result: $CXX" >&5
3572 echo "${ECHO_T}$CXX" >&6
3573 else
3574   echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578         fi
3579         case "x$CXX" in
3580         (x|xg++)
3581                 { echo "$as_me:3581: WARNING: You don't have any C++ compiler, too bad" >&5
3582 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3583                 cf_with_cxx=no; CXX=""; GXX="";
3584                 ;;
3585         esac
3586 fi
3587
3588 GXX_VERSION=none
3589 if test "$GXX" = yes; then
3590         echo "$as_me:3590: checking version of ${CXX:-g++}" >&5
3591 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3592         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3593         if test -z "$GXX_VERSION"
3594         then
3595                 GXX_VERSION=unknown
3596                 GXX=no
3597         fi
3598         echo "$as_me:3598: result: $GXX_VERSION" >&5
3599 echo "${ECHO_T}$GXX_VERSION" >&6
3600 fi
3601
3602 case "$GXX_VERSION" in
3603 ([1-9][0-9].*)
3604         ;;
3605 (1.*|2.[0-6]*)
3606         { echo "$as_me:3606: WARNING: templates do not work" >&5
3607 echo "$as_me: WARNING: templates do not work" >&2;}
3608         ;;
3609 esac
3610
3611 echo "$as_me:3611: checking if you want to build C++ binding and demo" >&5
3612 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3613
3614 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3615 if test "${with_cxx_binding+set}" = set; then
3616   withval="$with_cxx_binding"
3617   cf_with_cxx_binding=$withval
3618 else
3619   cf_with_cxx_binding=$cf_with_cxx
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_cxx_binding" >&5
3622 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3623
3624 echo "$as_me:3624: checking if you want to build with Ada" >&5
3625 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3626 echo "$as_me:3626: result: $cf_with_ada" >&5
3627 echo "${ECHO_T}$cf_with_ada" >&6
3628
3629 echo "$as_me:3629: checking if you want to install terminal database" >&5
3630 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3631
3632 # Check whether --enable-db-install or --disable-db-install was given.
3633 if test "${enable_db_install+set}" = set; then
3634   enableval="$enable_db_install"
3635   cf_with_db_install=$enableval
3636 else
3637   cf_with_db_install=yes
3638 fi;
3639 echo "$as_me:3639: result: $cf_with_db_install" >&5
3640 echo "${ECHO_T}$cf_with_db_install" >&6
3641
3642 echo "$as_me:3642: checking if you want to install manpages" >&5
3643 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3644
3645 # Check whether --with-manpages or --without-manpages was given.
3646 if test "${with_manpages+set}" = set; then
3647   withval="$with_manpages"
3648   cf_with_manpages=$withval
3649 else
3650   cf_with_manpages=yes
3651 fi;
3652 echo "$as_me:3652: result: $cf_with_manpages" >&5
3653 echo "${ECHO_T}$cf_with_manpages" >&6
3654
3655 echo "$as_me:3655: checking if you want to build programs such as tic" >&5
3656 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3657
3658 # Check whether --with-progs or --without-progs was given.
3659 if test "${with_progs+set}" = set; then
3660   withval="$with_progs"
3661   cf_with_progs=$withval
3662 else
3663   cf_with_progs=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_with_progs" >&5
3666 echo "${ECHO_T}$cf_with_progs" >&6
3667
3668 if test -f "$srcdir/tack/tack.h" ; then
3669         if test "x$cross_compiling" = xyes ; then
3670                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3671
3672 echo "${as_me:-configure}:3672: testing ignoring tack because we are cross-compiling ..." 1>&5
3673
3674                 cf_with_tack=no
3675         else
3676                 echo "$as_me:3676: checking if you want to build the tack program" >&5
3677 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3678
3679 # Check whether --with-tack or --without-tack was given.
3680 if test "${with_tack+set}" = set; then
3681   withval="$with_tack"
3682   cf_with_tack=$withval
3683 else
3684   cf_with_tack=$cf_with_progs
3685 fi;
3686                 echo "$as_me:3686: result: $cf_with_tack" >&5
3687 echo "${ECHO_T}$cf_with_tack" >&6
3688         fi
3689 else
3690         cf_with_tack=no
3691 fi
3692
3693 echo "$as_me:3693: checking if you want to build test-programs" >&5
3694 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3695
3696 # Check whether --with-tests or --without-tests was given.
3697 if test "${with_tests+set}" = set; then
3698   withval="$with_tests"
3699   cf_with_tests=$withval
3700 else
3701   cf_with_tests=yes
3702 fi;
3703 echo "$as_me:3703: result: $cf_with_tests" >&5
3704 echo "${ECHO_T}$cf_with_tests" >&6
3705
3706 echo "$as_me:3706: checking if you wish to install curses.h" >&5
3707 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3708
3709 # Check whether --with-curses-h or --without-curses-h was given.
3710 if test "${with_curses_h+set}" = set; then
3711   withval="$with_curses_h"
3712   with_curses_h=$withval
3713 else
3714   with_curses_h=yes
3715 fi;
3716 echo "$as_me:3716: result: $with_curses_h" >&5
3717 echo "${ECHO_T}$with_curses_h" >&6
3718
3719 modules_to_build="ncurses"
3720 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3721 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3722 modules_to_build="$modules_to_build panel menu form"
3723
3724 test "$program_prefix" != NONE &&
3725   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3726 # Use a double $ so make ignores it.
3727 test "$program_suffix" != NONE &&
3728   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3729 # Double any \ or $.  echo might interpret backslashes.
3730 # By default was `s,x,x', remove it if useless.
3731 cat <<\_ACEOF >conftest.sed
3732 s/[\\$]/&&/g;s/;s,x,x,$//
3733 _ACEOF
3734 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3735 rm conftest.sed
3736
3737 for ac_prog in mawk gawk nawk awk
3738 do
3739   # Extract the first word of "$ac_prog", so it can be a program name with args.
3740 set dummy $ac_prog; ac_word=$2
3741 echo "$as_me:3741: checking for $ac_word" >&5
3742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3743 if test "${ac_cv_prog_AWK+set}" = set; then
3744   echo $ECHO_N "(cached) $ECHO_C" >&6
3745 else
3746   if test -n "$AWK"; then
3747   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3748 else
3749   ac_save_IFS=$IFS; IFS=$ac_path_separator
3750 ac_dummy="$PATH"
3751 for ac_dir in $ac_dummy; do
3752   IFS=$ac_save_IFS
3753   test -z "$ac_dir" && ac_dir=.
3754   $as_executable_p "$ac_dir/$ac_word" || continue
3755 ac_cv_prog_AWK="$ac_prog"
3756 echo "$as_me:3756: found $ac_dir/$ac_word" >&5
3757 break
3758 done
3759
3760 fi
3761 fi
3762 AWK=$ac_cv_prog_AWK
3763 if test -n "$AWK"; then
3764   echo "$as_me:3764: result: $AWK" >&5
3765 echo "${ECHO_T}$AWK" >&6
3766 else
3767   echo "$as_me:3767: result: no" >&5
3768 echo "${ECHO_T}no" >&6
3769 fi
3770
3771   test -n "$AWK" && break
3772 done
3773
3774 test -z "$AWK" && { { echo "$as_me:3774: error: No awk program found" >&5
3775 echo "$as_me: error: No awk program found" >&2;}
3776    { (exit 1); exit 1; }; }
3777
3778 # Find a good install program.  We prefer a C program (faster),
3779 # so one script is as good as another.  But avoid the broken or
3780 # incompatible versions:
3781 # SysV /etc/install, /usr/sbin/install
3782 # SunOS /usr/etc/install
3783 # IRIX /sbin/install
3784 # AIX /bin/install
3785 # AmigaOS /C/install, which installs bootblocks on floppy discs
3786 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3787 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3788 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3789 # ./install, which can be erroneously created by make from ./install.sh.
3790 echo "$as_me:3790: checking for a BSD compatible install" >&5
3791 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3792 if test -z "$INSTALL"; then
3793 if test "${ac_cv_path_install+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796     ac_save_IFS=$IFS; IFS=$ac_path_separator
3797   for ac_dir in $PATH; do
3798     IFS=$ac_save_IFS
3799     # Account for people who put trailing slashes in PATH elements.
3800     case $ac_dir/ in
3801     / | ./ | .// | /cC/* \
3802     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3803     | /usr/ucb/* ) ;;
3804     *)
3805       # OSF1 and SCO ODT 3.0 have their own names for install.
3806       # Don't use installbsd from OSF since it installs stuff as root
3807       # by default.
3808       for ac_prog in ginstall scoinst install; do
3809         if $as_executable_p "$ac_dir/$ac_prog"; then
3810           if test $ac_prog = install &&
3811             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3812             # AIX install.  It has an incompatible calling convention.
3813             :
3814           elif test $ac_prog = install &&
3815             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3816             # program-specific install script used by HP pwplus--don't use.
3817             :
3818           else
3819             ac_cv_path_install="$ac_dir/$ac_prog -c"
3820             break 2
3821           fi
3822         fi
3823       done
3824       ;;
3825     esac
3826   done
3827
3828 fi
3829   if test "${ac_cv_path_install+set}" = set; then
3830     INSTALL=$ac_cv_path_install
3831   else
3832     # As a last resort, use the slow shell script.  We don't cache a
3833     # path for INSTALL within a source directory, because that will
3834     # break other packages using the cache if that directory is
3835     # removed, or if the path is relative.
3836     INSTALL=$ac_install_sh
3837   fi
3838 fi
3839 echo "$as_me:3839: result: $INSTALL" >&5
3840 echo "${ECHO_T}$INSTALL" >&6
3841
3842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3843 # It thinks the first close brace ends the variable substitution.
3844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3845
3846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3847
3848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3849
3850 case $INSTALL in
3851 (/*)
3852         ;;
3853 (*)
3854         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3855         test -z "$cf_dir" && cf_dir=.
3856         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3857         ;;
3858 esac
3859
3860 for ac_prog in lint cppcheck splint
3861 do
3862   # Extract the first word of "$ac_prog", so it can be a program name with args.
3863 set dummy $ac_prog; ac_word=$2
3864 echo "$as_me:3864: checking for $ac_word" >&5
3865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3866 if test "${ac_cv_prog_LINT+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   if test -n "$LINT"; then
3870   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3871 else
3872   ac_save_IFS=$IFS; IFS=$ac_path_separator
3873 ac_dummy="$PATH"
3874 for ac_dir in $ac_dummy; do
3875   IFS=$ac_save_IFS
3876   test -z "$ac_dir" && ac_dir=.
3877   $as_executable_p "$ac_dir/$ac_word" || continue
3878 ac_cv_prog_LINT="$ac_prog"
3879 echo "$as_me:3879: found $ac_dir/$ac_word" >&5
3880 break
3881 done
3882
3883 fi
3884 fi
3885 LINT=$ac_cv_prog_LINT
3886 if test -n "$LINT"; then
3887   echo "$as_me:3887: result: $LINT" >&5
3888 echo "${ECHO_T}$LINT" >&6
3889 else
3890   echo "$as_me:3890: result: no" >&5
3891 echo "${ECHO_T}no" >&6
3892 fi
3893
3894   test -n "$LINT" && break
3895 done
3896
3897 case "x$LINT" in
3898 (xcppcheck|x*/cppcheck)
3899         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3900         ;;
3901 esac
3902
3903 echo "$as_me:3903: checking whether ln -s works" >&5
3904 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3905 LN_S=$as_ln_s
3906 if test "$LN_S" = "ln -s"; then
3907   echo "$as_me:3907: result: yes" >&5
3908 echo "${ECHO_T}yes" >&6
3909 else
3910   echo "$as_me:3910: result: no, using $LN_S" >&5
3911 echo "${ECHO_T}no, using $LN_S" >&6
3912 fi
3913
3914 echo "$as_me:3914: checking if $LN_S -f options work" >&5
3915 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3916
3917 rm -f conf$$.src conf$$dst
3918 echo >conf$$.dst
3919 echo first >conf$$.src
3920 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3921         cf_prog_ln_sf=yes
3922 else
3923         cf_prog_ln_sf=no
3924 fi
3925 rm -f conf$$.dst conf$$src
3926 echo "$as_me:3926: result: $cf_prog_ln_sf" >&5
3927 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3928
3929 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3930
3931 echo "$as_me:3931: checking for long file names" >&5
3932 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3933 if test "${ac_cv_sys_long_file_names+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   ac_cv_sys_long_file_names=yes
3937 # Test for long file names in all the places we know might matter:
3938 #      .                the current directory, where building will happen
3939 #      $prefix/lib      where we will be installing things
3940 #      $exec_prefix/lib likewise
3941 # eval it to expand exec_prefix.
3942 #      $TMPDIR          if set, where it might want to write temporary files
3943 # if $TMPDIR is not set:
3944 #      /tmp             where it might want to write temporary files
3945 #      /var/tmp         likewise
3946 #      /usr/tmp         likewise
3947 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3948   ac_tmpdirs=$TMPDIR
3949 else
3950   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3951 fi
3952 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3953   test -d "$ac_dir" || continue
3954   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3955   ac_xdir=$ac_dir/cf$$
3956   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3957   ac_tf1=$ac_xdir/conftest9012345
3958   ac_tf2=$ac_xdir/conftest9012346
3959   (echo 1 >"$ac_tf1") 2>/dev/null
3960   (echo 2 >"$ac_tf2") 2>/dev/null
3961   ac_val=`cat "$ac_tf1" 2>/dev/null`
3962   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3963     ac_cv_sys_long_file_names=no
3964     rm -rf "$ac_xdir" 2>/dev/null
3965     break
3966   fi
3967   rm -rf "$ac_xdir" 2>/dev/null
3968 done
3969 fi
3970 echo "$as_me:3970: result: $ac_cv_sys_long_file_names" >&5
3971 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3972 if test "$ac_cv_sys_long_file_names" = yes; then
3973
3974 cat >>confdefs.h <<\EOF
3975 #define HAVE_LONG_FILE_NAMES 1
3976 EOF
3977
3978 fi
3979
3980 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3981 # of package conflict.
3982 cf_config_suffix=
3983
3984 # Check whether --with-config-suffix or --without-config-suffix was given.
3985 if test "${with_config_suffix+set}" = set; then
3986   withval="$with_config_suffix"
3987   case "x$withval" in
3988         (xyes|xno)
3989                 { echo "$as_me:3989: WARNING: expected a value for config-suffix option" >&5
3990 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3991                 ;;
3992         (*)     cf_config_suffix="$withval"
3993                 ;;
3994         esac
3995 fi;
3996
3997 # If we find pkg-config, check if we should install the ".pc" files.
3998
3999 echo "$as_me:3999: checking if you want to use pkg-config" >&5
4000 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4001
4002 # Check whether --with-pkg-config or --without-pkg-config was given.
4003 if test "${with_pkg_config+set}" = set; then
4004   withval="$with_pkg_config"
4005   cf_pkg_config=$withval
4006 else
4007   cf_pkg_config=yes
4008 fi;
4009 echo "$as_me:4009: result: $cf_pkg_config" >&5
4010 echo "${ECHO_T}$cf_pkg_config" >&6
4011
4012 case "$cf_pkg_config" in
4013 (no)
4014         PKG_CONFIG=none
4015         ;;
4016 (yes)
4017
4018 if test -n "$ac_tool_prefix"; then
4019   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4020 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   case $PKG_CONFIG in
4027   [\\/]* | ?:[\\/]*)
4028   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4029   ;;
4030   *)
4031   ac_save_IFS=$IFS; IFS=$ac_path_separator
4032 ac_dummy="$PATH"
4033 for ac_dir in $ac_dummy; do
4034   IFS=$ac_save_IFS
4035   test -z "$ac_dir" && ac_dir=.
4036   if $as_executable_p "$ac_dir/$ac_word"; then
4037    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4038    echo "$as_me:4038: found $ac_dir/$ac_word" >&5
4039    break
4040 fi
4041 done
4042
4043   ;;
4044 esac
4045 fi
4046 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4047
4048 if test -n "$PKG_CONFIG"; then
4049   echo "$as_me:4049: result: $PKG_CONFIG" >&5
4050 echo "${ECHO_T}$PKG_CONFIG" >&6
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054 fi
4055
4056 fi
4057 if test -z "$ac_cv_path_PKG_CONFIG"; then
4058   ac_pt_PKG_CONFIG=$PKG_CONFIG
4059   # Extract the first word of "pkg-config", so it can be a program name with args.
4060 set dummy pkg-config; ac_word=$2
4061 echo "$as_me:4061: checking for $ac_word" >&5
4062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4063 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4064   echo $ECHO_N "(cached) $ECHO_C" >&6
4065 else
4066   case $ac_pt_PKG_CONFIG in
4067   [\\/]* | ?:[\\/]*)
4068   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4069   ;;
4070   *)
4071   ac_save_IFS=$IFS; IFS=$ac_path_separator
4072 ac_dummy="$PATH"
4073 for ac_dir in $ac_dummy; do
4074   IFS=$ac_save_IFS
4075   test -z "$ac_dir" && ac_dir=.
4076   if $as_executable_p "$ac_dir/$ac_word"; then
4077    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4078    echo "$as_me:4078: found $ac_dir/$ac_word" >&5
4079    break
4080 fi
4081 done
4082
4083   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4084   ;;
4085 esac
4086 fi
4087 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4088
4089 if test -n "$ac_pt_PKG_CONFIG"; then
4090   echo "$as_me:4090: result: $ac_pt_PKG_CONFIG" >&5
4091 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   PKG_CONFIG=$ac_pt_PKG_CONFIG
4098 else
4099   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4100 fi
4101
4102         ;;
4103 (*)
4104         PKG_CONFIG=$withval
4105         ;;
4106 esac
4107
4108 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4109 if test "$PKG_CONFIG" != none ; then
4110
4111 if test "x$prefix" != xNONE; then
4112         cf_path_syntax="$prefix"
4113 else
4114         cf_path_syntax="$ac_default_prefix"
4115 fi
4116
4117 case ".$PKG_CONFIG" in
4118 (.\$\(*\)*|.\'*\'*)
4119         ;;
4120 (..|./*|.\\*)
4121         ;;
4122 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4123         ;;
4124 (.\$\{*prefix\}*|.\$\{*dir\}*)
4125         eval PKG_CONFIG="$PKG_CONFIG"
4126         case ".$PKG_CONFIG" in
4127         (.NONE/*)
4128                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4129                 ;;
4130         esac
4131         ;;
4132 (.no|.NONE/*)
4133         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4134         ;;
4135 (*)
4136         { { echo "$as_me:4136: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4137 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4138    { (exit 1); exit 1; }; }
4139         ;;
4140 esac
4141
4142 elif test "x$cf_pkg_config" != xno ; then
4143         { echo "$as_me:4143: WARNING: pkg-config is not installed" >&5
4144 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4145 fi
4146
4147 case "$PKG_CONFIG" in
4148 (no|none|yes)
4149         echo "$as_me:4149: checking for pkg-config library directory" >&5
4150 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4151         ;;
4152 (*)
4153         echo "$as_me:4153: checking for $PKG_CONFIG library directory" >&5
4154 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4155         ;;
4156 esac
4157
4158 # if $PKG_CONFIG_LIBDIR is set, try to use that
4159 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4160
4161 # if the option is used, let that override.  otherwise default to "libdir"
4162
4163 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4164 if test "${with_pkg_config_libdir+set}" = set; then
4165   withval="$with_pkg_config_libdir"
4166   cf_search_path=$withval
4167 else
4168   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4169 fi;
4170
4171 case "x$cf_search_path" in
4172 (xlibdir)
4173         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4174         echo "$as_me:4174: result: $PKG_CONFIG_LIBDIR" >&5
4175 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4176         cf_search_path=
4177         ;;
4178 (x)
4179         ;;
4180 (x/*\ *)
4181         PKG_CONFIG_LIBDIR=
4182         ;;
4183 (x/*)
4184         PKG_CONFIG_LIBDIR="$cf_search_path"
4185         echo "$as_me:4185: result: $PKG_CONFIG_LIBDIR" >&5
4186 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4187         cf_search_path=
4188         ;;
4189 (xyes|xauto)
4190         echo "$as_me:4190: result: auto" >&5
4191 echo "${ECHO_T}auto" >&6
4192         cf_search_path=
4193         # Look for the library directory using the same prefix as the executable
4194         echo "$as_me:4194: checking for search-list" >&5
4195 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4196         if test "x$PKG_CONFIG" != xnone
4197         then
4198                 # works for pkg-config since version 0.24 (2009)
4199                 # works for pkgconf since version 0.8.3 (2012)
4200                 for cf_pkg_program in \
4201                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4202                         pkg-config \
4203                         pkgconf
4204                 do
4205                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4206                         test -n "$cf_search_path" && break
4207                 done
4208
4209                 # works for pkg-config since import in 2005 of original 2001 HP code.
4210                 test -z "$cf_search_path" && \
4211                 cf_search_path=`
4212                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4213 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4214         sub(\"^[^']*'\",\"\"); \
4215         sub(\"'.*\",\"\"); \
4216         printf \" %s\", \\$0; } \
4217 { next; } \
4218 "`
4219         fi
4220
4221         echo "$as_me:4221: result: $cf_search_path" >&5
4222 echo "${ECHO_T}$cf_search_path" >&6
4223         ;;
4224 (*)
4225         { { echo "$as_me:4225: error: Unexpected option value: $cf_search_path" >&5
4226 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4227    { (exit 1); exit 1; }; }
4228         ;;
4229 esac
4230
4231 if test -n "$cf_search_path"
4232 then
4233         echo "$as_me:4233: checking for first directory" >&5
4234 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4235         cf_pkg_config_path=none
4236         for cf_config in $cf_search_path
4237         do
4238                 if test -d "$cf_config"
4239                 then
4240                         cf_pkg_config_path=$cf_config
4241                         break
4242                 fi
4243         done
4244         echo "$as_me:4244: result: $cf_pkg_config_path" >&5
4245 echo "${ECHO_T}$cf_pkg_config_path" >&6
4246
4247         if test "x$cf_pkg_config_path" != xnone ; then
4248                 # limit this to the first directory found
4249                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4250         fi
4251
4252         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4253         then
4254                 echo "$as_me:4254: checking for workaround" >&5
4255 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4256                 if test "$prefix" = "NONE" ; then
4257                         cf_prefix="$ac_default_prefix"
4258                 else
4259                         cf_prefix="$prefix"
4260                 fi
4261                 eval cf_libdir=$libdir
4262                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4263                 cf_backup=
4264                 for cf_config in $cf_search_path
4265                 do
4266                         case $cf_config in
4267                         $cf_libdir/pkgconfig)
4268                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4269                                 break
4270                                 ;;
4271                         *)
4272                                 test -z "$cf_backup" && cf_backup=$cf_config
4273                                 ;;
4274                         esac
4275                 done
4276                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4277                 echo "$as_me:4277: result: $PKG_CONFIG_LIBDIR" >&5
4278 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4279         fi
4280 fi
4281
4282 if test "x$PKG_CONFIG" != xnone
4283 then
4284         echo "$as_me:4284: checking if we should install .pc files for $PKG_CONFIG" >&5
4285 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4286 else
4287         echo "$as_me:4287: checking if we should install .pc files" >&5
4288 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4289 fi
4290
4291 # Check whether --enable-pc-files or --disable-pc-files was given.
4292 if test "${enable_pc_files+set}" = set; then
4293   enableval="$enable_pc_files"
4294   enable_pc_files=$enableval
4295 else
4296   enable_pc_files=no
4297 fi;
4298 echo "$as_me:4298: result: $enable_pc_files" >&5
4299 echo "${ECHO_T}$enable_pc_files" >&6
4300
4301 if test "x$enable_pc_files" != xno
4302 then
4303         MAKE_PC_FILES=
4304         case "x$PKG_CONFIG_LIBDIR" in
4305         (xno|xnone|xyes|x)
4306                 { echo "$as_me:4306: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4307 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4308                 ;;
4309         (*)
4310                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4311
4312 if test "x$prefix" != xNONE; then
4313         cf_path_syntax="$prefix"
4314 else
4315         cf_path_syntax="$ac_default_prefix"
4316 fi
4317
4318 case ".$cf_pkg_config_libdir" in
4319 (.\$\(*\)*|.\'*\'*)
4320         ;;
4321 (..|./*|.\\*)
4322         ;;
4323 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4324         ;;
4325 (.\$\{*prefix\}*|.\$\{*dir\}*)
4326         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4327         case ".$cf_pkg_config_libdir" in
4328         (.NONE/*)
4329                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4330                 ;;
4331         esac
4332         ;;
4333 (.no|.NONE/*)
4334         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4335         ;;
4336 (*)
4337         { { echo "$as_me:4337: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4338 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4339    { (exit 1); exit 1; }; }
4340         ;;
4341 esac
4342
4343                 ;;
4344         esac
4345 else
4346         MAKE_PC_FILES="#"
4347 fi
4348
4349 if test -z "$MAKE_PC_FILES"
4350 then
4351         echo "$as_me:4351: checking for suffix to add to pc-files" >&5
4352 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4353
4354 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4355 if test "${with_pc_suffix+set}" = set; then
4356   withval="$with_pc_suffix"
4357   case "x$withval" in
4358         (xyes|xno)
4359                 PC_MODULE_SUFFIX=
4360                 ;;
4361         (*)     PC_MODULE_SUFFIX="$withval"
4362                 ;;
4363         esac
4364 fi;
4365         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4366         echo "$as_me:4366: result: $PC_MODULE_SUFFIX" >&5
4367 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4368         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4369
4370 fi
4371
4372 echo "$as_me:4372: checking if we should assume mixed-case filenames" >&5
4373 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4374
4375 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4376 if test "${enable_mixed_case+set}" = set; then
4377   enableval="$enable_mixed_case"
4378   enable_mixedcase=$enableval
4379 else
4380   enable_mixedcase=auto
4381 fi;
4382 echo "$as_me:4382: result: $enable_mixedcase" >&5
4383 echo "${ECHO_T}$enable_mixedcase" >&6
4384 if test "$enable_mixedcase" = "auto" ; then
4385
4386 echo "$as_me:4386: checking if filesystem supports mixed-case filenames" >&5
4387 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4388 if test "${cf_cv_mixedcase+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391
4392 if test "$cross_compiling" = yes ; then
4393         case "$target_alias" in
4394         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4395                 cf_cv_mixedcase=no
4396                 ;;
4397         (*)
4398                 cf_cv_mixedcase=yes
4399                 ;;
4400         esac
4401 else
4402         rm -f conftest CONFTEST
4403         echo test >conftest
4404         if test -f CONFTEST ; then
4405                 cf_cv_mixedcase=no
4406         else
4407                 cf_cv_mixedcase=yes
4408         fi
4409         rm -f conftest CONFTEST
4410 fi
4411
4412 fi
4413 echo "$as_me:4413: result: $cf_cv_mixedcase" >&5
4414 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4415 test "$cf_cv_mixedcase" = yes &&
4416 cat >>confdefs.h <<\EOF
4417 #define MIXEDCASE_FILENAMES 1
4418 EOF
4419
4420 else
4421         cf_cv_mixedcase=$enable_mixedcase
4422         if test "x$enable_mixedcase" = "xyes" ; then
4423
4424 cat >>confdefs.h <<\EOF
4425 #define MIXEDCASE_FILENAMES 1
4426 EOF
4427
4428         fi
4429 fi
4430
4431 # do this after mixed-case option (tags/TAGS is not as important as tic).
4432 echo "$as_me:4432: checking whether ${MAKE-make} sets \${MAKE}" >&5
4433 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4434 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4435 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438   cat >conftest.make <<\EOF
4439 all:
4440         @echo 'ac_maketemp="${MAKE}"'
4441 EOF
4442 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4443 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4444 if test -n "$ac_maketemp"; then
4445   eval ac_cv_prog_make_${ac_make}_set=yes
4446 else
4447   eval ac_cv_prog_make_${ac_make}_set=no
4448 fi
4449 rm -f conftest.make
4450 fi
4451 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4452   echo "$as_me:4452: result: yes" >&5
4453 echo "${ECHO_T}yes" >&6
4454   SET_MAKE=
4455 else
4456   echo "$as_me:4456: result: no" >&5
4457 echo "${ECHO_T}no" >&6
4458   SET_MAKE="MAKE=${MAKE-make}"
4459 fi
4460
4461 echo "$as_me:4461: checking for \".PHONY\" make-support" >&5
4462 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4463 if test "${cf_cv_make_PHONY+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466
4467         rm -rf conftest*
4468         (
4469                 mkdir conftest || exit 1
4470                 cd conftest
4471                 cat >makefile <<'CF_EOF'
4472 .PHONY: always
4473 DATA=0
4474 always: always.out
4475         @echo "** making $@ $(DATA)"
4476 once: once.out
4477         @echo "** making $@ $(DATA)"
4478 always.out:
4479         @echo "** making $@ $(DATA)"
4480         echo $(DATA) > $@
4481 once.out:
4482         @echo "** making $@ $(DATA)"
4483         echo $(DATA) > $@
4484 CF_EOF
4485                 for cf_data in 1 2 3
4486                 do
4487                         ${MAKE:-make} always DATA=$cf_data
4488                         ${MAKE:-make} once   DATA=$cf_data
4489                         ${MAKE:-make} -t always once
4490                         if test -f always ; then
4491                                 echo "no (case 1)" > ../conftest.tmp
4492                         elif test ! -f always.out ; then
4493                                 echo "no (case 2)" > ../conftest.tmp
4494                         elif test ! -f once.out ; then
4495                                 echo "no (case 3)" > ../conftest.tmp
4496                         elif ! cmp -s always.out once.out ; then
4497                                 echo "no (case 4)" > ../conftest.tmp
4498                                 diff always.out once.out
4499                         else
4500                                 cf_check="`cat always.out`"
4501                                 if test "x$cf_check" != "x$cf_data" ; then
4502                                         echo "no (case 5)" > ../conftest.tmp
4503                                 else
4504                                         echo yes > ../conftest.tmp
4505                                         rm -f ./*.out
4506                                         continue
4507                                 fi
4508                         fi
4509                         break
4510                 done
4511         ) >&5 2>&1
4512         cf_cv_make_PHONY="`cat conftest.tmp`"
4513         rm -rf conftest*
4514
4515 fi
4516 echo "$as_me:4516: result: $cf_cv_make_PHONY" >&5
4517 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4518 MAKE_NO_PHONY="#"
4519 MAKE_PHONY="#"
4520 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4521 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4522
4523 for ac_prog in exctags ctags
4524 do
4525   # Extract the first word of "$ac_prog", so it can be a program name with args.
4526 set dummy $ac_prog; ac_word=$2
4527 echo "$as_me:4527: checking for $ac_word" >&5
4528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4529 if test "${ac_cv_prog_CTAGS+set}" = set; then
4530   echo $ECHO_N "(cached) $ECHO_C" >&6
4531 else
4532   if test -n "$CTAGS"; then
4533   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4534 else
4535   ac_save_IFS=$IFS; IFS=$ac_path_separator
4536 ac_dummy="$PATH"
4537 for ac_dir in $ac_dummy; do
4538   IFS=$ac_save_IFS
4539   test -z "$ac_dir" && ac_dir=.
4540   $as_executable_p "$ac_dir/$ac_word" || continue
4541 ac_cv_prog_CTAGS="$ac_prog"
4542 echo "$as_me:4542: found $ac_dir/$ac_word" >&5
4543 break
4544 done
4545
4546 fi
4547 fi
4548 CTAGS=$ac_cv_prog_CTAGS
4549 if test -n "$CTAGS"; then
4550   echo "$as_me:4550: result: $CTAGS" >&5
4551 echo "${ECHO_T}$CTAGS" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   test -n "$CTAGS" && break
4558 done
4559
4560 for ac_prog in exetags etags
4561 do
4562   # Extract the first word of "$ac_prog", so it can be a program name with args.
4563 set dummy $ac_prog; ac_word=$2
4564 echo "$as_me:4564: checking for $ac_word" >&5
4565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4566 if test "${ac_cv_prog_ETAGS+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   if test -n "$ETAGS"; then
4570   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4571 else
4572   ac_save_IFS=$IFS; IFS=$ac_path_separator
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575   IFS=$ac_save_IFS
4576   test -z "$ac_dir" && ac_dir=.
4577   $as_executable_p "$ac_dir/$ac_word" || continue
4578 ac_cv_prog_ETAGS="$ac_prog"
4579 echo "$as_me:4579: found $ac_dir/$ac_word" >&5
4580 break
4581 done
4582
4583 fi
4584 fi
4585 ETAGS=$ac_cv_prog_ETAGS
4586 if test -n "$ETAGS"; then
4587   echo "$as_me:4587: result: $ETAGS" >&5
4588 echo "${ECHO_T}$ETAGS" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   test -n "$ETAGS" && break
4595 done
4596
4597 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4598 set dummy ${CTAGS:-ctags}; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$MAKE_LOWER_TAGS"; then
4605   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4619 fi
4620 fi
4621 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4622 if test -n "$MAKE_LOWER_TAGS"; then
4623   echo "$as_me:4623: result: $MAKE_LOWER_TAGS" >&5
4624 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630 if test "$cf_cv_mixedcase" = yes ; then
4631         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4632 set dummy ${ETAGS:-etags}; ac_word=$2
4633 echo "$as_me:4633: checking for $ac_word" >&5
4634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4635 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4636   echo $ECHO_N "(cached) $ECHO_C" >&6
4637 else
4638   if test -n "$MAKE_UPPER_TAGS"; then
4639   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4640 else
4641   ac_save_IFS=$IFS; IFS=$ac_path_separator
4642 ac_dummy="$PATH"
4643 for ac_dir in $ac_dummy; do
4644   IFS=$ac_save_IFS
4645   test -z "$ac_dir" && ac_dir=.
4646   $as_executable_p "$ac_dir/$ac_word" || continue
4647 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4648 echo "$as_me:4648: found $ac_dir/$ac_word" >&5
4649 break
4650 done
4651
4652   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4653 fi
4654 fi
4655 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4656 if test -n "$MAKE_UPPER_TAGS"; then
4657   echo "$as_me:4657: result: $MAKE_UPPER_TAGS" >&5
4658 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4659 else
4660   echo "$as_me:4660: result: no" >&5
4661 echo "${ECHO_T}no" >&6
4662 fi
4663
4664 else
4665         MAKE_UPPER_TAGS=no
4666 fi
4667
4668 if test "$MAKE_UPPER_TAGS" = yes ; then
4669         MAKE_UPPER_TAGS=
4670 else
4671         MAKE_UPPER_TAGS="#"
4672 fi
4673
4674 if test "$MAKE_LOWER_TAGS" = yes ; then
4675         MAKE_LOWER_TAGS=
4676 else
4677         MAKE_LOWER_TAGS="#"
4678 fi
4679
4680 echo "$as_me:4680: checking for makeflags variable" >&5
4681 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4682 if test "${cf_cv_makeflags+set}" = set; then
4683   echo $ECHO_N "(cached) $ECHO_C" >&6
4684 else
4685
4686         cf_cv_makeflags=''
4687         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4688         do
4689                 cat >cf_makeflags.tmp <<CF_EOF
4690 SHELL = $SHELL
4691 all :
4692         @ echo '.$cf_option'
4693 CF_EOF
4694                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4695                 case "$cf_result" in
4696                 (.*k|.*kw)
4697                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4698                         case "$cf_result" in
4699                         (.*CC=*)        cf_cv_makeflags=
4700                                 ;;
4701                         (*)     cf_cv_makeflags=$cf_option
4702                                 ;;
4703                         esac
4704                         break
4705                         ;;
4706                 (.-)
4707                         ;;
4708                 (*)
4709
4710 echo "${as_me:-configure}:4710: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4711
4712                         ;;
4713                 esac
4714         done
4715         rm -f cf_makeflags.tmp
4716
4717 fi
4718 echo "$as_me:4718: result: $cf_cv_makeflags" >&5
4719 echo "${ECHO_T}$cf_cv_makeflags" >&6
4720
4721 if test -n "$ac_tool_prefix"; then
4722   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4723 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4724 echo "$as_me:4724: checking for $ac_word" >&5
4725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4726 if test "${ac_cv_prog_RANLIB+set}" = set; then
4727   echo $ECHO_N "(cached) $ECHO_C" >&6
4728 else
4729   if test -n "$RANLIB"; then
4730   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4731 else
4732   ac_save_IFS=$IFS; IFS=$ac_path_separator
4733 ac_dummy="$PATH"
4734 for ac_dir in $ac_dummy; do
4735   IFS=$ac_save_IFS
4736   test -z "$ac_dir" && ac_dir=.
4737   $as_executable_p "$ac_dir/$ac_word" || continue
4738 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4739 echo "$as_me:4739: found $ac_dir/$ac_word" >&5
4740 break
4741 done
4742
4743 fi
4744 fi
4745 RANLIB=$ac_cv_prog_RANLIB
4746 if test -n "$RANLIB"; then
4747   echo "$as_me:4747: result: $RANLIB" >&5
4748 echo "${ECHO_T}$RANLIB" >&6
4749 else
4750   echo "$as_me:4750: result: no" >&5
4751 echo "${ECHO_T}no" >&6
4752 fi
4753
4754 fi
4755 if test -z "$ac_cv_prog_RANLIB"; then
4756   ac_ct_RANLIB=$RANLIB
4757   # Extract the first word of "ranlib", so it can be a program name with args.
4758 set dummy ranlib; ac_word=$2
4759 echo "$as_me:4759: checking for $ac_word" >&5
4760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4761 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4762   echo $ECHO_N "(cached) $ECHO_C" >&6
4763 else
4764   if test -n "$ac_ct_RANLIB"; then
4765   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4766 else
4767   ac_save_IFS=$IFS; IFS=$ac_path_separator
4768 ac_dummy="$PATH"
4769 for ac_dir in $ac_dummy; do
4770   IFS=$ac_save_IFS
4771   test -z "$ac_dir" && ac_dir=.
4772   $as_executable_p "$ac_dir/$ac_word" || continue
4773 ac_cv_prog_ac_ct_RANLIB="ranlib"
4774 echo "$as_me:4774: found $ac_dir/$ac_word" >&5
4775 break
4776 done
4777
4778   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4779 fi
4780 fi
4781 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4782 if test -n "$ac_ct_RANLIB"; then
4783   echo "$as_me:4783: result: $ac_ct_RANLIB" >&5
4784 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4785 else
4786   echo "$as_me:4786: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   RANLIB=$ac_ct_RANLIB
4791 else
4792   RANLIB="$ac_cv_prog_RANLIB"
4793 fi
4794
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4797 set dummy ${ac_tool_prefix}ld; ac_word=$2
4798 echo "$as_me:4798: checking for $ac_word" >&5
4799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4800 if test "${ac_cv_prog_LD+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803   if test -n "$LD"; then
4804   ac_cv_prog_LD="$LD" # Let the user override the test.
4805 else
4806   ac_save_IFS=$IFS; IFS=$ac_path_separator
4807 ac_dummy="$PATH"
4808 for ac_dir in $ac_dummy; do
4809   IFS=$ac_save_IFS
4810   test -z "$ac_dir" && ac_dir=.
4811   $as_executable_p "$ac_dir/$ac_word" || continue
4812 ac_cv_prog_LD="${ac_tool_prefix}ld"
4813 echo "$as_me:4813: found $ac_dir/$ac_word" >&5
4814 break
4815 done
4816
4817 fi
4818 fi
4819 LD=$ac_cv_prog_LD
4820 if test -n "$LD"; then
4821   echo "$as_me:4821: result: $LD" >&5
4822 echo "${ECHO_T}$LD" >&6
4823 else
4824   echo "$as_me:4824: result: no" >&5
4825 echo "${ECHO_T}no" >&6
4826 fi
4827
4828 fi
4829 if test -z "$ac_cv_prog_LD"; then
4830   ac_ct_LD=$LD
4831   # Extract the first word of "ld", so it can be a program name with args.
4832 set dummy ld; ac_word=$2
4833 echo "$as_me:4833: checking for $ac_word" >&5
4834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4835 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4836   echo $ECHO_N "(cached) $ECHO_C" >&6
4837 else
4838   if test -n "$ac_ct_LD"; then
4839   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4840 else
4841   ac_save_IFS=$IFS; IFS=$ac_path_separator
4842 ac_dummy="$PATH"
4843 for ac_dir in $ac_dummy; do
4844   IFS=$ac_save_IFS
4845   test -z "$ac_dir" && ac_dir=.
4846   $as_executable_p "$ac_dir/$ac_word" || continue
4847 ac_cv_prog_ac_ct_LD="ld"
4848 echo "$as_me:4848: found $ac_dir/$ac_word" >&5
4849 break
4850 done
4851
4852   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4853 fi
4854 fi
4855 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4856 if test -n "$ac_ct_LD"; then
4857   echo "$as_me:4857: result: $ac_ct_LD" >&5
4858 echo "${ECHO_T}$ac_ct_LD" >&6
4859 else
4860   echo "$as_me:4860: result: no" >&5
4861 echo "${ECHO_T}no" >&6
4862 fi
4863
4864   LD=$ac_ct_LD
4865 else
4866   LD="$ac_cv_prog_LD"
4867 fi
4868
4869 if test -n "$ac_tool_prefix"; then
4870   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4871 set dummy ${ac_tool_prefix}ar; ac_word=$2
4872 echo "$as_me:4872: checking for $ac_word" >&5
4873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4874 if test "${ac_cv_prog_AR+set}" = set; then
4875   echo $ECHO_N "(cached) $ECHO_C" >&6
4876 else
4877   if test -n "$AR"; then
4878   ac_cv_prog_AR="$AR" # Let the user override the test.
4879 else
4880   ac_save_IFS=$IFS; IFS=$ac_path_separator
4881 ac_dummy="$PATH"
4882 for ac_dir in $ac_dummy; do
4883   IFS=$ac_save_IFS
4884   test -z "$ac_dir" && ac_dir=.
4885   $as_executable_p "$ac_dir/$ac_word" || continue
4886 ac_cv_prog_AR="${ac_tool_prefix}ar"
4887 echo "$as_me:4887: found $ac_dir/$ac_word" >&5
4888 break
4889 done
4890
4891 fi
4892 fi
4893 AR=$ac_cv_prog_AR
4894 if test -n "$AR"; then
4895   echo "$as_me:4895: result: $AR" >&5
4896 echo "${ECHO_T}$AR" >&6
4897 else
4898   echo "$as_me:4898: result: no" >&5
4899 echo "${ECHO_T}no" >&6
4900 fi
4901
4902 fi
4903 if test -z "$ac_cv_prog_AR"; then
4904   ac_ct_AR=$AR
4905   # Extract the first word of "ar", so it can be a program name with args.
4906 set dummy ar; ac_word=$2
4907 echo "$as_me:4907: checking for $ac_word" >&5
4908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4909 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   if test -n "$ac_ct_AR"; then
4913   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4914 else
4915   ac_save_IFS=$IFS; IFS=$ac_path_separator
4916 ac_dummy="$PATH"
4917 for ac_dir in $ac_dummy; do
4918   IFS=$ac_save_IFS
4919   test -z "$ac_dir" && ac_dir=.
4920   $as_executable_p "$ac_dir/$ac_word" || continue
4921 ac_cv_prog_ac_ct_AR="ar"
4922 echo "$as_me:4922: found $ac_dir/$ac_word" >&5
4923 break
4924 done
4925
4926   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4927 fi
4928 fi
4929 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4930 if test -n "$ac_ct_AR"; then
4931   echo "$as_me:4931: result: $ac_ct_AR" >&5
4932 echo "${ECHO_T}$ac_ct_AR" >&6
4933 else
4934   echo "$as_me:4934: result: no" >&5
4935 echo "${ECHO_T}no" >&6
4936 fi
4937
4938   AR=$ac_ct_AR
4939 else
4940   AR="$ac_cv_prog_AR"
4941 fi
4942
4943 if test -n "$ac_tool_prefix"; then
4944   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4945 set dummy ${ac_tool_prefix}nm; ac_word=$2
4946 echo "$as_me:4946: checking for $ac_word" >&5
4947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4948 if test "${ac_cv_prog_NM+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   if test -n "$NM"; then
4952   ac_cv_prog_NM="$NM" # Let the user override the test.
4953 else
4954   ac_save_IFS=$IFS; IFS=$ac_path_separator
4955 ac_dummy="$PATH"
4956 for ac_dir in $ac_dummy; do
4957   IFS=$ac_save_IFS
4958   test -z "$ac_dir" && ac_dir=.
4959   $as_executable_p "$ac_dir/$ac_word" || continue
4960 ac_cv_prog_NM="${ac_tool_prefix}nm"
4961 echo "$as_me:4961: found $ac_dir/$ac_word" >&5
4962 break
4963 done
4964
4965 fi
4966 fi
4967 NM=$ac_cv_prog_NM
4968 if test -n "$NM"; then
4969   echo "$as_me:4969: result: $NM" >&5
4970 echo "${ECHO_T}$NM" >&6
4971 else
4972   echo "$as_me:4972: result: no" >&5
4973 echo "${ECHO_T}no" >&6
4974 fi
4975
4976 fi
4977 if test -z "$ac_cv_prog_NM"; then
4978   ac_ct_NM=$NM
4979   # Extract the first word of "nm", so it can be a program name with args.
4980 set dummy nm; ac_word=$2
4981 echo "$as_me:4981: checking for $ac_word" >&5
4982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4984   echo $ECHO_N "(cached) $ECHO_C" >&6
4985 else
4986   if test -n "$ac_ct_NM"; then
4987   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4988 else
4989   ac_save_IFS=$IFS; IFS=$ac_path_separator
4990 ac_dummy="$PATH"
4991 for ac_dir in $ac_dummy; do
4992   IFS=$ac_save_IFS
4993   test -z "$ac_dir" && ac_dir=.
4994   $as_executable_p "$ac_dir/$ac_word" || continue
4995 ac_cv_prog_ac_ct_NM="nm"
4996 echo "$as_me:4996: found $ac_dir/$ac_word" >&5
4997 break
4998 done
4999
5000   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5001 fi
5002 fi
5003 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5004 if test -n "$ac_ct_NM"; then
5005   echo "$as_me:5005: result: $ac_ct_NM" >&5
5006 echo "${ECHO_T}$ac_ct_NM" >&6
5007 else
5008   echo "$as_me:5008: result: no" >&5
5009 echo "${ECHO_T}no" >&6
5010 fi
5011
5012   NM=$ac_ct_NM
5013 else
5014   NM="$ac_cv_prog_NM"
5015 fi
5016
5017 if test -n "$ac_tool_prefix"; then
5018   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5019 set dummy ${ac_tool_prefix}ar; ac_word=$2
5020 echo "$as_me:5020: checking for $ac_word" >&5
5021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5022 if test "${ac_cv_prog_AR+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025   if test -n "$AR"; then
5026   ac_cv_prog_AR="$AR" # Let the user override the test.
5027 else
5028   ac_save_IFS=$IFS; IFS=$ac_path_separator
5029 ac_dummy="$PATH"
5030 for ac_dir in $ac_dummy; do
5031   IFS=$ac_save_IFS
5032   test -z "$ac_dir" && ac_dir=.
5033   $as_executable_p "$ac_dir/$ac_word" || continue
5034 ac_cv_prog_AR="${ac_tool_prefix}ar"
5035 echo "$as_me:5035: found $ac_dir/$ac_word" >&5
5036 break
5037 done
5038
5039 fi
5040 fi
5041 AR=$ac_cv_prog_AR
5042 if test -n "$AR"; then
5043   echo "$as_me:5043: result: $AR" >&5
5044 echo "${ECHO_T}$AR" >&6
5045 else
5046   echo "$as_me:5046: result: no" >&5
5047 echo "${ECHO_T}no" >&6
5048 fi
5049
5050 fi
5051 if test -z "$ac_cv_prog_AR"; then
5052   ac_ct_AR=$AR
5053   # Extract the first word of "ar", so it can be a program name with args.
5054 set dummy ar; ac_word=$2
5055 echo "$as_me:5055: checking for $ac_word" >&5
5056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5057 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5058   echo $ECHO_N "(cached) $ECHO_C" >&6
5059 else
5060   if test -n "$ac_ct_AR"; then
5061   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5062 else
5063   ac_save_IFS=$IFS; IFS=$ac_path_separator
5064 ac_dummy="$PATH"
5065 for ac_dir in $ac_dummy; do
5066   IFS=$ac_save_IFS
5067   test -z "$ac_dir" && ac_dir=.
5068   $as_executable_p "$ac_dir/$ac_word" || continue
5069 ac_cv_prog_ac_ct_AR="ar"
5070 echo "$as_me:5070: found $ac_dir/$ac_word" >&5
5071 break
5072 done
5073
5074   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5075 fi
5076 fi
5077 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5078 if test -n "$ac_ct_AR"; then
5079   echo "$as_me:5079: result: $ac_ct_AR" >&5
5080 echo "${ECHO_T}$ac_ct_AR" >&6
5081 else
5082   echo "$as_me:5082: result: no" >&5
5083 echo "${ECHO_T}no" >&6
5084 fi
5085
5086   AR=$ac_ct_AR
5087 else
5088   AR="$ac_cv_prog_AR"
5089 fi
5090
5091 echo "$as_me:5091: checking for options to update archives" >&5
5092 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5093 if test "${cf_cv_ar_flags+set}" = set; then
5094   echo $ECHO_N "(cached) $ECHO_C" >&6
5095 else
5096
5097         case "$cf_cv_system_name" in
5098         (*-msvc*)
5099                 cf_cv_ar_flags=''
5100                 cat >mk_static_lib.sh <<-EOF
5101                 #!$SHELL
5102                 MSVC_BIN="$AR"
5103                 out="\$1"
5104                 shift
5105                 exec \$MSVC_BIN -out:"\$out" \$@
5106                 EOF
5107                 chmod +x mk_static_lib.sh
5108                 AR=`pwd`/mk_static_lib.sh
5109                 ;;
5110         (*)
5111                 cf_cv_ar_flags=unknown
5112                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5113                 do
5114
5115                         # check if $ARFLAGS already contains this choice
5116                         if test "x$ARFLAGS" != "x" ; then
5117                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5118                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5119                                         cf_cv_ar_flags=
5120                                         break
5121                                 fi
5122                         fi
5123
5124                         rm -f "conftest.$ac_cv_objext"
5125                         rm -f conftest.a
5126
5127                         cat >"conftest.$ac_ext" <<EOF
5128 #line 5128 "configure"
5129 int     testdata[3] = { 123, 456, 789 };
5130 EOF
5131                         if { (eval echo "$as_me:5131: \"$ac_compile\"") >&5
5132   (eval $ac_compile) 2>&5
5133   ac_status=$?
5134   echo "$as_me:5134: \$? = $ac_status" >&5
5135   (exit "$ac_status"); } ; then
5136                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5137                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5138                                 if test -f conftest.a ; then
5139                                         cf_cv_ar_flags="$cf_ar_flags"
5140                                         break
5141                                 fi
5142                         else
5143                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5144
5145 echo "${as_me:-configure}:5145: testing cannot compile test-program ..." 1>&5
5146
5147                                 break
5148                         fi
5149                 done
5150                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5151                 ;;
5152         esac
5153
5154 fi
5155 echo "$as_me:5155: result: $cf_cv_ar_flags" >&5
5156 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5157
5158 if test -n "$ARFLAGS" ; then
5159         if test -n "$cf_cv_ar_flags" ; then
5160                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5161         fi
5162 else
5163         ARFLAGS=$cf_cv_ar_flags
5164 fi
5165
5166 echo "$as_me:5166: checking if you have specified an install-prefix" >&5
5167 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5168
5169 # Check whether --with-install-prefix or --without-install-prefix was given.
5170 if test "${with_install_prefix+set}" = set; then
5171   withval="$with_install_prefix"
5172   case "x$withval" in
5173         (xyes|xno)
5174                 ;;
5175         (*)     DESTDIR="$withval"
5176                 ;;
5177         esac
5178 fi;
5179 echo "$as_me:5179: result: $DESTDIR" >&5
5180 echo "${ECHO_T}$DESTDIR" >&6
5181
5182 ###############################################################################
5183
5184 # If we're cross-compiling, allow the user to override the tools and their
5185 # options.  The configure script is oriented toward identifying the host
5186 # compiler, etc., but we need a build compiler to generate parts of the source.
5187
5188 case "$cf_cv_system_name" in
5189 (*-msvc*)
5190         LDFLAGS="$LDFLAGS user32.lib"
5191         export LDFLAGS
5192         ;;
5193 esac
5194
5195 if test "$cross_compiling" = yes ; then
5196
5197         # defaults that we might want to override
5198         : ${BUILD_CFLAGS:=''}
5199         : ${BUILD_CPPFLAGS:=''}
5200         : ${BUILD_LDFLAGS:=''}
5201         : ${BUILD_LIBS:=''}
5202         : ${BUILD_EXEEXT:='$x'}
5203         : ${BUILD_OBJEXT:='o'}
5204
5205 # Check whether --with-build-cc or --without-build-cc was given.
5206 if test "${with_build_cc+set}" = set; then
5207   withval="$with_build_cc"
5208   BUILD_CC="$withval"
5209 else
5210   for ac_prog in gcc clang c99 c89 cc cl
5211 do
5212   # Extract the first word of "$ac_prog", so it can be a program name with args.
5213 set dummy $ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$BUILD_CC"; then
5220   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_BUILD_CC="$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 BUILD_CC=$ac_cv_prog_BUILD_CC
5236 if test -n "$BUILD_CC"; then
5237   echo "$as_me:5237: result: $BUILD_CC" >&5
5238 echo "${ECHO_T}$BUILD_CC" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244   test -n "$BUILD_CC" && break
5245 done
5246 test -n "$BUILD_CC" || BUILD_CC="none"
5247
5248 fi;
5249         echo "$as_me:5249: checking for native build C compiler" >&5
5250 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5251         echo "$as_me:5251: result: $BUILD_CC" >&5
5252 echo "${ECHO_T}$BUILD_CC" >&6
5253
5254         echo "$as_me:5254: checking for native build C preprocessor" >&5
5255 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5256
5257 # Check whether --with-build-cpp or --without-build-cpp was given.
5258 if test "${with_build_cpp+set}" = set; then
5259   withval="$with_build_cpp"
5260   BUILD_CPP="$withval"
5261 else
5262   BUILD_CPP='${BUILD_CC} -E'
5263 fi;
5264         echo "$as_me:5264: result: $BUILD_CPP" >&5
5265 echo "${ECHO_T}$BUILD_CPP" >&6
5266
5267         echo "$as_me:5267: checking for native build C flags" >&5
5268 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5269
5270 # Check whether --with-build-cflags or --without-build-cflags was given.
5271 if test "${with_build_cflags+set}" = set; then
5272   withval="$with_build_cflags"
5273   BUILD_CFLAGS="$withval"
5274 fi;
5275         echo "$as_me:5275: result: $BUILD_CFLAGS" >&5
5276 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5277
5278         echo "$as_me:5278: checking for native build C preprocessor-flags" >&5
5279 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5280
5281 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5282 if test "${with_build_cppflags+set}" = set; then
5283   withval="$with_build_cppflags"
5284   BUILD_CPPFLAGS="$withval"
5285 fi;
5286         echo "$as_me:5286: result: $BUILD_CPPFLAGS" >&5
5287 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5288
5289         echo "$as_me:5289: checking for native build linker-flags" >&5
5290 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5291
5292 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5293 if test "${with_build_ldflags+set}" = set; then
5294   withval="$with_build_ldflags"
5295   BUILD_LDFLAGS="$withval"
5296 fi;
5297         echo "$as_me:5297: result: $BUILD_LDFLAGS" >&5
5298 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5299
5300         echo "$as_me:5300: checking for native build linker-libraries" >&5
5301 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5302
5303 # Check whether --with-build-libs or --without-build-libs was given.
5304 if test "${with_build_libs+set}" = set; then
5305   withval="$with_build_libs"
5306   BUILD_LIBS="$withval"
5307 fi;
5308         echo "$as_me:5308: result: $BUILD_LIBS" >&5
5309 echo "${ECHO_T}$BUILD_LIBS" >&6
5310
5311         # this assumes we're on Unix.
5312         BUILD_EXEEXT=
5313         BUILD_OBJEXT=o
5314
5315         : ${BUILD_CC:='${CC}'}
5316
5317         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5318                 { { echo "$as_me:5318: error: Cross-build requires two compilers.
5319 Use --with-build-cc to specify the native compiler." >&5
5320 echo "$as_me: error: Cross-build requires two compilers.
5321 Use --with-build-cc to specify the native compiler." >&2;}
5322    { (exit 1); exit 1; }; }
5323         fi
5324
5325 else
5326         : ${BUILD_CC:='${CC}'}
5327         : ${BUILD_CPP:='${CPP}'}
5328         : ${BUILD_CFLAGS:='${CFLAGS}'}
5329         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5330         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5331         : ${BUILD_LIBS:='${LIBS}'}
5332         : ${BUILD_EXEEXT:='$x'}
5333         : ${BUILD_OBJEXT:='o'}
5334 fi
5335
5336 ###############################################################################
5337
5338 ### Options to allow the user to specify the set of libraries which are used.
5339 ### Use "--without-normal --with-shared" to allow the default model to be
5340 ### shared, for example.
5341 cf_list_models=""
5342
5343 echo "$as_me:5343: checking if libtool -version-number should be used" >&5
5344 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5345
5346 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5347 if test "${enable_libtool_version+set}" = set; then
5348   enableval="$enable_libtool_version"
5349   test "$enableval" != no && enableval=yes
5350         if test "$enableval" != "yes" ; then
5351     cf_libtool_version=no
5352         else
5353                 cf_libtool_version=yes
5354         fi
5355 else
5356   enableval=yes
5357         cf_libtool_version=yes
5358
5359 fi;
5360 echo "$as_me:5360: result: $cf_libtool_version" >&5
5361 echo "${ECHO_T}$cf_libtool_version" >&6
5362
5363 if test "$cf_libtool_version" = yes ; then
5364         LIBTOOL_VERSION="-version-number"
5365 else
5366         LIBTOOL_VERSION="-version-info"
5367         case "x$VERSION" in
5368         (x)
5369                 { echo "$as_me:5369: WARNING: VERSION was not set" >&5
5370 echo "$as_me: WARNING: VERSION was not set" >&2;}
5371                 ;;
5372         (x*.*.*)
5373                 ABI_VERSION="$VERSION"
5374                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5375
5376 echo "${as_me:-configure}:5376: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5377
5378                 ;;
5379         (x*:*:*)
5380                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5381                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5382
5383 echo "${as_me:-configure}:5383: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5384
5385                 ;;
5386         (*)
5387                 { echo "$as_me:5387: WARNING: unexpected VERSION value: $VERSION" >&5
5388 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5389                 ;;
5390         esac
5391 fi
5392
5393 LIBTOOL=
5394
5395 # common library maintenance symbols that are convenient for libtool scripts:
5396 LIB_CREATE='${AR} -cr'
5397 LIB_OBJECT='${OBJECTS}'
5398 LIB_SUFFIX=.a
5399 LIB_PREP="$RANLIB"
5400
5401 # symbols used to prop libtool up to enable it to determine what it should be
5402 # doing:
5403 LIB_CLEAN=
5404 LIB_COMPILE=
5405 LIB_LINK='${CC}'
5406 LIB_INSTALL=
5407 LIB_UNINSTALL=
5408
5409 echo "$as_me:5409: checking if you want to build libraries with libtool" >&5
5410 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5411
5412 # Check whether --with-libtool or --without-libtool was given.
5413 if test "${with_libtool+set}" = set; then
5414   withval="$with_libtool"
5415   with_libtool=$withval
5416 else
5417   with_libtool=no
5418 fi;
5419 echo "$as_me:5419: result: $with_libtool" >&5
5420 echo "${ECHO_T}$with_libtool" >&6
5421 if test "$with_libtool" != "no"; then
5422
5423         if test "$with_libtool" != "yes" ; then
5424
5425 if test "x$prefix" != xNONE; then
5426         cf_path_syntax="$prefix"
5427 else
5428         cf_path_syntax="$ac_default_prefix"
5429 fi
5430
5431 case ".$with_libtool" in
5432 (.\$\(*\)*|.\'*\'*)
5433         ;;
5434 (..|./*|.\\*)
5435         ;;
5436 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5437         ;;
5438 (.\$\{*prefix\}*|.\$\{*dir\}*)
5439         eval with_libtool="$with_libtool"
5440         case ".$with_libtool" in
5441         (.NONE/*)
5442                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5443                 ;;
5444         esac
5445         ;;
5446 (.no|.NONE/*)
5447         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5448         ;;
5449 (*)
5450         { { echo "$as_me:5450: error: expected a pathname, not \"$with_libtool\"" >&5
5451 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5452    { (exit 1); exit 1; }; }
5453         ;;
5454 esac
5455
5456                 LIBTOOL=$with_libtool
5457         else
5458                 if test -n "$ac_tool_prefix"; then
5459   for ac_prog in libtool glibtool
5460   do
5461     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5462 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5463 echo "$as_me:5463: checking for $ac_word" >&5
5464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5465 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5466   echo $ECHO_N "(cached) $ECHO_C" >&6
5467 else
5468   if test -n "$LIBTOOL"; then
5469   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5470 else
5471   ac_save_IFS=$IFS; IFS=$ac_path_separator
5472 ac_dummy="$PATH"
5473 for ac_dir in $ac_dummy; do
5474   IFS=$ac_save_IFS
5475   test -z "$ac_dir" && ac_dir=.
5476   $as_executable_p "$ac_dir/$ac_word" || continue
5477 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5478 echo "$as_me:5478: found $ac_dir/$ac_word" >&5
5479 break
5480 done
5481
5482 fi
5483 fi
5484 LIBTOOL=$ac_cv_prog_LIBTOOL
5485 if test -n "$LIBTOOL"; then
5486   echo "$as_me:5486: result: $LIBTOOL" >&5
5487 echo "${ECHO_T}$LIBTOOL" >&6
5488 else
5489   echo "$as_me:5489: result: no" >&5
5490 echo "${ECHO_T}no" >&6
5491 fi
5492
5493     test -n "$LIBTOOL" && break
5494   done
5495 fi
5496 if test -z "$LIBTOOL"; then
5497   ac_ct_LIBTOOL=$LIBTOOL
5498   for ac_prog in libtool glibtool
5499 do
5500   # Extract the first word of "$ac_prog", so it can be a program name with args.
5501 set dummy $ac_prog; ac_word=$2
5502 echo "$as_me:5502: checking for $ac_word" >&5
5503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5504 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5505   echo $ECHO_N "(cached) $ECHO_C" >&6
5506 else
5507   if test -n "$ac_ct_LIBTOOL"; then
5508   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5509 else
5510   ac_save_IFS=$IFS; IFS=$ac_path_separator
5511 ac_dummy="$PATH"
5512 for ac_dir in $ac_dummy; do
5513   IFS=$ac_save_IFS
5514   test -z "$ac_dir" && ac_dir=.
5515   $as_executable_p "$ac_dir/$ac_word" || continue
5516 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5517 echo "$as_me:5517: found $ac_dir/$ac_word" >&5
5518 break
5519 done
5520
5521 fi
5522 fi
5523 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5524 if test -n "$ac_ct_LIBTOOL"; then
5525   echo "$as_me:5525: result: $ac_ct_LIBTOOL" >&5
5526 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5527 else
5528   echo "$as_me:5528: result: no" >&5
5529 echo "${ECHO_T}no" >&6
5530 fi
5531
5532   test -n "$ac_ct_LIBTOOL" && break
5533 done
5534 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5535
5536   LIBTOOL=$ac_ct_LIBTOOL
5537 fi
5538
5539 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5540 then
5541         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.].*//'`
5542 else
5543         cf_cv_libtool_version=
5544 fi
5545 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5546
5547                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5548                 then
5549
5550 unset ac_cv_prog_ac_ct_LIBTOOL
5551 unset ac_ct_LIBTOOL
5552 unset LIBTOOL
5553
5554                         if test -n "$ac_tool_prefix"; then
5555   for ac_prog in glibtool
5556   do
5557     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5558 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5559 echo "$as_me:5559: checking for $ac_word" >&5
5560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5561 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5562   echo $ECHO_N "(cached) $ECHO_C" >&6
5563 else
5564   if test -n "$LIBTOOL"; then
5565   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5566 else
5567   ac_save_IFS=$IFS; IFS=$ac_path_separator
5568 ac_dummy="$PATH"
5569 for ac_dir in $ac_dummy; do
5570   IFS=$ac_save_IFS
5571   test -z "$ac_dir" && ac_dir=.
5572   $as_executable_p "$ac_dir/$ac_word" || continue
5573 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5574 echo "$as_me:5574: found $ac_dir/$ac_word" >&5
5575 break
5576 done
5577
5578 fi
5579 fi
5580 LIBTOOL=$ac_cv_prog_LIBTOOL
5581 if test -n "$LIBTOOL"; then
5582   echo "$as_me:5582: result: $LIBTOOL" >&5
5583 echo "${ECHO_T}$LIBTOOL" >&6
5584 else
5585   echo "$as_me:5585: result: no" >&5
5586 echo "${ECHO_T}no" >&6
5587 fi
5588
5589     test -n "$LIBTOOL" && break
5590   done
5591 fi
5592 if test -z "$LIBTOOL"; then
5593   ac_ct_LIBTOOL=$LIBTOOL
5594   for ac_prog in glibtool
5595 do
5596   # Extract the first word of "$ac_prog", so it can be a program name with args.
5597 set dummy $ac_prog; ac_word=$2
5598 echo "$as_me:5598: checking for $ac_word" >&5
5599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5600 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5601   echo $ECHO_N "(cached) $ECHO_C" >&6
5602 else
5603   if test -n "$ac_ct_LIBTOOL"; then
5604   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5605 else
5606   ac_save_IFS=$IFS; IFS=$ac_path_separator
5607 ac_dummy="$PATH"
5608 for ac_dir in $ac_dummy; do
5609   IFS=$ac_save_IFS
5610   test -z "$ac_dir" && ac_dir=.
5611   $as_executable_p "$ac_dir/$ac_word" || continue
5612 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5613 echo "$as_me:5613: found $ac_dir/$ac_word" >&5
5614 break
5615 done
5616
5617 fi
5618 fi
5619 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5620 if test -n "$ac_ct_LIBTOOL"; then
5621   echo "$as_me:5621: result: $ac_ct_LIBTOOL" >&5
5622 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5623 else
5624   echo "$as_me:5624: result: no" >&5
5625 echo "${ECHO_T}no" >&6
5626 fi
5627
5628   test -n "$ac_ct_LIBTOOL" && break
5629 done
5630 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5631
5632   LIBTOOL=$ac_ct_LIBTOOL
5633 fi
5634
5635 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5636 then
5637         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.].*//'`
5638 else
5639         cf_cv_libtool_version=
5640 fi
5641 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5642
5643                 fi
5644         fi
5645         if test -z "$LIBTOOL" ; then
5646                 { { echo "$as_me:5646: error: Cannot find libtool" >&5
5647 echo "$as_me: error: Cannot find libtool" >&2;}
5648    { (exit 1); exit 1; }; }
5649         fi
5650         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5651         LIB_OBJECT='${OBJECTS:.o=.lo}'
5652         LIB_SUFFIX=.la
5653         LIB_CLEAN='${LIBTOOL} --mode=clean'
5654         LIB_COMPILE='${LIBTOOL} --mode=compile'
5655         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5656         LIB_INSTALL='${LIBTOOL} --mode=install'
5657         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5658         LIB_PREP=:
5659
5660 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5661 then
5662         echo "$as_me:5662: checking version of $LIBTOOL" >&5
5663 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5664
5665 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5666 then
5667         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.].*//'`
5668 else
5669         cf_cv_libtool_version=
5670 fi
5671 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5672
5673         echo "$as_me:5673: result: $cf_cv_libtool_version" >&5
5674 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5675         if test -n "$cf_cv_libtool_version"
5676         then
5677                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5678                 case "x$cf_check_libtool_version" in
5679                 (*...GNU-libtool...*)
5680                         ;;
5681                 (*)
5682                         { { echo "$as_me:5682: error: This is not GNU libtool" >&5
5683 echo "$as_me: error: This is not GNU libtool" >&2;}
5684    { (exit 1); exit 1; }; }
5685                         ;;
5686                 esac
5687         else
5688                 { { echo "$as_me:5688: error: No version found for $LIBTOOL" >&5
5689 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5690    { (exit 1); exit 1; }; }
5691         fi
5692 else
5693         { { echo "$as_me:5693: error: GNU libtool has not been found" >&5
5694 echo "$as_me: error: GNU libtool has not been found" >&2;}
5695    { (exit 1); exit 1; }; }
5696 fi
5697
5698         # special hack to add -no-undefined (which libtool should do for itself)
5699         LT_UNDEF=
5700         case "$cf_cv_system_name" in
5701         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5702                 LT_UNDEF=-no-undefined
5703                 ;;
5704         esac
5705
5706         # special hack to add --tag option for C++ compiler
5707         case "$cf_cv_libtool_version" in
5708         (1.[5-9]*|[2-9].[0-9.a-z]*)
5709                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5710                 LIBTOOL="$LIBTOOL --tag=CC"
5711                 ;;
5712         (*)
5713                 LIBTOOL_CXX="$LIBTOOL"
5714                 ;;
5715         esac
5716 else
5717         LIBTOOL=""
5718         LIBTOOL_CXX=""
5719 fi
5720
5721 test -z "$LIBTOOL" && ECHO_LT=
5722
5723 if test "$with_libtool" != "no" ; then
5724
5725 cf_list_models="$cf_list_models libtool"
5726
5727 else
5728
5729 echo "$as_me:5729: checking if you want to build shared libraries" >&5
5730 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5731
5732 # Check whether --with-shared or --without-shared was given.
5733 if test "${with_shared+set}" = set; then
5734   withval="$with_shared"
5735   with_shared=$withval
5736 else
5737   with_shared=no
5738 fi;
5739 echo "$as_me:5739: result: $with_shared" >&5
5740 echo "${ECHO_T}$with_shared" >&6
5741 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5742
5743 echo "$as_me:5743: checking if you want to build static libraries" >&5
5744 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5745
5746 # Check whether --with-normal or --without-normal was given.
5747 if test "${with_normal+set}" = set; then
5748   withval="$with_normal"
5749   with_normal=$withval
5750 else
5751   with_normal=yes
5752 fi;
5753 echo "$as_me:5753: result: $with_normal" >&5
5754 echo "${ECHO_T}$with_normal" >&6
5755 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5756
5757 echo "$as_me:5757: checking if you want to build debug libraries" >&5
5758 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5759
5760 # Check whether --with-debug or --without-debug was given.
5761 if test "${with_debug+set}" = set; then
5762   withval="$with_debug"
5763   with_debug=$withval
5764 else
5765   with_debug=yes
5766 fi;
5767 echo "$as_me:5767: result: $with_debug" >&5
5768 echo "${ECHO_T}$with_debug" >&6
5769 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5770
5771 echo "$as_me:5771: checking if you want to build profiling libraries" >&5
5772 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5773
5774 # Check whether --with-profile or --without-profile was given.
5775 if test "${with_profile+set}" = set; then
5776   withval="$with_profile"
5777   with_profile=$withval
5778 else
5779   with_profile=no
5780 fi;
5781 echo "$as_me:5781: result: $with_profile" >&5
5782 echo "${ECHO_T}$with_profile" >&6
5783 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5784
5785 fi
5786
5787 if test "X$cf_with_cxx_binding" != Xno; then
5788 if test "x$with_shared" = "xyes"; then
5789 echo "$as_me:5789: checking if you want to build C++ shared libraries" >&5
5790 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5791
5792 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5793 if test "${with_cxx_shared+set}" = set; then
5794   withval="$with_cxx_shared"
5795   with_shared_cxx=$withval
5796 else
5797   with_shared_cxx=no
5798 fi;
5799 echo "$as_me:5799: result: $with_shared_cxx" >&5
5800 echo "${ECHO_T}$with_shared_cxx" >&6
5801 fi
5802 fi
5803
5804 ###############################################################################
5805
5806 echo "$as_me:5806: checking for specified models" >&5
5807 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5808 test -z "$cf_list_models" && cf_list_models=normal
5809 test "$with_libtool" != "no" && cf_list_models=libtool
5810 echo "$as_me:5810: result: $cf_list_models" >&5
5811 echo "${ECHO_T}$cf_list_models" >&6
5812
5813 ### Use the first model as the default, and save its suffix for use in building
5814 ### up test-applications.
5815 echo "$as_me:5815: checking for default model" >&5
5816 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5817 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5818 echo "$as_me:5818: result: $DFT_LWR_MODEL" >&5
5819 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5820
5821 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5822
5823 TICS_NAME=tic
5824
5825 TINFO_NAME=tinfo
5826
5827 LIB_NAME=ncurses
5828
5829 LIB_DIR=../lib
5830 LIB_2ND=../../lib
5831
5832 echo "$as_me:5832: checking if you want to have a library-prefix" >&5
5833 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5834
5835 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5836 if test "${with_lib_prefix+set}" = set; then
5837   withval="$with_lib_prefix"
5838   with_lib_prefix=$withval
5839 else
5840   with_lib_prefix=auto
5841 fi;
5842 echo "$as_me:5842: result: $with_lib_prefix" >&5
5843 echo "${ECHO_T}$with_lib_prefix" >&6
5844
5845 if test "$with_lib_prefix" = auto
5846 then
5847
5848         case "$cf_cv_system_name" in
5849         (OS/2*|os2*)
5850                 if test "$DFT_LWR_MODEL" = libtool; then
5851                         LIB_PREFIX='lib'
5852                 else
5853                         LIB_PREFIX=''
5854                 fi
5855                 ;;
5856         (*-msvc*)
5857                 LIB_PREFIX=''
5858                 ;;
5859         (*)     LIB_PREFIX='lib'
5860                 ;;
5861         esac
5862 cf_prefix=$LIB_PREFIX
5863
5864 elif test "$with_lib_prefix" = no
5865 then
5866         LIB_PREFIX=
5867 else
5868         LIB_PREFIX=$with_lib_prefix
5869 fi
5870
5871 LIB_SUFFIX=
5872
5873         echo "$as_me:5873: checking for PATH separator" >&5
5874 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5875         case "$cf_cv_system_name" in
5876         (os2*)  PATH_SEPARATOR=';'  ;;
5877         (*)     ${PATH_SEPARATOR:=':'}  ;;
5878         esac
5879
5880         echo "$as_me:5880: result: $PATH_SEPARATOR" >&5
5881 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5882
5883 ###############################################################################
5884
5885 echo "$as_me:5885: checking if you want to build a separate terminfo library" >&5
5886 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5887
5888 # Check whether --with-termlib or --without-termlib was given.
5889 if test "${with_termlib+set}" = set; then
5890   withval="$with_termlib"
5891   with_termlib=$withval
5892 else
5893   with_termlib=no
5894 fi;
5895 echo "$as_me:5895: result: $with_termlib" >&5
5896 echo "${ECHO_T}$with_termlib" >&6
5897
5898 echo "$as_me:5898: checking if you want to build a separate tic library" >&5
5899 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5900
5901 # Check whether --with-ticlib or --without-ticlib was given.
5902 if test "${with_ticlib+set}" = set; then
5903   withval="$with_ticlib"
5904   with_ticlib=$withval
5905 else
5906   with_ticlib=no
5907 fi;
5908 echo "$as_me:5908: result: $with_ticlib" >&5
5909 echo "${ECHO_T}$with_ticlib" >&6
5910
5911 if test X"$CC_G_OPT" = X"" ; then
5912         CC_G_OPT='-g'
5913         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5914 fi
5915
5916 if test X"$CXX_G_OPT" = X"" ; then
5917         CXX_G_OPT='-g'
5918         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5919 fi
5920
5921 echo "$as_me:5921: checking for default loader flags" >&5
5922 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5923 case "$DFT_LWR_MODEL" in
5924 (libtool) LD_MODEL=''   ;;
5925 (normal)  LD_MODEL=''   ;;
5926 (debug)   LD_MODEL=$CC_G_OPT ;;
5927 (profile) LD_MODEL='-pg';;
5928 (shared)  LD_MODEL=''   ;;
5929 esac
5930 echo "$as_me:5930: result: $LD_MODEL" >&5
5931 echo "${ECHO_T}$LD_MODEL" >&6
5932
5933 case "$DFT_LWR_MODEL" in
5934 (shared)
5935
5936 echo "$as_me:5936: checking if rpath option should be used" >&5
5937 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5938
5939 # Check whether --enable-rpath or --disable-rpath was given.
5940 if test "${enable_rpath+set}" = set; then
5941   enableval="$enable_rpath"
5942   cf_cv_enable_rpath=$enableval
5943 else
5944   cf_cv_enable_rpath=no
5945 fi;
5946 echo "$as_me:5946: result: $cf_cv_enable_rpath" >&5
5947 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5948
5949 echo "$as_me:5949: checking if shared libraries should be relinked during install" >&5
5950 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5951
5952 # Check whether --enable-relink or --disable-relink was given.
5953 if test "${enable_relink+set}" = set; then
5954   enableval="$enable_relink"
5955   cf_cv_do_relink=$enableval
5956 else
5957   cf_cv_do_relink=yes
5958 fi;
5959 echo "$as_me:5959: result: $cf_cv_do_relink" >&5
5960 echo "${ECHO_T}$cf_cv_do_relink" >&6
5961         ;;
5962 esac
5963
5964 # we will build libraries one-level down.
5965 rel_builddir=..
5966
5967 LD_RPATH_OPT=
5968 if test "x$cf_cv_enable_rpath" != xno
5969 then
5970         echo "$as_me:5970: checking for an rpath option" >&5
5971 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5972         case "$cf_cv_system_name" in
5973         (irix*)
5974                 if test "$GCC" = yes; then
5975                         LD_RPATH_OPT="-Wl,-rpath,"
5976                 else
5977                         LD_RPATH_OPT="-rpath "
5978                 fi
5979                 ;;
5980         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5981                 LD_RPATH_OPT="-Wl,-rpath,"
5982                 ;;
5983         (openbsd[2-9].*|mirbsd*)
5984                 LD_RPATH_OPT="-Wl,-rpath,"
5985                 ;;
5986         (dragonfly*)
5987                 LD_RPATH_OPT="-rpath "
5988                 ;;
5989         (netbsd*)
5990                 LD_RPATH_OPT="-Wl,-rpath,"
5991                 ;;
5992         (osf*|mls+*)
5993                 LD_RPATH_OPT="-rpath "
5994                 ;;
5995         (solaris2*)
5996                 LD_RPATH_OPT="-R"
5997                 ;;
5998         (*)
5999                 ;;
6000         esac
6001         echo "$as_me:6001: result: $LD_RPATH_OPT" >&5
6002 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6003
6004         case "x$LD_RPATH_OPT" in
6005         (x-R*)
6006                 echo "$as_me:6006: checking if we need a space after rpath option" >&5
6007 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6008                 cf_save_LIBS="$LIBS"
6009
6010 cf_add_libs="$LIBS"
6011 # reverse order
6012 cf_add_0lib=
6013 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6014 # filter duplicates
6015 for cf_add_1lib in $cf_add_0lib; do
6016         for cf_add_2lib in $cf_add_libs; do
6017                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6018                         cf_add_1lib=
6019                         break
6020                 fi
6021         done
6022         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6023 done
6024 LIBS="$cf_add_libs"
6025
6026                 cat >"conftest.$ac_ext" <<_ACEOF
6027 #line 6027 "configure"
6028 #include "confdefs.h"
6029
6030 int
6031 main (void)
6032 {
6033
6034   ;
6035   return 0;
6036 }
6037 _ACEOF
6038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6039 if { (eval echo "$as_me:6039: \"$ac_link\"") >&5
6040   (eval $ac_link) 2>&5
6041   ac_status=$?
6042   echo "$as_me:6042: \$? = $ac_status" >&5
6043   (exit "$ac_status"); } &&
6044          { ac_try='test -s "conftest$ac_exeext"'
6045   { (eval echo "$as_me:6045: \"$ac_try\"") >&5
6046   (eval $ac_try) 2>&5
6047   ac_status=$?
6048   echo "$as_me:6048: \$? = $ac_status" >&5
6049   (exit "$ac_status"); }; }; then
6050   cf_rpath_space=no
6051 else
6052   echo "$as_me: failed program was:" >&5
6053 cat "conftest.$ac_ext" >&5
6054 cf_rpath_space=yes
6055 fi
6056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6057                 LIBS="$cf_save_LIBS"
6058                 echo "$as_me:6058: result: $cf_rpath_space" >&5
6059 echo "${ECHO_T}$cf_rpath_space" >&6
6060                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6061                 ;;
6062         esac
6063 fi
6064
6065         RM_SHARED_OPTS=
6066         LOCAL_LDFLAGS=
6067         LOCAL_LDFLAGS2=
6068         LD_SHARED_OPTS=
6069         INSTALL_LIB="-m 644"
6070         : ${rel_builddir:=.}
6071
6072         shlibdir=$libdir
6073
6074         MAKE_DLLS="#"
6075
6076         cf_cv_do_symlinks=no
6077         cf_ld_rpath_opt=
6078         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6079
6080         echo "$as_me:6080: checking if release/abi version should be used for shared libs" >&5
6081 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6082
6083 # Check whether --with-shlib-version or --without-shlib-version was given.
6084 if test "${with_shlib_version+set}" = set; then
6085   withval="$with_shlib_version"
6086   test -z "$withval" && withval=auto
6087         case "$withval" in
6088         (yes)
6089                 cf_cv_shlib_version=auto
6090                 ;;
6091         (rel|abi|auto)
6092                 cf_cv_shlib_version=$withval
6093                 ;;
6094         (*)
6095                 echo "$as_me:6095: result: $withval" >&5
6096 echo "${ECHO_T}$withval" >&6
6097                 { { echo "$as_me:6097: error: option value must be one of: rel, abi, or auto" >&5
6098 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6099    { (exit 1); exit 1; }; }
6100                 ;;
6101         esac
6102
6103 else
6104   cf_cv_shlib_version=auto
6105 fi;
6106         echo "$as_me:6106: result: $cf_cv_shlib_version" >&5
6107 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6108
6109         cf_cv_rm_so_locs=no
6110         cf_try_cflags=
6111
6112         # Some less-capable ports of gcc support only -fpic
6113         CC_SHARED_OPTS=
6114
6115         cf_try_fPIC=no
6116         if test "$GCC" = yes
6117         then
6118                 cf_try_fPIC=yes
6119         else
6120                 case "$cf_cv_system_name" in
6121                 (*linux*)       # e.g., PGI compiler
6122                         cf_try_fPIC=yes
6123                         ;;
6124                 esac
6125         fi
6126
6127         if test "$cf_try_fPIC" = yes
6128         then
6129                 echo "$as_me:6129: checking which $CC option to use" >&5
6130 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6131                 cf_save_CFLAGS="$CFLAGS"
6132                 for CC_SHARED_OPTS in -fPIC -fpic ''
6133                 do
6134                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6135                         cat >"conftest.$ac_ext" <<_ACEOF
6136 #line 6136 "configure"
6137 #include "confdefs.h"
6138 #include <stdio.h>
6139 int
6140 main (void)
6141 {
6142 int x = 1
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 rm -f "conftest.$ac_objext"
6148 if { (eval echo "$as_me:6148: \"$ac_compile\"") >&5
6149   (eval $ac_compile) 2>&5
6150   ac_status=$?
6151   echo "$as_me:6151: \$? = $ac_status" >&5
6152   (exit "$ac_status"); } &&
6153          { ac_try='test -s "conftest.$ac_objext"'
6154   { (eval echo "$as_me:6154: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:6157: \$? = $ac_status" >&5
6158   (exit "$ac_status"); }; }; then
6159   break
6160 else
6161   echo "$as_me: failed program was:" >&5
6162 cat "conftest.$ac_ext" >&5
6163 fi
6164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6165                 done
6166                 echo "$as_me:6166: result: $CC_SHARED_OPTS" >&5
6167 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6168                 CFLAGS="$cf_save_CFLAGS"
6169         fi
6170
6171         cf_cv_shlib_version_infix=no
6172
6173         case "$cf_cv_system_name" in
6174         (aix4.3-9*|aix[5-7]*)
6175                 if test "$GCC" = yes; then
6176                         CC_SHARED_OPTS='-Wl,-brtl'
6177                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6178                 else
6179                         CC_SHARED_OPTS='-brtl'
6180                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6181                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6182                 fi
6183                 ;;
6184         (beos*)
6185                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6186                 ;;
6187         (cygwin*)
6188                 CC_SHARED_OPTS=
6189                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6190                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6191                 cf_cv_shlib_version=cygdll
6192                 cf_cv_shlib_version_infix=cygdll
6193                 shlibdir=$bindir
6194                 MAKE_DLLS=
6195                 cat >mk_shared_lib.sh <<-CF_EOF
6196                 #!$SHELL
6197                 SHARED_LIB=\$1
6198                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6199                 shift
6200                 cat <<-EOF
6201                 Linking shared library
6202                 ** SHARED_LIB \$SHARED_LIB
6203                 ** IMPORT_LIB \$IMPORT_LIB
6204 EOF
6205                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6206 CF_EOF
6207                 chmod +x mk_shared_lib.sh
6208                 ;;
6209         (msys*)
6210                 CC_SHARED_OPTS=
6211                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6212                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6213                 cf_cv_shlib_version=msysdll
6214                 cf_cv_shlib_version_infix=msysdll
6215                 shlibdir=$bindir
6216                 MAKE_DLLS=
6217                 cat >mk_shared_lib.sh <<-CF_EOF
6218                 #!$SHELL
6219                 SHARED_LIB=\$1
6220                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6221                 shift
6222                 cat <<-EOF
6223                 Linking shared library
6224                 ** SHARED_LIB \$SHARED_LIB
6225                 ** IMPORT_LIB \$IMPORT_LIB
6226 EOF
6227                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6228 CF_EOF
6229                 chmod +x mk_shared_lib.sh
6230                 ;;
6231         (darwin*)
6232                 cf_try_cflags="no-cpp-precomp"
6233                 CC_SHARED_OPTS="-dynamic"
6234                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6235                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6236                 cf_cv_shlib_version_infix=yes
6237                 echo "$as_me:6237: checking if ld -search_paths_first works" >&5
6238 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6239 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6240   echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242
6243                         cf_save_LDFLAGS=$LDFLAGS
6244                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6245                         cat >"conftest.$ac_ext" <<_ACEOF
6246 #line 6246 "configure"
6247 #include "confdefs.h"
6248
6249 int
6250 main (void)
6251 {
6252 int i;
6253   ;
6254   return 0;
6255 }
6256 _ACEOF
6257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6258 if { (eval echo "$as_me:6258: \"$ac_link\"") >&5
6259   (eval $ac_link) 2>&5
6260   ac_status=$?
6261   echo "$as_me:6261: \$? = $ac_status" >&5
6262   (exit "$ac_status"); } &&
6263          { ac_try='test -s "conftest$ac_exeext"'
6264   { (eval echo "$as_me:6264: \"$ac_try\"") >&5
6265   (eval $ac_try) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit "$ac_status"); }; }; then
6269   cf_cv_ldflags_search_paths_first=yes
6270 else
6271   echo "$as_me: failed program was:" >&5
6272 cat "conftest.$ac_ext" >&5
6273 cf_cv_ldflags_search_paths_first=no
6274 fi
6275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6276                                 LDFLAGS=$cf_save_LDFLAGS
6277 fi
6278 echo "$as_me:6278: result: $cf_cv_ldflags_search_paths_first" >&5
6279 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6280                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6281                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6282                 fi
6283                 ;;
6284         (haiku*)
6285
6286         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6287         if test "$cf_cv_shlib_version" = rel; then
6288                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6289         else
6290                 cf_cv_shared_soname='`basename $@`'
6291         fi
6292
6293                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6294                 ;;
6295         (hpux[7-8]*)
6296                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6297                 if test "$GCC" != yes; then
6298                         CC_SHARED_OPTS='+Z'
6299                 fi
6300                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6301                 INSTALL_LIB="-m 555"
6302                 ;;
6303         (hpux*)
6304                 # (tested with gcc 2.7.2 -- I don't have c89)
6305                 if test "$GCC" = yes; then
6306                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6307                 else
6308                         CC_SHARED_OPTS='+Z'
6309                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6310                 fi
6311                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6312                 # HP-UX shared libraries must be executable, and should be
6313                 # readonly to exploit a quirk in the memory manager.
6314                 INSTALL_LIB="-m 555"
6315                 ;;
6316         (interix*)
6317                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6318                 if test "$cf_cv_shlib_version" = rel; then
6319                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6320                 else
6321                         cf_shared_soname='`basename $@`'
6322                 fi
6323                 CC_SHARED_OPTS=
6324                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6325                 ;;
6326         (irix*)
6327                 if test "$cf_cv_enable_rpath" = yes ; then
6328                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6329                 fi
6330                 # tested with IRIX 5.2 and 'cc'.
6331                 if test "$GCC" != yes; then
6332                         CC_SHARED_OPTS='-KPIC'
6333                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6334                 else
6335                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6336                 fi
6337                 cf_cv_rm_so_locs=yes
6338                 ;;
6339         (linux*|gnu*|k*bsd*-gnu)
6340                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6341                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6342                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6343                 fi
6344                 if test "$cf_cv_enable_rpath" = yes ; then
6345                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6346                 fi
6347
6348         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6349         if test "$cf_cv_shlib_version" = rel; then
6350                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6351         else
6352                 cf_cv_shared_soname='`basename $@`'
6353         fi
6354
6355                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6356                 ;;
6357         (mingw*msvc*)
6358                 cf_cv_shlib_version=msvcdll
6359                 cf_cv_shlib_version_infix=msvcdll
6360                 shlibdir=$bindir
6361                 MAKE_DLLS=
6362                 if test "$DFT_LWR_MODEL" = "shared" ; then
6363                         LOCAL_LDFLAGS="-link -dll"
6364                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6365                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6366                 fi
6367                 CC_SHARED_OPTS=
6368                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6369                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6370                 cat >mk_shared_lib.sh <<-CF_EOF
6371                 #!$SHELL
6372                 SHARED_LIB=\$1
6373                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6374                 shift
6375                 my_ld=\$1
6376                 shift
6377                 cat <<-EOF
6378                 Linking shared library
6379                 ** SHARED LIB \$SHARED_LIB
6380                 ** IMPORT_LIB \$IMPORT_LIB
6381 EOF
6382                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6383                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6384                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6385 CF_EOF
6386                 chmod +x mk_shared_lib.sh
6387                 cat >mk_prog.sh <<-CF_EOF
6388                 #!$SHELL
6389                 shift
6390                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6391                 LD="$LD"
6392                 clopts=()
6393                 ldopts=("/subsystem:console")
6394                 libs=()
6395                 isdll=0
6396                 while test \$# -gt 0; do
6397                         case "\$1" in
6398                                 -link)
6399                                         # ignore -link argument
6400                                         ;;
6401                                 -M[TD] | -M[TD]d)
6402                                         # ignore runtime-library option
6403                                         ;;
6404                                 -dll)
6405                                         isdll=1
6406                                         ;;
6407                                 -W* | -w*)
6408                                         # ignore warnings
6409                                         ;;
6410                                 -D*)
6411                                         clopts+=("\$1")
6412                                         ;;
6413                                 -I*)
6414                                         clopts+=("\$1")
6415                                         ;;
6416                                 -l*)
6417                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6418                                         ;;
6419                                 -L*)
6420                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6421                                         ;;
6422                                 *.obj | *.o)
6423                                         ldopts+=("\$1")
6424                                         ;;
6425                                 -Wl,*)
6426                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6427                                                 ldopts+=("\${linkarg}")
6428                                         done
6429                                         ;;
6430                                 *.lib)
6431                                         ldopts+=("\$1")
6432                                         ;;
6433                                 -o)
6434                                         shift
6435                                         ldopts+=("-out:\$1")
6436                                         ;;
6437                                 *)
6438                                         clopts+=("\$1")
6439                                         ldopts+=("\$1")
6440                                         ;;
6441                         esac
6442                         shift
6443                 done
6444                 if [ "\$isdll" -ne 0 ]; then
6445                         for lib in \${libs[*]}; do
6446                                 ldopts+=("\$lib.dll.lib")
6447                         done
6448                 else
6449                         for lib in \${libs[*]}; do
6450                                 ldopts+=("\$lib.lib")
6451                         done
6452                 fi
6453                 cat <<-EOF
6454                 Creating program
6455                 ** ld options:   "\${ldopts[@]}"
6456 EOF
6457                 exec \$LD \${ldopts[@]}
6458 CF_EOF
6459                 chmod +x mk_prog.sh
6460                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6461                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6462                 ;;
6463         (mingw*)
6464                 cf_cv_shlib_version=mingw
6465                 cf_cv_shlib_version_infix=mingw
6466                 shlibdir=$bindir
6467                 MAKE_DLLS=
6468                 if test "$DFT_LWR_MODEL" = "shared" ; then
6469                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6470                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6471                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6472                 fi
6473                 CC_SHARED_OPTS=
6474                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6475                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6476                 cat >mk_shared_lib.sh <<-CF_EOF
6477                 #!$SHELL
6478                 SHARED_LIB=\$1
6479                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6480                 shift
6481                 cat <<-EOF
6482                 Linking shared library
6483                 ** SHARED_LIB \$SHARED_LIB
6484                 ** IMPORT_LIB \$IMPORT_LIB
6485 EOF
6486                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6487 CF_EOF
6488                 chmod +x mk_shared_lib.sh
6489                 ;;
6490         (openbsd[2-9].*|mirbsd*)
6491                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6492                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6493                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6494                 fi
6495                 if test "$cf_cv_enable_rpath" = yes ; then
6496                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6497                 fi
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499
6500         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6501         if test "$cf_cv_shlib_version" = rel; then
6502                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6503         else
6504                 cf_cv_shared_soname='`basename $@`'
6505         fi
6506
6507                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6508                 ;;
6509         (nskJ*)
6510                 CC_SHARED_OPTS=
6511                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6512                 ;;
6513         (nskL*)
6514                 CC_SHARED_OPTS=
6515                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6516                 ;;
6517         (nto-qnx*|openbsd*|freebsd[12].*)
6518                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6519                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6520                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6521                 ;;
6522         (dragonfly*|freebsd*)
6523                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6524                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6525                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6526                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6527                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6528                 fi
6529
6530         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6531         if test "$cf_cv_shlib_version" = rel; then
6532                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6533         else
6534                 cf_cv_shared_soname='`basename $@`'
6535         fi
6536
6537                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6538                 ;;
6539         (netbsd*)
6540                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6541                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6542                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6545                         if test "$cf_cv_shlib_version" = auto; then
6546                         if test -f /usr/libexec/ld.elf_so; then
6547                                 cf_cv_shlib_version=abi
6548                         else
6549                                 cf_cv_shlib_version=rel
6550                         fi
6551                         fi
6552
6553         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6554         if test "$cf_cv_shlib_version" = rel; then
6555                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6556         else
6557                 cf_cv_shared_soname='`basename $@`'
6558         fi
6559
6560                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6561                 else
6562                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6563                 fi
6564                 ;;
6565         (osf*|mls+*)
6566                 # tested with OSF/1 V3.2 and 'cc'
6567                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6568                 # link with shared libs).
6569                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6570                 case "$host_os" in
6571                 (osf4*)
6572                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6573                         ;;
6574                 esac
6575                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6576                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6577                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6578                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6579                 fi
6580                 cf_cv_rm_so_locs=yes
6581                 ;;
6582         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6583                 # tested with osr5.0.5
6584                 if test "$GCC" != yes; then
6585                         CC_SHARED_OPTS='-belf -KPIC'
6586                 fi
6587                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6588                 if test "$cf_cv_enable_rpath" = yes ; then
6589                         # only way is to set LD_RUN_PATH but no switch for it
6590                         RUN_PATH=$libdir
6591                 fi
6592                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6593                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6594                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6595                 ;;
6596         (sunos4*)
6597                 # tested with SunOS 4.1.1 and gcc 2.7.0
6598                 if test "$GCC" != yes; then
6599                         CC_SHARED_OPTS='-KPIC'
6600                 fi
6601                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6602                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6603                 ;;
6604         (solaris2*)
6605                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6606                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6607                 if test "$DFT_LWR_MODEL" = "shared" ; then
6608                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6609                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6610                 fi
6611                 if test "$cf_cv_enable_rpath" = yes ; then
6612                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6613                 fi
6614
6615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6616         if test "$cf_cv_shlib_version" = rel; then
6617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6618         else
6619                 cf_cv_shared_soname='`basename $@`'
6620         fi
6621
6622                 if test "$GCC" != yes; then
6623                         cf_save_CFLAGS="$CFLAGS"
6624                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6625                         do
6626                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6627                                 cat >"conftest.$ac_ext" <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630 #include <stdio.h>
6631 int
6632 main (void)
6633 {
6634 printf("Hello\\n");
6635   ;
6636   return 0;
6637 }
6638 _ACEOF
6639 rm -f "conftest.$ac_objext"
6640 if { (eval echo "$as_me:6640: \"$ac_compile\"") >&5
6641   (eval $ac_compile) 2>&5
6642   ac_status=$?
6643   echo "$as_me:6643: \$? = $ac_status" >&5
6644   (exit "$ac_status"); } &&
6645          { ac_try='test -s "conftest.$ac_objext"'
6646   { (eval echo "$as_me:6646: \"$ac_try\"") >&5
6647   (eval $ac_try) 2>&5
6648   ac_status=$?
6649   echo "$as_me:6649: \$? = $ac_status" >&5
6650   (exit "$ac_status"); }; }; then
6651   break
6652 else
6653   echo "$as_me: failed program was:" >&5
6654 cat "conftest.$ac_ext" >&5
6655 fi
6656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6657                         done
6658                         CFLAGS="$cf_save_CFLAGS"
6659                         CC_SHARED_OPTS=$cf_shared_opts
6660                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6661                 else
6662                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6663                 fi
6664                 ;;
6665         (sysv5uw7*|unix_sv*)
6666                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6667                 if test "$GCC" != yes; then
6668                         CC_SHARED_OPTS='-KPIC'
6669                 fi
6670                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6671                 ;;
6672         (*)
6673                 CC_SHARED_OPTS='unknown'
6674                 MK_SHARED_LIB='echo unknown'
6675                 ;;
6676         esac
6677
6678         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6679         case "$cf_cv_shlib_version" in
6680         (rel|abi)
6681                 case "$MK_SHARED_LIB" in
6682                 (*'-o $@')
6683                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6684                         ;;
6685                 (*)
6686                         { echo "$as_me:6686: WARNING: ignored --with-shlib-version" >&5
6687 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6688                         ;;
6689                 esac
6690                 ;;
6691         esac
6692
6693         if test -n "$cf_try_cflags"
6694         then
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6696 "${as_me:-configure}"
6697 #include <stdio.h>
6698 int main(int argc, char *argv[])
6699 {
6700         printf("hello\\n");
6701         return (argv[argc-1] == 0) ;
6702 }
6703 EOF
6704                 cf_save_CFLAGS="$CFLAGS"
6705                 for cf_opt in $cf_try_cflags
6706                 do
6707                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6708                         echo "$as_me:6708: checking if CFLAGS option -$cf_opt works" >&5
6709 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6710                         if { (eval echo "$as_me:6710: \"$ac_compile\"") >&5
6711   (eval $ac_compile) 2>&5
6712   ac_status=$?
6713   echo "$as_me:6713: \$? = $ac_status" >&5
6714   (exit "$ac_status"); }; then
6715                                 echo "$as_me:6715: result: yes" >&5
6716 echo "${ECHO_T}yes" >&6
6717                                 cf_save_CFLAGS="$CFLAGS"
6718                         else
6719                                 echo "$as_me:6719: result: no" >&5
6720 echo "${ECHO_T}no" >&6
6721                         fi
6722                 done
6723                 CFLAGS="$cf_save_CFLAGS"
6724         fi
6725
6726         # RPATH_LIST is a colon-separated list of directories
6727         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6728         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6729
6730         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6731
6732         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6733
6734 echo "${as_me:-configure}:6734: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6735
6736         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6737
6738 echo "${as_me:-configure}:6738: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6739
6740 for model in $cf_list_models ; do
6741         case "$model" in
6742         (libtool)
6743
6744 echo "$as_me:6744: checking for additional libtool options" >&5
6745 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6746
6747 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6748 if test "${with_libtool_opts+set}" = set; then
6749   withval="$with_libtool_opts"
6750   with_libtool_opts=$withval
6751 else
6752   with_libtool_opts=no
6753 fi;
6754 echo "$as_me:6754: result: $with_libtool_opts" >&5
6755 echo "${ECHO_T}$with_libtool_opts" >&6
6756
6757 case .$with_libtool_opts in
6758 (.yes|.no|.)
6759         ;;
6760 (*)
6761         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6762         ;;
6763 esac
6764
6765 echo "$as_me:6765: checking if exported-symbols file should be used" >&5
6766 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6767
6768 # Check whether --with-export-syms or --without-export-syms was given.
6769 if test "${with_export_syms+set}" = set; then
6770   withval="$with_export_syms"
6771   with_export_syms=$withval
6772 else
6773   with_export_syms=no
6774 fi;
6775 if test "x$with_export_syms" = xyes
6776 then
6777         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6778
6779 fi
6780 echo "$as_me:6780: result: $with_export_syms" >&5
6781 echo "${ECHO_T}$with_export_syms" >&6
6782 if test "x$with_export_syms" != xno
6783 then
6784         EXPORT_SYMS="-export-symbols $with_export_syms"
6785
6786 fi
6787
6788                 ;;
6789         (shared)
6790                 if test "$CC_SHARED_OPTS" = "unknown"; then
6791                         { { echo "$as_me:6791: error: Shared libraries are not supported in this version" >&5
6792 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6793    { (exit 1); exit 1; }; }
6794                 fi
6795                 # workaround for inept transition to PIE vs PIC...
6796                 echo "$as_me:6796: checking if current CFLAGS link properly" >&5
6797 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6798                 cat >"conftest.$ac_ext" <<_ACEOF
6799 #line 6799 "configure"
6800 #include "confdefs.h"
6801 #include <stdio.h>
6802 int
6803 main (void)
6804 {
6805 printf("Hello work\\n");
6806   ;
6807   return 0;
6808 }
6809 _ACEOF
6810 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6811 if { (eval echo "$as_me:6811: \"$ac_link\"") >&5
6812   (eval $ac_link) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit "$ac_status"); } &&
6816          { ac_try='test -s "conftest$ac_exeext"'
6817   { (eval echo "$as_me:6817: \"$ac_try\"") >&5
6818   (eval $ac_try) 2>&5
6819   ac_status=$?
6820   echo "$as_me:6820: \$? = $ac_status" >&5
6821   (exit "$ac_status"); }; }; then
6822   cf_cflags_work=yes
6823 else
6824   echo "$as_me: failed program was:" >&5
6825 cat "conftest.$ac_ext" >&5
6826 cf_cflags_work=no
6827 fi
6828 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6829                 echo "$as_me:6829: result: $cf_cflags_work" >&5
6830 echo "${ECHO_T}$cf_cflags_work" >&6
6831                 if test "$cf_cflags_work" = no
6832                 then
6833                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6834
6835 echo "${as_me:-configure}:6835: testing try to work around by appending shared-options ..." 1>&5
6836
6837                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6838                 fi
6839
6840 echo "$as_me:6840: checking if versioned-symbols file should be used" >&5
6841 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6842
6843 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6844 if test "${with_versioned_syms+set}" = set; then
6845   withval="$with_versioned_syms"
6846   with_versioned_syms=$withval
6847 else
6848   with_versioned_syms=no
6849 fi;
6850 case "x$with_versioned_syms" in
6851 (xyes)
6852         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6853
6854         ;;
6855 (xno)
6856         ;;
6857 (x/*)
6858         test -f "$with_versioned_syms" || { { echo "$as_me:6858: error: expected a filename: $with_versioned_syms" >&5
6859 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6860    { (exit 1); exit 1; }; }
6861         ;;
6862 (*)
6863         test -f "$with_versioned_syms" || { { echo "$as_me:6863: error: expected a filename: $with_versioned_syms" >&5
6864 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6865    { (exit 1); exit 1; }; }
6866         with_versioned_syms=`pwd`/"$with_versioned_syms"
6867         ;;
6868 esac
6869 echo "$as_me:6869: result: $with_versioned_syms" >&5
6870 echo "${ECHO_T}$with_versioned_syms" >&6
6871
6872 RESULTING_SYMS=
6873 VERSIONED_SYMS=
6874 WILDCARD_SYMS=
6875
6876 if test "x$with_versioned_syms" != xno
6877 then
6878         RESULTING_SYMS=$with_versioned_syms
6879         case "x$MK_SHARED_LIB" in
6880         (*-Wl,*)
6881                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6882                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6883                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6886
6887                 ;;
6888         (*-dy\ *)
6889                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6890                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6891                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6892
6893 echo "${as_me:-configure}:6893: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6894
6895                 ;;
6896         (*)
6897                 { echo "$as_me:6897: WARNING: this system does not support versioned-symbols" >&5
6898 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6899                 ;;
6900         esac
6901
6902         # Linux ld can selectively override scope, e.g., of symbols beginning with
6903         # "_" by first declaring some as global, and then using a wildcard to
6904         # declare the others as local.  Some other loaders cannot do this.  Check
6905         # by constructing a (very) simple shared library and inspecting its
6906         # symbols.
6907         if test "x$VERSIONED_SYMS" != "x"
6908         then
6909                 echo "$as_me:6909: checking if wildcards can be used to selectively omit symbols" >&5
6910 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6911                 WILDCARD_SYMS=no
6912
6913                 # make sources
6914                 rm -f conftest.*
6915
6916                 cat >conftest.ver <<EOF
6917 module_1.0 {
6918 global:
6919         globalf1;
6920 local:
6921         localf1;
6922 };
6923 module_2.0 {
6924 global:
6925         globalf2;
6926 local:
6927         localf2;
6928         _*;
6929 } module_1.0;
6930 submodule_1.0 {
6931 global:
6932         subglobalf1;
6933         _ismissing;
6934 local:
6935         sublocalf1;
6936 };
6937 submodule_2.0 {
6938 global:
6939         subglobalf2;
6940 local:
6941         sublocalf2;
6942         _*;
6943 } submodule_1.0;
6944 EOF
6945                 cat >conftest.$ac_ext <<EOF
6946 #line 6946 "configure"
6947 int     _ismissing(void) { return 1; }
6948 int     _localf1(void) { return 1; }
6949 int     _localf2(void) { return 2; }
6950 int     globalf1(void) { return 1; }
6951 int     globalf2(void) { return 2; }
6952 int     _sublocalf1(void) { return 1; }
6953 int     _sublocalf2(void) { return 2; }
6954 int     subglobalf1(void) { return 1; }
6955 int     subglobalf2(void) { return 2; }
6956 EOF
6957                 cat >conftest.mk <<EOF
6958 CC=${CC}
6959 CFLAGS=${CFLAGS}
6960 CPPFLAGS=${CPPFLAGS}
6961 LDFLAGS=${LDFLAGS}
6962 LIBS=${LIBS}
6963 VERSIONED_SYMS=${VERSIONED_SYMS}
6964 RESULTING_SYMS=conftest.ver
6965 MK_SHARED_LIB=${MK_SHARED_LIB}
6966 conftest.so: conftest.$ac_cv_objext
6967                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6968 EOF
6969
6970                 # compile source, make library
6971                 if make -f conftest.mk 2>&5 >/dev/null
6972                 then
6973                         # test for missing symbol in either Data or Text section
6974                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6975                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6976                 fi
6977                 echo "$as_me:6977: result: $WILDCARD_SYMS" >&5
6978 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6979                 rm -f conftest.*
6980         fi
6981 fi
6982
6983                 ;;
6984         esac
6985 done
6986
6987 ### Checks for special libraries, must be done up-front.
6988 SHLIB_LIST=""
6989
6990 echo "$as_me:6990: checking if you want to link with the GPM mouse library" >&5
6991 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6992
6993 # Check whether --with-gpm or --without-gpm was given.
6994 if test "${with_gpm+set}" = set; then
6995   withval="$with_gpm"
6996   with_gpm=$withval
6997 else
6998   with_gpm=maybe
6999 fi;
7000 echo "$as_me:7000: result: $with_gpm" >&5
7001 echo "${ECHO_T}$with_gpm" >&6
7002
7003 if test "$with_gpm" != no ; then
7004         echo "$as_me:7004: checking for gpm.h" >&5
7005 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7006 if test "${ac_cv_header_gpm_h+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009   cat >"conftest.$ac_ext" <<_ACEOF
7010 #line 7010 "configure"
7011 #include "confdefs.h"
7012 #include <gpm.h>
7013 _ACEOF
7014 if { (eval echo "$as_me:7014: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7015   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7016   ac_status=$?
7017   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7018   rm -f conftest.er1
7019   cat conftest.err >&5
7020   echo "$as_me:7020: \$? = $ac_status" >&5
7021   (exit "$ac_status"); } >/dev/null; then
7022   if test -s conftest.err; then
7023     ac_cpp_err=$ac_c_preproc_warn_flag
7024   else
7025     ac_cpp_err=
7026   fi
7027 else
7028   ac_cpp_err=yes
7029 fi
7030 if test -z "$ac_cpp_err"; then
7031   ac_cv_header_gpm_h=yes
7032 else
7033   echo "$as_me: failed program was:" >&5
7034   cat "conftest.$ac_ext" >&5
7035   ac_cv_header_gpm_h=no
7036 fi
7037 rm -f conftest.err "conftest.$ac_ext"
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_header_gpm_h" >&5
7040 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7041 if test "$ac_cv_header_gpm_h" = yes; then
7042
7043 cat >>confdefs.h <<\EOF
7044 #define HAVE_GPM_H 1
7045 EOF
7046
7047                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7048                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7049
7050 echo "${as_me:-configure}:7050: testing assuming we really have GPM library ..." 1>&5
7051
7052 cat >>confdefs.h <<\EOF
7053 #define HAVE_LIBGPM 1
7054 EOF
7055
7056                         with_gpm=yes
7057                 else
7058                         echo "$as_me:7058: checking for Gpm_Open in -lgpm" >&5
7059 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7060 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7061   echo $ECHO_N "(cached) $ECHO_C" >&6
7062 else
7063   ac_check_lib_save_LIBS=$LIBS
7064 LIBS="-lgpm  $LIBS"
7065 cat >"conftest.$ac_ext" <<_ACEOF
7066 #line 7066 "configure"
7067 #include "confdefs.h"
7068
7069 /* Override any gcc2 internal prototype to avoid an error.  */
7070 #ifdef __cplusplus
7071 extern "C"
7072 #endif
7073 /* We use char because int might match the return type of a gcc2
7074    builtin and then its argument prototype would still apply.  */
7075 char Gpm_Open ();
7076 int
7077 main (void)
7078 {
7079 Gpm_Open ();
7080   ;
7081   return 0;
7082 }
7083 _ACEOF
7084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7085 if { (eval echo "$as_me:7085: \"$ac_link\"") >&5
7086   (eval $ac_link) 2>&5
7087   ac_status=$?
7088   echo "$as_me:7088: \$? = $ac_status" >&5
7089   (exit "$ac_status"); } &&
7090          { ac_try='test -s "conftest$ac_exeext"'
7091   { (eval echo "$as_me:7091: \"$ac_try\"") >&5
7092   (eval $ac_try) 2>&5
7093   ac_status=$?
7094   echo "$as_me:7094: \$? = $ac_status" >&5
7095   (exit "$ac_status"); }; }; then
7096   ac_cv_lib_gpm_Gpm_Open=yes
7097 else
7098   echo "$as_me: failed program was:" >&5
7099 cat "conftest.$ac_ext" >&5
7100 ac_cv_lib_gpm_Gpm_Open=no
7101 fi
7102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7103 LIBS=$ac_check_lib_save_LIBS
7104 fi
7105 echo "$as_me:7105: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7106 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7107 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7108   with_gpm=yes
7109 else
7110
7111                                 if test "$with_gpm" = maybe; then
7112                                         { echo "$as_me:7112: WARNING: Cannot link with GPM library" >&5
7113 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7114                                         with_gpm=no
7115                                 else
7116                                         { { echo "$as_me:7116: error: Cannot link with GPM library" >&5
7117 echo "$as_me: error: Cannot link with GPM library" >&2;}
7118    { (exit 1); exit 1; }; }
7119                                 fi
7120
7121 fi
7122
7123                 fi
7124
7125 else
7126
7127                 test "$with_gpm" != maybe && { echo "$as_me:7127: WARNING: Cannot find GPM header" >&5
7128 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7129                 with_gpm=no
7130
7131 fi
7132
7133 fi
7134
7135 if test "$with_gpm" != no ; then
7136         echo "$as_me:7136: checking if you want to load GPM dynamically" >&5
7137 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7138
7139 # Check whether --with-dlsym or --without-dlsym was given.
7140 if test "${with_dlsym+set}" = set; then
7141   withval="$with_dlsym"
7142   with_dlsym=$withval
7143 else
7144   with_dlsym=yes
7145 fi;
7146         echo "$as_me:7146: result: $with_dlsym" >&5
7147 echo "${ECHO_T}$with_dlsym" >&6
7148         if test "x$with_dlsym" = xyes ; then
7149
7150 cf_have_dlsym=no
7151 echo "$as_me:7151: checking for dlsym" >&5
7152 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7153 if test "${ac_cv_func_dlsym+set}" = set; then
7154   echo $ECHO_N "(cached) $ECHO_C" >&6
7155 else
7156   cat >"conftest.$ac_ext" <<_ACEOF
7157 #line 7157 "configure"
7158 #include "confdefs.h"
7159 #define dlsym autoconf_temporary
7160 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7161 #undef dlsym
7162
7163 #ifdef __cplusplus
7164 extern "C"
7165 #endif
7166
7167 /* We use char because int might match the return type of a gcc2
7168    builtin and then its argument prototype would still apply.  */
7169 char dlsym (void);
7170
7171 int
7172 main (void)
7173 {
7174
7175 /* The GNU C library defines stubs for functions which it implements
7176     to always fail with ENOSYS.  Some functions are actually named
7177     something starting with __ and the normal name is an alias.  */
7178 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7179 #error found stub for dlsym
7180 #endif
7181
7182         return dlsym ();
7183   ;
7184   return 0;
7185 }
7186 _ACEOF
7187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7188 if { (eval echo "$as_me:7188: \"$ac_link\"") >&5
7189   (eval $ac_link) 2>&5
7190   ac_status=$?
7191   echo "$as_me:7191: \$? = $ac_status" >&5
7192   (exit "$ac_status"); } &&
7193          { ac_try='test -s "conftest$ac_exeext"'
7194   { (eval echo "$as_me:7194: \"$ac_try\"") >&5
7195   (eval $ac_try) 2>&5
7196   ac_status=$?
7197   echo "$as_me:7197: \$? = $ac_status" >&5
7198   (exit "$ac_status"); }; }; then
7199   ac_cv_func_dlsym=yes
7200 else
7201   echo "$as_me: failed program was:" >&5
7202 cat "conftest.$ac_ext" >&5
7203 ac_cv_func_dlsym=no
7204 fi
7205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7206 fi
7207 echo "$as_me:7207: result: $ac_cv_func_dlsym" >&5
7208 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7209 if test "$ac_cv_func_dlsym" = yes; then
7210   cf_have_dlsym=yes
7211 else
7212
7213 cf_have_libdl=no
7214 echo "$as_me:7214: checking for dlsym in -ldl" >&5
7215 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7216 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7217   echo $ECHO_N "(cached) $ECHO_C" >&6
7218 else
7219   ac_check_lib_save_LIBS=$LIBS
7220 LIBS="-ldl  $LIBS"
7221 cat >"conftest.$ac_ext" <<_ACEOF
7222 #line 7222 "configure"
7223 #include "confdefs.h"
7224
7225 /* Override any gcc2 internal prototype to avoid an error.  */
7226 #ifdef __cplusplus
7227 extern "C"
7228 #endif
7229 /* We use char because int might match the return type of a gcc2
7230    builtin and then its argument prototype would still apply.  */
7231 char dlsym ();
7232 int
7233 main (void)
7234 {
7235 dlsym ();
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7241 if { (eval echo "$as_me:7241: \"$ac_link\"") >&5
7242   (eval $ac_link) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit "$ac_status"); } &&
7246          { ac_try='test -s "conftest$ac_exeext"'
7247   { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248   (eval $ac_try) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit "$ac_status"); }; }; then
7252   ac_cv_lib_dl_dlsym=yes
7253 else
7254   echo "$as_me: failed program was:" >&5
7255 cat "conftest.$ac_ext" >&5
7256 ac_cv_lib_dl_dlsym=no
7257 fi
7258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7259 LIBS=$ac_check_lib_save_LIBS
7260 fi
7261 echo "$as_me:7261: result: $ac_cv_lib_dl_dlsym" >&5
7262 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7263 if test "$ac_cv_lib_dl_dlsym" = yes; then
7264
7265         cf_have_dlsym=yes
7266         cf_have_libdl=yes
7267 fi
7268
7269 fi
7270
7271 if test "$cf_have_dlsym" = yes ; then
7272         test "$cf_have_libdl" = yes && {
7273 cf_add_libs="$LIBS"
7274 # reverse order
7275 cf_add_0lib=
7276 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7277 # filter duplicates
7278 for cf_add_1lib in $cf_add_0lib; do
7279         for cf_add_2lib in $cf_add_libs; do
7280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7281                         cf_add_1lib=
7282                         break
7283                 fi
7284         done
7285         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7286 done
7287 LIBS="$cf_add_libs"
7288  }
7289
7290         echo "$as_me:7290: checking whether able to link to dl*() functions" >&5
7291 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7292         cat >"conftest.$ac_ext" <<_ACEOF
7293 #line 7293 "configure"
7294 #include "confdefs.h"
7295 #include <dlfcn.h>
7296 int
7297 main (void)
7298 {
7299
7300                 void *obj;
7301                 if ((obj = dlopen("filename", 0)) != 0) {
7302                         if (dlsym(obj, "symbolname") == 0) {
7303                         dlclose(obj);
7304                         }
7305                 }
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7311 if { (eval echo "$as_me:7311: \"$ac_link\"") >&5
7312   (eval $ac_link) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit "$ac_status"); } &&
7316          { ac_try='test -s "conftest$ac_exeext"'
7317   { (eval echo "$as_me:7317: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit "$ac_status"); }; }; then
7322
7323 cat >>confdefs.h <<\EOF
7324 #define HAVE_LIBDL 1
7325 EOF
7326
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat "conftest.$ac_ext" >&5
7330
7331                 { { echo "$as_me:7331: error: Cannot link test program for libdl" >&5
7332 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7333    { (exit 1); exit 1; }; }
7334 fi
7335 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7336         echo "$as_me:7336: result: ok" >&5
7337 echo "${ECHO_T}ok" >&6
7338 else
7339         { { echo "$as_me:7339: error: Cannot find dlsym function" >&5
7340 echo "$as_me: error: Cannot find dlsym function" >&2;}
7341    { (exit 1); exit 1; }; }
7342 fi
7343
7344                 if test "x$with_gpm" != xyes ; then
7345                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7346
7347 echo "${as_me:-configure}:7347: testing assuming soname for gpm is $with_gpm ..." 1>&5
7348
7349                         cf_cv_gpm_soname="$with_gpm"
7350                 else
7351
7352 echo "$as_me:7352: checking for soname of gpm library" >&5
7353 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7354 if test "${cf_cv_gpm_soname+set}" = set; then
7355   echo $ECHO_N "(cached) $ECHO_C" >&6
7356 else
7357
7358 cf_cv_gpm_soname=unknown
7359 if test "$cross_compiling" != yes ; then
7360 cat >conftest.$ac_ext <<CF_EOF
7361 #include <gpm.h>
7362 int main(void)
7363 {
7364 if (Gpm_Open(0,0)) Gpm_Close();
7365         ${cf_cv_main_return:-return}(0);
7366 }
7367 CF_EOF
7368 cf_save_LIBS="$LIBS"
7369
7370 cf_add_libs="$LIBS"
7371 # reverse order
7372 cf_add_0lib=
7373 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7374 # filter duplicates
7375 for cf_add_1lib in $cf_add_0lib; do
7376         for cf_add_2lib in $cf_add_libs; do
7377                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7378                         cf_add_1lib=
7379                         break
7380                 fi
7381         done
7382         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7383 done
7384 LIBS="$cf_add_libs"
7385
7386         if { (eval echo "$as_me:7386: \"$ac_compile\"") >&5
7387   (eval $ac_compile) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit "$ac_status"); } ; then
7391                 if { (eval echo "$as_me:7391: \"$ac_link\"") >&5
7392   (eval $ac_link) 2>&5
7393   ac_status=$?
7394   echo "$as_me:7394: \$? = $ac_status" >&5
7395   (exit "$ac_status"); } ; then
7396                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7397                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7398                 fi
7399         fi
7400 rm -rf ./conftest*
7401 LIBS="$cf_save_LIBS"
7402 fi
7403
7404 fi
7405 echo "$as_me:7405: result: $cf_cv_gpm_soname" >&5
7406 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7407
7408                 fi
7409                 test "$cf_cv_gpm_soname" != "unknown" &&
7410 cat >>confdefs.h <<EOF
7411 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7412 EOF
7413
7414                 SHLIB_LIST="-ldl $SHLIB_LIST"
7415
7416 cf_add_libs="$PRIVATE_LIBS"
7417 # reverse order
7418 cf_add_0lib=
7419 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7420 # filter duplicates
7421 for cf_add_1lib in $cf_add_0lib; do
7422         for cf_add_2lib in $cf_add_libs; do
7423                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7424                         cf_add_1lib=
7425                         break
7426                 fi
7427         done
7428         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7429 done
7430 PRIVATE_LIBS="$cf_add_libs"
7431
7432         else
7433                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7434
7435 cf_add_libs="$TEST_LIBS"
7436 # reverse order
7437 cf_add_0lib=
7438 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7439 # filter duplicates
7440 for cf_add_1lib in $cf_add_0lib; do
7441         for cf_add_2lib in $cf_add_libs; do
7442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7443                         cf_add_1lib=
7444                         break
7445                 fi
7446         done
7447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7448 done
7449 TEST_LIBS="$cf_add_libs"
7450
7451 cf_add_libs="$PRIVATE_LIBS"
7452 # reverse order
7453 cf_add_0lib=
7454 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7455 # filter duplicates
7456 for cf_add_1lib in $cf_add_0lib; do
7457         for cf_add_2lib in $cf_add_libs; do
7458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7459                         cf_add_1lib=
7460                         break
7461                 fi
7462         done
7463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7464 done
7465 PRIVATE_LIBS="$cf_add_libs"
7466
7467         fi
7468
7469 cat >>confdefs.h <<\EOF
7470 #define HAVE_LIBGPM 1
7471 EOF
7472
7473 echo "$as_me:7473: checking for Gpm_Wgetch in -lgpm" >&5
7474 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7475 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7476   echo $ECHO_N "(cached) $ECHO_C" >&6
7477 else
7478   ac_check_lib_save_LIBS=$LIBS
7479 LIBS="-lgpm  $LIBS"
7480 cat >"conftest.$ac_ext" <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483
7484 /* Override any gcc2 internal prototype to avoid an error.  */
7485 #ifdef __cplusplus
7486 extern "C"
7487 #endif
7488 /* We use char because int might match the return type of a gcc2
7489    builtin and then its argument prototype would still apply.  */
7490 char Gpm_Wgetch ();
7491 int
7492 main (void)
7493 {
7494 Gpm_Wgetch ();
7495   ;
7496   return 0;
7497 }
7498 _ACEOF
7499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7500 if { (eval echo "$as_me:7500: \"$ac_link\"") >&5
7501   (eval $ac_link) 2>&5
7502   ac_status=$?
7503   echo "$as_me:7503: \$? = $ac_status" >&5
7504   (exit "$ac_status"); } &&
7505          { ac_try='test -s "conftest$ac_exeext"'
7506   { (eval echo "$as_me:7506: \"$ac_try\"") >&5
7507   (eval $ac_try) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit "$ac_status"); }; }; then
7511   ac_cv_lib_gpm_Gpm_Wgetch=yes
7512 else
7513   echo "$as_me: failed program was:" >&5
7514 cat "conftest.$ac_ext" >&5
7515 ac_cv_lib_gpm_Gpm_Wgetch=no
7516 fi
7517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7518 LIBS=$ac_check_lib_save_LIBS
7519 fi
7520 echo "$as_me:7520: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7521 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7522 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7523
7524 echo "$as_me:7524: checking if GPM is weakly bound to curses library" >&5
7525 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7526 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7527   echo $ECHO_N "(cached) $ECHO_C" >&6
7528 else
7529
7530 cf_cv_check_gpm_wgetch=unknown
7531 if test "$cross_compiling" != yes ; then
7532
7533 cat >conftest.$ac_ext <<CF_EOF
7534 #include <gpm.h>
7535 int main(void)
7536 {
7537         Gpm_Wgetch();
7538         ${cf_cv_main_return:-return}(0);
7539 }
7540 CF_EOF
7541
7542         cf_save_LIBS="$LIBS"
7543         # This only works if we can look at the symbol table.  If a shared
7544         # library is stripped for install, we cannot use that.  So we're forced
7545         # to rely on the static library, noting that some packagers may not
7546         # include it.
7547         LIBS="-static -lgpm -dynamic $LIBS"
7548         if { (eval echo "$as_me:7548: \"$ac_compile\"") >&5
7549   (eval $ac_compile) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit "$ac_status"); } ; then
7553                 if { (eval echo "$as_me:7553: \"$ac_link\"") >&5
7554   (eval $ac_link) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit "$ac_status"); } ; then
7558                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7559                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7560                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7561                 fi
7562         fi
7563         rm -rf ./conftest*
7564         LIBS="$cf_save_LIBS"
7565 fi
7566
7567 fi
7568 echo "$as_me:7568: result: $cf_cv_check_gpm_wgetch" >&5
7569 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7570
7571 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7572         { echo "$as_me:7572: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7573 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7574 fi
7575
7576 fi
7577
7578 fi
7579
7580 echo "$as_me:7580: checking if you want to use PCRE2 for regular-expressions" >&5
7581 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7582
7583 # Check whether --with-pcre2 or --without-pcre2 was given.
7584 if test "${with_pcre2+set}" = set; then
7585   withval="$with_pcre2"
7586
7587 fi;
7588 test -z "$with_pcre2" && with_pcre2=no
7589 echo "$as_me:7589: result: $with_pcre2" >&5
7590 echo "${ECHO_T}$with_pcre2" >&6
7591
7592 if test "x$with_pcre2" != xno ; then
7593         cf_with_pcre2_ok=no
7594         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7595         do
7596
7597 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7598         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7599
7600 echo "${as_me:-configure}:7600: testing found package $cf_with_pcre2 ..." 1>&5
7601
7602         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7603         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7604         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7605
7606 echo "${as_me:-configure}:7606: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7607
7608         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7609
7610 echo "${as_me:-configure}:7610: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7611
7612 cf_fix_cppflags=no
7613 cf_new_cflags=
7614 cf_new_cppflags=
7615 cf_new_extra_cppflags=
7616
7617 for cf_add_cflags in $cf_pkgconfig_incs
7618 do
7619 case "$cf_fix_cppflags" in
7620 (no)
7621         case "$cf_add_cflags" in
7622         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7623                 case "$cf_add_cflags" in
7624                 (-D*)
7625                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7626
7627                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7628                                 && test -z "${cf_tst_cflags}" \
7629                                 && cf_fix_cppflags=yes
7630
7631                         if test "$cf_fix_cppflags" = yes ; then
7632
7633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7635
7636                                 continue
7637                         elif test "${cf_tst_cflags}" = "\"'" ; then
7638
7639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7641
7642                                 continue
7643                         fi
7644                         ;;
7645                 esac
7646                 case "$CPPFLAGS" in
7647                 (*$cf_add_cflags)
7648                         ;;
7649                 (*)
7650                         case "$cf_add_cflags" in
7651                         (-D*)
7652                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7653
7654 CPPFLAGS=`echo "$CPPFLAGS" | \
7655         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7656                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7657
7658                                 ;;
7659                         esac
7660
7661         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7662         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7663
7664                         ;;
7665                 esac
7666                 ;;
7667         (*)
7668
7669         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7670         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7671
7672                 ;;
7673         esac
7674         ;;
7675 (yes)
7676
7677         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7678         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7679
7680         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7681
7682         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7683                 && test -z "${cf_tst_cflags}" \
7684                 && cf_fix_cppflags=no
7685         ;;
7686 esac
7687 done
7688
7689 if test -n "$cf_new_cflags" ; then
7690
7691         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7692         CFLAGS="${CFLAGS}$cf_new_cflags"
7693
7694 fi
7695
7696 if test -n "$cf_new_cppflags" ; then
7697
7698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7699         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7700
7701 fi
7702
7703 if test -n "$cf_new_extra_cppflags" ; then
7704
7705         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7706         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7707
7708 fi
7709
7710 cf_add_libs="$LIBS"
7711 # reverse order
7712 cf_add_0lib=
7713 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7714 # filter duplicates
7715 for cf_add_1lib in $cf_add_0lib; do
7716         for cf_add_2lib in $cf_add_libs; do
7717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7718                         cf_add_1lib=
7719                         break
7720                 fi
7721         done
7722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7723 done
7724 LIBS="$cf_add_libs"
7725
7726         cf_with_pcre2_ok=yes; break
7727 else
7728         cf_pkgconfig_incs=
7729         cf_pkgconfig_libs=
7730         :
7731 fi
7732
7733         done
7734         cf_with_pcre2_ok=yes || { { echo "$as_me:7734: error: Cannot find PCRE2 library" >&5
7735 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7736    { (exit 1); exit 1; }; }
7737
7738 cat >>confdefs.h <<\EOF
7739 #define HAVE_LIB_PCRE2 1
7740 EOF
7741
7742         # if pkgconfig gave no results, look for the libraries directly
7743         case "$LIBS" in
7744         (*pcre2-posix*|*pcreposix*)
7745                 ;;
7746         (*)
7747                 echo "$as_me:7747: checking for regcomp in -lpcre2-posix" >&5
7748 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7749 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7750   echo $ECHO_N "(cached) $ECHO_C" >&6
7751 else
7752   ac_check_lib_save_LIBS=$LIBS
7753 LIBS="-lpcre2-posix  $LIBS"
7754 cat >"conftest.$ac_ext" <<_ACEOF
7755 #line 7755 "configure"
7756 #include "confdefs.h"
7757
7758 /* Override any gcc2 internal prototype to avoid an error.  */
7759 #ifdef __cplusplus
7760 extern "C"
7761 #endif
7762 /* We use char because int might match the return type of a gcc2
7763    builtin and then its argument prototype would still apply.  */
7764 char regcomp ();
7765 int
7766 main (void)
7767 {
7768 regcomp ();
7769   ;
7770   return 0;
7771 }
7772 _ACEOF
7773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7774 if { (eval echo "$as_me:7774: \"$ac_link\"") >&5
7775   (eval $ac_link) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit "$ac_status"); } &&
7779          { ac_try='test -s "conftest$ac_exeext"'
7780   { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit "$ac_status"); }; }; then
7785   ac_cv_lib_pcre2_posix_regcomp=yes
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 cat "conftest.$ac_ext" >&5
7789 ac_cv_lib_pcre2_posix_regcomp=no
7790 fi
7791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7792 LIBS=$ac_check_lib_save_LIBS
7793 fi
7794 echo "$as_me:7794: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7795 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7796 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7797
7798 cf_add_libs="$LIBS"
7799 # reverse order
7800 cf_add_0lib=
7801 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7802 # filter duplicates
7803 for cf_add_1lib in $cf_add_0lib; do
7804         for cf_add_2lib in $cf_add_libs; do
7805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7806                         cf_add_1lib=
7807                         break
7808                 fi
7809         done
7810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7811 done
7812 LIBS="$cf_add_libs"
7813
7814 else
7815   echo "$as_me:7815: checking for regcomp in -lpcreposix" >&5
7816 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7817 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7818   echo $ECHO_N "(cached) $ECHO_C" >&6
7819 else
7820   ac_check_lib_save_LIBS=$LIBS
7821 LIBS="-lpcreposix  $LIBS"
7822 cat >"conftest.$ac_ext" <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825
7826 /* Override any gcc2 internal prototype to avoid an error.  */
7827 #ifdef __cplusplus
7828 extern "C"
7829 #endif
7830 /* We use char because int might match the return type of a gcc2
7831    builtin and then its argument prototype would still apply.  */
7832 char regcomp ();
7833 int
7834 main (void)
7835 {
7836 regcomp ();
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7842 if { (eval echo "$as_me:7842: \"$ac_link\"") >&5
7843   (eval $ac_link) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit "$ac_status"); } &&
7847          { ac_try='test -s "conftest$ac_exeext"'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); }; }; then
7853   ac_cv_lib_pcreposix_regcomp=yes
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat "conftest.$ac_ext" >&5
7857 ac_cv_lib_pcreposix_regcomp=no
7858 fi
7859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7860 LIBS=$ac_check_lib_save_LIBS
7861 fi
7862 echo "$as_me:7862: result: $ac_cv_lib_pcreposix_regcomp" >&5
7863 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7864 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7865
7866 cf_add_libs="$LIBS"
7867 # reverse order
7868 cf_add_0lib=
7869 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7870 # filter duplicates
7871 for cf_add_1lib in $cf_add_0lib; do
7872         for cf_add_2lib in $cf_add_libs; do
7873                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7874                         cf_add_1lib=
7875                         break
7876                 fi
7877         done
7878         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7879 done
7880 LIBS="$cf_add_libs"
7881
7882 else
7883   { { echo "$as_me:7883: error: Cannot find PCRE2 POSIX library" >&5
7884 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7885    { (exit 1); exit 1; }; }
7886 fi
7887
7888 fi
7889
7890                 ;;
7891         esac
7892
7893         # either way, check for the library header files
7894
7895 for ac_header in pcre2posix.h pcreposix.h
7896 do
7897 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7898 echo "$as_me:7898: checking for $ac_header" >&5
7899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903   cat >"conftest.$ac_ext" <<_ACEOF
7904 #line 7904 "configure"
7905 #include "confdefs.h"
7906 #include <$ac_header>
7907 _ACEOF
7908 if { (eval echo "$as_me:7908: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7909   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7910   ac_status=$?
7911   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7912   rm -f conftest.er1
7913   cat conftest.err >&5
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit "$ac_status"); } >/dev/null; then
7916   if test -s conftest.err; then
7917     ac_cpp_err=$ac_c_preproc_warn_flag
7918   else
7919     ac_cpp_err=
7920   fi
7921 else
7922   ac_cpp_err=yes
7923 fi
7924 if test -z "$ac_cpp_err"; then
7925   eval "$as_ac_Header=yes"
7926 else
7927   echo "$as_me: failed program was:" >&5
7928   cat "conftest.$ac_ext" >&5
7929   eval "$as_ac_Header=no"
7930 fi
7931 rm -f conftest.err "conftest.$ac_ext"
7932 fi
7933 echo "$as_me:7933: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7934 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7935 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7936   cat >>confdefs.h <<EOF
7937 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7938 EOF
7939
7940 fi
7941 done
7942
7943 for ac_func in PCRE2regcomp
7944 do
7945 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7946 echo "$as_me:7946: checking for $ac_func" >&5
7947 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7948 if eval "test \"\${$as_ac_var+set}\" = set"; then
7949   echo $ECHO_N "(cached) $ECHO_C" >&6
7950 else
7951   cat >"conftest.$ac_ext" <<_ACEOF
7952 #line 7952 "configure"
7953 #include "confdefs.h"
7954 #define $ac_func autoconf_temporary
7955 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7956 #undef $ac_func
7957
7958 #ifdef __cplusplus
7959 extern "C"
7960 #endif
7961
7962 /* We use char because int might match the return type of a gcc2
7963    builtin and then its argument prototype would still apply.  */
7964 char $ac_func (void);
7965
7966 int
7967 main (void)
7968 {
7969
7970 /* The GNU C library defines stubs for functions which it implements
7971     to always fail with ENOSYS.  Some functions are actually named
7972     something starting with __ and the normal name is an alias.  */
7973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7974 #error found stub for $ac_func
7975 #endif
7976
7977         return $ac_func ();
7978   ;
7979   return 0;
7980 }
7981 _ACEOF
7982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7983 if { (eval echo "$as_me:7983: \"$ac_link\"") >&5
7984   (eval $ac_link) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit "$ac_status"); } &&
7988          { ac_try='test -s "conftest$ac_exeext"'
7989   { (eval echo "$as_me:7989: \"$ac_try\"") >&5
7990   (eval $ac_try) 2>&5
7991   ac_status=$?
7992   echo "$as_me:7992: \$? = $ac_status" >&5
7993   (exit "$ac_status"); }; }; then
7994   eval "$as_ac_var=yes"
7995 else
7996   echo "$as_me: failed program was:" >&5
7997 cat "conftest.$ac_ext" >&5
7998 eval "$as_ac_var=no"
7999 fi
8000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8001 fi
8002 echo "$as_me:8002: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8003 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8004 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8005   cat >>confdefs.h <<EOF
8006 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8007 EOF
8008
8009 fi
8010 done
8011
8012 fi
8013
8014 # not everyone has "test -c"
8015 if test -c /dev/sysmouse 2>/dev/null ; then
8016 echo "$as_me:8016: checking if you want to use sysmouse" >&5
8017 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8018
8019 # Check whether --with-sysmouse or --without-sysmouse was given.
8020 if test "${with_sysmouse+set}" = set; then
8021   withval="$with_sysmouse"
8022   cf_with_sysmouse=$withval
8023 else
8024   cf_with_sysmouse=maybe
8025 fi;
8026         if test "$cf_with_sysmouse" != no ; then
8027         cat >"conftest.$ac_ext" <<_ACEOF
8028 #line 8028 "configure"
8029 #include "confdefs.h"
8030
8031 #include <osreldate.h>
8032 #if (__FreeBSD_version >= 400017)
8033 #include <sys/consio.h>
8034 #include <sys/fbio.h>
8035 #else
8036 #include <machine/console.h>
8037 #endif
8038
8039 int
8040 main (void)
8041 {
8042
8043         struct mouse_info the_mouse;
8044         ioctl(0, CONS_MOUSECTL, &the_mouse);
8045
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f "conftest.$ac_objext"
8051 if { (eval echo "$as_me:8051: \"$ac_compile\"") >&5
8052   (eval $ac_compile) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit "$ac_status"); } &&
8056          { ac_try='test -s "conftest.$ac_objext"'
8057   { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058   (eval $ac_try) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit "$ac_status"); }; }; then
8062   cf_with_sysmouse=yes
8063 else
8064   echo "$as_me: failed program was:" >&5
8065 cat "conftest.$ac_ext" >&5
8066 cf_with_sysmouse=no
8067 fi
8068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8069         fi
8070 echo "$as_me:8070: result: $cf_with_sysmouse" >&5
8071 echo "${ECHO_T}$cf_with_sysmouse" >&6
8072 test "$cf_with_sysmouse" = yes &&
8073 cat >>confdefs.h <<\EOF
8074 #define USE_SYSMOUSE 1
8075 EOF
8076
8077 fi
8078
8079 # pretend that ncurses==ncursesw==ncursest
8080 echo "$as_me:8080: checking if you want to disable library suffixes" >&5
8081 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8082
8083 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8084 if test "${enable_lib_suffixes+set}" = set; then
8085   enableval="$enable_lib_suffixes"
8086   test "$enableval" != no && enableval=yes
8087         if test "$enableval" != "yes" ; then
8088     disable_lib_suffixes=yes
8089         else
8090                 disable_lib_suffixes=no
8091         fi
8092 else
8093   enableval=yes
8094         disable_lib_suffixes=no
8095
8096 fi;
8097 echo "$as_me:8097: result: $disable_lib_suffixes" >&5
8098 echo "${ECHO_T}$disable_lib_suffixes" >&6
8099
8100 ### If we're building with rpath, try to link non-standard libs that way too.
8101 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8102
8103 echo "$as_me:8103: checking if rpath-hack should be disabled" >&5
8104 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8105
8106 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8107 if test "${enable_rpath_hack+set}" = set; then
8108   enableval="$enable_rpath_hack"
8109   test "$enableval" != no && enableval=yes
8110         if test "$enableval" != "yes" ; then
8111     enable_rpath_hack=no
8112         else
8113                 enable_rpath_hack=yes
8114         fi
8115 else
8116   enableval=yes
8117         enable_rpath_hack=yes
8118
8119 fi;
8120 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8121 echo "$as_me:8121: result: $cf_disable_rpath_hack" >&5
8122 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8123
8124 if test "$enable_rpath_hack" = yes ; then
8125
8126 echo "$as_me:8126: checking for updated LDFLAGS" >&5
8127 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8128 if test -n "$LD_RPATH_OPT" ; then
8129         echo "$as_me:8129: result: maybe" >&5
8130 echo "${ECHO_T}maybe" >&6
8131
8132         for ac_prog in ldd
8133 do
8134   # Extract the first word of "$ac_prog", so it can be a program name with args.
8135 set dummy $ac_prog; ac_word=$2
8136 echo "$as_me:8136: checking for $ac_word" >&5
8137 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8138 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8139   echo $ECHO_N "(cached) $ECHO_C" >&6
8140 else
8141   if test -n "$cf_ldd_prog"; then
8142   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8143 else
8144   ac_save_IFS=$IFS; IFS=$ac_path_separator
8145 ac_dummy="$PATH"
8146 for ac_dir in $ac_dummy; do
8147   IFS=$ac_save_IFS
8148   test -z "$ac_dir" && ac_dir=.
8149   $as_executable_p "$ac_dir/$ac_word" || continue
8150 ac_cv_prog_cf_ldd_prog="$ac_prog"
8151 echo "$as_me:8151: found $ac_dir/$ac_word" >&5
8152 break
8153 done
8154
8155 fi
8156 fi
8157 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8158 if test -n "$cf_ldd_prog"; then
8159   echo "$as_me:8159: result: $cf_ldd_prog" >&5
8160 echo "${ECHO_T}$cf_ldd_prog" >&6
8161 else
8162   echo "$as_me:8162: result: no" >&5
8163 echo "${ECHO_T}no" >&6
8164 fi
8165
8166   test -n "$cf_ldd_prog" && break
8167 done
8168 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8169
8170         cf_rpath_list="/usr/lib /lib"
8171         if test "$cf_ldd_prog" != no
8172         then
8173                 cf_rpath_oops=
8174
8175 cat >"conftest.$ac_ext" <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178 #include <stdio.h>
8179 int
8180 main (void)
8181 {
8182 printf("Hello");
8183   ;
8184   return 0;
8185 }
8186 _ACEOF
8187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8188 if { (eval echo "$as_me:8188: \"$ac_link\"") >&5
8189   (eval $ac_link) 2>&5
8190   ac_status=$?
8191   echo "$as_me:8191: \$? = $ac_status" >&5
8192   (exit "$ac_status"); } &&
8193          { ac_try='test -s "conftest$ac_exeext"'
8194   { (eval echo "$as_me:8194: \"$ac_try\"") >&5
8195   (eval $ac_try) 2>&5
8196   ac_status=$?
8197   echo "$as_me:8197: \$? = $ac_status" >&5
8198   (exit "$ac_status"); }; }; then
8199   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8200                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8201 else
8202   echo "$as_me: failed program was:" >&5
8203 cat "conftest.$ac_ext" >&5
8204 fi
8205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8206
8207                 # If we passed the link-test, but get a "not found" on a given library,
8208                 # this could be due to inept reconfiguration of gcc to make it only
8209                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8210                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8211                 # /usr/local libraries.
8212                 if test -n "$cf_rpath_oops"
8213                 then
8214                         for cf_rpath_src in $cf_rpath_oops
8215                         do
8216                                 for cf_rpath_dir in \
8217                                         /usr/local \
8218                                         /usr/pkg \
8219                                         /opt/sfw
8220                                 do
8221                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8222                                         then
8223                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8224
8225 echo "${as_me:-configure}:8225: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8226
8227                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8228                                                 break
8229                                         fi
8230                                 done
8231                         done
8232                 fi
8233         fi
8234
8235         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8236
8237 echo "${as_me:-configure}:8237: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8238
8239 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8240
8241 echo "${as_me:-configure}:8241: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8242
8243 cf_rpath_dst=
8244 for cf_rpath_src in $LDFLAGS
8245 do
8246         case "$cf_rpath_src" in
8247         (-L*)
8248
8249                 # check if this refers to a directory which we will ignore
8250                 cf_rpath_skip=no
8251                 if test -n "$cf_rpath_list"
8252                 then
8253                         for cf_rpath_item in $cf_rpath_list
8254                         do
8255                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8256                                 then
8257                                         cf_rpath_skip=yes
8258                                         break
8259                                 fi
8260                         done
8261                 fi
8262
8263                 if test "$cf_rpath_skip" = no
8264                 then
8265                         # transform the option
8266                         if test "$LD_RPATH_OPT" = "-R " ; then
8267                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8268                         else
8269                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8270                         fi
8271
8272                         # if we have not already added this, add it now
8273                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8274                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8275                         then
8276                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8277
8278 echo "${as_me:-configure}:8278: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8279
8280                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8281                         fi
8282                 fi
8283                 ;;
8284         esac
8285         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8286 done
8287 LDFLAGS=$cf_rpath_dst
8288
8289 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8290
8291 echo "${as_me:-configure}:8291: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8292
8293 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8294
8295 echo "${as_me:-configure}:8295: testing ...checking LIBS $LIBS ..." 1>&5
8296
8297 cf_rpath_dst=
8298 for cf_rpath_src in $LIBS
8299 do
8300         case "$cf_rpath_src" in
8301         (-L*)
8302
8303                 # check if this refers to a directory which we will ignore
8304                 cf_rpath_skip=no
8305                 if test -n "$cf_rpath_list"
8306                 then
8307                         for cf_rpath_item in $cf_rpath_list
8308                         do
8309                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8310                                 then
8311                                         cf_rpath_skip=yes
8312                                         break
8313                                 fi
8314                         done
8315                 fi
8316
8317                 if test "$cf_rpath_skip" = no
8318                 then
8319                         # transform the option
8320                         if test "$LD_RPATH_OPT" = "-R " ; then
8321                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8322                         else
8323                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8324                         fi
8325
8326                         # if we have not already added this, add it now
8327                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8328                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8329                         then
8330                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8331
8332 echo "${as_me:-configure}:8332: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8333
8334                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8335                         fi
8336                 fi
8337                 ;;
8338         esac
8339         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8340 done
8341 LIBS=$cf_rpath_dst
8342
8343 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8344
8345 echo "${as_me:-configure}:8345: testing ...checked LIBS $LIBS ..." 1>&5
8346
8347         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8348
8349 echo "${as_me:-configure}:8349: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8350
8351 else
8352         echo "$as_me:8352: result: no" >&5
8353 echo "${ECHO_T}no" >&6
8354 fi
8355
8356 fi
8357
8358 fi
8359
8360 ### Depending on the system, someone may use rpath to build ncurses but not
8361 # want users of the package to rely upon that feature.  Give those people an
8362 # option to suppress that detail from EXTRA_LDFLAGS.
8363 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8364 if test -n "$EXTRA_PKG_LDFLAGS"
8365 then
8366         echo "$as_me:8366: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8367 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8368
8369 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8370 if test "${enable_pkg_ldflags+set}" = set; then
8371   enableval="$enable_pkg_ldflags"
8372   test "$enableval" != no && enableval=yes
8373         if test "$enableval" != "yes" ; then
8374     disable_pkg_ldflags=yes
8375         else
8376                 disable_pkg_ldflags=no
8377         fi
8378 else
8379   enableval=yes
8380         disable_pkg_ldflags=no
8381
8382 fi;
8383         echo "$as_me:8383: result: $disable_pkg_ldflags" >&5
8384 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8385         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8386 fi
8387
8388 ###############################################################################
8389
8390 ###     use option --with-extra-suffix to append suffix to headers and libraries
8391 echo "$as_me:8391: checking if you wish to append extra suffix to header/library paths" >&5
8392 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8393 EXTRA_SUFFIX=
8394
8395 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8396 if test "${with_extra_suffix+set}" = set; then
8397   withval="$with_extra_suffix"
8398   case x$withval in
8399         (xno)
8400                 ;;
8401         (xyes|x)
8402                 EXTRA_SUFFIX=$cf_cv_abi_version
8403                 ;;
8404         (*)
8405                 EXTRA_SUFFIX=$withval
8406                 ;;
8407         esac
8408
8409 fi;
8410 echo "$as_me:8410: result: $EXTRA_SUFFIX" >&5
8411 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8412
8413 ###     use option --disable-overwrite to leave out the link to -lcurses
8414 echo "$as_me:8414: checking if you wish to install ncurses overwriting curses" >&5
8415 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8416
8417 # Check whether --enable-overwrite or --disable-overwrite was given.
8418 if test "${enable_overwrite+set}" = set; then
8419   enableval="$enable_overwrite"
8420   with_overwrite=$enableval
8421 else
8422   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8423 fi;
8424 echo "$as_me:8424: result: $with_overwrite" >&5
8425 echo "${ECHO_T}$with_overwrite" >&6
8426
8427 echo "$as_me:8427: checking if external terminfo-database is used" >&5
8428 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8429
8430 # Check whether --enable-database or --disable-database was given.
8431 if test "${enable_database+set}" = set; then
8432   enableval="$enable_database"
8433   use_database=$enableval
8434 else
8435   use_database=yes
8436 fi;
8437 echo "$as_me:8437: result: $use_database" >&5
8438 echo "${ECHO_T}$use_database" >&6
8439
8440 case "$host_os" in
8441 (os2*)
8442         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8443         ;;
8444 (*)
8445         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8446         ;;
8447 esac
8448
8449 NCURSES_USE_DATABASE=0
8450 if test "$use_database" != no ; then
8451         NCURSES_USE_DATABASE=1
8452
8453         echo "$as_me:8453: checking which terminfo source-file will be installed" >&5
8454 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8455
8456 # Check whether --with-database or --without-database was given.
8457 if test "${with_database+set}" = set; then
8458   withval="$with_database"
8459   TERMINFO_SRC=$withval
8460 fi;
8461         echo "$as_me:8461: result: $TERMINFO_SRC" >&5
8462 echo "${ECHO_T}$TERMINFO_SRC" >&6
8463
8464         echo "$as_me:8464: checking whether to use hashed database instead of directory/tree" >&5
8465 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8466
8467 # Check whether --with-hashed-db or --without-hashed-db was given.
8468 if test "${with_hashed_db+set}" = set; then
8469   withval="$with_hashed_db"
8470
8471 else
8472   with_hashed_db=no
8473 fi;
8474         echo "$as_me:8474: result: $with_hashed_db" >&5
8475 echo "${ECHO_T}$with_hashed_db" >&6
8476 else
8477         with_hashed_db=no
8478 fi
8479
8480 echo "$as_me:8480: checking for list of fallback descriptions" >&5
8481 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8482
8483 # Check whether --with-fallbacks or --without-fallbacks was given.
8484 if test "${with_fallbacks+set}" = set; then
8485   withval="$with_fallbacks"
8486   with_fallback=$withval
8487 else
8488   with_fallback=
8489 fi;
8490 echo "$as_me:8490: result: $with_fallback" >&5
8491 echo "${ECHO_T}$with_fallback" >&6
8492
8493 case ".$with_fallback" in
8494 (.|.no)
8495         FALLBACK_LIST=
8496         ;;
8497 (.yes)
8498         { echo "$as_me:8498: WARNING: expected a list of terminal descriptions" >&5
8499 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8500         ;;
8501 (*)
8502         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8503         ;;
8504 esac
8505
8506 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8507 # tree for generating the terminal descriptions that will be compiled into the
8508 # library.  If your toolchain is old, it may not handle current terminal
8509 # databases.  Use configure-options to point to the tools which will be used,
8510 # rather than the first ones found on the $PATH.
8511 if test -n "$ac_tool_prefix"; then
8512   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8513 set dummy ${ac_tool_prefix}tic; ac_word=$2
8514 echo "$as_me:8514: checking for $ac_word" >&5
8515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8516 if test "${ac_cv_prog_TIC+set}" = set; then
8517   echo $ECHO_N "(cached) $ECHO_C" >&6
8518 else
8519   if test -n "$TIC"; then
8520   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8521 else
8522   ac_save_IFS=$IFS; IFS=$ac_path_separator
8523 ac_dummy="$PATH"
8524 for ac_dir in $ac_dummy; do
8525   IFS=$ac_save_IFS
8526   test -z "$ac_dir" && ac_dir=.
8527   $as_executable_p "$ac_dir/$ac_word" || continue
8528 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8529 echo "$as_me:8529: found $ac_dir/$ac_word" >&5
8530 break
8531 done
8532
8533 fi
8534 fi
8535 TIC=$ac_cv_prog_TIC
8536 if test -n "$TIC"; then
8537   echo "$as_me:8537: result: $TIC" >&5
8538 echo "${ECHO_T}$TIC" >&6
8539 else
8540   echo "$as_me:8540: result: no" >&5
8541 echo "${ECHO_T}no" >&6
8542 fi
8543
8544 fi
8545 if test -z "$ac_cv_prog_TIC"; then
8546   ac_ct_TIC=$TIC
8547   # Extract the first word of "tic", so it can be a program name with args.
8548 set dummy tic; ac_word=$2
8549 echo "$as_me:8549: checking for $ac_word" >&5
8550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8551 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   if test -n "$ac_ct_TIC"; then
8555   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8556 else
8557   ac_save_IFS=$IFS; IFS=$ac_path_separator
8558 ac_dummy="$PATH"
8559 for ac_dir in $ac_dummy; do
8560   IFS=$ac_save_IFS
8561   test -z "$ac_dir" && ac_dir=.
8562   $as_executable_p "$ac_dir/$ac_word" || continue
8563 ac_cv_prog_ac_ct_TIC="tic"
8564 echo "$as_me:8564: found $ac_dir/$ac_word" >&5
8565 break
8566 done
8567
8568 fi
8569 fi
8570 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8571 if test -n "$ac_ct_TIC"; then
8572   echo "$as_me:8572: result: $ac_ct_TIC" >&5
8573 echo "${ECHO_T}$ac_ct_TIC" >&6
8574 else
8575   echo "$as_me:8575: result: no" >&5
8576 echo "${ECHO_T}no" >&6
8577 fi
8578
8579   TIC=$ac_ct_TIC
8580 else
8581   TIC="$ac_cv_prog_TIC"
8582 fi
8583
8584 if test -n "$ac_tool_prefix"; then
8585   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8586 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8587 echo "$as_me:8587: checking for $ac_word" >&5
8588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8589 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8590   echo $ECHO_N "(cached) $ECHO_C" >&6
8591 else
8592   if test -n "$INFOCMP"; then
8593   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8594 else
8595   ac_save_IFS=$IFS; IFS=$ac_path_separator
8596 ac_dummy="$PATH"
8597 for ac_dir in $ac_dummy; do
8598   IFS=$ac_save_IFS
8599   test -z "$ac_dir" && ac_dir=.
8600   $as_executable_p "$ac_dir/$ac_word" || continue
8601 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8602 echo "$as_me:8602: found $ac_dir/$ac_word" >&5
8603 break
8604 done
8605
8606 fi
8607 fi
8608 INFOCMP=$ac_cv_prog_INFOCMP
8609 if test -n "$INFOCMP"; then
8610   echo "$as_me:8610: result: $INFOCMP" >&5
8611 echo "${ECHO_T}$INFOCMP" >&6
8612 else
8613   echo "$as_me:8613: result: no" >&5
8614 echo "${ECHO_T}no" >&6
8615 fi
8616
8617 fi
8618 if test -z "$ac_cv_prog_INFOCMP"; then
8619   ac_ct_INFOCMP=$INFOCMP
8620   # Extract the first word of "infocmp", so it can be a program name with args.
8621 set dummy infocmp; ac_word=$2
8622 echo "$as_me:8622: checking for $ac_word" >&5
8623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8624 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8625   echo $ECHO_N "(cached) $ECHO_C" >&6
8626 else
8627   if test -n "$ac_ct_INFOCMP"; then
8628   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8629 else
8630   ac_save_IFS=$IFS; IFS=$ac_path_separator
8631 ac_dummy="$PATH"
8632 for ac_dir in $ac_dummy; do
8633   IFS=$ac_save_IFS
8634   test -z "$ac_dir" && ac_dir=.
8635   $as_executable_p "$ac_dir/$ac_word" || continue
8636 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8637 echo "$as_me:8637: found $ac_dir/$ac_word" >&5
8638 break
8639 done
8640
8641 fi
8642 fi
8643 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8644 if test -n "$ac_ct_INFOCMP"; then
8645   echo "$as_me:8645: result: $ac_ct_INFOCMP" >&5
8646 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8647 else
8648   echo "$as_me:8648: result: no" >&5
8649 echo "${ECHO_T}no" >&6
8650 fi
8651
8652   INFOCMP=$ac_ct_INFOCMP
8653 else
8654   INFOCMP="$ac_cv_prog_INFOCMP"
8655 fi
8656
8657 if test -n "$FALLBACK_LIST"
8658 then
8659
8660 # Check whether --with-tic-path or --without-tic-path was given.
8661 if test "${with_tic_path+set}" = set; then
8662   withval="$with_tic_path"
8663   echo "$as_me:8663: checking for tic program for fallbacks" >&5
8664 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8665                 TIC=$withval
8666                 echo "$as_me:8666: result: $TIC" >&5
8667 echo "${ECHO_T}$TIC" >&6
8668
8669 if test "x$prefix" != xNONE; then
8670         cf_path_syntax="$prefix"
8671 else
8672         cf_path_syntax="$ac_default_prefix"
8673 fi
8674
8675 case ".$TIC" in
8676 (.\$\(*\)*|.\'*\'*)
8677         ;;
8678 (..|./*|.\\*)
8679         ;;
8680 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8681         ;;
8682 (.\$\{*prefix\}*|.\$\{*dir\}*)
8683         eval TIC="$TIC"
8684         case ".$TIC" in
8685         (.NONE/*)
8686                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8687                 ;;
8688         esac
8689         ;;
8690 (.no|.NONE/*)
8691         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8692         ;;
8693 (*)
8694         { { echo "$as_me:8694: error: expected a pathname, not \"$TIC\"" >&5
8695 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8696    { (exit 1); exit 1; }; }
8697         ;;
8698 esac
8699
8700 else
8701
8702 test -z "$TIC" && TIC="tic"
8703 for ac_prog in $TIC tic
8704 do
8705   # Extract the first word of "$ac_prog", so it can be a program name with args.
8706 set dummy $ac_prog; ac_word=$2
8707 echo "$as_me:8707: checking for $ac_word" >&5
8708 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8709 if test "${ac_cv_path_TIC+set}" = set; then
8710   echo $ECHO_N "(cached) $ECHO_C" >&6
8711 else
8712   case $TIC in
8713   [\\/]* | ?:[\\/]*)
8714   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8715   ;;
8716   *)
8717   ac_save_IFS=$IFS; IFS=$ac_path_separator
8718 ac_dummy="$PATH:/usr/local/ncurses/bin"
8719 for ac_dir in $ac_dummy; do
8720   IFS=$ac_save_IFS
8721   test -z "$ac_dir" && ac_dir=.
8722   if $as_executable_p "$ac_dir/$ac_word"; then
8723    ac_cv_path_TIC="$ac_dir/$ac_word"
8724    echo "$as_me:8724: found $ac_dir/$ac_word" >&5
8725    break
8726 fi
8727 done
8728
8729   ;;
8730 esac
8731 fi
8732 TIC=$ac_cv_path_TIC
8733
8734 if test -n "$TIC"; then
8735   echo "$as_me:8735: result: $TIC" >&5
8736 echo "${ECHO_T}$TIC" >&6
8737 else
8738   echo "$as_me:8738: result: no" >&5
8739 echo "${ECHO_T}no" >&6
8740 fi
8741
8742   test -n "$TIC" && break
8743 done
8744 test -n "$TIC" || TIC="$TIC"
8745
8746 cf_path_prog=""
8747 cf_path_args=""
8748 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8749 for cf_temp in $ac_cv_path_TIC
8750 do
8751         if test -z "$cf_path_prog" ; then
8752                 if test "$with_full_paths" = yes ; then
8753
8754 if test "x$prefix" != xNONE; then
8755         cf_path_syntax="$prefix"
8756 else
8757         cf_path_syntax="$ac_default_prefix"
8758 fi
8759
8760 case ".$cf_temp" in
8761 (.\$\(*\)*|.\'*\'*)
8762         ;;
8763 (..|./*|.\\*)
8764         ;;
8765 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8766         ;;
8767 (.\$\{*prefix\}*|.\$\{*dir\}*)
8768         eval cf_temp="$cf_temp"
8769         case ".$cf_temp" in
8770         (.NONE/*)
8771                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8772                 ;;
8773         esac
8774         ;;
8775 (.no|.NONE/*)
8776         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8777         ;;
8778 (*)
8779         break
8780         ;;
8781 esac
8782
8783                         cf_path_prog="$cf_temp"
8784                 else
8785                         cf_path_prog="`basename "$cf_temp"`"
8786                 fi
8787         elif test -z "$cf_path_args" ; then
8788                 cf_path_args="$cf_temp"
8789         else
8790                 cf_path_args="$cf_path_args $cf_temp"
8791         fi
8792 done
8793 IFS="$cf_save_ifs"
8794
8795 if test -n "$cf_path_prog" ; then
8796
8797 echo "${as_me:-configure}:8797: testing defining path for ${cf_path_prog} ..." 1>&5
8798
8799 cat >>confdefs.h <<EOF
8800 #define TIC_PATH "$cf_path_prog"
8801 EOF
8802
8803         test -n "$cf_path_args" &&
8804 cat >>confdefs.h <<EOF
8805 #define TIC_ARGS "$cf_path_args"
8806 EOF
8807
8808 fi
8809
8810                 if test -z "$TIC"
8811                 then
8812                         { echo "$as_me:8812: WARNING: no tic program found for fallbacks" >&5
8813 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8814                 fi
8815
8816 fi;
8817
8818 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8819 if test "${with_infocmp_path+set}" = set; then
8820   withval="$with_infocmp_path"
8821   echo "$as_me:8821: checking for infocmp program for fallbacks" >&5
8822 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8823                 INFOCMP=$withval
8824                 echo "$as_me:8824: result: $INFOCMP" >&5
8825 echo "${ECHO_T}$INFOCMP" >&6
8826
8827 if test "x$prefix" != xNONE; then
8828         cf_path_syntax="$prefix"
8829 else
8830         cf_path_syntax="$ac_default_prefix"
8831 fi
8832
8833 case ".$INFOCMP" in
8834 (.\$\(*\)*|.\'*\'*)
8835         ;;
8836 (..|./*|.\\*)
8837         ;;
8838 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8839         ;;
8840 (.\$\{*prefix\}*|.\$\{*dir\}*)
8841         eval INFOCMP="$INFOCMP"
8842         case ".$INFOCMP" in
8843         (.NONE/*)
8844                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8845                 ;;
8846         esac
8847         ;;
8848 (.no|.NONE/*)
8849         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8850         ;;
8851 (*)
8852         { { echo "$as_me:8852: error: expected a pathname, not \"$INFOCMP\"" >&5
8853 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8854    { (exit 1); exit 1; }; }
8855         ;;
8856 esac
8857
8858 else
8859
8860 test -z "$INFOCMP" && INFOCMP="infocmp"
8861 for ac_prog in $INFOCMP infocmp
8862 do
8863   # Extract the first word of "$ac_prog", so it can be a program name with args.
8864 set dummy $ac_prog; ac_word=$2
8865 echo "$as_me:8865: checking for $ac_word" >&5
8866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8867 if test "${ac_cv_path_INFOCMP+set}" = set; then
8868   echo $ECHO_N "(cached) $ECHO_C" >&6
8869 else
8870   case $INFOCMP in
8871   [\\/]* | ?:[\\/]*)
8872   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8873   ;;
8874   *)
8875   ac_save_IFS=$IFS; IFS=$ac_path_separator
8876 ac_dummy="$PATH:/usr/local/ncurses/bin"
8877 for ac_dir in $ac_dummy; do
8878   IFS=$ac_save_IFS
8879   test -z "$ac_dir" && ac_dir=.
8880   if $as_executable_p "$ac_dir/$ac_word"; then
8881    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8882    echo "$as_me:8882: found $ac_dir/$ac_word" >&5
8883    break
8884 fi
8885 done
8886
8887   ;;
8888 esac
8889 fi
8890 INFOCMP=$ac_cv_path_INFOCMP
8891
8892 if test -n "$INFOCMP"; then
8893   echo "$as_me:8893: result: $INFOCMP" >&5
8894 echo "${ECHO_T}$INFOCMP" >&6
8895 else
8896   echo "$as_me:8896: result: no" >&5
8897 echo "${ECHO_T}no" >&6
8898 fi
8899
8900   test -n "$INFOCMP" && break
8901 done
8902 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8903
8904 cf_path_prog=""
8905 cf_path_args=""
8906 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8907 for cf_temp in $ac_cv_path_INFOCMP
8908 do
8909         if test -z "$cf_path_prog" ; then
8910                 if test "$with_full_paths" = yes ; then
8911
8912 if test "x$prefix" != xNONE; then
8913         cf_path_syntax="$prefix"
8914 else
8915         cf_path_syntax="$ac_default_prefix"
8916 fi
8917
8918 case ".$cf_temp" in
8919 (.\$\(*\)*|.\'*\'*)
8920         ;;
8921 (..|./*|.\\*)
8922         ;;
8923 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8924         ;;
8925 (.\$\{*prefix\}*|.\$\{*dir\}*)
8926         eval cf_temp="$cf_temp"
8927         case ".$cf_temp" in
8928         (.NONE/*)
8929                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8930                 ;;
8931         esac
8932         ;;
8933 (.no|.NONE/*)
8934         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8935         ;;
8936 (*)
8937         break
8938         ;;
8939 esac
8940
8941                         cf_path_prog="$cf_temp"
8942                 else
8943                         cf_path_prog="`basename "$cf_temp"`"
8944                 fi
8945         elif test -z "$cf_path_args" ; then
8946                 cf_path_args="$cf_temp"
8947         else
8948                 cf_path_args="$cf_path_args $cf_temp"
8949         fi
8950 done
8951 IFS="$cf_save_ifs"
8952
8953 if test -n "$cf_path_prog" ; then
8954
8955 echo "${as_me:-configure}:8955: testing defining path for ${cf_path_prog} ..." 1>&5
8956
8957 cat >>confdefs.h <<EOF
8958 #define INFOCMP_PATH "$cf_path_prog"
8959 EOF
8960
8961         test -n "$cf_path_args" &&
8962 cat >>confdefs.h <<EOF
8963 #define INFOCMP_ARGS "$cf_path_args"
8964 EOF
8965
8966 fi
8967
8968                 if test -z "$INFOCMP"
8969                 then
8970                         { echo "$as_me:8970: WARNING: no infocmp program found for fallbacks" >&5
8971 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8972                 fi
8973
8974 fi;
8975
8976         test -z "$TIC" && FALLBACK_LIST=
8977         test -z "$INFOCMP" && FALLBACK_LIST=
8978         if test -z "$FALLBACK_LIST"
8979         then
8980                 { echo "$as_me:8980: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8981 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8982         fi
8983 fi
8984
8985 USE_FALLBACKS=
8986 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8987
8988 echo "$as_me:8988: checking if you want modern xterm or antique" >&5
8989 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8990
8991 # Check whether --with-xterm-new or --without-xterm-new was given.
8992 if test "${with_xterm_new+set}" = set; then
8993   withval="$with_xterm_new"
8994   with_xterm_new=$withval
8995 else
8996   with_xterm_new=yes
8997 fi;
8998 case "$with_xterm_new" in
8999 (no) with_xterm_new=xterm-old;;
9000 (*)      with_xterm_new=xterm-new;;
9001 esac
9002 echo "$as_me:9002: result: $with_xterm_new" >&5
9003 echo "${ECHO_T}$with_xterm_new" >&6
9004 WHICH_XTERM=$with_xterm_new
9005
9006 case $host_os in
9007 (*linux-gnu|*cygwin|*mingw32|*msys)
9008         want_xterm_kbs=DEL
9009         ;;
9010 (*)
9011         want_xterm_kbs=BS
9012         ;;
9013 esac
9014
9015 echo "$as_me:9015: checking if xterm backspace sends BS or DEL" >&5
9016 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9017
9018 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9019 if test "${with_xterm_kbs+set}" = set; then
9020   withval="$with_xterm_kbs"
9021   with_xterm_kbs=$withval
9022 else
9023   with_xterm_kbs=BS
9024 fi;
9025 case x$with_xterm_kbs in
9026 (xyes|xno|xBS|xbs|x8)
9027         with_xterm_kbs=BS
9028         ;;
9029 (xDEL|xdel|x127)
9030         with_xterm_kbs=DEL
9031         ;;
9032 (*)
9033         with_xterm_kbs=$withval
9034         ;;
9035 esac
9036 echo "$as_me:9036: result: $with_xterm_kbs" >&5
9037 echo "${ECHO_T}$with_xterm_kbs" >&6
9038 XTERM_KBS=$with_xterm_kbs
9039
9040 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9041 then
9042         { echo "$as_me:9042: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9043 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9044 fi
9045
9046 MAKE_TERMINFO=
9047 if test "$use_database" = no ; then
9048         TERMINFO="${datadir}/terminfo"
9049         MAKE_TERMINFO="#"
9050 else
9051
9052 echo "$as_me:9052: checking for list of terminfo directories" >&5
9053 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9054
9055 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9056 if test "${with_terminfo_dirs+set}" = set; then
9057   withval="$with_terminfo_dirs"
9058
9059 else
9060   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9061 fi;
9062 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9063 cf_dst_path=
9064 for cf_src_path in $withval
9065 do
9066
9067 if test "x$prefix" != xNONE; then
9068         cf_path_syntax="$prefix"
9069 else
9070         cf_path_syntax="$ac_default_prefix"
9071 fi
9072
9073 case ".$cf_src_path" in
9074 (.\$\(*\)*|.\'*\'*)
9075         ;;
9076 (..|./*|.\\*)
9077         ;;
9078 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9079         ;;
9080 (.\$\{*prefix\}*|.\$\{*dir\}*)
9081         eval cf_src_path="$cf_src_path"
9082         case ".$cf_src_path" in
9083         (.NONE/*)
9084                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9085                 ;;
9086         esac
9087         ;;
9088 (.no|.NONE/*)
9089         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9090         ;;
9091 (*)
9092         { { echo "$as_me:9092: error: expected a pathname, not \"$cf_src_path\"" >&5
9093 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9094    { (exit 1); exit 1; }; }
9095         ;;
9096 esac
9097
9098   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9099   cf_dst_path="${cf_dst_path}${cf_src_path}"
9100 done
9101 IFS="$ac_save_ifs"
9102
9103 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9104 # so we have to check/work around.  We do prefer the result of "eval"...
9105 eval cf_dst_eval="$cf_dst_path"
9106 case "x$cf_dst_eval" in
9107 (xNONE*)
9108         TERMINFO_DIRS=$cf_dst_path
9109         ;;
9110 (*)
9111         TERMINFO_DIRS="$cf_dst_eval"
9112         ;;
9113 esac
9114
9115 echo "$as_me:9115: result: $TERMINFO_DIRS" >&5
9116 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9117 test -n "$TERMINFO_DIRS" &&
9118 cat >>confdefs.h <<EOF
9119 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9120 EOF
9121
9122 case "x$TERMINFO" in
9123 x???:*)
9124         { echo "$as_me:9124: WARNING: ignoring non-directory/file TERMINFO value" >&5
9125 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9126         unset TERMINFO
9127         ;;
9128 esac
9129
9130 echo "$as_me:9130: checking for default terminfo directory" >&5
9131 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9132
9133 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9134 if test "${with_default_terminfo_dir+set}" = set; then
9135   withval="$with_default_terminfo_dir"
9136
9137 else
9138   withval="${TERMINFO:-${datadir}/terminfo}"
9139 fi; if test -n "${datadir}/terminfo" ; then
9140
9141 if test "x$prefix" != xNONE; then
9142         cf_path_syntax="$prefix"
9143 else
9144         cf_path_syntax="$ac_default_prefix"
9145 fi
9146
9147 case ".$withval" in
9148 (.\$\(*\)*|.\'*\'*)
9149         ;;
9150 (..|./*|.\\*)
9151         ;;
9152 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9153         ;;
9154 (.\$\{*prefix\}*|.\$\{*dir\}*)
9155         eval withval="$withval"
9156         case ".$withval" in
9157         (.NONE/*)
9158                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9159                 ;;
9160         esac
9161         ;;
9162 (.no|.NONE/*)
9163         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9164         ;;
9165 (*)
9166         { { echo "$as_me:9166: error: expected a pathname, not \"$withval\"" >&5
9167 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9168    { (exit 1); exit 1; }; }
9169         ;;
9170 esac
9171
9172 fi
9173 eval TERMINFO="$withval"
9174
9175 echo "$as_me:9175: result: $TERMINFO" >&5
9176 echo "${ECHO_T}$TERMINFO" >&6
9177
9178 cat >>confdefs.h <<EOF
9179 #define TERMINFO "$TERMINFO"
9180 EOF
9181
9182 fi
9183
9184 ###     use option --disable-big-core to make tic run on small machines
9185 ###     We need 4Mb, check if we can allocate 50% more than that.
9186 echo "$as_me:9186: checking if big-core option selected" >&5
9187 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9188
9189 # Check whether --enable-big-core or --disable-big-core was given.
9190 if test "${enable_big_core+set}" = set; then
9191   enableval="$enable_big_core"
9192   with_big_core=$enableval
9193 else
9194   if test "$cross_compiling" = yes; then
9195   with_big_core=no
9196 else
9197   cat >"conftest.$ac_ext" <<_ACEOF
9198 #line 9198 "configure"
9199 #include "confdefs.h"
9200
9201 #include <stdlib.h>
9202 #include <string.h>
9203 int main() {
9204         unsigned long n = 6000000L;
9205         char *s = malloc(n);
9206         if (s != 0)
9207                 s[0] = s[n-1] = 0;
9208         ${cf_cv_main_return:-return}(s == 0);
9209 }
9210 _ACEOF
9211 rm -f "conftest$ac_exeext"
9212 if { (eval echo "$as_me:9212: \"$ac_link\"") >&5
9213   (eval $ac_link) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9217   { (eval echo "$as_me:9217: \"$ac_try\"") >&5
9218   (eval $ac_try) 2>&5
9219   ac_status=$?
9220   echo "$as_me:9220: \$? = $ac_status" >&5
9221   (exit "$ac_status"); }; }; then
9222   with_big_core=yes
9223 else
9224   echo "$as_me: program exited with status $ac_status" >&5
9225 echo "$as_me: failed program was:" >&5
9226 cat "conftest.$ac_ext" >&5
9227 with_big_core=no
9228 fi
9229 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9230 fi
9231 fi;
9232 echo "$as_me:9232: result: $with_big_core" >&5
9233 echo "${ECHO_T}$with_big_core" >&6
9234 test "x$with_big_core" = "xyes" &&
9235 cat >>confdefs.h <<\EOF
9236 #define HAVE_BIG_CORE 1
9237 EOF
9238
9239 ### ISO C only guarantees 512-char strings, we have tables which load faster
9240 ### when constructed using "big" strings.  More than the C compiler, the awk
9241 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9242 echo "$as_me:9242: checking if big-strings option selected" >&5
9243 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9244
9245 # Check whether --enable-big-strings or --disable-big-strings was given.
9246 if test "${enable_big_strings+set}" = set; then
9247   enableval="$enable_big_strings"
9248   with_big_strings=$enableval
9249 else
9250
9251         case x$AWK in
9252         (x)
9253                 eval with_big_strings=no
9254                 ;;
9255         (*)
9256                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9257                         | $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
9258                         eval with_big_strings=yes
9259                 else
9260                         eval with_big_strings=no
9261                 fi
9262                 ;;
9263         esac
9264
9265 fi;
9266 echo "$as_me:9266: result: $with_big_strings" >&5
9267 echo "${ECHO_T}$with_big_strings" >&6
9268
9269 USE_BIG_STRINGS=0
9270 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9271
9272 ###     use option --enable-termcap to compile in the termcap fallback support
9273 echo "$as_me:9273: checking if you want termcap-fallback support" >&5
9274 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9275
9276 # Check whether --enable-termcap or --disable-termcap was given.
9277 if test "${enable_termcap+set}" = set; then
9278   enableval="$enable_termcap"
9279   with_termcap=$enableval
9280 else
9281   with_termcap=no
9282 fi;
9283 echo "$as_me:9283: result: $with_termcap" >&5
9284 echo "${ECHO_T}$with_termcap" >&6
9285
9286 NCURSES_USE_TERMCAP=0
9287 if test "x$with_termcap" != "xyes" ; then
9288         if test "$use_database" = no ; then
9289                 if test -z "$with_fallback" ; then
9290                         { { echo "$as_me:9290: error: You have disabled the database w/o specifying fallbacks" >&5
9291 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9292    { (exit 1); exit 1; }; }
9293                 fi
9294         fi
9295
9296 cat >>confdefs.h <<\EOF
9297 #define PURE_TERMINFO 1
9298 EOF
9299
9300 else
9301
9302         if test "$with_ticlib" != no ; then
9303                 { { echo "$as_me:9303: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9304 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9305    { (exit 1); exit 1; }; }
9306         fi
9307
9308         NCURSES_USE_TERMCAP=1
9309         echo "$as_me:9309: checking for list of termcap files" >&5
9310 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9311
9312 # Check whether --with-termpath or --without-termpath was given.
9313 if test "${with_termpath+set}" = set; then
9314   withval="$with_termpath"
9315
9316 else
9317   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9318 fi;
9319 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9320 cf_dst_path=
9321 for cf_src_path in $withval
9322 do
9323
9324 if test "x$prefix" != xNONE; then
9325         cf_path_syntax="$prefix"
9326 else
9327         cf_path_syntax="$ac_default_prefix"
9328 fi
9329
9330 case ".$cf_src_path" in
9331 (.\$\(*\)*|.\'*\'*)
9332         ;;
9333 (..|./*|.\\*)
9334         ;;
9335 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9336         ;;
9337 (.\$\{*prefix\}*|.\$\{*dir\}*)
9338         eval cf_src_path="$cf_src_path"
9339         case ".$cf_src_path" in
9340         (.NONE/*)
9341                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9342                 ;;
9343         esac
9344         ;;
9345 (.no|.NONE/*)
9346         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9347         ;;
9348 (*)
9349         { { echo "$as_me:9349: error: expected a pathname, not \"$cf_src_path\"" >&5
9350 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9351    { (exit 1); exit 1; }; }
9352         ;;
9353 esac
9354
9355   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9356   cf_dst_path="${cf_dst_path}${cf_src_path}"
9357 done
9358 IFS="$ac_save_ifs"
9359
9360 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9361 # so we have to check/work around.  We do prefer the result of "eval"...
9362 eval cf_dst_eval="$cf_dst_path"
9363 case "x$cf_dst_eval" in
9364 (xNONE*)
9365         TERMPATH=$cf_dst_path
9366         ;;
9367 (*)
9368         TERMPATH="$cf_dst_eval"
9369         ;;
9370 esac
9371
9372         echo "$as_me:9372: result: $TERMPATH" >&5
9373 echo "${ECHO_T}$TERMPATH" >&6
9374         test -n "$TERMPATH" &&
9375 cat >>confdefs.h <<EOF
9376 #define TERMPATH "$TERMPATH"
9377 EOF
9378
9379         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9380         echo "$as_me:9380: checking if fast termcap-loader is needed" >&5
9381 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9382
9383 # Check whether --enable-getcap or --disable-getcap was given.
9384 if test "${enable_getcap+set}" = set; then
9385   enableval="$enable_getcap"
9386   with_getcap=$enableval
9387 else
9388   with_getcap=no
9389 fi;
9390         echo "$as_me:9390: result: $with_getcap" >&5
9391 echo "${ECHO_T}$with_getcap" >&6
9392         test "x$with_getcap" = "xyes" &&
9393 cat >>confdefs.h <<\EOF
9394 #define USE_GETCAP 1
9395 EOF
9396
9397         echo "$as_me:9397: checking if translated termcaps will be cached in ~/.terminfo" >&5
9398 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9399
9400 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9401 if test "${enable_getcap_cache+set}" = set; then
9402   enableval="$enable_getcap_cache"
9403   with_getcap_cache=$enableval
9404 else
9405   with_getcap_cache=no
9406 fi;
9407         echo "$as_me:9407: result: $with_getcap_cache" >&5
9408 echo "${ECHO_T}$with_getcap_cache" >&6
9409         test "x$with_getcap_cache" = "xyes" &&
9410 cat >>confdefs.h <<\EOF
9411 #define USE_GETCAP_CACHE 1
9412 EOF
9413
9414 fi
9415
9416 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9417 echo "$as_me:9417: checking if ~/.terminfo is wanted" >&5
9418 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9419
9420 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9421 if test "${enable_home_terminfo+set}" = set; then
9422   enableval="$enable_home_terminfo"
9423   with_home_terminfo=$enableval
9424 else
9425   with_home_terminfo=yes
9426 fi;
9427 echo "$as_me:9427: result: $with_home_terminfo" >&5
9428 echo "${ECHO_T}$with_home_terminfo" >&6
9429 test "x$with_home_terminfo" = "xyes" &&
9430 cat >>confdefs.h <<\EOF
9431 #define USE_HOME_TERMINFO 1
9432 EOF
9433
9434 echo "$as_me:9434: checking if you want to permit root to use ncurses environment variables" >&5
9435 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9436
9437 # Check whether --enable-root-environ or --disable-root-environ was given.
9438 if test "${enable_root_environ+set}" = set; then
9439   enableval="$enable_root_environ"
9440   with_root_environ=$enableval
9441 else
9442   with_root_environ=yes
9443 fi;
9444 echo "$as_me:9444: result: $with_root_environ" >&5
9445 echo "${ECHO_T}$with_root_environ" >&6
9446 test "x$with_root_environ" = xyes &&
9447 cat >>confdefs.h <<\EOF
9448 #define USE_ROOT_ENVIRON 1
9449 EOF
9450
9451 echo "$as_me:9451: checking if you want to permit setuid programs to access all files" >&5
9452 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9453
9454 # Check whether --enable-root-environ or --disable-root-environ was given.
9455 if test "${enable_root_environ+set}" = set; then
9456   enableval="$enable_root_environ"
9457   with_root_access=$enableval
9458 else
9459   with_root_access=yes
9460 fi;
9461 echo "$as_me:9461: result: $with_root_access" >&5
9462 echo "${ECHO_T}$with_root_access" >&6
9463 test "x$with_root_access" = xyes &&
9464 cat >>confdefs.h <<\EOF
9465 #define USE_ROOT_ACCESS 1
9466 EOF
9467
9468 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9469 ###   to reduce storage requirements for the terminfo database.
9470
9471 for ac_header in \
9472 unistd.h \
9473
9474 do
9475 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9476 echo "$as_me:9476: checking for $ac_header" >&5
9477 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9478 if eval "test \"\${$as_ac_Header+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 #include <$ac_header>
9485 _ACEOF
9486 if { (eval echo "$as_me:9486: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9487   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9488   ac_status=$?
9489   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9490   rm -f conftest.er1
9491   cat conftest.err >&5
9492   echo "$as_me:9492: \$? = $ac_status" >&5
9493   (exit "$ac_status"); } >/dev/null; then
9494   if test -s conftest.err; then
9495     ac_cpp_err=$ac_c_preproc_warn_flag
9496   else
9497     ac_cpp_err=
9498   fi
9499 else
9500   ac_cpp_err=yes
9501 fi
9502 if test -z "$ac_cpp_err"; then
9503   eval "$as_ac_Header=yes"
9504 else
9505   echo "$as_me: failed program was:" >&5
9506   cat "conftest.$ac_ext" >&5
9507   eval "$as_ac_Header=no"
9508 fi
9509 rm -f conftest.err "conftest.$ac_ext"
9510 fi
9511 echo "$as_me:9511: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9512 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9513 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9514   cat >>confdefs.h <<EOF
9515 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9516 EOF
9517
9518 fi
9519 done
9520
9521 for ac_func in \
9522         remove \
9523         unlink
9524 do
9525 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9526 echo "$as_me:9526: checking for $ac_func" >&5
9527 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9528 if eval "test \"\${$as_ac_var+set}\" = set"; then
9529   echo $ECHO_N "(cached) $ECHO_C" >&6
9530 else
9531   cat >"conftest.$ac_ext" <<_ACEOF
9532 #line 9532 "configure"
9533 #include "confdefs.h"
9534 #define $ac_func autoconf_temporary
9535 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9536 #undef $ac_func
9537
9538 #ifdef __cplusplus
9539 extern "C"
9540 #endif
9541
9542 /* We use char because int might match the return type of a gcc2
9543    builtin and then its argument prototype would still apply.  */
9544 char $ac_func (void);
9545
9546 int
9547 main (void)
9548 {
9549
9550 /* The GNU C library defines stubs for functions which it implements
9551     to always fail with ENOSYS.  Some functions are actually named
9552     something starting with __ and the normal name is an alias.  */
9553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9554 #error found stub for $ac_func
9555 #endif
9556
9557         return $ac_func ();
9558   ;
9559   return 0;
9560 }
9561 _ACEOF
9562 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9563 if { (eval echo "$as_me:9563: \"$ac_link\"") >&5
9564   (eval $ac_link) 2>&5
9565   ac_status=$?
9566   echo "$as_me:9566: \$? = $ac_status" >&5
9567   (exit "$ac_status"); } &&
9568          { ac_try='test -s "conftest$ac_exeext"'
9569   { (eval echo "$as_me:9569: \"$ac_try\"") >&5
9570   (eval $ac_try) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit "$ac_status"); }; }; then
9574   eval "$as_ac_var=yes"
9575 else
9576   echo "$as_me: failed program was:" >&5
9577 cat "conftest.$ac_ext" >&5
9578 eval "$as_ac_var=no"
9579 fi
9580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9581 fi
9582 echo "$as_me:9582: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9583 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9584 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9585   cat >>confdefs.h <<EOF
9586 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9587 EOF
9588
9589 fi
9590 done
9591
9592 if test "$cross_compiling" = yes ; then
9593
9594 for ac_func in \
9595                 link \
9596                 symlink
9597 do
9598 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9599 echo "$as_me:9599: checking for $ac_func" >&5
9600 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9601 if eval "test \"\${$as_ac_var+set}\" = set"; then
9602   echo $ECHO_N "(cached) $ECHO_C" >&6
9603 else
9604   cat >"conftest.$ac_ext" <<_ACEOF
9605 #line 9605 "configure"
9606 #include "confdefs.h"
9607 #define $ac_func autoconf_temporary
9608 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9609 #undef $ac_func
9610
9611 #ifdef __cplusplus
9612 extern "C"
9613 #endif
9614
9615 /* We use char because int might match the return type of a gcc2
9616    builtin and then its argument prototype would still apply.  */
9617 char $ac_func (void);
9618
9619 int
9620 main (void)
9621 {
9622
9623 /* The GNU C library defines stubs for functions which it implements
9624     to always fail with ENOSYS.  Some functions are actually named
9625     something starting with __ and the normal name is an alias.  */
9626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9627 #error found stub for $ac_func
9628 #endif
9629
9630         return $ac_func ();
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637   (eval $ac_link) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit "$ac_status"); } &&
9641          { ac_try='test -s "conftest$ac_exeext"'
9642   { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit "$ac_status"); }; }; then
9647   eval "$as_ac_var=yes"
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat "conftest.$ac_ext" >&5
9651 eval "$as_ac_var=no"
9652 fi
9653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9654 fi
9655 echo "$as_me:9655: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9656 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9657 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9658   cat >>confdefs.h <<EOF
9659 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9660 EOF
9661
9662 fi
9663 done
9664
9665 else
9666         echo "$as_me:9666: checking if link/symlink functions work" >&5
9667 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9668 if test "${cf_cv_link_funcs+set}" = set; then
9669   echo $ECHO_N "(cached) $ECHO_C" >&6
9670 else
9671
9672                 cf_cv_link_funcs=
9673                 for cf_func in link symlink ; do
9674                         if test "$cross_compiling" = yes; then
9675
9676                         eval 'ac_cv_func_'$cf_func'=error'
9677 else
9678   cat >"conftest.$ac_ext" <<_ACEOF
9679 #line 9679 "configure"
9680 #include "confdefs.h"
9681
9682 #include <stdio.h>
9683 #include <sys/types.h>
9684 #include <sys/stat.h>
9685 #ifdef HAVE_UNISTD_H
9686 #include <unistd.h>
9687 #endif
9688 int main(void)
9689 {
9690         int fail = 0;
9691         char *src = "conftest.tmp";
9692         char *dst = "conftest.chk";
9693         struct stat src_sb, dst_sb;
9694         FILE *fp = fopen(src, "w");
9695         if (fp == 0) { fail = 3; } else {
9696                 fclose(fp); stat(src, &src_sb);
9697                 if ($cf_func(src, dst) < 0) {
9698                         fail = 1;
9699                 } else if (stat(dst, &dst_sb) < 0) {
9700                         fail = 2;
9701                 } else {
9702                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9703                         if (diff < 0) diff = -diff;
9704                         if (diff > 2) fail = 3;
9705                 }
9706         }
9707 #ifdef HAVE_UNLINK
9708         unlink(dst); unlink(src);
9709 #else
9710         remove(dst); remove(src);
9711 #endif
9712         ${cf_cv_main_return:-return} (fail);
9713 }
9714
9715 _ACEOF
9716 rm -f "conftest$ac_exeext"
9717 if { (eval echo "$as_me:9717: \"$ac_link\"") >&5
9718   (eval $ac_link) 2>&5
9719   ac_status=$?
9720   echo "$as_me:9720: \$? = $ac_status" >&5
9721   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9722   { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9723   (eval $ac_try) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit "$ac_status"); }; }; then
9727
9728                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9729                         eval 'ac_cv_func_'$cf_func'=yes'
9730 else
9731   echo "$as_me: program exited with status $ac_status" >&5
9732 echo "$as_me: failed program was:" >&5
9733 cat "conftest.$ac_ext" >&5
9734
9735                         eval 'ac_cv_func_'$cf_func'=no'
9736 fi
9737 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9738 fi
9739                 done
9740                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9741
9742 fi
9743 echo "$as_me:9743: result: $cf_cv_link_funcs" >&5
9744 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9745         test "$ac_cv_func_link"    = yes &&
9746 cat >>confdefs.h <<\EOF
9747 #define HAVE_LINK 1
9748 EOF
9749
9750         test "$ac_cv_func_symlink" = yes &&
9751 cat >>confdefs.h <<\EOF
9752 #define HAVE_SYMLINK 1
9753 EOF
9754
9755 fi
9756
9757 with_links=no
9758 with_symlinks=no
9759
9760 # soft links (symbolic links) are useful for some systems where hard links do
9761 # not work, or to make it simpler to copy terminfo trees around.
9762 if test "x$ac_cv_func_symlink" = xyes ; then
9763         echo "$as_me:9763: checking if tic should use symbolic links" >&5
9764 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9765
9766 # Check whether --enable-symlinks or --disable-symlinks was given.
9767 if test "${enable_symlinks+set}" = set; then
9768   enableval="$enable_symlinks"
9769   with_symlinks=$enableval
9770 else
9771   with_symlinks=no
9772 fi;
9773         echo "$as_me:9773: result: $with_symlinks" >&5
9774 echo "${ECHO_T}$with_symlinks" >&6
9775 fi
9776
9777 # If we have hard links and did not choose to use soft links instead, there is
9778 # no reason to make this choice optional - use the hard links.
9779 if test "$with_symlinks" = no ; then
9780         echo "$as_me:9780: checking if tic should use hard links" >&5
9781 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9782         if test "x$ac_cv_func_link" = xyes ; then
9783                 with_links=yes
9784         else
9785                 with_links=no
9786         fi
9787         echo "$as_me:9787: result: $with_links" >&5
9788 echo "${ECHO_T}$with_links" >&6
9789 fi
9790
9791 test "x$with_links" = xyes &&
9792 cat >>confdefs.h <<\EOF
9793 #define USE_LINKS 1
9794 EOF
9795
9796 test "x$with_symlinks" = xyes &&
9797 cat >>confdefs.h <<\EOF
9798 #define USE_SYMLINKS 1
9799 EOF
9800
9801 ###   use option --enable-broken-linker to force on use of broken-linker support
9802
9803 echo "$as_me:9803: checking if you want broken-linker support code" >&5
9804 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9805
9806 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9807 if test "${enable_broken_linker+set}" = set; then
9808   enableval="$enable_broken_linker"
9809   with_broken_linker=$enableval
9810 else
9811   with_broken_linker=no
9812 fi;
9813 echo "$as_me:9813: result: $with_broken_linker" >&5
9814 echo "${ECHO_T}$with_broken_linker" >&6
9815
9816 : "${BROKEN_LINKER:=0}"
9817 if test "x$with_broken_linker" = xyes ; then
9818
9819 cat >>confdefs.h <<\EOF
9820 #define BROKEN_LINKER 1
9821 EOF
9822
9823         BROKEN_LINKER=1
9824 fi
9825
9826 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9827 echo "$as_me:9827: checking if tputs should process BSD-style prefix padding" >&5
9828 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9829
9830 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9831 if test "${enable_bsdpad+set}" = set; then
9832   enableval="$enable_bsdpad"
9833   with_bsdpad=$enableval
9834 else
9835   with_bsdpad=no
9836 fi;
9837 echo "$as_me:9837: result: $with_bsdpad" >&5
9838 echo "${ECHO_T}$with_bsdpad" >&6
9839 test "x$with_bsdpad" = xyes &&
9840 cat >>confdefs.h <<\EOF
9841 #define BSD_TPUTS 1
9842 EOF
9843
9844 ###   use option --enable-widec to turn on use of wide-character support
9845 NCURSES_CH_T=chtype
9846 NCURSES_LIBUTF8=0
9847
9848 NEED_WCHAR_H=0
9849 NCURSES_MBSTATE_T=0
9850 NCURSES_WCHAR_T=0
9851 NCURSES_WINT_T=0
9852
9853 # Check to define _XOPEN_SOURCE "automatically"
9854 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9855
9856 echo "$as_me:9856: checking if the POSIX test-macros are already defined" >&5
9857 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9858 if test "${cf_cv_posix_visible+set}" = set; then
9859   echo $ECHO_N "(cached) $ECHO_C" >&6
9860 else
9861
9862 cat >"conftest.$ac_ext" <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865 #include <stdio.h>
9866 int
9867 main (void)
9868 {
9869
9870 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9871         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9872         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9873         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9874 #error conflicting symbols found
9875 #endif
9876
9877   ;
9878   return 0;
9879 }
9880 _ACEOF
9881 rm -f "conftest.$ac_objext"
9882 if { (eval echo "$as_me:9882: \"$ac_compile\"") >&5
9883   (eval $ac_compile) 2>&5
9884   ac_status=$?
9885   echo "$as_me:9885: \$? = $ac_status" >&5
9886   (exit "$ac_status"); } &&
9887          { ac_try='test -s "conftest.$ac_objext"'
9888   { (eval echo "$as_me:9888: \"$ac_try\"") >&5
9889   (eval $ac_try) 2>&5
9890   ac_status=$?
9891   echo "$as_me:9891: \$? = $ac_status" >&5
9892   (exit "$ac_status"); }; }; then
9893   cf_cv_posix_visible=no
9894 else
9895   echo "$as_me: failed program was:" >&5
9896 cat "conftest.$ac_ext" >&5
9897 cf_cv_posix_visible=yes
9898 fi
9899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9900
9901 fi
9902 echo "$as_me:9902: result: $cf_cv_posix_visible" >&5
9903 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9904
9905 if test "$cf_cv_posix_visible" = no; then
9906
9907 cf_XOPEN_SOURCE=600
9908 cf_POSIX_C_SOURCE=199506L
9909 cf_xopen_source=
9910
9911 case "$host_os" in
9912 (aix[4-7]*)
9913         cf_xopen_source="-D_ALL_SOURCE"
9914         ;;
9915 (msys)
9916         cf_XOPEN_SOURCE=600
9917         ;;
9918 (darwin[0-8].*)
9919         cf_xopen_source="-D_APPLE_C_SOURCE"
9920         ;;
9921 (darwin*)
9922         cf_xopen_source="-D_DARWIN_C_SOURCE"
9923         cf_XOPEN_SOURCE=
9924         ;;
9925 (freebsd*|dragonfly*|midnightbsd*)
9926         # 5.x headers associate
9927         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9928         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9929         cf_POSIX_C_SOURCE=200112L
9930         cf_XOPEN_SOURCE=600
9931         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9932         ;;
9933 (hpux11*)
9934         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9935         ;;
9936 (hpux*)
9937         cf_xopen_source="-D_HPUX_SOURCE"
9938         ;;
9939 (irix[56].*)
9940         cf_xopen_source="-D_SGI_SOURCE"
9941         cf_XOPEN_SOURCE=
9942         ;;
9943 (linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9944
9945 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9946
9947 echo "$as_me:9947: checking if this is the GNU C library" >&5
9948 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9949 if test "${cf_cv_gnu_library+set}" = set; then
9950   echo $ECHO_N "(cached) $ECHO_C" >&6
9951 else
9952
9953 cat >"conftest.$ac_ext" <<_ACEOF
9954 #line 9954 "configure"
9955 #include "confdefs.h"
9956 #include <sys/types.h>
9957 int
9958 main (void)
9959 {
9960
9961         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9962                 return 0;
9963         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9964                 return 0;
9965         #else
9966         #       error not GNU C library
9967         #endif
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 rm -f "conftest.$ac_objext"
9973 if { (eval echo "$as_me:9973: \"$ac_compile\"") >&5
9974   (eval $ac_compile) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit "$ac_status"); } &&
9978          { ac_try='test -s "conftest.$ac_objext"'
9979   { (eval echo "$as_me:9979: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:9982: \$? = $ac_status" >&5
9983   (exit "$ac_status"); }; }; then
9984   cf_cv_gnu_library=yes
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 cat "conftest.$ac_ext" >&5
9988 cf_cv_gnu_library=no
9989 fi
9990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9991
9992 fi
9993 echo "$as_me:9993: result: $cf_cv_gnu_library" >&5
9994 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9995
9996 if test x$cf_cv_gnu_library = xyes; then
9997
9998         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9999         # was changed to help a little.  newlib incorporated the change about 4
10000         # years later.
10001         echo "$as_me:10001: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10002 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10003 if test "${cf_cv_gnu_library_219+set}" = set; then
10004   echo $ECHO_N "(cached) $ECHO_C" >&6
10005 else
10006
10007                 cf_save="$CPPFLAGS"
10008
10009         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10010         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10011
10012                 cat >"conftest.$ac_ext" <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015 #include <sys/types.h>
10016 int
10017 main (void)
10018 {
10019
10020                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10021                                 return 0;
10022                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10023                                 return 0;
10024                         #else
10025                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10026                         #endif
10027   ;
10028   return 0;
10029 }
10030 _ACEOF
10031 rm -f "conftest.$ac_objext"
10032 if { (eval echo "$as_me:10032: \"$ac_compile\"") >&5
10033   (eval $ac_compile) 2>&5
10034   ac_status=$?
10035   echo "$as_me:10035: \$? = $ac_status" >&5
10036   (exit "$ac_status"); } &&
10037          { ac_try='test -s "conftest.$ac_objext"'
10038   { (eval echo "$as_me:10038: \"$ac_try\"") >&5
10039   (eval $ac_try) 2>&5
10040   ac_status=$?
10041   echo "$as_me:10041: \$? = $ac_status" >&5
10042   (exit "$ac_status"); }; }; then
10043   cf_cv_gnu_library_219=yes
10044 else
10045   echo "$as_me: failed program was:" >&5
10046 cat "conftest.$ac_ext" >&5
10047 cf_cv_gnu_library_219=no
10048 fi
10049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10050                 CPPFLAGS="$cf_save"
10051
10052 fi
10053 echo "$as_me:10053: result: $cf_cv_gnu_library_219" >&5
10054 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10055
10056         if test "x$cf_cv_gnu_library_219" = xyes; then
10057                 cf_save="$CPPFLAGS"
10058                 echo "$as_me:10058: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10059 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10060 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10061   echo $ECHO_N "(cached) $ECHO_C" >&6
10062 else
10063
10064 cf_fix_cppflags=no
10065 cf_new_cflags=
10066 cf_new_cppflags=
10067 cf_new_extra_cppflags=
10068
10069 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10070 do
10071 case "$cf_fix_cppflags" in
10072 (no)
10073         case "$cf_add_cflags" in
10074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10075                 case "$cf_add_cflags" in
10076                 (-D*)
10077                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10078
10079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10080                                 && test -z "${cf_tst_cflags}" \
10081                                 && cf_fix_cppflags=yes
10082
10083                         if test "$cf_fix_cppflags" = yes ; then
10084
10085         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10086         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10087
10088                                 continue
10089                         elif test "${cf_tst_cflags}" = "\"'" ; then
10090
10091         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10092         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10093
10094                                 continue
10095                         fi
10096                         ;;
10097                 esac
10098                 case "$CPPFLAGS" in
10099                 (*$cf_add_cflags)
10100                         ;;
10101                 (*)
10102                         case "$cf_add_cflags" in
10103                         (-D*)
10104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10105
10106 CPPFLAGS=`echo "$CPPFLAGS" | \
10107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10109
10110                                 ;;
10111                         esac
10112
10113         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10114         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10115
10116                         ;;
10117                 esac
10118                 ;;
10119         (*)
10120
10121         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10122         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10123
10124                 ;;
10125         esac
10126         ;;
10127 (yes)
10128
10129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10131
10132         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10133
10134         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10135                 && test -z "${cf_tst_cflags}" \
10136                 && cf_fix_cppflags=no
10137         ;;
10138 esac
10139 done
10140
10141 if test -n "$cf_new_cflags" ; then
10142
10143         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10144         CFLAGS="${CFLAGS}$cf_new_cflags"
10145
10146 fi
10147
10148 if test -n "$cf_new_cppflags" ; then
10149
10150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10151         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10152
10153 fi
10154
10155 if test -n "$cf_new_extra_cppflags" ; then
10156
10157         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10158         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10159
10160 fi
10161
10162                         cat >"conftest.$ac_ext" <<_ACEOF
10163 #line 10163 "configure"
10164 #include "confdefs.h"
10165
10166                                 #include <limits.h>
10167                                 #include <sys/types.h>
10168
10169 int
10170 main (void)
10171 {
10172
10173                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10174                                         return 0;
10175                                 #else
10176                                 #       error GNU C library is too old
10177                                 #endif
10178   ;
10179   return 0;
10180 }
10181 _ACEOF
10182 rm -f "conftest.$ac_objext"
10183 if { (eval echo "$as_me:10183: \"$ac_compile\"") >&5
10184   (eval $ac_compile) 2>&5
10185   ac_status=$?
10186   echo "$as_me:10186: \$? = $ac_status" >&5
10187   (exit "$ac_status"); } &&
10188          { ac_try='test -s "conftest.$ac_objext"'
10189   { (eval echo "$as_me:10189: \"$ac_try\"") >&5
10190   (eval $ac_try) 2>&5
10191   ac_status=$?
10192   echo "$as_me:10192: \$? = $ac_status" >&5
10193   (exit "$ac_status"); }; }; then
10194   cf_cv_gnu_dftsrc_219=yes
10195 else
10196   echo "$as_me: failed program was:" >&5
10197 cat "conftest.$ac_ext" >&5
10198 cf_cv_gnu_dftsrc_219=no
10199 fi
10200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10201
10202 fi
10203 echo "$as_me:10203: result: $cf_cv_gnu_dftsrc_219" >&5
10204 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10205                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10206         else
10207                 cf_cv_gnu_dftsrc_219=maybe
10208         fi
10209
10210         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10211
10212                 echo "$as_me:10212: checking if we must define _GNU_SOURCE" >&5
10213 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10214 if test "${cf_cv_gnu_source+set}" = set; then
10215   echo $ECHO_N "(cached) $ECHO_C" >&6
10216 else
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                         #ifndef _XOPEN_SOURCE
10227                         #error  expected _XOPEN_SOURCE to be defined
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_save="$CPPFLAGS"
10250
10251 cf_fix_cppflags=no
10252 cf_new_cflags=
10253 cf_new_cppflags=
10254 cf_new_extra_cppflags=
10255
10256 for cf_add_cflags in -D_GNU_SOURCE
10257 do
10258 case "$cf_fix_cppflags" in
10259 (no)
10260         case "$cf_add_cflags" in
10261         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10262                 case "$cf_add_cflags" in
10263                 (-D*)
10264                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10265
10266                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10267                                 && test -z "${cf_tst_cflags}" \
10268                                 && cf_fix_cppflags=yes
10269
10270                         if test "$cf_fix_cppflags" = yes ; then
10271
10272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10274
10275                                 continue
10276                         elif test "${cf_tst_cflags}" = "\"'" ; then
10277
10278         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10279         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10280
10281                                 continue
10282                         fi
10283                         ;;
10284                 esac
10285                 case "$CPPFLAGS" in
10286                 (*$cf_add_cflags)
10287                         ;;
10288                 (*)
10289                         case "$cf_add_cflags" in
10290                         (-D*)
10291                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10292
10293 CPPFLAGS=`echo "$CPPFLAGS" | \
10294         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10295                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10296
10297                                 ;;
10298                         esac
10299
10300         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10301         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10302
10303                         ;;
10304                 esac
10305                 ;;
10306         (*)
10307
10308         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10309         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10310
10311                 ;;
10312         esac
10313         ;;
10314 (yes)
10315
10316         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10317         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10318
10319         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10320
10321         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10322                 && test -z "${cf_tst_cflags}" \
10323                 && cf_fix_cppflags=no
10324         ;;
10325 esac
10326 done
10327
10328 if test -n "$cf_new_cflags" ; then
10329
10330         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10331         CFLAGS="${CFLAGS}$cf_new_cflags"
10332
10333 fi
10334
10335 if test -n "$cf_new_cppflags" ; then
10336
10337         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10338         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10339
10340 fi
10341
10342 if test -n "$cf_new_extra_cppflags" ; then
10343
10344         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10345         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10346
10347 fi
10348
10349                          cat >"conftest.$ac_ext" <<_ACEOF
10350 #line 10350 "configure"
10351 #include "confdefs.h"
10352 #include <sys/types.h>
10353 int
10354 main (void)
10355 {
10356
10357                                 #ifdef _XOPEN_SOURCE
10358                                 #error  expected _XOPEN_SOURCE to be undefined
10359                                 #endif
10360   ;
10361   return 0;
10362 }
10363 _ACEOF
10364 rm -f "conftest.$ac_objext"
10365 if { (eval echo "$as_me:10365: \"$ac_compile\"") >&5
10366   (eval $ac_compile) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit "$ac_status"); } &&
10370          { ac_try='test -s "conftest.$ac_objext"'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit "$ac_status"); }; }; then
10376   cf_cv_gnu_source=no
10377 else
10378   echo "$as_me: failed program was:" >&5
10379 cat "conftest.$ac_ext" >&5
10380 cf_cv_gnu_source=yes
10381 fi
10382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10383                         CPPFLAGS="$cf_save"
10384
10385 fi
10386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10387
10388 fi
10389 echo "$as_me:10389: result: $cf_cv_gnu_source" >&5
10390 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10391
10392                 if test "$cf_cv_gnu_source" = yes
10393                 then
10394                 echo "$as_me:10394: checking if we should also define _DEFAULT_SOURCE" >&5
10395 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10396 if test "${cf_cv_default_source+set}" = set; then
10397   echo $ECHO_N "(cached) $ECHO_C" >&6
10398 else
10399
10400         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10401         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10402
10403                         cat >"conftest.$ac_ext" <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406 #include <sys/types.h>
10407 int
10408 main (void)
10409 {
10410
10411                                 #ifdef _DEFAULT_SOURCE
10412                                 #error  expected _DEFAULT_SOURCE to be undefined
10413                                 #endif
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f "conftest.$ac_objext"
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit "$ac_status"); } &&
10424          { ac_try='test -s "conftest.$ac_objext"'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit "$ac_status"); }; }; then
10430   cf_cv_default_source=no
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat "conftest.$ac_ext" >&5
10434 cf_cv_default_source=yes
10435 fi
10436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10437
10438 fi
10439 echo "$as_me:10439: result: $cf_cv_default_source" >&5
10440 echo "${ECHO_T}$cf_cv_default_source" >&6
10441                         if test "$cf_cv_default_source" = yes
10442                         then
10443
10444         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10445         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10446
10447                         fi
10448                 fi
10449         fi
10450
10451 fi
10452
10453         ;;
10454 (minix*)
10455         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10456         ;;
10457 (mirbsd*)
10458         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10459         cf_XOPEN_SOURCE=
10460
10461 if test "$cf_cv_posix_visible" = no; then
10462
10463 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10464
10465 cf_save_CFLAGS="$CFLAGS"
10466 cf_save_CPPFLAGS="$CPPFLAGS"
10467
10468 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10469         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10470                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10471
10472 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10473         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10474                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10475
10476 echo "$as_me:10476: checking if we should define _POSIX_C_SOURCE" >&5
10477 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10478 if test "${cf_cv_posix_c_source+set}" = set; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 else
10481
10482 echo "${as_me:-configure}:10482: testing if the symbol is already defined go no further ..." 1>&5
10483
10484         cat >"conftest.$ac_ext" <<_ACEOF
10485 #line 10485 "configure"
10486 #include "confdefs.h"
10487 #include <sys/types.h>
10488 int
10489 main (void)
10490 {
10491
10492 #ifndef _POSIX_C_SOURCE
10493 make an error
10494 #endif
10495   ;
10496   return 0;
10497 }
10498 _ACEOF
10499 rm -f "conftest.$ac_objext"
10500 if { (eval echo "$as_me:10500: \"$ac_compile\"") >&5
10501   (eval $ac_compile) 2>&5
10502   ac_status=$?
10503   echo "$as_me:10503: \$? = $ac_status" >&5
10504   (exit "$ac_status"); } &&
10505          { ac_try='test -s "conftest.$ac_objext"'
10506   { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit "$ac_status"); }; }; then
10511   cf_cv_posix_c_source=no
10512 else
10513   echo "$as_me: failed program was:" >&5
10514 cat "conftest.$ac_ext" >&5
10515 cf_want_posix_source=no
10516          case .$cf_POSIX_C_SOURCE in
10517          (.[12]??*)
10518                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10519                 ;;
10520          (.2)
10521                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10522                 cf_want_posix_source=yes
10523                 ;;
10524          (.*)
10525                 cf_want_posix_source=yes
10526                 ;;
10527          esac
10528          if test "$cf_want_posix_source" = yes ; then
10529                 cat >"conftest.$ac_ext" <<_ACEOF
10530 #line 10530 "configure"
10531 #include "confdefs.h"
10532 #include <sys/types.h>
10533 int
10534 main (void)
10535 {
10536
10537 #ifdef _POSIX_SOURCE
10538 make an error
10539 #endif
10540   ;
10541   return 0;
10542 }
10543 _ACEOF
10544 rm -f "conftest.$ac_objext"
10545 if { (eval echo "$as_me:10545: \"$ac_compile\"") >&5
10546   (eval $ac_compile) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit "$ac_status"); } &&
10550          { ac_try='test -s "conftest.$ac_objext"'
10551   { (eval echo "$as_me:10551: \"$ac_try\"") >&5
10552   (eval $ac_try) 2>&5
10553   ac_status=$?
10554   echo "$as_me:10554: \$? = $ac_status" >&5
10555   (exit "$ac_status"); }; }; then
10556   :
10557 else
10558   echo "$as_me: failed program was:" >&5
10559 cat "conftest.$ac_ext" >&5
10560 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10561 fi
10562 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10563          fi
10564
10565 echo "${as_me:-configure}:10565: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10566
10567          CFLAGS="$cf_trim_CFLAGS"
10568          CPPFLAGS="$cf_trim_CPPFLAGS"
10569
10570         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10571         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10572
10573 echo "${as_me:-configure}:10573: testing if the second compile does not leave our definition intact error ..." 1>&5
10574
10575          cat >"conftest.$ac_ext" <<_ACEOF
10576 #line 10576 "configure"
10577 #include "confdefs.h"
10578 #include <sys/types.h>
10579 int
10580 main (void)
10581 {
10582
10583 #ifndef _POSIX_C_SOURCE
10584 make an error
10585 #endif
10586   ;
10587   return 0;
10588 }
10589 _ACEOF
10590 rm -f "conftest.$ac_objext"
10591 if { (eval echo "$as_me:10591: \"$ac_compile\"") >&5
10592   (eval $ac_compile) 2>&5
10593   ac_status=$?
10594   echo "$as_me:10594: \$? = $ac_status" >&5
10595   (exit "$ac_status"); } &&
10596          { ac_try='test -s "conftest.$ac_objext"'
10597   { (eval echo "$as_me:10597: \"$ac_try\"") >&5
10598   (eval $ac_try) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit "$ac_status"); }; }; then
10602   :
10603 else
10604   echo "$as_me: failed program was:" >&5
10605 cat "conftest.$ac_ext" >&5
10606 cf_cv_posix_c_source=no
10607 fi
10608 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10609          CFLAGS="$cf_save_CFLAGS"
10610          CPPFLAGS="$cf_save_CPPFLAGS"
10611
10612 fi
10613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10614
10615 fi
10616 echo "$as_me:10616: result: $cf_cv_posix_c_source" >&5
10617 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10618
10619 if test "$cf_cv_posix_c_source" != no ; then
10620         CFLAGS="$cf_trim_CFLAGS"
10621         CPPFLAGS="$cf_trim_CPPFLAGS"
10622
10623 cf_fix_cppflags=no
10624 cf_new_cflags=
10625 cf_new_cppflags=
10626 cf_new_extra_cppflags=
10627
10628 for cf_add_cflags in $cf_cv_posix_c_source
10629 do
10630 case "$cf_fix_cppflags" in
10631 (no)
10632         case "$cf_add_cflags" in
10633         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10634                 case "$cf_add_cflags" in
10635                 (-D*)
10636                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10637
10638                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10639                                 && test -z "${cf_tst_cflags}" \
10640                                 && cf_fix_cppflags=yes
10641
10642                         if test "$cf_fix_cppflags" = yes ; then
10643
10644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10646
10647                                 continue
10648                         elif test "${cf_tst_cflags}" = "\"'" ; then
10649
10650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10652
10653                                 continue
10654                         fi
10655                         ;;
10656                 esac
10657                 case "$CPPFLAGS" in
10658                 (*$cf_add_cflags)
10659                         ;;
10660                 (*)
10661                         case "$cf_add_cflags" in
10662                         (-D*)
10663                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10664
10665 CPPFLAGS=`echo "$CPPFLAGS" | \
10666         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10667                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10668
10669                                 ;;
10670                         esac
10671
10672         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10673         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10674
10675                         ;;
10676                 esac
10677                 ;;
10678         (*)
10679
10680         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10681         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10682
10683                 ;;
10684         esac
10685         ;;
10686 (yes)
10687
10688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10690
10691         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10692
10693         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10694                 && test -z "${cf_tst_cflags}" \
10695                 && cf_fix_cppflags=no
10696         ;;
10697 esac
10698 done
10699
10700 if test -n "$cf_new_cflags" ; then
10701
10702         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10703         CFLAGS="${CFLAGS}$cf_new_cflags"
10704
10705 fi
10706
10707 if test -n "$cf_new_cppflags" ; then
10708
10709         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10710         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10711
10712 fi
10713
10714 if test -n "$cf_new_extra_cppflags" ; then
10715
10716         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10717         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10718
10719 fi
10720
10721 fi
10722
10723 fi # cf_cv_posix_visible
10724
10725         ;;
10726 (netbsd*)
10727         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10728         ;;
10729 (openbsd[6-9]*)
10730         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10731         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10732         # Abusing the conformance level is a workaround.
10733         { echo "$as_me:10733: WARNING: this system does not provide usable locale support" >&5
10734 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10735         cf_xopen_source="-D_BSD_SOURCE"
10736         cf_XOPEN_SOURCE=700
10737         ;;
10738 (openbsd[4-5]*)
10739         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10740         cf_xopen_source="-D_BSD_SOURCE"
10741         cf_XOPEN_SOURCE=600
10742         ;;
10743 (openbsd*)
10744         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10745         ;;
10746 (osf[45]*)
10747         cf_xopen_source="-D_OSF_SOURCE"
10748         ;;
10749 (nto-qnx*)
10750         cf_xopen_source="-D_QNX_SOURCE"
10751         ;;
10752 (sco*)
10753         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10754         ;;
10755 (solaris2.*)
10756         cf_xopen_source="-D__EXTENSIONS__"
10757         cf_cv_xopen_source=broken
10758         ;;
10759 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10760         cf_XOPEN_SOURCE=
10761         cf_POSIX_C_SOURCE=
10762         ;;
10763 (*)
10764
10765 echo "$as_me:10765: checking if we should define _XOPEN_SOURCE" >&5
10766 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10767 if test "${cf_cv_xopen_source+set}" = set; then
10768   echo $ECHO_N "(cached) $ECHO_C" >&6
10769 else
10770
10771         cat >"conftest.$ac_ext" <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774
10775 #include <stdlib.h>
10776 #include <string.h>
10777 #include <sys/types.h>
10778
10779 int
10780 main (void)
10781 {
10782
10783 #ifndef _XOPEN_SOURCE
10784 make an error
10785 #endif
10786
10787   ;
10788   return 0;
10789 }
10790 _ACEOF
10791 rm -f "conftest.$ac_objext"
10792 if { (eval echo "$as_me:10792: \"$ac_compile\"") >&5
10793   (eval $ac_compile) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit "$ac_status"); } &&
10797          { ac_try='test -s "conftest.$ac_objext"'
10798   { (eval echo "$as_me:10798: \"$ac_try\"") >&5
10799   (eval $ac_try) 2>&5
10800   ac_status=$?
10801   echo "$as_me:10801: \$? = $ac_status" >&5
10802   (exit "$ac_status"); }; }; then
10803   cf_cv_xopen_source=no
10804 else
10805   echo "$as_me: failed program was:" >&5
10806 cat "conftest.$ac_ext" >&5
10807 cf_save="$CPPFLAGS"
10808
10809         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10810         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10811
10812          cat >"conftest.$ac_ext" <<_ACEOF
10813 #line 10813 "configure"
10814 #include "confdefs.h"
10815
10816 #include <stdlib.h>
10817 #include <string.h>
10818 #include <sys/types.h>
10819
10820 int
10821 main (void)
10822 {
10823
10824 #ifndef _XOPEN_SOURCE
10825 make an error
10826 #endif
10827
10828   ;
10829   return 0;
10830 }
10831 _ACEOF
10832 rm -f "conftest.$ac_objext"
10833 if { (eval echo "$as_me:10833: \"$ac_compile\"") >&5
10834   (eval $ac_compile) 2>&5
10835   ac_status=$?
10836   echo "$as_me:10836: \$? = $ac_status" >&5
10837   (exit "$ac_status"); } &&
10838          { ac_try='test -s "conftest.$ac_objext"'
10839   { (eval echo "$as_me:10839: \"$ac_try\"") >&5
10840   (eval $ac_try) 2>&5
10841   ac_status=$?
10842   echo "$as_me:10842: \$? = $ac_status" >&5
10843   (exit "$ac_status"); }; }; then
10844   cf_cv_xopen_source=no
10845 else
10846   echo "$as_me: failed program was:" >&5
10847 cat "conftest.$ac_ext" >&5
10848 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10849 fi
10850 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10851                 CPPFLAGS="$cf_save"
10852
10853 fi
10854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10855
10856 fi
10857 echo "$as_me:10857: result: $cf_cv_xopen_source" >&5
10858 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10859
10860 if test "$cf_cv_xopen_source" != no ; then
10861
10862 CFLAGS=`echo "$CFLAGS" | \
10863         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10864                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10865
10866 CPPFLAGS=`echo "$CPPFLAGS" | \
10867         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10868                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10869
10870         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10871
10872 for cf_add_cflags in $cf_temp_xopen_source
10873 do
10874         case "x$cf_add_cflags" in
10875         (x-[DU]*)
10876
10877 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10878 while true
10879 do
10880         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10881         test "$CFLAGS" != "$cf_old_cflag" || break
10882
10883         CFLAGS="$cf_old_cflag"
10884 done
10885
10886 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10887 while true
10888 do
10889         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10890         test "$CPPFLAGS" != "$cf_old_cflag" || break
10891
10892         CPPFLAGS="$cf_old_cflag"
10893 done
10894
10895                 ;;
10896         esac
10897
10898 cf_fix_cppflags=no
10899 cf_new_cflags=
10900 cf_new_cppflags=
10901 cf_new_extra_cppflags=
10902
10903 for cf_add_cflags in $cf_add_cflags
10904 do
10905 case "$cf_fix_cppflags" in
10906 (no)
10907         case "$cf_add_cflags" in
10908         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10909                 case "$cf_add_cflags" in
10910                 (-D*)
10911                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10912
10913                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10914                                 && test -z "${cf_tst_cflags}" \
10915                                 && cf_fix_cppflags=yes
10916
10917                         if test "$cf_fix_cppflags" = yes ; then
10918
10919         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10920         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10921
10922                                 continue
10923                         elif test "${cf_tst_cflags}" = "\"'" ; then
10924
10925         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10926         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10927
10928                                 continue
10929                         fi
10930                         ;;
10931                 esac
10932                 case "$CPPFLAGS" in
10933                 (*$cf_add_cflags)
10934                         ;;
10935                 (*)
10936                         case "$cf_add_cflags" in
10937                         (-D*)
10938                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10939
10940 CPPFLAGS=`echo "$CPPFLAGS" | \
10941         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10942                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10943
10944                                 ;;
10945                         esac
10946
10947         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10948         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10949
10950                         ;;
10951                 esac
10952                 ;;
10953         (*)
10954
10955         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10956         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10957
10958                 ;;
10959         esac
10960         ;;
10961 (yes)
10962
10963         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10964         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10965
10966         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10967
10968         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10969                 && test -z "${cf_tst_cflags}" \
10970                 && cf_fix_cppflags=no
10971         ;;
10972 esac
10973 done
10974
10975 if test -n "$cf_new_cflags" ; then
10976
10977         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10978         CFLAGS="${CFLAGS}$cf_new_cflags"
10979
10980 fi
10981
10982 if test -n "$cf_new_cppflags" ; then
10983
10984         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10985         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10986
10987 fi
10988
10989 if test -n "$cf_new_extra_cppflags" ; then
10990
10991         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10992         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10993
10994 fi
10995
10996 done
10997
10998 fi
10999
11000         cf_save_xopen_cppflags="$CPPFLAGS"
11001
11002 if test "$cf_cv_posix_visible" = no; then
11003
11004 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11005
11006 cf_save_CFLAGS="$CFLAGS"
11007 cf_save_CPPFLAGS="$CPPFLAGS"
11008
11009 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11010         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11011                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11012
11013 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11014         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11015                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11016
11017 echo "$as_me:11017: checking if we should define _POSIX_C_SOURCE" >&5
11018 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11019 if test "${cf_cv_posix_c_source+set}" = set; then
11020   echo $ECHO_N "(cached) $ECHO_C" >&6
11021 else
11022
11023 echo "${as_me:-configure}:11023: testing if the symbol is already defined go no further ..." 1>&5
11024
11025         cat >"conftest.$ac_ext" <<_ACEOF
11026 #line 11026 "configure"
11027 #include "confdefs.h"
11028 #include <sys/types.h>
11029 int
11030 main (void)
11031 {
11032
11033 #ifndef _POSIX_C_SOURCE
11034 make an error
11035 #endif
11036   ;
11037   return 0;
11038 }
11039 _ACEOF
11040 rm -f "conftest.$ac_objext"
11041 if { (eval echo "$as_me:11041: \"$ac_compile\"") >&5
11042   (eval $ac_compile) 2>&5
11043   ac_status=$?
11044   echo "$as_me:11044: \$? = $ac_status" >&5
11045   (exit "$ac_status"); } &&
11046          { ac_try='test -s "conftest.$ac_objext"'
11047   { (eval echo "$as_me:11047: \"$ac_try\"") >&5
11048   (eval $ac_try) 2>&5
11049   ac_status=$?
11050   echo "$as_me:11050: \$? = $ac_status" >&5
11051   (exit "$ac_status"); }; }; then
11052   cf_cv_posix_c_source=no
11053 else
11054   echo "$as_me: failed program was:" >&5
11055 cat "conftest.$ac_ext" >&5
11056 cf_want_posix_source=no
11057          case .$cf_POSIX_C_SOURCE in
11058          (.[12]??*)
11059                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11060                 ;;
11061          (.2)
11062                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11063                 cf_want_posix_source=yes
11064                 ;;
11065          (.*)
11066                 cf_want_posix_source=yes
11067                 ;;
11068          esac
11069          if test "$cf_want_posix_source" = yes ; then
11070                 cat >"conftest.$ac_ext" <<_ACEOF
11071 #line 11071 "configure"
11072 #include "confdefs.h"
11073 #include <sys/types.h>
11074 int
11075 main (void)
11076 {
11077
11078 #ifdef _POSIX_SOURCE
11079 make an error
11080 #endif
11081   ;
11082   return 0;
11083 }
11084 _ACEOF
11085 rm -f "conftest.$ac_objext"
11086 if { (eval echo "$as_me:11086: \"$ac_compile\"") >&5
11087   (eval $ac_compile) 2>&5
11088   ac_status=$?
11089   echo "$as_me:11089: \$? = $ac_status" >&5
11090   (exit "$ac_status"); } &&
11091          { ac_try='test -s "conftest.$ac_objext"'
11092   { (eval echo "$as_me:11092: \"$ac_try\"") >&5
11093   (eval $ac_try) 2>&5
11094   ac_status=$?
11095   echo "$as_me:11095: \$? = $ac_status" >&5
11096   (exit "$ac_status"); }; }; then
11097   :
11098 else
11099   echo "$as_me: failed program was:" >&5
11100 cat "conftest.$ac_ext" >&5
11101 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11102 fi
11103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11104          fi
11105
11106 echo "${as_me:-configure}:11106: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11107
11108          CFLAGS="$cf_trim_CFLAGS"
11109          CPPFLAGS="$cf_trim_CPPFLAGS"
11110
11111         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11112         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11113
11114 echo "${as_me:-configure}:11114: testing if the second compile does not leave our definition intact error ..." 1>&5
11115
11116          cat >"conftest.$ac_ext" <<_ACEOF
11117 #line 11117 "configure"
11118 #include "confdefs.h"
11119 #include <sys/types.h>
11120 int
11121 main (void)
11122 {
11123
11124 #ifndef _POSIX_C_SOURCE
11125 make an error
11126 #endif
11127   ;
11128   return 0;
11129 }
11130 _ACEOF
11131 rm -f "conftest.$ac_objext"
11132 if { (eval echo "$as_me:11132: \"$ac_compile\"") >&5
11133   (eval $ac_compile) 2>&5
11134   ac_status=$?
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit "$ac_status"); } &&
11137          { ac_try='test -s "conftest.$ac_objext"'
11138   { (eval echo "$as_me:11138: \"$ac_try\"") >&5
11139   (eval $ac_try) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit "$ac_status"); }; }; then
11143   :
11144 else
11145   echo "$as_me: failed program was:" >&5
11146 cat "conftest.$ac_ext" >&5
11147 cf_cv_posix_c_source=no
11148 fi
11149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11150          CFLAGS="$cf_save_CFLAGS"
11151          CPPFLAGS="$cf_save_CPPFLAGS"
11152
11153 fi
11154 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11155
11156 fi
11157 echo "$as_me:11157: result: $cf_cv_posix_c_source" >&5
11158 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11159
11160 if test "$cf_cv_posix_c_source" != no ; then
11161         CFLAGS="$cf_trim_CFLAGS"
11162         CPPFLAGS="$cf_trim_CPPFLAGS"
11163
11164 cf_fix_cppflags=no
11165 cf_new_cflags=
11166 cf_new_cppflags=
11167 cf_new_extra_cppflags=
11168
11169 for cf_add_cflags in $cf_cv_posix_c_source
11170 do
11171 case "$cf_fix_cppflags" in
11172 (no)
11173         case "$cf_add_cflags" in
11174         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11175                 case "$cf_add_cflags" in
11176                 (-D*)
11177                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11178
11179                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11180                                 && test -z "${cf_tst_cflags}" \
11181                                 && cf_fix_cppflags=yes
11182
11183                         if test "$cf_fix_cppflags" = yes ; then
11184
11185         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11186         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11187
11188                                 continue
11189                         elif test "${cf_tst_cflags}" = "\"'" ; then
11190
11191         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11192         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11193
11194                                 continue
11195                         fi
11196                         ;;
11197                 esac
11198                 case "$CPPFLAGS" in
11199                 (*$cf_add_cflags)
11200                         ;;
11201                 (*)
11202                         case "$cf_add_cflags" in
11203                         (-D*)
11204                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11205
11206 CPPFLAGS=`echo "$CPPFLAGS" | \
11207         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11208                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11209
11210                                 ;;
11211                         esac
11212
11213         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11214         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11215
11216                         ;;
11217                 esac
11218                 ;;
11219         (*)
11220
11221         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11222         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11223
11224                 ;;
11225         esac
11226         ;;
11227 (yes)
11228
11229         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11230         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11231
11232         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11233
11234         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11235                 && test -z "${cf_tst_cflags}" \
11236                 && cf_fix_cppflags=no
11237         ;;
11238 esac
11239 done
11240
11241 if test -n "$cf_new_cflags" ; then
11242
11243         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11244         CFLAGS="${CFLAGS}$cf_new_cflags"
11245
11246 fi
11247
11248 if test -n "$cf_new_cppflags" ; then
11249
11250         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11251         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11252
11253 fi
11254
11255 if test -n "$cf_new_extra_cppflags" ; then
11256
11257         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11258         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11259
11260 fi
11261
11262 fi
11263
11264 fi # cf_cv_posix_visible
11265
11266         # Some of these niche implementations use copy/paste, double-check...
11267         test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE inteferes" 1>&6
11268
11269 echo "${as_me:-configure}:11269: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
11270
11271         cat >"conftest.$ac_ext" <<_ACEOF
11272 #line 11272 "configure"
11273 #include "confdefs.h"
11274
11275 #include <stdlib.h>
11276 #include <string.h>
11277 #include <sys/types.h>
11278
11279 int
11280 main (void)
11281 {
11282
11283 #ifndef _XOPEN_SOURCE
11284 make an error
11285 #endif
11286
11287   ;
11288   return 0;
11289 }
11290 _ACEOF
11291 rm -f "conftest.$ac_objext"
11292 if { (eval echo "$as_me:11292: \"$ac_compile\"") >&5
11293   (eval $ac_compile) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit "$ac_status"); } &&
11297          { ac_try='test -s "conftest.$ac_objext"'
11298   { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299   (eval $ac_try) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit "$ac_status"); }; }; then
11303   :
11304 else
11305   echo "$as_me: failed program was:" >&5
11306 cat "conftest.$ac_ext" >&5
11307
11308                 { echo "$as_me:11308: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11309 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11310                 CPPFLAGS="$cf_save_xopen_cppflags"
11311 fi
11312 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11313         ;;
11314 esac
11315
11316 if test -n "$cf_xopen_source" ; then
11317
11318 for cf_add_cflags in $cf_xopen_source
11319 do
11320         case "x$cf_add_cflags" in
11321         (x-[DU]*)
11322
11323 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11324 while true
11325 do
11326         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11327         test "$CFLAGS" != "$cf_old_cflag" || break
11328         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11329
11330 echo "${as_me:-configure}:11330: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11331
11332         CFLAGS="$cf_old_cflag"
11333 done
11334
11335 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11336 while true
11337 do
11338         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11339         test "$CPPFLAGS" != "$cf_old_cflag" || break
11340         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11341
11342 echo "${as_me:-configure}:11342: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11343
11344         CPPFLAGS="$cf_old_cflag"
11345 done
11346
11347                 ;;
11348         esac
11349
11350 cf_fix_cppflags=no
11351 cf_new_cflags=
11352 cf_new_cppflags=
11353 cf_new_extra_cppflags=
11354
11355 for cf_add_cflags in $cf_add_cflags
11356 do
11357 case "$cf_fix_cppflags" in
11358 (no)
11359         case "$cf_add_cflags" in
11360         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11361                 case "$cf_add_cflags" in
11362                 (-D*)
11363                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11364
11365                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11366                                 && test -z "${cf_tst_cflags}" \
11367                                 && cf_fix_cppflags=yes
11368
11369                         if test "$cf_fix_cppflags" = yes ; then
11370
11371         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11372         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11373
11374                                 continue
11375                         elif test "${cf_tst_cflags}" = "\"'" ; then
11376
11377         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11378         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11379
11380                                 continue
11381                         fi
11382                         ;;
11383                 esac
11384                 case "$CPPFLAGS" in
11385                 (*$cf_add_cflags)
11386                         ;;
11387                 (*)
11388                         case "$cf_add_cflags" in
11389                         (-D*)
11390                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11391
11392 CPPFLAGS=`echo "$CPPFLAGS" | \
11393         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11394                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11395
11396                                 ;;
11397                         esac
11398
11399         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11400         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11401
11402                         ;;
11403                 esac
11404                 ;;
11405         (*)
11406
11407         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11408         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11409
11410                 ;;
11411         esac
11412         ;;
11413 (yes)
11414
11415         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11416         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11417
11418         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11419
11420         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11421                 && test -z "${cf_tst_cflags}" \
11422                 && cf_fix_cppflags=no
11423         ;;
11424 esac
11425 done
11426
11427 if test -n "$cf_new_cflags" ; then
11428         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11429
11430 echo "${as_me:-configure}:11430: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11431
11432         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11433         CFLAGS="${CFLAGS}$cf_new_cflags"
11434
11435 fi
11436
11437 if test -n "$cf_new_cppflags" ; then
11438         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11439
11440 echo "${as_me:-configure}:11440: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11441
11442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11443         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11444
11445 fi
11446
11447 if test -n "$cf_new_extra_cppflags" ; then
11448         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11449
11450 echo "${as_me:-configure}:11450: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11451
11452         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11453         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11454
11455 fi
11456
11457 done
11458
11459 fi
11460
11461 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11462         echo "$as_me:11462: checking if _XOPEN_SOURCE really is set" >&5
11463 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11464         cat >"conftest.$ac_ext" <<_ACEOF
11465 #line 11465 "configure"
11466 #include "confdefs.h"
11467 #include <stdlib.h>
11468 int
11469 main (void)
11470 {
11471
11472 #ifndef _XOPEN_SOURCE
11473 make an error
11474 #endif
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 rm -f "conftest.$ac_objext"
11480 if { (eval echo "$as_me:11480: \"$ac_compile\"") >&5
11481   (eval $ac_compile) 2>&5
11482   ac_status=$?
11483   echo "$as_me:11483: \$? = $ac_status" >&5
11484   (exit "$ac_status"); } &&
11485          { ac_try='test -s "conftest.$ac_objext"'
11486   { (eval echo "$as_me:11486: \"$ac_try\"") >&5
11487   (eval $ac_try) 2>&5
11488   ac_status=$?
11489   echo "$as_me:11489: \$? = $ac_status" >&5
11490   (exit "$ac_status"); }; }; then
11491   cf_XOPEN_SOURCE_set=yes
11492 else
11493   echo "$as_me: failed program was:" >&5
11494 cat "conftest.$ac_ext" >&5
11495 cf_XOPEN_SOURCE_set=no
11496 fi
11497 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11498         echo "$as_me:11498: result: $cf_XOPEN_SOURCE_set" >&5
11499 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11500         if test "$cf_XOPEN_SOURCE_set" = yes
11501         then
11502                 cat >"conftest.$ac_ext" <<_ACEOF
11503 #line 11503 "configure"
11504 #include "confdefs.h"
11505 #include <stdlib.h>
11506 int
11507 main (void)
11508 {
11509
11510 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11511 make an error
11512 #endif
11513   ;
11514   return 0;
11515 }
11516 _ACEOF
11517 rm -f "conftest.$ac_objext"
11518 if { (eval echo "$as_me:11518: \"$ac_compile\"") >&5
11519   (eval $ac_compile) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit "$ac_status"); } &&
11523          { ac_try='test -s "conftest.$ac_objext"'
11524   { (eval echo "$as_me:11524: \"$ac_try\"") >&5
11525   (eval $ac_try) 2>&5
11526   ac_status=$?
11527   echo "$as_me:11527: \$? = $ac_status" >&5
11528   (exit "$ac_status"); }; }; then
11529   cf_XOPEN_SOURCE_set_ok=yes
11530 else
11531   echo "$as_me: failed program was:" >&5
11532 cat "conftest.$ac_ext" >&5
11533 cf_XOPEN_SOURCE_set_ok=no
11534 fi
11535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11536                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11537                 then
11538                         { echo "$as_me:11538: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11539 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11540                 fi
11541         else
11542
11543 echo "$as_me:11543: checking if we should define _XOPEN_SOURCE" >&5
11544 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11545 if test "${cf_cv_xopen_source+set}" = set; then
11546   echo $ECHO_N "(cached) $ECHO_C" >&6
11547 else
11548
11549         cat >"conftest.$ac_ext" <<_ACEOF
11550 #line 11550 "configure"
11551 #include "confdefs.h"
11552
11553 #include <stdlib.h>
11554 #include <string.h>
11555 #include <sys/types.h>
11556
11557 int
11558 main (void)
11559 {
11560
11561 #ifndef _XOPEN_SOURCE
11562 make an error
11563 #endif
11564
11565   ;
11566   return 0;
11567 }
11568 _ACEOF
11569 rm -f "conftest.$ac_objext"
11570 if { (eval echo "$as_me:11570: \"$ac_compile\"") >&5
11571   (eval $ac_compile) 2>&5
11572   ac_status=$?
11573   echo "$as_me:11573: \$? = $ac_status" >&5
11574   (exit "$ac_status"); } &&
11575          { ac_try='test -s "conftest.$ac_objext"'
11576   { (eval echo "$as_me:11576: \"$ac_try\"") >&5
11577   (eval $ac_try) 2>&5
11578   ac_status=$?
11579   echo "$as_me:11579: \$? = $ac_status" >&5
11580   (exit "$ac_status"); }; }; then
11581   cf_cv_xopen_source=no
11582 else
11583   echo "$as_me: failed program was:" >&5
11584 cat "conftest.$ac_ext" >&5
11585 cf_save="$CPPFLAGS"
11586
11587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11588         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11589
11590          cat >"conftest.$ac_ext" <<_ACEOF
11591 #line 11591 "configure"
11592 #include "confdefs.h"
11593
11594 #include <stdlib.h>
11595 #include <string.h>
11596 #include <sys/types.h>
11597
11598 int
11599 main (void)
11600 {
11601
11602 #ifndef _XOPEN_SOURCE
11603 make an error
11604 #endif
11605
11606   ;
11607   return 0;
11608 }
11609 _ACEOF
11610 rm -f "conftest.$ac_objext"
11611 if { (eval echo "$as_me:11611: \"$ac_compile\"") >&5
11612   (eval $ac_compile) 2>&5
11613   ac_status=$?
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit "$ac_status"); } &&
11616          { ac_try='test -s "conftest.$ac_objext"'
11617   { (eval echo "$as_me:11617: \"$ac_try\"") >&5
11618   (eval $ac_try) 2>&5
11619   ac_status=$?
11620   echo "$as_me:11620: \$? = $ac_status" >&5
11621   (exit "$ac_status"); }; }; then
11622   cf_cv_xopen_source=no
11623 else
11624   echo "$as_me: failed program was:" >&5
11625 cat "conftest.$ac_ext" >&5
11626 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11627 fi
11628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11629                 CPPFLAGS="$cf_save"
11630
11631 fi
11632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11633
11634 fi
11635 echo "$as_me:11635: result: $cf_cv_xopen_source" >&5
11636 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11637
11638 if test "$cf_cv_xopen_source" != no ; then
11639
11640 CFLAGS=`echo "$CFLAGS" | \
11641         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11642                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11643
11644 CPPFLAGS=`echo "$CPPFLAGS" | \
11645         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11646                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11647
11648         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11649
11650 for cf_add_cflags in $cf_temp_xopen_source
11651 do
11652         case "x$cf_add_cflags" in
11653         (x-[DU]*)
11654
11655 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11656 while true
11657 do
11658         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11659         test "$CFLAGS" != "$cf_old_cflag" || break
11660
11661         CFLAGS="$cf_old_cflag"
11662 done
11663
11664 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11665 while true
11666 do
11667         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11668         test "$CPPFLAGS" != "$cf_old_cflag" || break
11669
11670         CPPFLAGS="$cf_old_cflag"
11671 done
11672
11673                 ;;
11674         esac
11675
11676 cf_fix_cppflags=no
11677 cf_new_cflags=
11678 cf_new_cppflags=
11679 cf_new_extra_cppflags=
11680
11681 for cf_add_cflags in $cf_add_cflags
11682 do
11683 case "$cf_fix_cppflags" in
11684 (no)
11685         case "$cf_add_cflags" in
11686         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11687                 case "$cf_add_cflags" in
11688                 (-D*)
11689                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11690
11691                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11692                                 && test -z "${cf_tst_cflags}" \
11693                                 && cf_fix_cppflags=yes
11694
11695                         if test "$cf_fix_cppflags" = yes ; then
11696
11697         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11698         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11699
11700                                 continue
11701                         elif test "${cf_tst_cflags}" = "\"'" ; then
11702
11703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11705
11706                                 continue
11707                         fi
11708                         ;;
11709                 esac
11710                 case "$CPPFLAGS" in
11711                 (*$cf_add_cflags)
11712                         ;;
11713                 (*)
11714                         case "$cf_add_cflags" in
11715                         (-D*)
11716                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11717
11718 CPPFLAGS=`echo "$CPPFLAGS" | \
11719         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11720                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11721
11722                                 ;;
11723                         esac
11724
11725         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11726         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11727
11728                         ;;
11729                 esac
11730                 ;;
11731         (*)
11732
11733         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11734         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11735
11736                 ;;
11737         esac
11738         ;;
11739 (yes)
11740
11741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11743
11744         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11745
11746         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11747                 && test -z "${cf_tst_cflags}" \
11748                 && cf_fix_cppflags=no
11749         ;;
11750 esac
11751 done
11752
11753 if test -n "$cf_new_cflags" ; then
11754
11755         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11756         CFLAGS="${CFLAGS}$cf_new_cflags"
11757
11758 fi
11759
11760 if test -n "$cf_new_cppflags" ; then
11761
11762         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11763         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11764
11765 fi
11766
11767 if test -n "$cf_new_extra_cppflags" ; then
11768
11769         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11770         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11771
11772 fi
11773
11774 done
11775
11776 fi
11777
11778         fi
11779 fi
11780 fi # cf_cv_posix_visible
11781
11782 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11783
11784 # Work around breakage on OS X
11785
11786 echo "$as_me:11786: checking if SIGWINCH is defined" >&5
11787 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11788 if test "${cf_cv_define_sigwinch+set}" = set; then
11789   echo $ECHO_N "(cached) $ECHO_C" >&6
11790 else
11791
11792         cat >"conftest.$ac_ext" <<_ACEOF
11793 #line 11793 "configure"
11794 #include "confdefs.h"
11795
11796 #include <sys/types.h>
11797 #include <sys/signal.h>
11798
11799 int
11800 main (void)
11801 {
11802 int x = SIGWINCH; (void)x
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f "conftest.$ac_objext"
11808 if { (eval echo "$as_me:11808: \"$ac_compile\"") >&5
11809   (eval $ac_compile) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit "$ac_status"); } &&
11813          { ac_try='test -s "conftest.$ac_objext"'
11814   { (eval echo "$as_me:11814: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit "$ac_status"); }; }; then
11819   cf_cv_define_sigwinch=yes
11820 else
11821   echo "$as_me: failed program was:" >&5
11822 cat "conftest.$ac_ext" >&5
11823 cat >"conftest.$ac_ext" <<_ACEOF
11824 #line 11824 "configure"
11825 #include "confdefs.h"
11826
11827 #undef _XOPEN_SOURCE
11828 #undef _POSIX_SOURCE
11829 #undef _POSIX_C_SOURCE
11830 #include <sys/types.h>
11831 #include <sys/signal.h>
11832
11833 int
11834 main (void)
11835 {
11836 int x = SIGWINCH; (void)x
11837   ;
11838   return 0;
11839 }
11840 _ACEOF
11841 rm -f "conftest.$ac_objext"
11842 if { (eval echo "$as_me:11842: \"$ac_compile\"") >&5
11843   (eval $ac_compile) 2>&5
11844   ac_status=$?
11845   echo "$as_me:11845: \$? = $ac_status" >&5
11846   (exit "$ac_status"); } &&
11847          { ac_try='test -s "conftest.$ac_objext"'
11848   { (eval echo "$as_me:11848: \"$ac_try\"") >&5
11849   (eval $ac_try) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit "$ac_status"); }; }; then
11853   cf_cv_define_sigwinch=maybe
11854 else
11855   echo "$as_me: failed program was:" >&5
11856 cat "conftest.$ac_ext" >&5
11857 cf_cv_define_sigwinch=no
11858 fi
11859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11860
11861 fi
11862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11863
11864 fi
11865 echo "$as_me:11865: result: $cf_cv_define_sigwinch" >&5
11866 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11867
11868 if test "$cf_cv_define_sigwinch" = maybe ; then
11869 echo "$as_me:11869: checking for actual SIGWINCH definition" >&5
11870 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11871 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11872   echo $ECHO_N "(cached) $ECHO_C" >&6
11873 else
11874
11875 cf_cv_fixup_sigwinch=unknown
11876 cf_sigwinch=32
11877 while test "$cf_sigwinch" != 1
11878 do
11879         cat >"conftest.$ac_ext" <<_ACEOF
11880 #line 11880 "configure"
11881 #include "confdefs.h"
11882
11883 #undef _XOPEN_SOURCE
11884 #undef _POSIX_SOURCE
11885 #undef _POSIX_C_SOURCE
11886 #include <sys/types.h>
11887 #include <sys/signal.h>
11888
11889 int
11890 main (void)
11891 {
11892
11893 #if SIGWINCH != $cf_sigwinch
11894 make an error
11895 #endif
11896 int x = SIGWINCH; (void)x
11897   ;
11898   return 0;
11899 }
11900 _ACEOF
11901 rm -f "conftest.$ac_objext"
11902 if { (eval echo "$as_me:11902: \"$ac_compile\"") >&5
11903   (eval $ac_compile) 2>&5
11904   ac_status=$?
11905   echo "$as_me:11905: \$? = $ac_status" >&5
11906   (exit "$ac_status"); } &&
11907          { ac_try='test -s "conftest.$ac_objext"'
11908   { (eval echo "$as_me:11908: \"$ac_try\"") >&5
11909   (eval $ac_try) 2>&5
11910   ac_status=$?
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit "$ac_status"); }; }; then
11913   cf_cv_fixup_sigwinch=$cf_sigwinch
11914          break
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 cat "conftest.$ac_ext" >&5
11918 fi
11919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11920
11921 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11922 done
11923
11924 fi
11925 echo "$as_me:11925: result: $cf_cv_fixup_sigwinch" >&5
11926 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11927
11928         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11929                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11930         fi
11931 fi
11932
11933 # Checks for CODESET support.
11934
11935 echo "$as_me:11935: checking for nl_langinfo and CODESET" >&5
11936 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11937 if test "${am_cv_langinfo_codeset+set}" = set; then
11938   echo $ECHO_N "(cached) $ECHO_C" >&6
11939 else
11940   cat >"conftest.$ac_ext" <<_ACEOF
11941 #line 11941 "configure"
11942 #include "confdefs.h"
11943 #include <langinfo.h>
11944 int
11945 main (void)
11946 {
11947 char* cs = nl_langinfo(CODESET); (void)cs
11948   ;
11949   return 0;
11950 }
11951 _ACEOF
11952 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11953 if { (eval echo "$as_me:11953: \"$ac_link\"") >&5
11954   (eval $ac_link) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit "$ac_status"); } &&
11958          { ac_try='test -s "conftest$ac_exeext"'
11959   { (eval echo "$as_me:11959: \"$ac_try\"") >&5
11960   (eval $ac_try) 2>&5
11961   ac_status=$?
11962   echo "$as_me:11962: \$? = $ac_status" >&5
11963   (exit "$ac_status"); }; }; then
11964   am_cv_langinfo_codeset=yes
11965 else
11966   echo "$as_me: failed program was:" >&5
11967 cat "conftest.$ac_ext" >&5
11968 am_cv_langinfo_codeset=no
11969 fi
11970 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11971
11972 fi
11973 echo "$as_me:11973: result: $am_cv_langinfo_codeset" >&5
11974 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11975         if test "$am_cv_langinfo_codeset" = yes; then
11976
11977 cat >>confdefs.h <<\EOF
11978 #define HAVE_LANGINFO_CODESET 1
11979 EOF
11980
11981         fi
11982
11983 # use these variables to work around a defect in gcc's fixincludes.
11984 NCURSES_OK_WCHAR_T=
11985 NCURSES_OK_WINT_T=
11986
11987 echo "$as_me:11987: checking if you want wide-character code" >&5
11988 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11989
11990 # Check whether --enable-widec or --disable-widec was given.
11991 if test "${enable_widec+set}" = set; then
11992   enableval="$enable_widec"
11993   with_widec=$enableval
11994 else
11995   with_widec=no
11996 fi;
11997 echo "$as_me:11997: result: $with_widec" >&5
11998 echo "${ECHO_T}$with_widec" >&6
11999
12000 NCURSES_WCWIDTH_GRAPHICS=1
12001
12002 if test "x$with_widec" = xyes ; then
12003         if test "x$disable_lib_suffixes" = xno ; then
12004                 LIB_SUFFIX="w${LIB_SUFFIX}"
12005         fi
12006
12007 cat >>confdefs.h <<\EOF
12008 #define USE_WIDEC_SUPPORT 1
12009 EOF
12010
12011 cat >>confdefs.h <<\EOF
12012 #define NCURSES_WIDECHAR 1
12013 EOF
12014
12015         case "$CPPFLAGS" in
12016         (*_XOPEN_SOURCE=*)
12017                 ;;
12018         (*)
12019                 { echo "$as_me:12019: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12020 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12021                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12022                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12023                 ;;
12024         esac
12025
12026 for ac_header in \
12027 wchar.h \
12028 wctype.h \
12029
12030 do
12031 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12032 echo "$as_me:12032: checking for $ac_header" >&5
12033 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12034 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12035   echo $ECHO_N "(cached) $ECHO_C" >&6
12036 else
12037   cat >"conftest.$ac_ext" <<_ACEOF
12038 #line 12038 "configure"
12039 #include "confdefs.h"
12040 #include <$ac_header>
12041 _ACEOF
12042 if { (eval echo "$as_me:12042: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12043   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12044   ac_status=$?
12045   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12046   rm -f conftest.er1
12047   cat conftest.err >&5
12048   echo "$as_me:12048: \$? = $ac_status" >&5
12049   (exit "$ac_status"); } >/dev/null; then
12050   if test -s conftest.err; then
12051     ac_cpp_err=$ac_c_preproc_warn_flag
12052   else
12053     ac_cpp_err=
12054   fi
12055 else
12056   ac_cpp_err=yes
12057 fi
12058 if test -z "$ac_cpp_err"; then
12059   eval "$as_ac_Header=yes"
12060 else
12061   echo "$as_me: failed program was:" >&5
12062   cat "conftest.$ac_ext" >&5
12063   eval "$as_ac_Header=no"
12064 fi
12065 rm -f conftest.err "conftest.$ac_ext"
12066 fi
12067 echo "$as_me:12067: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12068 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12069 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12070   cat >>confdefs.h <<EOF
12071 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12072 EOF
12073
12074 fi
12075 done
12076
12077 echo "$as_me:12077: checking if wchar.h can be used as is" >&5
12078 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12079 if test "${cf_cv_wchar_h_okay+set}" = set; then
12080   echo $ECHO_N "(cached) $ECHO_C" >&6
12081 else
12082
12083 cat >"conftest.$ac_ext" <<_ACEOF
12084 #line 12084 "configure"
12085 #include "confdefs.h"
12086
12087 #include <stdlib.h>
12088 #ifdef HAVE_WCHAR_H
12089 #include <wchar.h>
12090 #endif
12091 #ifdef HAVE_WCTYPE_H
12092 #include <wctype.h>
12093 #endif
12094
12095 int
12096 main (void)
12097 {
12098
12099         wint_t foo = 0;
12100         int bar = iswpunct(foo)
12101   ;
12102   return 0;
12103 }
12104 _ACEOF
12105 rm -f "conftest.$ac_objext"
12106 if { (eval echo "$as_me:12106: \"$ac_compile\"") >&5
12107   (eval $ac_compile) 2>&5
12108   ac_status=$?
12109   echo "$as_me:12109: \$? = $ac_status" >&5
12110   (exit "$ac_status"); } &&
12111          { ac_try='test -s "conftest.$ac_objext"'
12112   { (eval echo "$as_me:12112: \"$ac_try\"") >&5
12113   (eval $ac_try) 2>&5
12114   ac_status=$?
12115   echo "$as_me:12115: \$? = $ac_status" >&5
12116   (exit "$ac_status"); }; }; then
12117   cf_cv_wchar_h_okay=yes
12118 else
12119   echo "$as_me: failed program was:" >&5
12120 cat "conftest.$ac_ext" >&5
12121 cf_cv_wchar_h_okay=no
12122 fi
12123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12124 fi
12125 echo "$as_me:12125: result: $cf_cv_wchar_h_okay" >&5
12126 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12127
12128 if test "$cf_cv_wchar_h_okay" = no
12129 then
12130
12131 echo "$as_me:12131: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12132 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12133 cat >"conftest.$ac_ext" <<_ACEOF
12134 #line 12134 "configure"
12135 #include "confdefs.h"
12136 #include <sys/types.h>
12137
12138 int
12139 main (void)
12140 {
12141
12142 #ifndef _XOPEN_SOURCE_EXTENDED
12143 make an error
12144 #endif
12145   ;
12146   return 0;
12147 }
12148 _ACEOF
12149 rm -f "conftest.$ac_objext"
12150 if { (eval echo "$as_me:12150: \"$ac_compile\"") >&5
12151   (eval $ac_compile) 2>&5
12152   ac_status=$?
12153   echo "$as_me:12153: \$? = $ac_status" >&5
12154   (exit "$ac_status"); } &&
12155          { ac_try='test -s "conftest.$ac_objext"'
12156   { (eval echo "$as_me:12156: \"$ac_try\"") >&5
12157   (eval $ac_try) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit "$ac_status"); }; }; then
12161   cf_result=no
12162 else
12163   echo "$as_me: failed program was:" >&5
12164 cat "conftest.$ac_ext" >&5
12165 cf_result=yes
12166 fi
12167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12168 echo "$as_me:12168: result: $cf_result" >&5
12169 echo "${ECHO_T}$cf_result" >&6
12170
12171 if test "$cf_result" = yes ; then
12172         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12173 elif test "x" != "x" ; then
12174         echo "$as_me:12174: checking checking for compatible value versus " >&5
12175 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12176         cat >"conftest.$ac_ext" <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179 #include <sys/types.h>
12180
12181 int
12182 main (void)
12183 {
12184
12185 #if _XOPEN_SOURCE_EXTENDED- < 0
12186 make an error
12187 #endif
12188   ;
12189   return 0;
12190 }
12191 _ACEOF
12192 rm -f "conftest.$ac_objext"
12193 if { (eval echo "$as_me:12193: \"$ac_compile\"") >&5
12194   (eval $ac_compile) 2>&5
12195   ac_status=$?
12196   echo "$as_me:12196: \$? = $ac_status" >&5
12197   (exit "$ac_status"); } &&
12198          { ac_try='test -s "conftest.$ac_objext"'
12199   { (eval echo "$as_me:12199: \"$ac_try\"") >&5
12200   (eval $ac_try) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit "$ac_status"); }; }; then
12204   cf_result=yes
12205 else
12206   echo "$as_me: failed program was:" >&5
12207 cat "conftest.$ac_ext" >&5
12208 cf_result=no
12209 fi
12210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12211         echo "$as_me:12211: result: $cf_result" >&5
12212 echo "${ECHO_T}$cf_result" >&6
12213         if test "$cf_result" = no ; then
12214                 # perhaps we can override it - try...
12215                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12216         fi
12217 fi
12218
12219 fi
12220
12221 echo "$as_me:12221: checking if wcwidth agrees graphics are single-width" >&5
12222 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12223 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12224   echo $ECHO_N "(cached) $ECHO_C" >&6
12225 else
12226
12227 cat >conftest.in <<CF_EOF
12228 -       VT100 symbols
12229 0x250c  upper left corner
12230 0x2514  lower left corner
12231 0x2510  upper right corner
12232 0x2518  lower right corner
12233 0x251c  tee pointing left
12234 0x2524  tee pointing right
12235 0x2534  tee pointing up
12236 0x252c  tee pointing down
12237 0x2500  horizontal line
12238 0x2502  vertical line
12239 0x253c  large plus or crossover
12240 0x23ba  scan line 1
12241 0x23bd  scan line 9
12242 0x25c6  diamond
12243 0x2592  checker board (stipple)
12244 0x00b0  degree symbol
12245 0x00b1  plus/minus
12246 0x00b7  bullet
12247 -       Teletype 5410v1 symbols
12248 0x2190  arrow pointing left
12249 0x2192  arrow pointing right
12250 0x2193  arrow pointing down
12251 0x2191  arrow pointing up
12252 0x2592  board of squares
12253 0x2603  lantern symbol
12254 0x25ae  solid square block
12255 -       these defaults were invented for ncurses
12256 0x23bb  scan line 3
12257 0x23bc  scan line 7
12258 0x2264  less-than-or-equal-to
12259 0x2265  greater-than-or-equal-to
12260 0x03c0  greek pi
12261 0x2260  not-equal
12262 0x00a3  pound-sterling symbol
12263 -       thick-line-drawing
12264 0x250f  upper left corner
12265 0x2517  lower left corner
12266 0x2513  upper right corner
12267 0x251b  lower right corner
12268 0x2523  tee pointing left
12269 0x252b  tee pointing right
12270 0x253b  tee pointing up
12271 0x2533  tee pointing down
12272 0x2501  horizontal line
12273 0x2503  vertical line
12274 0x254b  large plus or crossover
12275 -       double-line-drawing
12276 0x2554  upper left corner
12277 0x255a  lower left corner
12278 0x2557  upper right corner
12279 0x255d  lower right corner
12280 0x2563  tee pointing left
12281 0x2560  tee pointing right
12282 0x2569  tee pointing up
12283 0x2566  tee pointing down
12284 0x2550  horizontal line
12285 0x2551  vertical line
12286 0x256c  large plus or crossover
12287 CF_EOF
12288 if test "$cross_compiling" = yes; then
12289   cf_cv_wcwidth_graphics=unknown
12290 else
12291   cat >"conftest.$ac_ext" <<_ACEOF
12292 #line 12292 "configure"
12293 #include "confdefs.h"
12294
12295 #include <locale.h>
12296 #include <stdio.h>
12297 #include <wchar.h>
12298
12299 #define MY_LEN 80
12300
12301 int
12302 main(void)
12303 {
12304         FILE *fp;
12305         int value;
12306         char buffer[MY_LEN + 1];
12307         char notes[MY_LEN + 1];
12308         int totals = 0;
12309         int passed = 0;
12310
12311         if (setlocale(LC_ALL, "en_US.UTF8") ||
12312                 setlocale(LC_ALL, "en_US.UTF-8") ||
12313                 setlocale(LC_ALL, "en_US.utf8") ||
12314                 setlocale(LC_ALL, "en_US.utf-8")) {
12315                 if ((fp = fopen("conftest.in", "r")) != 0) {
12316                         while (fgets(buffer, MY_LEN, fp) != 0) {
12317                                 if (*buffer == '-') {
12318                                         fprintf(stderr, "\\t%s", buffer);
12319                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12320                                         ++totals;
12321                                         if (wcwidth(value) == 1)
12322                                                 ++passed;
12323                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12324                                 } else {
12325                                         fprintf(stderr, "?\\t%s", buffer);
12326                                 }
12327                         }
12328                 }
12329         }
12330         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12331         return (totals == passed) ? 0 : 1;
12332 }
12333
12334 _ACEOF
12335 rm -f "conftest$ac_exeext"
12336 if { (eval echo "$as_me:12336: \"$ac_link\"") >&5
12337   (eval $ac_link) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12341   { (eval echo "$as_me:12341: \"$ac_try\"") >&5
12342   (eval $ac_try) 2>&5
12343   ac_status=$?
12344   echo "$as_me:12344: \$? = $ac_status" >&5
12345   (exit "$ac_status"); }; }; then
12346   cf_cv_wcwidth_graphics=yes
12347 else
12348   echo "$as_me: program exited with status $ac_status" >&5
12349 echo "$as_me: failed program was:" >&5
12350 cat "conftest.$ac_ext" >&5
12351 cf_cv_wcwidth_graphics=no
12352 fi
12353 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12354 fi
12355
12356 fi
12357 echo "$as_me:12357: result: $cf_cv_wcwidth_graphics" >&5
12358 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12359
12360         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12361
12362         # with_overwrite=no
12363         NCURSES_CH_T=cchar_t
12364
12365 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12366 do
12367 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12368 echo "$as_me:12368: checking for $ac_func" >&5
12369 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12370 if eval "test \"\${$as_ac_var+set}\" = set"; then
12371   echo $ECHO_N "(cached) $ECHO_C" >&6
12372 else
12373   cat >"conftest.$ac_ext" <<_ACEOF
12374 #line 12374 "configure"
12375 #include "confdefs.h"
12376 #define $ac_func autoconf_temporary
12377 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12378 #undef $ac_func
12379
12380 #ifdef __cplusplus
12381 extern "C"
12382 #endif
12383
12384 /* We use char because int might match the return type of a gcc2
12385    builtin and then its argument prototype would still apply.  */
12386 char $ac_func (void);
12387
12388 int
12389 main (void)
12390 {
12391
12392 /* The GNU C library defines stubs for functions which it implements
12393     to always fail with ENOSYS.  Some functions are actually named
12394     something starting with __ and the normal name is an alias.  */
12395 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12396 #error found stub for $ac_func
12397 #endif
12398
12399         return $ac_func ();
12400   ;
12401   return 0;
12402 }
12403 _ACEOF
12404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12405 if { (eval echo "$as_me:12405: \"$ac_link\"") >&5
12406   (eval $ac_link) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit "$ac_status"); } &&
12410          { ac_try='test -s "conftest$ac_exeext"'
12411   { (eval echo "$as_me:12411: \"$ac_try\"") >&5
12412   (eval $ac_try) 2>&5
12413   ac_status=$?
12414   echo "$as_me:12414: \$? = $ac_status" >&5
12415   (exit "$ac_status"); }; }; then
12416   eval "$as_ac_var=yes"
12417 else
12418   echo "$as_me: failed program was:" >&5
12419 cat "conftest.$ac_ext" >&5
12420 eval "$as_ac_var=no"
12421 fi
12422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12423 fi
12424 echo "$as_me:12424: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12425 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12426 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12427   cat >>confdefs.h <<EOF
12428 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12429 EOF
12430
12431 fi
12432 done
12433
12434         if test "x$ac_cv_func_putwc" != xyes ; then
12435
12436 for ac_header in wchar.h
12437 do
12438 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12439 echo "$as_me:12439: checking for $ac_header" >&5
12440 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12441 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12442   echo $ECHO_N "(cached) $ECHO_C" >&6
12443 else
12444   cat >"conftest.$ac_ext" <<_ACEOF
12445 #line 12445 "configure"
12446 #include "confdefs.h"
12447 #include <$ac_header>
12448 _ACEOF
12449 if { (eval echo "$as_me:12449: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12450   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12451   ac_status=$?
12452   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12453   rm -f conftest.er1
12454   cat conftest.err >&5
12455   echo "$as_me:12455: \$? = $ac_status" >&5
12456   (exit "$ac_status"); } >/dev/null; then
12457   if test -s conftest.err; then
12458     ac_cpp_err=$ac_c_preproc_warn_flag
12459   else
12460     ac_cpp_err=
12461   fi
12462 else
12463   ac_cpp_err=yes
12464 fi
12465 if test -z "$ac_cpp_err"; then
12466   eval "$as_ac_Header=yes"
12467 else
12468   echo "$as_me: failed program was:" >&5
12469   cat "conftest.$ac_ext" >&5
12470   eval "$as_ac_Header=no"
12471 fi
12472 rm -f conftest.err "conftest.$ac_ext"
12473 fi
12474 echo "$as_me:12474: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12475 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12476 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12477   cat >>confdefs.h <<EOF
12478 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12479 EOF
12480
12481 fi
12482 done
12483
12484 echo "$as_me:12484: checking for multibyte character support" >&5
12485 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12486 if test "${cf_cv_utf8_lib+set}" = set; then
12487   echo $ECHO_N "(cached) $ECHO_C" >&6
12488 else
12489
12490         cf_save_LIBS="$LIBS"
12491         cat >"conftest.$ac_ext" <<_ACEOF
12492 #line 12492 "configure"
12493 #include "confdefs.h"
12494
12495 #include <stdlib.h>
12496 #include <stdio.h>
12497 #ifdef HAVE_WCHAR_H
12498 #include <wchar.h>
12499 #endif
12500
12501 int
12502 main (void)
12503 {
12504 putwc(0,0);
12505   ;
12506   return 0;
12507 }
12508 _ACEOF
12509 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12510 if { (eval echo "$as_me:12510: \"$ac_link\"") >&5
12511   (eval $ac_link) 2>&5
12512   ac_status=$?
12513   echo "$as_me:12513: \$? = $ac_status" >&5
12514   (exit "$ac_status"); } &&
12515          { ac_try='test -s "conftest$ac_exeext"'
12516   { (eval echo "$as_me:12516: \"$ac_try\"") >&5
12517   (eval $ac_try) 2>&5
12518   ac_status=$?
12519   echo "$as_me:12519: \$? = $ac_status" >&5
12520   (exit "$ac_status"); }; }; then
12521   cf_cv_utf8_lib=yes
12522 else
12523   echo "$as_me: failed program was:" >&5
12524 cat "conftest.$ac_ext" >&5
12525
12526 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12527 # will be set on completion of the AC_TRY_LINK below.
12528 cf_cv_header_path_utf8=
12529 cf_cv_library_path_utf8=
12530
12531 echo "${as_me:-configure}:12531: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12532
12533 cf_save_LIBS="$LIBS"
12534
12535 cat >"conftest.$ac_ext" <<_ACEOF
12536 #line 12536 "configure"
12537 #include "confdefs.h"
12538
12539 #include <libutf8.h>
12540 int
12541 main (void)
12542 {
12543 putwc(0,0);
12544   ;
12545   return 0;
12546 }
12547 _ACEOF
12548 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12549 if { (eval echo "$as_me:12549: \"$ac_link\"") >&5
12550   (eval $ac_link) 2>&5
12551   ac_status=$?
12552   echo "$as_me:12552: \$? = $ac_status" >&5
12553   (exit "$ac_status"); } &&
12554          { ac_try='test -s "conftest$ac_exeext"'
12555   { (eval echo "$as_me:12555: \"$ac_try\"") >&5
12556   (eval $ac_try) 2>&5
12557   ac_status=$?
12558   echo "$as_me:12558: \$? = $ac_status" >&5
12559   (exit "$ac_status"); }; }; then
12560
12561         cf_cv_find_linkage_utf8=yes
12562         cf_cv_header_path_utf8=/usr/include
12563         cf_cv_library_path_utf8=/usr/lib
12564
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 cat "conftest.$ac_ext" >&5
12568
12569 LIBS="-lutf8  $cf_save_LIBS"
12570
12571 cat >"conftest.$ac_ext" <<_ACEOF
12572 #line 12572 "configure"
12573 #include "confdefs.h"
12574
12575 #include <libutf8.h>
12576 int
12577 main (void)
12578 {
12579 putwc(0,0);
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12585 if { (eval echo "$as_me:12585: \"$ac_link\"") >&5
12586   (eval $ac_link) 2>&5
12587   ac_status=$?
12588   echo "$as_me:12588: \$? = $ac_status" >&5
12589   (exit "$ac_status"); } &&
12590          { ac_try='test -s "conftest$ac_exeext"'
12591   { (eval echo "$as_me:12591: \"$ac_try\"") >&5
12592   (eval $ac_try) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit "$ac_status"); }; }; then
12596
12597         cf_cv_find_linkage_utf8=yes
12598         cf_cv_header_path_utf8=/usr/include
12599         cf_cv_library_path_utf8=/usr/lib
12600         cf_cv_library_file_utf8="-lutf8"
12601
12602 else
12603   echo "$as_me: failed program was:" >&5
12604 cat "conftest.$ac_ext" >&5
12605
12606         cf_cv_find_linkage_utf8=no
12607         LIBS="$cf_save_LIBS"
12608
12609         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12610
12611 echo "${as_me:-configure}:12611: testing find linkage for utf8 library ..." 1>&5
12612
12613 echo "${as_me:-configure}:12613: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12614
12615         cf_save_CPPFLAGS="$CPPFLAGS"
12616         cf_test_CPPFLAGS="$CPPFLAGS"
12617
12618 cf_search=
12619
12620 # collect the current set of include-directories from compiler flags
12621 cf_header_path_list=""
12622 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12623         for cf_header_path in $CPPFLAGS $CFLAGS
12624         do
12625                 case "$cf_header_path" in
12626                 (-I*)
12627                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12628
12629 test "x$cf_header_path" != "xNONE" && \
12630 test -d "$cf_header_path" && \
12631  {
12632         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12633         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12634         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12635         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12636         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12637         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12638 }
12639
12640                         cf_header_path_list="$cf_header_path_list $cf_search"
12641                         ;;
12642                 esac
12643         done
12644 fi
12645
12646 # add the variations for the package we are looking for
12647
12648 cf_search=
12649
12650 test "x$prefix" != "xNONE" && \
12651 test -d "$prefix" && \
12652  {
12653         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12654         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12655         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12656         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12657         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12658         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12659 }
12660
12661 for cf_subdir_prefix in \
12662         /usr \
12663         /usr/local \
12664         /usr/pkg \
12665         /opt \
12666         /opt/local \
12667         $HOME
12668 do
12669
12670 test "x$cf_subdir_prefix" != "x$prefix" && \
12671 test -d "$cf_subdir_prefix" && \
12672 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12673         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12674         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12675         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12676         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12677         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12678         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12679 }
12680
12681 done
12682
12683 test "$includedir" != NONE && \
12684 test "$includedir" != "/usr/include" && \
12685 test -d "$includedir" && {
12686         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12687         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12688 }
12689
12690 test "$oldincludedir" != NONE && \
12691 test "$oldincludedir" != "/usr/include" && \
12692 test -d "$oldincludedir" && {
12693         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12694         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12695 }
12696
12697 cf_search="$cf_search $cf_header_path_list"
12698
12699         for cf_cv_header_path_utf8 in $cf_search
12700         do
12701                 if test -d "$cf_cv_header_path_utf8" ; then
12702                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12703
12704 echo "${as_me:-configure}:12704: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12705
12706                         CPPFLAGS="$cf_save_CPPFLAGS"
12707
12708         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12709         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12710
12711                         cat >"conftest.$ac_ext" <<_ACEOF
12712 #line 12712 "configure"
12713 #include "confdefs.h"
12714
12715 #include <libutf8.h>
12716 int
12717 main (void)
12718 {
12719 putwc(0,0);
12720   ;
12721   return 0;
12722 }
12723 _ACEOF
12724 rm -f "conftest.$ac_objext"
12725 if { (eval echo "$as_me:12725: \"$ac_compile\"") >&5
12726   (eval $ac_compile) 2>&5
12727   ac_status=$?
12728   echo "$as_me:12728: \$? = $ac_status" >&5
12729   (exit "$ac_status"); } &&
12730          { ac_try='test -s "conftest.$ac_objext"'
12731   { (eval echo "$as_me:12731: \"$ac_try\"") >&5
12732   (eval $ac_try) 2>&5
12733   ac_status=$?
12734   echo "$as_me:12734: \$? = $ac_status" >&5
12735   (exit "$ac_status"); }; }; then
12736
12737                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12738
12739 echo "${as_me:-configure}:12739: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12740
12741                                 cf_cv_find_linkage_utf8=maybe
12742                                 cf_test_CPPFLAGS="$CPPFLAGS"
12743                                 break
12744 else
12745   echo "$as_me: failed program was:" >&5
12746 cat "conftest.$ac_ext" >&5
12747
12748                                 CPPFLAGS="$cf_save_CPPFLAGS"
12749
12750 fi
12751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12752                 fi
12753         done
12754
12755         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12756
12757 echo "${as_me:-configure}:12757: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12758
12759                 cf_save_LIBS="$LIBS"
12760                 cf_save_LDFLAGS="$LDFLAGS"
12761
12762                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12763
12764 cf_search=
12765 cf_library_path_list=""
12766 if test -n "${LDFLAGS}${LIBS}" ; then
12767         for cf_library_path in $LDFLAGS $LIBS
12768         do
12769                 case "$cf_library_path" in
12770                 (-L*)
12771                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12772
12773 test "x$cf_library_path" != "xNONE" && \
12774 test -d "$cf_library_path" && \
12775  {
12776         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12777         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12778         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12779         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12780         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12781         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12782 }
12783
12784                         cf_library_path_list="$cf_library_path_list $cf_search"
12785                         ;;
12786                 esac
12787         done
12788 fi
12789
12790 cf_search=
12791
12792 test "x$prefix" != "xNONE" && \
12793 test -d "$prefix" && \
12794  {
12795         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12796         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12797         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12798         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12799         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12800         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12801 }
12802
12803 for cf_subdir_prefix in \
12804         /usr \
12805         /usr/local \
12806         /usr/pkg \
12807         /opt \
12808         /opt/local \
12809         $HOME
12810 do
12811
12812 test "x$cf_subdir_prefix" != "x$prefix" && \
12813 test -d "$cf_subdir_prefix" && \
12814 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12815         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12816         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12817         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12818         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12819         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12820         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12821 }
12822
12823 done
12824
12825 cf_search="$cf_library_path_list $cf_search"
12826
12827                         for cf_cv_library_path_utf8 in $cf_search
12828                         do
12829                                 if test -d "$cf_cv_library_path_utf8" ; then
12830                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12831
12832 echo "${as_me:-configure}:12832: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12833
12834                                         CPPFLAGS="$cf_test_CPPFLAGS"
12835                                         LIBS="-lutf8  $cf_save_LIBS"
12836                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12837                                         cat >"conftest.$ac_ext" <<_ACEOF
12838 #line 12838 "configure"
12839 #include "confdefs.h"
12840
12841 #include <libutf8.h>
12842 int
12843 main (void)
12844 {
12845 putwc(0,0);
12846   ;
12847   return 0;
12848 }
12849 _ACEOF
12850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12851 if { (eval echo "$as_me:12851: \"$ac_link\"") >&5
12852   (eval $ac_link) 2>&5
12853   ac_status=$?
12854   echo "$as_me:12854: \$? = $ac_status" >&5
12855   (exit "$ac_status"); } &&
12856          { ac_try='test -s "conftest$ac_exeext"'
12857   { (eval echo "$as_me:12857: \"$ac_try\"") >&5
12858   (eval $ac_try) 2>&5
12859   ac_status=$?
12860   echo "$as_me:12860: \$? = $ac_status" >&5
12861   (exit "$ac_status"); }; }; then
12862
12863                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12864
12865 echo "${as_me:-configure}:12865: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12866
12867                                         cf_cv_find_linkage_utf8=yes
12868                                         cf_cv_library_file_utf8="-lutf8"
12869                                         break
12870 else
12871   echo "$as_me: failed program was:" >&5
12872 cat "conftest.$ac_ext" >&5
12873
12874                                         CPPFLAGS="$cf_save_CPPFLAGS"
12875                                         LIBS="$cf_save_LIBS"
12876                                         LDFLAGS="$cf_save_LDFLAGS"
12877
12878 fi
12879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12880                                 fi
12881                         done
12882                         CPPFLAGS="$cf_save_CPPFLAGS"
12883                         LDFLAGS="$cf_save_LDFLAGS"
12884                 fi
12885
12886         else
12887                 cf_cv_find_linkage_utf8=no
12888         fi
12889
12890 fi
12891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12892
12893 fi
12894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12895
12896 LIBS="$cf_save_LIBS"
12897
12898 if test "$cf_cv_find_linkage_utf8" = yes ; then
12899 cf_cv_utf8_lib=add-on
12900 else
12901 cf_cv_utf8_lib=no
12902 fi
12903
12904 fi
12905 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12906 fi
12907 echo "$as_me:12907: result: $cf_cv_utf8_lib" >&5
12908 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12909
12910 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12911 # ncurses/ncursesw:
12912 if test "$cf_cv_utf8_lib" = "add-on" ; then
12913
12914 cat >>confdefs.h <<\EOF
12915 #define HAVE_LIBUTF8_H 1
12916 EOF
12917
12918 if test -n "$cf_cv_header_path_utf8" ; then
12919   for cf_add_incdir in $cf_cv_header_path_utf8
12920   do
12921         while test "$cf_add_incdir" != /usr/include
12922         do
12923           if test -d "$cf_add_incdir"
12924           then
12925                 cf_have_incdir=no
12926                 if test -n "$CFLAGS$CPPFLAGS" ; then
12927                   # a loop is needed to ensure we can add subdirs of existing dirs
12928                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12929                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12930                           cf_have_incdir=yes; break
12931                         fi
12932                   done
12933                 fi
12934
12935                 if test "$cf_have_incdir" = no ; then
12936                   if test "$cf_add_incdir" = /usr/local/include ; then
12937                         if test "$GCC" = yes
12938                         then
12939                           cf_save_CPPFLAGS=$CPPFLAGS
12940
12941         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12942         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12943
12944                           cat >"conftest.$ac_ext" <<_ACEOF
12945 #line 12945 "configure"
12946 #include "confdefs.h"
12947 #include <stdio.h>
12948 int
12949 main (void)
12950 {
12951 printf("Hello")
12952   ;
12953   return 0;
12954 }
12955 _ACEOF
12956 rm -f "conftest.$ac_objext"
12957 if { (eval echo "$as_me:12957: \"$ac_compile\"") >&5
12958   (eval $ac_compile) 2>&5
12959   ac_status=$?
12960   echo "$as_me:12960: \$? = $ac_status" >&5
12961   (exit "$ac_status"); } &&
12962          { ac_try='test -s "conftest.$ac_objext"'
12963   { (eval echo "$as_me:12963: \"$ac_try\"") >&5
12964   (eval $ac_try) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit "$ac_status"); }; }; then
12968   :
12969 else
12970   echo "$as_me: failed program was:" >&5
12971 cat "conftest.$ac_ext" >&5
12972 cf_have_incdir=yes
12973 fi
12974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12975                           CPPFLAGS=$cf_save_CPPFLAGS
12976                         fi
12977                   fi
12978                 fi
12979
12980                 if test "$cf_have_incdir" = no ; then
12981                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12982
12983 echo "${as_me:-configure}:12983: testing adding $cf_add_incdir to include-path ..." 1>&5
12984
12985                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12986
12987                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12988                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12989                   cf_add_incdir="$cf_top_incdir"
12990                 else
12991                   break
12992                 fi
12993           else
12994                 break
12995           fi
12996         done
12997   done
12998 fi
12999
13000 if test -n "$cf_cv_library_path_utf8" ; then
13001         for cf_add_libdir in $cf_cv_library_path_utf8
13002         do
13003                 if test "$cf_add_libdir" = /usr/lib ; then
13004                         :
13005                 elif test -d "$cf_add_libdir"
13006                 then
13007                         cf_have_libdir=no
13008                         if test -n "$LDFLAGS$LIBS" ; then
13009                                 # a loop is needed to ensure we can add subdirs of existing dirs
13010                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13011                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13012                                                 cf_have_libdir=yes; break
13013                                         fi
13014                                 done
13015                         fi
13016                         if test "$cf_have_libdir" = no ; then
13017                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13018
13019 echo "${as_me:-configure}:13019: testing adding $cf_add_libdir to library-path ..." 1>&5
13020
13021                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13022                         fi
13023                 fi
13024         done
13025 fi
13026
13027 cf_add_libs="$LIBS"
13028 # reverse order
13029 cf_add_0lib=
13030 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13031 # filter duplicates
13032 for cf_add_1lib in $cf_add_0lib; do
13033         for cf_add_2lib in $cf_add_libs; do
13034                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13035                         cf_add_1lib=
13036                         break
13037                 fi
13038         done
13039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13040 done
13041 LIBS="$cf_add_libs"
13042
13043 fi
13044
13045                 if test "$cf_cv_utf8_lib" != no ; then
13046                         NCURSES_LIBUTF8=1
13047                 fi
13048         fi
13049
13050 # This is needed on Tru64 5.0 to declare mbstate_t
13051 echo "$as_me:13051: checking if we must include wchar.h to declare mbstate_t" >&5
13052 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13053 if test "${cf_cv_mbstate_t+set}" = set; then
13054   echo $ECHO_N "(cached) $ECHO_C" >&6
13055 else
13056
13057 cat >"conftest.$ac_ext" <<_ACEOF
13058 #line 13058 "configure"
13059 #include "confdefs.h"
13060
13061 #include <stdlib.h>
13062 #include <stdarg.h>
13063 #include <stdio.h>
13064 #ifdef HAVE_LIBUTF8_H
13065 #include <libutf8.h>
13066 #endif
13067 int
13068 main (void)
13069 {
13070 mbstate_t state
13071   ;
13072   return 0;
13073 }
13074 _ACEOF
13075 rm -f "conftest.$ac_objext"
13076 if { (eval echo "$as_me:13076: \"$ac_compile\"") >&5
13077   (eval $ac_compile) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit "$ac_status"); } &&
13081          { ac_try='test -s "conftest.$ac_objext"'
13082   { (eval echo "$as_me:13082: \"$ac_try\"") >&5
13083   (eval $ac_try) 2>&5
13084   ac_status=$?
13085   echo "$as_me:13085: \$? = $ac_status" >&5
13086   (exit "$ac_status"); }; }; then
13087   cf_cv_mbstate_t=no
13088 else
13089   echo "$as_me: failed program was:" >&5
13090 cat "conftest.$ac_ext" >&5
13091 cat >"conftest.$ac_ext" <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094
13095 #include <stdlib.h>
13096 #include <stdarg.h>
13097 #include <stdio.h>
13098 #include <wchar.h>
13099 #ifdef HAVE_LIBUTF8_H
13100 #include <libutf8.h>
13101 #endif
13102 int
13103 main (void)
13104 {
13105 mbstate_t value
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 rm -f "conftest.$ac_objext"
13111 if { (eval echo "$as_me:13111: \"$ac_compile\"") >&5
13112   (eval $ac_compile) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit "$ac_status"); } &&
13116          { ac_try='test -s "conftest.$ac_objext"'
13117   { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit "$ac_status"); }; }; then
13122   cf_cv_mbstate_t=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 cat "conftest.$ac_ext" >&5
13126 cf_cv_mbstate_t=unknown
13127 fi
13128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13129 fi
13130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13131 fi
13132 echo "$as_me:13132: result: $cf_cv_mbstate_t" >&5
13133 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13134
13135 if test "$cf_cv_mbstate_t" = yes ; then
13136
13137 cat >>confdefs.h <<\EOF
13138 #define NEED_WCHAR_H 1
13139 EOF
13140
13141         NEED_WCHAR_H=1
13142 fi
13143
13144 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13145 if test "$cf_cv_mbstate_t" = unknown ; then
13146         NCURSES_MBSTATE_T=1
13147 fi
13148
13149 # This is needed on Tru64 5.0 to declare wchar_t
13150 echo "$as_me:13150: checking if we must include wchar.h to declare wchar_t" >&5
13151 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13152 if test "${cf_cv_wchar_t+set}" = set; then
13153   echo $ECHO_N "(cached) $ECHO_C" >&6
13154 else
13155
13156 cat >"conftest.$ac_ext" <<_ACEOF
13157 #line 13157 "configure"
13158 #include "confdefs.h"
13159
13160 #include <stdlib.h>
13161 #include <stdarg.h>
13162 #include <stdio.h>
13163 #ifdef HAVE_LIBUTF8_H
13164 #include <libutf8.h>
13165 #endif
13166 int
13167 main (void)
13168 {
13169 wchar_t state
13170   ;
13171   return 0;
13172 }
13173 _ACEOF
13174 rm -f "conftest.$ac_objext"
13175 if { (eval echo "$as_me:13175: \"$ac_compile\"") >&5
13176   (eval $ac_compile) 2>&5
13177   ac_status=$?
13178   echo "$as_me:13178: \$? = $ac_status" >&5
13179   (exit "$ac_status"); } &&
13180          { ac_try='test -s "conftest.$ac_objext"'
13181   { (eval echo "$as_me:13181: \"$ac_try\"") >&5
13182   (eval $ac_try) 2>&5
13183   ac_status=$?
13184   echo "$as_me:13184: \$? = $ac_status" >&5
13185   (exit "$ac_status"); }; }; then
13186   cf_cv_wchar_t=no
13187 else
13188   echo "$as_me: failed program was:" >&5
13189 cat "conftest.$ac_ext" >&5
13190 cat >"conftest.$ac_ext" <<_ACEOF
13191 #line 13191 "configure"
13192 #include "confdefs.h"
13193
13194 #include <stdlib.h>
13195 #include <stdarg.h>
13196 #include <stdio.h>
13197 #include <wchar.h>
13198 #ifdef HAVE_LIBUTF8_H
13199 #include <libutf8.h>
13200 #endif
13201 int
13202 main (void)
13203 {
13204 wchar_t value
13205   ;
13206   return 0;
13207 }
13208 _ACEOF
13209 rm -f "conftest.$ac_objext"
13210 if { (eval echo "$as_me:13210: \"$ac_compile\"") >&5
13211   (eval $ac_compile) 2>&5
13212   ac_status=$?
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit "$ac_status"); } &&
13215          { ac_try='test -s "conftest.$ac_objext"'
13216   { (eval echo "$as_me:13216: \"$ac_try\"") >&5
13217   (eval $ac_try) 2>&5
13218   ac_status=$?
13219   echo "$as_me:13219: \$? = $ac_status" >&5
13220   (exit "$ac_status"); }; }; then
13221   cf_cv_wchar_t=yes
13222 else
13223   echo "$as_me: failed program was:" >&5
13224 cat "conftest.$ac_ext" >&5
13225 cf_cv_wchar_t=unknown
13226 fi
13227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13228 fi
13229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13230 fi
13231 echo "$as_me:13231: result: $cf_cv_wchar_t" >&5
13232 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13233
13234 if test "$cf_cv_wchar_t" = yes ; then
13235
13236 cat >>confdefs.h <<\EOF
13237 #define NEED_WCHAR_H 1
13238 EOF
13239
13240         NEED_WCHAR_H=1
13241 fi
13242
13243 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13244 if test "$cf_cv_wchar_t" = unknown ; then
13245         NCURSES_WCHAR_T=1
13246 fi
13247
13248 # if we find wchar_t in either place, use substitution to provide a fallback.
13249 if test "$cf_cv_wchar_t" != unknown ; then
13250         NCURSES_OK_WCHAR_T=1
13251 fi
13252
13253 # This is needed on Tru64 5.0 to declare wint_t
13254 echo "$as_me:13254: checking if we must include wchar.h to declare wint_t" >&5
13255 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13256 if test "${cf_cv_wint_t+set}" = set; then
13257   echo $ECHO_N "(cached) $ECHO_C" >&6
13258 else
13259
13260 cat >"conftest.$ac_ext" <<_ACEOF
13261 #line 13261 "configure"
13262 #include "confdefs.h"
13263
13264 #include <stdlib.h>
13265 #include <stdarg.h>
13266 #include <stdio.h>
13267 #ifdef HAVE_LIBUTF8_H
13268 #include <libutf8.h>
13269 #endif
13270 int
13271 main (void)
13272 {
13273 wint_t state
13274   ;
13275   return 0;
13276 }
13277 _ACEOF
13278 rm -f "conftest.$ac_objext"
13279 if { (eval echo "$as_me:13279: \"$ac_compile\"") >&5
13280   (eval $ac_compile) 2>&5
13281   ac_status=$?
13282   echo "$as_me:13282: \$? = $ac_status" >&5
13283   (exit "$ac_status"); } &&
13284          { ac_try='test -s "conftest.$ac_objext"'
13285   { (eval echo "$as_me:13285: \"$ac_try\"") >&5
13286   (eval $ac_try) 2>&5
13287   ac_status=$?
13288   echo "$as_me:13288: \$? = $ac_status" >&5
13289   (exit "$ac_status"); }; }; then
13290   cf_cv_wint_t=no
13291 else
13292   echo "$as_me: failed program was:" >&5
13293 cat "conftest.$ac_ext" >&5
13294 cat >"conftest.$ac_ext" <<_ACEOF
13295 #line 13295 "configure"
13296 #include "confdefs.h"
13297
13298 #include <stdlib.h>
13299 #include <stdarg.h>
13300 #include <stdio.h>
13301 #include <wchar.h>
13302 #ifdef HAVE_LIBUTF8_H
13303 #include <libutf8.h>
13304 #endif
13305 int
13306 main (void)
13307 {
13308 wint_t value
13309   ;
13310   return 0;
13311 }
13312 _ACEOF
13313 rm -f "conftest.$ac_objext"
13314 if { (eval echo "$as_me:13314: \"$ac_compile\"") >&5
13315   (eval $ac_compile) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit "$ac_status"); } &&
13319          { ac_try='test -s "conftest.$ac_objext"'
13320   { (eval echo "$as_me:13320: \"$ac_try\"") >&5
13321   (eval $ac_try) 2>&5
13322   ac_status=$?
13323   echo "$as_me:13323: \$? = $ac_status" >&5
13324   (exit "$ac_status"); }; }; then
13325   cf_cv_wint_t=yes
13326 else
13327   echo "$as_me: failed program was:" >&5
13328 cat "conftest.$ac_ext" >&5
13329 cf_cv_wint_t=unknown
13330 fi
13331 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13332 fi
13333 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13334 fi
13335 echo "$as_me:13335: result: $cf_cv_wint_t" >&5
13336 echo "${ECHO_T}$cf_cv_wint_t" >&6
13337
13338 if test "$cf_cv_wint_t" = yes ; then
13339
13340 cat >>confdefs.h <<\EOF
13341 #define NEED_WCHAR_H 1
13342 EOF
13343
13344         NEED_WCHAR_H=1
13345 fi
13346
13347 # if we do not find wint_t in either place, use substitution to provide a fallback.
13348 if test "$cf_cv_wint_t" = unknown ; then
13349         NCURSES_WINT_T=1
13350 fi
13351
13352 # if we find wint_t in either place, use substitution to provide a fallback.
13353 if test "$cf_cv_wint_t" != unknown ; then
13354         NCURSES_OK_WINT_T=1
13355 fi
13356
13357         if test "$NCURSES_MBSTATE_T" != 0; then
13358
13359 cat >>confdefs.h <<\EOF
13360 #define NEED_MBSTATE_T_DEF 1
13361 EOF
13362
13363         fi
13364 fi
13365
13366 ###   use option --disable-lp64 to allow long chtype
13367 echo "$as_me:13367: checking whether to enable _LP64 definition in curses.h" >&5
13368 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13369
13370 # Check whether --enable-lp64 or --disable-lp64 was given.
13371 if test "${enable_lp64+set}" = set; then
13372   enableval="$enable_lp64"
13373   with_lp64=$enableval
13374 else
13375   with_lp64=$cf_dft_with_lp64
13376 fi;
13377 echo "$as_me:13377: result: $with_lp64" >&5
13378 echo "${ECHO_T}$with_lp64" >&6
13379
13380 if test "x$with_lp64" = xyes ; then
13381         cf_cv_enable_lp64=1
13382 else
13383         cf_cv_enable_lp64=0
13384 fi
13385
13386 # Check whether --enable-largefile or --disable-largefile was given.
13387 if test "${enable_largefile+set}" = set; then
13388   enableval="$enable_largefile"
13389
13390 fi;
13391 if test "$enable_largefile" != no; then
13392
13393   echo "$as_me:13393: checking for special C compiler options needed for large files" >&5
13394 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13395 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13396   echo $ECHO_N "(cached) $ECHO_C" >&6
13397 else
13398   ac_cv_sys_largefile_CC=no
13399      if test "$GCC" != yes; then
13400        ac_save_CC=$CC
13401        while :; do
13402          # IRIX 6.2 and later do not support large files by default,
13403          # so use the C compiler's -n32 option if that helps.
13404          cat >"conftest.$ac_ext" <<_ACEOF
13405 #line 13405 "configure"
13406 #include "confdefs.h"
13407 #include <sys/types.h>
13408  /* Check that off_t can represent 2**63 - 1 correctly.
13409     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13410     since some C++ compilers masquerading as C compilers
13411     incorrectly reject 9223372036854775807.  */
13412 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13413   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13414                        && LARGE_OFF_T % 2147483647 == 1)
13415                       ? 1 : -1];
13416 int
13417 main (void)
13418 {
13419
13420   ;
13421   return 0;
13422 }
13423 _ACEOF
13424          rm -f "conftest.$ac_objext"
13425 if { (eval echo "$as_me:13425: \"$ac_compile\"") >&5
13426   (eval $ac_compile) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit "$ac_status"); } &&
13430          { ac_try='test -s "conftest.$ac_objext"'
13431   { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit "$ac_status"); }; }; then
13436   break
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 cat "conftest.$ac_ext" >&5
13440 fi
13441 rm -f "conftest.$ac_objext"
13442          CC="$CC -n32"
13443          rm -f "conftest.$ac_objext"
13444 if { (eval echo "$as_me:13444: \"$ac_compile\"") >&5
13445   (eval $ac_compile) 2>&5
13446   ac_status=$?
13447   echo "$as_me:13447: \$? = $ac_status" >&5
13448   (exit "$ac_status"); } &&
13449          { ac_try='test -s "conftest.$ac_objext"'
13450   { (eval echo "$as_me:13450: \"$ac_try\"") >&5
13451   (eval $ac_try) 2>&5
13452   ac_status=$?
13453   echo "$as_me:13453: \$? = $ac_status" >&5
13454   (exit "$ac_status"); }; }; then
13455   ac_cv_sys_largefile_CC=' -n32'; break
13456 else
13457   echo "$as_me: failed program was:" >&5
13458 cat "conftest.$ac_ext" >&5
13459 fi
13460 rm -f "conftest.$ac_objext"
13461          break
13462        done
13463        CC=$ac_save_CC
13464        rm -f "conftest.$ac_ext"
13465     fi
13466 fi
13467 echo "$as_me:13467: result: $ac_cv_sys_largefile_CC" >&5
13468 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13469   if test "$ac_cv_sys_largefile_CC" != no; then
13470     CC=$CC$ac_cv_sys_largefile_CC
13471   fi
13472
13473   echo "$as_me:13473: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13474 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13475 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13476   echo $ECHO_N "(cached) $ECHO_C" >&6
13477 else
13478   while :; do
13479   ac_cv_sys_file_offset_bits=no
13480   cat >"conftest.$ac_ext" <<_ACEOF
13481 #line 13481 "configure"
13482 #include "confdefs.h"
13483 #include <sys/types.h>
13484  /* Check that off_t can represent 2**63 - 1 correctly.
13485     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13486     since some C++ compilers masquerading as C compilers
13487     incorrectly reject 9223372036854775807.  */
13488 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13489   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13490                        && LARGE_OFF_T % 2147483647 == 1)
13491                       ? 1 : -1];
13492 int
13493 main (void)
13494 {
13495
13496   ;
13497   return 0;
13498 }
13499 _ACEOF
13500 rm -f "conftest.$ac_objext"
13501 if { (eval echo "$as_me:13501: \"$ac_compile\"") >&5
13502   (eval $ac_compile) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit "$ac_status"); } &&
13506          { ac_try='test -s "conftest.$ac_objext"'
13507   { (eval echo "$as_me:13507: \"$ac_try\"") >&5
13508   (eval $ac_try) 2>&5
13509   ac_status=$?
13510   echo "$as_me:13510: \$? = $ac_status" >&5
13511   (exit "$ac_status"); }; }; then
13512   break
13513 else
13514   echo "$as_me: failed program was:" >&5
13515 cat "conftest.$ac_ext" >&5
13516 fi
13517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13518   cat >"conftest.$ac_ext" <<_ACEOF
13519 #line 13519 "configure"
13520 #include "confdefs.h"
13521 #define _FILE_OFFSET_BITS 64
13522 #include <sys/types.h>
13523  /* Check that off_t can represent 2**63 - 1 correctly.
13524     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13525     since some C++ compilers masquerading as C compilers
13526     incorrectly reject 9223372036854775807.  */
13527 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13528   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13529                        && LARGE_OFF_T % 2147483647 == 1)
13530                       ? 1 : -1];
13531 int
13532 main (void)
13533 {
13534
13535   ;
13536   return 0;
13537 }
13538 _ACEOF
13539 rm -f "conftest.$ac_objext"
13540 if { (eval echo "$as_me:13540: \"$ac_compile\"") >&5
13541   (eval $ac_compile) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit "$ac_status"); } &&
13545          { ac_try='test -s "conftest.$ac_objext"'
13546   { (eval echo "$as_me:13546: \"$ac_try\"") >&5
13547   (eval $ac_try) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit "$ac_status"); }; }; then
13551   ac_cv_sys_file_offset_bits=64; break
13552 else
13553   echo "$as_me: failed program was:" >&5
13554 cat "conftest.$ac_ext" >&5
13555 fi
13556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13557   break
13558 done
13559 fi
13560 echo "$as_me:13560: result: $ac_cv_sys_file_offset_bits" >&5
13561 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13562 if test "$ac_cv_sys_file_offset_bits" != no; then
13563
13564 cat >>confdefs.h <<EOF
13565 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13566 EOF
13567
13568 fi
13569 rm -rf conftest*
13570   echo "$as_me:13570: checking for _LARGE_FILES value needed for large files" >&5
13571 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13572 if test "${ac_cv_sys_large_files+set}" = set; then
13573   echo $ECHO_N "(cached) $ECHO_C" >&6
13574 else
13575   while :; do
13576   ac_cv_sys_large_files=no
13577   cat >"conftest.$ac_ext" <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580 #include <sys/types.h>
13581  /* Check that off_t can represent 2**63 - 1 correctly.
13582     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13583     since some C++ compilers masquerading as C compilers
13584     incorrectly reject 9223372036854775807.  */
13585 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13586   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13587                        && LARGE_OFF_T % 2147483647 == 1)
13588                       ? 1 : -1];
13589 int
13590 main (void)
13591 {
13592
13593   ;
13594   return 0;
13595 }
13596 _ACEOF
13597 rm -f "conftest.$ac_objext"
13598 if { (eval echo "$as_me:13598: \"$ac_compile\"") >&5
13599   (eval $ac_compile) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit "$ac_status"); } &&
13603          { ac_try='test -s "conftest.$ac_objext"'
13604   { (eval echo "$as_me:13604: \"$ac_try\"") >&5
13605   (eval $ac_try) 2>&5
13606   ac_status=$?
13607   echo "$as_me:13607: \$? = $ac_status" >&5
13608   (exit "$ac_status"); }; }; then
13609   break
13610 else
13611   echo "$as_me: failed program was:" >&5
13612 cat "conftest.$ac_ext" >&5
13613 fi
13614 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13615   cat >"conftest.$ac_ext" <<_ACEOF
13616 #line 13616 "configure"
13617 #include "confdefs.h"
13618 #define _LARGE_FILES 1
13619 #include <sys/types.h>
13620  /* Check that off_t can represent 2**63 - 1 correctly.
13621     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13622     since some C++ compilers masquerading as C compilers
13623     incorrectly reject 9223372036854775807.  */
13624 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13625   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13626                        && LARGE_OFF_T % 2147483647 == 1)
13627                       ? 1 : -1];
13628 int
13629 main (void)
13630 {
13631
13632   ;
13633   return 0;
13634 }
13635 _ACEOF
13636 rm -f "conftest.$ac_objext"
13637 if { (eval echo "$as_me:13637: \"$ac_compile\"") >&5
13638   (eval $ac_compile) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit "$ac_status"); } &&
13642          { ac_try='test -s "conftest.$ac_objext"'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit "$ac_status"); }; }; then
13648   ac_cv_sys_large_files=1; break
13649 else
13650   echo "$as_me: failed program was:" >&5
13651 cat "conftest.$ac_ext" >&5
13652 fi
13653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13654   break
13655 done
13656 fi
13657 echo "$as_me:13657: result: $ac_cv_sys_large_files" >&5
13658 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13659 if test "$ac_cv_sys_large_files" != no; then
13660
13661 cat >>confdefs.h <<EOF
13662 #define _LARGE_FILES $ac_cv_sys_large_files
13663 EOF
13664
13665 fi
13666 rm -rf conftest*
13667 fi
13668
13669         if test "$enable_largefile" != no ; then
13670         echo "$as_me:13670: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13671 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13672 if test "${ac_cv_sys_largefile_source+set}" = set; then
13673   echo $ECHO_N "(cached) $ECHO_C" >&6
13674 else
13675   while :; do
13676   ac_cv_sys_largefile_source=no
13677   cat >"conftest.$ac_ext" <<_ACEOF
13678 #line 13678 "configure"
13679 #include "confdefs.h"
13680 #include <stdio.h>
13681 int
13682 main (void)
13683 {
13684 return !fseeko;
13685   ;
13686   return 0;
13687 }
13688 _ACEOF
13689 rm -f "conftest.$ac_objext"
13690 if { (eval echo "$as_me:13690: \"$ac_compile\"") >&5
13691   (eval $ac_compile) 2>&5
13692   ac_status=$?
13693   echo "$as_me:13693: \$? = $ac_status" >&5
13694   (exit "$ac_status"); } &&
13695          { ac_try='test -s "conftest.$ac_objext"'
13696   { (eval echo "$as_me:13696: \"$ac_try\"") >&5
13697   (eval $ac_try) 2>&5
13698   ac_status=$?
13699   echo "$as_me:13699: \$? = $ac_status" >&5
13700   (exit "$ac_status"); }; }; then
13701   break
13702 else
13703   echo "$as_me: failed program was:" >&5
13704 cat "conftest.$ac_ext" >&5
13705 fi
13706 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13707   cat >"conftest.$ac_ext" <<_ACEOF
13708 #line 13708 "configure"
13709 #include "confdefs.h"
13710 #define _LARGEFILE_SOURCE 1
13711 #include <stdio.h>
13712 int
13713 main (void)
13714 {
13715 return !fseeko;
13716   ;
13717   return 0;
13718 }
13719 _ACEOF
13720 rm -f "conftest.$ac_objext"
13721 if { (eval echo "$as_me:13721: \"$ac_compile\"") >&5
13722   (eval $ac_compile) 2>&5
13723   ac_status=$?
13724   echo "$as_me:13724: \$? = $ac_status" >&5
13725   (exit "$ac_status"); } &&
13726          { ac_try='test -s "conftest.$ac_objext"'
13727   { (eval echo "$as_me:13727: \"$ac_try\"") >&5
13728   (eval $ac_try) 2>&5
13729   ac_status=$?
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit "$ac_status"); }; }; then
13732   ac_cv_sys_largefile_source=1; break
13733 else
13734   echo "$as_me: failed program was:" >&5
13735 cat "conftest.$ac_ext" >&5
13736 fi
13737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13738   break
13739 done
13740 fi
13741 echo "$as_me:13741: result: $ac_cv_sys_largefile_source" >&5
13742 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13743 if test "$ac_cv_sys_largefile_source" != no; then
13744
13745 cat >>confdefs.h <<EOF
13746 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13747 EOF
13748
13749 fi
13750 rm -rf conftest*
13751
13752 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13753 # in glibc 2.1.3, but that breaks too many other things.
13754 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13755 echo "$as_me:13755: checking for fseeko" >&5
13756 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13757 if test "${ac_cv_func_fseeko+set}" = set; then
13758   echo $ECHO_N "(cached) $ECHO_C" >&6
13759 else
13760   cat >"conftest.$ac_ext" <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763 #include <stdio.h>
13764 int
13765 main (void)
13766 {
13767 return fseeko && fseeko (stdin, 0, 0);
13768   ;
13769   return 0;
13770 }
13771 _ACEOF
13772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13773 if { (eval echo "$as_me:13773: \"$ac_link\"") >&5
13774   (eval $ac_link) 2>&5
13775   ac_status=$?
13776   echo "$as_me:13776: \$? = $ac_status" >&5
13777   (exit "$ac_status"); } &&
13778          { ac_try='test -s "conftest$ac_exeext"'
13779   { (eval echo "$as_me:13779: \"$ac_try\"") >&5
13780   (eval $ac_try) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit "$ac_status"); }; }; then
13784   ac_cv_func_fseeko=yes
13785 else
13786   echo "$as_me: failed program was:" >&5
13787 cat "conftest.$ac_ext" >&5
13788 ac_cv_func_fseeko=no
13789 fi
13790 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13791 fi
13792 echo "$as_me:13792: result: $ac_cv_func_fseeko" >&5
13793 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13794 if test $ac_cv_func_fseeko = yes; then
13795
13796 cat >>confdefs.h <<\EOF
13797 #define HAVE_FSEEKO 1
13798 EOF
13799
13800 fi
13801
13802         # Normally we would collect these definitions in the config.h,
13803         # but (like _XOPEN_SOURCE), some environments rely on having these
13804         # defined before any of the system headers are included.  Another
13805         # case comes up with C++, e.g., on AIX the compiler compiles the
13806         # header files by themselves before looking at the body files it is
13807         # told to compile.  For ncurses, those header files do not include
13808         # the config.h
13809         if test "$ac_cv_sys_large_files" != no
13810         then
13811
13812         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13813         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13814
13815         fi
13816         if test "$ac_cv_sys_largefile_source" != no
13817         then
13818
13819         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13820         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13821
13822         fi
13823         if test "$ac_cv_sys_file_offset_bits" != no
13824         then
13825
13826         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13827         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13828
13829         fi
13830
13831         echo "$as_me:13831: checking whether to use struct dirent64" >&5
13832 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13833 if test "${cf_cv_struct_dirent64+set}" = set; then
13834   echo $ECHO_N "(cached) $ECHO_C" >&6
13835 else
13836
13837                 cat >"conftest.$ac_ext" <<_ACEOF
13838 #line 13838 "configure"
13839 #include "confdefs.h"
13840
13841 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13842 #include <sys/types.h>
13843 #include <dirent.h>
13844
13845 int
13846 main (void)
13847 {
13848
13849                 /* if transitional largefile support is setup, this is true */
13850                 extern struct dirent64 * readdir(DIR *);
13851                 struct dirent64 *x = readdir((DIR *)0);
13852                 struct dirent *y = readdir((DIR *)0);
13853                 int z = x - y;
13854                 (void)z;
13855
13856   ;
13857   return 0;
13858 }
13859 _ACEOF
13860 rm -f "conftest.$ac_objext"
13861 if { (eval echo "$as_me:13861: \"$ac_compile\"") >&5
13862   (eval $ac_compile) 2>&5
13863   ac_status=$?
13864   echo "$as_me:13864: \$? = $ac_status" >&5
13865   (exit "$ac_status"); } &&
13866          { ac_try='test -s "conftest.$ac_objext"'
13867   { (eval echo "$as_me:13867: \"$ac_try\"") >&5
13868   (eval $ac_try) 2>&5
13869   ac_status=$?
13870   echo "$as_me:13870: \$? = $ac_status" >&5
13871   (exit "$ac_status"); }; }; then
13872   cf_cv_struct_dirent64=yes
13873 else
13874   echo "$as_me: failed program was:" >&5
13875 cat "conftest.$ac_ext" >&5
13876 cf_cv_struct_dirent64=no
13877 fi
13878 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13879
13880 fi
13881 echo "$as_me:13881: result: $cf_cv_struct_dirent64" >&5
13882 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13883         test "$cf_cv_struct_dirent64" = yes &&
13884 cat >>confdefs.h <<\EOF
13885 #define HAVE_STRUCT_DIRENT64 1
13886 EOF
13887
13888         fi
13889
13890 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13891 echo "$as_me:13891: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13892 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13893
13894 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13895 if test "${enable_tparm_varargs+set}" = set; then
13896   enableval="$enable_tparm_varargs"
13897   with_tparm_varargs=$enableval
13898 else
13899   with_tparm_varargs=yes
13900 fi;
13901 echo "$as_me:13901: result: $with_tparm_varargs" >&5
13902 echo "${ECHO_T}$with_tparm_varargs" >&6
13903 NCURSES_TPARM_VARARGS=0
13904 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13905
13906 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13907 if test "$with_ticlib" != no ; then
13908 echo "$as_me:13908: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13909 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13910
13911 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13912 if test "${enable_tic_depends+set}" = set; then
13913   enableval="$enable_tic_depends"
13914   with_tic_depends=$enableval
13915 else
13916   with_tic_depends=yes
13917 fi;
13918 echo "$as_me:13918: result: $with_tic_depends" >&5
13919 echo "${ECHO_T}$with_tic_depends" >&6
13920 else
13921         with_tic_depends=no
13922 fi
13923
13924 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13925 echo "$as_me:13925: checking if you want to enable wattr* macros" >&5
13926 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13927
13928 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13929 if test "${enable_wattr_macros+set}" = set; then
13930   enableval="$enable_wattr_macros"
13931   with_wattr_macros=$enableval
13932 else
13933   with_wattr_macros=no
13934 fi;
13935 if [ "x$with_wattr_macros" != xyes ]; then
13936         NCURSES_WATTR_MACROS=0
13937         echo "$as_me:13937: result: no" >&5
13938 echo "${ECHO_T}no" >&6
13939 else
13940         NCURSES_WATTR_MACROS=1
13941         echo "$as_me:13941: result: yes" >&5
13942 echo "${ECHO_T}yes" >&6
13943 fi
13944
13945 echo "$as_me:13945: checking for X11 rgb file" >&5
13946 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13947
13948 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13949 if test "${with_x11_rgb+set}" = set; then
13950   withval="$with_x11_rgb"
13951   RGB_PATH=$withval
13952 else
13953   RGB_PATH=auto
13954 fi;
13955
13956 if test "x$RGB_PATH" = xauto
13957 then
13958         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13959         for cf_path in \
13960                 /opt/local/share/X11/rgb.txt \
13961                 /opt/X11/share/X11/rgb.txt \
13962                 /usr/share/X11/rgb.txt \
13963                 /usr/X11/share/X11/rgb.txt \
13964                 /usr/X11/lib/X11/rgb.txt \
13965                 /usr/lib/X11/rgb.txt \
13966                 /etc/X11/rgb.txt \
13967                 /usr/pkg/lib/X11/rgb.txt \
13968                 /usr/X11R7/lib/X11/rgb.txt \
13969                 /usr/X11R6/lib/X11/rgb.txt \
13970                 /usr/X11R5/lib/X11/rgb.txt \
13971                 /usr/X11R4/lib/X11/rgb.txt \
13972                 /usr/local/lib/X11/rgb.txt \
13973                 /usr/local/share/X11/rgb.txt \
13974                 /usr/lib64/X11/rgb.txt
13975         do
13976                 if test -f "$cf_path" ; then
13977                         RGB_PATH="$cf_path"
13978                         break
13979                 fi
13980         done
13981 else
13982         cf_path=$RGB_PATH
13983
13984 if test "x$prefix" != xNONE; then
13985         cf_path_syntax="$prefix"
13986 else
13987         cf_path_syntax="$ac_default_prefix"
13988 fi
13989
13990 case ".$cf_path" in
13991 (.\$\(*\)*|.\'*\'*)
13992         ;;
13993 (..|./*|.\\*)
13994         ;;
13995 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13996         ;;
13997 (.\$\{*prefix\}*|.\$\{*dir\}*)
13998         eval cf_path="$cf_path"
13999         case ".$cf_path" in
14000         (.NONE/*)
14001                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14002                 ;;
14003         esac
14004         ;;
14005 (.no|.NONE/*)
14006         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14007         ;;
14008 (*)
14009         { { echo "$as_me:14009: error: expected a pathname, not \"$cf_path\"" >&5
14010 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14011    { (exit 1); exit 1; }; }
14012         ;;
14013 esac
14014
14015 fi
14016
14017 echo "$as_me:14017: result: $RGB_PATH" >&5
14018 echo "${ECHO_T}$RGB_PATH" >&6
14019
14020 cat >>confdefs.h <<EOF
14021 #define RGB_PATH "$cf_path"
14022 EOF
14023
14024 no_x11_rgb=
14025 if test "$RGB_PATH" = no
14026 then
14027         no_x11_rgb="#"
14028 fi
14029
14030 ###   use option --with-bool to override bool's type
14031 echo "$as_me:14031: checking for type of bool" >&5
14032 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14033
14034 # Check whether --with-bool or --without-bool was given.
14035 if test "${with_bool+set}" = set; then
14036   withval="$with_bool"
14037   NCURSES_BOOL="$withval"
14038 else
14039   NCURSES_BOOL=auto
14040 fi;
14041 echo "$as_me:14041: result: $NCURSES_BOOL" >&5
14042 echo "${ECHO_T}$NCURSES_BOOL" >&6
14043
14044 echo "$as_me:14044: checking for alternate terminal capabilities file" >&5
14045 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14046
14047 # Check whether --with-caps or --without-caps was given.
14048 if test "${with_caps+set}" = set; then
14049   withval="$with_caps"
14050   TERMINFO_CAPS=Caps.$withval
14051 else
14052   TERMINFO_CAPS=Caps
14053 fi;
14054 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14055 then
14056         { echo "$as_me:14056: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14057 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14058         TERMINFO_CAPS=Caps
14059 fi
14060 echo "$as_me:14060: result: $TERMINFO_CAPS" >&5
14061 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14062
14063 ###   use option --with-chtype to override chtype's type
14064 echo "$as_me:14064: checking for type of chtype" >&5
14065 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14066
14067 # Check whether --with-chtype or --without-chtype was given.
14068 if test "${with_chtype+set}" = set; then
14069   withval="$with_chtype"
14070   NCURSES_CHTYPE="$withval"
14071 else
14072   NCURSES_CHTYPE=$cf_dft_chtype
14073 fi;
14074 echo "$as_me:14074: result: $NCURSES_CHTYPE" >&5
14075 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14076
14077 ###   use option --with-ospeed to override ospeed's type
14078 echo "$as_me:14078: checking for type of ospeed" >&5
14079 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14080
14081 # Check whether --with-ospeed or --without-ospeed was given.
14082 if test "${with_ospeed+set}" = set; then
14083   withval="$with_ospeed"
14084   NCURSES_OSPEED="$withval"
14085 else
14086   NCURSES_OSPEED=short
14087 fi;
14088 echo "$as_me:14088: result: $NCURSES_OSPEED" >&5
14089 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14090
14091 ###   use option --with-mmask-t to override mmask_t's type
14092 echo "$as_me:14092: checking for type of mmask_t" >&5
14093 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14094
14095 # Check whether --with-mmask-t or --without-mmask-t was given.
14096 if test "${with_mmask_t+set}" = set; then
14097   withval="$with_mmask_t"
14098   NCURSES_MMASK_T="$withval"
14099 else
14100   NCURSES_MMASK_T=$cf_dft_mmask_t
14101 fi;
14102 echo "$as_me:14102: result: $NCURSES_MMASK_T" >&5
14103 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14104
14105 ###   use option --with-ccharw-max to override CCHARW_MAX size
14106 echo "$as_me:14106: checking for size CCHARW_MAX" >&5
14107 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14108
14109 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14110 if test "${with_ccharw_max+set}" = set; then
14111   withval="$with_ccharw_max"
14112   NCURSES_CCHARW_MAX="$withval"
14113 else
14114   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14115 fi;
14116 echo "$as_me:14116: result: $NCURSES_CCHARW_MAX" >&5
14117 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14118
14119 echo "$as_me:14119: checking for ANSI C header files" >&5
14120 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14121 if test "${ac_cv_header_stdc+set}" = set; then
14122   echo $ECHO_N "(cached) $ECHO_C" >&6
14123 else
14124   cat >"conftest.$ac_ext" <<_ACEOF
14125 #line 14125 "configure"
14126 #include "confdefs.h"
14127 #include <stdlib.h>
14128 #include <stdarg.h>
14129 #include <string.h>
14130 #include <float.h>
14131
14132 _ACEOF
14133 if { (eval echo "$as_me:14133: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14134   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14135   ac_status=$?
14136   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14137   rm -f conftest.er1
14138   cat conftest.err >&5
14139   echo "$as_me:14139: \$? = $ac_status" >&5
14140   (exit "$ac_status"); } >/dev/null; then
14141   if test -s conftest.err; then
14142     ac_cpp_err=$ac_c_preproc_warn_flag
14143   else
14144     ac_cpp_err=
14145   fi
14146 else
14147   ac_cpp_err=yes
14148 fi
14149 if test -z "$ac_cpp_err"; then
14150   ac_cv_header_stdc=yes
14151 else
14152   echo "$as_me: failed program was:" >&5
14153   cat "conftest.$ac_ext" >&5
14154   ac_cv_header_stdc=no
14155 fi
14156 rm -f conftest.err "conftest.$ac_ext"
14157
14158 if test $ac_cv_header_stdc = yes; then
14159   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14160   cat >"conftest.$ac_ext" <<_ACEOF
14161 #line 14161 "configure"
14162 #include "confdefs.h"
14163 #include <string.h>
14164
14165 _ACEOF
14166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14167   $EGREP "memchr" >/dev/null 2>&1; then
14168   :
14169 else
14170   ac_cv_header_stdc=no
14171 fi
14172 rm -rf conftest*
14173
14174 fi
14175
14176 if test $ac_cv_header_stdc = yes; then
14177   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14178   cat >"conftest.$ac_ext" <<_ACEOF
14179 #line 14179 "configure"
14180 #include "confdefs.h"
14181 #include <stdlib.h>
14182
14183 _ACEOF
14184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14185   $EGREP "free" >/dev/null 2>&1; then
14186   :
14187 else
14188   ac_cv_header_stdc=no
14189 fi
14190 rm -rf conftest*
14191
14192 fi
14193
14194 if test $ac_cv_header_stdc = yes; then
14195   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14196   if test "$cross_compiling" = yes; then
14197   :
14198 else
14199   cat >"conftest.$ac_ext" <<_ACEOF
14200 #line 14200 "configure"
14201 #include "confdefs.h"
14202 #include <ctype.h>
14203 #if ((' ' & 0x0FF) == 0x020)
14204 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14205 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14206 #else
14207 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14208                      || ('j' <= (c) && (c) <= 'r') \
14209                      || ('s' <= (c) && (c) <= 'z'))
14210 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14211 #endif
14212
14213 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14214 int
14215 main (void)
14216 {
14217   int i;
14218   for (i = 0; i < 256; i++)
14219     if (XOR (islower (i), ISLOWER (i))
14220         || toupper (i) != TOUPPER (i))
14221       $ac_main_return(2);
14222   $ac_main_return (0);
14223 }
14224 _ACEOF
14225 rm -f "conftest$ac_exeext"
14226 if { (eval echo "$as_me:14226: \"$ac_link\"") >&5
14227   (eval $ac_link) 2>&5
14228   ac_status=$?
14229   echo "$as_me:14229: \$? = $ac_status" >&5
14230   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14231   { (eval echo "$as_me:14231: \"$ac_try\"") >&5
14232   (eval $ac_try) 2>&5
14233   ac_status=$?
14234   echo "$as_me:14234: \$? = $ac_status" >&5
14235   (exit "$ac_status"); }; }; then
14236   :
14237 else
14238   echo "$as_me: program exited with status $ac_status" >&5
14239 echo "$as_me: failed program was:" >&5
14240 cat "conftest.$ac_ext" >&5
14241 ac_cv_header_stdc=no
14242 fi
14243 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14244 fi
14245 fi
14246 fi
14247 echo "$as_me:14247: result: $ac_cv_header_stdc" >&5
14248 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14249 if test $ac_cv_header_stdc = yes; then
14250
14251 cat >>confdefs.h <<\EOF
14252 #define STDC_HEADERS 1
14253 EOF
14254
14255 fi
14256
14257 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14258
14259 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14260                   inttypes.h stdint.h unistd.h
14261 do
14262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14263 echo "$as_me:14263: checking for $ac_header" >&5
14264 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14266   echo $ECHO_N "(cached) $ECHO_C" >&6
14267 else
14268   cat >"conftest.$ac_ext" <<_ACEOF
14269 #line 14269 "configure"
14270 #include "confdefs.h"
14271 $ac_includes_default
14272 #include <$ac_header>
14273 _ACEOF
14274 rm -f "conftest.$ac_objext"
14275 if { (eval echo "$as_me:14275: \"$ac_compile\"") >&5
14276   (eval $ac_compile) 2>&5
14277   ac_status=$?
14278   echo "$as_me:14278: \$? = $ac_status" >&5
14279   (exit "$ac_status"); } &&
14280          { ac_try='test -s "conftest.$ac_objext"'
14281   { (eval echo "$as_me:14281: \"$ac_try\"") >&5
14282   (eval $ac_try) 2>&5
14283   ac_status=$?
14284   echo "$as_me:14284: \$? = $ac_status" >&5
14285   (exit "$ac_status"); }; }; then
14286   eval "$as_ac_Header=yes"
14287 else
14288   echo "$as_me: failed program was:" >&5
14289 cat "conftest.$ac_ext" >&5
14290 eval "$as_ac_Header=no"
14291 fi
14292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14293 fi
14294 echo "$as_me:14294: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14295 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14296 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14297   cat >>confdefs.h <<EOF
14298 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14299 EOF
14300
14301 fi
14302 done
14303
14304 echo "$as_me:14304: checking for signed char" >&5
14305 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14306 if test "${ac_cv_type_signed_char+set}" = set; then
14307   echo $ECHO_N "(cached) $ECHO_C" >&6
14308 else
14309   cat >"conftest.$ac_ext" <<_ACEOF
14310 #line 14310 "configure"
14311 #include "confdefs.h"
14312 $ac_includes_default
14313 int
14314 main (void)
14315 {
14316 if ((signed char *) 0)
14317   return 0;
14318 if (sizeof (signed char))
14319   return 0;
14320   ;
14321   return 0;
14322 }
14323 _ACEOF
14324 rm -f "conftest.$ac_objext"
14325 if { (eval echo "$as_me:14325: \"$ac_compile\"") >&5
14326   (eval $ac_compile) 2>&5
14327   ac_status=$?
14328   echo "$as_me:14328: \$? = $ac_status" >&5
14329   (exit "$ac_status"); } &&
14330          { ac_try='test -s "conftest.$ac_objext"'
14331   { (eval echo "$as_me:14331: \"$ac_try\"") >&5
14332   (eval $ac_try) 2>&5
14333   ac_status=$?
14334   echo "$as_me:14334: \$? = $ac_status" >&5
14335   (exit "$ac_status"); }; }; then
14336   ac_cv_type_signed_char=yes
14337 else
14338   echo "$as_me: failed program was:" >&5
14339 cat "conftest.$ac_ext" >&5
14340 ac_cv_type_signed_char=no
14341 fi
14342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14343 fi
14344 echo "$as_me:14344: result: $ac_cv_type_signed_char" >&5
14345 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14346
14347 echo "$as_me:14347: checking size of signed char" >&5
14348 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14349 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14350   echo $ECHO_N "(cached) $ECHO_C" >&6
14351 else
14352   if test "$ac_cv_type_signed_char" = yes; then
14353   if test "$cross_compiling" = yes; then
14354   # Depending upon the size, compute the lo and hi bounds.
14355 cat >"conftest.$ac_ext" <<_ACEOF
14356 #line 14356 "configure"
14357 #include "confdefs.h"
14358 $ac_includes_default
14359 int
14360 main (void)
14361 {
14362 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14363   ;
14364   return 0;
14365 }
14366 _ACEOF
14367 rm -f "conftest.$ac_objext"
14368 if { (eval echo "$as_me:14368: \"$ac_compile\"") >&5
14369   (eval $ac_compile) 2>&5
14370   ac_status=$?
14371   echo "$as_me:14371: \$? = $ac_status" >&5
14372   (exit "$ac_status"); } &&
14373          { ac_try='test -s "conftest.$ac_objext"'
14374   { (eval echo "$as_me:14374: \"$ac_try\"") >&5
14375   (eval $ac_try) 2>&5
14376   ac_status=$?
14377   echo "$as_me:14377: \$? = $ac_status" >&5
14378   (exit "$ac_status"); }; }; then
14379   ac_lo=0 ac_mid=0
14380   while :; do
14381     cat >"conftest.$ac_ext" <<_ACEOF
14382 #line 14382 "configure"
14383 #include "confdefs.h"
14384 $ac_includes_default
14385 int
14386 main (void)
14387 {
14388 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14389   ;
14390   return 0;
14391 }
14392 _ACEOF
14393 rm -f "conftest.$ac_objext"
14394 if { (eval echo "$as_me:14394: \"$ac_compile\"") >&5
14395   (eval $ac_compile) 2>&5
14396   ac_status=$?
14397   echo "$as_me:14397: \$? = $ac_status" >&5
14398   (exit "$ac_status"); } &&
14399          { ac_try='test -s "conftest.$ac_objext"'
14400   { (eval echo "$as_me:14400: \"$ac_try\"") >&5
14401   (eval $ac_try) 2>&5
14402   ac_status=$?
14403   echo "$as_me:14403: \$? = $ac_status" >&5
14404   (exit "$ac_status"); }; }; then
14405   ac_hi=$ac_mid; break
14406 else
14407   echo "$as_me: failed program was:" >&5
14408 cat "conftest.$ac_ext" >&5
14409 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14410 fi
14411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14412   done
14413 else
14414   echo "$as_me: failed program was:" >&5
14415 cat "conftest.$ac_ext" >&5
14416 ac_hi=-1 ac_mid=-1
14417   while :; do
14418     cat >"conftest.$ac_ext" <<_ACEOF
14419 #line 14419 "configure"
14420 #include "confdefs.h"
14421 $ac_includes_default
14422 int
14423 main (void)
14424 {
14425 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 rm -f "conftest.$ac_objext"
14431 if { (eval echo "$as_me:14431: \"$ac_compile\"") >&5
14432   (eval $ac_compile) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit "$ac_status"); } &&
14436          { ac_try='test -s "conftest.$ac_objext"'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit "$ac_status"); }; }; then
14442   ac_lo=$ac_mid; break
14443 else
14444   echo "$as_me: failed program was:" >&5
14445 cat "conftest.$ac_ext" >&5
14446 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14447 fi
14448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14449   done
14450 fi
14451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14452 # Binary search between lo and hi bounds.
14453 while test "x$ac_lo" != "x$ac_hi"; do
14454   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14455   cat >"conftest.$ac_ext" <<_ACEOF
14456 #line 14456 "configure"
14457 #include "confdefs.h"
14458 $ac_includes_default
14459 int
14460 main (void)
14461 {
14462 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14463   ;
14464   return 0;
14465 }
14466 _ACEOF
14467 rm -f "conftest.$ac_objext"
14468 if { (eval echo "$as_me:14468: \"$ac_compile\"") >&5
14469   (eval $ac_compile) 2>&5
14470   ac_status=$?
14471   echo "$as_me:14471: \$? = $ac_status" >&5
14472   (exit "$ac_status"); } &&
14473          { ac_try='test -s "conftest.$ac_objext"'
14474   { (eval echo "$as_me:14474: \"$ac_try\"") >&5
14475   (eval $ac_try) 2>&5
14476   ac_status=$?
14477   echo "$as_me:14477: \$? = $ac_status" >&5
14478   (exit "$ac_status"); }; }; then
14479   ac_hi=$ac_mid
14480 else
14481   echo "$as_me: failed program was:" >&5
14482 cat "conftest.$ac_ext" >&5
14483 ac_lo=`expr "$ac_mid" + 1`
14484 fi
14485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14486 done
14487 ac_cv_sizeof_signed_char=$ac_lo
14488 else
14489   if test "$cross_compiling" = yes; then
14490   { { echo "$as_me:14490: error: cannot run test program while cross compiling" >&5
14491 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14492    { (exit 1); exit 1; }; }
14493 else
14494   cat >"conftest.$ac_ext" <<_ACEOF
14495 #line 14495 "configure"
14496 #include "confdefs.h"
14497 $ac_includes_default
14498 int
14499 main (void)
14500 {
14501 FILE *f = fopen ("conftest.val", "w");
14502 if (!f)
14503   $ac_main_return (1);
14504 fprintf (f, "%ld", (long)(sizeof (signed char)));
14505 fclose (f);
14506   ;
14507   return 0;
14508 }
14509 _ACEOF
14510 rm -f "conftest$ac_exeext"
14511 if { (eval echo "$as_me:14511: \"$ac_link\"") >&5
14512   (eval $ac_link) 2>&5
14513   ac_status=$?
14514   echo "$as_me:14514: \$? = $ac_status" >&5
14515   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14516   { (eval echo "$as_me:14516: \"$ac_try\"") >&5
14517   (eval $ac_try) 2>&5
14518   ac_status=$?
14519   echo "$as_me:14519: \$? = $ac_status" >&5
14520   (exit "$ac_status"); }; }; then
14521   ac_cv_sizeof_signed_char=`cat conftest.val`
14522 else
14523   echo "$as_me: program exited with status $ac_status" >&5
14524 echo "$as_me: failed program was:" >&5
14525 cat "conftest.$ac_ext" >&5
14526 fi
14527 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14528 fi
14529 fi
14530 rm -f conftest.val
14531 else
14532   ac_cv_sizeof_signed_char=0
14533 fi
14534 fi
14535 echo "$as_me:14535: result: $ac_cv_sizeof_signed_char" >&5
14536 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14537 cat >>confdefs.h <<EOF
14538 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14539 EOF
14540
14541 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14542         NCURSES_SBOOL="signed char"
14543 else
14544         NCURSES_SBOOL="char"
14545 fi
14546 echo "$as_me:14546: checking if you want to use signed Boolean array in term.h" >&5
14547 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14548
14549 # Check whether --enable-signed-char or --disable-signed-char was given.
14550 if test "${enable_signed_char+set}" = set; then
14551   enableval="$enable_signed_char"
14552   with_signed_char=$enableval
14553 else
14554   with_signed_char=$cf_dft_signed_char
14555 fi;
14556 echo "$as_me:14556: result: $with_signed_char" >&5
14557 echo "${ECHO_T}$with_signed_char" >&6
14558 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14559
14560 ###   use option --with-tparm-arg to override tparm's argument type
14561 echo "$as_me:14561: checking for type of tparm args" >&5
14562 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14563
14564 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14565 if test "${with_tparm_arg+set}" = set; then
14566   withval="$with_tparm_arg"
14567   NCURSES_TPARM_ARG="$withval"
14568 else
14569   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14570 fi;
14571 echo "$as_me:14571: result: $NCURSES_TPARM_ARG" >&5
14572 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14573
14574 ### Enable compiling-in rcs id's
14575 echo "$as_me:14575: checking if RCS identifiers should be compiled-in" >&5
14576 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14577
14578 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14579 if test "${with_rcs_ids+set}" = set; then
14580   withval="$with_rcs_ids"
14581   with_rcs_ids=$withval
14582 else
14583   with_rcs_ids=no
14584 fi;
14585 echo "$as_me:14585: result: $with_rcs_ids" >&5
14586 echo "${ECHO_T}$with_rcs_ids" >&6
14587 test "x$with_rcs_ids" = xyes &&
14588 cat >>confdefs.h <<\EOF
14589 #define USE_RCS_IDS 1
14590 EOF
14591
14592 ###############################################################################
14593
14594 echo "$as_me:14594: checking format of man-pages" >&5
14595 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14596
14597 # Check whether --with-manpage-format or --without-manpage-format was given.
14598 if test "${with_manpage_format+set}" = set; then
14599   withval="$with_manpage_format"
14600   MANPAGE_FORMAT=$withval
14601 else
14602   MANPAGE_FORMAT=unknown
14603 fi;
14604
14605 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14606 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14607
14608 cf_unknown=
14609
14610 case "$MANPAGE_FORMAT" in
14611 (unknown)
14612         if test -z "$MANPATH" ; then
14613                 MANPATH="/usr/man:/usr/share/man"
14614         fi
14615
14616         # look for the 'date' man-page (it is most likely to be installed!)
14617         MANPAGE_FORMAT=
14618         cf_preform="no"
14619         cf_catonly="yes"
14620         cf_example="date"
14621
14622         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14623         for cf_dir in $MANPATH; do
14624                 test -z "$cf_dir" && cf_dir=/usr/man
14625                 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
14626                 do
14627                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14628                         if test "x$cf_test" = "x$cf_name" ; then
14629
14630                                 case "$cf_name" in
14631                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14632                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14633                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14634                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14635                                 esac
14636
14637                                 case "$cf_name" in
14638                                 ($cf_dir/man*)
14639                                         cf_catonly=no
14640                                         ;;
14641                                 ($cf_dir/cat*)
14642                                         cf_preform=yes
14643                                         ;;
14644                                 esac
14645                                 break
14646                         fi
14647
14648                         # if we found a match in either man* or cat*, stop looking
14649                         if test -n "$MANPAGE_FORMAT" ; then
14650                                 cf_found=no
14651                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14652                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14653                                 case "$cf_name" in
14654                                 ($cf_dir/cat*)
14655                                         cf_found=yes
14656                                         ;;
14657                                 esac
14658                                 test "$cf_found" = yes && break
14659                         fi
14660                 done
14661                 # only check the first directory in $MANPATH where we find manpages
14662                 if test -n "$MANPAGE_FORMAT" ; then
14663                         break
14664                 fi
14665         done
14666         # if we did not find the example, just assume it is normal
14667         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14668         IFS="$ac_save_ifs"
14669         ;;
14670 (*)
14671         for cf_option in $MANPAGE_FORMAT; do
14672         case "$cf_option" in
14673         (gzip|compress|BSDI|normal|formatted|catonly)
14674                 ;;
14675         (*)
14676                 cf_unknown="$cf_unknown $cf_option"
14677                 ;;
14678         esac
14679         done
14680         ;;
14681 esac
14682
14683 echo "$as_me:14683: result: $MANPAGE_FORMAT" >&5
14684 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14685 if test -n "$cf_unknown" ; then
14686         { echo "$as_me:14686: WARNING: Unexpected manpage-format $cf_unknown" >&5
14687 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14688 fi
14689
14690 echo "$as_me:14690: checking for manpage renaming" >&5
14691 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14692
14693 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14694 if test "${with_manpage_renames+set}" = set; then
14695   withval="$with_manpage_renames"
14696   MANPAGE_RENAMES=$withval
14697 else
14698   MANPAGE_RENAMES=yes
14699 fi;
14700
14701 case ".$MANPAGE_RENAMES" in
14702 (.no)
14703         ;;
14704 (.|.yes)
14705         # Debian 'man' program?
14706         if test -f /etc/debian_version ; then
14707                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14708         else
14709                 MANPAGE_RENAMES=no
14710         fi
14711         ;;
14712 esac
14713
14714 if test "$MANPAGE_RENAMES" != no ; then
14715         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14716                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14717         elif test ! -f "$MANPAGE_RENAMES" ; then
14718                 { { echo "$as_me:14718: error: not a filename: $MANPAGE_RENAMES" >&5
14719 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14720    { (exit 1); exit 1; }; }
14721         fi
14722
14723         test ! -d man && mkdir man
14724
14725         # Construct a sed-script to perform renaming within man-pages
14726         if test -n "$MANPAGE_RENAMES" ; then
14727                 test ! -d man && mkdir man
14728                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14729         fi
14730 fi
14731
14732 echo "$as_me:14732: result: $MANPAGE_RENAMES" >&5
14733 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14734
14735 echo "$as_me:14735: checking if manpage aliases will be installed" >&5
14736 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14737
14738 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14739 if test "${with_manpage_aliases+set}" = set; then
14740   withval="$with_manpage_aliases"
14741   MANPAGE_ALIASES=$withval
14742 else
14743   MANPAGE_ALIASES=yes
14744 fi;
14745
14746 echo "$as_me:14746: result: $MANPAGE_ALIASES" >&5
14747 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14748
14749 case "x$LN_S" in
14750 (xln*)
14751         cf_use_symlinks=yes
14752         ;;
14753 (*)
14754         cf_use_symlinks=no
14755         ;;
14756 esac
14757
14758 MANPAGE_SYMLINKS=no
14759 if test "$MANPAGE_ALIASES" = yes ; then
14760 echo "$as_me:14760: checking if manpage symlinks should be used" >&5
14761 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14762
14763 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14764 if test "${with_manpage_symlinks+set}" = set; then
14765   withval="$with_manpage_symlinks"
14766   MANPAGE_SYMLINKS=$withval
14767 else
14768   MANPAGE_SYMLINKS=$cf_use_symlinks
14769 fi;
14770
14771 if test "$$cf_use_symlinks" = no; then
14772 if test "$MANPAGE_SYMLINKS" = yes ; then
14773         { echo "$as_me:14773: WARNING: cannot make symlinks" >&5
14774 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14775         MANPAGE_SYMLINKS=no
14776 fi
14777 fi
14778
14779 echo "$as_me:14779: result: $MANPAGE_SYMLINKS" >&5
14780 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14781 fi
14782
14783 echo "$as_me:14783: checking for manpage tbl" >&5
14784 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14785
14786 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14787 if test "${with_manpage_tbl+set}" = set; then
14788   withval="$with_manpage_tbl"
14789   MANPAGE_TBL=$withval
14790 else
14791   MANPAGE_TBL=no
14792 fi;
14793
14794 echo "$as_me:14794: result: $MANPAGE_TBL" >&5
14795 echo "${ECHO_T}$MANPAGE_TBL" >&6
14796
14797 if test "$prefix" = "NONE" ; then
14798         cf_prefix="$ac_default_prefix"
14799 else
14800         cf_prefix="$prefix"
14801 fi
14802
14803 case "$MANPAGE_FORMAT" in
14804 (*catonly*)
14805         cf_format=yes
14806         cf_inboth=no
14807         ;;
14808 (*formatted*)
14809         cf_format=yes
14810         cf_inboth=yes
14811         ;;
14812 (*)
14813         cf_format=no
14814         cf_inboth=no
14815         ;;
14816 esac
14817
14818 test ! -d man && mkdir man
14819
14820 cf_so_strip=
14821 cf_compress=
14822 case "$MANPAGE_FORMAT" in
14823 (*compress*)
14824         cf_so_strip="Z"
14825         cf_compress=compress
14826         ;;
14827 (*gzip*)
14828         cf_so_strip="gz"
14829         cf_compress=gzip
14830         ;;
14831 esac
14832
14833 cf_edit_man=./edit_man.sh
14834 cf_man_alias=`pwd`/man_alias.sed
14835
14836 cat >$cf_edit_man <<CF_EOF
14837 #! $SHELL
14838 # this script is generated by the configure-script CF_MAN_PAGES macro.
14839
14840 prefix="$cf_prefix"
14841 datarootdir="$datarootdir"
14842 datadir="$datadir"
14843
14844 NCURSES_MAJOR="$NCURSES_MAJOR"
14845 NCURSES_MINOR="$NCURSES_MINOR"
14846 NCURSES_PATCH="$NCURSES_PATCH"
14847
14848 NCURSES_OSPEED="$NCURSES_OSPEED"
14849 TERMINFO="$TERMINFO"
14850
14851 INSTALL="$INSTALL"
14852 INSTALL_DATA="$INSTALL_DATA"
14853
14854 transform="$program_transform_name"
14855
14856 TMP=\${TMPDIR:=/tmp}/man\$\$
14857 trap "rm -f \$TMP; exit 1" 1 2 3 15
14858 trap "rm -f \$TMP" 0
14859
14860 form=\$1
14861 shift || exit 1
14862
14863 verb=\$1
14864 shift || exit 1
14865
14866 mandir=\$1
14867 shift || exit 1
14868
14869 srcdir=\$1
14870 top_srcdir=\$srcdir/..
14871 shift || exit 1
14872
14873 if test "\$form" = normal ; then
14874         if test "$cf_format" = yes ; then
14875         if test "$cf_inboth" = no ; then
14876                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14877                 exit $?
14878         fi
14879         fi
14880         cf_subdir=\$mandir/man
14881         cf_tables=$MANPAGE_TBL
14882 else
14883         cf_subdir=\$mandir/cat
14884         cf_tables=yes
14885 fi
14886
14887 # process the list of source-files
14888 for i in "\$@" ; do
14889 case \$i in
14890 (*.orig|*.rej) ;;
14891 (*.[0-9]*)
14892         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14893         if test "\$verb" = installing ; then
14894         if test ! -d "\$cf_subdir\${section}" ; then
14895                 mkdir -p "\$cf_subdir\$section"
14896         fi
14897         fi
14898
14899         # replace variables in man page
14900         if test ! -f "$cf_man_alias" ; then
14901 cat >>$cf_man_alias <<-CF_EOF2
14902                 s,@DATADIR@,\$datadir,g
14903                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14904                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14905                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14906                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14907                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14908                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14909 CF_EOF
14910
14911         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14912         do
14913                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14914                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14915 cat >>$cf_edit_man <<-CF_EOF
14916                 s,@$cf_NAME@,$cf_name,g
14917 CF_EOF
14918         done
14919
14920 cat >>$cf_edit_man <<CF_EOF
14921 CF_EOF2
14922                 echo "...made $cf_man_alias"
14923         fi
14924
14925         aliases=
14926         cf_source=\`basename "\$i"\`
14927         inalias=\$cf_source
14928         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14929         if test ! -f "\$inalias" ; then
14930                 echo ".. skipped \$cf_source"
14931                 continue
14932         fi
14933 CF_EOF
14934
14935 if test "$MANPAGE_ALIASES" != no ; then
14936 cat >>$cf_edit_man <<CF_EOF
14937         nCurses=ignore.3x
14938         test "$with_curses_h" = yes && nCurses=ncurses.3x
14939         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14940 CF_EOF
14941 fi
14942
14943 if test "$MANPAGE_RENAMES" = no ; then
14944 cat >>$cf_edit_man <<CF_EOF
14945         # perform program transformations for section 1 man pages
14946         if test \$section = 1 ; then
14947                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14948         else
14949                 cf_target=\$cf_subdir\${section}/\$cf_source
14950         fi
14951 CF_EOF
14952 else
14953 cat >>$cf_edit_man <<CF_EOF
14954         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14955         if test -z "\$cf_target" ; then
14956                 echo "? missing rename for \$cf_source"
14957                 cf_target="\$cf_source"
14958         fi
14959         cf_target="\$cf_subdir\${section}/\${cf_target}"
14960
14961 CF_EOF
14962 fi
14963
14964 cat >>$cf_edit_man <<CF_EOF
14965         sed     -f "$cf_man_alias" \\
14966 CF_EOF
14967
14968 if test -f "$MANPAGE_RENAMES" ; then
14969 cat >>$cf_edit_man <<CF_EOF
14970                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14971 CF_EOF
14972 else
14973 cat >>$cf_edit_man <<CF_EOF
14974                 < "\$i" >\$TMP
14975 CF_EOF
14976 fi
14977
14978 cat >>$cf_edit_man <<CF_EOF
14979 if test \$cf_tables = yes ; then
14980         tbl \$TMP >\$TMP.out
14981         mv \$TMP.out \$TMP
14982 fi
14983 CF_EOF
14984
14985 if test "$with_overwrite" != yes ; then
14986 cat >>$cf_edit_man <<CF_EOF
14987         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14988         mv \$TMP.out \$TMP
14989 CF_EOF
14990 fi
14991
14992 if test "$with_curses_h" != yes ; then
14993 cat >>$cf_edit_man <<CF_EOF
14994         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14995         mv \$TMP.out \$TMP
14996 CF_EOF
14997 fi
14998
14999 cat >>$cf_edit_man <<CF_EOF
15000         if test "\$form" = format ; then
15001                 nroff -man \$TMP >\$TMP.out
15002                 mv \$TMP.out \$TMP
15003         fi
15004 CF_EOF
15005
15006 if test -n "$cf_compress" ; then
15007 cat >>$cf_edit_man <<CF_EOF
15008         if test "\$verb" = installing ; then
15009         if ( "$cf_compress" -f \$TMP )
15010         then
15011                 mv \$TMP.$cf_so_strip \$TMP
15012         fi
15013         fi
15014         cf_target="\$cf_target.$cf_so_strip"
15015 CF_EOF
15016 fi
15017
15018 case "$MANPAGE_FORMAT" in
15019 (*BSDI*)
15020 cat >>$cf_edit_man <<CF_EOF
15021         if test "\$form" = format ; then
15022                 # BSDI installs only .0 suffixes in the cat directories
15023                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15024         fi
15025 CF_EOF
15026   ;;
15027 esac
15028
15029 cat >>$cf_edit_man <<CF_EOF
15030         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15031         if test "\$verb" = installing ; then
15032                 echo "\$verb \$cf_target"
15033                 \$INSTALL_DATA \$TMP "\$cf_target"
15034                 test -d "\$cf_subdir\${section}" &&
15035                 test -n "\$aliases" && (
15036                         cd "\$cf_subdir\${section}" && (
15037                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15038                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
15039                                 cf_target=\`basename "\$cf_target"\`
15040                                 for cf_alias in \$aliases
15041                                 do
15042                                         if test "\$section" = 1 ; then
15043                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15044                                         fi
15045
15046                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15047                                                 if test -f "\$cf_alias\${suffix}" ; then
15048                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15049                                                         then
15050                                                                 continue
15051                                                         fi
15052                                                 fi
15053                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15054 CF_EOF
15055 case "x$LN_S" in
15056 (*-f)
15057 cat >>$cf_edit_man <<CF_EOF
15058                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15059 CF_EOF
15060         ;;
15061 (*)
15062 cat >>$cf_edit_man <<CF_EOF
15063                                                 rm -f "\$cf_alias\${suffix}"
15064                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15065 CF_EOF
15066         ;;
15067 esac
15068 cat >>$cf_edit_man <<CF_EOF
15069                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15070                                                 echo ".so \$cf_source" >\$TMP
15071 CF_EOF
15072 if test -n "$cf_compress" ; then
15073 cat >>$cf_edit_man <<CF_EOF
15074                                                 if test -n "$cf_so_strip" ; then
15075                                                         "$cf_compress" -f \$TMP
15076                                                         mv \$TMP.$cf_so_strip \$TMP
15077                                                 fi
15078 CF_EOF
15079 fi
15080 cat >>$cf_edit_man <<CF_EOF
15081                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15082                                                 rm -f "\$cf_alias\${suffix}"
15083                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15084                                         fi
15085                                 done
15086                         )
15087                 )
15088         elif test "\$verb" = removing ; then
15089                 test -f "\$cf_target" && (
15090                         echo "\$verb \$cf_target"
15091                         rm -f "\$cf_target"
15092                 )
15093                 test -d "\$cf_subdir\${section}" &&
15094                 test -n "\$aliases" && (
15095                         cd "\$cf_subdir\${section}" && (
15096                                 for cf_alias in \$aliases
15097                                 do
15098                                         if test "\$section" = 1 ; then
15099                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15100                                         fi
15101
15102                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15103                                         rm -f "\$cf_alias\${suffix}"
15104                                 done
15105                         )
15106                 )
15107         else
15108 #               echo ".hy 0"
15109                 cat \$TMP
15110         fi
15111         ;;
15112 esac
15113 done
15114
15115 if test "$cf_inboth" = yes ; then
15116 if test "\$form" != format ; then
15117         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15118 fi
15119 fi
15120
15121 exit 0
15122 CF_EOF
15123 chmod 755 "$cf_edit_man"
15124
15125 ###############################################################################
15126
15127 ### Note that some functions (such as const) are normally disabled anyway.
15128 echo "$as_me:15128: checking if you want to build with function extensions" >&5
15129 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15130
15131 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15132 if test "${enable_ext_funcs+set}" = set; then
15133   enableval="$enable_ext_funcs"
15134   with_ext_funcs=$enableval
15135 else
15136   with_ext_funcs=yes
15137 fi;
15138 echo "$as_me:15138: result: $with_ext_funcs" >&5
15139 echo "${ECHO_T}$with_ext_funcs" >&6
15140 if test "x$with_ext_funcs" = xyes ; then
15141         NCURSES_EXT_FUNCS=1
15142
15143 cat >>confdefs.h <<\EOF
15144 #define NCURSES_EXT_FUNCS 1
15145 EOF
15146
15147 cat >>confdefs.h <<\EOF
15148 #define HAVE_ASSUME_DEFAULT_COLORS 1
15149 EOF
15150
15151 cat >>confdefs.h <<\EOF
15152 #define HAVE_CURSES_VERSION 1
15153 EOF
15154
15155 cat >>confdefs.h <<\EOF
15156 #define HAVE_HAS_KEY 1
15157 EOF
15158
15159 cat >>confdefs.h <<\EOF
15160 #define HAVE_RESIZETERM 1
15161 EOF
15162
15163 cat >>confdefs.h <<\EOF
15164 #define HAVE_RESIZE_TERM 1
15165 EOF
15166
15167 cat >>confdefs.h <<\EOF
15168 #define HAVE_TERM_ENTRY_H 1
15169 EOF
15170
15171 cat >>confdefs.h <<\EOF
15172 #define HAVE_USE_DEFAULT_COLORS 1
15173 EOF
15174
15175 cat >>confdefs.h <<\EOF
15176 #define HAVE_USE_EXTENDED_NAMES 1
15177 EOF
15178
15179 cat >>confdefs.h <<\EOF
15180 #define HAVE_USE_SCREEN 1
15181 EOF
15182
15183 cat >>confdefs.h <<\EOF
15184 #define HAVE_USE_WINDOW 1
15185 EOF
15186
15187 cat >>confdefs.h <<\EOF
15188 #define HAVE_WRESIZE 1
15189 EOF
15190
15191         GENERATED_EXT_FUNCS=generated
15192         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15193 else
15194         NCURSES_EXT_FUNCS=0
15195         GENERATED_EXT_FUNCS=
15196 fi
15197
15198 echo "$as_me:15198: checking if you want to build with SCREEN extensions" >&5
15199 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15200
15201 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15202 if test "${enable_sp_funcs+set}" = set; then
15203   enableval="$enable_sp_funcs"
15204   with_sp_funcs=$enableval
15205 else
15206   with_sp_funcs=$cf_dft_ext_spfuncs
15207 fi;
15208 echo "$as_me:15208: result: $with_sp_funcs" >&5
15209 echo "${ECHO_T}$with_sp_funcs" >&6
15210 if test "x$with_sp_funcs" = xyes ; then
15211         NCURSES_SP_FUNCS=1
15212
15213 cat >>confdefs.h <<\EOF
15214 #define NCURSES_SP_FUNCS 1
15215 EOF
15216
15217 cat >>confdefs.h <<\EOF
15218 #define HAVE_TPUTS_SP 1
15219 EOF
15220
15221         GENERATED_SP_FUNCS=generated
15222 else
15223         NCURSES_SP_FUNCS=0
15224         GENERATED_SP_FUNCS=
15225 fi
15226
15227 echo "$as_me:15227: checking if you want to build with terminal-driver" >&5
15228 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15229
15230 # Check whether --enable-term-driver or --disable-term-driver was given.
15231 if test "${enable_term_driver+set}" = set; then
15232   enableval="$enable_term_driver"
15233   with_term_driver=$enableval
15234 else
15235   with_term_driver=no
15236 fi;
15237 echo "$as_me:15237: result: $with_term_driver" >&5
15238 echo "${ECHO_T}$with_term_driver" >&6
15239 if test "x$with_term_driver" = xyes ; then
15240
15241 cat >>confdefs.h <<\EOF
15242 #define USE_TERM_DRIVER 1
15243 EOF
15244
15245         if test "x$with_termlib" != xno ; then
15246                 { { echo "$as_me:15246: error: The term-driver option conflicts with the termlib option" >&5
15247 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15248    { (exit 1); exit 1; }; }
15249         fi
15250         if test "x$with_sp_funcs" != xyes ; then
15251                 { { echo "$as_me:15251: error: The term-driver option relies upon sp-funcs" >&5
15252 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15253    { (exit 1); exit 1; }; }
15254         fi
15255 fi
15256
15257 ###   use option --enable-const to turn on use of const beyond that in XSI.
15258 echo "$as_me:15258: checking for extended use of const keyword" >&5
15259 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15260
15261 # Check whether --enable-const or --disable-const was given.
15262 if test "${enable_const+set}" = set; then
15263   enableval="$enable_const"
15264   with_ext_const=$enableval
15265 else
15266   with_ext_const=$cf_dft_ext_const
15267 fi;
15268 echo "$as_me:15268: result: $with_ext_const" >&5
15269 echo "${ECHO_T}$with_ext_const" >&6
15270 NCURSES_CONST='/*nothing*/'
15271 if test "x$with_ext_const" = xyes ; then
15272         NCURSES_CONST=const
15273 fi
15274
15275 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15276 echo "$as_me:15276: checking if you want to use extended colors" >&5
15277 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15278
15279 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15280 if test "${enable_ext_colors+set}" = set; then
15281   enableval="$enable_ext_colors"
15282   with_ext_colors=$enableval
15283 else
15284   with_ext_colors=$cf_dft_ext_colors
15285 fi;
15286 echo "$as_me:15286: result: $with_ext_colors" >&5
15287 echo "${ECHO_T}$with_ext_colors" >&6
15288 NCURSES_EXT_COLORS=0
15289 if test "x$with_ext_colors" = xyes ; then
15290         if test "x$with_widec" != xyes ; then
15291                 { echo "$as_me:15291: WARNING: This option applies only to wide-character library" >&5
15292 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15293         else
15294                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15295
15296 if test "${with_abi_version+set}" != set; then
15297         case "$cf_cv_rel_version" in
15298         (5.*)
15299                 cf_cv_rel_version=6.0
15300                 cf_cv_abi_version=6
15301                 { echo "$as_me:15301: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15302 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15303                 ;;
15304         esac
15305 fi
15306
15307                 NCURSES_EXT_COLORS=1
15308
15309 cat >>confdefs.h <<\EOF
15310 #define NCURSES_EXT_COLORS 1
15311 EOF
15312
15313 cat >>confdefs.h <<\EOF
15314 #define HAVE_ALLOC_PAIR 1
15315 EOF
15316
15317 cat >>confdefs.h <<\EOF
15318 #define HAVE_INIT_EXTENDED_COLOR 1
15319 EOF
15320
15321 cat >>confdefs.h <<\EOF
15322 #define HAVE_RESET_COLOR_PAIRS 1
15323 EOF
15324
15325         fi
15326 fi
15327
15328 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15329 echo "$as_me:15329: checking if you want to use extended mouse encoding" >&5
15330 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15331
15332 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15333 if test "${enable_ext_mouse+set}" = set; then
15334   enableval="$enable_ext_mouse"
15335   with_ext_mouse=$enableval
15336 else
15337   with_ext_mouse=$cf_dft_ext_mouse
15338 fi;
15339 echo "$as_me:15339: result: $with_ext_mouse" >&5
15340 echo "${ECHO_T}$with_ext_mouse" >&6
15341 if test "x$with_ext_mouse" = xyes ; then
15342
15343 if test "${with_abi_version+set}" != set; then
15344         case "$cf_cv_rel_version" in
15345         (5.*)
15346                 cf_cv_rel_version=6.0
15347                 cf_cv_abi_version=6
15348                 { echo "$as_me:15348: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15349 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15350                 ;;
15351         esac
15352 fi
15353
15354 fi
15355
15356 case $cf_cv_abi_version in
15357 (5)
15358         NCURSES_MOUSE_VERSION=1
15359         ;;
15360 (6)
15361         NCURSES_MOUSE_VERSION=2
15362         ;;
15363 (789)
15364         NCURSES_MOUSE_VERSION=3
15365         ;;
15366 esac
15367
15368 ###   use option --enable-ext-putwin to turn on extended screendumps
15369 echo "$as_me:15369: checking if you want to use extended putwin/screendump" >&5
15370 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15371
15372 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15373 if test "${enable_ext_putwin+set}" = set; then
15374   enableval="$enable_ext_putwin"
15375   with_ext_putwin=$enableval
15376 else
15377   with_ext_putwin=$cf_dft_ext_putwin
15378 fi;
15379 echo "$as_me:15379: result: $with_ext_putwin" >&5
15380 echo "${ECHO_T}$with_ext_putwin" >&6
15381 if test "x$with_ext_putwin" = xyes ; then
15382
15383 cat >>confdefs.h <<\EOF
15384 #define NCURSES_EXT_PUTWIN 1
15385 EOF
15386
15387 fi
15388
15389 echo "$as_me:15389: checking if you want \$NCURSES_NO_PADDING code" >&5
15390 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15391
15392 # Check whether --enable-no-padding or --disable-no-padding was given.
15393 if test "${enable_no_padding+set}" = set; then
15394   enableval="$enable_no_padding"
15395   with_no_padding=$enableval
15396 else
15397   with_no_padding=$with_ext_funcs
15398 fi;
15399 echo "$as_me:15399: result: $with_no_padding" >&5
15400 echo "${ECHO_T}$with_no_padding" >&6
15401 test "x$with_no_padding" = xyes &&
15402 cat >>confdefs.h <<\EOF
15403 #define NCURSES_NO_PADDING 1
15404 EOF
15405
15406 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15407 echo "$as_me:15407: checking if you want SIGWINCH handler" >&5
15408 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15409
15410 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15411 if test "${enable_sigwinch+set}" = set; then
15412   enableval="$enable_sigwinch"
15413   with_sigwinch=$enableval
15414 else
15415   with_sigwinch=$with_ext_funcs
15416 fi;
15417 echo "$as_me:15417: result: $with_sigwinch" >&5
15418 echo "${ECHO_T}$with_sigwinch" >&6
15419 test "x$with_sigwinch" = xyes &&
15420 cat >>confdefs.h <<\EOF
15421 #define USE_SIGWINCH 1
15422 EOF
15423
15424 ###   use option --enable-tcap-names to allow user to define new capabilities
15425 echo "$as_me:15425: checking if you want user-definable terminal capabilities like termcap" >&5
15426 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15427
15428 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15429 if test "${enable_tcap_names+set}" = set; then
15430   enableval="$enable_tcap_names"
15431   with_tcap_names=$enableval
15432 else
15433   with_tcap_names=$with_ext_funcs
15434 fi;
15435 echo "$as_me:15435: result: $with_tcap_names" >&5
15436 echo "${ECHO_T}$with_tcap_names" >&6
15437 NCURSES_XNAMES=0
15438 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15439
15440 ##############################################################################
15441
15442 echo "$as_me:15442: checking if you want to link with the pthread library" >&5
15443 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15444
15445 # Check whether --with-pthread or --without-pthread was given.
15446 if test "${with_pthread+set}" = set; then
15447   withval="$with_pthread"
15448   with_pthread=$withval
15449 else
15450   with_pthread=no
15451 fi;
15452 echo "$as_me:15452: result: $with_pthread" >&5
15453 echo "${ECHO_T}$with_pthread" >&6
15454
15455 if test "$with_pthread" != no ; then
15456         echo "$as_me:15456: checking for pthread.h" >&5
15457 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15458 if test "${ac_cv_header_pthread_h+set}" = set; then
15459   echo $ECHO_N "(cached) $ECHO_C" >&6
15460 else
15461   cat >"conftest.$ac_ext" <<_ACEOF
15462 #line 15462 "configure"
15463 #include "confdefs.h"
15464 #include <pthread.h>
15465 _ACEOF
15466 if { (eval echo "$as_me:15466: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15467   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15468   ac_status=$?
15469   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15470   rm -f conftest.er1
15471   cat conftest.err >&5
15472   echo "$as_me:15472: \$? = $ac_status" >&5
15473   (exit "$ac_status"); } >/dev/null; then
15474   if test -s conftest.err; then
15475     ac_cpp_err=$ac_c_preproc_warn_flag
15476   else
15477     ac_cpp_err=
15478   fi
15479 else
15480   ac_cpp_err=yes
15481 fi
15482 if test -z "$ac_cpp_err"; then
15483   ac_cv_header_pthread_h=yes
15484 else
15485   echo "$as_me: failed program was:" >&5
15486   cat "conftest.$ac_ext" >&5
15487   ac_cv_header_pthread_h=no
15488 fi
15489 rm -f conftest.err "conftest.$ac_ext"
15490 fi
15491 echo "$as_me:15491: result: $ac_cv_header_pthread_h" >&5
15492 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15493 if test "$ac_cv_header_pthread_h" = yes; then
15494
15495 cat >>confdefs.h <<\EOF
15496 #define HAVE_PTHREADS_H 1
15497 EOF
15498
15499         for cf_lib_pthread in pthread c_r
15500         do
15501             echo "$as_me:15501: checking if we can link with the $cf_lib_pthread library" >&5
15502 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15503             cf_save_LIBS="$LIBS"
15504
15505 cf_add_libs="$LIBS"
15506 # reverse order
15507 cf_add_0lib=
15508 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15509 # filter duplicates
15510 for cf_add_1lib in $cf_add_0lib; do
15511         for cf_add_2lib in $cf_add_libs; do
15512                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15513                         cf_add_1lib=
15514                         break
15515                 fi
15516         done
15517         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15518 done
15519 LIBS="$cf_add_libs"
15520
15521             cat >"conftest.$ac_ext" <<_ACEOF
15522 #line 15522 "configure"
15523 #include "confdefs.h"
15524
15525 #include <pthread.h>
15526
15527 int
15528 main (void)
15529 {
15530
15531                 int rc = pthread_create(0,0,0,0);
15532                 int r2 = pthread_mutexattr_settype(0, 0);
15533
15534   ;
15535   return 0;
15536 }
15537 _ACEOF
15538 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15539 if { (eval echo "$as_me:15539: \"$ac_link\"") >&5
15540   (eval $ac_link) 2>&5
15541   ac_status=$?
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit "$ac_status"); } &&
15544          { ac_try='test -s "conftest$ac_exeext"'
15545   { (eval echo "$as_me:15545: \"$ac_try\"") >&5
15546   (eval $ac_try) 2>&5
15547   ac_status=$?
15548   echo "$as_me:15548: \$? = $ac_status" >&5
15549   (exit "$ac_status"); }; }; then
15550   with_pthread=yes
15551 else
15552   echo "$as_me: failed program was:" >&5
15553 cat "conftest.$ac_ext" >&5
15554 with_pthread=no
15555 fi
15556 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15557             LIBS="$cf_save_LIBS"
15558             echo "$as_me:15558: result: $with_pthread" >&5
15559 echo "${ECHO_T}$with_pthread" >&6
15560             test "$with_pthread" = yes && break
15561         done
15562
15563         if test "$with_pthread" = yes ; then
15564
15565 cf_add_libs="$LIBS"
15566 # reverse order
15567 cf_add_0lib=
15568 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15569 # filter duplicates
15570 for cf_add_1lib in $cf_add_0lib; do
15571         for cf_add_2lib in $cf_add_libs; do
15572                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15573                         cf_add_1lib=
15574                         break
15575                 fi
15576         done
15577         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15578 done
15579 LIBS="$cf_add_libs"
15580
15581 cat >>confdefs.h <<\EOF
15582 #define HAVE_LIBPTHREADS 1
15583 EOF
15584
15585         else
15586             { { echo "$as_me:15586: error: Cannot link with pthread library" >&5
15587 echo "$as_me: error: Cannot link with pthread library" >&2;}
15588    { (exit 1); exit 1; }; }
15589         fi
15590
15591 fi
15592
15593 fi
15594
15595 if test "x$with_pthread" != xno; then
15596         echo "$as_me:15596: checking for pthread_kill" >&5
15597 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15598 if test "${ac_cv_func_pthread_kill+set}" = set; then
15599   echo $ECHO_N "(cached) $ECHO_C" >&6
15600 else
15601   cat >"conftest.$ac_ext" <<_ACEOF
15602 #line 15602 "configure"
15603 #include "confdefs.h"
15604 #define pthread_kill autoconf_temporary
15605 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15606 #undef pthread_kill
15607
15608 #ifdef __cplusplus
15609 extern "C"
15610 #endif
15611
15612 /* We use char because int might match the return type of a gcc2
15613    builtin and then its argument prototype would still apply.  */
15614 char pthread_kill (void);
15615
15616 int
15617 main (void)
15618 {
15619
15620 /* The GNU C library defines stubs for functions which it implements
15621     to always fail with ENOSYS.  Some functions are actually named
15622     something starting with __ and the normal name is an alias.  */
15623 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15624 #error found stub for pthread_kill
15625 #endif
15626
15627         return pthread_kill ();
15628   ;
15629   return 0;
15630 }
15631 _ACEOF
15632 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15633 if { (eval echo "$as_me:15633: \"$ac_link\"") >&5
15634   (eval $ac_link) 2>&5
15635   ac_status=$?
15636   echo "$as_me:15636: \$? = $ac_status" >&5
15637   (exit "$ac_status"); } &&
15638          { ac_try='test -s "conftest$ac_exeext"'
15639   { (eval echo "$as_me:15639: \"$ac_try\"") >&5
15640   (eval $ac_try) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit "$ac_status"); }; }; then
15644   ac_cv_func_pthread_kill=yes
15645 else
15646   echo "$as_me: failed program was:" >&5
15647 cat "conftest.$ac_ext" >&5
15648 ac_cv_func_pthread_kill=no
15649 fi
15650 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15651 fi
15652 echo "$as_me:15652: result: $ac_cv_func_pthread_kill" >&5
15653 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15654 if test "$ac_cv_func_pthread_kill" = yes; then
15655
15656                 echo "$as_me:15656: checking if you want to allow EINTR in wgetch with pthreads" >&5
15657 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15658
15659 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15660 if test "${enable_pthreads_eintr+set}" = set; then
15661   enableval="$enable_pthreads_eintr"
15662   use_pthreads_eintr=$enableval
15663 else
15664   use_pthreads_eintr=no
15665 fi;
15666                 echo "$as_me:15666: result: $use_pthreads_eintr" >&5
15667 echo "${ECHO_T}$use_pthreads_eintr" >&6
15668                 if test "x$use_pthreads_eintr" = xyes ; then
15669
15670 cat >>confdefs.h <<\EOF
15671 #define USE_PTHREADS_EINTR 1
15672 EOF
15673
15674                 fi
15675 fi
15676
15677         echo "$as_me:15677: checking if you want to use weak-symbols for pthreads" >&5
15678 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15679
15680 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15681 if test "${enable_weak_symbols+set}" = set; then
15682   enableval="$enable_weak_symbols"
15683   use_weak_symbols=$enableval
15684 else
15685   use_weak_symbols=no
15686 fi;
15687         echo "$as_me:15687: result: $use_weak_symbols" >&5
15688 echo "${ECHO_T}$use_weak_symbols" >&6
15689         if test "x$use_weak_symbols" = xyes ; then
15690
15691 echo "$as_me:15691: checking if $CC supports weak symbols" >&5
15692 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15693 if test "${cf_cv_weak_symbols+set}" = set; then
15694   echo $ECHO_N "(cached) $ECHO_C" >&6
15695 else
15696
15697 cat >"conftest.$ac_ext" <<_ACEOF
15698 #line 15698 "configure"
15699 #include "confdefs.h"
15700
15701 #include <stdio.h>
15702 int
15703 main (void)
15704 {
15705
15706 #if defined(__GNUC__)
15707 #  if defined __USE_ISOC99
15708 #    define _cat_pragma(exp)    _Pragma(#exp)
15709 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15710 #  else
15711 #    define _weak_pragma(exp)
15712 #  endif
15713 #  define _declare(name)        __extension__ extern __typeof__(name) name
15714 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15715 #endif
15716
15717 weak_symbol(fopen);
15718
15719   ;
15720   return 0;
15721 }
15722 _ACEOF
15723 rm -f "conftest.$ac_objext"
15724 if { (eval echo "$as_me:15724: \"$ac_compile\"") >&5
15725   (eval $ac_compile) 2>&5
15726   ac_status=$?
15727   echo "$as_me:15727: \$? = $ac_status" >&5
15728   (exit "$ac_status"); } &&
15729          { ac_try='test -s "conftest.$ac_objext"'
15730   { (eval echo "$as_me:15730: \"$ac_try\"") >&5
15731   (eval $ac_try) 2>&5
15732   ac_status=$?
15733   echo "$as_me:15733: \$? = $ac_status" >&5
15734   (exit "$ac_status"); }; }; then
15735   cf_cv_weak_symbols=yes
15736 else
15737   echo "$as_me: failed program was:" >&5
15738 cat "conftest.$ac_ext" >&5
15739 cf_cv_weak_symbols=no
15740 fi
15741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15742
15743 fi
15744 echo "$as_me:15744: result: $cf_cv_weak_symbols" >&5
15745 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15746
15747         else
15748                 cf_cv_weak_symbols=no
15749         fi
15750
15751         if test "x$cf_cv_weak_symbols" = xyes ; then
15752
15753 cat >>confdefs.h <<\EOF
15754 #define USE_WEAK_SYMBOLS 1
15755 EOF
15756
15757         fi
15758 fi
15759
15760 PTHREAD=
15761 if test "x$with_pthread" = "xyes" ; then
15762
15763 cat >>confdefs.h <<\EOF
15764 #define USE_PTHREADS 1
15765 EOF
15766
15767         enable_reentrant=yes
15768         if test "x$cf_cv_weak_symbols" = xyes ; then
15769                 PTHREAD=-lpthread
15770
15771 cf_add_libs="$PRIVATE_LIBS"
15772 # reverse order
15773 cf_add_0lib=
15774 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15775 # filter duplicates
15776 for cf_add_1lib in $cf_add_0lib; do
15777         for cf_add_2lib in $cf_add_libs; do
15778                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15779                         cf_add_1lib=
15780                         break
15781                 fi
15782         done
15783         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15784 done
15785 PRIVATE_LIBS="$cf_add_libs"
15786
15787         fi
15788 fi
15789
15790 # Reentrant code has to be opaque; there's little advantage to making ncurses
15791 # opaque outside of that, so there is no --enable-opaque option.  We can use
15792 # this option without --with-pthreads, but this will be always set for
15793 # pthreads.
15794 echo "$as_me:15794: checking if you want reentrant code" >&5
15795 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15796
15797 # Check whether --enable-reentrant or --disable-reentrant was given.
15798 if test "${enable_reentrant+set}" = set; then
15799   enableval="$enable_reentrant"
15800   with_reentrant=$enableval
15801 else
15802   with_reentrant=no
15803 fi;
15804 echo "$as_me:15804: result: $with_reentrant" >&5
15805 echo "${ECHO_T}$with_reentrant" >&6
15806 if test "x$with_reentrant" = xyes ; then
15807         cf_cv_enable_reentrant=1
15808         cf_cv_enable_opaque="NCURSES_INTERNALS"
15809         NCURSES_SIZE_T=int
15810         if test "x$cf_cv_weak_symbols" = xyes ; then
15811
15812 # remove pthread library from $LIBS
15813 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15814
15815 cf_add_libs="$TEST_LIBS"
15816 # reverse order
15817 cf_add_0lib=
15818 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15819 # filter duplicates
15820 for cf_add_1lib in $cf_add_0lib; do
15821         for cf_add_2lib in $cf_add_libs; do
15822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15823                         cf_add_1lib=
15824                         break
15825                 fi
15826         done
15827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15828 done
15829 TEST_LIBS="$cf_add_libs"
15830
15831 cf_add_libs="$TEST_LIBS2"
15832 # reverse order
15833 cf_add_0lib=
15834 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15835 # filter duplicates
15836 for cf_add_1lib in $cf_add_0lib; do
15837         for cf_add_2lib in $cf_add_libs; do
15838                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15839                         cf_add_1lib=
15840                         break
15841                 fi
15842         done
15843         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15844 done
15845 TEST_LIBS2="$cf_add_libs"
15846
15847 cf_add_libs="$PRIVATE_LIBS"
15848 # reverse order
15849 cf_add_0lib=
15850 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15851 # filter duplicates
15852 for cf_add_1lib in $cf_add_0lib; do
15853         for cf_add_2lib in $cf_add_libs; do
15854                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15855                         cf_add_1lib=
15856                         break
15857                 fi
15858         done
15859         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15860 done
15861 PRIVATE_LIBS="$cf_add_libs"
15862
15863         else
15864                 # when not using weak symbols but with_reentrant,
15865                 # add 't' to the library suffix on all platforms
15866                 # except cygwin, where we only do that if ALSO
15867                 # compiling with full thread support.
15868                 case "$host" in
15869                 (*cygwin* | *msys*)
15870                         if test "$with_pthread" = "yes" ; then
15871                                 if test "x$disable_lib_suffixes" = "xno" ; then
15872                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15873                                 fi
15874                         fi ;;
15875                 (*)
15876                         if test "x$disable_lib_suffixes" = "xno" ; then
15877                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15878                         fi
15879                         ;;
15880                 esac
15881         fi
15882
15883 cat >>confdefs.h <<\EOF
15884 #define USE_REENTRANT 1
15885 EOF
15886
15887 if test "${with_abi_version+set}" != set; then
15888         case "$cf_cv_rel_version" in
15889         (5.*)
15890                 cf_cv_rel_version=6.0
15891                 cf_cv_abi_version=6
15892                 { echo "$as_me:15892: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15893 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15894                 ;;
15895         esac
15896 fi
15897
15898 else
15899         cf_cv_enable_reentrant=0
15900         cf_cv_enable_opaque="NCURSES_OPAQUE"
15901         NCURSES_SIZE_T=$cf_dft_ordinate_type
15902 fi
15903
15904 echo "$as_me:15904: checking if you want opaque curses-library structures" >&5
15905 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15906
15907 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15908 if test "${enable_opaque_curses+set}" = set; then
15909   enableval="$enable_opaque_curses"
15910   test "$enableval" != yes && enableval=no
15911         if test "$enableval" != "no" ; then
15912     enable_opaque_curses=yes
15913         else
15914
15915          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15916          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15917
15918         fi
15919 else
15920   enableval=no
15921
15922          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15923          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15924
15925 fi;
15926 echo "$as_me:15926: result: $enable_opaque_curses" >&5
15927 echo "${ECHO_T}$enable_opaque_curses" >&6
15928
15929 test "$cf_cv_enable_reentrant" = 1 && \
15930 test "$enable_opaque_curses" = no && \
15931 { { echo "$as_me:15931: error: reentrant configuration requires opaque library" >&5
15932 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15933    { (exit 1); exit 1; }; }
15934
15935 echo "$as_me:15935: checking if you want opaque form-library structures" >&5
15936 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15937
15938 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15939 if test "${enable_opaque_form+set}" = set; then
15940   enableval="$enable_opaque_form"
15941   enable_opaque_form=yes
15942 else
15943   enable_opaque_form=no
15944 fi;
15945 echo "$as_me:15945: result: $enable_opaque_form" >&5
15946 echo "${ECHO_T}$enable_opaque_form" >&6
15947
15948 echo "$as_me:15948: checking if you want opaque menu-library structures" >&5
15949 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15950
15951 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15952 if test "${enable_opaque_menu+set}" = set; then
15953   enableval="$enable_opaque_menu"
15954   enable_opaque_menu=yes
15955 else
15956   enable_opaque_menu=no
15957 fi;
15958 echo "$as_me:15958: result: $enable_opaque_menu" >&5
15959 echo "${ECHO_T}$enable_opaque_menu" >&6
15960
15961 echo "$as_me:15961: checking if you want opaque panel-library structures" >&5
15962 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15963
15964 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15965 if test "${enable_opaque_panel+set}" = set; then
15966   enableval="$enable_opaque_panel"
15967   enable_opaque_panel=yes
15968 else
15969   enable_opaque_panel=no
15970 fi;
15971 echo "$as_me:15971: result: $enable_opaque_panel" >&5
15972 echo "${ECHO_T}$enable_opaque_panel" >&6
15973
15974 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15975 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15976 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15977 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15978
15979 ### Allow using a different wrap-prefix
15980 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15981         echo "$as_me:15981: checking for prefix used to wrap public variables" >&5
15982 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15983
15984 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15985 if test "${with_wrap_prefix+set}" = set; then
15986   withval="$with_wrap_prefix"
15987   NCURSES_WRAP_PREFIX=$withval
15988 else
15989   NCURSES_WRAP_PREFIX=_nc_
15990 fi;
15991         echo "$as_me:15991: result: $NCURSES_WRAP_PREFIX" >&5
15992 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15993 else
15994         NCURSES_WRAP_PREFIX=_nc_
15995 fi
15996
15997 cat >>confdefs.h <<EOF
15998 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15999 EOF
16000
16001 ###############################################################################
16002 # These options are relatively safe to experiment with.
16003
16004 echo "$as_me:16004: checking if you want all development code" >&5
16005 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16006
16007 # Check whether --with-develop or --without-develop was given.
16008 if test "${with_develop+set}" = set; then
16009   withval="$with_develop"
16010   with_develop=$withval
16011 else
16012   with_develop=no
16013 fi;
16014 echo "$as_me:16014: result: $with_develop" >&5
16015 echo "${ECHO_T}$with_develop" >&6
16016
16017 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16018 echo "$as_me:16018: checking if you want hard-tabs code" >&5
16019 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16020
16021 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16022 if test "${enable_hard_tabs+set}" = set; then
16023   enableval="$enable_hard_tabs"
16024
16025 else
16026   enable_hard_tabs=$with_develop
16027 fi;
16028 echo "$as_me:16028: result: $enable_hard_tabs" >&5
16029 echo "${ECHO_T}$enable_hard_tabs" >&6
16030 test "x$enable_hard_tabs" = xyes &&
16031 cat >>confdefs.h <<\EOF
16032 #define USE_HARD_TABS 1
16033 EOF
16034
16035 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16036 echo "$as_me:16036: checking if you want limited support for xmc" >&5
16037 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16038
16039 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16040 if test "${enable_xmc_glitch+set}" = set; then
16041   enableval="$enable_xmc_glitch"
16042
16043 else
16044   enable_xmc_glitch=$with_develop
16045 fi;
16046 echo "$as_me:16046: result: $enable_xmc_glitch" >&5
16047 echo "${ECHO_T}$enable_xmc_glitch" >&6
16048 test "x$enable_xmc_glitch" = xyes &&
16049 cat >>confdefs.h <<\EOF
16050 #define USE_XMC_SUPPORT 1
16051 EOF
16052
16053 ###############################################################################
16054 # These are just experimental, probably should not be in a package:
16055
16056 echo "$as_me:16056: checking if you do not want to assume colors are white-on-black" >&5
16057 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16058
16059 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16060 if test "${enable_assumed_color+set}" = set; then
16061   enableval="$enable_assumed_color"
16062   with_assumed_color=$enableval
16063 else
16064   with_assumed_color=yes
16065 fi;
16066 echo "$as_me:16066: result: $with_assumed_color" >&5
16067 echo "${ECHO_T}$with_assumed_color" >&6
16068 test "x$with_assumed_color" = xyes &&
16069 cat >>confdefs.h <<\EOF
16070 #define USE_ASSUMED_COLOR 1
16071 EOF
16072
16073 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16074 echo "$as_me:16074: checking if you want hashmap scrolling-optimization code" >&5
16075 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16076
16077 # Check whether --enable-hashmap or --disable-hashmap was given.
16078 if test "${enable_hashmap+set}" = set; then
16079   enableval="$enable_hashmap"
16080   with_hashmap=$enableval
16081 else
16082   with_hashmap=yes
16083 fi;
16084 echo "$as_me:16084: result: $with_hashmap" >&5
16085 echo "${ECHO_T}$with_hashmap" >&6
16086 test "x$with_hashmap" = xyes &&
16087 cat >>confdefs.h <<\EOF
16088 #define USE_HASHMAP 1
16089 EOF
16090
16091 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16092 echo "$as_me:16092: checking if you want colorfgbg code" >&5
16093 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16094
16095 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16096 if test "${enable_colorfgbg+set}" = set; then
16097   enableval="$enable_colorfgbg"
16098   with_colorfgbg=$enableval
16099 else
16100   with_colorfgbg=no
16101 fi;
16102 echo "$as_me:16102: result: $with_colorfgbg" >&5
16103 echo "${ECHO_T}$with_colorfgbg" >&6
16104 test "x$with_colorfgbg" = xyes &&
16105 cat >>confdefs.h <<\EOF
16106 #define USE_COLORFGBG 1
16107 EOF
16108
16109 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16110 echo "$as_me:16110: checking if you want to use gcc -fvisibility option" >&5
16111 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16112
16113 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16114 if test "${enable_fvisibility+set}" = set; then
16115   enableval="$enable_fvisibility"
16116   cf_with_fvisibility=$enableval
16117 else
16118   cf_with_fvisibility=no
16119 fi;
16120 echo "$as_me:16120: result: $cf_with_fvisibility" >&5
16121 echo "${ECHO_T}$cf_with_fvisibility" >&6
16122
16123 NCURSES_IMPEXP=
16124 NCURSES_CXX_IMPEXP=
16125 if test "x$cf_with_fvisibility" = xyes; then
16126
16127 echo "$as_me:16127: checking if $CC -fvisibility=hidden option works" >&5
16128 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16129 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16130   echo $ECHO_N "(cached) $ECHO_C" >&6
16131 else
16132
16133     cf_save_cflags="$CFLAGS"
16134     CFLAGS="$CFLAGS -fvisibility=hidden"
16135     cat >"conftest.$ac_ext" <<_ACEOF
16136 #line 16136 "configure"
16137 #include "confdefs.h"
16138
16139 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16140
16141 int
16142 main (void)
16143 {
16144
16145         if (somefunc()) return 1;
16146
16147   ;
16148   return 0;
16149 }
16150 _ACEOF
16151 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16152 if { (eval echo "$as_me:16152: \"$ac_link\"") >&5
16153   (eval $ac_link) 2>&5
16154   ac_status=$?
16155   echo "$as_me:16155: \$? = $ac_status" >&5
16156   (exit "$ac_status"); } &&
16157          { ac_try='test -s "conftest$ac_exeext"'
16158   { (eval echo "$as_me:16158: \"$ac_try\"") >&5
16159   (eval $ac_try) 2>&5
16160   ac_status=$?
16161   echo "$as_me:16161: \$? = $ac_status" >&5
16162   (exit "$ac_status"); }; }; then
16163   cf_cv_fvisibility_hidden=yes
16164 else
16165   echo "$as_me: failed program was:" >&5
16166 cat "conftest.$ac_ext" >&5
16167 cf_cv_fvisibility_hidden=no
16168 fi
16169 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16170     CFLAGS=$cf_save_cflags
16171
16172 fi
16173 echo "$as_me:16173: result: $cf_cv_fvisibility_hidden" >&5
16174 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16175
16176         if test "x$cf_cv_fvisibility_hidden" = xyes
16177         then
16178
16179 cf_fix_cppflags=no
16180 cf_new_cflags=
16181 cf_new_cppflags=
16182 cf_new_extra_cppflags=
16183
16184 for cf_add_cflags in -fvisibility=hidden
16185 do
16186 case "$cf_fix_cppflags" in
16187 (no)
16188         case "$cf_add_cflags" in
16189         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16190                 case "$cf_add_cflags" in
16191                 (-D*)
16192                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16193
16194                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16195                                 && test -z "${cf_tst_cflags}" \
16196                                 && cf_fix_cppflags=yes
16197
16198                         if test "$cf_fix_cppflags" = yes ; then
16199
16200         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16201         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16202
16203                                 continue
16204                         elif test "${cf_tst_cflags}" = "\"'" ; then
16205
16206         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16207         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16208
16209                                 continue
16210                         fi
16211                         ;;
16212                 esac
16213                 case "$CPPFLAGS" in
16214                 (*$cf_add_cflags)
16215                         ;;
16216                 (*)
16217                         case "$cf_add_cflags" in
16218                         (-D*)
16219                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16220
16221 CPPFLAGS=`echo "$CPPFLAGS" | \
16222         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16223                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16224
16225                                 ;;
16226                         esac
16227
16228         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16229         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16230
16231                         ;;
16232                 esac
16233                 ;;
16234         (*)
16235
16236         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16237         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16238
16239                 ;;
16240         esac
16241         ;;
16242 (yes)
16243
16244         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16245         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16246
16247         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16248
16249         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16250                 && test -z "${cf_tst_cflags}" \
16251                 && cf_fix_cppflags=no
16252         ;;
16253 esac
16254 done
16255
16256 if test -n "$cf_new_cflags" ; then
16257
16258         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16259         CFLAGS="${CFLAGS}$cf_new_cflags"
16260
16261 fi
16262
16263 if test -n "$cf_new_cppflags" ; then
16264
16265         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16266         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16267
16268 fi
16269
16270 if test -n "$cf_new_extra_cppflags" ; then
16271
16272         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16273         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16274
16275 fi
16276
16277                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16278         fi
16279         if test -n "$CXX"
16280         then
16281                 ac_ext=cc
16282 ac_cpp='$CXXCPP $CPPFLAGS'
16283 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16284 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16285 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16286 ac_main_return="return"
16287
16288 echo "$as_me:16288: checking if $CXX -fvisibility=hidden option works" >&5
16289 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16290 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16291   echo $ECHO_N "(cached) $ECHO_C" >&6
16292 else
16293
16294     cf_save_cflags="$CXXFLAGS"
16295     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16296     cat >"conftest.$ac_ext" <<_ACEOF
16297 #line 16297 "configure"
16298 #include "confdefs.h"
16299
16300 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16301
16302 int
16303 main (void)
16304 {
16305
16306         if (somefunc()) return 1;
16307
16308   ;
16309   return 0;
16310 }
16311 _ACEOF
16312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16313 if { (eval echo "$as_me:16313: \"$ac_link\"") >&5
16314   (eval $ac_link) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit "$ac_status"); } &&
16318          { ac_try='test -s "conftest$ac_exeext"'
16319   { (eval echo "$as_me:16319: \"$ac_try\"") >&5
16320   (eval $ac_try) 2>&5
16321   ac_status=$?
16322   echo "$as_me:16322: \$? = $ac_status" >&5
16323   (exit "$ac_status"); }; }; then
16324   cf_cv_fvisibility_hidden2=yes
16325 else
16326   echo "$as_me: failed program was:" >&5
16327 cat "conftest.$ac_ext" >&5
16328 cf_cv_fvisibility_hidden2=no
16329 fi
16330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16331     CXXFLAGS=$cf_save_cflags
16332
16333 fi
16334 echo "$as_me:16334: result: $cf_cv_fvisibility_hidden2" >&5
16335 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16336
16337                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16338                 then
16339
16340 cf_save_CXXFLAGS="$CFLAGS"
16341 CFLAGS="$CXXFLAGS"
16342
16343 cf_fix_cppflags=no
16344 cf_new_cflags=
16345 cf_new_cppflags=
16346 cf_new_extra_cppflags=
16347
16348 for cf_add_cflags in -fvisibility=hidden
16349 do
16350 case "$cf_fix_cppflags" in
16351 (no)
16352         case "$cf_add_cflags" in
16353         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16354                 case "$cf_add_cflags" in
16355                 (-D*)
16356                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16357
16358                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16359                                 && test -z "${cf_tst_cflags}" \
16360                                 && cf_fix_cppflags=yes
16361
16362                         if test "$cf_fix_cppflags" = yes ; then
16363
16364         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16365         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16366
16367                                 continue
16368                         elif test "${cf_tst_cflags}" = "\"'" ; then
16369
16370         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16371         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16372
16373                                 continue
16374                         fi
16375                         ;;
16376                 esac
16377                 case "$CPPFLAGS" in
16378                 (*$cf_add_cflags)
16379                         ;;
16380                 (*)
16381                         case "$cf_add_cflags" in
16382                         (-D*)
16383                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16384
16385 CPPFLAGS=`echo "$CPPFLAGS" | \
16386         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16387                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16388
16389                                 ;;
16390                         esac
16391
16392         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16393         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16394
16395                         ;;
16396                 esac
16397                 ;;
16398         (*)
16399
16400         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16401         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16402
16403                 ;;
16404         esac
16405         ;;
16406 (yes)
16407
16408         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16409         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16410
16411         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16412
16413         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16414                 && test -z "${cf_tst_cflags}" \
16415                 && cf_fix_cppflags=no
16416         ;;
16417 esac
16418 done
16419
16420 if test -n "$cf_new_cflags" ; then
16421
16422         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16423         CFLAGS="${CFLAGS}$cf_new_cflags"
16424
16425 fi
16426
16427 if test -n "$cf_new_cppflags" ; then
16428
16429         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16430         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16431
16432 fi
16433
16434 if test -n "$cf_new_extra_cppflags" ; then
16435
16436         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16437         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16438
16439 fi
16440
16441 CXXFLAGS="$CFLAGS"
16442 CFLAGS="$cf_save_CXXFLAGS"
16443
16444                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16445                 fi
16446                 ac_ext=c
16447 ac_cpp='$CPP $CPPFLAGS'
16448 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16449 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16450 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16451 ac_main_return="return"
16452
16453         fi
16454 fi
16455
16456 ###   use option --enable-interop to turn on use of bindings used for interop
16457 echo "$as_me:16457: checking if you want interop bindings" >&5
16458 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16459
16460 # Check whether --enable-interop or --disable-interop was given.
16461 if test "${enable_interop+set}" = set; then
16462   enableval="$enable_interop"
16463   with_exp_interop=$enableval
16464 else
16465   with_exp_interop=$cf_dft_interop
16466 fi;
16467 echo "$as_me:16467: result: $with_exp_interop" >&5
16468 echo "${ECHO_T}$with_exp_interop" >&6
16469
16470 NCURSES_INTEROP_FUNCS=0
16471 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16472
16473 echo "$as_me:16473: checking if you want experimental safe-sprintf code" >&5
16474 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16475
16476 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16477 if test "${enable_safe_sprintf+set}" = set; then
16478   enableval="$enable_safe_sprintf"
16479   with_safe_sprintf=$enableval
16480 else
16481   with_safe_sprintf=no
16482 fi;
16483 echo "$as_me:16483: result: $with_safe_sprintf" >&5
16484 echo "${ECHO_T}$with_safe_sprintf" >&6
16485
16486 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16487 # when hashmap is used scroll hints are useless
16488 if test "$with_hashmap" = no ; then
16489 echo "$as_me:16489: checking if you want to experiment without scrolling-hints code" >&5
16490 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16491
16492 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16493 if test "${enable_scroll_hints+set}" = set; then
16494   enableval="$enable_scroll_hints"
16495   with_scroll_hints=$enableval
16496 else
16497   with_scroll_hints=yes
16498 fi;
16499 echo "$as_me:16499: result: $with_scroll_hints" >&5
16500 echo "${ECHO_T}$with_scroll_hints" >&6
16501 test "x$with_scroll_hints" = xyes &&
16502 cat >>confdefs.h <<\EOF
16503 #define USE_SCROLL_HINTS 1
16504 EOF
16505
16506 fi
16507
16508 echo "$as_me:16508: checking if you want wgetch-events code" >&5
16509 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16510
16511 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16512 if test "${enable_wgetch_events+set}" = set; then
16513   enableval="$enable_wgetch_events"
16514   with_wgetch_events=$enableval
16515 else
16516   with_wgetch_events=no
16517 fi;
16518 echo "$as_me:16518: result: $with_wgetch_events" >&5
16519 echo "${ECHO_T}$with_wgetch_events" >&6
16520 if test "x$with_wgetch_events" = xyes ; then
16521
16522 cat >>confdefs.h <<\EOF
16523 #define NCURSES_WGETCH_EVENTS 1
16524 EOF
16525
16526         NCURSES_WGETCH_EVENTS=1
16527 else
16528         NCURSES_WGETCH_EVENTS=0
16529 fi
16530
16531 case "$cf_cv_system_name" in
16532 (*mingw32*|*mingw64*|*-msvc*)
16533         echo "$as_me:16533: checking if you want experimental-Windows driver" >&5
16534 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16535
16536 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16537 if test "${enable_exp_win32+set}" = set; then
16538   enableval="$enable_exp_win32"
16539   with_exp_win32=$enableval
16540 else
16541   with_exp_win32=no
16542 fi;
16543         echo "$as_me:16543: result: $with_exp_win32" >&5
16544 echo "${ECHO_T}$with_exp_win32" >&6
16545         if test "x$with_exp_win32" = xyes
16546         then
16547
16548 cat >>confdefs.h <<\EOF
16549 #define EXP_WIN32_DRIVER 1
16550 EOF
16551
16552                 EXP_WIN32_DRIVER=1
16553                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16554         else
16555                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16556                 EXP_WIN32_DRIVER=0
16557         fi
16558         ;;
16559 (*)
16560         EXP_WIN32_DRIVER=0
16561         INTERNALS_HDR=
16562         ;;
16563 esac
16564
16565 ###############################################################################
16566
16567 ###     use option --disable-echo to suppress full display compiling commands
16568
16569 echo "$as_me:16569: checking if you want to see long compiling messages" >&5
16570 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16571
16572 # Check whether --enable-echo or --disable-echo was given.
16573 if test "${enable_echo+set}" = set; then
16574   enableval="$enable_echo"
16575   test "$enableval" != no && enableval=yes
16576         if test "$enableval" != "yes" ; then
16577
16578         ECHO_LT='--silent'
16579         ECHO_LD='@echo linking $@;'
16580         RULE_CC='@echo compiling $<'
16581         SHOW_CC='@echo compiling $@'
16582         ECHO_CC='@'
16583
16584         else
16585
16586         ECHO_LT=''
16587         ECHO_LD=''
16588         RULE_CC=''
16589         SHOW_CC=''
16590         ECHO_CC=''
16591
16592         fi
16593 else
16594   enableval=yes
16595
16596         ECHO_LT=''
16597         ECHO_LD=''
16598         RULE_CC=''
16599         SHOW_CC=''
16600         ECHO_CC=''
16601
16602 fi;
16603 echo "$as_me:16603: result: $enableval" >&5
16604 echo "${ECHO_T}$enableval" >&6
16605
16606 if test "x$enable_echo" = xyes; then
16607         ECHO_LINK=
16608 else
16609         ECHO_LINK='@ echo linking $@ ... ;'
16610         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16611         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16612 fi
16613
16614 # --disable-stripping is used for debugging
16615
16616 echo "$as_me:16616: checking if you want to install stripped executables" >&5
16617 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16618
16619 # Check whether --enable-stripping or --disable-stripping was given.
16620 if test "${enable_stripping+set}" = set; then
16621   enableval="$enable_stripping"
16622   test "$enableval" != no && enableval=yes
16623         if test "$enableval" != "yes" ; then
16624     enable_stripping=no
16625         else
16626                 enable_stripping=yes
16627         fi
16628 else
16629   enableval=yes
16630         enable_stripping=yes
16631
16632 fi;
16633 echo "$as_me:16633: result: $enable_stripping" >&5
16634 echo "${ECHO_T}$enable_stripping" >&6
16635
16636 if test "$enable_stripping" = yes
16637 then
16638         INSTALL_OPT_S="-s"
16639 else
16640         INSTALL_OPT_S=
16641 fi
16642
16643 : "${INSTALL:=install}"
16644 echo "$as_me:16644: checking if install accepts -p option" >&5
16645 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16646 if test "${cf_cv_install_p+set}" = set; then
16647   echo $ECHO_N "(cached) $ECHO_C" >&6
16648 else
16649
16650         rm -rf ./conftest*
16651         date >conftest.in
16652         mkdir conftest.out
16653         sleep 3
16654         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16655         then
16656                 if test -f conftest.out/conftest.in
16657                 then
16658                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16659                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16660                         if test -s conftest.err
16661                         then
16662                                 cf_cv_install_p=no
16663                         else
16664                                 cf_cv_install_p=yes
16665                         fi
16666                 else
16667                         cf_cv_install_p=no
16668                 fi
16669         else
16670                 cf_cv_install_p=no
16671         fi
16672         rm -rf ./conftest*
16673
16674 fi
16675 echo "$as_me:16675: result: $cf_cv_install_p" >&5
16676 echo "${ECHO_T}$cf_cv_install_p" >&6
16677
16678 echo "$as_me:16678: checking if install needs to be told about ownership" >&5
16679 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16680 case `$ac_config_guess` in
16681 (*minix)
16682         with_install_o=yes
16683         ;;
16684 (*)
16685         with_install_o=no
16686         ;;
16687 esac
16688
16689 echo "$as_me:16689: result: $with_install_o" >&5
16690 echo "${ECHO_T}$with_install_o" >&6
16691 if test "x$with_install_o" = xyes
16692 then
16693         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'`"
16694 else
16695         INSTALL_OPT_O=
16696 fi
16697
16698 # If we're avoiding relinking of shared libraries during install, that is to
16699 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16700 # the install program has "-p" (for preserving timestamps).
16701 cf_cv_do_reranlib=yes
16702 if test "x$cf_cv_install_p" = xyes
16703 then
16704         if test "x$cf_cv_do_relink" != xyes
16705         then
16706                 cf_cv_do_reranlib=no
16707                 INSTALL_OPT_P="-p"
16708                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16709         fi
16710 fi
16711
16712 ###     use option --enable-warnings to turn on all gcc warnings
16713
16714 echo "$as_me:16714: checking if you want to use C11 _Noreturn feature" >&5
16715 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16716
16717 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16718 if test "${enable_stdnoreturn+set}" = set; then
16719   enableval="$enable_stdnoreturn"
16720   test "$enableval" != yes && enableval=no
16721         if test "$enableval" != "no" ; then
16722     enable_stdnoreturn=yes
16723         else
16724                 enable_stdnoreturn=no
16725         fi
16726 else
16727   enableval=no
16728         enable_stdnoreturn=no
16729
16730 fi;
16731 echo "$as_me:16731: result: $enable_stdnoreturn" >&5
16732 echo "${ECHO_T}$enable_stdnoreturn" >&6
16733
16734 if test $enable_stdnoreturn = yes; then
16735 echo "$as_me:16735: checking for C11 _Noreturn feature" >&5
16736 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16737 if test "${cf_cv_c11_noreturn+set}" = set; then
16738   echo $ECHO_N "(cached) $ECHO_C" >&6
16739 else
16740   cat >"conftest.$ac_ext" <<_ACEOF
16741 #line 16741 "configure"
16742 #include "confdefs.h"
16743
16744 #include <stdio.h>
16745 #include <stdlib.h>
16746 #include <stdnoreturn.h>
16747 static _Noreturn void giveup(void) { exit(0); }
16748
16749 int
16750 main (void)
16751 {
16752 if (feof(stdin)) giveup()
16753   ;
16754   return 0;
16755 }
16756 _ACEOF
16757 rm -f "conftest.$ac_objext"
16758 if { (eval echo "$as_me:16758: \"$ac_compile\"") >&5
16759   (eval $ac_compile) 2>&5
16760   ac_status=$?
16761   echo "$as_me:16761: \$? = $ac_status" >&5
16762   (exit "$ac_status"); } &&
16763          { ac_try='test -s "conftest.$ac_objext"'
16764   { (eval echo "$as_me:16764: \"$ac_try\"") >&5
16765   (eval $ac_try) 2>&5
16766   ac_status=$?
16767   echo "$as_me:16767: \$? = $ac_status" >&5
16768   (exit "$ac_status"); }; }; then
16769   cf_cv_c11_noreturn=yes
16770 else
16771   echo "$as_me: failed program was:" >&5
16772 cat "conftest.$ac_ext" >&5
16773 cf_cv_c11_noreturn=no
16774 fi
16775 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16776
16777 fi
16778 echo "$as_me:16778: result: $cf_cv_c11_noreturn" >&5
16779 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16780 else
16781         cf_cv_c11_noreturn=no,
16782 fi
16783
16784 if test "$cf_cv_c11_noreturn" = yes; then
16785
16786 cat >>confdefs.h <<\EOF
16787 #define HAVE_STDNORETURN_H 1
16788 EOF
16789
16790 cat >>confdefs.h <<EOF
16791 #define STDC_NORETURN _Noreturn
16792 EOF
16793
16794         HAVE_STDNORETURN_H=1
16795 else
16796         HAVE_STDNORETURN_H=0
16797 fi
16798
16799 if test "$GCC" = yes || test "$GXX" = yes
16800 then
16801
16802 if test "$GCC" = yes || test "$GXX" = yes
16803 then
16804         case $CFLAGS in
16805         (*-Werror=*)
16806                 cf_temp_flags=
16807                 for cf_temp_scan in $CFLAGS
16808                 do
16809                         case "x$cf_temp_scan" in
16810                         (x-Werror=format*)
16811
16812         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16813         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16814
16815                                 ;;
16816                         (x-Werror=*)
16817
16818         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16819         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16820
16821                                 ;;
16822                         (*)
16823
16824         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16825         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16826
16827                                 ;;
16828                         esac
16829                 done
16830                 if test "x$CFLAGS" != "x$cf_temp_flags"
16831                 then
16832                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16833
16834 echo "${as_me:-configure}:16834: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16835
16836                         CFLAGS="$cf_temp_flags"
16837                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16838
16839 echo "${as_me:-configure}:16839: testing ... fixed $CFLAGS ..." 1>&5
16840
16841                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16842
16843 echo "${as_me:-configure}:16843: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16844
16845                 fi
16846                 ;;
16847         esac
16848 fi
16849
16850 if test "$GCC" = yes || test "$GXX" = yes
16851 then
16852         case $CPPFLAGS in
16853         (*-Werror=*)
16854                 cf_temp_flags=
16855                 for cf_temp_scan in $CPPFLAGS
16856                 do
16857                         case "x$cf_temp_scan" in
16858                         (x-Werror=format*)
16859
16860         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16861         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16862
16863                                 ;;
16864                         (x-Werror=*)
16865
16866         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16867         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16868
16869                                 ;;
16870                         (*)
16871
16872         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16873         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16874
16875                                 ;;
16876                         esac
16877                 done
16878                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16879                 then
16880                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16881
16882 echo "${as_me:-configure}:16882: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16883
16884                         CPPFLAGS="$cf_temp_flags"
16885                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16886
16887 echo "${as_me:-configure}:16887: testing ... fixed $CPPFLAGS ..." 1>&5
16888
16889                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16890
16891 echo "${as_me:-configure}:16891: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16892
16893                 fi
16894                 ;;
16895         esac
16896 fi
16897
16898 if test "$GCC" = yes || test "$GXX" = yes
16899 then
16900         case $LDFLAGS in
16901         (*-Werror=*)
16902                 cf_temp_flags=
16903                 for cf_temp_scan in $LDFLAGS
16904                 do
16905                         case "x$cf_temp_scan" in
16906                         (x-Werror=format*)
16907
16908         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16909         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16910
16911                                 ;;
16912                         (x-Werror=*)
16913
16914         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16915         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16916
16917                                 ;;
16918                         (*)
16919
16920         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16921         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16922
16923                                 ;;
16924                         esac
16925                 done
16926                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16927                 then
16928                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16929
16930 echo "${as_me:-configure}:16930: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16931
16932                         LDFLAGS="$cf_temp_flags"
16933                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16934
16935 echo "${as_me:-configure}:16935: testing ... fixed $LDFLAGS ..." 1>&5
16936
16937                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16938
16939 echo "${as_me:-configure}:16939: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16940
16941                 fi
16942                 ;;
16943         esac
16944 fi
16945
16946 echo "$as_me:16946: checking if you want to turn on gcc warnings" >&5
16947 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16948
16949 # Check whether --enable-warnings or --disable-warnings was given.
16950 if test "${enable_warnings+set}" = set; then
16951   enableval="$enable_warnings"
16952   test "$enableval" != yes && enableval=no
16953         if test "$enableval" != "no" ; then
16954     enable_warnings=yes
16955         else
16956                 enable_warnings=no
16957         fi
16958 else
16959   enableval=no
16960         enable_warnings=no
16961
16962 fi;
16963 echo "$as_me:16963: result: $enable_warnings" >&5
16964 echo "${ECHO_T}$enable_warnings" >&6
16965 if test "$enable_warnings" = "yes"
16966 then
16967
16968 if test "x$have_x" = xyes; then
16969
16970 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16971 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16972 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16973 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16974 for cf_X_CFLAGS in $X_CFLAGS
16975 do
16976         case "x$cf_X_CFLAGS" in
16977         x-[IUD]*)
16978                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16979                 ;;
16980         *)
16981                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16982                 ;;
16983         esac
16984 done
16985
16986 cat >"conftest.$ac_ext" <<_ACEOF
16987 #line 16987 "configure"
16988 #include "confdefs.h"
16989
16990 #include <stdlib.h>
16991 #include <X11/Intrinsic.h>
16992
16993 int
16994 main (void)
16995 {
16996 String foo = malloc(1); free((void*)foo)
16997   ;
16998   return 0;
16999 }
17000 _ACEOF
17001 rm -f "conftest.$ac_objext"
17002 if { (eval echo "$as_me:17002: \"$ac_compile\"") >&5
17003   (eval $ac_compile) 2>&5
17004   ac_status=$?
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit "$ac_status"); } &&
17007          { ac_try='test -s "conftest.$ac_objext"'
17008   { (eval echo "$as_me:17008: \"$ac_try\"") >&5
17009   (eval $ac_try) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit "$ac_status"); }; }; then
17013
17014 echo "$as_me:17014: checking for X11/Xt const-feature" >&5
17015 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17016 if test "${cf_cv_const_x_string+set}" = set; then
17017   echo $ECHO_N "(cached) $ECHO_C" >&6
17018 else
17019
17020         cat >"conftest.$ac_ext" <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17023
17024 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17025 #undef  XTSTRINGDEFINES /* X11R5 and later */
17026 #include <stdlib.h>
17027 #include <X11/Intrinsic.h>
17028
17029 int
17030 main (void)
17031 {
17032 String foo = malloc(1); *foo = 0
17033   ;
17034   return 0;
17035 }
17036 _ACEOF
17037 rm -f "conftest.$ac_objext"
17038 if { (eval echo "$as_me:17038: \"$ac_compile\"") >&5
17039   (eval $ac_compile) 2>&5
17040   ac_status=$?
17041   echo "$as_me:17041: \$? = $ac_status" >&5
17042   (exit "$ac_status"); } &&
17043          { ac_try='test -s "conftest.$ac_objext"'
17044   { (eval echo "$as_me:17044: \"$ac_try\"") >&5
17045   (eval $ac_try) 2>&5
17046   ac_status=$?
17047   echo "$as_me:17047: \$? = $ac_status" >&5
17048   (exit "$ac_status"); }; }; then
17049
17050                         cf_cv_const_x_string=no
17051
17052 else
17053   echo "$as_me: failed program was:" >&5
17054 cat "conftest.$ac_ext" >&5
17055
17056                         cf_cv_const_x_string=yes
17057
17058 fi
17059 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17060
17061 fi
17062 echo "$as_me:17062: result: $cf_cv_const_x_string" >&5
17063 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17064
17065 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17066 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17067 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17068
17069 case "$cf_cv_const_x_string" in
17070 (no)
17071
17072         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17073         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17074
17075         ;;
17076 (*)
17077
17078         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17079         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17080
17081         ;;
17082 esac
17083
17084 else
17085   echo "$as_me: failed program was:" >&5
17086 cat "conftest.$ac_ext" >&5
17087 fi
17088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17089  fi
17090 cat > "conftest.$ac_ext" <<EOF
17091 #line 17091 "${as_me:-configure}"
17092 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17093 EOF
17094 if test "$INTEL_COMPILER" = yes
17095 then
17096 # The "-wdXXX" options suppress warnings:
17097 # remark #1419: external declaration in primary source file
17098 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17099 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17100 # remark #193: zero used for undefined preprocessing identifier
17101 # remark #593: variable "curs_sb_left_arrow" was set but never used
17102 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17103 # remark #869: parameter "tw" was never referenced
17104 # remark #981: operands are evaluated in unspecified order
17105 # warning #279: controlling expression is constant
17106
17107         { echo "$as_me:17107: checking for $CC warning options..." >&5
17108 echo "$as_me: checking for $CC warning options..." >&6;}
17109         cf_save_CFLAGS="$CFLAGS"
17110         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17111         for cf_opt in \
17112                 wd1419 \
17113                 wd1683 \
17114                 wd1684 \
17115                 wd193 \
17116                 wd593 \
17117                 wd279 \
17118                 wd810 \
17119                 wd869 \
17120                 wd981
17121         do
17122                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17123                 if { (eval echo "$as_me:17123: \"$ac_compile\"") >&5
17124   (eval $ac_compile) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit "$ac_status"); }; then
17128                         test -n "$verbose" && echo "$as_me:17128: result: ... -$cf_opt" >&5
17129 echo "${ECHO_T}... -$cf_opt" >&6
17130                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17131                 fi
17132         done
17133         CFLAGS="$cf_save_CFLAGS"
17134 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17135 then
17136         { echo "$as_me:17136: checking for $CC warning options..." >&5
17137 echo "$as_me: checking for $CC warning options..." >&6;}
17138         cf_save_CFLAGS="$CFLAGS"
17139         cf_warn_CONST=""
17140         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17141         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17142         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17143         for cf_opt in W Wall \
17144                 Wbad-function-cast \
17145                 Wcast-align \
17146                 Wcast-qual \
17147                 Wdeclaration-after-statement \
17148                 Wextra \
17149                 Winline \
17150                 Wmissing-declarations \
17151                 Wmissing-prototypes \
17152                 Wnested-externs \
17153                 Wpointer-arith \
17154                 Wshadow \
17155                 Wstrict-prototypes \
17156                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17157         do
17158                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17159                 if { (eval echo "$as_me:17159: \"$ac_compile\"") >&5
17160   (eval $ac_compile) 2>&5
17161   ac_status=$?
17162   echo "$as_me:17162: \$? = $ac_status" >&5
17163   (exit "$ac_status"); }; then
17164                         test -n "$verbose" && echo "$as_me:17164: result: ... -$cf_opt" >&5
17165 echo "${ECHO_T}... -$cf_opt" >&6
17166                         case "$cf_opt" in
17167                         (Winline)
17168                                 case "$GCC_VERSION" in
17169                                 ([34].*)
17170                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17171
17172 echo "${as_me:-configure}:17172: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17173
17174                                         continue;;
17175                                 esac
17176                                 ;;
17177                         (Wpointer-arith)
17178                                 case "$GCC_VERSION" in
17179                                 ([12].*)
17180                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17181
17182 echo "${as_me:-configure}:17182: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17183
17184                                         continue;;
17185                                 esac
17186                                 ;;
17187                         esac
17188                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17189                 fi
17190         done
17191         CFLAGS="$cf_save_CFLAGS"
17192 fi
17193 rm -rf ./conftest*
17194
17195 fi
17196
17197 if test "$GCC" = yes || test "$GXX" = yes
17198 then
17199 cat > conftest.i <<EOF
17200 #ifndef GCC_PRINTF
17201 #define GCC_PRINTF 0
17202 #endif
17203 #ifndef GCC_SCANF
17204 #define GCC_SCANF 0
17205 #endif
17206 #ifndef GCC_NORETURN
17207 #define GCC_NORETURN /* nothing */
17208 #endif
17209 #ifndef GCC_UNUSED
17210 #define GCC_UNUSED /* nothing */
17211 #endif
17212 EOF
17213 if test "$GCC" = yes
17214 then
17215         { echo "$as_me:17215: checking for $CC __attribute__ directives..." >&5
17216 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17217 cat > "conftest.$ac_ext" <<EOF
17218 #line 17218 "${as_me:-configure}"
17219 #include "confdefs.h"
17220 #include "conftest.h"
17221 #include "conftest.i"
17222 #if     GCC_PRINTF
17223 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17224 #else
17225 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17226 #endif
17227 #if     GCC_SCANF
17228 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17229 #else
17230 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17231 #endif
17232 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17233 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17234 extern GCC_NORETURN void foo(void);
17235 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17236 EOF
17237         cf_printf_attribute=no
17238         cf_scanf_attribute=no
17239         for cf_attribute in scanf printf unused noreturn
17240         do
17241
17242 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17243
17244                 cf_directive="__attribute__(($cf_attribute))"
17245                 echo "checking for $CC $cf_directive" 1>&5
17246
17247                 case "$cf_attribute" in
17248                 (printf)
17249                         cf_printf_attribute=yes
17250                         cat >conftest.h <<EOF
17251 #define GCC_$cf_ATTRIBUTE 1
17252 EOF
17253                         ;;
17254                 (scanf)
17255                         cf_scanf_attribute=yes
17256                         cat >conftest.h <<EOF
17257 #define GCC_$cf_ATTRIBUTE 1
17258 EOF
17259                         ;;
17260                 (*)
17261                         cat >conftest.h <<EOF
17262 #define GCC_$cf_ATTRIBUTE $cf_directive
17263 EOF
17264                         ;;
17265                 esac
17266
17267                 if { (eval echo "$as_me:17267: \"$ac_compile\"") >&5
17268   (eval $ac_compile) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit "$ac_status"); }; then
17272                         test -n "$verbose" && echo "$as_me:17272: result: ... $cf_attribute" >&5
17273 echo "${ECHO_T}... $cf_attribute" >&6
17274                         cat conftest.h >>confdefs.h
17275                         case "$cf_attribute" in
17276                         (noreturn)
17277
17278 cat >>confdefs.h <<EOF
17279 #define GCC_NORETURN $cf_directive
17280 EOF
17281
17282                                 ;;
17283                         (printf)
17284                                 cf_value='/* nothing */'
17285                                 if test "$cf_printf_attribute" != no ; then
17286                                         cf_value='__attribute__((format(printf,fmt,var)))'
17287
17288 cat >>confdefs.h <<\EOF
17289 #define GCC_PRINTF 1
17290 EOF
17291
17292                                 fi
17293
17294 cat >>confdefs.h <<EOF
17295 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17296 EOF
17297
17298                                 ;;
17299                         (scanf)
17300                                 cf_value='/* nothing */'
17301                                 if test "$cf_scanf_attribute" != no ; then
17302                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17303
17304 cat >>confdefs.h <<\EOF
17305 #define GCC_SCANF 1
17306 EOF
17307
17308                                 fi
17309
17310 cat >>confdefs.h <<EOF
17311 #define GCC_SCANFLIKE(fmt,var) $cf_value
17312 EOF
17313
17314                                 ;;
17315                         (unused)
17316
17317 cat >>confdefs.h <<EOF
17318 #define GCC_UNUSED $cf_directive
17319 EOF
17320
17321                                 ;;
17322                         esac
17323                 fi
17324         done
17325 else
17326         ${FGREP-fgrep} define conftest.i >>confdefs.h
17327 fi
17328 rm -rf ./conftest*
17329 fi
17330
17331 fi
17332
17333 if test "x$enable_warnings" = "xyes"; then
17334
17335         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17336
17337         if test "x$cf_with_cxx" = xyes ; then
17338
17339 INTEL_CPLUSPLUS=no
17340
17341 if test "$GCC" = yes ; then
17342         case "$host_os" in
17343         (linux*|gnu*)
17344                 echo "$as_me:17344: checking if this is really Intel C++ compiler" >&5
17345 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17346                 cf_save_CFLAGS="$CXXFLAGS"
17347                 CXXFLAGS="$CXXFLAGS -no-gcc"
17348                 cat >"conftest.$ac_ext" <<_ACEOF
17349 #line 17349 "configure"
17350 #include "confdefs.h"
17351
17352 int
17353 main (void)
17354 {
17355
17356 #ifdef __INTEL_COMPILER
17357 #else
17358 make an error
17359 #endif
17360
17361   ;
17362   return 0;
17363 }
17364 _ACEOF
17365 rm -f "conftest.$ac_objext"
17366 if { (eval echo "$as_me:17366: \"$ac_compile\"") >&5
17367   (eval $ac_compile) 2>&5
17368   ac_status=$?
17369   echo "$as_me:17369: \$? = $ac_status" >&5
17370   (exit "$ac_status"); } &&
17371          { ac_try='test -s "conftest.$ac_objext"'
17372   { (eval echo "$as_me:17372: \"$ac_try\"") >&5
17373   (eval $ac_try) 2>&5
17374   ac_status=$?
17375   echo "$as_me:17375: \$? = $ac_status" >&5
17376   (exit "$ac_status"); }; }; then
17377   INTEL_CPLUSPLUS=yes
17378 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17379
17380 else
17381   echo "$as_me: failed program was:" >&5
17382 cat "conftest.$ac_ext" >&5
17383 fi
17384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17385                 CXXFLAGS="$cf_save_CFLAGS"
17386                 echo "$as_me:17386: result: $INTEL_CPLUSPLUS" >&5
17387 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17388                 ;;
17389         esac
17390 fi
17391
17392 CLANG_CPLUSPLUS=no
17393
17394 if test "$GCC" = yes ; then
17395         echo "$as_me:17395: checking if this is really Clang C++ compiler" >&5
17396 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17397         cf_save_CFLAGS="$CXXFLAGS"
17398         cat >"conftest.$ac_ext" <<_ACEOF
17399 #line 17399 "configure"
17400 #include "confdefs.h"
17401
17402 int
17403 main (void)
17404 {
17405
17406 #ifdef __clang__
17407 #else
17408 make an error
17409 #endif
17410
17411   ;
17412   return 0;
17413 }
17414 _ACEOF
17415 rm -f "conftest.$ac_objext"
17416 if { (eval echo "$as_me:17416: \"$ac_compile\"") >&5
17417   (eval $ac_compile) 2>&5
17418   ac_status=$?
17419   echo "$as_me:17419: \$? = $ac_status" >&5
17420   (exit "$ac_status"); } &&
17421          { ac_try='test -s "conftest.$ac_objext"'
17422   { (eval echo "$as_me:17422: \"$ac_try\"") >&5
17423   (eval $ac_try) 2>&5
17424   ac_status=$?
17425   echo "$as_me:17425: \$? = $ac_status" >&5
17426   (exit "$ac_status"); }; }; then
17427   CLANG_CPLUSPLUS=yes
17428
17429 else
17430   echo "$as_me: failed program was:" >&5
17431 cat "conftest.$ac_ext" >&5
17432 fi
17433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17434         CXXFLAGS="$cf_save_CFLAGS"
17435         echo "$as_me:17435: result: $CLANG_CPLUSPLUS" >&5
17436 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17437 fi
17438
17439 CLANG_VERSION=none
17440
17441 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17442         case "$CC" in
17443         (c[1-9][0-9]|*/c[1-9][0-9])
17444                 { echo "$as_me:17444: WARNING: replacing broken compiler alias $CC" >&5
17445 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17446                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17447                 CC=clang
17448                 ;;
17449         esac
17450
17451         echo "$as_me:17451: checking version of $CC" >&5
17452 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17453         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.].*//'`"
17454         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17455         echo "$as_me:17455: result: $CLANG_VERSION" >&5
17456 echo "${ECHO_T}$CLANG_VERSION" >&6
17457
17458         for cf_clang_opt in \
17459                 -Qunused-arguments \
17460                 -Wno-error=implicit-function-declaration
17461         do
17462                 echo "$as_me:17462: checking if option $cf_clang_opt works" >&5
17463 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17464                 cf_save_CFLAGS="$CFLAGS"
17465                 CFLAGS="$CFLAGS $cf_clang_opt"
17466                 cat >"conftest.$ac_ext" <<_ACEOF
17467 #line 17467 "configure"
17468 #include "confdefs.h"
17469
17470                         #include <stdio.h>
17471 int
17472 main (void)
17473 {
17474
17475                         printf("hello!\\n");
17476   ;
17477   return 0;
17478 }
17479 _ACEOF
17480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17481 if { (eval echo "$as_me:17481: \"$ac_link\"") >&5
17482   (eval $ac_link) 2>&5
17483   ac_status=$?
17484   echo "$as_me:17484: \$? = $ac_status" >&5
17485   (exit "$ac_status"); } &&
17486          { ac_try='test -s "conftest$ac_exeext"'
17487   { (eval echo "$as_me:17487: \"$ac_try\"") >&5
17488   (eval $ac_try) 2>&5
17489   ac_status=$?
17490   echo "$as_me:17490: \$? = $ac_status" >&5
17491   (exit "$ac_status"); }; }; then
17492
17493                         cf_clang_optok=yes
17494 else
17495   echo "$as_me: failed program was:" >&5
17496 cat "conftest.$ac_ext" >&5
17497
17498                         cf_clang_optok=no
17499 fi
17500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17501                 echo "$as_me:17501: result: $cf_clang_optok" >&5
17502 echo "${ECHO_T}$cf_clang_optok" >&6
17503                 CFLAGS="$cf_save_CFLAGS"
17504                 if test "$cf_clang_optok" = yes; then
17505                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17506
17507 echo "${as_me:-configure}:17507: testing adding option $cf_clang_opt ..." 1>&5
17508
17509         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17510         CFLAGS="${CFLAGS}$cf_clang_opt"
17511
17512                 fi
17513         done
17514 fi
17515
17516 ac_ext=cc
17517 ac_cpp='$CXXCPP $CPPFLAGS'
17518 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17519 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17520 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17521 ac_main_return="return"
17522
17523 cat > conftest.$ac_ext <<EOF
17524 #line 17524 "configure"
17525 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17526 EOF
17527
17528 if test "$INTEL_CPLUSPLUS" = yes
17529 then
17530 # The "-wdXXX" options suppress warnings:
17531 # remark #1419: external declaration in primary source file
17532 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17533 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17534 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17535 # remark #193: zero used for undefined preprocessing identifier
17536 # remark #593: variable "curs_sb_left_arrow" was set but never used
17537 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17538 # remark #869: parameter "tw" was never referenced
17539 # remark #981: operands are evaluated in unspecified order
17540 # warning #269: invalid format string conversion
17541
17542         { echo "$as_me:17542: checking for $CC warning options..." >&5
17543 echo "$as_me: checking for $CC warning options..." >&6;}
17544         cf_save_CXXFLAGS="$CXXFLAGS"
17545         EXTRA_CXXFLAGS="-Wall"
17546         for cf_opt in \
17547                 wd1419 \
17548                 wd1682 \
17549                 wd1683 \
17550                 wd1684 \
17551                 wd193 \
17552                 wd279 \
17553                 wd593 \
17554                 wd810 \
17555                 wd869 \
17556                 wd981
17557         do
17558                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17559                 if { (eval echo "$as_me:17559: \"$ac_compile\"") >&5
17560   (eval $ac_compile) 2>&5
17561   ac_status=$?
17562   echo "$as_me:17562: \$? = $ac_status" >&5
17563   (exit "$ac_status"); }; then
17564                         test -n "$verbose" && echo "$as_me:17564: result: ... -$cf_opt" >&5
17565 echo "${ECHO_T}... -$cf_opt" >&6
17566                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17567                 fi
17568         done
17569         CXXFLAGS="$cf_save_CXXFLAGS"
17570
17571 elif test "$GXX" = yes
17572 then
17573         { echo "$as_me:17573: checking for $CXX warning options..." >&5
17574 echo "$as_me: checking for $CXX warning options..." >&6;}
17575         cf_save_CXXFLAGS="$CXXFLAGS"
17576         EXTRA_CXXFLAGS="-W -Wall"
17577         cf_gxx_extra_warnings=""
17578         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17579         case "$GXX_VERSION" in
17580         ([1-2].*)
17581                 ;;
17582         (*)
17583                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17584                 ;;
17585         esac
17586         for cf_opt in \
17587                 Wabi \
17588                 fabi-version=0 \
17589                 Wextra \
17590                 Wignored-qualifiers \
17591                 Wlogical-op \
17592                 Woverloaded-virtual \
17593                 Wsign-promo \
17594                 Wsynth \
17595                 Wold-style-cast \
17596                 Wcast-align \
17597                 Wcast-qual \
17598                 Wpointer-arith \
17599                 Wshadow \
17600                 Wundef $cf_gxx_extra_warnings Wno-unused
17601         do
17602                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17603                 if { (eval echo "$as_me:17603: \"$ac_compile\"") >&5
17604   (eval $ac_compile) 2>&5
17605   ac_status=$?
17606   echo "$as_me:17606: \$? = $ac_status" >&5
17607   (exit "$ac_status"); }; then
17608                         test -n "$verbose" && echo "$as_me:17608: result: ... -$cf_opt" >&5
17609 echo "${ECHO_T}... -$cf_opt" >&6
17610                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17611                 else
17612                         test -n "$verbose" && echo "$as_me:17612: result: ... no -$cf_opt" >&5
17613 echo "${ECHO_T}... no -$cf_opt" >&6
17614                 fi
17615         done
17616         CXXFLAGS="$cf_save_CXXFLAGS"
17617 fi
17618
17619 rm -rf ./conftest*
17620 ac_ext=c
17621 ac_cpp='$CPP $CPPFLAGS'
17622 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17623 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17624 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17625 ac_main_return="return"
17626
17627         fi
17628 fi
17629
17630 echo "$as_me:17630: checking if you want to work around bogus compiler/loader warnings" >&5
17631 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17632
17633 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17634 if test "${enable_string_hacks+set}" = set; then
17635   enableval="$enable_string_hacks"
17636   enable_string_hacks=$enableval
17637 else
17638   enable_string_hacks=no
17639 fi;
17640 echo "$as_me:17640: result: $enable_string_hacks" >&5
17641 echo "${ECHO_T}$enable_string_hacks" >&6
17642
17643 if test "x$enable_string_hacks" = "xyes"; then
17644
17645 cat >>confdefs.h <<\EOF
17646 #define USE_STRING_HACKS 1
17647 EOF
17648
17649         { echo "$as_me:17649: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17650 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17651         echo "$as_me:17651: checking for strlcat" >&5
17652 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17653 if test "${ac_cv_func_strlcat+set}" = set; then
17654   echo $ECHO_N "(cached) $ECHO_C" >&6
17655 else
17656   cat >"conftest.$ac_ext" <<_ACEOF
17657 #line 17657 "configure"
17658 #include "confdefs.h"
17659 #define strlcat autoconf_temporary
17660 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17661 #undef strlcat
17662
17663 #ifdef __cplusplus
17664 extern "C"
17665 #endif
17666
17667 /* We use char because int might match the return type of a gcc2
17668    builtin and then its argument prototype would still apply.  */
17669 char strlcat (void);
17670
17671 int
17672 main (void)
17673 {
17674
17675 /* The GNU C library defines stubs for functions which it implements
17676     to always fail with ENOSYS.  Some functions are actually named
17677     something starting with __ and the normal name is an alias.  */
17678 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17679 #error found stub for strlcat
17680 #endif
17681
17682         return strlcat ();
17683   ;
17684   return 0;
17685 }
17686 _ACEOF
17687 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17688 if { (eval echo "$as_me:17688: \"$ac_link\"") >&5
17689   (eval $ac_link) 2>&5
17690   ac_status=$?
17691   echo "$as_me:17691: \$? = $ac_status" >&5
17692   (exit "$ac_status"); } &&
17693          { ac_try='test -s "conftest$ac_exeext"'
17694   { (eval echo "$as_me:17694: \"$ac_try\"") >&5
17695   (eval $ac_try) 2>&5
17696   ac_status=$?
17697   echo "$as_me:17697: \$? = $ac_status" >&5
17698   (exit "$ac_status"); }; }; then
17699   ac_cv_func_strlcat=yes
17700 else
17701   echo "$as_me: failed program was:" >&5
17702 cat "conftest.$ac_ext" >&5
17703 ac_cv_func_strlcat=no
17704 fi
17705 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17706 fi
17707 echo "$as_me:17707: result: $ac_cv_func_strlcat" >&5
17708 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17709 if test "$ac_cv_func_strlcat" = yes; then
17710
17711 cat >>confdefs.h <<\EOF
17712 #define HAVE_STRLCAT 1
17713 EOF
17714
17715 else
17716
17717                 echo "$as_me:17717: checking for strlcat in -lbsd" >&5
17718 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17719 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17720   echo $ECHO_N "(cached) $ECHO_C" >&6
17721 else
17722   ac_check_lib_save_LIBS=$LIBS
17723 LIBS="-lbsd  $LIBS"
17724 cat >"conftest.$ac_ext" <<_ACEOF
17725 #line 17725 "configure"
17726 #include "confdefs.h"
17727
17728 /* Override any gcc2 internal prototype to avoid an error.  */
17729 #ifdef __cplusplus
17730 extern "C"
17731 #endif
17732 /* We use char because int might match the return type of a gcc2
17733    builtin and then its argument prototype would still apply.  */
17734 char strlcat ();
17735 int
17736 main (void)
17737 {
17738 strlcat ();
17739   ;
17740   return 0;
17741 }
17742 _ACEOF
17743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17744 if { (eval echo "$as_me:17744: \"$ac_link\"") >&5
17745   (eval $ac_link) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit "$ac_status"); } &&
17749          { ac_try='test -s "conftest$ac_exeext"'
17750   { (eval echo "$as_me:17750: \"$ac_try\"") >&5
17751   (eval $ac_try) 2>&5
17752   ac_status=$?
17753   echo "$as_me:17753: \$? = $ac_status" >&5
17754   (exit "$ac_status"); }; }; then
17755   ac_cv_lib_bsd_strlcat=yes
17756 else
17757   echo "$as_me: failed program was:" >&5
17758 cat "conftest.$ac_ext" >&5
17759 ac_cv_lib_bsd_strlcat=no
17760 fi
17761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17762 LIBS=$ac_check_lib_save_LIBS
17763 fi
17764 echo "$as_me:17764: result: $ac_cv_lib_bsd_strlcat" >&5
17765 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17766 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17767
17768 cf_add_libs="$LIBS"
17769 # reverse order
17770 cf_add_0lib=
17771 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17772 # filter duplicates
17773 for cf_add_1lib in $cf_add_0lib; do
17774         for cf_add_2lib in $cf_add_libs; do
17775                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17776                         cf_add_1lib=
17777                         break
17778                 fi
17779         done
17780         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17781 done
17782 LIBS="$cf_add_libs"
17783
17784 for ac_header in bsd/string.h
17785 do
17786 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17787 echo "$as_me:17787: checking for $ac_header" >&5
17788 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17789 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17790   echo $ECHO_N "(cached) $ECHO_C" >&6
17791 else
17792   cat >"conftest.$ac_ext" <<_ACEOF
17793 #line 17793 "configure"
17794 #include "confdefs.h"
17795 #include <$ac_header>
17796 _ACEOF
17797 if { (eval echo "$as_me:17797: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17798   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17799   ac_status=$?
17800   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17801   rm -f conftest.er1
17802   cat conftest.err >&5
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit "$ac_status"); } >/dev/null; then
17805   if test -s conftest.err; then
17806     ac_cpp_err=$ac_c_preproc_warn_flag
17807   else
17808     ac_cpp_err=
17809   fi
17810 else
17811   ac_cpp_err=yes
17812 fi
17813 if test -z "$ac_cpp_err"; then
17814   eval "$as_ac_Header=yes"
17815 else
17816   echo "$as_me: failed program was:" >&5
17817   cat "conftest.$ac_ext" >&5
17818   eval "$as_ac_Header=no"
17819 fi
17820 rm -f conftest.err "conftest.$ac_ext"
17821 fi
17822 echo "$as_me:17822: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17823 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17824 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17825   cat >>confdefs.h <<EOF
17826 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17827 EOF
17828
17829 fi
17830 done
17831
17832 cat >>confdefs.h <<\EOF
17833 #define HAVE_STRLCAT 1
17834 EOF
17835
17836 fi
17837
17838 fi
17839
17840 for ac_func in strlcpy snprintf
17841 do
17842 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17843 echo "$as_me:17843: checking for $ac_func" >&5
17844 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17845 if eval "test \"\${$as_ac_var+set}\" = set"; then
17846   echo $ECHO_N "(cached) $ECHO_C" >&6
17847 else
17848   cat >"conftest.$ac_ext" <<_ACEOF
17849 #line 17849 "configure"
17850 #include "confdefs.h"
17851 #define $ac_func autoconf_temporary
17852 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17853 #undef $ac_func
17854
17855 #ifdef __cplusplus
17856 extern "C"
17857 #endif
17858
17859 /* We use char because int might match the return type of a gcc2
17860    builtin and then its argument prototype would still apply.  */
17861 char $ac_func (void);
17862
17863 int
17864 main (void)
17865 {
17866
17867 /* The GNU C library defines stubs for functions which it implements
17868     to always fail with ENOSYS.  Some functions are actually named
17869     something starting with __ and the normal name is an alias.  */
17870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17871 #error found stub for $ac_func
17872 #endif
17873
17874         return $ac_func ();
17875   ;
17876   return 0;
17877 }
17878 _ACEOF
17879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17880 if { (eval echo "$as_me:17880: \"$ac_link\"") >&5
17881   (eval $ac_link) 2>&5
17882   ac_status=$?
17883   echo "$as_me:17883: \$? = $ac_status" >&5
17884   (exit "$ac_status"); } &&
17885          { ac_try='test -s "conftest$ac_exeext"'
17886   { (eval echo "$as_me:17886: \"$ac_try\"") >&5
17887   (eval $ac_try) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit "$ac_status"); }; }; then
17891   eval "$as_ac_var=yes"
17892 else
17893   echo "$as_me: failed program was:" >&5
17894 cat "conftest.$ac_ext" >&5
17895 eval "$as_ac_var=no"
17896 fi
17897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17898 fi
17899 echo "$as_me:17899: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17900 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17901 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17902   cat >>confdefs.h <<EOF
17903 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17904 EOF
17905
17906 fi
17907 done
17908
17909 fi
17910
17911 ###     use option --enable-assertions to turn on generation of assertion code
17912 echo "$as_me:17912: checking if you want to enable runtime assertions" >&5
17913 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17914
17915 # Check whether --enable-assertions or --disable-assertions was given.
17916 if test "${enable_assertions+set}" = set; then
17917   enableval="$enable_assertions"
17918   with_assertions=$enableval
17919 else
17920   with_assertions=no
17921 fi;
17922 echo "$as_me:17922: result: $with_assertions" >&5
17923 echo "${ECHO_T}$with_assertions" >&6
17924 if test -n "$GCC"
17925 then
17926         if test "$with_assertions" = no
17927         then
17928                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17929         else
17930
17931         ADAFLAGS="$ADAFLAGS -gnata"
17932
17933         fi
17934 fi
17935
17936 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17937
17938 echo "$as_me:17938: checking if you want to use dmalloc for testing" >&5
17939 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17940
17941 # Check whether --with-dmalloc or --without-dmalloc was given.
17942 if test "${with_dmalloc+set}" = set; then
17943   withval="$with_dmalloc"
17944   case "x$withval" in
17945         (x|xno) ;;
17946         (*)
17947                 : "${with_cflags:=-g}"
17948                 : "${enable_leaks:=no}"
17949                 with_dmalloc=yes
17950
17951 cat >>confdefs.h <<EOF
17952 #define USE_DMALLOC 1
17953 EOF
17954
17955                 ;;
17956         esac
17957 else
17958   with_dmalloc=
17959 fi;
17960 echo "$as_me:17960: result: ${with_dmalloc:-no}" >&5
17961 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17962
17963 case ".$with_cflags" in
17964 (.*-g*)
17965         case .$CFLAGS in
17966         (.*-g*)
17967                 ;;
17968         (*)
17969
17970 cf_fix_cppflags=no
17971 cf_new_cflags=
17972 cf_new_cppflags=
17973 cf_new_extra_cppflags=
17974
17975 for cf_add_cflags in -g
17976 do
17977 case "$cf_fix_cppflags" in
17978 (no)
17979         case "$cf_add_cflags" in
17980         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17981                 case "$cf_add_cflags" in
17982                 (-D*)
17983                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17984
17985                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17986                                 && test -z "${cf_tst_cflags}" \
17987                                 && cf_fix_cppflags=yes
17988
17989                         if test "$cf_fix_cppflags" = yes ; then
17990
17991         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17992         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17993
17994                                 continue
17995                         elif test "${cf_tst_cflags}" = "\"'" ; then
17996
17997         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17998         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17999
18000                                 continue
18001                         fi
18002                         ;;
18003                 esac
18004                 case "$CPPFLAGS" in
18005                 (*$cf_add_cflags)
18006                         ;;
18007                 (*)
18008                         case "$cf_add_cflags" in
18009                         (-D*)
18010                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18011
18012 CPPFLAGS=`echo "$CPPFLAGS" | \
18013         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18014                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18015
18016                                 ;;
18017                         esac
18018
18019         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18020         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18021
18022                         ;;
18023                 esac
18024                 ;;
18025         (*)
18026
18027         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18028         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18029
18030                 ;;
18031         esac
18032         ;;
18033 (yes)
18034
18035         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18036         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18037
18038         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18039
18040         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18041                 && test -z "${cf_tst_cflags}" \
18042                 && cf_fix_cppflags=no
18043         ;;
18044 esac
18045 done
18046
18047 if test -n "$cf_new_cflags" ; then
18048
18049         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18050         CFLAGS="${CFLAGS}$cf_new_cflags"
18051
18052 fi
18053
18054 if test -n "$cf_new_cppflags" ; then
18055
18056         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18057         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18058
18059 fi
18060
18061 if test -n "$cf_new_extra_cppflags" ; then
18062
18063         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18064         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18065
18066 fi
18067
18068                 ;;
18069         esac
18070         ;;
18071 esac
18072
18073 if test "$with_dmalloc" = yes ; then
18074         echo "$as_me:18074: checking for dmalloc.h" >&5
18075 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18076 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18077   echo $ECHO_N "(cached) $ECHO_C" >&6
18078 else
18079   cat >"conftest.$ac_ext" <<_ACEOF
18080 #line 18080 "configure"
18081 #include "confdefs.h"
18082 #include <dmalloc.h>
18083 _ACEOF
18084 if { (eval echo "$as_me:18084: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18085   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18086   ac_status=$?
18087   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18088   rm -f conftest.er1
18089   cat conftest.err >&5
18090   echo "$as_me:18090: \$? = $ac_status" >&5
18091   (exit "$ac_status"); } >/dev/null; then
18092   if test -s conftest.err; then
18093     ac_cpp_err=$ac_c_preproc_warn_flag
18094   else
18095     ac_cpp_err=
18096   fi
18097 else
18098   ac_cpp_err=yes
18099 fi
18100 if test -z "$ac_cpp_err"; then
18101   ac_cv_header_dmalloc_h=yes
18102 else
18103   echo "$as_me: failed program was:" >&5
18104   cat "conftest.$ac_ext" >&5
18105   ac_cv_header_dmalloc_h=no
18106 fi
18107 rm -f conftest.err "conftest.$ac_ext"
18108 fi
18109 echo "$as_me:18109: result: $ac_cv_header_dmalloc_h" >&5
18110 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18111 if test "$ac_cv_header_dmalloc_h" = yes; then
18112
18113 echo "$as_me:18113: checking for dmalloc_debug in -ldmalloc" >&5
18114 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18115 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18116   echo $ECHO_N "(cached) $ECHO_C" >&6
18117 else
18118   ac_check_lib_save_LIBS=$LIBS
18119 LIBS="-ldmalloc  $LIBS"
18120 cat >"conftest.$ac_ext" <<_ACEOF
18121 #line 18121 "configure"
18122 #include "confdefs.h"
18123
18124 /* Override any gcc2 internal prototype to avoid an error.  */
18125 #ifdef __cplusplus
18126 extern "C"
18127 #endif
18128 /* We use char because int might match the return type of a gcc2
18129    builtin and then its argument prototype would still apply.  */
18130 char dmalloc_debug ();
18131 int
18132 main (void)
18133 {
18134 dmalloc_debug ();
18135   ;
18136   return 0;
18137 }
18138 _ACEOF
18139 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18140 if { (eval echo "$as_me:18140: \"$ac_link\"") >&5
18141   (eval $ac_link) 2>&5
18142   ac_status=$?
18143   echo "$as_me:18143: \$? = $ac_status" >&5
18144   (exit "$ac_status"); } &&
18145          { ac_try='test -s "conftest$ac_exeext"'
18146   { (eval echo "$as_me:18146: \"$ac_try\"") >&5
18147   (eval $ac_try) 2>&5
18148   ac_status=$?
18149   echo "$as_me:18149: \$? = $ac_status" >&5
18150   (exit "$ac_status"); }; }; then
18151   ac_cv_lib_dmalloc_dmalloc_debug=yes
18152 else
18153   echo "$as_me: failed program was:" >&5
18154 cat "conftest.$ac_ext" >&5
18155 ac_cv_lib_dmalloc_dmalloc_debug=no
18156 fi
18157 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18158 LIBS=$ac_check_lib_save_LIBS
18159 fi
18160 echo "$as_me:18160: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18161 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18162 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18163   cat >>confdefs.h <<EOF
18164 #define HAVE_LIBDMALLOC 1
18165 EOF
18166
18167   LIBS="-ldmalloc $LIBS"
18168
18169 fi
18170
18171 fi
18172
18173 fi
18174
18175 echo "$as_me:18175: checking if you want to use dbmalloc for testing" >&5
18176 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18177
18178 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18179 if test "${with_dbmalloc+set}" = set; then
18180   withval="$with_dbmalloc"
18181   case "x$withval" in
18182         (x|xno) ;;
18183         (*)
18184                 : "${with_cflags:=-g}"
18185                 : "${enable_leaks:=no}"
18186                 with_dbmalloc=yes
18187
18188 cat >>confdefs.h <<EOF
18189 #define USE_DBMALLOC 1
18190 EOF
18191
18192                 ;;
18193         esac
18194 else
18195   with_dbmalloc=
18196 fi;
18197 echo "$as_me:18197: result: ${with_dbmalloc:-no}" >&5
18198 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18199
18200 case ".$with_cflags" in
18201 (.*-g*)
18202         case .$CFLAGS in
18203         (.*-g*)
18204                 ;;
18205         (*)
18206
18207 cf_fix_cppflags=no
18208 cf_new_cflags=
18209 cf_new_cppflags=
18210 cf_new_extra_cppflags=
18211
18212 for cf_add_cflags in -g
18213 do
18214 case "$cf_fix_cppflags" in
18215 (no)
18216         case "$cf_add_cflags" in
18217         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18218                 case "$cf_add_cflags" in
18219                 (-D*)
18220                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18221
18222                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18223                                 && test -z "${cf_tst_cflags}" \
18224                                 && cf_fix_cppflags=yes
18225
18226                         if test "$cf_fix_cppflags" = yes ; then
18227
18228         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18229         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18230
18231                                 continue
18232                         elif test "${cf_tst_cflags}" = "\"'" ; then
18233
18234         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18235         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18236
18237                                 continue
18238                         fi
18239                         ;;
18240                 esac
18241                 case "$CPPFLAGS" in
18242                 (*$cf_add_cflags)
18243                         ;;
18244                 (*)
18245                         case "$cf_add_cflags" in
18246                         (-D*)
18247                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18248
18249 CPPFLAGS=`echo "$CPPFLAGS" | \
18250         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18251                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18252
18253                                 ;;
18254                         esac
18255
18256         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18257         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18258
18259                         ;;
18260                 esac
18261                 ;;
18262         (*)
18263
18264         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18265         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18266
18267                 ;;
18268         esac
18269         ;;
18270 (yes)
18271
18272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18274
18275         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18276
18277         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18278                 && test -z "${cf_tst_cflags}" \
18279                 && cf_fix_cppflags=no
18280         ;;
18281 esac
18282 done
18283
18284 if test -n "$cf_new_cflags" ; then
18285
18286         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18287         CFLAGS="${CFLAGS}$cf_new_cflags"
18288
18289 fi
18290
18291 if test -n "$cf_new_cppflags" ; then
18292
18293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18294         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18295
18296 fi
18297
18298 if test -n "$cf_new_extra_cppflags" ; then
18299
18300         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18301         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18302
18303 fi
18304
18305                 ;;
18306         esac
18307         ;;
18308 esac
18309
18310 if test "$with_dbmalloc" = yes ; then
18311         echo "$as_me:18311: checking for dbmalloc.h" >&5
18312 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18313 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18314   echo $ECHO_N "(cached) $ECHO_C" >&6
18315 else
18316   cat >"conftest.$ac_ext" <<_ACEOF
18317 #line 18317 "configure"
18318 #include "confdefs.h"
18319 #include <dbmalloc.h>
18320 _ACEOF
18321 if { (eval echo "$as_me:18321: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18322   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18323   ac_status=$?
18324   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18325   rm -f conftest.er1
18326   cat conftest.err >&5
18327   echo "$as_me:18327: \$? = $ac_status" >&5
18328   (exit "$ac_status"); } >/dev/null; then
18329   if test -s conftest.err; then
18330     ac_cpp_err=$ac_c_preproc_warn_flag
18331   else
18332     ac_cpp_err=
18333   fi
18334 else
18335   ac_cpp_err=yes
18336 fi
18337 if test -z "$ac_cpp_err"; then
18338   ac_cv_header_dbmalloc_h=yes
18339 else
18340   echo "$as_me: failed program was:" >&5
18341   cat "conftest.$ac_ext" >&5
18342   ac_cv_header_dbmalloc_h=no
18343 fi
18344 rm -f conftest.err "conftest.$ac_ext"
18345 fi
18346 echo "$as_me:18346: result: $ac_cv_header_dbmalloc_h" >&5
18347 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18348 if test "$ac_cv_header_dbmalloc_h" = yes; then
18349
18350 echo "$as_me:18350: checking for debug_malloc in -ldbmalloc" >&5
18351 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18352 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18353   echo $ECHO_N "(cached) $ECHO_C" >&6
18354 else
18355   ac_check_lib_save_LIBS=$LIBS
18356 LIBS="-ldbmalloc  $LIBS"
18357 cat >"conftest.$ac_ext" <<_ACEOF
18358 #line 18358 "configure"
18359 #include "confdefs.h"
18360
18361 /* Override any gcc2 internal prototype to avoid an error.  */
18362 #ifdef __cplusplus
18363 extern "C"
18364 #endif
18365 /* We use char because int might match the return type of a gcc2
18366    builtin and then its argument prototype would still apply.  */
18367 char debug_malloc ();
18368 int
18369 main (void)
18370 {
18371 debug_malloc ();
18372   ;
18373   return 0;
18374 }
18375 _ACEOF
18376 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18377 if { (eval echo "$as_me:18377: \"$ac_link\"") >&5
18378   (eval $ac_link) 2>&5
18379   ac_status=$?
18380   echo "$as_me:18380: \$? = $ac_status" >&5
18381   (exit "$ac_status"); } &&
18382          { ac_try='test -s "conftest$ac_exeext"'
18383   { (eval echo "$as_me:18383: \"$ac_try\"") >&5
18384   (eval $ac_try) 2>&5
18385   ac_status=$?
18386   echo "$as_me:18386: \$? = $ac_status" >&5
18387   (exit "$ac_status"); }; }; then
18388   ac_cv_lib_dbmalloc_debug_malloc=yes
18389 else
18390   echo "$as_me: failed program was:" >&5
18391 cat "conftest.$ac_ext" >&5
18392 ac_cv_lib_dbmalloc_debug_malloc=no
18393 fi
18394 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18395 LIBS=$ac_check_lib_save_LIBS
18396 fi
18397 echo "$as_me:18397: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18398 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18399 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18400   cat >>confdefs.h <<EOF
18401 #define HAVE_LIBDBMALLOC 1
18402 EOF
18403
18404   LIBS="-ldbmalloc $LIBS"
18405
18406 fi
18407
18408 fi
18409
18410 fi
18411
18412 echo "$as_me:18412: checking if you want to use valgrind for testing" >&5
18413 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18414
18415 # Check whether --with-valgrind or --without-valgrind was given.
18416 if test "${with_valgrind+set}" = set; then
18417   withval="$with_valgrind"
18418   case "x$withval" in
18419         (x|xno) ;;
18420         (*)
18421                 : "${with_cflags:=-g}"
18422                 : "${enable_leaks:=no}"
18423                 with_valgrind=yes
18424
18425 cat >>confdefs.h <<EOF
18426 #define USE_VALGRIND 1
18427 EOF
18428
18429                 ;;
18430         esac
18431 else
18432   with_valgrind=
18433 fi;
18434 echo "$as_me:18434: result: ${with_valgrind:-no}" >&5
18435 echo "${ECHO_T}${with_valgrind:-no}" >&6
18436
18437 case ".$with_cflags" in
18438 (.*-g*)
18439         case .$CFLAGS in
18440         (.*-g*)
18441                 ;;
18442         (*)
18443
18444 cf_fix_cppflags=no
18445 cf_new_cflags=
18446 cf_new_cppflags=
18447 cf_new_extra_cppflags=
18448
18449 for cf_add_cflags in -g
18450 do
18451 case "$cf_fix_cppflags" in
18452 (no)
18453         case "$cf_add_cflags" in
18454         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18455                 case "$cf_add_cflags" in
18456                 (-D*)
18457                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18458
18459                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18460                                 && test -z "${cf_tst_cflags}" \
18461                                 && cf_fix_cppflags=yes
18462
18463                         if test "$cf_fix_cppflags" = yes ; then
18464
18465         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18466         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18467
18468                                 continue
18469                         elif test "${cf_tst_cflags}" = "\"'" ; then
18470
18471         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18472         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18473
18474                                 continue
18475                         fi
18476                         ;;
18477                 esac
18478                 case "$CPPFLAGS" in
18479                 (*$cf_add_cflags)
18480                         ;;
18481                 (*)
18482                         case "$cf_add_cflags" in
18483                         (-D*)
18484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18485
18486 CPPFLAGS=`echo "$CPPFLAGS" | \
18487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18489
18490                                 ;;
18491                         esac
18492
18493         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18494         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18495
18496                         ;;
18497                 esac
18498                 ;;
18499         (*)
18500
18501         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18502         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18503
18504                 ;;
18505         esac
18506         ;;
18507 (yes)
18508
18509         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18510         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18511
18512         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18513
18514         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18515                 && test -z "${cf_tst_cflags}" \
18516                 && cf_fix_cppflags=no
18517         ;;
18518 esac
18519 done
18520
18521 if test -n "$cf_new_cflags" ; then
18522
18523         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18524         CFLAGS="${CFLAGS}$cf_new_cflags"
18525
18526 fi
18527
18528 if test -n "$cf_new_cppflags" ; then
18529
18530         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18531         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18532
18533 fi
18534
18535 if test -n "$cf_new_extra_cppflags" ; then
18536
18537         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18538         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18539
18540 fi
18541
18542                 ;;
18543         esac
18544         ;;
18545 esac
18546
18547 echo "$as_me:18547: checking if you want to perform memory-leak testing" >&5
18548 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18549
18550 # Check whether --enable-leaks or --disable-leaks was given.
18551 if test "${enable_leaks+set}" = set; then
18552   enableval="$enable_leaks"
18553   enable_leaks=$enableval
18554 else
18555   enable_leaks=yes
18556 fi;
18557 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18558 echo "$as_me:18558: result: $with_no_leaks" >&5
18559 echo "${ECHO_T}$with_no_leaks" >&6
18560
18561 if test "$enable_leaks" = no ; then
18562
18563 cat >>confdefs.h <<\EOF
18564 #define NO_LEAKS 1
18565 EOF
18566
18567 cat >>confdefs.h <<\EOF
18568 #define YY_NO_LEAKS 1
18569 EOF
18570
18571 fi
18572
18573 cat >>confdefs.h <<\EOF
18574 #define HAVE_NC_ALLOC_H 1
18575 EOF
18576
18577 ###     use option --enable-expanded to generate certain macros as functions
18578
18579 # Check whether --enable-expanded or --disable-expanded was given.
18580 if test "${enable_expanded+set}" = set; then
18581   enableval="$enable_expanded"
18582   test "x$enableval" = xyes &&
18583 cat >>confdefs.h <<\EOF
18584 #define NCURSES_EXPANDED 1
18585 EOF
18586
18587 fi;
18588
18589 ###     use option --disable-macros to suppress macros in favor of functions
18590
18591 # Check whether --enable-macros or --disable-macros was given.
18592 if test "${enable_macros+set}" = set; then
18593   enableval="$enable_macros"
18594   test "$enableval" = no &&
18595 cat >>confdefs.h <<\EOF
18596 #define NCURSES_NOMACROS 1
18597 EOF
18598
18599 fi;
18600
18601 # Normally we only add trace() to the debug-library.  Allow this to be
18602 # extended to all models of the ncurses library:
18603 cf_all_traces=no
18604 case "$CFLAGS $CPPFLAGS" in
18605 (*-DTRACE*)
18606         cf_all_traces=yes
18607         ;;
18608 esac
18609
18610 echo "$as_me:18610: checking whether to add trace feature to all models" >&5
18611 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18612
18613 # Check whether --with-trace or --without-trace was given.
18614 if test "${with_trace+set}" = set; then
18615   withval="$with_trace"
18616   cf_with_trace=$withval
18617 else
18618   cf_with_trace=$cf_all_traces
18619 fi;
18620 echo "$as_me:18620: result: $cf_with_trace" >&5
18621 echo "${ECHO_T}$cf_with_trace" >&6
18622
18623 if test "x$cf_with_trace" = xyes ; then
18624         LIB_TRACING=all
18625         ADA_TRACE=TRUE
18626
18627 cf_fix_cppflags=no
18628 cf_new_cflags=
18629 cf_new_cppflags=
18630 cf_new_extra_cppflags=
18631
18632 for cf_add_cflags in -DTRACE
18633 do
18634 case "$cf_fix_cppflags" in
18635 (no)
18636         case "$cf_add_cflags" in
18637         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18638                 case "$cf_add_cflags" in
18639                 (-D*)
18640                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18641
18642                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18643                                 && test -z "${cf_tst_cflags}" \
18644                                 && cf_fix_cppflags=yes
18645
18646                         if test "$cf_fix_cppflags" = yes ; then
18647
18648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18650
18651                                 continue
18652                         elif test "${cf_tst_cflags}" = "\"'" ; then
18653
18654         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18655         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18656
18657                                 continue
18658                         fi
18659                         ;;
18660                 esac
18661                 case "$CPPFLAGS" in
18662                 (*$cf_add_cflags)
18663                         ;;
18664                 (*)
18665                         case "$cf_add_cflags" in
18666                         (-D*)
18667                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18668
18669 CPPFLAGS=`echo "$CPPFLAGS" | \
18670         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18671                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18672
18673                                 ;;
18674                         esac
18675
18676         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18677         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18678
18679                         ;;
18680                 esac
18681                 ;;
18682         (*)
18683
18684         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18685         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18686
18687                 ;;
18688         esac
18689         ;;
18690 (yes)
18691
18692         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18693         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18694
18695         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18696
18697         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18698                 && test -z "${cf_tst_cflags}" \
18699                 && cf_fix_cppflags=no
18700         ;;
18701 esac
18702 done
18703
18704 if test -n "$cf_new_cflags" ; then
18705
18706         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18707         CFLAGS="${CFLAGS}$cf_new_cflags"
18708
18709 fi
18710
18711 if test -n "$cf_new_cppflags" ; then
18712
18713         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18714         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18715
18716 fi
18717
18718 if test -n "$cf_new_extra_cppflags" ; then
18719
18720         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18721         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18722
18723 fi
18724
18725 cat >>confdefs.h <<\EOF
18726 #define HAVE__TRACEF 1
18727 EOF
18728
18729 else
18730         LIB_TRACING=DEBUG
18731         ADA_TRACE=FALSE
18732 fi
18733
18734 echo "$as_me:18734: checking if we want to use GNAT projects" >&5
18735 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18736
18737 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18738 if test "${enable_gnat_projects+set}" = set; then
18739   enableval="$enable_gnat_projects"
18740   test "$enableval" != no && enableval=yes
18741         if test "$enableval" != "yes" ; then
18742     enable_gnat_projects=no
18743         else
18744                 enable_gnat_projects=yes
18745         fi
18746 else
18747   enableval=yes
18748         enable_gnat_projects=yes
18749
18750 fi;
18751 echo "$as_me:18751: result: $enable_gnat_projects" >&5
18752 echo "${ECHO_T}$enable_gnat_projects" >&6
18753
18754 ###     Checks for libraries.
18755 case "$cf_cv_system_name" in
18756 (*mingw32*|*mingw64*)
18757         # Note: WINVER may be a problem with Windows 10
18758         if test "x$with_exp_win32" = xyes ; then
18759                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18760         else
18761                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18762         fi
18763
18764 echo "$as_me:18764: checking if ssp library is needed" >&5
18765 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18766 if test "${cf_cv_need_libssp+set}" = set; then
18767   echo $ECHO_N "(cached) $ECHO_C" >&6
18768 else
18769
18770 cat >"conftest.$ac_ext" <<_ACEOF
18771 #line 18771 "configure"
18772 #include "confdefs.h"
18773
18774 #include <sys/types.h>
18775 #include <dirent.h>
18776
18777 int
18778 main (void)
18779 {
18780
18781        DIR *dp = opendir(".");
18782
18783   ;
18784   return 0;
18785 }
18786 _ACEOF
18787 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18788 if { (eval echo "$as_me:18788: \"$ac_link\"") >&5
18789   (eval $ac_link) 2>&5
18790   ac_status=$?
18791   echo "$as_me:18791: \$? = $ac_status" >&5
18792   (exit "$ac_status"); } &&
18793          { ac_try='test -s "conftest$ac_exeext"'
18794   { (eval echo "$as_me:18794: \"$ac_try\"") >&5
18795   (eval $ac_try) 2>&5
18796   ac_status=$?
18797   echo "$as_me:18797: \$? = $ac_status" >&5
18798   (exit "$ac_status"); }; }; then
18799   cf_cv_need_libssp=no
18800 else
18801   echo "$as_me: failed program was:" >&5
18802 cat "conftest.$ac_ext" >&5
18803
18804         cf_save_LIBS="$LIBS"
18805         LIBS="$LIBS -lssp"
18806         cat >"conftest.$ac_ext" <<_ACEOF
18807 #line 18807 "configure"
18808 #include "confdefs.h"
18809
18810 #include <sys/types.h>
18811 #include <dirent.h>
18812
18813 int
18814 main (void)
18815 {
18816
18817                    DIR *dp = opendir(".");
18818
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18824 if { (eval echo "$as_me:18824: \"$ac_link\"") >&5
18825   (eval $ac_link) 2>&5
18826   ac_status=$?
18827   echo "$as_me:18827: \$? = $ac_status" >&5
18828   (exit "$ac_status"); } &&
18829          { ac_try='test -s "conftest$ac_exeext"'
18830   { (eval echo "$as_me:18830: \"$ac_try\"") >&5
18831   (eval $ac_try) 2>&5
18832   ac_status=$?
18833   echo "$as_me:18833: \$? = $ac_status" >&5
18834   (exit "$ac_status"); }; }; then
18835   cf_cv_need_libssp=yes
18836 else
18837   echo "$as_me: failed program was:" >&5
18838 cat "conftest.$ac_ext" >&5
18839 cf_cv_need_libssp=maybe
18840 fi
18841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18842         LIBS="$cf_save_LIBS"
18843
18844 fi
18845 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18846 fi
18847 echo "$as_me:18847: result: $cf_cv_need_libssp" >&5
18848 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18849
18850 if test "x$cf_cv_need_libssp" = xyes
18851 then
18852
18853 cf_add_libs="$LIBS"
18854 # reverse order
18855 cf_add_0lib=
18856 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18857 # filter duplicates
18858 for cf_add_1lib in $cf_add_0lib; do
18859         for cf_add_2lib in $cf_add_libs; do
18860                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18861                         cf_add_1lib=
18862                         break
18863                 fi
18864         done
18865         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18866 done
18867 LIBS="$cf_add_libs"
18868
18869 fi
18870
18871         ;;
18872 (*)
18873 echo "$as_me:18873: checking for gettimeofday" >&5
18874 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18875 if test "${ac_cv_func_gettimeofday+set}" = set; then
18876   echo $ECHO_N "(cached) $ECHO_C" >&6
18877 else
18878   cat >"conftest.$ac_ext" <<_ACEOF
18879 #line 18879 "configure"
18880 #include "confdefs.h"
18881 #define gettimeofday autoconf_temporary
18882 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18883 #undef gettimeofday
18884
18885 #ifdef __cplusplus
18886 extern "C"
18887 #endif
18888
18889 /* We use char because int might match the return type of a gcc2
18890    builtin and then its argument prototype would still apply.  */
18891 char gettimeofday (void);
18892
18893 int
18894 main (void)
18895 {
18896
18897 /* The GNU C library defines stubs for functions which it implements
18898     to always fail with ENOSYS.  Some functions are actually named
18899     something starting with __ and the normal name is an alias.  */
18900 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18901 #error found stub for gettimeofday
18902 #endif
18903
18904         return gettimeofday ();
18905   ;
18906   return 0;
18907 }
18908 _ACEOF
18909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18910 if { (eval echo "$as_me:18910: \"$ac_link\"") >&5
18911   (eval $ac_link) 2>&5
18912   ac_status=$?
18913   echo "$as_me:18913: \$? = $ac_status" >&5
18914   (exit "$ac_status"); } &&
18915          { ac_try='test -s "conftest$ac_exeext"'
18916   { (eval echo "$as_me:18916: \"$ac_try\"") >&5
18917   (eval $ac_try) 2>&5
18918   ac_status=$?
18919   echo "$as_me:18919: \$? = $ac_status" >&5
18920   (exit "$ac_status"); }; }; then
18921   ac_cv_func_gettimeofday=yes
18922 else
18923   echo "$as_me: failed program was:" >&5
18924 cat "conftest.$ac_ext" >&5
18925 ac_cv_func_gettimeofday=no
18926 fi
18927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18928 fi
18929 echo "$as_me:18929: result: $ac_cv_func_gettimeofday" >&5
18930 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18931 if test "$ac_cv_func_gettimeofday" = yes; then
18932
18933 cat >>confdefs.h <<\EOF
18934 #define HAVE_GETTIMEOFDAY 1
18935 EOF
18936
18937 else
18938
18939 echo "$as_me:18939: checking for gettimeofday in -lbsd" >&5
18940 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18941 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18942   echo $ECHO_N "(cached) $ECHO_C" >&6
18943 else
18944   ac_check_lib_save_LIBS=$LIBS
18945 LIBS="-lbsd  $LIBS"
18946 cat >"conftest.$ac_ext" <<_ACEOF
18947 #line 18947 "configure"
18948 #include "confdefs.h"
18949
18950 /* Override any gcc2 internal prototype to avoid an error.  */
18951 #ifdef __cplusplus
18952 extern "C"
18953 #endif
18954 /* We use char because int might match the return type of a gcc2
18955    builtin and then its argument prototype would still apply.  */
18956 char gettimeofday ();
18957 int
18958 main (void)
18959 {
18960 gettimeofday ();
18961   ;
18962   return 0;
18963 }
18964 _ACEOF
18965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18966 if { (eval echo "$as_me:18966: \"$ac_link\"") >&5
18967   (eval $ac_link) 2>&5
18968   ac_status=$?
18969   echo "$as_me:18969: \$? = $ac_status" >&5
18970   (exit "$ac_status"); } &&
18971          { ac_try='test -s "conftest$ac_exeext"'
18972   { (eval echo "$as_me:18972: \"$ac_try\"") >&5
18973   (eval $ac_try) 2>&5
18974   ac_status=$?
18975   echo "$as_me:18975: \$? = $ac_status" >&5
18976   (exit "$ac_status"); }; }; then
18977   ac_cv_lib_bsd_gettimeofday=yes
18978 else
18979   echo "$as_me: failed program was:" >&5
18980 cat "conftest.$ac_ext" >&5
18981 ac_cv_lib_bsd_gettimeofday=no
18982 fi
18983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18984 LIBS=$ac_check_lib_save_LIBS
18985 fi
18986 echo "$as_me:18986: result: $ac_cv_lib_bsd_gettimeofday" >&5
18987 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18988 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18989
18990 cat >>confdefs.h <<\EOF
18991 #define HAVE_GETTIMEOFDAY 1
18992 EOF
18993
18994 cf_add_libs="$LIBS"
18995 # reverse order
18996 cf_add_0lib=
18997 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18998 # filter duplicates
18999 for cf_add_1lib in $cf_add_0lib; do
19000         for cf_add_2lib in $cf_add_libs; do
19001                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19002                         cf_add_1lib=
19003                         break
19004                 fi
19005         done
19006         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19007 done
19008 LIBS="$cf_add_libs"
19009
19010 fi
19011
19012 fi
19013         ;;
19014 esac
19015
19016 echo "$as_me:19016: checking if -lm needed for math functions" >&5
19017 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19018 if test "${cf_cv_need_libm+set}" = set; then
19019   echo $ECHO_N "(cached) $ECHO_C" >&6
19020 else
19021
19022         cat >"conftest.$ac_ext" <<_ACEOF
19023 #line 19023 "configure"
19024 #include "confdefs.h"
19025
19026                 #include <stdio.h>
19027                 #include <stdlib.h>
19028                 #include <math.h>
19029
19030 int
19031 main (void)
19032 {
19033 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19034   ;
19035   return 0;
19036 }
19037 _ACEOF
19038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19039 if { (eval echo "$as_me:19039: \"$ac_link\"") >&5
19040   (eval $ac_link) 2>&5
19041   ac_status=$?
19042   echo "$as_me:19042: \$? = $ac_status" >&5
19043   (exit "$ac_status"); } &&
19044          { ac_try='test -s "conftest$ac_exeext"'
19045   { (eval echo "$as_me:19045: \"$ac_try\"") >&5
19046   (eval $ac_try) 2>&5
19047   ac_status=$?
19048   echo "$as_me:19048: \$? = $ac_status" >&5
19049   (exit "$ac_status"); }; }; then
19050   cf_cv_need_libm=no
19051 else
19052   echo "$as_me: failed program was:" >&5
19053 cat "conftest.$ac_ext" >&5
19054 cf_cv_need_libm=yes
19055 fi
19056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19057 fi
19058 echo "$as_me:19058: result: $cf_cv_need_libm" >&5
19059 echo "${ECHO_T}$cf_cv_need_libm" >&6
19060
19061 if test "$cf_cv_need_libm" = yes
19062 then
19063
19064         cf_save_LIBS="$LIBS"
19065         LIBS="$LIBS -lm"
19066         echo "$as_me:19066: checking if -lm is available for math functions" >&5
19067 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19068 if test "${cf_cv_have_libm+set}" = set; then
19069   echo $ECHO_N "(cached) $ECHO_C" >&6
19070 else
19071
19072         cat >"conftest.$ac_ext" <<_ACEOF
19073 #line 19073 "configure"
19074 #include "confdefs.h"
19075
19076                 #include <stdio.h>
19077                 #include <stdlib.h>
19078                 #include <math.h>
19079
19080 int
19081 main (void)
19082 {
19083 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19084   ;
19085   return 0;
19086 }
19087 _ACEOF
19088 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19089 if { (eval echo "$as_me:19089: \"$ac_link\"") >&5
19090   (eval $ac_link) 2>&5
19091   ac_status=$?
19092   echo "$as_me:19092: \$? = $ac_status" >&5
19093   (exit "$ac_status"); } &&
19094          { ac_try='test -s "conftest$ac_exeext"'
19095   { (eval echo "$as_me:19095: \"$ac_try\"") >&5
19096   (eval $ac_try) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit "$ac_status"); }; }; then
19100   cf_cv_have_libm=yes
19101 else
19102   echo "$as_me: failed program was:" >&5
19103 cat "conftest.$ac_ext" >&5
19104 cf_cv_have_libm=no
19105 fi
19106 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19107 fi
19108 echo "$as_me:19108: result: $cf_cv_have_libm" >&5
19109 echo "${ECHO_T}$cf_cv_have_libm" >&6
19110         LIBS="$cf_save_LIBS"
19111
19112         if test "$cf_cv_have_libm" = yes
19113         then
19114                 MATH_LIB=-lm
19115         fi
19116 else
19117         cf_cv_have_libm=yes
19118 fi
19119
19120 if test "$cf_cv_have_libm" = yes
19121 then
19122
19123 cat >>confdefs.h <<\EOF
19124 #define HAVE_MATH_FUNCS 1
19125 EOF
19126
19127 fi
19128
19129 ###     Checks for header files.
19130 echo "$as_me:19130: checking for ANSI C header files" >&5
19131 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
19132 if test "${ac_cv_header_stdc+set}" = set; then
19133   echo $ECHO_N "(cached) $ECHO_C" >&6
19134 else
19135   cat >"conftest.$ac_ext" <<_ACEOF
19136 #line 19136 "configure"
19137 #include "confdefs.h"
19138 #include <stdlib.h>
19139 #include <stdarg.h>
19140 #include <string.h>
19141 #include <float.h>
19142
19143 _ACEOF
19144 if { (eval echo "$as_me:19144: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19145   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19146   ac_status=$?
19147   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19148   rm -f conftest.er1
19149   cat conftest.err >&5
19150   echo "$as_me:19150: \$? = $ac_status" >&5
19151   (exit "$ac_status"); } >/dev/null; then
19152   if test -s conftest.err; then
19153     ac_cpp_err=$ac_c_preproc_warn_flag
19154   else
19155     ac_cpp_err=
19156   fi
19157 else
19158   ac_cpp_err=yes
19159 fi
19160 if test -z "$ac_cpp_err"; then
19161   ac_cv_header_stdc=yes
19162 else
19163   echo "$as_me: failed program was:" >&5
19164   cat "conftest.$ac_ext" >&5
19165   ac_cv_header_stdc=no
19166 fi
19167 rm -f conftest.err "conftest.$ac_ext"
19168
19169 if test $ac_cv_header_stdc = yes; then
19170   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19171   cat >"conftest.$ac_ext" <<_ACEOF
19172 #line 19172 "configure"
19173 #include "confdefs.h"
19174 #include <string.h>
19175
19176 _ACEOF
19177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19178   $EGREP "memchr" >/dev/null 2>&1; then
19179   :
19180 else
19181   ac_cv_header_stdc=no
19182 fi
19183 rm -rf conftest*
19184
19185 fi
19186
19187 if test $ac_cv_header_stdc = yes; then
19188   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19189   cat >"conftest.$ac_ext" <<_ACEOF
19190 #line 19190 "configure"
19191 #include "confdefs.h"
19192 #include <stdlib.h>
19193
19194 _ACEOF
19195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19196   $EGREP "free" >/dev/null 2>&1; then
19197   :
19198 else
19199   ac_cv_header_stdc=no
19200 fi
19201 rm -rf conftest*
19202
19203 fi
19204
19205 if test $ac_cv_header_stdc = yes; then
19206   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19207   if test "$cross_compiling" = yes; then
19208   :
19209 else
19210   cat >"conftest.$ac_ext" <<_ACEOF
19211 #line 19211 "configure"
19212 #include "confdefs.h"
19213 #include <ctype.h>
19214 #if ((' ' & 0x0FF) == 0x020)
19215 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19216 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19217 #else
19218 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19219                      || ('j' <= (c) && (c) <= 'r') \
19220                      || ('s' <= (c) && (c) <= 'z'))
19221 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19222 #endif
19223
19224 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19225 int
19226 main (void)
19227 {
19228   int i;
19229   for (i = 0; i < 256; i++)
19230     if (XOR (islower (i), ISLOWER (i))
19231         || toupper (i) != TOUPPER (i))
19232       $ac_main_return(2);
19233   $ac_main_return (0);
19234 }
19235 _ACEOF
19236 rm -f "conftest$ac_exeext"
19237 if { (eval echo "$as_me:19237: \"$ac_link\"") >&5
19238   (eval $ac_link) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19242   { (eval echo "$as_me:19242: \"$ac_try\"") >&5
19243   (eval $ac_try) 2>&5
19244   ac_status=$?
19245   echo "$as_me:19245: \$? = $ac_status" >&5
19246   (exit "$ac_status"); }; }; then
19247   :
19248 else
19249   echo "$as_me: program exited with status $ac_status" >&5
19250 echo "$as_me: failed program was:" >&5
19251 cat "conftest.$ac_ext" >&5
19252 ac_cv_header_stdc=no
19253 fi
19254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19255 fi
19256 fi
19257 fi
19258 echo "$as_me:19258: result: $ac_cv_header_stdc" >&5
19259 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19260 if test $ac_cv_header_stdc = yes; then
19261
19262 cat >>confdefs.h <<\EOF
19263 #define STDC_HEADERS 1
19264 EOF
19265
19266 fi
19267
19268 ac_header_dirent=no
19269 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19270   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19271 echo "$as_me:19271: checking for $ac_hdr that defines DIR" >&5
19272 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19274   echo $ECHO_N "(cached) $ECHO_C" >&6
19275 else
19276   cat >"conftest.$ac_ext" <<_ACEOF
19277 #line 19277 "configure"
19278 #include "confdefs.h"
19279 #include <sys/types.h>
19280 #include <$ac_hdr>
19281
19282 int
19283 main (void)
19284 {
19285 if ((DIR *) 0)
19286 return 0;
19287   ;
19288   return 0;
19289 }
19290 _ACEOF
19291 rm -f "conftest.$ac_objext"
19292 if { (eval echo "$as_me:19292: \"$ac_compile\"") >&5
19293   (eval $ac_compile) 2>&5
19294   ac_status=$?
19295   echo "$as_me:19295: \$? = $ac_status" >&5
19296   (exit "$ac_status"); } &&
19297          { ac_try='test -s "conftest.$ac_objext"'
19298   { (eval echo "$as_me:19298: \"$ac_try\"") >&5
19299   (eval $ac_try) 2>&5
19300   ac_status=$?
19301   echo "$as_me:19301: \$? = $ac_status" >&5
19302   (exit "$ac_status"); }; }; then
19303   eval "$as_ac_Header=yes"
19304 else
19305   echo "$as_me: failed program was:" >&5
19306 cat "conftest.$ac_ext" >&5
19307 eval "$as_ac_Header=no"
19308 fi
19309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19310 fi
19311 echo "$as_me:19311: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19312 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19313 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19314   cat >>confdefs.h <<EOF
19315 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19316 EOF
19317
19318 ac_header_dirent=$ac_hdr; break
19319 fi
19320
19321 done
19322 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19323 if test $ac_header_dirent = dirent.h; then
19324   echo "$as_me:19324: checking for opendir in -ldir" >&5
19325 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19326 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19327   echo $ECHO_N "(cached) $ECHO_C" >&6
19328 else
19329   ac_check_lib_save_LIBS=$LIBS
19330 LIBS="-ldir  $LIBS"
19331 cat >"conftest.$ac_ext" <<_ACEOF
19332 #line 19332 "configure"
19333 #include "confdefs.h"
19334
19335 /* Override any gcc2 internal prototype to avoid an error.  */
19336 #ifdef __cplusplus
19337 extern "C"
19338 #endif
19339 /* We use char because int might match the return type of a gcc2
19340    builtin and then its argument prototype would still apply.  */
19341 char opendir ();
19342 int
19343 main (void)
19344 {
19345 opendir ();
19346   ;
19347   return 0;
19348 }
19349 _ACEOF
19350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19351 if { (eval echo "$as_me:19351: \"$ac_link\"") >&5
19352   (eval $ac_link) 2>&5
19353   ac_status=$?
19354   echo "$as_me:19354: \$? = $ac_status" >&5
19355   (exit "$ac_status"); } &&
19356          { ac_try='test -s "conftest$ac_exeext"'
19357   { (eval echo "$as_me:19357: \"$ac_try\"") >&5
19358   (eval $ac_try) 2>&5
19359   ac_status=$?
19360   echo "$as_me:19360: \$? = $ac_status" >&5
19361   (exit "$ac_status"); }; }; then
19362   ac_cv_lib_dir_opendir=yes
19363 else
19364   echo "$as_me: failed program was:" >&5
19365 cat "conftest.$ac_ext" >&5
19366 ac_cv_lib_dir_opendir=no
19367 fi
19368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19369 LIBS=$ac_check_lib_save_LIBS
19370 fi
19371 echo "$as_me:19371: result: $ac_cv_lib_dir_opendir" >&5
19372 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19373 if test "$ac_cv_lib_dir_opendir" = yes; then
19374   LIBS="$LIBS -ldir"
19375 fi
19376
19377 else
19378   echo "$as_me:19378: checking for opendir in -lx" >&5
19379 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19380 if test "${ac_cv_lib_x_opendir+set}" = set; then
19381   echo $ECHO_N "(cached) $ECHO_C" >&6
19382 else
19383   ac_check_lib_save_LIBS=$LIBS
19384 LIBS="-lx  $LIBS"
19385 cat >"conftest.$ac_ext" <<_ACEOF
19386 #line 19386 "configure"
19387 #include "confdefs.h"
19388
19389 /* Override any gcc2 internal prototype to avoid an error.  */
19390 #ifdef __cplusplus
19391 extern "C"
19392 #endif
19393 /* We use char because int might match the return type of a gcc2
19394    builtin and then its argument prototype would still apply.  */
19395 char opendir ();
19396 int
19397 main (void)
19398 {
19399 opendir ();
19400   ;
19401   return 0;
19402 }
19403 _ACEOF
19404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19405 if { (eval echo "$as_me:19405: \"$ac_link\"") >&5
19406   (eval $ac_link) 2>&5
19407   ac_status=$?
19408   echo "$as_me:19408: \$? = $ac_status" >&5
19409   (exit "$ac_status"); } &&
19410          { ac_try='test -s "conftest$ac_exeext"'
19411   { (eval echo "$as_me:19411: \"$ac_try\"") >&5
19412   (eval $ac_try) 2>&5
19413   ac_status=$?
19414   echo "$as_me:19414: \$? = $ac_status" >&5
19415   (exit "$ac_status"); }; }; then
19416   ac_cv_lib_x_opendir=yes
19417 else
19418   echo "$as_me: failed program was:" >&5
19419 cat "conftest.$ac_ext" >&5
19420 ac_cv_lib_x_opendir=no
19421 fi
19422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19423 LIBS=$ac_check_lib_save_LIBS
19424 fi
19425 echo "$as_me:19425: result: $ac_cv_lib_x_opendir" >&5
19426 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19427 if test "$ac_cv_lib_x_opendir" = yes; then
19428   LIBS="$LIBS -lx"
19429 fi
19430
19431 fi
19432
19433 echo "$as_me:19433: checking whether time.h and sys/time.h may both be included" >&5
19434 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19435 if test "${ac_cv_header_time+set}" = set; then
19436   echo $ECHO_N "(cached) $ECHO_C" >&6
19437 else
19438   cat >"conftest.$ac_ext" <<_ACEOF
19439 #line 19439 "configure"
19440 #include "confdefs.h"
19441 #include <sys/types.h>
19442 #include <sys/time.h>
19443 #include <time.h>
19444
19445 int
19446 main (void)
19447 {
19448 if ((struct tm *) 0)
19449 return 0;
19450   ;
19451   return 0;
19452 }
19453 _ACEOF
19454 rm -f "conftest.$ac_objext"
19455 if { (eval echo "$as_me:19455: \"$ac_compile\"") >&5
19456   (eval $ac_compile) 2>&5
19457   ac_status=$?
19458   echo "$as_me:19458: \$? = $ac_status" >&5
19459   (exit "$ac_status"); } &&
19460          { ac_try='test -s "conftest.$ac_objext"'
19461   { (eval echo "$as_me:19461: \"$ac_try\"") >&5
19462   (eval $ac_try) 2>&5
19463   ac_status=$?
19464   echo "$as_me:19464: \$? = $ac_status" >&5
19465   (exit "$ac_status"); }; }; then
19466   ac_cv_header_time=yes
19467 else
19468   echo "$as_me: failed program was:" >&5
19469 cat "conftest.$ac_ext" >&5
19470 ac_cv_header_time=no
19471 fi
19472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19473 fi
19474 echo "$as_me:19474: result: $ac_cv_header_time" >&5
19475 echo "${ECHO_T}$ac_cv_header_time" >&6
19476 if test $ac_cv_header_time = yes; then
19477
19478 cat >>confdefs.h <<\EOF
19479 #define TIME_WITH_SYS_TIME 1
19480 EOF
19481
19482 fi
19483
19484 cf_regex_func=no
19485 cf_regex_libs=
19486 case "$host_os" in
19487 (mingw*)
19488         # -lsystre -ltre -lintl -liconv
19489         echo "$as_me:19489: checking for regcomp in -lsystre" >&5
19490 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19491 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19492   echo $ECHO_N "(cached) $ECHO_C" >&6
19493 else
19494   ac_check_lib_save_LIBS=$LIBS
19495 LIBS="-lsystre  $LIBS"
19496 cat >"conftest.$ac_ext" <<_ACEOF
19497 #line 19497 "configure"
19498 #include "confdefs.h"
19499
19500 /* Override any gcc2 internal prototype to avoid an error.  */
19501 #ifdef __cplusplus
19502 extern "C"
19503 #endif
19504 /* We use char because int might match the return type of a gcc2
19505    builtin and then its argument prototype would still apply.  */
19506 char regcomp ();
19507 int
19508 main (void)
19509 {
19510 regcomp ();
19511   ;
19512   return 0;
19513 }
19514 _ACEOF
19515 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19516 if { (eval echo "$as_me:19516: \"$ac_link\"") >&5
19517   (eval $ac_link) 2>&5
19518   ac_status=$?
19519   echo "$as_me:19519: \$? = $ac_status" >&5
19520   (exit "$ac_status"); } &&
19521          { ac_try='test -s "conftest$ac_exeext"'
19522   { (eval echo "$as_me:19522: \"$ac_try\"") >&5
19523   (eval $ac_try) 2>&5
19524   ac_status=$?
19525   echo "$as_me:19525: \$? = $ac_status" >&5
19526   (exit "$ac_status"); }; }; then
19527   ac_cv_lib_systre_regcomp=yes
19528 else
19529   echo "$as_me: failed program was:" >&5
19530 cat "conftest.$ac_ext" >&5
19531 ac_cv_lib_systre_regcomp=no
19532 fi
19533 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19534 LIBS=$ac_check_lib_save_LIBS
19535 fi
19536 echo "$as_me:19536: result: $ac_cv_lib_systre_regcomp" >&5
19537 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19538 if test "$ac_cv_lib_systre_regcomp" = yes; then
19539
19540                 echo "$as_me:19540: checking for libiconv_open in -liconv" >&5
19541 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19542 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19543   echo $ECHO_N "(cached) $ECHO_C" >&6
19544 else
19545   ac_check_lib_save_LIBS=$LIBS
19546 LIBS="-liconv  $LIBS"
19547 cat >"conftest.$ac_ext" <<_ACEOF
19548 #line 19548 "configure"
19549 #include "confdefs.h"
19550
19551 /* Override any gcc2 internal prototype to avoid an error.  */
19552 #ifdef __cplusplus
19553 extern "C"
19554 #endif
19555 /* We use char because int might match the return type of a gcc2
19556    builtin and then its argument prototype would still apply.  */
19557 char libiconv_open ();
19558 int
19559 main (void)
19560 {
19561 libiconv_open ();
19562   ;
19563   return 0;
19564 }
19565 _ACEOF
19566 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19567 if { (eval echo "$as_me:19567: \"$ac_link\"") >&5
19568   (eval $ac_link) 2>&5
19569   ac_status=$?
19570   echo "$as_me:19570: \$? = $ac_status" >&5
19571   (exit "$ac_status"); } &&
19572          { ac_try='test -s "conftest$ac_exeext"'
19573   { (eval echo "$as_me:19573: \"$ac_try\"") >&5
19574   (eval $ac_try) 2>&5
19575   ac_status=$?
19576   echo "$as_me:19576: \$? = $ac_status" >&5
19577   (exit "$ac_status"); }; }; then
19578   ac_cv_lib_iconv_libiconv_open=yes
19579 else
19580   echo "$as_me: failed program was:" >&5
19581 cat "conftest.$ac_ext" >&5
19582 ac_cv_lib_iconv_libiconv_open=no
19583 fi
19584 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19585 LIBS=$ac_check_lib_save_LIBS
19586 fi
19587 echo "$as_me:19587: result: $ac_cv_lib_iconv_libiconv_open" >&5
19588 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19589 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19590
19591 cf_add_libs="$LIBS"
19592 # reverse order
19593 cf_add_0lib=
19594 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19595 # filter duplicates
19596 for cf_add_1lib in $cf_add_0lib; do
19597         for cf_add_2lib in $cf_add_libs; do
19598                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19599                         cf_add_1lib=
19600                         break
19601                 fi
19602         done
19603         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19604 done
19605 LIBS="$cf_add_libs"
19606
19607 fi
19608
19609                 echo "$as_me:19609: checking for libintl_gettext in -lintl" >&5
19610 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19611 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19612   echo $ECHO_N "(cached) $ECHO_C" >&6
19613 else
19614   ac_check_lib_save_LIBS=$LIBS
19615 LIBS="-lintl  $LIBS"
19616 cat >"conftest.$ac_ext" <<_ACEOF
19617 #line 19617 "configure"
19618 #include "confdefs.h"
19619
19620 /* Override any gcc2 internal prototype to avoid an error.  */
19621 #ifdef __cplusplus
19622 extern "C"
19623 #endif
19624 /* We use char because int might match the return type of a gcc2
19625    builtin and then its argument prototype would still apply.  */
19626 char libintl_gettext ();
19627 int
19628 main (void)
19629 {
19630 libintl_gettext ();
19631   ;
19632   return 0;
19633 }
19634 _ACEOF
19635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19636 if { (eval echo "$as_me:19636: \"$ac_link\"") >&5
19637   (eval $ac_link) 2>&5
19638   ac_status=$?
19639   echo "$as_me:19639: \$? = $ac_status" >&5
19640   (exit "$ac_status"); } &&
19641          { ac_try='test -s "conftest$ac_exeext"'
19642   { (eval echo "$as_me:19642: \"$ac_try\"") >&5
19643   (eval $ac_try) 2>&5
19644   ac_status=$?
19645   echo "$as_me:19645: \$? = $ac_status" >&5
19646   (exit "$ac_status"); }; }; then
19647   ac_cv_lib_intl_libintl_gettext=yes
19648 else
19649   echo "$as_me: failed program was:" >&5
19650 cat "conftest.$ac_ext" >&5
19651 ac_cv_lib_intl_libintl_gettext=no
19652 fi
19653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19654 LIBS=$ac_check_lib_save_LIBS
19655 fi
19656 echo "$as_me:19656: result: $ac_cv_lib_intl_libintl_gettext" >&5
19657 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19658 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19659
19660 cf_add_libs="$LIBS"
19661 # reverse order
19662 cf_add_0lib=
19663 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19664 # filter duplicates
19665 for cf_add_1lib in $cf_add_0lib; do
19666         for cf_add_2lib in $cf_add_libs; do
19667                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19668                         cf_add_1lib=
19669                         break
19670                 fi
19671         done
19672         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19673 done
19674 LIBS="$cf_add_libs"
19675
19676 fi
19677
19678                 echo "$as_me:19678: checking for tre_regcomp in -ltre" >&5
19679 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19680 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19681   echo $ECHO_N "(cached) $ECHO_C" >&6
19682 else
19683   ac_check_lib_save_LIBS=$LIBS
19684 LIBS="-ltre  $LIBS"
19685 cat >"conftest.$ac_ext" <<_ACEOF
19686 #line 19686 "configure"
19687 #include "confdefs.h"
19688
19689 /* Override any gcc2 internal prototype to avoid an error.  */
19690 #ifdef __cplusplus
19691 extern "C"
19692 #endif
19693 /* We use char because int might match the return type of a gcc2
19694    builtin and then its argument prototype would still apply.  */
19695 char tre_regcomp ();
19696 int
19697 main (void)
19698 {
19699 tre_regcomp ();
19700   ;
19701   return 0;
19702 }
19703 _ACEOF
19704 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19705 if { (eval echo "$as_me:19705: \"$ac_link\"") >&5
19706   (eval $ac_link) 2>&5
19707   ac_status=$?
19708   echo "$as_me:19708: \$? = $ac_status" >&5
19709   (exit "$ac_status"); } &&
19710          { ac_try='test -s "conftest$ac_exeext"'
19711   { (eval echo "$as_me:19711: \"$ac_try\"") >&5
19712   (eval $ac_try) 2>&5
19713   ac_status=$?
19714   echo "$as_me:19714: \$? = $ac_status" >&5
19715   (exit "$ac_status"); }; }; then
19716   ac_cv_lib_tre_tre_regcomp=yes
19717 else
19718   echo "$as_me: failed program was:" >&5
19719 cat "conftest.$ac_ext" >&5
19720 ac_cv_lib_tre_tre_regcomp=no
19721 fi
19722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19723 LIBS=$ac_check_lib_save_LIBS
19724 fi
19725 echo "$as_me:19725: result: $ac_cv_lib_tre_tre_regcomp" >&5
19726 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19727 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19728
19729 cf_add_libs="$LIBS"
19730 # reverse order
19731 cf_add_0lib=
19732 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19733 # filter duplicates
19734 for cf_add_1lib in $cf_add_0lib; do
19735         for cf_add_2lib in $cf_add_libs; do
19736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19737                         cf_add_1lib=
19738                         break
19739                 fi
19740         done
19741         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19742 done
19743 LIBS="$cf_add_libs"
19744
19745 fi
19746
19747 cf_add_libs="$LIBS"
19748 # reverse order
19749 cf_add_0lib=
19750 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19751 # filter duplicates
19752 for cf_add_1lib in $cf_add_0lib; do
19753         for cf_add_2lib in $cf_add_libs; do
19754                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19755                         cf_add_1lib=
19756                         break
19757                 fi
19758         done
19759         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19760 done
19761 LIBS="$cf_add_libs"
19762
19763                 cf_regex_func=regcomp
19764
19765 else
19766
19767                 echo "$as_me:19767: checking for regcomp in -lgnurx" >&5
19768 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19769 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19770   echo $ECHO_N "(cached) $ECHO_C" >&6
19771 else
19772   ac_check_lib_save_LIBS=$LIBS
19773 LIBS="-lgnurx  $LIBS"
19774 cat >"conftest.$ac_ext" <<_ACEOF
19775 #line 19775 "configure"
19776 #include "confdefs.h"
19777
19778 /* Override any gcc2 internal prototype to avoid an error.  */
19779 #ifdef __cplusplus
19780 extern "C"
19781 #endif
19782 /* We use char because int might match the return type of a gcc2
19783    builtin and then its argument prototype would still apply.  */
19784 char regcomp ();
19785 int
19786 main (void)
19787 {
19788 regcomp ();
19789   ;
19790   return 0;
19791 }
19792 _ACEOF
19793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19794 if { (eval echo "$as_me:19794: \"$ac_link\"") >&5
19795   (eval $ac_link) 2>&5
19796   ac_status=$?
19797   echo "$as_me:19797: \$? = $ac_status" >&5
19798   (exit "$ac_status"); } &&
19799          { ac_try='test -s "conftest$ac_exeext"'
19800   { (eval echo "$as_me:19800: \"$ac_try\"") >&5
19801   (eval $ac_try) 2>&5
19802   ac_status=$?
19803   echo "$as_me:19803: \$? = $ac_status" >&5
19804   (exit "$ac_status"); }; }; then
19805   ac_cv_lib_gnurx_regcomp=yes
19806 else
19807   echo "$as_me: failed program was:" >&5
19808 cat "conftest.$ac_ext" >&5
19809 ac_cv_lib_gnurx_regcomp=no
19810 fi
19811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19812 LIBS=$ac_check_lib_save_LIBS
19813 fi
19814 echo "$as_me:19814: result: $ac_cv_lib_gnurx_regcomp" >&5
19815 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19816 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19817
19818 cf_add_libs="$LIBS"
19819 # reverse order
19820 cf_add_0lib=
19821 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19822 # filter duplicates
19823 for cf_add_1lib in $cf_add_0lib; do
19824         for cf_add_2lib in $cf_add_libs; do
19825                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19826                         cf_add_1lib=
19827                         break
19828                 fi
19829         done
19830         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19831 done
19832 LIBS="$cf_add_libs"
19833
19834                         cf_regex_func=regcomp
19835 fi
19836
19837 fi
19838
19839         ;;
19840 (*)
19841         cf_regex_libs="regex re"
19842         echo "$as_me:19842: checking for regcomp" >&5
19843 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19844 if test "${ac_cv_func_regcomp+set}" = set; then
19845   echo $ECHO_N "(cached) $ECHO_C" >&6
19846 else
19847   cat >"conftest.$ac_ext" <<_ACEOF
19848 #line 19848 "configure"
19849 #include "confdefs.h"
19850 #define regcomp autoconf_temporary
19851 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19852 #undef regcomp
19853
19854 #ifdef __cplusplus
19855 extern "C"
19856 #endif
19857
19858 /* We use char because int might match the return type of a gcc2
19859    builtin and then its argument prototype would still apply.  */
19860 char regcomp (void);
19861
19862 int
19863 main (void)
19864 {
19865
19866 /* The GNU C library defines stubs for functions which it implements
19867     to always fail with ENOSYS.  Some functions are actually named
19868     something starting with __ and the normal name is an alias.  */
19869 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19870 #error found stub for regcomp
19871 #endif
19872
19873         return regcomp ();
19874   ;
19875   return 0;
19876 }
19877 _ACEOF
19878 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19879 if { (eval echo "$as_me:19879: \"$ac_link\"") >&5
19880   (eval $ac_link) 2>&5
19881   ac_status=$?
19882   echo "$as_me:19882: \$? = $ac_status" >&5
19883   (exit "$ac_status"); } &&
19884          { ac_try='test -s "conftest$ac_exeext"'
19885   { (eval echo "$as_me:19885: \"$ac_try\"") >&5
19886   (eval $ac_try) 2>&5
19887   ac_status=$?
19888   echo "$as_me:19888: \$? = $ac_status" >&5
19889   (exit "$ac_status"); }; }; then
19890   ac_cv_func_regcomp=yes
19891 else
19892   echo "$as_me: failed program was:" >&5
19893 cat "conftest.$ac_ext" >&5
19894 ac_cv_func_regcomp=no
19895 fi
19896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19897 fi
19898 echo "$as_me:19898: result: $ac_cv_func_regcomp" >&5
19899 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19900 if test "$ac_cv_func_regcomp" = yes; then
19901   cf_regex_func=regcomp
19902 else
19903
19904                 for cf_regex_lib in $cf_regex_libs
19905                 do
19906                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19907 echo "$as_me:19907: checking for regcomp in -l$cf_regex_lib" >&5
19908 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19909 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19910   echo $ECHO_N "(cached) $ECHO_C" >&6
19911 else
19912   ac_check_lib_save_LIBS=$LIBS
19913 LIBS="-l$cf_regex_lib  $LIBS"
19914 cat >"conftest.$ac_ext" <<_ACEOF
19915 #line 19915 "configure"
19916 #include "confdefs.h"
19917
19918 /* Override any gcc2 internal prototype to avoid an error.  */
19919 #ifdef __cplusplus
19920 extern "C"
19921 #endif
19922 /* We use char because int might match the return type of a gcc2
19923    builtin and then its argument prototype would still apply.  */
19924 char regcomp ();
19925 int
19926 main (void)
19927 {
19928 regcomp ();
19929   ;
19930   return 0;
19931 }
19932 _ACEOF
19933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19934 if { (eval echo "$as_me:19934: \"$ac_link\"") >&5
19935   (eval $ac_link) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit "$ac_status"); } &&
19939          { ac_try='test -s "conftest$ac_exeext"'
19940   { (eval echo "$as_me:19940: \"$ac_try\"") >&5
19941   (eval $ac_try) 2>&5
19942   ac_status=$?
19943   echo "$as_me:19943: \$? = $ac_status" >&5
19944   (exit "$ac_status"); }; }; then
19945   eval "$as_ac_Lib=yes"
19946 else
19947   echo "$as_me: failed program was:" >&5
19948 cat "conftest.$ac_ext" >&5
19949 eval "$as_ac_Lib=no"
19950 fi
19951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19952 LIBS=$ac_check_lib_save_LIBS
19953 fi
19954 echo "$as_me:19954: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19955 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19956 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19957
19958 cf_add_libs="$LIBS"
19959 # reverse order
19960 cf_add_0lib=
19961 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19962 # filter duplicates
19963 for cf_add_1lib in $cf_add_0lib; do
19964         for cf_add_2lib in $cf_add_libs; do
19965                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19966                         cf_add_1lib=
19967                         break
19968                 fi
19969         done
19970         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19971 done
19972 LIBS="$cf_add_libs"
19973
19974                                         cf_regex_func=regcomp
19975                                         break
19976 fi
19977
19978                 done
19979
19980 fi
19981
19982         ;;
19983 esac
19984
19985 if test "$cf_regex_func" = no ; then
19986         echo "$as_me:19986: checking for compile" >&5
19987 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19988 if test "${ac_cv_func_compile+set}" = set; then
19989   echo $ECHO_N "(cached) $ECHO_C" >&6
19990 else
19991   cat >"conftest.$ac_ext" <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19994 #define compile autoconf_temporary
19995 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19996 #undef compile
19997
19998 #ifdef __cplusplus
19999 extern "C"
20000 #endif
20001
20002 /* We use char because int might match the return type of a gcc2
20003    builtin and then its argument prototype would still apply.  */
20004 char compile (void);
20005
20006 int
20007 main (void)
20008 {
20009
20010 /* The GNU C library defines stubs for functions which it implements
20011     to always fail with ENOSYS.  Some functions are actually named
20012     something starting with __ and the normal name is an alias.  */
20013 #if defined (__stub_compile) || defined (__stub___compile)
20014 #error found stub for compile
20015 #endif
20016
20017         return compile ();
20018   ;
20019   return 0;
20020 }
20021 _ACEOF
20022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20023 if { (eval echo "$as_me:20023: \"$ac_link\"") >&5
20024   (eval $ac_link) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit "$ac_status"); } &&
20028          { ac_try='test -s "conftest$ac_exeext"'
20029   { (eval echo "$as_me:20029: \"$ac_try\"") >&5
20030   (eval $ac_try) 2>&5
20031   ac_status=$?
20032   echo "$as_me:20032: \$? = $ac_status" >&5
20033   (exit "$ac_status"); }; }; then
20034   ac_cv_func_compile=yes
20035 else
20036   echo "$as_me: failed program was:" >&5
20037 cat "conftest.$ac_ext" >&5
20038 ac_cv_func_compile=no
20039 fi
20040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20041 fi
20042 echo "$as_me:20042: result: $ac_cv_func_compile" >&5
20043 echo "${ECHO_T}$ac_cv_func_compile" >&6
20044 if test "$ac_cv_func_compile" = yes; then
20045   cf_regex_func=compile
20046 else
20047
20048                 echo "$as_me:20048: checking for compile in -lgen" >&5
20049 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20050 if test "${ac_cv_lib_gen_compile+set}" = set; then
20051   echo $ECHO_N "(cached) $ECHO_C" >&6
20052 else
20053   ac_check_lib_save_LIBS=$LIBS
20054 LIBS="-lgen  $LIBS"
20055 cat >"conftest.$ac_ext" <<_ACEOF
20056 #line 20056 "configure"
20057 #include "confdefs.h"
20058
20059 /* Override any gcc2 internal prototype to avoid an error.  */
20060 #ifdef __cplusplus
20061 extern "C"
20062 #endif
20063 /* We use char because int might match the return type of a gcc2
20064    builtin and then its argument prototype would still apply.  */
20065 char compile ();
20066 int
20067 main (void)
20068 {
20069 compile ();
20070   ;
20071   return 0;
20072 }
20073 _ACEOF
20074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076   (eval $ac_link) 2>&5
20077   ac_status=$?
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit "$ac_status"); } &&
20080          { ac_try='test -s "conftest$ac_exeext"'
20081   { (eval echo "$as_me:20081: \"$ac_try\"") >&5
20082   (eval $ac_try) 2>&5
20083   ac_status=$?
20084   echo "$as_me:20084: \$? = $ac_status" >&5
20085   (exit "$ac_status"); }; }; then
20086   ac_cv_lib_gen_compile=yes
20087 else
20088   echo "$as_me: failed program was:" >&5
20089 cat "conftest.$ac_ext" >&5
20090 ac_cv_lib_gen_compile=no
20091 fi
20092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20093 LIBS=$ac_check_lib_save_LIBS
20094 fi
20095 echo "$as_me:20095: result: $ac_cv_lib_gen_compile" >&5
20096 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20097 if test "$ac_cv_lib_gen_compile" = yes; then
20098
20099 cf_add_libs="$LIBS"
20100 # reverse order
20101 cf_add_0lib=
20102 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20103 # filter duplicates
20104 for cf_add_1lib in $cf_add_0lib; do
20105         for cf_add_2lib in $cf_add_libs; do
20106                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20107                         cf_add_1lib=
20108                         break
20109                 fi
20110         done
20111         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20112 done
20113 LIBS="$cf_add_libs"
20114
20115                                 cf_regex_func=compile
20116 fi
20117
20118 fi
20119
20120 fi
20121
20122 if test "$cf_regex_func" = no ; then
20123         { echo "$as_me:20123: WARNING: cannot find regular expression library" >&5
20124 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20125 fi
20126
20127 echo "$as_me:20127: checking for regular-expression headers" >&5
20128 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20129 if test "${cf_cv_regex_hdrs+set}" = set; then
20130   echo $ECHO_N "(cached) $ECHO_C" >&6
20131 else
20132
20133 cf_cv_regex_hdrs=no
20134 case "$cf_regex_func" in
20135 (compile)
20136         for cf_regex_hdr in regexp.h regexpr.h
20137         do
20138                 cat >"conftest.$ac_ext" <<_ACEOF
20139 #line 20139 "configure"
20140 #include "confdefs.h"
20141 #include <$cf_regex_hdr>
20142 int
20143 main (void)
20144 {
20145
20146                         char *p = compile("", "", "", 0);
20147                         int x = step("", "");
20148                         (void)p;
20149                         (void)x;
20150
20151   ;
20152   return 0;
20153 }
20154 _ACEOF
20155 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20156 if { (eval echo "$as_me:20156: \"$ac_link\"") >&5
20157   (eval $ac_link) 2>&5
20158   ac_status=$?
20159   echo "$as_me:20159: \$? = $ac_status" >&5
20160   (exit "$ac_status"); } &&
20161          { ac_try='test -s "conftest$ac_exeext"'
20162   { (eval echo "$as_me:20162: \"$ac_try\"") >&5
20163   (eval $ac_try) 2>&5
20164   ac_status=$?
20165   echo "$as_me:20165: \$? = $ac_status" >&5
20166   (exit "$ac_status"); }; }; then
20167
20168                         cf_cv_regex_hdrs=$cf_regex_hdr
20169                         break
20170
20171 else
20172   echo "$as_me: failed program was:" >&5
20173 cat "conftest.$ac_ext" >&5
20174 fi
20175 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20176         done
20177         ;;
20178 (*)
20179         for cf_regex_hdr in regex.h
20180         do
20181                 cat >"conftest.$ac_ext" <<_ACEOF
20182 #line 20182 "configure"
20183 #include "confdefs.h"
20184 #include <sys/types.h>
20185 #include <$cf_regex_hdr>
20186 int
20187 main (void)
20188 {
20189
20190                         regex_t *p = 0;
20191                         int x = regcomp(p, "", 0);
20192                         int y = regexec(p, "", 0, 0, 0);
20193                         (void)x;
20194                         (void)y;
20195                         regfree(p);
20196
20197   ;
20198   return 0;
20199 }
20200 _ACEOF
20201 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20202 if { (eval echo "$as_me:20202: \"$ac_link\"") >&5
20203   (eval $ac_link) 2>&5
20204   ac_status=$?
20205   echo "$as_me:20205: \$? = $ac_status" >&5
20206   (exit "$ac_status"); } &&
20207          { ac_try='test -s "conftest$ac_exeext"'
20208   { (eval echo "$as_me:20208: \"$ac_try\"") >&5
20209   (eval $ac_try) 2>&5
20210   ac_status=$?
20211   echo "$as_me:20211: \$? = $ac_status" >&5
20212   (exit "$ac_status"); }; }; then
20213
20214                         cf_cv_regex_hdrs=$cf_regex_hdr
20215                         break
20216
20217 else
20218   echo "$as_me: failed program was:" >&5
20219 cat "conftest.$ac_ext" >&5
20220 fi
20221 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20222         done
20223         ;;
20224 esac
20225
20226 fi
20227 echo "$as_me:20227: result: $cf_cv_regex_hdrs" >&5
20228 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20229
20230 case "$cf_cv_regex_hdrs" in
20231         (no)            { echo "$as_me:20231: WARNING: no regular expression header found" >&5
20232 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20233         (regex.h)
20234 cat >>confdefs.h <<\EOF
20235 #define HAVE_REGEX_H_FUNCS 1
20236 EOF
20237  ;;
20238         (regexp.h)
20239 cat >>confdefs.h <<\EOF
20240 #define HAVE_REGEXP_H_FUNCS 1
20241 EOF
20242  ;;
20243         (regexpr.h)
20244 cat >>confdefs.h <<\EOF
20245 #define HAVE_REGEXPR_H_FUNCS 1
20246 EOF
20247  ;;
20248 esac
20249
20250 for ac_header in \
20251 fcntl.h \
20252 getopt.h \
20253 limits.h \
20254 locale.h \
20255 math.h \
20256 poll.h \
20257 sys/ioctl.h \
20258 sys/param.h \
20259 sys/poll.h \
20260 sys/select.h \
20261 sys/time.h \
20262 sys/times.h \
20263 unistd.h \
20264 wctype.h \
20265
20266 do
20267 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20268 echo "$as_me:20268: checking for $ac_header" >&5
20269 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20270 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20271   echo $ECHO_N "(cached) $ECHO_C" >&6
20272 else
20273   cat >"conftest.$ac_ext" <<_ACEOF
20274 #line 20274 "configure"
20275 #include "confdefs.h"
20276 #include <$ac_header>
20277 _ACEOF
20278 if { (eval echo "$as_me:20278: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20279   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20280   ac_status=$?
20281   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20282   rm -f conftest.er1
20283   cat conftest.err >&5
20284   echo "$as_me:20284: \$? = $ac_status" >&5
20285   (exit "$ac_status"); } >/dev/null; then
20286   if test -s conftest.err; then
20287     ac_cpp_err=$ac_c_preproc_warn_flag
20288   else
20289     ac_cpp_err=
20290   fi
20291 else
20292   ac_cpp_err=yes
20293 fi
20294 if test -z "$ac_cpp_err"; then
20295   eval "$as_ac_Header=yes"
20296 else
20297   echo "$as_me: failed program was:" >&5
20298   cat "conftest.$ac_ext" >&5
20299   eval "$as_ac_Header=no"
20300 fi
20301 rm -f conftest.err "conftest.$ac_ext"
20302 fi
20303 echo "$as_me:20303: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20304 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20305 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20306   cat >>confdefs.h <<EOF
20307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20308 EOF
20309
20310 fi
20311 done
20312
20313 for ac_header in unistd.h getopt.h
20314 do
20315 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20316 echo "$as_me:20316: checking for $ac_header" >&5
20317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20319   echo $ECHO_N "(cached) $ECHO_C" >&6
20320 else
20321   cat >"conftest.$ac_ext" <<_ACEOF
20322 #line 20322 "configure"
20323 #include "confdefs.h"
20324 #include <$ac_header>
20325 _ACEOF
20326 if { (eval echo "$as_me:20326: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20327   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20328   ac_status=$?
20329   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20330   rm -f conftest.er1
20331   cat conftest.err >&5
20332   echo "$as_me:20332: \$? = $ac_status" >&5
20333   (exit "$ac_status"); } >/dev/null; then
20334   if test -s conftest.err; then
20335     ac_cpp_err=$ac_c_preproc_warn_flag
20336   else
20337     ac_cpp_err=
20338   fi
20339 else
20340   ac_cpp_err=yes
20341 fi
20342 if test -z "$ac_cpp_err"; then
20343   eval "$as_ac_Header=yes"
20344 else
20345   echo "$as_me: failed program was:" >&5
20346   cat "conftest.$ac_ext" >&5
20347   eval "$as_ac_Header=no"
20348 fi
20349 rm -f conftest.err "conftest.$ac_ext"
20350 fi
20351 echo "$as_me:20351: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20352 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20353 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20354   cat >>confdefs.h <<EOF
20355 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20356 EOF
20357
20358 fi
20359 done
20360
20361 echo "$as_me:20361: checking for header declaring getopt variables" >&5
20362 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20363 if test "${cf_cv_getopt_header+set}" = set; then
20364   echo $ECHO_N "(cached) $ECHO_C" >&6
20365 else
20366
20367 cf_cv_getopt_header=none
20368 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20369 do
20370 cat >"conftest.$ac_ext" <<_ACEOF
20371 #line 20371 "configure"
20372 #include "confdefs.h"
20373
20374 #include <$cf_header>
20375 int
20376 main (void)
20377 {
20378 int x = optind; char *y = optarg; (void)x; (void)y
20379   ;
20380   return 0;
20381 }
20382 _ACEOF
20383 rm -f "conftest.$ac_objext"
20384 if { (eval echo "$as_me:20384: \"$ac_compile\"") >&5
20385   (eval $ac_compile) 2>&5
20386   ac_status=$?
20387   echo "$as_me:20387: \$? = $ac_status" >&5
20388   (exit "$ac_status"); } &&
20389          { ac_try='test -s "conftest.$ac_objext"'
20390   { (eval echo "$as_me:20390: \"$ac_try\"") >&5
20391   (eval $ac_try) 2>&5
20392   ac_status=$?
20393   echo "$as_me:20393: \$? = $ac_status" >&5
20394   (exit "$ac_status"); }; }; then
20395   cf_cv_getopt_header=$cf_header
20396  break
20397 else
20398   echo "$as_me: failed program was:" >&5
20399 cat "conftest.$ac_ext" >&5
20400 fi
20401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20402 done
20403
20404 fi
20405 echo "$as_me:20405: result: $cf_cv_getopt_header" >&5
20406 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20407 if test "$cf_cv_getopt_header" != none ; then
20408
20409 cat >>confdefs.h <<\EOF
20410 #define HAVE_GETOPT_HEADER 1
20411 EOF
20412
20413 fi
20414 if test "$cf_cv_getopt_header" = getopt.h ; then
20415
20416 cat >>confdefs.h <<\EOF
20417 #define NEED_GETOPT_H 1
20418 EOF
20419
20420 fi
20421
20422 echo "$as_me:20422: checking if external environ is declared" >&5
20423 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20424 if test "${cf_cv_dcl_environ+set}" = set; then
20425   echo $ECHO_N "(cached) $ECHO_C" >&6
20426 else
20427
20428     cat >"conftest.$ac_ext" <<_ACEOF
20429 #line 20429 "configure"
20430 #include "confdefs.h"
20431
20432 #ifdef HAVE_STDLIB_H
20433 #include <stdlib.h>
20434 #endif
20435 #include <unistd.h>
20436 int
20437 main (void)
20438 {
20439 int x = (int) environ
20440   ;
20441   return 0;
20442 }
20443 _ACEOF
20444 rm -f "conftest.$ac_objext"
20445 if { (eval echo "$as_me:20445: \"$ac_compile\"") >&5
20446   (eval $ac_compile) 2>&5
20447   ac_status=$?
20448   echo "$as_me:20448: \$? = $ac_status" >&5
20449   (exit "$ac_status"); } &&
20450          { ac_try='test -s "conftest.$ac_objext"'
20451   { (eval echo "$as_me:20451: \"$ac_try\"") >&5
20452   (eval $ac_try) 2>&5
20453   ac_status=$?
20454   echo "$as_me:20454: \$? = $ac_status" >&5
20455   (exit "$ac_status"); }; }; then
20456   cf_cv_dcl_environ=yes
20457 else
20458   echo "$as_me: failed program was:" >&5
20459 cat "conftest.$ac_ext" >&5
20460 cf_cv_dcl_environ=no
20461 fi
20462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20463
20464 fi
20465 echo "$as_me:20465: result: $cf_cv_dcl_environ" >&5
20466 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20467
20468 if test "$cf_cv_dcl_environ" = no ; then
20469
20470 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20471
20472     cat >>confdefs.h <<EOF
20473 #define $cf_result 1
20474 EOF
20475
20476 fi
20477
20478 # It's possible (for near-UNIX clones) that the data doesn't exist
20479
20480 echo "$as_me:20480: checking if external environ exists" >&5
20481 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20482 if test "${cf_cv_have_environ+set}" = set; then
20483   echo $ECHO_N "(cached) $ECHO_C" >&6
20484 else
20485
20486         cat >"conftest.$ac_ext" <<_ACEOF
20487 #line 20487 "configure"
20488 #include "confdefs.h"
20489
20490 #undef environ
20491 extern int environ;
20492
20493 int
20494 main (void)
20495 {
20496 environ = 2
20497   ;
20498   return 0;
20499 }
20500 _ACEOF
20501 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20502 if { (eval echo "$as_me:20502: \"$ac_link\"") >&5
20503   (eval $ac_link) 2>&5
20504   ac_status=$?
20505   echo "$as_me:20505: \$? = $ac_status" >&5
20506   (exit "$ac_status"); } &&
20507          { ac_try='test -s "conftest$ac_exeext"'
20508   { (eval echo "$as_me:20508: \"$ac_try\"") >&5
20509   (eval $ac_try) 2>&5
20510   ac_status=$?
20511   echo "$as_me:20511: \$? = $ac_status" >&5
20512   (exit "$ac_status"); }; }; then
20513   cf_cv_have_environ=yes
20514 else
20515   echo "$as_me: failed program was:" >&5
20516 cat "conftest.$ac_ext" >&5
20517 cf_cv_have_environ=no
20518 fi
20519 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20520
20521 fi
20522 echo "$as_me:20522: result: $cf_cv_have_environ" >&5
20523 echo "${ECHO_T}$cf_cv_have_environ" >&6
20524
20525 if test "$cf_cv_have_environ" = yes ; then
20526
20527 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20528
20529         cat >>confdefs.h <<EOF
20530 #define $cf_result 1
20531 EOF
20532
20533 fi
20534
20535 echo "$as_me:20535: checking for getenv" >&5
20536 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20537 if test "${ac_cv_func_getenv+set}" = set; then
20538   echo $ECHO_N "(cached) $ECHO_C" >&6
20539 else
20540   cat >"conftest.$ac_ext" <<_ACEOF
20541 #line 20541 "configure"
20542 #include "confdefs.h"
20543 #define getenv autoconf_temporary
20544 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20545 #undef getenv
20546
20547 #ifdef __cplusplus
20548 extern "C"
20549 #endif
20550
20551 /* We use char because int might match the return type of a gcc2
20552    builtin and then its argument prototype would still apply.  */
20553 char getenv (void);
20554
20555 int
20556 main (void)
20557 {
20558
20559 /* The GNU C library defines stubs for functions which it implements
20560     to always fail with ENOSYS.  Some functions are actually named
20561     something starting with __ and the normal name is an alias.  */
20562 #if defined (__stub_getenv) || defined (__stub___getenv)
20563 #error found stub for getenv
20564 #endif
20565
20566         return getenv ();
20567   ;
20568   return 0;
20569 }
20570 _ACEOF
20571 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20572 if { (eval echo "$as_me:20572: \"$ac_link\"") >&5
20573   (eval $ac_link) 2>&5
20574   ac_status=$?
20575   echo "$as_me:20575: \$? = $ac_status" >&5
20576   (exit "$ac_status"); } &&
20577          { ac_try='test -s "conftest$ac_exeext"'
20578   { (eval echo "$as_me:20578: \"$ac_try\"") >&5
20579   (eval $ac_try) 2>&5
20580   ac_status=$?
20581   echo "$as_me:20581: \$? = $ac_status" >&5
20582   (exit "$ac_status"); }; }; then
20583   ac_cv_func_getenv=yes
20584 else
20585   echo "$as_me: failed program was:" >&5
20586 cat "conftest.$ac_ext" >&5
20587 ac_cv_func_getenv=no
20588 fi
20589 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20590 fi
20591 echo "$as_me:20591: result: $ac_cv_func_getenv" >&5
20592 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20593
20594 for ac_func in putenv setenv strdup
20595 do
20596 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20597 echo "$as_me:20597: checking for $ac_func" >&5
20598 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20599 if eval "test \"\${$as_ac_var+set}\" = set"; then
20600   echo $ECHO_N "(cached) $ECHO_C" >&6
20601 else
20602   cat >"conftest.$ac_ext" <<_ACEOF
20603 #line 20603 "configure"
20604 #include "confdefs.h"
20605 #define $ac_func autoconf_temporary
20606 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20607 #undef $ac_func
20608
20609 #ifdef __cplusplus
20610 extern "C"
20611 #endif
20612
20613 /* We use char because int might match the return type of a gcc2
20614    builtin and then its argument prototype would still apply.  */
20615 char $ac_func (void);
20616
20617 int
20618 main (void)
20619 {
20620
20621 /* The GNU C library defines stubs for functions which it implements
20622     to always fail with ENOSYS.  Some functions are actually named
20623     something starting with __ and the normal name is an alias.  */
20624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20625 #error found stub for $ac_func
20626 #endif
20627
20628         return $ac_func ();
20629   ;
20630   return 0;
20631 }
20632 _ACEOF
20633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20634 if { (eval echo "$as_me:20634: \"$ac_link\"") >&5
20635   (eval $ac_link) 2>&5
20636   ac_status=$?
20637   echo "$as_me:20637: \$? = $ac_status" >&5
20638   (exit "$ac_status"); } &&
20639          { ac_try='test -s "conftest$ac_exeext"'
20640   { (eval echo "$as_me:20640: \"$ac_try\"") >&5
20641   (eval $ac_try) 2>&5
20642   ac_status=$?
20643   echo "$as_me:20643: \$? = $ac_status" >&5
20644   (exit "$ac_status"); }; }; then
20645   eval "$as_ac_var=yes"
20646 else
20647   echo "$as_me: failed program was:" >&5
20648 cat "conftest.$ac_ext" >&5
20649 eval "$as_ac_var=no"
20650 fi
20651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20652 fi
20653 echo "$as_me:20653: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20654 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20655 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20656   cat >>confdefs.h <<EOF
20657 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20658 EOF
20659
20660 fi
20661 done
20662
20663 echo "$as_me:20663: checking if getenv returns consistent values" >&5
20664 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20665 if test "${cf_cv_consistent_getenv+set}" = set; then
20666   echo $ECHO_N "(cached) $ECHO_C" >&6
20667 else
20668
20669 if test "$cross_compiling" = yes; then
20670   cf_cv_consistent_getenv=unknown
20671 else
20672   cat >"conftest.$ac_ext" <<_ACEOF
20673 #line 20673 "configure"
20674 #include "confdefs.h"
20675
20676 #include <stdlib.h>
20677 #include <unistd.h>
20678 #include <stdio.h>
20679 #include <string.h>
20680 #include <sys/types.h>
20681
20682 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20683 extern char **environ;  /* POSIX, but some systems are not... */
20684 #endif
20685
20686 #if defined(HAVE_STRDUP)
20687 #define str_alloc(s) strdup(s)
20688 #else
20689 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20690 #endif
20691
20692 static void set_value(const char *name, const char *value)
20693 {
20694 #if defined(HAVE_SETENV)
20695         setenv(name, value, 1);
20696 #elif defined(HAVE_PUTENV)
20697         char buffer[1024];
20698         sprintf(buffer, "%s=%s", name, value);
20699         putenv(str_alloc(buffer));
20700 #else
20701 #error neither putenv/setenv found
20702 #endif
20703 }
20704 int main(void)
20705 {
20706         int pass;
20707         size_t numenv, limit, j;
20708         char **mynames;
20709         char **myvalues;
20710         char **mypointer;
20711         char *equals;
20712         for (numenv = 0; environ[numenv]; ++numenv) ;
20713         limit = numenv + 10;
20714         mynames = (char **) calloc(limit + 1, sizeof(char *));
20715         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20716         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20717 #if defined(HAVE_ENVIRON)
20718         for (j = 0; environ[j]; ++j) {
20719                 mynames[j] = str_alloc(environ[j]);
20720                 equals = strchr(mynames[j], '=');
20721                 if (equals != 0) {
20722                         *equals++ = '\\0';
20723                         myvalues[j] = str_alloc(equals);
20724                 } else {
20725                         myvalues[j] = str_alloc("");
20726                 }
20727         }
20728 #endif
20729         for (j = numenv; j < limit; ++j) {
20730                 char name[80];
20731                 char value[80];
20732                 size_t found;
20733                 size_t k = 0;
20734                 do {
20735                         size_t jk;
20736                         found = 0;
20737                         sprintf(name, "TERM%lu", (unsigned long) k);
20738                         for (jk = 0; jk < j; ++jk) {
20739                                 if (!strcmp(name, mynames[jk])) {
20740                                         found = 1;
20741                                         ++k;
20742                                         break;
20743                                 }
20744                         }
20745                 } while (found);
20746                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20747                 set_value(name, value);
20748                 mynames[j] = str_alloc(name);
20749                 myvalues[j] = str_alloc(value);
20750         }
20751         for (pass = 0; pass < 3; ++pass) {
20752                 for (j = 0; j < limit; ++j) {
20753                         char *value = getenv(mynames[j]);
20754                         if (pass) {
20755                                 if (value == 0) {
20756                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20757                                         ${cf_cv_main_return:-return}(1);
20758                                 } else if (value != mypointer[j]) {
20759                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20760                                         ${cf_cv_main_return:-return}(1);
20761                                 } else if (strcmp(value, myvalues[j])) {
20762                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20763                                         ${cf_cv_main_return:-return}(1);
20764                                 }
20765                         } else {
20766                                 size_t k;
20767                                 mypointer[j] = value;
20768                                 for (k = 0; k < j; ++k) {
20769                                         if (mypointer[j] == mypointer[k]) {
20770                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20771                                                 ${cf_cv_main_return:-return}(1);
20772                                         }
20773                                 }
20774                         }
20775                 }
20776         }
20777         ${cf_cv_main_return:-return}(0);
20778 }
20779
20780 _ACEOF
20781 rm -f "conftest$ac_exeext"
20782 if { (eval echo "$as_me:20782: \"$ac_link\"") >&5
20783   (eval $ac_link) 2>&5
20784   ac_status=$?
20785   echo "$as_me:20785: \$? = $ac_status" >&5
20786   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20787   { (eval echo "$as_me:20787: \"$ac_try\"") >&5
20788   (eval $ac_try) 2>&5
20789   ac_status=$?
20790   echo "$as_me:20790: \$? = $ac_status" >&5
20791   (exit "$ac_status"); }; }; then
20792   cf_cv_consistent_getenv=yes
20793 else
20794   echo "$as_me: program exited with status $ac_status" >&5
20795 echo "$as_me: failed program was:" >&5
20796 cat "conftest.$ac_ext" >&5
20797 cf_cv_consistent_getenv=no
20798 fi
20799 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20800 fi
20801
20802 fi
20803 echo "$as_me:20803: result: $cf_cv_consistent_getenv" >&5
20804 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20805
20806 if test "x$cf_cv_consistent_getenv" = xno
20807 then
20808
20809 cat >>confdefs.h <<\EOF
20810 #define HAVE_CONSISTENT_GETENV 1
20811 EOF
20812
20813 fi
20814
20815 if test "x$cf_cv_consistent_getenv" = xno && \
20816         test "x$cf_with_trace" = xyes
20817 then
20818         { echo "$as_me:20818: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20819 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20820 fi
20821
20822 echo "$as_me:20822: checking if sys/time.h works with sys/select.h" >&5
20823 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20824 if test "${cf_cv_sys_time_select+set}" = set; then
20825   echo $ECHO_N "(cached) $ECHO_C" >&6
20826 else
20827
20828 cat >"conftest.$ac_ext" <<_ACEOF
20829 #line 20829 "configure"
20830 #include "confdefs.h"
20831
20832 #include <sys/types.h>
20833 #ifdef HAVE_SYS_TIME_H
20834 #include <sys/time.h>
20835 #endif
20836 #ifdef HAVE_SYS_SELECT_H
20837 #include <sys/select.h>
20838 #endif
20839
20840 int
20841 main (void)
20842 {
20843
20844   ;
20845   return 0;
20846 }
20847 _ACEOF
20848 rm -f "conftest.$ac_objext"
20849 if { (eval echo "$as_me:20849: \"$ac_compile\"") >&5
20850   (eval $ac_compile) 2>&5
20851   ac_status=$?
20852   echo "$as_me:20852: \$? = $ac_status" >&5
20853   (exit "$ac_status"); } &&
20854          { ac_try='test -s "conftest.$ac_objext"'
20855   { (eval echo "$as_me:20855: \"$ac_try\"") >&5
20856   (eval $ac_try) 2>&5
20857   ac_status=$?
20858   echo "$as_me:20858: \$? = $ac_status" >&5
20859   (exit "$ac_status"); }; }; then
20860   cf_cv_sys_time_select=yes
20861 else
20862   echo "$as_me: failed program was:" >&5
20863 cat "conftest.$ac_ext" >&5
20864 cf_cv_sys_time_select=no
20865 fi
20866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20867
20868 fi
20869
20870 echo "$as_me:20870: result: $cf_cv_sys_time_select" >&5
20871 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20872 test "$cf_cv_sys_time_select" = yes &&
20873 cat >>confdefs.h <<\EOF
20874 #define HAVE_SYS_TIME_SELECT 1
20875 EOF
20876
20877 ###     checks for compiler characteristics
20878 ac_ext=c
20879 ac_cpp='$CPP $CPPFLAGS'
20880 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20881 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20883 ac_main_return="return"
20884
20885 echo "$as_me:20885: checking for an ANSI C-conforming const" >&5
20886 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20887 if test "${ac_cv_c_const+set}" = set; then
20888   echo $ECHO_N "(cached) $ECHO_C" >&6
20889 else
20890   cat >"conftest.$ac_ext" <<_ACEOF
20891 #line 20891 "configure"
20892 #include "confdefs.h"
20893
20894 int
20895 main (void)
20896 {
20897 /* FIXME: Include the comments suggested by Paul. */
20898 #ifndef __cplusplus
20899   /* Ultrix mips cc rejects this.  */
20900   typedef int charset[2];
20901   const charset x;
20902   /* SunOS 4.1.1 cc rejects this.  */
20903   char const *const *ccp;
20904   char **p;
20905   /* NEC SVR4.0.2 mips cc rejects this.  */
20906   struct point {int x, y;};
20907   static struct point const zero = {0,0};
20908   /* AIX XL C 1.02.0.0 rejects this.
20909      It does not let you subtract one const X* pointer from another in
20910      an arm of an if-expression whose if-part is not a constant
20911      expression */
20912   const char *g = "string";
20913   ccp = &g + (g ? g-g : 0);
20914   /* HPUX 7.0 cc rejects these. */
20915   ++ccp;
20916   p = (char**) ccp;
20917   ccp = (char const *const *) p;
20918   { /* SCO 3.2v4 cc rejects this.  */
20919     char *t;
20920     char const *s = 0 ? (char *) 0 : (char const *) 0;
20921
20922     *t++ = 0;
20923   }
20924   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20925     int x[] = {25, 17};
20926     const int *foo = &x[0];
20927     ++foo;
20928   }
20929   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20930     typedef const int *iptr;
20931     iptr p = 0;
20932     ++p;
20933   }
20934   { /* AIX XL C 1.02.0.0 rejects this saying
20935        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20936     struct s { int j; const int *ap[3]; };
20937     struct s *b; b->j = 5;
20938   }
20939   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20940     const int foo = 10;
20941   }
20942 #endif
20943
20944   ;
20945   return 0;
20946 }
20947 _ACEOF
20948 rm -f "conftest.$ac_objext"
20949 if { (eval echo "$as_me:20949: \"$ac_compile\"") >&5
20950   (eval $ac_compile) 2>&5
20951   ac_status=$?
20952   echo "$as_me:20952: \$? = $ac_status" >&5
20953   (exit "$ac_status"); } &&
20954          { ac_try='test -s "conftest.$ac_objext"'
20955   { (eval echo "$as_me:20955: \"$ac_try\"") >&5
20956   (eval $ac_try) 2>&5
20957   ac_status=$?
20958   echo "$as_me:20958: \$? = $ac_status" >&5
20959   (exit "$ac_status"); }; }; then
20960   ac_cv_c_const=yes
20961 else
20962   echo "$as_me: failed program was:" >&5
20963 cat "conftest.$ac_ext" >&5
20964 ac_cv_c_const=no
20965 fi
20966 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20967 fi
20968 echo "$as_me:20968: result: $ac_cv_c_const" >&5
20969 echo "${ECHO_T}$ac_cv_c_const" >&6
20970 if test $ac_cv_c_const = no; then
20971
20972 cat >>confdefs.h <<\EOF
20973 #define const
20974 EOF
20975
20976 fi
20977
20978 echo "$as_me:20978: checking for inline" >&5
20979 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20980 if test "${ac_cv_c_inline+set}" = set; then
20981   echo $ECHO_N "(cached) $ECHO_C" >&6
20982 else
20983   ac_cv_c_inline=no
20984 for ac_kw in inline __inline__ __inline; do
20985   cat >"conftest.$ac_ext" <<_ACEOF
20986 #line 20986 "configure"
20987 #include "confdefs.h"
20988 #ifndef __cplusplus
20989 static $ac_kw int static_foo () {return 0; }
20990 $ac_kw int foo () {return 0; }
20991 #endif
20992
20993 _ACEOF
20994 rm -f "conftest.$ac_objext"
20995 if { (eval echo "$as_me:20995: \"$ac_compile\"") >&5
20996   (eval $ac_compile) 2>&5
20997   ac_status=$?
20998   echo "$as_me:20998: \$? = $ac_status" >&5
20999   (exit "$ac_status"); } &&
21000          { ac_try='test -s "conftest.$ac_objext"'
21001   { (eval echo "$as_me:21001: \"$ac_try\"") >&5
21002   (eval $ac_try) 2>&5
21003   ac_status=$?
21004   echo "$as_me:21004: \$? = $ac_status" >&5
21005   (exit "$ac_status"); }; }; then
21006   ac_cv_c_inline=$ac_kw; break
21007 else
21008   echo "$as_me: failed program was:" >&5
21009 cat "conftest.$ac_ext" >&5
21010 fi
21011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21012 done
21013
21014 fi
21015 echo "$as_me:21015: result: $ac_cv_c_inline" >&5
21016 echo "${ECHO_T}$ac_cv_c_inline" >&6
21017 case $ac_cv_c_inline in
21018   inline | yes) ;;
21019   no)
21020 cat >>confdefs.h <<\EOF
21021 #define inline
21022 EOF
21023  ;;
21024   *)  cat >>confdefs.h <<EOF
21025 #define inline $ac_cv_c_inline
21026 EOF
21027  ;;
21028 esac
21029
21030 NCURSES_INLINE=
21031 if test "$ac_cv_c_inline" != no ; then
21032         NCURSES_INLINE=inline
21033         if test "$INTEL_COMPILER" = yes
21034         then
21035                 :
21036         elif test "$CLANG_COMPILER" = yes
21037         then
21038                 :
21039         elif test "$GCC" = yes
21040         then
21041                 echo "$as_me:21041: checking if $CC supports options to tune inlining" >&5
21042 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21043 if test "${cf_cv_gcc_inline+set}" = set; then
21044   echo $ECHO_N "(cached) $ECHO_C" >&6
21045 else
21046
21047                 cf_save_CFLAGS=$CFLAGS
21048                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21049                 cat >"conftest.$ac_ext" <<_ACEOF
21050 #line 21050 "configure"
21051 #include "confdefs.h"
21052 inline int foo(void) { return 1; }
21053 int
21054 main (void)
21055 {
21056 ${cf_cv_main_return:-return} foo()
21057   ;
21058   return 0;
21059 }
21060 _ACEOF
21061 rm -f "conftest.$ac_objext"
21062 if { (eval echo "$as_me:21062: \"$ac_compile\"") >&5
21063   (eval $ac_compile) 2>&5
21064   ac_status=$?
21065   echo "$as_me:21065: \$? = $ac_status" >&5
21066   (exit "$ac_status"); } &&
21067          { ac_try='test -s "conftest.$ac_objext"'
21068   { (eval echo "$as_me:21068: \"$ac_try\"") >&5
21069   (eval $ac_try) 2>&5
21070   ac_status=$?
21071   echo "$as_me:21071: \$? = $ac_status" >&5
21072   (exit "$ac_status"); }; }; then
21073   cf_cv_gcc_inline=yes
21074 else
21075   echo "$as_me: failed program was:" >&5
21076 cat "conftest.$ac_ext" >&5
21077 cf_cv_gcc_inline=no
21078 fi
21079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21080                 CFLAGS=$cf_save_CFLAGS
21081
21082 fi
21083 echo "$as_me:21083: result: $cf_cv_gcc_inline" >&5
21084 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21085                 if test "$cf_cv_gcc_inline" = yes ; then
21086
21087 cf_fix_cppflags=no
21088 cf_new_cflags=
21089 cf_new_cppflags=
21090 cf_new_extra_cppflags=
21091
21092 for cf_add_cflags in --param max-inline-insns-single=1200
21093 do
21094 case "$cf_fix_cppflags" in
21095 (no)
21096         case "$cf_add_cflags" in
21097         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21098                 case "$cf_add_cflags" in
21099                 (-D*)
21100                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21101
21102                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21103                                 && test -z "${cf_tst_cflags}" \
21104                                 && cf_fix_cppflags=yes
21105
21106                         if test "$cf_fix_cppflags" = yes ; then
21107
21108         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21109         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21110
21111                                 continue
21112                         elif test "${cf_tst_cflags}" = "\"'" ; then
21113
21114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21116
21117                                 continue
21118                         fi
21119                         ;;
21120                 esac
21121                 case "$CPPFLAGS" in
21122                 (*$cf_add_cflags)
21123                         ;;
21124                 (*)
21125                         case "$cf_add_cflags" in
21126                         (-D*)
21127                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21128
21129 CPPFLAGS=`echo "$CPPFLAGS" | \
21130         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21131                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21132
21133                                 ;;
21134                         esac
21135
21136         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21137         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21138
21139                         ;;
21140                 esac
21141                 ;;
21142         (*)
21143
21144         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21145         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21146
21147                 ;;
21148         esac
21149         ;;
21150 (yes)
21151
21152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21154
21155         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21156
21157         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21158                 && test -z "${cf_tst_cflags}" \
21159                 && cf_fix_cppflags=no
21160         ;;
21161 esac
21162 done
21163
21164 if test -n "$cf_new_cflags" ; then
21165
21166         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21167         CFLAGS="${CFLAGS}$cf_new_cflags"
21168
21169 fi
21170
21171 if test -n "$cf_new_cppflags" ; then
21172
21173         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21174         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21175
21176 fi
21177
21178 if test -n "$cf_new_extra_cppflags" ; then
21179
21180         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21181         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21182
21183 fi
21184
21185                 fi
21186         fi
21187 fi
21188
21189 echo "$as_me:21189: checking for signal global datatype" >&5
21190 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21191 if test "${cf_cv_sig_atomic_t+set}" = set; then
21192   echo $ECHO_N "(cached) $ECHO_C" >&6
21193 else
21194
21195         for cf_type in \
21196                 "volatile sig_atomic_t" \
21197                 "sig_atomic_t" \
21198                 "int"
21199         do
21200         cat >"conftest.$ac_ext" <<_ACEOF
21201 #line 21201 "configure"
21202 #include "confdefs.h"
21203
21204 #include <sys/types.h>
21205 #include <signal.h>
21206 #include <stdio.h>
21207
21208 extern $cf_type x;
21209 $cf_type x;
21210 static void handler(int sig)
21211 {
21212         (void)sig;
21213         x = 5;
21214 }
21215 int
21216 main (void)
21217 {
21218 signal(SIGINT, handler);
21219                  x = 1
21220   ;
21221   return 0;
21222 }
21223 _ACEOF
21224 rm -f "conftest.$ac_objext"
21225 if { (eval echo "$as_me:21225: \"$ac_compile\"") >&5
21226   (eval $ac_compile) 2>&5
21227   ac_status=$?
21228   echo "$as_me:21228: \$? = $ac_status" >&5
21229   (exit "$ac_status"); } &&
21230          { ac_try='test -s "conftest.$ac_objext"'
21231   { (eval echo "$as_me:21231: \"$ac_try\"") >&5
21232   (eval $ac_try) 2>&5
21233   ac_status=$?
21234   echo "$as_me:21234: \$? = $ac_status" >&5
21235   (exit "$ac_status"); }; }; then
21236   cf_cv_sig_atomic_t=$cf_type
21237 else
21238   echo "$as_me: failed program was:" >&5
21239 cat "conftest.$ac_ext" >&5
21240 cf_cv_sig_atomic_t=no
21241 fi
21242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21243                 test "$cf_cv_sig_atomic_t" != no && break
21244         done
21245
21246 fi
21247
21248 echo "$as_me:21248: result: $cf_cv_sig_atomic_t" >&5
21249 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21250 test "$cf_cv_sig_atomic_t" != no &&
21251 cat >>confdefs.h <<EOF
21252 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21253 EOF
21254
21255 if test "$NCURSES_CHTYPE" = auto ; then
21256
21257 echo "$as_me:21257: checking for type of chtype" >&5
21258 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21259 if test "${cf_cv_typeof_chtype+set}" = set; then
21260   echo $ECHO_N "(cached) $ECHO_C" >&6
21261 else
21262
21263                 if test "$cross_compiling" = yes; then
21264   cf_cv_typeof_chtype=long
21265 else
21266   cat >"conftest.$ac_ext" <<_ACEOF
21267 #line 21267 "configure"
21268 #include "confdefs.h"
21269
21270 #define WANT_BITS 31
21271 #include <stdio.h>
21272 int main(void)
21273 {
21274         FILE *fp = fopen("cf_test.out", "w");
21275         if (fp != 0) {
21276                 char *result = "long";
21277                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21278                         int n;
21279                         unsigned int x, y;
21280                         for (n = 0; n < WANT_BITS; n++) {
21281                                 x = (1 << n);
21282                                 y = (x >> n);
21283                                 if (y != 1 || x == 0) {
21284                                         x = 0;
21285                                         break;
21286                                 }
21287                         }
21288                         /*
21289                          * If x is nonzero, an int is big enough for the bits
21290                          * that we want.
21291                          */
21292                         result = (x != 0) ? "int" : "long";
21293                 }
21294                 fputs(result, fp);
21295                 fclose(fp);
21296         }
21297         ${cf_cv_main_return:-return}(0);
21298 }
21299
21300 _ACEOF
21301 rm -f "conftest$ac_exeext"
21302 if { (eval echo "$as_me:21302: \"$ac_link\"") >&5
21303   (eval $ac_link) 2>&5
21304   ac_status=$?
21305   echo "$as_me:21305: \$? = $ac_status" >&5
21306   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21307   { (eval echo "$as_me:21307: \"$ac_try\"") >&5
21308   (eval $ac_try) 2>&5
21309   ac_status=$?
21310   echo "$as_me:21310: \$? = $ac_status" >&5
21311   (exit "$ac_status"); }; }; then
21312   cf_cv_typeof_chtype=`cat cf_test.out`
21313 else
21314   echo "$as_me: program exited with status $ac_status" >&5
21315 echo "$as_me: failed program was:" >&5
21316 cat "conftest.$ac_ext" >&5
21317 cf_cv_typeof_chtype=long
21318 fi
21319 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21320 fi
21321                 rm -f cf_test.out
21322
21323 fi
21324
21325 echo "$as_me:21325: result: $cf_cv_typeof_chtype" >&5
21326 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21327
21328 cat >>confdefs.h <<EOF
21329 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21330 EOF
21331
21332 else
21333         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21334 fi
21335 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21336
21337 echo "$as_me:21337: checking if unsigned literals are legal" >&5
21338 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21339 if test "${cf_cv_unsigned_literals+set}" = set; then
21340   echo $ECHO_N "(cached) $ECHO_C" >&6
21341 else
21342
21343         cat >"conftest.$ac_ext" <<_ACEOF
21344 #line 21344 "configure"
21345 #include "confdefs.h"
21346
21347 int
21348 main (void)
21349 {
21350 long x = 1L + 1UL + 1U + 1
21351   ;
21352   return 0;
21353 }
21354 _ACEOF
21355 rm -f "conftest.$ac_objext"
21356 if { (eval echo "$as_me:21356: \"$ac_compile\"") >&5
21357   (eval $ac_compile) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit "$ac_status"); } &&
21361          { ac_try='test -s "conftest.$ac_objext"'
21362   { (eval echo "$as_me:21362: \"$ac_try\"") >&5
21363   (eval $ac_try) 2>&5
21364   ac_status=$?
21365   echo "$as_me:21365: \$? = $ac_status" >&5
21366   (exit "$ac_status"); }; }; then
21367   cf_cv_unsigned_literals=yes
21368 else
21369   echo "$as_me: failed program was:" >&5
21370 cat "conftest.$ac_ext" >&5
21371 cf_cv_unsigned_literals=no
21372 fi
21373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21374
21375 fi
21376
21377 echo "$as_me:21377: result: $cf_cv_unsigned_literals" >&5
21378 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21379
21380 cf_cv_1UL="1"
21381 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21382 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21383
21384 if test "$NCURSES_MMASK_T" = auto ; then
21385         cf_cv_typeof_mmask_t=long
21386 else
21387         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21388 fi
21389 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21390
21391 ###     Checks for external-data
21392
21393 echo "$as_me:21393: checking if external errno is declared" >&5
21394 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21395 if test "${cf_cv_dcl_errno+set}" = set; then
21396   echo $ECHO_N "(cached) $ECHO_C" >&6
21397 else
21398
21399         cat >"conftest.$ac_ext" <<_ACEOF
21400 #line 21400 "configure"
21401 #include "confdefs.h"
21402
21403 #ifdef HAVE_STDLIB_H
21404 #include <stdlib.h>
21405 #endif
21406 #include <stdio.h>
21407 #include <sys/types.h>
21408 #include <errno.h>
21409 int
21410 main (void)
21411 {
21412 int x = (int) errno; (void)x
21413   ;
21414   return 0;
21415 }
21416 _ACEOF
21417 rm -f "conftest.$ac_objext"
21418 if { (eval echo "$as_me:21418: \"$ac_compile\"") >&5
21419   (eval $ac_compile) 2>&5
21420   ac_status=$?
21421   echo "$as_me:21421: \$? = $ac_status" >&5
21422   (exit "$ac_status"); } &&
21423          { ac_try='test -s "conftest.$ac_objext"'
21424   { (eval echo "$as_me:21424: \"$ac_try\"") >&5
21425   (eval $ac_try) 2>&5
21426   ac_status=$?
21427   echo "$as_me:21427: \$? = $ac_status" >&5
21428   (exit "$ac_status"); }; }; then
21429   cf_cv_dcl_errno=yes
21430 else
21431   echo "$as_me: failed program was:" >&5
21432 cat "conftest.$ac_ext" >&5
21433 cf_cv_dcl_errno=no
21434 fi
21435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21436
21437 fi
21438 echo "$as_me:21438: result: $cf_cv_dcl_errno" >&5
21439 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21440
21441 if test "$cf_cv_dcl_errno" = no ; then
21442
21443 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21444
21445         cat >>confdefs.h <<EOF
21446 #define $cf_result 1
21447 EOF
21448
21449 fi
21450
21451 # It's possible (for near-UNIX clones) that the data doesn't exist
21452
21453 echo "$as_me:21453: checking if external errno exists" >&5
21454 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21455 if test "${cf_cv_have_errno+set}" = set; then
21456   echo $ECHO_N "(cached) $ECHO_C" >&6
21457 else
21458
21459         cat >"conftest.$ac_ext" <<_ACEOF
21460 #line 21460 "configure"
21461 #include "confdefs.h"
21462
21463 #undef errno
21464 extern int errno;
21465
21466 int
21467 main (void)
21468 {
21469 errno = 2
21470   ;
21471   return 0;
21472 }
21473 _ACEOF
21474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21475 if { (eval echo "$as_me:21475: \"$ac_link\"") >&5
21476   (eval $ac_link) 2>&5
21477   ac_status=$?
21478   echo "$as_me:21478: \$? = $ac_status" >&5
21479   (exit "$ac_status"); } &&
21480          { ac_try='test -s "conftest$ac_exeext"'
21481   { (eval echo "$as_me:21481: \"$ac_try\"") >&5
21482   (eval $ac_try) 2>&5
21483   ac_status=$?
21484   echo "$as_me:21484: \$? = $ac_status" >&5
21485   (exit "$ac_status"); }; }; then
21486   cf_cv_have_errno=yes
21487 else
21488   echo "$as_me: failed program was:" >&5
21489 cat "conftest.$ac_ext" >&5
21490 cf_cv_have_errno=no
21491 fi
21492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21493
21494 fi
21495 echo "$as_me:21495: result: $cf_cv_have_errno" >&5
21496 echo "${ECHO_T}$cf_cv_have_errno" >&6
21497
21498 if test "$cf_cv_have_errno" = yes ; then
21499
21500 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21501
21502         cat >>confdefs.h <<EOF
21503 #define $cf_result 1
21504 EOF
21505
21506 fi
21507
21508 echo "$as_me:21508: checking if data-only library module links" >&5
21509 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21510 if test "${cf_cv_link_dataonly+set}" = set; then
21511   echo $ECHO_N "(cached) $ECHO_C" >&6
21512 else
21513
21514         rm -f conftest.a
21515         cat >conftest.$ac_ext <<EOF
21516 #line 21516 "configure"
21517 int     testdata[3] = { 123, 456, 789 };
21518 EOF
21519         if { (eval echo "$as_me:21519: \"$ac_compile\"") >&5
21520   (eval $ac_compile) 2>&5
21521   ac_status=$?
21522   echo "$as_me:21522: \$? = $ac_status" >&5
21523   (exit "$ac_status"); } ; then
21524                 mv conftest.o data.o && \
21525                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21526         fi
21527         rm -f conftest.$ac_ext data.o
21528         cat >conftest.$ac_ext <<EOF
21529 #line 21529 "configure"
21530 int     testfunc(void)
21531 {
21532 #if defined(NeXT)
21533         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21534 #else
21535         extern int testdata[3];
21536         return testdata[0] == 123
21537            &&  testdata[1] == 456
21538            &&  testdata[2] == 789;
21539 #endif
21540 }
21541 EOF
21542         if { (eval echo "$as_me:21542: \"$ac_compile\"") >&5
21543   (eval $ac_compile) 2>&5
21544   ac_status=$?
21545   echo "$as_me:21545: \$? = $ac_status" >&5
21546   (exit "$ac_status"); }; then
21547                 mv conftest.o func.o && \
21548                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21549         fi
21550         rm -f conftest.$ac_ext func.o
21551         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21552         cf_saveLIBS="$LIBS"
21553         LIBS="conftest.a $LIBS"
21554         if test "$cross_compiling" = yes; then
21555   cf_cv_link_dataonly=unknown
21556 else
21557   cat >"conftest.$ac_ext" <<_ACEOF
21558 #line 21558 "configure"
21559 #include "confdefs.h"
21560
21561         int main(void)
21562         {
21563                 extern int testfunc();
21564                 ${cf_cv_main_return:-return} (!testfunc());
21565         }
21566
21567 _ACEOF
21568 rm -f "conftest$ac_exeext"
21569 if { (eval echo "$as_me:21569: \"$ac_link\"") >&5
21570   (eval $ac_link) 2>&5
21571   ac_status=$?
21572   echo "$as_me:21572: \$? = $ac_status" >&5
21573   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21574   { (eval echo "$as_me:21574: \"$ac_try\"") >&5
21575   (eval $ac_try) 2>&5
21576   ac_status=$?
21577   echo "$as_me:21577: \$? = $ac_status" >&5
21578   (exit "$ac_status"); }; }; then
21579   cf_cv_link_dataonly=yes
21580 else
21581   echo "$as_me: program exited with status $ac_status" >&5
21582 echo "$as_me: failed program was:" >&5
21583 cat "conftest.$ac_ext" >&5
21584 cf_cv_link_dataonly=no
21585 fi
21586 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21587 fi
21588         LIBS="$cf_saveLIBS"
21589
21590 fi
21591
21592 echo "$as_me:21592: result: $cf_cv_link_dataonly" >&5
21593 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21594
21595 if test "$cf_cv_link_dataonly" = no ; then
21596
21597 cat >>confdefs.h <<\EOF
21598 #define BROKEN_LINKER 1
21599 EOF
21600
21601         BROKEN_LINKER=1
21602 fi
21603
21604 ###     Checks for library functions.
21605
21606 for ac_func in \
21607 fpathconf \
21608 getcwd \
21609 getegid \
21610 geteuid \
21611 getopt \
21612 issetugid \
21613 localeconv \
21614 poll \
21615 putenv \
21616 remove \
21617 select \
21618 setbuf \
21619 setbuffer \
21620 setenv \
21621 setfsuid \
21622 setvbuf \
21623 sigaction \
21624 sigvec \
21625 snprintf \
21626 strdup \
21627 strstr \
21628 sysconf \
21629 tcgetpgrp \
21630 times \
21631 tsearch \
21632 vsnprintf \
21633
21634 do
21635 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21636 echo "$as_me:21636: checking for $ac_func" >&5
21637 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21638 if eval "test \"\${$as_ac_var+set}\" = set"; then
21639   echo $ECHO_N "(cached) $ECHO_C" >&6
21640 else
21641   cat >"conftest.$ac_ext" <<_ACEOF
21642 #line 21642 "configure"
21643 #include "confdefs.h"
21644 #define $ac_func autoconf_temporary
21645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21646 #undef $ac_func
21647
21648 #ifdef __cplusplus
21649 extern "C"
21650 #endif
21651
21652 /* We use char because int might match the return type of a gcc2
21653    builtin and then its argument prototype would still apply.  */
21654 char $ac_func (void);
21655
21656 int
21657 main (void)
21658 {
21659
21660 /* The GNU C library defines stubs for functions which it implements
21661     to always fail with ENOSYS.  Some functions are actually named
21662     something starting with __ and the normal name is an alias.  */
21663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21664 #error found stub for $ac_func
21665 #endif
21666
21667         return $ac_func ();
21668   ;
21669   return 0;
21670 }
21671 _ACEOF
21672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21673 if { (eval echo "$as_me:21673: \"$ac_link\"") >&5
21674   (eval $ac_link) 2>&5
21675   ac_status=$?
21676   echo "$as_me:21676: \$? = $ac_status" >&5
21677   (exit "$ac_status"); } &&
21678          { ac_try='test -s "conftest$ac_exeext"'
21679   { (eval echo "$as_me:21679: \"$ac_try\"") >&5
21680   (eval $ac_try) 2>&5
21681   ac_status=$?
21682   echo "$as_me:21682: \$? = $ac_status" >&5
21683   (exit "$ac_status"); }; }; then
21684   eval "$as_ac_var=yes"
21685 else
21686   echo "$as_me: failed program was:" >&5
21687 cat "conftest.$ac_ext" >&5
21688 eval "$as_ac_var=no"
21689 fi
21690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21691 fi
21692 echo "$as_me:21692: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21693 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21694 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21695   cat >>confdefs.h <<EOF
21696 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21697 EOF
21698
21699 fi
21700 done
21701
21702 echo "$as_me:21702: checking if _PATH_TTYS is defined in ttyent.h" >&5
21703 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21704 if test "${cf_cv_PATH_TTYS+set}" = set; then
21705   echo $ECHO_N "(cached) $ECHO_C" >&6
21706 else
21707
21708 cat >"conftest.$ac_ext" <<_ACEOF
21709 #line 21709 "configure"
21710 #include "confdefs.h"
21711
21712 #include <stdio.h>
21713 #include <ttyent.h>
21714 int
21715 main (void)
21716 {
21717
21718 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21719   ;
21720   return 0;
21721 }
21722 _ACEOF
21723 rm -f "conftest.$ac_objext"
21724 if { (eval echo "$as_me:21724: \"$ac_compile\"") >&5
21725   (eval $ac_compile) 2>&5
21726   ac_status=$?
21727   echo "$as_me:21727: \$? = $ac_status" >&5
21728   (exit "$ac_status"); } &&
21729          { ac_try='test -s "conftest.$ac_objext"'
21730   { (eval echo "$as_me:21730: \"$ac_try\"") >&5
21731   (eval $ac_try) 2>&5
21732   ac_status=$?
21733   echo "$as_me:21733: \$? = $ac_status" >&5
21734   (exit "$ac_status"); }; }; then
21735   cf_cv_PATH_TTYS=yes
21736 else
21737   echo "$as_me: failed program was:" >&5
21738 cat "conftest.$ac_ext" >&5
21739 cf_cv_PATH_TTYS=no
21740 fi
21741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21742 fi
21743 echo "$as_me:21743: result: $cf_cv_PATH_TTYS" >&5
21744 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21745
21746 if test $cf_cv_PATH_TTYS = no
21747 then
21748         for cf_ttys in /etc/ttytype /etc/ttys
21749         do
21750                 if test -f $cf_ttys
21751                 then
21752                         cf_cv_PATH_TTYS=maybe
21753
21754 cat >>confdefs.h <<\EOF
21755 #define _PATH_TTYS $cf_ttys
21756 EOF
21757
21758                         break
21759                 fi
21760         done
21761 fi
21762
21763 if test $cf_cv_PATH_TTYS != no
21764 then
21765         echo "$as_me:21765: checking if _PATH_TTYS file exists" >&5
21766 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21767 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21768   echo $ECHO_N "(cached) $ECHO_C" >&6
21769 else
21770
21771                 if test "$cross_compiling" = yes; then
21772   cf_cv_have_PATH_TTYS=unknown
21773 else
21774   cat >"conftest.$ac_ext" <<_ACEOF
21775 #line 21775 "configure"
21776 #include "confdefs.h"
21777
21778 #include <stdio.h>
21779 #include <ttyent.h>
21780 int main(void) {
21781         FILE *fp = fopen(_PATH_TTYS, "r");
21782         ${cf_cv_main_return:-return} (fp == 0);
21783 }
21784 _ACEOF
21785 rm -f "conftest$ac_exeext"
21786 if { (eval echo "$as_me:21786: \"$ac_link\"") >&5
21787   (eval $ac_link) 2>&5
21788   ac_status=$?
21789   echo "$as_me:21789: \$? = $ac_status" >&5
21790   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21791   { (eval echo "$as_me:21791: \"$ac_try\"") >&5
21792   (eval $ac_try) 2>&5
21793   ac_status=$?
21794   echo "$as_me:21794: \$? = $ac_status" >&5
21795   (exit "$ac_status"); }; }; then
21796   cf_cv_have_PATH_TTYS=yes
21797 else
21798   echo "$as_me: program exited with status $ac_status" >&5
21799 echo "$as_me: failed program was:" >&5
21800 cat "conftest.$ac_ext" >&5
21801 cf_cv_have_PATH_TTYS=no
21802 fi
21803 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21804 fi
21805 fi
21806 echo "$as_me:21806: result: $cf_cv_have_PATH_TTYS" >&5
21807 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21808         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21809 fi
21810
21811 if test $cf_cv_PATH_TTYS != no
21812 then
21813
21814 cat >>confdefs.h <<\EOF
21815 #define HAVE_PATH_TTYS 1
21816 EOF
21817
21818         echo "$as_me:21818: checking for getttynam" >&5
21819 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21820 if test "${cf_cv_func_getttynam+set}" = set; then
21821   echo $ECHO_N "(cached) $ECHO_C" >&6
21822 else
21823
21824                 cat >"conftest.$ac_ext" <<_ACEOF
21825 #line 21825 "configure"
21826 #include "confdefs.h"
21827 #include <ttyent.h>
21828 int
21829 main (void)
21830 {
21831 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21832   ;
21833   return 0;
21834 }
21835 _ACEOF
21836 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21837 if { (eval echo "$as_me:21837: \"$ac_link\"") >&5
21838   (eval $ac_link) 2>&5
21839   ac_status=$?
21840   echo "$as_me:21840: \$? = $ac_status" >&5
21841   (exit "$ac_status"); } &&
21842          { ac_try='test -s "conftest$ac_exeext"'
21843   { (eval echo "$as_me:21843: \"$ac_try\"") >&5
21844   (eval $ac_try) 2>&5
21845   ac_status=$?
21846   echo "$as_me:21846: \$? = $ac_status" >&5
21847   (exit "$ac_status"); }; }; then
21848   cf_cv_func_getttynam=yes
21849 else
21850   echo "$as_me: failed program was:" >&5
21851 cat "conftest.$ac_ext" >&5
21852 cf_cv_func_getttynam=no
21853 fi
21854 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21855 fi
21856 echo "$as_me:21856: result: $cf_cv_func_getttynam" >&5
21857 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21858         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21859 #define HAVE_GETTTYNAM 1
21860 EOF
21861
21862 fi
21863
21864 if test "x$ac_cv_func_getopt" = xno && \
21865    test "x$cf_with_progs$cf_with_tests" != xnono; then
21866         { { echo "$as_me:21866: error: getopt is required for building programs" >&5
21867 echo "$as_me: error: getopt is required for building programs" >&2;}
21868    { (exit 1); exit 1; }; }
21869 fi
21870
21871 if test "x$with_safe_sprintf" = xyes
21872 then
21873         if test "x$ac_cv_func_vsnprintf" = xyes
21874         then
21875                 { echo "$as_me:21875: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21876 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21877         else
21878
21879 cat >>confdefs.h <<\EOF
21880 #define USE_SAFE_SPRINTF 1
21881 EOF
21882
21883         fi
21884 fi
21885
21886 if test "x$with_getcap" = "xyes" ; then
21887
21888 echo "$as_me:21888: checking for terminal-capability database functions" >&5
21889 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21890 if test "${cf_cv_cgetent+set}" = set; then
21891   echo $ECHO_N "(cached) $ECHO_C" >&6
21892 else
21893
21894 cat >"conftest.$ac_ext" <<_ACEOF
21895 #line 21895 "configure"
21896 #include "confdefs.h"
21897
21898 #include <stdlib.h>
21899 int
21900 main (void)
21901 {
21902
21903         char temp[128];
21904         char *buf = temp;
21905         char *db_array = temp;
21906         cgetent(&buf, &db_array, "vt100");
21907         cgetcap(buf, "tc", '=');
21908         cgetmatch(buf, "tc");
21909
21910   ;
21911   return 0;
21912 }
21913 _ACEOF
21914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21915 if { (eval echo "$as_me:21915: \"$ac_link\"") >&5
21916   (eval $ac_link) 2>&5
21917   ac_status=$?
21918   echo "$as_me:21918: \$? = $ac_status" >&5
21919   (exit "$ac_status"); } &&
21920          { ac_try='test -s "conftest$ac_exeext"'
21921   { (eval echo "$as_me:21921: \"$ac_try\"") >&5
21922   (eval $ac_try) 2>&5
21923   ac_status=$?
21924   echo "$as_me:21924: \$? = $ac_status" >&5
21925   (exit "$ac_status"); }; }; then
21926   cf_cv_cgetent=yes
21927 else
21928   echo "$as_me: failed program was:" >&5
21929 cat "conftest.$ac_ext" >&5
21930 cf_cv_cgetent=no
21931 fi
21932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21933
21934 fi
21935 echo "$as_me:21935: result: $cf_cv_cgetent" >&5
21936 echo "${ECHO_T}$cf_cv_cgetent" >&6
21937
21938 if test "$cf_cv_cgetent" = yes
21939 then
21940
21941 cat >>confdefs.h <<\EOF
21942 #define HAVE_BSD_CGETENT 1
21943 EOF
21944
21945 echo "$as_me:21945: checking if cgetent uses const parameter" >&5
21946 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21947 if test "${cf_cv_cgetent_const+set}" = set; then
21948   echo $ECHO_N "(cached) $ECHO_C" >&6
21949 else
21950
21951 cat >"conftest.$ac_ext" <<_ACEOF
21952 #line 21952 "configure"
21953 #include "confdefs.h"
21954
21955 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21956 #include <stdlib.h>
21957 int
21958 main (void)
21959 {
21960
21961         char temp[128];
21962         char *buf = temp;
21963 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21964         const char *db_array = temp;
21965         cgetent(&buf, &db_array, "vt100");
21966 #endif
21967         cgetcap(buf, "tc", '=');
21968         cgetmatch(buf, "tc");
21969
21970   ;
21971   return 0;
21972 }
21973 _ACEOF
21974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21975 if { (eval echo "$as_me:21975: \"$ac_link\"") >&5
21976   (eval $ac_link) 2>&5
21977   ac_status=$?
21978   echo "$as_me:21978: \$? = $ac_status" >&5
21979   (exit "$ac_status"); } &&
21980          { ac_try='test -s "conftest$ac_exeext"'
21981   { (eval echo "$as_me:21981: \"$ac_try\"") >&5
21982   (eval $ac_try) 2>&5
21983   ac_status=$?
21984   echo "$as_me:21984: \$? = $ac_status" >&5
21985   (exit "$ac_status"); }; }; then
21986   cf_cv_cgetent_const=yes
21987 else
21988   echo "$as_me: failed program was:" >&5
21989 cat "conftest.$ac_ext" >&5
21990 cf_cv_cgetent_const=no
21991 fi
21992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21993
21994 fi
21995 echo "$as_me:21995: result: $cf_cv_cgetent_const" >&5
21996 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21997         if test "$cf_cv_cgetent_const" = yes
21998         then
21999
22000 cat >>confdefs.h <<EOF
22001 #define CGETENT_CONST const
22002 EOF
22003
22004         fi
22005 fi
22006
22007 fi
22008
22009 echo "$as_me:22009: checking for isascii" >&5
22010 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22011 if test "${cf_cv_have_isascii+set}" = set; then
22012   echo $ECHO_N "(cached) $ECHO_C" >&6
22013 else
22014
22015         cat >"conftest.$ac_ext" <<_ACEOF
22016 #line 22016 "configure"
22017 #include "confdefs.h"
22018 #include <ctype.h>
22019 int
22020 main (void)
22021 {
22022 int x = isascii(' ')
22023   ;
22024   return 0;
22025 }
22026 _ACEOF
22027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22028 if { (eval echo "$as_me:22028: \"$ac_link\"") >&5
22029   (eval $ac_link) 2>&5
22030   ac_status=$?
22031   echo "$as_me:22031: \$? = $ac_status" >&5
22032   (exit "$ac_status"); } &&
22033          { ac_try='test -s "conftest$ac_exeext"'
22034   { (eval echo "$as_me:22034: \"$ac_try\"") >&5
22035   (eval $ac_try) 2>&5
22036   ac_status=$?
22037   echo "$as_me:22037: \$? = $ac_status" >&5
22038   (exit "$ac_status"); }; }; then
22039   cf_cv_have_isascii=yes
22040 else
22041   echo "$as_me: failed program was:" >&5
22042 cat "conftest.$ac_ext" >&5
22043 cf_cv_have_isascii=no
22044 fi
22045 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22046
22047 fi
22048 echo "$as_me:22048: result: $cf_cv_have_isascii" >&5
22049 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22050 test "$cf_cv_have_isascii" = yes &&
22051 cat >>confdefs.h <<\EOF
22052 #define HAVE_ISASCII 1
22053 EOF
22054
22055 if test "$ac_cv_func_sigaction" = yes; then
22056 echo "$as_me:22056: checking whether sigaction needs _POSIX_SOURCE" >&5
22057 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22058 cat >"conftest.$ac_ext" <<_ACEOF
22059 #line 22059 "configure"
22060 #include "confdefs.h"
22061
22062 #include <sys/types.h>
22063 #include <signal.h>
22064 int
22065 main (void)
22066 {
22067 struct sigaction act
22068   ;
22069   return 0;
22070 }
22071 _ACEOF
22072 rm -f "conftest.$ac_objext"
22073 if { (eval echo "$as_me:22073: \"$ac_compile\"") >&5
22074   (eval $ac_compile) 2>&5
22075   ac_status=$?
22076   echo "$as_me:22076: \$? = $ac_status" >&5
22077   (exit "$ac_status"); } &&
22078          { ac_try='test -s "conftest.$ac_objext"'
22079   { (eval echo "$as_me:22079: \"$ac_try\"") >&5
22080   (eval $ac_try) 2>&5
22081   ac_status=$?
22082   echo "$as_me:22082: \$? = $ac_status" >&5
22083   (exit "$ac_status"); }; }; then
22084   sigact_bad=no
22085 else
22086   echo "$as_me: failed program was:" >&5
22087 cat "conftest.$ac_ext" >&5
22088
22089 cat >"conftest.$ac_ext" <<_ACEOF
22090 #line 22090 "configure"
22091 #include "confdefs.h"
22092
22093 #define _POSIX_SOURCE
22094 #include <sys/types.h>
22095 #include <signal.h>
22096 int
22097 main (void)
22098 {
22099 struct sigaction act
22100   ;
22101   return 0;
22102 }
22103 _ACEOF
22104 rm -f "conftest.$ac_objext"
22105 if { (eval echo "$as_me:22105: \"$ac_compile\"") >&5
22106   (eval $ac_compile) 2>&5
22107   ac_status=$?
22108   echo "$as_me:22108: \$? = $ac_status" >&5
22109   (exit "$ac_status"); } &&
22110          { ac_try='test -s "conftest.$ac_objext"'
22111   { (eval echo "$as_me:22111: \"$ac_try\"") >&5
22112   (eval $ac_try) 2>&5
22113   ac_status=$?
22114   echo "$as_me:22114: \$? = $ac_status" >&5
22115   (exit "$ac_status"); }; }; then
22116   sigact_bad=yes
22117
22118 cat >>confdefs.h <<\EOF
22119 #define _POSIX_SOURCE 1
22120 EOF
22121
22122 else
22123   echo "$as_me: failed program was:" >&5
22124 cat "conftest.$ac_ext" >&5
22125 sigact_bad=unknown
22126 fi
22127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22128 fi
22129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22130 echo "$as_me:22130: result: $sigact_bad" >&5
22131 echo "${ECHO_T}$sigact_bad" >&6
22132 fi
22133
22134 echo "$as_me:22134: checking if nanosleep really works" >&5
22135 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22136 if test "${cf_cv_func_nanosleep+set}" = set; then
22137   echo $ECHO_N "(cached) $ECHO_C" >&6
22138 else
22139
22140 if test "$cross_compiling" = yes; then
22141   cf_cv_func_nanosleep=unknown
22142 else
22143   cat >"conftest.$ac_ext" <<_ACEOF
22144 #line 22144 "configure"
22145 #include "confdefs.h"
22146
22147 #include <stdio.h>
22148 #include <errno.h>
22149 #include <time.h>
22150
22151 #ifdef HAVE_SYS_TIME_H
22152 #include <sys/time.h>
22153 #endif
22154
22155 int main(void) {
22156         struct timespec ts1, ts2;
22157         int code;
22158         ts1.tv_sec  = 0;
22159         ts1.tv_nsec = 750000000;
22160         ts2.tv_sec  = 0;
22161         ts2.tv_nsec = 0;
22162         errno = 0;
22163         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22164         ${cf_cv_main_return:-return}(code != 0);
22165 }
22166
22167 _ACEOF
22168 rm -f "conftest$ac_exeext"
22169 if { (eval echo "$as_me:22169: \"$ac_link\"") >&5
22170   (eval $ac_link) 2>&5
22171   ac_status=$?
22172   echo "$as_me:22172: \$? = $ac_status" >&5
22173   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22174   { (eval echo "$as_me:22174: \"$ac_try\"") >&5
22175   (eval $ac_try) 2>&5
22176   ac_status=$?
22177   echo "$as_me:22177: \$? = $ac_status" >&5
22178   (exit "$ac_status"); }; }; then
22179   cf_cv_func_nanosleep=yes
22180 else
22181   echo "$as_me: program exited with status $ac_status" >&5
22182 echo "$as_me: failed program was:" >&5
22183 cat "conftest.$ac_ext" >&5
22184 cf_cv_func_nanosleep=no
22185 fi
22186 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22187 fi
22188 fi
22189 echo "$as_me:22189: result: $cf_cv_func_nanosleep" >&5
22190 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22191
22192 test "$cf_cv_func_nanosleep" = "yes" &&
22193 cat >>confdefs.h <<\EOF
22194 #define HAVE_NANOSLEEP 1
22195 EOF
22196
22197 for ac_header in \
22198 termio.h \
22199 termios.h \
22200 unistd.h \
22201 sys/ioctl.h \
22202 sys/termio.h \
22203
22204 do
22205 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22206 echo "$as_me:22206: checking for $ac_header" >&5
22207 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22208 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22209   echo $ECHO_N "(cached) $ECHO_C" >&6
22210 else
22211   cat >"conftest.$ac_ext" <<_ACEOF
22212 #line 22212 "configure"
22213 #include "confdefs.h"
22214 #include <$ac_header>
22215 _ACEOF
22216 if { (eval echo "$as_me:22216: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22217   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22218   ac_status=$?
22219   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22220   rm -f conftest.er1
22221   cat conftest.err >&5
22222   echo "$as_me:22222: \$? = $ac_status" >&5
22223   (exit "$ac_status"); } >/dev/null; then
22224   if test -s conftest.err; then
22225     ac_cpp_err=$ac_c_preproc_warn_flag
22226   else
22227     ac_cpp_err=
22228   fi
22229 else
22230   ac_cpp_err=yes
22231 fi
22232 if test -z "$ac_cpp_err"; then
22233   eval "$as_ac_Header=yes"
22234 else
22235   echo "$as_me: failed program was:" >&5
22236   cat "conftest.$ac_ext" >&5
22237   eval "$as_ac_Header=no"
22238 fi
22239 rm -f conftest.err "conftest.$ac_ext"
22240 fi
22241 echo "$as_me:22241: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22242 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22243 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22244   cat >>confdefs.h <<EOF
22245 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22246 EOF
22247
22248 fi
22249 done
22250
22251 if test "$ac_cv_header_termios_h" = yes ; then
22252         case "$CFLAGS $CPPFLAGS" in
22253         (*-D_POSIX_SOURCE*)
22254                 termios_bad=dunno ;;
22255         (*)     termios_bad=maybe ;;
22256         esac
22257         if test "$termios_bad" = maybe ; then
22258         echo "$as_me:22258: checking whether termios.h needs _POSIX_SOURCE" >&5
22259 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22260         cat >"conftest.$ac_ext" <<_ACEOF
22261 #line 22261 "configure"
22262 #include "confdefs.h"
22263 #include <termios.h>
22264 int
22265 main (void)
22266 {
22267 struct termios foo; int x = foo.c_iflag = 1; (void)x
22268   ;
22269   return 0;
22270 }
22271 _ACEOF
22272 rm -f "conftest.$ac_objext"
22273 if { (eval echo "$as_me:22273: \"$ac_compile\"") >&5
22274   (eval $ac_compile) 2>&5
22275   ac_status=$?
22276   echo "$as_me:22276: \$? = $ac_status" >&5
22277   (exit "$ac_status"); } &&
22278          { ac_try='test -s "conftest.$ac_objext"'
22279   { (eval echo "$as_me:22279: \"$ac_try\"") >&5
22280   (eval $ac_try) 2>&5
22281   ac_status=$?
22282   echo "$as_me:22282: \$? = $ac_status" >&5
22283   (exit "$ac_status"); }; }; then
22284   termios_bad=no
22285 else
22286   echo "$as_me: failed program was:" >&5
22287 cat "conftest.$ac_ext" >&5
22288
22289                 cat >"conftest.$ac_ext" <<_ACEOF
22290 #line 22290 "configure"
22291 #include "confdefs.h"
22292
22293 #define _POSIX_SOURCE
22294 #include <termios.h>
22295 int
22296 main (void)
22297 {
22298 struct termios foo; int x = foo.c_iflag = 2; (void)x
22299   ;
22300   return 0;
22301 }
22302 _ACEOF
22303 rm -f "conftest.$ac_objext"
22304 if { (eval echo "$as_me:22304: \"$ac_compile\"") >&5
22305   (eval $ac_compile) 2>&5
22306   ac_status=$?
22307   echo "$as_me:22307: \$? = $ac_status" >&5
22308   (exit "$ac_status"); } &&
22309          { ac_try='test -s "conftest.$ac_objext"'
22310   { (eval echo "$as_me:22310: \"$ac_try\"") >&5
22311   (eval $ac_try) 2>&5
22312   ac_status=$?
22313   echo "$as_me:22313: \$? = $ac_status" >&5
22314   (exit "$ac_status"); }; }; then
22315   termios_bad=unknown
22316 else
22317   echo "$as_me: failed program was:" >&5
22318 cat "conftest.$ac_ext" >&5
22319 termios_bad=yes
22320 cat >>confdefs.h <<\EOF
22321 #define _POSIX_SOURCE 1
22322 EOF
22323
22324 fi
22325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22326
22327 fi
22328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22329         echo "$as_me:22329: result: $termios_bad" >&5
22330 echo "${ECHO_T}$termios_bad" >&6
22331         fi
22332 fi
22333
22334 echo "$as_me:22334: checking for tcgetattr" >&5
22335 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22336 if test "${cf_cv_have_tcgetattr+set}" = set; then
22337   echo $ECHO_N "(cached) $ECHO_C" >&6
22338 else
22339
22340 cat >"conftest.$ac_ext" <<_ACEOF
22341 #line 22341 "configure"
22342 #include "confdefs.h"
22343
22344 #include <sys/types.h>
22345 #ifdef HAVE_UNISTD_H
22346 #include <unistd.h>
22347 #endif
22348 #ifdef HAVE_TERMIOS_H
22349 #include <termios.h>
22350 #define TTY struct termios
22351 #else
22352 #ifdef HAVE_TERMIO_H
22353 #include <termio.h>
22354 #define TTY struct termio
22355 #endif
22356 #endif
22357
22358 int
22359 main (void)
22360 {
22361
22362 TTY foo;
22363 tcgetattr(1, &foo);
22364   ;
22365   return 0;
22366 }
22367 _ACEOF
22368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22369 if { (eval echo "$as_me:22369: \"$ac_link\"") >&5
22370   (eval $ac_link) 2>&5
22371   ac_status=$?
22372   echo "$as_me:22372: \$? = $ac_status" >&5
22373   (exit "$ac_status"); } &&
22374          { ac_try='test -s "conftest$ac_exeext"'
22375   { (eval echo "$as_me:22375: \"$ac_try\"") >&5
22376   (eval $ac_try) 2>&5
22377   ac_status=$?
22378   echo "$as_me:22378: \$? = $ac_status" >&5
22379   (exit "$ac_status"); }; }; then
22380   cf_cv_have_tcgetattr=yes
22381 else
22382   echo "$as_me: failed program was:" >&5
22383 cat "conftest.$ac_ext" >&5
22384 cf_cv_have_tcgetattr=no
22385 fi
22386 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22387 fi
22388 echo "$as_me:22388: result: $cf_cv_have_tcgetattr" >&5
22389 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22390 test "$cf_cv_have_tcgetattr" = yes &&
22391 cat >>confdefs.h <<\EOF
22392 #define HAVE_TCGETATTR 1
22393 EOF
22394
22395 echo "$as_me:22395: checking for vsscanf function or workaround" >&5
22396 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22397 if test "${cf_cv_func_vsscanf+set}" = set; then
22398   echo $ECHO_N "(cached) $ECHO_C" >&6
22399 else
22400
22401 cat >"conftest.$ac_ext" <<_ACEOF
22402 #line 22402 "configure"
22403 #include "confdefs.h"
22404
22405 #include <stdarg.h>
22406 #include <stdio.h>
22407 int
22408 main (void)
22409 {
22410
22411         va_list ap;
22412         vsscanf("from", "%d", ap)
22413   ;
22414   return 0;
22415 }
22416 _ACEOF
22417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22418 if { (eval echo "$as_me:22418: \"$ac_link\"") >&5
22419   (eval $ac_link) 2>&5
22420   ac_status=$?
22421   echo "$as_me:22421: \$? = $ac_status" >&5
22422   (exit "$ac_status"); } &&
22423          { ac_try='test -s "conftest$ac_exeext"'
22424   { (eval echo "$as_me:22424: \"$ac_try\"") >&5
22425   (eval $ac_try) 2>&5
22426   ac_status=$?
22427   echo "$as_me:22427: \$? = $ac_status" >&5
22428   (exit "$ac_status"); }; }; then
22429   cf_cv_func_vsscanf=vsscanf
22430 else
22431   echo "$as_me: failed program was:" >&5
22432 cat "conftest.$ac_ext" >&5
22433
22434 cat >"conftest.$ac_ext" <<_ACEOF
22435 #line 22435 "configure"
22436 #include "confdefs.h"
22437
22438 #include <stdarg.h>
22439 #include <stdio.h>
22440 int
22441 main (void)
22442 {
22443
22444         FILE strbuf;
22445         char *str = "from";
22446
22447         strbuf._flag = _IOREAD;
22448         strbuf._ptr = strbuf._base = (unsigned char *) str;
22449         strbuf._cnt = strlen(str);
22450         strbuf._file = _NFILE;
22451         return (vfscanf(&strbuf, "%d", ap))
22452   ;
22453   return 0;
22454 }
22455 _ACEOF
22456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22457 if { (eval echo "$as_me:22457: \"$ac_link\"") >&5
22458   (eval $ac_link) 2>&5
22459   ac_status=$?
22460   echo "$as_me:22460: \$? = $ac_status" >&5
22461   (exit "$ac_status"); } &&
22462          { ac_try='test -s "conftest$ac_exeext"'
22463   { (eval echo "$as_me:22463: \"$ac_try\"") >&5
22464   (eval $ac_try) 2>&5
22465   ac_status=$?
22466   echo "$as_me:22466: \$? = $ac_status" >&5
22467   (exit "$ac_status"); }; }; then
22468   cf_cv_func_vsscanf=vfscanf
22469 else
22470   echo "$as_me: failed program was:" >&5
22471 cat "conftest.$ac_ext" >&5
22472
22473 cat >"conftest.$ac_ext" <<_ACEOF
22474 #line 22474 "configure"
22475 #include "confdefs.h"
22476
22477 #include <stdarg.h>
22478 #include <stdio.h>
22479 int
22480 main (void)
22481 {
22482
22483         FILE strbuf;
22484         char *str = "from";
22485
22486         strbuf._flag = _IOREAD;
22487         strbuf._ptr = strbuf._base = (unsigned char *) str;
22488         strbuf._cnt = strlen(str);
22489         strbuf._file = _NFILE;
22490         return (_doscan(&strbuf, "%d", ap))
22491   ;
22492   return 0;
22493 }
22494 _ACEOF
22495 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22496 if { (eval echo "$as_me:22496: \"$ac_link\"") >&5
22497   (eval $ac_link) 2>&5
22498   ac_status=$?
22499   echo "$as_me:22499: \$? = $ac_status" >&5
22500   (exit "$ac_status"); } &&
22501          { ac_try='test -s "conftest$ac_exeext"'
22502   { (eval echo "$as_me:22502: \"$ac_try\"") >&5
22503   (eval $ac_try) 2>&5
22504   ac_status=$?
22505   echo "$as_me:22505: \$? = $ac_status" >&5
22506   (exit "$ac_status"); }; }; then
22507   cf_cv_func_vsscanf=_doscan
22508 else
22509   echo "$as_me: failed program was:" >&5
22510 cat "conftest.$ac_ext" >&5
22511
22512 cf_cv_func_vsscanf=no
22513 fi
22514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22515 fi
22516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22517 fi
22518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22519 fi
22520 echo "$as_me:22520: result: $cf_cv_func_vsscanf" >&5
22521 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22522
22523 case "$cf_cv_func_vsscanf" in
22524 (vsscanf)
22525 cat >>confdefs.h <<\EOF
22526 #define HAVE_VSSCANF 1
22527 EOF
22528 ;;
22529 (vfscanf)
22530 cat >>confdefs.h <<\EOF
22531 #define HAVE_VFSCANF 1
22532 EOF
22533 ;;
22534 (_doscan)
22535 cat >>confdefs.h <<\EOF
22536 #define HAVE__DOSCAN 1
22537 EOF
22538 ;;
22539 esac
22540
22541 for ac_header in \
22542 unistd.h \
22543
22544 do
22545 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22546 echo "$as_me:22546: checking for $ac_header" >&5
22547 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22548 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22549   echo $ECHO_N "(cached) $ECHO_C" >&6
22550 else
22551   cat >"conftest.$ac_ext" <<_ACEOF
22552 #line 22552 "configure"
22553 #include "confdefs.h"
22554 #include <$ac_header>
22555 _ACEOF
22556 if { (eval echo "$as_me:22556: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22557   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22558   ac_status=$?
22559   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22560   rm -f conftest.er1
22561   cat conftest.err >&5
22562   echo "$as_me:22562: \$? = $ac_status" >&5
22563   (exit "$ac_status"); } >/dev/null; then
22564   if test -s conftest.err; then
22565     ac_cpp_err=$ac_c_preproc_warn_flag
22566   else
22567     ac_cpp_err=
22568   fi
22569 else
22570   ac_cpp_err=yes
22571 fi
22572 if test -z "$ac_cpp_err"; then
22573   eval "$as_ac_Header=yes"
22574 else
22575   echo "$as_me: failed program was:" >&5
22576   cat "conftest.$ac_ext" >&5
22577   eval "$as_ac_Header=no"
22578 fi
22579 rm -f conftest.err "conftest.$ac_ext"
22580 fi
22581 echo "$as_me:22581: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22582 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22583 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22584   cat >>confdefs.h <<EOF
22585 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22586 EOF
22587
22588 fi
22589 done
22590
22591 echo "$as_me:22591: checking for working mkstemp" >&5
22592 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22593 if test "${cf_cv_func_mkstemp+set}" = set; then
22594   echo $ECHO_N "(cached) $ECHO_C" >&6
22595 else
22596
22597 rm -rf ./conftest*
22598 if test "$cross_compiling" = yes; then
22599   cf_cv_func_mkstemp=maybe
22600 else
22601   cat >"conftest.$ac_ext" <<_ACEOF
22602 #line 22602 "configure"
22603 #include "confdefs.h"
22604
22605 #include <sys/types.h>
22606 #ifdef HAVE_UNISTD_H
22607 #include <unistd.h>
22608 #endif
22609 #include <stdlib.h>
22610 #include <stdio.h>
22611 #include <string.h>
22612 #include <sys/stat.h>
22613 int main(void)
22614 {
22615         char *tmpl = "conftestXXXXXX";
22616         char name[2][80];
22617         int n;
22618         int result = 0;
22619         int fd;
22620         struct stat sb;
22621
22622         umask(077);
22623         for (n = 0; n < 2; ++n) {
22624                 strcpy(name[n], tmpl);
22625                 if ((fd = mkstemp(name[n])) >= 0) {
22626                         if (!strcmp(name[n], tmpl)
22627                          || stat(name[n], &sb) != 0
22628                          || (sb.st_mode & S_IFMT) != S_IFREG
22629                          || (sb.st_mode & 077) != 0) {
22630                                 result = 1;
22631                         }
22632                         close(fd);
22633                 }
22634         }
22635         if (result == 0
22636          && !strcmp(name[0], name[1]))
22637                 result = 1;
22638         ${cf_cv_main_return:-return}(result);
22639 }
22640
22641 _ACEOF
22642 rm -f "conftest$ac_exeext"
22643 if { (eval echo "$as_me:22643: \"$ac_link\"") >&5
22644   (eval $ac_link) 2>&5
22645   ac_status=$?
22646   echo "$as_me:22646: \$? = $ac_status" >&5
22647   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22648   { (eval echo "$as_me:22648: \"$ac_try\"") >&5
22649   (eval $ac_try) 2>&5
22650   ac_status=$?
22651   echo "$as_me:22651: \$? = $ac_status" >&5
22652   (exit "$ac_status"); }; }; then
22653   cf_cv_func_mkstemp=yes
22654
22655 else
22656   echo "$as_me: program exited with status $ac_status" >&5
22657 echo "$as_me: failed program was:" >&5
22658 cat "conftest.$ac_ext" >&5
22659 cf_cv_func_mkstemp=no
22660
22661 fi
22662 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22663 fi
22664
22665 fi
22666 echo "$as_me:22666: result: $cf_cv_func_mkstemp" >&5
22667 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22668 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22669         echo "$as_me:22669: checking for mkstemp" >&5
22670 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22671 if test "${ac_cv_func_mkstemp+set}" = set; then
22672   echo $ECHO_N "(cached) $ECHO_C" >&6
22673 else
22674   cat >"conftest.$ac_ext" <<_ACEOF
22675 #line 22675 "configure"
22676 #include "confdefs.h"
22677 #define mkstemp autoconf_temporary
22678 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22679 #undef mkstemp
22680
22681 #ifdef __cplusplus
22682 extern "C"
22683 #endif
22684
22685 /* We use char because int might match the return type of a gcc2
22686    builtin and then its argument prototype would still apply.  */
22687 char mkstemp (void);
22688
22689 int
22690 main (void)
22691 {
22692
22693 /* The GNU C library defines stubs for functions which it implements
22694     to always fail with ENOSYS.  Some functions are actually named
22695     something starting with __ and the normal name is an alias.  */
22696 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22697 #error found stub for mkstemp
22698 #endif
22699
22700         return mkstemp ();
22701   ;
22702   return 0;
22703 }
22704 _ACEOF
22705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22706 if { (eval echo "$as_me:22706: \"$ac_link\"") >&5
22707   (eval $ac_link) 2>&5
22708   ac_status=$?
22709   echo "$as_me:22709: \$? = $ac_status" >&5
22710   (exit "$ac_status"); } &&
22711          { ac_try='test -s "conftest$ac_exeext"'
22712   { (eval echo "$as_me:22712: \"$ac_try\"") >&5
22713   (eval $ac_try) 2>&5
22714   ac_status=$?
22715   echo "$as_me:22715: \$? = $ac_status" >&5
22716   (exit "$ac_status"); }; }; then
22717   ac_cv_func_mkstemp=yes
22718 else
22719   echo "$as_me: failed program was:" >&5
22720 cat "conftest.$ac_ext" >&5
22721 ac_cv_func_mkstemp=no
22722 fi
22723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22724 fi
22725 echo "$as_me:22725: result: $ac_cv_func_mkstemp" >&5
22726 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22727
22728 fi
22729 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22730
22731 cat >>confdefs.h <<\EOF
22732 #define HAVE_MKSTEMP 1
22733 EOF
22734
22735 fi
22736
22737 # setup for prototype of fallback for vsscanf()
22738
22739 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22740         HAVE_VSSCANF=1
22741 else
22742         HAVE_VSSCANF=0
22743 fi
22744
22745 if test "x$cross_compiling" = xyes ; then
22746         { echo "$as_me:22746: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22747 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22748 else
22749         echo "$as_me:22749: checking whether setvbuf arguments are reversed" >&5
22750 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22751 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22752   echo $ECHO_N "(cached) $ECHO_C" >&6
22753 else
22754   if test "$cross_compiling" = yes; then
22755   { { echo "$as_me:22755: error: cannot run test program while cross compiling" >&5
22756 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22757    { (exit 1); exit 1; }; }
22758 else
22759   cat >"conftest.$ac_ext" <<_ACEOF
22760 #line 22760 "configure"
22761 #include "confdefs.h"
22762 #include <stdio.h>
22763 /* If setvbuf has the reversed format, exit 0. */
22764 int
22765 main (void)
22766 {
22767   /* This call has the arguments reversed.
22768      A reversed system may check and see that the address of main
22769      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22770   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22771     $ac_main_return(1);
22772   putc('\r', stdout);
22773   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22774 }
22775 _ACEOF
22776 rm -f "conftest$ac_exeext"
22777 if { (eval echo "$as_me:22777: \"$ac_link\"") >&5
22778   (eval $ac_link) 2>&5
22779   ac_status=$?
22780   echo "$as_me:22780: \$? = $ac_status" >&5
22781   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22782   { (eval echo "$as_me:22782: \"$ac_try\"") >&5
22783   (eval $ac_try) 2>&5
22784   ac_status=$?
22785   echo "$as_me:22785: \$? = $ac_status" >&5
22786   (exit "$ac_status"); }; }; then
22787   ac_cv_func_setvbuf_reversed=yes
22788 else
22789   echo "$as_me: program exited with status $ac_status" >&5
22790 echo "$as_me: failed program was:" >&5
22791 cat "conftest.$ac_ext" >&5
22792 ac_cv_func_setvbuf_reversed=no
22793 fi
22794 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22795 fi
22796 rm -f core ./core.* ./*.core
22797 fi
22798 echo "$as_me:22798: result: $ac_cv_func_setvbuf_reversed" >&5
22799 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22800 if test $ac_cv_func_setvbuf_reversed = yes; then
22801
22802 cat >>confdefs.h <<\EOF
22803 #define SETVBUF_REVERSED 1
22804 EOF
22805
22806 fi
22807
22808 fi
22809 echo "$as_me:22809: checking for intptr_t" >&5
22810 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22811 if test "${ac_cv_type_intptr_t+set}" = set; then
22812   echo $ECHO_N "(cached) $ECHO_C" >&6
22813 else
22814   cat >"conftest.$ac_ext" <<_ACEOF
22815 #line 22815 "configure"
22816 #include "confdefs.h"
22817 $ac_includes_default
22818 int
22819 main (void)
22820 {
22821 if ((intptr_t *) 0)
22822   return 0;
22823 if (sizeof (intptr_t))
22824   return 0;
22825   ;
22826   return 0;
22827 }
22828 _ACEOF
22829 rm -f "conftest.$ac_objext"
22830 if { (eval echo "$as_me:22830: \"$ac_compile\"") >&5
22831   (eval $ac_compile) 2>&5
22832   ac_status=$?
22833   echo "$as_me:22833: \$? = $ac_status" >&5
22834   (exit "$ac_status"); } &&
22835          { ac_try='test -s "conftest.$ac_objext"'
22836   { (eval echo "$as_me:22836: \"$ac_try\"") >&5
22837   (eval $ac_try) 2>&5
22838   ac_status=$?
22839   echo "$as_me:22839: \$? = $ac_status" >&5
22840   (exit "$ac_status"); }; }; then
22841   ac_cv_type_intptr_t=yes
22842 else
22843   echo "$as_me: failed program was:" >&5
22844 cat "conftest.$ac_ext" >&5
22845 ac_cv_type_intptr_t=no
22846 fi
22847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22848 fi
22849 echo "$as_me:22849: result: $ac_cv_type_intptr_t" >&5
22850 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22851 if test "$ac_cv_type_intptr_t" = yes; then
22852   :
22853 else
22854
22855 cat >>confdefs.h <<EOF
22856 #define intptr_t long
22857 EOF
22858
22859 fi
22860
22861 echo "$as_me:22861: checking for ssize_t" >&5
22862 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22863 if test "${ac_cv_type_ssize_t+set}" = set; then
22864   echo $ECHO_N "(cached) $ECHO_C" >&6
22865 else
22866   cat >"conftest.$ac_ext" <<_ACEOF
22867 #line 22867 "configure"
22868 #include "confdefs.h"
22869 $ac_includes_default
22870 int
22871 main (void)
22872 {
22873 if ((ssize_t *) 0)
22874   return 0;
22875 if (sizeof (ssize_t))
22876   return 0;
22877   ;
22878   return 0;
22879 }
22880 _ACEOF
22881 rm -f "conftest.$ac_objext"
22882 if { (eval echo "$as_me:22882: \"$ac_compile\"") >&5
22883   (eval $ac_compile) 2>&5
22884   ac_status=$?
22885   echo "$as_me:22885: \$? = $ac_status" >&5
22886   (exit "$ac_status"); } &&
22887          { ac_try='test -s "conftest.$ac_objext"'
22888   { (eval echo "$as_me:22888: \"$ac_try\"") >&5
22889   (eval $ac_try) 2>&5
22890   ac_status=$?
22891   echo "$as_me:22891: \$? = $ac_status" >&5
22892   (exit "$ac_status"); }; }; then
22893   ac_cv_type_ssize_t=yes
22894 else
22895   echo "$as_me: failed program was:" >&5
22896 cat "conftest.$ac_ext" >&5
22897 ac_cv_type_ssize_t=no
22898 fi
22899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22900 fi
22901 echo "$as_me:22901: result: $ac_cv_type_ssize_t" >&5
22902 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22903 if test "$ac_cv_type_ssize_t" = yes; then
22904   :
22905 else
22906
22907 cat >>confdefs.h <<EOF
22908 #define ssize_t int
22909 EOF
22910
22911 fi
22912
22913 echo "$as_me:22913: checking for type sigaction_t" >&5
22914 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22915 if test "${cf_cv_type_sigaction+set}" = set; then
22916   echo $ECHO_N "(cached) $ECHO_C" >&6
22917 else
22918
22919         cat >"conftest.$ac_ext" <<_ACEOF
22920 #line 22920 "configure"
22921 #include "confdefs.h"
22922
22923 #include <signal.h>
22924 int
22925 main (void)
22926 {
22927 sigaction_t x
22928   ;
22929   return 0;
22930 }
22931 _ACEOF
22932 rm -f "conftest.$ac_objext"
22933 if { (eval echo "$as_me:22933: \"$ac_compile\"") >&5
22934   (eval $ac_compile) 2>&5
22935   ac_status=$?
22936   echo "$as_me:22936: \$? = $ac_status" >&5
22937   (exit "$ac_status"); } &&
22938          { ac_try='test -s "conftest.$ac_objext"'
22939   { (eval echo "$as_me:22939: \"$ac_try\"") >&5
22940   (eval $ac_try) 2>&5
22941   ac_status=$?
22942   echo "$as_me:22942: \$? = $ac_status" >&5
22943   (exit "$ac_status"); }; }; then
22944   cf_cv_type_sigaction=yes
22945 else
22946   echo "$as_me: failed program was:" >&5
22947 cat "conftest.$ac_ext" >&5
22948 cf_cv_type_sigaction=no
22949 fi
22950 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22951 fi
22952
22953 echo "$as_me:22953: result: $cf_cv_type_sigaction" >&5
22954 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22955 test "$cf_cv_type_sigaction" = yes &&
22956 cat >>confdefs.h <<\EOF
22957 #define HAVE_TYPE_SIGACTION 1
22958 EOF
22959
22960 echo "$as_me:22960: checking declaration of size-change" >&5
22961 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22962 if test "${cf_cv_sizechange+set}" = set; then
22963   echo $ECHO_N "(cached) $ECHO_C" >&6
22964 else
22965
22966         cf_cv_sizechange=unknown
22967         cf_save_CPPFLAGS="$CPPFLAGS"
22968
22969 for cf_opts in "" "NEED_PTEM_H"
22970 do
22971
22972         CPPFLAGS="$cf_save_CPPFLAGS"
22973         if test -n "$cf_opts"
22974         then
22975
22976         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22977         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22978
22979         fi
22980         cat >"conftest.$ac_ext" <<_ACEOF
22981 #line 22981 "configure"
22982 #include "confdefs.h"
22983 #include <sys/types.h>
22984 #ifdef HAVE_TERMIOS_H
22985 #include <termios.h>
22986 #else
22987 #ifdef HAVE_TERMIO_H
22988 #include <termio.h>
22989 #endif
22990 #endif
22991
22992 #ifdef NEED_PTEM_H
22993 /* This is a workaround for SCO:  they neglected to define struct winsize in
22994  * termios.h -- it is only in termio.h and ptem.h
22995  */
22996 #include <sys/stream.h>
22997 #include <sys/ptem.h>
22998 #endif
22999
23000 #ifdef HAVE_SYS_IOCTL_H
23001 #include <sys/ioctl.h>
23002 #endif
23003
23004 int
23005 main (void)
23006 {
23007
23008 #ifdef TIOCGSIZE
23009         struct ttysize win;     /* SunOS 3.0... */
23010         int y = win.ts_lines = 2;
23011         int x = win.ts_cols = 1;
23012         (void)y;
23013         (void)x;
23014 #else
23015 #ifdef TIOCGWINSZ
23016         struct winsize win;     /* everything else */
23017         int y = win.ws_row = 2;
23018         int x = win.ws_col = 1;
23019         (void)y;
23020         (void)x;
23021 #else
23022         no TIOCGSIZE or TIOCGWINSZ
23023 #endif /* TIOCGWINSZ */
23024 #endif /* TIOCGSIZE */
23025
23026   ;
23027   return 0;
23028 }
23029 _ACEOF
23030 rm -f "conftest.$ac_objext"
23031 if { (eval echo "$as_me:23031: \"$ac_compile\"") >&5
23032   (eval $ac_compile) 2>&5
23033   ac_status=$?
23034   echo "$as_me:23034: \$? = $ac_status" >&5
23035   (exit "$ac_status"); } &&
23036          { ac_try='test -s "conftest.$ac_objext"'
23037   { (eval echo "$as_me:23037: \"$ac_try\"") >&5
23038   (eval $ac_try) 2>&5
23039   ac_status=$?
23040   echo "$as_me:23040: \$? = $ac_status" >&5
23041   (exit "$ac_status"); }; }; then
23042   cf_cv_sizechange=yes
23043 else
23044   echo "$as_me: failed program was:" >&5
23045 cat "conftest.$ac_ext" >&5
23046 cf_cv_sizechange=no
23047 fi
23048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23049
23050         CPPFLAGS="$cf_save_CPPFLAGS"
23051         if test "$cf_cv_sizechange" = yes ; then
23052                 echo "size-change succeeded ($cf_opts)" >&5
23053                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23054                 break
23055         fi
23056 done
23057
23058 fi
23059 echo "$as_me:23059: result: $cf_cv_sizechange" >&5
23060 echo "${ECHO_T}$cf_cv_sizechange" >&6
23061 if test "$cf_cv_sizechange" != no ; then
23062
23063 cat >>confdefs.h <<\EOF
23064 #define HAVE_SIZECHANGE 1
23065 EOF
23066
23067         case "$cf_cv_sizechange" in
23068         (NEED*)
23069                 cat >>confdefs.h <<EOF
23070 #define $cf_cv_sizechange  1
23071 EOF
23072
23073                 ;;
23074         esac
23075 fi
23076
23077 echo "$as_me:23077: checking for memmove" >&5
23078 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23079 if test "${ac_cv_func_memmove+set}" = set; then
23080   echo $ECHO_N "(cached) $ECHO_C" >&6
23081 else
23082   cat >"conftest.$ac_ext" <<_ACEOF
23083 #line 23083 "configure"
23084 #include "confdefs.h"
23085 #define memmove autoconf_temporary
23086 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23087 #undef memmove
23088
23089 #ifdef __cplusplus
23090 extern "C"
23091 #endif
23092
23093 /* We use char because int might match the return type of a gcc2
23094    builtin and then its argument prototype would still apply.  */
23095 char memmove (void);
23096
23097 int
23098 main (void)
23099 {
23100
23101 /* The GNU C library defines stubs for functions which it implements
23102     to always fail with ENOSYS.  Some functions are actually named
23103     something starting with __ and the normal name is an alias.  */
23104 #if defined (__stub_memmove) || defined (__stub___memmove)
23105 #error found stub for memmove
23106 #endif
23107
23108         return memmove ();
23109   ;
23110   return 0;
23111 }
23112 _ACEOF
23113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23114 if { (eval echo "$as_me:23114: \"$ac_link\"") >&5
23115   (eval $ac_link) 2>&5
23116   ac_status=$?
23117   echo "$as_me:23117: \$? = $ac_status" >&5
23118   (exit "$ac_status"); } &&
23119          { ac_try='test -s "conftest$ac_exeext"'
23120   { (eval echo "$as_me:23120: \"$ac_try\"") >&5
23121   (eval $ac_try) 2>&5
23122   ac_status=$?
23123   echo "$as_me:23123: \$? = $ac_status" >&5
23124   (exit "$ac_status"); }; }; then
23125   ac_cv_func_memmove=yes
23126 else
23127   echo "$as_me: failed program was:" >&5
23128 cat "conftest.$ac_ext" >&5
23129 ac_cv_func_memmove=no
23130 fi
23131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23132 fi
23133 echo "$as_me:23133: result: $ac_cv_func_memmove" >&5
23134 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23135 if test "$ac_cv_func_memmove" = yes; then
23136   :
23137 else
23138
23139 echo "$as_me:23139: checking for bcopy" >&5
23140 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23141 if test "${ac_cv_func_bcopy+set}" = set; then
23142   echo $ECHO_N "(cached) $ECHO_C" >&6
23143 else
23144   cat >"conftest.$ac_ext" <<_ACEOF
23145 #line 23145 "configure"
23146 #include "confdefs.h"
23147 #define bcopy autoconf_temporary
23148 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23149 #undef bcopy
23150
23151 #ifdef __cplusplus
23152 extern "C"
23153 #endif
23154
23155 /* We use char because int might match the return type of a gcc2
23156    builtin and then its argument prototype would still apply.  */
23157 char bcopy (void);
23158
23159 int
23160 main (void)
23161 {
23162
23163 /* The GNU C library defines stubs for functions which it implements
23164     to always fail with ENOSYS.  Some functions are actually named
23165     something starting with __ and the normal name is an alias.  */
23166 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23167 #error found stub for bcopy
23168 #endif
23169
23170         return bcopy ();
23171   ;
23172   return 0;
23173 }
23174 _ACEOF
23175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23176 if { (eval echo "$as_me:23176: \"$ac_link\"") >&5
23177   (eval $ac_link) 2>&5
23178   ac_status=$?
23179   echo "$as_me:23179: \$? = $ac_status" >&5
23180   (exit "$ac_status"); } &&
23181          { ac_try='test -s "conftest$ac_exeext"'
23182   { (eval echo "$as_me:23182: \"$ac_try\"") >&5
23183   (eval $ac_try) 2>&5
23184   ac_status=$?
23185   echo "$as_me:23185: \$? = $ac_status" >&5
23186   (exit "$ac_status"); }; }; then
23187   ac_cv_func_bcopy=yes
23188 else
23189   echo "$as_me: failed program was:" >&5
23190 cat "conftest.$ac_ext" >&5
23191 ac_cv_func_bcopy=no
23192 fi
23193 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23194 fi
23195 echo "$as_me:23195: result: $ac_cv_func_bcopy" >&5
23196 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23197 if test "$ac_cv_func_bcopy" = yes; then
23198
23199         echo "$as_me:23199: checking if bcopy does overlapping moves" >&5
23200 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23201 if test "${cf_cv_good_bcopy+set}" = set; then
23202   echo $ECHO_N "(cached) $ECHO_C" >&6
23203 else
23204
23205                 if test "$cross_compiling" = yes; then
23206   cf_cv_good_bcopy=unknown
23207 else
23208   cat >"conftest.$ac_ext" <<_ACEOF
23209 #line 23209 "configure"
23210 #include "confdefs.h"
23211
23212 int main(void) {
23213         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23214         char temp[40];
23215         bcopy(data, temp, sizeof(data));
23216         bcopy(temp+10, temp, 15);
23217         bcopy(temp+5, temp+15, 10);
23218         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23219 }
23220
23221 _ACEOF
23222 rm -f "conftest$ac_exeext"
23223 if { (eval echo "$as_me:23223: \"$ac_link\"") >&5
23224   (eval $ac_link) 2>&5
23225   ac_status=$?
23226   echo "$as_me:23226: \$? = $ac_status" >&5
23227   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23228   { (eval echo "$as_me:23228: \"$ac_try\"") >&5
23229   (eval $ac_try) 2>&5
23230   ac_status=$?
23231   echo "$as_me:23231: \$? = $ac_status" >&5
23232   (exit "$ac_status"); }; }; then
23233   cf_cv_good_bcopy=yes
23234 else
23235   echo "$as_me: program exited with status $ac_status" >&5
23236 echo "$as_me: failed program was:" >&5
23237 cat "conftest.$ac_ext" >&5
23238 cf_cv_good_bcopy=no
23239 fi
23240 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23241 fi
23242
23243 fi
23244 echo "$as_me:23244: result: $cf_cv_good_bcopy" >&5
23245 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23246
23247 else
23248   cf_cv_good_bcopy=no
23249 fi
23250
23251         if test "$cf_cv_good_bcopy" = yes ; then
23252
23253 cat >>confdefs.h <<\EOF
23254 #define USE_OK_BCOPY 1
23255 EOF
23256
23257         else
23258
23259 cat >>confdefs.h <<\EOF
23260 #define USE_MY_MEMMOVE 1
23261 EOF
23262
23263         fi
23264
23265 fi
23266
23267 tty >/dev/null 2>&1 || {
23268 for ac_func in posix_openpt
23269 do
23270 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23271 echo "$as_me:23271: checking for $ac_func" >&5
23272 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23273 if eval "test \"\${$as_ac_var+set}\" = set"; then
23274   echo $ECHO_N "(cached) $ECHO_C" >&6
23275 else
23276   cat >"conftest.$ac_ext" <<_ACEOF
23277 #line 23277 "configure"
23278 #include "confdefs.h"
23279 #define $ac_func autoconf_temporary
23280 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23281 #undef $ac_func
23282
23283 #ifdef __cplusplus
23284 extern "C"
23285 #endif
23286
23287 /* We use char because int might match the return type of a gcc2
23288    builtin and then its argument prototype would still apply.  */
23289 char $ac_func (void);
23290
23291 int
23292 main (void)
23293 {
23294
23295 /* The GNU C library defines stubs for functions which it implements
23296     to always fail with ENOSYS.  Some functions are actually named
23297     something starting with __ and the normal name is an alias.  */
23298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23299 #error found stub for $ac_func
23300 #endif
23301
23302         return $ac_func ();
23303   ;
23304   return 0;
23305 }
23306 _ACEOF
23307 rm -f "conftest.$ac_objext" "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"); } &&
23313          { ac_try='test -s "conftest$ac_exeext"'
23314   { (eval echo "$as_me:23314: \"$ac_try\"") >&5
23315   (eval $ac_try) 2>&5
23316   ac_status=$?
23317   echo "$as_me:23317: \$? = $ac_status" >&5
23318   (exit "$ac_status"); }; }; then
23319   eval "$as_ac_var=yes"
23320 else
23321   echo "$as_me: failed program was:" >&5
23322 cat "conftest.$ac_ext" >&5
23323 eval "$as_ac_var=no"
23324 fi
23325 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23326 fi
23327 echo "$as_me:23327: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23328 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23329 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23330   cat >>confdefs.h <<EOF
23331 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23332 EOF
23333
23334 fi
23335 done
23336  }
23337 echo "$as_me:23337: checking if poll really works" >&5
23338 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23339 if test "${cf_cv_working_poll+set}" = set; then
23340   echo $ECHO_N "(cached) $ECHO_C" >&6
23341 else
23342
23343 if test "$cross_compiling" = yes; then
23344   cf_cv_working_poll=unknown
23345 else
23346   cat >"conftest.$ac_ext" <<_ACEOF
23347 #line 23347 "configure"
23348 #include "confdefs.h"
23349
23350 #include <stdlib.h>
23351 #include <stdio.h>
23352 #include <unistd.h>
23353 #include <fcntl.h>
23354 #ifdef HAVE_POLL_H
23355 #include <poll.h>
23356 #else
23357 #include <sys/poll.h>
23358 #endif
23359 int main(void) {
23360         struct pollfd myfds;
23361         int ret;
23362
23363         /* check for Darwin bug with respect to "devices" */
23364         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23365         if (myfds.fd < 0)
23366                 myfds.fd = 0;
23367         myfds.events = POLLIN;
23368         myfds.revents = 0;
23369
23370         ret = poll(&myfds, 1, 100);
23371
23372         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23373                 ret = -1;
23374         } else {
23375                 int fd = 0;
23376                 if (!isatty(fd)) {
23377                         fd = open("/dev/tty", 2);       /* O_RDWR */
23378                 }
23379 #ifdef HAVE_POSIX_OPENPT
23380                 if (fd < 0) {
23381                         fd = posix_openpt(O_RDWR);
23382                 }
23383 #endif
23384
23385                 if (fd >= 0) {
23386                         /* also check with standard input */
23387                         myfds.fd = fd;
23388                         myfds.events = POLLIN;
23389                         myfds.revents = 0;
23390                         ret = poll(&myfds, 1, 100);
23391                 } else {
23392                         ret = -1;
23393                 }
23394         }
23395         ${cf_cv_main_return:-return}(ret < 0);
23396 }
23397 _ACEOF
23398 rm -f "conftest$ac_exeext"
23399 if { (eval echo "$as_me:23399: \"$ac_link\"") >&5
23400   (eval $ac_link) 2>&5
23401   ac_status=$?
23402   echo "$as_me:23402: \$? = $ac_status" >&5
23403   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23404   { (eval echo "$as_me:23404: \"$ac_try\"") >&5
23405   (eval $ac_try) 2>&5
23406   ac_status=$?
23407   echo "$as_me:23407: \$? = $ac_status" >&5
23408   (exit "$ac_status"); }; }; then
23409   cf_cv_working_poll=yes
23410 else
23411   echo "$as_me: program exited with status $ac_status" >&5
23412 echo "$as_me: failed program was:" >&5
23413 cat "conftest.$ac_ext" >&5
23414 cf_cv_working_poll=no
23415 fi
23416 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23417 fi
23418 fi
23419 echo "$as_me:23419: result: $cf_cv_working_poll" >&5
23420 echo "${ECHO_T}$cf_cv_working_poll" >&6
23421 test "$cf_cv_working_poll" = "yes" &&
23422 cat >>confdefs.h <<\EOF
23423 #define HAVE_WORKING_POLL 1
23424 EOF
23425
23426 echo "$as_me:23426: checking for va_copy" >&5
23427 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23428 if test "${cf_cv_have_va_copy+set}" = set; then
23429   echo $ECHO_N "(cached) $ECHO_C" >&6
23430 else
23431
23432 cat >"conftest.$ac_ext" <<_ACEOF
23433 #line 23433 "configure"
23434 #include "confdefs.h"
23435
23436 #include <stdarg.h>
23437
23438 int
23439 main (void)
23440 {
23441
23442         static va_list dst;
23443         static va_list src;
23444         va_copy(dst, src)
23445   ;
23446   return 0;
23447 }
23448 _ACEOF
23449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23450 if { (eval echo "$as_me:23450: \"$ac_link\"") >&5
23451   (eval $ac_link) 2>&5
23452   ac_status=$?
23453   echo "$as_me:23453: \$? = $ac_status" >&5
23454   (exit "$ac_status"); } &&
23455          { ac_try='test -s "conftest$ac_exeext"'
23456   { (eval echo "$as_me:23456: \"$ac_try\"") >&5
23457   (eval $ac_try) 2>&5
23458   ac_status=$?
23459   echo "$as_me:23459: \$? = $ac_status" >&5
23460   (exit "$ac_status"); }; }; then
23461   cf_cv_have_va_copy=yes
23462 else
23463   echo "$as_me: failed program was:" >&5
23464 cat "conftest.$ac_ext" >&5
23465 cf_cv_have_va_copy=no
23466 fi
23467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23468 fi
23469 echo "$as_me:23469: result: $cf_cv_have_va_copy" >&5
23470 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23471
23472 if test "$cf_cv_have_va_copy" = yes;
23473 then
23474
23475 cat >>confdefs.h <<\EOF
23476 #define HAVE_VA_COPY 1
23477 EOF
23478
23479 else # !cf_cv_have_va_copy
23480
23481 echo "$as_me:23481: checking for __va_copy" >&5
23482 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23483 if test "${cf_cv_have___va_copy+set}" = set; then
23484   echo $ECHO_N "(cached) $ECHO_C" >&6
23485 else
23486
23487 cat >"conftest.$ac_ext" <<_ACEOF
23488 #line 23488 "configure"
23489 #include "confdefs.h"
23490
23491 #include <stdarg.h>
23492
23493 int
23494 main (void)
23495 {
23496
23497         static va_list dst;
23498         static va_list src;
23499         __va_copy(dst, src)
23500   ;
23501   return 0;
23502 }
23503 _ACEOF
23504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23505 if { (eval echo "$as_me:23505: \"$ac_link\"") >&5
23506   (eval $ac_link) 2>&5
23507   ac_status=$?
23508   echo "$as_me:23508: \$? = $ac_status" >&5
23509   (exit "$ac_status"); } &&
23510          { ac_try='test -s "conftest$ac_exeext"'
23511   { (eval echo "$as_me:23511: \"$ac_try\"") >&5
23512   (eval $ac_try) 2>&5
23513   ac_status=$?
23514   echo "$as_me:23514: \$? = $ac_status" >&5
23515   (exit "$ac_status"); }; }; then
23516   cf_cv_have___va_copy=yes
23517 else
23518   echo "$as_me: failed program was:" >&5
23519 cat "conftest.$ac_ext" >&5
23520 cf_cv_have___va_copy=no
23521 fi
23522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23523 fi
23524 echo "$as_me:23524: result: $cf_cv_have___va_copy" >&5
23525 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23526
23527 if test "$cf_cv_have___va_copy" = yes
23528 then
23529
23530 cat >>confdefs.h <<\EOF
23531 #define HAVE___VA_COPY 1
23532 EOF
23533
23534 else # !cf_cv_have___va_copy
23535
23536 echo "$as_me:23536: checking for __builtin_va_copy" >&5
23537 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23538 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23539   echo $ECHO_N "(cached) $ECHO_C" >&6
23540 else
23541
23542 cat >"conftest.$ac_ext" <<_ACEOF
23543 #line 23543 "configure"
23544 #include "confdefs.h"
23545
23546 #include <stdarg.h>
23547
23548 int
23549 main (void)
23550 {
23551
23552         static va_list dst;
23553         static va_list src;
23554         __builtin_va_copy(dst, src)
23555   ;
23556   return 0;
23557 }
23558 _ACEOF
23559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23560 if { (eval echo "$as_me:23560: \"$ac_link\"") >&5
23561   (eval $ac_link) 2>&5
23562   ac_status=$?
23563   echo "$as_me:23563: \$? = $ac_status" >&5
23564   (exit "$ac_status"); } &&
23565          { ac_try='test -s "conftest$ac_exeext"'
23566   { (eval echo "$as_me:23566: \"$ac_try\"") >&5
23567   (eval $ac_try) 2>&5
23568   ac_status=$?
23569   echo "$as_me:23569: \$? = $ac_status" >&5
23570   (exit "$ac_status"); }; }; then
23571   cf_cv_have___builtin_va_copy=yes
23572 else
23573   echo "$as_me: failed program was:" >&5
23574 cat "conftest.$ac_ext" >&5
23575 cf_cv_have___builtin_va_copy=no
23576 fi
23577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23578 fi
23579 echo "$as_me:23579: result: $cf_cv_have___builtin_va_copy" >&5
23580 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23581
23582 test "$cf_cv_have___builtin_va_copy" = yes &&
23583
23584 cat >>confdefs.h <<\EOF
23585 #define HAVE___BUILTIN_VA_COPY 1
23586 EOF
23587
23588 fi # cf_cv_have___va_copy
23589
23590 fi # cf_cv_have_va_copy
23591
23592 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23593 (*yes*)
23594         ;;
23595
23596 (*)
23597         echo "$as_me:23597: checking if we can simply copy va_list" >&5
23598 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23599 if test "${cf_cv_pointer_va_list+set}" = set; then
23600   echo $ECHO_N "(cached) $ECHO_C" >&6
23601 else
23602
23603 cat >"conftest.$ac_ext" <<_ACEOF
23604 #line 23604 "configure"
23605 #include "confdefs.h"
23606
23607 #include <stdarg.h>
23608
23609 int
23610 main (void)
23611 {
23612
23613         va_list dst;
23614         va_list src;
23615         dst = src
23616   ;
23617   return 0;
23618 }
23619 _ACEOF
23620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23621 if { (eval echo "$as_me:23621: \"$ac_link\"") >&5
23622   (eval $ac_link) 2>&5
23623   ac_status=$?
23624   echo "$as_me:23624: \$? = $ac_status" >&5
23625   (exit "$ac_status"); } &&
23626          { ac_try='test -s "conftest$ac_exeext"'
23627   { (eval echo "$as_me:23627: \"$ac_try\"") >&5
23628   (eval $ac_try) 2>&5
23629   ac_status=$?
23630   echo "$as_me:23630: \$? = $ac_status" >&5
23631   (exit "$ac_status"); }; }; then
23632   cf_cv_pointer_va_list=yes
23633 else
23634   echo "$as_me: failed program was:" >&5
23635 cat "conftest.$ac_ext" >&5
23636 cf_cv_pointer_va_list=no
23637 fi
23638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23639 fi
23640 echo "$as_me:23640: result: $cf_cv_pointer_va_list" >&5
23641 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23642
23643         if test "$cf_cv_pointer_va_list" = no
23644         then
23645                 echo "$as_me:23645: checking if we can copy va_list indirectly" >&5
23646 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23647 if test "${cf_cv_array_va_list+set}" = set; then
23648   echo $ECHO_N "(cached) $ECHO_C" >&6
23649 else
23650
23651 cat >"conftest.$ac_ext" <<_ACEOF
23652 #line 23652 "configure"
23653 #include "confdefs.h"
23654
23655 #include <stdarg.h>
23656
23657 int
23658 main (void)
23659 {
23660
23661         va_list dst;
23662         va_list src;
23663         *dst = *src
23664   ;
23665   return 0;
23666 }
23667 _ACEOF
23668 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23669 if { (eval echo "$as_me:23669: \"$ac_link\"") >&5
23670   (eval $ac_link) 2>&5
23671   ac_status=$?
23672   echo "$as_me:23672: \$? = $ac_status" >&5
23673   (exit "$ac_status"); } &&
23674          { ac_try='test -s "conftest$ac_exeext"'
23675   { (eval echo "$as_me:23675: \"$ac_try\"") >&5
23676   (eval $ac_try) 2>&5
23677   ac_status=$?
23678   echo "$as_me:23678: \$? = $ac_status" >&5
23679   (exit "$ac_status"); }; }; then
23680   cf_cv_array_va_list=yes
23681 else
23682   echo "$as_me: failed program was:" >&5
23683 cat "conftest.$ac_ext" >&5
23684 cf_cv_array_va_list=no
23685 fi
23686 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23687 fi
23688 echo "$as_me:23688: result: $cf_cv_array_va_list" >&5
23689 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23690                 test "$cf_cv_array_va_list" = yes &&
23691 cat >>confdefs.h <<\EOF
23692 #define ARRAY_VA_LIST 1
23693 EOF
23694
23695         fi
23696         ;;
23697 esac
23698
23699 echo "$as_me:23699: checking for pid_t" >&5
23700 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23701 if test "${ac_cv_type_pid_t+set}" = set; then
23702   echo $ECHO_N "(cached) $ECHO_C" >&6
23703 else
23704   cat >"conftest.$ac_ext" <<_ACEOF
23705 #line 23705 "configure"
23706 #include "confdefs.h"
23707 $ac_includes_default
23708 int
23709 main (void)
23710 {
23711 if ((pid_t *) 0)
23712   return 0;
23713 if (sizeof (pid_t))
23714   return 0;
23715   ;
23716   return 0;
23717 }
23718 _ACEOF
23719 rm -f "conftest.$ac_objext"
23720 if { (eval echo "$as_me:23720: \"$ac_compile\"") >&5
23721   (eval $ac_compile) 2>&5
23722   ac_status=$?
23723   echo "$as_me:23723: \$? = $ac_status" >&5
23724   (exit "$ac_status"); } &&
23725          { ac_try='test -s "conftest.$ac_objext"'
23726   { (eval echo "$as_me:23726: \"$ac_try\"") >&5
23727   (eval $ac_try) 2>&5
23728   ac_status=$?
23729   echo "$as_me:23729: \$? = $ac_status" >&5
23730   (exit "$ac_status"); }; }; then
23731   ac_cv_type_pid_t=yes
23732 else
23733   echo "$as_me: failed program was:" >&5
23734 cat "conftest.$ac_ext" >&5
23735 ac_cv_type_pid_t=no
23736 fi
23737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23738 fi
23739 echo "$as_me:23739: result: $ac_cv_type_pid_t" >&5
23740 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23741 if test "$ac_cv_type_pid_t" = yes; then
23742   :
23743 else
23744
23745 cat >>confdefs.h <<EOF
23746 #define pid_t int
23747 EOF
23748
23749 fi
23750
23751 for ac_header in unistd.h vfork.h
23752 do
23753 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23754 echo "$as_me:23754: checking for $ac_header" >&5
23755 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23756 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23757   echo $ECHO_N "(cached) $ECHO_C" >&6
23758 else
23759   cat >"conftest.$ac_ext" <<_ACEOF
23760 #line 23760 "configure"
23761 #include "confdefs.h"
23762 #include <$ac_header>
23763 _ACEOF
23764 if { (eval echo "$as_me:23764: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23765   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23766   ac_status=$?
23767   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23768   rm -f conftest.er1
23769   cat conftest.err >&5
23770   echo "$as_me:23770: \$? = $ac_status" >&5
23771   (exit "$ac_status"); } >/dev/null; then
23772   if test -s conftest.err; then
23773     ac_cpp_err=$ac_c_preproc_warn_flag
23774   else
23775     ac_cpp_err=
23776   fi
23777 else
23778   ac_cpp_err=yes
23779 fi
23780 if test -z "$ac_cpp_err"; then
23781   eval "$as_ac_Header=yes"
23782 else
23783   echo "$as_me: failed program was:" >&5
23784   cat "conftest.$ac_ext" >&5
23785   eval "$as_ac_Header=no"
23786 fi
23787 rm -f conftest.err "conftest.$ac_ext"
23788 fi
23789 echo "$as_me:23789: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23790 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23791 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23792   cat >>confdefs.h <<EOF
23793 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23794 EOF
23795
23796 fi
23797 done
23798
23799 for ac_func in fork vfork
23800 do
23801 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23802 echo "$as_me:23802: checking for $ac_func" >&5
23803 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23804 if eval "test \"\${$as_ac_var+set}\" = set"; then
23805   echo $ECHO_N "(cached) $ECHO_C" >&6
23806 else
23807   cat >"conftest.$ac_ext" <<_ACEOF
23808 #line 23808 "configure"
23809 #include "confdefs.h"
23810 #define $ac_func autoconf_temporary
23811 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23812 #undef $ac_func
23813
23814 #ifdef __cplusplus
23815 extern "C"
23816 #endif
23817
23818 /* We use char because int might match the return type of a gcc2
23819    builtin and then its argument prototype would still apply.  */
23820 char $ac_func (void);
23821
23822 int
23823 main (void)
23824 {
23825
23826 /* The GNU C library defines stubs for functions which it implements
23827     to always fail with ENOSYS.  Some functions are actually named
23828     something starting with __ and the normal name is an alias.  */
23829 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23830 #error found stub for $ac_func
23831 #endif
23832
23833         return $ac_func ();
23834   ;
23835   return 0;
23836 }
23837 _ACEOF
23838 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23839 if { (eval echo "$as_me:23839: \"$ac_link\"") >&5
23840   (eval $ac_link) 2>&5
23841   ac_status=$?
23842   echo "$as_me:23842: \$? = $ac_status" >&5
23843   (exit "$ac_status"); } &&
23844          { ac_try='test -s "conftest$ac_exeext"'
23845   { (eval echo "$as_me:23845: \"$ac_try\"") >&5
23846   (eval $ac_try) 2>&5
23847   ac_status=$?
23848   echo "$as_me:23848: \$? = $ac_status" >&5
23849   (exit "$ac_status"); }; }; then
23850   eval "$as_ac_var=yes"
23851 else
23852   echo "$as_me: failed program was:" >&5
23853 cat "conftest.$ac_ext" >&5
23854 eval "$as_ac_var=no"
23855 fi
23856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23857 fi
23858 echo "$as_me:23858: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23859 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23860 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23861   cat >>confdefs.h <<EOF
23862 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23863 EOF
23864
23865 fi
23866 done
23867
23868 ac_cv_func_fork_works=$ac_cv_func_fork
23869 if test "x$ac_cv_func_fork" = xyes; then
23870   echo "$as_me:23870: checking for working fork" >&5
23871 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23872 if test "${ac_cv_func_fork_works+set}" = set; then
23873   echo $ECHO_N "(cached) $ECHO_C" >&6
23874 else
23875   if test "$cross_compiling" = yes; then
23876   ac_cv_func_fork_works=cross
23877 else
23878   cat >"conftest.$ac_ext" <<_ACEOF
23879 /* By Rüdiger Kuhlmann. */
23880       #include <sys/types.h>
23881       #if HAVE_UNISTD_H
23882       # include <unistd.h>
23883       #endif
23884       /* Some systems only have a dummy stub for fork() */
23885       int main (void)
23886       {
23887         if (fork() < 0)
23888           $ac_main_return (1);
23889         $ac_main_return (0);
23890       }
23891 _ACEOF
23892 rm -f "conftest$ac_exeext"
23893 if { (eval echo "$as_me:23893: \"$ac_link\"") >&5
23894   (eval $ac_link) 2>&5
23895   ac_status=$?
23896   echo "$as_me:23896: \$? = $ac_status" >&5
23897   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23898   { (eval echo "$as_me:23898: \"$ac_try\"") >&5
23899   (eval $ac_try) 2>&5
23900   ac_status=$?
23901   echo "$as_me:23901: \$? = $ac_status" >&5
23902   (exit "$ac_status"); }; }; then
23903   ac_cv_func_fork_works=yes
23904 else
23905   echo "$as_me: program exited with status $ac_status" >&5
23906 echo "$as_me: failed program was:" >&5
23907 cat "conftest.$ac_ext" >&5
23908 ac_cv_func_fork_works=no
23909 fi
23910 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23911 fi
23912 fi
23913 echo "$as_me:23913: result: $ac_cv_func_fork_works" >&5
23914 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23915
23916 fi
23917 if test "x$ac_cv_func_fork_works" = xcross; then
23918   case $host in
23919     *-*-amigaos* | *-*-msdosdjgpp*)
23920       # Override, as these systems have only a dummy fork() stub
23921       ac_cv_func_fork_works=no
23922       ;;
23923     *)
23924       ac_cv_func_fork_works=yes
23925       ;;
23926   esac
23927   { echo "$as_me:23927: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23928 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23929 fi
23930 ac_cv_func_vfork_works=$ac_cv_func_vfork
23931 if test "x$ac_cv_func_vfork" = xyes; then
23932   echo "$as_me:23932: checking for working vfork" >&5
23933 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23934 if test "${ac_cv_func_vfork_works+set}" = set; then
23935   echo $ECHO_N "(cached) $ECHO_C" >&6
23936 else
23937   if test "$cross_compiling" = yes; then
23938   ac_cv_func_vfork_works=cross
23939 else
23940   cat >"conftest.$ac_ext" <<_ACEOF
23941 #line 23941 "configure"
23942 #include "confdefs.h"
23943 /* Thanks to Paul Eggert for this test.  */
23944 #include <stdio.h>
23945 #include <sys/types.h>
23946 #include <sys/stat.h>
23947 #if HAVE_UNISTD_H
23948 # include <unistd.h>
23949 #endif
23950 #if HAVE_VFORK_H
23951 # include <vfork.h>
23952 #endif
23953 /* On some sparc systems, changes by the child to local and incoming
23954    argument registers are propagated back to the parent.  The compiler
23955    is told about this with #include <vfork.h>, but some compilers
23956    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23957    static variable whose address is put into a register that is
23958    clobbered by the vfork.  */
23959 static
23960 #ifdef __cplusplus
23961 sparc_address_test (int arg)
23962 # else
23963 sparc_address_test (arg) int arg;
23964 #endif
23965 {
23966   static pid_t child;
23967   if (!child) {
23968     child = vfork ();
23969     if (child < 0) {
23970       perror ("vfork");
23971       _exit(2);
23972     }
23973     if (!child) {
23974       arg = getpid();
23975       write(-1, "", 0);
23976       _exit (arg);
23977     }
23978   }
23979 }
23980
23981 int
23982 main (void)
23983 {
23984   pid_t parent = getpid ();
23985   pid_t child;
23986
23987   sparc_address_test ();
23988
23989   child = vfork ();
23990
23991   if (child == 0) {
23992     /* Here is another test for sparc vfork register problems.  This
23993        test uses lots of local variables, at least as many local
23994        variables as main has allocated so far including compiler
23995        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23996        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23997        reuse the register of parent for one of the local variables,
23998        since it will think that parent can't possibly be used any more
23999        in this routine.  Assigning to the local variable will thus
24000        munge parent in the parent process.  */
24001     pid_t
24002       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24003       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24004     /* Convince the compiler that p..p7 are live; otherwise, it might
24005        use the same hardware register for all 8 local variables.  */
24006     if (p != p1 || p != p2 || p != p3 || p != p4
24007         || p != p5 || p != p6 || p != p7)
24008       _exit(1);
24009
24010     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24011        from child file descriptors.  If the child closes a descriptor
24012        before it execs or exits, this munges the parent's descriptor
24013        as well.  Test for this by closing stdout in the child.  */
24014     _exit(close(fileno(stdout)) != 0);
24015   } else {
24016     int status;
24017     struct stat st;
24018
24019     while (wait(&status) != child)
24020       ;
24021     $ac_main_return(
24022          /* Was there some problem with vforking?  */
24023          child < 0
24024
24025          /* Did the child fail?  (This shouldn't happen.)  */
24026          || status
24027
24028          /* Did the vfork/compiler bug occur?  */
24029          || parent != getpid()
24030
24031          /* Did the file descriptor bug occur?  */
24032          || fstat(fileno(stdout), &st) != 0
24033          );
24034   }
24035 }
24036 _ACEOF
24037 rm -f "conftest$ac_exeext"
24038 if { (eval echo "$as_me:24038: \"$ac_link\"") >&5
24039   (eval $ac_link) 2>&5
24040   ac_status=$?
24041   echo "$as_me:24041: \$? = $ac_status" >&5
24042   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24043   { (eval echo "$as_me:24043: \"$ac_try\"") >&5
24044   (eval $ac_try) 2>&5
24045   ac_status=$?
24046   echo "$as_me:24046: \$? = $ac_status" >&5
24047   (exit "$ac_status"); }; }; then
24048   ac_cv_func_vfork_works=yes
24049 else
24050   echo "$as_me: program exited with status $ac_status" >&5
24051 echo "$as_me: failed program was:" >&5
24052 cat "conftest.$ac_ext" >&5
24053 ac_cv_func_vfork_works=no
24054 fi
24055 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24056 fi
24057 fi
24058 echo "$as_me:24058: result: $ac_cv_func_vfork_works" >&5
24059 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24060
24061 fi;
24062 if test "x$ac_cv_func_fork_works" = xcross; then
24063   ac_cv_func_vfork_works=ac_cv_func_vfork
24064   { echo "$as_me:24064: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24065 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24066 fi
24067
24068 if test "x$ac_cv_func_vfork_works" = xyes; then
24069
24070 cat >>confdefs.h <<\EOF
24071 #define HAVE_WORKING_VFORK 1
24072 EOF
24073
24074 else
24075
24076 cat >>confdefs.h <<\EOF
24077 #define vfork fork
24078 EOF
24079
24080 fi
24081 if test "x$ac_cv_func_fork_works" = xyes; then
24082
24083 cat >>confdefs.h <<\EOF
24084 #define HAVE_WORKING_FORK 1
24085 EOF
24086
24087 fi
24088
24089 echo "$as_me:24089: checking if fopen accepts explicit binary mode" >&5
24090 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24091 if test "${cf_cv_fopen_bin_r+set}" = set; then
24092   echo $ECHO_N "(cached) $ECHO_C" >&6
24093 else
24094
24095         if test "$cross_compiling" = yes; then
24096   cf_cv_fopen_bin_r=unknown
24097 else
24098   cat >"conftest.$ac_ext" <<_ACEOF
24099 #line 24099 "configure"
24100 #include "confdefs.h"
24101
24102 #include <stdio.h>
24103 int main(void) {
24104         FILE *fp = fopen("conftest.tmp", "wb");
24105         int rc = 0;
24106         if (fp != 0) {
24107                 int p, q;
24108                 for (p = 0; p < 256; ++p) {
24109                         fputc(p, fp);
24110                 }
24111                 fclose(fp);
24112                 fp = fopen("conftest.tmp", "rb");
24113                 if (fp != 0) {
24114                         for (p = 0; p < 256; ++p) {
24115                                 q = fgetc(fp);
24116                                 if (q != p) {
24117                                         rc = 1;
24118                                         break;
24119                                 }
24120                         }
24121                 } else {
24122                         rc = 1;
24123                 }
24124         } else {
24125                 rc = 1;
24126         }
24127         ${cf_cv_main_return:-return} (rc);
24128 }
24129
24130 _ACEOF
24131 rm -f "conftest$ac_exeext"
24132 if { (eval echo "$as_me:24132: \"$ac_link\"") >&5
24133   (eval $ac_link) 2>&5
24134   ac_status=$?
24135   echo "$as_me:24135: \$? = $ac_status" >&5
24136   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24137   { (eval echo "$as_me:24137: \"$ac_try\"") >&5
24138   (eval $ac_try) 2>&5
24139   ac_status=$?
24140   echo "$as_me:24140: \$? = $ac_status" >&5
24141   (exit "$ac_status"); }; }; then
24142   cf_cv_fopen_bin_r=yes
24143 else
24144   echo "$as_me: program exited with status $ac_status" >&5
24145 echo "$as_me: failed program was:" >&5
24146 cat "conftest.$ac_ext" >&5
24147 cf_cv_fopen_bin_r=no
24148 fi
24149 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24150 fi
24151
24152 fi
24153 echo "$as_me:24153: result: $cf_cv_fopen_bin_r" >&5
24154 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24155 test "x$cf_cv_fopen_bin_r" != xno &&
24156 cat >>confdefs.h <<\EOF
24157 #define USE_FOPEN_BIN_R 1
24158 EOF
24159
24160 # special check for test/ditto.c
24161
24162 echo "$as_me:24162: checking for openpty in -lutil" >&5
24163 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24164 if test "${ac_cv_lib_util_openpty+set}" = set; then
24165   echo $ECHO_N "(cached) $ECHO_C" >&6
24166 else
24167   ac_check_lib_save_LIBS=$LIBS
24168 LIBS="-lutil  $LIBS"
24169 cat >"conftest.$ac_ext" <<_ACEOF
24170 #line 24170 "configure"
24171 #include "confdefs.h"
24172
24173 /* Override any gcc2 internal prototype to avoid an error.  */
24174 #ifdef __cplusplus
24175 extern "C"
24176 #endif
24177 /* We use char because int might match the return type of a gcc2
24178    builtin and then its argument prototype would still apply.  */
24179 char openpty ();
24180 int
24181 main (void)
24182 {
24183 openpty ();
24184   ;
24185   return 0;
24186 }
24187 _ACEOF
24188 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24189 if { (eval echo "$as_me:24189: \"$ac_link\"") >&5
24190   (eval $ac_link) 2>&5
24191   ac_status=$?
24192   echo "$as_me:24192: \$? = $ac_status" >&5
24193   (exit "$ac_status"); } &&
24194          { ac_try='test -s "conftest$ac_exeext"'
24195   { (eval echo "$as_me:24195: \"$ac_try\"") >&5
24196   (eval $ac_try) 2>&5
24197   ac_status=$?
24198   echo "$as_me:24198: \$? = $ac_status" >&5
24199   (exit "$ac_status"); }; }; then
24200   ac_cv_lib_util_openpty=yes
24201 else
24202   echo "$as_me: failed program was:" >&5
24203 cat "conftest.$ac_ext" >&5
24204 ac_cv_lib_util_openpty=no
24205 fi
24206 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24207 LIBS=$ac_check_lib_save_LIBS
24208 fi
24209 echo "$as_me:24209: result: $ac_cv_lib_util_openpty" >&5
24210 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24211 if test "$ac_cv_lib_util_openpty" = yes; then
24212   cf_cv_lib_util=yes
24213 else
24214   cf_cv_lib_util=no
24215 fi
24216
24217 echo "$as_me:24217: checking for openpty header" >&5
24218 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24219 if test "${cf_cv_func_openpty+set}" = set; then
24220   echo $ECHO_N "(cached) $ECHO_C" >&6
24221 else
24222
24223         cf_save_LIBS="$LIBS"
24224         test "$cf_cv_lib_util" = yes && {
24225 cf_add_libs="$LIBS"
24226 # reverse order
24227 cf_add_0lib=
24228 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24229 # filter duplicates
24230 for cf_add_1lib in $cf_add_0lib; do
24231         for cf_add_2lib in $cf_add_libs; do
24232                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24233                         cf_add_1lib=
24234                         break
24235                 fi
24236         done
24237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24238 done
24239 LIBS="$cf_add_libs"
24240  }
24241         for cf_header in pty.h libutil.h util.h
24242         do
24243         cat >"conftest.$ac_ext" <<_ACEOF
24244 #line 24244 "configure"
24245 #include "confdefs.h"
24246
24247 #include <$cf_header>
24248
24249 int
24250 main (void)
24251 {
24252
24253         int x = openpty((int *)0, (int *)0, (char *)0,
24254                                    (struct termios *)0, (struct winsize *)0);
24255
24256   ;
24257   return 0;
24258 }
24259 _ACEOF
24260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24261 if { (eval echo "$as_me:24261: \"$ac_link\"") >&5
24262   (eval $ac_link) 2>&5
24263   ac_status=$?
24264   echo "$as_me:24264: \$? = $ac_status" >&5
24265   (exit "$ac_status"); } &&
24266          { ac_try='test -s "conftest$ac_exeext"'
24267   { (eval echo "$as_me:24267: \"$ac_try\"") >&5
24268   (eval $ac_try) 2>&5
24269   ac_status=$?
24270   echo "$as_me:24270: \$? = $ac_status" >&5
24271   (exit "$ac_status"); }; }; then
24272
24273                 cf_cv_func_openpty=$cf_header
24274                 break
24275
24276 else
24277   echo "$as_me: failed program was:" >&5
24278 cat "conftest.$ac_ext" >&5
24279
24280                 cf_cv_func_openpty=no
24281
24282 fi
24283 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24284         done
24285         LIBS="$cf_save_LIBS"
24286
24287 fi
24288 echo "$as_me:24288: result: $cf_cv_func_openpty" >&5
24289 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24290
24291 if test "$cf_cv_func_openpty" != no ; then
24292
24293 cat >>confdefs.h <<EOF
24294 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24295 EOF
24296
24297 cat >>confdefs.h <<\EOF
24298 #define USE_XTERM_PTY 1
24299 EOF
24300
24301         if test "x$cf_cv_lib_util" = xyes ; then
24302
24303 cf_add_libs="$TEST_LIBS"
24304 # reverse order
24305 cf_add_0lib=
24306 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24307 # filter duplicates
24308 for cf_add_1lib in $cf_add_0lib; do
24309         for cf_add_2lib in $cf_add_libs; do
24310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24311                         cf_add_1lib=
24312                         break
24313                 fi
24314         done
24315         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24316 done
24317 TEST_LIBS="$cf_add_libs"
24318
24319         fi
24320 fi
24321
24322 if test "$with_hashed_db" != no ; then
24323
24324 cat >>confdefs.h <<\EOF
24325 #define USE_HASHED_DB 1
24326 EOF
24327
24328 case $with_hashed_db in
24329 (yes|*able*)
24330         ;;
24331 (*)
24332         if test -d "$with_hashed_db" ; then
24333
24334 if test -n "$with_hashed_db/include" ; then
24335   for cf_add_incdir in $with_hashed_db/include
24336   do
24337         while test "$cf_add_incdir" != /usr/include
24338         do
24339           if test -d "$cf_add_incdir"
24340           then
24341                 cf_have_incdir=no
24342                 if test -n "$CFLAGS$CPPFLAGS" ; then
24343                   # a loop is needed to ensure we can add subdirs of existing dirs
24344                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24345                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24346                           cf_have_incdir=yes; break
24347                         fi
24348                   done
24349                 fi
24350
24351                 if test "$cf_have_incdir" = no ; then
24352                   if test "$cf_add_incdir" = /usr/local/include ; then
24353                         if test "$GCC" = yes
24354                         then
24355                           cf_save_CPPFLAGS=$CPPFLAGS
24356
24357         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24358         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24359
24360                           cat >"conftest.$ac_ext" <<_ACEOF
24361 #line 24361 "configure"
24362 #include "confdefs.h"
24363 #include <stdio.h>
24364 int
24365 main (void)
24366 {
24367 printf("Hello")
24368   ;
24369   return 0;
24370 }
24371 _ACEOF
24372 rm -f "conftest.$ac_objext"
24373 if { (eval echo "$as_me:24373: \"$ac_compile\"") >&5
24374   (eval $ac_compile) 2>&5
24375   ac_status=$?
24376   echo "$as_me:24376: \$? = $ac_status" >&5
24377   (exit "$ac_status"); } &&
24378          { ac_try='test -s "conftest.$ac_objext"'
24379   { (eval echo "$as_me:24379: \"$ac_try\"") >&5
24380   (eval $ac_try) 2>&5
24381   ac_status=$?
24382   echo "$as_me:24382: \$? = $ac_status" >&5
24383   (exit "$ac_status"); }; }; then
24384   :
24385 else
24386   echo "$as_me: failed program was:" >&5
24387 cat "conftest.$ac_ext" >&5
24388 cf_have_incdir=yes
24389 fi
24390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24391                           CPPFLAGS=$cf_save_CPPFLAGS
24392                         fi
24393                   fi
24394                 fi
24395
24396                 if test "$cf_have_incdir" = no ; then
24397                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24398
24399 echo "${as_me:-configure}:24399: testing adding $cf_add_incdir to include-path ..." 1>&5
24400
24401                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24402
24403                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24404                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24405                   cf_add_incdir="$cf_top_incdir"
24406                 else
24407                   break
24408                 fi
24409           else
24410                 break
24411           fi
24412         done
24413   done
24414 fi
24415
24416 if test -n "$with_hashed_db/lib" ; then
24417         for cf_add_libdir in $with_hashed_db/lib
24418         do
24419                 if test "$cf_add_libdir" = /usr/lib ; then
24420                         :
24421                 elif test -d "$cf_add_libdir"
24422                 then
24423                         cf_have_libdir=no
24424                         if test -n "$LDFLAGS$LIBS" ; then
24425                                 # a loop is needed to ensure we can add subdirs of existing dirs
24426                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24427                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24428                                                 cf_have_libdir=yes; break
24429                                         fi
24430                                 done
24431                         fi
24432                         if test "$cf_have_libdir" = no ; then
24433                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24434
24435 echo "${as_me:-configure}:24435: testing adding $cf_add_libdir to library-path ..." 1>&5
24436
24437                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24438                         fi
24439                 fi
24440         done
24441 fi
24442
24443         else
24444                 case "$with_hashed_db" in
24445                 (./*|../*|/*)
24446                         { echo "$as_me:24446: WARNING: no such directory $with_hashed_db" >&5
24447 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24448                         ;;
24449                 (*)
24450
24451 cf_search=
24452
24453 test "x$prefix" != "xNONE" && \
24454 test -d "$prefix" && \
24455  {
24456         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24457         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24458         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24459         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24460         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24461         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24462 }
24463
24464 for cf_subdir_prefix in \
24465         /usr \
24466         /usr/local \
24467         /usr/pkg \
24468         /opt \
24469         /opt/local \
24470         $HOME
24471 do
24472
24473 test "x$cf_subdir_prefix" != "x$prefix" && \
24474 test -d "$cf_subdir_prefix" && \
24475 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24476         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24477         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24478         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24479         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24480         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24481         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"
24482 }
24483
24484 done
24485
24486         for cf_item in $cf_search
24487         do
24488                 case "$cf_item" in
24489                 (*/$with_hashed_db)
24490
24491 if test -n "$cf_item" ; then
24492   for cf_add_incdir in $cf_item
24493   do
24494         while test "$cf_add_incdir" != /usr/include
24495         do
24496           if test -d "$cf_add_incdir"
24497           then
24498                 cf_have_incdir=no
24499                 if test -n "$CFLAGS$CPPFLAGS" ; then
24500                   # a loop is needed to ensure we can add subdirs of existing dirs
24501                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24502                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24503                           cf_have_incdir=yes; break
24504                         fi
24505                   done
24506                 fi
24507
24508                 if test "$cf_have_incdir" = no ; then
24509                   if test "$cf_add_incdir" = /usr/local/include ; then
24510                         if test "$GCC" = yes
24511                         then
24512                           cf_save_CPPFLAGS=$CPPFLAGS
24513
24514         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24515         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24516
24517                           cat >"conftest.$ac_ext" <<_ACEOF
24518 #line 24518 "configure"
24519 #include "confdefs.h"
24520 #include <stdio.h>
24521 int
24522 main (void)
24523 {
24524 printf("Hello")
24525   ;
24526   return 0;
24527 }
24528 _ACEOF
24529 rm -f "conftest.$ac_objext"
24530 if { (eval echo "$as_me:24530: \"$ac_compile\"") >&5
24531   (eval $ac_compile) 2>&5
24532   ac_status=$?
24533   echo "$as_me:24533: \$? = $ac_status" >&5
24534   (exit "$ac_status"); } &&
24535          { ac_try='test -s "conftest.$ac_objext"'
24536   { (eval echo "$as_me:24536: \"$ac_try\"") >&5
24537   (eval $ac_try) 2>&5
24538   ac_status=$?
24539   echo "$as_me:24539: \$? = $ac_status" >&5
24540   (exit "$ac_status"); }; }; then
24541   :
24542 else
24543   echo "$as_me: failed program was:" >&5
24544 cat "conftest.$ac_ext" >&5
24545 cf_have_incdir=yes
24546 fi
24547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24548                           CPPFLAGS=$cf_save_CPPFLAGS
24549                         fi
24550                   fi
24551                 fi
24552
24553                 if test "$cf_have_incdir" = no ; then
24554                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24555
24556 echo "${as_me:-configure}:24556: testing adding $cf_add_incdir to include-path ..." 1>&5
24557
24558                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24559
24560                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24561                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24562                   cf_add_incdir="$cf_top_incdir"
24563                 else
24564                   break
24565                 fi
24566           else
24567                 break
24568           fi
24569         done
24570   done
24571 fi
24572
24573                         ;;
24574                 esac
24575         done
24576
24577 cf_search=
24578
24579 test "x$prefix" != "xNONE" && \
24580 test -d "$prefix" && \
24581  {
24582         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24583         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24584         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24585         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24586         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24587         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24588 }
24589
24590 for cf_subdir_prefix in \
24591         /usr \
24592         /usr/local \
24593         /usr/pkg \
24594         /opt \
24595         /opt/local \
24596         $HOME
24597 do
24598
24599 test "x$cf_subdir_prefix" != "x$prefix" && \
24600 test -d "$cf_subdir_prefix" && \
24601 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24602         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24603         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24604         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24605         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24606         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24607         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"
24608 }
24609
24610 done
24611
24612         for cf_item in $cf_search
24613         do
24614                 case "$cf_item" in
24615                 (*/$with_hashed_db)
24616
24617 if test -n "$cf_item" ; then
24618         for cf_add_libdir in $cf_item
24619         do
24620                 if test "$cf_add_libdir" = /usr/lib ; then
24621                         :
24622                 elif test -d "$cf_add_libdir"
24623                 then
24624                         cf_have_libdir=no
24625                         if test -n "$LDFLAGS$LIBS" ; then
24626                                 # a loop is needed to ensure we can add subdirs of existing dirs
24627                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24628                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24629                                                 cf_have_libdir=yes; break
24630                                         fi
24631                                 done
24632                         fi
24633                         if test "$cf_have_libdir" = no ; then
24634                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24635
24636 echo "${as_me:-configure}:24636: testing adding $cf_add_libdir to library-path ..." 1>&5
24637
24638                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24639                         fi
24640                 fi
24641         done
24642 fi
24643
24644                         ;;
24645                 esac
24646         done
24647
24648                         ;;
24649                 esac
24650         fi
24651 esac
24652
24653 echo "$as_me:24653: checking for db.h" >&5
24654 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24655 if test "${ac_cv_header_db_h+set}" = set; then
24656   echo $ECHO_N "(cached) $ECHO_C" >&6
24657 else
24658   cat >"conftest.$ac_ext" <<_ACEOF
24659 #line 24659 "configure"
24660 #include "confdefs.h"
24661 #include <db.h>
24662 _ACEOF
24663 if { (eval echo "$as_me:24663: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24664   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24665   ac_status=$?
24666   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24667   rm -f conftest.er1
24668   cat conftest.err >&5
24669   echo "$as_me:24669: \$? = $ac_status" >&5
24670   (exit "$ac_status"); } >/dev/null; then
24671   if test -s conftest.err; then
24672     ac_cpp_err=$ac_c_preproc_warn_flag
24673   else
24674     ac_cpp_err=
24675   fi
24676 else
24677   ac_cpp_err=yes
24678 fi
24679 if test -z "$ac_cpp_err"; then
24680   ac_cv_header_db_h=yes
24681 else
24682   echo "$as_me: failed program was:" >&5
24683   cat "conftest.$ac_ext" >&5
24684   ac_cv_header_db_h=no
24685 fi
24686 rm -f conftest.err "conftest.$ac_ext"
24687 fi
24688 echo "$as_me:24688: result: $ac_cv_header_db_h" >&5
24689 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24690 if test "$ac_cv_header_db_h" = yes; then
24691
24692 echo "$as_me:24692: checking for version of db" >&5
24693 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24694 if test "${cf_cv_hashed_db_version+set}" = set; then
24695   echo $ECHO_N "(cached) $ECHO_C" >&6
24696 else
24697
24698 cf_cv_hashed_db_version=unknown
24699
24700 for cf_db_version in 1 2 3 4 5 6
24701 do
24702
24703 echo "${as_me:-configure}:24703: testing checking for db version $cf_db_version ..." 1>&5
24704
24705         cat >"conftest.$ac_ext" <<_ACEOF
24706 #line 24706 "configure"
24707 #include "confdefs.h"
24708
24709 $ac_includes_default
24710 #include <db.h>
24711
24712 #ifdef DB_VERSION_MAJOR
24713         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24714 #if $cf_db_version == DB_VERSION_MAJOR
24715         /* ok */
24716 #else
24717         make an error
24718 #endif
24719 #else
24720 #if $cf_db_version == 1
24721         /* ok: assuming this is DB 1.8.5 */
24722 #else
24723         make an error
24724 #endif
24725 #endif
24726
24727 int
24728 main (void)
24729 {
24730 DBT *foo = 0
24731   ;
24732   return 0;
24733 }
24734 _ACEOF
24735 rm -f "conftest.$ac_objext"
24736 if { (eval echo "$as_me:24736: \"$ac_compile\"") >&5
24737   (eval $ac_compile) 2>&5
24738   ac_status=$?
24739   echo "$as_me:24739: \$? = $ac_status" >&5
24740   (exit "$ac_status"); } &&
24741          { ac_try='test -s "conftest.$ac_objext"'
24742   { (eval echo "$as_me:24742: \"$ac_try\"") >&5
24743   (eval $ac_try) 2>&5
24744   ac_status=$?
24745   echo "$as_me:24745: \$? = $ac_status" >&5
24746   (exit "$ac_status"); }; }; then
24747
24748         cf_cv_hashed_db_version=$cf_db_version
24749         break
24750
24751 else
24752   echo "$as_me: failed program was:" >&5
24753 cat "conftest.$ac_ext" >&5
24754 fi
24755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24756 done
24757
24758 fi
24759 echo "$as_me:24759: result: $cf_cv_hashed_db_version" >&5
24760 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24761
24762 if test "$cf_cv_hashed_db_version" = unknown ; then
24763         { { echo "$as_me:24763: error: Cannot determine version of db" >&5
24764 echo "$as_me: error: Cannot determine version of db" >&2;}
24765    { (exit 1); exit 1; }; }
24766 else
24767
24768 echo "$as_me:24768: checking for db libraries" >&5
24769 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24770 if test "${cf_cv_hashed_db_libs+set}" = set; then
24771   echo $ECHO_N "(cached) $ECHO_C" >&6
24772 else
24773
24774 cf_cv_hashed_db_libs=unknown
24775 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24776 do
24777         cf_save_libs="$LIBS"
24778         if test -n "$cf_db_libs"; then
24779
24780 cf_add_libs="$LIBS"
24781 # reverse order
24782 cf_add_0lib=
24783 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24784 # filter duplicates
24785 for cf_add_1lib in $cf_add_0lib; do
24786         for cf_add_2lib in $cf_add_libs; do
24787                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24788                         cf_add_1lib=
24789                         break
24790                 fi
24791         done
24792         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24793 done
24794 LIBS="$cf_add_libs"
24795
24796         fi
24797
24798 echo "${as_me:-configure}:24798: testing checking for library $cf_db_libs ..." 1>&5
24799
24800         cat >"conftest.$ac_ext" <<_ACEOF
24801 #line 24801 "configure"
24802 #include "confdefs.h"
24803
24804 $ac_includes_default
24805 #include <db.h>
24806
24807 int
24808 main (void)
24809 {
24810
24811         char *path = "/tmp/foo";
24812 #ifdef DB_VERSION_MAJOR
24813 #if DB_VERSION_MAJOR >= 4
24814         DB *result = 0;
24815         db_create(&result, NULL, 0);
24816         result->open(result,
24817                 NULL,
24818                 path,
24819                 path,
24820                 DB_HASH,
24821                 DB_CREATE,
24822                 0644);
24823 #elif DB_VERSION_MAJOR >= 3
24824         DB *result = 0;
24825         db_create(&result, NULL, 0);
24826         result->open(result,
24827                 path,
24828                 path,
24829                 DB_HASH,
24830                 DB_CREATE,
24831                 0644);
24832 #elif DB_VERSION_MAJOR >= 2
24833         DB *result = 0;
24834         db_open(path,
24835                 DB_HASH,
24836                 DB_CREATE,
24837                 0644,
24838                 (DB_ENV *) 0,
24839                 (DB_INFO *) 0,
24840                 &result);
24841 #endif /* DB_VERSION_MAJOR */
24842 #else
24843         DB *result = dbopen(path,
24844                      2,
24845                      0644,
24846                      DB_HASH,
24847                      0);
24848 #endif
24849         ${cf_cv_main_return:-return}(result != 0)
24850
24851   ;
24852   return 0;
24853 }
24854 _ACEOF
24855 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24856 if { (eval echo "$as_me:24856: \"$ac_link\"") >&5
24857   (eval $ac_link) 2>&5
24858   ac_status=$?
24859   echo "$as_me:24859: \$? = $ac_status" >&5
24860   (exit "$ac_status"); } &&
24861          { ac_try='test -s "conftest$ac_exeext"'
24862   { (eval echo "$as_me:24862: \"$ac_try\"") >&5
24863   (eval $ac_try) 2>&5
24864   ac_status=$?
24865   echo "$as_me:24865: \$? = $ac_status" >&5
24866   (exit "$ac_status"); }; }; then
24867
24868         if test -n "$cf_db_libs" ; then
24869                 cf_cv_hashed_db_libs=$cf_db_libs
24870         else
24871                 cf_cv_hashed_db_libs=default
24872         fi
24873         LIBS="$cf_save_libs"
24874         break
24875
24876 else
24877   echo "$as_me: failed program was:" >&5
24878 cat "conftest.$ac_ext" >&5
24879 fi
24880 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24881         LIBS="$cf_save_libs"
24882 done
24883
24884 fi
24885 echo "$as_me:24885: result: $cf_cv_hashed_db_libs" >&5
24886 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24887
24888         if test "$cf_cv_hashed_db_libs" = unknown ; then
24889                 { { echo "$as_me:24889: error: Cannot determine library for db" >&5
24890 echo "$as_me: error: Cannot determine library for db" >&2;}
24891    { (exit 1); exit 1; }; }
24892         elif test "$cf_cv_hashed_db_libs" != default ; then
24893
24894 cf_add_libs="$LIBS"
24895 # reverse order
24896 cf_add_0lib=
24897 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24898 # filter duplicates
24899 for cf_add_1lib in $cf_add_0lib; do
24900         for cf_add_2lib in $cf_add_libs; do
24901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24902                         cf_add_1lib=
24903                         break
24904                 fi
24905         done
24906         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24907 done
24908 LIBS="$cf_add_libs"
24909
24910         fi
24911 fi
24912
24913 else
24914
24915         { { echo "$as_me:24915: error: Cannot find db.h" >&5
24916 echo "$as_me: error: Cannot find db.h" >&2;}
24917    { (exit 1); exit 1; }; }
24918
24919 fi
24920
24921 fi
24922
24923 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24924         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24925         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24926 fi
24927
24928 # Just in case, check if the C compiler has a bool type.
24929
24930 echo "$as_me:24930: checking if we should include stdbool.h" >&5
24931 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24932
24933 if test "${cf_cv_header_stdbool_h+set}" = set; then
24934   echo $ECHO_N "(cached) $ECHO_C" >&6
24935 else
24936
24937         cat >"conftest.$ac_ext" <<_ACEOF
24938 #line 24938 "configure"
24939 #include "confdefs.h"
24940
24941 int
24942 main (void)
24943 {
24944 bool foo = false
24945   ;
24946   return 0;
24947 }
24948 _ACEOF
24949 rm -f "conftest.$ac_objext"
24950 if { (eval echo "$as_me:24950: \"$ac_compile\"") >&5
24951   (eval $ac_compile) 2>&5
24952   ac_status=$?
24953   echo "$as_me:24953: \$? = $ac_status" >&5
24954   (exit "$ac_status"); } &&
24955          { ac_try='test -s "conftest.$ac_objext"'
24956   { (eval echo "$as_me:24956: \"$ac_try\"") >&5
24957   (eval $ac_try) 2>&5
24958   ac_status=$?
24959   echo "$as_me:24959: \$? = $ac_status" >&5
24960   (exit "$ac_status"); }; }; then
24961   cf_cv_header_stdbool_h=0
24962 else
24963   echo "$as_me: failed program was:" >&5
24964 cat "conftest.$ac_ext" >&5
24965 cat >"conftest.$ac_ext" <<_ACEOF
24966 #line 24966 "configure"
24967 #include "confdefs.h"
24968
24969 #ifndef __BEOS__
24970 #include <stdbool.h>
24971 #endif
24972
24973 int
24974 main (void)
24975 {
24976 bool foo = false
24977   ;
24978   return 0;
24979 }
24980 _ACEOF
24981 rm -f "conftest.$ac_objext"
24982 if { (eval echo "$as_me:24982: \"$ac_compile\"") >&5
24983   (eval $ac_compile) 2>&5
24984   ac_status=$?
24985   echo "$as_me:24985: \$? = $ac_status" >&5
24986   (exit "$ac_status"); } &&
24987          { ac_try='test -s "conftest.$ac_objext"'
24988   { (eval echo "$as_me:24988: \"$ac_try\"") >&5
24989   (eval $ac_try) 2>&5
24990   ac_status=$?
24991   echo "$as_me:24991: \$? = $ac_status" >&5
24992   (exit "$ac_status"); }; }; then
24993   cf_cv_header_stdbool_h=1
24994 else
24995   echo "$as_me: failed program was:" >&5
24996 cat "conftest.$ac_ext" >&5
24997 cf_cv_header_stdbool_h=0
24998 fi
24999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25000 fi
25001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25002 fi
25003
25004 if test "$cf_cv_header_stdbool_h" = 1
25005 then    echo "$as_me:25005: result: yes" >&5
25006 echo "${ECHO_T}yes" >&6
25007 else    echo "$as_me:25007: result: no" >&5
25008 echo "${ECHO_T}no" >&6
25009 fi
25010
25011 echo "$as_me:25011: checking for builtin bool type" >&5
25012 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25013
25014 if test "${cf_cv_cc_bool_type+set}" = set; then
25015   echo $ECHO_N "(cached) $ECHO_C" >&6
25016 else
25017
25018         cat >"conftest.$ac_ext" <<_ACEOF
25019 #line 25019 "configure"
25020 #include "confdefs.h"
25021
25022 #include <stdio.h>
25023 #include <sys/types.h>
25024
25025 int
25026 main (void)
25027 {
25028 bool x = false
25029   ;
25030   return 0;
25031 }
25032 _ACEOF
25033 rm -f "conftest.$ac_objext"
25034 if { (eval echo "$as_me:25034: \"$ac_compile\"") >&5
25035   (eval $ac_compile) 2>&5
25036   ac_status=$?
25037   echo "$as_me:25037: \$? = $ac_status" >&5
25038   (exit "$ac_status"); } &&
25039          { ac_try='test -s "conftest.$ac_objext"'
25040   { (eval echo "$as_me:25040: \"$ac_try\"") >&5
25041   (eval $ac_try) 2>&5
25042   ac_status=$?
25043   echo "$as_me:25043: \$? = $ac_status" >&5
25044   (exit "$ac_status"); }; }; then
25045   cf_cv_cc_bool_type=1
25046 else
25047   echo "$as_me: failed program was:" >&5
25048 cat "conftest.$ac_ext" >&5
25049 cf_cv_cc_bool_type=0
25050 fi
25051 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25052
25053 fi
25054
25055 if test "$cf_cv_cc_bool_type" = 1
25056 then    echo "$as_me:25056: result: yes" >&5
25057 echo "${ECHO_T}yes" >&6
25058 else    echo "$as_me:25058: result: no" >&5
25059 echo "${ECHO_T}no" >&6
25060 fi
25061
25062 # Check for C++ compiler characteristics (and ensure that it's there!)
25063 if test -n "$CXX" ; then
25064         ac_ext=cc
25065 ac_cpp='$CXXCPP $CPPFLAGS'
25066 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25067 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25068 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25069 ac_main_return="return"
25070
25071 if test -n "$GXX" ; then
25072
25073         cf_save="$LIBS"
25074         LIBS="$LIBS $CXXLIBS"
25075         echo "$as_me:25075: checking if we already have C++ library" >&5
25076 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25077         cat >"conftest.$ac_ext" <<_ACEOF
25078 #line 25078 "configure"
25079 #include "confdefs.h"
25080
25081                         #include <iostream>
25082 int
25083 main (void)
25084 {
25085
25086                         std::cout << "Hello World!" << std::endl;
25087   ;
25088   return 0;
25089 }
25090 _ACEOF
25091 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25092 if { (eval echo "$as_me:25092: \"$ac_link\"") >&5
25093   (eval $ac_link) 2>&5
25094   ac_status=$?
25095   echo "$as_me:25095: \$? = $ac_status" >&5
25096   (exit "$ac_status"); } &&
25097          { ac_try='test -s "conftest$ac_exeext"'
25098   { (eval echo "$as_me:25098: \"$ac_try\"") >&5
25099   (eval $ac_try) 2>&5
25100   ac_status=$?
25101   echo "$as_me:25101: \$? = $ac_status" >&5
25102   (exit "$ac_status"); }; }; then
25103   cf_have_libstdcpp=yes
25104 else
25105   echo "$as_me: failed program was:" >&5
25106 cat "conftest.$ac_ext" >&5
25107 cf_have_libstdcpp=no
25108 fi
25109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25110         echo "$as_me:25110: result: $cf_have_libstdcpp" >&5
25111 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25112         LIBS="$cf_save"
25113
25114         if test "$cf_have_libstdcpp" != yes
25115         then
25116                 case "$cf_cv_system_name" in
25117                 (os2*)
25118                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25119                                 cf_stdcpp_libname=stdcpp
25120                         else
25121                                 cf_stdcpp_libname=stdc++
25122                         fi
25123                         ;;
25124                 (*)
25125                         cf_stdcpp_libname=stdc++
25126                         ;;
25127                 esac
25128
25129                 echo "$as_me:25129: checking for library $cf_stdcpp_libname" >&5
25130 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25131 if test "${cf_cv_libstdcpp+set}" = set; then
25132   echo $ECHO_N "(cached) $ECHO_C" >&6
25133 else
25134
25135                         cf_save="$LIBS"
25136                         LIBS="$LIBS $CXXLIBS"
25137
25138 cf_add_libs="$LIBS"
25139 # reverse order
25140 cf_add_0lib=
25141 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25142 # filter duplicates
25143 for cf_add_1lib in $cf_add_0lib; do
25144         for cf_add_2lib in $cf_add_libs; do
25145                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25146                         cf_add_1lib=
25147                         break
25148                 fi
25149         done
25150         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25151 done
25152 LIBS="$cf_add_libs"
25153
25154                 cat >"conftest.$ac_ext" <<_ACEOF
25155 #line 25155 "configure"
25156 #include "confdefs.h"
25157
25158                                 #include <iostream>
25159 int
25160 main (void)
25161 {
25162
25163                                 std::cout << "Hello World!" << std::endl;
25164   ;
25165   return 0;
25166 }
25167 _ACEOF
25168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25169 if { (eval echo "$as_me:25169: \"$ac_link\"") >&5
25170   (eval $ac_link) 2>&5
25171   ac_status=$?
25172   echo "$as_me:25172: \$? = $ac_status" >&5
25173   (exit "$ac_status"); } &&
25174          { ac_try='test -s "conftest$ac_exeext"'
25175   { (eval echo "$as_me:25175: \"$ac_try\"") >&5
25176   (eval $ac_try) 2>&5
25177   ac_status=$?
25178   echo "$as_me:25178: \$? = $ac_status" >&5
25179   (exit "$ac_status"); }; }; then
25180   cf_cv_libstdcpp=yes
25181 else
25182   echo "$as_me: failed program was:" >&5
25183 cat "conftest.$ac_ext" >&5
25184 cf_cv_libstdcpp=no
25185 fi
25186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25187                         LIBS="$cf_save"
25188
25189 fi
25190 echo "$as_me:25190: result: $cf_cv_libstdcpp" >&5
25191 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25192                 test "$cf_cv_libstdcpp" = yes && {
25193 cf_add_libs="$CXXLIBS"
25194 # reverse order
25195 cf_add_0lib=
25196 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25197 # filter duplicates
25198 for cf_add_1lib in $cf_add_0lib; do
25199         for cf_add_2lib in $cf_add_libs; do
25200                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25201                         cf_add_1lib=
25202                         break
25203                 fi
25204         done
25205         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25206 done
25207 CXXLIBS="$cf_add_libs"
25208  }
25209         fi
25210 fi
25211
25212         echo "$as_me:25212: checking whether $CXX understands -c and -o together" >&5
25213 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25214 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25215   echo $ECHO_N "(cached) $ECHO_C" >&6
25216 else
25217
25218 cat > conftest.$ac_ext <<CF_EOF
25219 int main(void)
25220 {
25221         ${cf_cv_main_return:-return}(0);
25222 }
25223 CF_EOF
25224 # We do the test twice because some compilers refuse to overwrite an
25225 # existing .o file with -o, though they will create one.
25226 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25227 if { (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"); } &&
25232   test -f conftest2.$ac_objext && { (eval echo "$as_me:25232: \"$ac_try\"") >&5
25233   (eval $ac_try) 2>&5
25234   ac_status=$?
25235   echo "$as_me:25235: \$? = $ac_status" >&5
25236   (exit "$ac_status"); };
25237 then
25238   eval cf_cv_prog_CXX_c_o=yes
25239 else
25240   eval cf_cv_prog_CXX_c_o=no
25241 fi
25242 rm -rf ./conftest*
25243
25244 fi
25245 if test "$cf_cv_prog_CXX_c_o" = yes; then
25246   echo "$as_me:25246: result: yes" >&5
25247 echo "${ECHO_T}yes" >&6
25248 else
25249   echo "$as_me:25249: result: no" >&5
25250 echo "${ECHO_T}no" >&6
25251 fi
25252
25253         case "$GXX_VERSION" in
25254         (1.*|2.[0-6]*|[1-9][0-9].*)
25255                 cf_cxx_library=yes
25256                 ;;
25257         (*-2.7*|2.7*)
25258
25259 cf_cxx_library=unknown
25260 case "$cf_cv_system_name" in
25261 (os2*)
25262         cf_gpp_libname=gpp
25263         ;;
25264 (*)
25265         cf_gpp_libname=g++
25266         ;;
25267 esac
25268 if test "$GXX" = yes; then
25269         echo "$as_me:25269: checking for lib$cf_gpp_libname" >&5
25270 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25271         cf_save="$LIBS"
25272
25273 cf_add_libs="$LIBS"
25274 # reverse order
25275 cf_add_0lib=
25276 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25277 # filter duplicates
25278 for cf_add_1lib in $cf_add_0lib; do
25279         for cf_add_2lib in $cf_add_libs; do
25280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25281                         cf_add_1lib=
25282                         break
25283                 fi
25284         done
25285         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25286 done
25287 LIBS="$cf_add_libs"
25288
25289         cat >"conftest.$ac_ext" <<_ACEOF
25290 #line 25290 "configure"
25291 #include "confdefs.h"
25292
25293 #include <$cf_gpp_libname/builtin.h>
25294
25295 int
25296 main (void)
25297 {
25298 two_arg_error_handler_t foo2 = lib_error_handler
25299   ;
25300   return 0;
25301 }
25302 _ACEOF
25303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25304 if { (eval echo "$as_me:25304: \"$ac_link\"") >&5
25305   (eval $ac_link) 2>&5
25306   ac_status=$?
25307   echo "$as_me:25307: \$? = $ac_status" >&5
25308   (exit "$ac_status"); } &&
25309          { ac_try='test -s "conftest$ac_exeext"'
25310   { (eval echo "$as_me:25310: \"$ac_try\"") >&5
25311   (eval $ac_try) 2>&5
25312   ac_status=$?
25313   echo "$as_me:25313: \$? = $ac_status" >&5
25314   (exit "$ac_status"); }; }; then
25315   cf_cxx_library=yes
25316
25317 cf_add_libs="$CXXLIBS"
25318 # reverse order
25319 cf_add_0lib=
25320 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25321 # filter duplicates
25322 for cf_add_1lib in $cf_add_0lib; do
25323         for cf_add_2lib in $cf_add_libs; do
25324                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25325                         cf_add_1lib=
25326                         break
25327                 fi
25328         done
25329         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25330 done
25331 CXXLIBS="$cf_add_libs"
25332
25333          if test "$cf_gpp_libname" = cpp ; then
25334
25335 cat >>confdefs.h <<\EOF
25336 #define HAVE_GPP_BUILTIN_H 1
25337 EOF
25338
25339          else
25340
25341 cat >>confdefs.h <<\EOF
25342 #define HAVE_GXX_BUILTIN_H 1
25343 EOF
25344
25345          fi
25346 else
25347   echo "$as_me: failed program was:" >&5
25348 cat "conftest.$ac_ext" >&5
25349 cat >"conftest.$ac_ext" <<_ACEOF
25350 #line 25350 "configure"
25351 #include "confdefs.h"
25352
25353 #include <builtin.h>
25354
25355 int
25356 main (void)
25357 {
25358 two_arg_error_handler_t foo2 = lib_error_handler
25359   ;
25360   return 0;
25361 }
25362 _ACEOF
25363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25364 if { (eval echo "$as_me:25364: \"$ac_link\"") >&5
25365   (eval $ac_link) 2>&5
25366   ac_status=$?
25367   echo "$as_me:25367: \$? = $ac_status" >&5
25368   (exit "$ac_status"); } &&
25369          { ac_try='test -s "conftest$ac_exeext"'
25370   { (eval echo "$as_me:25370: \"$ac_try\"") >&5
25371   (eval $ac_try) 2>&5
25372   ac_status=$?
25373   echo "$as_me:25373: \$? = $ac_status" >&5
25374   (exit "$ac_status"); }; }; then
25375   cf_cxx_library=yes
25376
25377 cf_add_libs="$CXXLIBS"
25378 # reverse order
25379 cf_add_0lib=
25380 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25381 # filter duplicates
25382 for cf_add_1lib in $cf_add_0lib; do
25383         for cf_add_2lib in $cf_add_libs; do
25384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25385                         cf_add_1lib=
25386                         break
25387                 fi
25388         done
25389         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25390 done
25391 CXXLIBS="$cf_add_libs"
25392
25393 cat >>confdefs.h <<\EOF
25394 #define HAVE_BUILTIN_H 1
25395 EOF
25396
25397 else
25398   echo "$as_me: failed program was:" >&5
25399 cat "conftest.$ac_ext" >&5
25400 cf_cxx_library=no
25401 fi
25402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25403 fi
25404 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25405         LIBS="$cf_save"
25406         echo "$as_me:25406: result: $cf_cxx_library" >&5
25407 echo "${ECHO_T}$cf_cxx_library" >&6
25408 fi
25409
25410                 ;;
25411         (*)
25412                 cf_cxx_library=no
25413                 ;;
25414         esac
25415
25416         ac_ext=cc
25417 ac_cpp='$CXXCPP $CPPFLAGS'
25418 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25419 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25420 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25421 ac_main_return="return"
25422 echo "$as_me:25422: checking how to run the C++ preprocessor" >&5
25423 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25424 if test -z "$CXXCPP"; then
25425   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25426   echo $ECHO_N "(cached) $ECHO_C" >&6
25427 else
25428       # Double quotes because CXXCPP needs to be expanded
25429     for CXXCPP in "$CXX -E" "/lib/cpp"
25430     do
25431       ac_preproc_ok=false
25432 for ac_cxx_preproc_warn_flag in '' yes
25433 do
25434   # Use a header file that comes with gcc, so configuring glibc
25435   # with a fresh cross-compiler works.
25436   # On the NeXT, cc -E runs the code through the compiler's parser,
25437   # not just through cpp. "Syntax error" is here to catch this case.
25438   cat >"conftest.$ac_ext" <<_ACEOF
25439 #line 25439 "configure"
25440 #include "confdefs.h"
25441 #include <assert.h>
25442                      Syntax error
25443 _ACEOF
25444 if { (eval echo "$as_me:25444: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25445   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25446   ac_status=$?
25447   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25448   rm -f conftest.er1
25449   cat conftest.err >&5
25450   echo "$as_me:25450: \$? = $ac_status" >&5
25451   (exit "$ac_status"); } >/dev/null; then
25452   if test -s conftest.err; then
25453     ac_cpp_err=$ac_cxx_preproc_warn_flag
25454   else
25455     ac_cpp_err=
25456   fi
25457 else
25458   ac_cpp_err=yes
25459 fi
25460 if test -z "$ac_cpp_err"; then
25461   :
25462 else
25463   echo "$as_me: failed program was:" >&5
25464   cat "conftest.$ac_ext" >&5
25465   # Broken: fails on valid input.
25466 continue
25467 fi
25468 rm -f conftest.err "conftest.$ac_ext"
25469
25470   # OK, works on sane cases.  Now check whether non-existent headers
25471   # can be detected and how.
25472   cat >"conftest.$ac_ext" <<_ACEOF
25473 #line 25473 "configure"
25474 #include "confdefs.h"
25475 #include <ac_nonexistent.h>
25476 _ACEOF
25477 if { (eval echo "$as_me:25477: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25478   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25479   ac_status=$?
25480   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25481   rm -f conftest.er1
25482   cat conftest.err >&5
25483   echo "$as_me:25483: \$? = $ac_status" >&5
25484   (exit "$ac_status"); } >/dev/null; then
25485   if test -s conftest.err; then
25486     ac_cpp_err=$ac_cxx_preproc_warn_flag
25487   else
25488     ac_cpp_err=
25489   fi
25490 else
25491   ac_cpp_err=yes
25492 fi
25493 if test -z "$ac_cpp_err"; then
25494   # Broken: success on invalid input.
25495 continue
25496 else
25497   echo "$as_me: failed program was:" >&5
25498   cat "conftest.$ac_ext" >&5
25499   # Passes both tests.
25500 ac_preproc_ok=:
25501 break
25502 fi
25503 rm -f conftest.err "conftest.$ac_ext"
25504
25505 done
25506 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25507 rm -f conftest.err "conftest.$ac_ext"
25508 if $ac_preproc_ok; then
25509   break
25510 fi
25511
25512     done
25513     ac_cv_prog_CXXCPP=$CXXCPP
25514
25515 fi
25516   CXXCPP=$ac_cv_prog_CXXCPP
25517 else
25518   ac_cv_prog_CXXCPP=$CXXCPP
25519 fi
25520 echo "$as_me:25520: result: $CXXCPP" >&5
25521 echo "${ECHO_T}$CXXCPP" >&6
25522 ac_preproc_ok=false
25523 for ac_cxx_preproc_warn_flag in '' yes
25524 do
25525   # Use a header file that comes with gcc, so configuring glibc
25526   # with a fresh cross-compiler works.
25527   # On the NeXT, cc -E runs the code through the compiler's parser,
25528   # not just through cpp. "Syntax error" is here to catch this case.
25529   cat >"conftest.$ac_ext" <<_ACEOF
25530 #line 25530 "configure"
25531 #include "confdefs.h"
25532 #include <assert.h>
25533                      Syntax error
25534 _ACEOF
25535 if { (eval echo "$as_me:25535: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25536   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25537   ac_status=$?
25538   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25539   rm -f conftest.er1
25540   cat conftest.err >&5
25541   echo "$as_me:25541: \$? = $ac_status" >&5
25542   (exit "$ac_status"); } >/dev/null; then
25543   if test -s conftest.err; then
25544     ac_cpp_err=$ac_cxx_preproc_warn_flag
25545   else
25546     ac_cpp_err=
25547   fi
25548 else
25549   ac_cpp_err=yes
25550 fi
25551 if test -z "$ac_cpp_err"; then
25552   :
25553 else
25554   echo "$as_me: failed program was:" >&5
25555   cat "conftest.$ac_ext" >&5
25556   # Broken: fails on valid input.
25557 continue
25558 fi
25559 rm -f conftest.err "conftest.$ac_ext"
25560
25561   # OK, works on sane cases.  Now check whether non-existent headers
25562   # can be detected and how.
25563   cat >"conftest.$ac_ext" <<_ACEOF
25564 #line 25564 "configure"
25565 #include "confdefs.h"
25566 #include <ac_nonexistent.h>
25567 _ACEOF
25568 if { (eval echo "$as_me:25568: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25569   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25570   ac_status=$?
25571   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25572   rm -f conftest.er1
25573   cat conftest.err >&5
25574   echo "$as_me:25574: \$? = $ac_status" >&5
25575   (exit "$ac_status"); } >/dev/null; then
25576   if test -s conftest.err; then
25577     ac_cpp_err=$ac_cxx_preproc_warn_flag
25578   else
25579     ac_cpp_err=
25580   fi
25581 else
25582   ac_cpp_err=yes
25583 fi
25584 if test -z "$ac_cpp_err"; then
25585   # Broken: success on invalid input.
25586 continue
25587 else
25588   echo "$as_me: failed program was:" >&5
25589   cat "conftest.$ac_ext" >&5
25590   # Passes both tests.
25591 ac_preproc_ok=:
25592 break
25593 fi
25594 rm -f conftest.err "conftest.$ac_ext"
25595
25596 done
25597 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25598 rm -f conftest.err "conftest.$ac_ext"
25599 if $ac_preproc_ok; then
25600   :
25601 else
25602   { { echo "$as_me:25602: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25603 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25604    { (exit 1); exit 1; }; }
25605 fi
25606
25607 ac_ext=cc
25608 ac_cpp='$CXXCPP $CPPFLAGS'
25609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25610 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25612 ac_main_return="return"
25613
25614 for ac_header in typeinfo
25615 do
25616 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25617 echo "$as_me:25617: checking for $ac_header" >&5
25618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25620   echo $ECHO_N "(cached) $ECHO_C" >&6
25621 else
25622   cat >"conftest.$ac_ext" <<_ACEOF
25623 #line 25623 "configure"
25624 #include "confdefs.h"
25625 #include <$ac_header>
25626 _ACEOF
25627 if { (eval echo "$as_me:25627: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25628   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25629   ac_status=$?
25630   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25631   rm -f conftest.er1
25632   cat conftest.err >&5
25633   echo "$as_me:25633: \$? = $ac_status" >&5
25634   (exit "$ac_status"); } >/dev/null; then
25635   if test -s conftest.err; then
25636     ac_cpp_err=$ac_cxx_preproc_warn_flag
25637   else
25638     ac_cpp_err=
25639   fi
25640 else
25641   ac_cpp_err=yes
25642 fi
25643 if test -z "$ac_cpp_err"; then
25644   eval "$as_ac_Header=yes"
25645 else
25646   echo "$as_me: failed program was:" >&5
25647   cat "conftest.$ac_ext" >&5
25648   eval "$as_ac_Header=no"
25649 fi
25650 rm -f conftest.err "conftest.$ac_ext"
25651 fi
25652 echo "$as_me:25652: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25653 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25654 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25655   cat >>confdefs.h <<EOF
25656 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25657 EOF
25658
25659 fi
25660 done
25661
25662 for ac_header in iostream
25663 do
25664 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25665 echo "$as_me:25665: checking for $ac_header" >&5
25666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25668   echo $ECHO_N "(cached) $ECHO_C" >&6
25669 else
25670   cat >"conftest.$ac_ext" <<_ACEOF
25671 #line 25671 "configure"
25672 #include "confdefs.h"
25673 #include <$ac_header>
25674 _ACEOF
25675 if { (eval echo "$as_me:25675: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25676   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25677   ac_status=$?
25678   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25679   rm -f conftest.er1
25680   cat conftest.err >&5
25681   echo "$as_me:25681: \$? = $ac_status" >&5
25682   (exit "$ac_status"); } >/dev/null; then
25683   if test -s conftest.err; then
25684     ac_cpp_err=$ac_cxx_preproc_warn_flag
25685   else
25686     ac_cpp_err=
25687   fi
25688 else
25689   ac_cpp_err=yes
25690 fi
25691 if test -z "$ac_cpp_err"; then
25692   eval "$as_ac_Header=yes"
25693 else
25694   echo "$as_me: failed program was:" >&5
25695   cat "conftest.$ac_ext" >&5
25696   eval "$as_ac_Header=no"
25697 fi
25698 rm -f conftest.err "conftest.$ac_ext"
25699 fi
25700 echo "$as_me:25700: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25701 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25702 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25703   cat >>confdefs.h <<EOF
25704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25705 EOF
25706
25707 fi
25708 done
25709
25710 if test x"$ac_cv_header_iostream" = xyes ; then
25711         echo "$as_me:25711: checking if iostream uses std-namespace" >&5
25712 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25713         cat >"conftest.$ac_ext" <<_ACEOF
25714 #line 25714 "configure"
25715 #include "confdefs.h"
25716
25717 #include <iostream>
25718 using std::endl;
25719 using std::cerr;
25720 int
25721 main (void)
25722 {
25723
25724 cerr << "testing" << endl;
25725
25726   ;
25727   return 0;
25728 }
25729 _ACEOF
25730 rm -f "conftest.$ac_objext"
25731 if { (eval echo "$as_me:25731: \"$ac_compile\"") >&5
25732   (eval $ac_compile) 2>&5
25733   ac_status=$?
25734   echo "$as_me:25734: \$? = $ac_status" >&5
25735   (exit "$ac_status"); } &&
25736          { ac_try='test -s "conftest.$ac_objext"'
25737   { (eval echo "$as_me:25737: \"$ac_try\"") >&5
25738   (eval $ac_try) 2>&5
25739   ac_status=$?
25740   echo "$as_me:25740: \$? = $ac_status" >&5
25741   (exit "$ac_status"); }; }; then
25742   cf_iostream_namespace=yes
25743 else
25744   echo "$as_me: failed program was:" >&5
25745 cat "conftest.$ac_ext" >&5
25746 cf_iostream_namespace=no
25747 fi
25748 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25749         echo "$as_me:25749: result: $cf_iostream_namespace" >&5
25750 echo "${ECHO_T}$cf_iostream_namespace" >&6
25751         if test "$cf_iostream_namespace" = yes ; then
25752
25753 cat >>confdefs.h <<\EOF
25754 #define IOSTREAM_NAMESPACE 1
25755 EOF
25756
25757         fi
25758 fi
25759
25760 echo "$as_me:25760: checking if we should include stdbool.h" >&5
25761 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25762
25763 if test "${cf_cv_header_stdbool_h+set}" = set; then
25764   echo $ECHO_N "(cached) $ECHO_C" >&6
25765 else
25766
25767         cat >"conftest.$ac_ext" <<_ACEOF
25768 #line 25768 "configure"
25769 #include "confdefs.h"
25770
25771 int
25772 main (void)
25773 {
25774 bool foo = false
25775   ;
25776   return 0;
25777 }
25778 _ACEOF
25779 rm -f "conftest.$ac_objext"
25780 if { (eval echo "$as_me:25780: \"$ac_compile\"") >&5
25781   (eval $ac_compile) 2>&5
25782   ac_status=$?
25783   echo "$as_me:25783: \$? = $ac_status" >&5
25784   (exit "$ac_status"); } &&
25785          { ac_try='test -s "conftest.$ac_objext"'
25786   { (eval echo "$as_me:25786: \"$ac_try\"") >&5
25787   (eval $ac_try) 2>&5
25788   ac_status=$?
25789   echo "$as_me:25789: \$? = $ac_status" >&5
25790   (exit "$ac_status"); }; }; then
25791   cf_cv_header_stdbool_h=0
25792 else
25793   echo "$as_me: failed program was:" >&5
25794 cat "conftest.$ac_ext" >&5
25795 cat >"conftest.$ac_ext" <<_ACEOF
25796 #line 25796 "configure"
25797 #include "confdefs.h"
25798
25799 #ifndef __BEOS__
25800 #include <stdbool.h>
25801 #endif
25802
25803 int
25804 main (void)
25805 {
25806 bool foo = false
25807   ;
25808   return 0;
25809 }
25810 _ACEOF
25811 rm -f "conftest.$ac_objext"
25812 if { (eval echo "$as_me:25812: \"$ac_compile\"") >&5
25813   (eval $ac_compile) 2>&5
25814   ac_status=$?
25815   echo "$as_me:25815: \$? = $ac_status" >&5
25816   (exit "$ac_status"); } &&
25817          { ac_try='test -s "conftest.$ac_objext"'
25818   { (eval echo "$as_me:25818: \"$ac_try\"") >&5
25819   (eval $ac_try) 2>&5
25820   ac_status=$?
25821   echo "$as_me:25821: \$? = $ac_status" >&5
25822   (exit "$ac_status"); }; }; then
25823   cf_cv_header_stdbool_h=1
25824 else
25825   echo "$as_me: failed program was:" >&5
25826 cat "conftest.$ac_ext" >&5
25827 cf_cv_header_stdbool_h=0
25828 fi
25829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25830 fi
25831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25832 fi
25833
25834 if test "$cf_cv_header_stdbool_h" = 1
25835 then    echo "$as_me:25835: result: yes" >&5
25836 echo "${ECHO_T}yes" >&6
25837 else    echo "$as_me:25837: result: no" >&5
25838 echo "${ECHO_T}no" >&6
25839 fi
25840
25841 echo "$as_me:25841: checking for builtin bool type" >&5
25842 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25843
25844 if test "${cf_cv_builtin_bool+set}" = set; then
25845   echo $ECHO_N "(cached) $ECHO_C" >&6
25846 else
25847
25848         cat >"conftest.$ac_ext" <<_ACEOF
25849 #line 25849 "configure"
25850 #include "confdefs.h"
25851
25852 #include <stdio.h>
25853 #include <sys/types.h>
25854
25855 int
25856 main (void)
25857 {
25858 bool x = false
25859   ;
25860   return 0;
25861 }
25862 _ACEOF
25863 rm -f "conftest.$ac_objext"
25864 if { (eval echo "$as_me:25864: \"$ac_compile\"") >&5
25865   (eval $ac_compile) 2>&5
25866   ac_status=$?
25867   echo "$as_me:25867: \$? = $ac_status" >&5
25868   (exit "$ac_status"); } &&
25869          { ac_try='test -s "conftest.$ac_objext"'
25870   { (eval echo "$as_me:25870: \"$ac_try\"") >&5
25871   (eval $ac_try) 2>&5
25872   ac_status=$?
25873   echo "$as_me:25873: \$? = $ac_status" >&5
25874   (exit "$ac_status"); }; }; then
25875   cf_cv_builtin_bool=1
25876 else
25877   echo "$as_me: failed program was:" >&5
25878 cat "conftest.$ac_ext" >&5
25879 cf_cv_builtin_bool=0
25880 fi
25881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25882
25883 fi
25884
25885 if test "$cf_cv_builtin_bool" = 1
25886 then    echo "$as_me:25886: result: yes" >&5
25887 echo "${ECHO_T}yes" >&6
25888 else    echo "$as_me:25888: result: no" >&5
25889 echo "${ECHO_T}no" >&6
25890 fi
25891
25892 echo "$as_me:25892: checking for bool" >&5
25893 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25894 if test "${ac_cv_type_bool+set}" = set; then
25895   echo $ECHO_N "(cached) $ECHO_C" >&6
25896 else
25897   cat >"conftest.$ac_ext" <<_ACEOF
25898 #line 25898 "configure"
25899 #include "confdefs.h"
25900
25901 #include <stdlib.h>
25902 #include <stdio.h>
25903
25904 #if defined(__cplusplus)
25905
25906 #ifdef HAVE_GXX_BUILTIN_H
25907 #include <g++/builtin.h>
25908 #elif HAVE_GPP_BUILTIN_H
25909 #include <gpp/builtin.h>
25910 #elif HAVE_BUILTIN_H
25911 #include <builtin.h>
25912 #endif
25913
25914 #else
25915
25916 #if $cf_cv_header_stdbool_h
25917 #include <stdbool.h>
25918 #endif
25919
25920 #endif
25921
25922 int
25923 main (void)
25924 {
25925 if ((bool *) 0)
25926   return 0;
25927 if (sizeof (bool))
25928   return 0;
25929   ;
25930   return 0;
25931 }
25932 _ACEOF
25933 rm -f "conftest.$ac_objext"
25934 if { (eval echo "$as_me:25934: \"$ac_compile\"") >&5
25935   (eval $ac_compile) 2>&5
25936   ac_status=$?
25937   echo "$as_me:25937: \$? = $ac_status" >&5
25938   (exit "$ac_status"); } &&
25939          { ac_try='test -s "conftest.$ac_objext"'
25940   { (eval echo "$as_me:25940: \"$ac_try\"") >&5
25941   (eval $ac_try) 2>&5
25942   ac_status=$?
25943   echo "$as_me:25943: \$? = $ac_status" >&5
25944   (exit "$ac_status"); }; }; then
25945   ac_cv_type_bool=yes
25946 else
25947   echo "$as_me: failed program was:" >&5
25948 cat "conftest.$ac_ext" >&5
25949 ac_cv_type_bool=no
25950 fi
25951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25952 fi
25953 echo "$as_me:25953: result: $ac_cv_type_bool" >&5
25954 echo "${ECHO_T}$ac_cv_type_bool" >&6
25955
25956 echo "$as_me:25956: checking size of bool" >&5
25957 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25958 if test "${ac_cv_sizeof_bool+set}" = set; then
25959   echo $ECHO_N "(cached) $ECHO_C" >&6
25960 else
25961   if test "$ac_cv_type_bool" = yes; then
25962   if test "$cross_compiling" = yes; then
25963   # Depending upon the size, compute the lo and hi bounds.
25964 cat >"conftest.$ac_ext" <<_ACEOF
25965 #line 25965 "configure"
25966 #include "confdefs.h"
25967
25968 #include <stdlib.h>
25969 #include <stdio.h>
25970
25971 #if defined(__cplusplus)
25972
25973 #ifdef HAVE_GXX_BUILTIN_H
25974 #include <g++/builtin.h>
25975 #elif HAVE_GPP_BUILTIN_H
25976 #include <gpp/builtin.h>
25977 #elif HAVE_BUILTIN_H
25978 #include <builtin.h>
25979 #endif
25980
25981 #else
25982
25983 #if $cf_cv_header_stdbool_h
25984 #include <stdbool.h>
25985 #endif
25986
25987 #endif
25988
25989 int
25990 main (void)
25991 {
25992 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25993   ;
25994   return 0;
25995 }
25996 _ACEOF
25997 rm -f "conftest.$ac_objext"
25998 if { (eval echo "$as_me:25998: \"$ac_compile\"") >&5
25999   (eval $ac_compile) 2>&5
26000   ac_status=$?
26001   echo "$as_me:26001: \$? = $ac_status" >&5
26002   (exit "$ac_status"); } &&
26003          { ac_try='test -s "conftest.$ac_objext"'
26004   { (eval echo "$as_me:26004: \"$ac_try\"") >&5
26005   (eval $ac_try) 2>&5
26006   ac_status=$?
26007   echo "$as_me:26007: \$? = $ac_status" >&5
26008   (exit "$ac_status"); }; }; then
26009   ac_lo=0 ac_mid=0
26010   while :; do
26011     cat >"conftest.$ac_ext" <<_ACEOF
26012 #line 26012 "configure"
26013 #include "confdefs.h"
26014
26015 #include <stdlib.h>
26016 #include <stdio.h>
26017
26018 #if defined(__cplusplus)
26019
26020 #ifdef HAVE_GXX_BUILTIN_H
26021 #include <g++/builtin.h>
26022 #elif HAVE_GPP_BUILTIN_H
26023 #include <gpp/builtin.h>
26024 #elif HAVE_BUILTIN_H
26025 #include <builtin.h>
26026 #endif
26027
26028 #else
26029
26030 #if $cf_cv_header_stdbool_h
26031 #include <stdbool.h>
26032 #endif
26033
26034 #endif
26035
26036 int
26037 main (void)
26038 {
26039 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26040   ;
26041   return 0;
26042 }
26043 _ACEOF
26044 rm -f "conftest.$ac_objext"
26045 if { (eval echo "$as_me:26045: \"$ac_compile\"") >&5
26046   (eval $ac_compile) 2>&5
26047   ac_status=$?
26048   echo "$as_me:26048: \$? = $ac_status" >&5
26049   (exit "$ac_status"); } &&
26050          { ac_try='test -s "conftest.$ac_objext"'
26051   { (eval echo "$as_me:26051: \"$ac_try\"") >&5
26052   (eval $ac_try) 2>&5
26053   ac_status=$?
26054   echo "$as_me:26054: \$? = $ac_status" >&5
26055   (exit "$ac_status"); }; }; then
26056   ac_hi=$ac_mid; break
26057 else
26058   echo "$as_me: failed program was:" >&5
26059 cat "conftest.$ac_ext" >&5
26060 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26061 fi
26062 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26063   done
26064 else
26065   echo "$as_me: failed program was:" >&5
26066 cat "conftest.$ac_ext" >&5
26067 ac_hi=-1 ac_mid=-1
26068   while :; do
26069     cat >"conftest.$ac_ext" <<_ACEOF
26070 #line 26070 "configure"
26071 #include "confdefs.h"
26072
26073 #include <stdlib.h>
26074 #include <stdio.h>
26075
26076 #if defined(__cplusplus)
26077
26078 #ifdef HAVE_GXX_BUILTIN_H
26079 #include <g++/builtin.h>
26080 #elif HAVE_GPP_BUILTIN_H
26081 #include <gpp/builtin.h>
26082 #elif HAVE_BUILTIN_H
26083 #include <builtin.h>
26084 #endif
26085
26086 #else
26087
26088 #if $cf_cv_header_stdbool_h
26089 #include <stdbool.h>
26090 #endif
26091
26092 #endif
26093
26094 int
26095 main (void)
26096 {
26097 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26098   ;
26099   return 0;
26100 }
26101 _ACEOF
26102 rm -f "conftest.$ac_objext"
26103 if { (eval echo "$as_me:26103: \"$ac_compile\"") >&5
26104   (eval $ac_compile) 2>&5
26105   ac_status=$?
26106   echo "$as_me:26106: \$? = $ac_status" >&5
26107   (exit "$ac_status"); } &&
26108          { ac_try='test -s "conftest.$ac_objext"'
26109   { (eval echo "$as_me:26109: \"$ac_try\"") >&5
26110   (eval $ac_try) 2>&5
26111   ac_status=$?
26112   echo "$as_me:26112: \$? = $ac_status" >&5
26113   (exit "$ac_status"); }; }; then
26114   ac_lo=$ac_mid; break
26115 else
26116   echo "$as_me: failed program was:" >&5
26117 cat "conftest.$ac_ext" >&5
26118 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26119 fi
26120 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26121   done
26122 fi
26123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26124 # Binary search between lo and hi bounds.
26125 while test "x$ac_lo" != "x$ac_hi"; do
26126   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26127   cat >"conftest.$ac_ext" <<_ACEOF
26128 #line 26128 "configure"
26129 #include "confdefs.h"
26130
26131 #include <stdlib.h>
26132 #include <stdio.h>
26133
26134 #if defined(__cplusplus)
26135
26136 #ifdef HAVE_GXX_BUILTIN_H
26137 #include <g++/builtin.h>
26138 #elif HAVE_GPP_BUILTIN_H
26139 #include <gpp/builtin.h>
26140 #elif HAVE_BUILTIN_H
26141 #include <builtin.h>
26142 #endif
26143
26144 #else
26145
26146 #if $cf_cv_header_stdbool_h
26147 #include <stdbool.h>
26148 #endif
26149
26150 #endif
26151
26152 int
26153 main (void)
26154 {
26155 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26156   ;
26157   return 0;
26158 }
26159 _ACEOF
26160 rm -f "conftest.$ac_objext"
26161 if { (eval echo "$as_me:26161: \"$ac_compile\"") >&5
26162   (eval $ac_compile) 2>&5
26163   ac_status=$?
26164   echo "$as_me:26164: \$? = $ac_status" >&5
26165   (exit "$ac_status"); } &&
26166          { ac_try='test -s "conftest.$ac_objext"'
26167   { (eval echo "$as_me:26167: \"$ac_try\"") >&5
26168   (eval $ac_try) 2>&5
26169   ac_status=$?
26170   echo "$as_me:26170: \$? = $ac_status" >&5
26171   (exit "$ac_status"); }; }; then
26172   ac_hi=$ac_mid
26173 else
26174   echo "$as_me: failed program was:" >&5
26175 cat "conftest.$ac_ext" >&5
26176 ac_lo=`expr "$ac_mid" + 1`
26177 fi
26178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26179 done
26180 ac_cv_sizeof_bool=$ac_lo
26181 else
26182   if test "$cross_compiling" = yes; then
26183   { { echo "$as_me:26183: error: cannot run test program while cross compiling" >&5
26184 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26185    { (exit 1); exit 1; }; }
26186 else
26187   cat >"conftest.$ac_ext" <<_ACEOF
26188 #line 26188 "configure"
26189 #include "confdefs.h"
26190
26191 #include <stdlib.h>
26192 #include <stdio.h>
26193
26194 #if defined(__cplusplus)
26195
26196 #ifdef HAVE_GXX_BUILTIN_H
26197 #include <g++/builtin.h>
26198 #elif HAVE_GPP_BUILTIN_H
26199 #include <gpp/builtin.h>
26200 #elif HAVE_BUILTIN_H
26201 #include <builtin.h>
26202 #endif
26203
26204 #else
26205
26206 #if $cf_cv_header_stdbool_h
26207 #include <stdbool.h>
26208 #endif
26209
26210 #endif
26211
26212 int
26213 main (void)
26214 {
26215 FILE *f = fopen ("conftest.val", "w");
26216 if (!f)
26217   $ac_main_return (1);
26218 fprintf (f, "%ld", (long)(sizeof (bool)));
26219 fclose (f);
26220   ;
26221   return 0;
26222 }
26223 _ACEOF
26224 rm -f "conftest$ac_exeext"
26225 if { (eval echo "$as_me:26225: \"$ac_link\"") >&5
26226   (eval $ac_link) 2>&5
26227   ac_status=$?
26228   echo "$as_me:26228: \$? = $ac_status" >&5
26229   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26230   { (eval echo "$as_me:26230: \"$ac_try\"") >&5
26231   (eval $ac_try) 2>&5
26232   ac_status=$?
26233   echo "$as_me:26233: \$? = $ac_status" >&5
26234   (exit "$ac_status"); }; }; then
26235   ac_cv_sizeof_bool=`cat conftest.val`
26236 else
26237   echo "$as_me: program exited with status $ac_status" >&5
26238 echo "$as_me: failed program was:" >&5
26239 cat "conftest.$ac_ext" >&5
26240 fi
26241 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26242 fi
26243 fi
26244 rm -f conftest.val
26245 else
26246   ac_cv_sizeof_bool=0
26247 fi
26248 fi
26249 echo "$as_me:26249: result: $ac_cv_sizeof_bool" >&5
26250 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26251 cat >>confdefs.h <<EOF
26252 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26253 EOF
26254
26255 echo "$as_me:26255: checking for type of bool" >&5
26256 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26257 if test "${cf_cv_type_of_bool+set}" = set; then
26258   echo $ECHO_N "(cached) $ECHO_C" >&6
26259 else
26260
26261         rm -f cf_test.out
26262         if test "$cross_compiling" = yes; then
26263
26264                 case x$ac_cv_sizeof_bool in
26265                 (x1) cf_cv_type_of_bool="unsigned char";;
26266                 (x2) cf_cv_type_of_bool="unsigned short";;
26267                 (x4) cf_cv_type_of_bool="unsigned int";;
26268                 (x8) cf_cv_type_of_bool="unsigned long";;
26269                 (*)  cf_cv_type_of_bool=unknown;;
26270                 esac
26271
26272 else
26273   cat >"conftest.$ac_ext" <<_ACEOF
26274 #line 26274 "configure"
26275 #include "confdefs.h"
26276
26277 #include <stdlib.h>
26278 #include <stdio.h>
26279
26280 #if defined(__cplusplus)
26281
26282 #ifdef HAVE_GXX_BUILTIN_H
26283 #include <g++/builtin.h>
26284 #elif HAVE_GPP_BUILTIN_H
26285 #include <gpp/builtin.h>
26286 #elif HAVE_BUILTIN_H
26287 #include <builtin.h>
26288 #endif
26289
26290 #else
26291
26292 #if $cf_cv_header_stdbool_h
26293 #include <stdbool.h>
26294 #endif
26295
26296 #endif
26297
26298 int main(void)
26299 {
26300         FILE *fp = fopen("cf_test.out", "w");
26301         if (fp != 0) {
26302                 bool x = true;
26303                 if ((bool)(-x) >= 0)
26304                         fputs("unsigned ", fp);
26305                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26306                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26307                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26308                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26309                 fclose(fp);
26310         }
26311         ${cf_cv_main_return:-return}(0);
26312 }
26313
26314 _ACEOF
26315 rm -f "conftest$ac_exeext"
26316 if { (eval echo "$as_me:26316: \"$ac_link\"") >&5
26317   (eval $ac_link) 2>&5
26318   ac_status=$?
26319   echo "$as_me:26319: \$? = $ac_status" >&5
26320   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26321   { (eval echo "$as_me:26321: \"$ac_try\"") >&5
26322   (eval $ac_try) 2>&5
26323   ac_status=$?
26324   echo "$as_me:26324: \$? = $ac_status" >&5
26325   (exit "$ac_status"); }; }; then
26326   cf_cv_type_of_bool=`cat cf_test.out`
26327                  if test -z "$cf_cv_type_of_bool"; then
26328                    cf_cv_type_of_bool=unknown
26329                  fi
26330 else
26331   echo "$as_me: program exited with status $ac_status" >&5
26332 echo "$as_me: failed program was:" >&5
26333 cat "conftest.$ac_ext" >&5
26334 cf_cv_type_of_bool=unknown
26335 fi
26336 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26337 fi
26338         rm -f cf_test.out
26339
26340 fi
26341 echo "$as_me:26341: result: $cf_cv_type_of_bool" >&5
26342 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26343
26344 if test "$cf_cv_type_of_bool" = unknown ; then
26345         case .$NCURSES_BOOL in
26346         (.auto|.) NCURSES_BOOL=unsigned;;
26347         esac
26348         { echo "$as_me:26348: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26349 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26350         cf_cv_type_of_bool=$NCURSES_BOOL
26351 fi
26352
26353 echo "$as_me:26353: checking for special defines needed for etip.h" >&5
26354 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26355 cf_save_CXXFLAGS="$CXXFLAGS"
26356 cf_result="none"
26357
26358 # etip.h includes ncurses.h which includes ncurses_dll.h
26359 # But ncurses_dll.h is generated - fix here.
26360 test -d include || mkdir include
26361 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
26362
26363 for cf_math in "" MATH_H
26364 do
26365 for cf_excp in "" MATH_EXCEPTION
26366 do
26367         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26368         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26369         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26370 cat >"conftest.$ac_ext" <<_ACEOF
26371 #line 26371 "configure"
26372 #include "confdefs.h"
26373
26374 #include <etip.h.in>
26375
26376 int
26377 main (void)
26378 {
26379
26380   ;
26381   return 0;
26382 }
26383 _ACEOF
26384 rm -f "conftest.$ac_objext"
26385 if { (eval echo "$as_me:26385: \"$ac_compile\"") >&5
26386   (eval $ac_compile) 2>&5
26387   ac_status=$?
26388   echo "$as_me:26388: \$? = $ac_status" >&5
26389   (exit "$ac_status"); } &&
26390          { ac_try='test -s "conftest.$ac_objext"'
26391   { (eval echo "$as_me:26391: \"$ac_try\"") >&5
26392   (eval $ac_try) 2>&5
26393   ac_status=$?
26394   echo "$as_me:26394: \$? = $ac_status" >&5
26395   (exit "$ac_status"); }; }; then
26396
26397         test -n "$cf_math" && cat >>confdefs.h <<EOF
26398 #define ETIP_NEEDS_${cf_math} 1
26399 EOF
26400
26401         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26402 #define ETIP_NEEDS_${cf_excp} 1
26403 EOF
26404
26405         cf_result="$cf_math $cf_excp"
26406         break 2
26407
26408 else
26409   echo "$as_me: failed program was:" >&5
26410 cat "conftest.$ac_ext" >&5
26411 fi
26412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26413 done
26414 done
26415 echo "$as_me:26415: result: $cf_result" >&5
26416 echo "${ECHO_T}$cf_result" >&6
26417 CXXFLAGS="$cf_save_CXXFLAGS"
26418
26419 if test -n "$CXX"; then
26420 echo "$as_me:26420: checking if $CXX accepts override keyword" >&5
26421 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26422 if test "${cf_cv_cpp_override+set}" = set; then
26423   echo $ECHO_N "(cached) $ECHO_C" >&6
26424 else
26425
26426         ac_ext=cc
26427 ac_cpp='$CXXCPP $CPPFLAGS'
26428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26429 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26431 ac_main_return="return"
26432
26433         if test "$cross_compiling" = yes; then
26434   cf_cv_cpp_override=unknown
26435 else
26436   cat >"conftest.$ac_ext" <<_ACEOF
26437 #line 26437 "configure"
26438 #include "confdefs.h"
26439
26440 class base
26441 {
26442 public:
26443         virtual int foo(float x) = 0;
26444 };
26445
26446 class derived: public base
26447 {
26448 public:
26449         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26450 };
26451
26452 int main(void) { }
26453
26454 _ACEOF
26455 rm -f "conftest$ac_exeext"
26456 if { (eval echo "$as_me:26456: \"$ac_link\"") >&5
26457   (eval $ac_link) 2>&5
26458   ac_status=$?
26459   echo "$as_me:26459: \$? = $ac_status" >&5
26460   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26461   { (eval echo "$as_me:26461: \"$ac_try\"") >&5
26462   (eval $ac_try) 2>&5
26463   ac_status=$?
26464   echo "$as_me:26464: \$? = $ac_status" >&5
26465   (exit "$ac_status"); }; }; then
26466   cf_cv_cpp_override=yes
26467 else
26468   echo "$as_me: program exited with status $ac_status" >&5
26469 echo "$as_me: failed program was:" >&5
26470 cat "conftest.$ac_ext" >&5
26471 cf_cv_cpp_override=no
26472 fi
26473 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26474 fi
26475         ac_ext=cc
26476 ac_cpp='$CXXCPP $CPPFLAGS'
26477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26478 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26480 ac_main_return="return"
26481
26482 fi
26483 echo "$as_me:26483: result: $cf_cv_cpp_override" >&5
26484 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26485 fi
26486 test "$cf_cv_cpp_override" = yes &&
26487 cat >>confdefs.h <<\EOF
26488 #define CPP_HAS_OVERRIDE 1
26489 EOF
26490
26491 if test -n "$CXX"; then
26492 echo "$as_me:26492: checking if $CXX accepts parameter initialization" >&5
26493 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26494 if test "${cf_cv_cpp_param_init+set}" = set; then
26495   echo $ECHO_N "(cached) $ECHO_C" >&6
26496 else
26497
26498         ac_ext=cc
26499 ac_cpp='$CXXCPP $CPPFLAGS'
26500 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26501 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26502 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26503 ac_main_return="return"
26504
26505         if test "$cross_compiling" = yes; then
26506   cf_cv_cpp_param_init=unknown
26507 else
26508   cat >"conftest.$ac_ext" <<_ACEOF
26509 #line 26509 "configure"
26510 #include "confdefs.h"
26511
26512 class TEST {
26513 private:
26514         int value;
26515 public:
26516         TEST(int x = 1);
26517         ~TEST();
26518 };
26519
26520 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26521 {
26522         value = x;
26523 }
26524 int main(void) { }
26525
26526 _ACEOF
26527 rm -f "conftest$ac_exeext"
26528 if { (eval echo "$as_me:26528: \"$ac_link\"") >&5
26529   (eval $ac_link) 2>&5
26530   ac_status=$?
26531   echo "$as_me:26531: \$? = $ac_status" >&5
26532   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26533   { (eval echo "$as_me:26533: \"$ac_try\"") >&5
26534   (eval $ac_try) 2>&5
26535   ac_status=$?
26536   echo "$as_me:26536: \$? = $ac_status" >&5
26537   (exit "$ac_status"); }; }; then
26538   cf_cv_cpp_param_init=yes
26539 else
26540   echo "$as_me: program exited with status $ac_status" >&5
26541 echo "$as_me: failed program was:" >&5
26542 cat "conftest.$ac_ext" >&5
26543 cf_cv_cpp_param_init=no
26544 fi
26545 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26546 fi
26547         ac_ext=cc
26548 ac_cpp='$CXXCPP $CPPFLAGS'
26549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26550 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26552 ac_main_return="return"
26553
26554 fi
26555 echo "$as_me:26555: result: $cf_cv_cpp_param_init" >&5
26556 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26557 fi
26558 test "$cf_cv_cpp_param_init" = yes &&
26559 cat >>confdefs.h <<\EOF
26560 #define CPP_HAS_PARAM_INIT 1
26561 EOF
26562
26563 if test -n "$CXX"; then
26564
26565 echo "$as_me:26565: checking if $CXX accepts static_cast" >&5
26566 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26567 if test "${cf_cv_cpp_static_cast+set}" = set; then
26568   echo $ECHO_N "(cached) $ECHO_C" >&6
26569 else
26570
26571         ac_ext=cc
26572 ac_cpp='$CXXCPP $CPPFLAGS'
26573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26574 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26576 ac_main_return="return"
26577
26578         cat >"conftest.$ac_ext" <<_ACEOF
26579 #line 26579 "configure"
26580 #include "confdefs.h"
26581
26582 class NCursesPanel
26583 {
26584 public:
26585   NCursesPanel(int nlines,
26586                int ncols,
26587                int begin_y = 0,
26588                int begin_x = 0)
26589   {
26590   }
26591   NCursesPanel();
26592   ~NCursesPanel();
26593 };
26594
26595 template<class T> class NCursesUserPanel : public NCursesPanel
26596 {
26597 public:
26598   NCursesUserPanel (int nlines,
26599                     int ncols,
26600                     int begin_y = 0,
26601                     int begin_x = 0,
26602                     const T* p_UserData = static_cast<T*>(0))
26603     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26604   {
26605   };
26606   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26607   {
26608   };
26609
26610   virtual ~NCursesUserPanel() {};
26611 };
26612
26613 int
26614 main (void)
26615 {
26616
26617         const char* p_UserData = static_cast<char*>(0)
26618   ;
26619   return 0;
26620 }
26621 _ACEOF
26622 rm -f "conftest.$ac_objext"
26623 if { (eval echo "$as_me:26623: \"$ac_compile\"") >&5
26624   (eval $ac_compile) 2>&5
26625   ac_status=$?
26626   echo "$as_me:26626: \$? = $ac_status" >&5
26627   (exit "$ac_status"); } &&
26628          { ac_try='test -s "conftest.$ac_objext"'
26629   { (eval echo "$as_me:26629: \"$ac_try\"") >&5
26630   (eval $ac_try) 2>&5
26631   ac_status=$?
26632   echo "$as_me:26632: \$? = $ac_status" >&5
26633   (exit "$ac_status"); }; }; then
26634   cf_cv_cpp_static_cast=yes
26635 else
26636   echo "$as_me: failed program was:" >&5
26637 cat "conftest.$ac_ext" >&5
26638 cf_cv_cpp_static_cast=no
26639 fi
26640 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26641
26642         ac_ext=cc
26643 ac_cpp='$CXXCPP $CPPFLAGS'
26644 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26645 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26646 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26647 ac_main_return="return"
26648
26649 fi
26650 echo "$as_me:26650: result: $cf_cv_cpp_static_cast" >&5
26651 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26652
26653 fi
26654
26655 test "$cf_cv_cpp_static_cast" = yes &&
26656 cat >>confdefs.h <<\EOF
26657 #define CPP_HAS_STATIC_CAST 1
26658 EOF
26659
26660         CXX_AR='$(AR)'
26661         CXX_ARFLAGS='$(ARFLAGS)'
26662         case "$cf_cv_system_name" in
26663         (irix*)
26664             if test "$GXX" != yes ; then
26665                 CXX_AR='$(CXX)'
26666                 CXX_ARFLAGS='-ar -o'
26667             fi
26668             ;;
26669         (sco3.2v5*)
26670             CXXLDFLAGS="-u main"
26671             ;;
26672         (solaris2*)
26673             if test "$GXX" != yes ; then
26674                 CXX_AR='$(CXX)'
26675                 CXX_ARFLAGS='-xar -o'
26676             fi
26677             ;;
26678         esac
26679
26680 else
26681         cf_cxx_library=no
26682         cf_cv_builtin_bool=1
26683
26684         # Just because we are not configuring against C++ right now does not
26685         # mean that a user will not want to use C++.  Some distributors disable
26686         # the C++ portion of this configuration as a shortcut (or just to avoid
26687         # compiling the demo in the c++ directory).  So we need a reasonable
26688         # default for the 'bool' type.
26689         #
26690         # Caveat: since the storage of the bool type is not standardized, it
26691         # may change.
26692
26693         if test "$NCURSES_BOOL" != auto ; then
26694                 cf_cv_type_of_bool=$NCURSES_BOOL
26695                 cf_cv_header_stdbool_h=0
26696         else
26697                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26698
26699 echo "$as_me:26699: checking for bool" >&5
26700 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26701 if test "${ac_cv_type_bool+set}" = set; then
26702   echo $ECHO_N "(cached) $ECHO_C" >&6
26703 else
26704   cat >"conftest.$ac_ext" <<_ACEOF
26705 #line 26705 "configure"
26706 #include "confdefs.h"
26707
26708 #include <stdlib.h>
26709 #include <stdio.h>
26710
26711 #if defined(__cplusplus)
26712
26713 #ifdef HAVE_GXX_BUILTIN_H
26714 #include <g++/builtin.h>
26715 #elif HAVE_GPP_BUILTIN_H
26716 #include <gpp/builtin.h>
26717 #elif HAVE_BUILTIN_H
26718 #include <builtin.h>
26719 #endif
26720
26721 #else
26722
26723 #if $cf_cv_header_stdbool_h
26724 #include <stdbool.h>
26725 #endif
26726
26727 #endif
26728
26729 int
26730 main (void)
26731 {
26732 if ((bool *) 0)
26733   return 0;
26734 if (sizeof (bool))
26735   return 0;
26736   ;
26737   return 0;
26738 }
26739 _ACEOF
26740 rm -f "conftest.$ac_objext"
26741 if { (eval echo "$as_me:26741: \"$ac_compile\"") >&5
26742   (eval $ac_compile) 2>&5
26743   ac_status=$?
26744   echo "$as_me:26744: \$? = $ac_status" >&5
26745   (exit "$ac_status"); } &&
26746          { ac_try='test -s "conftest.$ac_objext"'
26747   { (eval echo "$as_me:26747: \"$ac_try\"") >&5
26748   (eval $ac_try) 2>&5
26749   ac_status=$?
26750   echo "$as_me:26750: \$? = $ac_status" >&5
26751   (exit "$ac_status"); }; }; then
26752   ac_cv_type_bool=yes
26753 else
26754   echo "$as_me: failed program was:" >&5
26755 cat "conftest.$ac_ext" >&5
26756 ac_cv_type_bool=no
26757 fi
26758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26759 fi
26760 echo "$as_me:26760: result: $ac_cv_type_bool" >&5
26761 echo "${ECHO_T}$ac_cv_type_bool" >&6
26762
26763 echo "$as_me:26763: checking size of bool" >&5
26764 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26765 if test "${ac_cv_sizeof_bool+set}" = set; then
26766   echo $ECHO_N "(cached) $ECHO_C" >&6
26767 else
26768   if test "$ac_cv_type_bool" = yes; then
26769   if test "$cross_compiling" = yes; then
26770   # Depending upon the size, compute the lo and hi bounds.
26771 cat >"conftest.$ac_ext" <<_ACEOF
26772 #line 26772 "configure"
26773 #include "confdefs.h"
26774
26775 #include <stdlib.h>
26776 #include <stdio.h>
26777
26778 #if defined(__cplusplus)
26779
26780 #ifdef HAVE_GXX_BUILTIN_H
26781 #include <g++/builtin.h>
26782 #elif HAVE_GPP_BUILTIN_H
26783 #include <gpp/builtin.h>
26784 #elif HAVE_BUILTIN_H
26785 #include <builtin.h>
26786 #endif
26787
26788 #else
26789
26790 #if $cf_cv_header_stdbool_h
26791 #include <stdbool.h>
26792 #endif
26793
26794 #endif
26795
26796 int
26797 main (void)
26798 {
26799 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26800   ;
26801   return 0;
26802 }
26803 _ACEOF
26804 rm -f "conftest.$ac_objext"
26805 if { (eval echo "$as_me:26805: \"$ac_compile\"") >&5
26806   (eval $ac_compile) 2>&5
26807   ac_status=$?
26808   echo "$as_me:26808: \$? = $ac_status" >&5
26809   (exit "$ac_status"); } &&
26810          { ac_try='test -s "conftest.$ac_objext"'
26811   { (eval echo "$as_me:26811: \"$ac_try\"") >&5
26812   (eval $ac_try) 2>&5
26813   ac_status=$?
26814   echo "$as_me:26814: \$? = $ac_status" >&5
26815   (exit "$ac_status"); }; }; then
26816   ac_lo=0 ac_mid=0
26817   while :; do
26818     cat >"conftest.$ac_ext" <<_ACEOF
26819 #line 26819 "configure"
26820 #include "confdefs.h"
26821
26822 #include <stdlib.h>
26823 #include <stdio.h>
26824
26825 #if defined(__cplusplus)
26826
26827 #ifdef HAVE_GXX_BUILTIN_H
26828 #include <g++/builtin.h>
26829 #elif HAVE_GPP_BUILTIN_H
26830 #include <gpp/builtin.h>
26831 #elif HAVE_BUILTIN_H
26832 #include <builtin.h>
26833 #endif
26834
26835 #else
26836
26837 #if $cf_cv_header_stdbool_h
26838 #include <stdbool.h>
26839 #endif
26840
26841 #endif
26842
26843 int
26844 main (void)
26845 {
26846 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26847   ;
26848   return 0;
26849 }
26850 _ACEOF
26851 rm -f "conftest.$ac_objext"
26852 if { (eval echo "$as_me:26852: \"$ac_compile\"") >&5
26853   (eval $ac_compile) 2>&5
26854   ac_status=$?
26855   echo "$as_me:26855: \$? = $ac_status" >&5
26856   (exit "$ac_status"); } &&
26857          { ac_try='test -s "conftest.$ac_objext"'
26858   { (eval echo "$as_me:26858: \"$ac_try\"") >&5
26859   (eval $ac_try) 2>&5
26860   ac_status=$?
26861   echo "$as_me:26861: \$? = $ac_status" >&5
26862   (exit "$ac_status"); }; }; then
26863   ac_hi=$ac_mid; break
26864 else
26865   echo "$as_me: failed program was:" >&5
26866 cat "conftest.$ac_ext" >&5
26867 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26868 fi
26869 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26870   done
26871 else
26872   echo "$as_me: failed program was:" >&5
26873 cat "conftest.$ac_ext" >&5
26874 ac_hi=-1 ac_mid=-1
26875   while :; do
26876     cat >"conftest.$ac_ext" <<_ACEOF
26877 #line 26877 "configure"
26878 #include "confdefs.h"
26879
26880 #include <stdlib.h>
26881 #include <stdio.h>
26882
26883 #if defined(__cplusplus)
26884
26885 #ifdef HAVE_GXX_BUILTIN_H
26886 #include <g++/builtin.h>
26887 #elif HAVE_GPP_BUILTIN_H
26888 #include <gpp/builtin.h>
26889 #elif HAVE_BUILTIN_H
26890 #include <builtin.h>
26891 #endif
26892
26893 #else
26894
26895 #if $cf_cv_header_stdbool_h
26896 #include <stdbool.h>
26897 #endif
26898
26899 #endif
26900
26901 int
26902 main (void)
26903 {
26904 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26905   ;
26906   return 0;
26907 }
26908 _ACEOF
26909 rm -f "conftest.$ac_objext"
26910 if { (eval echo "$as_me:26910: \"$ac_compile\"") >&5
26911   (eval $ac_compile) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit "$ac_status"); } &&
26915          { ac_try='test -s "conftest.$ac_objext"'
26916   { (eval echo "$as_me:26916: \"$ac_try\"") >&5
26917   (eval $ac_try) 2>&5
26918   ac_status=$?
26919   echo "$as_me:26919: \$? = $ac_status" >&5
26920   (exit "$ac_status"); }; }; then
26921   ac_lo=$ac_mid; break
26922 else
26923   echo "$as_me: failed program was:" >&5
26924 cat "conftest.$ac_ext" >&5
26925 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26926 fi
26927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26928   done
26929 fi
26930 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26931 # Binary search between lo and hi bounds.
26932 while test "x$ac_lo" != "x$ac_hi"; do
26933   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26934   cat >"conftest.$ac_ext" <<_ACEOF
26935 #line 26935 "configure"
26936 #include "confdefs.h"
26937
26938 #include <stdlib.h>
26939 #include <stdio.h>
26940
26941 #if defined(__cplusplus)
26942
26943 #ifdef HAVE_GXX_BUILTIN_H
26944 #include <g++/builtin.h>
26945 #elif HAVE_GPP_BUILTIN_H
26946 #include <gpp/builtin.h>
26947 #elif HAVE_BUILTIN_H
26948 #include <builtin.h>
26949 #endif
26950
26951 #else
26952
26953 #if $cf_cv_header_stdbool_h
26954 #include <stdbool.h>
26955 #endif
26956
26957 #endif
26958
26959 int
26960 main (void)
26961 {
26962 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26963   ;
26964   return 0;
26965 }
26966 _ACEOF
26967 rm -f "conftest.$ac_objext"
26968 if { (eval echo "$as_me:26968: \"$ac_compile\"") >&5
26969   (eval $ac_compile) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); } &&
26973          { ac_try='test -s "conftest.$ac_objext"'
26974   { (eval echo "$as_me:26974: \"$ac_try\"") >&5
26975   (eval $ac_try) 2>&5
26976   ac_status=$?
26977   echo "$as_me:26977: \$? = $ac_status" >&5
26978   (exit "$ac_status"); }; }; then
26979   ac_hi=$ac_mid
26980 else
26981   echo "$as_me: failed program was:" >&5
26982 cat "conftest.$ac_ext" >&5
26983 ac_lo=`expr "$ac_mid" + 1`
26984 fi
26985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26986 done
26987 ac_cv_sizeof_bool=$ac_lo
26988 else
26989   if test "$cross_compiling" = yes; then
26990   { { echo "$as_me:26990: error: cannot run test program while cross compiling" >&5
26991 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26992    { (exit 1); exit 1; }; }
26993 else
26994   cat >"conftest.$ac_ext" <<_ACEOF
26995 #line 26995 "configure"
26996 #include "confdefs.h"
26997
26998 #include <stdlib.h>
26999 #include <stdio.h>
27000
27001 #if defined(__cplusplus)
27002
27003 #ifdef HAVE_GXX_BUILTIN_H
27004 #include <g++/builtin.h>
27005 #elif HAVE_GPP_BUILTIN_H
27006 #include <gpp/builtin.h>
27007 #elif HAVE_BUILTIN_H
27008 #include <builtin.h>
27009 #endif
27010
27011 #else
27012
27013 #if $cf_cv_header_stdbool_h
27014 #include <stdbool.h>
27015 #endif
27016
27017 #endif
27018
27019 int
27020 main (void)
27021 {
27022 FILE *f = fopen ("conftest.val", "w");
27023 if (!f)
27024   $ac_main_return (1);
27025 fprintf (f, "%ld", (long)(sizeof (bool)));
27026 fclose (f);
27027   ;
27028   return 0;
27029 }
27030 _ACEOF
27031 rm -f "conftest$ac_exeext"
27032 if { (eval echo "$as_me:27032: \"$ac_link\"") >&5
27033   (eval $ac_link) 2>&5
27034   ac_status=$?
27035   echo "$as_me:27035: \$? = $ac_status" >&5
27036   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27037   { (eval echo "$as_me:27037: \"$ac_try\"") >&5
27038   (eval $ac_try) 2>&5
27039   ac_status=$?
27040   echo "$as_me:27040: \$? = $ac_status" >&5
27041   (exit "$ac_status"); }; }; then
27042   ac_cv_sizeof_bool=`cat conftest.val`
27043 else
27044   echo "$as_me: program exited with status $ac_status" >&5
27045 echo "$as_me: failed program was:" >&5
27046 cat "conftest.$ac_ext" >&5
27047 fi
27048 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27049 fi
27050 fi
27051 rm -f conftest.val
27052 else
27053   ac_cv_sizeof_bool=0
27054 fi
27055 fi
27056 echo "$as_me:27056: result: $ac_cv_sizeof_bool" >&5
27057 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27058 cat >>confdefs.h <<EOF
27059 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27060 EOF
27061
27062 echo "$as_me:27062: checking for type of bool" >&5
27063 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27064 if test "${cf_cv_type_of_bool+set}" = set; then
27065   echo $ECHO_N "(cached) $ECHO_C" >&6
27066 else
27067
27068         rm -f cf_test.out
27069         if test "$cross_compiling" = yes; then
27070
27071                 case x$ac_cv_sizeof_bool in
27072                 (x1) cf_cv_type_of_bool="unsigned char";;
27073                 (x2) cf_cv_type_of_bool="unsigned short";;
27074                 (x4) cf_cv_type_of_bool="unsigned int";;
27075                 (x8) cf_cv_type_of_bool="unsigned long";;
27076                 (*)  cf_cv_type_of_bool=unknown;;
27077                 esac
27078
27079 else
27080   cat >"conftest.$ac_ext" <<_ACEOF
27081 #line 27081 "configure"
27082 #include "confdefs.h"
27083
27084 #include <stdlib.h>
27085 #include <stdio.h>
27086
27087 #if defined(__cplusplus)
27088
27089 #ifdef HAVE_GXX_BUILTIN_H
27090 #include <g++/builtin.h>
27091 #elif HAVE_GPP_BUILTIN_H
27092 #include <gpp/builtin.h>
27093 #elif HAVE_BUILTIN_H
27094 #include <builtin.h>
27095 #endif
27096
27097 #else
27098
27099 #if $cf_cv_header_stdbool_h
27100 #include <stdbool.h>
27101 #endif
27102
27103 #endif
27104
27105 int main(void)
27106 {
27107         FILE *fp = fopen("cf_test.out", "w");
27108         if (fp != 0) {
27109                 bool x = true;
27110                 if ((bool)(-x) >= 0)
27111                         fputs("unsigned ", fp);
27112                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27113                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27114                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27115                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27116                 fclose(fp);
27117         }
27118         ${cf_cv_main_return:-return}(0);
27119 }
27120
27121 _ACEOF
27122 rm -f "conftest$ac_exeext"
27123 if { (eval echo "$as_me:27123: \"$ac_link\"") >&5
27124   (eval $ac_link) 2>&5
27125   ac_status=$?
27126   echo "$as_me:27126: \$? = $ac_status" >&5
27127   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27128   { (eval echo "$as_me:27128: \"$ac_try\"") >&5
27129   (eval $ac_try) 2>&5
27130   ac_status=$?
27131   echo "$as_me:27131: \$? = $ac_status" >&5
27132   (exit "$ac_status"); }; }; then
27133   cf_cv_type_of_bool=`cat cf_test.out`
27134                  if test -z "$cf_cv_type_of_bool"; then
27135                    cf_cv_type_of_bool=unknown
27136                  fi
27137 else
27138   echo "$as_me: program exited with status $ac_status" >&5
27139 echo "$as_me: failed program was:" >&5
27140 cat "conftest.$ac_ext" >&5
27141 cf_cv_type_of_bool=unknown
27142 fi
27143 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27144 fi
27145         rm -f cf_test.out
27146
27147 fi
27148 echo "$as_me:27148: result: $cf_cv_type_of_bool" >&5
27149 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27150
27151 if test "$cf_cv_type_of_bool" = unknown ; then
27152         case .$NCURSES_BOOL in
27153         (.auto|.) NCURSES_BOOL=unsigned;;
27154         esac
27155         { echo "$as_me:27155: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27156 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27157         cf_cv_type_of_bool=$NCURSES_BOOL
27158 fi
27159
27160                 else
27161                         echo "$as_me:27161: checking for fallback type of bool" >&5
27162 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27163                         case "$host_cpu" in
27164                         (i?86)  cf_cv_type_of_bool=char ;;
27165                         (*)     cf_cv_type_of_bool=int  ;;
27166                         esac
27167                         echo "$as_me:27167: result: $cf_cv_type_of_bool" >&5
27168 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27169                 fi
27170         fi
27171 fi
27172
27173 # If the C compiler did not declare bool, and we did not determine that the C++
27174 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27175 # ncurses library use the same type as C++ bool.  Note that this allows one to
27176 # specify the type of bool in a configure-script option and postpone
27177 # integration with the C++ compiler provided that the types are compatible.
27178 USE_CXX_BOOL=1
27179 if test "$cf_cv_cc_bool_type" = 1
27180 then
27181         # oops: C has a bool.  Unlikely, but C++ could differ.
27182         USE_CXX_BOOL=0
27183 elif test "$cf_cv_builtin_bool" = 0
27184 then
27185         # C++ has no bool
27186         USE_CXX_BOOL=0
27187 else
27188         # this is the normal case
27189         USE_CXX_BOOL='defined(__cplusplus)'
27190 fi
27191
27192 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27193
27194         if test "$cf_with_ada" != "no" ; then
27195                 if test "$with_libtool" != "no"; then
27196                         { echo "$as_me:27196: WARNING: libtool does not support Ada - disabling feature" >&5
27197 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27198                         cf_with_ada=no
27199                 fi
27200         fi
27201
27202         if test "$cf_with_ada" != "no" ; then
27203
27204 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27205 do
27206
27207 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27208
27209         unset ac_cv_path_cf_TEMP_gnat
27210         unset cf_TEMP_gnat
27211         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27212 set dummy $cf_prog_gnat; ac_word=$2
27213 echo "$as_me:27213: checking for $ac_word" >&5
27214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27215 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27216   echo $ECHO_N "(cached) $ECHO_C" >&6
27217 else
27218   case $cf_TEMP_gnat in
27219   [\\/]* | ?:[\\/]*)
27220   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27221   ;;
27222   *)
27223   ac_save_IFS=$IFS; IFS=$ac_path_separator
27224 ac_dummy="$PATH"
27225 for ac_dir in $ac_dummy; do
27226   IFS=$ac_save_IFS
27227   test -z "$ac_dir" && ac_dir=.
27228   if $as_executable_p "$ac_dir/$ac_word"; then
27229    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27230    echo "$as_me:27230: found $ac_dir/$ac_word" >&5
27231    break
27232 fi
27233 done
27234
27235   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27236   ;;
27237 esac
27238 fi
27239 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27240
27241 if test -n "$cf_TEMP_gnat"; then
27242   echo "$as_me:27242: result: $cf_TEMP_gnat" >&5
27243 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27244 else
27245   echo "$as_me:27245: result: no" >&5
27246 echo "${ECHO_T}no" >&6
27247 fi
27248
27249         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27250
27251         if test "x$cf_TEMP_gnat" != xno; then
27252                 unset cf_cv_gnat_version
27253                 unset cf_TEMP_gnat
27254
27255 echo "$as_me:27255: checking for $cf_prog_gnat version" >&5
27256 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27257 if test "${cf_cv_gnat_version+set}" = set; then
27258   echo $ECHO_N "(cached) $ECHO_C" >&6
27259 else
27260
27261 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27262         grep '[0-9].[0-9][0-9]*' |\
27263         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27264
27265 fi
27266 echo "$as_me:27266: result: $cf_cv_gnat_version" >&5
27267 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27268 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27269 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27270
27271         fi
27272         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27273
27274         unset cf_TEMP_gnat
27275         unset cf_cv_gnat_version
27276         unset ac_cv_path_cf_TEMP_gnat
27277 done
27278
27279 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27280         cf_ada_make=
27281         cf_cv_prog_gnat_correct=no
27282 else
27283         cf_ada_make=gnatmake
27284         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27285                 # gprconfig is newer than gnatmake; we can continue...
27286                 cf_ada_config="##"
27287         else
27288                 rm -rf ./conftest* ./*~conftest*
27289                 if mkdir conftest.src
27290                 then
27291                         cf_ada_config=""
27292                         cd conftest.src
27293                         for cf_gprconfig in Ada C
27294                         do
27295                                 echo "$as_me:27295: checking for gprconfig name for $cf_gprconfig" >&5
27296 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27297                                 if test "$cf_gprconfig" = C
27298                                 then
27299                                         for cf_gprconfig_param in \
27300                                                 "$cf_gprconfig,,,,GNATGCC" \
27301                                                 "$cf_gprconfig,,,,GCC" \
27302                                                 "$cf_gprconfig"
27303                                         do
27304                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27305                                                 test -n "$cf_gprconfig_value" && break
27306                                         done
27307                                 else
27308                                         cf_gprconfig_param=$cf_gprconfig
27309                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27310                                 fi
27311                                 if test -n "$cf_gprconfig_value"
27312                                 then
27313                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27314                                         echo "$as_me:27314: result: $cf_gprconfig_value" >&5
27315 echo "${ECHO_T}$cf_gprconfig_value" >&6
27316                                 else
27317                                         echo "$as_me:27317: result: missing" >&5
27318 echo "${ECHO_T}missing" >&6
27319                                         cf_ada_config="#"
27320                                         break
27321                                 fi
27322                         done
27323                         cd ..
27324                         rm -rf ./conftest* ./*~conftest*
27325                 fi
27326         fi
27327         if test "x$cf_ada_config" != "x#"
27328         then
27329
27330 echo "$as_me:27330: checking for gnat version" >&5
27331 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27332 if test "${cf_cv_gnat_version+set}" = set; then
27333   echo $ECHO_N "(cached) $ECHO_C" >&6
27334 else
27335
27336 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27337         grep '[0-9].[0-9][0-9]*' |\
27338         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27339
27340 fi
27341 echo "$as_me:27341: result: $cf_cv_gnat_version" >&5
27342 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27343 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27344
27345 case "$cf_cv_gnat_version" in
27346 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27347         cf_cv_prog_gnat_correct=yes
27348         ;;
27349 (*)
27350         { echo "$as_me:27350: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27351 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27352         cf_cv_prog_gnat_correct=no
27353         ;;
27354 esac
27355
27356                 # Extract the first word of "m4", so it can be a program name with args.
27357 set dummy m4; ac_word=$2
27358 echo "$as_me:27358: checking for $ac_word" >&5
27359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27360 if test "${ac_cv_prog_M4_exists+set}" = set; then
27361   echo $ECHO_N "(cached) $ECHO_C" >&6
27362 else
27363   if test -n "$M4_exists"; then
27364   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27365 else
27366   ac_save_IFS=$IFS; IFS=$ac_path_separator
27367 ac_dummy="$PATH"
27368 for ac_dir in $ac_dummy; do
27369   IFS=$ac_save_IFS
27370   test -z "$ac_dir" && ac_dir=.
27371   $as_executable_p "$ac_dir/$ac_word" || continue
27372 ac_cv_prog_M4_exists="yes"
27373 echo "$as_me:27373: found $ac_dir/$ac_word" >&5
27374 break
27375 done
27376
27377   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27378 fi
27379 fi
27380 M4_exists=$ac_cv_prog_M4_exists
27381 if test -n "$M4_exists"; then
27382   echo "$as_me:27382: result: $M4_exists" >&5
27383 echo "${ECHO_T}$M4_exists" >&6
27384 else
27385   echo "$as_me:27385: result: no" >&5
27386 echo "${ECHO_T}no" >&6
27387 fi
27388
27389                 if test "$ac_cv_prog_M4_exists" = no; then
27390                         cf_cv_prog_gnat_correct=no
27391                         { echo "$as_me:27391: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27392 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27393                 fi
27394                 if test "$cf_cv_prog_gnat_correct" = yes; then
27395                         echo "$as_me:27395: checking if GNAT works" >&5
27396 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27397
27398 rm -rf ./conftest* ./*~conftest*
27399 cat >>conftest.ads <<CF_EOF
27400 procedure conftest;
27401 CF_EOF
27402 cat >>conftest.adb <<CF_EOF
27403 with Text_IO;
27404 with GNAT.OS_Lib;
27405 procedure conftest is
27406 begin
27407    Text_IO.Put ("Hello World");
27408    Text_IO.New_Line;
27409    GNAT.OS_Lib.OS_Exit (0);
27410 end conftest;
27411 CF_EOF
27412 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27413    if ( ./conftest 1>&5 2>&1 ) ; then
27414       cf_cv_prog_gnat_correct=yes
27415    else
27416       cf_cv_prog_gnat_correct=no
27417    fi
27418 else
27419    cf_cv_prog_gnat_correct=no
27420 fi
27421 rm -rf ./conftest* ./*~conftest*
27422
27423                         echo "$as_me:27423: result: $cf_cv_prog_gnat_correct" >&5
27424 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27425                 fi
27426         else
27427                 cf_cv_prog_gnat_correct=no
27428         fi
27429 fi
27430
27431                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27432
27433         ADAFLAGS="$ADAFLAGS -gnatpn"
27434
27435         echo "$as_me:27435: checking optimization options for ADAFLAGS" >&5
27436 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27437         case "$CFLAGS" in
27438         (*-g*)
27439
27440         ADAFLAGS="$ADAFLAGS -g"
27441
27442                 ;;
27443         esac
27444         case "$CFLAGS" in
27445         (*-O*)
27446                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27447
27448         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27449
27450                 ;;
27451         esac
27452         echo "$as_me:27452: result: $ADAFLAGS" >&5
27453 echo "${ECHO_T}$ADAFLAGS" >&6
27454
27455 echo "$as_me:27455: checking if GNATPREP supports -T option" >&5
27456 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27457 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27458   echo $ECHO_N "(cached) $ECHO_C" >&6
27459 else
27460
27461 cf_cv_gnatprep_opt_t=no
27462 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27463
27464 fi
27465 echo "$as_me:27465: result: $cf_cv_gnatprep_opt_t" >&5
27466 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27467 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27468
27469 echo "$as_me:27469: checking if GNAT supports generics" >&5
27470 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27471 case "$cf_cv_gnat_version" in
27472 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27473         cf_gnat_generics=yes
27474         ;;
27475 (*)
27476         cf_gnat_generics=no
27477         ;;
27478 esac
27479 echo "$as_me:27479: result: $cf_gnat_generics" >&5
27480 echo "${ECHO_T}$cf_gnat_generics" >&6
27481
27482 if test "$cf_gnat_generics" = yes
27483 then
27484         cf_compile_generics=generics
27485         cf_generic_objects="\${GENOBJS}"
27486 else
27487         cf_compile_generics=
27488         cf_generic_objects=
27489 fi
27490
27491 echo "$as_me:27491: checking if GNAT supports SIGINT" >&5
27492 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27493 if test "${cf_cv_gnat_sigint+set}" = set; then
27494   echo $ECHO_N "(cached) $ECHO_C" >&6
27495 else
27496
27497 rm -rf ./conftest* ./*~conftest*
27498 cat >>conftest.ads <<CF_EOF
27499 with Ada.Interrupts.Names;
27500
27501 package ConfTest is
27502
27503    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27504    pragma Unreserve_All_Interrupts;
27505    pragma Warnings (On);
27506
27507    protected Process is
27508       procedure Stop;
27509       function Continue return Boolean;
27510       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27511    private
27512       Done : Boolean := False;
27513    end Process;
27514
27515 end ConfTest;
27516 CF_EOF
27517 cat >>conftest.adb <<CF_EOF
27518 package body ConfTest is
27519    protected body Process is
27520       procedure Stop is
27521       begin
27522          Done := True;
27523       end Stop;
27524       function Continue return Boolean is
27525       begin
27526          return not Done;
27527       end Continue;
27528    end Process;
27529 end ConfTest;
27530 CF_EOF
27531 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27532       cf_cv_gnat_sigint=yes
27533 else
27534    cf_cv_gnat_sigint=no
27535 fi
27536 rm -rf ./conftest* ./*~conftest*
27537
27538 fi
27539 echo "$as_me:27539: result: $cf_cv_gnat_sigint" >&5
27540 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27541
27542 if test "$cf_cv_gnat_sigint" = yes ; then
27543         USE_GNAT_SIGINT=""
27544 else
27545         USE_GNAT_SIGINT="#"
27546 fi
27547
27548 cf_gnat_libraries=no
27549 cf_gnat_projects=no
27550
27551 if test "$enable_gnat_projects" != no ; then
27552 echo "$as_me:27552: checking if GNAT supports project files" >&5
27553 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27554 case "$cf_cv_gnat_version" in
27555 (3.[0-9]*)
27556         ;;
27557 (*)
27558         case "$cf_cv_system_name" in
27559         (cygwin*|msys*)
27560                 ;;
27561         (*)
27562                 rm -rf ./conftest* ./*~conftest*
27563                 if mkdir conftest.src conftest.bin conftest.lib
27564                 then
27565                         cd conftest.src
27566                         rm -rf ./conftest* ./*~conftest*
27567                         cat >>library.gpr <<CF_EOF
27568 project Library is
27569   Kind := External ("LIB_KIND");
27570   for Library_Name use "ConfTest";
27571   for Object_Dir use ".";
27572   for Library_ALI_Dir use External("LIBRARY_DIR");
27573   for Library_Version use External ("SONAME");
27574   for Library_Kind use Kind;
27575   for Library_Dir use External("BUILD_DIR");
27576   Source_Dir := External ("SOURCE_DIR");
27577   for Source_Dirs use (Source_Dir);
27578 end Library;
27579 CF_EOF
27580                         cat >>confpackage.ads <<CF_EOF
27581 package ConfPackage is
27582    procedure conftest;
27583 end ConfPackage;
27584 CF_EOF
27585                         cat >>confpackage.adb <<CF_EOF
27586 with Text_IO;
27587 package body ConfPackage is
27588    procedure conftest is
27589    begin
27590       Text_IO.Put ("Hello World");
27591       Text_IO.New_Line;
27592    end conftest;
27593 end ConfPackage;
27594 CF_EOF
27595                         if ( "$cf_ada_make" $ADAFLAGS \
27596                                         -Plibrary.gpr \
27597                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27598                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27599                                         -XSOURCE_DIR="`pwd`" \
27600                                         -XSONAME=libConfTest.so.1 \
27601                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27602                                 cf_gnat_projects=yes
27603                         fi
27604                         cd ..
27605                 fi
27606                 if test -f conftest.lib/confpackage.ali
27607                 then
27608                         cf_gnat_libraries=yes
27609                 fi
27610                 rm -rf ./conftest* ./*~conftest*
27611                 ;;
27612         esac
27613         ;;
27614 esac
27615 echo "$as_me:27615: result: $cf_gnat_projects" >&5
27616 echo "${ECHO_T}$cf_gnat_projects" >&6
27617 fi # enable_gnat_projects
27618
27619 if test "$cf_gnat_projects" = yes
27620 then
27621         echo "$as_me:27621: checking if GNAT supports libraries" >&5
27622 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27623         echo "$as_me:27623: result: $cf_gnat_libraries" >&5
27624 echo "${ECHO_T}$cf_gnat_libraries" >&6
27625 fi
27626
27627 USE_OLD_MAKERULES=""
27628 USE_GNAT_PROJECTS="#"
27629 USE_GNAT_MAKE_GPR="#"
27630 USE_GNAT_GPRBUILD="#"
27631
27632 if test "$cf_gnat_projects" = yes
27633 then
27634         USE_OLD_MAKERULES="#"
27635         USE_GNAT_PROJECTS=""
27636         if test "$cf_cv_VERSION_GPRBUILD" != no
27637         then
27638                 USE_GNAT_GPRBUILD=""
27639         elif test "$cf_cv_VERSION_GNATMAKE" != no
27640         then
27641                 USE_GNAT_MAKE_GPR=""
27642         else
27643                 { echo "$as_me:27643: WARNING: use old makefile rules since tools are missing" >&5
27644 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27645         fi
27646 fi
27647
27648 if test "$cf_gnat_libraries" = yes
27649 then
27650         USE_GNAT_LIBRARIES=""
27651 else
27652         USE_GNAT_LIBRARIES="#"
27653 fi
27654
27655 echo "$as_me:27655: checking for ada-compiler" >&5
27656 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27657
27658 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27659 if test "${with_ada_compiler+set}" = set; then
27660   withval="$with_ada_compiler"
27661   cf_ada_compiler=$withval
27662 else
27663   cf_ada_compiler=gnatmake
27664 fi;
27665
27666 echo "$as_me:27666: result: $cf_ada_compiler" >&5
27667 echo "${ECHO_T}$cf_ada_compiler" >&6
27668
27669                         cf_ada_package=terminal_interface
27670
27671 echo "$as_me:27671: checking for ada-include" >&5
27672 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27673
27674 # Check whether --with-ada-include or --without-ada-include was given.
27675 if test "${with_ada_include+set}" = set; then
27676   withval="$with_ada_include"
27677
27678 else
27679   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27680 fi; if test -n "$prefix/share/ada/adainclude" ; then
27681
27682 if test "x$prefix" != xNONE; then
27683         cf_path_syntax="$prefix"
27684 else
27685         cf_path_syntax="$ac_default_prefix"
27686 fi
27687
27688 case ".$withval" in
27689 (.\$\(*\)*|.\'*\'*)
27690         ;;
27691 (..|./*|.\\*)
27692         ;;
27693 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27694         ;;
27695 (.\$\{*prefix\}*|.\$\{*dir\}*)
27696         eval withval="$withval"
27697         case ".$withval" in
27698         (.NONE/*)
27699                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27700                 ;;
27701         esac
27702         ;;
27703 (.no|.NONE/*)
27704         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27705         ;;
27706 (*)
27707         { { echo "$as_me:27707: error: expected a pathname, not \"$withval\"" >&5
27708 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27709    { (exit 1); exit 1; }; }
27710         ;;
27711 esac
27712
27713 fi
27714 eval ADA_INCLUDE="$withval"
27715
27716 echo "$as_me:27716: result: $ADA_INCLUDE" >&5
27717 echo "${ECHO_T}$ADA_INCLUDE" >&6
27718
27719 echo "$as_me:27719: checking for ada-objects" >&5
27720 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27721
27722 # Check whether --with-ada-objects or --without-ada-objects was given.
27723 if test "${with_ada_objects+set}" = set; then
27724   withval="$with_ada_objects"
27725
27726 else
27727   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27728 fi; if test -n "$prefix/lib/ada/adalib" ; then
27729
27730 if test "x$prefix" != xNONE; then
27731         cf_path_syntax="$prefix"
27732 else
27733         cf_path_syntax="$ac_default_prefix"
27734 fi
27735
27736 case ".$withval" in
27737 (.\$\(*\)*|.\'*\'*)
27738         ;;
27739 (..|./*|.\\*)
27740         ;;
27741 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27742         ;;
27743 (.\$\{*prefix\}*|.\$\{*dir\}*)
27744         eval withval="$withval"
27745         case ".$withval" in
27746         (.NONE/*)
27747                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27748                 ;;
27749         esac
27750         ;;
27751 (.no|.NONE/*)
27752         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27753         ;;
27754 (*)
27755         { { echo "$as_me:27755: error: expected a pathname, not \"$withval\"" >&5
27756 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27757    { (exit 1); exit 1; }; }
27758         ;;
27759 esac
27760
27761 fi
27762 eval ADA_OBJECTS="$withval"
27763
27764 echo "$as_me:27764: result: $ADA_OBJECTS" >&5
27765 echo "${ECHO_T}$ADA_OBJECTS" >&6
27766
27767 echo "$as_me:27767: checking if an Ada95 shared-library should be built" >&5
27768 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27769
27770 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27771 if test "${with_ada_sharedlib+set}" = set; then
27772   withval="$with_ada_sharedlib"
27773   with_ada_sharedlib=$withval
27774 else
27775   with_ada_sharedlib=no
27776 fi;
27777 echo "$as_me:27777: result: $with_ada_sharedlib" >&5
27778 echo "${ECHO_T}$with_ada_sharedlib" >&6
27779
27780 if test "x$with_ada_sharedlib" != xno
27781 then
27782         if test "x$cf_gnat_projects" != xyes
27783         then
27784                 { echo "$as_me:27784: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27785 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27786                 with_ada_sharedlib=no
27787         fi
27788 fi
27789
27790 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27791 MAKE_ADA_SHAREDLIB="#"
27792
27793 if test "x$with_ada_sharedlib" != xno
27794 then
27795         MAKE_ADA_SHAREDLIB=
27796         if test "x$with_ada_sharedlib" != xyes
27797         then
27798                 ADA_SHAREDLIB="$with_ada_sharedlib"
27799         fi
27800 fi
27801
27802                         # allow the Ada binding to be renamed
27803
27804 echo "$as_me:27804: checking for ada-libname" >&5
27805 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27806
27807 # Check whether --with-ada-libname or --without-ada-libname was given.
27808 if test "${with_ada_libname+set}" = set; then
27809   withval="$with_ada_libname"
27810   ADA_LIBNAME=$withval
27811 else
27812   ADA_LIBNAME=AdaCurses
27813 fi;
27814 case "x$ADA_LIBNAME" in
27815 (x|xyes|xno)
27816         ADA_LIBNAME=AdaCurses
27817         ;;
27818 esac
27819
27820 echo "$as_me:27820: result: $ADA_LIBNAME" >&5
27821 echo "${ECHO_T}$ADA_LIBNAME" >&6
27822
27823                 fi
27824         fi
27825 else
27826         cf_with_ada=no
27827 fi
27828
27829 # do this "late" to avoid conflict with header-checks
27830 if test "x$with_widec" = xyes ; then
27831         echo "$as_me:27831: checking for wchar_t" >&5
27832 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27833 if test "${ac_cv_type_wchar_t+set}" = set; then
27834   echo $ECHO_N "(cached) $ECHO_C" >&6
27835 else
27836   cat >"conftest.$ac_ext" <<_ACEOF
27837 #line 27837 "configure"
27838 #include "confdefs.h"
27839 $ac_includes_default
27840 int
27841 main (void)
27842 {
27843 if ((wchar_t *) 0)
27844   return 0;
27845 if (sizeof (wchar_t))
27846   return 0;
27847   ;
27848   return 0;
27849 }
27850 _ACEOF
27851 rm -f "conftest.$ac_objext"
27852 if { (eval echo "$as_me:27852: \"$ac_compile\"") >&5
27853   (eval $ac_compile) 2>&5
27854   ac_status=$?
27855   echo "$as_me:27855: \$? = $ac_status" >&5
27856   (exit "$ac_status"); } &&
27857          { ac_try='test -s "conftest.$ac_objext"'
27858   { (eval echo "$as_me:27858: \"$ac_try\"") >&5
27859   (eval $ac_try) 2>&5
27860   ac_status=$?
27861   echo "$as_me:27861: \$? = $ac_status" >&5
27862   (exit "$ac_status"); }; }; then
27863   ac_cv_type_wchar_t=yes
27864 else
27865   echo "$as_me: failed program was:" >&5
27866 cat "conftest.$ac_ext" >&5
27867 ac_cv_type_wchar_t=no
27868 fi
27869 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27870 fi
27871 echo "$as_me:27871: result: $ac_cv_type_wchar_t" >&5
27872 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27873
27874 echo "$as_me:27874: checking size of wchar_t" >&5
27875 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27876 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27877   echo $ECHO_N "(cached) $ECHO_C" >&6
27878 else
27879   if test "$ac_cv_type_wchar_t" = yes; then
27880   if test "$cross_compiling" = yes; then
27881   # Depending upon the size, compute the lo and hi bounds.
27882 cat >"conftest.$ac_ext" <<_ACEOF
27883 #line 27883 "configure"
27884 #include "confdefs.h"
27885 $ac_includes_default
27886 int
27887 main (void)
27888 {
27889 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27890   ;
27891   return 0;
27892 }
27893 _ACEOF
27894 rm -f "conftest.$ac_objext"
27895 if { (eval echo "$as_me:27895: \"$ac_compile\"") >&5
27896   (eval $ac_compile) 2>&5
27897   ac_status=$?
27898   echo "$as_me:27898: \$? = $ac_status" >&5
27899   (exit "$ac_status"); } &&
27900          { ac_try='test -s "conftest.$ac_objext"'
27901   { (eval echo "$as_me:27901: \"$ac_try\"") >&5
27902   (eval $ac_try) 2>&5
27903   ac_status=$?
27904   echo "$as_me:27904: \$? = $ac_status" >&5
27905   (exit "$ac_status"); }; }; then
27906   ac_lo=0 ac_mid=0
27907   while :; do
27908     cat >"conftest.$ac_ext" <<_ACEOF
27909 #line 27909 "configure"
27910 #include "confdefs.h"
27911 $ac_includes_default
27912 int
27913 main (void)
27914 {
27915 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27916   ;
27917   return 0;
27918 }
27919 _ACEOF
27920 rm -f "conftest.$ac_objext"
27921 if { (eval echo "$as_me:27921: \"$ac_compile\"") >&5
27922   (eval $ac_compile) 2>&5
27923   ac_status=$?
27924   echo "$as_me:27924: \$? = $ac_status" >&5
27925   (exit "$ac_status"); } &&
27926          { ac_try='test -s "conftest.$ac_objext"'
27927   { (eval echo "$as_me:27927: \"$ac_try\"") >&5
27928   (eval $ac_try) 2>&5
27929   ac_status=$?
27930   echo "$as_me:27930: \$? = $ac_status" >&5
27931   (exit "$ac_status"); }; }; then
27932   ac_hi=$ac_mid; break
27933 else
27934   echo "$as_me: failed program was:" >&5
27935 cat "conftest.$ac_ext" >&5
27936 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27937 fi
27938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27939   done
27940 else
27941   echo "$as_me: failed program was:" >&5
27942 cat "conftest.$ac_ext" >&5
27943 ac_hi=-1 ac_mid=-1
27944   while :; do
27945     cat >"conftest.$ac_ext" <<_ACEOF
27946 #line 27946 "configure"
27947 #include "confdefs.h"
27948 $ac_includes_default
27949 int
27950 main (void)
27951 {
27952 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27953   ;
27954   return 0;
27955 }
27956 _ACEOF
27957 rm -f "conftest.$ac_objext"
27958 if { (eval echo "$as_me:27958: \"$ac_compile\"") >&5
27959   (eval $ac_compile) 2>&5
27960   ac_status=$?
27961   echo "$as_me:27961: \$? = $ac_status" >&5
27962   (exit "$ac_status"); } &&
27963          { ac_try='test -s "conftest.$ac_objext"'
27964   { (eval echo "$as_me:27964: \"$ac_try\"") >&5
27965   (eval $ac_try) 2>&5
27966   ac_status=$?
27967   echo "$as_me:27967: \$? = $ac_status" >&5
27968   (exit "$ac_status"); }; }; then
27969   ac_lo=$ac_mid; break
27970 else
27971   echo "$as_me: failed program was:" >&5
27972 cat "conftest.$ac_ext" >&5
27973 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27974 fi
27975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27976   done
27977 fi
27978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27979 # Binary search between lo and hi bounds.
27980 while test "x$ac_lo" != "x$ac_hi"; do
27981   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27982   cat >"conftest.$ac_ext" <<_ACEOF
27983 #line 27983 "configure"
27984 #include "confdefs.h"
27985 $ac_includes_default
27986 int
27987 main (void)
27988 {
27989 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27990   ;
27991   return 0;
27992 }
27993 _ACEOF
27994 rm -f "conftest.$ac_objext"
27995 if { (eval echo "$as_me:27995: \"$ac_compile\"") >&5
27996   (eval $ac_compile) 2>&5
27997   ac_status=$?
27998   echo "$as_me:27998: \$? = $ac_status" >&5
27999   (exit "$ac_status"); } &&
28000          { ac_try='test -s "conftest.$ac_objext"'
28001   { (eval echo "$as_me:28001: \"$ac_try\"") >&5
28002   (eval $ac_try) 2>&5
28003   ac_status=$?
28004   echo "$as_me:28004: \$? = $ac_status" >&5
28005   (exit "$ac_status"); }; }; then
28006   ac_hi=$ac_mid
28007 else
28008   echo "$as_me: failed program was:" >&5
28009 cat "conftest.$ac_ext" >&5
28010 ac_lo=`expr "$ac_mid" + 1`
28011 fi
28012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28013 done
28014 ac_cv_sizeof_wchar_t=$ac_lo
28015 else
28016   if test "$cross_compiling" = yes; then
28017   { { echo "$as_me:28017: error: cannot run test program while cross compiling" >&5
28018 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28019    { (exit 1); exit 1; }; }
28020 else
28021   cat >"conftest.$ac_ext" <<_ACEOF
28022 #line 28022 "configure"
28023 #include "confdefs.h"
28024 $ac_includes_default
28025 int
28026 main (void)
28027 {
28028 FILE *f = fopen ("conftest.val", "w");
28029 if (!f)
28030   $ac_main_return (1);
28031 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28032 fclose (f);
28033   ;
28034   return 0;
28035 }
28036 _ACEOF
28037 rm -f "conftest$ac_exeext"
28038 if { (eval echo "$as_me:28038: \"$ac_link\"") >&5
28039   (eval $ac_link) 2>&5
28040   ac_status=$?
28041   echo "$as_me:28041: \$? = $ac_status" >&5
28042   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28043   { (eval echo "$as_me:28043: \"$ac_try\"") >&5
28044   (eval $ac_try) 2>&5
28045   ac_status=$?
28046   echo "$as_me:28046: \$? = $ac_status" >&5
28047   (exit "$ac_status"); }; }; then
28048   ac_cv_sizeof_wchar_t=`cat conftest.val`
28049 else
28050   echo "$as_me: program exited with status $ac_status" >&5
28051 echo "$as_me: failed program was:" >&5
28052 cat "conftest.$ac_ext" >&5
28053 fi
28054 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28055 fi
28056 fi
28057 rm -f conftest.val
28058 else
28059   ac_cv_sizeof_wchar_t=0
28060 fi
28061 fi
28062 echo "$as_me:28062: result: $ac_cv_sizeof_wchar_t" >&5
28063 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28064 cat >>confdefs.h <<EOF
28065 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28066 EOF
28067
28068         # cross-compiling to mingw can run into the problem that attempting to
28069         # link with the regex library fails, causing the test to not set this to
28070         # a number.  "recent" autoconf does not address this problem either -TD
28071         if test -z "$ac_cv_sizeof_wchar_t"
28072         then
28073                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28074
28075 echo "${as_me:-configure}:28075: testing test failed (assume 2) ..." 1>&5
28076
28077                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28078                 mv confdefs.tmp confdefs.h
28079                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28080         fi
28081 fi
28082
28083 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28084 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28085 ###
28086 ### ticlib modules may be a separate library, otherwise contained in termlib.
28087 ### termlib modules may be a separate library, otherwise contained in ncurses.
28088 ###
28089 ### The of "+" or " " between the tokens controls the way the script
28090 ### chooses to split module lists into libraries.
28091 ###
28092 ### (see CF_LIB_RULES).
28093 echo "$as_me:28093: checking for library subsets" >&5
28094 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28095 LIB_SUBSETS=
28096
28097 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28098         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28099         if test "$with_ticlib" != no ; then
28100                 LIB_SUBSETS="${LIB_SUBSETS} "
28101         else
28102                 LIB_SUBSETS="${LIB_SUBSETS}+"
28103         fi
28104 fi
28105
28106 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28107 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28108
28109 if test "$with_termlib" != no ; then
28110         LIB_SUBSETS="${LIB_SUBSETS} "
28111 else
28112         LIB_SUBSETS="${LIB_SUBSETS}+"
28113 fi
28114
28115 LIB_SUBSETS="${LIB_SUBSETS}base"
28116
28117 # Most term-driver calls are to tinfo, but some like init_pair are to the
28118 # base library (so it resides in base).
28119 if test "$with_term_driver" != no ; then
28120         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28121         case "$cf_cv_system_name" in
28122         (*mingw32*|*mingw64*)
28123                 if test "x$with_exp_win32" = xyes ; then
28124                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28125                 else
28126                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28127                 fi
28128                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28129                 ;;
28130         (*)
28131                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28132                 ;;
28133         esac
28134 elif test "x$with_exp_win32" = xyes ; then
28135         case "$cf_cv_system_name" in
28136         (*mingw32*|*mingw64*)
28137                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28138                 ;;
28139         (*)
28140                 ;;
28141         esac
28142 fi
28143
28144 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28145 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28146
28147 echo "$as_me:28147: result: $LIB_SUBSETS" >&5
28148 echo "${ECHO_T}$LIB_SUBSETS" >&6
28149
28150 ### Construct the list of include-directories to be generated
28151
28152 if test "$srcdir" != "."; then
28153         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28154 fi
28155 CPPFLAGS="-I../include $CPPFLAGS"
28156 if test "$srcdir" != "."; then
28157         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28158 fi
28159 CPPFLAGS="-I. $CPPFLAGS"
28160
28161 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28162 if test "$srcdir" != "."; then
28163         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28164 fi
28165 if test "$GCC" != yes; then
28166         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28167 elif test "$includedir" != "/usr/include"; then
28168         if test "$includedir" = '${prefix}/include' ; then
28169                 if test x$prefix != x/usr ; then
28170                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28171                 fi
28172         else
28173                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28174         fi
28175 fi
28176
28177 ### Build up pieces for makefile rules
28178 echo "$as_me:28178: checking default library suffix" >&5
28179 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28180
28181         case $DFT_LWR_MODEL in
28182         (libtool) DFT_ARG_SUFFIX=''   ;;
28183         (normal)  DFT_ARG_SUFFIX=''   ;;
28184         (debug)   DFT_ARG_SUFFIX='_g' ;;
28185         (profile) DFT_ARG_SUFFIX='_p' ;;
28186         (shared)  DFT_ARG_SUFFIX=''   ;;
28187         esac
28188         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28189 echo "$as_me:28189: result: $DFT_ARG_SUFFIX" >&5
28190 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28191
28192 echo "$as_me:28192: checking default library-dependency suffix" >&5
28193 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28194
28195         case X$DFT_LWR_MODEL in
28196         (Xlibtool)
28197                 DFT_LIB_SUFFIX='.la'
28198                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28199                 ;;
28200         (Xdebug)
28201                 case "$cf_cv_system_name" in
28202                 (*-msvc*)
28203                         DFT_LIB_SUFFIX='_g.lib'
28204                         ;;
28205                 (*)
28206                         DFT_LIB_SUFFIX='_g.a'
28207                         ;;
28208                 esac
28209                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28210                 ;;
28211         (Xprofile)
28212                 case "$cf_cv_system_name" in
28213                 (*-msvc*)
28214                         DFT_LIB_SUFFIX='_p.lib'
28215                         ;;
28216                 (*)
28217                         DFT_LIB_SUFFIX='_p.a'
28218                         ;;
28219                 esac
28220                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28221                 ;;
28222         (Xshared)
28223                 case "$cf_cv_system_name" in
28224                 (aix[5-7]*)
28225                         DFT_LIB_SUFFIX='.so'
28226                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28227                         ;;
28228                 (*-msvc*)
28229                         DFT_LIB_SUFFIX='.dll'
28230                         DFT_DEP_SUFFIX='.dll.lib'
28231                         ;;
28232                 (cygwin*|msys*|mingw*)
28233                         DFT_LIB_SUFFIX='.dll'
28234                         DFT_DEP_SUFFIX='.dll.a'
28235                         ;;
28236                 (darwin*)
28237                         DFT_LIB_SUFFIX='.dylib'
28238                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28239                         ;;
28240                 (hpux*)
28241                         case "$target" in
28242                         (ia64*)
28243                                 DFT_LIB_SUFFIX='.so'
28244                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28245                                 ;;
28246                         (*)
28247                                 DFT_LIB_SUFFIX='.sl'
28248                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28249                                 ;;
28250                         esac
28251                         ;;
28252                 (*)
28253                         DFT_LIB_SUFFIX='.so'
28254                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28255                         ;;
28256                 esac
28257                 ;;
28258         (*)
28259                 case "$target" in
28260                 (*-msvc*)
28261                         DFT_LIB_SUFFIX='.lib'
28262                         ;;
28263                 (*)
28264                         DFT_LIB_SUFFIX='.a'
28265                         ;;
28266                 esac
28267                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28268                 ;;
28269         esac
28270         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28271         then
28272                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28273                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28274         fi
28275 echo "$as_me:28275: result: $DFT_DEP_SUFFIX" >&5
28276 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28277
28278 echo "$as_me:28278: checking default object directory" >&5
28279 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28280
28281         case $DFT_LWR_MODEL in
28282         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28283         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28284         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28285         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28286         (shared)
28287                 case "$cf_cv_system_name" in
28288                 (cygwin|msys)
28289                         DFT_OBJ_SUBDIR='objects' ;;
28290                 (*)
28291                         DFT_OBJ_SUBDIR='obj_s' ;;
28292                 esac
28293         esac
28294 echo "$as_me:28294: result: $DFT_OBJ_SUBDIR" >&5
28295 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28296
28297 if test "x$cf_with_cxx" = xyes ; then
28298 echo "$as_me:28298: checking c++ library-dependency suffix" >&5
28299 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28300 if test "$with_libtool" != "no"; then
28301         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28302         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28303 elif test "$with_shared_cxx" != "no"; then
28304         # also for g++ users...
28305         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28306 else
28307         # we normally make a static library because C/C++ library rules differ
28308
28309         case Xnormal in
28310         (Xlibtool)
28311                 CXX_LIB_SUFFIX='.la'
28312                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28313                 ;;
28314         (Xdebug)
28315                 case "$cf_cv_system_name" in
28316                 (*-msvc*)
28317                         CXX_LIB_SUFFIX='_g.lib'
28318                         ;;
28319                 (*)
28320                         CXX_LIB_SUFFIX='_g.a'
28321                         ;;
28322                 esac
28323                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28324                 ;;
28325         (Xprofile)
28326                 case "$cf_cv_system_name" in
28327                 (*-msvc*)
28328                         CXX_LIB_SUFFIX='_p.lib'
28329                         ;;
28330                 (*)
28331                         CXX_LIB_SUFFIX='_p.a'
28332                         ;;
28333                 esac
28334                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28335                 ;;
28336         (Xshared)
28337                 case "$cf_cv_system_name" in
28338                 (aix[5-7]*)
28339                         CXX_LIB_SUFFIX='.so'
28340                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28341                         ;;
28342                 (*-msvc*)
28343                         CXX_LIB_SUFFIX='.dll'
28344                         CXX_DEP_SUFFIX='.dll.lib'
28345                         ;;
28346                 (cygwin*|msys*|mingw*)
28347                         CXX_LIB_SUFFIX='.dll'
28348                         CXX_DEP_SUFFIX='.dll.a'
28349                         ;;
28350                 (darwin*)
28351                         CXX_LIB_SUFFIX='.dylib'
28352                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28353                         ;;
28354                 (hpux*)
28355                         case "$target" in
28356                         (ia64*)
28357                                 CXX_LIB_SUFFIX='.so'
28358                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28359                                 ;;
28360                         (*)
28361                                 CXX_LIB_SUFFIX='.sl'
28362                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28363                                 ;;
28364                         esac
28365                         ;;
28366                 (*)
28367                         CXX_LIB_SUFFIX='.so'
28368                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28369                         ;;
28370                 esac
28371                 ;;
28372         (*)
28373                 case "$target" in
28374                 (*-msvc*)
28375                         CXX_LIB_SUFFIX='.lib'
28376                         ;;
28377                 (*)
28378                         CXX_LIB_SUFFIX='.a'
28379                         ;;
28380                 esac
28381                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28382                 ;;
28383         esac
28384         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28385         then
28386                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28387                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28388         fi
28389
28390 fi
28391 echo "$as_me:28391: result: $CXX_LIB_SUFFIX" >&5
28392 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28393
28394 fi
28395
28396 # do not want -ldl in build except as needed for -lncurses dependency
28397 if test "x$with_dlsym" = xyes ; then
28398 if test "$DFT_LWR_MODEL" = shared || \
28399    test "$DFT_LWR_MODEL" = libtool ; then
28400
28401 # remove dl library from $LIBS
28402 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28403
28404 fi
28405 fi
28406 ### Set up low-level terminfo dependencies for makefiles.
28407
28408 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28409 # do not need libdl
28410 TICS_LIST=
28411 if test "x$with_dlsym" = xyes ; then
28412
28413 # remove dl library from $SHLIB_LIST
28414 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28415
28416 fi
28417
28418 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28419 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28420 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28421 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28422 then
28423         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28424 fi
28425
28426 if test "$with_ticlib" != no ; then
28427
28428         if test "x$with_ticlib" != xyes ; then
28429                 TICS_NAME=$with_ticlib
28430                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28431                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28432                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28433                 TICS_LIB_SUFFIX="${with_ticlib}"
28434         else
28435                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28436                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28437                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28438                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28439         fi
28440         TICS_LDFLAGS="-L${LIB_DIR}"
28441         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28442 else
28443         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28444         TICS_LDFLAGS="-L${LIB_DIR}"
28445         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28446 fi
28447
28448 if test "$with_termlib" != no ; then
28449
28450         if test "x$with_termlib" != xyes ; then
28451                 TINFO_NAME=$with_termlib
28452                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28453                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28454                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28455                 TINFO_LIB_SUFFIX="${with_termlib}"
28456         else
28457                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28458                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28459                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28460                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28461         fi
28462
28463         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28464         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28465         if test "$DFT_LWR_MODEL" = "libtool"; then
28466                 TEST_ARGS="${TEST_DEPS}"
28467                 TEST_ARG2="${TEST_DEP2}"
28468                 TINFO_LDFLAGS="-L${LIB_DIR}"
28469                 TINFO_LIBS="$TEST_ARGS"
28470                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28471                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28472         else
28473                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28474                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28475                 if test "x$with_term_driver" != xno ; then
28476                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28477                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28478                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28479                 else
28480                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28481                         TINFO_LIBS="$TEST_ARGS"
28482                 fi
28483                 TINFO_LDFLAGS="-L${LIB_DIR}"
28484                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28485         fi
28486 else
28487         # the next lines are needed for linking libtic over libncurses
28488         TINFO_NAME=${LIB_NAME}
28489         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28490         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28491         if test "x$with_tic_depends" = xyes ; then
28492                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28493         else
28494                 TICS_LIST="$SHLIB_LIST"
28495         fi
28496
28497         TINFO_LDFLAGS="-L${LIB_DIR}"
28498         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28499 fi
28500
28501 if test "$DFT_LWR_MODEL" = shared ; then
28502         case "$cf_cv_system_name" in
28503         (cygwin*|msys*)
28504                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28505                 TINFO_SUFFIX=.dll
28506                 ;;
28507         esac
28508 fi
28509
28510 if test "x$with_dlsym" = xyes ; then
28511
28512 # remove dl library from $TICS_LIST
28513 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28514
28515 fi
28516
28517 if test "$DFT_LWR_MODEL" = "libtool"; then
28518         OBJEXT=lo
28519 fi
28520
28521 # needed for Ada95
28522 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28523
28524 case "$DFT_LWR_MODEL" in
28525 (normal|debug|profile)
28526
28527 if test "$GCC" = yes ; then
28528         case "$cf_cv_system_name" in
28529         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28530                 LDFLAGS_STATIC=
28531                 LDFLAGS_SHARED=
28532                 ;;
28533         (*)     # normally, except when broken
28534                 LDFLAGS_STATIC=-static
28535                 LDFLAGS_SHARED=-dynamic
28536                 ;;
28537         esac
28538 else
28539         case "$cf_cv_system_name" in
28540         (aix[4-7]*)     # from ld manpage
28541                 LDFLAGS_STATIC=-bstatic
28542                 LDFLAGS_SHARED=-bdynamic
28543                 ;;
28544         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28545                 # We could also use just "archive" and "shared".
28546                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28547                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28548                 ;;
28549         (irix*)         # from ld manpage IRIX64
28550                 LDFLAGS_STATIC=-Bstatic
28551                 LDFLAGS_SHARED=-Bdynamic
28552                 ;;
28553         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28554                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28555                 LDFLAGS_STATIC=-noso
28556                 LDFLAGS_SHARED=-so_archive
28557                 ;;
28558         (solaris2*)
28559                 LDFLAGS_STATIC=-Bstatic
28560                 LDFLAGS_SHARED=-Bdynamic
28561                 ;;
28562         esac
28563 fi
28564
28565 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28566 then
28567         echo "$as_me:28567: checking if linker supports switching between static/dynamic" >&5
28568 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28569
28570         rm -f libconftest.a
28571         cat >conftest.$ac_ext <<EOF
28572 #line 28572 "configure"
28573 #include <stdio.h>
28574 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28575 EOF
28576         if { (eval echo "$as_me:28576: \"$ac_compile\"") >&5
28577   (eval $ac_compile) 2>&5
28578   ac_status=$?
28579   echo "$as_me:28579: \$? = $ac_status" >&5
28580   (exit "$ac_status"); } ; then
28581                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28582                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28583         fi
28584         rm -f conftest.*
28585
28586         cf_save_LIBS="$LIBS"
28587
28588         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28589         cat >"conftest.$ac_ext" <<_ACEOF
28590 #line 28590 "configure"
28591 #include "confdefs.h"
28592
28593 #line 28593 "configure"
28594 #include <stdio.h>
28595 int cf_ldflags_static(FILE *fp);
28596
28597 int
28598 main (void)
28599 {
28600
28601         return cf_ldflags_static(stdin);
28602
28603   ;
28604   return 0;
28605 }
28606 _ACEOF
28607 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28608 if { (eval echo "$as_me:28608: \"$ac_link\"") >&5
28609   (eval $ac_link) 2>&5
28610   ac_status=$?
28611   echo "$as_me:28611: \$? = $ac_status" >&5
28612   (exit "$ac_status"); } &&
28613          { ac_try='test -s "conftest$ac_exeext"'
28614   { (eval echo "$as_me:28614: \"$ac_try\"") >&5
28615   (eval $ac_try) 2>&5
28616   ac_status=$?
28617   echo "$as_me:28617: \$? = $ac_status" >&5
28618   (exit "$ac_status"); }; }; then
28619
28620         # some linkers simply ignore the -dynamic
28621         case x`file "conftest$ac_exeext" 2>/dev/null` in
28622         (*static*)
28623                 cf_ldflags_static=no
28624                 ;;
28625         (*)
28626                 cf_ldflags_static=yes
28627                 ;;
28628         esac
28629
28630 else
28631   echo "$as_me: failed program was:" >&5
28632 cat "conftest.$ac_ext" >&5
28633 cf_ldflags_static=no
28634 fi
28635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28636
28637         rm -f libconftest.*
28638         LIBS="$cf_save_LIBS"
28639
28640         echo "$as_me:28640: result: $cf_ldflags_static" >&5
28641 echo "${ECHO_T}$cf_ldflags_static" >&6
28642
28643         if test "$cf_ldflags_static" != yes
28644         then
28645                 LDFLAGS_STATIC=
28646                 LDFLAGS_SHARED=
28647         fi
28648 else
28649         LDFLAGS_STATIC=
28650         LDFLAGS_SHARED=
28651 fi
28652
28653         ;;
28654 esac
28655
28656 echo "$as_me:28656: checking where we will install curses.h" >&5
28657 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28658
28659 includesubdir=
28660 if test "$with_overwrite" = no && \
28661  { test "x$includedir" = 'x${prefix}/include' || \
28662    test "x$includedir" = "x${prefix}/include"; }
28663 then
28664         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28665 fi
28666 echo "$as_me:28666: result: ${includedir}${includesubdir}" >&5
28667 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28668
28669 ### Resolve a conflict between normal and wide-curses by forcing applications
28670 ### that will need libutf8 to add it to their configure script.
28671 if test "$with_overwrite" != no ; then
28672 if test "$NCURSES_LIBUTF8" = 1 ; then
28673         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28674         { echo "$as_me:28674: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28675 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28676 fi
28677 fi
28678 WITH_OVERWRITE=$with_overwrite
28679
28680 ### At least on MinGW a shared library build without libtool
28681 ### requires adding the additional libs to the link list.
28682 case "$cf_cv_system_name" in
28683 (*mingw32*|*mingw64*)
28684         if test "$DFT_LWR_MODEL" != "libtool"; then
28685            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28686         fi
28687         ;;
28688 *)      ;;
28689 esac
28690
28691 # used to separate tack out of the tree
28692 NCURSES_TREE=
28693
28694 ### predefined stuff for the test programs
28695
28696 cat >>confdefs.h <<\EOF
28697 #define HAVE_SLK_COLOR 1
28698 EOF
28699
28700 # pkgsrc uses these
28701
28702 echo "$as_me:28702: checking for desired basename for form library" >&5
28703 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28704
28705 # Check whether --with-form-libname or --without-form-libname was given.
28706 if test "${with_form_libname+set}" = set; then
28707   withval="$with_form_libname"
28708   with_lib_basename=$withval
28709 else
28710   with_lib_basename=form
28711 fi;
28712 FORM_NAME="$with_lib_basename"
28713
28714 case "x$FORM_NAME" in
28715 (x|xno|xnone|xyes)
28716         FORM_NAME=form
28717         ;;
28718 (*)
28719         ;;
28720 esac
28721
28722 echo "$as_me:28722: result: $FORM_NAME" >&5
28723 echo "${ECHO_T}$FORM_NAME" >&6
28724
28725 echo "$as_me:28725: checking for desired basename for menu library" >&5
28726 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28727
28728 # Check whether --with-menu-libname or --without-menu-libname was given.
28729 if test "${with_menu_libname+set}" = set; then
28730   withval="$with_menu_libname"
28731   with_lib_basename=$withval
28732 else
28733   with_lib_basename=menu
28734 fi;
28735 MENU_NAME="$with_lib_basename"
28736
28737 case "x$MENU_NAME" in
28738 (x|xno|xnone|xyes)
28739         MENU_NAME=menu
28740         ;;
28741 (*)
28742         ;;
28743 esac
28744
28745 echo "$as_me:28745: result: $MENU_NAME" >&5
28746 echo "${ECHO_T}$MENU_NAME" >&6
28747
28748 echo "$as_me:28748: checking for desired basename for panel library" >&5
28749 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28750
28751 # Check whether --with-panel-libname or --without-panel-libname was given.
28752 if test "${with_panel_libname+set}" = set; then
28753   withval="$with_panel_libname"
28754   with_lib_basename=$withval
28755 else
28756   with_lib_basename=panel
28757 fi;
28758 PANEL_NAME="$with_lib_basename"
28759
28760 case "x$PANEL_NAME" in
28761 (x|xno|xnone|xyes)
28762         PANEL_NAME=panel
28763         ;;
28764 (*)
28765         ;;
28766 esac
28767
28768 echo "$as_me:28768: result: $PANEL_NAME" >&5
28769 echo "${ECHO_T}$PANEL_NAME" >&6
28770
28771 echo "$as_me:28771: checking for desired basename for cxx library" >&5
28772 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28773
28774 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28775 if test "${with_cxx_libname+set}" = set; then
28776   withval="$with_cxx_libname"
28777   with_lib_basename=$withval
28778 else
28779   with_lib_basename=ncurses++
28780 fi;
28781 CXX_NAME="$with_lib_basename"
28782
28783 case "x$CXX_NAME" in
28784 (x|xno|xnone|xyes)
28785         CXX_NAME=ncurses++
28786         ;;
28787 (*)
28788         ;;
28789 esac
28790
28791 echo "$as_me:28791: result: $CXX_NAME" >&5
28792 echo "${ECHO_T}$CXX_NAME" >&6
28793
28794 ### Construct the list of subdirectories for which we'll customize makefiles
28795 ### with the appropriate compile-rules.
28796
28797 echo "$as_me:28797: checking for src modules" >&5
28798 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28799
28800 # dependencies and linker-arguments for test-programs
28801 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28802 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28803 if test "$DFT_LWR_MODEL" = "libtool"; then
28804         TEST_ARGS="${TEST_DEPS}"
28805         TEST_ARG2="${TEST_DEP2}"
28806 else
28807         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28808         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28809 fi
28810
28811 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28812 cf_cv_src_modules=
28813 for cf_dir in $modules_to_build
28814 do
28815         if test -f "$srcdir/$cf_dir/modules" ; then
28816
28817                 # We may/may not have tack in the distribution, though the
28818                 # makefile is.
28819                 if test "$cf_dir" = tack ; then
28820                         if test "x$cf_with_tack" != "xyes"; then
28821                                 continue
28822                         fi
28823                 fi
28824
28825                 if test -z "$cf_cv_src_modules"; then
28826                         cf_cv_src_modules=$cf_dir
28827                 else
28828                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28829                 fi
28830
28831                 # Make the ncurses_cfg.h file record the library interface files as
28832                 # well.  These are header files that are the same name as their
28833                 # directory.  Ncurses is the only library that does not follow
28834                 # that pattern.
28835                 if test "$cf_dir" = tack ; then
28836                         continue
28837                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28838
28839 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28840
28841                         cat >>confdefs.h <<EOF
28842 #define HAVE_${cf_have_include}_H 1
28843 EOF
28844
28845                         cat >>confdefs.h <<EOF
28846 #define HAVE_LIB${cf_have_include} 1
28847 EOF
28848
28849 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28850
28851 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28852
28853                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28854                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28855                         if test "$DFT_LWR_MODEL" = "libtool"; then
28856                                 TEST_ARGS="${TEST_DEPS}"
28857                                 TEST_ARG2="${TEST_DEP2}"
28858                         else
28859                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28860                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28861                         fi
28862                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28863                 fi
28864         fi
28865 done
28866 echo "$as_me:28866: result: $cf_cv_src_modules" >&5
28867 echo "${ECHO_T}$cf_cv_src_modules" >&6
28868
28869 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28870 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28871
28872 SRC_SUBDIRS=
28873 if test "x$cf_with_manpages" != xno ; then
28874         SRC_SUBDIRS="$SRC_SUBDIRS man"
28875 fi
28876 SRC_SUBDIRS="$SRC_SUBDIRS include"
28877 for cf_dir in $cf_cv_src_modules
28878 do
28879         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28880 done
28881 if test "x$cf_with_tests" != "xno" ; then
28882         SRC_SUBDIRS="$SRC_SUBDIRS test"
28883 fi
28884 # always make this, to install the ncurses-config script
28885 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28886 if test "$cf_with_cxx_binding" != no; then
28887         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28888         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28889 fi
28890
28891 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28892 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28893
28894 ADA_SUBDIRS=
28895 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28896         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28897         ADA_SUBDIRS="gen src"
28898         if test "x$cf_with_tests" != "xno" ; then
28899                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28900         fi
28901 fi
28902
28903 SUB_MAKEFILES=
28904 for cf_dir in $SRC_SUBDIRS
28905 do
28906         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28907 done
28908
28909 if test -n "$ADA_SUBDIRS"; then
28910         for cf_dir in $ADA_SUBDIRS
28911         do
28912                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28913         done
28914
28915 fi
28916
28917 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28918    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28919    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28920    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28921 fi
28922
28923 DIRS_TO_MAKE="lib"
28924 for cf_item in $cf_list_models
28925 do
28926
28927         case $cf_item in
28928         (libtool) cf_subdir='obj_lo'  ;;
28929         (normal)  cf_subdir='objects' ;;
28930         (debug)   cf_subdir='obj_g' ;;
28931         (profile) cf_subdir='obj_p' ;;
28932         (shared)
28933                 case "$cf_cv_system_name" in
28934                 (cygwin|msys)
28935                         cf_subdir='objects' ;;
28936                 (*)
28937                         cf_subdir='obj_s' ;;
28938                 esac
28939         esac
28940
28941         for cf_item2 in $DIRS_TO_MAKE
28942         do
28943                 test "$cf_item2" = "$cf_subdir" && break
28944         done
28945         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28946 done
28947 for cf_dir in $DIRS_TO_MAKE
28948 do
28949         test ! -d "$cf_dir" && mkdir "$cf_dir"
28950 done
28951
28952 # symbols that differ when compiling Ada95 by itself.
28953 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28954
28955 # values to use as strings
28956
28957 cat >>confdefs.h <<EOF
28958 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28959 EOF
28960
28961 cat >>confdefs.h <<EOF
28962 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28963 EOF
28964
28965 ### Define substitutions for header files to avoid name-pollution
28966
28967 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28968         HAVE_TCGETATTR=1
28969 else
28970         HAVE_TCGETATTR=0
28971 fi
28972
28973 if test "x$ac_cv_header_stdint_h" = xyes ; then
28974         HAVE_STDINT_H=1
28975 else
28976         HAVE_STDINT_H=0
28977 fi
28978
28979 if test "x$ac_cv_header_termio_h" = xyes ; then
28980         HAVE_TERMIO_H=1
28981 else
28982         HAVE_TERMIO_H=0
28983 fi
28984
28985 if test "x$ac_cv_header_termios_h" = xyes ; then
28986         HAVE_TERMIOS_H=1
28987 else
28988         HAVE_TERMIOS_H=0
28989 fi
28990
28991 ################################################################################
28992 test "x$use_database" = xyes && \
28993 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28994
28995 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28996 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28997
28998 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28999 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29000 fi
29001
29002 if test "x$cf_with_tests" != xno ; then
29003         MAKE_TESTS=
29004 else
29005         MAKE_TESTS="#"
29006 fi
29007
29008 ADAHTML_DIR=../../doc/html/ada
29009
29010 # workaround for OS/2 (20151017)
29011 case "$cf_cv_system_name" in
29012 (os2*)
29013         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29014         ;;
29015 (*)
29016         LIBTOOL_OPTS_CXX=
29017         ;;
29018 esac
29019
29020 # workaround for g++ versus Solaris (20131116)
29021 case "$cf_cv_system_name" in
29022 (solaris2*)
29023         case "x$CPPFLAGS" in
29024         (*-D_XOPEN_SOURCE_EXTENDED*)
29025                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29026
29027 echo "${as_me:-configure}:29027: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29028
29029                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29030                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29031                 ;;
29032         esac
29033         ;;
29034 esac
29035
29036 # Help to automatically enable the extended curses features when using either
29037 # the *-config or the ".pc" files by adding defines.
29038 echo "$as_me:29038: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29039 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29040 PKG_CFLAGS=
29041 for cf_loop1 in $CPPFLAGS_after_XOPEN
29042 do
29043         cf_found=no
29044         for cf_loop2 in $CPPFLAGS_before_XOPEN
29045         do
29046                 if test "x$cf_loop1" = "x$cf_loop2"
29047                 then
29048                         cf_found=yes
29049                         break
29050                 fi
29051         done
29052         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29053 done
29054 echo "$as_me:29054: result: $PKG_CFLAGS" >&5
29055 echo "${ECHO_T}$PKG_CFLAGS" >&6
29056
29057 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29058 case "x$NCURSES_OSPEED" in
29059 (*short*)
29060         cf_compatible=1
29061         ;;
29062 (*)
29063         cf_compatible=0
29064         ;;
29065 esac
29066
29067 cat >>confdefs.h <<EOF
29068 #define NCURSES_OSPEED_COMPAT $cf_compatible
29069 EOF
29070
29071 case "x$cf_cv_typeof_chtype" in
29072 (xshort|xint|xlong)
29073         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29074         ;;
29075 esac
29076
29077 case "x$cf_cv_typeof_mmask_t" in
29078 (xshort|xint|xlong)
29079         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29080         ;;
29081 esac
29082
29083 # substitute into misc/Makefile to suppress
29084 # (un)install.data from the
29085 # (un)install rules.
29086 if test "x$cf_with_db_install" = "xno"; then
29087         MISC_INSTALL_DATA=
29088         MISC_UNINSTALL_DATA=
29089 else
29090         MISC_INSTALL_DATA=install.data
29091         MISC_UNINSTALL_DATA=uninstall.data
29092 fi
29093
29094 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29095         MAKE_DATABASE="#"
29096 else
29097         MAKE_DATABASE="$MAKE_TERMINFO"
29098 fi
29099
29100 if test -n "$PACKAGE"
29101 then
29102         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29103         export PACKAGE
29104         echo "package: $PACKAGE"
29105 fi
29106
29107 UNALTERED_SYMS=
29108 cf_filter_syms=no
29109
29110 if test -n "$RESULTING_SYMS"
29111 then
29112         cf_filter_syms=$cf_dft_filter_syms
29113         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
29114
29115 echo "${as_me:-configure}:29115: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
29116
29117 fi
29118
29119 if test "x$WILDCARD_SYMS" = xno
29120 then
29121         cf_filter_syms=yes
29122 fi
29123
29124 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29125
29126 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29127 if test "$cf_filter_syms" = yes
29128 then
29129         RESULTING_SYMS=resulting.map
29130 fi
29131
29132 if test "x$cross_compiling" = xyes ; then
29133         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29134         CHECK_BUILD="#"
29135 else
29136         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29137         CHECK_BUILD=
29138 fi
29139
29140 # This is used for the *-config script and *.pc data files.
29141
29142 echo "$as_me:29142: checking for linker search path" >&5
29143 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29144 if test "${cf_cv_ld_searchpath+set}" = set; then
29145   echo $ECHO_N "(cached) $ECHO_C" >&6
29146 else
29147
29148 if test "$cross_compiling" != yes ; then
29149
29150 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29151 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29152
29153 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29154 # update the cache, which makes it run faster.
29155 test -z "$cf_pathlist" && \
29156         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29157
29158 test -z "$cf_pathlist" &&
29159         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29160
29161 # This works with OpenBSD 6.5, which lists only filenames
29162 test -z "$cf_pathlist" &&
29163         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29164
29165 if test -z "$cf_pathlist"
29166 then
29167         # dyld default path with MacOS
29168         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29169         then
29170                 # do this to bypass check
29171                 cf_cv_ld_searchpath='$HOME/lib'
29172                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29173         fi
29174 fi
29175
29176 if test -z "$cf_pathlist"
29177 then
29178         # Solaris is "SunOS"
29179         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29180         then
29181                 case x`(isainfo -b)` in
29182                 (x64)
29183                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29184                         ;;
29185                 (x32)
29186                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29187                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29188                         ;;
29189                 (*)
29190                         { echo "$as_me:29190: WARNING: problem with Solaris architecture" >&5
29191 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29192                         ;;
29193                 esac
29194         fi
29195 fi
29196
29197 if test -z "$cf_pathlist"
29198 then
29199         # HP-UX
29200         if test x"`uname -s`" = xHP-UX
29201         then
29202                 case x`getconf LONG_BIT` in
29203                 (x64)
29204                         cf_pathlist="/usr/lib/hpux64"
29205                         ;;
29206                 (x*)
29207                         cf_pathlist="/usr/lib/hpux32"
29208                         ;;
29209                 esac
29210         fi
29211 fi
29212
29213 fi
29214
29215 # If nothing else, assume it is conventional
29216 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29217
29218 # Finally, check that this is only directories
29219 for cf_path in $0 $cf_pathlist
29220 do
29221         if test -d "$cf_path"; then
29222                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29223                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29224         fi
29225 done
29226
29227 # Ensure that it is nonempty
29228 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29229
29230 fi
29231 echo "$as_me:29231: result: $cf_cv_ld_searchpath" >&5
29232 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29233
29234 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29235
29236 cat >>confdefs.h <<\EOF
29237 #define HAVE_CURSES_DATA_BOOLNAMES 1
29238 EOF
29239
29240 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"
29241 ac_config_commands="$ac_config_commands default"
29242 cat >confcache <<\_ACEOF
29243 # This file is a shell script that caches the results of configure
29244 # tests run on this system so they can be shared between configure
29245 # scripts and configure runs, see configure's option --config-cache.
29246 # It is not useful on other systems.  If it contains results you don't
29247 # want to keep, you may remove or edit it.
29248 #
29249 # config.status only pays attention to the cache file if you give it
29250 # the --recheck option to rerun configure.
29251 #
29252 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29253 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29254 # following values.
29255
29256 _ACEOF
29257
29258 # The following way of writing the cache mishandles newlines in values,
29259 # but we know of no workaround that is simple, portable, and efficient.
29260 # So, don't put newlines in cache variables' values.
29261 # Ultrix sh set writes to stderr and can't be redirected directly,
29262 # and sets the high bit in the cache file unless we assign to the vars.
29263 {
29264   (set) 2>&1 |
29265     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29266     *ac_space=\ *)
29267       # `set' does not quote correctly, so add quotes (double-quote
29268       # substitution turns \\\\ into \\, and sed turns \\ into \).
29269       sed -n \
29270         "s/'/'\\\\''/g;
29271           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29272       ;;
29273     *)
29274       # `set' quotes correctly as required by POSIX, so do not add quotes.
29275       sed -n \
29276         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29277       ;;
29278     esac;
29279 } |
29280   sed '
29281      t clear
29282      : clear
29283      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29284      t end
29285      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29286      : end' >>confcache
29287 if cmp -s $cache_file confcache; then :; else
29288   if test -w $cache_file; then
29289     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29290     cat confcache >$cache_file
29291   else
29292     echo "not updating unwritable cache $cache_file"
29293   fi
29294 fi
29295 rm -f confcache
29296
29297 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29298 # Let make expand exec_prefix.
29299 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29300
29301 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29302 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29303 # trailing colons and then remove the whole line if VPATH becomes empty
29304 # (actually we leave an empty line to preserve line numbers).
29305 if test "x$srcdir" = x.; then
29306   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29307 s/:*\$(srcdir):*/:/;
29308 s/:*\${srcdir}:*/:/;
29309 s/:*@srcdir@:*/:/;
29310 s/^\([^=]*=[    ]*\):*/\1/;
29311 s/:*$//;
29312 s/^[^=]*=[      ]*$//;
29313 }'
29314 fi
29315
29316 DEFS=-DHAVE_CONFIG_H
29317
29318 : "${CONFIG_STATUS=./config.status}"
29319 ac_clean_files_save=$ac_clean_files
29320 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29321 { echo "$as_me:29321: creating $CONFIG_STATUS" >&5
29322 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29323 cat >"$CONFIG_STATUS" <<_ACEOF
29324 #! $SHELL
29325 # Generated automatically by configure.
29326 # Run this file to recreate the current configuration.
29327 # Compiler output produced by configure, useful for debugging
29328 # configure, is in config.log if it exists.
29329
29330 debug=false
29331 SHELL=\${CONFIG_SHELL-$SHELL}
29332 ac_cs_invocation="\$0 \$@"
29333
29334 CLICOLOR_FORCE= GREP_OPTIONS=
29335 unset CLICOLOR_FORCE GREP_OPTIONS
29336 _ACEOF
29337
29338 cat >>"$CONFIG_STATUS" <<\_ACEOF
29339 # Be Bourne compatible
29340 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29341   emulate sh
29342   NULLCMD=:
29343 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29344   set -o posix
29345 fi
29346
29347 # Name of the executable.
29348 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29349
29350 if expr a : '\(a\)' >/dev/null 2>&1; then
29351   as_expr=expr
29352 else
29353   as_expr=false
29354 fi
29355
29356 rm -f conf$$ conf$$.exe conf$$.file
29357 echo >conf$$.file
29358 if ln -s conf$$.file conf$$ 2>/dev/null; then
29359   # We could just check for DJGPP; but this test a) works b) is more generic
29360   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29361   if test -f conf$$.exe; then
29362     # Don't use ln at all; we don't have any links
29363     as_ln_s='cp -p'
29364   else
29365     as_ln_s='ln -s'
29366   fi
29367 elif ln conf$$.file conf$$ 2>/dev/null; then
29368   as_ln_s=ln
29369 else
29370   as_ln_s='cp -p'
29371 fi
29372 rm -f conf$$ conf$$.exe conf$$.file
29373
29374 as_executable_p="test -f"
29375
29376 # Support unset when possible.
29377 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29378   as_unset="unset"
29379 else
29380   as_unset="false"
29381 fi
29382
29383 # NLS nuisances.
29384 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29385 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29386 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29387 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29388 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29389 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29390 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29391 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29392
29393 # IFS
29394 # We need space, tab and new line, in precisely that order.
29395 as_nl='
29396 '
29397 IFS="   $as_nl"
29398
29399 # CDPATH.
29400 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29401
29402 exec 6>&1
29403
29404 _ACEOF
29405
29406 # Files that config.status was made for.
29407 if test -n "$ac_config_files"; then
29408   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29409 fi
29410
29411 if test -n "$ac_config_headers"; then
29412   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29413 fi
29414
29415 if test -n "$ac_config_links"; then
29416   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29417 fi
29418
29419 if test -n "$ac_config_commands"; then
29420   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29421 fi
29422
29423 cat >>"$CONFIG_STATUS" <<\EOF
29424
29425 ac_cs_usage="\
29426 \`$as_me' instantiates files from templates according to the
29427 current configuration.
29428
29429 Usage: $0 [OPTIONS] [FILE]...
29430
29431   -h, --help       print this help, then exit
29432   -V, --version    print version number, then exit
29433   -d, --debug      don't remove temporary files
29434       --recheck    update $as_me by reconfiguring in the same conditions
29435   --file=FILE[:TEMPLATE]
29436                    instantiate the configuration file FILE
29437   --header=FILE[:TEMPLATE]
29438                    instantiate the configuration header FILE
29439
29440 Configuration files:
29441 $config_files
29442
29443 Configuration headers:
29444 $config_headers
29445
29446 Configuration commands:
29447 $config_commands
29448
29449 Report bugs to <dickey@invisible-island.net>."
29450 EOF
29451
29452 cat >>"$CONFIG_STATUS" <<EOF
29453 ac_cs_version="\\
29454 config.status
29455 configured by $0, generated by GNU Autoconf 2.52.20210509,
29456   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29457
29458 Copyright 2003-2020,2021        Thomas E. Dickey
29459 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29460 Free Software Foundation, Inc.
29461 This config.status script is free software; the Free Software Foundation
29462 gives unlimited permission to copy, distribute and modify it."
29463 srcdir="$srcdir"
29464 INSTALL="$INSTALL"
29465 EOF
29466
29467 cat >>"$CONFIG_STATUS" <<\EOF
29468 # If no file are specified by the user, then we need to provide default
29469 # value.  By we need to know if files were specified by the user.
29470 ac_need_defaults=:
29471 while test $# != 0
29472 do
29473   case $1 in
29474   --*=*)
29475     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29476     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29477     shift
29478     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29479     shift
29480     ;;
29481   -*);;
29482   *) # This is not an option, so the user has probably given explicit
29483      # arguments.
29484      ac_need_defaults=false;;
29485   esac
29486
29487   case $1 in
29488   # Handling of the options.
29489 EOF
29490 cat >>"$CONFIG_STATUS" <<EOF
29491   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29492     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29493     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29494 EOF
29495 cat >>"$CONFIG_STATUS" <<\EOF
29496   --version | --vers* | -V )
29497     echo "$ac_cs_version"; exit 0 ;;
29498   --he | --h)
29499     # Conflict between --help and --header
29500     { { echo "$as_me:29500: error: ambiguous option: $1
29501 Try \`$0 --help' for more information." >&5
29502 echo "$as_me: error: ambiguous option: $1
29503 Try \`$0 --help' for more information." >&2;}
29504    { (exit 1); exit 1; }; };;
29505   --help | --hel | -h )
29506     echo "$ac_cs_usage"; exit 0 ;;
29507   --debug | --d* | -d )
29508     debug=: ;;
29509   --file | --fil | --fi | --f )
29510     shift
29511     CONFIG_FILES="$CONFIG_FILES $1"
29512     ac_need_defaults=false;;
29513   --header | --heade | --head | --hea )
29514     shift
29515     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29516     ac_need_defaults=false;;
29517
29518   # This is an error.
29519   -*) { { echo "$as_me:29519: error: unrecognized option: $1
29520 Try \`$0 --help' for more information." >&5
29521 echo "$as_me: error: unrecognized option: $1
29522 Try \`$0 --help' for more information." >&2;}
29523    { (exit 1); exit 1; }; } ;;
29524
29525   *) ac_config_targets="$ac_config_targets $1" ;;
29526
29527   esac
29528   shift
29529 done
29530
29531 exec 5>>config.log
29532 cat >&5 << _ACEOF
29533
29534 ## ----------------------- ##
29535 ## Running config.status.  ##
29536 ## ----------------------- ##
29537
29538 This file was extended by $as_me 2.52.20210509, executed with
29539   CONFIG_FILES    = $CONFIG_FILES
29540   CONFIG_HEADERS  = $CONFIG_HEADERS
29541   CONFIG_LINKS    = $CONFIG_LINKS
29542   CONFIG_COMMANDS = $CONFIG_COMMANDS
29543   > "$ac_cs_invocation"
29544 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29545
29546 _ACEOF
29547 EOF
29548
29549 cat >>"$CONFIG_STATUS" <<EOF
29550 #
29551 # INIT-COMMANDS section.
29552 #
29553
29554 ### Special initialization commands, used to pass information from the
29555 ### configuration-run into config.status
29556
29557 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29558 AWK="$AWK"
29559 CXX_NAME="$CXX_NAME"
29560 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29561 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29562 ECHO_LD="$ECHO_LD"
29563 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29564 FORM_NAME="$FORM_NAME"
29565 LDCONFIG="$LDCONFIG"
29566 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29567 LIB_NAME="$LIB_NAME"
29568 LIB_PREFIX="$LIB_PREFIX"
29569 LIB_SUBSETS="$LIB_SUBSETS"
29570 LIB_SUFFIX="$LIB_SUFFIX"
29571 LIB_TRACING="$LIB_TRACING"
29572 LN_S="$LN_S"
29573 MAKE_TERMINFO="$MAKE_TERMINFO"
29574 MENU_NAME="$MENU_NAME"
29575 NCURSES_MAJOR="$NCURSES_MAJOR"
29576 NCURSES_MINOR="$NCURSES_MINOR"
29577 NCURSES_OSPEED="$NCURSES_OSPEED"
29578 NCURSES_PATCH="$NCURSES_PATCH"
29579 PANEL_NAME="$PANEL_NAME"
29580 SRC_SUBDIRS="$SRC_SUBDIRS"
29581 TERMINFO="$TERMINFO"
29582 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29583 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29584 TICS_NAME="$TICS_NAME"
29585 TICS_SUFFIX="$TICS_SUFFIX"
29586 TIC_PATH="$TIC_PATH"
29587 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29588 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29589 TINFO_NAME="$TINFO_NAME"
29590 TINFO_SUFFIX="$TINFO_SUFFIX"
29591 UNALTERED_SYMS="$UNALTERED_SYMS"
29592 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29593 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29594 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29595 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29596 WILDCARD_SYMS="$WILDCARD_SYMS"
29597 WITH_CURSES_H="$with_curses_h"
29598 WITH_ECHO="${enable_echo:=yes}"
29599 WITH_OVERWRITE="$with_overwrite"
29600 cf_LIST_MODELS="$cf_list_models"
29601 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29602 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29603 cf_cv_abi_version="$cf_cv_abi_version"
29604 cf_cv_do_relink="$cf_cv_do_relink"
29605 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29606 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29607 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29608 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29609 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29610 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29611 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29612 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29613 cf_cv_rel_version="$cf_cv_rel_version"
29614 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29615 cf_cv_shared_soname='$cf_cv_shared_soname'
29616 cf_cv_shlib_version="$cf_cv_shlib_version"
29617 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29618 cf_cv_system_name="$cf_cv_system_name"
29619 cf_cv_term_driver="$with_term_driver"
29620 cf_with_ada="$cf_with_ada"
29621 cf_with_cxx_binding="$cf_with_cxx_binding"
29622 cf_with_db_install="$cf_with_db_install"
29623 cf_with_manpages="$cf_with_manpages"
29624 cf_with_tests="$cf_with_tests"
29625 host="$host"
29626 target="$target"
29627 with_shared_cxx="$with_shared_cxx"
29628
29629 EOF
29630
29631 cat >>"$CONFIG_STATUS" <<\EOF
29632 for ac_config_target in $ac_config_targets
29633 do
29634   case "$ac_config_target" in
29635   # Handling of arguments.
29636   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29637   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29638   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29639   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29640   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29641   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29642   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29643   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29644   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29645   *) { { echo "$as_me:29645: error: invalid argument: $ac_config_target" >&5
29646 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29647    { (exit 1); exit 1; }; };;
29648   esac
29649 done
29650
29651 # If the user did not use the arguments to specify the items to instantiate,
29652 # then the envvar interface is used.  Set only those that are not.
29653 # We use the long form for the default assignment because of an extremely
29654 # bizarre bug on SunOS 4.1.3.
29655 if "$ac_need_defaults"; then
29656   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29657   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29658   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29659 fi
29660
29661 # Create a temporary directory, and hook for its removal unless debugging.
29662 $debug ||
29663 {
29664   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29665   trap '{ (exit 1); exit 1; }' 1 2 13 15
29666 }
29667
29668 # Create a (secure) tmp directory for tmp files.
29669 : ${TMPDIR=/tmp}
29670 {
29671   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29672   test -n "$tmp" && test -d "$tmp"
29673 }  ||
29674 {
29675   tmp=$TMPDIR/cs$$-$RANDOM
29676   (umask 077 && mkdir $tmp)
29677 } ||
29678 {
29679    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29680    { (exit 1); exit 1; }
29681 }
29682
29683 EOF
29684
29685 cat >>"$CONFIG_STATUS" <<EOF
29686
29687 #
29688 # CONFIG_FILES section.
29689 #
29690
29691 # No need to generate the scripts if there are no CONFIG_FILES.
29692 # This happens for instance when ./config.status config.h
29693 if test -n "\$CONFIG_FILES"; then
29694   # Protect against being on the right side of a sed subst in config.status.
29695   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29696    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29697 s,@SHELL@,$SHELL,;t t
29698 s,@exec_prefix@,$exec_prefix,;t t
29699 s,@prefix@,$prefix,;t t
29700 s,@program_transform_name@,$program_transform_name,;t t
29701 s,@bindir@,$bindir,;t t
29702 s,@sbindir@,$sbindir,;t t
29703 s,@libexecdir@,$libexecdir,;t t
29704 s,@datarootdir@,$datarootdir,;t t
29705 s,@datadir@,$datadir,;t t
29706 s,@sysconfdir@,$sysconfdir,;t t
29707 s,@sharedstatedir@,$sharedstatedir,;t t
29708 s,@localstatedir@,$localstatedir,;t t
29709 s,@runstatedir@,$runstatedir,;t t
29710 s,@libdir@,$libdir,;t t
29711 s,@includedir@,$includedir,;t t
29712 s,@oldincludedir@,$oldincludedir,;t t
29713 s,@infodir@,$infodir,;t t
29714 s,@mandir@,$mandir,;t t
29715 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29716 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29717 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29718 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29719 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29720 s,@build_alias@,$build_alias,;t t
29721 s,@host_alias@,$host_alias,;t t
29722 s,@target_alias@,$target_alias,;t t
29723 s,@ECHO_C@,$ECHO_C,;t t
29724 s,@ECHO_N@,$ECHO_N,;t t
29725 s,@ECHO_T@,$ECHO_T,;t t
29726 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29727 s,@DEFS@,$DEFS,;t t
29728 s,@LIBS@,$LIBS,;t t
29729 s,@top_builddir@,$top_builddir,;t t
29730 s,@GREP@,$GREP,;t t
29731 s,@EGREP@,$EGREP,;t t
29732 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29733 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29734 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29735 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29736 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29737 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29738 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29739 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29740 s,@VERSION@,$VERSION,;t t
29741 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29742 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29743 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29744 s,@PACKAGE@,$PACKAGE,;t t
29745 s,@build@,$build,;t t
29746 s,@build_cpu@,$build_cpu,;t t
29747 s,@build_vendor@,$build_vendor,;t t
29748 s,@build_os@,$build_os,;t t
29749 s,@host@,$host,;t t
29750 s,@host_cpu@,$host_cpu,;t t
29751 s,@host_vendor@,$host_vendor,;t t
29752 s,@host_os@,$host_os,;t t
29753 s,@target@,$target,;t t
29754 s,@target_cpu@,$target_cpu,;t t
29755 s,@target_vendor@,$target_vendor,;t t
29756 s,@target_os@,$target_os,;t t
29757 s,@FGREP@,$FGREP,;t t
29758 s,@CC@,$CC,;t t
29759 s,@CFLAGS@,$CFLAGS,;t t
29760 s,@LDFLAGS@,$LDFLAGS,;t t
29761 s,@CPPFLAGS@,$CPPFLAGS,;t t
29762 s,@ac_ct_CC@,$ac_ct_CC,;t t
29763 s,@EXEEXT@,$EXEEXT,;t t
29764 s,@OBJEXT@,$OBJEXT,;t t
29765 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29766 s,@CPP@,$CPP,;t t
29767 s,@LDCONFIG@,$LDCONFIG,;t t
29768 s,@CXX@,$CXX,;t t
29769 s,@CXXFLAGS@,$CXXFLAGS,;t t
29770 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29771 s,@AWK@,$AWK,;t t
29772 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29773 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29774 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29775 s,@LINT@,$LINT,;t t
29776 s,@LINT_OPTS@,$LINT_OPTS,;t t
29777 s,@LINT_LIBS@,$LINT_LIBS,;t t
29778 s,@LN_S@,$LN_S,;t t
29779 s,@cf_config_suffix@,$cf_config_suffix,;t t
29780 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29781 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29782 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29783 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29784 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29785 s,@SET_MAKE@,$SET_MAKE,;t t
29786 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29787 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29788 s,@CTAGS@,$CTAGS,;t t
29789 s,@ETAGS@,$ETAGS,;t t
29790 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29791 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29792 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29793 s,@RANLIB@,$RANLIB,;t t
29794 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29795 s,@LD@,$LD,;t t
29796 s,@ac_ct_LD@,$ac_ct_LD,;t t
29797 s,@AR@,$AR,;t t
29798 s,@ac_ct_AR@,$ac_ct_AR,;t t
29799 s,@NM@,$NM,;t t
29800 s,@ac_ct_NM@,$ac_ct_NM,;t t
29801 s,@ARFLAGS@,$ARFLAGS,;t t
29802 s,@DESTDIR@,$DESTDIR,;t t
29803 s,@BUILD_CC@,$BUILD_CC,;t t
29804 s,@BUILD_CPP@,$BUILD_CPP,;t t
29805 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29806 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29807 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29808 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29809 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29810 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29811 s,@cf_list_models@,$cf_list_models,;t t
29812 s,@ABI_VERSION@,$ABI_VERSION,;t t
29813 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29814 s,@LIBTOOL@,$LIBTOOL,;t t
29815 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29816 s,@LT_UNDEF@,$LT_UNDEF,;t t
29817 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29818 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29819 s,@LIB_CREATE@,$LIB_CREATE,;t t
29820 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29821 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29822 s,@LIB_PREP@,$LIB_PREP,;t t
29823 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29824 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29825 s,@LIB_LINK@,$LIB_LINK,;t t
29826 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29827 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29828 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29829 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29830 s,@TICS_NAME@,$TICS_NAME,;t t
29831 s,@TINFO_NAME@,$TINFO_NAME,;t t
29832 s,@LIB_NAME@,$LIB_NAME,;t t
29833 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29834 s,@CC_G_OPT@,$CC_G_OPT,;t t
29835 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29836 s,@LD_MODEL@,$LD_MODEL,;t t
29837 s,@shlibdir@,$shlibdir,;t t
29838 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29839 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29840 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29841 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29842 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29843 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29844 s,@LINK_PROGS@,$LINK_PROGS,;t t
29845 s,@LINK_TESTS@,$LINK_TESTS,;t t
29846 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29847 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29848 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29849 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29850 s,@RPATH_LIST@,$RPATH_LIST,;t t
29851 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29852 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29853 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29854 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29855 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29856 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29857 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29858 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29859 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29860 s,@TIC@,$TIC,;t t
29861 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29862 s,@INFOCMP@,$INFOCMP,;t t
29863 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29864 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29865 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29866 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29867 s,@XTERM_KBS@,$XTERM_KBS,;t t
29868 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29869 s,@TERMINFO@,$TERMINFO,;t t
29870 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29871 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29872 s,@TERMPATH@,$TERMPATH,;t t
29873 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29874 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29875 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29876 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29877 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29878 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29879 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29880 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29881 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29882 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29883 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29884 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29885 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29886 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29887 s,@RGB_PATH@,$RGB_PATH,;t t
29888 s,@no_x11_rgb@,$no_x11_rgb,;t t
29889 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29890 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29891 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29892 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29893 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29894 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29895 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29896 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29897 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29898 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29899 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29900 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29901 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29902 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29903 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29904 s,@PTHREAD@,$PTHREAD,;t t
29905 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29906 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29907 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29908 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29909 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29910 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29911 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29912 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29913 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29914 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29915 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29916 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29917 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29918 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29919 s,@ECHO_LT@,$ECHO_LT,;t t
29920 s,@ECHO_LD@,$ECHO_LD,;t t
29921 s,@RULE_CC@,$RULE_CC,;t t
29922 s,@SHOW_CC@,$SHOW_CC,;t t
29923 s,@ECHO_CC@,$ECHO_CC,;t t
29924 s,@ECHO_LINK@,$ECHO_LINK,;t t
29925 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29926 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29927 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29928 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29929 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29930 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29931 s,@ADAFLAGS@,$ADAFLAGS,;t t
29932 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29933 s,@ADA_TRACE@,$ADA_TRACE,;t t
29934 s,@MATH_LIB@,$MATH_LIB,;t t
29935 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29936 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29937 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29938 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29939 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29940 s,@TEST_LIBS@,$TEST_LIBS,;t t
29941 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29942 s,@CXXCPP@,$CXXCPP,;t t
29943 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29944 s,@CXX_AR@,$CXX_AR,;t t
29945 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29946 s,@CXXLIBS@,$CXXLIBS,;t t
29947 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29948 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29949 s,@M4_exists@,$M4_exists,;t t
29950 s,@cf_ada_make@,$cf_ada_make,;t t
29951 s,@cf_ada_config@,$cf_ada_config,;t t
29952 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29953 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29954 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29955 s,@cf_compile_generics@,$cf_compile_generics,;t t
29956 s,@cf_generic_objects@,$cf_generic_objects,;t t
29957 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29958 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29959 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29960 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29961 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29962 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29963 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29964 s,@cf_ada_package@,$cf_ada_package,;t t
29965 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29966 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29967 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29968 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29969 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29970 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29971 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29972 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29973 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29974 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29975 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29976 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29977 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29978 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29979 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29980 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29981 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29982 s,@TICS_LIBS@,$TICS_LIBS,;t t
29983 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29984 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29985 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29986 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29987 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29988 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29989 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29990 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29991 s,@includesubdir@,$includesubdir,;t t
29992 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29993 s,@TICS_LIST@,$TICS_LIST,;t t
29994 s,@TINFO_LIST@,$TINFO_LIST,;t t
29995 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29996 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29997 s,@FORM_NAME@,$FORM_NAME,;t t
29998 s,@MENU_NAME@,$MENU_NAME,;t t
29999 s,@PANEL_NAME@,$PANEL_NAME,;t t
30000 s,@CXX_NAME@,$CXX_NAME,;t t
30001 s,@TEST_ARGS@,$TEST_ARGS,;t t
30002 s,@TEST_DEPS@,$TEST_DEPS,;t t
30003 s,@TEST_ARG2@,$TEST_ARG2,;t t
30004 s,@TEST_DEP2@,$TEST_DEP2,;t t
30005 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30006 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30007 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30008 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30009 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30010 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30011 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30012 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30013 s,@cross_compiling@,$cross_compiling,;t t
30014 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30015 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30016 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30017 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30018 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30019 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30020 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30021 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30022 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30023 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30024 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30025 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30026 CEOF
30027
30028 EOF
30029
30030   cat >>"$CONFIG_STATUS" <<\EOF
30031   # Split the substitutions into bite-sized pieces for seds with
30032   # small command number limits, like on Digital OSF/1 and HP-UX.
30033   ac_max_sed_lines=48
30034   ac_sed_frag=1 # Number of current file.
30035   ac_beg=1 # First line for current file.
30036   ac_end=$ac_max_sed_lines # Line after last line for current file.
30037   ac_more_lines=:
30038   ac_sed_cmds=
30039   while "$ac_more_lines"; do
30040     if test "$ac_beg" -gt 1; then
30041       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30042     else
30043       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
30044     fi
30045     if test ! -s $tmp/subs.frag; then
30046       ac_more_lines=false
30047     else
30048       # The purpose of the label and of the branching condition is to
30049       # speed up the sed processing (if there are no `@' at all, there
30050       # is no need to browse any of the substitutions).
30051       # These are the two extra sed commands mentioned above.
30052       (echo ':t
30053   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
30054       # It is possible to make a multiline substitution using escaped newlines.
30055       # Ensure that we do not split the substitution between script fragments.
30056       ac_BEG=$ac_end
30057       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30058       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
30059       if test -s $tmp/subs.next; then
30060         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
30061         if test ! -s $tmp/subs.edit; then
30062           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
30063           if test ! -s $tmp/subs.edit; then
30064             if test "$ac_beg" -gt 1; then
30065               ac_end=`expr "$ac_end" - 1`
30066               continue
30067             fi
30068           fi
30069         fi
30070       fi
30071
30072       if test -z "$ac_sed_cmds"; then
30073         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
30074       else
30075         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
30076       fi
30077       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30078       ac_beg=$ac_end
30079       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30080     fi
30081   done
30082   if test -z "$ac_sed_cmds"; then
30083     ac_sed_cmds=cat
30084   fi
30085 fi # test -n "$CONFIG_FILES"
30086
30087 EOF
30088 cat >>"$CONFIG_STATUS" <<\EOF
30089 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30090   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30091   case "$ac_file" in
30092   - | *:- | *:-:* ) # input from stdin
30093         cat >$tmp/stdin
30094         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30095         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30096   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30097         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30098   * )   ac_file_in=$ac_file.in ;;
30099   esac
30100
30101   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30102   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30103          X"$ac_file" : 'X\(//\)[^/]' \| \
30104          X"$ac_file" : 'X\(//\)$' \| \
30105          X"$ac_file" : 'X\(/\)' \| \
30106          .     : '\(.\)' 2>/dev/null ||
30107 echo X"$ac_file" |
30108     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30109           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30110           /^X\(\/\/\)$/{ s//\1/; q; }
30111           /^X\(\/\).*/{ s//\1/; q; }
30112           s/.*/./; q'`
30113   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30114     { case "$ac_dir" in
30115   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30116   *)                      as_incr_dir=.;;
30117 esac
30118 as_dummy="$ac_dir"
30119 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30120   case $as_mkdir_dir in
30121     # Skip DOS drivespec
30122     ?:) as_incr_dir=$as_mkdir_dir ;;
30123     *)
30124       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30125       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30126     ;;
30127   esac
30128 done; }
30129
30130     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
30131     # A "../" for each directory in $ac_dir_suffix.
30132     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30133   else
30134     ac_dir_suffix= ac_dots=
30135   fi
30136
30137   case "$srcdir" in
30138   .)  ac_srcdir=.
30139       if test -z "$ac_dots"; then
30140          ac_top_srcdir=.
30141       else
30142          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30143       fi ;;
30144   [\\/]* | ?:[\\/]* )
30145       ac_srcdir="$srcdir$ac_dir_suffix";
30146       ac_top_srcdir="$srcdir" ;;
30147   *) # Relative path.
30148     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30149     ac_top_srcdir="$ac_dots$srcdir" ;;
30150   esac
30151
30152   case $INSTALL in
30153   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30154   *) ac_INSTALL=$ac_dots$INSTALL ;;
30155   esac
30156
30157   if test x"$ac_file" != x-; then
30158     { echo "$as_me:30158: creating $ac_file" >&5
30159 echo "$as_me: creating $ac_file" >&6;}
30160     rm -f "$ac_file"
30161   fi
30162   # Let's still pretend it is `configure' which instantiates (i.e., don't
30163   # use $as_me), people would be surprised to read:
30164   #    /* config.h.  Generated automatically by config.status.  */
30165   configure_input="Generated automatically from `echo $ac_file_in |
30166                                                  sed 's,.*/,,'` by configure."
30167
30168   # First look for the input files in the build tree, otherwise in the
30169   # src tree.
30170   ac_file_inputs=`IFS=:
30171     for f in $ac_file_in; do
30172       case $f in
30173       -) echo $tmp/stdin ;;
30174       [\\/$]*)
30175          # Absolute (can't be DOS-style, as IFS=:)
30176          test -f "$f" || { { echo "$as_me:30176: error: cannot find input file: $f" >&5
30177 echo "$as_me: error: cannot find input file: $f" >&2;}
30178    { (exit 1); exit 1; }; }
30179          echo $f;;
30180       *) # Relative
30181          if test -f "$f"; then
30182            # Build tree
30183            echo $f
30184          elif test -f "$srcdir/$f"; then
30185            # Source tree
30186            echo "$srcdir/$f"
30187          else
30188            # /dev/null tree
30189            { { echo "$as_me:30189: error: cannot find input file: $f" >&5
30190 echo "$as_me: error: cannot find input file: $f" >&2;}
30191    { (exit 1); exit 1; }; }
30192          fi;;
30193       esac
30194     done` || { (exit 1); exit 1; }
30195 EOF
30196 cat >>"$CONFIG_STATUS" <<\EOF
30197   ac_warn_datarootdir=no
30198   if test x"$ac_file" != x-; then
30199     for ac_item in $ac_file_inputs
30200     do
30201       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30202       if test -n "$ac_seen"; then
30203         ac_used=`grep '@datarootdir@' "$ac_item"`
30204         if test -z "$ac_used"; then
30205           { echo "$as_me:30205: WARNING: datarootdir was used implicitly but not set:
30206 $ac_seen" >&5
30207 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30208 $ac_seen" >&2;}
30209           ac_warn_datarootdir=yes
30210         fi
30211       fi
30212       ac_seen=`grep '${datarootdir}' "$ac_item"`
30213       if test -n "$ac_seen"; then
30214         { echo "$as_me:30214: WARNING: datarootdir was used explicitly but not set:
30215 $ac_seen" >&5
30216 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30217 $ac_seen" >&2;}
30218         ac_warn_datarootdir=yes
30219       fi
30220     done
30221   fi
30222
30223 if test "x$ac_warn_datarootdir" = xyes; then
30224   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30225 fi
30226
30227 EOF
30228 cat >>"$CONFIG_STATUS" <<EOF
30229   sed "$ac_vpsub
30230 $extrasub
30231 EOF
30232 cat >>"$CONFIG_STATUS" <<\EOF
30233 :t
30234 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30235 s,@configure_input@,$configure_input,;t t
30236 s,@srcdir@,$ac_srcdir,;t t
30237 s,@top_srcdir@,$ac_top_srcdir,;t t
30238 s,@INSTALL@,$ac_INSTALL,;t t
30239 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30240   rm -f $tmp/stdin
30241   if test x"$ac_file" != x-; then
30242     cp "$tmp/out" "$ac_file"
30243
30244     for ac_name in prefix exec_prefix datarootdir
30245     do
30246         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30247         if test -n "$ac_seen"; then
30248             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30249             if test -z "$ac_init"; then
30250               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30251               { echo "$as_me:30251: WARNING: Variable $ac_name is used but was not set:
30252 $ac_seen" >&5
30253 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30254 $ac_seen" >&2;}
30255             fi
30256         fi
30257     done
30258     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30259     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30260     if test -s $tmp/out; then
30261       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30262       { echo "$as_me:30262: WARNING: Some variables may not be substituted:
30263 $ac_seen" >&5
30264 echo "$as_me: WARNING: Some variables may not be substituted:
30265 $ac_seen" >&2;}
30266     fi
30267   else
30268     cat $tmp/out
30269   fi
30270   rm -f $tmp/out
30271
30272 done
30273 EOF
30274 cat >>"$CONFIG_STATUS" <<\EOF
30275
30276 #
30277 # CONFIG_HEADER section.
30278 #
30279
30280 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30281 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30282 #
30283 # ac_d sets the value in "#define NAME VALUE" lines.
30284 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30285 ac_dB='[        ].*$,\1#\2'
30286 ac_dC=' '
30287 ac_dD=',;t'
30288 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30289 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30290 ac_iB='\([      ]\),\1#\2define\3'
30291 ac_iC=' '
30292 ac_iD='\4,;t'
30293 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30294 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30295 ac_uB='$,\1#\2define\3'
30296 ac_uC=' '
30297 ac_uD=',;t'
30298
30299 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30300   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30301   case "$ac_file" in
30302   - | *:- | *:-:* ) # input from stdin
30303         cat >$tmp/stdin
30304         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30305         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30306   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30307         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30308   * )   ac_file_in=$ac_file.in ;;
30309   esac
30310
30311   test x"$ac_file" != x- && { echo "$as_me:30311: creating $ac_file" >&5
30312 echo "$as_me: creating $ac_file" >&6;}
30313
30314   # First look for the input files in the build tree, otherwise in the
30315   # src tree.
30316   ac_file_inputs=`IFS=:
30317     for f in $ac_file_in; do
30318       case $f in
30319       -) echo $tmp/stdin ;;
30320       [\\/$]*)
30321          # Absolute (can't be DOS-style, as IFS=:)
30322          test -f "$f" || { { echo "$as_me:30322: error: cannot find input file: $f" >&5
30323 echo "$as_me: error: cannot find input file: $f" >&2;}
30324    { (exit 1); exit 1; }; }
30325          echo $f;;
30326       *) # Relative
30327          if test -f "$f"; then
30328            # Build tree
30329            echo $f
30330          elif test -f "$srcdir/$f"; then
30331            # Source tree
30332            echo "$srcdir/$f"
30333          else
30334            # /dev/null tree
30335            { { echo "$as_me:30335: error: cannot find input file: $f" >&5
30336 echo "$as_me: error: cannot find input file: $f" >&2;}
30337    { (exit 1); exit 1; }; }
30338          fi;;
30339       esac
30340     done` || { (exit 1); exit 1; }
30341   # Remove the trailing spaces.
30342   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30343
30344 EOF
30345
30346 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30347 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30348 # be either 'cat' or 'sort'.
30349 cat confdefs.h | uniq >conftest.vals
30350
30351 # Break up conftest.vals because some shells have a limit on
30352 # the size of here documents, and old seds have small limits too.
30353
30354 rm -f conftest.tail
30355 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30356 while grep . conftest.vals >/dev/null
30357 do
30358   # Write chunks of a limited-size here document to conftest.frag.
30359   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30360   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30361   echo 'CEOF' >> "$CONFIG_STATUS"
30362   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30363   rm -f conftest.vals
30364   mv conftest.tail conftest.vals
30365 done
30366 rm -f conftest.vals
30367
30368 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30369 # marker @DEFS@.
30370 echo '  cat >> conftest.edit <<CEOF
30371 /@DEFS@/r conftest.frag
30372 /@DEFS@/d
30373 CEOF
30374 sed -f conftest.edit $tmp/in > $tmp/out
30375 rm -f $tmp/in
30376 mv $tmp/out $tmp/in
30377 rm -f conftest.edit conftest.frag
30378 ' >> "$CONFIG_STATUS"
30379
30380 cat >>"$CONFIG_STATUS" <<\EOF
30381   # Let's still pretend it is `configure' which instantiates (i.e., don't
30382   # use $as_me), people would be surprised to read:
30383   #    /* config.h.  Generated automatically by config.status.  */
30384   if test x"$ac_file" = x-; then
30385     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30386   else
30387     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30388   fi
30389   cat $tmp/in >>$tmp/config.h
30390   rm -f $tmp/in
30391   if test x"$ac_file" != x-; then
30392     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30393       { echo "$as_me:30393: $ac_file is unchanged" >&5
30394 echo "$as_me: $ac_file is unchanged" >&6;}
30395     else
30396       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30397          X"$ac_file" : 'X\(//\)[^/]' \| \
30398          X"$ac_file" : 'X\(//\)$' \| \
30399          X"$ac_file" : 'X\(/\)' \| \
30400          .     : '\(.\)' 2>/dev/null ||
30401 echo X"$ac_file" |
30402     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30403           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30404           /^X\(\/\/\)$/{ s//\1/; q; }
30405           /^X\(\/\).*/{ s//\1/; q; }
30406           s/.*/./; q'`
30407       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30408         { case "$ac_dir" in
30409   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30410   *)                      as_incr_dir=.;;
30411 esac
30412 as_dummy="$ac_dir"
30413 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30414   case $as_mkdir_dir in
30415     # Skip DOS drivespec
30416     ?:) as_incr_dir=$as_mkdir_dir ;;
30417     *)
30418       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30419       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30420     ;;
30421   esac
30422 done; }
30423
30424       fi
30425       rm -f "$ac_file"
30426       mv "$tmp/config.h" "$ac_file"
30427     fi
30428   else
30429     cat $tmp/config.h
30430     rm -f $tmp/config.h
30431   fi
30432 done
30433 EOF
30434 cat >>"$CONFIG_STATUS" <<\EOF
30435 #
30436 # CONFIG_COMMANDS section.
30437 #
30438 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30439   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30440   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30441
30442   case "$ac_dest" in
30443     default )
30444 if test "x$cf_with_tests" != xno ; then
30445
30446 for cf_dir in test
30447 do
30448         if test ! -d "$srcdir/$cf_dir" ; then
30449                 continue
30450         elif test -f "$srcdir/$cf_dir/programs" ; then
30451                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30452         fi
30453 done
30454
30455 fi
30456
30457 cf_prefix=$LIB_PREFIX
30458
30459 case "$cf_cv_shlib_version" in
30460 (cygdll|msysdll|mingw|msvcdll)
30461         TINFO_NAME=$TINFO_ARG_SUFFIX
30462         TINFO_SUFFIX=.dll
30463         ;;
30464 esac
30465
30466 if test -n "$TINFO_SUFFIX" ; then
30467         case "$TINFO_SUFFIX" in
30468         (tw*)
30469                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30470                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30471                 ;;
30472         (t*)
30473                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30474                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30475                 ;;
30476         (w*)
30477                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30478                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30479                 ;;
30480         esac
30481 fi
30482
30483 for cf_dir in $SRC_SUBDIRS
30484 do
30485         if test ! -d "$srcdir/$cf_dir" ; then
30486                 continue
30487         elif test -f "$srcdir/$cf_dir/modules" ; then
30488
30489                 SHARED_LIB=
30490                 Libs_To_Make=
30491                 cf_awk_program=
30492                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30493                 then
30494                         cf_awk_program="$cf_awk_program\
30495 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30496 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30497 "
30498                 fi
30499
30500                 if test "x$WILDCARD_SYMS" = xno
30501                 then
30502                         cf_awk_program="$cf_awk_program\
30503 /[      ]_\\*;/ { skip=1; next; }\
30504 "
30505                 fi
30506
30507                 if test "x$cf_awk_program" != "x"
30508                 then
30509                         cat >>$cf_dir/Makefile <<CF_EOF
30510
30511 # Generated by CF_LIB_RULES
30512 resulting.map: $UNALTERED_SYMS
30513         $AWK 'BEGIN { skip = 1; last=""; } \
30514 $cf_awk_program \
30515 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30516  skip = 0; last = \$\$0; } \
30517 END { print last; }' < "$UNALTERED_SYMS" >\$@
30518
30519 distclean::
30520         rm -f resulting.map
30521 CF_EOF
30522                 fi
30523
30524                 for cf_item in $cf_LIST_MODELS
30525                 do
30526
30527         case X$cf_item in
30528         (Xlibtool)
30529                 cf_suffix='.la'
30530                 cf_depsuf=$cf_suffix
30531                 ;;
30532         (Xdebug)
30533                 case "$cf_cv_system_name" in
30534                 (*-msvc*)
30535                         cf_suffix='_g.lib'
30536                         ;;
30537                 (*)
30538                         cf_suffix='_g.a'
30539                         ;;
30540                 esac
30541                 cf_depsuf=$cf_suffix
30542                 ;;
30543         (Xprofile)
30544                 case "$cf_cv_system_name" in
30545                 (*-msvc*)
30546                         cf_suffix='_p.lib'
30547                         ;;
30548                 (*)
30549                         cf_suffix='_p.a'
30550                         ;;
30551                 esac
30552                 cf_depsuf=$cf_suffix
30553                 ;;
30554         (Xshared)
30555                 case "$cf_cv_system_name" in
30556                 (aix[5-7]*)
30557                         cf_suffix='.so'
30558                         cf_depsuf=$cf_suffix
30559                         ;;
30560                 (*-msvc*)
30561                         cf_suffix='.dll'
30562                         cf_depsuf='.dll.lib'
30563                         ;;
30564                 (cygwin*|msys*|mingw*)
30565                         cf_suffix='.dll'
30566                         cf_depsuf='.dll.a'
30567                         ;;
30568                 (darwin*)
30569                         cf_suffix='.dylib'
30570                         cf_depsuf=$cf_suffix
30571                         ;;
30572                 (hpux*)
30573                         case "$target" in
30574                         (ia64*)
30575                                 cf_suffix='.so'
30576                                 cf_depsuf=$cf_suffix
30577                                 ;;
30578                         (*)
30579                                 cf_suffix='.sl'
30580                                 cf_depsuf=$cf_suffix
30581                                 ;;
30582                         esac
30583                         ;;
30584                 (*)
30585                         cf_suffix='.so'
30586                         cf_depsuf=$cf_suffix
30587                         ;;
30588                 esac
30589                 ;;
30590         (*)
30591                 case "$target" in
30592                 (*-msvc*)
30593                         cf_suffix='.lib'
30594                         ;;
30595                 (*)
30596                         cf_suffix='.a'
30597                         ;;
30598                 esac
30599                 cf_depsuf=$cf_suffix
30600                 ;;
30601         esac
30602         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30603         then
30604                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30605                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30606         fi
30607
30608                         if test "$cf_dir" = "c++"
30609                         then
30610
30611 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30612
30613 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30614
30615                         else
30616
30617 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30618
30619 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30620
30621                         fi
30622                         test -z "$cf_libname" && cf_libname="$cf_dir"
30623                         if test "$cf_item" = shared ; then
30624                                 if test -n "${LIB_SUFFIX}"
30625                                 then
30626                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30627                                 else
30628                                         cf_shared_suffix="$cf_suffix"
30629                                 fi
30630                                 if test "$cf_cv_do_symlinks" = yes ; then
30631                                         cf_version_name=
30632
30633                                         case "$cf_cv_shlib_version" in
30634                                         (rel)
30635                                                 cf_version_name=REL_VERSION
30636                                                 ;;
30637                                         (abi)
30638                                                 cf_version_name=ABI_VERSION
30639                                                 ;;
30640                                         esac
30641
30642                                         if test -n "$cf_version_name"
30643                                         then
30644                                                 case "$cf_cv_system_name" in
30645                                                 (darwin*)
30646                                                         # "w", etc?
30647                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30648                                                         ;;
30649                                                 (*)
30650                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30651                                                         ;;
30652                                                 esac
30653                                         fi
30654                                         if test -n "${USE_LIB_SUFFIX}"
30655                                         then
30656                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30657                                         else
30658                                                 cf_shared_suffix="$cf_suffix"
30659                                         fi
30660                                 fi
30661                                 # cygwin needs import library, and has unique naming convention
30662                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30663                                 # use 'cyg' prefix for shared lib.
30664                                 case "$cf_cv_shlib_version" in
30665                                 (cygdll)
30666                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30667                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30668                                         ;;
30669                                 (msysdll)
30670                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30671                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30672                                         ;;
30673                                 (mingw)
30674                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30675                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30676                                         ;;
30677                                 (msvcdll)
30678                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30679                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30680                                         ;;
30681                                 (*)
30682                                         cf_add_lib=
30683                                         ;;
30684                                 esac
30685                                 if test -n "$cf_add_lib"
30686                                 then
30687                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30688                                         continue
30689                                 fi
30690                         fi
30691                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30692                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30693                 done
30694
30695                 if test "$cf_dir" = ncurses ; then
30696                         cf_subsets="$LIB_SUBSETS"
30697                         cf_r_parts="$cf_subsets"
30698                         cf_liblist="$Libs_To_Make"
30699
30700                         while test -n "$cf_r_parts"
30701                         do
30702                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30703                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30704                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30705                                         cf_add_lib=
30706                                         case "$cf_l_parts" in
30707                                         (*termlib*)
30708                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30709                                                 ;;
30710                                         (*ticlib*)
30711                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30712                                                 ;;
30713                                         (*)
30714                                                 break
30715                                                 ;;
30716                                         esac
30717                                         if test -n "$cf_add_lib"; then
30718                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30719                                         fi
30720                                 else
30721                                         break
30722                                 fi
30723                         done
30724                 else
30725                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30726                 fi
30727
30728                 if test "$cf_dir" = c++; then
30729                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30730                                 cf_list=
30731                                 for cf_item in $Libs_To_Make
30732                                 do
30733                                         case "$cf_item" in
30734                                         (*.a)
30735                                                 ;;
30736                                         (*)
30737                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30738                                                 ;;
30739                                         esac
30740                                         for cf_test in $cf_list
30741                                         do
30742                                                 if test "$cf_test" = "$cf_item"
30743                                                 then
30744                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30745                                                         cf_item=
30746                                                         break
30747                                                 fi
30748                                         done
30749                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30750                                 done
30751                                 Libs_To_Make="$cf_list"
30752                         fi
30753                 fi
30754
30755                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30756                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30757                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30758                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30759
30760                 $AWK -f "$srcdir/mk-0th.awk" \
30761                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30762                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30763
30764                 for cf_subset in $cf_subsets
30765                 do
30766                         cf_subdirs=
30767                         for cf_item in $cf_LIST_MODELS
30768                         do
30769
30770                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30771
30772 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30773
30774                         CXX_MODEL=$cf_ITEM
30775                         if test "$CXX_MODEL" = SHARED; then
30776                                 case "$cf_cv_shlib_version" in
30777                                 (cygdll|msysdll|mingw|msvcdll)
30778                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30779
30780 echo "${as_me:-configure}:30780: testing overriding CXX_MODEL to SHARED ..." 1>&5
30781
30782                                         with_shared_cxx=yes
30783                                         ;;
30784                                 (*)
30785                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30786                                         ;;
30787                                 esac
30788                         fi
30789
30790         case X$cf_item in
30791         (Xlibtool)
30792                 cf_suffix='.la'
30793                 cf_depsuf=$cf_suffix
30794                 ;;
30795         (Xdebug)
30796                 case "$cf_cv_system_name" in
30797                 (*-msvc*)
30798                         cf_suffix='_g.lib'
30799                         ;;
30800                 (*)
30801                         cf_suffix='_g.a'
30802                         ;;
30803                 esac
30804                 cf_depsuf=$cf_suffix
30805                 ;;
30806         (Xprofile)
30807                 case "$cf_cv_system_name" in
30808                 (*-msvc*)
30809                         cf_suffix='_p.lib'
30810                         ;;
30811                 (*)
30812                         cf_suffix='_p.a'
30813                         ;;
30814                 esac
30815                 cf_depsuf=$cf_suffix
30816                 ;;
30817         (Xshared)
30818                 case "$cf_cv_system_name" in
30819                 (aix[5-7]*)
30820                         cf_suffix='.so'
30821                         cf_depsuf=$cf_suffix
30822                         ;;
30823                 (*-msvc*)
30824                         cf_suffix='.dll'
30825                         cf_depsuf='.dll.lib'
30826                         ;;
30827                 (cygwin*|msys*|mingw*)
30828                         cf_suffix='.dll'
30829                         cf_depsuf='.dll.a'
30830                         ;;
30831                 (darwin*)
30832                         cf_suffix='.dylib'
30833                         cf_depsuf=$cf_suffix
30834                         ;;
30835                 (hpux*)
30836                         case "$target" in
30837                         (ia64*)
30838                                 cf_suffix='.so'
30839                                 cf_depsuf=$cf_suffix
30840                                 ;;
30841                         (*)
30842                                 cf_suffix='.sl'
30843                                 cf_depsuf=$cf_suffix
30844                                 ;;
30845                         esac
30846                         ;;
30847                 (*)
30848                         cf_suffix='.so'
30849                         cf_depsuf=$cf_suffix
30850                         ;;
30851                 esac
30852                 ;;
30853         (*)
30854                 case "$target" in
30855                 (*-msvc*)
30856                         cf_suffix='.lib'
30857                         ;;
30858                 (*)
30859                         cf_suffix='.a'
30860                         ;;
30861                 esac
30862                 cf_depsuf=$cf_suffix
30863                 ;;
30864         esac
30865         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30866         then
30867                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30868                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30869         fi
30870
30871         case $cf_item in
30872         (libtool) cf_subdir='obj_lo'  ;;
30873         (normal)  cf_subdir='objects' ;;
30874         (debug)   cf_subdir='obj_g' ;;
30875         (profile) cf_subdir='obj_p' ;;
30876         (shared)
30877                 case "$cf_cv_system_name" in
30878                 (cygwin|msys)
30879                         cf_subdir='objects' ;;
30880                 (*)
30881                         cf_subdir='obj_s' ;;
30882                 esac
30883         esac
30884
30885                         # Test for case where we build libtinfo with a different name.
30886                         cf_libname=$cf_dir
30887                         if test "$cf_dir" = ncurses ; then
30888                                 case "$cf_subset" in
30889                                 (*base*)
30890                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30891                                         ;;
30892                                 (*termlib*)
30893                                         cf_libname=$TINFO_LIB_SUFFIX
30894                                         ;;
30895                                 (ticlib*)
30896                                         cf_libname=$TICS_LIB_SUFFIX
30897                                         ;;
30898                                 esac
30899                         elif test "$cf_dir" = c++ ; then
30900
30901 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30902
30903 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30904
30905                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30906                         else
30907
30908 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30909
30910 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30911
30912                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30913                         fi
30914                         if test -n "${USE_ARG_SUFFIX}" ; then
30915                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30916                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30917                         fi
30918
30919                         # These dependencies really are for development, not
30920                         # builds, but they are useful in porting, too.
30921                         cf_depend="../include/ncurses_cfg.h"
30922                         if test "$srcdir" = "."; then
30923                                 cf_reldir="."
30924                         else
30925                                 cf_reldir="\${srcdir}"
30926                         fi
30927
30928                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30929                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30930                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30931                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30932                         fi
30933
30934                         cf_dir_suffix=
30935                         old_cf_suffix="$cf_suffix"
30936                         if test "$cf_cv_shlib_version_infix" = yes ; then
30937                         if test -n "$USE_LIB_SUFFIX" ; then
30938                                 case "$USE_LIB_SUFFIX" in
30939                                 (tw*)
30940                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30941                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30942                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30943                                         ;;
30944                                 (t*)
30945                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30946                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30947                                         cf_dir_suffix=t$EXTRA_SUFFIX
30948                                         ;;
30949                                 (w*)
30950                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30951                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30952                                         cf_dir_suffix=w$EXTRA_SUFFIX
30953                                         ;;
30954                                 (*)
30955                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30956                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30957                                         cf_dir_suffix=$EXTRA_SUFFIX
30958                                         ;;
30959                                 esac
30960                         fi
30961                         fi
30962
30963                         $AWK -f "$srcdir/mk-1st.awk" \
30964                                 name=${cf_libname}${cf_dir_suffix} \
30965                                 traces=$LIB_TRACING \
30966                                 MODEL=$cf_ITEM \
30967                                 CXX_MODEL=$CXX_MODEL \
30968                                 LIB_SUFFIX=$LIB_SUFFIX \
30969                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30970                                 make_phony="${cf_cv_make_PHONY:-no}" \
30971                                 model=$cf_subdir \
30972                                 prefix=$cf_prefix \
30973                                 suffix=$cf_suffix \
30974                                 subset=$cf_subset \
30975                                 driver=$cf_cv_term_driver \
30976                                 SymLink="$LN_S" \
30977                                 TermlibRoot=$TINFO_NAME \
30978                                 TermlibSuffix=$TINFO_SUFFIX \
30979                                 ShlibVer=$cf_cv_shlib_version \
30980                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30981                                 ReLink=${cf_cv_do_relink:-no} \
30982                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30983                                 DoLinks=$cf_cv_do_symlinks \
30984                                 rmSoLocs=$cf_cv_rm_so_locs \
30985                                 ldconfig="$LDCONFIG" \
30986                                 overwrite=$WITH_OVERWRITE \
30987                                 depend="$cf_depend" \
30988                                 host="$host" \
30989                                 libtool_version="$LIBTOOL_VERSION" \
30990                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30991
30992                         cf_suffix="$old_cf_suffix"
30993
30994                         for cf_subdir2 in $cf_subdirs lib
30995                         do
30996                                 test "$cf_subdir" = "$cf_subdir2" && break
30997                         done
30998                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30999                         $AWK -f "$srcdir/mk-2nd.awk" \
31000                                 name=$cf_dir \
31001                                 traces=$LIB_TRACING \
31002                                 MODEL=$cf_ITEM \
31003                                 model=$cf_subdir \
31004                                 subset=$cf_subset \
31005                                 srcdir=$srcdir \
31006                                 echo=$WITH_ECHO \
31007                                 crenames=$cf_cv_prog_CC_c_o \
31008                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31009                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31010                         cf_subdirs="$cf_subdirs $cf_subdir"
31011                         done
31012                 done
31013         fi
31014
31015         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31016 done
31017
31018 echo >> Makefile
31019 echo '# generated by CF_LIB_RULES' >> Makefile
31020
31021 if test "x$cf_cv_make_PHONY" = xyes ; then
31022         cat >> Makefile <<-CF_EOF
31023
31024         .PHONY :        libs
31025         .PHONY :        lintlib
31026         .PHONY :        install.includes
31027         .PHONY :        uninstall.includes
31028         .PHONY :        install.libs
31029         .PHONY :        uninstall.libs
31030 CF_EOF
31031 fi
31032
31033 for cf_dir in $SRC_SUBDIRS
31034 do
31035         if test ! -d "$srcdir/$cf_dir" ; then
31036                 continue
31037         fi
31038
31039         if test -f "$cf_dir/Makefile" ; then
31040                 case "$cf_dir" in
31041                 (Ada95)
31042                         echo 'libs \' >> Makefile
31043                         echo 'install.libs \' >> Makefile
31044                         echo 'uninstall.libs ::' >> Makefile
31045                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31046                         ;;
31047                 esac
31048         fi
31049
31050         if test -f "$srcdir/$cf_dir/modules" ; then
31051
31052                 if test "x$cf_cv_make_PHONY" = xyes ; then
31053                         cat >> Makefile <<-CF_EOF
31054
31055                         .PHONY :        install.$cf_dir
31056                         .PHONY :        uninstall.$cf_dir
31057 CF_EOF
31058                 fi
31059
31060                 echo >> Makefile
31061                 if test -f "$srcdir/$cf_dir/headers" ; then
31062 cat >> Makefile <<CF_EOF
31063 install.includes \\
31064 uninstall.includes \\
31065 CF_EOF
31066                 fi
31067
31068 cat >> Makefile <<CF_EOF
31069 lint \\
31070 libs \\
31071 lintlib \\
31072 install.libs \\
31073 uninstall.libs \\
31074 install.$cf_dir \\
31075 uninstall.$cf_dir ::
31076         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31077 CF_EOF
31078         elif test -f "$srcdir/$cf_dir/headers" ; then
31079 cat >> Makefile <<CF_EOF
31080
31081 libs \\
31082 install.libs \\
31083 uninstall.libs \\
31084 install.includes \\
31085 uninstall.includes ::
31086         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31087 CF_EOF
31088 fi
31089 done
31090
31091 if test "x$cf_cv_make_PHONY" = xyes ; then
31092         cat >> Makefile <<-CF_EOF
31093
31094         .PHONY :        install.data
31095         .PHONY :        uninstall.data
31096 CF_EOF
31097 fi
31098
31099 if test "x$cf_with_db_install" = xyes; then
31100 cat >> Makefile <<CF_EOF
31101
31102 install.libs uninstall.libs \\
31103 install.data uninstall.data ::
31104 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31105 CF_EOF
31106 else
31107 cat >> Makefile <<CF_EOF
31108
31109 install.libs uninstall.libs ::
31110         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31111 CF_EOF
31112 fi
31113
31114 if test "x$cf_with_manpages" = xyes; then
31115
31116 if test "x$cf_cv_make_PHONY" = xyes ; then
31117         cat >> Makefile <<-CF_EOF
31118
31119         .PHONY :        install.man
31120         .PHONY :        uninstall.man
31121 CF_EOF
31122 fi
31123
31124 cat >> Makefile <<CF_EOF
31125
31126 install.man \\
31127 uninstall.man ::
31128         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31129 CF_EOF
31130 fi
31131
31132 cat >> Makefile <<CF_EOF
31133
31134 distclean ::
31135         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31136         rm -f headers.sh headers.sed mk_shared_lib.sh
31137         rm -f edit_man.* man_alias.*
31138         rm -rf \${DIRS_TO_MAKE}
31139 CF_EOF
31140
31141 # Special case: tack's manpage lives in its own directory.
31142 if test "x$cf_with_manpages" = xyes; then
31143 if test "x$cf_with_tack" = "xyes"; then
31144 cat >> Makefile <<CF_EOF
31145
31146 install.man \\
31147 uninstall.man ::
31148         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31149 CF_EOF
31150 fi
31151 fi
31152
31153 rm -f headers.sed headers.sh
31154
31155 echo creating headers.sh
31156 cat >headers.sh <<CF_EOF
31157 #! $SHELL
31158 # This shell script is generated by the 'configure' script.  It is invoked in a
31159 # subdirectory of the build tree.  It generates a sed-script in the parent
31160 # directory that is used to adjust includes for header files that reside in a
31161 # subdirectory of /usr/include, etc.
31162 PRG=""
31163 while test \$# != 3
31164 do
31165 PRG="\$PRG \$1"; shift
31166 done
31167 DST=\$1
31168 REF=\$2
31169 SRC=\$3
31170 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31171 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31172 echo installing \$SRC in \$DST
31173 CF_EOF
31174
31175 if test "$WITH_CURSES_H" = yes; then
31176         cat >>headers.sh <<CF_EOF
31177 case \$DST in
31178 (/*/include/*)
31179         END=\`basename \$DST\`
31180         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31181         do
31182                 NAME=\`basename \$i\`
31183                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31184         done
31185         ;;
31186 (*)
31187         echo "" >> \$TMPSED
31188         ;;
31189 esac
31190 CF_EOF
31191
31192 else
31193         cat >>headers.sh <<CF_EOF
31194 case \$DST in
31195 (/*/include/*)
31196         END=\`basename \$DST\`
31197         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31198         do
31199                 NAME=\`basename \$i\`
31200                 if test "\$NAME" = "curses.h"
31201                 then
31202                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31203                         NAME=ncurses.h
31204                 fi
31205                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31206         done
31207         ;;
31208 (*)
31209         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31210         ;;
31211 esac
31212 CF_EOF
31213 fi
31214 cat >>headers.sh <<CF_EOF
31215 rm -f \$TMPSRC
31216 sed -f \$TMPSED \$SRC > \$TMPSRC
31217 NAME=\`basename \$SRC\`
31218 CF_EOF
31219 if test "$WITH_CURSES_H" != yes; then
31220         cat >>headers.sh <<CF_EOF
31221 test "\$NAME" = "curses.h" && NAME=ncurses.h
31222 CF_EOF
31223 fi
31224 cat >>headers.sh <<CF_EOF
31225 # Just in case someone gzip'd manpages, remove the conflicting copy.
31226 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31227
31228 eval \$PRG \$TMPSRC \$DST/\$NAME
31229 rm -f \$TMPSRC \$TMPSED
31230 CF_EOF
31231
31232 chmod 0755 headers.sh
31233
31234 for cf_dir in $SRC_SUBDIRS
31235 do
31236         if test ! -d "$srcdir/$cf_dir" ; then
31237                 continue
31238         fi
31239
31240         if test -f "$srcdir/$cf_dir/headers" ; then
31241                 $AWK -f "$srcdir/mk-hdr.awk" \
31242                         subset="$LIB_SUBSETS" \
31243                         compat="$WITH_CURSES_H" \
31244                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31245         fi
31246
31247         if test -f "$srcdir/$cf_dir/modules" ; then
31248                 if test "$cf_dir" != "c++" ; then
31249                         if test "x$cf_cv_make_PHONY" = xyes ; then
31250                                 cat >> $cf_dir/Makefile <<-CF_EOF
31251
31252                                 .PHONY :        depend
31253 CF_EOF
31254                         fi
31255
31256                         cat >>$cf_dir/Makefile <<"CF_EOF"
31257 depend : ${AUTO_SRC}
31258         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31259
31260 # DO NOT DELETE THIS LINE -- make depend depends on it.
31261 CF_EOF
31262                 fi
31263         fi
31264 done
31265
31266 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31267 if test -z "$USE_OLD_MAKERULES" ; then
31268         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31269 fi
31270 fi
31271  ;;
31272   esac
31273 done
31274 EOF
31275
31276 cat >>"$CONFIG_STATUS" <<\EOF
31277
31278 { (exit 0); exit 0; }
31279 EOF
31280 chmod +x "$CONFIG_STATUS"
31281 ac_clean_files=$ac_clean_files_save
31282
31283 # configure is writing to config.log, and then calls config.status.
31284 # config.status does its own redirection, appending to config.log.
31285 # Unfortunately, on DOS this fails, as config.log is still kept open
31286 # by configure, so config.status won't be able to write to it; its
31287 # output is simply discarded.  So we exec the FD to /dev/null,
31288 # effectively closing config.log, so it can be properly (re)opened and
31289 # appended to by config.status.  When coming back to configure, we
31290 # need to make the FD available again.
31291 if test "$no_create" != yes; then
31292   ac_cs_success=:
31293   exec 5>/dev/null
31294   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31295   exec 5>>config.log
31296   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31297   # would make configure fail if this is the last instruction.
31298   "$ac_cs_success" || { (exit 1); exit 1; }
31299 fi
31300 ${MAKE:-make} preinstall