]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20220129
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.741 .
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 echo "$as_me:9006: checking if xterm backspace sends BS or DEL" >&5
9007 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9008
9009 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9010 if test "${with_xterm_kbs+set}" = set; then
9011   withval="$with_xterm_kbs"
9012   with_xterm_kbs=$withval
9013 else
9014   with_xterm_kbs=BS
9015 fi;
9016 case x$with_xterm_kbs in
9017 (xyes|xno|xBS|xbs|x8)
9018         with_xterm_kbs=BS
9019         ;;
9020 (xDEL|xdel|x127)
9021         with_xterm_kbs=DEL
9022         ;;
9023 (*)
9024         with_xterm_kbs=$withval
9025         ;;
9026 esac
9027 echo "$as_me:9027: result: $with_xterm_kbs" >&5
9028 echo "${ECHO_T}$with_xterm_kbs" >&6
9029 XTERM_KBS=$with_xterm_kbs
9030
9031 MAKE_TERMINFO=
9032 if test "$use_database" = no ; then
9033         TERMINFO="${datadir}/terminfo"
9034         MAKE_TERMINFO="#"
9035 else
9036
9037 echo "$as_me:9037: checking for list of terminfo directories" >&5
9038 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9039
9040 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9041 if test "${with_terminfo_dirs+set}" = set; then
9042   withval="$with_terminfo_dirs"
9043
9044 else
9045   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9046 fi;
9047 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9048 cf_dst_path=
9049 for cf_src_path in $withval
9050 do
9051
9052 if test "x$prefix" != xNONE; then
9053         cf_path_syntax="$prefix"
9054 else
9055         cf_path_syntax="$ac_default_prefix"
9056 fi
9057
9058 case ".$cf_src_path" in
9059 (.\$\(*\)*|.\'*\'*)
9060         ;;
9061 (..|./*|.\\*)
9062         ;;
9063 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9064         ;;
9065 (.\$\{*prefix\}*|.\$\{*dir\}*)
9066         eval cf_src_path="$cf_src_path"
9067         case ".$cf_src_path" in
9068         (.NONE/*)
9069                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9070                 ;;
9071         esac
9072         ;;
9073 (.no|.NONE/*)
9074         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9075         ;;
9076 (*)
9077         { { echo "$as_me:9077: error: expected a pathname, not \"$cf_src_path\"" >&5
9078 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9079    { (exit 1); exit 1; }; }
9080         ;;
9081 esac
9082
9083   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9084   cf_dst_path="${cf_dst_path}${cf_src_path}"
9085 done
9086 IFS="$ac_save_ifs"
9087
9088 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9089 # so we have to check/work around.  We do prefer the result of "eval"...
9090 eval cf_dst_eval="$cf_dst_path"
9091 case "x$cf_dst_eval" in
9092 (xNONE*)
9093         TERMINFO_DIRS=$cf_dst_path
9094         ;;
9095 (*)
9096         TERMINFO_DIRS="$cf_dst_eval"
9097         ;;
9098 esac
9099
9100 echo "$as_me:9100: result: $TERMINFO_DIRS" >&5
9101 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9102 test -n "$TERMINFO_DIRS" &&
9103 cat >>confdefs.h <<EOF
9104 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9105 EOF
9106
9107 case "x$TERMINFO" in
9108 x???:*)
9109         { echo "$as_me:9109: WARNING: ignoring non-directory/file TERMINFO value" >&5
9110 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9111         unset TERMINFO
9112         ;;
9113 esac
9114
9115 echo "$as_me:9115: checking for default terminfo directory" >&5
9116 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9117
9118 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9119 if test "${with_default_terminfo_dir+set}" = set; then
9120   withval="$with_default_terminfo_dir"
9121
9122 else
9123   withval="${TERMINFO:-${datadir}/terminfo}"
9124 fi; if test -n "${datadir}/terminfo" ; then
9125
9126 if test "x$prefix" != xNONE; then
9127         cf_path_syntax="$prefix"
9128 else
9129         cf_path_syntax="$ac_default_prefix"
9130 fi
9131
9132 case ".$withval" in
9133 (.\$\(*\)*|.\'*\'*)
9134         ;;
9135 (..|./*|.\\*)
9136         ;;
9137 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9138         ;;
9139 (.\$\{*prefix\}*|.\$\{*dir\}*)
9140         eval withval="$withval"
9141         case ".$withval" in
9142         (.NONE/*)
9143                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9144                 ;;
9145         esac
9146         ;;
9147 (.no|.NONE/*)
9148         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9149         ;;
9150 (*)
9151         { { echo "$as_me:9151: error: expected a pathname, not \"$withval\"" >&5
9152 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9153    { (exit 1); exit 1; }; }
9154         ;;
9155 esac
9156
9157 fi
9158 eval TERMINFO="$withval"
9159
9160 echo "$as_me:9160: result: $TERMINFO" >&5
9161 echo "${ECHO_T}$TERMINFO" >&6
9162
9163 cat >>confdefs.h <<EOF
9164 #define TERMINFO "$TERMINFO"
9165 EOF
9166
9167 fi
9168
9169 ###     use option --disable-big-core to make tic run on small machines
9170 ###     We need 4Mb, check if we can allocate 50% more than that.
9171 echo "$as_me:9171: checking if big-core option selected" >&5
9172 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9173
9174 # Check whether --enable-big-core or --disable-big-core was given.
9175 if test "${enable_big_core+set}" = set; then
9176   enableval="$enable_big_core"
9177   with_big_core=$enableval
9178 else
9179   if test "$cross_compiling" = yes; then
9180   with_big_core=no
9181 else
9182   cat >"conftest.$ac_ext" <<_ACEOF
9183 #line 9183 "configure"
9184 #include "confdefs.h"
9185
9186 #include <stdlib.h>
9187 #include <string.h>
9188 int main() {
9189         unsigned long n = 6000000L;
9190         char *s = malloc(n);
9191         if (s != 0)
9192                 s[0] = s[n-1] = 0;
9193         ${cf_cv_main_return:-return}(s == 0);
9194 }
9195 _ACEOF
9196 rm -f "conftest$ac_exeext"
9197 if { (eval echo "$as_me:9197: \"$ac_link\"") >&5
9198   (eval $ac_link) 2>&5
9199   ac_status=$?
9200   echo "$as_me:9200: \$? = $ac_status" >&5
9201   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9202   { (eval echo "$as_me:9202: \"$ac_try\"") >&5
9203   (eval $ac_try) 2>&5
9204   ac_status=$?
9205   echo "$as_me:9205: \$? = $ac_status" >&5
9206   (exit "$ac_status"); }; }; then
9207   with_big_core=yes
9208 else
9209   echo "$as_me: program exited with status $ac_status" >&5
9210 echo "$as_me: failed program was:" >&5
9211 cat "conftest.$ac_ext" >&5
9212 with_big_core=no
9213 fi
9214 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9215 fi
9216 fi;
9217 echo "$as_me:9217: result: $with_big_core" >&5
9218 echo "${ECHO_T}$with_big_core" >&6
9219 test "x$with_big_core" = "xyes" &&
9220 cat >>confdefs.h <<\EOF
9221 #define HAVE_BIG_CORE 1
9222 EOF
9223
9224 ### ISO C only guarantees 512-char strings, we have tables which load faster
9225 ### when constructed using "big" strings.  More than the C compiler, the awk
9226 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9227 echo "$as_me:9227: checking if big-strings option selected" >&5
9228 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9229
9230 # Check whether --enable-big-strings or --disable-big-strings was given.
9231 if test "${enable_big_strings+set}" = set; then
9232   enableval="$enable_big_strings"
9233   with_big_strings=$enableval
9234 else
9235
9236         case x$AWK in
9237         (x)
9238                 eval with_big_strings=no
9239                 ;;
9240         (*)
9241                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9242                         | $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
9243                         eval with_big_strings=yes
9244                 else
9245                         eval with_big_strings=no
9246                 fi
9247                 ;;
9248         esac
9249
9250 fi;
9251 echo "$as_me:9251: result: $with_big_strings" >&5
9252 echo "${ECHO_T}$with_big_strings" >&6
9253
9254 USE_BIG_STRINGS=0
9255 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9256
9257 ###     use option --enable-termcap to compile in the termcap fallback support
9258 echo "$as_me:9258: checking if you want termcap-fallback support" >&5
9259 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9260
9261 # Check whether --enable-termcap or --disable-termcap was given.
9262 if test "${enable_termcap+set}" = set; then
9263   enableval="$enable_termcap"
9264   with_termcap=$enableval
9265 else
9266   with_termcap=no
9267 fi;
9268 echo "$as_me:9268: result: $with_termcap" >&5
9269 echo "${ECHO_T}$with_termcap" >&6
9270
9271 NCURSES_USE_TERMCAP=0
9272 if test "x$with_termcap" != "xyes" ; then
9273         if test "$use_database" = no ; then
9274                 if test -z "$with_fallback" ; then
9275                         { { echo "$as_me:9275: error: You have disabled the database w/o specifying fallbacks" >&5
9276 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9277    { (exit 1); exit 1; }; }
9278                 fi
9279         fi
9280
9281 cat >>confdefs.h <<\EOF
9282 #define PURE_TERMINFO 1
9283 EOF
9284
9285 else
9286
9287         if test "$with_ticlib" != no ; then
9288                 { { echo "$as_me:9288: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9289 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9290    { (exit 1); exit 1; }; }
9291         fi
9292
9293         NCURSES_USE_TERMCAP=1
9294         echo "$as_me:9294: checking for list of termcap files" >&5
9295 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9296
9297 # Check whether --with-termpath or --without-termpath was given.
9298 if test "${with_termpath+set}" = set; then
9299   withval="$with_termpath"
9300
9301 else
9302   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9303 fi;
9304 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9305 cf_dst_path=
9306 for cf_src_path in $withval
9307 do
9308
9309 if test "x$prefix" != xNONE; then
9310         cf_path_syntax="$prefix"
9311 else
9312         cf_path_syntax="$ac_default_prefix"
9313 fi
9314
9315 case ".$cf_src_path" in
9316 (.\$\(*\)*|.\'*\'*)
9317         ;;
9318 (..|./*|.\\*)
9319         ;;
9320 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9321         ;;
9322 (.\$\{*prefix\}*|.\$\{*dir\}*)
9323         eval cf_src_path="$cf_src_path"
9324         case ".$cf_src_path" in
9325         (.NONE/*)
9326                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9327                 ;;
9328         esac
9329         ;;
9330 (.no|.NONE/*)
9331         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9332         ;;
9333 (*)
9334         { { echo "$as_me:9334: error: expected a pathname, not \"$cf_src_path\"" >&5
9335 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9336    { (exit 1); exit 1; }; }
9337         ;;
9338 esac
9339
9340   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9341   cf_dst_path="${cf_dst_path}${cf_src_path}"
9342 done
9343 IFS="$ac_save_ifs"
9344
9345 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9346 # so we have to check/work around.  We do prefer the result of "eval"...
9347 eval cf_dst_eval="$cf_dst_path"
9348 case "x$cf_dst_eval" in
9349 (xNONE*)
9350         TERMPATH=$cf_dst_path
9351         ;;
9352 (*)
9353         TERMPATH="$cf_dst_eval"
9354         ;;
9355 esac
9356
9357         echo "$as_me:9357: result: $TERMPATH" >&5
9358 echo "${ECHO_T}$TERMPATH" >&6
9359         test -n "$TERMPATH" &&
9360 cat >>confdefs.h <<EOF
9361 #define TERMPATH "$TERMPATH"
9362 EOF
9363
9364         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9365         echo "$as_me:9365: checking if fast termcap-loader is needed" >&5
9366 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9367
9368 # Check whether --enable-getcap or --disable-getcap was given.
9369 if test "${enable_getcap+set}" = set; then
9370   enableval="$enable_getcap"
9371   with_getcap=$enableval
9372 else
9373   with_getcap=no
9374 fi;
9375         echo "$as_me:9375: result: $with_getcap" >&5
9376 echo "${ECHO_T}$with_getcap" >&6
9377         test "x$with_getcap" = "xyes" &&
9378 cat >>confdefs.h <<\EOF
9379 #define USE_GETCAP 1
9380 EOF
9381
9382         echo "$as_me:9382: checking if translated termcaps will be cached in ~/.terminfo" >&5
9383 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9384
9385 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9386 if test "${enable_getcap_cache+set}" = set; then
9387   enableval="$enable_getcap_cache"
9388   with_getcap_cache=$enableval
9389 else
9390   with_getcap_cache=no
9391 fi;
9392         echo "$as_me:9392: result: $with_getcap_cache" >&5
9393 echo "${ECHO_T}$with_getcap_cache" >&6
9394         test "x$with_getcap_cache" = "xyes" &&
9395 cat >>confdefs.h <<\EOF
9396 #define USE_GETCAP_CACHE 1
9397 EOF
9398
9399 fi
9400
9401 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9402 echo "$as_me:9402: checking if ~/.terminfo is wanted" >&5
9403 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9404
9405 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9406 if test "${enable_home_terminfo+set}" = set; then
9407   enableval="$enable_home_terminfo"
9408   with_home_terminfo=$enableval
9409 else
9410   with_home_terminfo=yes
9411 fi;
9412 echo "$as_me:9412: result: $with_home_terminfo" >&5
9413 echo "${ECHO_T}$with_home_terminfo" >&6
9414 test "x$with_home_terminfo" = "xyes" &&
9415 cat >>confdefs.h <<\EOF
9416 #define USE_HOME_TERMINFO 1
9417 EOF
9418
9419 echo "$as_me:9419: checking if you want to permit root to use ncurses environment variables" >&5
9420 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9421
9422 # Check whether --enable-root-environ or --disable-root-environ was given.
9423 if test "${enable_root_environ+set}" = set; then
9424   enableval="$enable_root_environ"
9425   with_root_environ=$enableval
9426 else
9427   with_root_environ=yes
9428 fi;
9429 echo "$as_me:9429: result: $with_root_environ" >&5
9430 echo "${ECHO_T}$with_root_environ" >&6
9431 test "x$with_root_environ" = xyes &&
9432 cat >>confdefs.h <<\EOF
9433 #define USE_ROOT_ENVIRON 1
9434 EOF
9435
9436 echo "$as_me:9436: checking if you want to permit setuid programs to access all files" >&5
9437 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9438
9439 # Check whether --enable-root-environ or --disable-root-environ was given.
9440 if test "${enable_root_environ+set}" = set; then
9441   enableval="$enable_root_environ"
9442   with_root_access=$enableval
9443 else
9444   with_root_access=yes
9445 fi;
9446 echo "$as_me:9446: result: $with_root_access" >&5
9447 echo "${ECHO_T}$with_root_access" >&6
9448 test "x$with_root_access" = xyes &&
9449 cat >>confdefs.h <<\EOF
9450 #define USE_ROOT_ACCESS 1
9451 EOF
9452
9453 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9454 ###   to reduce storage requirements for the terminfo database.
9455
9456 for ac_header in \
9457 unistd.h \
9458
9459 do
9460 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9461 echo "$as_me:9461: checking for $ac_header" >&5
9462 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9464   echo $ECHO_N "(cached) $ECHO_C" >&6
9465 else
9466   cat >"conftest.$ac_ext" <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9469 #include <$ac_header>
9470 _ACEOF
9471 if { (eval echo "$as_me:9471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9472   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9473   ac_status=$?
9474   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9475   rm -f conftest.er1
9476   cat conftest.err >&5
9477   echo "$as_me:9477: \$? = $ac_status" >&5
9478   (exit "$ac_status"); } >/dev/null; then
9479   if test -s conftest.err; then
9480     ac_cpp_err=$ac_c_preproc_warn_flag
9481   else
9482     ac_cpp_err=
9483   fi
9484 else
9485   ac_cpp_err=yes
9486 fi
9487 if test -z "$ac_cpp_err"; then
9488   eval "$as_ac_Header=yes"
9489 else
9490   echo "$as_me: failed program was:" >&5
9491   cat "conftest.$ac_ext" >&5
9492   eval "$as_ac_Header=no"
9493 fi
9494 rm -f conftest.err "conftest.$ac_ext"
9495 fi
9496 echo "$as_me:9496: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9497 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9498 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9499   cat >>confdefs.h <<EOF
9500 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9501 EOF
9502
9503 fi
9504 done
9505
9506 for ac_func in \
9507         remove \
9508         unlink
9509 do
9510 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9511 echo "$as_me:9511: checking for $ac_func" >&5
9512 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9513 if eval "test \"\${$as_ac_var+set}\" = set"; then
9514   echo $ECHO_N "(cached) $ECHO_C" >&6
9515 else
9516   cat >"conftest.$ac_ext" <<_ACEOF
9517 #line 9517 "configure"
9518 #include "confdefs.h"
9519 #define $ac_func autoconf_temporary
9520 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9521 #undef $ac_func
9522
9523 #ifdef __cplusplus
9524 extern "C"
9525 #endif
9526
9527 /* We use char because int might match the return type of a gcc2
9528    builtin and then its argument prototype would still apply.  */
9529 char $ac_func (void);
9530
9531 int
9532 main (void)
9533 {
9534
9535 /* The GNU C library defines stubs for functions which it implements
9536     to always fail with ENOSYS.  Some functions are actually named
9537     something starting with __ and the normal name is an alias.  */
9538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9539 #error found stub for $ac_func
9540 #endif
9541
9542         return $ac_func ();
9543   ;
9544   return 0;
9545 }
9546 _ACEOF
9547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9548 if { (eval echo "$as_me:9548: \"$ac_link\"") >&5
9549   (eval $ac_link) 2>&5
9550   ac_status=$?
9551   echo "$as_me:9551: \$? = $ac_status" >&5
9552   (exit "$ac_status"); } &&
9553          { ac_try='test -s "conftest$ac_exeext"'
9554   { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9555   (eval $ac_try) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit "$ac_status"); }; }; then
9559   eval "$as_ac_var=yes"
9560 else
9561   echo "$as_me: failed program was:" >&5
9562 cat "conftest.$ac_ext" >&5
9563 eval "$as_ac_var=no"
9564 fi
9565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9566 fi
9567 echo "$as_me:9567: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9568 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9569 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9570   cat >>confdefs.h <<EOF
9571 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9572 EOF
9573
9574 fi
9575 done
9576
9577 if test "$cross_compiling" = yes ; then
9578
9579 for ac_func in \
9580                 link \
9581                 symlink
9582 do
9583 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9584 echo "$as_me:9584: checking for $ac_func" >&5
9585 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9586 if eval "test \"\${$as_ac_var+set}\" = set"; then
9587   echo $ECHO_N "(cached) $ECHO_C" >&6
9588 else
9589   cat >"conftest.$ac_ext" <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592 #define $ac_func autoconf_temporary
9593 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9594 #undef $ac_func
9595
9596 #ifdef __cplusplus
9597 extern "C"
9598 #endif
9599
9600 /* We use char because int might match the return type of a gcc2
9601    builtin and then its argument prototype would still apply.  */
9602 char $ac_func (void);
9603
9604 int
9605 main (void)
9606 {
9607
9608 /* The GNU C library defines stubs for functions which it implements
9609     to always fail with ENOSYS.  Some functions are actually named
9610     something starting with __ and the normal name is an alias.  */
9611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9612 #error found stub for $ac_func
9613 #endif
9614
9615         return $ac_func ();
9616   ;
9617   return 0;
9618 }
9619 _ACEOF
9620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9621 if { (eval echo "$as_me:9621: \"$ac_link\"") >&5
9622   (eval $ac_link) 2>&5
9623   ac_status=$?
9624   echo "$as_me:9624: \$? = $ac_status" >&5
9625   (exit "$ac_status"); } &&
9626          { ac_try='test -s "conftest$ac_exeext"'
9627   { (eval echo "$as_me:9627: \"$ac_try\"") >&5
9628   (eval $ac_try) 2>&5
9629   ac_status=$?
9630   echo "$as_me:9630: \$? = $ac_status" >&5
9631   (exit "$ac_status"); }; }; then
9632   eval "$as_ac_var=yes"
9633 else
9634   echo "$as_me: failed program was:" >&5
9635 cat "conftest.$ac_ext" >&5
9636 eval "$as_ac_var=no"
9637 fi
9638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9639 fi
9640 echo "$as_me:9640: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9641 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9642 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9643   cat >>confdefs.h <<EOF
9644 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9645 EOF
9646
9647 fi
9648 done
9649
9650 else
9651         echo "$as_me:9651: checking if link/symlink functions work" >&5
9652 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9653 if test "${cf_cv_link_funcs+set}" = set; then
9654   echo $ECHO_N "(cached) $ECHO_C" >&6
9655 else
9656
9657                 cf_cv_link_funcs=
9658                 for cf_func in link symlink ; do
9659                         if test "$cross_compiling" = yes; then
9660
9661                         eval 'ac_cv_func_'$cf_func'=error'
9662 else
9663   cat >"conftest.$ac_ext" <<_ACEOF
9664 #line 9664 "configure"
9665 #include "confdefs.h"
9666
9667 #include <stdio.h>
9668 #include <sys/types.h>
9669 #include <sys/stat.h>
9670 #ifdef HAVE_UNISTD_H
9671 #include <unistd.h>
9672 #endif
9673 int main(void)
9674 {
9675         int fail = 0;
9676         char *src = "conftest.tmp";
9677         char *dst = "conftest.chk";
9678         struct stat src_sb, dst_sb;
9679         FILE *fp = fopen(src, "w");
9680         if (fp == 0) { fail = 3; } else {
9681                 fclose(fp); stat(src, &src_sb);
9682                 if ($cf_func(src, dst) < 0) {
9683                         fail = 1;
9684                 } else if (stat(dst, &dst_sb) < 0) {
9685                         fail = 2;
9686                 } else {
9687                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9688                         if (diff < 0) diff = -diff;
9689                         if (diff > 2) fail = 3;
9690                 }
9691         }
9692 #ifdef HAVE_UNLINK
9693         unlink(dst); unlink(src);
9694 #else
9695         remove(dst); remove(src);
9696 #endif
9697         ${cf_cv_main_return:-return} (fail);
9698 }
9699
9700 _ACEOF
9701 rm -f "conftest$ac_exeext"
9702 if { (eval echo "$as_me:9702: \"$ac_link\"") >&5
9703   (eval $ac_link) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9707   { (eval echo "$as_me:9707: \"$ac_try\"") >&5
9708   (eval $ac_try) 2>&5
9709   ac_status=$?
9710   echo "$as_me:9710: \$? = $ac_status" >&5
9711   (exit "$ac_status"); }; }; then
9712
9713                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9714                         eval 'ac_cv_func_'$cf_func'=yes'
9715 else
9716   echo "$as_me: program exited with status $ac_status" >&5
9717 echo "$as_me: failed program was:" >&5
9718 cat "conftest.$ac_ext" >&5
9719
9720                         eval 'ac_cv_func_'$cf_func'=no'
9721 fi
9722 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9723 fi
9724                 done
9725                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9726
9727 fi
9728 echo "$as_me:9728: result: $cf_cv_link_funcs" >&5
9729 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9730         test "$ac_cv_func_link"    = yes &&
9731 cat >>confdefs.h <<\EOF
9732 #define HAVE_LINK 1
9733 EOF
9734
9735         test "$ac_cv_func_symlink" = yes &&
9736 cat >>confdefs.h <<\EOF
9737 #define HAVE_SYMLINK 1
9738 EOF
9739
9740 fi
9741
9742 with_links=no
9743 with_symlinks=no
9744
9745 # soft links (symbolic links) are useful for some systems where hard links do
9746 # not work, or to make it simpler to copy terminfo trees around.
9747 if test "x$ac_cv_func_symlink" = xyes ; then
9748         echo "$as_me:9748: checking if tic should use symbolic links" >&5
9749 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9750
9751 # Check whether --enable-symlinks or --disable-symlinks was given.
9752 if test "${enable_symlinks+set}" = set; then
9753   enableval="$enable_symlinks"
9754   with_symlinks=$enableval
9755 else
9756   with_symlinks=no
9757 fi;
9758         echo "$as_me:9758: result: $with_symlinks" >&5
9759 echo "${ECHO_T}$with_symlinks" >&6
9760 fi
9761
9762 # If we have hard links and did not choose to use soft links instead, there is
9763 # no reason to make this choice optional - use the hard links.
9764 if test "$with_symlinks" = no ; then
9765         echo "$as_me:9765: checking if tic should use hard links" >&5
9766 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9767         if test "x$ac_cv_func_link" = xyes ; then
9768                 with_links=yes
9769         else
9770                 with_links=no
9771         fi
9772         echo "$as_me:9772: result: $with_links" >&5
9773 echo "${ECHO_T}$with_links" >&6
9774 fi
9775
9776 test "x$with_links" = xyes &&
9777 cat >>confdefs.h <<\EOF
9778 #define USE_LINKS 1
9779 EOF
9780
9781 test "x$with_symlinks" = xyes &&
9782 cat >>confdefs.h <<\EOF
9783 #define USE_SYMLINKS 1
9784 EOF
9785
9786 ###   use option --enable-broken-linker to force on use of broken-linker support
9787
9788 echo "$as_me:9788: checking if you want broken-linker support code" >&5
9789 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9790
9791 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9792 if test "${enable_broken_linker+set}" = set; then
9793   enableval="$enable_broken_linker"
9794   with_broken_linker=$enableval
9795 else
9796   with_broken_linker=no
9797 fi;
9798 echo "$as_me:9798: result: $with_broken_linker" >&5
9799 echo "${ECHO_T}$with_broken_linker" >&6
9800
9801 : "${BROKEN_LINKER:=0}"
9802 if test "x$with_broken_linker" = xyes ; then
9803
9804 cat >>confdefs.h <<\EOF
9805 #define BROKEN_LINKER 1
9806 EOF
9807
9808         BROKEN_LINKER=1
9809 fi
9810
9811 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9812 echo "$as_me:9812: checking if tputs should process BSD-style prefix padding" >&5
9813 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9814
9815 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9816 if test "${enable_bsdpad+set}" = set; then
9817   enableval="$enable_bsdpad"
9818   with_bsdpad=$enableval
9819 else
9820   with_bsdpad=no
9821 fi;
9822 echo "$as_me:9822: result: $with_bsdpad" >&5
9823 echo "${ECHO_T}$with_bsdpad" >&6
9824 test "x$with_bsdpad" = xyes &&
9825 cat >>confdefs.h <<\EOF
9826 #define BSD_TPUTS 1
9827 EOF
9828
9829 ###   use option --enable-widec to turn on use of wide-character support
9830 NCURSES_CH_T=chtype
9831 NCURSES_LIBUTF8=0
9832
9833 NEED_WCHAR_H=0
9834 NCURSES_MBSTATE_T=0
9835 NCURSES_WCHAR_T=0
9836 NCURSES_WINT_T=0
9837
9838 # Check to define _XOPEN_SOURCE "automatically"
9839 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9840
9841 echo "$as_me:9841: checking if the POSIX test-macros are already defined" >&5
9842 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9843 if test "${cf_cv_posix_visible+set}" = set; then
9844   echo $ECHO_N "(cached) $ECHO_C" >&6
9845 else
9846
9847 cat >"conftest.$ac_ext" <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <stdio.h>
9851 int
9852 main (void)
9853 {
9854
9855 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9856         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9857         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9858         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9859 #error conflicting symbols found
9860 #endif
9861
9862   ;
9863   return 0;
9864 }
9865 _ACEOF
9866 rm -f "conftest.$ac_objext"
9867 if { (eval echo "$as_me:9867: \"$ac_compile\"") >&5
9868   (eval $ac_compile) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit "$ac_status"); } &&
9872          { ac_try='test -s "conftest.$ac_objext"'
9873   { (eval echo "$as_me:9873: \"$ac_try\"") >&5
9874   (eval $ac_try) 2>&5
9875   ac_status=$?
9876   echo "$as_me:9876: \$? = $ac_status" >&5
9877   (exit "$ac_status"); }; }; then
9878   cf_cv_posix_visible=no
9879 else
9880   echo "$as_me: failed program was:" >&5
9881 cat "conftest.$ac_ext" >&5
9882 cf_cv_posix_visible=yes
9883 fi
9884 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9885
9886 fi
9887 echo "$as_me:9887: result: $cf_cv_posix_visible" >&5
9888 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9889
9890 if test "$cf_cv_posix_visible" = no; then
9891
9892 cf_XOPEN_SOURCE=600
9893 cf_POSIX_C_SOURCE=199506L
9894 cf_xopen_source=
9895
9896 case "$host_os" in
9897 (aix[4-7]*)
9898         cf_xopen_source="-D_ALL_SOURCE"
9899         ;;
9900 (msys)
9901         cf_XOPEN_SOURCE=600
9902         ;;
9903 (darwin[0-8].*)
9904         cf_xopen_source="-D_APPLE_C_SOURCE"
9905         ;;
9906 (darwin*)
9907         cf_xopen_source="-D_DARWIN_C_SOURCE"
9908         cf_XOPEN_SOURCE=
9909         ;;
9910 (freebsd*|dragonfly*|midnightbsd*)
9911         # 5.x headers associate
9912         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9913         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9914         cf_POSIX_C_SOURCE=200112L
9915         cf_XOPEN_SOURCE=600
9916         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9917         ;;
9918 (hpux11*)
9919         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9920         ;;
9921 (hpux*)
9922         cf_xopen_source="-D_HPUX_SOURCE"
9923         ;;
9924 (irix[56].*)
9925         cf_xopen_source="-D_SGI_SOURCE"
9926         cf_XOPEN_SOURCE=
9927         ;;
9928 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9929
9930 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9931
9932 echo "$as_me:9932: checking if this is the GNU C library" >&5
9933 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9934 if test "${cf_cv_gnu_library+set}" = set; then
9935   echo $ECHO_N "(cached) $ECHO_C" >&6
9936 else
9937
9938 cat >"conftest.$ac_ext" <<_ACEOF
9939 #line 9939 "configure"
9940 #include "confdefs.h"
9941 #include <sys/types.h>
9942 int
9943 main (void)
9944 {
9945
9946         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9947                 return 0;
9948         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9949                 return 0;
9950         #else
9951         #       error not GNU C library
9952         #endif
9953   ;
9954   return 0;
9955 }
9956 _ACEOF
9957 rm -f "conftest.$ac_objext"
9958 if { (eval echo "$as_me:9958: \"$ac_compile\"") >&5
9959   (eval $ac_compile) 2>&5
9960   ac_status=$?
9961   echo "$as_me:9961: \$? = $ac_status" >&5
9962   (exit "$ac_status"); } &&
9963          { ac_try='test -s "conftest.$ac_objext"'
9964   { (eval echo "$as_me:9964: \"$ac_try\"") >&5
9965   (eval $ac_try) 2>&5
9966   ac_status=$?
9967   echo "$as_me:9967: \$? = $ac_status" >&5
9968   (exit "$ac_status"); }; }; then
9969   cf_cv_gnu_library=yes
9970 else
9971   echo "$as_me: failed program was:" >&5
9972 cat "conftest.$ac_ext" >&5
9973 cf_cv_gnu_library=no
9974 fi
9975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9976
9977 fi
9978 echo "$as_me:9978: result: $cf_cv_gnu_library" >&5
9979 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9980
9981 if test x$cf_cv_gnu_library = xyes; then
9982
9983         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9984         # was changed to help a little.  newlib incorporated the change about 4
9985         # years later.
9986         echo "$as_me:9986: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9987 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9988 if test "${cf_cv_gnu_library_219+set}" = set; then
9989   echo $ECHO_N "(cached) $ECHO_C" >&6
9990 else
9991
9992                 cf_save="$CPPFLAGS"
9993
9994         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9995         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9996
9997                 cat >"conftest.$ac_ext" <<_ACEOF
9998 #line 9998 "configure"
9999 #include "confdefs.h"
10000 #include <sys/types.h>
10001 int
10002 main (void)
10003 {
10004
10005                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10006                                 return 0;
10007                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10008                                 return 0;
10009                         #else
10010                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10011                         #endif
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f "conftest.$ac_objext"
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018   (eval $ac_compile) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit "$ac_status"); } &&
10022          { ac_try='test -s "conftest.$ac_objext"'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit "$ac_status"); }; }; then
10028   cf_cv_gnu_library_219=yes
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat "conftest.$ac_ext" >&5
10032 cf_cv_gnu_library_219=no
10033 fi
10034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10035                 CPPFLAGS="$cf_save"
10036
10037 fi
10038 echo "$as_me:10038: result: $cf_cv_gnu_library_219" >&5
10039 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10040
10041         if test "x$cf_cv_gnu_library_219" = xyes; then
10042                 cf_save="$CPPFLAGS"
10043                 echo "$as_me:10043: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10044 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10045 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10046   echo $ECHO_N "(cached) $ECHO_C" >&6
10047 else
10048
10049 cf_fix_cppflags=no
10050 cf_new_cflags=
10051 cf_new_cppflags=
10052 cf_new_extra_cppflags=
10053
10054 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10055 do
10056 case "$cf_fix_cppflags" in
10057 (no)
10058         case "$cf_add_cflags" in
10059         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10060                 case "$cf_add_cflags" in
10061                 (-D*)
10062                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10063
10064                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10065                                 && test -z "${cf_tst_cflags}" \
10066                                 && cf_fix_cppflags=yes
10067
10068                         if test "$cf_fix_cppflags" = yes ; then
10069
10070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10072
10073                                 continue
10074                         elif test "${cf_tst_cflags}" = "\"'" ; then
10075
10076         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10077         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10078
10079                                 continue
10080                         fi
10081                         ;;
10082                 esac
10083                 case "$CPPFLAGS" in
10084                 (*$cf_add_cflags)
10085                         ;;
10086                 (*)
10087                         case "$cf_add_cflags" in
10088                         (-D*)
10089                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10090
10091 CPPFLAGS=`echo "$CPPFLAGS" | \
10092         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10093                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10094
10095                                 ;;
10096                         esac
10097
10098         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10099         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10100
10101                         ;;
10102                 esac
10103                 ;;
10104         (*)
10105
10106         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10107         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10108
10109                 ;;
10110         esac
10111         ;;
10112 (yes)
10113
10114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10116
10117         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10118
10119         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10120                 && test -z "${cf_tst_cflags}" \
10121                 && cf_fix_cppflags=no
10122         ;;
10123 esac
10124 done
10125
10126 if test -n "$cf_new_cflags" ; then
10127
10128         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10129         CFLAGS="${CFLAGS}$cf_new_cflags"
10130
10131 fi
10132
10133 if test -n "$cf_new_cppflags" ; then
10134
10135         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10136         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10137
10138 fi
10139
10140 if test -n "$cf_new_extra_cppflags" ; then
10141
10142         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10143         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10144
10145 fi
10146
10147                         cat >"conftest.$ac_ext" <<_ACEOF
10148 #line 10148 "configure"
10149 #include "confdefs.h"
10150
10151                                 #include <limits.h>
10152                                 #include <sys/types.h>
10153
10154 int
10155 main (void)
10156 {
10157
10158                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10159                                         return 0;
10160                                 #else
10161                                 #       error GNU C library is too old
10162                                 #endif
10163   ;
10164   return 0;
10165 }
10166 _ACEOF
10167 rm -f "conftest.$ac_objext"
10168 if { (eval echo "$as_me:10168: \"$ac_compile\"") >&5
10169   (eval $ac_compile) 2>&5
10170   ac_status=$?
10171   echo "$as_me:10171: \$? = $ac_status" >&5
10172   (exit "$ac_status"); } &&
10173          { ac_try='test -s "conftest.$ac_objext"'
10174   { (eval echo "$as_me:10174: \"$ac_try\"") >&5
10175   (eval $ac_try) 2>&5
10176   ac_status=$?
10177   echo "$as_me:10177: \$? = $ac_status" >&5
10178   (exit "$ac_status"); }; }; then
10179   cf_cv_gnu_dftsrc_219=yes
10180 else
10181   echo "$as_me: failed program was:" >&5
10182 cat "conftest.$ac_ext" >&5
10183 cf_cv_gnu_dftsrc_219=no
10184 fi
10185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10186
10187 fi
10188 echo "$as_me:10188: result: $cf_cv_gnu_dftsrc_219" >&5
10189 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10190                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10191         else
10192                 cf_cv_gnu_dftsrc_219=maybe
10193         fi
10194
10195         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10196
10197                 echo "$as_me:10197: checking if we must define _GNU_SOURCE" >&5
10198 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10199 if test "${cf_cv_gnu_source+set}" = set; then
10200   echo $ECHO_N "(cached) $ECHO_C" >&6
10201 else
10202
10203                 cat >"conftest.$ac_ext" <<_ACEOF
10204 #line 10204 "configure"
10205 #include "confdefs.h"
10206 #include <sys/types.h>
10207 int
10208 main (void)
10209 {
10210
10211                         #ifndef _XOPEN_SOURCE
10212                         #error  expected _XOPEN_SOURCE to be defined
10213                         #endif
10214   ;
10215   return 0;
10216 }
10217 _ACEOF
10218 rm -f "conftest.$ac_objext"
10219 if { (eval echo "$as_me:10219: \"$ac_compile\"") >&5
10220   (eval $ac_compile) 2>&5
10221   ac_status=$?
10222   echo "$as_me:10222: \$? = $ac_status" >&5
10223   (exit "$ac_status"); } &&
10224          { ac_try='test -s "conftest.$ac_objext"'
10225   { (eval echo "$as_me:10225: \"$ac_try\"") >&5
10226   (eval $ac_try) 2>&5
10227   ac_status=$?
10228   echo "$as_me:10228: \$? = $ac_status" >&5
10229   (exit "$ac_status"); }; }; then
10230   cf_cv_gnu_source=no
10231 else
10232   echo "$as_me: failed program was:" >&5
10233 cat "conftest.$ac_ext" >&5
10234 cf_save="$CPPFLAGS"
10235
10236 cf_fix_cppflags=no
10237 cf_new_cflags=
10238 cf_new_cppflags=
10239 cf_new_extra_cppflags=
10240
10241 for cf_add_cflags in -D_GNU_SOURCE
10242 do
10243 case "$cf_fix_cppflags" in
10244 (no)
10245         case "$cf_add_cflags" in
10246         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10247                 case "$cf_add_cflags" in
10248                 (-D*)
10249                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10250
10251                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10252                                 && test -z "${cf_tst_cflags}" \
10253                                 && cf_fix_cppflags=yes
10254
10255                         if test "$cf_fix_cppflags" = yes ; then
10256
10257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10259
10260                                 continue
10261                         elif test "${cf_tst_cflags}" = "\"'" ; then
10262
10263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10265
10266                                 continue
10267                         fi
10268                         ;;
10269                 esac
10270                 case "$CPPFLAGS" in
10271                 (*$cf_add_cflags)
10272                         ;;
10273                 (*)
10274                         case "$cf_add_cflags" in
10275                         (-D*)
10276                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10277
10278 CPPFLAGS=`echo "$CPPFLAGS" | \
10279         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10280                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10281
10282                                 ;;
10283                         esac
10284
10285         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10286         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10287
10288                         ;;
10289                 esac
10290                 ;;
10291         (*)
10292
10293         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10294         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10295
10296                 ;;
10297         esac
10298         ;;
10299 (yes)
10300
10301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10303
10304         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10305
10306         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10307                 && test -z "${cf_tst_cflags}" \
10308                 && cf_fix_cppflags=no
10309         ;;
10310 esac
10311 done
10312
10313 if test -n "$cf_new_cflags" ; then
10314
10315         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10316         CFLAGS="${CFLAGS}$cf_new_cflags"
10317
10318 fi
10319
10320 if test -n "$cf_new_cppflags" ; then
10321
10322         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10323         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10324
10325 fi
10326
10327 if test -n "$cf_new_extra_cppflags" ; then
10328
10329         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10330         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10331
10332 fi
10333
10334                          cat >"conftest.$ac_ext" <<_ACEOF
10335 #line 10335 "configure"
10336 #include "confdefs.h"
10337 #include <sys/types.h>
10338 int
10339 main (void)
10340 {
10341
10342                                 #ifdef _XOPEN_SOURCE
10343                                 #error  expected _XOPEN_SOURCE to be undefined
10344                                 #endif
10345   ;
10346   return 0;
10347 }
10348 _ACEOF
10349 rm -f "conftest.$ac_objext"
10350 if { (eval echo "$as_me:10350: \"$ac_compile\"") >&5
10351   (eval $ac_compile) 2>&5
10352   ac_status=$?
10353   echo "$as_me:10353: \$? = $ac_status" >&5
10354   (exit "$ac_status"); } &&
10355          { ac_try='test -s "conftest.$ac_objext"'
10356   { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357   (eval $ac_try) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit "$ac_status"); }; }; then
10361   cf_cv_gnu_source=no
10362 else
10363   echo "$as_me: failed program was:" >&5
10364 cat "conftest.$ac_ext" >&5
10365 cf_cv_gnu_source=yes
10366 fi
10367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10368                         CPPFLAGS="$cf_save"
10369
10370 fi
10371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10372
10373 fi
10374 echo "$as_me:10374: result: $cf_cv_gnu_source" >&5
10375 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10376
10377                 if test "$cf_cv_gnu_source" = yes
10378                 then
10379                 echo "$as_me:10379: checking if we should also define _DEFAULT_SOURCE" >&5
10380 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10381 if test "${cf_cv_default_source+set}" = set; then
10382   echo $ECHO_N "(cached) $ECHO_C" >&6
10383 else
10384
10385         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10386         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10387
10388                         cat >"conftest.$ac_ext" <<_ACEOF
10389 #line 10389 "configure"
10390 #include "confdefs.h"
10391 #include <sys/types.h>
10392 int
10393 main (void)
10394 {
10395
10396                                 #ifdef _DEFAULT_SOURCE
10397                                 #error  expected _DEFAULT_SOURCE to be undefined
10398                                 #endif
10399   ;
10400   return 0;
10401 }
10402 _ACEOF
10403 rm -f "conftest.$ac_objext"
10404 if { (eval echo "$as_me:10404: \"$ac_compile\"") >&5
10405   (eval $ac_compile) 2>&5
10406   ac_status=$?
10407   echo "$as_me:10407: \$? = $ac_status" >&5
10408   (exit "$ac_status"); } &&
10409          { ac_try='test -s "conftest.$ac_objext"'
10410   { (eval echo "$as_me:10410: \"$ac_try\"") >&5
10411   (eval $ac_try) 2>&5
10412   ac_status=$?
10413   echo "$as_me:10413: \$? = $ac_status" >&5
10414   (exit "$ac_status"); }; }; then
10415   cf_cv_default_source=no
10416 else
10417   echo "$as_me: failed program was:" >&5
10418 cat "conftest.$ac_ext" >&5
10419 cf_cv_default_source=yes
10420 fi
10421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10422
10423 fi
10424 echo "$as_me:10424: result: $cf_cv_default_source" >&5
10425 echo "${ECHO_T}$cf_cv_default_source" >&6
10426                         if test "$cf_cv_default_source" = yes
10427                         then
10428
10429         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10430         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10431
10432                         fi
10433                 fi
10434         fi
10435
10436 fi
10437
10438         ;;
10439 (minix*)
10440         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10441         ;;
10442 (mirbsd*)
10443         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10444         cf_XOPEN_SOURCE=
10445
10446 if test "$cf_cv_posix_visible" = no; then
10447
10448 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10449
10450 cf_save_CFLAGS="$CFLAGS"
10451 cf_save_CPPFLAGS="$CPPFLAGS"
10452
10453 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10454         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10455                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10456
10457 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10458         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10459                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10460
10461 echo "$as_me:10461: checking if we should define _POSIX_C_SOURCE" >&5
10462 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10463 if test "${cf_cv_posix_c_source+set}" = set; then
10464   echo $ECHO_N "(cached) $ECHO_C" >&6
10465 else
10466
10467 echo "${as_me:-configure}:10467: testing if the symbol is already defined go no further ..." 1>&5
10468
10469         cat >"conftest.$ac_ext" <<_ACEOF
10470 #line 10470 "configure"
10471 #include "confdefs.h"
10472 #include <sys/types.h>
10473 int
10474 main (void)
10475 {
10476
10477 #ifndef _POSIX_C_SOURCE
10478 make an error
10479 #endif
10480   ;
10481   return 0;
10482 }
10483 _ACEOF
10484 rm -f "conftest.$ac_objext"
10485 if { (eval echo "$as_me:10485: \"$ac_compile\"") >&5
10486   (eval $ac_compile) 2>&5
10487   ac_status=$?
10488   echo "$as_me:10488: \$? = $ac_status" >&5
10489   (exit "$ac_status"); } &&
10490          { ac_try='test -s "conftest.$ac_objext"'
10491   { (eval echo "$as_me:10491: \"$ac_try\"") >&5
10492   (eval $ac_try) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit "$ac_status"); }; }; then
10496   cf_cv_posix_c_source=no
10497 else
10498   echo "$as_me: failed program was:" >&5
10499 cat "conftest.$ac_ext" >&5
10500 cf_want_posix_source=no
10501          case .$cf_POSIX_C_SOURCE in
10502          (.[12]??*)
10503                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10504                 ;;
10505          (.2)
10506                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10507                 cf_want_posix_source=yes
10508                 ;;
10509          (.*)
10510                 cf_want_posix_source=yes
10511                 ;;
10512          esac
10513          if test "$cf_want_posix_source" = yes ; then
10514                 cat >"conftest.$ac_ext" <<_ACEOF
10515 #line 10515 "configure"
10516 #include "confdefs.h"
10517 #include <sys/types.h>
10518 int
10519 main (void)
10520 {
10521
10522 #ifdef _POSIX_SOURCE
10523 make an error
10524 #endif
10525   ;
10526   return 0;
10527 }
10528 _ACEOF
10529 rm -f "conftest.$ac_objext"
10530 if { (eval echo "$as_me:10530: \"$ac_compile\"") >&5
10531   (eval $ac_compile) 2>&5
10532   ac_status=$?
10533   echo "$as_me:10533: \$? = $ac_status" >&5
10534   (exit "$ac_status"); } &&
10535          { ac_try='test -s "conftest.$ac_objext"'
10536   { (eval echo "$as_me:10536: \"$ac_try\"") >&5
10537   (eval $ac_try) 2>&5
10538   ac_status=$?
10539   echo "$as_me:10539: \$? = $ac_status" >&5
10540   (exit "$ac_status"); }; }; then
10541   :
10542 else
10543   echo "$as_me: failed program was:" >&5
10544 cat "conftest.$ac_ext" >&5
10545 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10546 fi
10547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10548          fi
10549
10550 echo "${as_me:-configure}:10550: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10551
10552          CFLAGS="$cf_trim_CFLAGS"
10553          CPPFLAGS="$cf_trim_CPPFLAGS"
10554
10555         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10556         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10557
10558 echo "${as_me:-configure}:10558: testing if the second compile does not leave our definition intact error ..." 1>&5
10559
10560          cat >"conftest.$ac_ext" <<_ACEOF
10561 #line 10561 "configure"
10562 #include "confdefs.h"
10563 #include <sys/types.h>
10564 int
10565 main (void)
10566 {
10567
10568 #ifndef _POSIX_C_SOURCE
10569 make an error
10570 #endif
10571   ;
10572   return 0;
10573 }
10574 _ACEOF
10575 rm -f "conftest.$ac_objext"
10576 if { (eval echo "$as_me:10576: \"$ac_compile\"") >&5
10577   (eval $ac_compile) 2>&5
10578   ac_status=$?
10579   echo "$as_me:10579: \$? = $ac_status" >&5
10580   (exit "$ac_status"); } &&
10581          { ac_try='test -s "conftest.$ac_objext"'
10582   { (eval echo "$as_me:10582: \"$ac_try\"") >&5
10583   (eval $ac_try) 2>&5
10584   ac_status=$?
10585   echo "$as_me:10585: \$? = $ac_status" >&5
10586   (exit "$ac_status"); }; }; then
10587   :
10588 else
10589   echo "$as_me: failed program was:" >&5
10590 cat "conftest.$ac_ext" >&5
10591 cf_cv_posix_c_source=no
10592 fi
10593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10594          CFLAGS="$cf_save_CFLAGS"
10595          CPPFLAGS="$cf_save_CPPFLAGS"
10596
10597 fi
10598 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10599
10600 fi
10601 echo "$as_me:10601: result: $cf_cv_posix_c_source" >&5
10602 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10603
10604 if test "$cf_cv_posix_c_source" != no ; then
10605         CFLAGS="$cf_trim_CFLAGS"
10606         CPPFLAGS="$cf_trim_CPPFLAGS"
10607
10608 cf_fix_cppflags=no
10609 cf_new_cflags=
10610 cf_new_cppflags=
10611 cf_new_extra_cppflags=
10612
10613 for cf_add_cflags in $cf_cv_posix_c_source
10614 do
10615 case "$cf_fix_cppflags" in
10616 (no)
10617         case "$cf_add_cflags" in
10618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10619                 case "$cf_add_cflags" in
10620                 (-D*)
10621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10622
10623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10624                                 && test -z "${cf_tst_cflags}" \
10625                                 && cf_fix_cppflags=yes
10626
10627                         if test "$cf_fix_cppflags" = yes ; then
10628
10629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10631
10632                                 continue
10633                         elif test "${cf_tst_cflags}" = "\"'" ; then
10634
10635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10637
10638                                 continue
10639                         fi
10640                         ;;
10641                 esac
10642                 case "$CPPFLAGS" in
10643                 (*$cf_add_cflags)
10644                         ;;
10645                 (*)
10646                         case "$cf_add_cflags" in
10647                         (-D*)
10648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10649
10650 CPPFLAGS=`echo "$CPPFLAGS" | \
10651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10653
10654                                 ;;
10655                         esac
10656
10657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10659
10660                         ;;
10661                 esac
10662                 ;;
10663         (*)
10664
10665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10667
10668                 ;;
10669         esac
10670         ;;
10671 (yes)
10672
10673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10675
10676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10677
10678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10679                 && test -z "${cf_tst_cflags}" \
10680                 && cf_fix_cppflags=no
10681         ;;
10682 esac
10683 done
10684
10685 if test -n "$cf_new_cflags" ; then
10686
10687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10688         CFLAGS="${CFLAGS}$cf_new_cflags"
10689
10690 fi
10691
10692 if test -n "$cf_new_cppflags" ; then
10693
10694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10696
10697 fi
10698
10699 if test -n "$cf_new_extra_cppflags" ; then
10700
10701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10703
10704 fi
10705
10706 fi
10707
10708 fi # cf_cv_posix_visible
10709
10710         ;;
10711 (netbsd*)
10712         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10713         ;;
10714 (openbsd[6-9]*)
10715         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10716         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10717         # Abusing the conformance level is a workaround.
10718         { echo "$as_me:10718: WARNING: this system does not provide usable locale support" >&5
10719 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10720         cf_xopen_source="-D_BSD_SOURCE"
10721         cf_XOPEN_SOURCE=700
10722         ;;
10723 (openbsd[4-5]*)
10724         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10725         cf_xopen_source="-D_BSD_SOURCE"
10726         cf_XOPEN_SOURCE=600
10727         ;;
10728 (openbsd*)
10729         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10730         ;;
10731 (osf[45]*)
10732         cf_xopen_source="-D_OSF_SOURCE"
10733         ;;
10734 (nto-qnx*)
10735         cf_xopen_source="-D_QNX_SOURCE"
10736         ;;
10737 (sco*)
10738         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10739         ;;
10740 (solaris2.*)
10741         cf_xopen_source="-D__EXTENSIONS__"
10742         cf_cv_xopen_source=broken
10743         ;;
10744 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10745         cf_XOPEN_SOURCE=
10746         cf_POSIX_C_SOURCE=
10747         ;;
10748 (*)
10749
10750 echo "$as_me:10750: checking if we should define _XOPEN_SOURCE" >&5
10751 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10752 if test "${cf_cv_xopen_source+set}" = set; then
10753   echo $ECHO_N "(cached) $ECHO_C" >&6
10754 else
10755
10756         cat >"conftest.$ac_ext" <<_ACEOF
10757 #line 10757 "configure"
10758 #include "confdefs.h"
10759
10760 #include <stdlib.h>
10761 #include <string.h>
10762 #include <sys/types.h>
10763
10764 int
10765 main (void)
10766 {
10767
10768 #ifndef _XOPEN_SOURCE
10769 make an error
10770 #endif
10771   ;
10772   return 0;
10773 }
10774 _ACEOF
10775 rm -f "conftest.$ac_objext"
10776 if { (eval echo "$as_me:10776: \"$ac_compile\"") >&5
10777   (eval $ac_compile) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit "$ac_status"); } &&
10781          { ac_try='test -s "conftest.$ac_objext"'
10782   { (eval echo "$as_me:10782: \"$ac_try\"") >&5
10783   (eval $ac_try) 2>&5
10784   ac_status=$?
10785   echo "$as_me:10785: \$? = $ac_status" >&5
10786   (exit "$ac_status"); }; }; then
10787   cf_cv_xopen_source=no
10788 else
10789   echo "$as_me: failed program was:" >&5
10790 cat "conftest.$ac_ext" >&5
10791 cf_save="$CPPFLAGS"
10792
10793         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10794         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10795
10796          cat >"conftest.$ac_ext" <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799
10800 #include <stdlib.h>
10801 #include <string.h>
10802 #include <sys/types.h>
10803
10804 int
10805 main (void)
10806 {
10807
10808 #ifdef _XOPEN_SOURCE
10809 make an error
10810 #endif
10811   ;
10812   return 0;
10813 }
10814 _ACEOF
10815 rm -f "conftest.$ac_objext"
10816 if { (eval echo "$as_me:10816: \"$ac_compile\"") >&5
10817   (eval $ac_compile) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit "$ac_status"); } &&
10821          { ac_try='test -s "conftest.$ac_objext"'
10822   { (eval echo "$as_me:10822: \"$ac_try\"") >&5
10823   (eval $ac_try) 2>&5
10824   ac_status=$?
10825   echo "$as_me:10825: \$? = $ac_status" >&5
10826   (exit "$ac_status"); }; }; then
10827   cf_cv_xopen_source=no
10828 else
10829   echo "$as_me: failed program was:" >&5
10830 cat "conftest.$ac_ext" >&5
10831 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10832 fi
10833 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10834         CPPFLAGS="$cf_save"
10835
10836 fi
10837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10838
10839 fi
10840 echo "$as_me:10840: result: $cf_cv_xopen_source" >&5
10841 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10842
10843 if test "$cf_cv_xopen_source" != no ; then
10844
10845 CFLAGS=`echo "$CFLAGS" | \
10846         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10847                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10848
10849 CPPFLAGS=`echo "$CPPFLAGS" | \
10850         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10851                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10852
10853         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10854
10855 for cf_add_cflags in $cf_temp_xopen_source
10856 do
10857         case "x$cf_add_cflags" in
10858         (x-[DU]*)
10859
10860 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10861 while true
10862 do
10863         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'`
10864         test "$CFLAGS" != "$cf_old_cflag" || break
10865
10866         CFLAGS="$cf_old_cflag"
10867 done
10868
10869 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10870 while true
10871 do
10872         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'`
10873         test "$CPPFLAGS" != "$cf_old_cflag" || break
10874
10875         CPPFLAGS="$cf_old_cflag"
10876 done
10877
10878                 ;;
10879         esac
10880
10881 cf_fix_cppflags=no
10882 cf_new_cflags=
10883 cf_new_cppflags=
10884 cf_new_extra_cppflags=
10885
10886 for cf_add_cflags in $cf_add_cflags
10887 do
10888 case "$cf_fix_cppflags" in
10889 (no)
10890         case "$cf_add_cflags" in
10891         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10892                 case "$cf_add_cflags" in
10893                 (-D*)
10894                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10895
10896                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10897                                 && test -z "${cf_tst_cflags}" \
10898                                 && cf_fix_cppflags=yes
10899
10900                         if test "$cf_fix_cppflags" = yes ; then
10901
10902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10904
10905                                 continue
10906                         elif test "${cf_tst_cflags}" = "\"'" ; then
10907
10908         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10909         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10910
10911                                 continue
10912                         fi
10913                         ;;
10914                 esac
10915                 case "$CPPFLAGS" in
10916                 (*$cf_add_cflags)
10917                         ;;
10918                 (*)
10919                         case "$cf_add_cflags" in
10920                         (-D*)
10921                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10922
10923 CPPFLAGS=`echo "$CPPFLAGS" | \
10924         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10925                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10926
10927                                 ;;
10928                         esac
10929
10930         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10931         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10932
10933                         ;;
10934                 esac
10935                 ;;
10936         (*)
10937
10938         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10939         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10940
10941                 ;;
10942         esac
10943         ;;
10944 (yes)
10945
10946         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10947         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10948
10949         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10950
10951         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10952                 && test -z "${cf_tst_cflags}" \
10953                 && cf_fix_cppflags=no
10954         ;;
10955 esac
10956 done
10957
10958 if test -n "$cf_new_cflags" ; then
10959
10960         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10961         CFLAGS="${CFLAGS}$cf_new_cflags"
10962
10963 fi
10964
10965 if test -n "$cf_new_cppflags" ; then
10966
10967         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10968         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10969
10970 fi
10971
10972 if test -n "$cf_new_extra_cppflags" ; then
10973
10974         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10975         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10976
10977 fi
10978
10979 done
10980
10981 fi
10982
10983 if test "$cf_cv_posix_visible" = no; then
10984
10985 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10986
10987 cf_save_CFLAGS="$CFLAGS"
10988 cf_save_CPPFLAGS="$CPPFLAGS"
10989
10990 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10991         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10992                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10993
10994 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10995         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10996                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10997
10998 echo "$as_me:10998: checking if we should define _POSIX_C_SOURCE" >&5
10999 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11000 if test "${cf_cv_posix_c_source+set}" = set; then
11001   echo $ECHO_N "(cached) $ECHO_C" >&6
11002 else
11003
11004 echo "${as_me:-configure}:11004: testing if the symbol is already defined go no further ..." 1>&5
11005
11006         cat >"conftest.$ac_ext" <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009 #include <sys/types.h>
11010 int
11011 main (void)
11012 {
11013
11014 #ifndef _POSIX_C_SOURCE
11015 make an error
11016 #endif
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f "conftest.$ac_objext"
11022 if { (eval echo "$as_me:11022: \"$ac_compile\"") >&5
11023   (eval $ac_compile) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit "$ac_status"); } &&
11027          { ac_try='test -s "conftest.$ac_objext"'
11028   { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit "$ac_status"); }; }; then
11033   cf_cv_posix_c_source=no
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 cat "conftest.$ac_ext" >&5
11037 cf_want_posix_source=no
11038          case .$cf_POSIX_C_SOURCE in
11039          (.[12]??*)
11040                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11041                 ;;
11042          (.2)
11043                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11044                 cf_want_posix_source=yes
11045                 ;;
11046          (.*)
11047                 cf_want_posix_source=yes
11048                 ;;
11049          esac
11050          if test "$cf_want_posix_source" = yes ; then
11051                 cat >"conftest.$ac_ext" <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #include <sys/types.h>
11055 int
11056 main (void)
11057 {
11058
11059 #ifdef _POSIX_SOURCE
11060 make an error
11061 #endif
11062   ;
11063   return 0;
11064 }
11065 _ACEOF
11066 rm -f "conftest.$ac_objext"
11067 if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
11068   (eval $ac_compile) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit "$ac_status"); } &&
11072          { ac_try='test -s "conftest.$ac_objext"'
11073   { (eval echo "$as_me:11073: \"$ac_try\"") >&5
11074   (eval $ac_try) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit "$ac_status"); }; }; then
11078   :
11079 else
11080   echo "$as_me: failed program was:" >&5
11081 cat "conftest.$ac_ext" >&5
11082 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11083 fi
11084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11085          fi
11086
11087 echo "${as_me:-configure}:11087: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11088
11089          CFLAGS="$cf_trim_CFLAGS"
11090          CPPFLAGS="$cf_trim_CPPFLAGS"
11091
11092         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11093         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11094
11095 echo "${as_me:-configure}:11095: testing if the second compile does not leave our definition intact error ..." 1>&5
11096
11097          cat >"conftest.$ac_ext" <<_ACEOF
11098 #line 11098 "configure"
11099 #include "confdefs.h"
11100 #include <sys/types.h>
11101 int
11102 main (void)
11103 {
11104
11105 #ifndef _POSIX_C_SOURCE
11106 make an error
11107 #endif
11108   ;
11109   return 0;
11110 }
11111 _ACEOF
11112 rm -f "conftest.$ac_objext"
11113 if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
11114   (eval $ac_compile) 2>&5
11115   ac_status=$?
11116   echo "$as_me:11116: \$? = $ac_status" >&5
11117   (exit "$ac_status"); } &&
11118          { ac_try='test -s "conftest.$ac_objext"'
11119   { (eval echo "$as_me:11119: \"$ac_try\"") >&5
11120   (eval $ac_try) 2>&5
11121   ac_status=$?
11122   echo "$as_me:11122: \$? = $ac_status" >&5
11123   (exit "$ac_status"); }; }; then
11124   :
11125 else
11126   echo "$as_me: failed program was:" >&5
11127 cat "conftest.$ac_ext" >&5
11128 cf_cv_posix_c_source=no
11129 fi
11130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11131          CFLAGS="$cf_save_CFLAGS"
11132          CPPFLAGS="$cf_save_CPPFLAGS"
11133
11134 fi
11135 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11136
11137 fi
11138 echo "$as_me:11138: result: $cf_cv_posix_c_source" >&5
11139 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11140
11141 if test "$cf_cv_posix_c_source" != no ; then
11142         CFLAGS="$cf_trim_CFLAGS"
11143         CPPFLAGS="$cf_trim_CPPFLAGS"
11144
11145 cf_fix_cppflags=no
11146 cf_new_cflags=
11147 cf_new_cppflags=
11148 cf_new_extra_cppflags=
11149
11150 for cf_add_cflags in $cf_cv_posix_c_source
11151 do
11152 case "$cf_fix_cppflags" in
11153 (no)
11154         case "$cf_add_cflags" in
11155         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11156                 case "$cf_add_cflags" in
11157                 (-D*)
11158                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11159
11160                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11161                                 && test -z "${cf_tst_cflags}" \
11162                                 && cf_fix_cppflags=yes
11163
11164                         if test "$cf_fix_cppflags" = yes ; then
11165
11166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168
11169                                 continue
11170                         elif test "${cf_tst_cflags}" = "\"'" ; then
11171
11172         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11173         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11174
11175                                 continue
11176                         fi
11177                         ;;
11178                 esac
11179                 case "$CPPFLAGS" in
11180                 (*$cf_add_cflags)
11181                         ;;
11182                 (*)
11183                         case "$cf_add_cflags" in
11184                         (-D*)
11185                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11186
11187 CPPFLAGS=`echo "$CPPFLAGS" | \
11188         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11189                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11190
11191                                 ;;
11192                         esac
11193
11194         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11195         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11196
11197                         ;;
11198                 esac
11199                 ;;
11200         (*)
11201
11202         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11203         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11204
11205                 ;;
11206         esac
11207         ;;
11208 (yes)
11209
11210         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11211         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11212
11213         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11214
11215         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11216                 && test -z "${cf_tst_cflags}" \
11217                 && cf_fix_cppflags=no
11218         ;;
11219 esac
11220 done
11221
11222 if test -n "$cf_new_cflags" ; then
11223
11224         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11225         CFLAGS="${CFLAGS}$cf_new_cflags"
11226
11227 fi
11228
11229 if test -n "$cf_new_cppflags" ; then
11230
11231         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11232         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11233
11234 fi
11235
11236 if test -n "$cf_new_extra_cppflags" ; then
11237
11238         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11239         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11240
11241 fi
11242
11243 fi
11244
11245 fi # cf_cv_posix_visible
11246
11247         ;;
11248 esac
11249
11250 if test -n "$cf_xopen_source" ; then
11251
11252 for cf_add_cflags in $cf_xopen_source
11253 do
11254         case "x$cf_add_cflags" in
11255         (x-[DU]*)
11256
11257 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11258 while true
11259 do
11260         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'`
11261         test "$CFLAGS" != "$cf_old_cflag" || break
11262         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11263
11264 echo "${as_me:-configure}:11264: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11265
11266         CFLAGS="$cf_old_cflag"
11267 done
11268
11269 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11270 while true
11271 do
11272         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'`
11273         test "$CPPFLAGS" != "$cf_old_cflag" || break
11274         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11275
11276 echo "${as_me:-configure}:11276: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11277
11278         CPPFLAGS="$cf_old_cflag"
11279 done
11280
11281                 ;;
11282         esac
11283
11284 cf_fix_cppflags=no
11285 cf_new_cflags=
11286 cf_new_cppflags=
11287 cf_new_extra_cppflags=
11288
11289 for cf_add_cflags in $cf_add_cflags
11290 do
11291 case "$cf_fix_cppflags" in
11292 (no)
11293         case "$cf_add_cflags" in
11294         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11295                 case "$cf_add_cflags" in
11296                 (-D*)
11297                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11298
11299                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11300                                 && test -z "${cf_tst_cflags}" \
11301                                 && cf_fix_cppflags=yes
11302
11303                         if test "$cf_fix_cppflags" = yes ; then
11304
11305         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11306         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11307
11308                                 continue
11309                         elif test "${cf_tst_cflags}" = "\"'" ; then
11310
11311         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11312         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11313
11314                                 continue
11315                         fi
11316                         ;;
11317                 esac
11318                 case "$CPPFLAGS" in
11319                 (*$cf_add_cflags)
11320                         ;;
11321                 (*)
11322                         case "$cf_add_cflags" in
11323                         (-D*)
11324                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11325
11326 CPPFLAGS=`echo "$CPPFLAGS" | \
11327         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11328                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11329
11330                                 ;;
11331                         esac
11332
11333         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11334         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11335
11336                         ;;
11337                 esac
11338                 ;;
11339         (*)
11340
11341         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11342         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11343
11344                 ;;
11345         esac
11346         ;;
11347 (yes)
11348
11349         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11350         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11351
11352         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11353
11354         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11355                 && test -z "${cf_tst_cflags}" \
11356                 && cf_fix_cppflags=no
11357         ;;
11358 esac
11359 done
11360
11361 if test -n "$cf_new_cflags" ; then
11362         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11363
11364 echo "${as_me:-configure}:11364: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11365
11366         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11367         CFLAGS="${CFLAGS}$cf_new_cflags"
11368
11369 fi
11370
11371 if test -n "$cf_new_cppflags" ; then
11372         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11373
11374 echo "${as_me:-configure}:11374: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11375
11376         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11377         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11378
11379 fi
11380
11381 if test -n "$cf_new_extra_cppflags" ; then
11382         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11383
11384 echo "${as_me:-configure}:11384: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11385
11386         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11387         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11388
11389 fi
11390
11391 done
11392
11393 fi
11394
11395 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11396         echo "$as_me:11396: checking if _XOPEN_SOURCE really is set" >&5
11397 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11398         cat >"conftest.$ac_ext" <<_ACEOF
11399 #line 11399 "configure"
11400 #include "confdefs.h"
11401 #include <stdlib.h>
11402 int
11403 main (void)
11404 {
11405
11406 #ifndef _XOPEN_SOURCE
11407 make an error
11408 #endif
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f "conftest.$ac_objext"
11414 if { (eval echo "$as_me:11414: \"$ac_compile\"") >&5
11415   (eval $ac_compile) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit "$ac_status"); } &&
11419          { ac_try='test -s "conftest.$ac_objext"'
11420   { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit "$ac_status"); }; }; then
11425   cf_XOPEN_SOURCE_set=yes
11426 else
11427   echo "$as_me: failed program was:" >&5
11428 cat "conftest.$ac_ext" >&5
11429 cf_XOPEN_SOURCE_set=no
11430 fi
11431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11432         echo "$as_me:11432: result: $cf_XOPEN_SOURCE_set" >&5
11433 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11434         if test "$cf_XOPEN_SOURCE_set" = yes
11435         then
11436                 cat >"conftest.$ac_ext" <<_ACEOF
11437 #line 11437 "configure"
11438 #include "confdefs.h"
11439 #include <stdlib.h>
11440 int
11441 main (void)
11442 {
11443
11444 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11445 make an error
11446 #endif
11447   ;
11448   return 0;
11449 }
11450 _ACEOF
11451 rm -f "conftest.$ac_objext"
11452 if { (eval echo "$as_me:11452: \"$ac_compile\"") >&5
11453   (eval $ac_compile) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit "$ac_status"); } &&
11457          { ac_try='test -s "conftest.$ac_objext"'
11458   { (eval echo "$as_me:11458: \"$ac_try\"") >&5
11459   (eval $ac_try) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit "$ac_status"); }; }; then
11463   cf_XOPEN_SOURCE_set_ok=yes
11464 else
11465   echo "$as_me: failed program was:" >&5
11466 cat "conftest.$ac_ext" >&5
11467 cf_XOPEN_SOURCE_set_ok=no
11468 fi
11469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11470                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11471                 then
11472                         { echo "$as_me:11472: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11473 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11474                 fi
11475         else
11476
11477 echo "$as_me:11477: checking if we should define _XOPEN_SOURCE" >&5
11478 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11479 if test "${cf_cv_xopen_source+set}" = set; then
11480   echo $ECHO_N "(cached) $ECHO_C" >&6
11481 else
11482
11483         cat >"conftest.$ac_ext" <<_ACEOF
11484 #line 11484 "configure"
11485 #include "confdefs.h"
11486
11487 #include <stdlib.h>
11488 #include <string.h>
11489 #include <sys/types.h>
11490
11491 int
11492 main (void)
11493 {
11494
11495 #ifndef _XOPEN_SOURCE
11496 make an error
11497 #endif
11498   ;
11499   return 0;
11500 }
11501 _ACEOF
11502 rm -f "conftest.$ac_objext"
11503 if { (eval echo "$as_me:11503: \"$ac_compile\"") >&5
11504   (eval $ac_compile) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit "$ac_status"); } &&
11508          { ac_try='test -s "conftest.$ac_objext"'
11509   { (eval echo "$as_me:11509: \"$ac_try\"") >&5
11510   (eval $ac_try) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit "$ac_status"); }; }; then
11514   cf_cv_xopen_source=no
11515 else
11516   echo "$as_me: failed program was:" >&5
11517 cat "conftest.$ac_ext" >&5
11518 cf_save="$CPPFLAGS"
11519
11520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11521         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11522
11523          cat >"conftest.$ac_ext" <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526
11527 #include <stdlib.h>
11528 #include <string.h>
11529 #include <sys/types.h>
11530
11531 int
11532 main (void)
11533 {
11534
11535 #ifdef _XOPEN_SOURCE
11536 make an error
11537 #endif
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 rm -f "conftest.$ac_objext"
11543 if { (eval echo "$as_me:11543: \"$ac_compile\"") >&5
11544   (eval $ac_compile) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit "$ac_status"); } &&
11548          { ac_try='test -s "conftest.$ac_objext"'
11549   { (eval echo "$as_me:11549: \"$ac_try\"") >&5
11550   (eval $ac_try) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit "$ac_status"); }; }; then
11554   cf_cv_xopen_source=no
11555 else
11556   echo "$as_me: failed program was:" >&5
11557 cat "conftest.$ac_ext" >&5
11558 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11559 fi
11560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11561         CPPFLAGS="$cf_save"
11562
11563 fi
11564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11565
11566 fi
11567 echo "$as_me:11567: result: $cf_cv_xopen_source" >&5
11568 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11569
11570 if test "$cf_cv_xopen_source" != no ; then
11571
11572 CFLAGS=`echo "$CFLAGS" | \
11573         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11574                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11575
11576 CPPFLAGS=`echo "$CPPFLAGS" | \
11577         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11578                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11579
11580         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11581
11582 for cf_add_cflags in $cf_temp_xopen_source
11583 do
11584         case "x$cf_add_cflags" in
11585         (x-[DU]*)
11586
11587 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11588 while true
11589 do
11590         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'`
11591         test "$CFLAGS" != "$cf_old_cflag" || break
11592
11593         CFLAGS="$cf_old_cflag"
11594 done
11595
11596 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11597 while true
11598 do
11599         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'`
11600         test "$CPPFLAGS" != "$cf_old_cflag" || break
11601
11602         CPPFLAGS="$cf_old_cflag"
11603 done
11604
11605                 ;;
11606         esac
11607
11608 cf_fix_cppflags=no
11609 cf_new_cflags=
11610 cf_new_cppflags=
11611 cf_new_extra_cppflags=
11612
11613 for cf_add_cflags in $cf_add_cflags
11614 do
11615 case "$cf_fix_cppflags" in
11616 (no)
11617         case "$cf_add_cflags" in
11618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11619                 case "$cf_add_cflags" in
11620                 (-D*)
11621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11622
11623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11624                                 && test -z "${cf_tst_cflags}" \
11625                                 && cf_fix_cppflags=yes
11626
11627                         if test "$cf_fix_cppflags" = yes ; then
11628
11629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11631
11632                                 continue
11633                         elif test "${cf_tst_cflags}" = "\"'" ; then
11634
11635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11637
11638                                 continue
11639                         fi
11640                         ;;
11641                 esac
11642                 case "$CPPFLAGS" in
11643                 (*$cf_add_cflags)
11644                         ;;
11645                 (*)
11646                         case "$cf_add_cflags" in
11647                         (-D*)
11648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11649
11650 CPPFLAGS=`echo "$CPPFLAGS" | \
11651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11653
11654                                 ;;
11655                         esac
11656
11657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11659
11660                         ;;
11661                 esac
11662                 ;;
11663         (*)
11664
11665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11667
11668                 ;;
11669         esac
11670         ;;
11671 (yes)
11672
11673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11675
11676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11677
11678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11679                 && test -z "${cf_tst_cflags}" \
11680                 && cf_fix_cppflags=no
11681         ;;
11682 esac
11683 done
11684
11685 if test -n "$cf_new_cflags" ; then
11686
11687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11688         CFLAGS="${CFLAGS}$cf_new_cflags"
11689
11690 fi
11691
11692 if test -n "$cf_new_cppflags" ; then
11693
11694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11696
11697 fi
11698
11699 if test -n "$cf_new_extra_cppflags" ; then
11700
11701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11703
11704 fi
11705
11706 done
11707
11708 fi
11709
11710         fi
11711 fi
11712 fi # cf_cv_posix_visible
11713
11714 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11715
11716 # Work around breakage on OS X
11717
11718 echo "$as_me:11718: checking if SIGWINCH is defined" >&5
11719 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11720 if test "${cf_cv_define_sigwinch+set}" = set; then
11721   echo $ECHO_N "(cached) $ECHO_C" >&6
11722 else
11723
11724         cat >"conftest.$ac_ext" <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11727
11728 #include <sys/types.h>
11729 #include <sys/signal.h>
11730
11731 int
11732 main (void)
11733 {
11734 int x = SIGWINCH; (void)x
11735   ;
11736   return 0;
11737 }
11738 _ACEOF
11739 rm -f "conftest.$ac_objext"
11740 if { (eval echo "$as_me:11740: \"$ac_compile\"") >&5
11741   (eval $ac_compile) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit "$ac_status"); } &&
11745          { ac_try='test -s "conftest.$ac_objext"'
11746   { (eval echo "$as_me:11746: \"$ac_try\"") >&5
11747   (eval $ac_try) 2>&5
11748   ac_status=$?
11749   echo "$as_me:11749: \$? = $ac_status" >&5
11750   (exit "$ac_status"); }; }; then
11751   cf_cv_define_sigwinch=yes
11752 else
11753   echo "$as_me: failed program was:" >&5
11754 cat "conftest.$ac_ext" >&5
11755 cat >"conftest.$ac_ext" <<_ACEOF
11756 #line 11756 "configure"
11757 #include "confdefs.h"
11758
11759 #undef _XOPEN_SOURCE
11760 #undef _POSIX_SOURCE
11761 #undef _POSIX_C_SOURCE
11762 #include <sys/types.h>
11763 #include <sys/signal.h>
11764
11765 int
11766 main (void)
11767 {
11768 int x = SIGWINCH; (void)x
11769   ;
11770   return 0;
11771 }
11772 _ACEOF
11773 rm -f "conftest.$ac_objext"
11774 if { (eval echo "$as_me:11774: \"$ac_compile\"") >&5
11775   (eval $ac_compile) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit "$ac_status"); } &&
11779          { ac_try='test -s "conftest.$ac_objext"'
11780   { (eval echo "$as_me:11780: \"$ac_try\"") >&5
11781   (eval $ac_try) 2>&5
11782   ac_status=$?
11783   echo "$as_me:11783: \$? = $ac_status" >&5
11784   (exit "$ac_status"); }; }; then
11785   cf_cv_define_sigwinch=maybe
11786 else
11787   echo "$as_me: failed program was:" >&5
11788 cat "conftest.$ac_ext" >&5
11789 cf_cv_define_sigwinch=no
11790 fi
11791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11792
11793 fi
11794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11795
11796 fi
11797 echo "$as_me:11797: result: $cf_cv_define_sigwinch" >&5
11798 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11799
11800 if test "$cf_cv_define_sigwinch" = maybe ; then
11801 echo "$as_me:11801: checking for actual SIGWINCH definition" >&5
11802 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11803 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11804   echo $ECHO_N "(cached) $ECHO_C" >&6
11805 else
11806
11807 cf_cv_fixup_sigwinch=unknown
11808 cf_sigwinch=32
11809 while test "$cf_sigwinch" != 1
11810 do
11811         cat >"conftest.$ac_ext" <<_ACEOF
11812 #line 11812 "configure"
11813 #include "confdefs.h"
11814
11815 #undef _XOPEN_SOURCE
11816 #undef _POSIX_SOURCE
11817 #undef _POSIX_C_SOURCE
11818 #include <sys/types.h>
11819 #include <sys/signal.h>
11820
11821 int
11822 main (void)
11823 {
11824
11825 #if SIGWINCH != $cf_sigwinch
11826 make an error
11827 #endif
11828 int x = SIGWINCH; (void)x
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f "conftest.$ac_objext"
11834 if { (eval echo "$as_me:11834: \"$ac_compile\"") >&5
11835   (eval $ac_compile) 2>&5
11836   ac_status=$?
11837   echo "$as_me:11837: \$? = $ac_status" >&5
11838   (exit "$ac_status"); } &&
11839          { ac_try='test -s "conftest.$ac_objext"'
11840   { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit "$ac_status"); }; }; then
11845   cf_cv_fixup_sigwinch=$cf_sigwinch
11846          break
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 cat "conftest.$ac_ext" >&5
11850 fi
11851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11852
11853 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11854 done
11855
11856 fi
11857 echo "$as_me:11857: result: $cf_cv_fixup_sigwinch" >&5
11858 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11859
11860         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11861                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11862         fi
11863 fi
11864
11865 # Checks for CODESET support.
11866
11867 echo "$as_me:11867: checking for nl_langinfo and CODESET" >&5
11868 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11869 if test "${am_cv_langinfo_codeset+set}" = set; then
11870   echo $ECHO_N "(cached) $ECHO_C" >&6
11871 else
11872   cat >"conftest.$ac_ext" <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875 #include <langinfo.h>
11876 int
11877 main (void)
11878 {
11879 char* cs = nl_langinfo(CODESET); (void)cs
11880   ;
11881   return 0;
11882 }
11883 _ACEOF
11884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11885 if { (eval echo "$as_me:11885: \"$ac_link\"") >&5
11886   (eval $ac_link) 2>&5
11887   ac_status=$?
11888   echo "$as_me:11888: \$? = $ac_status" >&5
11889   (exit "$ac_status"); } &&
11890          { ac_try='test -s "conftest$ac_exeext"'
11891   { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892   (eval $ac_try) 2>&5
11893   ac_status=$?
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit "$ac_status"); }; }; then
11896   am_cv_langinfo_codeset=yes
11897 else
11898   echo "$as_me: failed program was:" >&5
11899 cat "conftest.$ac_ext" >&5
11900 am_cv_langinfo_codeset=no
11901 fi
11902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11903
11904 fi
11905 echo "$as_me:11905: result: $am_cv_langinfo_codeset" >&5
11906 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11907         if test "$am_cv_langinfo_codeset" = yes; then
11908
11909 cat >>confdefs.h <<\EOF
11910 #define HAVE_LANGINFO_CODESET 1
11911 EOF
11912
11913         fi
11914
11915 # use these variables to work around a defect in gcc's fixincludes.
11916 NCURSES_OK_WCHAR_T=
11917 NCURSES_OK_WINT_T=
11918
11919 echo "$as_me:11919: checking if you want wide-character code" >&5
11920 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11921
11922 # Check whether --enable-widec or --disable-widec was given.
11923 if test "${enable_widec+set}" = set; then
11924   enableval="$enable_widec"
11925   with_widec=$enableval
11926 else
11927   with_widec=no
11928 fi;
11929 echo "$as_me:11929: result: $with_widec" >&5
11930 echo "${ECHO_T}$with_widec" >&6
11931
11932 NCURSES_WCWIDTH_GRAPHICS=1
11933
11934 if test "x$with_widec" = xyes ; then
11935         if test "x$disable_lib_suffixes" = xno ; then
11936                 LIB_SUFFIX="w${LIB_SUFFIX}"
11937         fi
11938
11939 cat >>confdefs.h <<\EOF
11940 #define USE_WIDEC_SUPPORT 1
11941 EOF
11942
11943 cat >>confdefs.h <<\EOF
11944 #define NCURSES_WIDECHAR 1
11945 EOF
11946
11947 for ac_header in \
11948 wchar.h \
11949 wctype.h \
11950
11951 do
11952 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11953 echo "$as_me:11953: checking for $ac_header" >&5
11954 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11955 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11956   echo $ECHO_N "(cached) $ECHO_C" >&6
11957 else
11958   cat >"conftest.$ac_ext" <<_ACEOF
11959 #line 11959 "configure"
11960 #include "confdefs.h"
11961 #include <$ac_header>
11962 _ACEOF
11963 if { (eval echo "$as_me:11963: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11964   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11965   ac_status=$?
11966   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11967   rm -f conftest.er1
11968   cat conftest.err >&5
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit "$ac_status"); } >/dev/null; then
11971   if test -s conftest.err; then
11972     ac_cpp_err=$ac_c_preproc_warn_flag
11973   else
11974     ac_cpp_err=
11975   fi
11976 else
11977   ac_cpp_err=yes
11978 fi
11979 if test -z "$ac_cpp_err"; then
11980   eval "$as_ac_Header=yes"
11981 else
11982   echo "$as_me: failed program was:" >&5
11983   cat "conftest.$ac_ext" >&5
11984   eval "$as_ac_Header=no"
11985 fi
11986 rm -f conftest.err "conftest.$ac_ext"
11987 fi
11988 echo "$as_me:11988: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11989 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11990 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11991   cat >>confdefs.h <<EOF
11992 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11993 EOF
11994
11995 fi
11996 done
11997
11998 echo "$as_me:11998: checking if wchar.h can be used as is" >&5
11999 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12000 if test "${cf_cv_wchar_h_okay+set}" = set; then
12001   echo $ECHO_N "(cached) $ECHO_C" >&6
12002 else
12003
12004 cat >"conftest.$ac_ext" <<_ACEOF
12005 #line 12005 "configure"
12006 #include "confdefs.h"
12007
12008 #include <stdlib.h>
12009 #ifdef HAVE_WCHAR_H
12010 #include <wchar.h>
12011 #endif
12012 #ifdef HAVE_WCTYPE_H
12013 #include <wctype.h>
12014 #endif
12015
12016 int
12017 main (void)
12018 {
12019
12020         wint_t foo = 0;
12021         int bar = iswpunct(foo)
12022   ;
12023   return 0;
12024 }
12025 _ACEOF
12026 rm -f "conftest.$ac_objext"
12027 if { (eval echo "$as_me:12027: \"$ac_compile\"") >&5
12028   (eval $ac_compile) 2>&5
12029   ac_status=$?
12030   echo "$as_me:12030: \$? = $ac_status" >&5
12031   (exit "$ac_status"); } &&
12032          { ac_try='test -s "conftest.$ac_objext"'
12033   { (eval echo "$as_me:12033: \"$ac_try\"") >&5
12034   (eval $ac_try) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit "$ac_status"); }; }; then
12038   cf_cv_wchar_h_okay=yes
12039 else
12040   echo "$as_me: failed program was:" >&5
12041 cat "conftest.$ac_ext" >&5
12042 cf_cv_wchar_h_okay=no
12043 fi
12044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12045 fi
12046 echo "$as_me:12046: result: $cf_cv_wchar_h_okay" >&5
12047 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12048
12049 if test "$cf_cv_wchar_h_okay" = no
12050 then
12051
12052 echo "$as_me:12052: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12053 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12054 cat >"conftest.$ac_ext" <<_ACEOF
12055 #line 12055 "configure"
12056 #include "confdefs.h"
12057 #include <sys/types.h>
12058
12059 int
12060 main (void)
12061 {
12062
12063 #ifndef _XOPEN_SOURCE_EXTENDED
12064 make an error
12065 #endif
12066   ;
12067   return 0;
12068 }
12069 _ACEOF
12070 rm -f "conftest.$ac_objext"
12071 if { (eval echo "$as_me:12071: \"$ac_compile\"") >&5
12072   (eval $ac_compile) 2>&5
12073   ac_status=$?
12074   echo "$as_me:12074: \$? = $ac_status" >&5
12075   (exit "$ac_status"); } &&
12076          { ac_try='test -s "conftest.$ac_objext"'
12077   { (eval echo "$as_me:12077: \"$ac_try\"") >&5
12078   (eval $ac_try) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); }; }; then
12082   cf_result=no
12083 else
12084   echo "$as_me: failed program was:" >&5
12085 cat "conftest.$ac_ext" >&5
12086 cf_result=yes
12087 fi
12088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12089 echo "$as_me:12089: result: $cf_result" >&5
12090 echo "${ECHO_T}$cf_result" >&6
12091
12092 if test "$cf_result" = yes ; then
12093         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12094 elif test "x" != "x" ; then
12095         echo "$as_me:12095: checking checking for compatible value versus " >&5
12096 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12097         cat >"conftest.$ac_ext" <<_ACEOF
12098 #line 12098 "configure"
12099 #include "confdefs.h"
12100 #include <sys/types.h>
12101
12102 int
12103 main (void)
12104 {
12105
12106 #if _XOPEN_SOURCE_EXTENDED- < 0
12107 make an error
12108 #endif
12109   ;
12110   return 0;
12111 }
12112 _ACEOF
12113 rm -f "conftest.$ac_objext"
12114 if { (eval echo "$as_me:12114: \"$ac_compile\"") >&5
12115   (eval $ac_compile) 2>&5
12116   ac_status=$?
12117   echo "$as_me:12117: \$? = $ac_status" >&5
12118   (exit "$ac_status"); } &&
12119          { ac_try='test -s "conftest.$ac_objext"'
12120   { (eval echo "$as_me:12120: \"$ac_try\"") >&5
12121   (eval $ac_try) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit "$ac_status"); }; }; then
12125   cf_result=yes
12126 else
12127   echo "$as_me: failed program was:" >&5
12128 cat "conftest.$ac_ext" >&5
12129 cf_result=no
12130 fi
12131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12132         echo "$as_me:12132: result: $cf_result" >&5
12133 echo "${ECHO_T}$cf_result" >&6
12134         if test "$cf_result" = no ; then
12135                 # perhaps we can override it - try...
12136                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12137         fi
12138 fi
12139
12140 fi
12141
12142 echo "$as_me:12142: checking if wcwidth agrees graphics are single-width" >&5
12143 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12144 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12145   echo $ECHO_N "(cached) $ECHO_C" >&6
12146 else
12147
12148 cat >conftest.in <<CF_EOF
12149 -       VT100 symbols
12150 0x250c  upper left corner
12151 0x2514  lower left corner
12152 0x2510  upper right corner
12153 0x2518  lower right corner
12154 0x251c  tee pointing left
12155 0x2524  tee pointing right
12156 0x2534  tee pointing up
12157 0x252c  tee pointing down
12158 0x2500  horizontal line
12159 0x2502  vertical line
12160 0x253c  large plus or crossover
12161 0x23ba  scan line 1
12162 0x23bd  scan line 9
12163 0x25c6  diamond
12164 0x2592  checker board (stipple)
12165 0x00b0  degree symbol
12166 0x00b1  plus/minus
12167 0x00b7  bullet
12168 -       Teletype 5410v1 symbols
12169 0x2190  arrow pointing left
12170 0x2192  arrow pointing right
12171 0x2193  arrow pointing down
12172 0x2191  arrow pointing up
12173 0x2592  board of squares
12174 0x2603  lantern symbol
12175 0x25ae  solid square block
12176 -       these defaults were invented for ncurses
12177 0x23bb  scan line 3
12178 0x23bc  scan line 7
12179 0x2264  less-than-or-equal-to
12180 0x2265  greater-than-or-equal-to
12181 0x03c0  greek pi
12182 0x2260  not-equal
12183 0x00a3  pound-sterling symbol
12184 -       thick-line-drawing
12185 0x250f  upper left corner
12186 0x2517  lower left corner
12187 0x2513  upper right corner
12188 0x251b  lower right corner
12189 0x2523  tee pointing left
12190 0x252b  tee pointing right
12191 0x253b  tee pointing up
12192 0x2533  tee pointing down
12193 0x2501  horizontal line
12194 0x2503  vertical line
12195 0x254b  large plus or crossover
12196 -       double-line-drawing
12197 0x2554  upper left corner
12198 0x255a  lower left corner
12199 0x2557  upper right corner
12200 0x255d  lower right corner
12201 0x2563  tee pointing left
12202 0x2560  tee pointing right
12203 0x2569  tee pointing up
12204 0x2566  tee pointing down
12205 0x2550  horizontal line
12206 0x2551  vertical line
12207 0x256c  large plus or crossover
12208 CF_EOF
12209 if test "$cross_compiling" = yes; then
12210   cf_cv_wcwidth_graphics=unknown
12211 else
12212   cat >"conftest.$ac_ext" <<_ACEOF
12213 #line 12213 "configure"
12214 #include "confdefs.h"
12215
12216 #include <locale.h>
12217 #include <stdio.h>
12218 #include <wchar.h>
12219
12220 #define MY_LEN 80
12221
12222 int
12223 main(void)
12224 {
12225         FILE *fp;
12226         int value;
12227         char buffer[MY_LEN + 1];
12228         char notes[MY_LEN + 1];
12229         int totals = 0;
12230         int passed = 0;
12231
12232         if (setlocale(LC_ALL, "en_US.UTF8") ||
12233                 setlocale(LC_ALL, "en_US.UTF-8") ||
12234                 setlocale(LC_ALL, "en_US.utf8") ||
12235                 setlocale(LC_ALL, "en_US.utf-8")) {
12236                 if ((fp = fopen("conftest.in", "r")) != 0) {
12237                         while (fgets(buffer, MY_LEN, fp) != 0) {
12238                                 if (*buffer == '-') {
12239                                         fprintf(stderr, "\\t%s", buffer);
12240                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12241                                         ++totals;
12242                                         if (wcwidth(value) == 1)
12243                                                 ++passed;
12244                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12245                                 } else {
12246                                         fprintf(stderr, "?\\t%s", buffer);
12247                                 }
12248                         }
12249                 }
12250         }
12251         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12252         return (totals == passed) ? 0 : 1;
12253 }
12254
12255 _ACEOF
12256 rm -f "conftest$ac_exeext"
12257 if { (eval echo "$as_me:12257: \"$ac_link\"") >&5
12258   (eval $ac_link) 2>&5
12259   ac_status=$?
12260   echo "$as_me:12260: \$? = $ac_status" >&5
12261   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12262   { (eval echo "$as_me:12262: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit "$ac_status"); }; }; then
12267   cf_cv_wcwidth_graphics=yes
12268 else
12269   echo "$as_me: program exited with status $ac_status" >&5
12270 echo "$as_me: failed program was:" >&5
12271 cat "conftest.$ac_ext" >&5
12272 cf_cv_wcwidth_graphics=no
12273 fi
12274 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12275 fi
12276
12277 fi
12278 echo "$as_me:12278: result: $cf_cv_wcwidth_graphics" >&5
12279 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12280
12281         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12282
12283         # with_overwrite=no
12284         NCURSES_CH_T=cchar_t
12285
12286 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12287 do
12288 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12289 echo "$as_me:12289: checking for $ac_func" >&5
12290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12291 if eval "test \"\${$as_ac_var+set}\" = set"; then
12292   echo $ECHO_N "(cached) $ECHO_C" >&6
12293 else
12294   cat >"conftest.$ac_ext" <<_ACEOF
12295 #line 12295 "configure"
12296 #include "confdefs.h"
12297 #define $ac_func autoconf_temporary
12298 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12299 #undef $ac_func
12300
12301 #ifdef __cplusplus
12302 extern "C"
12303 #endif
12304
12305 /* We use char because int might match the return type of a gcc2
12306    builtin and then its argument prototype would still apply.  */
12307 char $ac_func (void);
12308
12309 int
12310 main (void)
12311 {
12312
12313 /* The GNU C library defines stubs for functions which it implements
12314     to always fail with ENOSYS.  Some functions are actually named
12315     something starting with __ and the normal name is an alias.  */
12316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12317 #error found stub for $ac_func
12318 #endif
12319
12320         return $ac_func ();
12321   ;
12322   return 0;
12323 }
12324 _ACEOF
12325 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12326 if { (eval echo "$as_me:12326: \"$ac_link\"") >&5
12327   (eval $ac_link) 2>&5
12328   ac_status=$?
12329   echo "$as_me:12329: \$? = $ac_status" >&5
12330   (exit "$ac_status"); } &&
12331          { ac_try='test -s "conftest$ac_exeext"'
12332   { (eval echo "$as_me:12332: \"$ac_try\"") >&5
12333   (eval $ac_try) 2>&5
12334   ac_status=$?
12335   echo "$as_me:12335: \$? = $ac_status" >&5
12336   (exit "$ac_status"); }; }; then
12337   eval "$as_ac_var=yes"
12338 else
12339   echo "$as_me: failed program was:" >&5
12340 cat "conftest.$ac_ext" >&5
12341 eval "$as_ac_var=no"
12342 fi
12343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12344 fi
12345 echo "$as_me:12345: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12346 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12347 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12348   cat >>confdefs.h <<EOF
12349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12350 EOF
12351
12352 fi
12353 done
12354
12355         if test "x$ac_cv_func_putwc" != xyes ; then
12356
12357 for ac_header in wchar.h
12358 do
12359 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12360 echo "$as_me:12360: checking for $ac_header" >&5
12361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12363   echo $ECHO_N "(cached) $ECHO_C" >&6
12364 else
12365   cat >"conftest.$ac_ext" <<_ACEOF
12366 #line 12366 "configure"
12367 #include "confdefs.h"
12368 #include <$ac_header>
12369 _ACEOF
12370 if { (eval echo "$as_me:12370: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12371   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12372   ac_status=$?
12373   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12374   rm -f conftest.er1
12375   cat conftest.err >&5
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit "$ac_status"); } >/dev/null; then
12378   if test -s conftest.err; then
12379     ac_cpp_err=$ac_c_preproc_warn_flag
12380   else
12381     ac_cpp_err=
12382   fi
12383 else
12384   ac_cpp_err=yes
12385 fi
12386 if test -z "$ac_cpp_err"; then
12387   eval "$as_ac_Header=yes"
12388 else
12389   echo "$as_me: failed program was:" >&5
12390   cat "conftest.$ac_ext" >&5
12391   eval "$as_ac_Header=no"
12392 fi
12393 rm -f conftest.err "conftest.$ac_ext"
12394 fi
12395 echo "$as_me:12395: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12396 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12397 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12398   cat >>confdefs.h <<EOF
12399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12400 EOF
12401
12402 fi
12403 done
12404
12405 echo "$as_me:12405: checking for multibyte character support" >&5
12406 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12407 if test "${cf_cv_utf8_lib+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410
12411         cf_save_LIBS="$LIBS"
12412         cat >"conftest.$ac_ext" <<_ACEOF
12413 #line 12413 "configure"
12414 #include "confdefs.h"
12415
12416 #include <stdlib.h>
12417 #include <stdio.h>
12418 #ifdef HAVE_WCHAR_H
12419 #include <wchar.h>
12420 #endif
12421
12422 int
12423 main (void)
12424 {
12425 putwc(0,0);
12426   ;
12427   return 0;
12428 }
12429 _ACEOF
12430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12431 if { (eval echo "$as_me:12431: \"$ac_link\"") >&5
12432   (eval $ac_link) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit "$ac_status"); } &&
12436          { ac_try='test -s "conftest$ac_exeext"'
12437   { (eval echo "$as_me:12437: \"$ac_try\"") >&5
12438   (eval $ac_try) 2>&5
12439   ac_status=$?
12440   echo "$as_me:12440: \$? = $ac_status" >&5
12441   (exit "$ac_status"); }; }; then
12442   cf_cv_utf8_lib=yes
12443 else
12444   echo "$as_me: failed program was:" >&5
12445 cat "conftest.$ac_ext" >&5
12446
12447 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12448 # will be set on completion of the AC_TRY_LINK below.
12449 cf_cv_header_path_utf8=
12450 cf_cv_library_path_utf8=
12451
12452 echo "${as_me:-configure}:12452: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12453
12454 cf_save_LIBS="$LIBS"
12455
12456 cat >"conftest.$ac_ext" <<_ACEOF
12457 #line 12457 "configure"
12458 #include "confdefs.h"
12459
12460 #include <libutf8.h>
12461 int
12462 main (void)
12463 {
12464 putwc(0,0);
12465   ;
12466   return 0;
12467 }
12468 _ACEOF
12469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12470 if { (eval echo "$as_me:12470: \"$ac_link\"") >&5
12471   (eval $ac_link) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit "$ac_status"); } &&
12475          { ac_try='test -s "conftest$ac_exeext"'
12476   { (eval echo "$as_me:12476: \"$ac_try\"") >&5
12477   (eval $ac_try) 2>&5
12478   ac_status=$?
12479   echo "$as_me:12479: \$? = $ac_status" >&5
12480   (exit "$ac_status"); }; }; then
12481
12482         cf_cv_find_linkage_utf8=yes
12483         cf_cv_header_path_utf8=/usr/include
12484         cf_cv_library_path_utf8=/usr/lib
12485
12486 else
12487   echo "$as_me: failed program was:" >&5
12488 cat "conftest.$ac_ext" >&5
12489
12490 LIBS="-lutf8  $cf_save_LIBS"
12491
12492 cat >"conftest.$ac_ext" <<_ACEOF
12493 #line 12493 "configure"
12494 #include "confdefs.h"
12495
12496 #include <libutf8.h>
12497 int
12498 main (void)
12499 {
12500 putwc(0,0);
12501   ;
12502   return 0;
12503 }
12504 _ACEOF
12505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12506 if { (eval echo "$as_me:12506: \"$ac_link\"") >&5
12507   (eval $ac_link) 2>&5
12508   ac_status=$?
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit "$ac_status"); } &&
12511          { ac_try='test -s "conftest$ac_exeext"'
12512   { (eval echo "$as_me:12512: \"$ac_try\"") >&5
12513   (eval $ac_try) 2>&5
12514   ac_status=$?
12515   echo "$as_me:12515: \$? = $ac_status" >&5
12516   (exit "$ac_status"); }; }; then
12517
12518         cf_cv_find_linkage_utf8=yes
12519         cf_cv_header_path_utf8=/usr/include
12520         cf_cv_library_path_utf8=/usr/lib
12521         cf_cv_library_file_utf8="-lutf8"
12522
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat "conftest.$ac_ext" >&5
12526
12527         cf_cv_find_linkage_utf8=no
12528         LIBS="$cf_save_LIBS"
12529
12530         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12531
12532 echo "${as_me:-configure}:12532: testing find linkage for utf8 library ..." 1>&5
12533
12534 echo "${as_me:-configure}:12534: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12535
12536         cf_save_CPPFLAGS="$CPPFLAGS"
12537         cf_test_CPPFLAGS="$CPPFLAGS"
12538
12539 cf_search=
12540
12541 # collect the current set of include-directories from compiler flags
12542 cf_header_path_list=""
12543 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12544         for cf_header_path in $CPPFLAGS $CFLAGS
12545         do
12546                 case "$cf_header_path" in
12547                 (-I*)
12548                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12549
12550 test "x$cf_header_path" != "xNONE" && \
12551 test -d "$cf_header_path" && \
12552  {
12553         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12554         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12555         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12556         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12557         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12558         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12559 }
12560
12561                         cf_header_path_list="$cf_header_path_list $cf_search"
12562                         ;;
12563                 esac
12564         done
12565 fi
12566
12567 # add the variations for the package we are looking for
12568
12569 cf_search=
12570
12571 test "x$prefix" != "xNONE" && \
12572 test -d "$prefix" && \
12573  {
12574         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12575         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12576         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12577         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12578         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12579         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12580 }
12581
12582 for cf_subdir_prefix in \
12583         /usr \
12584         /usr/local \
12585         /usr/pkg \
12586         /opt \
12587         /opt/local \
12588         $HOME
12589 do
12590
12591 test "x$cf_subdir_prefix" != "x$prefix" && \
12592 test -d "$cf_subdir_prefix" && \
12593 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12594         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12595         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12596         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12597         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12598         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12599         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12600 }
12601
12602 done
12603
12604 test "$includedir" != NONE && \
12605 test "$includedir" != "/usr/include" && \
12606 test -d "$includedir" && {
12607         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12608         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12609 }
12610
12611 test "$oldincludedir" != NONE && \
12612 test "$oldincludedir" != "/usr/include" && \
12613 test -d "$oldincludedir" && {
12614         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12615         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12616 }
12617
12618 cf_search="$cf_search $cf_header_path_list"
12619
12620         for cf_cv_header_path_utf8 in $cf_search
12621         do
12622                 if test -d "$cf_cv_header_path_utf8" ; then
12623                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12624
12625 echo "${as_me:-configure}:12625: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12626
12627                         CPPFLAGS="$cf_save_CPPFLAGS"
12628
12629         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12630         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12631
12632                         cat >"conftest.$ac_ext" <<_ACEOF
12633 #line 12633 "configure"
12634 #include "confdefs.h"
12635
12636 #include <libutf8.h>
12637 int
12638 main (void)
12639 {
12640 putwc(0,0);
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 rm -f "conftest.$ac_objext"
12646 if { (eval echo "$as_me:12646: \"$ac_compile\"") >&5
12647   (eval $ac_compile) 2>&5
12648   ac_status=$?
12649   echo "$as_me:12649: \$? = $ac_status" >&5
12650   (exit "$ac_status"); } &&
12651          { ac_try='test -s "conftest.$ac_objext"'
12652   { (eval echo "$as_me:12652: \"$ac_try\"") >&5
12653   (eval $ac_try) 2>&5
12654   ac_status=$?
12655   echo "$as_me:12655: \$? = $ac_status" >&5
12656   (exit "$ac_status"); }; }; then
12657
12658                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12659
12660 echo "${as_me:-configure}:12660: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12661
12662                                 cf_cv_find_linkage_utf8=maybe
12663                                 cf_test_CPPFLAGS="$CPPFLAGS"
12664                                 break
12665 else
12666   echo "$as_me: failed program was:" >&5
12667 cat "conftest.$ac_ext" >&5
12668
12669                                 CPPFLAGS="$cf_save_CPPFLAGS"
12670
12671 fi
12672 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12673                 fi
12674         done
12675
12676         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12677
12678 echo "${as_me:-configure}:12678: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12679
12680                 cf_save_LIBS="$LIBS"
12681                 cf_save_LDFLAGS="$LDFLAGS"
12682
12683                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12684
12685 cf_search=
12686 cf_library_path_list=""
12687 if test -n "${LDFLAGS}${LIBS}" ; then
12688         for cf_library_path in $LDFLAGS $LIBS
12689         do
12690                 case "$cf_library_path" in
12691                 (-L*)
12692                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12693
12694 test "x$cf_library_path" != "xNONE" && \
12695 test -d "$cf_library_path" && \
12696  {
12697         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12698         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12699         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12700         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12701         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12702         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12703 }
12704
12705                         cf_library_path_list="$cf_library_path_list $cf_search"
12706                         ;;
12707                 esac
12708         done
12709 fi
12710
12711 cf_search=
12712
12713 test "x$prefix" != "xNONE" && \
12714 test -d "$prefix" && \
12715  {
12716         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12717         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12718         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12719         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12720         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12721         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12722 }
12723
12724 for cf_subdir_prefix in \
12725         /usr \
12726         /usr/local \
12727         /usr/pkg \
12728         /opt \
12729         /opt/local \
12730         $HOME
12731 do
12732
12733 test "x$cf_subdir_prefix" != "x$prefix" && \
12734 test -d "$cf_subdir_prefix" && \
12735 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12736         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12737         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12738         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12739         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12740         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12741         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12742 }
12743
12744 done
12745
12746 cf_search="$cf_library_path_list $cf_search"
12747
12748                         for cf_cv_library_path_utf8 in $cf_search
12749                         do
12750                                 if test -d "$cf_cv_library_path_utf8" ; then
12751                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12752
12753 echo "${as_me:-configure}:12753: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12754
12755                                         CPPFLAGS="$cf_test_CPPFLAGS"
12756                                         LIBS="-lutf8  $cf_save_LIBS"
12757                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12758                                         cat >"conftest.$ac_ext" <<_ACEOF
12759 #line 12759 "configure"
12760 #include "confdefs.h"
12761
12762 #include <libutf8.h>
12763 int
12764 main (void)
12765 {
12766 putwc(0,0);
12767   ;
12768   return 0;
12769 }
12770 _ACEOF
12771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12772 if { (eval echo "$as_me:12772: \"$ac_link\"") >&5
12773   (eval $ac_link) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit "$ac_status"); } &&
12777          { ac_try='test -s "conftest$ac_exeext"'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit "$ac_status"); }; }; then
12783
12784                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12785
12786 echo "${as_me:-configure}:12786: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12787
12788                                         cf_cv_find_linkage_utf8=yes
12789                                         cf_cv_library_file_utf8="-lutf8"
12790                                         break
12791 else
12792   echo "$as_me: failed program was:" >&5
12793 cat "conftest.$ac_ext" >&5
12794
12795                                         CPPFLAGS="$cf_save_CPPFLAGS"
12796                                         LIBS="$cf_save_LIBS"
12797                                         LDFLAGS="$cf_save_LDFLAGS"
12798
12799 fi
12800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12801                                 fi
12802                         done
12803                         CPPFLAGS="$cf_save_CPPFLAGS"
12804                         LDFLAGS="$cf_save_LDFLAGS"
12805                 fi
12806
12807         else
12808                 cf_cv_find_linkage_utf8=no
12809         fi
12810
12811 fi
12812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12813
12814 fi
12815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12816
12817 LIBS="$cf_save_LIBS"
12818
12819 if test "$cf_cv_find_linkage_utf8" = yes ; then
12820 cf_cv_utf8_lib=add-on
12821 else
12822 cf_cv_utf8_lib=no
12823 fi
12824
12825 fi
12826 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12827 fi
12828 echo "$as_me:12828: result: $cf_cv_utf8_lib" >&5
12829 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12830
12831 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12832 # ncurses/ncursesw:
12833 if test "$cf_cv_utf8_lib" = "add-on" ; then
12834
12835 cat >>confdefs.h <<\EOF
12836 #define HAVE_LIBUTF8_H 1
12837 EOF
12838
12839 if test -n "$cf_cv_header_path_utf8" ; then
12840   for cf_add_incdir in $cf_cv_header_path_utf8
12841   do
12842         while test "$cf_add_incdir" != /usr/include
12843         do
12844           if test -d "$cf_add_incdir"
12845           then
12846                 cf_have_incdir=no
12847                 if test -n "$CFLAGS$CPPFLAGS" ; then
12848                   # a loop is needed to ensure we can add subdirs of existing dirs
12849                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12850                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12851                           cf_have_incdir=yes; break
12852                         fi
12853                   done
12854                 fi
12855
12856                 if test "$cf_have_incdir" = no ; then
12857                   if test "$cf_add_incdir" = /usr/local/include ; then
12858                         if test "$GCC" = yes
12859                         then
12860                           cf_save_CPPFLAGS=$CPPFLAGS
12861
12862         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12863         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12864
12865                           cat >"conftest.$ac_ext" <<_ACEOF
12866 #line 12866 "configure"
12867 #include "confdefs.h"
12868 #include <stdio.h>
12869 int
12870 main (void)
12871 {
12872 printf("Hello")
12873   ;
12874   return 0;
12875 }
12876 _ACEOF
12877 rm -f "conftest.$ac_objext"
12878 if { (eval echo "$as_me:12878: \"$ac_compile\"") >&5
12879   (eval $ac_compile) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit "$ac_status"); } &&
12883          { ac_try='test -s "conftest.$ac_objext"'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit "$ac_status"); }; }; then
12889   :
12890 else
12891   echo "$as_me: failed program was:" >&5
12892 cat "conftest.$ac_ext" >&5
12893 cf_have_incdir=yes
12894 fi
12895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12896                           CPPFLAGS=$cf_save_CPPFLAGS
12897                         fi
12898                   fi
12899                 fi
12900
12901                 if test "$cf_have_incdir" = no ; then
12902                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12903
12904 echo "${as_me:-configure}:12904: testing adding $cf_add_incdir to include-path ..." 1>&5
12905
12906                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12907
12908                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12909                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12910                   cf_add_incdir="$cf_top_incdir"
12911                 else
12912                   break
12913                 fi
12914           else
12915                 break
12916           fi
12917         done
12918   done
12919 fi
12920
12921 if test -n "$cf_cv_library_path_utf8" ; then
12922         for cf_add_libdir in $cf_cv_library_path_utf8
12923         do
12924                 if test "$cf_add_libdir" = /usr/lib ; then
12925                         :
12926                 elif test -d "$cf_add_libdir"
12927                 then
12928                         cf_have_libdir=no
12929                         if test -n "$LDFLAGS$LIBS" ; then
12930                                 # a loop is needed to ensure we can add subdirs of existing dirs
12931                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12932                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12933                                                 cf_have_libdir=yes; break
12934                                         fi
12935                                 done
12936                         fi
12937                         if test "$cf_have_libdir" = no ; then
12938                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12939
12940 echo "${as_me:-configure}:12940: testing adding $cf_add_libdir to library-path ..." 1>&5
12941
12942                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12943                         fi
12944                 fi
12945         done
12946 fi
12947
12948 cf_add_libs="$LIBS"
12949 # reverse order
12950 cf_add_0lib=
12951 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12952 # filter duplicates
12953 for cf_add_1lib in $cf_add_0lib; do
12954         for cf_add_2lib in $cf_add_libs; do
12955                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12956                         cf_add_1lib=
12957                         break
12958                 fi
12959         done
12960         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12961 done
12962 LIBS="$cf_add_libs"
12963
12964 fi
12965
12966                 if test "$cf_cv_utf8_lib" != no ; then
12967                         NCURSES_LIBUTF8=1
12968                 fi
12969         fi
12970
12971 # This is needed on Tru64 5.0 to declare mbstate_t
12972 echo "$as_me:12972: checking if we must include wchar.h to declare mbstate_t" >&5
12973 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12974 if test "${cf_cv_mbstate_t+set}" = set; then
12975   echo $ECHO_N "(cached) $ECHO_C" >&6
12976 else
12977
12978 cat >"conftest.$ac_ext" <<_ACEOF
12979 #line 12979 "configure"
12980 #include "confdefs.h"
12981
12982 #include <stdlib.h>
12983 #include <stdarg.h>
12984 #include <stdio.h>
12985 #ifdef HAVE_LIBUTF8_H
12986 #include <libutf8.h>
12987 #endif
12988 int
12989 main (void)
12990 {
12991 mbstate_t state
12992   ;
12993   return 0;
12994 }
12995 _ACEOF
12996 rm -f "conftest.$ac_objext"
12997 if { (eval echo "$as_me:12997: \"$ac_compile\"") >&5
12998   (eval $ac_compile) 2>&5
12999   ac_status=$?
13000   echo "$as_me:13000: \$? = $ac_status" >&5
13001   (exit "$ac_status"); } &&
13002          { ac_try='test -s "conftest.$ac_objext"'
13003   { (eval echo "$as_me:13003: \"$ac_try\"") >&5
13004   (eval $ac_try) 2>&5
13005   ac_status=$?
13006   echo "$as_me:13006: \$? = $ac_status" >&5
13007   (exit "$ac_status"); }; }; then
13008   cf_cv_mbstate_t=no
13009 else
13010   echo "$as_me: failed program was:" >&5
13011 cat "conftest.$ac_ext" >&5
13012 cat >"conftest.$ac_ext" <<_ACEOF
13013 #line 13013 "configure"
13014 #include "confdefs.h"
13015
13016 #include <stdlib.h>
13017 #include <stdarg.h>
13018 #include <stdio.h>
13019 #include <wchar.h>
13020 #ifdef HAVE_LIBUTF8_H
13021 #include <libutf8.h>
13022 #endif
13023 int
13024 main (void)
13025 {
13026 mbstate_t value
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f "conftest.$ac_objext"
13032 if { (eval echo "$as_me:13032: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit "$ac_status"); } &&
13037          { ac_try='test -s "conftest.$ac_objext"'
13038   { (eval echo "$as_me:13038: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit "$ac_status"); }; }; then
13043   cf_cv_mbstate_t=yes
13044 else
13045   echo "$as_me: failed program was:" >&5
13046 cat "conftest.$ac_ext" >&5
13047 cf_cv_mbstate_t=unknown
13048 fi
13049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13050 fi
13051 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13052 fi
13053 echo "$as_me:13053: result: $cf_cv_mbstate_t" >&5
13054 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13055
13056 if test "$cf_cv_mbstate_t" = yes ; then
13057
13058 cat >>confdefs.h <<\EOF
13059 #define NEED_WCHAR_H 1
13060 EOF
13061
13062         NEED_WCHAR_H=1
13063 fi
13064
13065 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13066 if test "$cf_cv_mbstate_t" = unknown ; then
13067         NCURSES_MBSTATE_T=1
13068 fi
13069
13070 # This is needed on Tru64 5.0 to declare wchar_t
13071 echo "$as_me:13071: checking if we must include wchar.h to declare wchar_t" >&5
13072 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13073 if test "${cf_cv_wchar_t+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076
13077 cat >"conftest.$ac_ext" <<_ACEOF
13078 #line 13078 "configure"
13079 #include "confdefs.h"
13080
13081 #include <stdlib.h>
13082 #include <stdarg.h>
13083 #include <stdio.h>
13084 #ifdef HAVE_LIBUTF8_H
13085 #include <libutf8.h>
13086 #endif
13087 int
13088 main (void)
13089 {
13090 wchar_t state
13091   ;
13092   return 0;
13093 }
13094 _ACEOF
13095 rm -f "conftest.$ac_objext"
13096 if { (eval echo "$as_me:13096: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit "$ac_status"); } &&
13101          { ac_try='test -s "conftest.$ac_objext"'
13102   { (eval echo "$as_me:13102: \"$ac_try\"") >&5
13103   (eval $ac_try) 2>&5
13104   ac_status=$?
13105   echo "$as_me:13105: \$? = $ac_status" >&5
13106   (exit "$ac_status"); }; }; then
13107   cf_cv_wchar_t=no
13108 else
13109   echo "$as_me: failed program was:" >&5
13110 cat "conftest.$ac_ext" >&5
13111 cat >"conftest.$ac_ext" <<_ACEOF
13112 #line 13112 "configure"
13113 #include "confdefs.h"
13114
13115 #include <stdlib.h>
13116 #include <stdarg.h>
13117 #include <stdio.h>
13118 #include <wchar.h>
13119 #ifdef HAVE_LIBUTF8_H
13120 #include <libutf8.h>
13121 #endif
13122 int
13123 main (void)
13124 {
13125 wchar_t value
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 rm -f "conftest.$ac_objext"
13131 if { (eval echo "$as_me:13131: \"$ac_compile\"") >&5
13132   (eval $ac_compile) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit "$ac_status"); } &&
13136          { ac_try='test -s "conftest.$ac_objext"'
13137   { (eval echo "$as_me:13137: \"$ac_try\"") >&5
13138   (eval $ac_try) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit "$ac_status"); }; }; then
13142   cf_cv_wchar_t=yes
13143 else
13144   echo "$as_me: failed program was:" >&5
13145 cat "conftest.$ac_ext" >&5
13146 cf_cv_wchar_t=unknown
13147 fi
13148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13149 fi
13150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13151 fi
13152 echo "$as_me:13152: result: $cf_cv_wchar_t" >&5
13153 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13154
13155 if test "$cf_cv_wchar_t" = yes ; then
13156
13157 cat >>confdefs.h <<\EOF
13158 #define NEED_WCHAR_H 1
13159 EOF
13160
13161         NEED_WCHAR_H=1
13162 fi
13163
13164 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13165 if test "$cf_cv_wchar_t" = unknown ; then
13166         NCURSES_WCHAR_T=1
13167 fi
13168
13169 # if we find wchar_t in either place, use substitution to provide a fallback.
13170 if test "$cf_cv_wchar_t" != unknown ; then
13171         NCURSES_OK_WCHAR_T=1
13172 fi
13173
13174 # This is needed on Tru64 5.0 to declare wint_t
13175 echo "$as_me:13175: checking if we must include wchar.h to declare wint_t" >&5
13176 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13177 if test "${cf_cv_wint_t+set}" = set; then
13178   echo $ECHO_N "(cached) $ECHO_C" >&6
13179 else
13180
13181 cat >"conftest.$ac_ext" <<_ACEOF
13182 #line 13182 "configure"
13183 #include "confdefs.h"
13184
13185 #include <stdlib.h>
13186 #include <stdarg.h>
13187 #include <stdio.h>
13188 #ifdef HAVE_LIBUTF8_H
13189 #include <libutf8.h>
13190 #endif
13191 int
13192 main (void)
13193 {
13194 wint_t state
13195   ;
13196   return 0;
13197 }
13198 _ACEOF
13199 rm -f "conftest.$ac_objext"
13200 if { (eval echo "$as_me:13200: \"$ac_compile\"") >&5
13201   (eval $ac_compile) 2>&5
13202   ac_status=$?
13203   echo "$as_me:13203: \$? = $ac_status" >&5
13204   (exit "$ac_status"); } &&
13205          { ac_try='test -s "conftest.$ac_objext"'
13206   { (eval echo "$as_me:13206: \"$ac_try\"") >&5
13207   (eval $ac_try) 2>&5
13208   ac_status=$?
13209   echo "$as_me:13209: \$? = $ac_status" >&5
13210   (exit "$ac_status"); }; }; then
13211   cf_cv_wint_t=no
13212 else
13213   echo "$as_me: failed program was:" >&5
13214 cat "conftest.$ac_ext" >&5
13215 cat >"conftest.$ac_ext" <<_ACEOF
13216 #line 13216 "configure"
13217 #include "confdefs.h"
13218
13219 #include <stdlib.h>
13220 #include <stdarg.h>
13221 #include <stdio.h>
13222 #include <wchar.h>
13223 #ifdef HAVE_LIBUTF8_H
13224 #include <libutf8.h>
13225 #endif
13226 int
13227 main (void)
13228 {
13229 wint_t value
13230   ;
13231   return 0;
13232 }
13233 _ACEOF
13234 rm -f "conftest.$ac_objext"
13235 if { (eval echo "$as_me:13235: \"$ac_compile\"") >&5
13236   (eval $ac_compile) 2>&5
13237   ac_status=$?
13238   echo "$as_me:13238: \$? = $ac_status" >&5
13239   (exit "$ac_status"); } &&
13240          { ac_try='test -s "conftest.$ac_objext"'
13241   { (eval echo "$as_me:13241: \"$ac_try\"") >&5
13242   (eval $ac_try) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit "$ac_status"); }; }; then
13246   cf_cv_wint_t=yes
13247 else
13248   echo "$as_me: failed program was:" >&5
13249 cat "conftest.$ac_ext" >&5
13250 cf_cv_wint_t=unknown
13251 fi
13252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13253 fi
13254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13255 fi
13256 echo "$as_me:13256: result: $cf_cv_wint_t" >&5
13257 echo "${ECHO_T}$cf_cv_wint_t" >&6
13258
13259 if test "$cf_cv_wint_t" = yes ; then
13260
13261 cat >>confdefs.h <<\EOF
13262 #define NEED_WCHAR_H 1
13263 EOF
13264
13265         NEED_WCHAR_H=1
13266 fi
13267
13268 # if we do not find wint_t in either place, use substitution to provide a fallback.
13269 if test "$cf_cv_wint_t" = unknown ; then
13270         NCURSES_WINT_T=1
13271 fi
13272
13273 # if we find wint_t in either place, use substitution to provide a fallback.
13274 if test "$cf_cv_wint_t" != unknown ; then
13275         NCURSES_OK_WINT_T=1
13276 fi
13277
13278         if test "$NCURSES_MBSTATE_T" != 0; then
13279
13280 cat >>confdefs.h <<\EOF
13281 #define NEED_MBSTATE_T_DEF 1
13282 EOF
13283
13284         fi
13285 fi
13286
13287 ###   use option --disable-lp64 to allow long chtype
13288 echo "$as_me:13288: checking whether to enable _LP64 definition in curses.h" >&5
13289 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13290
13291 # Check whether --enable-lp64 or --disable-lp64 was given.
13292 if test "${enable_lp64+set}" = set; then
13293   enableval="$enable_lp64"
13294   with_lp64=$enableval
13295 else
13296   with_lp64=$cf_dft_with_lp64
13297 fi;
13298 echo "$as_me:13298: result: $with_lp64" >&5
13299 echo "${ECHO_T}$with_lp64" >&6
13300
13301 if test "x$with_lp64" = xyes ; then
13302         cf_cv_enable_lp64=1
13303 else
13304         cf_cv_enable_lp64=0
13305 fi
13306
13307 # Check whether --enable-largefile or --disable-largefile was given.
13308 if test "${enable_largefile+set}" = set; then
13309   enableval="$enable_largefile"
13310
13311 fi;
13312 if test "$enable_largefile" != no; then
13313
13314   echo "$as_me:13314: checking for special C compiler options needed for large files" >&5
13315 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13316 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13317   echo $ECHO_N "(cached) $ECHO_C" >&6
13318 else
13319   ac_cv_sys_largefile_CC=no
13320      if test "$GCC" != yes; then
13321        ac_save_CC=$CC
13322        while :; do
13323          # IRIX 6.2 and later do not support large files by default,
13324          # so use the C compiler's -n32 option if that helps.
13325          cat >"conftest.$ac_ext" <<_ACEOF
13326 #line 13326 "configure"
13327 #include "confdefs.h"
13328 #include <sys/types.h>
13329  /* Check that off_t can represent 2**63 - 1 correctly.
13330     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13331     since some C++ compilers masquerading as C compilers
13332     incorrectly reject 9223372036854775807.  */
13333 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13334   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13335                        && LARGE_OFF_T % 2147483647 == 1)
13336                       ? 1 : -1];
13337 int
13338 main (void)
13339 {
13340
13341   ;
13342   return 0;
13343 }
13344 _ACEOF
13345          rm -f "conftest.$ac_objext"
13346 if { (eval echo "$as_me:13346: \"$ac_compile\"") >&5
13347   (eval $ac_compile) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit "$ac_status"); } &&
13351          { ac_try='test -s "conftest.$ac_objext"'
13352   { (eval echo "$as_me:13352: \"$ac_try\"") >&5
13353   (eval $ac_try) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit "$ac_status"); }; }; then
13357   break
13358 else
13359   echo "$as_me: failed program was:" >&5
13360 cat "conftest.$ac_ext" >&5
13361 fi
13362 rm -f "conftest.$ac_objext"
13363          CC="$CC -n32"
13364          rm -f "conftest.$ac_objext"
13365 if { (eval echo "$as_me:13365: \"$ac_compile\"") >&5
13366   (eval $ac_compile) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit "$ac_status"); } &&
13370          { ac_try='test -s "conftest.$ac_objext"'
13371   { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372   (eval $ac_try) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit "$ac_status"); }; }; then
13376   ac_cv_sys_largefile_CC=' -n32'; break
13377 else
13378   echo "$as_me: failed program was:" >&5
13379 cat "conftest.$ac_ext" >&5
13380 fi
13381 rm -f "conftest.$ac_objext"
13382          break
13383        done
13384        CC=$ac_save_CC
13385        rm -f "conftest.$ac_ext"
13386     fi
13387 fi
13388 echo "$as_me:13388: result: $ac_cv_sys_largefile_CC" >&5
13389 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13390   if test "$ac_cv_sys_largefile_CC" != no; then
13391     CC=$CC$ac_cv_sys_largefile_CC
13392   fi
13393
13394   echo "$as_me:13394: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13395 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13396 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13397   echo $ECHO_N "(cached) $ECHO_C" >&6
13398 else
13399   while :; do
13400   ac_cv_sys_file_offset_bits=no
13401   cat >"conftest.$ac_ext" <<_ACEOF
13402 #line 13402 "configure"
13403 #include "confdefs.h"
13404 #include <sys/types.h>
13405  /* Check that off_t can represent 2**63 - 1 correctly.
13406     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13407     since some C++ compilers masquerading as C compilers
13408     incorrectly reject 9223372036854775807.  */
13409 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13410   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13411                        && LARGE_OFF_T % 2147483647 == 1)
13412                       ? 1 : -1];
13413 int
13414 main (void)
13415 {
13416
13417   ;
13418   return 0;
13419 }
13420 _ACEOF
13421 rm -f "conftest.$ac_objext"
13422 if { (eval echo "$as_me:13422: \"$ac_compile\"") >&5
13423   (eval $ac_compile) 2>&5
13424   ac_status=$?
13425   echo "$as_me:13425: \$? = $ac_status" >&5
13426   (exit "$ac_status"); } &&
13427          { ac_try='test -s "conftest.$ac_objext"'
13428   { (eval echo "$as_me:13428: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit "$ac_status"); }; }; then
13433   break
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat "conftest.$ac_ext" >&5
13437 fi
13438 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13439   cat >"conftest.$ac_ext" <<_ACEOF
13440 #line 13440 "configure"
13441 #include "confdefs.h"
13442 #define _FILE_OFFSET_BITS 64
13443 #include <sys/types.h>
13444  /* Check that off_t can represent 2**63 - 1 correctly.
13445     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13446     since some C++ compilers masquerading as C compilers
13447     incorrectly reject 9223372036854775807.  */
13448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13449   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13450                        && LARGE_OFF_T % 2147483647 == 1)
13451                       ? 1 : -1];
13452 int
13453 main (void)
13454 {
13455
13456   ;
13457   return 0;
13458 }
13459 _ACEOF
13460 rm -f "conftest.$ac_objext"
13461 if { (eval echo "$as_me:13461: \"$ac_compile\"") >&5
13462   (eval $ac_compile) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit "$ac_status"); } &&
13466          { ac_try='test -s "conftest.$ac_objext"'
13467   { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468   (eval $ac_try) 2>&5
13469   ac_status=$?
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit "$ac_status"); }; }; then
13472   ac_cv_sys_file_offset_bits=64; break
13473 else
13474   echo "$as_me: failed program was:" >&5
13475 cat "conftest.$ac_ext" >&5
13476 fi
13477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13478   break
13479 done
13480 fi
13481 echo "$as_me:13481: result: $ac_cv_sys_file_offset_bits" >&5
13482 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13483 if test "$ac_cv_sys_file_offset_bits" != no; then
13484
13485 cat >>confdefs.h <<EOF
13486 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13487 EOF
13488
13489 fi
13490 rm -rf conftest*
13491   echo "$as_me:13491: checking for _LARGE_FILES value needed for large files" >&5
13492 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13493 if test "${ac_cv_sys_large_files+set}" = set; then
13494   echo $ECHO_N "(cached) $ECHO_C" >&6
13495 else
13496   while :; do
13497   ac_cv_sys_large_files=no
13498   cat >"conftest.$ac_ext" <<_ACEOF
13499 #line 13499 "configure"
13500 #include "confdefs.h"
13501 #include <sys/types.h>
13502  /* Check that off_t can represent 2**63 - 1 correctly.
13503     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13504     since some C++ compilers masquerading as C compilers
13505     incorrectly reject 9223372036854775807.  */
13506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13507   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13508                        && LARGE_OFF_T % 2147483647 == 1)
13509                       ? 1 : -1];
13510 int
13511 main (void)
13512 {
13513
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 rm -f "conftest.$ac_objext"
13519 if { (eval echo "$as_me:13519: \"$ac_compile\"") >&5
13520   (eval $ac_compile) 2>&5
13521   ac_status=$?
13522   echo "$as_me:13522: \$? = $ac_status" >&5
13523   (exit "$ac_status"); } &&
13524          { ac_try='test -s "conftest.$ac_objext"'
13525   { (eval echo "$as_me:13525: \"$ac_try\"") >&5
13526   (eval $ac_try) 2>&5
13527   ac_status=$?
13528   echo "$as_me:13528: \$? = $ac_status" >&5
13529   (exit "$ac_status"); }; }; then
13530   break
13531 else
13532   echo "$as_me: failed program was:" >&5
13533 cat "conftest.$ac_ext" >&5
13534 fi
13535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13536   cat >"conftest.$ac_ext" <<_ACEOF
13537 #line 13537 "configure"
13538 #include "confdefs.h"
13539 #define _LARGE_FILES 1
13540 #include <sys/types.h>
13541  /* Check that off_t can represent 2**63 - 1 correctly.
13542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13543     since some C++ compilers masquerading as C compilers
13544     incorrectly reject 9223372036854775807.  */
13545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13547                        && LARGE_OFF_T % 2147483647 == 1)
13548                       ? 1 : -1];
13549 int
13550 main (void)
13551 {
13552
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f "conftest.$ac_objext"
13558 if { (eval echo "$as_me:13558: \"$ac_compile\"") >&5
13559   (eval $ac_compile) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit "$ac_status"); } &&
13563          { ac_try='test -s "conftest.$ac_objext"'
13564   { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit "$ac_status"); }; }; then
13569   ac_cv_sys_large_files=1; break
13570 else
13571   echo "$as_me: failed program was:" >&5
13572 cat "conftest.$ac_ext" >&5
13573 fi
13574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13575   break
13576 done
13577 fi
13578 echo "$as_me:13578: result: $ac_cv_sys_large_files" >&5
13579 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13580 if test "$ac_cv_sys_large_files" != no; then
13581
13582 cat >>confdefs.h <<EOF
13583 #define _LARGE_FILES $ac_cv_sys_large_files
13584 EOF
13585
13586 fi
13587 rm -rf conftest*
13588 fi
13589
13590         if test "$enable_largefile" != no ; then
13591         echo "$as_me:13591: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13592 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13593 if test "${ac_cv_sys_largefile_source+set}" = set; then
13594   echo $ECHO_N "(cached) $ECHO_C" >&6
13595 else
13596   while :; do
13597   ac_cv_sys_largefile_source=no
13598   cat >"conftest.$ac_ext" <<_ACEOF
13599 #line 13599 "configure"
13600 #include "confdefs.h"
13601 #include <stdio.h>
13602 int
13603 main (void)
13604 {
13605 return !fseeko;
13606   ;
13607   return 0;
13608 }
13609 _ACEOF
13610 rm -f "conftest.$ac_objext"
13611 if { (eval echo "$as_me:13611: \"$ac_compile\"") >&5
13612   (eval $ac_compile) 2>&5
13613   ac_status=$?
13614   echo "$as_me:13614: \$? = $ac_status" >&5
13615   (exit "$ac_status"); } &&
13616          { ac_try='test -s "conftest.$ac_objext"'
13617   { (eval echo "$as_me:13617: \"$ac_try\"") >&5
13618   (eval $ac_try) 2>&5
13619   ac_status=$?
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit "$ac_status"); }; }; then
13622   break
13623 else
13624   echo "$as_me: failed program was:" >&5
13625 cat "conftest.$ac_ext" >&5
13626 fi
13627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13628   cat >"conftest.$ac_ext" <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631 #define _LARGEFILE_SOURCE 1
13632 #include <stdio.h>
13633 int
13634 main (void)
13635 {
13636 return !fseeko;
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 rm -f "conftest.$ac_objext"
13642 if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
13643   (eval $ac_compile) 2>&5
13644   ac_status=$?
13645   echo "$as_me:13645: \$? = $ac_status" >&5
13646   (exit "$ac_status"); } &&
13647          { ac_try='test -s "conftest.$ac_objext"'
13648   { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit "$ac_status"); }; }; then
13653   ac_cv_sys_largefile_source=1; break
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 cat "conftest.$ac_ext" >&5
13657 fi
13658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13659   break
13660 done
13661 fi
13662 echo "$as_me:13662: result: $ac_cv_sys_largefile_source" >&5
13663 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13664 if test "$ac_cv_sys_largefile_source" != no; then
13665
13666 cat >>confdefs.h <<EOF
13667 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13668 EOF
13669
13670 fi
13671 rm -rf conftest*
13672
13673 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13674 # in glibc 2.1.3, but that breaks too many other things.
13675 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13676 echo "$as_me:13676: checking for fseeko" >&5
13677 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13678 if test "${ac_cv_func_fseeko+set}" = set; then
13679   echo $ECHO_N "(cached) $ECHO_C" >&6
13680 else
13681   cat >"conftest.$ac_ext" <<_ACEOF
13682 #line 13682 "configure"
13683 #include "confdefs.h"
13684 #include <stdio.h>
13685 int
13686 main (void)
13687 {
13688 return fseeko && fseeko (stdin, 0, 0);
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13694 if { (eval echo "$as_me:13694: \"$ac_link\"") >&5
13695   (eval $ac_link) 2>&5
13696   ac_status=$?
13697   echo "$as_me:13697: \$? = $ac_status" >&5
13698   (exit "$ac_status"); } &&
13699          { ac_try='test -s "conftest$ac_exeext"'
13700   { (eval echo "$as_me:13700: \"$ac_try\"") >&5
13701   (eval $ac_try) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit "$ac_status"); }; }; then
13705   ac_cv_func_fseeko=yes
13706 else
13707   echo "$as_me: failed program was:" >&5
13708 cat "conftest.$ac_ext" >&5
13709 ac_cv_func_fseeko=no
13710 fi
13711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13712 fi
13713 echo "$as_me:13713: result: $ac_cv_func_fseeko" >&5
13714 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13715 if test $ac_cv_func_fseeko = yes; then
13716
13717 cat >>confdefs.h <<\EOF
13718 #define HAVE_FSEEKO 1
13719 EOF
13720
13721 fi
13722
13723         # Normally we would collect these definitions in the config.h,
13724         # but (like _XOPEN_SOURCE), some environments rely on having these
13725         # defined before any of the system headers are included.  Another
13726         # case comes up with C++, e.g., on AIX the compiler compiles the
13727         # header files by themselves before looking at the body files it is
13728         # told to compile.  For ncurses, those header files do not include
13729         # the config.h
13730         if test "$ac_cv_sys_large_files" != no
13731         then
13732
13733         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13734         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13735
13736         fi
13737         if test "$ac_cv_sys_largefile_source" != no
13738         then
13739
13740         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13741         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13742
13743         fi
13744         if test "$ac_cv_sys_file_offset_bits" != no
13745         then
13746
13747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13748         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13749
13750         fi
13751
13752         echo "$as_me:13752: checking whether to use struct dirent64" >&5
13753 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13754 if test "${cf_cv_struct_dirent64+set}" = set; then
13755   echo $ECHO_N "(cached) $ECHO_C" >&6
13756 else
13757
13758                 cat >"conftest.$ac_ext" <<_ACEOF
13759 #line 13759 "configure"
13760 #include "confdefs.h"
13761
13762 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13763 #include <sys/types.h>
13764 #include <dirent.h>
13765
13766 int
13767 main (void)
13768 {
13769
13770                 /* if transitional largefile support is setup, this is true */
13771                 extern struct dirent64 * readdir(DIR *);
13772                 struct dirent64 *x = readdir((DIR *)0);
13773                 struct dirent *y = readdir((DIR *)0);
13774                 int z = x - y;
13775                 (void)z;
13776
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f "conftest.$ac_objext"
13782 if { (eval echo "$as_me:13782: \"$ac_compile\"") >&5
13783   (eval $ac_compile) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit "$ac_status"); } &&
13787          { ac_try='test -s "conftest.$ac_objext"'
13788   { (eval echo "$as_me:13788: \"$ac_try\"") >&5
13789   (eval $ac_try) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit "$ac_status"); }; }; then
13793   cf_cv_struct_dirent64=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 cat "conftest.$ac_ext" >&5
13797 cf_cv_struct_dirent64=no
13798 fi
13799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13800
13801 fi
13802 echo "$as_me:13802: result: $cf_cv_struct_dirent64" >&5
13803 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13804         test "$cf_cv_struct_dirent64" = yes &&
13805 cat >>confdefs.h <<\EOF
13806 #define HAVE_STRUCT_DIRENT64 1
13807 EOF
13808
13809         fi
13810
13811 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13812 echo "$as_me:13812: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13813 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13814
13815 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13816 if test "${enable_tparm_varargs+set}" = set; then
13817   enableval="$enable_tparm_varargs"
13818   with_tparm_varargs=$enableval
13819 else
13820   with_tparm_varargs=yes
13821 fi;
13822 echo "$as_me:13822: result: $with_tparm_varargs" >&5
13823 echo "${ECHO_T}$with_tparm_varargs" >&6
13824 NCURSES_TPARM_VARARGS=0
13825 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13826
13827 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13828 if test "$with_ticlib" != no ; then
13829 echo "$as_me:13829: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13830 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13831
13832 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13833 if test "${enable_tic_depends+set}" = set; then
13834   enableval="$enable_tic_depends"
13835   with_tic_depends=$enableval
13836 else
13837   with_tic_depends=yes
13838 fi;
13839 echo "$as_me:13839: result: $with_tic_depends" >&5
13840 echo "${ECHO_T}$with_tic_depends" >&6
13841 else
13842         with_tic_depends=no
13843 fi
13844
13845 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13846 echo "$as_me:13846: checking if you want to enable wattr* macros" >&5
13847 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13848
13849 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13850 if test "${enable_wattr_macros+set}" = set; then
13851   enableval="$enable_wattr_macros"
13852   with_wattr_macros=$enableval
13853 else
13854   with_wattr_macros=no
13855 fi;
13856 if [ "x$with_wattr_macros" != xyes ]; then
13857         NCURSES_WATTR_MACROS=0
13858         echo "$as_me:13858: result: no" >&5
13859 echo "${ECHO_T}no" >&6
13860 else
13861         NCURSES_WATTR_MACROS=1
13862         echo "$as_me:13862: result: yes" >&5
13863 echo "${ECHO_T}yes" >&6
13864 fi
13865
13866 echo "$as_me:13866: checking for X11 rgb file" >&5
13867 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13868
13869 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13870 if test "${with_x11_rgb+set}" = set; then
13871   withval="$with_x11_rgb"
13872   RGB_PATH=$withval
13873 else
13874   RGB_PATH=auto
13875 fi;
13876
13877 if test "x$RGB_PATH" = xauto
13878 then
13879         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13880         for cf_path in \
13881                 /opt/local/share/X11/rgb.txt \
13882                 /opt/X11/share/X11/rgb.txt \
13883                 /usr/share/X11/rgb.txt \
13884                 /usr/X11/share/X11/rgb.txt \
13885                 /usr/X11/lib/X11/rgb.txt \
13886                 /usr/lib/X11/rgb.txt \
13887                 /etc/X11/rgb.txt \
13888                 /usr/pkg/lib/X11/rgb.txt \
13889                 /usr/X11R7/lib/X11/rgb.txt \
13890                 /usr/X11R6/lib/X11/rgb.txt \
13891                 /usr/X11R5/lib/X11/rgb.txt \
13892                 /usr/X11R4/lib/X11/rgb.txt \
13893                 /usr/local/lib/X11/rgb.txt \
13894                 /usr/local/share/X11/rgb.txt \
13895                 /usr/lib64/X11/rgb.txt
13896         do
13897                 if test -f "$cf_path" ; then
13898                         RGB_PATH="$cf_path"
13899                         break
13900                 fi
13901         done
13902 else
13903         cf_path=$RGB_PATH
13904
13905 if test "x$prefix" != xNONE; then
13906         cf_path_syntax="$prefix"
13907 else
13908         cf_path_syntax="$ac_default_prefix"
13909 fi
13910
13911 case ".$cf_path" in
13912 (.\$\(*\)*|.\'*\'*)
13913         ;;
13914 (..|./*|.\\*)
13915         ;;
13916 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13917         ;;
13918 (.\$\{*prefix\}*|.\$\{*dir\}*)
13919         eval cf_path="$cf_path"
13920         case ".$cf_path" in
13921         (.NONE/*)
13922                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13923                 ;;
13924         esac
13925         ;;
13926 (.no|.NONE/*)
13927         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13928         ;;
13929 (*)
13930         { { echo "$as_me:13930: error: expected a pathname, not \"$cf_path\"" >&5
13931 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13932    { (exit 1); exit 1; }; }
13933         ;;
13934 esac
13935
13936 fi
13937
13938 echo "$as_me:13938: result: $RGB_PATH" >&5
13939 echo "${ECHO_T}$RGB_PATH" >&6
13940
13941 cat >>confdefs.h <<EOF
13942 #define RGB_PATH "$cf_path"
13943 EOF
13944
13945 no_x11_rgb=
13946 if test "$RGB_PATH" = no
13947 then
13948         no_x11_rgb="#"
13949 fi
13950
13951 ###   use option --with-bool to override bool's type
13952 echo "$as_me:13952: checking for type of bool" >&5
13953 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13954
13955 # Check whether --with-bool or --without-bool was given.
13956 if test "${with_bool+set}" = set; then
13957   withval="$with_bool"
13958   NCURSES_BOOL="$withval"
13959 else
13960   NCURSES_BOOL=auto
13961 fi;
13962 echo "$as_me:13962: result: $NCURSES_BOOL" >&5
13963 echo "${ECHO_T}$NCURSES_BOOL" >&6
13964
13965 echo "$as_me:13965: checking for alternate terminal capabilities file" >&5
13966 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13967
13968 # Check whether --with-caps or --without-caps was given.
13969 if test "${with_caps+set}" = set; then
13970   withval="$with_caps"
13971   TERMINFO_CAPS=Caps.$withval
13972 else
13973   TERMINFO_CAPS=Caps
13974 fi;
13975 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
13976 then
13977         { echo "$as_me:13977: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
13978 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
13979         TERMINFO_CAPS=Caps
13980 fi
13981 echo "$as_me:13981: result: $TERMINFO_CAPS" >&5
13982 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13983
13984 ###   use option --with-chtype to override chtype's type
13985 echo "$as_me:13985: checking for type of chtype" >&5
13986 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13987
13988 # Check whether --with-chtype or --without-chtype was given.
13989 if test "${with_chtype+set}" = set; then
13990   withval="$with_chtype"
13991   NCURSES_CHTYPE="$withval"
13992 else
13993   NCURSES_CHTYPE=$cf_dft_chtype
13994 fi;
13995 echo "$as_me:13995: result: $NCURSES_CHTYPE" >&5
13996 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13997
13998 ###   use option --with-ospeed to override ospeed's type
13999 echo "$as_me:13999: checking for type of ospeed" >&5
14000 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14001
14002 # Check whether --with-ospeed or --without-ospeed was given.
14003 if test "${with_ospeed+set}" = set; then
14004   withval="$with_ospeed"
14005   NCURSES_OSPEED="$withval"
14006 else
14007   NCURSES_OSPEED=short
14008 fi;
14009 echo "$as_me:14009: result: $NCURSES_OSPEED" >&5
14010 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14011
14012 ###   use option --with-mmask-t to override mmask_t's type
14013 echo "$as_me:14013: checking for type of mmask_t" >&5
14014 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14015
14016 # Check whether --with-mmask-t or --without-mmask-t was given.
14017 if test "${with_mmask_t+set}" = set; then
14018   withval="$with_mmask_t"
14019   NCURSES_MMASK_T="$withval"
14020 else
14021   NCURSES_MMASK_T=$cf_dft_mmask_t
14022 fi;
14023 echo "$as_me:14023: result: $NCURSES_MMASK_T" >&5
14024 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14025
14026 ###   use option --with-ccharw-max to override CCHARW_MAX size
14027 echo "$as_me:14027: checking for size CCHARW_MAX" >&5
14028 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14029
14030 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14031 if test "${with_ccharw_max+set}" = set; then
14032   withval="$with_ccharw_max"
14033   NCURSES_CCHARW_MAX="$withval"
14034 else
14035   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14036 fi;
14037 echo "$as_me:14037: result: $NCURSES_CCHARW_MAX" >&5
14038 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14039
14040 echo "$as_me:14040: checking for ANSI C header files" >&5
14041 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14042 if test "${ac_cv_header_stdc+set}" = set; then
14043   echo $ECHO_N "(cached) $ECHO_C" >&6
14044 else
14045   cat >"conftest.$ac_ext" <<_ACEOF
14046 #line 14046 "configure"
14047 #include "confdefs.h"
14048 #include <stdlib.h>
14049 #include <stdarg.h>
14050 #include <string.h>
14051 #include <float.h>
14052
14053 _ACEOF
14054 if { (eval echo "$as_me:14054: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14055   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14056   ac_status=$?
14057   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14058   rm -f conftest.er1
14059   cat conftest.err >&5
14060   echo "$as_me:14060: \$? = $ac_status" >&5
14061   (exit "$ac_status"); } >/dev/null; then
14062   if test -s conftest.err; then
14063     ac_cpp_err=$ac_c_preproc_warn_flag
14064   else
14065     ac_cpp_err=
14066   fi
14067 else
14068   ac_cpp_err=yes
14069 fi
14070 if test -z "$ac_cpp_err"; then
14071   ac_cv_header_stdc=yes
14072 else
14073   echo "$as_me: failed program was:" >&5
14074   cat "conftest.$ac_ext" >&5
14075   ac_cv_header_stdc=no
14076 fi
14077 rm -f conftest.err "conftest.$ac_ext"
14078
14079 if test $ac_cv_header_stdc = yes; then
14080   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14081   cat >"conftest.$ac_ext" <<_ACEOF
14082 #line 14082 "configure"
14083 #include "confdefs.h"
14084 #include <string.h>
14085
14086 _ACEOF
14087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14088   $EGREP "memchr" >/dev/null 2>&1; then
14089   :
14090 else
14091   ac_cv_header_stdc=no
14092 fi
14093 rm -rf conftest*
14094
14095 fi
14096
14097 if test $ac_cv_header_stdc = yes; then
14098   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14099   cat >"conftest.$ac_ext" <<_ACEOF
14100 #line 14100 "configure"
14101 #include "confdefs.h"
14102 #include <stdlib.h>
14103
14104 _ACEOF
14105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14106   $EGREP "free" >/dev/null 2>&1; then
14107   :
14108 else
14109   ac_cv_header_stdc=no
14110 fi
14111 rm -rf conftest*
14112
14113 fi
14114
14115 if test $ac_cv_header_stdc = yes; then
14116   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14117   if test "$cross_compiling" = yes; then
14118   :
14119 else
14120   cat >"conftest.$ac_ext" <<_ACEOF
14121 #line 14121 "configure"
14122 #include "confdefs.h"
14123 #include <ctype.h>
14124 #if ((' ' & 0x0FF) == 0x020)
14125 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14126 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14127 #else
14128 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14129                      || ('j' <= (c) && (c) <= 'r') \
14130                      || ('s' <= (c) && (c) <= 'z'))
14131 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14132 #endif
14133
14134 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14135 int
14136 main (void)
14137 {
14138   int i;
14139   for (i = 0; i < 256; i++)
14140     if (XOR (islower (i), ISLOWER (i))
14141         || toupper (i) != TOUPPER (i))
14142       $ac_main_return(2);
14143   $ac_main_return (0);
14144 }
14145 _ACEOF
14146 rm -f "conftest$ac_exeext"
14147 if { (eval echo "$as_me:14147: \"$ac_link\"") >&5
14148   (eval $ac_link) 2>&5
14149   ac_status=$?
14150   echo "$as_me:14150: \$? = $ac_status" >&5
14151   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14152   { (eval echo "$as_me:14152: \"$ac_try\"") >&5
14153   (eval $ac_try) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit "$ac_status"); }; }; then
14157   :
14158 else
14159   echo "$as_me: program exited with status $ac_status" >&5
14160 echo "$as_me: failed program was:" >&5
14161 cat "conftest.$ac_ext" >&5
14162 ac_cv_header_stdc=no
14163 fi
14164 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14165 fi
14166 fi
14167 fi
14168 echo "$as_me:14168: result: $ac_cv_header_stdc" >&5
14169 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14170 if test $ac_cv_header_stdc = yes; then
14171
14172 cat >>confdefs.h <<\EOF
14173 #define STDC_HEADERS 1
14174 EOF
14175
14176 fi
14177
14178 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14179
14180 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14181                   inttypes.h stdint.h unistd.h
14182 do
14183 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14184 echo "$as_me:14184: checking for $ac_header" >&5
14185 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14187   echo $ECHO_N "(cached) $ECHO_C" >&6
14188 else
14189   cat >"conftest.$ac_ext" <<_ACEOF
14190 #line 14190 "configure"
14191 #include "confdefs.h"
14192 $ac_includes_default
14193 #include <$ac_header>
14194 _ACEOF
14195 rm -f "conftest.$ac_objext"
14196 if { (eval echo "$as_me:14196: \"$ac_compile\"") >&5
14197   (eval $ac_compile) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit "$ac_status"); } &&
14201          { ac_try='test -s "conftest.$ac_objext"'
14202   { (eval echo "$as_me:14202: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit "$ac_status"); }; }; then
14207   eval "$as_ac_Header=yes"
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 cat "conftest.$ac_ext" >&5
14211 eval "$as_ac_Header=no"
14212 fi
14213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14214 fi
14215 echo "$as_me:14215: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14216 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14217 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14218   cat >>confdefs.h <<EOF
14219 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14220 EOF
14221
14222 fi
14223 done
14224
14225 echo "$as_me:14225: checking for signed char" >&5
14226 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14227 if test "${ac_cv_type_signed_char+set}" = set; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   cat >"conftest.$ac_ext" <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233 $ac_includes_default
14234 int
14235 main (void)
14236 {
14237 if ((signed char *) 0)
14238   return 0;
14239 if (sizeof (signed char))
14240   return 0;
14241   ;
14242   return 0;
14243 }
14244 _ACEOF
14245 rm -f "conftest.$ac_objext"
14246 if { (eval echo "$as_me:14246: \"$ac_compile\"") >&5
14247   (eval $ac_compile) 2>&5
14248   ac_status=$?
14249   echo "$as_me:14249: \$? = $ac_status" >&5
14250   (exit "$ac_status"); } &&
14251          { ac_try='test -s "conftest.$ac_objext"'
14252   { (eval echo "$as_me:14252: \"$ac_try\"") >&5
14253   (eval $ac_try) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit "$ac_status"); }; }; then
14257   ac_cv_type_signed_char=yes
14258 else
14259   echo "$as_me: failed program was:" >&5
14260 cat "conftest.$ac_ext" >&5
14261 ac_cv_type_signed_char=no
14262 fi
14263 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14264 fi
14265 echo "$as_me:14265: result: $ac_cv_type_signed_char" >&5
14266 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14267
14268 echo "$as_me:14268: checking size of signed char" >&5
14269 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14270 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14271   echo $ECHO_N "(cached) $ECHO_C" >&6
14272 else
14273   if test "$ac_cv_type_signed_char" = yes; then
14274   if test "$cross_compiling" = yes; then
14275   # Depending upon the size, compute the lo and hi bounds.
14276 cat >"conftest.$ac_ext" <<_ACEOF
14277 #line 14277 "configure"
14278 #include "confdefs.h"
14279 $ac_includes_default
14280 int
14281 main (void)
14282 {
14283 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14284   ;
14285   return 0;
14286 }
14287 _ACEOF
14288 rm -f "conftest.$ac_objext"
14289 if { (eval echo "$as_me:14289: \"$ac_compile\"") >&5
14290   (eval $ac_compile) 2>&5
14291   ac_status=$?
14292   echo "$as_me:14292: \$? = $ac_status" >&5
14293   (exit "$ac_status"); } &&
14294          { ac_try='test -s "conftest.$ac_objext"'
14295   { (eval echo "$as_me:14295: \"$ac_try\"") >&5
14296   (eval $ac_try) 2>&5
14297   ac_status=$?
14298   echo "$as_me:14298: \$? = $ac_status" >&5
14299   (exit "$ac_status"); }; }; then
14300   ac_lo=0 ac_mid=0
14301   while :; do
14302     cat >"conftest.$ac_ext" <<_ACEOF
14303 #line 14303 "configure"
14304 #include "confdefs.h"
14305 $ac_includes_default
14306 int
14307 main (void)
14308 {
14309 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14310   ;
14311   return 0;
14312 }
14313 _ACEOF
14314 rm -f "conftest.$ac_objext"
14315 if { (eval echo "$as_me:14315: \"$ac_compile\"") >&5
14316   (eval $ac_compile) 2>&5
14317   ac_status=$?
14318   echo "$as_me:14318: \$? = $ac_status" >&5
14319   (exit "$ac_status"); } &&
14320          { ac_try='test -s "conftest.$ac_objext"'
14321   { (eval echo "$as_me:14321: \"$ac_try\"") >&5
14322   (eval $ac_try) 2>&5
14323   ac_status=$?
14324   echo "$as_me:14324: \$? = $ac_status" >&5
14325   (exit "$ac_status"); }; }; then
14326   ac_hi=$ac_mid; break
14327 else
14328   echo "$as_me: failed program was:" >&5
14329 cat "conftest.$ac_ext" >&5
14330 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14331 fi
14332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14333   done
14334 else
14335   echo "$as_me: failed program was:" >&5
14336 cat "conftest.$ac_ext" >&5
14337 ac_hi=-1 ac_mid=-1
14338   while :; do
14339     cat >"conftest.$ac_ext" <<_ACEOF
14340 #line 14340 "configure"
14341 #include "confdefs.h"
14342 $ac_includes_default
14343 int
14344 main (void)
14345 {
14346 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14347   ;
14348   return 0;
14349 }
14350 _ACEOF
14351 rm -f "conftest.$ac_objext"
14352 if { (eval echo "$as_me:14352: \"$ac_compile\"") >&5
14353   (eval $ac_compile) 2>&5
14354   ac_status=$?
14355   echo "$as_me:14355: \$? = $ac_status" >&5
14356   (exit "$ac_status"); } &&
14357          { ac_try='test -s "conftest.$ac_objext"'
14358   { (eval echo "$as_me:14358: \"$ac_try\"") >&5
14359   (eval $ac_try) 2>&5
14360   ac_status=$?
14361   echo "$as_me:14361: \$? = $ac_status" >&5
14362   (exit "$ac_status"); }; }; then
14363   ac_lo=$ac_mid; break
14364 else
14365   echo "$as_me: failed program was:" >&5
14366 cat "conftest.$ac_ext" >&5
14367 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14368 fi
14369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14370   done
14371 fi
14372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14373 # Binary search between lo and hi bounds.
14374 while test "x$ac_lo" != "x$ac_hi"; do
14375   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14376   cat >"conftest.$ac_ext" <<_ACEOF
14377 #line 14377 "configure"
14378 #include "confdefs.h"
14379 $ac_includes_default
14380 int
14381 main (void)
14382 {
14383 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14384   ;
14385   return 0;
14386 }
14387 _ACEOF
14388 rm -f "conftest.$ac_objext"
14389 if { (eval echo "$as_me:14389: \"$ac_compile\"") >&5
14390   (eval $ac_compile) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit "$ac_status"); } &&
14394          { ac_try='test -s "conftest.$ac_objext"'
14395   { (eval echo "$as_me:14395: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit "$ac_status"); }; }; then
14400   ac_hi=$ac_mid
14401 else
14402   echo "$as_me: failed program was:" >&5
14403 cat "conftest.$ac_ext" >&5
14404 ac_lo=`expr "$ac_mid" + 1`
14405 fi
14406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14407 done
14408 ac_cv_sizeof_signed_char=$ac_lo
14409 else
14410   if test "$cross_compiling" = yes; then
14411   { { echo "$as_me:14411: error: cannot run test program while cross compiling" >&5
14412 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14413    { (exit 1); exit 1; }; }
14414 else
14415   cat >"conftest.$ac_ext" <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418 $ac_includes_default
14419 int
14420 main (void)
14421 {
14422 FILE *f = fopen ("conftest.val", "w");
14423 if (!f)
14424   $ac_main_return (1);
14425 fprintf (f, "%ld", (long)(sizeof (signed char)));
14426 fclose (f);
14427   ;
14428   return 0;
14429 }
14430 _ACEOF
14431 rm -f "conftest$ac_exeext"
14432 if { (eval echo "$as_me:14432: \"$ac_link\"") >&5
14433   (eval $ac_link) 2>&5
14434   ac_status=$?
14435   echo "$as_me:14435: \$? = $ac_status" >&5
14436   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_cv_sizeof_signed_char=`cat conftest.val`
14443 else
14444   echo "$as_me: program exited with status $ac_status" >&5
14445 echo "$as_me: failed program was:" >&5
14446 cat "conftest.$ac_ext" >&5
14447 fi
14448 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14449 fi
14450 fi
14451 rm -f conftest.val
14452 else
14453   ac_cv_sizeof_signed_char=0
14454 fi
14455 fi
14456 echo "$as_me:14456: result: $ac_cv_sizeof_signed_char" >&5
14457 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14458 cat >>confdefs.h <<EOF
14459 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14460 EOF
14461
14462 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14463         NCURSES_SBOOL="signed char"
14464 else
14465         NCURSES_SBOOL="char"
14466 fi
14467 echo "$as_me:14467: checking if you want to use signed Boolean array in term.h" >&5
14468 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14469
14470 # Check whether --enable-signed-char or --disable-signed-char was given.
14471 if test "${enable_signed_char+set}" = set; then
14472   enableval="$enable_signed_char"
14473   with_signed_char=$enableval
14474 else
14475   with_signed_char=$cf_dft_signed_char
14476 fi;
14477 echo "$as_me:14477: result: $with_signed_char" >&5
14478 echo "${ECHO_T}$with_signed_char" >&6
14479 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14480
14481 ###   use option --with-tparm-arg to override tparm's argument type
14482 echo "$as_me:14482: checking for type of tparm args" >&5
14483 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14484
14485 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14486 if test "${with_tparm_arg+set}" = set; then
14487   withval="$with_tparm_arg"
14488   NCURSES_TPARM_ARG="$withval"
14489 else
14490   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14491 fi;
14492 echo "$as_me:14492: result: $NCURSES_TPARM_ARG" >&5
14493 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14494
14495 ### Enable compiling-in rcs id's
14496 echo "$as_me:14496: checking if RCS identifiers should be compiled-in" >&5
14497 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14498
14499 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14500 if test "${with_rcs_ids+set}" = set; then
14501   withval="$with_rcs_ids"
14502   with_rcs_ids=$withval
14503 else
14504   with_rcs_ids=no
14505 fi;
14506 echo "$as_me:14506: result: $with_rcs_ids" >&5
14507 echo "${ECHO_T}$with_rcs_ids" >&6
14508 test "x$with_rcs_ids" = xyes &&
14509 cat >>confdefs.h <<\EOF
14510 #define USE_RCS_IDS 1
14511 EOF
14512
14513 ###############################################################################
14514
14515 echo "$as_me:14515: checking format of man-pages" >&5
14516 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14517
14518 # Check whether --with-manpage-format or --without-manpage-format was given.
14519 if test "${with_manpage_format+set}" = set; then
14520   withval="$with_manpage_format"
14521   MANPAGE_FORMAT=$withval
14522 else
14523   MANPAGE_FORMAT=unknown
14524 fi;
14525
14526 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14527 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14528
14529 cf_unknown=
14530
14531 case "$MANPAGE_FORMAT" in
14532 (unknown)
14533         if test -z "$MANPATH" ; then
14534                 MANPATH="/usr/man:/usr/share/man"
14535         fi
14536
14537         # look for the 'date' man-page (it is most likely to be installed!)
14538         MANPAGE_FORMAT=
14539         cf_preform="no"
14540         cf_catonly="yes"
14541         cf_example="date"
14542
14543         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14544         for cf_dir in $MANPATH; do
14545                 test -z "$cf_dir" && cf_dir=/usr/man
14546                 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
14547                 do
14548                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14549                         if test "x$cf_test" = "x$cf_name" ; then
14550
14551                                 case "$cf_name" in
14552                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14553                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14554                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14555                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14556                                 esac
14557
14558                                 case "$cf_name" in
14559                                 ($cf_dir/man*)
14560                                         cf_catonly=no
14561                                         ;;
14562                                 ($cf_dir/cat*)
14563                                         cf_preform=yes
14564                                         ;;
14565                                 esac
14566                                 break
14567                         fi
14568
14569                         # if we found a match in either man* or cat*, stop looking
14570                         if test -n "$MANPAGE_FORMAT" ; then
14571                                 cf_found=no
14572                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14573                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14574                                 case "$cf_name" in
14575                                 ($cf_dir/cat*)
14576                                         cf_found=yes
14577                                         ;;
14578                                 esac
14579                                 test "$cf_found" = yes && break
14580                         fi
14581                 done
14582                 # only check the first directory in $MANPATH where we find manpages
14583                 if test -n "$MANPAGE_FORMAT" ; then
14584                         break
14585                 fi
14586         done
14587         # if we did not find the example, just assume it is normal
14588         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14589         IFS="$ac_save_ifs"
14590         ;;
14591 (*)
14592         for cf_option in $MANPAGE_FORMAT; do
14593         case "$cf_option" in
14594         (gzip|compress|BSDI|normal|formatted|catonly)
14595                 ;;
14596         (*)
14597                 cf_unknown="$cf_unknown $cf_option"
14598                 ;;
14599         esac
14600         done
14601         ;;
14602 esac
14603
14604 echo "$as_me:14604: result: $MANPAGE_FORMAT" >&5
14605 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14606 if test -n "$cf_unknown" ; then
14607         { echo "$as_me:14607: WARNING: Unexpected manpage-format $cf_unknown" >&5
14608 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14609 fi
14610
14611 echo "$as_me:14611: checking for manpage renaming" >&5
14612 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14613
14614 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14615 if test "${with_manpage_renames+set}" = set; then
14616   withval="$with_manpage_renames"
14617   MANPAGE_RENAMES=$withval
14618 else
14619   MANPAGE_RENAMES=yes
14620 fi;
14621
14622 case ".$MANPAGE_RENAMES" in
14623 (.no)
14624         ;;
14625 (.|.yes)
14626         # Debian 'man' program?
14627         if test -f /etc/debian_version ; then
14628                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14629         else
14630                 MANPAGE_RENAMES=no
14631         fi
14632         ;;
14633 esac
14634
14635 if test "$MANPAGE_RENAMES" != no ; then
14636         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14637                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14638         elif test ! -f "$MANPAGE_RENAMES" ; then
14639                 { { echo "$as_me:14639: error: not a filename: $MANPAGE_RENAMES" >&5
14640 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14641    { (exit 1); exit 1; }; }
14642         fi
14643
14644         test ! -d man && mkdir man
14645
14646         # Construct a sed-script to perform renaming within man-pages
14647         if test -n "$MANPAGE_RENAMES" ; then
14648                 test ! -d man && mkdir man
14649                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14650         fi
14651 fi
14652
14653 echo "$as_me:14653: result: $MANPAGE_RENAMES" >&5
14654 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14655
14656 echo "$as_me:14656: checking if manpage aliases will be installed" >&5
14657 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14658
14659 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14660 if test "${with_manpage_aliases+set}" = set; then
14661   withval="$with_manpage_aliases"
14662   MANPAGE_ALIASES=$withval
14663 else
14664   MANPAGE_ALIASES=yes
14665 fi;
14666
14667 echo "$as_me:14667: result: $MANPAGE_ALIASES" >&5
14668 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14669
14670 case "x$LN_S" in
14671 (xln*)
14672         cf_use_symlinks=yes
14673         ;;
14674 (*)
14675         cf_use_symlinks=no
14676         ;;
14677 esac
14678
14679 MANPAGE_SYMLINKS=no
14680 if test "$MANPAGE_ALIASES" = yes ; then
14681 echo "$as_me:14681: checking if manpage symlinks should be used" >&5
14682 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14683
14684 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14685 if test "${with_manpage_symlinks+set}" = set; then
14686   withval="$with_manpage_symlinks"
14687   MANPAGE_SYMLINKS=$withval
14688 else
14689   MANPAGE_SYMLINKS=$cf_use_symlinks
14690 fi;
14691
14692 if test "$$cf_use_symlinks" = no; then
14693 if test "$MANPAGE_SYMLINKS" = yes ; then
14694         { echo "$as_me:14694: WARNING: cannot make symlinks" >&5
14695 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14696         MANPAGE_SYMLINKS=no
14697 fi
14698 fi
14699
14700 echo "$as_me:14700: result: $MANPAGE_SYMLINKS" >&5
14701 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14702 fi
14703
14704 echo "$as_me:14704: checking for manpage tbl" >&5
14705 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14706
14707 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14708 if test "${with_manpage_tbl+set}" = set; then
14709   withval="$with_manpage_tbl"
14710   MANPAGE_TBL=$withval
14711 else
14712   MANPAGE_TBL=no
14713 fi;
14714
14715 echo "$as_me:14715: result: $MANPAGE_TBL" >&5
14716 echo "${ECHO_T}$MANPAGE_TBL" >&6
14717
14718 if test "$prefix" = "NONE" ; then
14719         cf_prefix="$ac_default_prefix"
14720 else
14721         cf_prefix="$prefix"
14722 fi
14723
14724 case "$MANPAGE_FORMAT" in
14725 (*catonly*)
14726         cf_format=yes
14727         cf_inboth=no
14728         ;;
14729 (*formatted*)
14730         cf_format=yes
14731         cf_inboth=yes
14732         ;;
14733 (*)
14734         cf_format=no
14735         cf_inboth=no
14736         ;;
14737 esac
14738
14739 test ! -d man && mkdir man
14740
14741 cf_so_strip=
14742 cf_compress=
14743 case "$MANPAGE_FORMAT" in
14744 (*compress*)
14745         cf_so_strip="Z"
14746         cf_compress=compress
14747         ;;
14748 (*gzip*)
14749         cf_so_strip="gz"
14750         cf_compress=gzip
14751         ;;
14752 esac
14753
14754 cf_edit_man=./edit_man.sh
14755 cf_man_alias=`pwd`/man_alias.sed
14756
14757 cat >$cf_edit_man <<CF_EOF
14758 #! $SHELL
14759 # this script is generated by the configure-script CF_MAN_PAGES macro.
14760
14761 prefix="$cf_prefix"
14762 datarootdir="$datarootdir"
14763 datadir="$datadir"
14764
14765 NCURSES_MAJOR="$NCURSES_MAJOR"
14766 NCURSES_MINOR="$NCURSES_MINOR"
14767 NCURSES_PATCH="$NCURSES_PATCH"
14768
14769 NCURSES_OSPEED="$NCURSES_OSPEED"
14770 TERMINFO="$TERMINFO"
14771
14772 INSTALL="$INSTALL"
14773 INSTALL_DATA="$INSTALL_DATA"
14774
14775 transform="$program_transform_name"
14776
14777 TMP=\${TMPDIR:=/tmp}/man\$\$
14778 trap "rm -f \$TMP" 0 1 2 3 15
14779
14780 form=\$1
14781 shift || exit 1
14782
14783 verb=\$1
14784 shift || exit 1
14785
14786 mandir=\$1
14787 shift || exit 1
14788
14789 srcdir=\$1
14790 top_srcdir=\$srcdir/..
14791 shift || exit 1
14792
14793 if test "\$form" = normal ; then
14794         if test "$cf_format" = yes ; then
14795         if test "$cf_inboth" = no ; then
14796                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14797                 exit $?
14798         fi
14799         fi
14800         cf_subdir=\$mandir/man
14801         cf_tables=$MANPAGE_TBL
14802 else
14803         cf_subdir=\$mandir/cat
14804         cf_tables=yes
14805 fi
14806
14807 # process the list of source-files
14808 for i in "\$@" ; do
14809 case \$i in
14810 (*.orig|*.rej) ;;
14811 (*.[0-9]*)
14812         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14813         if test "\$verb" = installing ; then
14814         if test ! -d "\$cf_subdir\${section}" ; then
14815                 mkdir -p "\$cf_subdir\$section"
14816         fi
14817         fi
14818
14819         # replace variables in man page
14820         if test ! -f "$cf_man_alias" ; then
14821 cat >>$cf_man_alias <<-CF_EOF2
14822                 s,@DATADIR@,\$datadir,g
14823                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14824                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14825                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14826                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14827                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14828                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14829 CF_EOF
14830
14831         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14832         do
14833                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14834                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14835 cat >>$cf_edit_man <<-CF_EOF
14836                 s,@$cf_NAME@,$cf_name,g
14837 CF_EOF
14838         done
14839
14840 cat >>$cf_edit_man <<CF_EOF
14841 CF_EOF2
14842                 echo "...made $cf_man_alias"
14843         fi
14844
14845         aliases=
14846         cf_source=\`basename "\$i"\`
14847         inalias=\$cf_source
14848         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14849         if test ! -f "\$inalias" ; then
14850                 echo ".. skipped \$cf_source"
14851                 continue
14852         fi
14853 CF_EOF
14854
14855 if test "$MANPAGE_ALIASES" != no ; then
14856 cat >>$cf_edit_man <<CF_EOF
14857         nCurses=ignore.3x
14858         test "$with_curses_h" = yes && nCurses=ncurses.3x
14859         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14860 CF_EOF
14861 fi
14862
14863 if test "$MANPAGE_RENAMES" = no ; then
14864 cat >>$cf_edit_man <<CF_EOF
14865         # perform program transformations for section 1 man pages
14866         if test \$section = 1 ; then
14867                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14868         else
14869                 cf_target=\$cf_subdir\${section}/\$cf_source
14870         fi
14871 CF_EOF
14872 else
14873 cat >>$cf_edit_man <<CF_EOF
14874         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14875         if test -z "\$cf_target" ; then
14876                 echo "? missing rename for \$cf_source"
14877                 cf_target="\$cf_source"
14878         fi
14879         cf_target="\$cf_subdir\${section}/\${cf_target}"
14880
14881 CF_EOF
14882 fi
14883
14884 cat >>$cf_edit_man <<CF_EOF
14885         sed     -f "$cf_man_alias" \\
14886 CF_EOF
14887
14888 if test -f "$MANPAGE_RENAMES" ; then
14889 cat >>$cf_edit_man <<CF_EOF
14890                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14891 CF_EOF
14892 else
14893 cat >>$cf_edit_man <<CF_EOF
14894                 < "\$i" >\$TMP
14895 CF_EOF
14896 fi
14897
14898 cat >>$cf_edit_man <<CF_EOF
14899 if test \$cf_tables = yes ; then
14900         tbl \$TMP >\$TMP.out
14901         mv \$TMP.out \$TMP
14902 fi
14903 CF_EOF
14904
14905 if test "$with_overwrite" != yes ; then
14906 cat >>$cf_edit_man <<CF_EOF
14907         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14908         mv \$TMP.out \$TMP
14909 CF_EOF
14910 fi
14911
14912 if test "$with_curses_h" != yes ; then
14913 cat >>$cf_edit_man <<CF_EOF
14914         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14915         mv \$TMP.out \$TMP
14916 CF_EOF
14917 fi
14918
14919 cat >>$cf_edit_man <<CF_EOF
14920         if test "\$form" = format ; then
14921                 nroff -man \$TMP >\$TMP.out
14922                 mv \$TMP.out \$TMP
14923         fi
14924 CF_EOF
14925
14926 if test -n "$cf_compress" ; then
14927 cat >>$cf_edit_man <<CF_EOF
14928         if test "\$verb" = installing ; then
14929         if ( "$cf_compress" -f \$TMP )
14930         then
14931                 mv \$TMP.$cf_so_strip \$TMP
14932         fi
14933         fi
14934         cf_target="\$cf_target.$cf_so_strip"
14935 CF_EOF
14936 fi
14937
14938 case "$MANPAGE_FORMAT" in
14939 (*BSDI*)
14940 cat >>$cf_edit_man <<CF_EOF
14941         if test "\$form" = format ; then
14942                 # BSDI installs only .0 suffixes in the cat directories
14943                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14944         fi
14945 CF_EOF
14946   ;;
14947 esac
14948
14949 cat >>$cf_edit_man <<CF_EOF
14950         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14951         if test "\$verb" = installing ; then
14952                 echo "\$verb \$cf_target"
14953                 \$INSTALL_DATA \$TMP "\$cf_target"
14954                 test -d "\$cf_subdir\${section}" &&
14955                 test -n "\$aliases" && (
14956                         cd "\$cf_subdir\${section}" && (
14957                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14958                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14959                                 cf_target=\`basename "\$cf_target"\`
14960                                 for cf_alias in \$aliases
14961                                 do
14962                                         if test "\$section" = 1 ; then
14963                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14964                                         fi
14965
14966                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14967                                                 if test -f "\$cf_alias\${suffix}" ; then
14968                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14969                                                         then
14970                                                                 continue
14971                                                         fi
14972                                                 fi
14973                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14974 CF_EOF
14975 case "x$LN_S" in
14976 (*-f)
14977 cat >>$cf_edit_man <<CF_EOF
14978                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14979 CF_EOF
14980         ;;
14981 (*)
14982 cat >>$cf_edit_man <<CF_EOF
14983                                                 rm -f "\$cf_alias\${suffix}"
14984                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14985 CF_EOF
14986         ;;
14987 esac
14988 cat >>$cf_edit_man <<CF_EOF
14989                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14990                                                 echo ".so \$cf_source" >\$TMP
14991 CF_EOF
14992 if test -n "$cf_compress" ; then
14993 cat >>$cf_edit_man <<CF_EOF
14994                                                 if test -n "$cf_so_strip" ; then
14995                                                         "$cf_compress" -f \$TMP
14996                                                         mv \$TMP.$cf_so_strip \$TMP
14997                                                 fi
14998 CF_EOF
14999 fi
15000 cat >>$cf_edit_man <<CF_EOF
15001                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15002                                                 rm -f "\$cf_alias\${suffix}"
15003                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15004                                         fi
15005                                 done
15006                         )
15007                 )
15008         elif test "\$verb" = removing ; then
15009                 test -f "\$cf_target" && (
15010                         echo "\$verb \$cf_target"
15011                         rm -f "\$cf_target"
15012                 )
15013                 test -d "\$cf_subdir\${section}" &&
15014                 test -n "\$aliases" && (
15015                         cd "\$cf_subdir\${section}" && (
15016                                 for cf_alias in \$aliases
15017                                 do
15018                                         if test "\$section" = 1 ; then
15019                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15020                                         fi
15021
15022                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15023                                         rm -f "\$cf_alias\${suffix}"
15024                                 done
15025                         )
15026                 )
15027         else
15028 #               echo ".hy 0"
15029                 cat \$TMP
15030         fi
15031         ;;
15032 esac
15033 done
15034
15035 if test "$cf_inboth" = yes ; then
15036 if test "\$form" != format ; then
15037         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15038 fi
15039 fi
15040
15041 exit 0
15042 CF_EOF
15043 chmod 755 "$cf_edit_man"
15044
15045 ###############################################################################
15046
15047 ### Note that some functions (such as const) are normally disabled anyway.
15048 echo "$as_me:15048: checking if you want to build with function extensions" >&5
15049 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15050
15051 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15052 if test "${enable_ext_funcs+set}" = set; then
15053   enableval="$enable_ext_funcs"
15054   with_ext_funcs=$enableval
15055 else
15056   with_ext_funcs=yes
15057 fi;
15058 echo "$as_me:15058: result: $with_ext_funcs" >&5
15059 echo "${ECHO_T}$with_ext_funcs" >&6
15060 if test "x$with_ext_funcs" = xyes ; then
15061         NCURSES_EXT_FUNCS=1
15062
15063 cat >>confdefs.h <<\EOF
15064 #define NCURSES_EXT_FUNCS 1
15065 EOF
15066
15067 cat >>confdefs.h <<\EOF
15068 #define HAVE_ASSUME_DEFAULT_COLORS 1
15069 EOF
15070
15071 cat >>confdefs.h <<\EOF
15072 #define HAVE_CURSES_VERSION 1
15073 EOF
15074
15075 cat >>confdefs.h <<\EOF
15076 #define HAVE_HAS_KEY 1
15077 EOF
15078
15079 cat >>confdefs.h <<\EOF
15080 #define HAVE_RESIZETERM 1
15081 EOF
15082
15083 cat >>confdefs.h <<\EOF
15084 #define HAVE_RESIZE_TERM 1
15085 EOF
15086
15087 cat >>confdefs.h <<\EOF
15088 #define HAVE_TERM_ENTRY_H 1
15089 EOF
15090
15091 cat >>confdefs.h <<\EOF
15092 #define HAVE_USE_DEFAULT_COLORS 1
15093 EOF
15094
15095 cat >>confdefs.h <<\EOF
15096 #define HAVE_USE_EXTENDED_NAMES 1
15097 EOF
15098
15099 cat >>confdefs.h <<\EOF
15100 #define HAVE_USE_SCREEN 1
15101 EOF
15102
15103 cat >>confdefs.h <<\EOF
15104 #define HAVE_USE_WINDOW 1
15105 EOF
15106
15107 cat >>confdefs.h <<\EOF
15108 #define HAVE_WRESIZE 1
15109 EOF
15110
15111         GENERATED_EXT_FUNCS=generated
15112         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15113 else
15114         NCURSES_EXT_FUNCS=0
15115         GENERATED_EXT_FUNCS=
15116 fi
15117
15118 echo "$as_me:15118: checking if you want to build with SCREEN extensions" >&5
15119 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15120
15121 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15122 if test "${enable_sp_funcs+set}" = set; then
15123   enableval="$enable_sp_funcs"
15124   with_sp_funcs=$enableval
15125 else
15126   with_sp_funcs=$cf_dft_ext_spfuncs
15127 fi;
15128 echo "$as_me:15128: result: $with_sp_funcs" >&5
15129 echo "${ECHO_T}$with_sp_funcs" >&6
15130 if test "x$with_sp_funcs" = xyes ; then
15131         NCURSES_SP_FUNCS=1
15132
15133 cat >>confdefs.h <<\EOF
15134 #define NCURSES_SP_FUNCS 1
15135 EOF
15136
15137 cat >>confdefs.h <<\EOF
15138 #define HAVE_TPUTS_SP 1
15139 EOF
15140
15141         GENERATED_SP_FUNCS=generated
15142 else
15143         NCURSES_SP_FUNCS=0
15144         GENERATED_SP_FUNCS=
15145 fi
15146
15147 echo "$as_me:15147: checking if you want to build with terminal-driver" >&5
15148 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15149
15150 # Check whether --enable-term-driver or --disable-term-driver was given.
15151 if test "${enable_term_driver+set}" = set; then
15152   enableval="$enable_term_driver"
15153   with_term_driver=$enableval
15154 else
15155   with_term_driver=no
15156 fi;
15157 echo "$as_me:15157: result: $with_term_driver" >&5
15158 echo "${ECHO_T}$with_term_driver" >&6
15159 if test "x$with_term_driver" = xyes ; then
15160
15161 cat >>confdefs.h <<\EOF
15162 #define USE_TERM_DRIVER 1
15163 EOF
15164
15165         if test "x$with_termlib" != xno ; then
15166                 { { echo "$as_me:15166: error: The term-driver option conflicts with the termlib option" >&5
15167 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15168    { (exit 1); exit 1; }; }
15169         fi
15170         if test "x$with_sp_funcs" != xyes ; then
15171                 { { echo "$as_me:15171: error: The term-driver option relies upon sp-funcs" >&5
15172 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15173    { (exit 1); exit 1; }; }
15174         fi
15175 fi
15176
15177 ###   use option --enable-const to turn on use of const beyond that in XSI.
15178 echo "$as_me:15178: checking for extended use of const keyword" >&5
15179 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15180
15181 # Check whether --enable-const or --disable-const was given.
15182 if test "${enable_const+set}" = set; then
15183   enableval="$enable_const"
15184   with_ext_const=$enableval
15185 else
15186   with_ext_const=$cf_dft_ext_const
15187 fi;
15188 echo "$as_me:15188: result: $with_ext_const" >&5
15189 echo "${ECHO_T}$with_ext_const" >&6
15190 NCURSES_CONST='/*nothing*/'
15191 if test "x$with_ext_const" = xyes ; then
15192         NCURSES_CONST=const
15193 fi
15194
15195 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15196 echo "$as_me:15196: checking if you want to use extended colors" >&5
15197 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15198
15199 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15200 if test "${enable_ext_colors+set}" = set; then
15201   enableval="$enable_ext_colors"
15202   with_ext_colors=$enableval
15203 else
15204   with_ext_colors=$cf_dft_ext_colors
15205 fi;
15206 echo "$as_me:15206: result: $with_ext_colors" >&5
15207 echo "${ECHO_T}$with_ext_colors" >&6
15208 NCURSES_EXT_COLORS=0
15209 if test "x$with_ext_colors" = xyes ; then
15210         if test "x$with_widec" != xyes ; then
15211                 { echo "$as_me:15211: WARNING: This option applies only to wide-character library" >&5
15212 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15213         else
15214                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15215
15216 if test "${with_abi_version+set}" != set; then
15217         case "$cf_cv_rel_version" in
15218         (5.*)
15219                 cf_cv_rel_version=6.0
15220                 cf_cv_abi_version=6
15221                 { echo "$as_me:15221: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15222 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15223                 ;;
15224         esac
15225 fi
15226
15227                 NCURSES_EXT_COLORS=1
15228
15229 cat >>confdefs.h <<\EOF
15230 #define NCURSES_EXT_COLORS 1
15231 EOF
15232
15233 cat >>confdefs.h <<\EOF
15234 #define HAVE_ALLOC_PAIR 1
15235 EOF
15236
15237 cat >>confdefs.h <<\EOF
15238 #define HAVE_INIT_EXTENDED_COLOR 1
15239 EOF
15240
15241 cat >>confdefs.h <<\EOF
15242 #define HAVE_RESET_COLOR_PAIRS 1
15243 EOF
15244
15245         fi
15246 fi
15247
15248 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15249 echo "$as_me:15249: checking if you want to use extended mouse encoding" >&5
15250 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15251
15252 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15253 if test "${enable_ext_mouse+set}" = set; then
15254   enableval="$enable_ext_mouse"
15255   with_ext_mouse=$enableval
15256 else
15257   with_ext_mouse=$cf_dft_ext_mouse
15258 fi;
15259 echo "$as_me:15259: result: $with_ext_mouse" >&5
15260 echo "${ECHO_T}$with_ext_mouse" >&6
15261 if test "x$with_ext_mouse" = xyes ; then
15262
15263 if test "${with_abi_version+set}" != set; then
15264         case "$cf_cv_rel_version" in
15265         (5.*)
15266                 cf_cv_rel_version=6.0
15267                 cf_cv_abi_version=6
15268                 { echo "$as_me:15268: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15269 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15270                 ;;
15271         esac
15272 fi
15273
15274 fi
15275
15276 case $cf_cv_abi_version in
15277 (5)
15278         NCURSES_MOUSE_VERSION=1
15279         ;;
15280 (6)
15281         NCURSES_MOUSE_VERSION=2
15282         ;;
15283 (789)
15284         NCURSES_MOUSE_VERSION=3
15285         ;;
15286 esac
15287
15288 ###   use option --enable-ext-putwin to turn on extended screendumps
15289 echo "$as_me:15289: checking if you want to use extended putwin/screendump" >&5
15290 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15291
15292 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15293 if test "${enable_ext_putwin+set}" = set; then
15294   enableval="$enable_ext_putwin"
15295   with_ext_putwin=$enableval
15296 else
15297   with_ext_putwin=$cf_dft_ext_putwin
15298 fi;
15299 echo "$as_me:15299: result: $with_ext_putwin" >&5
15300 echo "${ECHO_T}$with_ext_putwin" >&6
15301 if test "x$with_ext_putwin" = xyes ; then
15302
15303 cat >>confdefs.h <<\EOF
15304 #define NCURSES_EXT_PUTWIN 1
15305 EOF
15306
15307 fi
15308
15309 echo "$as_me:15309: checking if you want \$NCURSES_NO_PADDING code" >&5
15310 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15311
15312 # Check whether --enable-no-padding or --disable-no-padding was given.
15313 if test "${enable_no_padding+set}" = set; then
15314   enableval="$enable_no_padding"
15315   with_no_padding=$enableval
15316 else
15317   with_no_padding=$with_ext_funcs
15318 fi;
15319 echo "$as_me:15319: result: $with_no_padding" >&5
15320 echo "${ECHO_T}$with_no_padding" >&6
15321 test "x$with_no_padding" = xyes &&
15322 cat >>confdefs.h <<\EOF
15323 #define NCURSES_NO_PADDING 1
15324 EOF
15325
15326 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15327 echo "$as_me:15327: checking if you want SIGWINCH handler" >&5
15328 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15329
15330 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15331 if test "${enable_sigwinch+set}" = set; then
15332   enableval="$enable_sigwinch"
15333   with_sigwinch=$enableval
15334 else
15335   with_sigwinch=$with_ext_funcs
15336 fi;
15337 echo "$as_me:15337: result: $with_sigwinch" >&5
15338 echo "${ECHO_T}$with_sigwinch" >&6
15339 test "x$with_sigwinch" = xyes &&
15340 cat >>confdefs.h <<\EOF
15341 #define USE_SIGWINCH 1
15342 EOF
15343
15344 ###   use option --enable-tcap-names to allow user to define new capabilities
15345 echo "$as_me:15345: checking if you want user-definable terminal capabilities like termcap" >&5
15346 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15347
15348 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15349 if test "${enable_tcap_names+set}" = set; then
15350   enableval="$enable_tcap_names"
15351   with_tcap_names=$enableval
15352 else
15353   with_tcap_names=$with_ext_funcs
15354 fi;
15355 echo "$as_me:15355: result: $with_tcap_names" >&5
15356 echo "${ECHO_T}$with_tcap_names" >&6
15357 NCURSES_XNAMES=0
15358 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15359
15360 ##############################################################################
15361
15362 echo "$as_me:15362: checking if you want to link with the pthread library" >&5
15363 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15364
15365 # Check whether --with-pthread or --without-pthread was given.
15366 if test "${with_pthread+set}" = set; then
15367   withval="$with_pthread"
15368   with_pthread=$withval
15369 else
15370   with_pthread=no
15371 fi;
15372 echo "$as_me:15372: result: $with_pthread" >&5
15373 echo "${ECHO_T}$with_pthread" >&6
15374
15375 if test "$with_pthread" != no ; then
15376         echo "$as_me:15376: checking for pthread.h" >&5
15377 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15378 if test "${ac_cv_header_pthread_h+set}" = set; then
15379   echo $ECHO_N "(cached) $ECHO_C" >&6
15380 else
15381   cat >"conftest.$ac_ext" <<_ACEOF
15382 #line 15382 "configure"
15383 #include "confdefs.h"
15384 #include <pthread.h>
15385 _ACEOF
15386 if { (eval echo "$as_me:15386: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15387   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15388   ac_status=$?
15389   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15390   rm -f conftest.er1
15391   cat conftest.err >&5
15392   echo "$as_me:15392: \$? = $ac_status" >&5
15393   (exit "$ac_status"); } >/dev/null; then
15394   if test -s conftest.err; then
15395     ac_cpp_err=$ac_c_preproc_warn_flag
15396   else
15397     ac_cpp_err=
15398   fi
15399 else
15400   ac_cpp_err=yes
15401 fi
15402 if test -z "$ac_cpp_err"; then
15403   ac_cv_header_pthread_h=yes
15404 else
15405   echo "$as_me: failed program was:" >&5
15406   cat "conftest.$ac_ext" >&5
15407   ac_cv_header_pthread_h=no
15408 fi
15409 rm -f conftest.err "conftest.$ac_ext"
15410 fi
15411 echo "$as_me:15411: result: $ac_cv_header_pthread_h" >&5
15412 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15413 if test "$ac_cv_header_pthread_h" = yes; then
15414
15415 cat >>confdefs.h <<\EOF
15416 #define HAVE_PTHREADS_H 1
15417 EOF
15418
15419         for cf_lib_pthread in pthread c_r
15420         do
15421             echo "$as_me:15421: checking if we can link with the $cf_lib_pthread library" >&5
15422 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15423             cf_save_LIBS="$LIBS"
15424
15425 cf_add_libs="$LIBS"
15426 # reverse order
15427 cf_add_0lib=
15428 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15429 # filter duplicates
15430 for cf_add_1lib in $cf_add_0lib; do
15431         for cf_add_2lib in $cf_add_libs; do
15432                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15433                         cf_add_1lib=
15434                         break
15435                 fi
15436         done
15437         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15438 done
15439 LIBS="$cf_add_libs"
15440
15441             cat >"conftest.$ac_ext" <<_ACEOF
15442 #line 15442 "configure"
15443 #include "confdefs.h"
15444
15445 #include <pthread.h>
15446
15447 int
15448 main (void)
15449 {
15450
15451                 int rc = pthread_create(0,0,0,0);
15452                 int r2 = pthread_mutexattr_settype(0, 0);
15453
15454   ;
15455   return 0;
15456 }
15457 _ACEOF
15458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15459 if { (eval echo "$as_me:15459: \"$ac_link\"") >&5
15460   (eval $ac_link) 2>&5
15461   ac_status=$?
15462   echo "$as_me:15462: \$? = $ac_status" >&5
15463   (exit "$ac_status"); } &&
15464          { ac_try='test -s "conftest$ac_exeext"'
15465   { (eval echo "$as_me:15465: \"$ac_try\"") >&5
15466   (eval $ac_try) 2>&5
15467   ac_status=$?
15468   echo "$as_me:15468: \$? = $ac_status" >&5
15469   (exit "$ac_status"); }; }; then
15470   with_pthread=yes
15471 else
15472   echo "$as_me: failed program was:" >&5
15473 cat "conftest.$ac_ext" >&5
15474 with_pthread=no
15475 fi
15476 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15477             LIBS="$cf_save_LIBS"
15478             echo "$as_me:15478: result: $with_pthread" >&5
15479 echo "${ECHO_T}$with_pthread" >&6
15480             test "$with_pthread" = yes && break
15481         done
15482
15483         if test "$with_pthread" = yes ; then
15484
15485 cf_add_libs="$LIBS"
15486 # reverse order
15487 cf_add_0lib=
15488 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15489 # filter duplicates
15490 for cf_add_1lib in $cf_add_0lib; do
15491         for cf_add_2lib in $cf_add_libs; do
15492                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15493                         cf_add_1lib=
15494                         break
15495                 fi
15496         done
15497         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15498 done
15499 LIBS="$cf_add_libs"
15500
15501 cat >>confdefs.h <<\EOF
15502 #define HAVE_LIBPTHREADS 1
15503 EOF
15504
15505         else
15506             { { echo "$as_me:15506: error: Cannot link with pthread library" >&5
15507 echo "$as_me: error: Cannot link with pthread library" >&2;}
15508    { (exit 1); exit 1; }; }
15509         fi
15510
15511 fi
15512
15513 fi
15514
15515 if test "x$with_pthread" != xno; then
15516         echo "$as_me:15516: checking for pthread_kill" >&5
15517 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15518 if test "${ac_cv_func_pthread_kill+set}" = set; then
15519   echo $ECHO_N "(cached) $ECHO_C" >&6
15520 else
15521   cat >"conftest.$ac_ext" <<_ACEOF
15522 #line 15522 "configure"
15523 #include "confdefs.h"
15524 #define pthread_kill autoconf_temporary
15525 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15526 #undef pthread_kill
15527
15528 #ifdef __cplusplus
15529 extern "C"
15530 #endif
15531
15532 /* We use char because int might match the return type of a gcc2
15533    builtin and then its argument prototype would still apply.  */
15534 char pthread_kill (void);
15535
15536 int
15537 main (void)
15538 {
15539
15540 /* The GNU C library defines stubs for functions which it implements
15541     to always fail with ENOSYS.  Some functions are actually named
15542     something starting with __ and the normal name is an alias.  */
15543 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15544 #error found stub for pthread_kill
15545 #endif
15546
15547         return pthread_kill ();
15548   ;
15549   return 0;
15550 }
15551 _ACEOF
15552 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15553 if { (eval echo "$as_me:15553: \"$ac_link\"") >&5
15554   (eval $ac_link) 2>&5
15555   ac_status=$?
15556   echo "$as_me:15556: \$? = $ac_status" >&5
15557   (exit "$ac_status"); } &&
15558          { ac_try='test -s "conftest$ac_exeext"'
15559   { (eval echo "$as_me:15559: \"$ac_try\"") >&5
15560   (eval $ac_try) 2>&5
15561   ac_status=$?
15562   echo "$as_me:15562: \$? = $ac_status" >&5
15563   (exit "$ac_status"); }; }; then
15564   ac_cv_func_pthread_kill=yes
15565 else
15566   echo "$as_me: failed program was:" >&5
15567 cat "conftest.$ac_ext" >&5
15568 ac_cv_func_pthread_kill=no
15569 fi
15570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15571 fi
15572 echo "$as_me:15572: result: $ac_cv_func_pthread_kill" >&5
15573 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15574 if test "$ac_cv_func_pthread_kill" = yes; then
15575
15576                 echo "$as_me:15576: checking if you want to allow EINTR in wgetch with pthreads" >&5
15577 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15578
15579 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15580 if test "${enable_pthreads_eintr+set}" = set; then
15581   enableval="$enable_pthreads_eintr"
15582   use_pthreads_eintr=$enableval
15583 else
15584   use_pthreads_eintr=no
15585 fi;
15586                 echo "$as_me:15586: result: $use_pthreads_eintr" >&5
15587 echo "${ECHO_T}$use_pthreads_eintr" >&6
15588                 if test "x$use_pthreads_eintr" = xyes ; then
15589
15590 cat >>confdefs.h <<\EOF
15591 #define USE_PTHREADS_EINTR 1
15592 EOF
15593
15594                 fi
15595 fi
15596
15597         echo "$as_me:15597: checking if you want to use weak-symbols for pthreads" >&5
15598 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15599
15600 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15601 if test "${enable_weak_symbols+set}" = set; then
15602   enableval="$enable_weak_symbols"
15603   use_weak_symbols=$enableval
15604 else
15605   use_weak_symbols=no
15606 fi;
15607         echo "$as_me:15607: result: $use_weak_symbols" >&5
15608 echo "${ECHO_T}$use_weak_symbols" >&6
15609         if test "x$use_weak_symbols" = xyes ; then
15610
15611 echo "$as_me:15611: checking if $CC supports weak symbols" >&5
15612 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15613 if test "${cf_cv_weak_symbols+set}" = set; then
15614   echo $ECHO_N "(cached) $ECHO_C" >&6
15615 else
15616
15617 cat >"conftest.$ac_ext" <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620
15621 #include <stdio.h>
15622 int
15623 main (void)
15624 {
15625
15626 #if defined(__GNUC__)
15627 #  if defined __USE_ISOC99
15628 #    define _cat_pragma(exp)    _Pragma(#exp)
15629 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15630 #  else
15631 #    define _weak_pragma(exp)
15632 #  endif
15633 #  define _declare(name)        __extension__ extern __typeof__(name) name
15634 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15635 #endif
15636
15637 weak_symbol(fopen);
15638
15639   ;
15640   return 0;
15641 }
15642 _ACEOF
15643 rm -f "conftest.$ac_objext"
15644 if { (eval echo "$as_me:15644: \"$ac_compile\"") >&5
15645   (eval $ac_compile) 2>&5
15646   ac_status=$?
15647   echo "$as_me:15647: \$? = $ac_status" >&5
15648   (exit "$ac_status"); } &&
15649          { ac_try='test -s "conftest.$ac_objext"'
15650   { (eval echo "$as_me:15650: \"$ac_try\"") >&5
15651   (eval $ac_try) 2>&5
15652   ac_status=$?
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit "$ac_status"); }; }; then
15655   cf_cv_weak_symbols=yes
15656 else
15657   echo "$as_me: failed program was:" >&5
15658 cat "conftest.$ac_ext" >&5
15659 cf_cv_weak_symbols=no
15660 fi
15661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15662
15663 fi
15664 echo "$as_me:15664: result: $cf_cv_weak_symbols" >&5
15665 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15666
15667         else
15668                 cf_cv_weak_symbols=no
15669         fi
15670
15671         if test "x$cf_cv_weak_symbols" = xyes ; then
15672
15673 cat >>confdefs.h <<\EOF
15674 #define USE_WEAK_SYMBOLS 1
15675 EOF
15676
15677         fi
15678 fi
15679
15680 PTHREAD=
15681 if test "x$with_pthread" = "xyes" ; then
15682
15683 cat >>confdefs.h <<\EOF
15684 #define USE_PTHREADS 1
15685 EOF
15686
15687         enable_reentrant=yes
15688         if test "x$cf_cv_weak_symbols" = xyes ; then
15689                 PTHREAD=-lpthread
15690
15691 cf_add_libs="$PRIVATE_LIBS"
15692 # reverse order
15693 cf_add_0lib=
15694 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15695 # filter duplicates
15696 for cf_add_1lib in $cf_add_0lib; do
15697         for cf_add_2lib in $cf_add_libs; do
15698                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15699                         cf_add_1lib=
15700                         break
15701                 fi
15702         done
15703         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15704 done
15705 PRIVATE_LIBS="$cf_add_libs"
15706
15707         fi
15708 fi
15709
15710 # Reentrant code has to be opaque; there's little advantage to making ncurses
15711 # opaque outside of that, so there is no --enable-opaque option.  We can use
15712 # this option without --with-pthreads, but this will be always set for
15713 # pthreads.
15714 echo "$as_me:15714: checking if you want reentrant code" >&5
15715 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15716
15717 # Check whether --enable-reentrant or --disable-reentrant was given.
15718 if test "${enable_reentrant+set}" = set; then
15719   enableval="$enable_reentrant"
15720   with_reentrant=$enableval
15721 else
15722   with_reentrant=no
15723 fi;
15724 echo "$as_me:15724: result: $with_reentrant" >&5
15725 echo "${ECHO_T}$with_reentrant" >&6
15726 if test "x$with_reentrant" = xyes ; then
15727         cf_cv_enable_reentrant=1
15728         cf_cv_enable_opaque="NCURSES_INTERNALS"
15729         NCURSES_SIZE_T=int
15730         if test "x$cf_cv_weak_symbols" = xyes ; then
15731
15732 # remove pthread library from $LIBS
15733 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15734
15735 cf_add_libs="$TEST_LIBS"
15736 # reverse order
15737 cf_add_0lib=
15738 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15739 # filter duplicates
15740 for cf_add_1lib in $cf_add_0lib; do
15741         for cf_add_2lib in $cf_add_libs; do
15742                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15743                         cf_add_1lib=
15744                         break
15745                 fi
15746         done
15747         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15748 done
15749 TEST_LIBS="$cf_add_libs"
15750
15751 cf_add_libs="$TEST_LIBS2"
15752 # reverse order
15753 cf_add_0lib=
15754 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15755 # filter duplicates
15756 for cf_add_1lib in $cf_add_0lib; do
15757         for cf_add_2lib in $cf_add_libs; do
15758                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15759                         cf_add_1lib=
15760                         break
15761                 fi
15762         done
15763         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15764 done
15765 TEST_LIBS2="$cf_add_libs"
15766
15767 cf_add_libs="$PRIVATE_LIBS"
15768 # reverse order
15769 cf_add_0lib=
15770 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15771 # filter duplicates
15772 for cf_add_1lib in $cf_add_0lib; do
15773         for cf_add_2lib in $cf_add_libs; do
15774                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15775                         cf_add_1lib=
15776                         break
15777                 fi
15778         done
15779         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15780 done
15781 PRIVATE_LIBS="$cf_add_libs"
15782
15783         else
15784                 # when not using weak symbols but with_reentrant,
15785                 # add 't' to the library suffix on all platforms
15786                 # except cygwin, where we only do that if ALSO
15787                 # compiling with full thread support.
15788                 case "$host" in
15789                 (*cygwin* | *msys*)
15790                         if test "$with_pthread" = "yes" ; then
15791                                 if test "x$disable_lib_suffixes" = "xno" ; then
15792                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15793                                 fi
15794                         fi ;;
15795                 (*)
15796                         if test "x$disable_lib_suffixes" = "xno" ; then
15797                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15798                         fi
15799                         ;;
15800                 esac
15801         fi
15802
15803 cat >>confdefs.h <<\EOF
15804 #define USE_REENTRANT 1
15805 EOF
15806
15807 if test "${with_abi_version+set}" != set; then
15808         case "$cf_cv_rel_version" in
15809         (5.*)
15810                 cf_cv_rel_version=6.0
15811                 cf_cv_abi_version=6
15812                 { echo "$as_me:15812: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15813 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15814                 ;;
15815         esac
15816 fi
15817
15818 else
15819         cf_cv_enable_reentrant=0
15820         cf_cv_enable_opaque="NCURSES_OPAQUE"
15821         NCURSES_SIZE_T=$cf_dft_ordinate_type
15822 fi
15823
15824 echo "$as_me:15824: checking if you want opaque curses-library structures" >&5
15825 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15826
15827 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15828 if test "${enable_opaque_curses+set}" = set; then
15829   enableval="$enable_opaque_curses"
15830   test "$enableval" != yes && enableval=no
15831         if test "$enableval" != "no" ; then
15832     enable_opaque_curses=yes
15833         else
15834
15835          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15836          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15837
15838         fi
15839 else
15840   enableval=no
15841
15842          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15843          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15844
15845 fi;
15846 echo "$as_me:15846: result: $enable_opaque_curses" >&5
15847 echo "${ECHO_T}$enable_opaque_curses" >&6
15848
15849 test "$cf_cv_enable_reentrant" = 1 && \
15850 test "$enable_opaque_curses" = no && \
15851 { { echo "$as_me:15851: error: reentrant configuration requires opaque library" >&5
15852 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15853    { (exit 1); exit 1; }; }
15854
15855 echo "$as_me:15855: checking if you want opaque form-library structures" >&5
15856 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15857
15858 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15859 if test "${enable_opaque_form+set}" = set; then
15860   enableval="$enable_opaque_form"
15861   enable_opaque_form=yes
15862 else
15863   enable_opaque_form=no
15864 fi;
15865 echo "$as_me:15865: result: $enable_opaque_form" >&5
15866 echo "${ECHO_T}$enable_opaque_form" >&6
15867
15868 echo "$as_me:15868: checking if you want opaque menu-library structures" >&5
15869 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15870
15871 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15872 if test "${enable_opaque_menu+set}" = set; then
15873   enableval="$enable_opaque_menu"
15874   enable_opaque_menu=yes
15875 else
15876   enable_opaque_menu=no
15877 fi;
15878 echo "$as_me:15878: result: $enable_opaque_menu" >&5
15879 echo "${ECHO_T}$enable_opaque_menu" >&6
15880
15881 echo "$as_me:15881: checking if you want opaque panel-library structures" >&5
15882 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15883
15884 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15885 if test "${enable_opaque_panel+set}" = set; then
15886   enableval="$enable_opaque_panel"
15887   enable_opaque_panel=yes
15888 else
15889   enable_opaque_panel=no
15890 fi;
15891 echo "$as_me:15891: result: $enable_opaque_panel" >&5
15892 echo "${ECHO_T}$enable_opaque_panel" >&6
15893
15894 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15895 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15896 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15897 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15898
15899 ### Allow using a different wrap-prefix
15900 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15901         echo "$as_me:15901: checking for prefix used to wrap public variables" >&5
15902 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15903
15904 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15905 if test "${with_wrap_prefix+set}" = set; then
15906   withval="$with_wrap_prefix"
15907   NCURSES_WRAP_PREFIX=$withval
15908 else
15909   NCURSES_WRAP_PREFIX=_nc_
15910 fi;
15911         echo "$as_me:15911: result: $NCURSES_WRAP_PREFIX" >&5
15912 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15913 else
15914         NCURSES_WRAP_PREFIX=_nc_
15915 fi
15916
15917 cat >>confdefs.h <<EOF
15918 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15919 EOF
15920
15921 ###############################################################################
15922 # These options are relatively safe to experiment with.
15923
15924 echo "$as_me:15924: checking if you want all development code" >&5
15925 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15926
15927 # Check whether --with-develop or --without-develop was given.
15928 if test "${with_develop+set}" = set; then
15929   withval="$with_develop"
15930   with_develop=$withval
15931 else
15932   with_develop=no
15933 fi;
15934 echo "$as_me:15934: result: $with_develop" >&5
15935 echo "${ECHO_T}$with_develop" >&6
15936
15937 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15938 echo "$as_me:15938: checking if you want hard-tabs code" >&5
15939 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15940
15941 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15942 if test "${enable_hard_tabs+set}" = set; then
15943   enableval="$enable_hard_tabs"
15944
15945 else
15946   enable_hard_tabs=$with_develop
15947 fi;
15948 echo "$as_me:15948: result: $enable_hard_tabs" >&5
15949 echo "${ECHO_T}$enable_hard_tabs" >&6
15950 test "x$enable_hard_tabs" = xyes &&
15951 cat >>confdefs.h <<\EOF
15952 #define USE_HARD_TABS 1
15953 EOF
15954
15955 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15956 echo "$as_me:15956: checking if you want limited support for xmc" >&5
15957 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15958
15959 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15960 if test "${enable_xmc_glitch+set}" = set; then
15961   enableval="$enable_xmc_glitch"
15962
15963 else
15964   enable_xmc_glitch=$with_develop
15965 fi;
15966 echo "$as_me:15966: result: $enable_xmc_glitch" >&5
15967 echo "${ECHO_T}$enable_xmc_glitch" >&6
15968 test "x$enable_xmc_glitch" = xyes &&
15969 cat >>confdefs.h <<\EOF
15970 #define USE_XMC_SUPPORT 1
15971 EOF
15972
15973 ###############################################################################
15974 # These are just experimental, probably should not be in a package:
15975
15976 echo "$as_me:15976: checking if you do not want to assume colors are white-on-black" >&5
15977 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15978
15979 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15980 if test "${enable_assumed_color+set}" = set; then
15981   enableval="$enable_assumed_color"
15982   with_assumed_color=$enableval
15983 else
15984   with_assumed_color=yes
15985 fi;
15986 echo "$as_me:15986: result: $with_assumed_color" >&5
15987 echo "${ECHO_T}$with_assumed_color" >&6
15988 test "x$with_assumed_color" = xyes &&
15989 cat >>confdefs.h <<\EOF
15990 #define USE_ASSUMED_COLOR 1
15991 EOF
15992
15993 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15994 echo "$as_me:15994: checking if you want hashmap scrolling-optimization code" >&5
15995 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15996
15997 # Check whether --enable-hashmap or --disable-hashmap was given.
15998 if test "${enable_hashmap+set}" = set; then
15999   enableval="$enable_hashmap"
16000   with_hashmap=$enableval
16001 else
16002   with_hashmap=yes
16003 fi;
16004 echo "$as_me:16004: result: $with_hashmap" >&5
16005 echo "${ECHO_T}$with_hashmap" >&6
16006 test "x$with_hashmap" = xyes &&
16007 cat >>confdefs.h <<\EOF
16008 #define USE_HASHMAP 1
16009 EOF
16010
16011 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16012 echo "$as_me:16012: checking if you want colorfgbg code" >&5
16013 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16014
16015 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16016 if test "${enable_colorfgbg+set}" = set; then
16017   enableval="$enable_colorfgbg"
16018   with_colorfgbg=$enableval
16019 else
16020   with_colorfgbg=no
16021 fi;
16022 echo "$as_me:16022: result: $with_colorfgbg" >&5
16023 echo "${ECHO_T}$with_colorfgbg" >&6
16024 test "x$with_colorfgbg" = xyes &&
16025 cat >>confdefs.h <<\EOF
16026 #define USE_COLORFGBG 1
16027 EOF
16028
16029 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16030 echo "$as_me:16030: checking if you want to use gcc -fvisibility option" >&5
16031 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16032
16033 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16034 if test "${enable_fvisibility+set}" = set; then
16035   enableval="$enable_fvisibility"
16036   cf_with_fvisibility=$enableval
16037 else
16038   cf_with_fvisibility=no
16039 fi;
16040 echo "$as_me:16040: result: $cf_with_fvisibility" >&5
16041 echo "${ECHO_T}$cf_with_fvisibility" >&6
16042
16043 NCURSES_IMPEXP=
16044 NCURSES_CXX_IMPEXP=
16045 if test "x$cf_with_fvisibility" = xyes; then
16046
16047 echo "$as_me:16047: checking if $CC -fvisibility=hidden option works" >&5
16048 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16049 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16050   echo $ECHO_N "(cached) $ECHO_C" >&6
16051 else
16052
16053     cf_save_cflags="$CFLAGS"
16054     CFLAGS="$CFLAGS -fvisibility=hidden"
16055     cat >"conftest.$ac_ext" <<_ACEOF
16056 #line 16056 "configure"
16057 #include "confdefs.h"
16058
16059 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16060
16061 int
16062 main (void)
16063 {
16064
16065         if (somefunc()) return 1;
16066
16067   ;
16068   return 0;
16069 }
16070 _ACEOF
16071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16072 if { (eval echo "$as_me:16072: \"$ac_link\"") >&5
16073   (eval $ac_link) 2>&5
16074   ac_status=$?
16075   echo "$as_me:16075: \$? = $ac_status" >&5
16076   (exit "$ac_status"); } &&
16077          { ac_try='test -s "conftest$ac_exeext"'
16078   { (eval echo "$as_me:16078: \"$ac_try\"") >&5
16079   (eval $ac_try) 2>&5
16080   ac_status=$?
16081   echo "$as_me:16081: \$? = $ac_status" >&5
16082   (exit "$ac_status"); }; }; then
16083   cf_cv_fvisibility_hidden=yes
16084 else
16085   echo "$as_me: failed program was:" >&5
16086 cat "conftest.$ac_ext" >&5
16087 cf_cv_fvisibility_hidden=no
16088 fi
16089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16090     CFLAGS=$cf_save_cflags
16091
16092 fi
16093 echo "$as_me:16093: result: $cf_cv_fvisibility_hidden" >&5
16094 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16095
16096         if test "x$cf_cv_fvisibility_hidden" = xyes
16097         then
16098
16099 cf_fix_cppflags=no
16100 cf_new_cflags=
16101 cf_new_cppflags=
16102 cf_new_extra_cppflags=
16103
16104 for cf_add_cflags in -fvisibility=hidden
16105 do
16106 case "$cf_fix_cppflags" in
16107 (no)
16108         case "$cf_add_cflags" in
16109         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16110                 case "$cf_add_cflags" in
16111                 (-D*)
16112                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16113
16114                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16115                                 && test -z "${cf_tst_cflags}" \
16116                                 && cf_fix_cppflags=yes
16117
16118                         if test "$cf_fix_cppflags" = yes ; then
16119
16120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16122
16123                                 continue
16124                         elif test "${cf_tst_cflags}" = "\"'" ; then
16125
16126         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16127         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16128
16129                                 continue
16130                         fi
16131                         ;;
16132                 esac
16133                 case "$CPPFLAGS" in
16134                 (*$cf_add_cflags)
16135                         ;;
16136                 (*)
16137                         case "$cf_add_cflags" in
16138                         (-D*)
16139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16140
16141 CPPFLAGS=`echo "$CPPFLAGS" | \
16142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16144
16145                                 ;;
16146                         esac
16147
16148         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16149         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16150
16151                         ;;
16152                 esac
16153                 ;;
16154         (*)
16155
16156         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16157         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16158
16159                 ;;
16160         esac
16161         ;;
16162 (yes)
16163
16164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16166
16167         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16168
16169         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16170                 && test -z "${cf_tst_cflags}" \
16171                 && cf_fix_cppflags=no
16172         ;;
16173 esac
16174 done
16175
16176 if test -n "$cf_new_cflags" ; then
16177
16178         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16179         CFLAGS="${CFLAGS}$cf_new_cflags"
16180
16181 fi
16182
16183 if test -n "$cf_new_cppflags" ; then
16184
16185         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16186         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16187
16188 fi
16189
16190 if test -n "$cf_new_extra_cppflags" ; then
16191
16192         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16193         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16194
16195 fi
16196
16197                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16198         fi
16199         if test -n "$CXX"
16200         then
16201                 ac_ext=cc
16202 ac_cpp='$CXXCPP $CPPFLAGS'
16203 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16204 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16205 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16206 ac_main_return="return"
16207
16208 echo "$as_me:16208: checking if $CXX -fvisibility=hidden option works" >&5
16209 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16210 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16211   echo $ECHO_N "(cached) $ECHO_C" >&6
16212 else
16213
16214     cf_save_cflags="$CXXFLAGS"
16215     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16216     cat >"conftest.$ac_ext" <<_ACEOF
16217 #line 16217 "configure"
16218 #include "confdefs.h"
16219
16220 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16221
16222 int
16223 main (void)
16224 {
16225
16226         if (somefunc()) return 1;
16227
16228   ;
16229   return 0;
16230 }
16231 _ACEOF
16232 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16233 if { (eval echo "$as_me:16233: \"$ac_link\"") >&5
16234   (eval $ac_link) 2>&5
16235   ac_status=$?
16236   echo "$as_me:16236: \$? = $ac_status" >&5
16237   (exit "$ac_status"); } &&
16238          { ac_try='test -s "conftest$ac_exeext"'
16239   { (eval echo "$as_me:16239: \"$ac_try\"") >&5
16240   (eval $ac_try) 2>&5
16241   ac_status=$?
16242   echo "$as_me:16242: \$? = $ac_status" >&5
16243   (exit "$ac_status"); }; }; then
16244   cf_cv_fvisibility_hidden2=yes
16245 else
16246   echo "$as_me: failed program was:" >&5
16247 cat "conftest.$ac_ext" >&5
16248 cf_cv_fvisibility_hidden2=no
16249 fi
16250 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16251     CXXFLAGS=$cf_save_cflags
16252
16253 fi
16254 echo "$as_me:16254: result: $cf_cv_fvisibility_hidden2" >&5
16255 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16256
16257                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16258                 then
16259
16260 cf_save_CXXFLAGS="$CFLAGS"
16261 CFLAGS="$CXXFLAGS"
16262
16263 cf_fix_cppflags=no
16264 cf_new_cflags=
16265 cf_new_cppflags=
16266 cf_new_extra_cppflags=
16267
16268 for cf_add_cflags in -fvisibility=hidden
16269 do
16270 case "$cf_fix_cppflags" in
16271 (no)
16272         case "$cf_add_cflags" in
16273         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16274                 case "$cf_add_cflags" in
16275                 (-D*)
16276                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16277
16278                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16279                                 && test -z "${cf_tst_cflags}" \
16280                                 && cf_fix_cppflags=yes
16281
16282                         if test "$cf_fix_cppflags" = yes ; then
16283
16284         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16285         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16286
16287                                 continue
16288                         elif test "${cf_tst_cflags}" = "\"'" ; then
16289
16290         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16291         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16292
16293                                 continue
16294                         fi
16295                         ;;
16296                 esac
16297                 case "$CPPFLAGS" in
16298                 (*$cf_add_cflags)
16299                         ;;
16300                 (*)
16301                         case "$cf_add_cflags" in
16302                         (-D*)
16303                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16304
16305 CPPFLAGS=`echo "$CPPFLAGS" | \
16306         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16307                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16308
16309                                 ;;
16310                         esac
16311
16312         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16313         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16314
16315                         ;;
16316                 esac
16317                 ;;
16318         (*)
16319
16320         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16321         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16322
16323                 ;;
16324         esac
16325         ;;
16326 (yes)
16327
16328         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16329         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16330
16331         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16332
16333         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16334                 && test -z "${cf_tst_cflags}" \
16335                 && cf_fix_cppflags=no
16336         ;;
16337 esac
16338 done
16339
16340 if test -n "$cf_new_cflags" ; then
16341
16342         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16343         CFLAGS="${CFLAGS}$cf_new_cflags"
16344
16345 fi
16346
16347 if test -n "$cf_new_cppflags" ; then
16348
16349         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16350         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16351
16352 fi
16353
16354 if test -n "$cf_new_extra_cppflags" ; then
16355
16356         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16357         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16358
16359 fi
16360
16361 CXXFLAGS="$CFLAGS"
16362 CFLAGS="$cf_save_CXXFLAGS"
16363
16364                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16365                 fi
16366                 ac_ext=c
16367 ac_cpp='$CPP $CPPFLAGS'
16368 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16369 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16371 ac_main_return="return"
16372
16373         fi
16374 fi
16375
16376 ###   use option --enable-interop to turn on use of bindings used for interop
16377 echo "$as_me:16377: checking if you want interop bindings" >&5
16378 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16379
16380 # Check whether --enable-interop or --disable-interop was given.
16381 if test "${enable_interop+set}" = set; then
16382   enableval="$enable_interop"
16383   with_exp_interop=$enableval
16384 else
16385   with_exp_interop=$cf_dft_interop
16386 fi;
16387 echo "$as_me:16387: result: $with_exp_interop" >&5
16388 echo "${ECHO_T}$with_exp_interop" >&6
16389
16390 NCURSES_INTEROP_FUNCS=0
16391 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16392
16393 echo "$as_me:16393: checking if you want experimental safe-sprintf code" >&5
16394 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16395
16396 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16397 if test "${enable_safe_sprintf+set}" = set; then
16398   enableval="$enable_safe_sprintf"
16399   with_safe_sprintf=$enableval
16400 else
16401   with_safe_sprintf=no
16402 fi;
16403 echo "$as_me:16403: result: $with_safe_sprintf" >&5
16404 echo "${ECHO_T}$with_safe_sprintf" >&6
16405
16406 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16407 # when hashmap is used scroll hints are useless
16408 if test "$with_hashmap" = no ; then
16409 echo "$as_me:16409: checking if you want to experiment without scrolling-hints code" >&5
16410 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16411
16412 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16413 if test "${enable_scroll_hints+set}" = set; then
16414   enableval="$enable_scroll_hints"
16415   with_scroll_hints=$enableval
16416 else
16417   with_scroll_hints=yes
16418 fi;
16419 echo "$as_me:16419: result: $with_scroll_hints" >&5
16420 echo "${ECHO_T}$with_scroll_hints" >&6
16421 test "x$with_scroll_hints" = xyes &&
16422 cat >>confdefs.h <<\EOF
16423 #define USE_SCROLL_HINTS 1
16424 EOF
16425
16426 fi
16427
16428 echo "$as_me:16428: checking if you want wgetch-events code" >&5
16429 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16430
16431 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16432 if test "${enable_wgetch_events+set}" = set; then
16433   enableval="$enable_wgetch_events"
16434   with_wgetch_events=$enableval
16435 else
16436   with_wgetch_events=no
16437 fi;
16438 echo "$as_me:16438: result: $with_wgetch_events" >&5
16439 echo "${ECHO_T}$with_wgetch_events" >&6
16440 if test "x$with_wgetch_events" = xyes ; then
16441
16442 cat >>confdefs.h <<\EOF
16443 #define NCURSES_WGETCH_EVENTS 1
16444 EOF
16445
16446         NCURSES_WGETCH_EVENTS=1
16447 else
16448         NCURSES_WGETCH_EVENTS=0
16449 fi
16450
16451 case "$cf_cv_system_name" in
16452 (*mingw32*|*mingw64*|*-msvc*)
16453         echo "$as_me:16453: checking if you want experimental-Windows driver" >&5
16454 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16455
16456 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16457 if test "${enable_exp_win32+set}" = set; then
16458   enableval="$enable_exp_win32"
16459   with_exp_win32=$enableval
16460 else
16461   with_exp_win32=no
16462 fi;
16463         echo "$as_me:16463: result: $with_exp_win32" >&5
16464 echo "${ECHO_T}$with_exp_win32" >&6
16465         if test "x$with_exp_win32" = xyes
16466         then
16467
16468 cat >>confdefs.h <<\EOF
16469 #define EXP_WIN32_DRIVER 1
16470 EOF
16471
16472                 EXP_WIN32_DRIVER=1
16473                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16474         else
16475                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16476                 EXP_WIN32_DRIVER=0
16477         fi
16478         ;;
16479 (*)
16480         EXP_WIN32_DRIVER=0
16481         INTERNALS_HDR=
16482         ;;
16483 esac
16484
16485 ###############################################################################
16486
16487 ###     use option --disable-echo to suppress full display compiling commands
16488
16489 echo "$as_me:16489: checking if you want to see long compiling messages" >&5
16490 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16491
16492 # Check whether --enable-echo or --disable-echo was given.
16493 if test "${enable_echo+set}" = set; then
16494   enableval="$enable_echo"
16495   test "$enableval" != no && enableval=yes
16496         if test "$enableval" != "yes" ; then
16497
16498         ECHO_LT='--silent'
16499         ECHO_LD='@echo linking $@;'
16500         RULE_CC='@echo compiling $<'
16501         SHOW_CC='@echo compiling $@'
16502         ECHO_CC='@'
16503
16504         else
16505
16506         ECHO_LT=''
16507         ECHO_LD=''
16508         RULE_CC=''
16509         SHOW_CC=''
16510         ECHO_CC=''
16511
16512         fi
16513 else
16514   enableval=yes
16515
16516         ECHO_LT=''
16517         ECHO_LD=''
16518         RULE_CC=''
16519         SHOW_CC=''
16520         ECHO_CC=''
16521
16522 fi;
16523 echo "$as_me:16523: result: $enableval" >&5
16524 echo "${ECHO_T}$enableval" >&6
16525
16526 if test "x$enable_echo" = xyes; then
16527         ECHO_LINK=
16528 else
16529         ECHO_LINK='@ echo linking $@ ... ;'
16530         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16531         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16532 fi
16533
16534 # --disable-stripping is used for debugging
16535
16536 echo "$as_me:16536: checking if you want to install stripped executables" >&5
16537 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16538
16539 # Check whether --enable-stripping or --disable-stripping was given.
16540 if test "${enable_stripping+set}" = set; then
16541   enableval="$enable_stripping"
16542   test "$enableval" != no && enableval=yes
16543         if test "$enableval" != "yes" ; then
16544     enable_stripping=no
16545         else
16546                 enable_stripping=yes
16547         fi
16548 else
16549   enableval=yes
16550         enable_stripping=yes
16551
16552 fi;
16553 echo "$as_me:16553: result: $enable_stripping" >&5
16554 echo "${ECHO_T}$enable_stripping" >&6
16555
16556 if test "$enable_stripping" = yes
16557 then
16558         INSTALL_OPT_S="-s"
16559 else
16560         INSTALL_OPT_S=
16561 fi
16562
16563 : "${INSTALL:=install}"
16564 echo "$as_me:16564: checking if install accepts -p option" >&5
16565 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16566 if test "${cf_cv_install_p+set}" = set; then
16567   echo $ECHO_N "(cached) $ECHO_C" >&6
16568 else
16569
16570         rm -rf ./conftest*
16571         date >conftest.in
16572         mkdir conftest.out
16573         sleep 3
16574         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16575         then
16576                 if test -f conftest.out/conftest.in
16577                 then
16578                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16579                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16580                         if test -s conftest.err
16581                         then
16582                                 cf_cv_install_p=no
16583                         else
16584                                 cf_cv_install_p=yes
16585                         fi
16586                 else
16587                         cf_cv_install_p=no
16588                 fi
16589         else
16590                 cf_cv_install_p=no
16591         fi
16592         rm -rf ./conftest*
16593
16594 fi
16595 echo "$as_me:16595: result: $cf_cv_install_p" >&5
16596 echo "${ECHO_T}$cf_cv_install_p" >&6
16597
16598 echo "$as_me:16598: checking if install needs to be told about ownership" >&5
16599 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16600 case `$ac_config_guess` in
16601 (*minix)
16602         with_install_o=yes
16603         ;;
16604 (*)
16605         with_install_o=no
16606         ;;
16607 esac
16608
16609 echo "$as_me:16609: result: $with_install_o" >&5
16610 echo "${ECHO_T}$with_install_o" >&6
16611 if test "x$with_install_o" = xyes
16612 then
16613         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'`"
16614 else
16615         INSTALL_OPT_O=
16616 fi
16617
16618 # If we're avoiding relinking of shared libraries during install, that is to
16619 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16620 # the install program has "-p" (for preserving timestamps).
16621 cf_cv_do_reranlib=yes
16622 if test "x$cf_cv_install_p" = xyes
16623 then
16624         if test "x$cf_cv_do_relink" != xyes
16625         then
16626                 cf_cv_do_reranlib=no
16627                 INSTALL_OPT_P="-p"
16628                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16629         fi
16630 fi
16631
16632 ###     use option --enable-warnings to turn on all gcc warnings
16633
16634 echo "$as_me:16634: checking if you want to use C11 _Noreturn feature" >&5
16635 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16636
16637 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16638 if test "${enable_stdnoreturn+set}" = set; then
16639   enableval="$enable_stdnoreturn"
16640   test "$enableval" != yes && enableval=no
16641         if test "$enableval" != "no" ; then
16642     enable_stdnoreturn=yes
16643         else
16644                 enable_stdnoreturn=no
16645         fi
16646 else
16647   enableval=no
16648         enable_stdnoreturn=no
16649
16650 fi;
16651 echo "$as_me:16651: result: $enable_stdnoreturn" >&5
16652 echo "${ECHO_T}$enable_stdnoreturn" >&6
16653
16654 if test $enable_stdnoreturn = yes; then
16655 echo "$as_me:16655: checking for C11 _Noreturn feature" >&5
16656 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16657 if test "${cf_cv_c11_noreturn+set}" = set; then
16658   echo $ECHO_N "(cached) $ECHO_C" >&6
16659 else
16660   cat >"conftest.$ac_ext" <<_ACEOF
16661 #line 16661 "configure"
16662 #include "confdefs.h"
16663
16664 #include <stdio.h>
16665 #include <stdlib.h>
16666 #include <stdnoreturn.h>
16667 static _Noreturn void giveup(void) { exit(0); }
16668
16669 int
16670 main (void)
16671 {
16672 if (feof(stdin)) giveup()
16673   ;
16674   return 0;
16675 }
16676 _ACEOF
16677 rm -f "conftest.$ac_objext"
16678 if { (eval echo "$as_me:16678: \"$ac_compile\"") >&5
16679   (eval $ac_compile) 2>&5
16680   ac_status=$?
16681   echo "$as_me:16681: \$? = $ac_status" >&5
16682   (exit "$ac_status"); } &&
16683          { ac_try='test -s "conftest.$ac_objext"'
16684   { (eval echo "$as_me:16684: \"$ac_try\"") >&5
16685   (eval $ac_try) 2>&5
16686   ac_status=$?
16687   echo "$as_me:16687: \$? = $ac_status" >&5
16688   (exit "$ac_status"); }; }; then
16689   cf_cv_c11_noreturn=yes
16690 else
16691   echo "$as_me: failed program was:" >&5
16692 cat "conftest.$ac_ext" >&5
16693 cf_cv_c11_noreturn=no
16694 fi
16695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16696
16697 fi
16698 echo "$as_me:16698: result: $cf_cv_c11_noreturn" >&5
16699 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16700 else
16701         cf_cv_c11_noreturn=no,
16702 fi
16703
16704 if test "$cf_cv_c11_noreturn" = yes; then
16705
16706 cat >>confdefs.h <<\EOF
16707 #define HAVE_STDNORETURN_H 1
16708 EOF
16709
16710 cat >>confdefs.h <<EOF
16711 #define STDC_NORETURN _Noreturn
16712 EOF
16713
16714         HAVE_STDNORETURN_H=1
16715 else
16716         HAVE_STDNORETURN_H=0
16717 fi
16718
16719 if test "$GCC" = yes || test "$GXX" = yes
16720 then
16721
16722 if test "$GCC" = yes || test "$GXX" = yes
16723 then
16724         case $CFLAGS in
16725         (*-Werror=*)
16726                 cf_temp_flags=
16727                 for cf_temp_scan in $CFLAGS
16728                 do
16729                         case "x$cf_temp_scan" in
16730                         (x-Werror=format*)
16731
16732         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16733         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16734
16735                                 ;;
16736                         (x-Werror=*)
16737
16738         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16739         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16740
16741                                 ;;
16742                         (*)
16743
16744         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16745         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16746
16747                                 ;;
16748                         esac
16749                 done
16750                 if test "x$CFLAGS" != "x$cf_temp_flags"
16751                 then
16752                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16753
16754 echo "${as_me:-configure}:16754: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16755
16756                         CFLAGS="$cf_temp_flags"
16757                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16758
16759 echo "${as_me:-configure}:16759: testing ... fixed $CFLAGS ..." 1>&5
16760
16761                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16762
16763 echo "${as_me:-configure}:16763: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16764
16765                 fi
16766                 ;;
16767         esac
16768 fi
16769
16770 if test "$GCC" = yes || test "$GXX" = yes
16771 then
16772         case $CPPFLAGS in
16773         (*-Werror=*)
16774                 cf_temp_flags=
16775                 for cf_temp_scan in $CPPFLAGS
16776                 do
16777                         case "x$cf_temp_scan" in
16778                         (x-Werror=format*)
16779
16780         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16781         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16782
16783                                 ;;
16784                         (x-Werror=*)
16785
16786         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16787         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16788
16789                                 ;;
16790                         (*)
16791
16792         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16793         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16794
16795                                 ;;
16796                         esac
16797                 done
16798                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16799                 then
16800                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16801
16802 echo "${as_me:-configure}:16802: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16803
16804                         CPPFLAGS="$cf_temp_flags"
16805                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16806
16807 echo "${as_me:-configure}:16807: testing ... fixed $CPPFLAGS ..." 1>&5
16808
16809                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16810
16811 echo "${as_me:-configure}:16811: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16812
16813                 fi
16814                 ;;
16815         esac
16816 fi
16817
16818 if test "$GCC" = yes || test "$GXX" = yes
16819 then
16820         case $LDFLAGS in
16821         (*-Werror=*)
16822                 cf_temp_flags=
16823                 for cf_temp_scan in $LDFLAGS
16824                 do
16825                         case "x$cf_temp_scan" in
16826                         (x-Werror=format*)
16827
16828         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16829         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16830
16831                                 ;;
16832                         (x-Werror=*)
16833
16834         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16835         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16836
16837                                 ;;
16838                         (*)
16839
16840         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16841         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16842
16843                                 ;;
16844                         esac
16845                 done
16846                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16847                 then
16848                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16849
16850 echo "${as_me:-configure}:16850: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16851
16852                         LDFLAGS="$cf_temp_flags"
16853                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16854
16855 echo "${as_me:-configure}:16855: testing ... fixed $LDFLAGS ..." 1>&5
16856
16857                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16858
16859 echo "${as_me:-configure}:16859: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16860
16861                 fi
16862                 ;;
16863         esac
16864 fi
16865
16866 echo "$as_me:16866: checking if you want to turn on gcc warnings" >&5
16867 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16868
16869 # Check whether --enable-warnings or --disable-warnings was given.
16870 if test "${enable_warnings+set}" = set; then
16871   enableval="$enable_warnings"
16872   test "$enableval" != yes && enableval=no
16873         if test "$enableval" != "no" ; then
16874     enable_warnings=yes
16875         else
16876                 enable_warnings=no
16877         fi
16878 else
16879   enableval=no
16880         enable_warnings=no
16881
16882 fi;
16883 echo "$as_me:16883: result: $enable_warnings" >&5
16884 echo "${ECHO_T}$enable_warnings" >&6
16885 if test "$enable_warnings" = "yes"
16886 then
16887
16888 if test "x$have_x" = xyes; then
16889
16890 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16891 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16892 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16893 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16894 for cf_X_CFLAGS in $X_CFLAGS
16895 do
16896         case "x$cf_X_CFLAGS" in
16897         x-[IUD]*)
16898                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16899                 ;;
16900         *)
16901                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16902                 ;;
16903         esac
16904 done
16905
16906 cat >"conftest.$ac_ext" <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 #include <stdlib.h>
16911 #include <X11/Intrinsic.h>
16912
16913 int
16914 main (void)
16915 {
16916 String foo = malloc(1); free((void*)foo)
16917   ;
16918   return 0;
16919 }
16920 _ACEOF
16921 rm -f "conftest.$ac_objext"
16922 if { (eval echo "$as_me:16922: \"$ac_compile\"") >&5
16923   (eval $ac_compile) 2>&5
16924   ac_status=$?
16925   echo "$as_me:16925: \$? = $ac_status" >&5
16926   (exit "$ac_status"); } &&
16927          { ac_try='test -s "conftest.$ac_objext"'
16928   { (eval echo "$as_me:16928: \"$ac_try\"") >&5
16929   (eval $ac_try) 2>&5
16930   ac_status=$?
16931   echo "$as_me:16931: \$? = $ac_status" >&5
16932   (exit "$ac_status"); }; }; then
16933
16934 echo "$as_me:16934: checking for X11/Xt const-feature" >&5
16935 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16936 if test "${cf_cv_const_x_string+set}" = set; then
16937   echo $ECHO_N "(cached) $ECHO_C" >&6
16938 else
16939
16940         cat >"conftest.$ac_ext" <<_ACEOF
16941 #line 16941 "configure"
16942 #include "confdefs.h"
16943
16944 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16945 #undef  XTSTRINGDEFINES /* X11R5 and later */
16946 #include <stdlib.h>
16947 #include <X11/Intrinsic.h>
16948
16949 int
16950 main (void)
16951 {
16952 String foo = malloc(1); *foo = 0
16953   ;
16954   return 0;
16955 }
16956 _ACEOF
16957 rm -f "conftest.$ac_objext"
16958 if { (eval echo "$as_me:16958: \"$ac_compile\"") >&5
16959   (eval $ac_compile) 2>&5
16960   ac_status=$?
16961   echo "$as_me:16961: \$? = $ac_status" >&5
16962   (exit "$ac_status"); } &&
16963          { ac_try='test -s "conftest.$ac_objext"'
16964   { (eval echo "$as_me:16964: \"$ac_try\"") >&5
16965   (eval $ac_try) 2>&5
16966   ac_status=$?
16967   echo "$as_me:16967: \$? = $ac_status" >&5
16968   (exit "$ac_status"); }; }; then
16969
16970                         cf_cv_const_x_string=no
16971
16972 else
16973   echo "$as_me: failed program was:" >&5
16974 cat "conftest.$ac_ext" >&5
16975
16976                         cf_cv_const_x_string=yes
16977
16978 fi
16979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16980
16981 fi
16982 echo "$as_me:16982: result: $cf_cv_const_x_string" >&5
16983 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16984
16985 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16986 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16987 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16988
16989 case "$cf_cv_const_x_string" in
16990 (no)
16991
16992         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16993         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16994
16995         ;;
16996 (*)
16997
16998         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16999         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17000
17001         ;;
17002 esac
17003
17004 else
17005   echo "$as_me: failed program was:" >&5
17006 cat "conftest.$ac_ext" >&5
17007 fi
17008 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17009  fi
17010 cat > "conftest.$ac_ext" <<EOF
17011 #line 17011 "${as_me:-configure}"
17012 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17013 EOF
17014 if test "$INTEL_COMPILER" = yes
17015 then
17016 # The "-wdXXX" options suppress warnings:
17017 # remark #1419: external declaration in primary source file
17018 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17019 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17020 # remark #193: zero used for undefined preprocessing identifier
17021 # remark #593: variable "curs_sb_left_arrow" was set but never used
17022 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17023 # remark #869: parameter "tw" was never referenced
17024 # remark #981: operands are evaluated in unspecified order
17025 # warning #279: controlling expression is constant
17026
17027         { echo "$as_me:17027: checking for $CC warning options..." >&5
17028 echo "$as_me: checking for $CC warning options..." >&6;}
17029         cf_save_CFLAGS="$CFLAGS"
17030         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17031         for cf_opt in \
17032                 wd1419 \
17033                 wd1683 \
17034                 wd1684 \
17035                 wd193 \
17036                 wd593 \
17037                 wd279 \
17038                 wd810 \
17039                 wd869 \
17040                 wd981
17041         do
17042                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17043                 if { (eval echo "$as_me:17043: \"$ac_compile\"") >&5
17044   (eval $ac_compile) 2>&5
17045   ac_status=$?
17046   echo "$as_me:17046: \$? = $ac_status" >&5
17047   (exit "$ac_status"); }; then
17048                         test -n "$verbose" && echo "$as_me:17048: result: ... -$cf_opt" >&5
17049 echo "${ECHO_T}... -$cf_opt" >&6
17050                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17051                 fi
17052         done
17053         CFLAGS="$cf_save_CFLAGS"
17054 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17055 then
17056         { echo "$as_me:17056: checking for $CC warning options..." >&5
17057 echo "$as_me: checking for $CC warning options..." >&6;}
17058         cf_save_CFLAGS="$CFLAGS"
17059         cf_warn_CONST=""
17060         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17061         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17062         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17063         for cf_opt in W Wall \
17064                 Wbad-function-cast \
17065                 Wcast-align \
17066                 Wcast-qual \
17067                 Wdeclaration-after-statement \
17068                 Wextra \
17069                 Winline \
17070                 Wmissing-declarations \
17071                 Wmissing-prototypes \
17072                 Wnested-externs \
17073                 Wpointer-arith \
17074                 Wshadow \
17075                 Wstrict-prototypes \
17076                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17077         do
17078                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17079                 if { (eval echo "$as_me:17079: \"$ac_compile\"") >&5
17080   (eval $ac_compile) 2>&5
17081   ac_status=$?
17082   echo "$as_me:17082: \$? = $ac_status" >&5
17083   (exit "$ac_status"); }; then
17084                         test -n "$verbose" && echo "$as_me:17084: result: ... -$cf_opt" >&5
17085 echo "${ECHO_T}... -$cf_opt" >&6
17086                         case "$cf_opt" in
17087                         (Winline)
17088                                 case "$GCC_VERSION" in
17089                                 ([34].*)
17090                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17091
17092 echo "${as_me:-configure}:17092: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17093
17094                                         continue;;
17095                                 esac
17096                                 ;;
17097                         (Wpointer-arith)
17098                                 case "$GCC_VERSION" in
17099                                 ([12].*)
17100                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17101
17102 echo "${as_me:-configure}:17102: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17103
17104                                         continue;;
17105                                 esac
17106                                 ;;
17107                         esac
17108                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17109                 fi
17110         done
17111         CFLAGS="$cf_save_CFLAGS"
17112 fi
17113 rm -rf ./conftest*
17114
17115 fi
17116
17117 if test "$GCC" = yes || test "$GXX" = yes
17118 then
17119 cat > conftest.i <<EOF
17120 #ifndef GCC_PRINTF
17121 #define GCC_PRINTF 0
17122 #endif
17123 #ifndef GCC_SCANF
17124 #define GCC_SCANF 0
17125 #endif
17126 #ifndef GCC_NORETURN
17127 #define GCC_NORETURN /* nothing */
17128 #endif
17129 #ifndef GCC_UNUSED
17130 #define GCC_UNUSED /* nothing */
17131 #endif
17132 EOF
17133 if test "$GCC" = yes
17134 then
17135         { echo "$as_me:17135: checking for $CC __attribute__ directives..." >&5
17136 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17137 cat > "conftest.$ac_ext" <<EOF
17138 #line 17138 "${as_me:-configure}"
17139 #include "confdefs.h"
17140 #include "conftest.h"
17141 #include "conftest.i"
17142 #if     GCC_PRINTF
17143 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17144 #else
17145 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17146 #endif
17147 #if     GCC_SCANF
17148 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17149 #else
17150 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17151 #endif
17152 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17153 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17154 extern GCC_NORETURN void foo(void);
17155 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17156 EOF
17157         cf_printf_attribute=no
17158         cf_scanf_attribute=no
17159         for cf_attribute in scanf printf unused noreturn
17160         do
17161
17162 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17163
17164                 cf_directive="__attribute__(($cf_attribute))"
17165                 echo "checking for $CC $cf_directive" 1>&5
17166
17167                 case "$cf_attribute" in
17168                 (printf)
17169                         cf_printf_attribute=yes
17170                         cat >conftest.h <<EOF
17171 #define GCC_$cf_ATTRIBUTE 1
17172 EOF
17173                         ;;
17174                 (scanf)
17175                         cf_scanf_attribute=yes
17176                         cat >conftest.h <<EOF
17177 #define GCC_$cf_ATTRIBUTE 1
17178 EOF
17179                         ;;
17180                 (*)
17181                         cat >conftest.h <<EOF
17182 #define GCC_$cf_ATTRIBUTE $cf_directive
17183 EOF
17184                         ;;
17185                 esac
17186
17187                 if { (eval echo "$as_me:17187: \"$ac_compile\"") >&5
17188   (eval $ac_compile) 2>&5
17189   ac_status=$?
17190   echo "$as_me:17190: \$? = $ac_status" >&5
17191   (exit "$ac_status"); }; then
17192                         test -n "$verbose" && echo "$as_me:17192: result: ... $cf_attribute" >&5
17193 echo "${ECHO_T}... $cf_attribute" >&6
17194                         cat conftest.h >>confdefs.h
17195                         case "$cf_attribute" in
17196                         (noreturn)
17197
17198 cat >>confdefs.h <<EOF
17199 #define GCC_NORETURN $cf_directive
17200 EOF
17201
17202                                 ;;
17203                         (printf)
17204                                 cf_value='/* nothing */'
17205                                 if test "$cf_printf_attribute" != no ; then
17206                                         cf_value='__attribute__((format(printf,fmt,var)))'
17207
17208 cat >>confdefs.h <<\EOF
17209 #define GCC_PRINTF 1
17210 EOF
17211
17212                                 fi
17213
17214 cat >>confdefs.h <<EOF
17215 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17216 EOF
17217
17218                                 ;;
17219                         (scanf)
17220                                 cf_value='/* nothing */'
17221                                 if test "$cf_scanf_attribute" != no ; then
17222                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17223
17224 cat >>confdefs.h <<\EOF
17225 #define GCC_SCANF 1
17226 EOF
17227
17228                                 fi
17229
17230 cat >>confdefs.h <<EOF
17231 #define GCC_SCANFLIKE(fmt,var) $cf_value
17232 EOF
17233
17234                                 ;;
17235                         (unused)
17236
17237 cat >>confdefs.h <<EOF
17238 #define GCC_UNUSED $cf_directive
17239 EOF
17240
17241                                 ;;
17242                         esac
17243                 fi
17244         done
17245 else
17246         ${FGREP-fgrep} define conftest.i >>confdefs.h
17247 fi
17248 rm -rf ./conftest*
17249 fi
17250
17251 fi
17252
17253 if test "x$enable_warnings" = "xyes"; then
17254
17255         ADAFLAGS="$ADAFLAGS -gnatg"
17256
17257         if test "x$cf_with_cxx" = xyes ; then
17258
17259 INTEL_CPLUSPLUS=no
17260
17261 if test "$GCC" = yes ; then
17262         case "$host_os" in
17263         (linux*|gnu*)
17264                 echo "$as_me:17264: checking if this is really Intel C++ compiler" >&5
17265 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17266                 cf_save_CFLAGS="$CXXFLAGS"
17267                 CXXFLAGS="$CXXFLAGS -no-gcc"
17268                 cat >"conftest.$ac_ext" <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17271
17272 int
17273 main (void)
17274 {
17275
17276 #ifdef __INTEL_COMPILER
17277 #else
17278 make an error
17279 #endif
17280
17281   ;
17282   return 0;
17283 }
17284 _ACEOF
17285 rm -f "conftest.$ac_objext"
17286 if { (eval echo "$as_me:17286: \"$ac_compile\"") >&5
17287   (eval $ac_compile) 2>&5
17288   ac_status=$?
17289   echo "$as_me:17289: \$? = $ac_status" >&5
17290   (exit "$ac_status"); } &&
17291          { ac_try='test -s "conftest.$ac_objext"'
17292   { (eval echo "$as_me:17292: \"$ac_try\"") >&5
17293   (eval $ac_try) 2>&5
17294   ac_status=$?
17295   echo "$as_me:17295: \$? = $ac_status" >&5
17296   (exit "$ac_status"); }; }; then
17297   INTEL_CPLUSPLUS=yes
17298 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17299
17300 else
17301   echo "$as_me: failed program was:" >&5
17302 cat "conftest.$ac_ext" >&5
17303 fi
17304 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17305                 CXXFLAGS="$cf_save_CFLAGS"
17306                 echo "$as_me:17306: result: $INTEL_CPLUSPLUS" >&5
17307 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17308                 ;;
17309         esac
17310 fi
17311
17312 CLANG_CPLUSPLUS=no
17313
17314 if test "$GCC" = yes ; then
17315         echo "$as_me:17315: checking if this is really Clang C++ compiler" >&5
17316 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17317         cf_save_CFLAGS="$CXXFLAGS"
17318         cat >"conftest.$ac_ext" <<_ACEOF
17319 #line 17319 "configure"
17320 #include "confdefs.h"
17321
17322 int
17323 main (void)
17324 {
17325
17326 #ifdef __clang__
17327 #else
17328 make an error
17329 #endif
17330
17331   ;
17332   return 0;
17333 }
17334 _ACEOF
17335 rm -f "conftest.$ac_objext"
17336 if { (eval echo "$as_me:17336: \"$ac_compile\"") >&5
17337   (eval $ac_compile) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit "$ac_status"); } &&
17341          { ac_try='test -s "conftest.$ac_objext"'
17342   { (eval echo "$as_me:17342: \"$ac_try\"") >&5
17343   (eval $ac_try) 2>&5
17344   ac_status=$?
17345   echo "$as_me:17345: \$? = $ac_status" >&5
17346   (exit "$ac_status"); }; }; then
17347   CLANG_CPLUSPLUS=yes
17348
17349 else
17350   echo "$as_me: failed program was:" >&5
17351 cat "conftest.$ac_ext" >&5
17352 fi
17353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17354         CXXFLAGS="$cf_save_CFLAGS"
17355         echo "$as_me:17355: result: $CLANG_CPLUSPLUS" >&5
17356 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17357 fi
17358
17359 CLANG_VERSION=none
17360
17361 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17362         case "$CC" in
17363         (c[1-9][0-9]|*/c[1-9][0-9])
17364                 { echo "$as_me:17364: WARNING: replacing broken compiler alias $CC" >&5
17365 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17366                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17367                 CC=clang
17368                 ;;
17369         esac
17370
17371         echo "$as_me:17371: checking version of $CC" >&5
17372 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17373         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.].*//'`"
17374         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17375         echo "$as_me:17375: result: $CLANG_VERSION" >&5
17376 echo "${ECHO_T}$CLANG_VERSION" >&6
17377
17378         for cf_clang_opt in \
17379                 -Qunused-arguments \
17380                 -Wno-error=implicit-function-declaration
17381         do
17382                 echo "$as_me:17382: checking if option $cf_clang_opt works" >&5
17383 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17384                 cf_save_CFLAGS="$CFLAGS"
17385                 CFLAGS="$CFLAGS $cf_clang_opt"
17386                 cat >"conftest.$ac_ext" <<_ACEOF
17387 #line 17387 "configure"
17388 #include "confdefs.h"
17389
17390                         #include <stdio.h>
17391 int
17392 main (void)
17393 {
17394
17395                         printf("hello!\\n");
17396   ;
17397   return 0;
17398 }
17399 _ACEOF
17400 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17401 if { (eval echo "$as_me:17401: \"$ac_link\"") >&5
17402   (eval $ac_link) 2>&5
17403   ac_status=$?
17404   echo "$as_me:17404: \$? = $ac_status" >&5
17405   (exit "$ac_status"); } &&
17406          { ac_try='test -s "conftest$ac_exeext"'
17407   { (eval echo "$as_me:17407: \"$ac_try\"") >&5
17408   (eval $ac_try) 2>&5
17409   ac_status=$?
17410   echo "$as_me:17410: \$? = $ac_status" >&5
17411   (exit "$ac_status"); }; }; then
17412
17413                         cf_clang_optok=yes
17414 else
17415   echo "$as_me: failed program was:" >&5
17416 cat "conftest.$ac_ext" >&5
17417
17418                         cf_clang_optok=no
17419 fi
17420 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17421                 echo "$as_me:17421: result: $cf_clang_optok" >&5
17422 echo "${ECHO_T}$cf_clang_optok" >&6
17423                 CFLAGS="$cf_save_CFLAGS"
17424                 if test "$cf_clang_optok" = yes; then
17425                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17426
17427 echo "${as_me:-configure}:17427: testing adding option $cf_clang_opt ..." 1>&5
17428
17429         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17430         CFLAGS="${CFLAGS}$cf_clang_opt"
17431
17432                 fi
17433         done
17434 fi
17435
17436 ac_ext=cc
17437 ac_cpp='$CXXCPP $CPPFLAGS'
17438 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17439 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17440 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17441 ac_main_return="return"
17442
17443 cat > conftest.$ac_ext <<EOF
17444 #line 17444 "configure"
17445 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17446 EOF
17447
17448 if test "$INTEL_CPLUSPLUS" = yes
17449 then
17450 # The "-wdXXX" options suppress warnings:
17451 # remark #1419: external declaration in primary source file
17452 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17453 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17454 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17455 # remark #193: zero used for undefined preprocessing identifier
17456 # remark #593: variable "curs_sb_left_arrow" was set but never used
17457 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17458 # remark #869: parameter "tw" was never referenced
17459 # remark #981: operands are evaluated in unspecified order
17460 # warning #269: invalid format string conversion
17461
17462         { echo "$as_me:17462: checking for $CC warning options..." >&5
17463 echo "$as_me: checking for $CC warning options..." >&6;}
17464         cf_save_CXXFLAGS="$CXXFLAGS"
17465         EXTRA_CXXFLAGS="-Wall"
17466         for cf_opt in \
17467                 wd1419 \
17468                 wd1682 \
17469                 wd1683 \
17470                 wd1684 \
17471                 wd193 \
17472                 wd279 \
17473                 wd593 \
17474                 wd810 \
17475                 wd869 \
17476                 wd981
17477         do
17478                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17479                 if { (eval echo "$as_me:17479: \"$ac_compile\"") >&5
17480   (eval $ac_compile) 2>&5
17481   ac_status=$?
17482   echo "$as_me:17482: \$? = $ac_status" >&5
17483   (exit "$ac_status"); }; then
17484                         test -n "$verbose" && echo "$as_me:17484: result: ... -$cf_opt" >&5
17485 echo "${ECHO_T}... -$cf_opt" >&6
17486                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17487                 fi
17488         done
17489         CXXFLAGS="$cf_save_CXXFLAGS"
17490
17491 elif test "$GXX" = yes
17492 then
17493         { echo "$as_me:17493: checking for $CXX warning options..." >&5
17494 echo "$as_me: checking for $CXX warning options..." >&6;}
17495         cf_save_CXXFLAGS="$CXXFLAGS"
17496         EXTRA_CXXFLAGS="-W -Wall"
17497         cf_gxx_extra_warnings=""
17498         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17499         case "$GXX_VERSION" in
17500         ([1-2].*)
17501                 ;;
17502         (*)
17503                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17504                 ;;
17505         esac
17506         for cf_opt in \
17507                 Wabi \
17508                 fabi-version=0 \
17509                 Wextra \
17510                 Wignored-qualifiers \
17511                 Wlogical-op \
17512                 Woverloaded-virtual \
17513                 Wsign-promo \
17514                 Wsynth \
17515                 Wold-style-cast \
17516                 Wcast-align \
17517                 Wcast-qual \
17518                 Wpointer-arith \
17519                 Wshadow \
17520                 Wundef $cf_gxx_extra_warnings Wno-unused
17521         do
17522                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17523                 if { (eval echo "$as_me:17523: \"$ac_compile\"") >&5
17524   (eval $ac_compile) 2>&5
17525   ac_status=$?
17526   echo "$as_me:17526: \$? = $ac_status" >&5
17527   (exit "$ac_status"); }; then
17528                         test -n "$verbose" && echo "$as_me:17528: result: ... -$cf_opt" >&5
17529 echo "${ECHO_T}... -$cf_opt" >&6
17530                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17531                 else
17532                         test -n "$verbose" && echo "$as_me:17532: result: ... no -$cf_opt" >&5
17533 echo "${ECHO_T}... no -$cf_opt" >&6
17534                 fi
17535         done
17536         CXXFLAGS="$cf_save_CXXFLAGS"
17537 fi
17538
17539 rm -rf ./conftest*
17540 ac_ext=c
17541 ac_cpp='$CPP $CPPFLAGS'
17542 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17543 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17545 ac_main_return="return"
17546
17547         fi
17548 fi
17549
17550 echo "$as_me:17550: checking if you want to work around bogus compiler/loader warnings" >&5
17551 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17552
17553 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17554 if test "${enable_string_hacks+set}" = set; then
17555   enableval="$enable_string_hacks"
17556   enable_string_hacks=$enableval
17557 else
17558   enable_string_hacks=no
17559 fi;
17560 echo "$as_me:17560: result: $enable_string_hacks" >&5
17561 echo "${ECHO_T}$enable_string_hacks" >&6
17562
17563 if test "x$enable_string_hacks" = "xyes"; then
17564
17565 cat >>confdefs.h <<\EOF
17566 #define USE_STRING_HACKS 1
17567 EOF
17568
17569         { echo "$as_me:17569: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17570 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17571         echo "$as_me:17571: checking for strlcat" >&5
17572 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17573 if test "${ac_cv_func_strlcat+set}" = set; then
17574   echo $ECHO_N "(cached) $ECHO_C" >&6
17575 else
17576   cat >"conftest.$ac_ext" <<_ACEOF
17577 #line 17577 "configure"
17578 #include "confdefs.h"
17579 #define strlcat autoconf_temporary
17580 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17581 #undef strlcat
17582
17583 #ifdef __cplusplus
17584 extern "C"
17585 #endif
17586
17587 /* We use char because int might match the return type of a gcc2
17588    builtin and then its argument prototype would still apply.  */
17589 char strlcat (void);
17590
17591 int
17592 main (void)
17593 {
17594
17595 /* The GNU C library defines stubs for functions which it implements
17596     to always fail with ENOSYS.  Some functions are actually named
17597     something starting with __ and the normal name is an alias.  */
17598 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17599 #error found stub for strlcat
17600 #endif
17601
17602         return strlcat ();
17603   ;
17604   return 0;
17605 }
17606 _ACEOF
17607 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17608 if { (eval echo "$as_me:17608: \"$ac_link\"") >&5
17609   (eval $ac_link) 2>&5
17610   ac_status=$?
17611   echo "$as_me:17611: \$? = $ac_status" >&5
17612   (exit "$ac_status"); } &&
17613          { ac_try='test -s "conftest$ac_exeext"'
17614   { (eval echo "$as_me:17614: \"$ac_try\"") >&5
17615   (eval $ac_try) 2>&5
17616   ac_status=$?
17617   echo "$as_me:17617: \$? = $ac_status" >&5
17618   (exit "$ac_status"); }; }; then
17619   ac_cv_func_strlcat=yes
17620 else
17621   echo "$as_me: failed program was:" >&5
17622 cat "conftest.$ac_ext" >&5
17623 ac_cv_func_strlcat=no
17624 fi
17625 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17626 fi
17627 echo "$as_me:17627: result: $ac_cv_func_strlcat" >&5
17628 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17629 if test "$ac_cv_func_strlcat" = yes; then
17630
17631 cat >>confdefs.h <<\EOF
17632 #define HAVE_STRLCAT 1
17633 EOF
17634
17635 else
17636
17637                 echo "$as_me:17637: checking for strlcat in -lbsd" >&5
17638 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17639 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17640   echo $ECHO_N "(cached) $ECHO_C" >&6
17641 else
17642   ac_check_lib_save_LIBS=$LIBS
17643 LIBS="-lbsd  $LIBS"
17644 cat >"conftest.$ac_ext" <<_ACEOF
17645 #line 17645 "configure"
17646 #include "confdefs.h"
17647
17648 /* Override any gcc2 internal prototype to avoid an error.  */
17649 #ifdef __cplusplus
17650 extern "C"
17651 #endif
17652 /* We use char because int might match the return type of a gcc2
17653    builtin and then its argument prototype would still apply.  */
17654 char strlcat ();
17655 int
17656 main (void)
17657 {
17658 strlcat ();
17659   ;
17660   return 0;
17661 }
17662 _ACEOF
17663 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17664 if { (eval echo "$as_me:17664: \"$ac_link\"") >&5
17665   (eval $ac_link) 2>&5
17666   ac_status=$?
17667   echo "$as_me:17667: \$? = $ac_status" >&5
17668   (exit "$ac_status"); } &&
17669          { ac_try='test -s "conftest$ac_exeext"'
17670   { (eval echo "$as_me:17670: \"$ac_try\"") >&5
17671   (eval $ac_try) 2>&5
17672   ac_status=$?
17673   echo "$as_me:17673: \$? = $ac_status" >&5
17674   (exit "$ac_status"); }; }; then
17675   ac_cv_lib_bsd_strlcat=yes
17676 else
17677   echo "$as_me: failed program was:" >&5
17678 cat "conftest.$ac_ext" >&5
17679 ac_cv_lib_bsd_strlcat=no
17680 fi
17681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17682 LIBS=$ac_check_lib_save_LIBS
17683 fi
17684 echo "$as_me:17684: result: $ac_cv_lib_bsd_strlcat" >&5
17685 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17686 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17687
17688 cf_add_libs="$LIBS"
17689 # reverse order
17690 cf_add_0lib=
17691 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17692 # filter duplicates
17693 for cf_add_1lib in $cf_add_0lib; do
17694         for cf_add_2lib in $cf_add_libs; do
17695                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17696                         cf_add_1lib=
17697                         break
17698                 fi
17699         done
17700         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17701 done
17702 LIBS="$cf_add_libs"
17703
17704 for ac_header in bsd/string.h
17705 do
17706 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17707 echo "$as_me:17707: checking for $ac_header" >&5
17708 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17709 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   cat >"conftest.$ac_ext" <<_ACEOF
17713 #line 17713 "configure"
17714 #include "confdefs.h"
17715 #include <$ac_header>
17716 _ACEOF
17717 if { (eval echo "$as_me:17717: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17718   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17719   ac_status=$?
17720   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17721   rm -f conftest.er1
17722   cat conftest.err >&5
17723   echo "$as_me:17723: \$? = $ac_status" >&5
17724   (exit "$ac_status"); } >/dev/null; then
17725   if test -s conftest.err; then
17726     ac_cpp_err=$ac_c_preproc_warn_flag
17727   else
17728     ac_cpp_err=
17729   fi
17730 else
17731   ac_cpp_err=yes
17732 fi
17733 if test -z "$ac_cpp_err"; then
17734   eval "$as_ac_Header=yes"
17735 else
17736   echo "$as_me: failed program was:" >&5
17737   cat "conftest.$ac_ext" >&5
17738   eval "$as_ac_Header=no"
17739 fi
17740 rm -f conftest.err "conftest.$ac_ext"
17741 fi
17742 echo "$as_me:17742: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17743 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17744 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17745   cat >>confdefs.h <<EOF
17746 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17747 EOF
17748
17749 fi
17750 done
17751
17752 cat >>confdefs.h <<\EOF
17753 #define HAVE_STRLCAT 1
17754 EOF
17755
17756 fi
17757
17758 fi
17759
17760 for ac_func in strlcpy snprintf
17761 do
17762 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17763 echo "$as_me:17763: checking for $ac_func" >&5
17764 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17765 if eval "test \"\${$as_ac_var+set}\" = set"; then
17766   echo $ECHO_N "(cached) $ECHO_C" >&6
17767 else
17768   cat >"conftest.$ac_ext" <<_ACEOF
17769 #line 17769 "configure"
17770 #include "confdefs.h"
17771 #define $ac_func autoconf_temporary
17772 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17773 #undef $ac_func
17774
17775 #ifdef __cplusplus
17776 extern "C"
17777 #endif
17778
17779 /* We use char because int might match the return type of a gcc2
17780    builtin and then its argument prototype would still apply.  */
17781 char $ac_func (void);
17782
17783 int
17784 main (void)
17785 {
17786
17787 /* The GNU C library defines stubs for functions which it implements
17788     to always fail with ENOSYS.  Some functions are actually named
17789     something starting with __ and the normal name is an alias.  */
17790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17791 #error found stub for $ac_func
17792 #endif
17793
17794         return $ac_func ();
17795   ;
17796   return 0;
17797 }
17798 _ACEOF
17799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17800 if { (eval echo "$as_me:17800: \"$ac_link\"") >&5
17801   (eval $ac_link) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit "$ac_status"); } &&
17805          { ac_try='test -s "conftest$ac_exeext"'
17806   { (eval echo "$as_me:17806: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:17809: \$? = $ac_status" >&5
17810   (exit "$ac_status"); }; }; then
17811   eval "$as_ac_var=yes"
17812 else
17813   echo "$as_me: failed program was:" >&5
17814 cat "conftest.$ac_ext" >&5
17815 eval "$as_ac_var=no"
17816 fi
17817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17818 fi
17819 echo "$as_me:17819: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17820 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17821 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17822   cat >>confdefs.h <<EOF
17823 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17824 EOF
17825
17826 fi
17827 done
17828
17829 fi
17830
17831 ###     use option --enable-assertions to turn on generation of assertion code
17832 echo "$as_me:17832: checking if you want to enable runtime assertions" >&5
17833 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17834
17835 # Check whether --enable-assertions or --disable-assertions was given.
17836 if test "${enable_assertions+set}" = set; then
17837   enableval="$enable_assertions"
17838   with_assertions=$enableval
17839 else
17840   with_assertions=no
17841 fi;
17842 echo "$as_me:17842: result: $with_assertions" >&5
17843 echo "${ECHO_T}$with_assertions" >&6
17844 if test -n "$GCC"
17845 then
17846         if test "$with_assertions" = no
17847         then
17848                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17849         else
17850
17851         ADAFLAGS="$ADAFLAGS -gnata"
17852
17853         fi
17854 fi
17855
17856 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17857
17858 echo "$as_me:17858: checking if you want to use dmalloc for testing" >&5
17859 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17860
17861 # Check whether --with-dmalloc or --without-dmalloc was given.
17862 if test "${with_dmalloc+set}" = set; then
17863   withval="$with_dmalloc"
17864   case "x$withval" in
17865         (x|xno) ;;
17866         (*)
17867                 : "${with_cflags:=-g}"
17868                 : "${enable_leaks:=no}"
17869                 with_dmalloc=yes
17870
17871 cat >>confdefs.h <<EOF
17872 #define USE_DMALLOC 1
17873 EOF
17874
17875                 ;;
17876         esac
17877 else
17878   with_dmalloc=
17879 fi;
17880 echo "$as_me:17880: result: ${with_dmalloc:-no}" >&5
17881 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17882
17883 case ".$with_cflags" in
17884 (.*-g*)
17885         case .$CFLAGS in
17886         (.*-g*)
17887                 ;;
17888         (*)
17889
17890 cf_fix_cppflags=no
17891 cf_new_cflags=
17892 cf_new_cppflags=
17893 cf_new_extra_cppflags=
17894
17895 for cf_add_cflags in -g
17896 do
17897 case "$cf_fix_cppflags" in
17898 (no)
17899         case "$cf_add_cflags" in
17900         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17901                 case "$cf_add_cflags" in
17902                 (-D*)
17903                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17904
17905                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17906                                 && test -z "${cf_tst_cflags}" \
17907                                 && cf_fix_cppflags=yes
17908
17909                         if test "$cf_fix_cppflags" = yes ; then
17910
17911         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17912         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17913
17914                                 continue
17915                         elif test "${cf_tst_cflags}" = "\"'" ; then
17916
17917         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17918         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17919
17920                                 continue
17921                         fi
17922                         ;;
17923                 esac
17924                 case "$CPPFLAGS" in
17925                 (*$cf_add_cflags)
17926                         ;;
17927                 (*)
17928                         case "$cf_add_cflags" in
17929                         (-D*)
17930                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17931
17932 CPPFLAGS=`echo "$CPPFLAGS" | \
17933         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17934                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17935
17936                                 ;;
17937                         esac
17938
17939         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17940         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17941
17942                         ;;
17943                 esac
17944                 ;;
17945         (*)
17946
17947         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17948         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17949
17950                 ;;
17951         esac
17952         ;;
17953 (yes)
17954
17955         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17956         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17957
17958         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17959
17960         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17961                 && test -z "${cf_tst_cflags}" \
17962                 && cf_fix_cppflags=no
17963         ;;
17964 esac
17965 done
17966
17967 if test -n "$cf_new_cflags" ; then
17968
17969         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17970         CFLAGS="${CFLAGS}$cf_new_cflags"
17971
17972 fi
17973
17974 if test -n "$cf_new_cppflags" ; then
17975
17976         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17977         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17978
17979 fi
17980
17981 if test -n "$cf_new_extra_cppflags" ; then
17982
17983         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17984         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17985
17986 fi
17987
17988                 ;;
17989         esac
17990         ;;
17991 esac
17992
17993 if test "$with_dmalloc" = yes ; then
17994         echo "$as_me:17994: checking for dmalloc.h" >&5
17995 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17996 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17997   echo $ECHO_N "(cached) $ECHO_C" >&6
17998 else
17999   cat >"conftest.$ac_ext" <<_ACEOF
18000 #line 18000 "configure"
18001 #include "confdefs.h"
18002 #include <dmalloc.h>
18003 _ACEOF
18004 if { (eval echo "$as_me:18004: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18005   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18006   ac_status=$?
18007   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18008   rm -f conftest.er1
18009   cat conftest.err >&5
18010   echo "$as_me:18010: \$? = $ac_status" >&5
18011   (exit "$ac_status"); } >/dev/null; then
18012   if test -s conftest.err; then
18013     ac_cpp_err=$ac_c_preproc_warn_flag
18014   else
18015     ac_cpp_err=
18016   fi
18017 else
18018   ac_cpp_err=yes
18019 fi
18020 if test -z "$ac_cpp_err"; then
18021   ac_cv_header_dmalloc_h=yes
18022 else
18023   echo "$as_me: failed program was:" >&5
18024   cat "conftest.$ac_ext" >&5
18025   ac_cv_header_dmalloc_h=no
18026 fi
18027 rm -f conftest.err "conftest.$ac_ext"
18028 fi
18029 echo "$as_me:18029: result: $ac_cv_header_dmalloc_h" >&5
18030 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18031 if test "$ac_cv_header_dmalloc_h" = yes; then
18032
18033 echo "$as_me:18033: checking for dmalloc_debug in -ldmalloc" >&5
18034 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18035 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18036   echo $ECHO_N "(cached) $ECHO_C" >&6
18037 else
18038   ac_check_lib_save_LIBS=$LIBS
18039 LIBS="-ldmalloc  $LIBS"
18040 cat >"conftest.$ac_ext" <<_ACEOF
18041 #line 18041 "configure"
18042 #include "confdefs.h"
18043
18044 /* Override any gcc2 internal prototype to avoid an error.  */
18045 #ifdef __cplusplus
18046 extern "C"
18047 #endif
18048 /* We use char because int might match the return type of a gcc2
18049    builtin and then its argument prototype would still apply.  */
18050 char dmalloc_debug ();
18051 int
18052 main (void)
18053 {
18054 dmalloc_debug ();
18055   ;
18056   return 0;
18057 }
18058 _ACEOF
18059 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18060 if { (eval echo "$as_me:18060: \"$ac_link\"") >&5
18061   (eval $ac_link) 2>&5
18062   ac_status=$?
18063   echo "$as_me:18063: \$? = $ac_status" >&5
18064   (exit "$ac_status"); } &&
18065          { ac_try='test -s "conftest$ac_exeext"'
18066   { (eval echo "$as_me:18066: \"$ac_try\"") >&5
18067   (eval $ac_try) 2>&5
18068   ac_status=$?
18069   echo "$as_me:18069: \$? = $ac_status" >&5
18070   (exit "$ac_status"); }; }; then
18071   ac_cv_lib_dmalloc_dmalloc_debug=yes
18072 else
18073   echo "$as_me: failed program was:" >&5
18074 cat "conftest.$ac_ext" >&5
18075 ac_cv_lib_dmalloc_dmalloc_debug=no
18076 fi
18077 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18078 LIBS=$ac_check_lib_save_LIBS
18079 fi
18080 echo "$as_me:18080: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18081 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18082 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18083   cat >>confdefs.h <<EOF
18084 #define HAVE_LIBDMALLOC 1
18085 EOF
18086
18087   LIBS="-ldmalloc $LIBS"
18088
18089 fi
18090
18091 fi
18092
18093 fi
18094
18095 echo "$as_me:18095: checking if you want to use dbmalloc for testing" >&5
18096 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18097
18098 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18099 if test "${with_dbmalloc+set}" = set; then
18100   withval="$with_dbmalloc"
18101   case "x$withval" in
18102         (x|xno) ;;
18103         (*)
18104                 : "${with_cflags:=-g}"
18105                 : "${enable_leaks:=no}"
18106                 with_dbmalloc=yes
18107
18108 cat >>confdefs.h <<EOF
18109 #define USE_DBMALLOC 1
18110 EOF
18111
18112                 ;;
18113         esac
18114 else
18115   with_dbmalloc=
18116 fi;
18117 echo "$as_me:18117: result: ${with_dbmalloc:-no}" >&5
18118 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18119
18120 case ".$with_cflags" in
18121 (.*-g*)
18122         case .$CFLAGS in
18123         (.*-g*)
18124                 ;;
18125         (*)
18126
18127 cf_fix_cppflags=no
18128 cf_new_cflags=
18129 cf_new_cppflags=
18130 cf_new_extra_cppflags=
18131
18132 for cf_add_cflags in -g
18133 do
18134 case "$cf_fix_cppflags" in
18135 (no)
18136         case "$cf_add_cflags" in
18137         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18138                 case "$cf_add_cflags" in
18139                 (-D*)
18140                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18141
18142                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18143                                 && test -z "${cf_tst_cflags}" \
18144                                 && cf_fix_cppflags=yes
18145
18146                         if test "$cf_fix_cppflags" = yes ; then
18147
18148         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18149         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18150
18151                                 continue
18152                         elif test "${cf_tst_cflags}" = "\"'" ; then
18153
18154         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18155         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18156
18157                                 continue
18158                         fi
18159                         ;;
18160                 esac
18161                 case "$CPPFLAGS" in
18162                 (*$cf_add_cflags)
18163                         ;;
18164                 (*)
18165                         case "$cf_add_cflags" in
18166                         (-D*)
18167                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18168
18169 CPPFLAGS=`echo "$CPPFLAGS" | \
18170         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18171                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18172
18173                                 ;;
18174                         esac
18175
18176         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18177         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18178
18179                         ;;
18180                 esac
18181                 ;;
18182         (*)
18183
18184         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18185         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18186
18187                 ;;
18188         esac
18189         ;;
18190 (yes)
18191
18192         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18193         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18194
18195         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18196
18197         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18198                 && test -z "${cf_tst_cflags}" \
18199                 && cf_fix_cppflags=no
18200         ;;
18201 esac
18202 done
18203
18204 if test -n "$cf_new_cflags" ; then
18205
18206         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18207         CFLAGS="${CFLAGS}$cf_new_cflags"
18208
18209 fi
18210
18211 if test -n "$cf_new_cppflags" ; then
18212
18213         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18214         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18215
18216 fi
18217
18218 if test -n "$cf_new_extra_cppflags" ; then
18219
18220         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18221         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18222
18223 fi
18224
18225                 ;;
18226         esac
18227         ;;
18228 esac
18229
18230 if test "$with_dbmalloc" = yes ; then
18231         echo "$as_me:18231: checking for dbmalloc.h" >&5
18232 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18233 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18234   echo $ECHO_N "(cached) $ECHO_C" >&6
18235 else
18236   cat >"conftest.$ac_ext" <<_ACEOF
18237 #line 18237 "configure"
18238 #include "confdefs.h"
18239 #include <dbmalloc.h>
18240 _ACEOF
18241 if { (eval echo "$as_me:18241: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18242   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18243   ac_status=$?
18244   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18245   rm -f conftest.er1
18246   cat conftest.err >&5
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit "$ac_status"); } >/dev/null; then
18249   if test -s conftest.err; then
18250     ac_cpp_err=$ac_c_preproc_warn_flag
18251   else
18252     ac_cpp_err=
18253   fi
18254 else
18255   ac_cpp_err=yes
18256 fi
18257 if test -z "$ac_cpp_err"; then
18258   ac_cv_header_dbmalloc_h=yes
18259 else
18260   echo "$as_me: failed program was:" >&5
18261   cat "conftest.$ac_ext" >&5
18262   ac_cv_header_dbmalloc_h=no
18263 fi
18264 rm -f conftest.err "conftest.$ac_ext"
18265 fi
18266 echo "$as_me:18266: result: $ac_cv_header_dbmalloc_h" >&5
18267 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18268 if test "$ac_cv_header_dbmalloc_h" = yes; then
18269
18270 echo "$as_me:18270: checking for debug_malloc in -ldbmalloc" >&5
18271 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18272 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18273   echo $ECHO_N "(cached) $ECHO_C" >&6
18274 else
18275   ac_check_lib_save_LIBS=$LIBS
18276 LIBS="-ldbmalloc  $LIBS"
18277 cat >"conftest.$ac_ext" <<_ACEOF
18278 #line 18278 "configure"
18279 #include "confdefs.h"
18280
18281 /* Override any gcc2 internal prototype to avoid an error.  */
18282 #ifdef __cplusplus
18283 extern "C"
18284 #endif
18285 /* We use char because int might match the return type of a gcc2
18286    builtin and then its argument prototype would still apply.  */
18287 char debug_malloc ();
18288 int
18289 main (void)
18290 {
18291 debug_malloc ();
18292   ;
18293   return 0;
18294 }
18295 _ACEOF
18296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18297 if { (eval echo "$as_me:18297: \"$ac_link\"") >&5
18298   (eval $ac_link) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit "$ac_status"); } &&
18302          { ac_try='test -s "conftest$ac_exeext"'
18303   { (eval echo "$as_me:18303: \"$ac_try\"") >&5
18304   (eval $ac_try) 2>&5
18305   ac_status=$?
18306   echo "$as_me:18306: \$? = $ac_status" >&5
18307   (exit "$ac_status"); }; }; then
18308   ac_cv_lib_dbmalloc_debug_malloc=yes
18309 else
18310   echo "$as_me: failed program was:" >&5
18311 cat "conftest.$ac_ext" >&5
18312 ac_cv_lib_dbmalloc_debug_malloc=no
18313 fi
18314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18315 LIBS=$ac_check_lib_save_LIBS
18316 fi
18317 echo "$as_me:18317: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18318 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18319 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18320   cat >>confdefs.h <<EOF
18321 #define HAVE_LIBDBMALLOC 1
18322 EOF
18323
18324   LIBS="-ldbmalloc $LIBS"
18325
18326 fi
18327
18328 fi
18329
18330 fi
18331
18332 echo "$as_me:18332: checking if you want to use valgrind for testing" >&5
18333 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18334
18335 # Check whether --with-valgrind or --without-valgrind was given.
18336 if test "${with_valgrind+set}" = set; then
18337   withval="$with_valgrind"
18338   case "x$withval" in
18339         (x|xno) ;;
18340         (*)
18341                 : "${with_cflags:=-g}"
18342                 : "${enable_leaks:=no}"
18343                 with_valgrind=yes
18344
18345 cat >>confdefs.h <<EOF
18346 #define USE_VALGRIND 1
18347 EOF
18348
18349                 ;;
18350         esac
18351 else
18352   with_valgrind=
18353 fi;
18354 echo "$as_me:18354: result: ${with_valgrind:-no}" >&5
18355 echo "${ECHO_T}${with_valgrind:-no}" >&6
18356
18357 case ".$with_cflags" in
18358 (.*-g*)
18359         case .$CFLAGS in
18360         (.*-g*)
18361                 ;;
18362         (*)
18363
18364 cf_fix_cppflags=no
18365 cf_new_cflags=
18366 cf_new_cppflags=
18367 cf_new_extra_cppflags=
18368
18369 for cf_add_cflags in -g
18370 do
18371 case "$cf_fix_cppflags" in
18372 (no)
18373         case "$cf_add_cflags" in
18374         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18375                 case "$cf_add_cflags" in
18376                 (-D*)
18377                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18378
18379                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18380                                 && test -z "${cf_tst_cflags}" \
18381                                 && cf_fix_cppflags=yes
18382
18383                         if test "$cf_fix_cppflags" = yes ; then
18384
18385         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18386         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18387
18388                                 continue
18389                         elif test "${cf_tst_cflags}" = "\"'" ; then
18390
18391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18393
18394                                 continue
18395                         fi
18396                         ;;
18397                 esac
18398                 case "$CPPFLAGS" in
18399                 (*$cf_add_cflags)
18400                         ;;
18401                 (*)
18402                         case "$cf_add_cflags" in
18403                         (-D*)
18404                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18405
18406 CPPFLAGS=`echo "$CPPFLAGS" | \
18407         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18408                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18409
18410                                 ;;
18411                         esac
18412
18413         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18414         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18415
18416                         ;;
18417                 esac
18418                 ;;
18419         (*)
18420
18421         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18422         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18423
18424                 ;;
18425         esac
18426         ;;
18427 (yes)
18428
18429         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18430         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18431
18432         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18433
18434         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18435                 && test -z "${cf_tst_cflags}" \
18436                 && cf_fix_cppflags=no
18437         ;;
18438 esac
18439 done
18440
18441 if test -n "$cf_new_cflags" ; then
18442
18443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18444         CFLAGS="${CFLAGS}$cf_new_cflags"
18445
18446 fi
18447
18448 if test -n "$cf_new_cppflags" ; then
18449
18450         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18451         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18452
18453 fi
18454
18455 if test -n "$cf_new_extra_cppflags" ; then
18456
18457         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18458         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18459
18460 fi
18461
18462                 ;;
18463         esac
18464         ;;
18465 esac
18466
18467 echo "$as_me:18467: checking if you want to perform memory-leak testing" >&5
18468 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18469
18470 # Check whether --enable-leaks or --disable-leaks was given.
18471 if test "${enable_leaks+set}" = set; then
18472   enableval="$enable_leaks"
18473   enable_leaks=$enableval
18474 else
18475   enable_leaks=yes
18476 fi;
18477 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18478 echo "$as_me:18478: result: $with_no_leaks" >&5
18479 echo "${ECHO_T}$with_no_leaks" >&6
18480
18481 if test "$enable_leaks" = no ; then
18482
18483 cat >>confdefs.h <<\EOF
18484 #define NO_LEAKS 1
18485 EOF
18486
18487 cat >>confdefs.h <<\EOF
18488 #define YY_NO_LEAKS 1
18489 EOF
18490
18491 fi
18492
18493 cat >>confdefs.h <<\EOF
18494 #define HAVE_NC_ALLOC_H 1
18495 EOF
18496
18497 ###     use option --enable-expanded to generate certain macros as functions
18498
18499 # Check whether --enable-expanded or --disable-expanded was given.
18500 if test "${enable_expanded+set}" = set; then
18501   enableval="$enable_expanded"
18502   test "x$enableval" = xyes &&
18503 cat >>confdefs.h <<\EOF
18504 #define NCURSES_EXPANDED 1
18505 EOF
18506
18507 fi;
18508
18509 ###     use option --disable-macros to suppress macros in favor of functions
18510
18511 # Check whether --enable-macros or --disable-macros was given.
18512 if test "${enable_macros+set}" = set; then
18513   enableval="$enable_macros"
18514   test "$enableval" = no &&
18515 cat >>confdefs.h <<\EOF
18516 #define NCURSES_NOMACROS 1
18517 EOF
18518
18519 fi;
18520
18521 # Normally we only add trace() to the debug-library.  Allow this to be
18522 # extended to all models of the ncurses library:
18523 cf_all_traces=no
18524 case "$CFLAGS $CPPFLAGS" in
18525 (*-DTRACE*)
18526         cf_all_traces=yes
18527         ;;
18528 esac
18529
18530 echo "$as_me:18530: checking whether to add trace feature to all models" >&5
18531 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18532
18533 # Check whether --with-trace or --without-trace was given.
18534 if test "${with_trace+set}" = set; then
18535   withval="$with_trace"
18536   cf_with_trace=$withval
18537 else
18538   cf_with_trace=$cf_all_traces
18539 fi;
18540 echo "$as_me:18540: result: $cf_with_trace" >&5
18541 echo "${ECHO_T}$cf_with_trace" >&6
18542
18543 if test "x$cf_with_trace" = xyes ; then
18544         LIB_TRACING=all
18545         ADA_TRACE=TRUE
18546
18547 cf_fix_cppflags=no
18548 cf_new_cflags=
18549 cf_new_cppflags=
18550 cf_new_extra_cppflags=
18551
18552 for cf_add_cflags in -DTRACE
18553 do
18554 case "$cf_fix_cppflags" in
18555 (no)
18556         case "$cf_add_cflags" in
18557         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18558                 case "$cf_add_cflags" in
18559                 (-D*)
18560                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18561
18562                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18563                                 && test -z "${cf_tst_cflags}" \
18564                                 && cf_fix_cppflags=yes
18565
18566                         if test "$cf_fix_cppflags" = yes ; then
18567
18568         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18569         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18570
18571                                 continue
18572                         elif test "${cf_tst_cflags}" = "\"'" ; then
18573
18574         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18575         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18576
18577                                 continue
18578                         fi
18579                         ;;
18580                 esac
18581                 case "$CPPFLAGS" in
18582                 (*$cf_add_cflags)
18583                         ;;
18584                 (*)
18585                         case "$cf_add_cflags" in
18586                         (-D*)
18587                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18588
18589 CPPFLAGS=`echo "$CPPFLAGS" | \
18590         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18591                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18592
18593                                 ;;
18594                         esac
18595
18596         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18597         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18598
18599                         ;;
18600                 esac
18601                 ;;
18602         (*)
18603
18604         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18605         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18606
18607                 ;;
18608         esac
18609         ;;
18610 (yes)
18611
18612         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18613         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18614
18615         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18616
18617         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18618                 && test -z "${cf_tst_cflags}" \
18619                 && cf_fix_cppflags=no
18620         ;;
18621 esac
18622 done
18623
18624 if test -n "$cf_new_cflags" ; then
18625
18626         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18627         CFLAGS="${CFLAGS}$cf_new_cflags"
18628
18629 fi
18630
18631 if test -n "$cf_new_cppflags" ; then
18632
18633         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18634         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18635
18636 fi
18637
18638 if test -n "$cf_new_extra_cppflags" ; then
18639
18640         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18641         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18642
18643 fi
18644
18645 cat >>confdefs.h <<\EOF
18646 #define HAVE__TRACEF 1
18647 EOF
18648
18649 else
18650         LIB_TRACING=DEBUG
18651         ADA_TRACE=FALSE
18652 fi
18653
18654 echo "$as_me:18654: checking if we want to use GNAT projects" >&5
18655 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18656
18657 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18658 if test "${enable_gnat_projects+set}" = set; then
18659   enableval="$enable_gnat_projects"
18660   test "$enableval" != no && enableval=yes
18661         if test "$enableval" != "yes" ; then
18662     enable_gnat_projects=no
18663         else
18664                 enable_gnat_projects=yes
18665         fi
18666 else
18667   enableval=yes
18668         enable_gnat_projects=yes
18669
18670 fi;
18671 echo "$as_me:18671: result: $enable_gnat_projects" >&5
18672 echo "${ECHO_T}$enable_gnat_projects" >&6
18673
18674 ###     Checks for libraries.
18675 case "$cf_cv_system_name" in
18676 (*mingw32*|*mingw64*)
18677         # Note: WINVER may be a problem with Windows 10
18678         if test "x$with_exp_win32" = xyes ; then
18679                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18680         else
18681                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18682         fi
18683
18684 echo "$as_me:18684: checking if ssp library is needed" >&5
18685 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18686 if test "${cf_cv_need_libssp+set}" = set; then
18687   echo $ECHO_N "(cached) $ECHO_C" >&6
18688 else
18689
18690 cat >"conftest.$ac_ext" <<_ACEOF
18691 #line 18691 "configure"
18692 #include "confdefs.h"
18693
18694 #include <sys/types.h>
18695 #include <dirent.h>
18696
18697 int
18698 main (void)
18699 {
18700
18701        DIR *dp = opendir(".");
18702
18703   ;
18704   return 0;
18705 }
18706 _ACEOF
18707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18708 if { (eval echo "$as_me:18708: \"$ac_link\"") >&5
18709   (eval $ac_link) 2>&5
18710   ac_status=$?
18711   echo "$as_me:18711: \$? = $ac_status" >&5
18712   (exit "$ac_status"); } &&
18713          { ac_try='test -s "conftest$ac_exeext"'
18714   { (eval echo "$as_me:18714: \"$ac_try\"") >&5
18715   (eval $ac_try) 2>&5
18716   ac_status=$?
18717   echo "$as_me:18717: \$? = $ac_status" >&5
18718   (exit "$ac_status"); }; }; then
18719   cf_cv_need_libssp=no
18720 else
18721   echo "$as_me: failed program was:" >&5
18722 cat "conftest.$ac_ext" >&5
18723
18724         cf_save_LIBS="$LIBS"
18725         LIBS="$LIBS -lssp"
18726         cat >"conftest.$ac_ext" <<_ACEOF
18727 #line 18727 "configure"
18728 #include "confdefs.h"
18729
18730 #include <sys/types.h>
18731 #include <dirent.h>
18732
18733 int
18734 main (void)
18735 {
18736
18737                    DIR *dp = opendir(".");
18738
18739   ;
18740   return 0;
18741 }
18742 _ACEOF
18743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18744 if { (eval echo "$as_me:18744: \"$ac_link\"") >&5
18745   (eval $ac_link) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit "$ac_status"); } &&
18749          { ac_try='test -s "conftest$ac_exeext"'
18750   { (eval echo "$as_me:18750: \"$ac_try\"") >&5
18751   (eval $ac_try) 2>&5
18752   ac_status=$?
18753   echo "$as_me:18753: \$? = $ac_status" >&5
18754   (exit "$ac_status"); }; }; then
18755   cf_cv_need_libssp=yes
18756 else
18757   echo "$as_me: failed program was:" >&5
18758 cat "conftest.$ac_ext" >&5
18759 cf_cv_need_libssp=maybe
18760 fi
18761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18762         LIBS="$cf_save_LIBS"
18763
18764 fi
18765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18766 fi
18767 echo "$as_me:18767: result: $cf_cv_need_libssp" >&5
18768 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18769
18770 if test "x$cf_cv_need_libssp" = xyes
18771 then
18772
18773 cf_add_libs="$LIBS"
18774 # reverse order
18775 cf_add_0lib=
18776 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18777 # filter duplicates
18778 for cf_add_1lib in $cf_add_0lib; do
18779         for cf_add_2lib in $cf_add_libs; do
18780                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18781                         cf_add_1lib=
18782                         break
18783                 fi
18784         done
18785         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18786 done
18787 LIBS="$cf_add_libs"
18788
18789 fi
18790
18791         ;;
18792 (*)
18793 echo "$as_me:18793: checking for gettimeofday" >&5
18794 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18795 if test "${ac_cv_func_gettimeofday+set}" = set; then
18796   echo $ECHO_N "(cached) $ECHO_C" >&6
18797 else
18798   cat >"conftest.$ac_ext" <<_ACEOF
18799 #line 18799 "configure"
18800 #include "confdefs.h"
18801 #define gettimeofday autoconf_temporary
18802 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18803 #undef gettimeofday
18804
18805 #ifdef __cplusplus
18806 extern "C"
18807 #endif
18808
18809 /* We use char because int might match the return type of a gcc2
18810    builtin and then its argument prototype would still apply.  */
18811 char gettimeofday (void);
18812
18813 int
18814 main (void)
18815 {
18816
18817 /* The GNU C library defines stubs for functions which it implements
18818     to always fail with ENOSYS.  Some functions are actually named
18819     something starting with __ and the normal name is an alias.  */
18820 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18821 #error found stub for gettimeofday
18822 #endif
18823
18824         return gettimeofday ();
18825   ;
18826   return 0;
18827 }
18828 _ACEOF
18829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18830 if { (eval echo "$as_me:18830: \"$ac_link\"") >&5
18831   (eval $ac_link) 2>&5
18832   ac_status=$?
18833   echo "$as_me:18833: \$? = $ac_status" >&5
18834   (exit "$ac_status"); } &&
18835          { ac_try='test -s "conftest$ac_exeext"'
18836   { (eval echo "$as_me:18836: \"$ac_try\"") >&5
18837   (eval $ac_try) 2>&5
18838   ac_status=$?
18839   echo "$as_me:18839: \$? = $ac_status" >&5
18840   (exit "$ac_status"); }; }; then
18841   ac_cv_func_gettimeofday=yes
18842 else
18843   echo "$as_me: failed program was:" >&5
18844 cat "conftest.$ac_ext" >&5
18845 ac_cv_func_gettimeofday=no
18846 fi
18847 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18848 fi
18849 echo "$as_me:18849: result: $ac_cv_func_gettimeofday" >&5
18850 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18851 if test "$ac_cv_func_gettimeofday" = yes; then
18852
18853 cat >>confdefs.h <<\EOF
18854 #define HAVE_GETTIMEOFDAY 1
18855 EOF
18856
18857 else
18858
18859 echo "$as_me:18859: checking for gettimeofday in -lbsd" >&5
18860 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18861 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18862   echo $ECHO_N "(cached) $ECHO_C" >&6
18863 else
18864   ac_check_lib_save_LIBS=$LIBS
18865 LIBS="-lbsd  $LIBS"
18866 cat >"conftest.$ac_ext" <<_ACEOF
18867 #line 18867 "configure"
18868 #include "confdefs.h"
18869
18870 /* Override any gcc2 internal prototype to avoid an error.  */
18871 #ifdef __cplusplus
18872 extern "C"
18873 #endif
18874 /* We use char because int might match the return type of a gcc2
18875    builtin and then its argument prototype would still apply.  */
18876 char gettimeofday ();
18877 int
18878 main (void)
18879 {
18880 gettimeofday ();
18881   ;
18882   return 0;
18883 }
18884 _ACEOF
18885 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18886 if { (eval echo "$as_me:18886: \"$ac_link\"") >&5
18887   (eval $ac_link) 2>&5
18888   ac_status=$?
18889   echo "$as_me:18889: \$? = $ac_status" >&5
18890   (exit "$ac_status"); } &&
18891          { ac_try='test -s "conftest$ac_exeext"'
18892   { (eval echo "$as_me:18892: \"$ac_try\"") >&5
18893   (eval $ac_try) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit "$ac_status"); }; }; then
18897   ac_cv_lib_bsd_gettimeofday=yes
18898 else
18899   echo "$as_me: failed program was:" >&5
18900 cat "conftest.$ac_ext" >&5
18901 ac_cv_lib_bsd_gettimeofday=no
18902 fi
18903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18904 LIBS=$ac_check_lib_save_LIBS
18905 fi
18906 echo "$as_me:18906: result: $ac_cv_lib_bsd_gettimeofday" >&5
18907 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18908 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18909
18910 cat >>confdefs.h <<\EOF
18911 #define HAVE_GETTIMEOFDAY 1
18912 EOF
18913
18914 cf_add_libs="$LIBS"
18915 # reverse order
18916 cf_add_0lib=
18917 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18918 # filter duplicates
18919 for cf_add_1lib in $cf_add_0lib; do
18920         for cf_add_2lib in $cf_add_libs; do
18921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18922                         cf_add_1lib=
18923                         break
18924                 fi
18925         done
18926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18927 done
18928 LIBS="$cf_add_libs"
18929
18930 fi
18931
18932 fi
18933         ;;
18934 esac
18935
18936 echo "$as_me:18936: checking if -lm needed for math functions" >&5
18937 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18938 if test "${cf_cv_need_libm+set}" = set; then
18939   echo $ECHO_N "(cached) $ECHO_C" >&6
18940 else
18941
18942         cat >"conftest.$ac_ext" <<_ACEOF
18943 #line 18943 "configure"
18944 #include "confdefs.h"
18945
18946         #include <stdio.h>
18947         #include <stdlib.h>
18948         #include <math.h>
18949
18950 int
18951 main (void)
18952 {
18953 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18954   ;
18955   return 0;
18956 }
18957 _ACEOF
18958 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18959 if { (eval echo "$as_me:18959: \"$ac_link\"") >&5
18960   (eval $ac_link) 2>&5
18961   ac_status=$?
18962   echo "$as_me:18962: \$? = $ac_status" >&5
18963   (exit "$ac_status"); } &&
18964          { ac_try='test -s "conftest$ac_exeext"'
18965   { (eval echo "$as_me:18965: \"$ac_try\"") >&5
18966   (eval $ac_try) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit "$ac_status"); }; }; then
18970   cf_cv_need_libm=no
18971 else
18972   echo "$as_me: failed program was:" >&5
18973 cat "conftest.$ac_ext" >&5
18974 cf_cv_need_libm=yes
18975 fi
18976 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18977 fi
18978 echo "$as_me:18978: result: $cf_cv_need_libm" >&5
18979 echo "${ECHO_T}$cf_cv_need_libm" >&6
18980 if test "$cf_cv_need_libm" = yes
18981 then
18982 MATH_LIB=-lm
18983 fi
18984
18985 ###     Checks for header files.
18986 echo "$as_me:18986: checking for ANSI C header files" >&5
18987 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18988 if test "${ac_cv_header_stdc+set}" = set; then
18989   echo $ECHO_N "(cached) $ECHO_C" >&6
18990 else
18991   cat >"conftest.$ac_ext" <<_ACEOF
18992 #line 18992 "configure"
18993 #include "confdefs.h"
18994 #include <stdlib.h>
18995 #include <stdarg.h>
18996 #include <string.h>
18997 #include <float.h>
18998
18999 _ACEOF
19000 if { (eval echo "$as_me:19000: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19001   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19002   ac_status=$?
19003   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19004   rm -f conftest.er1
19005   cat conftest.err >&5
19006   echo "$as_me:19006: \$? = $ac_status" >&5
19007   (exit "$ac_status"); } >/dev/null; then
19008   if test -s conftest.err; then
19009     ac_cpp_err=$ac_c_preproc_warn_flag
19010   else
19011     ac_cpp_err=
19012   fi
19013 else
19014   ac_cpp_err=yes
19015 fi
19016 if test -z "$ac_cpp_err"; then
19017   ac_cv_header_stdc=yes
19018 else
19019   echo "$as_me: failed program was:" >&5
19020   cat "conftest.$ac_ext" >&5
19021   ac_cv_header_stdc=no
19022 fi
19023 rm -f conftest.err "conftest.$ac_ext"
19024
19025 if test $ac_cv_header_stdc = yes; then
19026   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19027   cat >"conftest.$ac_ext" <<_ACEOF
19028 #line 19028 "configure"
19029 #include "confdefs.h"
19030 #include <string.h>
19031
19032 _ACEOF
19033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19034   $EGREP "memchr" >/dev/null 2>&1; then
19035   :
19036 else
19037   ac_cv_header_stdc=no
19038 fi
19039 rm -rf conftest*
19040
19041 fi
19042
19043 if test $ac_cv_header_stdc = yes; then
19044   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19045   cat >"conftest.$ac_ext" <<_ACEOF
19046 #line 19046 "configure"
19047 #include "confdefs.h"
19048 #include <stdlib.h>
19049
19050 _ACEOF
19051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19052   $EGREP "free" >/dev/null 2>&1; then
19053   :
19054 else
19055   ac_cv_header_stdc=no
19056 fi
19057 rm -rf conftest*
19058
19059 fi
19060
19061 if test $ac_cv_header_stdc = yes; then
19062   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19063   if test "$cross_compiling" = yes; then
19064   :
19065 else
19066   cat >"conftest.$ac_ext" <<_ACEOF
19067 #line 19067 "configure"
19068 #include "confdefs.h"
19069 #include <ctype.h>
19070 #if ((' ' & 0x0FF) == 0x020)
19071 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19072 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19073 #else
19074 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19075                      || ('j' <= (c) && (c) <= 'r') \
19076                      || ('s' <= (c) && (c) <= 'z'))
19077 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19078 #endif
19079
19080 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19081 int
19082 main (void)
19083 {
19084   int i;
19085   for (i = 0; i < 256; i++)
19086     if (XOR (islower (i), ISLOWER (i))
19087         || toupper (i) != TOUPPER (i))
19088       $ac_main_return(2);
19089   $ac_main_return (0);
19090 }
19091 _ACEOF
19092 rm -f "conftest$ac_exeext"
19093 if { (eval echo "$as_me:19093: \"$ac_link\"") >&5
19094   (eval $ac_link) 2>&5
19095   ac_status=$?
19096   echo "$as_me:19096: \$? = $ac_status" >&5
19097   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19098   { (eval echo "$as_me:19098: \"$ac_try\"") >&5
19099   (eval $ac_try) 2>&5
19100   ac_status=$?
19101   echo "$as_me:19101: \$? = $ac_status" >&5
19102   (exit "$ac_status"); }; }; then
19103   :
19104 else
19105   echo "$as_me: program exited with status $ac_status" >&5
19106 echo "$as_me: failed program was:" >&5
19107 cat "conftest.$ac_ext" >&5
19108 ac_cv_header_stdc=no
19109 fi
19110 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19111 fi
19112 fi
19113 fi
19114 echo "$as_me:19114: result: $ac_cv_header_stdc" >&5
19115 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19116 if test $ac_cv_header_stdc = yes; then
19117
19118 cat >>confdefs.h <<\EOF
19119 #define STDC_HEADERS 1
19120 EOF
19121
19122 fi
19123
19124 ac_header_dirent=no
19125 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19126   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19127 echo "$as_me:19127: checking for $ac_hdr that defines DIR" >&5
19128 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19129 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19130   echo $ECHO_N "(cached) $ECHO_C" >&6
19131 else
19132   cat >"conftest.$ac_ext" <<_ACEOF
19133 #line 19133 "configure"
19134 #include "confdefs.h"
19135 #include <sys/types.h>
19136 #include <$ac_hdr>
19137
19138 int
19139 main (void)
19140 {
19141 if ((DIR *) 0)
19142 return 0;
19143   ;
19144   return 0;
19145 }
19146 _ACEOF
19147 rm -f "conftest.$ac_objext"
19148 if { (eval echo "$as_me:19148: \"$ac_compile\"") >&5
19149   (eval $ac_compile) 2>&5
19150   ac_status=$?
19151   echo "$as_me:19151: \$? = $ac_status" >&5
19152   (exit "$ac_status"); } &&
19153          { ac_try='test -s "conftest.$ac_objext"'
19154   { (eval echo "$as_me:19154: \"$ac_try\"") >&5
19155   (eval $ac_try) 2>&5
19156   ac_status=$?
19157   echo "$as_me:19157: \$? = $ac_status" >&5
19158   (exit "$ac_status"); }; }; then
19159   eval "$as_ac_Header=yes"
19160 else
19161   echo "$as_me: failed program was:" >&5
19162 cat "conftest.$ac_ext" >&5
19163 eval "$as_ac_Header=no"
19164 fi
19165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19166 fi
19167 echo "$as_me:19167: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19168 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19169 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19170   cat >>confdefs.h <<EOF
19171 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19172 EOF
19173
19174 ac_header_dirent=$ac_hdr; break
19175 fi
19176
19177 done
19178 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19179 if test $ac_header_dirent = dirent.h; then
19180   echo "$as_me:19180: checking for opendir in -ldir" >&5
19181 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19182 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19183   echo $ECHO_N "(cached) $ECHO_C" >&6
19184 else
19185   ac_check_lib_save_LIBS=$LIBS
19186 LIBS="-ldir  $LIBS"
19187 cat >"conftest.$ac_ext" <<_ACEOF
19188 #line 19188 "configure"
19189 #include "confdefs.h"
19190
19191 /* Override any gcc2 internal prototype to avoid an error.  */
19192 #ifdef __cplusplus
19193 extern "C"
19194 #endif
19195 /* We use char because int might match the return type of a gcc2
19196    builtin and then its argument prototype would still apply.  */
19197 char opendir ();
19198 int
19199 main (void)
19200 {
19201 opendir ();
19202   ;
19203   return 0;
19204 }
19205 _ACEOF
19206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19207 if { (eval echo "$as_me:19207: \"$ac_link\"") >&5
19208   (eval $ac_link) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit "$ac_status"); } &&
19212          { ac_try='test -s "conftest$ac_exeext"'
19213   { (eval echo "$as_me:19213: \"$ac_try\"") >&5
19214   (eval $ac_try) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit "$ac_status"); }; }; then
19218   ac_cv_lib_dir_opendir=yes
19219 else
19220   echo "$as_me: failed program was:" >&5
19221 cat "conftest.$ac_ext" >&5
19222 ac_cv_lib_dir_opendir=no
19223 fi
19224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19225 LIBS=$ac_check_lib_save_LIBS
19226 fi
19227 echo "$as_me:19227: result: $ac_cv_lib_dir_opendir" >&5
19228 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19229 if test "$ac_cv_lib_dir_opendir" = yes; then
19230   LIBS="$LIBS -ldir"
19231 fi
19232
19233 else
19234   echo "$as_me:19234: checking for opendir in -lx" >&5
19235 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19236 if test "${ac_cv_lib_x_opendir+set}" = set; then
19237   echo $ECHO_N "(cached) $ECHO_C" >&6
19238 else
19239   ac_check_lib_save_LIBS=$LIBS
19240 LIBS="-lx  $LIBS"
19241 cat >"conftest.$ac_ext" <<_ACEOF
19242 #line 19242 "configure"
19243 #include "confdefs.h"
19244
19245 /* Override any gcc2 internal prototype to avoid an error.  */
19246 #ifdef __cplusplus
19247 extern "C"
19248 #endif
19249 /* We use char because int might match the return type of a gcc2
19250    builtin and then its argument prototype would still apply.  */
19251 char opendir ();
19252 int
19253 main (void)
19254 {
19255 opendir ();
19256   ;
19257   return 0;
19258 }
19259 _ACEOF
19260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19261 if { (eval echo "$as_me:19261: \"$ac_link\"") >&5
19262   (eval $ac_link) 2>&5
19263   ac_status=$?
19264   echo "$as_me:19264: \$? = $ac_status" >&5
19265   (exit "$ac_status"); } &&
19266          { ac_try='test -s "conftest$ac_exeext"'
19267   { (eval echo "$as_me:19267: \"$ac_try\"") >&5
19268   (eval $ac_try) 2>&5
19269   ac_status=$?
19270   echo "$as_me:19270: \$? = $ac_status" >&5
19271   (exit "$ac_status"); }; }; then
19272   ac_cv_lib_x_opendir=yes
19273 else
19274   echo "$as_me: failed program was:" >&5
19275 cat "conftest.$ac_ext" >&5
19276 ac_cv_lib_x_opendir=no
19277 fi
19278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19279 LIBS=$ac_check_lib_save_LIBS
19280 fi
19281 echo "$as_me:19281: result: $ac_cv_lib_x_opendir" >&5
19282 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19283 if test "$ac_cv_lib_x_opendir" = yes; then
19284   LIBS="$LIBS -lx"
19285 fi
19286
19287 fi
19288
19289 echo "$as_me:19289: checking whether time.h and sys/time.h may both be included" >&5
19290 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19291 if test "${ac_cv_header_time+set}" = set; then
19292   echo $ECHO_N "(cached) $ECHO_C" >&6
19293 else
19294   cat >"conftest.$ac_ext" <<_ACEOF
19295 #line 19295 "configure"
19296 #include "confdefs.h"
19297 #include <sys/types.h>
19298 #include <sys/time.h>
19299 #include <time.h>
19300
19301 int
19302 main (void)
19303 {
19304 if ((struct tm *) 0)
19305 return 0;
19306   ;
19307   return 0;
19308 }
19309 _ACEOF
19310 rm -f "conftest.$ac_objext"
19311 if { (eval echo "$as_me:19311: \"$ac_compile\"") >&5
19312   (eval $ac_compile) 2>&5
19313   ac_status=$?
19314   echo "$as_me:19314: \$? = $ac_status" >&5
19315   (exit "$ac_status"); } &&
19316          { ac_try='test -s "conftest.$ac_objext"'
19317   { (eval echo "$as_me:19317: \"$ac_try\"") >&5
19318   (eval $ac_try) 2>&5
19319   ac_status=$?
19320   echo "$as_me:19320: \$? = $ac_status" >&5
19321   (exit "$ac_status"); }; }; then
19322   ac_cv_header_time=yes
19323 else
19324   echo "$as_me: failed program was:" >&5
19325 cat "conftest.$ac_ext" >&5
19326 ac_cv_header_time=no
19327 fi
19328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19329 fi
19330 echo "$as_me:19330: result: $ac_cv_header_time" >&5
19331 echo "${ECHO_T}$ac_cv_header_time" >&6
19332 if test $ac_cv_header_time = yes; then
19333
19334 cat >>confdefs.h <<\EOF
19335 #define TIME_WITH_SYS_TIME 1
19336 EOF
19337
19338 fi
19339
19340 cf_regex_func=no
19341 cf_regex_libs=
19342 case "$host_os" in
19343 (mingw*)
19344         # -lsystre -ltre -lintl -liconv
19345         echo "$as_me:19345: checking for regcomp in -lsystre" >&5
19346 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19347 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19348   echo $ECHO_N "(cached) $ECHO_C" >&6
19349 else
19350   ac_check_lib_save_LIBS=$LIBS
19351 LIBS="-lsystre  $LIBS"
19352 cat >"conftest.$ac_ext" <<_ACEOF
19353 #line 19353 "configure"
19354 #include "confdefs.h"
19355
19356 /* Override any gcc2 internal prototype to avoid an error.  */
19357 #ifdef __cplusplus
19358 extern "C"
19359 #endif
19360 /* We use char because int might match the return type of a gcc2
19361    builtin and then its argument prototype would still apply.  */
19362 char regcomp ();
19363 int
19364 main (void)
19365 {
19366 regcomp ();
19367   ;
19368   return 0;
19369 }
19370 _ACEOF
19371 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19372 if { (eval echo "$as_me:19372: \"$ac_link\"") >&5
19373   (eval $ac_link) 2>&5
19374   ac_status=$?
19375   echo "$as_me:19375: \$? = $ac_status" >&5
19376   (exit "$ac_status"); } &&
19377          { ac_try='test -s "conftest$ac_exeext"'
19378   { (eval echo "$as_me:19378: \"$ac_try\"") >&5
19379   (eval $ac_try) 2>&5
19380   ac_status=$?
19381   echo "$as_me:19381: \$? = $ac_status" >&5
19382   (exit "$ac_status"); }; }; then
19383   ac_cv_lib_systre_regcomp=yes
19384 else
19385   echo "$as_me: failed program was:" >&5
19386 cat "conftest.$ac_ext" >&5
19387 ac_cv_lib_systre_regcomp=no
19388 fi
19389 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19390 LIBS=$ac_check_lib_save_LIBS
19391 fi
19392 echo "$as_me:19392: result: $ac_cv_lib_systre_regcomp" >&5
19393 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19394 if test "$ac_cv_lib_systre_regcomp" = yes; then
19395
19396                 echo "$as_me:19396: checking for libiconv_open in -liconv" >&5
19397 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19398 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19399   echo $ECHO_N "(cached) $ECHO_C" >&6
19400 else
19401   ac_check_lib_save_LIBS=$LIBS
19402 LIBS="-liconv  $LIBS"
19403 cat >"conftest.$ac_ext" <<_ACEOF
19404 #line 19404 "configure"
19405 #include "confdefs.h"
19406
19407 /* Override any gcc2 internal prototype to avoid an error.  */
19408 #ifdef __cplusplus
19409 extern "C"
19410 #endif
19411 /* We use char because int might match the return type of a gcc2
19412    builtin and then its argument prototype would still apply.  */
19413 char libiconv_open ();
19414 int
19415 main (void)
19416 {
19417 libiconv_open ();
19418   ;
19419   return 0;
19420 }
19421 _ACEOF
19422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19423 if { (eval echo "$as_me:19423: \"$ac_link\"") >&5
19424   (eval $ac_link) 2>&5
19425   ac_status=$?
19426   echo "$as_me:19426: \$? = $ac_status" >&5
19427   (exit "$ac_status"); } &&
19428          { ac_try='test -s "conftest$ac_exeext"'
19429   { (eval echo "$as_me:19429: \"$ac_try\"") >&5
19430   (eval $ac_try) 2>&5
19431   ac_status=$?
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit "$ac_status"); }; }; then
19434   ac_cv_lib_iconv_libiconv_open=yes
19435 else
19436   echo "$as_me: failed program was:" >&5
19437 cat "conftest.$ac_ext" >&5
19438 ac_cv_lib_iconv_libiconv_open=no
19439 fi
19440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19441 LIBS=$ac_check_lib_save_LIBS
19442 fi
19443 echo "$as_me:19443: result: $ac_cv_lib_iconv_libiconv_open" >&5
19444 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19445 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19446
19447 cf_add_libs="$LIBS"
19448 # reverse order
19449 cf_add_0lib=
19450 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19451 # filter duplicates
19452 for cf_add_1lib in $cf_add_0lib; do
19453         for cf_add_2lib in $cf_add_libs; do
19454                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19455                         cf_add_1lib=
19456                         break
19457                 fi
19458         done
19459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19460 done
19461 LIBS="$cf_add_libs"
19462
19463 fi
19464
19465                 echo "$as_me:19465: checking for libintl_gettext in -lintl" >&5
19466 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19467 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19468   echo $ECHO_N "(cached) $ECHO_C" >&6
19469 else
19470   ac_check_lib_save_LIBS=$LIBS
19471 LIBS="-lintl  $LIBS"
19472 cat >"conftest.$ac_ext" <<_ACEOF
19473 #line 19473 "configure"
19474 #include "confdefs.h"
19475
19476 /* Override any gcc2 internal prototype to avoid an error.  */
19477 #ifdef __cplusplus
19478 extern "C"
19479 #endif
19480 /* We use char because int might match the return type of a gcc2
19481    builtin and then its argument prototype would still apply.  */
19482 char libintl_gettext ();
19483 int
19484 main (void)
19485 {
19486 libintl_gettext ();
19487   ;
19488   return 0;
19489 }
19490 _ACEOF
19491 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19492 if { (eval echo "$as_me:19492: \"$ac_link\"") >&5
19493   (eval $ac_link) 2>&5
19494   ac_status=$?
19495   echo "$as_me:19495: \$? = $ac_status" >&5
19496   (exit "$ac_status"); } &&
19497          { ac_try='test -s "conftest$ac_exeext"'
19498   { (eval echo "$as_me:19498: \"$ac_try\"") >&5
19499   (eval $ac_try) 2>&5
19500   ac_status=$?
19501   echo "$as_me:19501: \$? = $ac_status" >&5
19502   (exit "$ac_status"); }; }; then
19503   ac_cv_lib_intl_libintl_gettext=yes
19504 else
19505   echo "$as_me: failed program was:" >&5
19506 cat "conftest.$ac_ext" >&5
19507 ac_cv_lib_intl_libintl_gettext=no
19508 fi
19509 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19510 LIBS=$ac_check_lib_save_LIBS
19511 fi
19512 echo "$as_me:19512: result: $ac_cv_lib_intl_libintl_gettext" >&5
19513 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19514 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19515
19516 cf_add_libs="$LIBS"
19517 # reverse order
19518 cf_add_0lib=
19519 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19520 # filter duplicates
19521 for cf_add_1lib in $cf_add_0lib; do
19522         for cf_add_2lib in $cf_add_libs; do
19523                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19524                         cf_add_1lib=
19525                         break
19526                 fi
19527         done
19528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19529 done
19530 LIBS="$cf_add_libs"
19531
19532 fi
19533
19534                 echo "$as_me:19534: checking for tre_regcomp in -ltre" >&5
19535 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19536 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19537   echo $ECHO_N "(cached) $ECHO_C" >&6
19538 else
19539   ac_check_lib_save_LIBS=$LIBS
19540 LIBS="-ltre  $LIBS"
19541 cat >"conftest.$ac_ext" <<_ACEOF
19542 #line 19542 "configure"
19543 #include "confdefs.h"
19544
19545 /* Override any gcc2 internal prototype to avoid an error.  */
19546 #ifdef __cplusplus
19547 extern "C"
19548 #endif
19549 /* We use char because int might match the return type of a gcc2
19550    builtin and then its argument prototype would still apply.  */
19551 char tre_regcomp ();
19552 int
19553 main (void)
19554 {
19555 tre_regcomp ();
19556   ;
19557   return 0;
19558 }
19559 _ACEOF
19560 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19561 if { (eval echo "$as_me:19561: \"$ac_link\"") >&5
19562   (eval $ac_link) 2>&5
19563   ac_status=$?
19564   echo "$as_me:19564: \$? = $ac_status" >&5
19565   (exit "$ac_status"); } &&
19566          { ac_try='test -s "conftest$ac_exeext"'
19567   { (eval echo "$as_me:19567: \"$ac_try\"") >&5
19568   (eval $ac_try) 2>&5
19569   ac_status=$?
19570   echo "$as_me:19570: \$? = $ac_status" >&5
19571   (exit "$ac_status"); }; }; then
19572   ac_cv_lib_tre_tre_regcomp=yes
19573 else
19574   echo "$as_me: failed program was:" >&5
19575 cat "conftest.$ac_ext" >&5
19576 ac_cv_lib_tre_tre_regcomp=no
19577 fi
19578 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19579 LIBS=$ac_check_lib_save_LIBS
19580 fi
19581 echo "$as_me:19581: result: $ac_cv_lib_tre_tre_regcomp" >&5
19582 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19583 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19584
19585 cf_add_libs="$LIBS"
19586 # reverse order
19587 cf_add_0lib=
19588 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19589 # filter duplicates
19590 for cf_add_1lib in $cf_add_0lib; do
19591         for cf_add_2lib in $cf_add_libs; do
19592                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19593                         cf_add_1lib=
19594                         break
19595                 fi
19596         done
19597         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19598 done
19599 LIBS="$cf_add_libs"
19600
19601 fi
19602
19603 cf_add_libs="$LIBS"
19604 # reverse order
19605 cf_add_0lib=
19606 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19607 # filter duplicates
19608 for cf_add_1lib in $cf_add_0lib; do
19609         for cf_add_2lib in $cf_add_libs; do
19610                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19611                         cf_add_1lib=
19612                         break
19613                 fi
19614         done
19615         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19616 done
19617 LIBS="$cf_add_libs"
19618
19619                 cf_regex_func=regcomp
19620
19621 else
19622
19623                 echo "$as_me:19623: checking for regcomp in -lgnurx" >&5
19624 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19625 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19626   echo $ECHO_N "(cached) $ECHO_C" >&6
19627 else
19628   ac_check_lib_save_LIBS=$LIBS
19629 LIBS="-lgnurx  $LIBS"
19630 cat >"conftest.$ac_ext" <<_ACEOF
19631 #line 19631 "configure"
19632 #include "confdefs.h"
19633
19634 /* Override any gcc2 internal prototype to avoid an error.  */
19635 #ifdef __cplusplus
19636 extern "C"
19637 #endif
19638 /* We use char because int might match the return type of a gcc2
19639    builtin and then its argument prototype would still apply.  */
19640 char regcomp ();
19641 int
19642 main (void)
19643 {
19644 regcomp ();
19645   ;
19646   return 0;
19647 }
19648 _ACEOF
19649 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19650 if { (eval echo "$as_me:19650: \"$ac_link\"") >&5
19651   (eval $ac_link) 2>&5
19652   ac_status=$?
19653   echo "$as_me:19653: \$? = $ac_status" >&5
19654   (exit "$ac_status"); } &&
19655          { ac_try='test -s "conftest$ac_exeext"'
19656   { (eval echo "$as_me:19656: \"$ac_try\"") >&5
19657   (eval $ac_try) 2>&5
19658   ac_status=$?
19659   echo "$as_me:19659: \$? = $ac_status" >&5
19660   (exit "$ac_status"); }; }; then
19661   ac_cv_lib_gnurx_regcomp=yes
19662 else
19663   echo "$as_me: failed program was:" >&5
19664 cat "conftest.$ac_ext" >&5
19665 ac_cv_lib_gnurx_regcomp=no
19666 fi
19667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19668 LIBS=$ac_check_lib_save_LIBS
19669 fi
19670 echo "$as_me:19670: result: $ac_cv_lib_gnurx_regcomp" >&5
19671 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19672 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19673
19674 cf_add_libs="$LIBS"
19675 # reverse order
19676 cf_add_0lib=
19677 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19678 # filter duplicates
19679 for cf_add_1lib in $cf_add_0lib; do
19680         for cf_add_2lib in $cf_add_libs; do
19681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19682                         cf_add_1lib=
19683                         break
19684                 fi
19685         done
19686         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19687 done
19688 LIBS="$cf_add_libs"
19689
19690                         cf_regex_func=regcomp
19691 fi
19692
19693 fi
19694
19695         ;;
19696 (*)
19697         cf_regex_libs="regex re"
19698         echo "$as_me:19698: checking for regcomp" >&5
19699 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19700 if test "${ac_cv_func_regcomp+set}" = set; then
19701   echo $ECHO_N "(cached) $ECHO_C" >&6
19702 else
19703   cat >"conftest.$ac_ext" <<_ACEOF
19704 #line 19704 "configure"
19705 #include "confdefs.h"
19706 #define regcomp autoconf_temporary
19707 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19708 #undef regcomp
19709
19710 #ifdef __cplusplus
19711 extern "C"
19712 #endif
19713
19714 /* We use char because int might match the return type of a gcc2
19715    builtin and then its argument prototype would still apply.  */
19716 char regcomp (void);
19717
19718 int
19719 main (void)
19720 {
19721
19722 /* The GNU C library defines stubs for functions which it implements
19723     to always fail with ENOSYS.  Some functions are actually named
19724     something starting with __ and the normal name is an alias.  */
19725 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19726 #error found stub for regcomp
19727 #endif
19728
19729         return regcomp ();
19730   ;
19731   return 0;
19732 }
19733 _ACEOF
19734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19735 if { (eval echo "$as_me:19735: \"$ac_link\"") >&5
19736   (eval $ac_link) 2>&5
19737   ac_status=$?
19738   echo "$as_me:19738: \$? = $ac_status" >&5
19739   (exit "$ac_status"); } &&
19740          { ac_try='test -s "conftest$ac_exeext"'
19741   { (eval echo "$as_me:19741: \"$ac_try\"") >&5
19742   (eval $ac_try) 2>&5
19743   ac_status=$?
19744   echo "$as_me:19744: \$? = $ac_status" >&5
19745   (exit "$ac_status"); }; }; then
19746   ac_cv_func_regcomp=yes
19747 else
19748   echo "$as_me: failed program was:" >&5
19749 cat "conftest.$ac_ext" >&5
19750 ac_cv_func_regcomp=no
19751 fi
19752 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19753 fi
19754 echo "$as_me:19754: result: $ac_cv_func_regcomp" >&5
19755 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19756 if test "$ac_cv_func_regcomp" = yes; then
19757   cf_regex_func=regcomp
19758 else
19759
19760                 for cf_regex_lib in $cf_regex_libs
19761                 do
19762                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19763 echo "$as_me:19763: checking for regcomp in -l$cf_regex_lib" >&5
19764 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19765 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19766   echo $ECHO_N "(cached) $ECHO_C" >&6
19767 else
19768   ac_check_lib_save_LIBS=$LIBS
19769 LIBS="-l$cf_regex_lib  $LIBS"
19770 cat >"conftest.$ac_ext" <<_ACEOF
19771 #line 19771 "configure"
19772 #include "confdefs.h"
19773
19774 /* Override any gcc2 internal prototype to avoid an error.  */
19775 #ifdef __cplusplus
19776 extern "C"
19777 #endif
19778 /* We use char because int might match the return type of a gcc2
19779    builtin and then its argument prototype would still apply.  */
19780 char regcomp ();
19781 int
19782 main (void)
19783 {
19784 regcomp ();
19785   ;
19786   return 0;
19787 }
19788 _ACEOF
19789 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19790 if { (eval echo "$as_me:19790: \"$ac_link\"") >&5
19791   (eval $ac_link) 2>&5
19792   ac_status=$?
19793   echo "$as_me:19793: \$? = $ac_status" >&5
19794   (exit "$ac_status"); } &&
19795          { ac_try='test -s "conftest$ac_exeext"'
19796   { (eval echo "$as_me:19796: \"$ac_try\"") >&5
19797   (eval $ac_try) 2>&5
19798   ac_status=$?
19799   echo "$as_me:19799: \$? = $ac_status" >&5
19800   (exit "$ac_status"); }; }; then
19801   eval "$as_ac_Lib=yes"
19802 else
19803   echo "$as_me: failed program was:" >&5
19804 cat "conftest.$ac_ext" >&5
19805 eval "$as_ac_Lib=no"
19806 fi
19807 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19808 LIBS=$ac_check_lib_save_LIBS
19809 fi
19810 echo "$as_me:19810: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19811 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19812 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19813
19814 cf_add_libs="$LIBS"
19815 # reverse order
19816 cf_add_0lib=
19817 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19818 # filter duplicates
19819 for cf_add_1lib in $cf_add_0lib; do
19820         for cf_add_2lib in $cf_add_libs; do
19821                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19822                         cf_add_1lib=
19823                         break
19824                 fi
19825         done
19826         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19827 done
19828 LIBS="$cf_add_libs"
19829
19830                                         cf_regex_func=regcomp
19831                                         break
19832 fi
19833
19834                 done
19835
19836 fi
19837
19838         ;;
19839 esac
19840
19841 if test "$cf_regex_func" = no ; then
19842         echo "$as_me:19842: checking for compile" >&5
19843 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19844 if test "${ac_cv_func_compile+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 compile autoconf_temporary
19851 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19852 #undef compile
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 compile (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_compile) || defined (__stub___compile)
19870 #error found stub for compile
19871 #endif
19872
19873         return compile ();
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_compile=yes
19891 else
19892   echo "$as_me: failed program was:" >&5
19893 cat "conftest.$ac_ext" >&5
19894 ac_cv_func_compile=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_compile" >&5
19899 echo "${ECHO_T}$ac_cv_func_compile" >&6
19900 if test "$ac_cv_func_compile" = yes; then
19901   cf_regex_func=compile
19902 else
19903
19904                 echo "$as_me:19904: checking for compile in -lgen" >&5
19905 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19906 if test "${ac_cv_lib_gen_compile+set}" = set; then
19907   echo $ECHO_N "(cached) $ECHO_C" >&6
19908 else
19909   ac_check_lib_save_LIBS=$LIBS
19910 LIBS="-lgen  $LIBS"
19911 cat >"conftest.$ac_ext" <<_ACEOF
19912 #line 19912 "configure"
19913 #include "confdefs.h"
19914
19915 /* Override any gcc2 internal prototype to avoid an error.  */
19916 #ifdef __cplusplus
19917 extern "C"
19918 #endif
19919 /* We use char because int might match the return type of a gcc2
19920    builtin and then its argument prototype would still apply.  */
19921 char compile ();
19922 int
19923 main (void)
19924 {
19925 compile ();
19926   ;
19927   return 0;
19928 }
19929 _ACEOF
19930 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19931 if { (eval echo "$as_me:19931: \"$ac_link\"") >&5
19932   (eval $ac_link) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit "$ac_status"); } &&
19936          { ac_try='test -s "conftest$ac_exeext"'
19937   { (eval echo "$as_me:19937: \"$ac_try\"") >&5
19938   (eval $ac_try) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit "$ac_status"); }; }; then
19942   ac_cv_lib_gen_compile=yes
19943 else
19944   echo "$as_me: failed program was:" >&5
19945 cat "conftest.$ac_ext" >&5
19946 ac_cv_lib_gen_compile=no
19947 fi
19948 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19949 LIBS=$ac_check_lib_save_LIBS
19950 fi
19951 echo "$as_me:19951: result: $ac_cv_lib_gen_compile" >&5
19952 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19953 if test "$ac_cv_lib_gen_compile" = yes; then
19954
19955 cf_add_libs="$LIBS"
19956 # reverse order
19957 cf_add_0lib=
19958 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19959 # filter duplicates
19960 for cf_add_1lib in $cf_add_0lib; do
19961         for cf_add_2lib in $cf_add_libs; do
19962                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19963                         cf_add_1lib=
19964                         break
19965                 fi
19966         done
19967         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19968 done
19969 LIBS="$cf_add_libs"
19970
19971                                 cf_regex_func=compile
19972 fi
19973
19974 fi
19975
19976 fi
19977
19978 if test "$cf_regex_func" = no ; then
19979         { echo "$as_me:19979: WARNING: cannot find regular expression library" >&5
19980 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19981 fi
19982
19983 echo "$as_me:19983: checking for regular-expression headers" >&5
19984 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19985 if test "${cf_cv_regex_hdrs+set}" = set; then
19986   echo $ECHO_N "(cached) $ECHO_C" >&6
19987 else
19988
19989 cf_cv_regex_hdrs=no
19990 case "$cf_regex_func" in
19991 (compile)
19992         for cf_regex_hdr in regexp.h regexpr.h
19993         do
19994                 cat >"conftest.$ac_ext" <<_ACEOF
19995 #line 19995 "configure"
19996 #include "confdefs.h"
19997 #include <$cf_regex_hdr>
19998 int
19999 main (void)
20000 {
20001
20002                         char *p = compile("", "", "", 0);
20003                         int x = step("", "");
20004                         (void)p;
20005                         (void)x;
20006
20007   ;
20008   return 0;
20009 }
20010 _ACEOF
20011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20012 if { (eval echo "$as_me:20012: \"$ac_link\"") >&5
20013   (eval $ac_link) 2>&5
20014   ac_status=$?
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit "$ac_status"); } &&
20017          { ac_try='test -s "conftest$ac_exeext"'
20018   { (eval echo "$as_me:20018: \"$ac_try\"") >&5
20019   (eval $ac_try) 2>&5
20020   ac_status=$?
20021   echo "$as_me:20021: \$? = $ac_status" >&5
20022   (exit "$ac_status"); }; }; then
20023
20024                         cf_cv_regex_hdrs=$cf_regex_hdr
20025                         break
20026
20027 else
20028   echo "$as_me: failed program was:" >&5
20029 cat "conftest.$ac_ext" >&5
20030 fi
20031 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20032         done
20033         ;;
20034 (*)
20035         for cf_regex_hdr in regex.h
20036         do
20037                 cat >"conftest.$ac_ext" <<_ACEOF
20038 #line 20038 "configure"
20039 #include "confdefs.h"
20040 #include <sys/types.h>
20041 #include <$cf_regex_hdr>
20042 int
20043 main (void)
20044 {
20045
20046                         regex_t *p = 0;
20047                         int x = regcomp(p, "", 0);
20048                         int y = regexec(p, "", 0, 0, 0);
20049                         (void)x;
20050                         (void)y;
20051                         regfree(p);
20052
20053   ;
20054   return 0;
20055 }
20056 _ACEOF
20057 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20058 if { (eval echo "$as_me:20058: \"$ac_link\"") >&5
20059   (eval $ac_link) 2>&5
20060   ac_status=$?
20061   echo "$as_me:20061: \$? = $ac_status" >&5
20062   (exit "$ac_status"); } &&
20063          { ac_try='test -s "conftest$ac_exeext"'
20064   { (eval echo "$as_me:20064: \"$ac_try\"") >&5
20065   (eval $ac_try) 2>&5
20066   ac_status=$?
20067   echo "$as_me:20067: \$? = $ac_status" >&5
20068   (exit "$ac_status"); }; }; then
20069
20070                         cf_cv_regex_hdrs=$cf_regex_hdr
20071                         break
20072
20073 else
20074   echo "$as_me: failed program was:" >&5
20075 cat "conftest.$ac_ext" >&5
20076 fi
20077 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20078         done
20079         ;;
20080 esac
20081
20082 fi
20083 echo "$as_me:20083: result: $cf_cv_regex_hdrs" >&5
20084 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20085
20086 case "$cf_cv_regex_hdrs" in
20087         (no)            { echo "$as_me:20087: WARNING: no regular expression header found" >&5
20088 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20089         (regex.h)
20090 cat >>confdefs.h <<\EOF
20091 #define HAVE_REGEX_H_FUNCS 1
20092 EOF
20093  ;;
20094         (regexp.h)
20095 cat >>confdefs.h <<\EOF
20096 #define HAVE_REGEXP_H_FUNCS 1
20097 EOF
20098  ;;
20099         (regexpr.h)
20100 cat >>confdefs.h <<\EOF
20101 #define HAVE_REGEXPR_H_FUNCS 1
20102 EOF
20103  ;;
20104 esac
20105
20106 for ac_header in \
20107 fcntl.h \
20108 getopt.h \
20109 limits.h \
20110 locale.h \
20111 math.h \
20112 poll.h \
20113 sys/ioctl.h \
20114 sys/param.h \
20115 sys/poll.h \
20116 sys/select.h \
20117 sys/time.h \
20118 sys/times.h \
20119 unistd.h \
20120 wctype.h \
20121
20122 do
20123 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20124 echo "$as_me:20124: checking for $ac_header" >&5
20125 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20126 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20127   echo $ECHO_N "(cached) $ECHO_C" >&6
20128 else
20129   cat >"conftest.$ac_ext" <<_ACEOF
20130 #line 20130 "configure"
20131 #include "confdefs.h"
20132 #include <$ac_header>
20133 _ACEOF
20134 if { (eval echo "$as_me:20134: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20135   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20136   ac_status=$?
20137   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20138   rm -f conftest.er1
20139   cat conftest.err >&5
20140   echo "$as_me:20140: \$? = $ac_status" >&5
20141   (exit "$ac_status"); } >/dev/null; then
20142   if test -s conftest.err; then
20143     ac_cpp_err=$ac_c_preproc_warn_flag
20144   else
20145     ac_cpp_err=
20146   fi
20147 else
20148   ac_cpp_err=yes
20149 fi
20150 if test -z "$ac_cpp_err"; then
20151   eval "$as_ac_Header=yes"
20152 else
20153   echo "$as_me: failed program was:" >&5
20154   cat "conftest.$ac_ext" >&5
20155   eval "$as_ac_Header=no"
20156 fi
20157 rm -f conftest.err "conftest.$ac_ext"
20158 fi
20159 echo "$as_me:20159: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20160 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20161 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20162   cat >>confdefs.h <<EOF
20163 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20164 EOF
20165
20166 fi
20167 done
20168
20169 for ac_header in unistd.h getopt.h
20170 do
20171 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20172 echo "$as_me:20172: checking for $ac_header" >&5
20173 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20174 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20175   echo $ECHO_N "(cached) $ECHO_C" >&6
20176 else
20177   cat >"conftest.$ac_ext" <<_ACEOF
20178 #line 20178 "configure"
20179 #include "confdefs.h"
20180 #include <$ac_header>
20181 _ACEOF
20182 if { (eval echo "$as_me:20182: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20183   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20184   ac_status=$?
20185   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20186   rm -f conftest.er1
20187   cat conftest.err >&5
20188   echo "$as_me:20188: \$? = $ac_status" >&5
20189   (exit "$ac_status"); } >/dev/null; then
20190   if test -s conftest.err; then
20191     ac_cpp_err=$ac_c_preproc_warn_flag
20192   else
20193     ac_cpp_err=
20194   fi
20195 else
20196   ac_cpp_err=yes
20197 fi
20198 if test -z "$ac_cpp_err"; then
20199   eval "$as_ac_Header=yes"
20200 else
20201   echo "$as_me: failed program was:" >&5
20202   cat "conftest.$ac_ext" >&5
20203   eval "$as_ac_Header=no"
20204 fi
20205 rm -f conftest.err "conftest.$ac_ext"
20206 fi
20207 echo "$as_me:20207: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20208 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20209 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20210   cat >>confdefs.h <<EOF
20211 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20212 EOF
20213
20214 fi
20215 done
20216
20217 echo "$as_me:20217: checking for header declaring getopt variables" >&5
20218 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20219 if test "${cf_cv_getopt_header+set}" = set; then
20220   echo $ECHO_N "(cached) $ECHO_C" >&6
20221 else
20222
20223 cf_cv_getopt_header=none
20224 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20225 do
20226 cat >"conftest.$ac_ext" <<_ACEOF
20227 #line 20227 "configure"
20228 #include "confdefs.h"
20229
20230 #include <$cf_header>
20231 int
20232 main (void)
20233 {
20234 int x = optind; char *y = optarg; (void)x; (void)y
20235   ;
20236   return 0;
20237 }
20238 _ACEOF
20239 rm -f "conftest.$ac_objext"
20240 if { (eval echo "$as_me:20240: \"$ac_compile\"") >&5
20241   (eval $ac_compile) 2>&5
20242   ac_status=$?
20243   echo "$as_me:20243: \$? = $ac_status" >&5
20244   (exit "$ac_status"); } &&
20245          { ac_try='test -s "conftest.$ac_objext"'
20246   { (eval echo "$as_me:20246: \"$ac_try\"") >&5
20247   (eval $ac_try) 2>&5
20248   ac_status=$?
20249   echo "$as_me:20249: \$? = $ac_status" >&5
20250   (exit "$ac_status"); }; }; then
20251   cf_cv_getopt_header=$cf_header
20252  break
20253 else
20254   echo "$as_me: failed program was:" >&5
20255 cat "conftest.$ac_ext" >&5
20256 fi
20257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20258 done
20259
20260 fi
20261 echo "$as_me:20261: result: $cf_cv_getopt_header" >&5
20262 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20263 if test "$cf_cv_getopt_header" != none ; then
20264
20265 cat >>confdefs.h <<\EOF
20266 #define HAVE_GETOPT_HEADER 1
20267 EOF
20268
20269 fi
20270 if test "$cf_cv_getopt_header" = getopt.h ; then
20271
20272 cat >>confdefs.h <<\EOF
20273 #define NEED_GETOPT_H 1
20274 EOF
20275
20276 fi
20277
20278 echo "$as_me:20278: checking if external environ is declared" >&5
20279 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20280 if test "${cf_cv_dcl_environ+set}" = set; then
20281   echo $ECHO_N "(cached) $ECHO_C" >&6
20282 else
20283
20284     cat >"conftest.$ac_ext" <<_ACEOF
20285 #line 20285 "configure"
20286 #include "confdefs.h"
20287
20288 #ifdef HAVE_STDLIB_H
20289 #include <stdlib.h>
20290 #endif
20291 #include <unistd.h>
20292 int
20293 main (void)
20294 {
20295 int x = (int) environ
20296   ;
20297   return 0;
20298 }
20299 _ACEOF
20300 rm -f "conftest.$ac_objext"
20301 if { (eval echo "$as_me:20301: \"$ac_compile\"") >&5
20302   (eval $ac_compile) 2>&5
20303   ac_status=$?
20304   echo "$as_me:20304: \$? = $ac_status" >&5
20305   (exit "$ac_status"); } &&
20306          { ac_try='test -s "conftest.$ac_objext"'
20307   { (eval echo "$as_me:20307: \"$ac_try\"") >&5
20308   (eval $ac_try) 2>&5
20309   ac_status=$?
20310   echo "$as_me:20310: \$? = $ac_status" >&5
20311   (exit "$ac_status"); }; }; then
20312   cf_cv_dcl_environ=yes
20313 else
20314   echo "$as_me: failed program was:" >&5
20315 cat "conftest.$ac_ext" >&5
20316 cf_cv_dcl_environ=no
20317 fi
20318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20319
20320 fi
20321 echo "$as_me:20321: result: $cf_cv_dcl_environ" >&5
20322 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20323
20324 if test "$cf_cv_dcl_environ" = no ; then
20325
20326 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20327
20328     cat >>confdefs.h <<EOF
20329 #define $cf_result 1
20330 EOF
20331
20332 fi
20333
20334 # It's possible (for near-UNIX clones) that the data doesn't exist
20335
20336 echo "$as_me:20336: checking if external environ exists" >&5
20337 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20338 if test "${cf_cv_have_environ+set}" = set; then
20339   echo $ECHO_N "(cached) $ECHO_C" >&6
20340 else
20341
20342         cat >"conftest.$ac_ext" <<_ACEOF
20343 #line 20343 "configure"
20344 #include "confdefs.h"
20345
20346 #undef environ
20347 extern int environ;
20348
20349 int
20350 main (void)
20351 {
20352 environ = 2
20353   ;
20354   return 0;
20355 }
20356 _ACEOF
20357 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20358 if { (eval echo "$as_me:20358: \"$ac_link\"") >&5
20359   (eval $ac_link) 2>&5
20360   ac_status=$?
20361   echo "$as_me:20361: \$? = $ac_status" >&5
20362   (exit "$ac_status"); } &&
20363          { ac_try='test -s "conftest$ac_exeext"'
20364   { (eval echo "$as_me:20364: \"$ac_try\"") >&5
20365   (eval $ac_try) 2>&5
20366   ac_status=$?
20367   echo "$as_me:20367: \$? = $ac_status" >&5
20368   (exit "$ac_status"); }; }; then
20369   cf_cv_have_environ=yes
20370 else
20371   echo "$as_me: failed program was:" >&5
20372 cat "conftest.$ac_ext" >&5
20373 cf_cv_have_environ=no
20374 fi
20375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20376
20377 fi
20378 echo "$as_me:20378: result: $cf_cv_have_environ" >&5
20379 echo "${ECHO_T}$cf_cv_have_environ" >&6
20380
20381 if test "$cf_cv_have_environ" = yes ; then
20382
20383 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20384
20385         cat >>confdefs.h <<EOF
20386 #define $cf_result 1
20387 EOF
20388
20389 fi
20390
20391 echo "$as_me:20391: checking for getenv" >&5
20392 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20393 if test "${ac_cv_func_getenv+set}" = set; then
20394   echo $ECHO_N "(cached) $ECHO_C" >&6
20395 else
20396   cat >"conftest.$ac_ext" <<_ACEOF
20397 #line 20397 "configure"
20398 #include "confdefs.h"
20399 #define getenv autoconf_temporary
20400 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20401 #undef getenv
20402
20403 #ifdef __cplusplus
20404 extern "C"
20405 #endif
20406
20407 /* We use char because int might match the return type of a gcc2
20408    builtin and then its argument prototype would still apply.  */
20409 char getenv (void);
20410
20411 int
20412 main (void)
20413 {
20414
20415 /* The GNU C library defines stubs for functions which it implements
20416     to always fail with ENOSYS.  Some functions are actually named
20417     something starting with __ and the normal name is an alias.  */
20418 #if defined (__stub_getenv) || defined (__stub___getenv)
20419 #error found stub for getenv
20420 #endif
20421
20422         return getenv ();
20423   ;
20424   return 0;
20425 }
20426 _ACEOF
20427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20428 if { (eval echo "$as_me:20428: \"$ac_link\"") >&5
20429   (eval $ac_link) 2>&5
20430   ac_status=$?
20431   echo "$as_me:20431: \$? = $ac_status" >&5
20432   (exit "$ac_status"); } &&
20433          { ac_try='test -s "conftest$ac_exeext"'
20434   { (eval echo "$as_me:20434: \"$ac_try\"") >&5
20435   (eval $ac_try) 2>&5
20436   ac_status=$?
20437   echo "$as_me:20437: \$? = $ac_status" >&5
20438   (exit "$ac_status"); }; }; then
20439   ac_cv_func_getenv=yes
20440 else
20441   echo "$as_me: failed program was:" >&5
20442 cat "conftest.$ac_ext" >&5
20443 ac_cv_func_getenv=no
20444 fi
20445 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20446 fi
20447 echo "$as_me:20447: result: $ac_cv_func_getenv" >&5
20448 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20449
20450 for ac_func in putenv setenv strdup
20451 do
20452 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20453 echo "$as_me:20453: checking for $ac_func" >&5
20454 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20455 if eval "test \"\${$as_ac_var+set}\" = set"; then
20456   echo $ECHO_N "(cached) $ECHO_C" >&6
20457 else
20458   cat >"conftest.$ac_ext" <<_ACEOF
20459 #line 20459 "configure"
20460 #include "confdefs.h"
20461 #define $ac_func autoconf_temporary
20462 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20463 #undef $ac_func
20464
20465 #ifdef __cplusplus
20466 extern "C"
20467 #endif
20468
20469 /* We use char because int might match the return type of a gcc2
20470    builtin and then its argument prototype would still apply.  */
20471 char $ac_func (void);
20472
20473 int
20474 main (void)
20475 {
20476
20477 /* The GNU C library defines stubs for functions which it implements
20478     to always fail with ENOSYS.  Some functions are actually named
20479     something starting with __ and the normal name is an alias.  */
20480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20481 #error found stub for $ac_func
20482 #endif
20483
20484         return $ac_func ();
20485   ;
20486   return 0;
20487 }
20488 _ACEOF
20489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20490 if { (eval echo "$as_me:20490: \"$ac_link\"") >&5
20491   (eval $ac_link) 2>&5
20492   ac_status=$?
20493   echo "$as_me:20493: \$? = $ac_status" >&5
20494   (exit "$ac_status"); } &&
20495          { ac_try='test -s "conftest$ac_exeext"'
20496   { (eval echo "$as_me:20496: \"$ac_try\"") >&5
20497   (eval $ac_try) 2>&5
20498   ac_status=$?
20499   echo "$as_me:20499: \$? = $ac_status" >&5
20500   (exit "$ac_status"); }; }; then
20501   eval "$as_ac_var=yes"
20502 else
20503   echo "$as_me: failed program was:" >&5
20504 cat "conftest.$ac_ext" >&5
20505 eval "$as_ac_var=no"
20506 fi
20507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20508 fi
20509 echo "$as_me:20509: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20510 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20511 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20512   cat >>confdefs.h <<EOF
20513 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20514 EOF
20515
20516 fi
20517 done
20518
20519 echo "$as_me:20519: checking if getenv returns consistent values" >&5
20520 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20521 if test "${cf_cv_consistent_getenv+set}" = set; then
20522   echo $ECHO_N "(cached) $ECHO_C" >&6
20523 else
20524
20525 if test "$cross_compiling" = yes; then
20526   cf_cv_consistent_getenv=unknown
20527 else
20528   cat >"conftest.$ac_ext" <<_ACEOF
20529 #line 20529 "configure"
20530 #include "confdefs.h"
20531
20532 #include <stdlib.h>
20533 #include <unistd.h>
20534 #include <stdio.h>
20535 #include <string.h>
20536 #include <sys/types.h>
20537
20538 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20539 extern char **environ;  /* POSIX, but some systems are not... */
20540 #endif
20541
20542 #if defined(HAVE_STRDUP)
20543 #define str_alloc(s) strdup(s)
20544 #else
20545 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20546 #endif
20547
20548 static void set_value(const char *name, const char *value)
20549 {
20550 #if defined(HAVE_SETENV)
20551         setenv(name, value, 1);
20552 #elif defined(HAVE_PUTENV)
20553         char buffer[1024];
20554         sprintf(buffer, "%s=%s", name, value);
20555         putenv(str_alloc(buffer));
20556 #else
20557 #error neither putenv/setenv found
20558 #endif
20559 }
20560 int main(void)
20561 {
20562         int pass;
20563         size_t numenv, limit, j;
20564         char **mynames;
20565         char **myvalues;
20566         char **mypointer;
20567         char *equals;
20568         for (numenv = 0; environ[numenv]; ++numenv) ;
20569         limit = numenv + 10;
20570         mynames = (char **) calloc(limit + 1, sizeof(char *));
20571         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20572         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20573 #if defined(HAVE_ENVIRON)
20574         for (j = 0; environ[j]; ++j) {
20575                 mynames[j] = str_alloc(environ[j]);
20576                 equals = strchr(mynames[j], '=');
20577                 if (equals != 0) {
20578                         *equals++ = '\\0';
20579                         myvalues[j] = str_alloc(equals);
20580                 } else {
20581                         myvalues[j] = str_alloc("");
20582                 }
20583         }
20584 #endif
20585         for (j = numenv; j < limit; ++j) {
20586                 char name[80];
20587                 char value[80];
20588                 size_t found;
20589                 size_t k = 0;
20590                 do {
20591                         size_t jk;
20592                         found = 0;
20593                         sprintf(name, "TERM%lu", (unsigned long) k);
20594                         for (jk = 0; jk < j; ++jk) {
20595                                 if (!strcmp(name, mynames[jk])) {
20596                                         found = 1;
20597                                         ++k;
20598                                         break;
20599                                 }
20600                         }
20601                 } while (found);
20602                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20603                 set_value(name, value);
20604                 mynames[j] = str_alloc(name);
20605                 myvalues[j] = str_alloc(value);
20606         }
20607         for (pass = 0; pass < 3; ++pass) {
20608                 for (j = 0; j < limit; ++j) {
20609                         char *value = getenv(mynames[j]);
20610                         if (pass) {
20611                                 if (value == 0) {
20612                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20613                                         ${cf_cv_main_return:-return}(1);
20614                                 } else if (value != mypointer[j]) {
20615                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20616                                         ${cf_cv_main_return:-return}(1);
20617                                 } else if (strcmp(value, myvalues[j])) {
20618                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20619                                         ${cf_cv_main_return:-return}(1);
20620                                 }
20621                         } else {
20622                                 size_t k;
20623                                 mypointer[j] = value;
20624                                 for (k = 0; k < j; ++k) {
20625                                         if (mypointer[j] == mypointer[k]) {
20626                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20627                                                 ${cf_cv_main_return:-return}(1);
20628                                         }
20629                                 }
20630                         }
20631                 }
20632         }
20633         ${cf_cv_main_return:-return}(0);
20634 }
20635
20636 _ACEOF
20637 rm -f "conftest$ac_exeext"
20638 if { (eval echo "$as_me:20638: \"$ac_link\"") >&5
20639   (eval $ac_link) 2>&5
20640   ac_status=$?
20641   echo "$as_me:20641: \$? = $ac_status" >&5
20642   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20643   { (eval echo "$as_me:20643: \"$ac_try\"") >&5
20644   (eval $ac_try) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit "$ac_status"); }; }; then
20648   cf_cv_consistent_getenv=yes
20649 else
20650   echo "$as_me: program exited with status $ac_status" >&5
20651 echo "$as_me: failed program was:" >&5
20652 cat "conftest.$ac_ext" >&5
20653 cf_cv_consistent_getenv=no
20654 fi
20655 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20656 fi
20657
20658 fi
20659 echo "$as_me:20659: result: $cf_cv_consistent_getenv" >&5
20660 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20661
20662 if test "x$cf_cv_consistent_getenv" = xno
20663 then
20664
20665 cat >>confdefs.h <<\EOF
20666 #define HAVE_CONSISTENT_GETENV 1
20667 EOF
20668
20669 fi
20670
20671 if test "x$cf_cv_consistent_getenv" = xno && \
20672         test "x$cf_with_trace" = xyes
20673 then
20674         { echo "$as_me:20674: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20675 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20676 fi
20677
20678 echo "$as_me:20678: checking if sys/time.h works with sys/select.h" >&5
20679 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20680 if test "${cf_cv_sys_time_select+set}" = set; then
20681   echo $ECHO_N "(cached) $ECHO_C" >&6
20682 else
20683
20684 cat >"conftest.$ac_ext" <<_ACEOF
20685 #line 20685 "configure"
20686 #include "confdefs.h"
20687
20688 #include <sys/types.h>
20689 #ifdef HAVE_SYS_TIME_H
20690 #include <sys/time.h>
20691 #endif
20692 #ifdef HAVE_SYS_SELECT_H
20693 #include <sys/select.h>
20694 #endif
20695
20696 int
20697 main (void)
20698 {
20699
20700   ;
20701   return 0;
20702 }
20703 _ACEOF
20704 rm -f "conftest.$ac_objext"
20705 if { (eval echo "$as_me:20705: \"$ac_compile\"") >&5
20706   (eval $ac_compile) 2>&5
20707   ac_status=$?
20708   echo "$as_me:20708: \$? = $ac_status" >&5
20709   (exit "$ac_status"); } &&
20710          { ac_try='test -s "conftest.$ac_objext"'
20711   { (eval echo "$as_me:20711: \"$ac_try\"") >&5
20712   (eval $ac_try) 2>&5
20713   ac_status=$?
20714   echo "$as_me:20714: \$? = $ac_status" >&5
20715   (exit "$ac_status"); }; }; then
20716   cf_cv_sys_time_select=yes
20717 else
20718   echo "$as_me: failed program was:" >&5
20719 cat "conftest.$ac_ext" >&5
20720 cf_cv_sys_time_select=no
20721 fi
20722 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20723
20724 fi
20725
20726 echo "$as_me:20726: result: $cf_cv_sys_time_select" >&5
20727 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20728 test "$cf_cv_sys_time_select" = yes &&
20729 cat >>confdefs.h <<\EOF
20730 #define HAVE_SYS_TIME_SELECT 1
20731 EOF
20732
20733 ###     checks for compiler characteristics
20734 ac_ext=c
20735 ac_cpp='$CPP $CPPFLAGS'
20736 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20737 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20739 ac_main_return="return"
20740
20741 echo "$as_me:20741: checking for an ANSI C-conforming const" >&5
20742 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20743 if test "${ac_cv_c_const+set}" = set; then
20744   echo $ECHO_N "(cached) $ECHO_C" >&6
20745 else
20746   cat >"conftest.$ac_ext" <<_ACEOF
20747 #line 20747 "configure"
20748 #include "confdefs.h"
20749
20750 int
20751 main (void)
20752 {
20753 /* FIXME: Include the comments suggested by Paul. */
20754 #ifndef __cplusplus
20755   /* Ultrix mips cc rejects this.  */
20756   typedef int charset[2];
20757   const charset x;
20758   /* SunOS 4.1.1 cc rejects this.  */
20759   char const *const *ccp;
20760   char **p;
20761   /* NEC SVR4.0.2 mips cc rejects this.  */
20762   struct point {int x, y;};
20763   static struct point const zero = {0,0};
20764   /* AIX XL C 1.02.0.0 rejects this.
20765      It does not let you subtract one const X* pointer from another in
20766      an arm of an if-expression whose if-part is not a constant
20767      expression */
20768   const char *g = "string";
20769   ccp = &g + (g ? g-g : 0);
20770   /* HPUX 7.0 cc rejects these. */
20771   ++ccp;
20772   p = (char**) ccp;
20773   ccp = (char const *const *) p;
20774   { /* SCO 3.2v4 cc rejects this.  */
20775     char *t;
20776     char const *s = 0 ? (char *) 0 : (char const *) 0;
20777
20778     *t++ = 0;
20779   }
20780   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20781     int x[] = {25, 17};
20782     const int *foo = &x[0];
20783     ++foo;
20784   }
20785   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20786     typedef const int *iptr;
20787     iptr p = 0;
20788     ++p;
20789   }
20790   { /* AIX XL C 1.02.0.0 rejects this saying
20791        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20792     struct s { int j; const int *ap[3]; };
20793     struct s *b; b->j = 5;
20794   }
20795   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20796     const int foo = 10;
20797   }
20798 #endif
20799
20800   ;
20801   return 0;
20802 }
20803 _ACEOF
20804 rm -f "conftest.$ac_objext"
20805 if { (eval echo "$as_me:20805: \"$ac_compile\"") >&5
20806   (eval $ac_compile) 2>&5
20807   ac_status=$?
20808   echo "$as_me:20808: \$? = $ac_status" >&5
20809   (exit "$ac_status"); } &&
20810          { ac_try='test -s "conftest.$ac_objext"'
20811   { (eval echo "$as_me:20811: \"$ac_try\"") >&5
20812   (eval $ac_try) 2>&5
20813   ac_status=$?
20814   echo "$as_me:20814: \$? = $ac_status" >&5
20815   (exit "$ac_status"); }; }; then
20816   ac_cv_c_const=yes
20817 else
20818   echo "$as_me: failed program was:" >&5
20819 cat "conftest.$ac_ext" >&5
20820 ac_cv_c_const=no
20821 fi
20822 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20823 fi
20824 echo "$as_me:20824: result: $ac_cv_c_const" >&5
20825 echo "${ECHO_T}$ac_cv_c_const" >&6
20826 if test $ac_cv_c_const = no; then
20827
20828 cat >>confdefs.h <<\EOF
20829 #define const
20830 EOF
20831
20832 fi
20833
20834 echo "$as_me:20834: checking for inline" >&5
20835 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20836 if test "${ac_cv_c_inline+set}" = set; then
20837   echo $ECHO_N "(cached) $ECHO_C" >&6
20838 else
20839   ac_cv_c_inline=no
20840 for ac_kw in inline __inline__ __inline; do
20841   cat >"conftest.$ac_ext" <<_ACEOF
20842 #line 20842 "configure"
20843 #include "confdefs.h"
20844 #ifndef __cplusplus
20845 static $ac_kw int static_foo () {return 0; }
20846 $ac_kw int foo () {return 0; }
20847 #endif
20848
20849 _ACEOF
20850 rm -f "conftest.$ac_objext"
20851 if { (eval echo "$as_me:20851: \"$ac_compile\"") >&5
20852   (eval $ac_compile) 2>&5
20853   ac_status=$?
20854   echo "$as_me:20854: \$? = $ac_status" >&5
20855   (exit "$ac_status"); } &&
20856          { ac_try='test -s "conftest.$ac_objext"'
20857   { (eval echo "$as_me:20857: \"$ac_try\"") >&5
20858   (eval $ac_try) 2>&5
20859   ac_status=$?
20860   echo "$as_me:20860: \$? = $ac_status" >&5
20861   (exit "$ac_status"); }; }; then
20862   ac_cv_c_inline=$ac_kw; break
20863 else
20864   echo "$as_me: failed program was:" >&5
20865 cat "conftest.$ac_ext" >&5
20866 fi
20867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20868 done
20869
20870 fi
20871 echo "$as_me:20871: result: $ac_cv_c_inline" >&5
20872 echo "${ECHO_T}$ac_cv_c_inline" >&6
20873 case $ac_cv_c_inline in
20874   inline | yes) ;;
20875   no)
20876 cat >>confdefs.h <<\EOF
20877 #define inline
20878 EOF
20879  ;;
20880   *)  cat >>confdefs.h <<EOF
20881 #define inline $ac_cv_c_inline
20882 EOF
20883  ;;
20884 esac
20885
20886 NCURSES_INLINE=
20887 if test "$ac_cv_c_inline" != no ; then
20888         NCURSES_INLINE=inline
20889         if test "$INTEL_COMPILER" = yes
20890         then
20891                 :
20892         elif test "$CLANG_COMPILER" = yes
20893         then
20894                 :
20895         elif test "$GCC" = yes
20896         then
20897                 echo "$as_me:20897: checking if $CC supports options to tune inlining" >&5
20898 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20899 if test "${cf_cv_gcc_inline+set}" = set; then
20900   echo $ECHO_N "(cached) $ECHO_C" >&6
20901 else
20902
20903                 cf_save_CFLAGS=$CFLAGS
20904                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20905                 cat >"conftest.$ac_ext" <<_ACEOF
20906 #line 20906 "configure"
20907 #include "confdefs.h"
20908 inline int foo(void) { return 1; }
20909 int
20910 main (void)
20911 {
20912 ${cf_cv_main_return:-return} foo()
20913   ;
20914   return 0;
20915 }
20916 _ACEOF
20917 rm -f "conftest.$ac_objext"
20918 if { (eval echo "$as_me:20918: \"$ac_compile\"") >&5
20919   (eval $ac_compile) 2>&5
20920   ac_status=$?
20921   echo "$as_me:20921: \$? = $ac_status" >&5
20922   (exit "$ac_status"); } &&
20923          { ac_try='test -s "conftest.$ac_objext"'
20924   { (eval echo "$as_me:20924: \"$ac_try\"") >&5
20925   (eval $ac_try) 2>&5
20926   ac_status=$?
20927   echo "$as_me:20927: \$? = $ac_status" >&5
20928   (exit "$ac_status"); }; }; then
20929   cf_cv_gcc_inline=yes
20930 else
20931   echo "$as_me: failed program was:" >&5
20932 cat "conftest.$ac_ext" >&5
20933 cf_cv_gcc_inline=no
20934 fi
20935 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20936                 CFLAGS=$cf_save_CFLAGS
20937
20938 fi
20939 echo "$as_me:20939: result: $cf_cv_gcc_inline" >&5
20940 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20941                 if test "$cf_cv_gcc_inline" = yes ; then
20942
20943 cf_fix_cppflags=no
20944 cf_new_cflags=
20945 cf_new_cppflags=
20946 cf_new_extra_cppflags=
20947
20948 for cf_add_cflags in --param max-inline-insns-single=1200
20949 do
20950 case "$cf_fix_cppflags" in
20951 (no)
20952         case "$cf_add_cflags" in
20953         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20954                 case "$cf_add_cflags" in
20955                 (-D*)
20956                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20957
20958                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20959                                 && test -z "${cf_tst_cflags}" \
20960                                 && cf_fix_cppflags=yes
20961
20962                         if test "$cf_fix_cppflags" = yes ; then
20963
20964         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20965         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20966
20967                                 continue
20968                         elif test "${cf_tst_cflags}" = "\"'" ; then
20969
20970         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20971         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20972
20973                                 continue
20974                         fi
20975                         ;;
20976                 esac
20977                 case "$CPPFLAGS" in
20978                 (*$cf_add_cflags)
20979                         ;;
20980                 (*)
20981                         case "$cf_add_cflags" in
20982                         (-D*)
20983                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20984
20985 CPPFLAGS=`echo "$CPPFLAGS" | \
20986         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20987                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20988
20989                                 ;;
20990                         esac
20991
20992         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20993         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20994
20995                         ;;
20996                 esac
20997                 ;;
20998         (*)
20999
21000         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21001         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21002
21003                 ;;
21004         esac
21005         ;;
21006 (yes)
21007
21008         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21009         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21010
21011         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21012
21013         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21014                 && test -z "${cf_tst_cflags}" \
21015                 && cf_fix_cppflags=no
21016         ;;
21017 esac
21018 done
21019
21020 if test -n "$cf_new_cflags" ; then
21021
21022         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21023         CFLAGS="${CFLAGS}$cf_new_cflags"
21024
21025 fi
21026
21027 if test -n "$cf_new_cppflags" ; then
21028
21029         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21030         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21031
21032 fi
21033
21034 if test -n "$cf_new_extra_cppflags" ; then
21035
21036         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21037         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21038
21039 fi
21040
21041                 fi
21042         fi
21043 fi
21044
21045 echo "$as_me:21045: checking for signal global datatype" >&5
21046 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21047 if test "${cf_cv_sig_atomic_t+set}" = set; then
21048   echo $ECHO_N "(cached) $ECHO_C" >&6
21049 else
21050
21051         for cf_type in \
21052                 "volatile sig_atomic_t" \
21053                 "sig_atomic_t" \
21054                 "int"
21055         do
21056         cat >"conftest.$ac_ext" <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059
21060 #include <sys/types.h>
21061 #include <signal.h>
21062 #include <stdio.h>
21063
21064 extern $cf_type x;
21065 $cf_type x;
21066 static void handler(int sig)
21067 {
21068         (void)sig;
21069         x = 5;
21070 }
21071 int
21072 main (void)
21073 {
21074 signal(SIGINT, handler);
21075                  x = 1
21076   ;
21077   return 0;
21078 }
21079 _ACEOF
21080 rm -f "conftest.$ac_objext"
21081 if { (eval echo "$as_me:21081: \"$ac_compile\"") >&5
21082   (eval $ac_compile) 2>&5
21083   ac_status=$?
21084   echo "$as_me:21084: \$? = $ac_status" >&5
21085   (exit "$ac_status"); } &&
21086          { ac_try='test -s "conftest.$ac_objext"'
21087   { (eval echo "$as_me:21087: \"$ac_try\"") >&5
21088   (eval $ac_try) 2>&5
21089   ac_status=$?
21090   echo "$as_me:21090: \$? = $ac_status" >&5
21091   (exit "$ac_status"); }; }; then
21092   cf_cv_sig_atomic_t=$cf_type
21093 else
21094   echo "$as_me: failed program was:" >&5
21095 cat "conftest.$ac_ext" >&5
21096 cf_cv_sig_atomic_t=no
21097 fi
21098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21099                 test "$cf_cv_sig_atomic_t" != no && break
21100         done
21101
21102 fi
21103
21104 echo "$as_me:21104: result: $cf_cv_sig_atomic_t" >&5
21105 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21106 test "$cf_cv_sig_atomic_t" != no &&
21107 cat >>confdefs.h <<EOF
21108 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21109 EOF
21110
21111 if test "$NCURSES_CHTYPE" = auto ; then
21112
21113 echo "$as_me:21113: checking for type of chtype" >&5
21114 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21115 if test "${cf_cv_typeof_chtype+set}" = set; then
21116   echo $ECHO_N "(cached) $ECHO_C" >&6
21117 else
21118
21119                 if test "$cross_compiling" = yes; then
21120   cf_cv_typeof_chtype=long
21121 else
21122   cat >"conftest.$ac_ext" <<_ACEOF
21123 #line 21123 "configure"
21124 #include "confdefs.h"
21125
21126 #define WANT_BITS 31
21127 #include <stdio.h>
21128 int main(void)
21129 {
21130         FILE *fp = fopen("cf_test.out", "w");
21131         if (fp != 0) {
21132                 char *result = "long";
21133                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21134                         int n;
21135                         unsigned int x, y;
21136                         for (n = 0; n < WANT_BITS; n++) {
21137                                 x = (1 << n);
21138                                 y = (x >> n);
21139                                 if (y != 1 || x == 0) {
21140                                         x = 0;
21141                                         break;
21142                                 }
21143                         }
21144                         /*
21145                          * If x is nonzero, an int is big enough for the bits
21146                          * that we want.
21147                          */
21148                         result = (x != 0) ? "int" : "long";
21149                 }
21150                 fputs(result, fp);
21151                 fclose(fp);
21152         }
21153         ${cf_cv_main_return:-return}(0);
21154 }
21155
21156 _ACEOF
21157 rm -f "conftest$ac_exeext"
21158 if { (eval echo "$as_me:21158: \"$ac_link\"") >&5
21159   (eval $ac_link) 2>&5
21160   ac_status=$?
21161   echo "$as_me:21161: \$? = $ac_status" >&5
21162   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21163   { (eval echo "$as_me:21163: \"$ac_try\"") >&5
21164   (eval $ac_try) 2>&5
21165   ac_status=$?
21166   echo "$as_me:21166: \$? = $ac_status" >&5
21167   (exit "$ac_status"); }; }; then
21168   cf_cv_typeof_chtype=`cat cf_test.out`
21169 else
21170   echo "$as_me: program exited with status $ac_status" >&5
21171 echo "$as_me: failed program was:" >&5
21172 cat "conftest.$ac_ext" >&5
21173 cf_cv_typeof_chtype=long
21174 fi
21175 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21176 fi
21177                 rm -f cf_test.out
21178
21179 fi
21180
21181 echo "$as_me:21181: result: $cf_cv_typeof_chtype" >&5
21182 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21183
21184 cat >>confdefs.h <<EOF
21185 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21186 EOF
21187
21188 else
21189         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21190 fi
21191 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21192
21193 echo "$as_me:21193: checking if unsigned literals are legal" >&5
21194 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21195 if test "${cf_cv_unsigned_literals+set}" = set; then
21196   echo $ECHO_N "(cached) $ECHO_C" >&6
21197 else
21198
21199         cat >"conftest.$ac_ext" <<_ACEOF
21200 #line 21200 "configure"
21201 #include "confdefs.h"
21202
21203 int
21204 main (void)
21205 {
21206 long x = 1L + 1UL + 1U + 1
21207   ;
21208   return 0;
21209 }
21210 _ACEOF
21211 rm -f "conftest.$ac_objext"
21212 if { (eval echo "$as_me:21212: \"$ac_compile\"") >&5
21213   (eval $ac_compile) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit "$ac_status"); } &&
21217          { ac_try='test -s "conftest.$ac_objext"'
21218   { (eval echo "$as_me:21218: \"$ac_try\"") >&5
21219   (eval $ac_try) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit "$ac_status"); }; }; then
21223   cf_cv_unsigned_literals=yes
21224 else
21225   echo "$as_me: failed program was:" >&5
21226 cat "conftest.$ac_ext" >&5
21227 cf_cv_unsigned_literals=no
21228 fi
21229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21230
21231 fi
21232
21233 echo "$as_me:21233: result: $cf_cv_unsigned_literals" >&5
21234 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21235
21236 cf_cv_1UL="1"
21237 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21238 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21239
21240 if test "$NCURSES_MMASK_T" = auto ; then
21241         cf_cv_typeof_mmask_t=long
21242 else
21243         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21244 fi
21245 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21246
21247 ###     Checks for external-data
21248
21249 echo "$as_me:21249: checking if external errno is declared" >&5
21250 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21251 if test "${cf_cv_dcl_errno+set}" = set; then
21252   echo $ECHO_N "(cached) $ECHO_C" >&6
21253 else
21254
21255         cat >"conftest.$ac_ext" <<_ACEOF
21256 #line 21256 "configure"
21257 #include "confdefs.h"
21258
21259 #ifdef HAVE_STDLIB_H
21260 #include <stdlib.h>
21261 #endif
21262 #include <stdio.h>
21263 #include <sys/types.h>
21264 #include <errno.h>
21265 int
21266 main (void)
21267 {
21268 int x = (int) errno; (void)x
21269   ;
21270   return 0;
21271 }
21272 _ACEOF
21273 rm -f "conftest.$ac_objext"
21274 if { (eval echo "$as_me:21274: \"$ac_compile\"") >&5
21275   (eval $ac_compile) 2>&5
21276   ac_status=$?
21277   echo "$as_me:21277: \$? = $ac_status" >&5
21278   (exit "$ac_status"); } &&
21279          { ac_try='test -s "conftest.$ac_objext"'
21280   { (eval echo "$as_me:21280: \"$ac_try\"") >&5
21281   (eval $ac_try) 2>&5
21282   ac_status=$?
21283   echo "$as_me:21283: \$? = $ac_status" >&5
21284   (exit "$ac_status"); }; }; then
21285   cf_cv_dcl_errno=yes
21286 else
21287   echo "$as_me: failed program was:" >&5
21288 cat "conftest.$ac_ext" >&5
21289 cf_cv_dcl_errno=no
21290 fi
21291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21292
21293 fi
21294 echo "$as_me:21294: result: $cf_cv_dcl_errno" >&5
21295 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21296
21297 if test "$cf_cv_dcl_errno" = no ; then
21298
21299 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21300
21301         cat >>confdefs.h <<EOF
21302 #define $cf_result 1
21303 EOF
21304
21305 fi
21306
21307 # It's possible (for near-UNIX clones) that the data doesn't exist
21308
21309 echo "$as_me:21309: checking if external errno exists" >&5
21310 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21311 if test "${cf_cv_have_errno+set}" = set; then
21312   echo $ECHO_N "(cached) $ECHO_C" >&6
21313 else
21314
21315         cat >"conftest.$ac_ext" <<_ACEOF
21316 #line 21316 "configure"
21317 #include "confdefs.h"
21318
21319 #undef errno
21320 extern int errno;
21321
21322 int
21323 main (void)
21324 {
21325 errno = 2
21326   ;
21327   return 0;
21328 }
21329 _ACEOF
21330 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21331 if { (eval echo "$as_me:21331: \"$ac_link\"") >&5
21332   (eval $ac_link) 2>&5
21333   ac_status=$?
21334   echo "$as_me:21334: \$? = $ac_status" >&5
21335   (exit "$ac_status"); } &&
21336          { ac_try='test -s "conftest$ac_exeext"'
21337   { (eval echo "$as_me:21337: \"$ac_try\"") >&5
21338   (eval $ac_try) 2>&5
21339   ac_status=$?
21340   echo "$as_me:21340: \$? = $ac_status" >&5
21341   (exit "$ac_status"); }; }; then
21342   cf_cv_have_errno=yes
21343 else
21344   echo "$as_me: failed program was:" >&5
21345 cat "conftest.$ac_ext" >&5
21346 cf_cv_have_errno=no
21347 fi
21348 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21349
21350 fi
21351 echo "$as_me:21351: result: $cf_cv_have_errno" >&5
21352 echo "${ECHO_T}$cf_cv_have_errno" >&6
21353
21354 if test "$cf_cv_have_errno" = yes ; then
21355
21356 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21357
21358         cat >>confdefs.h <<EOF
21359 #define $cf_result 1
21360 EOF
21361
21362 fi
21363
21364 echo "$as_me:21364: checking if data-only library module links" >&5
21365 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21366 if test "${cf_cv_link_dataonly+set}" = set; then
21367   echo $ECHO_N "(cached) $ECHO_C" >&6
21368 else
21369
21370         rm -f conftest.a
21371         cat >conftest.$ac_ext <<EOF
21372 #line 21372 "configure"
21373 int     testdata[3] = { 123, 456, 789 };
21374 EOF
21375         if { (eval echo "$as_me:21375: \"$ac_compile\"") >&5
21376   (eval $ac_compile) 2>&5
21377   ac_status=$?
21378   echo "$as_me:21378: \$? = $ac_status" >&5
21379   (exit "$ac_status"); } ; then
21380                 mv conftest.o data.o && \
21381                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21382         fi
21383         rm -f conftest.$ac_ext data.o
21384         cat >conftest.$ac_ext <<EOF
21385 #line 21385 "configure"
21386 int     testfunc(void)
21387 {
21388 #if defined(NeXT)
21389         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21390 #else
21391         extern int testdata[3];
21392         return testdata[0] == 123
21393            &&  testdata[1] == 456
21394            &&  testdata[2] == 789;
21395 #endif
21396 }
21397 EOF
21398         if { (eval echo "$as_me:21398: \"$ac_compile\"") >&5
21399   (eval $ac_compile) 2>&5
21400   ac_status=$?
21401   echo "$as_me:21401: \$? = $ac_status" >&5
21402   (exit "$ac_status"); }; then
21403                 mv conftest.o func.o && \
21404                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21405         fi
21406         rm -f conftest.$ac_ext func.o
21407         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21408         cf_saveLIBS="$LIBS"
21409         LIBS="conftest.a $LIBS"
21410         if test "$cross_compiling" = yes; then
21411   cf_cv_link_dataonly=unknown
21412 else
21413   cat >"conftest.$ac_ext" <<_ACEOF
21414 #line 21414 "configure"
21415 #include "confdefs.h"
21416
21417         int main(void)
21418         {
21419                 extern int testfunc();
21420                 ${cf_cv_main_return:-return} (!testfunc());
21421         }
21422
21423 _ACEOF
21424 rm -f "conftest$ac_exeext"
21425 if { (eval echo "$as_me:21425: \"$ac_link\"") >&5
21426   (eval $ac_link) 2>&5
21427   ac_status=$?
21428   echo "$as_me:21428: \$? = $ac_status" >&5
21429   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21430   { (eval echo "$as_me:21430: \"$ac_try\"") >&5
21431   (eval $ac_try) 2>&5
21432   ac_status=$?
21433   echo "$as_me:21433: \$? = $ac_status" >&5
21434   (exit "$ac_status"); }; }; then
21435   cf_cv_link_dataonly=yes
21436 else
21437   echo "$as_me: program exited with status $ac_status" >&5
21438 echo "$as_me: failed program was:" >&5
21439 cat "conftest.$ac_ext" >&5
21440 cf_cv_link_dataonly=no
21441 fi
21442 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21443 fi
21444         LIBS="$cf_saveLIBS"
21445
21446 fi
21447
21448 echo "$as_me:21448: result: $cf_cv_link_dataonly" >&5
21449 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21450
21451 if test "$cf_cv_link_dataonly" = no ; then
21452
21453 cat >>confdefs.h <<\EOF
21454 #define BROKEN_LINKER 1
21455 EOF
21456
21457         BROKEN_LINKER=1
21458 fi
21459
21460 ###     Checks for library functions.
21461
21462 for ac_func in \
21463 getcwd \
21464 getegid \
21465 geteuid \
21466 getopt \
21467 issetugid \
21468 localeconv \
21469 poll \
21470 putenv \
21471 remove \
21472 select \
21473 setbuf \
21474 setbuffer \
21475 setenv \
21476 setfsuid \
21477 setvbuf \
21478 sigaction \
21479 sigvec \
21480 snprintf \
21481 strdup \
21482 strstr \
21483 sysconf \
21484 tcgetpgrp \
21485 times \
21486 tsearch \
21487 vsnprintf \
21488
21489 do
21490 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21491 echo "$as_me:21491: checking for $ac_func" >&5
21492 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21493 if eval "test \"\${$as_ac_var+set}\" = set"; then
21494   echo $ECHO_N "(cached) $ECHO_C" >&6
21495 else
21496   cat >"conftest.$ac_ext" <<_ACEOF
21497 #line 21497 "configure"
21498 #include "confdefs.h"
21499 #define $ac_func autoconf_temporary
21500 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21501 #undef $ac_func
21502
21503 #ifdef __cplusplus
21504 extern "C"
21505 #endif
21506
21507 /* We use char because int might match the return type of a gcc2
21508    builtin and then its argument prototype would still apply.  */
21509 char $ac_func (void);
21510
21511 int
21512 main (void)
21513 {
21514
21515 /* The GNU C library defines stubs for functions which it implements
21516     to always fail with ENOSYS.  Some functions are actually named
21517     something starting with __ and the normal name is an alias.  */
21518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21519 #error found stub for $ac_func
21520 #endif
21521
21522         return $ac_func ();
21523   ;
21524   return 0;
21525 }
21526 _ACEOF
21527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21528 if { (eval echo "$as_me:21528: \"$ac_link\"") >&5
21529   (eval $ac_link) 2>&5
21530   ac_status=$?
21531   echo "$as_me:21531: \$? = $ac_status" >&5
21532   (exit "$ac_status"); } &&
21533          { ac_try='test -s "conftest$ac_exeext"'
21534   { (eval echo "$as_me:21534: \"$ac_try\"") >&5
21535   (eval $ac_try) 2>&5
21536   ac_status=$?
21537   echo "$as_me:21537: \$? = $ac_status" >&5
21538   (exit "$ac_status"); }; }; then
21539   eval "$as_ac_var=yes"
21540 else
21541   echo "$as_me: failed program was:" >&5
21542 cat "conftest.$ac_ext" >&5
21543 eval "$as_ac_var=no"
21544 fi
21545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21546 fi
21547 echo "$as_me:21547: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21548 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21549 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21550   cat >>confdefs.h <<EOF
21551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21552 EOF
21553
21554 fi
21555 done
21556
21557 echo "$as_me:21557: checking if _PATH_TTYS is defined in ttyent.h" >&5
21558 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21559 if test "${cf_cv_PATH_TTYS+set}" = set; then
21560   echo $ECHO_N "(cached) $ECHO_C" >&6
21561 else
21562
21563 cat >"conftest.$ac_ext" <<_ACEOF
21564 #line 21564 "configure"
21565 #include "confdefs.h"
21566
21567 #include <stdio.h>
21568 #include <ttyent.h>
21569 int
21570 main (void)
21571 {
21572
21573 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21574   ;
21575   return 0;
21576 }
21577 _ACEOF
21578 rm -f "conftest.$ac_objext"
21579 if { (eval echo "$as_me:21579: \"$ac_compile\"") >&5
21580   (eval $ac_compile) 2>&5
21581   ac_status=$?
21582   echo "$as_me:21582: \$? = $ac_status" >&5
21583   (exit "$ac_status"); } &&
21584          { ac_try='test -s "conftest.$ac_objext"'
21585   { (eval echo "$as_me:21585: \"$ac_try\"") >&5
21586   (eval $ac_try) 2>&5
21587   ac_status=$?
21588   echo "$as_me:21588: \$? = $ac_status" >&5
21589   (exit "$ac_status"); }; }; then
21590   cf_cv_PATH_TTYS=yes
21591 else
21592   echo "$as_me: failed program was:" >&5
21593 cat "conftest.$ac_ext" >&5
21594 cf_cv_PATH_TTYS=no
21595 fi
21596 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21597 fi
21598 echo "$as_me:21598: result: $cf_cv_PATH_TTYS" >&5
21599 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21600
21601 if test $cf_cv_PATH_TTYS = no
21602 then
21603         for cf_ttys in /etc/ttytype /etc/ttys
21604         do
21605                 if test -f $cf_ttys
21606                 then
21607                         cf_cv_PATH_TTYS=maybe
21608
21609 cat >>confdefs.h <<\EOF
21610 #define _PATH_TTYS $cf_ttys
21611 EOF
21612
21613                         break
21614                 fi
21615         done
21616 fi
21617
21618 if test $cf_cv_PATH_TTYS != no
21619 then
21620         echo "$as_me:21620: checking if _PATH_TTYS file exists" >&5
21621 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21622 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21623   echo $ECHO_N "(cached) $ECHO_C" >&6
21624 else
21625
21626                 if test "$cross_compiling" = yes; then
21627   cf_cv_have_PATH_TTYS=unknown
21628 else
21629   cat >"conftest.$ac_ext" <<_ACEOF
21630 #line 21630 "configure"
21631 #include "confdefs.h"
21632
21633 #include <stdio.h>
21634 #include <ttyent.h>
21635 int main(void) {
21636         FILE *fp = fopen(_PATH_TTYS, "r");
21637         ${cf_cv_main_return:-return} (fp == 0);
21638 }
21639 _ACEOF
21640 rm -f "conftest$ac_exeext"
21641 if { (eval echo "$as_me:21641: \"$ac_link\"") >&5
21642   (eval $ac_link) 2>&5
21643   ac_status=$?
21644   echo "$as_me:21644: \$? = $ac_status" >&5
21645   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21646   { (eval echo "$as_me:21646: \"$ac_try\"") >&5
21647   (eval $ac_try) 2>&5
21648   ac_status=$?
21649   echo "$as_me:21649: \$? = $ac_status" >&5
21650   (exit "$ac_status"); }; }; then
21651   cf_cv_have_PATH_TTYS=yes
21652 else
21653   echo "$as_me: program exited with status $ac_status" >&5
21654 echo "$as_me: failed program was:" >&5
21655 cat "conftest.$ac_ext" >&5
21656 cf_cv_have_PATH_TTYS=no
21657 fi
21658 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21659 fi
21660 fi
21661 echo "$as_me:21661: result: $cf_cv_have_PATH_TTYS" >&5
21662 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21663         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21664 fi
21665
21666 if test $cf_cv_PATH_TTYS != no
21667 then
21668
21669 cat >>confdefs.h <<\EOF
21670 #define HAVE_PATH_TTYS 1
21671 EOF
21672
21673         echo "$as_me:21673: checking for getttynam" >&5
21674 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21675 if test "${cf_cv_func_getttynam+set}" = set; then
21676   echo $ECHO_N "(cached) $ECHO_C" >&6
21677 else
21678
21679                 cat >"conftest.$ac_ext" <<_ACEOF
21680 #line 21680 "configure"
21681 #include "confdefs.h"
21682 #include <ttyent.h>
21683 int
21684 main (void)
21685 {
21686 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21687   ;
21688   return 0;
21689 }
21690 _ACEOF
21691 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21692 if { (eval echo "$as_me:21692: \"$ac_link\"") >&5
21693   (eval $ac_link) 2>&5
21694   ac_status=$?
21695   echo "$as_me:21695: \$? = $ac_status" >&5
21696   (exit "$ac_status"); } &&
21697          { ac_try='test -s "conftest$ac_exeext"'
21698   { (eval echo "$as_me:21698: \"$ac_try\"") >&5
21699   (eval $ac_try) 2>&5
21700   ac_status=$?
21701   echo "$as_me:21701: \$? = $ac_status" >&5
21702   (exit "$ac_status"); }; }; then
21703   cf_cv_func_getttynam=yes
21704 else
21705   echo "$as_me: failed program was:" >&5
21706 cat "conftest.$ac_ext" >&5
21707 cf_cv_func_getttynam=no
21708 fi
21709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21710 fi
21711 echo "$as_me:21711: result: $cf_cv_func_getttynam" >&5
21712 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21713         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21714 #define HAVE_GETTTYNAM 1
21715 EOF
21716
21717 fi
21718
21719 if test "x$ac_cv_func_getopt" = xno && \
21720    test "x$cf_with_progs$cf_with_tests" != xnono; then
21721         { { echo "$as_me:21721: error: getopt is required for building programs" >&5
21722 echo "$as_me: error: getopt is required for building programs" >&2;}
21723    { (exit 1); exit 1; }; }
21724 fi
21725
21726 if test "x$with_safe_sprintf" = xyes
21727 then
21728         if test "x$ac_cv_func_vsnprintf" = xyes
21729         then
21730                 { echo "$as_me:21730: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21731 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21732         else
21733
21734 cat >>confdefs.h <<\EOF
21735 #define USE_SAFE_SPRINTF 1
21736 EOF
21737
21738         fi
21739 fi
21740
21741 if test "x$with_getcap" = "xyes" ; then
21742
21743 echo "$as_me:21743: checking for terminal-capability database functions" >&5
21744 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21745 if test "${cf_cv_cgetent+set}" = set; then
21746   echo $ECHO_N "(cached) $ECHO_C" >&6
21747 else
21748
21749 cat >"conftest.$ac_ext" <<_ACEOF
21750 #line 21750 "configure"
21751 #include "confdefs.h"
21752
21753 #include <stdlib.h>
21754 int
21755 main (void)
21756 {
21757
21758         char temp[128];
21759         char *buf = temp;
21760         char *db_array = temp;
21761         cgetent(&buf, &db_array, "vt100");
21762         cgetcap(buf, "tc", '=');
21763         cgetmatch(buf, "tc");
21764
21765   ;
21766   return 0;
21767 }
21768 _ACEOF
21769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21770 if { (eval echo "$as_me:21770: \"$ac_link\"") >&5
21771   (eval $ac_link) 2>&5
21772   ac_status=$?
21773   echo "$as_me:21773: \$? = $ac_status" >&5
21774   (exit "$ac_status"); } &&
21775          { ac_try='test -s "conftest$ac_exeext"'
21776   { (eval echo "$as_me:21776: \"$ac_try\"") >&5
21777   (eval $ac_try) 2>&5
21778   ac_status=$?
21779   echo "$as_me:21779: \$? = $ac_status" >&5
21780   (exit "$ac_status"); }; }; then
21781   cf_cv_cgetent=yes
21782 else
21783   echo "$as_me: failed program was:" >&5
21784 cat "conftest.$ac_ext" >&5
21785 cf_cv_cgetent=no
21786 fi
21787 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21788
21789 fi
21790 echo "$as_me:21790: result: $cf_cv_cgetent" >&5
21791 echo "${ECHO_T}$cf_cv_cgetent" >&6
21792
21793 if test "$cf_cv_cgetent" = yes
21794 then
21795
21796 cat >>confdefs.h <<\EOF
21797 #define HAVE_BSD_CGETENT 1
21798 EOF
21799
21800 echo "$as_me:21800: checking if cgetent uses const parameter" >&5
21801 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21802 if test "${cf_cv_cgetent_const+set}" = set; then
21803   echo $ECHO_N "(cached) $ECHO_C" >&6
21804 else
21805
21806 cat >"conftest.$ac_ext" <<_ACEOF
21807 #line 21807 "configure"
21808 #include "confdefs.h"
21809
21810 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21811 #include <stdlib.h>
21812 int
21813 main (void)
21814 {
21815
21816         char temp[128];
21817         char *buf = temp;
21818 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21819         const char *db_array = temp;
21820         cgetent(&buf, &db_array, "vt100");
21821 #endif
21822         cgetcap(buf, "tc", '=');
21823         cgetmatch(buf, "tc");
21824
21825   ;
21826   return 0;
21827 }
21828 _ACEOF
21829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21830 if { (eval echo "$as_me:21830: \"$ac_link\"") >&5
21831   (eval $ac_link) 2>&5
21832   ac_status=$?
21833   echo "$as_me:21833: \$? = $ac_status" >&5
21834   (exit "$ac_status"); } &&
21835          { ac_try='test -s "conftest$ac_exeext"'
21836   { (eval echo "$as_me:21836: \"$ac_try\"") >&5
21837   (eval $ac_try) 2>&5
21838   ac_status=$?
21839   echo "$as_me:21839: \$? = $ac_status" >&5
21840   (exit "$ac_status"); }; }; then
21841   cf_cv_cgetent_const=yes
21842 else
21843   echo "$as_me: failed program was:" >&5
21844 cat "conftest.$ac_ext" >&5
21845 cf_cv_cgetent_const=no
21846 fi
21847 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21848
21849 fi
21850 echo "$as_me:21850: result: $cf_cv_cgetent_const" >&5
21851 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21852         if test "$cf_cv_cgetent_const" = yes
21853         then
21854
21855 cat >>confdefs.h <<EOF
21856 #define CGETENT_CONST const
21857 EOF
21858
21859         fi
21860 fi
21861
21862 fi
21863
21864 echo "$as_me:21864: checking for isascii" >&5
21865 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21866 if test "${cf_cv_have_isascii+set}" = set; then
21867   echo $ECHO_N "(cached) $ECHO_C" >&6
21868 else
21869
21870         cat >"conftest.$ac_ext" <<_ACEOF
21871 #line 21871 "configure"
21872 #include "confdefs.h"
21873 #include <ctype.h>
21874 int
21875 main (void)
21876 {
21877 int x = isascii(' ')
21878   ;
21879   return 0;
21880 }
21881 _ACEOF
21882 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21883 if { (eval echo "$as_me:21883: \"$ac_link\"") >&5
21884   (eval $ac_link) 2>&5
21885   ac_status=$?
21886   echo "$as_me:21886: \$? = $ac_status" >&5
21887   (exit "$ac_status"); } &&
21888          { ac_try='test -s "conftest$ac_exeext"'
21889   { (eval echo "$as_me:21889: \"$ac_try\"") >&5
21890   (eval $ac_try) 2>&5
21891   ac_status=$?
21892   echo "$as_me:21892: \$? = $ac_status" >&5
21893   (exit "$ac_status"); }; }; then
21894   cf_cv_have_isascii=yes
21895 else
21896   echo "$as_me: failed program was:" >&5
21897 cat "conftest.$ac_ext" >&5
21898 cf_cv_have_isascii=no
21899 fi
21900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21901
21902 fi
21903 echo "$as_me:21903: result: $cf_cv_have_isascii" >&5
21904 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21905 test "$cf_cv_have_isascii" = yes &&
21906 cat >>confdefs.h <<\EOF
21907 #define HAVE_ISASCII 1
21908 EOF
21909
21910 if test "$ac_cv_func_sigaction" = yes; then
21911 echo "$as_me:21911: checking whether sigaction needs _POSIX_SOURCE" >&5
21912 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21913 cat >"conftest.$ac_ext" <<_ACEOF
21914 #line 21914 "configure"
21915 #include "confdefs.h"
21916
21917 #include <sys/types.h>
21918 #include <signal.h>
21919 int
21920 main (void)
21921 {
21922 struct sigaction act
21923   ;
21924   return 0;
21925 }
21926 _ACEOF
21927 rm -f "conftest.$ac_objext"
21928 if { (eval echo "$as_me:21928: \"$ac_compile\"") >&5
21929   (eval $ac_compile) 2>&5
21930   ac_status=$?
21931   echo "$as_me:21931: \$? = $ac_status" >&5
21932   (exit "$ac_status"); } &&
21933          { ac_try='test -s "conftest.$ac_objext"'
21934   { (eval echo "$as_me:21934: \"$ac_try\"") >&5
21935   (eval $ac_try) 2>&5
21936   ac_status=$?
21937   echo "$as_me:21937: \$? = $ac_status" >&5
21938   (exit "$ac_status"); }; }; then
21939   sigact_bad=no
21940 else
21941   echo "$as_me: failed program was:" >&5
21942 cat "conftest.$ac_ext" >&5
21943
21944 cat >"conftest.$ac_ext" <<_ACEOF
21945 #line 21945 "configure"
21946 #include "confdefs.h"
21947
21948 #define _POSIX_SOURCE
21949 #include <sys/types.h>
21950 #include <signal.h>
21951 int
21952 main (void)
21953 {
21954 struct sigaction act
21955   ;
21956   return 0;
21957 }
21958 _ACEOF
21959 rm -f "conftest.$ac_objext"
21960 if { (eval echo "$as_me:21960: \"$ac_compile\"") >&5
21961   (eval $ac_compile) 2>&5
21962   ac_status=$?
21963   echo "$as_me:21963: \$? = $ac_status" >&5
21964   (exit "$ac_status"); } &&
21965          { ac_try='test -s "conftest.$ac_objext"'
21966   { (eval echo "$as_me:21966: \"$ac_try\"") >&5
21967   (eval $ac_try) 2>&5
21968   ac_status=$?
21969   echo "$as_me:21969: \$? = $ac_status" >&5
21970   (exit "$ac_status"); }; }; then
21971   sigact_bad=yes
21972
21973 cat >>confdefs.h <<\EOF
21974 #define _POSIX_SOURCE 1
21975 EOF
21976
21977 else
21978   echo "$as_me: failed program was:" >&5
21979 cat "conftest.$ac_ext" >&5
21980 sigact_bad=unknown
21981 fi
21982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21983 fi
21984 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21985 echo "$as_me:21985: result: $sigact_bad" >&5
21986 echo "${ECHO_T}$sigact_bad" >&6
21987 fi
21988
21989 echo "$as_me:21989: checking if nanosleep really works" >&5
21990 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21991 if test "${cf_cv_func_nanosleep+set}" = set; then
21992   echo $ECHO_N "(cached) $ECHO_C" >&6
21993 else
21994
21995 if test "$cross_compiling" = yes; then
21996   cf_cv_func_nanosleep=unknown
21997 else
21998   cat >"conftest.$ac_ext" <<_ACEOF
21999 #line 21999 "configure"
22000 #include "confdefs.h"
22001
22002 #include <stdio.h>
22003 #include <errno.h>
22004 #include <time.h>
22005
22006 #ifdef HAVE_SYS_TIME_H
22007 #include <sys/time.h>
22008 #endif
22009
22010 int main(void) {
22011         struct timespec ts1, ts2;
22012         int code;
22013         ts1.tv_sec  = 0;
22014         ts1.tv_nsec = 750000000;
22015         ts2.tv_sec  = 0;
22016         ts2.tv_nsec = 0;
22017         errno = 0;
22018         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22019         ${cf_cv_main_return:-return}(code != 0);
22020 }
22021
22022 _ACEOF
22023 rm -f "conftest$ac_exeext"
22024 if { (eval echo "$as_me:22024: \"$ac_link\"") >&5
22025   (eval $ac_link) 2>&5
22026   ac_status=$?
22027   echo "$as_me:22027: \$? = $ac_status" >&5
22028   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22029   { (eval echo "$as_me:22029: \"$ac_try\"") >&5
22030   (eval $ac_try) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit "$ac_status"); }; }; then
22034   cf_cv_func_nanosleep=yes
22035 else
22036   echo "$as_me: program exited with status $ac_status" >&5
22037 echo "$as_me: failed program was:" >&5
22038 cat "conftest.$ac_ext" >&5
22039 cf_cv_func_nanosleep=no
22040 fi
22041 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22042 fi
22043 fi
22044 echo "$as_me:22044: result: $cf_cv_func_nanosleep" >&5
22045 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22046
22047 test "$cf_cv_func_nanosleep" = "yes" &&
22048 cat >>confdefs.h <<\EOF
22049 #define HAVE_NANOSLEEP 1
22050 EOF
22051
22052 for ac_header in \
22053 termio.h \
22054 termios.h \
22055 unistd.h \
22056 sys/ioctl.h \
22057 sys/termio.h \
22058
22059 do
22060 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22061 echo "$as_me:22061: checking for $ac_header" >&5
22062 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22063 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22064   echo $ECHO_N "(cached) $ECHO_C" >&6
22065 else
22066   cat >"conftest.$ac_ext" <<_ACEOF
22067 #line 22067 "configure"
22068 #include "confdefs.h"
22069 #include <$ac_header>
22070 _ACEOF
22071 if { (eval echo "$as_me:22071: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22072   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22073   ac_status=$?
22074   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22075   rm -f conftest.er1
22076   cat conftest.err >&5
22077   echo "$as_me:22077: \$? = $ac_status" >&5
22078   (exit "$ac_status"); } >/dev/null; then
22079   if test -s conftest.err; then
22080     ac_cpp_err=$ac_c_preproc_warn_flag
22081   else
22082     ac_cpp_err=
22083   fi
22084 else
22085   ac_cpp_err=yes
22086 fi
22087 if test -z "$ac_cpp_err"; then
22088   eval "$as_ac_Header=yes"
22089 else
22090   echo "$as_me: failed program was:" >&5
22091   cat "conftest.$ac_ext" >&5
22092   eval "$as_ac_Header=no"
22093 fi
22094 rm -f conftest.err "conftest.$ac_ext"
22095 fi
22096 echo "$as_me:22096: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22097 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22098 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22099   cat >>confdefs.h <<EOF
22100 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22101 EOF
22102
22103 fi
22104 done
22105
22106 if test "$ac_cv_header_termios_h" = yes ; then
22107         case "$CFLAGS $CPPFLAGS" in
22108         (*-D_POSIX_SOURCE*)
22109                 termios_bad=dunno ;;
22110         (*)     termios_bad=maybe ;;
22111         esac
22112         if test "$termios_bad" = maybe ; then
22113         echo "$as_me:22113: checking whether termios.h needs _POSIX_SOURCE" >&5
22114 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22115         cat >"conftest.$ac_ext" <<_ACEOF
22116 #line 22116 "configure"
22117 #include "confdefs.h"
22118 #include <termios.h>
22119 int
22120 main (void)
22121 {
22122 struct termios foo; int x = foo.c_iflag = 1; (void)x
22123   ;
22124   return 0;
22125 }
22126 _ACEOF
22127 rm -f "conftest.$ac_objext"
22128 if { (eval echo "$as_me:22128: \"$ac_compile\"") >&5
22129   (eval $ac_compile) 2>&5
22130   ac_status=$?
22131   echo "$as_me:22131: \$? = $ac_status" >&5
22132   (exit "$ac_status"); } &&
22133          { ac_try='test -s "conftest.$ac_objext"'
22134   { (eval echo "$as_me:22134: \"$ac_try\"") >&5
22135   (eval $ac_try) 2>&5
22136   ac_status=$?
22137   echo "$as_me:22137: \$? = $ac_status" >&5
22138   (exit "$ac_status"); }; }; then
22139   termios_bad=no
22140 else
22141   echo "$as_me: failed program was:" >&5
22142 cat "conftest.$ac_ext" >&5
22143
22144                 cat >"conftest.$ac_ext" <<_ACEOF
22145 #line 22145 "configure"
22146 #include "confdefs.h"
22147
22148 #define _POSIX_SOURCE
22149 #include <termios.h>
22150 int
22151 main (void)
22152 {
22153 struct termios foo; int x = foo.c_iflag = 2; (void)x
22154   ;
22155   return 0;
22156 }
22157 _ACEOF
22158 rm -f "conftest.$ac_objext"
22159 if { (eval echo "$as_me:22159: \"$ac_compile\"") >&5
22160   (eval $ac_compile) 2>&5
22161   ac_status=$?
22162   echo "$as_me:22162: \$? = $ac_status" >&5
22163   (exit "$ac_status"); } &&
22164          { ac_try='test -s "conftest.$ac_objext"'
22165   { (eval echo "$as_me:22165: \"$ac_try\"") >&5
22166   (eval $ac_try) 2>&5
22167   ac_status=$?
22168   echo "$as_me:22168: \$? = $ac_status" >&5
22169   (exit "$ac_status"); }; }; then
22170   termios_bad=unknown
22171 else
22172   echo "$as_me: failed program was:" >&5
22173 cat "conftest.$ac_ext" >&5
22174 termios_bad=yes
22175 cat >>confdefs.h <<\EOF
22176 #define _POSIX_SOURCE 1
22177 EOF
22178
22179 fi
22180 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22181
22182 fi
22183 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22184         echo "$as_me:22184: result: $termios_bad" >&5
22185 echo "${ECHO_T}$termios_bad" >&6
22186         fi
22187 fi
22188
22189 echo "$as_me:22189: checking for tcgetattr" >&5
22190 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22191 if test "${cf_cv_have_tcgetattr+set}" = set; then
22192   echo $ECHO_N "(cached) $ECHO_C" >&6
22193 else
22194
22195 cat >"conftest.$ac_ext" <<_ACEOF
22196 #line 22196 "configure"
22197 #include "confdefs.h"
22198
22199 #include <sys/types.h>
22200 #ifdef HAVE_UNISTD_H
22201 #include <unistd.h>
22202 #endif
22203 #ifdef HAVE_TERMIOS_H
22204 #include <termios.h>
22205 #define TTY struct termios
22206 #else
22207 #ifdef HAVE_TERMIO_H
22208 #include <termio.h>
22209 #define TTY struct termio
22210 #endif
22211 #endif
22212
22213 int
22214 main (void)
22215 {
22216
22217 TTY foo;
22218 tcgetattr(1, &foo);
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22224 if { (eval echo "$as_me:22224: \"$ac_link\"") >&5
22225   (eval $ac_link) 2>&5
22226   ac_status=$?
22227   echo "$as_me:22227: \$? = $ac_status" >&5
22228   (exit "$ac_status"); } &&
22229          { ac_try='test -s "conftest$ac_exeext"'
22230   { (eval echo "$as_me:22230: \"$ac_try\"") >&5
22231   (eval $ac_try) 2>&5
22232   ac_status=$?
22233   echo "$as_me:22233: \$? = $ac_status" >&5
22234   (exit "$ac_status"); }; }; then
22235   cf_cv_have_tcgetattr=yes
22236 else
22237   echo "$as_me: failed program was:" >&5
22238 cat "conftest.$ac_ext" >&5
22239 cf_cv_have_tcgetattr=no
22240 fi
22241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22242 fi
22243 echo "$as_me:22243: result: $cf_cv_have_tcgetattr" >&5
22244 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22245 test "$cf_cv_have_tcgetattr" = yes &&
22246 cat >>confdefs.h <<\EOF
22247 #define HAVE_TCGETATTR 1
22248 EOF
22249
22250 echo "$as_me:22250: checking for vsscanf function or workaround" >&5
22251 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22252 if test "${cf_cv_func_vsscanf+set}" = set; then
22253   echo $ECHO_N "(cached) $ECHO_C" >&6
22254 else
22255
22256 cat >"conftest.$ac_ext" <<_ACEOF
22257 #line 22257 "configure"
22258 #include "confdefs.h"
22259
22260 #include <stdarg.h>
22261 #include <stdio.h>
22262 int
22263 main (void)
22264 {
22265
22266         va_list ap;
22267         vsscanf("from", "%d", ap)
22268   ;
22269   return 0;
22270 }
22271 _ACEOF
22272 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22273 if { (eval echo "$as_me:22273: \"$ac_link\"") >&5
22274   (eval $ac_link) 2>&5
22275   ac_status=$?
22276   echo "$as_me:22276: \$? = $ac_status" >&5
22277   (exit "$ac_status"); } &&
22278          { ac_try='test -s "conftest$ac_exeext"'
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   cf_cv_func_vsscanf=vsscanf
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 #include <stdarg.h>
22294 #include <stdio.h>
22295 int
22296 main (void)
22297 {
22298
22299         FILE strbuf;
22300         char *str = "from";
22301
22302         strbuf._flag = _IOREAD;
22303         strbuf._ptr = strbuf._base = (unsigned char *) str;
22304         strbuf._cnt = strlen(str);
22305         strbuf._file = _NFILE;
22306         return (vfscanf(&strbuf, "%d", ap))
22307   ;
22308   return 0;
22309 }
22310 _ACEOF
22311 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22312 if { (eval echo "$as_me:22312: \"$ac_link\"") >&5
22313   (eval $ac_link) 2>&5
22314   ac_status=$?
22315   echo "$as_me:22315: \$? = $ac_status" >&5
22316   (exit "$ac_status"); } &&
22317          { ac_try='test -s "conftest$ac_exeext"'
22318   { (eval echo "$as_me:22318: \"$ac_try\"") >&5
22319   (eval $ac_try) 2>&5
22320   ac_status=$?
22321   echo "$as_me:22321: \$? = $ac_status" >&5
22322   (exit "$ac_status"); }; }; then
22323   cf_cv_func_vsscanf=vfscanf
22324 else
22325   echo "$as_me: failed program was:" >&5
22326 cat "conftest.$ac_ext" >&5
22327
22328 cat >"conftest.$ac_ext" <<_ACEOF
22329 #line 22329 "configure"
22330 #include "confdefs.h"
22331
22332 #include <stdarg.h>
22333 #include <stdio.h>
22334 int
22335 main (void)
22336 {
22337
22338         FILE strbuf;
22339         char *str = "from";
22340
22341         strbuf._flag = _IOREAD;
22342         strbuf._ptr = strbuf._base = (unsigned char *) str;
22343         strbuf._cnt = strlen(str);
22344         strbuf._file = _NFILE;
22345         return (_doscan(&strbuf, "%d", ap))
22346   ;
22347   return 0;
22348 }
22349 _ACEOF
22350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22351 if { (eval echo "$as_me:22351: \"$ac_link\"") >&5
22352   (eval $ac_link) 2>&5
22353   ac_status=$?
22354   echo "$as_me:22354: \$? = $ac_status" >&5
22355   (exit "$ac_status"); } &&
22356          { ac_try='test -s "conftest$ac_exeext"'
22357   { (eval echo "$as_me:22357: \"$ac_try\"") >&5
22358   (eval $ac_try) 2>&5
22359   ac_status=$?
22360   echo "$as_me:22360: \$? = $ac_status" >&5
22361   (exit "$ac_status"); }; }; then
22362   cf_cv_func_vsscanf=_doscan
22363 else
22364   echo "$as_me: failed program was:" >&5
22365 cat "conftest.$ac_ext" >&5
22366
22367 cf_cv_func_vsscanf=no
22368 fi
22369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22370 fi
22371 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22372 fi
22373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22374 fi
22375 echo "$as_me:22375: result: $cf_cv_func_vsscanf" >&5
22376 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22377
22378 case "$cf_cv_func_vsscanf" in
22379 (vsscanf)
22380 cat >>confdefs.h <<\EOF
22381 #define HAVE_VSSCANF 1
22382 EOF
22383 ;;
22384 (vfscanf)
22385 cat >>confdefs.h <<\EOF
22386 #define HAVE_VFSCANF 1
22387 EOF
22388 ;;
22389 (_doscan)
22390 cat >>confdefs.h <<\EOF
22391 #define HAVE__DOSCAN 1
22392 EOF
22393 ;;
22394 esac
22395
22396 for ac_header in \
22397 unistd.h \
22398
22399 do
22400 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22401 echo "$as_me:22401: checking for $ac_header" >&5
22402 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22403 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22404   echo $ECHO_N "(cached) $ECHO_C" >&6
22405 else
22406   cat >"conftest.$ac_ext" <<_ACEOF
22407 #line 22407 "configure"
22408 #include "confdefs.h"
22409 #include <$ac_header>
22410 _ACEOF
22411 if { (eval echo "$as_me:22411: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22412   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22413   ac_status=$?
22414   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22415   rm -f conftest.er1
22416   cat conftest.err >&5
22417   echo "$as_me:22417: \$? = $ac_status" >&5
22418   (exit "$ac_status"); } >/dev/null; then
22419   if test -s conftest.err; then
22420     ac_cpp_err=$ac_c_preproc_warn_flag
22421   else
22422     ac_cpp_err=
22423   fi
22424 else
22425   ac_cpp_err=yes
22426 fi
22427 if test -z "$ac_cpp_err"; then
22428   eval "$as_ac_Header=yes"
22429 else
22430   echo "$as_me: failed program was:" >&5
22431   cat "conftest.$ac_ext" >&5
22432   eval "$as_ac_Header=no"
22433 fi
22434 rm -f conftest.err "conftest.$ac_ext"
22435 fi
22436 echo "$as_me:22436: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22437 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22438 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22439   cat >>confdefs.h <<EOF
22440 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22441 EOF
22442
22443 fi
22444 done
22445
22446 echo "$as_me:22446: checking for working mkstemp" >&5
22447 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22448 if test "${cf_cv_func_mkstemp+set}" = set; then
22449   echo $ECHO_N "(cached) $ECHO_C" >&6
22450 else
22451
22452 rm -rf ./conftest*
22453 if test "$cross_compiling" = yes; then
22454   cf_cv_func_mkstemp=maybe
22455 else
22456   cat >"conftest.$ac_ext" <<_ACEOF
22457 #line 22457 "configure"
22458 #include "confdefs.h"
22459
22460 #include <sys/types.h>
22461 #ifdef HAVE_UNISTD_H
22462 #include <unistd.h>
22463 #endif
22464 #include <stdlib.h>
22465 #include <stdio.h>
22466 #include <string.h>
22467 #include <sys/stat.h>
22468 int main(void)
22469 {
22470         char *tmpl = "conftestXXXXXX";
22471         char name[2][80];
22472         int n;
22473         int result = 0;
22474         int fd;
22475         struct stat sb;
22476
22477         umask(077);
22478         for (n = 0; n < 2; ++n) {
22479                 strcpy(name[n], tmpl);
22480                 if ((fd = mkstemp(name[n])) >= 0) {
22481                         if (!strcmp(name[n], tmpl)
22482                          || stat(name[n], &sb) != 0
22483                          || (sb.st_mode & S_IFMT) != S_IFREG
22484                          || (sb.st_mode & 077) != 0) {
22485                                 result = 1;
22486                         }
22487                         close(fd);
22488                 }
22489         }
22490         if (result == 0
22491          && !strcmp(name[0], name[1]))
22492                 result = 1;
22493         ${cf_cv_main_return:-return}(result);
22494 }
22495
22496 _ACEOF
22497 rm -f "conftest$ac_exeext"
22498 if { (eval echo "$as_me:22498: \"$ac_link\"") >&5
22499   (eval $ac_link) 2>&5
22500   ac_status=$?
22501   echo "$as_me:22501: \$? = $ac_status" >&5
22502   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22503   { (eval echo "$as_me:22503: \"$ac_try\"") >&5
22504   (eval $ac_try) 2>&5
22505   ac_status=$?
22506   echo "$as_me:22506: \$? = $ac_status" >&5
22507   (exit "$ac_status"); }; }; then
22508   cf_cv_func_mkstemp=yes
22509
22510 else
22511   echo "$as_me: program exited with status $ac_status" >&5
22512 echo "$as_me: failed program was:" >&5
22513 cat "conftest.$ac_ext" >&5
22514 cf_cv_func_mkstemp=no
22515
22516 fi
22517 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22518 fi
22519
22520 fi
22521 echo "$as_me:22521: result: $cf_cv_func_mkstemp" >&5
22522 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22523 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22524         echo "$as_me:22524: checking for mkstemp" >&5
22525 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22526 if test "${ac_cv_func_mkstemp+set}" = set; then
22527   echo $ECHO_N "(cached) $ECHO_C" >&6
22528 else
22529   cat >"conftest.$ac_ext" <<_ACEOF
22530 #line 22530 "configure"
22531 #include "confdefs.h"
22532 #define mkstemp autoconf_temporary
22533 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22534 #undef mkstemp
22535
22536 #ifdef __cplusplus
22537 extern "C"
22538 #endif
22539
22540 /* We use char because int might match the return type of a gcc2
22541    builtin and then its argument prototype would still apply.  */
22542 char mkstemp (void);
22543
22544 int
22545 main (void)
22546 {
22547
22548 /* The GNU C library defines stubs for functions which it implements
22549     to always fail with ENOSYS.  Some functions are actually named
22550     something starting with __ and the normal name is an alias.  */
22551 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22552 #error found stub for mkstemp
22553 #endif
22554
22555         return mkstemp ();
22556   ;
22557   return 0;
22558 }
22559 _ACEOF
22560 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22561 if { (eval echo "$as_me:22561: \"$ac_link\"") >&5
22562   (eval $ac_link) 2>&5
22563   ac_status=$?
22564   echo "$as_me:22564: \$? = $ac_status" >&5
22565   (exit "$ac_status"); } &&
22566          { ac_try='test -s "conftest$ac_exeext"'
22567   { (eval echo "$as_me:22567: \"$ac_try\"") >&5
22568   (eval $ac_try) 2>&5
22569   ac_status=$?
22570   echo "$as_me:22570: \$? = $ac_status" >&5
22571   (exit "$ac_status"); }; }; then
22572   ac_cv_func_mkstemp=yes
22573 else
22574   echo "$as_me: failed program was:" >&5
22575 cat "conftest.$ac_ext" >&5
22576 ac_cv_func_mkstemp=no
22577 fi
22578 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22579 fi
22580 echo "$as_me:22580: result: $ac_cv_func_mkstemp" >&5
22581 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22582
22583 fi
22584 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22585
22586 cat >>confdefs.h <<\EOF
22587 #define HAVE_MKSTEMP 1
22588 EOF
22589
22590 fi
22591
22592 # setup for prototype of fallback for vsscanf()
22593
22594 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22595         HAVE_VSSCANF=1
22596 else
22597         HAVE_VSSCANF=0
22598 fi
22599
22600 if test "x$cross_compiling" = xyes ; then
22601         { echo "$as_me:22601: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22602 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22603 else
22604         echo "$as_me:22604: checking whether setvbuf arguments are reversed" >&5
22605 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22606 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22607   echo $ECHO_N "(cached) $ECHO_C" >&6
22608 else
22609   if test "$cross_compiling" = yes; then
22610   { { echo "$as_me:22610: error: cannot run test program while cross compiling" >&5
22611 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22612    { (exit 1); exit 1; }; }
22613 else
22614   cat >"conftest.$ac_ext" <<_ACEOF
22615 #line 22615 "configure"
22616 #include "confdefs.h"
22617 #include <stdio.h>
22618 /* If setvbuf has the reversed format, exit 0. */
22619 int
22620 main (void)
22621 {
22622   /* This call has the arguments reversed.
22623      A reversed system may check and see that the address of main
22624      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22625   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22626     $ac_main_return(1);
22627   putc('\r', stdout);
22628   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22629 }
22630 _ACEOF
22631 rm -f "conftest$ac_exeext"
22632 if { (eval echo "$as_me:22632: \"$ac_link\"") >&5
22633   (eval $ac_link) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22637   { (eval echo "$as_me:22637: \"$ac_try\"") >&5
22638   (eval $ac_try) 2>&5
22639   ac_status=$?
22640   echo "$as_me:22640: \$? = $ac_status" >&5
22641   (exit "$ac_status"); }; }; then
22642   ac_cv_func_setvbuf_reversed=yes
22643 else
22644   echo "$as_me: program exited with status $ac_status" >&5
22645 echo "$as_me: failed program was:" >&5
22646 cat "conftest.$ac_ext" >&5
22647 ac_cv_func_setvbuf_reversed=no
22648 fi
22649 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22650 fi
22651 rm -f core ./core.* ./*.core
22652 fi
22653 echo "$as_me:22653: result: $ac_cv_func_setvbuf_reversed" >&5
22654 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22655 if test $ac_cv_func_setvbuf_reversed = yes; then
22656
22657 cat >>confdefs.h <<\EOF
22658 #define SETVBUF_REVERSED 1
22659 EOF
22660
22661 fi
22662
22663 fi
22664 echo "$as_me:22664: checking for intptr_t" >&5
22665 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22666 if test "${ac_cv_type_intptr_t+set}" = set; then
22667   echo $ECHO_N "(cached) $ECHO_C" >&6
22668 else
22669   cat >"conftest.$ac_ext" <<_ACEOF
22670 #line 22670 "configure"
22671 #include "confdefs.h"
22672 $ac_includes_default
22673 int
22674 main (void)
22675 {
22676 if ((intptr_t *) 0)
22677   return 0;
22678 if (sizeof (intptr_t))
22679   return 0;
22680   ;
22681   return 0;
22682 }
22683 _ACEOF
22684 rm -f "conftest.$ac_objext"
22685 if { (eval echo "$as_me:22685: \"$ac_compile\"") >&5
22686   (eval $ac_compile) 2>&5
22687   ac_status=$?
22688   echo "$as_me:22688: \$? = $ac_status" >&5
22689   (exit "$ac_status"); } &&
22690          { ac_try='test -s "conftest.$ac_objext"'
22691   { (eval echo "$as_me:22691: \"$ac_try\"") >&5
22692   (eval $ac_try) 2>&5
22693   ac_status=$?
22694   echo "$as_me:22694: \$? = $ac_status" >&5
22695   (exit "$ac_status"); }; }; then
22696   ac_cv_type_intptr_t=yes
22697 else
22698   echo "$as_me: failed program was:" >&5
22699 cat "conftest.$ac_ext" >&5
22700 ac_cv_type_intptr_t=no
22701 fi
22702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22703 fi
22704 echo "$as_me:22704: result: $ac_cv_type_intptr_t" >&5
22705 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22706 if test "$ac_cv_type_intptr_t" = yes; then
22707   :
22708 else
22709
22710 cat >>confdefs.h <<EOF
22711 #define intptr_t long
22712 EOF
22713
22714 fi
22715
22716 echo "$as_me:22716: checking for ssize_t" >&5
22717 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22718 if test "${ac_cv_type_ssize_t+set}" = set; then
22719   echo $ECHO_N "(cached) $ECHO_C" >&6
22720 else
22721   cat >"conftest.$ac_ext" <<_ACEOF
22722 #line 22722 "configure"
22723 #include "confdefs.h"
22724 $ac_includes_default
22725 int
22726 main (void)
22727 {
22728 if ((ssize_t *) 0)
22729   return 0;
22730 if (sizeof (ssize_t))
22731   return 0;
22732   ;
22733   return 0;
22734 }
22735 _ACEOF
22736 rm -f "conftest.$ac_objext"
22737 if { (eval echo "$as_me:22737: \"$ac_compile\"") >&5
22738   (eval $ac_compile) 2>&5
22739   ac_status=$?
22740   echo "$as_me:22740: \$? = $ac_status" >&5
22741   (exit "$ac_status"); } &&
22742          { ac_try='test -s "conftest.$ac_objext"'
22743   { (eval echo "$as_me:22743: \"$ac_try\"") >&5
22744   (eval $ac_try) 2>&5
22745   ac_status=$?
22746   echo "$as_me:22746: \$? = $ac_status" >&5
22747   (exit "$ac_status"); }; }; then
22748   ac_cv_type_ssize_t=yes
22749 else
22750   echo "$as_me: failed program was:" >&5
22751 cat "conftest.$ac_ext" >&5
22752 ac_cv_type_ssize_t=no
22753 fi
22754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22755 fi
22756 echo "$as_me:22756: result: $ac_cv_type_ssize_t" >&5
22757 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22758 if test "$ac_cv_type_ssize_t" = yes; then
22759   :
22760 else
22761
22762 cat >>confdefs.h <<EOF
22763 #define ssize_t int
22764 EOF
22765
22766 fi
22767
22768 echo "$as_me:22768: checking for type sigaction_t" >&5
22769 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22770 if test "${cf_cv_type_sigaction+set}" = set; then
22771   echo $ECHO_N "(cached) $ECHO_C" >&6
22772 else
22773
22774         cat >"conftest.$ac_ext" <<_ACEOF
22775 #line 22775 "configure"
22776 #include "confdefs.h"
22777
22778 #include <signal.h>
22779 int
22780 main (void)
22781 {
22782 sigaction_t x
22783   ;
22784   return 0;
22785 }
22786 _ACEOF
22787 rm -f "conftest.$ac_objext"
22788 if { (eval echo "$as_me:22788: \"$ac_compile\"") >&5
22789   (eval $ac_compile) 2>&5
22790   ac_status=$?
22791   echo "$as_me:22791: \$? = $ac_status" >&5
22792   (exit "$ac_status"); } &&
22793          { ac_try='test -s "conftest.$ac_objext"'
22794   { (eval echo "$as_me:22794: \"$ac_try\"") >&5
22795   (eval $ac_try) 2>&5
22796   ac_status=$?
22797   echo "$as_me:22797: \$? = $ac_status" >&5
22798   (exit "$ac_status"); }; }; then
22799   cf_cv_type_sigaction=yes
22800 else
22801   echo "$as_me: failed program was:" >&5
22802 cat "conftest.$ac_ext" >&5
22803 cf_cv_type_sigaction=no
22804 fi
22805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22806 fi
22807
22808 echo "$as_me:22808: result: $cf_cv_type_sigaction" >&5
22809 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22810 test "$cf_cv_type_sigaction" = yes &&
22811 cat >>confdefs.h <<\EOF
22812 #define HAVE_TYPE_SIGACTION 1
22813 EOF
22814
22815 echo "$as_me:22815: checking declaration of size-change" >&5
22816 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22817 if test "${cf_cv_sizechange+set}" = set; then
22818   echo $ECHO_N "(cached) $ECHO_C" >&6
22819 else
22820
22821         cf_cv_sizechange=unknown
22822         cf_save_CPPFLAGS="$CPPFLAGS"
22823
22824 for cf_opts in "" "NEED_PTEM_H"
22825 do
22826
22827         CPPFLAGS="$cf_save_CPPFLAGS"
22828         if test -n "$cf_opts"
22829         then
22830
22831         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22832         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22833
22834         fi
22835         cat >"conftest.$ac_ext" <<_ACEOF
22836 #line 22836 "configure"
22837 #include "confdefs.h"
22838 #include <sys/types.h>
22839 #ifdef HAVE_TERMIOS_H
22840 #include <termios.h>
22841 #else
22842 #ifdef HAVE_TERMIO_H
22843 #include <termio.h>
22844 #endif
22845 #endif
22846
22847 #ifdef NEED_PTEM_H
22848 /* This is a workaround for SCO:  they neglected to define struct winsize in
22849  * termios.h -- it is only in termio.h and ptem.h
22850  */
22851 #include <sys/stream.h>
22852 #include <sys/ptem.h>
22853 #endif
22854
22855 #ifdef HAVE_SYS_IOCTL_H
22856 #include <sys/ioctl.h>
22857 #endif
22858
22859 int
22860 main (void)
22861 {
22862
22863 #ifdef TIOCGSIZE
22864         struct ttysize win;     /* SunOS 3.0... */
22865         int y = win.ts_lines = 2;
22866         int x = win.ts_cols = 1;
22867         (void)y;
22868         (void)x;
22869 #else
22870 #ifdef TIOCGWINSZ
22871         struct winsize win;     /* everything else */
22872         int y = win.ws_row = 2;
22873         int x = win.ws_col = 1;
22874         (void)y;
22875         (void)x;
22876 #else
22877         no TIOCGSIZE or TIOCGWINSZ
22878 #endif /* TIOCGWINSZ */
22879 #endif /* TIOCGSIZE */
22880
22881   ;
22882   return 0;
22883 }
22884 _ACEOF
22885 rm -f "conftest.$ac_objext"
22886 if { (eval echo "$as_me:22886: \"$ac_compile\"") >&5
22887   (eval $ac_compile) 2>&5
22888   ac_status=$?
22889   echo "$as_me:22889: \$? = $ac_status" >&5
22890   (exit "$ac_status"); } &&
22891          { ac_try='test -s "conftest.$ac_objext"'
22892   { (eval echo "$as_me:22892: \"$ac_try\"") >&5
22893   (eval $ac_try) 2>&5
22894   ac_status=$?
22895   echo "$as_me:22895: \$? = $ac_status" >&5
22896   (exit "$ac_status"); }; }; then
22897   cf_cv_sizechange=yes
22898 else
22899   echo "$as_me: failed program was:" >&5
22900 cat "conftest.$ac_ext" >&5
22901 cf_cv_sizechange=no
22902 fi
22903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22904
22905         CPPFLAGS="$cf_save_CPPFLAGS"
22906         if test "$cf_cv_sizechange" = yes ; then
22907                 echo "size-change succeeded ($cf_opts)" >&5
22908                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22909                 break
22910         fi
22911 done
22912
22913 fi
22914 echo "$as_me:22914: result: $cf_cv_sizechange" >&5
22915 echo "${ECHO_T}$cf_cv_sizechange" >&6
22916 if test "$cf_cv_sizechange" != no ; then
22917
22918 cat >>confdefs.h <<\EOF
22919 #define HAVE_SIZECHANGE 1
22920 EOF
22921
22922         case "$cf_cv_sizechange" in
22923         (NEED*)
22924                 cat >>confdefs.h <<EOF
22925 #define $cf_cv_sizechange  1
22926 EOF
22927
22928                 ;;
22929         esac
22930 fi
22931
22932 echo "$as_me:22932: checking for memmove" >&5
22933 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22934 if test "${ac_cv_func_memmove+set}" = set; then
22935   echo $ECHO_N "(cached) $ECHO_C" >&6
22936 else
22937   cat >"conftest.$ac_ext" <<_ACEOF
22938 #line 22938 "configure"
22939 #include "confdefs.h"
22940 #define memmove autoconf_temporary
22941 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22942 #undef memmove
22943
22944 #ifdef __cplusplus
22945 extern "C"
22946 #endif
22947
22948 /* We use char because int might match the return type of a gcc2
22949    builtin and then its argument prototype would still apply.  */
22950 char memmove (void);
22951
22952 int
22953 main (void)
22954 {
22955
22956 /* The GNU C library defines stubs for functions which it implements
22957     to always fail with ENOSYS.  Some functions are actually named
22958     something starting with __ and the normal name is an alias.  */
22959 #if defined (__stub_memmove) || defined (__stub___memmove)
22960 #error found stub for memmove
22961 #endif
22962
22963         return memmove ();
22964   ;
22965   return 0;
22966 }
22967 _ACEOF
22968 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22969 if { (eval echo "$as_me:22969: \"$ac_link\"") >&5
22970   (eval $ac_link) 2>&5
22971   ac_status=$?
22972   echo "$as_me:22972: \$? = $ac_status" >&5
22973   (exit "$ac_status"); } &&
22974          { ac_try='test -s "conftest$ac_exeext"'
22975   { (eval echo "$as_me:22975: \"$ac_try\"") >&5
22976   (eval $ac_try) 2>&5
22977   ac_status=$?
22978   echo "$as_me:22978: \$? = $ac_status" >&5
22979   (exit "$ac_status"); }; }; then
22980   ac_cv_func_memmove=yes
22981 else
22982   echo "$as_me: failed program was:" >&5
22983 cat "conftest.$ac_ext" >&5
22984 ac_cv_func_memmove=no
22985 fi
22986 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22987 fi
22988 echo "$as_me:22988: result: $ac_cv_func_memmove" >&5
22989 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22990 if test "$ac_cv_func_memmove" = yes; then
22991   :
22992 else
22993
22994 echo "$as_me:22994: checking for bcopy" >&5
22995 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22996 if test "${ac_cv_func_bcopy+set}" = set; then
22997   echo $ECHO_N "(cached) $ECHO_C" >&6
22998 else
22999   cat >"conftest.$ac_ext" <<_ACEOF
23000 #line 23000 "configure"
23001 #include "confdefs.h"
23002 #define bcopy autoconf_temporary
23003 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23004 #undef bcopy
23005
23006 #ifdef __cplusplus
23007 extern "C"
23008 #endif
23009
23010 /* We use char because int might match the return type of a gcc2
23011    builtin and then its argument prototype would still apply.  */
23012 char bcopy (void);
23013
23014 int
23015 main (void)
23016 {
23017
23018 /* The GNU C library defines stubs for functions which it implements
23019     to always fail with ENOSYS.  Some functions are actually named
23020     something starting with __ and the normal name is an alias.  */
23021 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23022 #error found stub for bcopy
23023 #endif
23024
23025         return bcopy ();
23026   ;
23027   return 0;
23028 }
23029 _ACEOF
23030 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23031 if { (eval echo "$as_me:23031: \"$ac_link\"") >&5
23032   (eval $ac_link) 2>&5
23033   ac_status=$?
23034   echo "$as_me:23034: \$? = $ac_status" >&5
23035   (exit "$ac_status"); } &&
23036          { ac_try='test -s "conftest$ac_exeext"'
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   ac_cv_func_bcopy=yes
23043 else
23044   echo "$as_me: failed program was:" >&5
23045 cat "conftest.$ac_ext" >&5
23046 ac_cv_func_bcopy=no
23047 fi
23048 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23049 fi
23050 echo "$as_me:23050: result: $ac_cv_func_bcopy" >&5
23051 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23052 if test "$ac_cv_func_bcopy" = yes; then
23053
23054         echo "$as_me:23054: checking if bcopy does overlapping moves" >&5
23055 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23056 if test "${cf_cv_good_bcopy+set}" = set; then
23057   echo $ECHO_N "(cached) $ECHO_C" >&6
23058 else
23059
23060                 if test "$cross_compiling" = yes; then
23061   cf_cv_good_bcopy=unknown
23062 else
23063   cat >"conftest.$ac_ext" <<_ACEOF
23064 #line 23064 "configure"
23065 #include "confdefs.h"
23066
23067 int main(void) {
23068         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23069         char temp[40];
23070         bcopy(data, temp, sizeof(data));
23071         bcopy(temp+10, temp, 15);
23072         bcopy(temp+5, temp+15, 10);
23073         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23074 }
23075
23076 _ACEOF
23077 rm -f "conftest$ac_exeext"
23078 if { (eval echo "$as_me:23078: \"$ac_link\"") >&5
23079   (eval $ac_link) 2>&5
23080   ac_status=$?
23081   echo "$as_me:23081: \$? = $ac_status" >&5
23082   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23083   { (eval echo "$as_me:23083: \"$ac_try\"") >&5
23084   (eval $ac_try) 2>&5
23085   ac_status=$?
23086   echo "$as_me:23086: \$? = $ac_status" >&5
23087   (exit "$ac_status"); }; }; then
23088   cf_cv_good_bcopy=yes
23089 else
23090   echo "$as_me: program exited with status $ac_status" >&5
23091 echo "$as_me: failed program was:" >&5
23092 cat "conftest.$ac_ext" >&5
23093 cf_cv_good_bcopy=no
23094 fi
23095 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23096 fi
23097
23098 fi
23099 echo "$as_me:23099: result: $cf_cv_good_bcopy" >&5
23100 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23101
23102 else
23103   cf_cv_good_bcopy=no
23104 fi
23105
23106         if test "$cf_cv_good_bcopy" = yes ; then
23107
23108 cat >>confdefs.h <<\EOF
23109 #define USE_OK_BCOPY 1
23110 EOF
23111
23112         else
23113
23114 cat >>confdefs.h <<\EOF
23115 #define USE_MY_MEMMOVE 1
23116 EOF
23117
23118         fi
23119
23120 fi
23121
23122 tty >/dev/null 2>&1 || {
23123 for ac_func in posix_openpt
23124 do
23125 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23126 echo "$as_me:23126: checking for $ac_func" >&5
23127 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23128 if eval "test \"\${$as_ac_var+set}\" = set"; then
23129   echo $ECHO_N "(cached) $ECHO_C" >&6
23130 else
23131   cat >"conftest.$ac_ext" <<_ACEOF
23132 #line 23132 "configure"
23133 #include "confdefs.h"
23134 #define $ac_func autoconf_temporary
23135 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23136 #undef $ac_func
23137
23138 #ifdef __cplusplus
23139 extern "C"
23140 #endif
23141
23142 /* We use char because int might match the return type of a gcc2
23143    builtin and then its argument prototype would still apply.  */
23144 char $ac_func (void);
23145
23146 int
23147 main (void)
23148 {
23149
23150 /* The GNU C library defines stubs for functions which it implements
23151     to always fail with ENOSYS.  Some functions are actually named
23152     something starting with __ and the normal name is an alias.  */
23153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23154 #error found stub for $ac_func
23155 #endif
23156
23157         return $ac_func ();
23158   ;
23159   return 0;
23160 }
23161 _ACEOF
23162 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23163 if { (eval echo "$as_me:23163: \"$ac_link\"") >&5
23164   (eval $ac_link) 2>&5
23165   ac_status=$?
23166   echo "$as_me:23166: \$? = $ac_status" >&5
23167   (exit "$ac_status"); } &&
23168          { ac_try='test -s "conftest$ac_exeext"'
23169   { (eval echo "$as_me:23169: \"$ac_try\"") >&5
23170   (eval $ac_try) 2>&5
23171   ac_status=$?
23172   echo "$as_me:23172: \$? = $ac_status" >&5
23173   (exit "$ac_status"); }; }; then
23174   eval "$as_ac_var=yes"
23175 else
23176   echo "$as_me: failed program was:" >&5
23177 cat "conftest.$ac_ext" >&5
23178 eval "$as_ac_var=no"
23179 fi
23180 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23181 fi
23182 echo "$as_me:23182: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23183 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23184 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23185   cat >>confdefs.h <<EOF
23186 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23187 EOF
23188
23189 fi
23190 done
23191  }
23192 echo "$as_me:23192: checking if poll really works" >&5
23193 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23194 if test "${cf_cv_working_poll+set}" = set; then
23195   echo $ECHO_N "(cached) $ECHO_C" >&6
23196 else
23197
23198 if test "$cross_compiling" = yes; then
23199   cf_cv_working_poll=unknown
23200 else
23201   cat >"conftest.$ac_ext" <<_ACEOF
23202 #line 23202 "configure"
23203 #include "confdefs.h"
23204
23205 #include <stdlib.h>
23206 #include <stdio.h>
23207 #include <unistd.h>
23208 #include <fcntl.h>
23209 #ifdef HAVE_POLL_H
23210 #include <poll.h>
23211 #else
23212 #include <sys/poll.h>
23213 #endif
23214 int main(void) {
23215         struct pollfd myfds;
23216         int ret;
23217
23218         /* check for Darwin bug with respect to "devices" */
23219         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23220         if (myfds.fd < 0)
23221                 myfds.fd = 0;
23222         myfds.events = POLLIN;
23223         myfds.revents = 0;
23224
23225         ret = poll(&myfds, 1, 100);
23226
23227         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23228                 ret = -1;
23229         } else {
23230                 int fd = 0;
23231                 if (!isatty(fd)) {
23232                         fd = open("/dev/tty", 2);       /* O_RDWR */
23233                 }
23234 #ifdef HAVE_POSIX_OPENPT
23235                 if (fd < 0) {
23236                         fd = posix_openpt(O_RDWR);
23237                 }
23238 #endif
23239
23240                 if (fd >= 0) {
23241                         /* also check with standard input */
23242                         myfds.fd = fd;
23243                         myfds.events = POLLIN;
23244                         myfds.revents = 0;
23245                         ret = poll(&myfds, 1, 100);
23246                 } else {
23247                         ret = -1;
23248                 }
23249         }
23250         ${cf_cv_main_return:-return}(ret < 0);
23251 }
23252 _ACEOF
23253 rm -f "conftest$ac_exeext"
23254 if { (eval echo "$as_me:23254: \"$ac_link\"") >&5
23255   (eval $ac_link) 2>&5
23256   ac_status=$?
23257   echo "$as_me:23257: \$? = $ac_status" >&5
23258   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23259   { (eval echo "$as_me:23259: \"$ac_try\"") >&5
23260   (eval $ac_try) 2>&5
23261   ac_status=$?
23262   echo "$as_me:23262: \$? = $ac_status" >&5
23263   (exit "$ac_status"); }; }; then
23264   cf_cv_working_poll=yes
23265 else
23266   echo "$as_me: program exited with status $ac_status" >&5
23267 echo "$as_me: failed program was:" >&5
23268 cat "conftest.$ac_ext" >&5
23269 cf_cv_working_poll=no
23270 fi
23271 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23272 fi
23273 fi
23274 echo "$as_me:23274: result: $cf_cv_working_poll" >&5
23275 echo "${ECHO_T}$cf_cv_working_poll" >&6
23276 test "$cf_cv_working_poll" = "yes" &&
23277 cat >>confdefs.h <<\EOF
23278 #define HAVE_WORKING_POLL 1
23279 EOF
23280
23281 echo "$as_me:23281: checking for va_copy" >&5
23282 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23283 if test "${cf_cv_have_va_copy+set}" = set; then
23284   echo $ECHO_N "(cached) $ECHO_C" >&6
23285 else
23286
23287 cat >"conftest.$ac_ext" <<_ACEOF
23288 #line 23288 "configure"
23289 #include "confdefs.h"
23290
23291 #include <stdarg.h>
23292
23293 int
23294 main (void)
23295 {
23296
23297         static va_list dst;
23298         static va_list src;
23299         va_copy(dst, src)
23300   ;
23301   return 0;
23302 }
23303 _ACEOF
23304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23305 if { (eval echo "$as_me:23305: \"$ac_link\"") >&5
23306   (eval $ac_link) 2>&5
23307   ac_status=$?
23308   echo "$as_me:23308: \$? = $ac_status" >&5
23309   (exit "$ac_status"); } &&
23310          { ac_try='test -s "conftest$ac_exeext"'
23311   { (eval echo "$as_me:23311: \"$ac_try\"") >&5
23312   (eval $ac_try) 2>&5
23313   ac_status=$?
23314   echo "$as_me:23314: \$? = $ac_status" >&5
23315   (exit "$ac_status"); }; }; then
23316   cf_cv_have_va_copy=yes
23317 else
23318   echo "$as_me: failed program was:" >&5
23319 cat "conftest.$ac_ext" >&5
23320 cf_cv_have_va_copy=no
23321 fi
23322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23323 fi
23324 echo "$as_me:23324: result: $cf_cv_have_va_copy" >&5
23325 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23326
23327 if test "$cf_cv_have_va_copy" = yes;
23328 then
23329
23330 cat >>confdefs.h <<\EOF
23331 #define HAVE_VA_COPY 1
23332 EOF
23333
23334 else # !cf_cv_have_va_copy
23335
23336 echo "$as_me:23336: checking for __va_copy" >&5
23337 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23338 if test "${cf_cv_have___va_copy+set}" = set; then
23339   echo $ECHO_N "(cached) $ECHO_C" >&6
23340 else
23341
23342 cat >"conftest.$ac_ext" <<_ACEOF
23343 #line 23343 "configure"
23344 #include "confdefs.h"
23345
23346 #include <stdarg.h>
23347
23348 int
23349 main (void)
23350 {
23351
23352         static va_list dst;
23353         static va_list src;
23354         __va_copy(dst, src)
23355   ;
23356   return 0;
23357 }
23358 _ACEOF
23359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23360 if { (eval echo "$as_me:23360: \"$ac_link\"") >&5
23361   (eval $ac_link) 2>&5
23362   ac_status=$?
23363   echo "$as_me:23363: \$? = $ac_status" >&5
23364   (exit "$ac_status"); } &&
23365          { ac_try='test -s "conftest$ac_exeext"'
23366   { (eval echo "$as_me:23366: \"$ac_try\"") >&5
23367   (eval $ac_try) 2>&5
23368   ac_status=$?
23369   echo "$as_me:23369: \$? = $ac_status" >&5
23370   (exit "$ac_status"); }; }; then
23371   cf_cv_have___va_copy=yes
23372 else
23373   echo "$as_me: failed program was:" >&5
23374 cat "conftest.$ac_ext" >&5
23375 cf_cv_have___va_copy=no
23376 fi
23377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23378 fi
23379 echo "$as_me:23379: result: $cf_cv_have___va_copy" >&5
23380 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23381
23382 if test "$cf_cv_have___va_copy" = yes
23383 then
23384
23385 cat >>confdefs.h <<\EOF
23386 #define HAVE___VA_COPY 1
23387 EOF
23388
23389 else # !cf_cv_have___va_copy
23390
23391 echo "$as_me:23391: checking for __builtin_va_copy" >&5
23392 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23393 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23394   echo $ECHO_N "(cached) $ECHO_C" >&6
23395 else
23396
23397 cat >"conftest.$ac_ext" <<_ACEOF
23398 #line 23398 "configure"
23399 #include "confdefs.h"
23400
23401 #include <stdarg.h>
23402
23403 int
23404 main (void)
23405 {
23406
23407         static va_list dst;
23408         static va_list src;
23409         __builtin_va_copy(dst, src)
23410   ;
23411   return 0;
23412 }
23413 _ACEOF
23414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23415 if { (eval echo "$as_me:23415: \"$ac_link\"") >&5
23416   (eval $ac_link) 2>&5
23417   ac_status=$?
23418   echo "$as_me:23418: \$? = $ac_status" >&5
23419   (exit "$ac_status"); } &&
23420          { ac_try='test -s "conftest$ac_exeext"'
23421   { (eval echo "$as_me:23421: \"$ac_try\"") >&5
23422   (eval $ac_try) 2>&5
23423   ac_status=$?
23424   echo "$as_me:23424: \$? = $ac_status" >&5
23425   (exit "$ac_status"); }; }; then
23426   cf_cv_have___builtin_va_copy=yes
23427 else
23428   echo "$as_me: failed program was:" >&5
23429 cat "conftest.$ac_ext" >&5
23430 cf_cv_have___builtin_va_copy=no
23431 fi
23432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23433 fi
23434 echo "$as_me:23434: result: $cf_cv_have___builtin_va_copy" >&5
23435 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23436
23437 test "$cf_cv_have___builtin_va_copy" = yes &&
23438
23439 cat >>confdefs.h <<\EOF
23440 #define HAVE___BUILTIN_VA_COPY 1
23441 EOF
23442
23443 fi # cf_cv_have___va_copy
23444
23445 fi # cf_cv_have_va_copy
23446
23447 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23448 (*yes*)
23449         ;;
23450
23451 (*)
23452         echo "$as_me:23452: checking if we can simply copy va_list" >&5
23453 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23454 if test "${cf_cv_pointer_va_list+set}" = set; then
23455   echo $ECHO_N "(cached) $ECHO_C" >&6
23456 else
23457
23458 cat >"conftest.$ac_ext" <<_ACEOF
23459 #line 23459 "configure"
23460 #include "confdefs.h"
23461
23462 #include <stdarg.h>
23463
23464 int
23465 main (void)
23466 {
23467
23468         va_list dst;
23469         va_list src;
23470         dst = src
23471   ;
23472   return 0;
23473 }
23474 _ACEOF
23475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23476 if { (eval echo "$as_me:23476: \"$ac_link\"") >&5
23477   (eval $ac_link) 2>&5
23478   ac_status=$?
23479   echo "$as_me:23479: \$? = $ac_status" >&5
23480   (exit "$ac_status"); } &&
23481          { ac_try='test -s "conftest$ac_exeext"'
23482   { (eval echo "$as_me:23482: \"$ac_try\"") >&5
23483   (eval $ac_try) 2>&5
23484   ac_status=$?
23485   echo "$as_me:23485: \$? = $ac_status" >&5
23486   (exit "$ac_status"); }; }; then
23487   cf_cv_pointer_va_list=yes
23488 else
23489   echo "$as_me: failed program was:" >&5
23490 cat "conftest.$ac_ext" >&5
23491 cf_cv_pointer_va_list=no
23492 fi
23493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23494 fi
23495 echo "$as_me:23495: result: $cf_cv_pointer_va_list" >&5
23496 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23497
23498         if test "$cf_cv_pointer_va_list" = no
23499         then
23500                 echo "$as_me:23500: checking if we can copy va_list indirectly" >&5
23501 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23502 if test "${cf_cv_array_va_list+set}" = set; then
23503   echo $ECHO_N "(cached) $ECHO_C" >&6
23504 else
23505
23506 cat >"conftest.$ac_ext" <<_ACEOF
23507 #line 23507 "configure"
23508 #include "confdefs.h"
23509
23510 #include <stdarg.h>
23511
23512 int
23513 main (void)
23514 {
23515
23516         va_list dst;
23517         va_list src;
23518         *dst = *src
23519   ;
23520   return 0;
23521 }
23522 _ACEOF
23523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23524 if { (eval echo "$as_me:23524: \"$ac_link\"") >&5
23525   (eval $ac_link) 2>&5
23526   ac_status=$?
23527   echo "$as_me:23527: \$? = $ac_status" >&5
23528   (exit "$ac_status"); } &&
23529          { ac_try='test -s "conftest$ac_exeext"'
23530   { (eval echo "$as_me:23530: \"$ac_try\"") >&5
23531   (eval $ac_try) 2>&5
23532   ac_status=$?
23533   echo "$as_me:23533: \$? = $ac_status" >&5
23534   (exit "$ac_status"); }; }; then
23535   cf_cv_array_va_list=yes
23536 else
23537   echo "$as_me: failed program was:" >&5
23538 cat "conftest.$ac_ext" >&5
23539 cf_cv_array_va_list=no
23540 fi
23541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23542 fi
23543 echo "$as_me:23543: result: $cf_cv_array_va_list" >&5
23544 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23545                 test "$cf_cv_array_va_list" = yes &&
23546 cat >>confdefs.h <<\EOF
23547 #define ARRAY_VA_LIST 1
23548 EOF
23549
23550         fi
23551         ;;
23552 esac
23553
23554 echo "$as_me:23554: checking for pid_t" >&5
23555 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23556 if test "${ac_cv_type_pid_t+set}" = set; then
23557   echo $ECHO_N "(cached) $ECHO_C" >&6
23558 else
23559   cat >"conftest.$ac_ext" <<_ACEOF
23560 #line 23560 "configure"
23561 #include "confdefs.h"
23562 $ac_includes_default
23563 int
23564 main (void)
23565 {
23566 if ((pid_t *) 0)
23567   return 0;
23568 if (sizeof (pid_t))
23569   return 0;
23570   ;
23571   return 0;
23572 }
23573 _ACEOF
23574 rm -f "conftest.$ac_objext"
23575 if { (eval echo "$as_me:23575: \"$ac_compile\"") >&5
23576   (eval $ac_compile) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit "$ac_status"); } &&
23580          { ac_try='test -s "conftest.$ac_objext"'
23581   { (eval echo "$as_me:23581: \"$ac_try\"") >&5
23582   (eval $ac_try) 2>&5
23583   ac_status=$?
23584   echo "$as_me:23584: \$? = $ac_status" >&5
23585   (exit "$ac_status"); }; }; then
23586   ac_cv_type_pid_t=yes
23587 else
23588   echo "$as_me: failed program was:" >&5
23589 cat "conftest.$ac_ext" >&5
23590 ac_cv_type_pid_t=no
23591 fi
23592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23593 fi
23594 echo "$as_me:23594: result: $ac_cv_type_pid_t" >&5
23595 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23596 if test "$ac_cv_type_pid_t" = yes; then
23597   :
23598 else
23599
23600 cat >>confdefs.h <<EOF
23601 #define pid_t int
23602 EOF
23603
23604 fi
23605
23606 for ac_header in unistd.h vfork.h
23607 do
23608 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23609 echo "$as_me:23609: checking for $ac_header" >&5
23610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23612   echo $ECHO_N "(cached) $ECHO_C" >&6
23613 else
23614   cat >"conftest.$ac_ext" <<_ACEOF
23615 #line 23615 "configure"
23616 #include "confdefs.h"
23617 #include <$ac_header>
23618 _ACEOF
23619 if { (eval echo "$as_me:23619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23620   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23621   ac_status=$?
23622   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23623   rm -f conftest.er1
23624   cat conftest.err >&5
23625   echo "$as_me:23625: \$? = $ac_status" >&5
23626   (exit "$ac_status"); } >/dev/null; then
23627   if test -s conftest.err; then
23628     ac_cpp_err=$ac_c_preproc_warn_flag
23629   else
23630     ac_cpp_err=
23631   fi
23632 else
23633   ac_cpp_err=yes
23634 fi
23635 if test -z "$ac_cpp_err"; then
23636   eval "$as_ac_Header=yes"
23637 else
23638   echo "$as_me: failed program was:" >&5
23639   cat "conftest.$ac_ext" >&5
23640   eval "$as_ac_Header=no"
23641 fi
23642 rm -f conftest.err "conftest.$ac_ext"
23643 fi
23644 echo "$as_me:23644: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23645 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23646 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23647   cat >>confdefs.h <<EOF
23648 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23649 EOF
23650
23651 fi
23652 done
23653
23654 for ac_func in fork vfork
23655 do
23656 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23657 echo "$as_me:23657: checking for $ac_func" >&5
23658 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23659 if eval "test \"\${$as_ac_var+set}\" = set"; then
23660   echo $ECHO_N "(cached) $ECHO_C" >&6
23661 else
23662   cat >"conftest.$ac_ext" <<_ACEOF
23663 #line 23663 "configure"
23664 #include "confdefs.h"
23665 #define $ac_func autoconf_temporary
23666 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23667 #undef $ac_func
23668
23669 #ifdef __cplusplus
23670 extern "C"
23671 #endif
23672
23673 /* We use char because int might match the return type of a gcc2
23674    builtin and then its argument prototype would still apply.  */
23675 char $ac_func (void);
23676
23677 int
23678 main (void)
23679 {
23680
23681 /* The GNU C library defines stubs for functions which it implements
23682     to always fail with ENOSYS.  Some functions are actually named
23683     something starting with __ and the normal name is an alias.  */
23684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23685 #error found stub for $ac_func
23686 #endif
23687
23688         return $ac_func ();
23689   ;
23690   return 0;
23691 }
23692 _ACEOF
23693 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23694 if { (eval echo "$as_me:23694: \"$ac_link\"") >&5
23695   (eval $ac_link) 2>&5
23696   ac_status=$?
23697   echo "$as_me:23697: \$? = $ac_status" >&5
23698   (exit "$ac_status"); } &&
23699          { ac_try='test -s "conftest$ac_exeext"'
23700   { (eval echo "$as_me:23700: \"$ac_try\"") >&5
23701   (eval $ac_try) 2>&5
23702   ac_status=$?
23703   echo "$as_me:23703: \$? = $ac_status" >&5
23704   (exit "$ac_status"); }; }; then
23705   eval "$as_ac_var=yes"
23706 else
23707   echo "$as_me: failed program was:" >&5
23708 cat "conftest.$ac_ext" >&5
23709 eval "$as_ac_var=no"
23710 fi
23711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23712 fi
23713 echo "$as_me:23713: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23714 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23715 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23716   cat >>confdefs.h <<EOF
23717 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23718 EOF
23719
23720 fi
23721 done
23722
23723 ac_cv_func_fork_works=$ac_cv_func_fork
23724 if test "x$ac_cv_func_fork" = xyes; then
23725   echo "$as_me:23725: checking for working fork" >&5
23726 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23727 if test "${ac_cv_func_fork_works+set}" = set; then
23728   echo $ECHO_N "(cached) $ECHO_C" >&6
23729 else
23730   if test "$cross_compiling" = yes; then
23731   ac_cv_func_fork_works=cross
23732 else
23733   cat >"conftest.$ac_ext" <<_ACEOF
23734 /* By Rüdiger Kuhlmann. */
23735       #include <sys/types.h>
23736       #if HAVE_UNISTD_H
23737       # include <unistd.h>
23738       #endif
23739       /* Some systems only have a dummy stub for fork() */
23740       int main (void)
23741       {
23742         if (fork() < 0)
23743           $ac_main_return (1);
23744         $ac_main_return (0);
23745       }
23746 _ACEOF
23747 rm -f "conftest$ac_exeext"
23748 if { (eval echo "$as_me:23748: \"$ac_link\"") >&5
23749   (eval $ac_link) 2>&5
23750   ac_status=$?
23751   echo "$as_me:23751: \$? = $ac_status" >&5
23752   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23753   { (eval echo "$as_me:23753: \"$ac_try\"") >&5
23754   (eval $ac_try) 2>&5
23755   ac_status=$?
23756   echo "$as_me:23756: \$? = $ac_status" >&5
23757   (exit "$ac_status"); }; }; then
23758   ac_cv_func_fork_works=yes
23759 else
23760   echo "$as_me: program exited with status $ac_status" >&5
23761 echo "$as_me: failed program was:" >&5
23762 cat "conftest.$ac_ext" >&5
23763 ac_cv_func_fork_works=no
23764 fi
23765 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23766 fi
23767 fi
23768 echo "$as_me:23768: result: $ac_cv_func_fork_works" >&5
23769 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23770
23771 fi
23772 if test "x$ac_cv_func_fork_works" = xcross; then
23773   case $host in
23774     *-*-amigaos* | *-*-msdosdjgpp*)
23775       # Override, as these systems have only a dummy fork() stub
23776       ac_cv_func_fork_works=no
23777       ;;
23778     *)
23779       ac_cv_func_fork_works=yes
23780       ;;
23781   esac
23782   { echo "$as_me:23782: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23783 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23784 fi
23785 ac_cv_func_vfork_works=$ac_cv_func_vfork
23786 if test "x$ac_cv_func_vfork" = xyes; then
23787   echo "$as_me:23787: checking for working vfork" >&5
23788 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23789 if test "${ac_cv_func_vfork_works+set}" = set; then
23790   echo $ECHO_N "(cached) $ECHO_C" >&6
23791 else
23792   if test "$cross_compiling" = yes; then
23793   ac_cv_func_vfork_works=cross
23794 else
23795   cat >"conftest.$ac_ext" <<_ACEOF
23796 #line 23796 "configure"
23797 #include "confdefs.h"
23798 /* Thanks to Paul Eggert for this test.  */
23799 #include <stdio.h>
23800 #include <sys/types.h>
23801 #include <sys/stat.h>
23802 #if HAVE_UNISTD_H
23803 # include <unistd.h>
23804 #endif
23805 #if HAVE_VFORK_H
23806 # include <vfork.h>
23807 #endif
23808 /* On some sparc systems, changes by the child to local and incoming
23809    argument registers are propagated back to the parent.  The compiler
23810    is told about this with #include <vfork.h>, but some compilers
23811    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23812    static variable whose address is put into a register that is
23813    clobbered by the vfork.  */
23814 static
23815 #ifdef __cplusplus
23816 sparc_address_test (int arg)
23817 # else
23818 sparc_address_test (arg) int arg;
23819 #endif
23820 {
23821   static pid_t child;
23822   if (!child) {
23823     child = vfork ();
23824     if (child < 0) {
23825       perror ("vfork");
23826       _exit(2);
23827     }
23828     if (!child) {
23829       arg = getpid();
23830       write(-1, "", 0);
23831       _exit (arg);
23832     }
23833   }
23834 }
23835
23836 int
23837 main (void)
23838 {
23839   pid_t parent = getpid ();
23840   pid_t child;
23841
23842   sparc_address_test ();
23843
23844   child = vfork ();
23845
23846   if (child == 0) {
23847     /* Here is another test for sparc vfork register problems.  This
23848        test uses lots of local variables, at least as many local
23849        variables as main has allocated so far including compiler
23850        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23851        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23852        reuse the register of parent for one of the local variables,
23853        since it will think that parent can't possibly be used any more
23854        in this routine.  Assigning to the local variable will thus
23855        munge parent in the parent process.  */
23856     pid_t
23857       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23858       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23859     /* Convince the compiler that p..p7 are live; otherwise, it might
23860        use the same hardware register for all 8 local variables.  */
23861     if (p != p1 || p != p2 || p != p3 || p != p4
23862         || p != p5 || p != p6 || p != p7)
23863       _exit(1);
23864
23865     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23866        from child file descriptors.  If the child closes a descriptor
23867        before it execs or exits, this munges the parent's descriptor
23868        as well.  Test for this by closing stdout in the child.  */
23869     _exit(close(fileno(stdout)) != 0);
23870   } else {
23871     int status;
23872     struct stat st;
23873
23874     while (wait(&status) != child)
23875       ;
23876     $ac_main_return(
23877          /* Was there some problem with vforking?  */
23878          child < 0
23879
23880          /* Did the child fail?  (This shouldn't happen.)  */
23881          || status
23882
23883          /* Did the vfork/compiler bug occur?  */
23884          || parent != getpid()
23885
23886          /* Did the file descriptor bug occur?  */
23887          || fstat(fileno(stdout), &st) != 0
23888          );
23889   }
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_vfork_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_vfork_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_vfork_works" >&5
23914 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23915
23916 fi;
23917 if test "x$ac_cv_func_fork_works" = xcross; then
23918   ac_cv_func_vfork_works=ac_cv_func_vfork
23919   { echo "$as_me:23919: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23920 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23921 fi
23922
23923 if test "x$ac_cv_func_vfork_works" = xyes; then
23924
23925 cat >>confdefs.h <<\EOF
23926 #define HAVE_WORKING_VFORK 1
23927 EOF
23928
23929 else
23930
23931 cat >>confdefs.h <<\EOF
23932 #define vfork fork
23933 EOF
23934
23935 fi
23936 if test "x$ac_cv_func_fork_works" = xyes; then
23937
23938 cat >>confdefs.h <<\EOF
23939 #define HAVE_WORKING_FORK 1
23940 EOF
23941
23942 fi
23943
23944 echo "$as_me:23944: checking if fopen accepts explicit binary mode" >&5
23945 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23946 if test "${cf_cv_fopen_bin_r+set}" = set; then
23947   echo $ECHO_N "(cached) $ECHO_C" >&6
23948 else
23949
23950         if test "$cross_compiling" = yes; then
23951   cf_cv_fopen_bin_r=unknown
23952 else
23953   cat >"conftest.$ac_ext" <<_ACEOF
23954 #line 23954 "configure"
23955 #include "confdefs.h"
23956
23957 #include <stdio.h>
23958 int main(void) {
23959         FILE *fp = fopen("conftest.tmp", "wb");
23960         int rc = 0;
23961         if (fp != 0) {
23962                 int p, q;
23963                 for (p = 0; p < 256; ++p) {
23964                         fputc(p, fp);
23965                 }
23966                 fclose(fp);
23967                 fp = fopen("conftest.tmp", "rb");
23968                 if (fp != 0) {
23969                         for (p = 0; p < 256; ++p) {
23970                                 q = fgetc(fp);
23971                                 if (q != p) {
23972                                         rc = 1;
23973                                         break;
23974                                 }
23975                         }
23976                 } else {
23977                         rc = 1;
23978                 }
23979         } else {
23980                 rc = 1;
23981         }
23982         ${cf_cv_main_return:-return} (rc);
23983 }
23984
23985 _ACEOF
23986 rm -f "conftest$ac_exeext"
23987 if { (eval echo "$as_me:23987: \"$ac_link\"") >&5
23988   (eval $ac_link) 2>&5
23989   ac_status=$?
23990   echo "$as_me:23990: \$? = $ac_status" >&5
23991   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23992   { (eval echo "$as_me:23992: \"$ac_try\"") >&5
23993   (eval $ac_try) 2>&5
23994   ac_status=$?
23995   echo "$as_me:23995: \$? = $ac_status" >&5
23996   (exit "$ac_status"); }; }; then
23997   cf_cv_fopen_bin_r=yes
23998 else
23999   echo "$as_me: program exited with status $ac_status" >&5
24000 echo "$as_me: failed program was:" >&5
24001 cat "conftest.$ac_ext" >&5
24002 cf_cv_fopen_bin_r=no
24003 fi
24004 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24005 fi
24006
24007 fi
24008 echo "$as_me:24008: result: $cf_cv_fopen_bin_r" >&5
24009 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24010 test "x$cf_cv_fopen_bin_r" != xno &&
24011 cat >>confdefs.h <<\EOF
24012 #define USE_FOPEN_BIN_R 1
24013 EOF
24014
24015 # special check for test/ditto.c
24016
24017 echo "$as_me:24017: checking for openpty in -lutil" >&5
24018 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24019 if test "${ac_cv_lib_util_openpty+set}" = set; then
24020   echo $ECHO_N "(cached) $ECHO_C" >&6
24021 else
24022   ac_check_lib_save_LIBS=$LIBS
24023 LIBS="-lutil  $LIBS"
24024 cat >"conftest.$ac_ext" <<_ACEOF
24025 #line 24025 "configure"
24026 #include "confdefs.h"
24027
24028 /* Override any gcc2 internal prototype to avoid an error.  */
24029 #ifdef __cplusplus
24030 extern "C"
24031 #endif
24032 /* We use char because int might match the return type of a gcc2
24033    builtin and then its argument prototype would still apply.  */
24034 char openpty ();
24035 int
24036 main (void)
24037 {
24038 openpty ();
24039   ;
24040   return 0;
24041 }
24042 _ACEOF
24043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24044 if { (eval echo "$as_me:24044: \"$ac_link\"") >&5
24045   (eval $ac_link) 2>&5
24046   ac_status=$?
24047   echo "$as_me:24047: \$? = $ac_status" >&5
24048   (exit "$ac_status"); } &&
24049          { ac_try='test -s "conftest$ac_exeext"'
24050   { (eval echo "$as_me:24050: \"$ac_try\"") >&5
24051   (eval $ac_try) 2>&5
24052   ac_status=$?
24053   echo "$as_me:24053: \$? = $ac_status" >&5
24054   (exit "$ac_status"); }; }; then
24055   ac_cv_lib_util_openpty=yes
24056 else
24057   echo "$as_me: failed program was:" >&5
24058 cat "conftest.$ac_ext" >&5
24059 ac_cv_lib_util_openpty=no
24060 fi
24061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24062 LIBS=$ac_check_lib_save_LIBS
24063 fi
24064 echo "$as_me:24064: result: $ac_cv_lib_util_openpty" >&5
24065 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24066 if test "$ac_cv_lib_util_openpty" = yes; then
24067   cf_cv_lib_util=yes
24068 else
24069   cf_cv_lib_util=no
24070 fi
24071
24072 echo "$as_me:24072: checking for openpty header" >&5
24073 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24074 if test "${cf_cv_func_openpty+set}" = set; then
24075   echo $ECHO_N "(cached) $ECHO_C" >&6
24076 else
24077
24078         cf_save_LIBS="$LIBS"
24079         test "$cf_cv_lib_util" = yes && {
24080 cf_add_libs="$LIBS"
24081 # reverse order
24082 cf_add_0lib=
24083 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24084 # filter duplicates
24085 for cf_add_1lib in $cf_add_0lib; do
24086         for cf_add_2lib in $cf_add_libs; do
24087                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24088                         cf_add_1lib=
24089                         break
24090                 fi
24091         done
24092         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24093 done
24094 LIBS="$cf_add_libs"
24095  }
24096         for cf_header in pty.h libutil.h util.h
24097         do
24098         cat >"conftest.$ac_ext" <<_ACEOF
24099 #line 24099 "configure"
24100 #include "confdefs.h"
24101
24102 #include <$cf_header>
24103
24104 int
24105 main (void)
24106 {
24107
24108         int x = openpty((int *)0, (int *)0, (char *)0,
24109                                    (struct termios *)0, (struct winsize *)0);
24110
24111   ;
24112   return 0;
24113 }
24114 _ACEOF
24115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24116 if { (eval echo "$as_me:24116: \"$ac_link\"") >&5
24117   (eval $ac_link) 2>&5
24118   ac_status=$?
24119   echo "$as_me:24119: \$? = $ac_status" >&5
24120   (exit "$ac_status"); } &&
24121          { ac_try='test -s "conftest$ac_exeext"'
24122   { (eval echo "$as_me:24122: \"$ac_try\"") >&5
24123   (eval $ac_try) 2>&5
24124   ac_status=$?
24125   echo "$as_me:24125: \$? = $ac_status" >&5
24126   (exit "$ac_status"); }; }; then
24127
24128                 cf_cv_func_openpty=$cf_header
24129                 break
24130
24131 else
24132   echo "$as_me: failed program was:" >&5
24133 cat "conftest.$ac_ext" >&5
24134
24135                 cf_cv_func_openpty=no
24136
24137 fi
24138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24139         done
24140         LIBS="$cf_save_LIBS"
24141
24142 fi
24143 echo "$as_me:24143: result: $cf_cv_func_openpty" >&5
24144 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24145
24146 if test "$cf_cv_func_openpty" != no ; then
24147
24148 cat >>confdefs.h <<EOF
24149 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24150 EOF
24151
24152 cat >>confdefs.h <<\EOF
24153 #define USE_XTERM_PTY 1
24154 EOF
24155
24156         if test "x$cf_cv_lib_util" = xyes ; then
24157
24158 cf_add_libs="$TEST_LIBS"
24159 # reverse order
24160 cf_add_0lib=
24161 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24162 # filter duplicates
24163 for cf_add_1lib in $cf_add_0lib; do
24164         for cf_add_2lib in $cf_add_libs; do
24165                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24166                         cf_add_1lib=
24167                         break
24168                 fi
24169         done
24170         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24171 done
24172 TEST_LIBS="$cf_add_libs"
24173
24174         fi
24175 fi
24176
24177 if test "$with_hashed_db" != no ; then
24178
24179 cat >>confdefs.h <<\EOF
24180 #define USE_HASHED_DB 1
24181 EOF
24182
24183 case $with_hashed_db in
24184 (yes|*able*)
24185         ;;
24186 (*)
24187         if test -d "$with_hashed_db" ; then
24188
24189 if test -n "$with_hashed_db/include" ; then
24190   for cf_add_incdir in $with_hashed_db/include
24191   do
24192         while test "$cf_add_incdir" != /usr/include
24193         do
24194           if test -d "$cf_add_incdir"
24195           then
24196                 cf_have_incdir=no
24197                 if test -n "$CFLAGS$CPPFLAGS" ; then
24198                   # a loop is needed to ensure we can add subdirs of existing dirs
24199                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24200                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24201                           cf_have_incdir=yes; break
24202                         fi
24203                   done
24204                 fi
24205
24206                 if test "$cf_have_incdir" = no ; then
24207                   if test "$cf_add_incdir" = /usr/local/include ; then
24208                         if test "$GCC" = yes
24209                         then
24210                           cf_save_CPPFLAGS=$CPPFLAGS
24211
24212         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24213         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24214
24215                           cat >"conftest.$ac_ext" <<_ACEOF
24216 #line 24216 "configure"
24217 #include "confdefs.h"
24218 #include <stdio.h>
24219 int
24220 main (void)
24221 {
24222 printf("Hello")
24223   ;
24224   return 0;
24225 }
24226 _ACEOF
24227 rm -f "conftest.$ac_objext"
24228 if { (eval echo "$as_me:24228: \"$ac_compile\"") >&5
24229   (eval $ac_compile) 2>&5
24230   ac_status=$?
24231   echo "$as_me:24231: \$? = $ac_status" >&5
24232   (exit "$ac_status"); } &&
24233          { ac_try='test -s "conftest.$ac_objext"'
24234   { (eval echo "$as_me:24234: \"$ac_try\"") >&5
24235   (eval $ac_try) 2>&5
24236   ac_status=$?
24237   echo "$as_me:24237: \$? = $ac_status" >&5
24238   (exit "$ac_status"); }; }; then
24239   :
24240 else
24241   echo "$as_me: failed program was:" >&5
24242 cat "conftest.$ac_ext" >&5
24243 cf_have_incdir=yes
24244 fi
24245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24246                           CPPFLAGS=$cf_save_CPPFLAGS
24247                         fi
24248                   fi
24249                 fi
24250
24251                 if test "$cf_have_incdir" = no ; then
24252                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24253
24254 echo "${as_me:-configure}:24254: testing adding $cf_add_incdir to include-path ..." 1>&5
24255
24256                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24257
24258                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24259                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24260                   cf_add_incdir="$cf_top_incdir"
24261                 else
24262                   break
24263                 fi
24264           else
24265                 break
24266           fi
24267         done
24268   done
24269 fi
24270
24271 if test -n "$with_hashed_db/lib" ; then
24272         for cf_add_libdir in $with_hashed_db/lib
24273         do
24274                 if test "$cf_add_libdir" = /usr/lib ; then
24275                         :
24276                 elif test -d "$cf_add_libdir"
24277                 then
24278                         cf_have_libdir=no
24279                         if test -n "$LDFLAGS$LIBS" ; then
24280                                 # a loop is needed to ensure we can add subdirs of existing dirs
24281                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24282                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24283                                                 cf_have_libdir=yes; break
24284                                         fi
24285                                 done
24286                         fi
24287                         if test "$cf_have_libdir" = no ; then
24288                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24289
24290 echo "${as_me:-configure}:24290: testing adding $cf_add_libdir to library-path ..." 1>&5
24291
24292                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24293                         fi
24294                 fi
24295         done
24296 fi
24297
24298         else
24299                 case "$with_hashed_db" in
24300                 (./*|../*|/*)
24301                         { echo "$as_me:24301: WARNING: no such directory $with_hashed_db" >&5
24302 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24303                         ;;
24304                 (*)
24305
24306 cf_search=
24307
24308 test "x$prefix" != "xNONE" && \
24309 test -d "$prefix" && \
24310  {
24311         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24312         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24313         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24314         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24315         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24316         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24317 }
24318
24319 for cf_subdir_prefix in \
24320         /usr \
24321         /usr/local \
24322         /usr/pkg \
24323         /opt \
24324         /opt/local \
24325         $HOME
24326 do
24327
24328 test "x$cf_subdir_prefix" != "x$prefix" && \
24329 test -d "$cf_subdir_prefix" && \
24330 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24331         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24332         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24333         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24334         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24335         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24336         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"
24337 }
24338
24339 done
24340
24341         for cf_item in $cf_search
24342         do
24343                 case "$cf_item" in
24344                 (*/$with_hashed_db)
24345
24346 if test -n "$cf_item" ; then
24347   for cf_add_incdir in $cf_item
24348   do
24349         while test "$cf_add_incdir" != /usr/include
24350         do
24351           if test -d "$cf_add_incdir"
24352           then
24353                 cf_have_incdir=no
24354                 if test -n "$CFLAGS$CPPFLAGS" ; then
24355                   # a loop is needed to ensure we can add subdirs of existing dirs
24356                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24357                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24358                           cf_have_incdir=yes; break
24359                         fi
24360                   done
24361                 fi
24362
24363                 if test "$cf_have_incdir" = no ; then
24364                   if test "$cf_add_incdir" = /usr/local/include ; then
24365                         if test "$GCC" = yes
24366                         then
24367                           cf_save_CPPFLAGS=$CPPFLAGS
24368
24369         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24370         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24371
24372                           cat >"conftest.$ac_ext" <<_ACEOF
24373 #line 24373 "configure"
24374 #include "confdefs.h"
24375 #include <stdio.h>
24376 int
24377 main (void)
24378 {
24379 printf("Hello")
24380   ;
24381   return 0;
24382 }
24383 _ACEOF
24384 rm -f "conftest.$ac_objext"
24385 if { (eval echo "$as_me:24385: \"$ac_compile\"") >&5
24386   (eval $ac_compile) 2>&5
24387   ac_status=$?
24388   echo "$as_me:24388: \$? = $ac_status" >&5
24389   (exit "$ac_status"); } &&
24390          { ac_try='test -s "conftest.$ac_objext"'
24391   { (eval echo "$as_me:24391: \"$ac_try\"") >&5
24392   (eval $ac_try) 2>&5
24393   ac_status=$?
24394   echo "$as_me:24394: \$? = $ac_status" >&5
24395   (exit "$ac_status"); }; }; then
24396   :
24397 else
24398   echo "$as_me: failed program was:" >&5
24399 cat "conftest.$ac_ext" >&5
24400 cf_have_incdir=yes
24401 fi
24402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24403                           CPPFLAGS=$cf_save_CPPFLAGS
24404                         fi
24405                   fi
24406                 fi
24407
24408                 if test "$cf_have_incdir" = no ; then
24409                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24410
24411 echo "${as_me:-configure}:24411: testing adding $cf_add_incdir to include-path ..." 1>&5
24412
24413                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24414
24415                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24416                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24417                   cf_add_incdir="$cf_top_incdir"
24418                 else
24419                   break
24420                 fi
24421           else
24422                 break
24423           fi
24424         done
24425   done
24426 fi
24427
24428                         ;;
24429                 esac
24430         done
24431
24432 cf_search=
24433
24434 test "x$prefix" != "xNONE" && \
24435 test -d "$prefix" && \
24436  {
24437         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24438         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24439         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24440         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24441         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24442         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24443 }
24444
24445 for cf_subdir_prefix in \
24446         /usr \
24447         /usr/local \
24448         /usr/pkg \
24449         /opt \
24450         /opt/local \
24451         $HOME
24452 do
24453
24454 test "x$cf_subdir_prefix" != "x$prefix" && \
24455 test -d "$cf_subdir_prefix" && \
24456 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24457         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24458         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24459         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24460         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24461         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24462         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"
24463 }
24464
24465 done
24466
24467         for cf_item in $cf_search
24468         do
24469                 case "$cf_item" in
24470                 (*/$with_hashed_db)
24471
24472 if test -n "$cf_item" ; then
24473         for cf_add_libdir in $cf_item
24474         do
24475                 if test "$cf_add_libdir" = /usr/lib ; then
24476                         :
24477                 elif test -d "$cf_add_libdir"
24478                 then
24479                         cf_have_libdir=no
24480                         if test -n "$LDFLAGS$LIBS" ; then
24481                                 # a loop is needed to ensure we can add subdirs of existing dirs
24482                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24483                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24484                                                 cf_have_libdir=yes; break
24485                                         fi
24486                                 done
24487                         fi
24488                         if test "$cf_have_libdir" = no ; then
24489                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24490
24491 echo "${as_me:-configure}:24491: testing adding $cf_add_libdir to library-path ..." 1>&5
24492
24493                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24494                         fi
24495                 fi
24496         done
24497 fi
24498
24499                         ;;
24500                 esac
24501         done
24502
24503                         ;;
24504                 esac
24505         fi
24506 esac
24507
24508 echo "$as_me:24508: checking for db.h" >&5
24509 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24510 if test "${ac_cv_header_db_h+set}" = set; then
24511   echo $ECHO_N "(cached) $ECHO_C" >&6
24512 else
24513   cat >"conftest.$ac_ext" <<_ACEOF
24514 #line 24514 "configure"
24515 #include "confdefs.h"
24516 #include <db.h>
24517 _ACEOF
24518 if { (eval echo "$as_me:24518: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24519   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24520   ac_status=$?
24521   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24522   rm -f conftest.er1
24523   cat conftest.err >&5
24524   echo "$as_me:24524: \$? = $ac_status" >&5
24525   (exit "$ac_status"); } >/dev/null; then
24526   if test -s conftest.err; then
24527     ac_cpp_err=$ac_c_preproc_warn_flag
24528   else
24529     ac_cpp_err=
24530   fi
24531 else
24532   ac_cpp_err=yes
24533 fi
24534 if test -z "$ac_cpp_err"; then
24535   ac_cv_header_db_h=yes
24536 else
24537   echo "$as_me: failed program was:" >&5
24538   cat "conftest.$ac_ext" >&5
24539   ac_cv_header_db_h=no
24540 fi
24541 rm -f conftest.err "conftest.$ac_ext"
24542 fi
24543 echo "$as_me:24543: result: $ac_cv_header_db_h" >&5
24544 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24545 if test "$ac_cv_header_db_h" = yes; then
24546
24547 echo "$as_me:24547: checking for version of db" >&5
24548 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24549 if test "${cf_cv_hashed_db_version+set}" = set; then
24550   echo $ECHO_N "(cached) $ECHO_C" >&6
24551 else
24552
24553 cf_cv_hashed_db_version=unknown
24554
24555 for cf_db_version in 1 2 3 4 5 6
24556 do
24557
24558 echo "${as_me:-configure}:24558: testing checking for db version $cf_db_version ..." 1>&5
24559
24560         cat >"conftest.$ac_ext" <<_ACEOF
24561 #line 24561 "configure"
24562 #include "confdefs.h"
24563
24564 $ac_includes_default
24565 #include <db.h>
24566
24567 #ifdef DB_VERSION_MAJOR
24568         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24569 #if $cf_db_version == DB_VERSION_MAJOR
24570         /* ok */
24571 #else
24572         make an error
24573 #endif
24574 #else
24575 #if $cf_db_version == 1
24576         /* ok: assuming this is DB 1.8.5 */
24577 #else
24578         make an error
24579 #endif
24580 #endif
24581
24582 int
24583 main (void)
24584 {
24585 DBT *foo = 0
24586   ;
24587   return 0;
24588 }
24589 _ACEOF
24590 rm -f "conftest.$ac_objext"
24591 if { (eval echo "$as_me:24591: \"$ac_compile\"") >&5
24592   (eval $ac_compile) 2>&5
24593   ac_status=$?
24594   echo "$as_me:24594: \$? = $ac_status" >&5
24595   (exit "$ac_status"); } &&
24596          { ac_try='test -s "conftest.$ac_objext"'
24597   { (eval echo "$as_me:24597: \"$ac_try\"") >&5
24598   (eval $ac_try) 2>&5
24599   ac_status=$?
24600   echo "$as_me:24600: \$? = $ac_status" >&5
24601   (exit "$ac_status"); }; }; then
24602
24603         cf_cv_hashed_db_version=$cf_db_version
24604         break
24605
24606 else
24607   echo "$as_me: failed program was:" >&5
24608 cat "conftest.$ac_ext" >&5
24609 fi
24610 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24611 done
24612
24613 fi
24614 echo "$as_me:24614: result: $cf_cv_hashed_db_version" >&5
24615 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24616
24617 if test "$cf_cv_hashed_db_version" = unknown ; then
24618         { { echo "$as_me:24618: error: Cannot determine version of db" >&5
24619 echo "$as_me: error: Cannot determine version of db" >&2;}
24620    { (exit 1); exit 1; }; }
24621 else
24622
24623 echo "$as_me:24623: checking for db libraries" >&5
24624 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24625 if test "${cf_cv_hashed_db_libs+set}" = set; then
24626   echo $ECHO_N "(cached) $ECHO_C" >&6
24627 else
24628
24629 cf_cv_hashed_db_libs=unknown
24630 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24631 do
24632         cf_save_libs="$LIBS"
24633         if test -n "$cf_db_libs"; then
24634
24635 cf_add_libs="$LIBS"
24636 # reverse order
24637 cf_add_0lib=
24638 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24639 # filter duplicates
24640 for cf_add_1lib in $cf_add_0lib; do
24641         for cf_add_2lib in $cf_add_libs; do
24642                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24643                         cf_add_1lib=
24644                         break
24645                 fi
24646         done
24647         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24648 done
24649 LIBS="$cf_add_libs"
24650
24651         fi
24652
24653 echo "${as_me:-configure}:24653: testing checking for library $cf_db_libs ..." 1>&5
24654
24655         cat >"conftest.$ac_ext" <<_ACEOF
24656 #line 24656 "configure"
24657 #include "confdefs.h"
24658
24659 $ac_includes_default
24660 #include <db.h>
24661
24662 int
24663 main (void)
24664 {
24665
24666         char *path = "/tmp/foo";
24667 #ifdef DB_VERSION_MAJOR
24668 #if DB_VERSION_MAJOR >= 4
24669         DB *result = 0;
24670         db_create(&result, NULL, 0);
24671         result->open(result,
24672                 NULL,
24673                 path,
24674                 path,
24675                 DB_HASH,
24676                 DB_CREATE,
24677                 0644);
24678 #elif DB_VERSION_MAJOR >= 3
24679         DB *result = 0;
24680         db_create(&result, NULL, 0);
24681         result->open(result,
24682                 path,
24683                 path,
24684                 DB_HASH,
24685                 DB_CREATE,
24686                 0644);
24687 #elif DB_VERSION_MAJOR >= 2
24688         DB *result = 0;
24689         db_open(path,
24690                 DB_HASH,
24691                 DB_CREATE,
24692                 0644,
24693                 (DB_ENV *) 0,
24694                 (DB_INFO *) 0,
24695                 &result);
24696 #endif /* DB_VERSION_MAJOR */
24697 #else
24698         DB *result = dbopen(path,
24699                      2,
24700                      0644,
24701                      DB_HASH,
24702                      0);
24703 #endif
24704         ${cf_cv_main_return:-return}(result != 0)
24705
24706   ;
24707   return 0;
24708 }
24709 _ACEOF
24710 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24711 if { (eval echo "$as_me:24711: \"$ac_link\"") >&5
24712   (eval $ac_link) 2>&5
24713   ac_status=$?
24714   echo "$as_me:24714: \$? = $ac_status" >&5
24715   (exit "$ac_status"); } &&
24716          { ac_try='test -s "conftest$ac_exeext"'
24717   { (eval echo "$as_me:24717: \"$ac_try\"") >&5
24718   (eval $ac_try) 2>&5
24719   ac_status=$?
24720   echo "$as_me:24720: \$? = $ac_status" >&5
24721   (exit "$ac_status"); }; }; then
24722
24723         if test -n "$cf_db_libs" ; then
24724                 cf_cv_hashed_db_libs=$cf_db_libs
24725         else
24726                 cf_cv_hashed_db_libs=default
24727         fi
24728         LIBS="$cf_save_libs"
24729         break
24730
24731 else
24732   echo "$as_me: failed program was:" >&5
24733 cat "conftest.$ac_ext" >&5
24734 fi
24735 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24736         LIBS="$cf_save_libs"
24737 done
24738
24739 fi
24740 echo "$as_me:24740: result: $cf_cv_hashed_db_libs" >&5
24741 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24742
24743         if test "$cf_cv_hashed_db_libs" = unknown ; then
24744                 { { echo "$as_me:24744: error: Cannot determine library for db" >&5
24745 echo "$as_me: error: Cannot determine library for db" >&2;}
24746    { (exit 1); exit 1; }; }
24747         elif test "$cf_cv_hashed_db_libs" != default ; then
24748
24749 cf_add_libs="$LIBS"
24750 # reverse order
24751 cf_add_0lib=
24752 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24753 # filter duplicates
24754 for cf_add_1lib in $cf_add_0lib; do
24755         for cf_add_2lib in $cf_add_libs; do
24756                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24757                         cf_add_1lib=
24758                         break
24759                 fi
24760         done
24761         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24762 done
24763 LIBS="$cf_add_libs"
24764
24765         fi
24766 fi
24767
24768 else
24769
24770         { { echo "$as_me:24770: error: Cannot find db.h" >&5
24771 echo "$as_me: error: Cannot find db.h" >&2;}
24772    { (exit 1); exit 1; }; }
24773
24774 fi
24775
24776 fi
24777
24778 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24779         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24780         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24781 fi
24782
24783 # Just in case, check if the C compiler has a bool type.
24784
24785 echo "$as_me:24785: checking if we should include stdbool.h" >&5
24786 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24787
24788 if test "${cf_cv_header_stdbool_h+set}" = set; then
24789   echo $ECHO_N "(cached) $ECHO_C" >&6
24790 else
24791
24792         cat >"conftest.$ac_ext" <<_ACEOF
24793 #line 24793 "configure"
24794 #include "confdefs.h"
24795
24796 int
24797 main (void)
24798 {
24799 bool foo = false
24800   ;
24801   return 0;
24802 }
24803 _ACEOF
24804 rm -f "conftest.$ac_objext"
24805 if { (eval echo "$as_me:24805: \"$ac_compile\"") >&5
24806   (eval $ac_compile) 2>&5
24807   ac_status=$?
24808   echo "$as_me:24808: \$? = $ac_status" >&5
24809   (exit "$ac_status"); } &&
24810          { ac_try='test -s "conftest.$ac_objext"'
24811   { (eval echo "$as_me:24811: \"$ac_try\"") >&5
24812   (eval $ac_try) 2>&5
24813   ac_status=$?
24814   echo "$as_me:24814: \$? = $ac_status" >&5
24815   (exit "$ac_status"); }; }; then
24816   cf_cv_header_stdbool_h=0
24817 else
24818   echo "$as_me: failed program was:" >&5
24819 cat "conftest.$ac_ext" >&5
24820 cat >"conftest.$ac_ext" <<_ACEOF
24821 #line 24821 "configure"
24822 #include "confdefs.h"
24823
24824 #ifndef __BEOS__
24825 #include <stdbool.h>
24826 #endif
24827
24828 int
24829 main (void)
24830 {
24831 bool foo = false
24832   ;
24833   return 0;
24834 }
24835 _ACEOF
24836 rm -f "conftest.$ac_objext"
24837 if { (eval echo "$as_me:24837: \"$ac_compile\"") >&5
24838   (eval $ac_compile) 2>&5
24839   ac_status=$?
24840   echo "$as_me:24840: \$? = $ac_status" >&5
24841   (exit "$ac_status"); } &&
24842          { ac_try='test -s "conftest.$ac_objext"'
24843   { (eval echo "$as_me:24843: \"$ac_try\"") >&5
24844   (eval $ac_try) 2>&5
24845   ac_status=$?
24846   echo "$as_me:24846: \$? = $ac_status" >&5
24847   (exit "$ac_status"); }; }; then
24848   cf_cv_header_stdbool_h=1
24849 else
24850   echo "$as_me: failed program was:" >&5
24851 cat "conftest.$ac_ext" >&5
24852 cf_cv_header_stdbool_h=0
24853 fi
24854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24855 fi
24856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24857 fi
24858
24859 if test "$cf_cv_header_stdbool_h" = 1
24860 then    echo "$as_me:24860: result: yes" >&5
24861 echo "${ECHO_T}yes" >&6
24862 else    echo "$as_me:24862: result: no" >&5
24863 echo "${ECHO_T}no" >&6
24864 fi
24865
24866 echo "$as_me:24866: checking for builtin bool type" >&5
24867 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24868
24869 if test "${cf_cv_cc_bool_type+set}" = set; then
24870   echo $ECHO_N "(cached) $ECHO_C" >&6
24871 else
24872
24873         cat >"conftest.$ac_ext" <<_ACEOF
24874 #line 24874 "configure"
24875 #include "confdefs.h"
24876
24877 #include <stdio.h>
24878 #include <sys/types.h>
24879
24880 int
24881 main (void)
24882 {
24883 bool x = false
24884   ;
24885   return 0;
24886 }
24887 _ACEOF
24888 rm -f "conftest.$ac_objext"
24889 if { (eval echo "$as_me:24889: \"$ac_compile\"") >&5
24890   (eval $ac_compile) 2>&5
24891   ac_status=$?
24892   echo "$as_me:24892: \$? = $ac_status" >&5
24893   (exit "$ac_status"); } &&
24894          { ac_try='test -s "conftest.$ac_objext"'
24895   { (eval echo "$as_me:24895: \"$ac_try\"") >&5
24896   (eval $ac_try) 2>&5
24897   ac_status=$?
24898   echo "$as_me:24898: \$? = $ac_status" >&5
24899   (exit "$ac_status"); }; }; then
24900   cf_cv_cc_bool_type=1
24901 else
24902   echo "$as_me: failed program was:" >&5
24903 cat "conftest.$ac_ext" >&5
24904 cf_cv_cc_bool_type=0
24905 fi
24906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24907
24908 fi
24909
24910 if test "$cf_cv_cc_bool_type" = 1
24911 then    echo "$as_me:24911: result: yes" >&5
24912 echo "${ECHO_T}yes" >&6
24913 else    echo "$as_me:24913: result: no" >&5
24914 echo "${ECHO_T}no" >&6
24915 fi
24916
24917 # Check for C++ compiler characteristics (and ensure that it's there!)
24918 if test -n "$CXX" ; then
24919         ac_ext=cc
24920 ac_cpp='$CXXCPP $CPPFLAGS'
24921 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24922 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24923 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24924 ac_main_return="return"
24925
24926 if test -n "$GXX" ; then
24927
24928         cf_save="$LIBS"
24929         LIBS="$LIBS $CXXLIBS"
24930         echo "$as_me:24930: checking if we already have C++ library" >&5
24931 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24932         cat >"conftest.$ac_ext" <<_ACEOF
24933 #line 24933 "configure"
24934 #include "confdefs.h"
24935
24936                         #include <iostream>
24937 int
24938 main (void)
24939 {
24940
24941                         std::cout << "Hello World!" << std::endl;
24942   ;
24943   return 0;
24944 }
24945 _ACEOF
24946 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24947 if { (eval echo "$as_me:24947: \"$ac_link\"") >&5
24948   (eval $ac_link) 2>&5
24949   ac_status=$?
24950   echo "$as_me:24950: \$? = $ac_status" >&5
24951   (exit "$ac_status"); } &&
24952          { ac_try='test -s "conftest$ac_exeext"'
24953   { (eval echo "$as_me:24953: \"$ac_try\"") >&5
24954   (eval $ac_try) 2>&5
24955   ac_status=$?
24956   echo "$as_me:24956: \$? = $ac_status" >&5
24957   (exit "$ac_status"); }; }; then
24958   cf_have_libstdcpp=yes
24959 else
24960   echo "$as_me: failed program was:" >&5
24961 cat "conftest.$ac_ext" >&5
24962 cf_have_libstdcpp=no
24963 fi
24964 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24965         echo "$as_me:24965: result: $cf_have_libstdcpp" >&5
24966 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24967         LIBS="$cf_save"
24968
24969         if test "$cf_have_libstdcpp" != yes
24970         then
24971                 case "$cf_cv_system_name" in
24972                 (os2*)
24973                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24974                                 cf_stdcpp_libname=stdcpp
24975                         else
24976                                 cf_stdcpp_libname=stdc++
24977                         fi
24978                         ;;
24979                 (*)
24980                         cf_stdcpp_libname=stdc++
24981                         ;;
24982                 esac
24983
24984                 echo "$as_me:24984: checking for library $cf_stdcpp_libname" >&5
24985 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24986 if test "${cf_cv_libstdcpp+set}" = set; then
24987   echo $ECHO_N "(cached) $ECHO_C" >&6
24988 else
24989
24990                         cf_save="$LIBS"
24991                         LIBS="$LIBS $CXXLIBS"
24992
24993 cf_add_libs="$LIBS"
24994 # reverse order
24995 cf_add_0lib=
24996 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24997 # filter duplicates
24998 for cf_add_1lib in $cf_add_0lib; do
24999         for cf_add_2lib in $cf_add_libs; do
25000                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25001                         cf_add_1lib=
25002                         break
25003                 fi
25004         done
25005         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25006 done
25007 LIBS="$cf_add_libs"
25008
25009                 cat >"conftest.$ac_ext" <<_ACEOF
25010 #line 25010 "configure"
25011 #include "confdefs.h"
25012
25013                                 #include <iostream>
25014 int
25015 main (void)
25016 {
25017
25018                                 std::cout << "Hello World!" << std::endl;
25019   ;
25020   return 0;
25021 }
25022 _ACEOF
25023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25024 if { (eval echo "$as_me:25024: \"$ac_link\"") >&5
25025   (eval $ac_link) 2>&5
25026   ac_status=$?
25027   echo "$as_me:25027: \$? = $ac_status" >&5
25028   (exit "$ac_status"); } &&
25029          { ac_try='test -s "conftest$ac_exeext"'
25030   { (eval echo "$as_me:25030: \"$ac_try\"") >&5
25031   (eval $ac_try) 2>&5
25032   ac_status=$?
25033   echo "$as_me:25033: \$? = $ac_status" >&5
25034   (exit "$ac_status"); }; }; then
25035   cf_cv_libstdcpp=yes
25036 else
25037   echo "$as_me: failed program was:" >&5
25038 cat "conftest.$ac_ext" >&5
25039 cf_cv_libstdcpp=no
25040 fi
25041 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25042                         LIBS="$cf_save"
25043
25044 fi
25045 echo "$as_me:25045: result: $cf_cv_libstdcpp" >&5
25046 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25047                 test "$cf_cv_libstdcpp" = yes && {
25048 cf_add_libs="$CXXLIBS"
25049 # reverse order
25050 cf_add_0lib=
25051 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25052 # filter duplicates
25053 for cf_add_1lib in $cf_add_0lib; do
25054         for cf_add_2lib in $cf_add_libs; do
25055                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25056                         cf_add_1lib=
25057                         break
25058                 fi
25059         done
25060         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25061 done
25062 CXXLIBS="$cf_add_libs"
25063  }
25064         fi
25065 fi
25066
25067         echo "$as_me:25067: checking whether $CXX understands -c and -o together" >&5
25068 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25069 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25070   echo $ECHO_N "(cached) $ECHO_C" >&6
25071 else
25072
25073 cat > conftest.$ac_ext <<CF_EOF
25074 int main(void)
25075 {
25076         ${cf_cv_main_return:-return}(0);
25077 }
25078 CF_EOF
25079 # We do the test twice because some compilers refuse to overwrite an
25080 # existing .o file with -o, though they will create one.
25081 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25082 if { (eval echo "$as_me:25082: \"$ac_try\"") >&5
25083   (eval $ac_try) 2>&5
25084   ac_status=$?
25085   echo "$as_me:25085: \$? = $ac_status" >&5
25086   (exit "$ac_status"); } &&
25087   test -f conftest2.$ac_objext && { (eval echo "$as_me:25087: \"$ac_try\"") >&5
25088   (eval $ac_try) 2>&5
25089   ac_status=$?
25090   echo "$as_me:25090: \$? = $ac_status" >&5
25091   (exit "$ac_status"); };
25092 then
25093   eval cf_cv_prog_CXX_c_o=yes
25094 else
25095   eval cf_cv_prog_CXX_c_o=no
25096 fi
25097 rm -rf ./conftest*
25098
25099 fi
25100 if test "$cf_cv_prog_CXX_c_o" = yes; then
25101   echo "$as_me:25101: result: yes" >&5
25102 echo "${ECHO_T}yes" >&6
25103 else
25104   echo "$as_me:25104: result: no" >&5
25105 echo "${ECHO_T}no" >&6
25106 fi
25107
25108         case "$GXX_VERSION" in
25109         (1.*|2.[0-6]*|[1-9][0-9].*)
25110                 cf_cxx_library=yes
25111                 ;;
25112         (*-2.7*|2.7*)
25113
25114 cf_cxx_library=unknown
25115 case "$cf_cv_system_name" in
25116 (os2*)
25117         cf_gpp_libname=gpp
25118         ;;
25119 (*)
25120         cf_gpp_libname=g++
25121         ;;
25122 esac
25123 if test "$GXX" = yes; then
25124         echo "$as_me:25124: checking for lib$cf_gpp_libname" >&5
25125 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25126         cf_save="$LIBS"
25127
25128 cf_add_libs="$LIBS"
25129 # reverse order
25130 cf_add_0lib=
25131 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25132 # filter duplicates
25133 for cf_add_1lib in $cf_add_0lib; do
25134         for cf_add_2lib in $cf_add_libs; do
25135                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25136                         cf_add_1lib=
25137                         break
25138                 fi
25139         done
25140         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25141 done
25142 LIBS="$cf_add_libs"
25143
25144         cat >"conftest.$ac_ext" <<_ACEOF
25145 #line 25145 "configure"
25146 #include "confdefs.h"
25147
25148 #include <$cf_gpp_libname/builtin.h>
25149
25150 int
25151 main (void)
25152 {
25153 two_arg_error_handler_t foo2 = lib_error_handler
25154   ;
25155   return 0;
25156 }
25157 _ACEOF
25158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25159 if { (eval echo "$as_me:25159: \"$ac_link\"") >&5
25160   (eval $ac_link) 2>&5
25161   ac_status=$?
25162   echo "$as_me:25162: \$? = $ac_status" >&5
25163   (exit "$ac_status"); } &&
25164          { ac_try='test -s "conftest$ac_exeext"'
25165   { (eval echo "$as_me:25165: \"$ac_try\"") >&5
25166   (eval $ac_try) 2>&5
25167   ac_status=$?
25168   echo "$as_me:25168: \$? = $ac_status" >&5
25169   (exit "$ac_status"); }; }; then
25170   cf_cxx_library=yes
25171
25172 cf_add_libs="$CXXLIBS"
25173 # reverse order
25174 cf_add_0lib=
25175 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25176 # filter duplicates
25177 for cf_add_1lib in $cf_add_0lib; do
25178         for cf_add_2lib in $cf_add_libs; do
25179                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25180                         cf_add_1lib=
25181                         break
25182                 fi
25183         done
25184         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25185 done
25186 CXXLIBS="$cf_add_libs"
25187
25188          if test "$cf_gpp_libname" = cpp ; then
25189
25190 cat >>confdefs.h <<\EOF
25191 #define HAVE_GPP_BUILTIN_H 1
25192 EOF
25193
25194          else
25195
25196 cat >>confdefs.h <<\EOF
25197 #define HAVE_GXX_BUILTIN_H 1
25198 EOF
25199
25200          fi
25201 else
25202   echo "$as_me: failed program was:" >&5
25203 cat "conftest.$ac_ext" >&5
25204 cat >"conftest.$ac_ext" <<_ACEOF
25205 #line 25205 "configure"
25206 #include "confdefs.h"
25207
25208 #include <builtin.h>
25209
25210 int
25211 main (void)
25212 {
25213 two_arg_error_handler_t foo2 = lib_error_handler
25214   ;
25215   return 0;
25216 }
25217 _ACEOF
25218 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25219 if { (eval echo "$as_me:25219: \"$ac_link\"") >&5
25220   (eval $ac_link) 2>&5
25221   ac_status=$?
25222   echo "$as_me:25222: \$? = $ac_status" >&5
25223   (exit "$ac_status"); } &&
25224          { ac_try='test -s "conftest$ac_exeext"'
25225   { (eval echo "$as_me:25225: \"$ac_try\"") >&5
25226   (eval $ac_try) 2>&5
25227   ac_status=$?
25228   echo "$as_me:25228: \$? = $ac_status" >&5
25229   (exit "$ac_status"); }; }; then
25230   cf_cxx_library=yes
25231
25232 cf_add_libs="$CXXLIBS"
25233 # reverse order
25234 cf_add_0lib=
25235 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25236 # filter duplicates
25237 for cf_add_1lib in $cf_add_0lib; do
25238         for cf_add_2lib in $cf_add_libs; do
25239                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25240                         cf_add_1lib=
25241                         break
25242                 fi
25243         done
25244         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25245 done
25246 CXXLIBS="$cf_add_libs"
25247
25248 cat >>confdefs.h <<\EOF
25249 #define HAVE_BUILTIN_H 1
25250 EOF
25251
25252 else
25253   echo "$as_me: failed program was:" >&5
25254 cat "conftest.$ac_ext" >&5
25255 cf_cxx_library=no
25256 fi
25257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25258 fi
25259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25260         LIBS="$cf_save"
25261         echo "$as_me:25261: result: $cf_cxx_library" >&5
25262 echo "${ECHO_T}$cf_cxx_library" >&6
25263 fi
25264
25265                 ;;
25266         (*)
25267                 cf_cxx_library=no
25268                 ;;
25269         esac
25270
25271         ac_ext=cc
25272 ac_cpp='$CXXCPP $CPPFLAGS'
25273 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25274 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25275 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25276 ac_main_return="return"
25277 echo "$as_me:25277: checking how to run the C++ preprocessor" >&5
25278 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25279 if test -z "$CXXCPP"; then
25280   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25281   echo $ECHO_N "(cached) $ECHO_C" >&6
25282 else
25283       # Double quotes because CXXCPP needs to be expanded
25284     for CXXCPP in "$CXX -E" "/lib/cpp"
25285     do
25286       ac_preproc_ok=false
25287 for ac_cxx_preproc_warn_flag in '' yes
25288 do
25289   # Use a header file that comes with gcc, so configuring glibc
25290   # with a fresh cross-compiler works.
25291   # On the NeXT, cc -E runs the code through the compiler's parser,
25292   # not just through cpp. "Syntax error" is here to catch this case.
25293   cat >"conftest.$ac_ext" <<_ACEOF
25294 #line 25294 "configure"
25295 #include "confdefs.h"
25296 #include <assert.h>
25297                      Syntax error
25298 _ACEOF
25299 if { (eval echo "$as_me:25299: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25300   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25301   ac_status=$?
25302   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25303   rm -f conftest.er1
25304   cat conftest.err >&5
25305   echo "$as_me:25305: \$? = $ac_status" >&5
25306   (exit "$ac_status"); } >/dev/null; then
25307   if test -s conftest.err; then
25308     ac_cpp_err=$ac_cxx_preproc_warn_flag
25309   else
25310     ac_cpp_err=
25311   fi
25312 else
25313   ac_cpp_err=yes
25314 fi
25315 if test -z "$ac_cpp_err"; then
25316   :
25317 else
25318   echo "$as_me: failed program was:" >&5
25319   cat "conftest.$ac_ext" >&5
25320   # Broken: fails on valid input.
25321 continue
25322 fi
25323 rm -f conftest.err "conftest.$ac_ext"
25324
25325   # OK, works on sane cases.  Now check whether non-existent headers
25326   # can be detected and how.
25327   cat >"conftest.$ac_ext" <<_ACEOF
25328 #line 25328 "configure"
25329 #include "confdefs.h"
25330 #include <ac_nonexistent.h>
25331 _ACEOF
25332 if { (eval echo "$as_me:25332: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25333   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25334   ac_status=$?
25335   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25336   rm -f conftest.er1
25337   cat conftest.err >&5
25338   echo "$as_me:25338: \$? = $ac_status" >&5
25339   (exit "$ac_status"); } >/dev/null; then
25340   if test -s conftest.err; then
25341     ac_cpp_err=$ac_cxx_preproc_warn_flag
25342   else
25343     ac_cpp_err=
25344   fi
25345 else
25346   ac_cpp_err=yes
25347 fi
25348 if test -z "$ac_cpp_err"; then
25349   # Broken: success on invalid input.
25350 continue
25351 else
25352   echo "$as_me: failed program was:" >&5
25353   cat "conftest.$ac_ext" >&5
25354   # Passes both tests.
25355 ac_preproc_ok=:
25356 break
25357 fi
25358 rm -f conftest.err "conftest.$ac_ext"
25359
25360 done
25361 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25362 rm -f conftest.err "conftest.$ac_ext"
25363 if $ac_preproc_ok; then
25364   break
25365 fi
25366
25367     done
25368     ac_cv_prog_CXXCPP=$CXXCPP
25369
25370 fi
25371   CXXCPP=$ac_cv_prog_CXXCPP
25372 else
25373   ac_cv_prog_CXXCPP=$CXXCPP
25374 fi
25375 echo "$as_me:25375: result: $CXXCPP" >&5
25376 echo "${ECHO_T}$CXXCPP" >&6
25377 ac_preproc_ok=false
25378 for ac_cxx_preproc_warn_flag in '' yes
25379 do
25380   # Use a header file that comes with gcc, so configuring glibc
25381   # with a fresh cross-compiler works.
25382   # On the NeXT, cc -E runs the code through the compiler's parser,
25383   # not just through cpp. "Syntax error" is here to catch this case.
25384   cat >"conftest.$ac_ext" <<_ACEOF
25385 #line 25385 "configure"
25386 #include "confdefs.h"
25387 #include <assert.h>
25388                      Syntax error
25389 _ACEOF
25390 if { (eval echo "$as_me:25390: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25391   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25392   ac_status=$?
25393   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25394   rm -f conftest.er1
25395   cat conftest.err >&5
25396   echo "$as_me:25396: \$? = $ac_status" >&5
25397   (exit "$ac_status"); } >/dev/null; then
25398   if test -s conftest.err; then
25399     ac_cpp_err=$ac_cxx_preproc_warn_flag
25400   else
25401     ac_cpp_err=
25402   fi
25403 else
25404   ac_cpp_err=yes
25405 fi
25406 if test -z "$ac_cpp_err"; then
25407   :
25408 else
25409   echo "$as_me: failed program was:" >&5
25410   cat "conftest.$ac_ext" >&5
25411   # Broken: fails on valid input.
25412 continue
25413 fi
25414 rm -f conftest.err "conftest.$ac_ext"
25415
25416   # OK, works on sane cases.  Now check whether non-existent headers
25417   # can be detected and how.
25418   cat >"conftest.$ac_ext" <<_ACEOF
25419 #line 25419 "configure"
25420 #include "confdefs.h"
25421 #include <ac_nonexistent.h>
25422 _ACEOF
25423 if { (eval echo "$as_me:25423: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25424   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25425   ac_status=$?
25426   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25427   rm -f conftest.er1
25428   cat conftest.err >&5
25429   echo "$as_me:25429: \$? = $ac_status" >&5
25430   (exit "$ac_status"); } >/dev/null; then
25431   if test -s conftest.err; then
25432     ac_cpp_err=$ac_cxx_preproc_warn_flag
25433   else
25434     ac_cpp_err=
25435   fi
25436 else
25437   ac_cpp_err=yes
25438 fi
25439 if test -z "$ac_cpp_err"; then
25440   # Broken: success on invalid input.
25441 continue
25442 else
25443   echo "$as_me: failed program was:" >&5
25444   cat "conftest.$ac_ext" >&5
25445   # Passes both tests.
25446 ac_preproc_ok=:
25447 break
25448 fi
25449 rm -f conftest.err "conftest.$ac_ext"
25450
25451 done
25452 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25453 rm -f conftest.err "conftest.$ac_ext"
25454 if $ac_preproc_ok; then
25455   :
25456 else
25457   { { echo "$as_me:25457: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25458 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25459    { (exit 1); exit 1; }; }
25460 fi
25461
25462 ac_ext=cc
25463 ac_cpp='$CXXCPP $CPPFLAGS'
25464 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25465 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25466 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25467 ac_main_return="return"
25468
25469 for ac_header in typeinfo
25470 do
25471 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25472 echo "$as_me:25472: checking for $ac_header" >&5
25473 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25475   echo $ECHO_N "(cached) $ECHO_C" >&6
25476 else
25477   cat >"conftest.$ac_ext" <<_ACEOF
25478 #line 25478 "configure"
25479 #include "confdefs.h"
25480 #include <$ac_header>
25481 _ACEOF
25482 if { (eval echo "$as_me:25482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25483   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25484   ac_status=$?
25485   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25486   rm -f conftest.er1
25487   cat conftest.err >&5
25488   echo "$as_me:25488: \$? = $ac_status" >&5
25489   (exit "$ac_status"); } >/dev/null; then
25490   if test -s conftest.err; then
25491     ac_cpp_err=$ac_cxx_preproc_warn_flag
25492   else
25493     ac_cpp_err=
25494   fi
25495 else
25496   ac_cpp_err=yes
25497 fi
25498 if test -z "$ac_cpp_err"; then
25499   eval "$as_ac_Header=yes"
25500 else
25501   echo "$as_me: failed program was:" >&5
25502   cat "conftest.$ac_ext" >&5
25503   eval "$as_ac_Header=no"
25504 fi
25505 rm -f conftest.err "conftest.$ac_ext"
25506 fi
25507 echo "$as_me:25507: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25508 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25509 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25510   cat >>confdefs.h <<EOF
25511 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25512 EOF
25513
25514 fi
25515 done
25516
25517 for ac_header in iostream
25518 do
25519 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25520 echo "$as_me:25520: checking for $ac_header" >&5
25521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25523   echo $ECHO_N "(cached) $ECHO_C" >&6
25524 else
25525   cat >"conftest.$ac_ext" <<_ACEOF
25526 #line 25526 "configure"
25527 #include "confdefs.h"
25528 #include <$ac_header>
25529 _ACEOF
25530 if { (eval echo "$as_me:25530: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25531   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25532   ac_status=$?
25533   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25534   rm -f conftest.er1
25535   cat conftest.err >&5
25536   echo "$as_me:25536: \$? = $ac_status" >&5
25537   (exit "$ac_status"); } >/dev/null; then
25538   if test -s conftest.err; then
25539     ac_cpp_err=$ac_cxx_preproc_warn_flag
25540   else
25541     ac_cpp_err=
25542   fi
25543 else
25544   ac_cpp_err=yes
25545 fi
25546 if test -z "$ac_cpp_err"; then
25547   eval "$as_ac_Header=yes"
25548 else
25549   echo "$as_me: failed program was:" >&5
25550   cat "conftest.$ac_ext" >&5
25551   eval "$as_ac_Header=no"
25552 fi
25553 rm -f conftest.err "conftest.$ac_ext"
25554 fi
25555 echo "$as_me:25555: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25556 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25557 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25558   cat >>confdefs.h <<EOF
25559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25560 EOF
25561
25562 fi
25563 done
25564
25565 if test x"$ac_cv_header_iostream" = xyes ; then
25566         echo "$as_me:25566: checking if iostream uses std-namespace" >&5
25567 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25568         cat >"conftest.$ac_ext" <<_ACEOF
25569 #line 25569 "configure"
25570 #include "confdefs.h"
25571
25572 #include <iostream>
25573 using std::endl;
25574 using std::cerr;
25575 int
25576 main (void)
25577 {
25578
25579 cerr << "testing" << endl;
25580
25581   ;
25582   return 0;
25583 }
25584 _ACEOF
25585 rm -f "conftest.$ac_objext"
25586 if { (eval echo "$as_me:25586: \"$ac_compile\"") >&5
25587   (eval $ac_compile) 2>&5
25588   ac_status=$?
25589   echo "$as_me:25589: \$? = $ac_status" >&5
25590   (exit "$ac_status"); } &&
25591          { ac_try='test -s "conftest.$ac_objext"'
25592   { (eval echo "$as_me:25592: \"$ac_try\"") >&5
25593   (eval $ac_try) 2>&5
25594   ac_status=$?
25595   echo "$as_me:25595: \$? = $ac_status" >&5
25596   (exit "$ac_status"); }; }; then
25597   cf_iostream_namespace=yes
25598 else
25599   echo "$as_me: failed program was:" >&5
25600 cat "conftest.$ac_ext" >&5
25601 cf_iostream_namespace=no
25602 fi
25603 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25604         echo "$as_me:25604: result: $cf_iostream_namespace" >&5
25605 echo "${ECHO_T}$cf_iostream_namespace" >&6
25606         if test "$cf_iostream_namespace" = yes ; then
25607
25608 cat >>confdefs.h <<\EOF
25609 #define IOSTREAM_NAMESPACE 1
25610 EOF
25611
25612         fi
25613 fi
25614
25615 echo "$as_me:25615: checking if we should include stdbool.h" >&5
25616 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25617
25618 if test "${cf_cv_header_stdbool_h+set}" = set; then
25619   echo $ECHO_N "(cached) $ECHO_C" >&6
25620 else
25621
25622         cat >"conftest.$ac_ext" <<_ACEOF
25623 #line 25623 "configure"
25624 #include "confdefs.h"
25625
25626 int
25627 main (void)
25628 {
25629 bool foo = false
25630   ;
25631   return 0;
25632 }
25633 _ACEOF
25634 rm -f "conftest.$ac_objext"
25635 if { (eval echo "$as_me:25635: \"$ac_compile\"") >&5
25636   (eval $ac_compile) 2>&5
25637   ac_status=$?
25638   echo "$as_me:25638: \$? = $ac_status" >&5
25639   (exit "$ac_status"); } &&
25640          { ac_try='test -s "conftest.$ac_objext"'
25641   { (eval echo "$as_me:25641: \"$ac_try\"") >&5
25642   (eval $ac_try) 2>&5
25643   ac_status=$?
25644   echo "$as_me:25644: \$? = $ac_status" >&5
25645   (exit "$ac_status"); }; }; then
25646   cf_cv_header_stdbool_h=0
25647 else
25648   echo "$as_me: failed program was:" >&5
25649 cat "conftest.$ac_ext" >&5
25650 cat >"conftest.$ac_ext" <<_ACEOF
25651 #line 25651 "configure"
25652 #include "confdefs.h"
25653
25654 #ifndef __BEOS__
25655 #include <stdbool.h>
25656 #endif
25657
25658 int
25659 main (void)
25660 {
25661 bool foo = false
25662   ;
25663   return 0;
25664 }
25665 _ACEOF
25666 rm -f "conftest.$ac_objext"
25667 if { (eval echo "$as_me:25667: \"$ac_compile\"") >&5
25668   (eval $ac_compile) 2>&5
25669   ac_status=$?
25670   echo "$as_me:25670: \$? = $ac_status" >&5
25671   (exit "$ac_status"); } &&
25672          { ac_try='test -s "conftest.$ac_objext"'
25673   { (eval echo "$as_me:25673: \"$ac_try\"") >&5
25674   (eval $ac_try) 2>&5
25675   ac_status=$?
25676   echo "$as_me:25676: \$? = $ac_status" >&5
25677   (exit "$ac_status"); }; }; then
25678   cf_cv_header_stdbool_h=1
25679 else
25680   echo "$as_me: failed program was:" >&5
25681 cat "conftest.$ac_ext" >&5
25682 cf_cv_header_stdbool_h=0
25683 fi
25684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25685 fi
25686 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25687 fi
25688
25689 if test "$cf_cv_header_stdbool_h" = 1
25690 then    echo "$as_me:25690: result: yes" >&5
25691 echo "${ECHO_T}yes" >&6
25692 else    echo "$as_me:25692: result: no" >&5
25693 echo "${ECHO_T}no" >&6
25694 fi
25695
25696 echo "$as_me:25696: checking for builtin bool type" >&5
25697 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25698
25699 if test "${cf_cv_builtin_bool+set}" = set; then
25700   echo $ECHO_N "(cached) $ECHO_C" >&6
25701 else
25702
25703         cat >"conftest.$ac_ext" <<_ACEOF
25704 #line 25704 "configure"
25705 #include "confdefs.h"
25706
25707 #include <stdio.h>
25708 #include <sys/types.h>
25709
25710 int
25711 main (void)
25712 {
25713 bool x = false
25714   ;
25715   return 0;
25716 }
25717 _ACEOF
25718 rm -f "conftest.$ac_objext"
25719 if { (eval echo "$as_me:25719: \"$ac_compile\"") >&5
25720   (eval $ac_compile) 2>&5
25721   ac_status=$?
25722   echo "$as_me:25722: \$? = $ac_status" >&5
25723   (exit "$ac_status"); } &&
25724          { ac_try='test -s "conftest.$ac_objext"'
25725   { (eval echo "$as_me:25725: \"$ac_try\"") >&5
25726   (eval $ac_try) 2>&5
25727   ac_status=$?
25728   echo "$as_me:25728: \$? = $ac_status" >&5
25729   (exit "$ac_status"); }; }; then
25730   cf_cv_builtin_bool=1
25731 else
25732   echo "$as_me: failed program was:" >&5
25733 cat "conftest.$ac_ext" >&5
25734 cf_cv_builtin_bool=0
25735 fi
25736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25737
25738 fi
25739
25740 if test "$cf_cv_builtin_bool" = 1
25741 then    echo "$as_me:25741: result: yes" >&5
25742 echo "${ECHO_T}yes" >&6
25743 else    echo "$as_me:25743: result: no" >&5
25744 echo "${ECHO_T}no" >&6
25745 fi
25746
25747 echo "$as_me:25747: checking for bool" >&5
25748 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25749 if test "${ac_cv_type_bool+set}" = set; then
25750   echo $ECHO_N "(cached) $ECHO_C" >&6
25751 else
25752   cat >"conftest.$ac_ext" <<_ACEOF
25753 #line 25753 "configure"
25754 #include "confdefs.h"
25755
25756 #include <stdlib.h>
25757 #include <stdio.h>
25758
25759 #if defined(__cplusplus)
25760
25761 #ifdef HAVE_GXX_BUILTIN_H
25762 #include <g++/builtin.h>
25763 #elif HAVE_GPP_BUILTIN_H
25764 #include <gpp/builtin.h>
25765 #elif HAVE_BUILTIN_H
25766 #include <builtin.h>
25767 #endif
25768
25769 #else
25770
25771 #if $cf_cv_header_stdbool_h
25772 #include <stdbool.h>
25773 #endif
25774
25775 #endif
25776
25777 int
25778 main (void)
25779 {
25780 if ((bool *) 0)
25781   return 0;
25782 if (sizeof (bool))
25783   return 0;
25784   ;
25785   return 0;
25786 }
25787 _ACEOF
25788 rm -f "conftest.$ac_objext"
25789 if { (eval echo "$as_me:25789: \"$ac_compile\"") >&5
25790   (eval $ac_compile) 2>&5
25791   ac_status=$?
25792   echo "$as_me:25792: \$? = $ac_status" >&5
25793   (exit "$ac_status"); } &&
25794          { ac_try='test -s "conftest.$ac_objext"'
25795   { (eval echo "$as_me:25795: \"$ac_try\"") >&5
25796   (eval $ac_try) 2>&5
25797   ac_status=$?
25798   echo "$as_me:25798: \$? = $ac_status" >&5
25799   (exit "$ac_status"); }; }; then
25800   ac_cv_type_bool=yes
25801 else
25802   echo "$as_me: failed program was:" >&5
25803 cat "conftest.$ac_ext" >&5
25804 ac_cv_type_bool=no
25805 fi
25806 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25807 fi
25808 echo "$as_me:25808: result: $ac_cv_type_bool" >&5
25809 echo "${ECHO_T}$ac_cv_type_bool" >&6
25810
25811 echo "$as_me:25811: checking size of bool" >&5
25812 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25813 if test "${ac_cv_sizeof_bool+set}" = set; then
25814   echo $ECHO_N "(cached) $ECHO_C" >&6
25815 else
25816   if test "$ac_cv_type_bool" = yes; then
25817   if test "$cross_compiling" = yes; then
25818   # Depending upon the size, compute the lo and hi bounds.
25819 cat >"conftest.$ac_ext" <<_ACEOF
25820 #line 25820 "configure"
25821 #include "confdefs.h"
25822
25823 #include <stdlib.h>
25824 #include <stdio.h>
25825
25826 #if defined(__cplusplus)
25827
25828 #ifdef HAVE_GXX_BUILTIN_H
25829 #include <g++/builtin.h>
25830 #elif HAVE_GPP_BUILTIN_H
25831 #include <gpp/builtin.h>
25832 #elif HAVE_BUILTIN_H
25833 #include <builtin.h>
25834 #endif
25835
25836 #else
25837
25838 #if $cf_cv_header_stdbool_h
25839 #include <stdbool.h>
25840 #endif
25841
25842 #endif
25843
25844 int
25845 main (void)
25846 {
25847 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25848   ;
25849   return 0;
25850 }
25851 _ACEOF
25852 rm -f "conftest.$ac_objext"
25853 if { (eval echo "$as_me:25853: \"$ac_compile\"") >&5
25854   (eval $ac_compile) 2>&5
25855   ac_status=$?
25856   echo "$as_me:25856: \$? = $ac_status" >&5
25857   (exit "$ac_status"); } &&
25858          { ac_try='test -s "conftest.$ac_objext"'
25859   { (eval echo "$as_me:25859: \"$ac_try\"") >&5
25860   (eval $ac_try) 2>&5
25861   ac_status=$?
25862   echo "$as_me:25862: \$? = $ac_status" >&5
25863   (exit "$ac_status"); }; }; then
25864   ac_lo=0 ac_mid=0
25865   while :; do
25866     cat >"conftest.$ac_ext" <<_ACEOF
25867 #line 25867 "configure"
25868 #include "confdefs.h"
25869
25870 #include <stdlib.h>
25871 #include <stdio.h>
25872
25873 #if defined(__cplusplus)
25874
25875 #ifdef HAVE_GXX_BUILTIN_H
25876 #include <g++/builtin.h>
25877 #elif HAVE_GPP_BUILTIN_H
25878 #include <gpp/builtin.h>
25879 #elif HAVE_BUILTIN_H
25880 #include <builtin.h>
25881 #endif
25882
25883 #else
25884
25885 #if $cf_cv_header_stdbool_h
25886 #include <stdbool.h>
25887 #endif
25888
25889 #endif
25890
25891 int
25892 main (void)
25893 {
25894 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25895   ;
25896   return 0;
25897 }
25898 _ACEOF
25899 rm -f "conftest.$ac_objext"
25900 if { (eval echo "$as_me:25900: \"$ac_compile\"") >&5
25901   (eval $ac_compile) 2>&5
25902   ac_status=$?
25903   echo "$as_me:25903: \$? = $ac_status" >&5
25904   (exit "$ac_status"); } &&
25905          { ac_try='test -s "conftest.$ac_objext"'
25906   { (eval echo "$as_me:25906: \"$ac_try\"") >&5
25907   (eval $ac_try) 2>&5
25908   ac_status=$?
25909   echo "$as_me:25909: \$? = $ac_status" >&5
25910   (exit "$ac_status"); }; }; then
25911   ac_hi=$ac_mid; break
25912 else
25913   echo "$as_me: failed program was:" >&5
25914 cat "conftest.$ac_ext" >&5
25915 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25916 fi
25917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25918   done
25919 else
25920   echo "$as_me: failed program was:" >&5
25921 cat "conftest.$ac_ext" >&5
25922 ac_hi=-1 ac_mid=-1
25923   while :; do
25924     cat >"conftest.$ac_ext" <<_ACEOF
25925 #line 25925 "configure"
25926 #include "confdefs.h"
25927
25928 #include <stdlib.h>
25929 #include <stdio.h>
25930
25931 #if defined(__cplusplus)
25932
25933 #ifdef HAVE_GXX_BUILTIN_H
25934 #include <g++/builtin.h>
25935 #elif HAVE_GPP_BUILTIN_H
25936 #include <gpp/builtin.h>
25937 #elif HAVE_BUILTIN_H
25938 #include <builtin.h>
25939 #endif
25940
25941 #else
25942
25943 #if $cf_cv_header_stdbool_h
25944 #include <stdbool.h>
25945 #endif
25946
25947 #endif
25948
25949 int
25950 main (void)
25951 {
25952 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25953   ;
25954   return 0;
25955 }
25956 _ACEOF
25957 rm -f "conftest.$ac_objext"
25958 if { (eval echo "$as_me:25958: \"$ac_compile\"") >&5
25959   (eval $ac_compile) 2>&5
25960   ac_status=$?
25961   echo "$as_me:25961: \$? = $ac_status" >&5
25962   (exit "$ac_status"); } &&
25963          { ac_try='test -s "conftest.$ac_objext"'
25964   { (eval echo "$as_me:25964: \"$ac_try\"") >&5
25965   (eval $ac_try) 2>&5
25966   ac_status=$?
25967   echo "$as_me:25967: \$? = $ac_status" >&5
25968   (exit "$ac_status"); }; }; then
25969   ac_lo=$ac_mid; break
25970 else
25971   echo "$as_me: failed program was:" >&5
25972 cat "conftest.$ac_ext" >&5
25973 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25974 fi
25975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25976   done
25977 fi
25978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25979 # Binary search between lo and hi bounds.
25980 while test "x$ac_lo" != "x$ac_hi"; do
25981   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25982   cat >"conftest.$ac_ext" <<_ACEOF
25983 #line 25983 "configure"
25984 #include "confdefs.h"
25985
25986 #include <stdlib.h>
25987 #include <stdio.h>
25988
25989 #if defined(__cplusplus)
25990
25991 #ifdef HAVE_GXX_BUILTIN_H
25992 #include <g++/builtin.h>
25993 #elif HAVE_GPP_BUILTIN_H
25994 #include <gpp/builtin.h>
25995 #elif HAVE_BUILTIN_H
25996 #include <builtin.h>
25997 #endif
25998
25999 #else
26000
26001 #if $cf_cv_header_stdbool_h
26002 #include <stdbool.h>
26003 #endif
26004
26005 #endif
26006
26007 int
26008 main (void)
26009 {
26010 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26011   ;
26012   return 0;
26013 }
26014 _ACEOF
26015 rm -f "conftest.$ac_objext"
26016 if { (eval echo "$as_me:26016: \"$ac_compile\"") >&5
26017   (eval $ac_compile) 2>&5
26018   ac_status=$?
26019   echo "$as_me:26019: \$? = $ac_status" >&5
26020   (exit "$ac_status"); } &&
26021          { ac_try='test -s "conftest.$ac_objext"'
26022   { (eval echo "$as_me:26022: \"$ac_try\"") >&5
26023   (eval $ac_try) 2>&5
26024   ac_status=$?
26025   echo "$as_me:26025: \$? = $ac_status" >&5
26026   (exit "$ac_status"); }; }; then
26027   ac_hi=$ac_mid
26028 else
26029   echo "$as_me: failed program was:" >&5
26030 cat "conftest.$ac_ext" >&5
26031 ac_lo=`expr "$ac_mid" + 1`
26032 fi
26033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26034 done
26035 ac_cv_sizeof_bool=$ac_lo
26036 else
26037   if test "$cross_compiling" = yes; then
26038   { { echo "$as_me:26038: error: cannot run test program while cross compiling" >&5
26039 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26040    { (exit 1); exit 1; }; }
26041 else
26042   cat >"conftest.$ac_ext" <<_ACEOF
26043 #line 26043 "configure"
26044 #include "confdefs.h"
26045
26046 #include <stdlib.h>
26047 #include <stdio.h>
26048
26049 #if defined(__cplusplus)
26050
26051 #ifdef HAVE_GXX_BUILTIN_H
26052 #include <g++/builtin.h>
26053 #elif HAVE_GPP_BUILTIN_H
26054 #include <gpp/builtin.h>
26055 #elif HAVE_BUILTIN_H
26056 #include <builtin.h>
26057 #endif
26058
26059 #else
26060
26061 #if $cf_cv_header_stdbool_h
26062 #include <stdbool.h>
26063 #endif
26064
26065 #endif
26066
26067 int
26068 main (void)
26069 {
26070 FILE *f = fopen ("conftest.val", "w");
26071 if (!f)
26072   $ac_main_return (1);
26073 fprintf (f, "%ld", (long)(sizeof (bool)));
26074 fclose (f);
26075   ;
26076   return 0;
26077 }
26078 _ACEOF
26079 rm -f "conftest$ac_exeext"
26080 if { (eval echo "$as_me:26080: \"$ac_link\"") >&5
26081   (eval $ac_link) 2>&5
26082   ac_status=$?
26083   echo "$as_me:26083: \$? = $ac_status" >&5
26084   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26085   { (eval echo "$as_me:26085: \"$ac_try\"") >&5
26086   (eval $ac_try) 2>&5
26087   ac_status=$?
26088   echo "$as_me:26088: \$? = $ac_status" >&5
26089   (exit "$ac_status"); }; }; then
26090   ac_cv_sizeof_bool=`cat conftest.val`
26091 else
26092   echo "$as_me: program exited with status $ac_status" >&5
26093 echo "$as_me: failed program was:" >&5
26094 cat "conftest.$ac_ext" >&5
26095 fi
26096 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26097 fi
26098 fi
26099 rm -f conftest.val
26100 else
26101   ac_cv_sizeof_bool=0
26102 fi
26103 fi
26104 echo "$as_me:26104: result: $ac_cv_sizeof_bool" >&5
26105 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26106 cat >>confdefs.h <<EOF
26107 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26108 EOF
26109
26110 echo "$as_me:26110: checking for type of bool" >&5
26111 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26112 if test "${cf_cv_type_of_bool+set}" = set; then
26113   echo $ECHO_N "(cached) $ECHO_C" >&6
26114 else
26115
26116         rm -f cf_test.out
26117         if test "$cross_compiling" = yes; then
26118
26119                 case x$ac_cv_sizeof_bool in
26120                 (x1) cf_cv_type_of_bool="unsigned char";;
26121                 (x2) cf_cv_type_of_bool="unsigned short";;
26122                 (x4) cf_cv_type_of_bool="unsigned int";;
26123                 (x8) cf_cv_type_of_bool="unsigned long";;
26124                 (*)  cf_cv_type_of_bool=unknown;;
26125                 esac
26126
26127 else
26128   cat >"conftest.$ac_ext" <<_ACEOF
26129 #line 26129 "configure"
26130 #include "confdefs.h"
26131
26132 #include <stdlib.h>
26133 #include <stdio.h>
26134
26135 #if defined(__cplusplus)
26136
26137 #ifdef HAVE_GXX_BUILTIN_H
26138 #include <g++/builtin.h>
26139 #elif HAVE_GPP_BUILTIN_H
26140 #include <gpp/builtin.h>
26141 #elif HAVE_BUILTIN_H
26142 #include <builtin.h>
26143 #endif
26144
26145 #else
26146
26147 #if $cf_cv_header_stdbool_h
26148 #include <stdbool.h>
26149 #endif
26150
26151 #endif
26152
26153 int main(void)
26154 {
26155         FILE *fp = fopen("cf_test.out", "w");
26156         if (fp != 0) {
26157                 bool x = true;
26158                 if ((bool)(-x) >= 0)
26159                         fputs("unsigned ", fp);
26160                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26161                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26162                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26163                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26164                 fclose(fp);
26165         }
26166         ${cf_cv_main_return:-return}(0);
26167 }
26168
26169 _ACEOF
26170 rm -f "conftest$ac_exeext"
26171 if { (eval echo "$as_me:26171: \"$ac_link\"") >&5
26172   (eval $ac_link) 2>&5
26173   ac_status=$?
26174   echo "$as_me:26174: \$? = $ac_status" >&5
26175   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26176   { (eval echo "$as_me:26176: \"$ac_try\"") >&5
26177   (eval $ac_try) 2>&5
26178   ac_status=$?
26179   echo "$as_me:26179: \$? = $ac_status" >&5
26180   (exit "$ac_status"); }; }; then
26181   cf_cv_type_of_bool=`cat cf_test.out`
26182                  if test -z "$cf_cv_type_of_bool"; then
26183                    cf_cv_type_of_bool=unknown
26184                  fi
26185 else
26186   echo "$as_me: program exited with status $ac_status" >&5
26187 echo "$as_me: failed program was:" >&5
26188 cat "conftest.$ac_ext" >&5
26189 cf_cv_type_of_bool=unknown
26190 fi
26191 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26192 fi
26193         rm -f cf_test.out
26194
26195 fi
26196 echo "$as_me:26196: result: $cf_cv_type_of_bool" >&5
26197 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26198
26199 if test "$cf_cv_type_of_bool" = unknown ; then
26200         case .$NCURSES_BOOL in
26201         (.auto|.) NCURSES_BOOL=unsigned;;
26202         esac
26203         { echo "$as_me:26203: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26204 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26205         cf_cv_type_of_bool=$NCURSES_BOOL
26206 fi
26207
26208 echo "$as_me:26208: checking for special defines needed for etip.h" >&5
26209 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26210 cf_save_CXXFLAGS="$CXXFLAGS"
26211 cf_result="none"
26212
26213 # etip.h includes ncurses.h which includes ncurses_dll.h
26214 # But ncurses_dll.h is generated - fix here.
26215 test -d include || mkdir include
26216 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
26217
26218 for cf_math in "" MATH_H
26219 do
26220 for cf_excp in "" MATH_EXCEPTION
26221 do
26222         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26223         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26224         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26225 cat >"conftest.$ac_ext" <<_ACEOF
26226 #line 26226 "configure"
26227 #include "confdefs.h"
26228
26229 #include <etip.h.in>
26230
26231 int
26232 main (void)
26233 {
26234
26235   ;
26236   return 0;
26237 }
26238 _ACEOF
26239 rm -f "conftest.$ac_objext"
26240 if { (eval echo "$as_me:26240: \"$ac_compile\"") >&5
26241   (eval $ac_compile) 2>&5
26242   ac_status=$?
26243   echo "$as_me:26243: \$? = $ac_status" >&5
26244   (exit "$ac_status"); } &&
26245          { ac_try='test -s "conftest.$ac_objext"'
26246   { (eval echo "$as_me:26246: \"$ac_try\"") >&5
26247   (eval $ac_try) 2>&5
26248   ac_status=$?
26249   echo "$as_me:26249: \$? = $ac_status" >&5
26250   (exit "$ac_status"); }; }; then
26251
26252         test -n "$cf_math" && cat >>confdefs.h <<EOF
26253 #define ETIP_NEEDS_${cf_math} 1
26254 EOF
26255
26256         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26257 #define ETIP_NEEDS_${cf_excp} 1
26258 EOF
26259
26260         cf_result="$cf_math $cf_excp"
26261         break 2
26262
26263 else
26264   echo "$as_me: failed program was:" >&5
26265 cat "conftest.$ac_ext" >&5
26266 fi
26267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26268 done
26269 done
26270 echo "$as_me:26270: result: $cf_result" >&5
26271 echo "${ECHO_T}$cf_result" >&6
26272 CXXFLAGS="$cf_save_CXXFLAGS"
26273
26274 if test -n "$CXX"; then
26275 echo "$as_me:26275: checking if $CXX accepts parameter initialization" >&5
26276 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26277 if test "${cf_cv_cpp_param_init+set}" = set; then
26278   echo $ECHO_N "(cached) $ECHO_C" >&6
26279 else
26280
26281         ac_ext=cc
26282 ac_cpp='$CXXCPP $CPPFLAGS'
26283 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26284 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26285 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26286 ac_main_return="return"
26287
26288         if test "$cross_compiling" = yes; then
26289   cf_cv_cpp_param_init=unknown
26290 else
26291   cat >"conftest.$ac_ext" <<_ACEOF
26292 #line 26292 "configure"
26293 #include "confdefs.h"
26294
26295 class TEST {
26296 private:
26297         int value;
26298 public:
26299         TEST(int x = 1);
26300         ~TEST();
26301 };
26302
26303 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26304 {
26305         value = x;
26306 }
26307 int main(void) { }
26308
26309 _ACEOF
26310 rm -f "conftest$ac_exeext"
26311 if { (eval echo "$as_me:26311: \"$ac_link\"") >&5
26312   (eval $ac_link) 2>&5
26313   ac_status=$?
26314   echo "$as_me:26314: \$? = $ac_status" >&5
26315   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26316   { (eval echo "$as_me:26316: \"$ac_try\"") >&5
26317   (eval $ac_try) 2>&5
26318   ac_status=$?
26319   echo "$as_me:26319: \$? = $ac_status" >&5
26320   (exit "$ac_status"); }; }; then
26321   cf_cv_cpp_param_init=yes
26322 else
26323   echo "$as_me: program exited with status $ac_status" >&5
26324 echo "$as_me: failed program was:" >&5
26325 cat "conftest.$ac_ext" >&5
26326 cf_cv_cpp_param_init=no
26327 fi
26328 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26329 fi
26330         ac_ext=cc
26331 ac_cpp='$CXXCPP $CPPFLAGS'
26332 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26333 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26334 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26335 ac_main_return="return"
26336
26337 fi
26338 echo "$as_me:26338: result: $cf_cv_cpp_param_init" >&5
26339 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26340 fi
26341 test "$cf_cv_cpp_param_init" = yes &&
26342 cat >>confdefs.h <<\EOF
26343 #define CPP_HAS_PARAM_INIT 1
26344 EOF
26345
26346 if test -n "$CXX"; then
26347
26348 echo "$as_me:26348: checking if $CXX accepts static_cast" >&5
26349 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26350 if test "${cf_cv_cpp_static_cast+set}" = set; then
26351   echo $ECHO_N "(cached) $ECHO_C" >&6
26352 else
26353
26354         ac_ext=cc
26355 ac_cpp='$CXXCPP $CPPFLAGS'
26356 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26357 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26358 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26359 ac_main_return="return"
26360
26361         cat >"conftest.$ac_ext" <<_ACEOF
26362 #line 26362 "configure"
26363 #include "confdefs.h"
26364
26365 class NCursesPanel
26366 {
26367 public:
26368   NCursesPanel(int nlines,
26369                int ncols,
26370                int begin_y = 0,
26371                int begin_x = 0)
26372   {
26373   }
26374   NCursesPanel();
26375   ~NCursesPanel();
26376 };
26377
26378 template<class T> class NCursesUserPanel : public NCursesPanel
26379 {
26380 public:
26381   NCursesUserPanel (int nlines,
26382                     int ncols,
26383                     int begin_y = 0,
26384                     int begin_x = 0,
26385                     const T* p_UserData = static_cast<T*>(0))
26386     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26387   {
26388   };
26389   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26390   {
26391   };
26392
26393   virtual ~NCursesUserPanel() {};
26394 };
26395
26396 int
26397 main (void)
26398 {
26399
26400         const char* p_UserData = static_cast<char*>(0)
26401   ;
26402   return 0;
26403 }
26404 _ACEOF
26405 rm -f "conftest.$ac_objext"
26406 if { (eval echo "$as_me:26406: \"$ac_compile\"") >&5
26407   (eval $ac_compile) 2>&5
26408   ac_status=$?
26409   echo "$as_me:26409: \$? = $ac_status" >&5
26410   (exit "$ac_status"); } &&
26411          { ac_try='test -s "conftest.$ac_objext"'
26412   { (eval echo "$as_me:26412: \"$ac_try\"") >&5
26413   (eval $ac_try) 2>&5
26414   ac_status=$?
26415   echo "$as_me:26415: \$? = $ac_status" >&5
26416   (exit "$ac_status"); }; }; then
26417   cf_cv_cpp_static_cast=yes
26418 else
26419   echo "$as_me: failed program was:" >&5
26420 cat "conftest.$ac_ext" >&5
26421 cf_cv_cpp_static_cast=no
26422 fi
26423 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26424
26425         ac_ext=cc
26426 ac_cpp='$CXXCPP $CPPFLAGS'
26427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26428 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26430 ac_main_return="return"
26431
26432 fi
26433 echo "$as_me:26433: result: $cf_cv_cpp_static_cast" >&5
26434 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26435
26436 fi
26437
26438 test "$cf_cv_cpp_static_cast" = yes &&
26439 cat >>confdefs.h <<\EOF
26440 #define CPP_HAS_STATIC_CAST 1
26441 EOF
26442
26443         CXX_AR='$(AR)'
26444         CXX_ARFLAGS='$(ARFLAGS)'
26445         case "$cf_cv_system_name" in
26446         (irix*)
26447             if test "$GXX" != yes ; then
26448                 CXX_AR='$(CXX)'
26449                 CXX_ARFLAGS='-ar -o'
26450             fi
26451             ;;
26452         (sco3.2v5*)
26453             CXXLDFLAGS="-u main"
26454             ;;
26455         (solaris2*)
26456             if test "$GXX" != yes ; then
26457                 CXX_AR='$(CXX)'
26458                 CXX_ARFLAGS='-xar -o'
26459             fi
26460             ;;
26461         esac
26462
26463 else
26464         cf_cxx_library=no
26465         cf_cv_builtin_bool=1
26466
26467         # Just because we are not configuring against C++ right now does not
26468         # mean that a user will not want to use C++.  Some distributors disable
26469         # the C++ portion of this configuration as a shortcut (or just to avoid
26470         # compiling the demo in the c++ directory).  So we need a reasonable
26471         # default for the 'bool' type.
26472         #
26473         # Caveat: since the storage of the bool type is not standardized, it
26474         # may change.
26475
26476         if test "$NCURSES_BOOL" != auto ; then
26477                 cf_cv_type_of_bool=$NCURSES_BOOL
26478                 cf_cv_header_stdbool_h=0
26479         else
26480                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26481
26482 echo "$as_me:26482: checking for bool" >&5
26483 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26484 if test "${ac_cv_type_bool+set}" = set; then
26485   echo $ECHO_N "(cached) $ECHO_C" >&6
26486 else
26487   cat >"conftest.$ac_ext" <<_ACEOF
26488 #line 26488 "configure"
26489 #include "confdefs.h"
26490
26491 #include <stdlib.h>
26492 #include <stdio.h>
26493
26494 #if defined(__cplusplus)
26495
26496 #ifdef HAVE_GXX_BUILTIN_H
26497 #include <g++/builtin.h>
26498 #elif HAVE_GPP_BUILTIN_H
26499 #include <gpp/builtin.h>
26500 #elif HAVE_BUILTIN_H
26501 #include <builtin.h>
26502 #endif
26503
26504 #else
26505
26506 #if $cf_cv_header_stdbool_h
26507 #include <stdbool.h>
26508 #endif
26509
26510 #endif
26511
26512 int
26513 main (void)
26514 {
26515 if ((bool *) 0)
26516   return 0;
26517 if (sizeof (bool))
26518   return 0;
26519   ;
26520   return 0;
26521 }
26522 _ACEOF
26523 rm -f "conftest.$ac_objext"
26524 if { (eval echo "$as_me:26524: \"$ac_compile\"") >&5
26525   (eval $ac_compile) 2>&5
26526   ac_status=$?
26527   echo "$as_me:26527: \$? = $ac_status" >&5
26528   (exit "$ac_status"); } &&
26529          { ac_try='test -s "conftest.$ac_objext"'
26530   { (eval echo "$as_me:26530: \"$ac_try\"") >&5
26531   (eval $ac_try) 2>&5
26532   ac_status=$?
26533   echo "$as_me:26533: \$? = $ac_status" >&5
26534   (exit "$ac_status"); }; }; then
26535   ac_cv_type_bool=yes
26536 else
26537   echo "$as_me: failed program was:" >&5
26538 cat "conftest.$ac_ext" >&5
26539 ac_cv_type_bool=no
26540 fi
26541 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26542 fi
26543 echo "$as_me:26543: result: $ac_cv_type_bool" >&5
26544 echo "${ECHO_T}$ac_cv_type_bool" >&6
26545
26546 echo "$as_me:26546: checking size of bool" >&5
26547 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26548 if test "${ac_cv_sizeof_bool+set}" = set; then
26549   echo $ECHO_N "(cached) $ECHO_C" >&6
26550 else
26551   if test "$ac_cv_type_bool" = yes; then
26552   if test "$cross_compiling" = yes; then
26553   # Depending upon the size, compute the lo and hi bounds.
26554 cat >"conftest.$ac_ext" <<_ACEOF
26555 #line 26555 "configure"
26556 #include "confdefs.h"
26557
26558 #include <stdlib.h>
26559 #include <stdio.h>
26560
26561 #if defined(__cplusplus)
26562
26563 #ifdef HAVE_GXX_BUILTIN_H
26564 #include <g++/builtin.h>
26565 #elif HAVE_GPP_BUILTIN_H
26566 #include <gpp/builtin.h>
26567 #elif HAVE_BUILTIN_H
26568 #include <builtin.h>
26569 #endif
26570
26571 #else
26572
26573 #if $cf_cv_header_stdbool_h
26574 #include <stdbool.h>
26575 #endif
26576
26577 #endif
26578
26579 int
26580 main (void)
26581 {
26582 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26583   ;
26584   return 0;
26585 }
26586 _ACEOF
26587 rm -f "conftest.$ac_objext"
26588 if { (eval echo "$as_me:26588: \"$ac_compile\"") >&5
26589   (eval $ac_compile) 2>&5
26590   ac_status=$?
26591   echo "$as_me:26591: \$? = $ac_status" >&5
26592   (exit "$ac_status"); } &&
26593          { ac_try='test -s "conftest.$ac_objext"'
26594   { (eval echo "$as_me:26594: \"$ac_try\"") >&5
26595   (eval $ac_try) 2>&5
26596   ac_status=$?
26597   echo "$as_me:26597: \$? = $ac_status" >&5
26598   (exit "$ac_status"); }; }; then
26599   ac_lo=0 ac_mid=0
26600   while :; do
26601     cat >"conftest.$ac_ext" <<_ACEOF
26602 #line 26602 "configure"
26603 #include "confdefs.h"
26604
26605 #include <stdlib.h>
26606 #include <stdio.h>
26607
26608 #if defined(__cplusplus)
26609
26610 #ifdef HAVE_GXX_BUILTIN_H
26611 #include <g++/builtin.h>
26612 #elif HAVE_GPP_BUILTIN_H
26613 #include <gpp/builtin.h>
26614 #elif HAVE_BUILTIN_H
26615 #include <builtin.h>
26616 #endif
26617
26618 #else
26619
26620 #if $cf_cv_header_stdbool_h
26621 #include <stdbool.h>
26622 #endif
26623
26624 #endif
26625
26626 int
26627 main (void)
26628 {
26629 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26630   ;
26631   return 0;
26632 }
26633 _ACEOF
26634 rm -f "conftest.$ac_objext"
26635 if { (eval echo "$as_me:26635: \"$ac_compile\"") >&5
26636   (eval $ac_compile) 2>&5
26637   ac_status=$?
26638   echo "$as_me:26638: \$? = $ac_status" >&5
26639   (exit "$ac_status"); } &&
26640          { ac_try='test -s "conftest.$ac_objext"'
26641   { (eval echo "$as_me:26641: \"$ac_try\"") >&5
26642   (eval $ac_try) 2>&5
26643   ac_status=$?
26644   echo "$as_me:26644: \$? = $ac_status" >&5
26645   (exit "$ac_status"); }; }; then
26646   ac_hi=$ac_mid; break
26647 else
26648   echo "$as_me: failed program was:" >&5
26649 cat "conftest.$ac_ext" >&5
26650 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26651 fi
26652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26653   done
26654 else
26655   echo "$as_me: failed program was:" >&5
26656 cat "conftest.$ac_ext" >&5
26657 ac_hi=-1 ac_mid=-1
26658   while :; do
26659     cat >"conftest.$ac_ext" <<_ACEOF
26660 #line 26660 "configure"
26661 #include "confdefs.h"
26662
26663 #include <stdlib.h>
26664 #include <stdio.h>
26665
26666 #if defined(__cplusplus)
26667
26668 #ifdef HAVE_GXX_BUILTIN_H
26669 #include <g++/builtin.h>
26670 #elif HAVE_GPP_BUILTIN_H
26671 #include <gpp/builtin.h>
26672 #elif HAVE_BUILTIN_H
26673 #include <builtin.h>
26674 #endif
26675
26676 #else
26677
26678 #if $cf_cv_header_stdbool_h
26679 #include <stdbool.h>
26680 #endif
26681
26682 #endif
26683
26684 int
26685 main (void)
26686 {
26687 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26688   ;
26689   return 0;
26690 }
26691 _ACEOF
26692 rm -f "conftest.$ac_objext"
26693 if { (eval echo "$as_me:26693: \"$ac_compile\"") >&5
26694   (eval $ac_compile) 2>&5
26695   ac_status=$?
26696   echo "$as_me:26696: \$? = $ac_status" >&5
26697   (exit "$ac_status"); } &&
26698          { ac_try='test -s "conftest.$ac_objext"'
26699   { (eval echo "$as_me:26699: \"$ac_try\"") >&5
26700   (eval $ac_try) 2>&5
26701   ac_status=$?
26702   echo "$as_me:26702: \$? = $ac_status" >&5
26703   (exit "$ac_status"); }; }; then
26704   ac_lo=$ac_mid; break
26705 else
26706   echo "$as_me: failed program was:" >&5
26707 cat "conftest.$ac_ext" >&5
26708 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26709 fi
26710 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26711   done
26712 fi
26713 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26714 # Binary search between lo and hi bounds.
26715 while test "x$ac_lo" != "x$ac_hi"; do
26716   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26717   cat >"conftest.$ac_ext" <<_ACEOF
26718 #line 26718 "configure"
26719 #include "confdefs.h"
26720
26721 #include <stdlib.h>
26722 #include <stdio.h>
26723
26724 #if defined(__cplusplus)
26725
26726 #ifdef HAVE_GXX_BUILTIN_H
26727 #include <g++/builtin.h>
26728 #elif HAVE_GPP_BUILTIN_H
26729 #include <gpp/builtin.h>
26730 #elif HAVE_BUILTIN_H
26731 #include <builtin.h>
26732 #endif
26733
26734 #else
26735
26736 #if $cf_cv_header_stdbool_h
26737 #include <stdbool.h>
26738 #endif
26739
26740 #endif
26741
26742 int
26743 main (void)
26744 {
26745 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26746   ;
26747   return 0;
26748 }
26749 _ACEOF
26750 rm -f "conftest.$ac_objext"
26751 if { (eval echo "$as_me:26751: \"$ac_compile\"") >&5
26752   (eval $ac_compile) 2>&5
26753   ac_status=$?
26754   echo "$as_me:26754: \$? = $ac_status" >&5
26755   (exit "$ac_status"); } &&
26756          { ac_try='test -s "conftest.$ac_objext"'
26757   { (eval echo "$as_me:26757: \"$ac_try\"") >&5
26758   (eval $ac_try) 2>&5
26759   ac_status=$?
26760   echo "$as_me:26760: \$? = $ac_status" >&5
26761   (exit "$ac_status"); }; }; then
26762   ac_hi=$ac_mid
26763 else
26764   echo "$as_me: failed program was:" >&5
26765 cat "conftest.$ac_ext" >&5
26766 ac_lo=`expr "$ac_mid" + 1`
26767 fi
26768 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26769 done
26770 ac_cv_sizeof_bool=$ac_lo
26771 else
26772   if test "$cross_compiling" = yes; then
26773   { { echo "$as_me:26773: error: cannot run test program while cross compiling" >&5
26774 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26775    { (exit 1); exit 1; }; }
26776 else
26777   cat >"conftest.$ac_ext" <<_ACEOF
26778 #line 26778 "configure"
26779 #include "confdefs.h"
26780
26781 #include <stdlib.h>
26782 #include <stdio.h>
26783
26784 #if defined(__cplusplus)
26785
26786 #ifdef HAVE_GXX_BUILTIN_H
26787 #include <g++/builtin.h>
26788 #elif HAVE_GPP_BUILTIN_H
26789 #include <gpp/builtin.h>
26790 #elif HAVE_BUILTIN_H
26791 #include <builtin.h>
26792 #endif
26793
26794 #else
26795
26796 #if $cf_cv_header_stdbool_h
26797 #include <stdbool.h>
26798 #endif
26799
26800 #endif
26801
26802 int
26803 main (void)
26804 {
26805 FILE *f = fopen ("conftest.val", "w");
26806 if (!f)
26807   $ac_main_return (1);
26808 fprintf (f, "%ld", (long)(sizeof (bool)));
26809 fclose (f);
26810   ;
26811   return 0;
26812 }
26813 _ACEOF
26814 rm -f "conftest$ac_exeext"
26815 if { (eval echo "$as_me:26815: \"$ac_link\"") >&5
26816   (eval $ac_link) 2>&5
26817   ac_status=$?
26818   echo "$as_me:26818: \$? = $ac_status" >&5
26819   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26820   { (eval echo "$as_me:26820: \"$ac_try\"") >&5
26821   (eval $ac_try) 2>&5
26822   ac_status=$?
26823   echo "$as_me:26823: \$? = $ac_status" >&5
26824   (exit "$ac_status"); }; }; then
26825   ac_cv_sizeof_bool=`cat conftest.val`
26826 else
26827   echo "$as_me: program exited with status $ac_status" >&5
26828 echo "$as_me: failed program was:" >&5
26829 cat "conftest.$ac_ext" >&5
26830 fi
26831 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26832 fi
26833 fi
26834 rm -f conftest.val
26835 else
26836   ac_cv_sizeof_bool=0
26837 fi
26838 fi
26839 echo "$as_me:26839: result: $ac_cv_sizeof_bool" >&5
26840 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26841 cat >>confdefs.h <<EOF
26842 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26843 EOF
26844
26845 echo "$as_me:26845: checking for type of bool" >&5
26846 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26847 if test "${cf_cv_type_of_bool+set}" = set; then
26848   echo $ECHO_N "(cached) $ECHO_C" >&6
26849 else
26850
26851         rm -f cf_test.out
26852         if test "$cross_compiling" = yes; then
26853
26854                 case x$ac_cv_sizeof_bool in
26855                 (x1) cf_cv_type_of_bool="unsigned char";;
26856                 (x2) cf_cv_type_of_bool="unsigned short";;
26857                 (x4) cf_cv_type_of_bool="unsigned int";;
26858                 (x8) cf_cv_type_of_bool="unsigned long";;
26859                 (*)  cf_cv_type_of_bool=unknown;;
26860                 esac
26861
26862 else
26863   cat >"conftest.$ac_ext" <<_ACEOF
26864 #line 26864 "configure"
26865 #include "confdefs.h"
26866
26867 #include <stdlib.h>
26868 #include <stdio.h>
26869
26870 #if defined(__cplusplus)
26871
26872 #ifdef HAVE_GXX_BUILTIN_H
26873 #include <g++/builtin.h>
26874 #elif HAVE_GPP_BUILTIN_H
26875 #include <gpp/builtin.h>
26876 #elif HAVE_BUILTIN_H
26877 #include <builtin.h>
26878 #endif
26879
26880 #else
26881
26882 #if $cf_cv_header_stdbool_h
26883 #include <stdbool.h>
26884 #endif
26885
26886 #endif
26887
26888 int main(void)
26889 {
26890         FILE *fp = fopen("cf_test.out", "w");
26891         if (fp != 0) {
26892                 bool x = true;
26893                 if ((bool)(-x) >= 0)
26894                         fputs("unsigned ", fp);
26895                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26896                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26897                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26898                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26899                 fclose(fp);
26900         }
26901         ${cf_cv_main_return:-return}(0);
26902 }
26903
26904 _ACEOF
26905 rm -f "conftest$ac_exeext"
26906 if { (eval echo "$as_me:26906: \"$ac_link\"") >&5
26907   (eval $ac_link) 2>&5
26908   ac_status=$?
26909   echo "$as_me:26909: \$? = $ac_status" >&5
26910   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26911   { (eval echo "$as_me:26911: \"$ac_try\"") >&5
26912   (eval $ac_try) 2>&5
26913   ac_status=$?
26914   echo "$as_me:26914: \$? = $ac_status" >&5
26915   (exit "$ac_status"); }; }; then
26916   cf_cv_type_of_bool=`cat cf_test.out`
26917                  if test -z "$cf_cv_type_of_bool"; then
26918                    cf_cv_type_of_bool=unknown
26919                  fi
26920 else
26921   echo "$as_me: program exited with status $ac_status" >&5
26922 echo "$as_me: failed program was:" >&5
26923 cat "conftest.$ac_ext" >&5
26924 cf_cv_type_of_bool=unknown
26925 fi
26926 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26927 fi
26928         rm -f cf_test.out
26929
26930 fi
26931 echo "$as_me:26931: result: $cf_cv_type_of_bool" >&5
26932 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26933
26934 if test "$cf_cv_type_of_bool" = unknown ; then
26935         case .$NCURSES_BOOL in
26936         (.auto|.) NCURSES_BOOL=unsigned;;
26937         esac
26938         { echo "$as_me:26938: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26939 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26940         cf_cv_type_of_bool=$NCURSES_BOOL
26941 fi
26942
26943                 else
26944                         echo "$as_me:26944: checking for fallback type of bool" >&5
26945 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26946                         case "$host_cpu" in
26947                         (i?86)  cf_cv_type_of_bool=char ;;
26948                         (*)     cf_cv_type_of_bool=int  ;;
26949                         esac
26950                         echo "$as_me:26950: result: $cf_cv_type_of_bool" >&5
26951 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26952                 fi
26953         fi
26954 fi
26955
26956 # If the C compiler did not declare bool, and we did not determine that the C++
26957 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26958 # ncurses library use the same type as C++ bool.  Note that this allows one to
26959 # specify the type of bool in a configure-script option and postpone
26960 # integration with the C++ compiler provided that the types are compatible.
26961 USE_CXX_BOOL=1
26962 if test "$cf_cv_cc_bool_type" = 1
26963 then
26964         # oops: C has a bool.  Unlikely, but C++ could differ.
26965         USE_CXX_BOOL=0
26966 elif test "$cf_cv_builtin_bool" = 0
26967 then
26968         # C++ has no bool
26969         USE_CXX_BOOL=0
26970 else
26971         # this is the normal case
26972         USE_CXX_BOOL='defined(__cplusplus)'
26973 fi
26974
26975 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26976
26977         if test "$cf_with_ada" != "no" ; then
26978                 if test "$with_libtool" != "no"; then
26979                         { echo "$as_me:26979: WARNING: libtool does not support Ada - disabling feature" >&5
26980 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26981                         cf_with_ada=no
26982                 fi
26983         fi
26984
26985         if test "$cf_with_ada" != "no" ; then
26986
26987 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26988 do
26989
26990 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26991
26992         unset ac_cv_path_cf_TEMP_gnat
26993         unset cf_TEMP_gnat
26994         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26995 set dummy $cf_prog_gnat; ac_word=$2
26996 echo "$as_me:26996: checking for $ac_word" >&5
26997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26998 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26999   echo $ECHO_N "(cached) $ECHO_C" >&6
27000 else
27001   case $cf_TEMP_gnat in
27002   [\\/]* | ?:[\\/]*)
27003   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27004   ;;
27005   *)
27006   ac_save_IFS=$IFS; IFS=$ac_path_separator
27007 ac_dummy="$PATH"
27008 for ac_dir in $ac_dummy; do
27009   IFS=$ac_save_IFS
27010   test -z "$ac_dir" && ac_dir=.
27011   if $as_executable_p "$ac_dir/$ac_word"; then
27012    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27013    echo "$as_me:27013: found $ac_dir/$ac_word" >&5
27014    break
27015 fi
27016 done
27017
27018   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27019   ;;
27020 esac
27021 fi
27022 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27023
27024 if test -n "$cf_TEMP_gnat"; then
27025   echo "$as_me:27025: result: $cf_TEMP_gnat" >&5
27026 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27027 else
27028   echo "$as_me:27028: result: no" >&5
27029 echo "${ECHO_T}no" >&6
27030 fi
27031
27032         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27033
27034         if test "x$cf_TEMP_gnat" != xno; then
27035                 unset cf_cv_gnat_version
27036                 unset cf_TEMP_gnat
27037
27038 echo "$as_me:27038: checking for $cf_prog_gnat version" >&5
27039 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27040 if test "${cf_cv_gnat_version+set}" = set; then
27041   echo $ECHO_N "(cached) $ECHO_C" >&6
27042 else
27043
27044 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27045         grep '[0-9].[0-9][0-9]*' |\
27046         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27047
27048 fi
27049 echo "$as_me:27049: result: $cf_cv_gnat_version" >&5
27050 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27051 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27052 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27053
27054         fi
27055         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27056
27057         unset cf_TEMP_gnat
27058         unset cf_cv_gnat_version
27059         unset ac_cv_path_cf_TEMP_gnat
27060 done
27061
27062 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27063         cf_ada_make=
27064         cf_cv_prog_gnat_correct=no
27065 else
27066         cf_ada_make=gnatmake
27067         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27068                 # gprconfig is newer than gnatmake; we can continue...
27069                 cf_ada_config="##"
27070         else
27071                 rm -rf ./conftest* ./*~conftest*
27072                 if mkdir conftest.src
27073                 then
27074                         cf_ada_config=""
27075                         cd conftest.src
27076                         for cf_gprconfig in Ada C
27077                         do
27078                                 echo "$as_me:27078: checking for gprconfig name for $cf_gprconfig" >&5
27079 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27080                                 if test "$cf_gprconfig" = C
27081                                 then
27082                                         for cf_gprconfig_param in \
27083                                                 "$cf_gprconfig,,,,GNATGCC" \
27084                                                 "$cf_gprconfig,,,,GCC" \
27085                                                 "$cf_gprconfig"
27086                                         do
27087                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27088                                                 test -n "$cf_gprconfig_value" && break
27089                                         done
27090                                 else
27091                                         cf_gprconfig_param=$cf_gprconfig
27092                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27093                                 fi
27094                                 if test -n "$cf_gprconfig_value"
27095                                 then
27096                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27097                                         echo "$as_me:27097: result: $cf_gprconfig_value" >&5
27098 echo "${ECHO_T}$cf_gprconfig_value" >&6
27099                                 else
27100                                         echo "$as_me:27100: result: missing" >&5
27101 echo "${ECHO_T}missing" >&6
27102                                         cf_ada_config="#"
27103                                         break
27104                                 fi
27105                         done
27106                         cd ..
27107                         rm -rf ./conftest* ./*~conftest*
27108                 fi
27109         fi
27110         if test "x$cf_ada_config" != "x#"
27111         then
27112
27113 echo "$as_me:27113: checking for gnat version" >&5
27114 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27115 if test "${cf_cv_gnat_version+set}" = set; then
27116   echo $ECHO_N "(cached) $ECHO_C" >&6
27117 else
27118
27119 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27120         grep '[0-9].[0-9][0-9]*' |\
27121         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27122
27123 fi
27124 echo "$as_me:27124: result: $cf_cv_gnat_version" >&5
27125 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27126 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27127
27128 case "$cf_cv_gnat_version" in
27129 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27130         cf_cv_prog_gnat_correct=yes
27131         ;;
27132 (*)
27133         { echo "$as_me:27133: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27134 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27135         cf_cv_prog_gnat_correct=no
27136         ;;
27137 esac
27138
27139                 # Extract the first word of "m4", so it can be a program name with args.
27140 set dummy m4; ac_word=$2
27141 echo "$as_me:27141: checking for $ac_word" >&5
27142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27143 if test "${ac_cv_prog_M4_exists+set}" = set; then
27144   echo $ECHO_N "(cached) $ECHO_C" >&6
27145 else
27146   if test -n "$M4_exists"; then
27147   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27148 else
27149   ac_save_IFS=$IFS; IFS=$ac_path_separator
27150 ac_dummy="$PATH"
27151 for ac_dir in $ac_dummy; do
27152   IFS=$ac_save_IFS
27153   test -z "$ac_dir" && ac_dir=.
27154   $as_executable_p "$ac_dir/$ac_word" || continue
27155 ac_cv_prog_M4_exists="yes"
27156 echo "$as_me:27156: found $ac_dir/$ac_word" >&5
27157 break
27158 done
27159
27160   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27161 fi
27162 fi
27163 M4_exists=$ac_cv_prog_M4_exists
27164 if test -n "$M4_exists"; then
27165   echo "$as_me:27165: result: $M4_exists" >&5
27166 echo "${ECHO_T}$M4_exists" >&6
27167 else
27168   echo "$as_me:27168: result: no" >&5
27169 echo "${ECHO_T}no" >&6
27170 fi
27171
27172                 if test "$ac_cv_prog_M4_exists" = no; then
27173                         cf_cv_prog_gnat_correct=no
27174                         { echo "$as_me:27174: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27175 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27176                 fi
27177                 if test "$cf_cv_prog_gnat_correct" = yes; then
27178                         echo "$as_me:27178: checking if GNAT works" >&5
27179 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27180
27181 rm -rf ./conftest* ./*~conftest*
27182 cat >>conftest.ads <<CF_EOF
27183 procedure conftest;
27184 CF_EOF
27185 cat >>conftest.adb <<CF_EOF
27186 with Text_IO;
27187 with GNAT.OS_Lib;
27188 procedure conftest is
27189 begin
27190    Text_IO.Put ("Hello World");
27191    Text_IO.New_Line;
27192    GNAT.OS_Lib.OS_Exit (0);
27193 end conftest;
27194 CF_EOF
27195 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27196    if ( ./conftest 1>&5 2>&1 ) ; then
27197       cf_cv_prog_gnat_correct=yes
27198    else
27199       cf_cv_prog_gnat_correct=no
27200    fi
27201 else
27202    cf_cv_prog_gnat_correct=no
27203 fi
27204 rm -rf ./conftest* ./*~conftest*
27205
27206                         echo "$as_me:27206: result: $cf_cv_prog_gnat_correct" >&5
27207 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27208                 fi
27209         else
27210                 cf_cv_prog_gnat_correct=no
27211         fi
27212 fi
27213
27214                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27215
27216         ADAFLAGS="$ADAFLAGS -gnatpn"
27217
27218         echo "$as_me:27218: checking optimization options for ADAFLAGS" >&5
27219 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27220         case "$CFLAGS" in
27221         (*-g*)
27222
27223         ADAFLAGS="$ADAFLAGS -g"
27224
27225                 ;;
27226         esac
27227         case "$CFLAGS" in
27228         (*-O*)
27229                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27230
27231         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27232
27233                 ;;
27234         esac
27235         echo "$as_me:27235: result: $ADAFLAGS" >&5
27236 echo "${ECHO_T}$ADAFLAGS" >&6
27237
27238 echo "$as_me:27238: checking if GNATPREP supports -T option" >&5
27239 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27240 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27241   echo $ECHO_N "(cached) $ECHO_C" >&6
27242 else
27243
27244 cf_cv_gnatprep_opt_t=no
27245 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27246
27247 fi
27248 echo "$as_me:27248: result: $cf_cv_gnatprep_opt_t" >&5
27249 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27250 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27251
27252 echo "$as_me:27252: checking if GNAT supports generics" >&5
27253 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27254 case "$cf_cv_gnat_version" in
27255 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27256         cf_gnat_generics=yes
27257         ;;
27258 (*)
27259         cf_gnat_generics=no
27260         ;;
27261 esac
27262 echo "$as_me:27262: result: $cf_gnat_generics" >&5
27263 echo "${ECHO_T}$cf_gnat_generics" >&6
27264
27265 if test "$cf_gnat_generics" = yes
27266 then
27267         cf_compile_generics=generics
27268         cf_generic_objects="\${GENOBJS}"
27269 else
27270         cf_compile_generics=
27271         cf_generic_objects=
27272 fi
27273
27274 echo "$as_me:27274: checking if GNAT supports SIGINT" >&5
27275 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27276 if test "${cf_cv_gnat_sigint+set}" = set; then
27277   echo $ECHO_N "(cached) $ECHO_C" >&6
27278 else
27279
27280 rm -rf ./conftest* ./*~conftest*
27281 cat >>conftest.ads <<CF_EOF
27282 with Ada.Interrupts.Names;
27283
27284 package ConfTest is
27285
27286    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27287    pragma Unreserve_All_Interrupts;
27288    pragma Warnings (On);
27289
27290    protected Process is
27291       procedure Stop;
27292       function Continue return Boolean;
27293       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27294    private
27295       Done : Boolean := False;
27296    end Process;
27297
27298 end ConfTest;
27299 CF_EOF
27300 cat >>conftest.adb <<CF_EOF
27301 package body ConfTest is
27302    protected body Process is
27303       procedure Stop is
27304       begin
27305          Done := True;
27306       end Stop;
27307       function Continue return Boolean is
27308       begin
27309          return not Done;
27310       end Continue;
27311    end Process;
27312 end ConfTest;
27313 CF_EOF
27314 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27315       cf_cv_gnat_sigint=yes
27316 else
27317    cf_cv_gnat_sigint=no
27318 fi
27319 rm -rf ./conftest* ./*~conftest*
27320
27321 fi
27322 echo "$as_me:27322: result: $cf_cv_gnat_sigint" >&5
27323 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27324
27325 if test "$cf_cv_gnat_sigint" = yes ; then
27326         USE_GNAT_SIGINT=""
27327 else
27328         USE_GNAT_SIGINT="#"
27329 fi
27330
27331 cf_gnat_libraries=no
27332 cf_gnat_projects=no
27333
27334 if test "$enable_gnat_projects" != no ; then
27335 echo "$as_me:27335: checking if GNAT supports project files" >&5
27336 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27337 case "$cf_cv_gnat_version" in
27338 (3.[0-9]*)
27339         ;;
27340 (*)
27341         case "$cf_cv_system_name" in
27342         (cygwin*|msys*)
27343                 ;;
27344         (*)
27345                 rm -rf ./conftest* ./*~conftest*
27346                 if mkdir conftest.src conftest.bin conftest.lib
27347                 then
27348                         cd conftest.src
27349                         rm -rf ./conftest* ./*~conftest*
27350                         cat >>library.gpr <<CF_EOF
27351 project Library is
27352   Kind := External ("LIB_KIND");
27353   for Library_Name use "ConfTest";
27354   for Object_Dir use ".";
27355   for Library_ALI_Dir use External("LIBRARY_DIR");
27356   for Library_Version use External ("SONAME");
27357   for Library_Kind use Kind;
27358   for Library_Dir use External("BUILD_DIR");
27359   Source_Dir := External ("SOURCE_DIR");
27360   for Source_Dirs use (Source_Dir);
27361 end Library;
27362 CF_EOF
27363                         cat >>confpackage.ads <<CF_EOF
27364 package ConfPackage is
27365    procedure conftest;
27366 end ConfPackage;
27367 CF_EOF
27368                         cat >>confpackage.adb <<CF_EOF
27369 with Text_IO;
27370 package body ConfPackage is
27371    procedure conftest is
27372    begin
27373       Text_IO.Put ("Hello World");
27374       Text_IO.New_Line;
27375    end conftest;
27376 end ConfPackage;
27377 CF_EOF
27378                         if ( "$cf_ada_make" $ADAFLAGS \
27379                                         -Plibrary.gpr \
27380                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27381                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27382                                         -XSOURCE_DIR="`pwd`" \
27383                                         -XSONAME=libConfTest.so.1 \
27384                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27385                                 cf_gnat_projects=yes
27386                         fi
27387                         cd ..
27388                 fi
27389                 if test -f conftest.lib/confpackage.ali
27390                 then
27391                         cf_gnat_libraries=yes
27392                 fi
27393                 rm -rf ./conftest* ./*~conftest*
27394                 ;;
27395         esac
27396         ;;
27397 esac
27398 echo "$as_me:27398: result: $cf_gnat_projects" >&5
27399 echo "${ECHO_T}$cf_gnat_projects" >&6
27400 fi # enable_gnat_projects
27401
27402 if test "$cf_gnat_projects" = yes
27403 then
27404         echo "$as_me:27404: checking if GNAT supports libraries" >&5
27405 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27406         echo "$as_me:27406: result: $cf_gnat_libraries" >&5
27407 echo "${ECHO_T}$cf_gnat_libraries" >&6
27408 fi
27409
27410 USE_OLD_MAKERULES=""
27411 USE_GNAT_PROJECTS="#"
27412 USE_GNAT_MAKE_GPR="#"
27413 USE_GNAT_GPRBUILD="#"
27414
27415 if test "$cf_gnat_projects" = yes
27416 then
27417         USE_OLD_MAKERULES="#"
27418         USE_GNAT_PROJECTS=""
27419         if test "$cf_cv_VERSION_GPRBUILD" != no
27420         then
27421                 USE_GNAT_GPRBUILD=""
27422         elif test "$cf_cv_VERSION_GNATMAKE" != no
27423         then
27424                 USE_GNAT_MAKE_GPR=""
27425         else
27426                 { echo "$as_me:27426: WARNING: use old makefile rules since tools are missing" >&5
27427 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27428         fi
27429 fi
27430
27431 if test "$cf_gnat_libraries" = yes
27432 then
27433         USE_GNAT_LIBRARIES=""
27434 else
27435         USE_GNAT_LIBRARIES="#"
27436 fi
27437
27438 echo "$as_me:27438: checking for ada-compiler" >&5
27439 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27440
27441 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27442 if test "${with_ada_compiler+set}" = set; then
27443   withval="$with_ada_compiler"
27444   cf_ada_compiler=$withval
27445 else
27446   cf_ada_compiler=gnatmake
27447 fi;
27448
27449 echo "$as_me:27449: result: $cf_ada_compiler" >&5
27450 echo "${ECHO_T}$cf_ada_compiler" >&6
27451
27452                         cf_ada_package=terminal_interface
27453
27454 echo "$as_me:27454: checking for ada-include" >&5
27455 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27456
27457 # Check whether --with-ada-include or --without-ada-include was given.
27458 if test "${with_ada_include+set}" = set; then
27459   withval="$with_ada_include"
27460
27461 else
27462   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27463 fi; if test -n "$prefix/share/ada/adainclude" ; then
27464
27465 if test "x$prefix" != xNONE; then
27466         cf_path_syntax="$prefix"
27467 else
27468         cf_path_syntax="$ac_default_prefix"
27469 fi
27470
27471 case ".$withval" in
27472 (.\$\(*\)*|.\'*\'*)
27473         ;;
27474 (..|./*|.\\*)
27475         ;;
27476 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27477         ;;
27478 (.\$\{*prefix\}*|.\$\{*dir\}*)
27479         eval withval="$withval"
27480         case ".$withval" in
27481         (.NONE/*)
27482                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27483                 ;;
27484         esac
27485         ;;
27486 (.no|.NONE/*)
27487         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27488         ;;
27489 (*)
27490         { { echo "$as_me:27490: error: expected a pathname, not \"$withval\"" >&5
27491 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27492    { (exit 1); exit 1; }; }
27493         ;;
27494 esac
27495
27496 fi
27497 eval ADA_INCLUDE="$withval"
27498
27499 echo "$as_me:27499: result: $ADA_INCLUDE" >&5
27500 echo "${ECHO_T}$ADA_INCLUDE" >&6
27501
27502 echo "$as_me:27502: checking for ada-objects" >&5
27503 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27504
27505 # Check whether --with-ada-objects or --without-ada-objects was given.
27506 if test "${with_ada_objects+set}" = set; then
27507   withval="$with_ada_objects"
27508
27509 else
27510   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27511 fi; if test -n "$prefix/lib/ada/adalib" ; then
27512
27513 if test "x$prefix" != xNONE; then
27514         cf_path_syntax="$prefix"
27515 else
27516         cf_path_syntax="$ac_default_prefix"
27517 fi
27518
27519 case ".$withval" in
27520 (.\$\(*\)*|.\'*\'*)
27521         ;;
27522 (..|./*|.\\*)
27523         ;;
27524 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27525         ;;
27526 (.\$\{*prefix\}*|.\$\{*dir\}*)
27527         eval withval="$withval"
27528         case ".$withval" in
27529         (.NONE/*)
27530                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27531                 ;;
27532         esac
27533         ;;
27534 (.no|.NONE/*)
27535         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27536         ;;
27537 (*)
27538         { { echo "$as_me:27538: error: expected a pathname, not \"$withval\"" >&5
27539 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27540    { (exit 1); exit 1; }; }
27541         ;;
27542 esac
27543
27544 fi
27545 eval ADA_OBJECTS="$withval"
27546
27547 echo "$as_me:27547: result: $ADA_OBJECTS" >&5
27548 echo "${ECHO_T}$ADA_OBJECTS" >&6
27549
27550 echo "$as_me:27550: checking if an Ada95 shared-library should be built" >&5
27551 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27552
27553 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27554 if test "${with_ada_sharedlib+set}" = set; then
27555   withval="$with_ada_sharedlib"
27556   with_ada_sharedlib=$withval
27557 else
27558   with_ada_sharedlib=no
27559 fi;
27560 echo "$as_me:27560: result: $with_ada_sharedlib" >&5
27561 echo "${ECHO_T}$with_ada_sharedlib" >&6
27562
27563 if test "x$with_ada_sharedlib" != xno
27564 then
27565         if test "x$cf_gnat_projects" != xyes
27566         then
27567                 { echo "$as_me:27567: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27568 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27569                 with_ada_sharedlib=no
27570         fi
27571 fi
27572
27573 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27574 MAKE_ADA_SHAREDLIB="#"
27575
27576 if test "x$with_ada_sharedlib" != xno
27577 then
27578         MAKE_ADA_SHAREDLIB=
27579         if test "x$with_ada_sharedlib" != xyes
27580         then
27581                 ADA_SHAREDLIB="$with_ada_sharedlib"
27582         fi
27583 fi
27584
27585                         # allow the Ada binding to be renamed
27586
27587 echo "$as_me:27587: checking for ada-libname" >&5
27588 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27589
27590 # Check whether --with-ada-libname or --without-ada-libname was given.
27591 if test "${with_ada_libname+set}" = set; then
27592   withval="$with_ada_libname"
27593   ADA_LIBNAME=$withval
27594 else
27595   ADA_LIBNAME=AdaCurses
27596 fi;
27597 case "x$ADA_LIBNAME" in
27598 (x|xyes|xno)
27599         ADA_LIBNAME=AdaCurses
27600         ;;
27601 esac
27602
27603 echo "$as_me:27603: result: $ADA_LIBNAME" >&5
27604 echo "${ECHO_T}$ADA_LIBNAME" >&6
27605
27606                 fi
27607         fi
27608 else
27609         cf_with_ada=no
27610 fi
27611
27612 # do this "late" to avoid conflict with header-checks
27613 if test "x$with_widec" = xyes ; then
27614         echo "$as_me:27614: checking for wchar_t" >&5
27615 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27616 if test "${ac_cv_type_wchar_t+set}" = set; then
27617   echo $ECHO_N "(cached) $ECHO_C" >&6
27618 else
27619   cat >"conftest.$ac_ext" <<_ACEOF
27620 #line 27620 "configure"
27621 #include "confdefs.h"
27622 $ac_includes_default
27623 int
27624 main (void)
27625 {
27626 if ((wchar_t *) 0)
27627   return 0;
27628 if (sizeof (wchar_t))
27629   return 0;
27630   ;
27631   return 0;
27632 }
27633 _ACEOF
27634 rm -f "conftest.$ac_objext"
27635 if { (eval echo "$as_me:27635: \"$ac_compile\"") >&5
27636   (eval $ac_compile) 2>&5
27637   ac_status=$?
27638   echo "$as_me:27638: \$? = $ac_status" >&5
27639   (exit "$ac_status"); } &&
27640          { ac_try='test -s "conftest.$ac_objext"'
27641   { (eval echo "$as_me:27641: \"$ac_try\"") >&5
27642   (eval $ac_try) 2>&5
27643   ac_status=$?
27644   echo "$as_me:27644: \$? = $ac_status" >&5
27645   (exit "$ac_status"); }; }; then
27646   ac_cv_type_wchar_t=yes
27647 else
27648   echo "$as_me: failed program was:" >&5
27649 cat "conftest.$ac_ext" >&5
27650 ac_cv_type_wchar_t=no
27651 fi
27652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27653 fi
27654 echo "$as_me:27654: result: $ac_cv_type_wchar_t" >&5
27655 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27656
27657 echo "$as_me:27657: checking size of wchar_t" >&5
27658 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27659 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27660   echo $ECHO_N "(cached) $ECHO_C" >&6
27661 else
27662   if test "$ac_cv_type_wchar_t" = yes; then
27663   if test "$cross_compiling" = yes; then
27664   # Depending upon the size, compute the lo and hi bounds.
27665 cat >"conftest.$ac_ext" <<_ACEOF
27666 #line 27666 "configure"
27667 #include "confdefs.h"
27668 $ac_includes_default
27669 int
27670 main (void)
27671 {
27672 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27673   ;
27674   return 0;
27675 }
27676 _ACEOF
27677 rm -f "conftest.$ac_objext"
27678 if { (eval echo "$as_me:27678: \"$ac_compile\"") >&5
27679   (eval $ac_compile) 2>&5
27680   ac_status=$?
27681   echo "$as_me:27681: \$? = $ac_status" >&5
27682   (exit "$ac_status"); } &&
27683          { ac_try='test -s "conftest.$ac_objext"'
27684   { (eval echo "$as_me:27684: \"$ac_try\"") >&5
27685   (eval $ac_try) 2>&5
27686   ac_status=$?
27687   echo "$as_me:27687: \$? = $ac_status" >&5
27688   (exit "$ac_status"); }; }; then
27689   ac_lo=0 ac_mid=0
27690   while :; do
27691     cat >"conftest.$ac_ext" <<_ACEOF
27692 #line 27692 "configure"
27693 #include "confdefs.h"
27694 $ac_includes_default
27695 int
27696 main (void)
27697 {
27698 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27699   ;
27700   return 0;
27701 }
27702 _ACEOF
27703 rm -f "conftest.$ac_objext"
27704 if { (eval echo "$as_me:27704: \"$ac_compile\"") >&5
27705   (eval $ac_compile) 2>&5
27706   ac_status=$?
27707   echo "$as_me:27707: \$? = $ac_status" >&5
27708   (exit "$ac_status"); } &&
27709          { ac_try='test -s "conftest.$ac_objext"'
27710   { (eval echo "$as_me:27710: \"$ac_try\"") >&5
27711   (eval $ac_try) 2>&5
27712   ac_status=$?
27713   echo "$as_me:27713: \$? = $ac_status" >&5
27714   (exit "$ac_status"); }; }; then
27715   ac_hi=$ac_mid; break
27716 else
27717   echo "$as_me: failed program was:" >&5
27718 cat "conftest.$ac_ext" >&5
27719 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27720 fi
27721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27722   done
27723 else
27724   echo "$as_me: failed program was:" >&5
27725 cat "conftest.$ac_ext" >&5
27726 ac_hi=-1 ac_mid=-1
27727   while :; do
27728     cat >"conftest.$ac_ext" <<_ACEOF
27729 #line 27729 "configure"
27730 #include "confdefs.h"
27731 $ac_includes_default
27732 int
27733 main (void)
27734 {
27735 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27736   ;
27737   return 0;
27738 }
27739 _ACEOF
27740 rm -f "conftest.$ac_objext"
27741 if { (eval echo "$as_me:27741: \"$ac_compile\"") >&5
27742   (eval $ac_compile) 2>&5
27743   ac_status=$?
27744   echo "$as_me:27744: \$? = $ac_status" >&5
27745   (exit "$ac_status"); } &&
27746          { ac_try='test -s "conftest.$ac_objext"'
27747   { (eval echo "$as_me:27747: \"$ac_try\"") >&5
27748   (eval $ac_try) 2>&5
27749   ac_status=$?
27750   echo "$as_me:27750: \$? = $ac_status" >&5
27751   (exit "$ac_status"); }; }; then
27752   ac_lo=$ac_mid; break
27753 else
27754   echo "$as_me: failed program was:" >&5
27755 cat "conftest.$ac_ext" >&5
27756 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27757 fi
27758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27759   done
27760 fi
27761 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27762 # Binary search between lo and hi bounds.
27763 while test "x$ac_lo" != "x$ac_hi"; do
27764   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27765   cat >"conftest.$ac_ext" <<_ACEOF
27766 #line 27766 "configure"
27767 #include "confdefs.h"
27768 $ac_includes_default
27769 int
27770 main (void)
27771 {
27772 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27773   ;
27774   return 0;
27775 }
27776 _ACEOF
27777 rm -f "conftest.$ac_objext"
27778 if { (eval echo "$as_me:27778: \"$ac_compile\"") >&5
27779   (eval $ac_compile) 2>&5
27780   ac_status=$?
27781   echo "$as_me:27781: \$? = $ac_status" >&5
27782   (exit "$ac_status"); } &&
27783          { ac_try='test -s "conftest.$ac_objext"'
27784   { (eval echo "$as_me:27784: \"$ac_try\"") >&5
27785   (eval $ac_try) 2>&5
27786   ac_status=$?
27787   echo "$as_me:27787: \$? = $ac_status" >&5
27788   (exit "$ac_status"); }; }; then
27789   ac_hi=$ac_mid
27790 else
27791   echo "$as_me: failed program was:" >&5
27792 cat "conftest.$ac_ext" >&5
27793 ac_lo=`expr "$ac_mid" + 1`
27794 fi
27795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27796 done
27797 ac_cv_sizeof_wchar_t=$ac_lo
27798 else
27799   if test "$cross_compiling" = yes; then
27800   { { echo "$as_me:27800: error: cannot run test program while cross compiling" >&5
27801 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27802    { (exit 1); exit 1; }; }
27803 else
27804   cat >"conftest.$ac_ext" <<_ACEOF
27805 #line 27805 "configure"
27806 #include "confdefs.h"
27807 $ac_includes_default
27808 int
27809 main (void)
27810 {
27811 FILE *f = fopen ("conftest.val", "w");
27812 if (!f)
27813   $ac_main_return (1);
27814 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27815 fclose (f);
27816   ;
27817   return 0;
27818 }
27819 _ACEOF
27820 rm -f "conftest$ac_exeext"
27821 if { (eval echo "$as_me:27821: \"$ac_link\"") >&5
27822   (eval $ac_link) 2>&5
27823   ac_status=$?
27824   echo "$as_me:27824: \$? = $ac_status" >&5
27825   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27826   { (eval echo "$as_me:27826: \"$ac_try\"") >&5
27827   (eval $ac_try) 2>&5
27828   ac_status=$?
27829   echo "$as_me:27829: \$? = $ac_status" >&5
27830   (exit "$ac_status"); }; }; then
27831   ac_cv_sizeof_wchar_t=`cat conftest.val`
27832 else
27833   echo "$as_me: program exited with status $ac_status" >&5
27834 echo "$as_me: failed program was:" >&5
27835 cat "conftest.$ac_ext" >&5
27836 fi
27837 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27838 fi
27839 fi
27840 rm -f conftest.val
27841 else
27842   ac_cv_sizeof_wchar_t=0
27843 fi
27844 fi
27845 echo "$as_me:27845: result: $ac_cv_sizeof_wchar_t" >&5
27846 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27847 cat >>confdefs.h <<EOF
27848 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27849 EOF
27850
27851         # cross-compiling to mingw can run into the problem that attempting to
27852         # link with the regex library fails, causing the test to not set this to
27853         # a number.  "recent" autoconf does not address this problem either -TD
27854         if test -z "$ac_cv_sizeof_wchar_t"
27855         then
27856                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27857
27858 echo "${as_me:-configure}:27858: testing test failed (assume 2) ..." 1>&5
27859
27860                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27861                 mv confdefs.tmp confdefs.h
27862                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27863         fi
27864 fi
27865
27866 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27867 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27868 ###
27869 ### ticlib modules may be a separate library, otherwise contained in termlib.
27870 ### termlib modules may be a separate library, otherwise contained in ncurses.
27871 ###
27872 ### The of "+" or " " between the tokens controls the way the script
27873 ### chooses to split module lists into libraries.
27874 ###
27875 ### (see CF_LIB_RULES).
27876 echo "$as_me:27876: checking for library subsets" >&5
27877 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27878 LIB_SUBSETS=
27879
27880 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27881         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27882         if test "$with_ticlib" != no ; then
27883                 LIB_SUBSETS="${LIB_SUBSETS} "
27884         else
27885                 LIB_SUBSETS="${LIB_SUBSETS}+"
27886         fi
27887 fi
27888
27889 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27890 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27891
27892 if test "$with_termlib" != no ; then
27893         LIB_SUBSETS="${LIB_SUBSETS} "
27894 else
27895         LIB_SUBSETS="${LIB_SUBSETS}+"
27896 fi
27897
27898 LIB_SUBSETS="${LIB_SUBSETS}base"
27899
27900 # Most term-driver calls are to tinfo, but some like init_pair are to the
27901 # base library (so it resides in base).
27902 if test "$with_term_driver" != no ; then
27903         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27904         case "$cf_cv_system_name" in
27905         (*mingw32*|*mingw64*)
27906                 if test "x$with_exp_win32" = xyes ; then
27907                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27908                 else
27909                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27910                 fi
27911                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27912                 ;;
27913         (*)
27914                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27915                 ;;
27916         esac
27917 elif test "x$with_exp_win32" = xyes ; then
27918         case "$cf_cv_system_name" in
27919         (*mingw32*|*mingw64*)
27920                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27921                 ;;
27922         (*)
27923                 ;;
27924         esac
27925 fi
27926
27927 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27928 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27929
27930 echo "$as_me:27930: result: $LIB_SUBSETS" >&5
27931 echo "${ECHO_T}$LIB_SUBSETS" >&6
27932
27933 ### Construct the list of include-directories to be generated
27934
27935 if test "$srcdir" != "."; then
27936         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27937 fi
27938 CPPFLAGS="-I../include $CPPFLAGS"
27939 if test "$srcdir" != "."; then
27940         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27941 fi
27942 CPPFLAGS="-I. $CPPFLAGS"
27943
27944 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27945 if test "$srcdir" != "."; then
27946         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27947 fi
27948 if test "$GCC" != yes; then
27949         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27950 elif test "$includedir" != "/usr/include"; then
27951         if test "$includedir" = '${prefix}/include' ; then
27952                 if test x$prefix != x/usr ; then
27953                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27954                 fi
27955         else
27956                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27957         fi
27958 fi
27959
27960 ### Build up pieces for makefile rules
27961 echo "$as_me:27961: checking default library suffix" >&5
27962 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27963
27964         case $DFT_LWR_MODEL in
27965         (libtool) DFT_ARG_SUFFIX=''   ;;
27966         (normal)  DFT_ARG_SUFFIX=''   ;;
27967         (debug)   DFT_ARG_SUFFIX='_g' ;;
27968         (profile) DFT_ARG_SUFFIX='_p' ;;
27969         (shared)  DFT_ARG_SUFFIX=''   ;;
27970         esac
27971         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27972 echo "$as_me:27972: result: $DFT_ARG_SUFFIX" >&5
27973 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27974
27975 echo "$as_me:27975: checking default library-dependency suffix" >&5
27976 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27977
27978         case X$DFT_LWR_MODEL in
27979         (Xlibtool)
27980                 DFT_LIB_SUFFIX='.la'
27981                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27982                 ;;
27983         (Xdebug)
27984                 case "$cf_cv_system_name" in
27985                 (*-msvc*)
27986                         DFT_LIB_SUFFIX='_g.lib'
27987                         ;;
27988                 (*)
27989                         DFT_LIB_SUFFIX='_g.a'
27990                         ;;
27991                 esac
27992                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27993                 ;;
27994         (Xprofile)
27995                 case "$cf_cv_system_name" in
27996                 (*-msvc*)
27997                         DFT_LIB_SUFFIX='_p.lib'
27998                         ;;
27999                 (*)
28000                         DFT_LIB_SUFFIX='_p.a'
28001                         ;;
28002                 esac
28003                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28004                 ;;
28005         (Xshared)
28006                 case "$cf_cv_system_name" in
28007                 (aix[5-7]*)
28008                         DFT_LIB_SUFFIX='.so'
28009                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28010                         ;;
28011                 (*-msvc*)
28012                         DFT_LIB_SUFFIX='.dll'
28013                         DFT_DEP_SUFFIX='.dll.lib'
28014                         ;;
28015                 (cygwin*|msys*|mingw*)
28016                         DFT_LIB_SUFFIX='.dll'
28017                         DFT_DEP_SUFFIX='.dll.a'
28018                         ;;
28019                 (darwin*)
28020                         DFT_LIB_SUFFIX='.dylib'
28021                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28022                         ;;
28023                 (hpux*)
28024                         case "$target" in
28025                         (ia64*)
28026                                 DFT_LIB_SUFFIX='.so'
28027                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28028                                 ;;
28029                         (*)
28030                                 DFT_LIB_SUFFIX='.sl'
28031                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28032                                 ;;
28033                         esac
28034                         ;;
28035                 (*)
28036                         DFT_LIB_SUFFIX='.so'
28037                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28038                         ;;
28039                 esac
28040                 ;;
28041         (*)
28042                 case "$target" in
28043                 (*-msvc*)
28044                         DFT_LIB_SUFFIX='.lib'
28045                         ;;
28046                 (*)
28047                         DFT_LIB_SUFFIX='.a'
28048                         ;;
28049                 esac
28050                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28051                 ;;
28052         esac
28053         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28054         then
28055                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28056                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28057         fi
28058 echo "$as_me:28058: result: $DFT_DEP_SUFFIX" >&5
28059 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28060
28061 echo "$as_me:28061: checking default object directory" >&5
28062 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28063
28064         case $DFT_LWR_MODEL in
28065         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28066         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28067         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28068         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28069         (shared)
28070                 case "$cf_cv_system_name" in
28071                 (cygwin|msys)
28072                         DFT_OBJ_SUBDIR='objects' ;;
28073                 (*)
28074                         DFT_OBJ_SUBDIR='obj_s' ;;
28075                 esac
28076         esac
28077 echo "$as_me:28077: result: $DFT_OBJ_SUBDIR" >&5
28078 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28079
28080 if test "x$cf_with_cxx" = xyes ; then
28081 echo "$as_me:28081: checking c++ library-dependency suffix" >&5
28082 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28083 if test "$with_libtool" != "no"; then
28084         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28085         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28086 elif test "$with_shared_cxx" != "no"; then
28087         # also for g++ users...
28088         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28089 else
28090         # we normally make a static library because C/C++ library rules differ
28091
28092         case Xnormal in
28093         (Xlibtool)
28094                 CXX_LIB_SUFFIX='.la'
28095                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28096                 ;;
28097         (Xdebug)
28098                 case "$cf_cv_system_name" in
28099                 (*-msvc*)
28100                         CXX_LIB_SUFFIX='_g.lib'
28101                         ;;
28102                 (*)
28103                         CXX_LIB_SUFFIX='_g.a'
28104                         ;;
28105                 esac
28106                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28107                 ;;
28108         (Xprofile)
28109                 case "$cf_cv_system_name" in
28110                 (*-msvc*)
28111                         CXX_LIB_SUFFIX='_p.lib'
28112                         ;;
28113                 (*)
28114                         CXX_LIB_SUFFIX='_p.a'
28115                         ;;
28116                 esac
28117                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28118                 ;;
28119         (Xshared)
28120                 case "$cf_cv_system_name" in
28121                 (aix[5-7]*)
28122                         CXX_LIB_SUFFIX='.so'
28123                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28124                         ;;
28125                 (*-msvc*)
28126                         CXX_LIB_SUFFIX='.dll'
28127                         CXX_DEP_SUFFIX='.dll.lib'
28128                         ;;
28129                 (cygwin*|msys*|mingw*)
28130                         CXX_LIB_SUFFIX='.dll'
28131                         CXX_DEP_SUFFIX='.dll.a'
28132                         ;;
28133                 (darwin*)
28134                         CXX_LIB_SUFFIX='.dylib'
28135                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28136                         ;;
28137                 (hpux*)
28138                         case "$target" in
28139                         (ia64*)
28140                                 CXX_LIB_SUFFIX='.so'
28141                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28142                                 ;;
28143                         (*)
28144                                 CXX_LIB_SUFFIX='.sl'
28145                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28146                                 ;;
28147                         esac
28148                         ;;
28149                 (*)
28150                         CXX_LIB_SUFFIX='.so'
28151                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28152                         ;;
28153                 esac
28154                 ;;
28155         (*)
28156                 case "$target" in
28157                 (*-msvc*)
28158                         CXX_LIB_SUFFIX='.lib'
28159                         ;;
28160                 (*)
28161                         CXX_LIB_SUFFIX='.a'
28162                         ;;
28163                 esac
28164                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28165                 ;;
28166         esac
28167         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28168         then
28169                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28170                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28171         fi
28172
28173 fi
28174 echo "$as_me:28174: result: $CXX_LIB_SUFFIX" >&5
28175 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28176
28177 fi
28178
28179 # do not want -ldl in build except as needed for -lncurses dependency
28180 if test "x$with_dlsym" = xyes ; then
28181 if test "$DFT_LWR_MODEL" = shared || \
28182    test "$DFT_LWR_MODEL" = libtool ; then
28183
28184 # remove dl library from $LIBS
28185 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28186
28187 fi
28188 fi
28189 ### Set up low-level terminfo dependencies for makefiles.
28190
28191 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28192 # do not need libdl
28193 TICS_LIST=
28194 if test "x$with_dlsym" = xyes ; then
28195
28196 # remove dl library from $SHLIB_LIST
28197 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28198
28199 fi
28200
28201 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28202 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28203 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28204 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28205 then
28206         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28207 fi
28208
28209 if test "$with_ticlib" != no ; then
28210
28211         if test "x$with_ticlib" != xyes ; then
28212                 TICS_NAME=$with_ticlib
28213                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28214                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28215                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28216                 TICS_LIB_SUFFIX="${with_ticlib}"
28217         else
28218                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28219                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28220                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28221                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28222         fi
28223         TICS_LDFLAGS="-L${LIB_DIR}"
28224         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28225 else
28226         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28227         TICS_LDFLAGS="-L${LIB_DIR}"
28228         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28229 fi
28230
28231 if test "$with_termlib" != no ; then
28232
28233         if test "x$with_termlib" != xyes ; then
28234                 TINFO_NAME=$with_termlib
28235                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28236                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28237                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28238                 TINFO_LIB_SUFFIX="${with_termlib}"
28239         else
28240                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28241                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28242                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28243                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28244         fi
28245
28246         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28247         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28248         if test "$DFT_LWR_MODEL" = "libtool"; then
28249                 TEST_ARGS="${TEST_DEPS}"
28250                 TEST_ARG2="${TEST_DEP2}"
28251                 TINFO_LDFLAGS="-L${LIB_DIR}"
28252                 TINFO_LIBS="$TEST_ARGS"
28253                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28254                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28255         else
28256                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28257                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28258                 if test "x$with_term_driver" != xno ; then
28259                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28260                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28261                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28262                 else
28263                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28264                         TINFO_LIBS="$TEST_ARGS"
28265                 fi
28266                 TINFO_LDFLAGS="-L${LIB_DIR}"
28267                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28268         fi
28269 else
28270         # the next lines are needed for linking libtic over libncurses
28271         TINFO_NAME=${LIB_NAME}
28272         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28273         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28274         if test "x$with_tic_depends" = xyes ; then
28275                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28276         else
28277                 TICS_LIST="$SHLIB_LIST"
28278         fi
28279
28280         TINFO_LDFLAGS="-L${LIB_DIR}"
28281         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28282 fi
28283
28284 if test "$DFT_LWR_MODEL" = shared ; then
28285         case "$cf_cv_system_name" in
28286         (cygwin*|msys*)
28287                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28288                 TINFO_SUFFIX=.dll
28289                 ;;
28290         esac
28291 fi
28292
28293 if test "x$with_dlsym" = xyes ; then
28294
28295 # remove dl library from $TICS_LIST
28296 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28297
28298 fi
28299
28300 if test "$DFT_LWR_MODEL" = "libtool"; then
28301         OBJEXT=lo
28302 fi
28303
28304 # needed for Ada95
28305 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28306
28307 case "$DFT_LWR_MODEL" in
28308 (normal|debug|profile)
28309
28310 if test "$GCC" = yes ; then
28311         case "$cf_cv_system_name" in
28312         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28313                 LDFLAGS_STATIC=
28314                 LDFLAGS_SHARED=
28315                 ;;
28316         (*)     # normally, except when broken
28317                 LDFLAGS_STATIC=-static
28318                 LDFLAGS_SHARED=-dynamic
28319                 ;;
28320         esac
28321 else
28322         case "$cf_cv_system_name" in
28323         (aix[4-7]*)     # from ld manpage
28324                 LDFLAGS_STATIC=-bstatic
28325                 LDFLAGS_SHARED=-bdynamic
28326                 ;;
28327         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28328                 # We could also use just "archive" and "shared".
28329                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28330                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28331                 ;;
28332         (irix*)         # from ld manpage IRIX64
28333                 LDFLAGS_STATIC=-Bstatic
28334                 LDFLAGS_SHARED=-Bdynamic
28335                 ;;
28336         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28337                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28338                 LDFLAGS_STATIC=-noso
28339                 LDFLAGS_SHARED=-so_archive
28340                 ;;
28341         (solaris2*)
28342                 LDFLAGS_STATIC=-Bstatic
28343                 LDFLAGS_SHARED=-Bdynamic
28344                 ;;
28345         esac
28346 fi
28347
28348 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28349 then
28350         echo "$as_me:28350: checking if linker supports switching between static/dynamic" >&5
28351 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28352
28353         rm -f libconftest.a
28354         cat >conftest.$ac_ext <<EOF
28355 #line 28355 "configure"
28356 #include <stdio.h>
28357 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28358 EOF
28359         if { (eval echo "$as_me:28359: \"$ac_compile\"") >&5
28360   (eval $ac_compile) 2>&5
28361   ac_status=$?
28362   echo "$as_me:28362: \$? = $ac_status" >&5
28363   (exit "$ac_status"); } ; then
28364                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28365                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28366         fi
28367         rm -f conftest.*
28368
28369         cf_save_LIBS="$LIBS"
28370
28371         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28372         cat >"conftest.$ac_ext" <<_ACEOF
28373 #line 28373 "configure"
28374 #include "confdefs.h"
28375
28376 #line 28376 "configure"
28377 #include <stdio.h>
28378 int cf_ldflags_static(FILE *fp);
28379
28380 int
28381 main (void)
28382 {
28383
28384         return cf_ldflags_static(stdin);
28385
28386   ;
28387   return 0;
28388 }
28389 _ACEOF
28390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28391 if { (eval echo "$as_me:28391: \"$ac_link\"") >&5
28392   (eval $ac_link) 2>&5
28393   ac_status=$?
28394   echo "$as_me:28394: \$? = $ac_status" >&5
28395   (exit "$ac_status"); } &&
28396          { ac_try='test -s "conftest$ac_exeext"'
28397   { (eval echo "$as_me:28397: \"$ac_try\"") >&5
28398   (eval $ac_try) 2>&5
28399   ac_status=$?
28400   echo "$as_me:28400: \$? = $ac_status" >&5
28401   (exit "$ac_status"); }; }; then
28402
28403         # some linkers simply ignore the -dynamic
28404         case x`file "conftest$ac_exeext" 2>/dev/null` in
28405         (*static*)
28406                 cf_ldflags_static=no
28407                 ;;
28408         (*)
28409                 cf_ldflags_static=yes
28410                 ;;
28411         esac
28412
28413 else
28414   echo "$as_me: failed program was:" >&5
28415 cat "conftest.$ac_ext" >&5
28416 cf_ldflags_static=no
28417 fi
28418 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28419
28420         rm -f libconftest.*
28421         LIBS="$cf_save_LIBS"
28422
28423         echo "$as_me:28423: result: $cf_ldflags_static" >&5
28424 echo "${ECHO_T}$cf_ldflags_static" >&6
28425
28426         if test "$cf_ldflags_static" != yes
28427         then
28428                 LDFLAGS_STATIC=
28429                 LDFLAGS_SHARED=
28430         fi
28431 else
28432         LDFLAGS_STATIC=
28433         LDFLAGS_SHARED=
28434 fi
28435
28436         ;;
28437 esac
28438
28439 echo "$as_me:28439: checking where we will install curses.h" >&5
28440 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28441
28442 includesubdir=
28443 if test "$with_overwrite" = no && \
28444  { test "x$includedir" = 'x${prefix}/include' || \
28445    test "x$includedir" = "x${prefix}/include"; }
28446 then
28447         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28448 fi
28449 echo "$as_me:28449: result: ${includedir}${includesubdir}" >&5
28450 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28451
28452 ### Resolve a conflict between normal and wide-curses by forcing applications
28453 ### that will need libutf8 to add it to their configure script.
28454 if test "$with_overwrite" != no ; then
28455 if test "$NCURSES_LIBUTF8" = 1 ; then
28456         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28457         { echo "$as_me:28457: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28458 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28459 fi
28460 fi
28461 WITH_OVERWRITE=$with_overwrite
28462
28463 ### At least on MinGW a shared library build without libtool
28464 ### requires adding the additional libs to the link list.
28465 case "$cf_cv_system_name" in
28466 (*mingw32*|*mingw64*)
28467         if test "$DFT_LWR_MODEL" != "libtool"; then
28468            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28469         fi
28470         ;;
28471 *)      ;;
28472 esac
28473
28474 # used to separate tack out of the tree
28475 NCURSES_TREE=
28476
28477 ### predefined stuff for the test programs
28478
28479 cat >>confdefs.h <<\EOF
28480 #define HAVE_SLK_COLOR 1
28481 EOF
28482
28483 # pkgsrc uses these
28484
28485 echo "$as_me:28485: checking for desired basename for form library" >&5
28486 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28487
28488 # Check whether --with-form-libname or --without-form-libname was given.
28489 if test "${with_form_libname+set}" = set; then
28490   withval="$with_form_libname"
28491   with_lib_basename=$withval
28492 else
28493   with_lib_basename=form
28494 fi;
28495 FORM_NAME="$with_lib_basename"
28496
28497 case "x$FORM_NAME" in
28498 (x|xno|xnone|xyes)
28499         FORM_NAME=form
28500         ;;
28501 (*)
28502         ;;
28503 esac
28504
28505 echo "$as_me:28505: result: $FORM_NAME" >&5
28506 echo "${ECHO_T}$FORM_NAME" >&6
28507
28508 echo "$as_me:28508: checking for desired basename for menu library" >&5
28509 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28510
28511 # Check whether --with-menu-libname or --without-menu-libname was given.
28512 if test "${with_menu_libname+set}" = set; then
28513   withval="$with_menu_libname"
28514   with_lib_basename=$withval
28515 else
28516   with_lib_basename=menu
28517 fi;
28518 MENU_NAME="$with_lib_basename"
28519
28520 case "x$MENU_NAME" in
28521 (x|xno|xnone|xyes)
28522         MENU_NAME=menu
28523         ;;
28524 (*)
28525         ;;
28526 esac
28527
28528 echo "$as_me:28528: result: $MENU_NAME" >&5
28529 echo "${ECHO_T}$MENU_NAME" >&6
28530
28531 echo "$as_me:28531: checking for desired basename for panel library" >&5
28532 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28533
28534 # Check whether --with-panel-libname or --without-panel-libname was given.
28535 if test "${with_panel_libname+set}" = set; then
28536   withval="$with_panel_libname"
28537   with_lib_basename=$withval
28538 else
28539   with_lib_basename=panel
28540 fi;
28541 PANEL_NAME="$with_lib_basename"
28542
28543 case "x$PANEL_NAME" in
28544 (x|xno|xnone|xyes)
28545         PANEL_NAME=panel
28546         ;;
28547 (*)
28548         ;;
28549 esac
28550
28551 echo "$as_me:28551: result: $PANEL_NAME" >&5
28552 echo "${ECHO_T}$PANEL_NAME" >&6
28553
28554 echo "$as_me:28554: checking for desired basename for cxx library" >&5
28555 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28556
28557 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28558 if test "${with_cxx_libname+set}" = set; then
28559   withval="$with_cxx_libname"
28560   with_lib_basename=$withval
28561 else
28562   with_lib_basename=ncurses++
28563 fi;
28564 CXX_NAME="$with_lib_basename"
28565
28566 case "x$CXX_NAME" in
28567 (x|xno|xnone|xyes)
28568         CXX_NAME=ncurses++
28569         ;;
28570 (*)
28571         ;;
28572 esac
28573
28574 echo "$as_me:28574: result: $CXX_NAME" >&5
28575 echo "${ECHO_T}$CXX_NAME" >&6
28576
28577 ### Construct the list of subdirectories for which we'll customize makefiles
28578 ### with the appropriate compile-rules.
28579
28580 echo "$as_me:28580: checking for src modules" >&5
28581 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28582
28583 # dependencies and linker-arguments for test-programs
28584 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28585 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28586 if test "$DFT_LWR_MODEL" = "libtool"; then
28587         TEST_ARGS="${TEST_DEPS}"
28588         TEST_ARG2="${TEST_DEP2}"
28589 else
28590         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28591         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28592 fi
28593
28594 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28595 cf_cv_src_modules=
28596 for cf_dir in $modules_to_build
28597 do
28598         if test -f "$srcdir/$cf_dir/modules" ; then
28599
28600                 # We may/may not have tack in the distribution, though the
28601                 # makefile is.
28602                 if test "$cf_dir" = tack ; then
28603                         if test "x$cf_with_tack" != "xyes"; then
28604                                 continue
28605                         fi
28606                 fi
28607
28608                 if test -z "$cf_cv_src_modules"; then
28609                         cf_cv_src_modules=$cf_dir
28610                 else
28611                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28612                 fi
28613
28614                 # Make the ncurses_cfg.h file record the library interface files as
28615                 # well.  These are header files that are the same name as their
28616                 # directory.  Ncurses is the only library that does not follow
28617                 # that pattern.
28618                 if test "$cf_dir" = tack ; then
28619                         continue
28620                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28621
28622 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28623
28624                         cat >>confdefs.h <<EOF
28625 #define HAVE_${cf_have_include}_H 1
28626 EOF
28627
28628                         cat >>confdefs.h <<EOF
28629 #define HAVE_LIB${cf_have_include} 1
28630 EOF
28631
28632 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28633
28634 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28635
28636                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28637                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28638                         if test "$DFT_LWR_MODEL" = "libtool"; then
28639                                 TEST_ARGS="${TEST_DEPS}"
28640                                 TEST_ARG2="${TEST_DEP2}"
28641                         else
28642                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28643                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28644                         fi
28645                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28646                 fi
28647         fi
28648 done
28649 echo "$as_me:28649: result: $cf_cv_src_modules" >&5
28650 echo "${ECHO_T}$cf_cv_src_modules" >&6
28651
28652 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28653 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28654
28655 SRC_SUBDIRS=
28656 if test "x$cf_with_manpages" != xno ; then
28657         SRC_SUBDIRS="$SRC_SUBDIRS man"
28658 fi
28659 SRC_SUBDIRS="$SRC_SUBDIRS include"
28660 for cf_dir in $cf_cv_src_modules
28661 do
28662         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28663 done
28664 if test "x$cf_with_tests" != "xno" ; then
28665         SRC_SUBDIRS="$SRC_SUBDIRS test"
28666 fi
28667 # always make this, to install the ncurses-config script
28668 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28669 if test "$cf_with_cxx_binding" != no; then
28670         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28671         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28672 fi
28673
28674 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28675 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28676
28677 ADA_SUBDIRS=
28678 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28679         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28680         ADA_SUBDIRS="gen src"
28681         if test "x$cf_with_tests" != "xno" ; then
28682                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28683         fi
28684 fi
28685
28686 SUB_MAKEFILES=
28687 for cf_dir in $SRC_SUBDIRS
28688 do
28689         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28690 done
28691
28692 if test -n "$ADA_SUBDIRS"; then
28693         for cf_dir in $ADA_SUBDIRS
28694         do
28695                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28696         done
28697
28698 fi
28699
28700 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28701    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28702    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28703    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28704 fi
28705
28706 DIRS_TO_MAKE="lib"
28707 for cf_item in $cf_list_models
28708 do
28709
28710         case $cf_item in
28711         (libtool) cf_subdir='obj_lo'  ;;
28712         (normal)  cf_subdir='objects' ;;
28713         (debug)   cf_subdir='obj_g' ;;
28714         (profile) cf_subdir='obj_p' ;;
28715         (shared)
28716                 case "$cf_cv_system_name" in
28717                 (cygwin|msys)
28718                         cf_subdir='objects' ;;
28719                 (*)
28720                         cf_subdir='obj_s' ;;
28721                 esac
28722         esac
28723
28724         for cf_item2 in $DIRS_TO_MAKE
28725         do
28726                 test "$cf_item2" = "$cf_subdir" && break
28727         done
28728         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28729 done
28730 for cf_dir in $DIRS_TO_MAKE
28731 do
28732         test ! -d "$cf_dir" && mkdir "$cf_dir"
28733 done
28734
28735 # symbols that differ when compiling Ada95 by itself.
28736 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28737
28738 # values to use as strings
28739
28740 cat >>confdefs.h <<EOF
28741 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28742 EOF
28743
28744 cat >>confdefs.h <<EOF
28745 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28746 EOF
28747
28748 ### Define substitutions for header files to avoid name-pollution
28749
28750 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28751         HAVE_TCGETATTR=1
28752 else
28753         HAVE_TCGETATTR=0
28754 fi
28755
28756 if test "x$ac_cv_header_stdint_h" = xyes ; then
28757         HAVE_STDINT_H=1
28758 else
28759         HAVE_STDINT_H=0
28760 fi
28761
28762 if test "x$ac_cv_header_termio_h" = xyes ; then
28763         HAVE_TERMIO_H=1
28764 else
28765         HAVE_TERMIO_H=0
28766 fi
28767
28768 if test "x$ac_cv_header_termios_h" = xyes ; then
28769         HAVE_TERMIOS_H=1
28770 else
28771         HAVE_TERMIOS_H=0
28772 fi
28773
28774 ################################################################################
28775 test "x$use_database" = xyes && \
28776 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28777
28778 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28779 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28780
28781 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28782 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28783 fi
28784
28785 if test "x$cf_with_tests" != xno ; then
28786         MAKE_TESTS=
28787 else
28788         MAKE_TESTS="#"
28789 fi
28790
28791 ADAHTML_DIR=../../doc/html/ada
28792
28793 # workaround for OS/2 (20151017)
28794 case "$cf_cv_system_name" in
28795 (os2*)
28796         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28797         ;;
28798 (*)
28799         LIBTOOL_OPTS_CXX=
28800         ;;
28801 esac
28802
28803 # workaround for g++ versus Solaris (20131116)
28804 case "$cf_cv_system_name" in
28805 (solaris2*)
28806         case "x$CPPFLAGS" in
28807         (*-D_XOPEN_SOURCE_EXTENDED*)
28808                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28809
28810 echo "${as_me:-configure}:28810: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28811
28812                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28813                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28814                 ;;
28815         esac
28816         ;;
28817 esac
28818
28819 # Help to automatically enable the extended curses features when using either
28820 # the *-config or the ".pc" files by adding defines.
28821 echo "$as_me:28821: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28822 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28823 PKG_CFLAGS=
28824 for cf_loop1 in $CPPFLAGS_after_XOPEN
28825 do
28826         cf_found=no
28827         for cf_loop2 in $CPPFLAGS_before_XOPEN
28828         do
28829                 if test "x$cf_loop1" = "x$cf_loop2"
28830                 then
28831                         cf_found=yes
28832                         break
28833                 fi
28834         done
28835         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28836 done
28837 echo "$as_me:28837: result: $PKG_CFLAGS" >&5
28838 echo "${ECHO_T}$PKG_CFLAGS" >&6
28839
28840 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28841 case "x$NCURSES_OSPEED" in
28842 (*short*)
28843         cf_compatible=1
28844         ;;
28845 (*)
28846         cf_compatible=0
28847         ;;
28848 esac
28849
28850 cat >>confdefs.h <<EOF
28851 #define NCURSES_OSPEED_COMPAT $cf_compatible
28852 EOF
28853
28854 case "x$cf_cv_typeof_chtype" in
28855 (xshort|xint|xlong)
28856         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28857         ;;
28858 esac
28859
28860 case "x$cf_cv_typeof_mmask_t" in
28861 (xshort|xint|xlong)
28862         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28863         ;;
28864 esac
28865
28866 # substitute into misc/Makefile to suppress
28867 # (un)install.data from the
28868 # (un)install rules.
28869 if test "x$cf_with_db_install" = "xno"; then
28870         MISC_INSTALL_DATA=
28871         MISC_UNINSTALL_DATA=
28872 else
28873         MISC_INSTALL_DATA=install.data
28874         MISC_UNINSTALL_DATA=uninstall.data
28875 fi
28876
28877 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28878         MAKE_DATABASE="#"
28879 else
28880         MAKE_DATABASE="$MAKE_TERMINFO"
28881 fi
28882
28883 if test -n "$PACKAGE"
28884 then
28885         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28886         export PACKAGE
28887         echo "package: $PACKAGE"
28888 fi
28889
28890 UNALTERED_SYMS=
28891 cf_filter_syms=no
28892
28893 if test -n "$RESULTING_SYMS"
28894 then
28895         cf_filter_syms=$cf_dft_filter_syms
28896         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28897
28898 echo "${as_me:-configure}:28898: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28899
28900 fi
28901
28902 if test "x$WILDCARD_SYMS" = xno
28903 then
28904         cf_filter_syms=yes
28905 fi
28906
28907 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28908
28909 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28910 if test "$cf_filter_syms" = yes
28911 then
28912         RESULTING_SYMS=resulting.map
28913 fi
28914
28915 if test "x$cross_compiling" = xyes ; then
28916         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28917         CHECK_BUILD="#"
28918 else
28919         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28920         CHECK_BUILD=
28921 fi
28922
28923 # This is used for the *-config script and *.pc data files.
28924
28925 echo "$as_me:28925: checking for linker search path" >&5
28926 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28927 if test "${cf_cv_ld_searchpath+set}" = set; then
28928   echo $ECHO_N "(cached) $ECHO_C" >&6
28929 else
28930
28931 if test "$cross_compiling" != yes ; then
28932
28933 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28934 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28935
28936 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28937 # update the cache, which makes it run faster.
28938 test -z "$cf_pathlist" && \
28939         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28940
28941 test -z "$cf_pathlist" &&
28942         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28943
28944 # This works with OpenBSD 6.5, which lists only filenames
28945 test -z "$cf_pathlist" &&
28946         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28947
28948 if test -z "$cf_pathlist"
28949 then
28950         # dyld default path with MacOS
28951         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28952         then
28953                 # do this to bypass check
28954                 cf_cv_ld_searchpath='$HOME/lib'
28955                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28956         fi
28957 fi
28958
28959 if test -z "$cf_pathlist"
28960 then
28961         # Solaris is "SunOS"
28962         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28963         then
28964                 case x`(isainfo -b)` in
28965                 (x64)
28966                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28967                         ;;
28968                 (x32)
28969                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28970                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28971                         ;;
28972                 (*)
28973                         { echo "$as_me:28973: WARNING: problem with Solaris architecture" >&5
28974 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28975                         ;;
28976                 esac
28977         fi
28978 fi
28979
28980 if test -z "$cf_pathlist"
28981 then
28982         # HP-UX
28983         if test x"`uname -s`" = xHP-UX
28984         then
28985                 case x`getconf LONG_BIT` in
28986                 (x64)
28987                         cf_pathlist="/usr/lib/hpux64"
28988                         ;;
28989                 (x*)
28990                         cf_pathlist="/usr/lib/hpux32"
28991                         ;;
28992                 esac
28993         fi
28994 fi
28995
28996 fi
28997
28998 # If nothing else, assume it is conventional
28999 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29000
29001 # Finally, check that this is only directories
29002 for cf_path in $0 $cf_pathlist
29003 do
29004         if test -d "$cf_path"; then
29005                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29006                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29007         fi
29008 done
29009
29010 # Ensure that it is nonempty
29011 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29012
29013 fi
29014 echo "$as_me:29014: result: $cf_cv_ld_searchpath" >&5
29015 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29016
29017 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29018
29019 cat >>confdefs.h <<\EOF
29020 #define HAVE_CURSES_DATA_BOOLNAMES 1
29021 EOF
29022
29023 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"
29024 ac_config_commands="$ac_config_commands default"
29025 cat >confcache <<\_ACEOF
29026 # This file is a shell script that caches the results of configure
29027 # tests run on this system so they can be shared between configure
29028 # scripts and configure runs, see configure's option --config-cache.
29029 # It is not useful on other systems.  If it contains results you don't
29030 # want to keep, you may remove or edit it.
29031 #
29032 # config.status only pays attention to the cache file if you give it
29033 # the --recheck option to rerun configure.
29034 #
29035 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29036 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29037 # following values.
29038
29039 _ACEOF
29040
29041 # The following way of writing the cache mishandles newlines in values,
29042 # but we know of no workaround that is simple, portable, and efficient.
29043 # So, don't put newlines in cache variables' values.
29044 # Ultrix sh set writes to stderr and can't be redirected directly,
29045 # and sets the high bit in the cache file unless we assign to the vars.
29046 {
29047   (set) 2>&1 |
29048     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29049     *ac_space=\ *)
29050       # `set' does not quote correctly, so add quotes (double-quote
29051       # substitution turns \\\\ into \\, and sed turns \\ into \).
29052       sed -n \
29053         "s/'/'\\\\''/g;
29054           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29055       ;;
29056     *)
29057       # `set' quotes correctly as required by POSIX, so do not add quotes.
29058       sed -n \
29059         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29060       ;;
29061     esac;
29062 } |
29063   sed '
29064      t clear
29065      : clear
29066      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29067      t end
29068      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29069      : end' >>confcache
29070 if cmp -s $cache_file confcache; then :; else
29071   if test -w $cache_file; then
29072     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29073     cat confcache >$cache_file
29074   else
29075     echo "not updating unwritable cache $cache_file"
29076   fi
29077 fi
29078 rm -f confcache
29079
29080 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29081 # Let make expand exec_prefix.
29082 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29083
29084 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29085 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29086 # trailing colons and then remove the whole line if VPATH becomes empty
29087 # (actually we leave an empty line to preserve line numbers).
29088 if test "x$srcdir" = x.; then
29089   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29090 s/:*\$(srcdir):*/:/;
29091 s/:*\${srcdir}:*/:/;
29092 s/:*@srcdir@:*/:/;
29093 s/^\([^=]*=[    ]*\):*/\1/;
29094 s/:*$//;
29095 s/^[^=]*=[      ]*$//;
29096 }'
29097 fi
29098
29099 DEFS=-DHAVE_CONFIG_H
29100
29101 : "${CONFIG_STATUS=./config.status}"
29102 ac_clean_files_save=$ac_clean_files
29103 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29104 { echo "$as_me:29104: creating $CONFIG_STATUS" >&5
29105 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29106 cat >"$CONFIG_STATUS" <<_ACEOF
29107 #! $SHELL
29108 # Generated automatically by configure.
29109 # Run this file to recreate the current configuration.
29110 # Compiler output produced by configure, useful for debugging
29111 # configure, is in config.log if it exists.
29112
29113 debug=false
29114 SHELL=\${CONFIG_SHELL-$SHELL}
29115 ac_cs_invocation="\$0 \$@"
29116
29117 CLICOLOR_FORCE= GREP_OPTIONS=
29118 unset CLICOLOR_FORCE GREP_OPTIONS
29119 _ACEOF
29120
29121 cat >>"$CONFIG_STATUS" <<\_ACEOF
29122 # Be Bourne compatible
29123 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29124   emulate sh
29125   NULLCMD=:
29126 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29127   set -o posix
29128 fi
29129
29130 # Name of the executable.
29131 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29132
29133 if expr a : '\(a\)' >/dev/null 2>&1; then
29134   as_expr=expr
29135 else
29136   as_expr=false
29137 fi
29138
29139 rm -f conf$$ conf$$.exe conf$$.file
29140 echo >conf$$.file
29141 if ln -s conf$$.file conf$$ 2>/dev/null; then
29142   # We could just check for DJGPP; but this test a) works b) is more generic
29143   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29144   if test -f conf$$.exe; then
29145     # Don't use ln at all; we don't have any links
29146     as_ln_s='cp -p'
29147   else
29148     as_ln_s='ln -s'
29149   fi
29150 elif ln conf$$.file conf$$ 2>/dev/null; then
29151   as_ln_s=ln
29152 else
29153   as_ln_s='cp -p'
29154 fi
29155 rm -f conf$$ conf$$.exe conf$$.file
29156
29157 as_executable_p="test -f"
29158
29159 # Support unset when possible.
29160 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29161   as_unset="unset"
29162 else
29163   as_unset="false"
29164 fi
29165
29166 # NLS nuisances.
29167 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29168 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29169 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29170 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29171 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29172 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29173 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29174 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29175
29176 # IFS
29177 # We need space, tab and new line, in precisely that order.
29178 as_nl='
29179 '
29180 IFS="   $as_nl"
29181
29182 # CDPATH.
29183 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29184
29185 exec 6>&1
29186
29187 _ACEOF
29188
29189 # Files that config.status was made for.
29190 if test -n "$ac_config_files"; then
29191   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29192 fi
29193
29194 if test -n "$ac_config_headers"; then
29195   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29196 fi
29197
29198 if test -n "$ac_config_links"; then
29199   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29200 fi
29201
29202 if test -n "$ac_config_commands"; then
29203   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29204 fi
29205
29206 cat >>"$CONFIG_STATUS" <<\EOF
29207
29208 ac_cs_usage="\
29209 \`$as_me' instantiates files from templates according to the
29210 current configuration.
29211
29212 Usage: $0 [OPTIONS] [FILE]...
29213
29214   -h, --help       print this help, then exit
29215   -V, --version    print version number, then exit
29216   -d, --debug      don't remove temporary files
29217       --recheck    update $as_me by reconfiguring in the same conditions
29218   --file=FILE[:TEMPLATE]
29219                    instantiate the configuration file FILE
29220   --header=FILE[:TEMPLATE]
29221                    instantiate the configuration header FILE
29222
29223 Configuration files:
29224 $config_files
29225
29226 Configuration headers:
29227 $config_headers
29228
29229 Configuration commands:
29230 $config_commands
29231
29232 Report bugs to <dickey@invisible-island.net>."
29233 EOF
29234
29235 cat >>"$CONFIG_STATUS" <<EOF
29236 ac_cs_version="\\
29237 config.status
29238 configured by $0, generated by GNU Autoconf 2.52.20210509,
29239   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29240
29241 Copyright 2003-2020,2021        Thomas E. Dickey
29242 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29243 Free Software Foundation, Inc.
29244 This config.status script is free software; the Free Software Foundation
29245 gives unlimited permission to copy, distribute and modify it."
29246 srcdir="$srcdir"
29247 INSTALL="$INSTALL"
29248 EOF
29249
29250 cat >>"$CONFIG_STATUS" <<\EOF
29251 # If no file are specified by the user, then we need to provide default
29252 # value.  By we need to know if files were specified by the user.
29253 ac_need_defaults=:
29254 while test $# != 0
29255 do
29256   case $1 in
29257   --*=*)
29258     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29259     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29260     shift
29261     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29262     shift
29263     ;;
29264   -*);;
29265   *) # This is not an option, so the user has probably given explicit
29266      # arguments.
29267      ac_need_defaults=false;;
29268   esac
29269
29270   case $1 in
29271   # Handling of the options.
29272 EOF
29273 cat >>"$CONFIG_STATUS" <<EOF
29274   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29275     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29276     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29277 EOF
29278 cat >>"$CONFIG_STATUS" <<\EOF
29279   --version | --vers* | -V )
29280     echo "$ac_cs_version"; exit 0 ;;
29281   --he | --h)
29282     # Conflict between --help and --header
29283     { { echo "$as_me:29283: error: ambiguous option: $1
29284 Try \`$0 --help' for more information." >&5
29285 echo "$as_me: error: ambiguous option: $1
29286 Try \`$0 --help' for more information." >&2;}
29287    { (exit 1); exit 1; }; };;
29288   --help | --hel | -h )
29289     echo "$ac_cs_usage"; exit 0 ;;
29290   --debug | --d* | -d )
29291     debug=: ;;
29292   --file | --fil | --fi | --f )
29293     shift
29294     CONFIG_FILES="$CONFIG_FILES $1"
29295     ac_need_defaults=false;;
29296   --header | --heade | --head | --hea )
29297     shift
29298     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29299     ac_need_defaults=false;;
29300
29301   # This is an error.
29302   -*) { { echo "$as_me:29302: error: unrecognized option: $1
29303 Try \`$0 --help' for more information." >&5
29304 echo "$as_me: error: unrecognized option: $1
29305 Try \`$0 --help' for more information." >&2;}
29306    { (exit 1); exit 1; }; } ;;
29307
29308   *) ac_config_targets="$ac_config_targets $1" ;;
29309
29310   esac
29311   shift
29312 done
29313
29314 exec 5>>config.log
29315 cat >&5 << _ACEOF
29316
29317 ## ----------------------- ##
29318 ## Running config.status.  ##
29319 ## ----------------------- ##
29320
29321 This file was extended by $as_me 2.52.20210509, executed with
29322   CONFIG_FILES    = $CONFIG_FILES
29323   CONFIG_HEADERS  = $CONFIG_HEADERS
29324   CONFIG_LINKS    = $CONFIG_LINKS
29325   CONFIG_COMMANDS = $CONFIG_COMMANDS
29326   > "$ac_cs_invocation"
29327 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29328
29329 _ACEOF
29330 EOF
29331
29332 cat >>"$CONFIG_STATUS" <<EOF
29333 #
29334 # INIT-COMMANDS section.
29335 #
29336
29337 ### Special initialization commands, used to pass information from the
29338 ### configuration-run into config.status
29339
29340 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29341 AWK="$AWK"
29342 CXX_NAME="$CXX_NAME"
29343 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29344 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29345 ECHO_LD="$ECHO_LD"
29346 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29347 FORM_NAME="$FORM_NAME"
29348 LDCONFIG="$LDCONFIG"
29349 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29350 LIB_NAME="$LIB_NAME"
29351 LIB_PREFIX="$LIB_PREFIX"
29352 LIB_SUBSETS="$LIB_SUBSETS"
29353 LIB_SUFFIX="$LIB_SUFFIX"
29354 LIB_TRACING="$LIB_TRACING"
29355 LN_S="$LN_S"
29356 MAKE_TERMINFO="$MAKE_TERMINFO"
29357 MENU_NAME="$MENU_NAME"
29358 NCURSES_MAJOR="$NCURSES_MAJOR"
29359 NCURSES_MINOR="$NCURSES_MINOR"
29360 NCURSES_OSPEED="$NCURSES_OSPEED"
29361 NCURSES_PATCH="$NCURSES_PATCH"
29362 PANEL_NAME="$PANEL_NAME"
29363 SRC_SUBDIRS="$SRC_SUBDIRS"
29364 TERMINFO="$TERMINFO"
29365 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29366 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29367 TICS_NAME="$TICS_NAME"
29368 TICS_SUFFIX="$TICS_SUFFIX"
29369 TIC_PATH="$TIC_PATH"
29370 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29371 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29372 TINFO_NAME="$TINFO_NAME"
29373 TINFO_SUFFIX="$TINFO_SUFFIX"
29374 UNALTERED_SYMS="$UNALTERED_SYMS"
29375 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29376 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29377 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29378 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29379 WILDCARD_SYMS="$WILDCARD_SYMS"
29380 WITH_CURSES_H="$with_curses_h"
29381 WITH_ECHO="${enable_echo:=yes}"
29382 WITH_OVERWRITE="$with_overwrite"
29383 cf_LIST_MODELS="$cf_list_models"
29384 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29385 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29386 cf_cv_abi_version="$cf_cv_abi_version"
29387 cf_cv_do_relink="$cf_cv_do_relink"
29388 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29389 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29390 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29391 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29392 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29393 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29394 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29395 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29396 cf_cv_rel_version="$cf_cv_rel_version"
29397 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29398 cf_cv_shared_soname='$cf_cv_shared_soname'
29399 cf_cv_shlib_version="$cf_cv_shlib_version"
29400 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29401 cf_cv_system_name="$cf_cv_system_name"
29402 cf_cv_term_driver="$with_term_driver"
29403 cf_with_ada="$cf_with_ada"
29404 cf_with_cxx_binding="$cf_with_cxx_binding"
29405 cf_with_db_install="$cf_with_db_install"
29406 cf_with_manpages="$cf_with_manpages"
29407 cf_with_tests="$cf_with_tests"
29408 host="$host"
29409 target="$target"
29410 with_shared_cxx="$with_shared_cxx"
29411
29412 EOF
29413
29414 cat >>"$CONFIG_STATUS" <<\EOF
29415 for ac_config_target in $ac_config_targets
29416 do
29417   case "$ac_config_target" in
29418   # Handling of arguments.
29419   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29420   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29421   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29422   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29423   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29424   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29425   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29426   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29427   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29428   *) { { echo "$as_me:29428: error: invalid argument: $ac_config_target" >&5
29429 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29430    { (exit 1); exit 1; }; };;
29431   esac
29432 done
29433
29434 # If the user did not use the arguments to specify the items to instantiate,
29435 # then the envvar interface is used.  Set only those that are not.
29436 # We use the long form for the default assignment because of an extremely
29437 # bizarre bug on SunOS 4.1.3.
29438 if "$ac_need_defaults"; then
29439   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29440   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29441   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29442 fi
29443
29444 # Create a temporary directory, and hook for its removal unless debugging.
29445 $debug ||
29446 {
29447   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29448   trap '{ (exit 1); exit 1; }' 1 2 13 15
29449 }
29450
29451 # Create a (secure) tmp directory for tmp files.
29452 : ${TMPDIR=/tmp}
29453 {
29454   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29455   test -n "$tmp" && test -d "$tmp"
29456 }  ||
29457 {
29458   tmp=$TMPDIR/cs$$-$RANDOM
29459   (umask 077 && mkdir $tmp)
29460 } ||
29461 {
29462    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29463    { (exit 1); exit 1; }
29464 }
29465
29466 EOF
29467
29468 cat >>"$CONFIG_STATUS" <<EOF
29469
29470 #
29471 # CONFIG_FILES section.
29472 #
29473
29474 # No need to generate the scripts if there are no CONFIG_FILES.
29475 # This happens for instance when ./config.status config.h
29476 if test -n "\$CONFIG_FILES"; then
29477   # Protect against being on the right side of a sed subst in config.status.
29478   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29479    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29480 s,@SHELL@,$SHELL,;t t
29481 s,@exec_prefix@,$exec_prefix,;t t
29482 s,@prefix@,$prefix,;t t
29483 s,@program_transform_name@,$program_transform_name,;t t
29484 s,@bindir@,$bindir,;t t
29485 s,@sbindir@,$sbindir,;t t
29486 s,@libexecdir@,$libexecdir,;t t
29487 s,@datarootdir@,$datarootdir,;t t
29488 s,@datadir@,$datadir,;t t
29489 s,@sysconfdir@,$sysconfdir,;t t
29490 s,@sharedstatedir@,$sharedstatedir,;t t
29491 s,@localstatedir@,$localstatedir,;t t
29492 s,@runstatedir@,$runstatedir,;t t
29493 s,@libdir@,$libdir,;t t
29494 s,@includedir@,$includedir,;t t
29495 s,@oldincludedir@,$oldincludedir,;t t
29496 s,@infodir@,$infodir,;t t
29497 s,@mandir@,$mandir,;t t
29498 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29499 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29500 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29501 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29502 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29503 s,@build_alias@,$build_alias,;t t
29504 s,@host_alias@,$host_alias,;t t
29505 s,@target_alias@,$target_alias,;t t
29506 s,@ECHO_C@,$ECHO_C,;t t
29507 s,@ECHO_N@,$ECHO_N,;t t
29508 s,@ECHO_T@,$ECHO_T,;t t
29509 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29510 s,@DEFS@,$DEFS,;t t
29511 s,@LIBS@,$LIBS,;t t
29512 s,@top_builddir@,$top_builddir,;t t
29513 s,@GREP@,$GREP,;t t
29514 s,@EGREP@,$EGREP,;t t
29515 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29516 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29517 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29518 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29519 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29520 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29521 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29522 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29523 s,@VERSION@,$VERSION,;t t
29524 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29525 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29526 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29527 s,@PACKAGE@,$PACKAGE,;t t
29528 s,@build@,$build,;t t
29529 s,@build_cpu@,$build_cpu,;t t
29530 s,@build_vendor@,$build_vendor,;t t
29531 s,@build_os@,$build_os,;t t
29532 s,@host@,$host,;t t
29533 s,@host_cpu@,$host_cpu,;t t
29534 s,@host_vendor@,$host_vendor,;t t
29535 s,@host_os@,$host_os,;t t
29536 s,@target@,$target,;t t
29537 s,@target_cpu@,$target_cpu,;t t
29538 s,@target_vendor@,$target_vendor,;t t
29539 s,@target_os@,$target_os,;t t
29540 s,@FGREP@,$FGREP,;t t
29541 s,@CC@,$CC,;t t
29542 s,@CFLAGS@,$CFLAGS,;t t
29543 s,@LDFLAGS@,$LDFLAGS,;t t
29544 s,@CPPFLAGS@,$CPPFLAGS,;t t
29545 s,@ac_ct_CC@,$ac_ct_CC,;t t
29546 s,@EXEEXT@,$EXEEXT,;t t
29547 s,@OBJEXT@,$OBJEXT,;t t
29548 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29549 s,@CPP@,$CPP,;t t
29550 s,@LDCONFIG@,$LDCONFIG,;t t
29551 s,@CXX@,$CXX,;t t
29552 s,@CXXFLAGS@,$CXXFLAGS,;t t
29553 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29554 s,@AWK@,$AWK,;t t
29555 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29556 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29557 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29558 s,@LINT@,$LINT,;t t
29559 s,@LINT_OPTS@,$LINT_OPTS,;t t
29560 s,@LN_S@,$LN_S,;t t
29561 s,@cf_config_suffix@,$cf_config_suffix,;t t
29562 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29563 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29564 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29565 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29566 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29567 s,@SET_MAKE@,$SET_MAKE,;t t
29568 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29569 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29570 s,@CTAGS@,$CTAGS,;t t
29571 s,@ETAGS@,$ETAGS,;t t
29572 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29573 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29574 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29575 s,@RANLIB@,$RANLIB,;t t
29576 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29577 s,@LD@,$LD,;t t
29578 s,@ac_ct_LD@,$ac_ct_LD,;t t
29579 s,@AR@,$AR,;t t
29580 s,@ac_ct_AR@,$ac_ct_AR,;t t
29581 s,@NM@,$NM,;t t
29582 s,@ac_ct_NM@,$ac_ct_NM,;t t
29583 s,@ARFLAGS@,$ARFLAGS,;t t
29584 s,@DESTDIR@,$DESTDIR,;t t
29585 s,@BUILD_CC@,$BUILD_CC,;t t
29586 s,@BUILD_CPP@,$BUILD_CPP,;t t
29587 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29588 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29589 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29590 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29591 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29592 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29593 s,@cf_list_models@,$cf_list_models,;t t
29594 s,@ABI_VERSION@,$ABI_VERSION,;t t
29595 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29596 s,@LIBTOOL@,$LIBTOOL,;t t
29597 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29598 s,@LT_UNDEF@,$LT_UNDEF,;t t
29599 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29600 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29601 s,@LIB_CREATE@,$LIB_CREATE,;t t
29602 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29603 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29604 s,@LIB_PREP@,$LIB_PREP,;t t
29605 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29606 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29607 s,@LIB_LINK@,$LIB_LINK,;t t
29608 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29609 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29610 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29611 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29612 s,@TICS_NAME@,$TICS_NAME,;t t
29613 s,@TINFO_NAME@,$TINFO_NAME,;t t
29614 s,@LIB_NAME@,$LIB_NAME,;t t
29615 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29616 s,@CC_G_OPT@,$CC_G_OPT,;t t
29617 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29618 s,@LD_MODEL@,$LD_MODEL,;t t
29619 s,@shlibdir@,$shlibdir,;t t
29620 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29621 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29622 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29623 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29624 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29625 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29626 s,@LINK_PROGS@,$LINK_PROGS,;t t
29627 s,@LINK_TESTS@,$LINK_TESTS,;t t
29628 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29629 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29630 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29631 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29632 s,@RPATH_LIST@,$RPATH_LIST,;t t
29633 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29634 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29635 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29636 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29637 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29638 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29639 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29640 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29641 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29642 s,@TIC@,$TIC,;t t
29643 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29644 s,@INFOCMP@,$INFOCMP,;t t
29645 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29646 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29647 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29648 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29649 s,@XTERM_KBS@,$XTERM_KBS,;t t
29650 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29651 s,@TERMINFO@,$TERMINFO,;t t
29652 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29653 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29654 s,@TERMPATH@,$TERMPATH,;t t
29655 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29656 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29657 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29658 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29659 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29660 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29661 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29662 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29663 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29664 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29665 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29666 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29667 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29668 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29669 s,@RGB_PATH@,$RGB_PATH,;t t
29670 s,@no_x11_rgb@,$no_x11_rgb,;t t
29671 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29672 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29673 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29674 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29675 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29676 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29677 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29678 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29679 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29680 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29681 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29682 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29683 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29684 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29685 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29686 s,@PTHREAD@,$PTHREAD,;t t
29687 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29688 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29689 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29690 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29691 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29692 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29693 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29694 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29695 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29696 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29697 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29698 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29699 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29700 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29701 s,@ECHO_LT@,$ECHO_LT,;t t
29702 s,@ECHO_LD@,$ECHO_LD,;t t
29703 s,@RULE_CC@,$RULE_CC,;t t
29704 s,@SHOW_CC@,$SHOW_CC,;t t
29705 s,@ECHO_CC@,$ECHO_CC,;t t
29706 s,@ECHO_LINK@,$ECHO_LINK,;t t
29707 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29708 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29709 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29710 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29711 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29712 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29713 s,@ADAFLAGS@,$ADAFLAGS,;t t
29714 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29715 s,@ADA_TRACE@,$ADA_TRACE,;t t
29716 s,@MATH_LIB@,$MATH_LIB,;t t
29717 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29718 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29719 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29720 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29721 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29722 s,@TEST_LIBS@,$TEST_LIBS,;t t
29723 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29724 s,@CXXCPP@,$CXXCPP,;t t
29725 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29726 s,@CXX_AR@,$CXX_AR,;t t
29727 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29728 s,@CXXLIBS@,$CXXLIBS,;t t
29729 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29730 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29731 s,@M4_exists@,$M4_exists,;t t
29732 s,@cf_ada_make@,$cf_ada_make,;t t
29733 s,@cf_ada_config@,$cf_ada_config,;t t
29734 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29735 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29736 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29737 s,@cf_compile_generics@,$cf_compile_generics,;t t
29738 s,@cf_generic_objects@,$cf_generic_objects,;t t
29739 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29740 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29741 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29742 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29743 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29744 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29745 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29746 s,@cf_ada_package@,$cf_ada_package,;t t
29747 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29748 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29749 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29750 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29751 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29752 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29753 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29754 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29755 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29756 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29757 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29758 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29759 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29760 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29761 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29762 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29763 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29764 s,@TICS_LIBS@,$TICS_LIBS,;t t
29765 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29766 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29767 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29768 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29769 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29770 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29771 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29772 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29773 s,@includesubdir@,$includesubdir,;t t
29774 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29775 s,@TICS_LIST@,$TICS_LIST,;t t
29776 s,@TINFO_LIST@,$TINFO_LIST,;t t
29777 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29778 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29779 s,@FORM_NAME@,$FORM_NAME,;t t
29780 s,@MENU_NAME@,$MENU_NAME,;t t
29781 s,@PANEL_NAME@,$PANEL_NAME,;t t
29782 s,@CXX_NAME@,$CXX_NAME,;t t
29783 s,@TEST_ARGS@,$TEST_ARGS,;t t
29784 s,@TEST_DEPS@,$TEST_DEPS,;t t
29785 s,@TEST_ARG2@,$TEST_ARG2,;t t
29786 s,@TEST_DEP2@,$TEST_DEP2,;t t
29787 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29788 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29789 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29790 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29791 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29792 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29793 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29794 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29795 s,@cross_compiling@,$cross_compiling,;t t
29796 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29797 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29798 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29799 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29800 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29801 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29802 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29803 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29804 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29805 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29806 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29807 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29808 CEOF
29809
29810 EOF
29811
29812   cat >>"$CONFIG_STATUS" <<\EOF
29813   # Split the substitutions into bite-sized pieces for seds with
29814   # small command number limits, like on Digital OSF/1 and HP-UX.
29815   ac_max_sed_lines=48
29816   ac_sed_frag=1 # Number of current file.
29817   ac_beg=1 # First line for current file.
29818   ac_end=$ac_max_sed_lines # Line after last line for current file.
29819   ac_more_lines=:
29820   ac_sed_cmds=
29821   while "$ac_more_lines"; do
29822     if test "$ac_beg" -gt 1; then
29823       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29824     else
29825       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29826     fi
29827     if test ! -s $tmp/subs.frag; then
29828       ac_more_lines=false
29829     else
29830       # The purpose of the label and of the branching condition is to
29831       # speed up the sed processing (if there are no `@' at all, there
29832       # is no need to browse any of the substitutions).
29833       # These are the two extra sed commands mentioned above.
29834       (echo ':t
29835   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29836       # It is possible to make a multiline substitution using escaped newlines.
29837       # Ensure that we do not split the substitution between script fragments.
29838       ac_BEG=$ac_end
29839       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29840       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29841       if test -s $tmp/subs.next; then
29842         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29843         if test ! -s $tmp/subs.edit; then
29844           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29845           if test ! -s $tmp/subs.edit; then
29846             if test "$ac_beg" -gt 1; then
29847               ac_end=`expr "$ac_end" - 1`
29848               continue
29849             fi
29850           fi
29851         fi
29852       fi
29853
29854       if test -z "$ac_sed_cmds"; then
29855         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29856       else
29857         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29858       fi
29859       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29860       ac_beg=$ac_end
29861       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29862     fi
29863   done
29864   if test -z "$ac_sed_cmds"; then
29865     ac_sed_cmds=cat
29866   fi
29867 fi # test -n "$CONFIG_FILES"
29868
29869 EOF
29870 cat >>"$CONFIG_STATUS" <<\EOF
29871 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29872   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29873   case "$ac_file" in
29874   - | *:- | *:-:* ) # input from stdin
29875         cat >$tmp/stdin
29876         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29877         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29878   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29879         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29880   * )   ac_file_in=$ac_file.in ;;
29881   esac
29882
29883   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29884   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29885          X"$ac_file" : 'X\(//\)[^/]' \| \
29886          X"$ac_file" : 'X\(//\)$' \| \
29887          X"$ac_file" : 'X\(/\)' \| \
29888          .     : '\(.\)' 2>/dev/null ||
29889 echo X"$ac_file" |
29890     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29891           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29892           /^X\(\/\/\)$/{ s//\1/; q; }
29893           /^X\(\/\).*/{ s//\1/; q; }
29894           s/.*/./; q'`
29895   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29896     { case "$ac_dir" in
29897   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29898   *)                      as_incr_dir=.;;
29899 esac
29900 as_dummy="$ac_dir"
29901 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29902   case $as_mkdir_dir in
29903     # Skip DOS drivespec
29904     ?:) as_incr_dir=$as_mkdir_dir ;;
29905     *)
29906       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29907       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29908     ;;
29909   esac
29910 done; }
29911
29912     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29913     # A "../" for each directory in $ac_dir_suffix.
29914     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29915   else
29916     ac_dir_suffix= ac_dots=
29917   fi
29918
29919   case "$srcdir" in
29920   .)  ac_srcdir=.
29921       if test -z "$ac_dots"; then
29922          ac_top_srcdir=.
29923       else
29924          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29925       fi ;;
29926   [\\/]* | ?:[\\/]* )
29927       ac_srcdir="$srcdir$ac_dir_suffix";
29928       ac_top_srcdir="$srcdir" ;;
29929   *) # Relative path.
29930     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29931     ac_top_srcdir="$ac_dots$srcdir" ;;
29932   esac
29933
29934   case $INSTALL in
29935   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29936   *) ac_INSTALL=$ac_dots$INSTALL ;;
29937   esac
29938
29939   if test x"$ac_file" != x-; then
29940     { echo "$as_me:29940: creating $ac_file" >&5
29941 echo "$as_me: creating $ac_file" >&6;}
29942     rm -f "$ac_file"
29943   fi
29944   # Let's still pretend it is `configure' which instantiates (i.e., don't
29945   # use $as_me), people would be surprised to read:
29946   #    /* config.h.  Generated automatically by config.status.  */
29947   configure_input="Generated automatically from `echo $ac_file_in |
29948                                                  sed 's,.*/,,'` by configure."
29949
29950   # First look for the input files in the build tree, otherwise in the
29951   # src tree.
29952   ac_file_inputs=`IFS=:
29953     for f in $ac_file_in; do
29954       case $f in
29955       -) echo $tmp/stdin ;;
29956       [\\/$]*)
29957          # Absolute (can't be DOS-style, as IFS=:)
29958          test -f "$f" || { { echo "$as_me:29958: error: cannot find input file: $f" >&5
29959 echo "$as_me: error: cannot find input file: $f" >&2;}
29960    { (exit 1); exit 1; }; }
29961          echo $f;;
29962       *) # Relative
29963          if test -f "$f"; then
29964            # Build tree
29965            echo $f
29966          elif test -f "$srcdir/$f"; then
29967            # Source tree
29968            echo "$srcdir/$f"
29969          else
29970            # /dev/null tree
29971            { { echo "$as_me:29971: error: cannot find input file: $f" >&5
29972 echo "$as_me: error: cannot find input file: $f" >&2;}
29973    { (exit 1); exit 1; }; }
29974          fi;;
29975       esac
29976     done` || { (exit 1); exit 1; }
29977 EOF
29978 cat >>"$CONFIG_STATUS" <<\EOF
29979   ac_warn_datarootdir=no
29980   if test x"$ac_file" != x-; then
29981     for ac_item in $ac_file_inputs
29982     do
29983       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29984       if test -n "$ac_seen"; then
29985         ac_used=`grep '@datarootdir@' "$ac_item"`
29986         if test -z "$ac_used"; then
29987           { echo "$as_me:29987: WARNING: datarootdir was used implicitly but not set:
29988 $ac_seen" >&5
29989 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29990 $ac_seen" >&2;}
29991           ac_warn_datarootdir=yes
29992         fi
29993       fi
29994       ac_seen=`grep '${datarootdir}' "$ac_item"`
29995       if test -n "$ac_seen"; then
29996         { echo "$as_me:29996: WARNING: datarootdir was used explicitly but not set:
29997 $ac_seen" >&5
29998 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29999 $ac_seen" >&2;}
30000         ac_warn_datarootdir=yes
30001       fi
30002     done
30003   fi
30004
30005 if test "x$ac_warn_datarootdir" = xyes; then
30006   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30007 fi
30008
30009 EOF
30010 cat >>"$CONFIG_STATUS" <<EOF
30011   sed "$ac_vpsub
30012 $extrasub
30013 EOF
30014 cat >>"$CONFIG_STATUS" <<\EOF
30015 :t
30016 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30017 s,@configure_input@,$configure_input,;t t
30018 s,@srcdir@,$ac_srcdir,;t t
30019 s,@top_srcdir@,$ac_top_srcdir,;t t
30020 s,@INSTALL@,$ac_INSTALL,;t t
30021 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30022   rm -f $tmp/stdin
30023   if test x"$ac_file" != x-; then
30024     cp "$tmp/out" "$ac_file"
30025
30026     for ac_name in prefix exec_prefix datarootdir
30027     do
30028         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30029         if test -n "$ac_seen"; then
30030             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30031             if test -z "$ac_init"; then
30032               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30033               { echo "$as_me:30033: WARNING: Variable $ac_name is used but was not set:
30034 $ac_seen" >&5
30035 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30036 $ac_seen" >&2;}
30037             fi
30038         fi
30039     done
30040     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30041     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30042     if test -s $tmp/out; then
30043       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30044       { echo "$as_me:30044: WARNING: Some variables may not be substituted:
30045 $ac_seen" >&5
30046 echo "$as_me: WARNING: Some variables may not be substituted:
30047 $ac_seen" >&2;}
30048     fi
30049   else
30050     cat $tmp/out
30051   fi
30052   rm -f $tmp/out
30053
30054 done
30055 EOF
30056 cat >>"$CONFIG_STATUS" <<\EOF
30057
30058 #
30059 # CONFIG_HEADER section.
30060 #
30061
30062 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30063 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30064 #
30065 # ac_d sets the value in "#define NAME VALUE" lines.
30066 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30067 ac_dB='[        ].*$,\1#\2'
30068 ac_dC=' '
30069 ac_dD=',;t'
30070 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30071 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30072 ac_iB='\([      ]\),\1#\2define\3'
30073 ac_iC=' '
30074 ac_iD='\4,;t'
30075 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30076 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30077 ac_uB='$,\1#\2define\3'
30078 ac_uC=' '
30079 ac_uD=',;t'
30080
30081 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30082   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30083   case "$ac_file" in
30084   - | *:- | *:-:* ) # input from stdin
30085         cat >$tmp/stdin
30086         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30087         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30088   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30089         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30090   * )   ac_file_in=$ac_file.in ;;
30091   esac
30092
30093   test x"$ac_file" != x- && { echo "$as_me:30093: creating $ac_file" >&5
30094 echo "$as_me: creating $ac_file" >&6;}
30095
30096   # First look for the input files in the build tree, otherwise in the
30097   # src tree.
30098   ac_file_inputs=`IFS=:
30099     for f in $ac_file_in; do
30100       case $f in
30101       -) echo $tmp/stdin ;;
30102       [\\/$]*)
30103          # Absolute (can't be DOS-style, as IFS=:)
30104          test -f "$f" || { { echo "$as_me:30104: error: cannot find input file: $f" >&5
30105 echo "$as_me: error: cannot find input file: $f" >&2;}
30106    { (exit 1); exit 1; }; }
30107          echo $f;;
30108       *) # Relative
30109          if test -f "$f"; then
30110            # Build tree
30111            echo $f
30112          elif test -f "$srcdir/$f"; then
30113            # Source tree
30114            echo "$srcdir/$f"
30115          else
30116            # /dev/null tree
30117            { { echo "$as_me:30117: error: cannot find input file: $f" >&5
30118 echo "$as_me: error: cannot find input file: $f" >&2;}
30119    { (exit 1); exit 1; }; }
30120          fi;;
30121       esac
30122     done` || { (exit 1); exit 1; }
30123   # Remove the trailing spaces.
30124   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30125
30126 EOF
30127
30128 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30129 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30130 # be either 'cat' or 'sort'.
30131 cat confdefs.h | uniq >conftest.vals
30132
30133 # Break up conftest.vals because some shells have a limit on
30134 # the size of here documents, and old seds have small limits too.
30135
30136 rm -f conftest.tail
30137 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30138 while grep . conftest.vals >/dev/null
30139 do
30140   # Write chunks of a limited-size here document to conftest.frag.
30141   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30142   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30143   echo 'CEOF' >> "$CONFIG_STATUS"
30144   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30145   rm -f conftest.vals
30146   mv conftest.tail conftest.vals
30147 done
30148 rm -f conftest.vals
30149
30150 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30151 # marker @DEFS@.
30152 echo '  cat >> conftest.edit <<CEOF
30153 /@DEFS@/r conftest.frag
30154 /@DEFS@/d
30155 CEOF
30156 sed -f conftest.edit $tmp/in > $tmp/out
30157 rm -f $tmp/in
30158 mv $tmp/out $tmp/in
30159 rm -f conftest.edit conftest.frag
30160 ' >> "$CONFIG_STATUS"
30161
30162 cat >>"$CONFIG_STATUS" <<\EOF
30163   # Let's still pretend it is `configure' which instantiates (i.e., don't
30164   # use $as_me), people would be surprised to read:
30165   #    /* config.h.  Generated automatically by config.status.  */
30166   if test x"$ac_file" = x-; then
30167     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30168   else
30169     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30170   fi
30171   cat $tmp/in >>$tmp/config.h
30172   rm -f $tmp/in
30173   if test x"$ac_file" != x-; then
30174     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30175       { echo "$as_me:30175: $ac_file is unchanged" >&5
30176 echo "$as_me: $ac_file is unchanged" >&6;}
30177     else
30178       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30179          X"$ac_file" : 'X\(//\)[^/]' \| \
30180          X"$ac_file" : 'X\(//\)$' \| \
30181          X"$ac_file" : 'X\(/\)' \| \
30182          .     : '\(.\)' 2>/dev/null ||
30183 echo X"$ac_file" |
30184     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30185           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30186           /^X\(\/\/\)$/{ s//\1/; q; }
30187           /^X\(\/\).*/{ s//\1/; q; }
30188           s/.*/./; q'`
30189       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30190         { case "$ac_dir" in
30191   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30192   *)                      as_incr_dir=.;;
30193 esac
30194 as_dummy="$ac_dir"
30195 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30196   case $as_mkdir_dir in
30197     # Skip DOS drivespec
30198     ?:) as_incr_dir=$as_mkdir_dir ;;
30199     *)
30200       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30201       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30202     ;;
30203   esac
30204 done; }
30205
30206       fi
30207       rm -f "$ac_file"
30208       mv "$tmp/config.h" "$ac_file"
30209     fi
30210   else
30211     cat $tmp/config.h
30212     rm -f $tmp/config.h
30213   fi
30214 done
30215 EOF
30216 cat >>"$CONFIG_STATUS" <<\EOF
30217 #
30218 # CONFIG_COMMANDS section.
30219 #
30220 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30221   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30222   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30223
30224   case "$ac_dest" in
30225     default )
30226 if test "x$cf_with_tests" != xno ; then
30227
30228 for cf_dir in test
30229 do
30230         if test ! -d "$srcdir/$cf_dir" ; then
30231                 continue
30232         elif test -f "$srcdir/$cf_dir/programs" ; then
30233                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30234         fi
30235 done
30236
30237 fi
30238
30239 cf_prefix=$LIB_PREFIX
30240
30241 case "$cf_cv_shlib_version" in
30242 (cygdll|msysdll|mingw|msvcdll)
30243         TINFO_NAME=$TINFO_ARG_SUFFIX
30244         TINFO_SUFFIX=.dll
30245         ;;
30246 esac
30247
30248 if test -n "$TINFO_SUFFIX" ; then
30249         case "$TINFO_SUFFIX" in
30250         (tw*)
30251                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30252                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30253                 ;;
30254         (t*)
30255                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30256                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30257                 ;;
30258         (w*)
30259                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30260                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30261                 ;;
30262         esac
30263 fi
30264
30265 for cf_dir in $SRC_SUBDIRS
30266 do
30267         if test ! -d "$srcdir/$cf_dir" ; then
30268                 continue
30269         elif test -f "$srcdir/$cf_dir/modules" ; then
30270
30271                 SHARED_LIB=
30272                 Libs_To_Make=
30273                 cf_awk_program=
30274                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30275                 then
30276                         cf_awk_program="$cf_awk_program\
30277 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30278 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30279 "
30280                 fi
30281
30282                 if test "x$WILDCARD_SYMS" = xno
30283                 then
30284                         cf_awk_program="$cf_awk_program\
30285 /[      ]_\\*;/ { skip=1; next; }\
30286 "
30287                 fi
30288
30289                 if test "x$cf_awk_program" != "x"
30290                 then
30291                         cat >>$cf_dir/Makefile <<CF_EOF
30292
30293 # Generated by CF_LIB_RULES
30294 resulting.map: $UNALTERED_SYMS
30295         $AWK 'BEGIN { skip = 1; last=""; } \
30296 $cf_awk_program \
30297 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30298  skip = 0; last = \$\$0; } \
30299 END { print last; }' < "$UNALTERED_SYMS" >\$@
30300
30301 distclean::
30302         rm -f resulting.map
30303 CF_EOF
30304                 fi
30305
30306                 for cf_item in $cf_LIST_MODELS
30307                 do
30308
30309         case X$cf_item in
30310         (Xlibtool)
30311                 cf_suffix='.la'
30312                 cf_depsuf=$cf_suffix
30313                 ;;
30314         (Xdebug)
30315                 case "$cf_cv_system_name" in
30316                 (*-msvc*)
30317                         cf_suffix='_g.lib'
30318                         ;;
30319                 (*)
30320                         cf_suffix='_g.a'
30321                         ;;
30322                 esac
30323                 cf_depsuf=$cf_suffix
30324                 ;;
30325         (Xprofile)
30326                 case "$cf_cv_system_name" in
30327                 (*-msvc*)
30328                         cf_suffix='_p.lib'
30329                         ;;
30330                 (*)
30331                         cf_suffix='_p.a'
30332                         ;;
30333                 esac
30334                 cf_depsuf=$cf_suffix
30335                 ;;
30336         (Xshared)
30337                 case "$cf_cv_system_name" in
30338                 (aix[5-7]*)
30339                         cf_suffix='.so'
30340                         cf_depsuf=$cf_suffix
30341                         ;;
30342                 (*-msvc*)
30343                         cf_suffix='.dll'
30344                         cf_depsuf='.dll.lib'
30345                         ;;
30346                 (cygwin*|msys*|mingw*)
30347                         cf_suffix='.dll'
30348                         cf_depsuf='.dll.a'
30349                         ;;
30350                 (darwin*)
30351                         cf_suffix='.dylib'
30352                         cf_depsuf=$cf_suffix
30353                         ;;
30354                 (hpux*)
30355                         case "$target" in
30356                         (ia64*)
30357                                 cf_suffix='.so'
30358                                 cf_depsuf=$cf_suffix
30359                                 ;;
30360                         (*)
30361                                 cf_suffix='.sl'
30362                                 cf_depsuf=$cf_suffix
30363                                 ;;
30364                         esac
30365                         ;;
30366                 (*)
30367                         cf_suffix='.so'
30368                         cf_depsuf=$cf_suffix
30369                         ;;
30370                 esac
30371                 ;;
30372         (*)
30373                 case "$target" in
30374                 (*-msvc*)
30375                         cf_suffix='.lib'
30376                         ;;
30377                 (*)
30378                         cf_suffix='.a'
30379                         ;;
30380                 esac
30381                 cf_depsuf=$cf_suffix
30382                 ;;
30383         esac
30384         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30385         then
30386                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30387                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30388         fi
30389
30390                         if test "$cf_dir" = "c++"
30391                         then
30392
30393 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30394
30395 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30396
30397                         else
30398
30399 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30400
30401 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30402
30403                         fi
30404                         test -z "$cf_libname" && cf_libname="$cf_dir"
30405                         if test "$cf_item" = shared ; then
30406                                 if test -n "${LIB_SUFFIX}"
30407                                 then
30408                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30409                                 else
30410                                         cf_shared_suffix="$cf_suffix"
30411                                 fi
30412                                 if test "$cf_cv_do_symlinks" = yes ; then
30413                                         cf_version_name=
30414
30415                                         case "$cf_cv_shlib_version" in
30416                                         (rel)
30417                                                 cf_version_name=REL_VERSION
30418                                                 ;;
30419                                         (abi)
30420                                                 cf_version_name=ABI_VERSION
30421                                                 ;;
30422                                         esac
30423
30424                                         if test -n "$cf_version_name"
30425                                         then
30426                                                 case "$cf_cv_system_name" in
30427                                                 (darwin*)
30428                                                         # "w", etc?
30429                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30430                                                         ;;
30431                                                 (*)
30432                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30433                                                         ;;
30434                                                 esac
30435                                         fi
30436                                         if test -n "${USE_LIB_SUFFIX}"
30437                                         then
30438                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30439                                         else
30440                                                 cf_shared_suffix="$cf_suffix"
30441                                         fi
30442                                 fi
30443                                 # cygwin needs import library, and has unique naming convention
30444                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30445                                 # use 'cyg' prefix for shared lib.
30446                                 case "$cf_cv_shlib_version" in
30447                                 (cygdll)
30448                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30449                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30450                                         ;;
30451                                 (msysdll)
30452                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30453                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30454                                         ;;
30455                                 (mingw)
30456                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30457                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30458                                         ;;
30459                                 (msvcdll)
30460                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30461                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30462                                         ;;
30463                                 (*)
30464                                         cf_add_lib=
30465                                         ;;
30466                                 esac
30467                                 if test -n "$cf_add_lib"
30468                                 then
30469                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30470                                         continue
30471                                 fi
30472                         fi
30473                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30474                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30475                 done
30476
30477                 if test "$cf_dir" = ncurses ; then
30478                         cf_subsets="$LIB_SUBSETS"
30479                         cf_r_parts="$cf_subsets"
30480                         cf_liblist="$Libs_To_Make"
30481
30482                         while test -n "$cf_r_parts"
30483                         do
30484                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30485                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30486                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30487                                         cf_add_lib=
30488                                         case "$cf_l_parts" in
30489                                         (*termlib*)
30490                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30491                                                 ;;
30492                                         (*ticlib*)
30493                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30494                                                 ;;
30495                                         (*)
30496                                                 break
30497                                                 ;;
30498                                         esac
30499                                         if test -n "$cf_add_lib"; then
30500                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30501                                         fi
30502                                 else
30503                                         break
30504                                 fi
30505                         done
30506                 else
30507                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30508                 fi
30509
30510                 if test "$cf_dir" = c++; then
30511                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30512                                 cf_list=
30513                                 for cf_item in $Libs_To_Make
30514                                 do
30515                                         case "$cf_item" in
30516                                         (*.a)
30517                                                 ;;
30518                                         (*)
30519                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30520                                                 ;;
30521                                         esac
30522                                         for cf_test in $cf_list
30523                                         do
30524                                                 if test "$cf_test" = "$cf_item"
30525                                                 then
30526                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30527                                                         cf_item=
30528                                                         break
30529                                                 fi
30530                                         done
30531                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30532                                 done
30533                                 Libs_To_Make="$cf_list"
30534                         fi
30535                 fi
30536
30537                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30538                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30539                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30540                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30541
30542                 $AWK -f "$srcdir/mk-0th.awk" \
30543                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30544                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30545
30546                 for cf_subset in $cf_subsets
30547                 do
30548                         cf_subdirs=
30549                         for cf_item in $cf_LIST_MODELS
30550                         do
30551
30552                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30553
30554 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30555
30556                         CXX_MODEL=$cf_ITEM
30557                         if test "$CXX_MODEL" = SHARED; then
30558                                 case "$cf_cv_shlib_version" in
30559                                 (cygdll|msysdll|mingw|msvcdll)
30560                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30561
30562 echo "${as_me:-configure}:30562: testing overriding CXX_MODEL to SHARED ..." 1>&5
30563
30564                                         with_shared_cxx=yes
30565                                         ;;
30566                                 (*)
30567                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30568                                         ;;
30569                                 esac
30570                         fi
30571
30572         case X$cf_item in
30573         (Xlibtool)
30574                 cf_suffix='.la'
30575                 cf_depsuf=$cf_suffix
30576                 ;;
30577         (Xdebug)
30578                 case "$cf_cv_system_name" in
30579                 (*-msvc*)
30580                         cf_suffix='_g.lib'
30581                         ;;
30582                 (*)
30583                         cf_suffix='_g.a'
30584                         ;;
30585                 esac
30586                 cf_depsuf=$cf_suffix
30587                 ;;
30588         (Xprofile)
30589                 case "$cf_cv_system_name" in
30590                 (*-msvc*)
30591                         cf_suffix='_p.lib'
30592                         ;;
30593                 (*)
30594                         cf_suffix='_p.a'
30595                         ;;
30596                 esac
30597                 cf_depsuf=$cf_suffix
30598                 ;;
30599         (Xshared)
30600                 case "$cf_cv_system_name" in
30601                 (aix[5-7]*)
30602                         cf_suffix='.so'
30603                         cf_depsuf=$cf_suffix
30604                         ;;
30605                 (*-msvc*)
30606                         cf_suffix='.dll'
30607                         cf_depsuf='.dll.lib'
30608                         ;;
30609                 (cygwin*|msys*|mingw*)
30610                         cf_suffix='.dll'
30611                         cf_depsuf='.dll.a'
30612                         ;;
30613                 (darwin*)
30614                         cf_suffix='.dylib'
30615                         cf_depsuf=$cf_suffix
30616                         ;;
30617                 (hpux*)
30618                         case "$target" in
30619                         (ia64*)
30620                                 cf_suffix='.so'
30621                                 cf_depsuf=$cf_suffix
30622                                 ;;
30623                         (*)
30624                                 cf_suffix='.sl'
30625                                 cf_depsuf=$cf_suffix
30626                                 ;;
30627                         esac
30628                         ;;
30629                 (*)
30630                         cf_suffix='.so'
30631                         cf_depsuf=$cf_suffix
30632                         ;;
30633                 esac
30634                 ;;
30635         (*)
30636                 case "$target" in
30637                 (*-msvc*)
30638                         cf_suffix='.lib'
30639                         ;;
30640                 (*)
30641                         cf_suffix='.a'
30642                         ;;
30643                 esac
30644                 cf_depsuf=$cf_suffix
30645                 ;;
30646         esac
30647         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30648         then
30649                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30650                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30651         fi
30652
30653         case $cf_item in
30654         (libtool) cf_subdir='obj_lo'  ;;
30655         (normal)  cf_subdir='objects' ;;
30656         (debug)   cf_subdir='obj_g' ;;
30657         (profile) cf_subdir='obj_p' ;;
30658         (shared)
30659                 case "$cf_cv_system_name" in
30660                 (cygwin|msys)
30661                         cf_subdir='objects' ;;
30662                 (*)
30663                         cf_subdir='obj_s' ;;
30664                 esac
30665         esac
30666
30667                         # Test for case where we build libtinfo with a different name.
30668                         cf_libname=$cf_dir
30669                         if test "$cf_dir" = ncurses ; then
30670                                 case "$cf_subset" in
30671                                 (*base*)
30672                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30673                                         ;;
30674                                 (*termlib*)
30675                                         cf_libname=$TINFO_LIB_SUFFIX
30676                                         ;;
30677                                 (ticlib*)
30678                                         cf_libname=$TICS_LIB_SUFFIX
30679                                         ;;
30680                                 esac
30681                         elif test "$cf_dir" = c++ ; then
30682
30683 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30684
30685 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30686
30687                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30688                         else
30689
30690 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30691
30692 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30693
30694                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30695                         fi
30696                         if test -n "${USE_ARG_SUFFIX}" ; then
30697                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30698                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30699                         fi
30700
30701                         # These dependencies really are for development, not
30702                         # builds, but they are useful in porting, too.
30703                         cf_depend="../include/ncurses_cfg.h"
30704                         if test "$srcdir" = "."; then
30705                                 cf_reldir="."
30706                         else
30707                                 cf_reldir="\${srcdir}"
30708                         fi
30709
30710                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30711                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30712                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30713                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30714                         fi
30715
30716                         cf_dir_suffix=
30717                         old_cf_suffix="$cf_suffix"
30718                         if test "$cf_cv_shlib_version_infix" = yes ; then
30719                         if test -n "$USE_LIB_SUFFIX" ; then
30720                                 case "$USE_LIB_SUFFIX" in
30721                                 (tw*)
30722                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30723                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30724                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30725                                         ;;
30726                                 (t*)
30727                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30728                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30729                                         cf_dir_suffix=t$EXTRA_SUFFIX
30730                                         ;;
30731                                 (w*)
30732                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30733                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30734                                         cf_dir_suffix=w$EXTRA_SUFFIX
30735                                         ;;
30736                                 (*)
30737                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30738                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30739                                         cf_dir_suffix=$EXTRA_SUFFIX
30740                                         ;;
30741                                 esac
30742                         fi
30743                         fi
30744
30745                         $AWK -f "$srcdir/mk-1st.awk" \
30746                                 name=${cf_libname}${cf_dir_suffix} \
30747                                 traces=$LIB_TRACING \
30748                                 MODEL=$cf_ITEM \
30749                                 CXX_MODEL=$CXX_MODEL \
30750                                 LIB_SUFFIX=$LIB_SUFFIX \
30751                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30752                                 make_phony="${cf_cv_make_PHONY:-no}" \
30753                                 model=$cf_subdir \
30754                                 prefix=$cf_prefix \
30755                                 suffix=$cf_suffix \
30756                                 subset=$cf_subset \
30757                                 driver=$cf_cv_term_driver \
30758                                 SymLink="$LN_S" \
30759                                 TermlibRoot=$TINFO_NAME \
30760                                 TermlibSuffix=$TINFO_SUFFIX \
30761                                 ShlibVer=$cf_cv_shlib_version \
30762                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30763                                 ReLink=${cf_cv_do_relink:-no} \
30764                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30765                                 DoLinks=$cf_cv_do_symlinks \
30766                                 rmSoLocs=$cf_cv_rm_so_locs \
30767                                 ldconfig="$LDCONFIG" \
30768                                 overwrite=$WITH_OVERWRITE \
30769                                 depend="$cf_depend" \
30770                                 host="$host" \
30771                                 libtool_version="$LIBTOOL_VERSION" \
30772                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30773
30774                         cf_suffix="$old_cf_suffix"
30775
30776                         for cf_subdir2 in $cf_subdirs lib
30777                         do
30778                                 test "$cf_subdir" = "$cf_subdir2" && break
30779                         done
30780                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30781                         $AWK -f "$srcdir/mk-2nd.awk" \
30782                                 name=$cf_dir \
30783                                 traces=$LIB_TRACING \
30784                                 MODEL=$cf_ITEM \
30785                                 model=$cf_subdir \
30786                                 subset=$cf_subset \
30787                                 srcdir=$srcdir \
30788                                 echo=$WITH_ECHO \
30789                                 crenames=$cf_cv_prog_CC_c_o \
30790                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30791                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30792                         cf_subdirs="$cf_subdirs $cf_subdir"
30793                         done
30794                 done
30795         fi
30796
30797         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30798 done
30799
30800 echo >> Makefile
30801 echo '# generated by CF_LIB_RULES' >> Makefile
30802
30803 if test "x$cf_cv_make_PHONY" = xyes ; then
30804         cat >> Makefile <<-CF_EOF
30805
30806         .PHONY :        libs
30807         .PHONY :        lintlib
30808         .PHONY :        install.includes
30809         .PHONY :        uninstall.includes
30810         .PHONY :        install.libs
30811         .PHONY :        uninstall.libs
30812 CF_EOF
30813 fi
30814
30815 for cf_dir in $SRC_SUBDIRS
30816 do
30817         if test ! -d "$srcdir/$cf_dir" ; then
30818                 continue
30819         fi
30820
30821         if test -f "$cf_dir/Makefile" ; then
30822                 case "$cf_dir" in
30823                 (Ada95)
30824                         echo 'libs \' >> Makefile
30825                         echo 'install.libs \' >> Makefile
30826                         echo 'uninstall.libs ::' >> Makefile
30827                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30828                         ;;
30829                 esac
30830         fi
30831
30832         if test -f "$srcdir/$cf_dir/modules" ; then
30833
30834                 if test "x$cf_cv_make_PHONY" = xyes ; then
30835                         cat >> Makefile <<-CF_EOF
30836
30837                         .PHONY :        install.$cf_dir
30838                         .PHONY :        uninstall.$cf_dir
30839 CF_EOF
30840                 fi
30841
30842                 echo >> Makefile
30843                 if test -f "$srcdir/$cf_dir/headers" ; then
30844 cat >> Makefile <<CF_EOF
30845 install.includes \\
30846 uninstall.includes \\
30847 CF_EOF
30848                 fi
30849
30850 cat >> Makefile <<CF_EOF
30851 lint \\
30852 libs \\
30853 lintlib \\
30854 install.libs \\
30855 uninstall.libs \\
30856 install.$cf_dir \\
30857 uninstall.$cf_dir ::
30858         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30859 CF_EOF
30860         elif test -f "$srcdir/$cf_dir/headers" ; then
30861 cat >> Makefile <<CF_EOF
30862
30863 libs \\
30864 install.libs \\
30865 uninstall.libs \\
30866 install.includes \\
30867 uninstall.includes ::
30868         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30869 CF_EOF
30870 fi
30871 done
30872
30873 if test "x$cf_cv_make_PHONY" = xyes ; then
30874         cat >> Makefile <<-CF_EOF
30875
30876         .PHONY :        install.data
30877         .PHONY :        uninstall.data
30878 CF_EOF
30879 fi
30880
30881 if test "x$cf_with_db_install" = xyes; then
30882 cat >> Makefile <<CF_EOF
30883
30884 install.libs uninstall.libs \\
30885 install.data uninstall.data ::
30886 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30887 CF_EOF
30888 else
30889 cat >> Makefile <<CF_EOF
30890
30891 install.libs uninstall.libs ::
30892         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30893 CF_EOF
30894 fi
30895
30896 if test "x$cf_with_manpages" = xyes; then
30897
30898 if test "x$cf_cv_make_PHONY" = xyes ; then
30899         cat >> Makefile <<-CF_EOF
30900
30901         .PHONY :        install.man
30902         .PHONY :        uninstall.man
30903 CF_EOF
30904 fi
30905
30906 cat >> Makefile <<CF_EOF
30907
30908 install.man \\
30909 uninstall.man ::
30910         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30911 CF_EOF
30912 fi
30913
30914 cat >> Makefile <<CF_EOF
30915
30916 distclean ::
30917         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30918         rm -f headers.sh headers.sed mk_shared_lib.sh
30919         rm -f edit_man.* man_alias.*
30920         rm -rf \${DIRS_TO_MAKE}
30921 CF_EOF
30922
30923 # Special case: tack's manpage lives in its own directory.
30924 if test "x$cf_with_manpages" = xyes; then
30925 if test "x$cf_with_tack" = "xyes"; then
30926 cat >> Makefile <<CF_EOF
30927
30928 install.man \\
30929 uninstall.man ::
30930         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30931 CF_EOF
30932 fi
30933 fi
30934
30935 rm -f headers.sed headers.sh
30936
30937 echo creating headers.sh
30938 cat >headers.sh <<CF_EOF
30939 #! $SHELL
30940 # This shell script is generated by the 'configure' script.  It is invoked in a
30941 # subdirectory of the build tree.  It generates a sed-script in the parent
30942 # directory that is used to adjust includes for header files that reside in a
30943 # subdirectory of /usr/include, etc.
30944 PRG=""
30945 while test \$# != 3
30946 do
30947 PRG="\$PRG \$1"; shift
30948 done
30949 DST=\$1
30950 REF=\$2
30951 SRC=\$3
30952 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30953 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30954 echo installing \$SRC in \$DST
30955 CF_EOF
30956
30957 if test "$WITH_CURSES_H" = yes; then
30958         cat >>headers.sh <<CF_EOF
30959 case \$DST in
30960 (/*/include/*)
30961         END=\`basename \$DST\`
30962         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30963         do
30964                 NAME=\`basename \$i\`
30965                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30966         done
30967         ;;
30968 (*)
30969         echo "" >> \$TMPSED
30970         ;;
30971 esac
30972 CF_EOF
30973
30974 else
30975         cat >>headers.sh <<CF_EOF
30976 case \$DST in
30977 (/*/include/*)
30978         END=\`basename \$DST\`
30979         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30980         do
30981                 NAME=\`basename \$i\`
30982                 if test "\$NAME" = "curses.h"
30983                 then
30984                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30985                         NAME=ncurses.h
30986                 fi
30987                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30988         done
30989         ;;
30990 (*)
30991         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30992         ;;
30993 esac
30994 CF_EOF
30995 fi
30996 cat >>headers.sh <<CF_EOF
30997 rm -f \$TMPSRC
30998 sed -f \$TMPSED \$SRC > \$TMPSRC
30999 NAME=\`basename \$SRC\`
31000 CF_EOF
31001 if test "$WITH_CURSES_H" != yes; then
31002         cat >>headers.sh <<CF_EOF
31003 test "\$NAME" = "curses.h" && NAME=ncurses.h
31004 CF_EOF
31005 fi
31006 cat >>headers.sh <<CF_EOF
31007 # Just in case someone gzip'd manpages, remove the conflicting copy.
31008 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31009
31010 eval \$PRG \$TMPSRC \$DST/\$NAME
31011 rm -f \$TMPSRC \$TMPSED
31012 CF_EOF
31013
31014 chmod 0755 headers.sh
31015
31016 for cf_dir in $SRC_SUBDIRS
31017 do
31018         if test ! -d "$srcdir/$cf_dir" ; then
31019                 continue
31020         fi
31021
31022         if test -f "$srcdir/$cf_dir/headers" ; then
31023                 $AWK -f "$srcdir/mk-hdr.awk" \
31024                         subset="$LIB_SUBSETS" \
31025                         compat="$WITH_CURSES_H" \
31026                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31027         fi
31028
31029         if test -f "$srcdir/$cf_dir/modules" ; then
31030                 if test "$cf_dir" != "c++" ; then
31031                         if test "x$cf_cv_make_PHONY" = xyes ; then
31032                                 cat >> $cf_dir/Makefile <<-CF_EOF
31033
31034                                 .PHONY :        depend
31035 CF_EOF
31036                         fi
31037
31038                         cat >>$cf_dir/Makefile <<"CF_EOF"
31039 depend : ${AUTO_SRC}
31040         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31041
31042 # DO NOT DELETE THIS LINE -- make depend depends on it.
31043 CF_EOF
31044                 fi
31045         fi
31046 done
31047
31048 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31049 if test -z "$USE_OLD_MAKERULES" ; then
31050         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31051 fi
31052 fi
31053  ;;
31054   esac
31055 done
31056 EOF
31057
31058 cat >>"$CONFIG_STATUS" <<\EOF
31059
31060 { (exit 0); exit 0; }
31061 EOF
31062 chmod +x "$CONFIG_STATUS"
31063 ac_clean_files=$ac_clean_files_save
31064
31065 # configure is writing to config.log, and then calls config.status.
31066 # config.status does its own redirection, appending to config.log.
31067 # Unfortunately, on DOS this fails, as config.log is still kept open
31068 # by configure, so config.status won't be able to write to it; its
31069 # output is simply discarded.  So we exec the FD to /dev/null,
31070 # effectively closing config.log, so it can be properly (re)opened and
31071 # appended to by config.status.  When coming back to configure, we
31072 # need to make the FD available again.
31073 if test "$no_create" != yes; then
31074   ac_cs_success=:
31075   exec 5>/dev/null
31076   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31077   exec 5>>config.log
31078   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31079   # would make configure fail if this is the last instruction.
31080   "$ac_cs_success" || { (exit 1); exit 1; }
31081 fi
31082 ${MAKE:-make} preinstall