]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20211030
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.737 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 case x$cf_cv_abi_version in
1724 (x[6789])
1725         cf_dft_ext_colors=yes
1726         cf_dft_ext_const=yes
1727         cf_dft_ext_mouse=yes
1728         cf_dft_ext_putwin=yes
1729         cf_dft_ext_spfuncs=yes
1730         cf_dft_filter_syms=yes
1731         cf_dft_chtype=uint32_t
1732         cf_dft_mmask_t=uint32_t
1733         cf_dft_interop=yes
1734         cf_dft_tparm_arg=intptr_t
1735         cf_dft_with_lp64=yes
1736         ;;
1737 (*)
1738         cf_dft_ext_colors=no
1739         cf_dft_ext_const=no
1740         cf_dft_ext_mouse=no
1741         cf_dft_ext_putwin=no
1742         cf_dft_ext_spfuncs=no
1743         cf_dft_filter_syms=no
1744         cf_dft_chtype=auto
1745         cf_dft_mmask_t=auto
1746         cf_dft_interop=no
1747         cf_dft_tparm_arg=long
1748         cf_dft_with_lp64=no
1749         ;;
1750 esac
1751
1752 ###     Checks for programs.
1753
1754 # Check whether --with-ada or --without-ada was given.
1755 if test "${with_ada+set}" = set; then
1756   withval="$with_ada"
1757   cf_with_ada=$withval
1758 else
1759   cf_with_ada=yes
1760 fi;
1761
1762 if test "x$cf_with_ada" = xyes
1763 then
1764         cf_prog_cc="gnatgcc gcc cc"
1765 else
1766         cf_prog_cc="gcc cc"
1767 fi
1768
1769 ac_ext=c
1770 ac_cpp='$CPP $CPPFLAGS'
1771 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1772 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1774 ac_main_return="return"
1775 if test -n "$ac_tool_prefix"; then
1776   for ac_prog in $cf_prog_cc
1777   do
1778     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1779 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1780 echo "$as_me:1780: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   ac_save_IFS=$IFS; IFS=$ac_path_separator
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791   IFS=$ac_save_IFS
1792   test -z "$ac_dir" && ac_dir=.
1793   $as_executable_p "$ac_dir/$ac_word" || continue
1794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1795 echo "$as_me:1795: found $ac_dir/$ac_word" >&5
1796 break
1797 done
1798
1799 fi
1800 fi
1801 CC=$ac_cv_prog_CC
1802 if test -n "$CC"; then
1803   echo "$as_me:1803: result: $CC" >&5
1804 echo "${ECHO_T}$CC" >&6
1805 else
1806   echo "$as_me:1806: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1808 fi
1809
1810     test -n "$CC" && break
1811   done
1812 fi
1813 if test -z "$CC"; then
1814   ac_ct_CC=$CC
1815   for ac_prog in $cf_prog_cc
1816 do
1817   # Extract the first word of "$ac_prog", so it can be a program name with args.
1818 set dummy $ac_prog; ac_word=$2
1819 echo "$as_me:1819: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1822   echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824   if test -n "$ac_ct_CC"; then
1825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1826 else
1827   ac_save_IFS=$IFS; IFS=$ac_path_separator
1828 ac_dummy="$PATH"
1829 for ac_dir in $ac_dummy; do
1830   IFS=$ac_save_IFS
1831   test -z "$ac_dir" && ac_dir=.
1832   $as_executable_p "$ac_dir/$ac_word" || continue
1833 ac_cv_prog_ac_ct_CC="$ac_prog"
1834 echo "$as_me:1834: found $ac_dir/$ac_word" >&5
1835 break
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:1842: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:1845: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 test -z "$CC" && { { echo "$as_me:1855: error: no acceptable cc found in \$PATH" >&5
1856 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1857    { (exit 1); exit 1; }; }
1858
1859 # Provide some information about the compiler.
1860 echo "$as_me:1860:" \
1861      "checking for C compiler version" >&5
1862 ac_compiler=`set X $ac_compile; echo "$2"`
1863 { (eval echo "$as_me:1863: \"$ac_compiler --version </dev/null >&5\"") >&5
1864   (eval $ac_compiler --version </dev/null >&5) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit "$ac_status"); }
1868 { (eval echo "$as_me:1868: \"$ac_compiler -v </dev/null >&5\"") >&5
1869   (eval $ac_compiler -v </dev/null >&5) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit "$ac_status"); }
1873 { (eval echo "$as_me:1873: \"$ac_compiler -V </dev/null >&5\"") >&5
1874   (eval $ac_compiler -V </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit "$ac_status"); }
1878
1879 cat >"conftest.$ac_ext" <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 ac_clean_files_save=$ac_clean_files
1892 ac_clean_files="$ac_clean_files a.out a.exe"
1893 # Try to create an executable without -o first, disregard a.out.
1894 # It will help us diagnose broken compilers, and finding out an intuition
1895 # of exeext.
1896 echo "$as_me:1896: checking for C compiler default output" >&5
1897 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1898 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1899 if { (eval echo "$as_me:1899: \"$ac_link_default\"") >&5
1900   (eval $ac_link_default) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit "$ac_status"); }; then
1904   # Find the output, starting from the most likely.  This scheme is
1905 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1906 # resort.
1907 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1908                 ls a.out conftest 2>/dev/null;
1909                 ls a.* conftest.* 2>/dev/null`; do
1910   case $ac_file in
1911     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1912     a.out ) # We found the default executable, but exeext='' is most
1913             # certainly right.
1914             break;;
1915     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1916           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1917           export ac_cv_exeext
1918           break;;
1919     * ) break;;
1920   esac
1921 done
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat "conftest.$ac_ext" >&5
1925 { { echo "$as_me:1925: error: C compiler cannot create executables" >&5
1926 echo "$as_me: error: C compiler cannot create executables" >&2;}
1927    { (exit 77); exit 77; }; }
1928 fi
1929
1930 ac_exeext=$ac_cv_exeext
1931 echo "$as_me:1931: result: $ac_file" >&5
1932 echo "${ECHO_T}$ac_file" >&6
1933
1934 # Check the compiler produces executables we can run.  If not, either
1935 # the compiler is broken, or we cross compile.
1936 echo "$as_me:1936: checking whether the C compiler works" >&5
1937 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1938 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1939 # If not cross compiling, check that we can run a simple program.
1940 if test "$cross_compiling" != yes; then
1941   if { ac_try='./$ac_file'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit "$ac_status"); }; }; then
1947     cross_compiling=no
1948   else
1949     if test "$cross_compiling" = maybe; then
1950         cross_compiling=yes
1951     else
1952         { { echo "$as_me:1952: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&5
1954 echo "$as_me: error: cannot run C compiled programs.
1955 If you meant to cross compile, use \`--host'." >&2;}
1956    { (exit 1); exit 1; }; }
1957     fi
1958   fi
1959 fi
1960 echo "$as_me:1960: result: yes" >&5
1961 echo "${ECHO_T}yes" >&6
1962
1963 rm -f a.out a.exe "conftest$ac_cv_exeext"
1964 ac_clean_files=$ac_clean_files_save
1965 # Check the compiler produces executables we can run.  If not, either
1966 # the compiler is broken, or we cross compile.
1967 echo "$as_me:1967: checking whether we are cross compiling" >&5
1968 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1969 echo "$as_me:1969: result: $cross_compiling" >&5
1970 echo "${ECHO_T}$cross_compiling" >&6
1971
1972 echo "$as_me:1972: checking for executable suffix" >&5
1973 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1974 if { (eval echo "$as_me:1974: \"$ac_link\"") >&5
1975   (eval $ac_link) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit "$ac_status"); }; then
1979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1981 # work properly (i.e., refer to `conftest.exe'), while it won't with
1982 # `rm'.
1983 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1984   case $ac_file in
1985     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1987           export ac_cv_exeext
1988           break;;
1989     * ) break;;
1990   esac
1991 done
1992 else
1993   { { echo "$as_me:1993: error: cannot compute EXEEXT: cannot compile and link" >&5
1994 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1995    { (exit 1); exit 1; }; }
1996 fi
1997
1998 rm -f "conftest$ac_cv_exeext"
1999 echo "$as_me:1999: result: $ac_cv_exeext" >&5
2000 echo "${ECHO_T}$ac_cv_exeext" >&6
2001
2002 rm -f "conftest.$ac_ext"
2003 EXEEXT=$ac_cv_exeext
2004 ac_exeext=$EXEEXT
2005 echo "$as_me:2005: checking for object suffix" >&5
2006 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2007 if test "${ac_cv_objext+set}" = set; then
2008   echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010   cat >"conftest.$ac_ext" <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013
2014 int
2015 main (void)
2016 {
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.o conftest.obj
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit "$ac_status"); }; then
2028   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2029   case $ac_file in
2030     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2032        break;;
2033   esac
2034 done
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat "conftest.$ac_ext" >&5
2038 { { echo "$as_me:2038: error: cannot compute OBJEXT: cannot compile" >&5
2039 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2040    { (exit 1); exit 1; }; }
2041 fi
2042
2043 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2044 fi
2045 echo "$as_me:2045: result: $ac_cv_objext" >&5
2046 echo "${ECHO_T}$ac_cv_objext" >&6
2047 OBJEXT=$ac_cv_objext
2048 ac_objext=$OBJEXT
2049 echo "$as_me:2049: checking whether we are using the GNU C compiler" >&5
2050 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2051 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2052   echo $ECHO_N "(cached) $ECHO_C" >&6
2053 else
2054   cat >"conftest.$ac_ext" <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057
2058 int
2059 main (void)
2060 {
2061 #ifndef __GNUC__
2062        choke me
2063 #endif
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f "conftest.$ac_objext"
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit "$ac_status"); } &&
2075          { ac_try='test -s "conftest.$ac_objext"'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; }; then
2081   ac_compiler_gnu=yes
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat "conftest.$ac_ext" >&5
2085 ac_compiler_gnu=no
2086 fi
2087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2088 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2089
2090 fi
2091 echo "$as_me:2091: result: $ac_cv_c_compiler_gnu" >&5
2092 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2093 GCC=`test $ac_compiler_gnu = yes && echo yes`
2094 ac_test_CFLAGS=${CFLAGS+set}
2095 ac_save_CFLAGS=$CFLAGS
2096 CFLAGS="-g"
2097 echo "$as_me:2097: checking whether $CC accepts -g" >&5
2098 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_g+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   cat >"conftest.$ac_ext" <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105
2106 int
2107 main (void)
2108 {
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 rm -f "conftest.$ac_objext"
2115 if { (eval echo "$as_me:2115: \"$ac_compile\"") >&5
2116   (eval $ac_compile) 2>&5
2117   ac_status=$?
2118   echo "$as_me:2118: \$? = $ac_status" >&5
2119   (exit "$ac_status"); } &&
2120          { ac_try='test -s "conftest.$ac_objext"'
2121   { (eval echo "$as_me:2121: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:2124: \$? = $ac_status" >&5
2125   (exit "$ac_status"); }; }; then
2126   ac_cv_prog_cc_g=yes
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 cat "conftest.$ac_ext" >&5
2130 ac_cv_prog_cc_g=no
2131 fi
2132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2133 fi
2134 echo "$as_me:2134: result: $ac_cv_prog_cc_g" >&5
2135 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2136 if test "$ac_test_CFLAGS" = set; then
2137   CFLAGS=$ac_save_CFLAGS
2138 elif test $ac_cv_prog_cc_g = yes; then
2139   if test "$GCC" = yes; then
2140     CFLAGS="-g -O2"
2141   else
2142     CFLAGS="-g"
2143   fi
2144 else
2145   if test "$GCC" = yes; then
2146     CFLAGS="-O2"
2147   else
2148     CFLAGS=
2149   fi
2150 fi
2151 # Some people use a C++ compiler to compile C.  Since we use `exit',
2152 # in C++ we need to declare it.  In case someone uses the same compiler
2153 # for both compiling C and C++ we need to have the C++ compiler decide
2154 # the declaration of exit, since it's the most demanding environment.
2155 cat >"conftest.$ac_ext" <<_ACEOF
2156 #ifndef __cplusplus
2157   choke me
2158 #endif
2159 _ACEOF
2160 rm -f "conftest.$ac_objext"
2161 if { (eval echo "$as_me:2161: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit "$ac_status"); } &&
2166          { ac_try='test -s "conftest.$ac_objext"'
2167   { (eval echo "$as_me:2167: \"$ac_try\"") >&5
2168   (eval $ac_try) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit "$ac_status"); }; }; then
2172   for ac_declaration in \
2173    ''\
2174    '#include <stdlib.h>' \
2175    'extern "C" void std::exit (int) throw (); using std::exit;' \
2176    'extern "C" void std::exit (int); using std::exit;' \
2177    'extern "C" void exit (int) throw ();' \
2178    'extern "C" void exit (int);' \
2179    'void exit (int);'
2180 do
2181   cat >"conftest.$ac_ext" <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184 #include <stdlib.h>
2185 $ac_declaration
2186 int
2187 main (void)
2188 {
2189 exit (42);
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f "conftest.$ac_objext"
2195 if { (eval echo "$as_me:2195: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:2198: \$? = $ac_status" >&5
2199   (exit "$ac_status"); } &&
2200          { ac_try='test -s "conftest.$ac_objext"'
2201   { (eval echo "$as_me:2201: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit "$ac_status"); }; }; then
2206   :
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 continue
2211 fi
2212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2213   cat >"conftest.$ac_ext" <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 $ac_declaration
2217 int
2218 main (void)
2219 {
2220 exit (42);
2221   ;
2222   return 0;
2223 }
2224 _ACEOF
2225 rm -f "conftest.$ac_objext"
2226 if { (eval echo "$as_me:2226: \"$ac_compile\"") >&5
2227   (eval $ac_compile) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); } &&
2231          { ac_try='test -s "conftest.$ac_objext"'
2232   { (eval echo "$as_me:2232: \"$ac_try\"") >&5
2233   (eval $ac_try) 2>&5
2234   ac_status=$?
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit "$ac_status"); }; }; then
2237   break
2238 else
2239   echo "$as_me: failed program was:" >&5
2240 cat "conftest.$ac_ext" >&5
2241 fi
2242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2243 done
2244 rm -rf conftest*
2245 if test -n "$ac_declaration"; then
2246   echo '#ifdef __cplusplus' >>confdefs.h
2247   echo "$ac_declaration"    >>confdefs.h
2248   echo '#endif'             >>confdefs.h
2249 fi
2250
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat "conftest.$ac_ext" >&5
2254 fi
2255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2256 ac_ext=c
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2259 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2261 ac_main_return="return"
2262
2263 GCC_VERSION=none
2264 if test "$GCC" = yes ; then
2265         echo "$as_me:2265: checking version of $CC" >&5
2266 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2267         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2268         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2269         echo "$as_me:2269: result: $GCC_VERSION" >&5
2270 echo "${ECHO_T}$GCC_VERSION" >&6
2271 fi
2272
2273 INTEL_COMPILER=no
2274
2275 if test "$GCC" = yes ; then
2276         case "$host_os" in
2277         (linux*|gnu*)
2278                 echo "$as_me:2278: checking if this is really Intel C compiler" >&5
2279 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2280                 cf_save_CFLAGS="$CFLAGS"
2281                 CFLAGS="$CFLAGS -no-gcc"
2282                 cat >"conftest.$ac_ext" <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285
2286 int
2287 main (void)
2288 {
2289
2290 #ifdef __INTEL_COMPILER
2291 #else
2292 make an error
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f "conftest.$ac_objext"
2300 if { (eval echo "$as_me:2300: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>&5
2302   ac_status=$?
2303   echo "$as_me:2303: \$? = $ac_status" >&5
2304   (exit "$ac_status"); } &&
2305          { ac_try='test -s "conftest.$ac_objext"'
2306   { (eval echo "$as_me:2306: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:2309: \$? = $ac_status" >&5
2310   (exit "$ac_status"); }; }; then
2311   INTEL_COMPILER=yes
2312 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2313
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat "conftest.$ac_ext" >&5
2317 fi
2318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2319                 CFLAGS="$cf_save_CFLAGS"
2320                 echo "$as_me:2320: result: $INTEL_COMPILER" >&5
2321 echo "${ECHO_T}$INTEL_COMPILER" >&6
2322                 ;;
2323         esac
2324 fi
2325
2326 CLANG_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         echo "$as_me:2329: checking if this is really Clang C compiler" >&5
2330 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2331         cf_save_CFLAGS="$CFLAGS"
2332         cat >"conftest.$ac_ext" <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335
2336 int
2337 main (void)
2338 {
2339
2340 #ifdef __clang__
2341 #else
2342 make an error
2343 #endif
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f "conftest.$ac_objext"
2350 if { (eval echo "$as_me:2350: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit "$ac_status"); } &&
2355          { ac_try='test -s "conftest.$ac_objext"'
2356   { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); }; }; then
2361   CLANG_COMPILER=yes
2362
2363 else
2364   echo "$as_me: failed program was:" >&5
2365 cat "conftest.$ac_ext" >&5
2366 fi
2367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2368         CFLAGS="$cf_save_CFLAGS"
2369         echo "$as_me:2369: result: $CLANG_COMPILER" >&5
2370 echo "${ECHO_T}$CLANG_COMPILER" >&6
2371 fi
2372
2373 CLANG_VERSION=none
2374
2375 if test "x$CLANG_COMPILER" = "xyes" ; then
2376         case "$CC" in
2377         (c[1-9][0-9]|*/c[1-9][0-9])
2378                 { echo "$as_me:2378: WARNING: replacing broken compiler alias $CC" >&5
2379 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2380                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2381                 CC=clang
2382                 ;;
2383         esac
2384
2385         echo "$as_me:2385: checking version of $CC" >&5
2386 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2387         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2388         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2389         echo "$as_me:2389: result: $CLANG_VERSION" >&5
2390 echo "${ECHO_T}$CLANG_VERSION" >&6
2391
2392         for cf_clang_opt in \
2393                 -Qunused-arguments \
2394                 -Wno-error=implicit-function-declaration
2395         do
2396                 echo "$as_me:2396: checking if option $cf_clang_opt works" >&5
2397 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2398                 cf_save_CFLAGS="$CFLAGS"
2399                 CFLAGS="$CFLAGS $cf_clang_opt"
2400                 cat >"conftest.$ac_ext" <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404                         #include <stdio.h>
2405 int
2406 main (void)
2407 {
2408
2409                         printf("hello!\\n");
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2415 if { (eval echo "$as_me:2415: \"$ac_link\"") >&5
2416   (eval $ac_link) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); } &&
2420          { ac_try='test -s "conftest$ac_exeext"'
2421   { (eval echo "$as_me:2421: \"$ac_try\"") >&5
2422   (eval $ac_try) 2>&5
2423   ac_status=$?
2424   echo "$as_me:2424: \$? = $ac_status" >&5
2425   (exit "$ac_status"); }; }; then
2426
2427                         cf_clang_optok=yes
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat "conftest.$ac_ext" >&5
2431
2432                         cf_clang_optok=no
2433 fi
2434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2435                 echo "$as_me:2435: result: $cf_clang_optok" >&5
2436 echo "${ECHO_T}$cf_clang_optok" >&6
2437                 CFLAGS="$cf_save_CFLAGS"
2438                 if test "$cf_clang_optok" = yes; then
2439                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2440
2441 echo "${as_me:-configure}:2441: testing adding option $cf_clang_opt ..." 1>&5
2442
2443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2444         CFLAGS="${CFLAGS}$cf_clang_opt"
2445
2446                 fi
2447         done
2448 fi
2449
2450 echo "$as_me:2450: checking for $CC option to accept ANSI C" >&5
2451 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2452 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2453   echo $ECHO_N "(cached) $ECHO_C" >&6
2454 else
2455   ac_cv_prog_cc_stdc=no
2456 ac_save_CC=$CC
2457 cat >"conftest.$ac_ext" <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <stdarg.h>
2461 #include <stdio.h>
2462 #include <sys/types.h>
2463 #include <sys/stat.h>
2464 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2465 struct buf { int x; };
2466 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2467 static char *e (p, i)
2468      char **p;
2469      int i;
2470 {
2471   return p[i];
2472 }
2473 static char *f (char * (*g) (char **, int), char **p, ...)
2474 {
2475   char *s;
2476   va_list v;
2477   va_start (v,p);
2478   s = g (p, va_arg (v,int));
2479   va_end (v);
2480   return s;
2481 }
2482 int test (int i, double x);
2483 struct s1 {int (*f) (int a);};
2484 struct s2 {int (*f) (double a);};
2485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2486 int argc;
2487 char **argv;
2488 int
2489 main (void)
2490 {
2491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2492   ;
2493   return 0;
2494 }
2495 _ACEOF
2496 # Don't try gcc -ansi; that turns off useful extensions and
2497 # breaks some systems' header files.
2498 # AIX                   -qlanglvl=ansi
2499 # Ultrix and OSF/1      -std1
2500 # HP-UX 10.20 and later -Ae
2501 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2502 # SVR4                  -Xc -D__EXTENSIONS__
2503 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2504 do
2505   CC="$ac_save_CC $ac_arg"
2506   rm -f "conftest.$ac_objext"
2507 if { (eval echo "$as_me:2507: \"$ac_compile\"") >&5
2508   (eval $ac_compile) 2>&5
2509   ac_status=$?
2510   echo "$as_me:2510: \$? = $ac_status" >&5
2511   (exit "$ac_status"); } &&
2512          { ac_try='test -s "conftest.$ac_objext"'
2513   { (eval echo "$as_me:2513: \"$ac_try\"") >&5
2514   (eval $ac_try) 2>&5
2515   ac_status=$?
2516   echo "$as_me:2516: \$? = $ac_status" >&5
2517   (exit "$ac_status"); }; }; then
2518   ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521   echo "$as_me: failed program was:" >&5
2522 cat "conftest.$ac_ext" >&5
2523 fi
2524 rm -f "conftest.$ac_objext"
2525 done
2526 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:2533: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:2536: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # This should have been defined by AC_PROG_CC
2542 : "${CC:=cc}"
2543
2544 echo "$as_me:2544: checking \$CFLAGS variable" >&5
2545 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2546 case "x$CFLAGS" in
2547 (*-[IUD]*)
2548         echo "$as_me:2548: result: broken" >&5
2549 echo "${ECHO_T}broken" >&6
2550         { echo "$as_me:2550: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2551 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2552         cf_flags="$CFLAGS"
2553         CFLAGS=
2554         for cf_arg in $cf_flags
2555         do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566         case "$cf_add_cflags" in
2567         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568                 case "$cf_add_cflags" in
2569                 (-D*)
2570                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test "$cf_fix_cppflags" = yes ; then
2577
2578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 (*$cf_add_cflags)
2593                         ;;
2594                 (*)
2595                         case "$cf_add_cflags" in
2596                         (-D*)
2597                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2601                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2602
2603                                 ;;
2604                         esac
2605
2606         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609                         ;;
2610                 esac
2611                 ;;
2612         (*)
2613
2614         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617                 ;;
2618         esac
2619         ;;
2620 (yes)
2621
2622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637         CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655         done
2656         ;;
2657 (*)
2658         echo "$as_me:2658: result: ok" >&5
2659 echo "${ECHO_T}ok" >&6
2660         ;;
2661 esac
2662
2663 echo "$as_me:2663: checking \$CC variable" >&5
2664 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2665 case "$CC" in
2666 (*[\ \  ]-*)
2667         echo "$as_me:2667: result: broken" >&5
2668 echo "${ECHO_T}broken" >&6
2669         { echo "$as_me:2669: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2670 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2671         # humor him...
2672         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2673         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2674         CC="$cf_prog"
2675         for cf_arg in $cf_flags
2676         do
2677                 case "x$cf_arg" in
2678                 (x-[IUDfgOW]*)
2679
2680 cf_fix_cppflags=no
2681 cf_new_cflags=
2682 cf_new_cppflags=
2683 cf_new_extra_cppflags=
2684
2685 for cf_add_cflags in $cf_arg
2686 do
2687 case "$cf_fix_cppflags" in
2688 (no)
2689         case "$cf_add_cflags" in
2690         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2691                 case "$cf_add_cflags" in
2692                 (-D*)
2693                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2694
2695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2696                                 && test -z "${cf_tst_cflags}" \
2697                                 && cf_fix_cppflags=yes
2698
2699                         if test "$cf_fix_cppflags" = yes ; then
2700
2701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2703
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706
2707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2709
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 (*$cf_add_cflags)
2716                         ;;
2717                 (*)
2718                         case "$cf_add_cflags" in
2719                         (-D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728
2729         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2730         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2731
2732                         ;;
2733                 esac
2734                 ;;
2735         (*)
2736
2737         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2738         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2739
2740                 ;;
2741         esac
2742         ;;
2743 (yes)
2744
2745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2747
2748         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2749
2750         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2751                 && test -z "${cf_tst_cflags}" \
2752                 && cf_fix_cppflags=no
2753         ;;
2754 esac
2755 done
2756
2757 if test -n "$cf_new_cflags" ; then
2758
2759         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2760         CFLAGS="${CFLAGS}$cf_new_cflags"
2761
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2767         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2768
2769 fi
2770
2771 if test -n "$cf_new_extra_cppflags" ; then
2772
2773         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2774         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2775
2776 fi
2777
2778                         ;;
2779                 (*)
2780                         CC="$CC $cf_arg"
2781                         ;;
2782                 esac
2783         done
2784         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2785
2786 echo "${as_me:-configure}:2786: testing resulting CC: '$CC' ..." 1>&5
2787
2788         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2789
2790 echo "${as_me:-configure}:2790: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2791
2792         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2793
2794 echo "${as_me:-configure}:2794: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2795
2796         ;;
2797 (*)
2798         echo "$as_me:2798: result: ok" >&5
2799 echo "${ECHO_T}ok" >&6
2800         ;;
2801 esac
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2806 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808 ac_main_return="return"
2809 echo "$as_me:2809: checking how to run the C preprocessor" >&5
2810 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2811 # On Suns, sometimes $CPP names a directory.
2812 if test -n "$CPP" && test -d "$CPP"; then
2813   CPP=
2814 fi
2815 if test -z "$CPP"; then
2816   if test "${ac_cv_prog_CPP+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819       # Double quotes because CPP needs to be expanded
2820     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2821     do
2822       ac_preproc_ok=false
2823 for ac_c_preproc_warn_flag in '' yes
2824 do
2825   # Use a header file that comes with gcc, so configuring glibc
2826   # with a fresh cross-compiler works.
2827   # On the NeXT, cc -E runs the code through the compiler's parser,
2828   # not just through cpp. "Syntax error" is here to catch this case.
2829   cat >"conftest.$ac_ext" <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 #include <assert.h>
2833                      Syntax error
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837   ac_status=$?
2838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839   rm -f conftest.er1
2840   cat conftest.err >&5
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit "$ac_status"); } >/dev/null; then
2843   if test -s conftest.err; then
2844     ac_cpp_err=$ac_c_preproc_warn_flag
2845   else
2846     ac_cpp_err=
2847   fi
2848 else
2849   ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852   :
2853 else
2854   echo "$as_me: failed program was:" >&5
2855   cat "conftest.$ac_ext" >&5
2856   # Broken: fails on valid input.
2857 continue
2858 fi
2859 rm -f conftest.err "conftest.$ac_ext"
2860
2861   # OK, works on sane cases.  Now check whether non-existent headers
2862   # can be detected and how.
2863   cat >"conftest.$ac_ext" <<_ACEOF
2864 #line 2864 "configure"
2865 #include "confdefs.h"
2866 #include <ac_nonexistent.h>
2867 _ACEOF
2868 if { (eval echo "$as_me:2868: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2869   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2870   ac_status=$?
2871   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:2874: \$? = $ac_status" >&5
2875   (exit "$ac_status"); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878   else
2879     ac_cpp_err=
2880   fi
2881 else
2882   ac_cpp_err=yes
2883 fi
2884 if test -z "$ac_cpp_err"; then
2885   # Broken: success on invalid input.
2886 continue
2887 else
2888   echo "$as_me: failed program was:" >&5
2889   cat "conftest.$ac_ext" >&5
2890   # Passes both tests.
2891 ac_preproc_ok=:
2892 break
2893 fi
2894 rm -f conftest.err "conftest.$ac_ext"
2895
2896 done
2897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2898 rm -f conftest.err "conftest.$ac_ext"
2899 if $ac_preproc_ok; then
2900   break
2901 fi
2902
2903     done
2904     ac_cv_prog_CPP=$CPP
2905
2906 fi
2907   CPP=$ac_cv_prog_CPP
2908 else
2909   ac_cv_prog_CPP=$CPP
2910 fi
2911 echo "$as_me:2911: result: $CPP" >&5
2912 echo "${ECHO_T}$CPP" >&6
2913 ac_preproc_ok=false
2914 for ac_c_preproc_warn_flag in '' yes
2915 do
2916   # Use a header file that comes with gcc, so configuring glibc
2917   # with a fresh cross-compiler works.
2918   # On the NeXT, cc -E runs the code through the compiler's parser,
2919   # not just through cpp. "Syntax error" is here to catch this case.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <assert.h>
2924                      Syntax error
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928   ac_status=$?
2929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930   rm -f conftest.er1
2931   cat conftest.err >&5
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit "$ac_status"); } >/dev/null; then
2934   if test -s conftest.err; then
2935     ac_cpp_err=$ac_c_preproc_warn_flag
2936   else
2937     ac_cpp_err=
2938   fi
2939 else
2940   ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943   :
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Broken: fails on valid input.
2948 continue
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952   # OK, works on sane cases.  Now check whether non-existent headers
2953   # can be detected and how.
2954   cat >"conftest.$ac_ext" <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <ac_nonexistent.h>
2958 _ACEOF
2959 if { (eval echo "$as_me:2959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2960   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2961   ac_status=$?
2962   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2963   rm -f conftest.er1
2964   cat conftest.err >&5
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit "$ac_status"); } >/dev/null; then
2967   if test -s conftest.err; then
2968     ac_cpp_err=$ac_c_preproc_warn_flag
2969   else
2970     ac_cpp_err=
2971   fi
2972 else
2973   ac_cpp_err=yes
2974 fi
2975 if test -z "$ac_cpp_err"; then
2976   # Broken: success on invalid input.
2977 continue
2978 else
2979   echo "$as_me: failed program was:" >&5
2980   cat "conftest.$ac_ext" >&5
2981   # Passes both tests.
2982 ac_preproc_ok=:
2983 break
2984 fi
2985 rm -f conftest.err "conftest.$ac_ext"
2986
2987 done
2988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2989 rm -f conftest.err "conftest.$ac_ext"
2990 if $ac_preproc_ok; then
2991   :
2992 else
2993   { { echo "$as_me:2993: error: C preprocessor \"$CPP\" fails sanity check" >&5
2994 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 ac_ext=c
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3001 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3003 ac_main_return="return"
3004
3005 if test $ac_cv_c_compiler_gnu = yes; then
3006     echo "$as_me:3006: checking whether $CC needs -traditional" >&5
3007 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3008 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011     ac_pattern="Autoconf.*'x'"
3012   cat >"conftest.$ac_ext" <<_ACEOF
3013 #line 3013 "configure"
3014 #include "confdefs.h"
3015 #include <sgtty.h>
3016 int Autoconf = TIOCGETP;
3017 _ACEOF
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3020   ac_cv_prog_gcc_traditional=yes
3021 else
3022   ac_cv_prog_gcc_traditional=no
3023 fi
3024 rm -rf conftest*
3025
3026   if test $ac_cv_prog_gcc_traditional = no; then
3027     cat >"conftest.$ac_ext" <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030 #include <termio.h>
3031 int Autoconf = TCGETA;
3032 _ACEOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3035   ac_cv_prog_gcc_traditional=yes
3036 fi
3037 rm -rf conftest*
3038
3039   fi
3040 fi
3041 echo "$as_me:3041: result: $ac_cv_prog_gcc_traditional" >&5
3042 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3043   if test $ac_cv_prog_gcc_traditional = yes; then
3044     CC="$CC -traditional"
3045   fi
3046 fi
3047
3048 echo "$as_me:3048: checking whether $CC understands -c and -o together" >&5
3049 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3050 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3051   echo $ECHO_N "(cached) $ECHO_C" >&6
3052 else
3053
3054 cat > conftest.$ac_ext <<CF_EOF
3055 int main(void)
3056 {
3057         ${cf_cv_main_return:-return}(0);
3058 }
3059 CF_EOF
3060 # We do the test twice because some compilers refuse to overwrite an
3061 # existing .o file with -o, though they will create one.
3062 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3063 if { (eval echo "$as_me:3063: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit "$ac_status"); } &&
3068   test -f conftest2.$ac_objext && { (eval echo "$as_me:3068: \"$ac_try\"") >&5
3069   (eval $ac_try) 2>&5
3070   ac_status=$?
3071   echo "$as_me:3071: \$? = $ac_status" >&5
3072   (exit "$ac_status"); };
3073 then
3074   eval cf_cv_prog_CC_c_o=yes
3075 else
3076   eval cf_cv_prog_CC_c_o=no
3077 fi
3078 rm -rf ./conftest*
3079
3080 fi
3081 if test "$cf_cv_prog_CC_c_o" = yes; then
3082   echo "$as_me:3082: result: yes" >&5
3083 echo "${ECHO_T}yes" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089 if test "$cross_compiling" = yes ; then
3090         LDCONFIG=:
3091 else
3092         case "$cf_cv_system_name" in
3093         (dragonfly*|mirbsd*|freebsd*)
3094                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3095                 ;;
3096         (*) LDPATH=$PATH:/sbin:/usr/sbin
3097                 # Extract the first word of "ldconfig", so it can be a program name with args.
3098 set dummy ldconfig; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   case $LDCONFIG in
3105   [\\/]* | ?:[\\/]*)
3106   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3107   ;;
3108   *)
3109   ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 ac_dummy="$LDPATH"
3111 for ac_dir in $ac_dummy; do
3112   IFS=$ac_save_IFS
3113   test -z "$ac_dir" && ac_dir=.
3114   if $as_executable_p "$ac_dir/$ac_word"; then
3115    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3116    echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3117    break
3118 fi
3119 done
3120
3121   ;;
3122 esac
3123 fi
3124 LDCONFIG=$ac_cv_path_LDCONFIG
3125
3126 if test -n "$LDCONFIG"; then
3127   echo "$as_me:3127: result: $LDCONFIG" >&5
3128 echo "${ECHO_T}$LDCONFIG" >&6
3129 else
3130   echo "$as_me:3130: result: no" >&5
3131 echo "${ECHO_T}no" >&6
3132 fi
3133
3134                 ;;
3135         esac
3136 fi
3137
3138 echo "$as_me:3138: checking if you want to ensure bool is consistent with C++" >&5
3139 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3140
3141 # Check whether --with-cxx or --without-cxx was given.
3142 if test "${with_cxx+set}" = set; then
3143   withval="$with_cxx"
3144   cf_with_cxx=$withval
3145 else
3146   cf_with_cxx=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_cxx" >&5
3149 echo "${ECHO_T}$cf_with_cxx" >&6
3150 if test "X$cf_with_cxx" = Xno ; then
3151         CXX=""
3152         GXX=""
3153 else
3154         # with autoconf 2.13, we can change the error to a warning:
3155                 ac_ext=cc
3156 ac_cpp='$CXXCPP $CPPFLAGS'
3157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3158 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3160 ac_main_return="return"
3161 if test -n "$ac_tool_prefix"; then
3162   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$CXX"; then
3172   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185 fi
3186 fi
3187 CXX=$ac_cv_prog_CXX
3188 if test -n "$CXX"; then
3189   echo "$as_me:3189: result: $CXX" >&5
3190 echo "${ECHO_T}$CXX" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196     test -n "$CXX" && break
3197   done
3198 fi
3199 if test -z "$CXX"; then
3200   ac_ct_CXX=$CXX
3201   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_CXX"; then
3211   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_CXX="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3227 if test -n "$ac_ct_CXX"; then
3228   echo "$as_me:3228: result: $ac_ct_CXX" >&5
3229 echo "${ECHO_T}$ac_ct_CXX" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$ac_ct_CXX" && break
3236 done
3237 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3238
3239   CXX=$ac_ct_CXX
3240 fi
3241
3242 # Provide some information about the compiler.
3243 echo "$as_me:3243:" \
3244      "checking for C++ compiler version" >&5
3245 ac_compiler=`set X $ac_compile; echo $2`
3246 { (eval echo "$as_me:3246: \"$ac_compiler --version </dev/null >&5\"") >&5
3247   (eval $ac_compiler --version </dev/null >&5) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit "$ac_status"); }
3251 { (eval echo "$as_me:3251: \"$ac_compiler -v </dev/null >&5\"") >&5
3252   (eval $ac_compiler -v </dev/null >&5) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit "$ac_status"); }
3256 { (eval echo "$as_me:3256: \"$ac_compiler -V </dev/null >&5\"") >&5
3257   (eval $ac_compiler -V </dev/null >&5) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit "$ac_status"); }
3261
3262 echo "$as_me:3262: checking whether we are using the GNU C++ compiler" >&5
3263 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3264 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   cat >"conftest.$ac_ext" <<_ACEOF
3268 #line 3268 "configure"
3269 #include "confdefs.h"
3270
3271 int
3272 main (void)
3273 {
3274 #ifndef __GNUC__
3275        choke me
3276 #endif
3277
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f "conftest.$ac_objext"
3283 if { (eval echo "$as_me:3283: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>&5
3285   ac_status=$?
3286   echo "$as_me:3286: \$? = $ac_status" >&5
3287   (exit "$ac_status"); } &&
3288          { ac_try='test -s "conftest.$ac_objext"'
3289   { (eval echo "$as_me:3289: \"$ac_try\"") >&5
3290   (eval $ac_try) 2>&5
3291   ac_status=$?
3292   echo "$as_me:3292: \$? = $ac_status" >&5
3293   (exit "$ac_status"); }; }; then
3294   ac_compiler_gnu=yes
3295 else
3296   echo "$as_me: failed program was:" >&5
3297 cat "conftest.$ac_ext" >&5
3298 ac_compiler_gnu=no
3299 fi
3300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3301 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3302
3303 fi
3304 echo "$as_me:3304: result: $ac_cv_cxx_compiler_gnu" >&5
3305 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3306 GXX=`test $ac_compiler_gnu = yes && echo yes`
3307 ac_test_CXXFLAGS=${CXXFLAGS+set}
3308 ac_save_CXXFLAGS=$CXXFLAGS
3309 CXXFLAGS="-g"
3310 echo "$as_me:3310: checking whether $CXX accepts -g" >&5
3311 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3312 if test "${ac_cv_prog_cxx_g+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   cat >"conftest.$ac_ext" <<_ACEOF
3316 #line 3316 "configure"
3317 #include "confdefs.h"
3318
3319 int
3320 main (void)
3321 {
3322
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 rm -f "conftest.$ac_objext"
3328 if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
3329   (eval $ac_compile) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit "$ac_status"); } &&
3333          { ac_try='test -s "conftest.$ac_objext"'
3334   { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3335   (eval $ac_try) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); }; }; then
3339   ac_cv_prog_cxx_g=yes
3340 else
3341   echo "$as_me: failed program was:" >&5
3342 cat "conftest.$ac_ext" >&5
3343 ac_cv_prog_cxx_g=no
3344 fi
3345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3346 fi
3347 echo "$as_me:3347: result: $ac_cv_prog_cxx_g" >&5
3348 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3349 if test "$ac_test_CXXFLAGS" = set; then
3350   CXXFLAGS=$ac_save_CXXFLAGS
3351 elif test $ac_cv_prog_cxx_g = yes; then
3352   if test "$GXX" = yes; then
3353     CXXFLAGS="-g -O2"
3354   else
3355     CXXFLAGS="-g"
3356   fi
3357 else
3358   if test "$GXX" = yes; then
3359     CXXFLAGS="-O2"
3360   else
3361     CXXFLAGS=
3362   fi
3363 fi
3364 for ac_declaration in \
3365    ''\
3366    '#include <stdlib.h>' \
3367    'extern "C" void std::exit (int) throw (); using std::exit;' \
3368    'extern "C" void std::exit (int); using std::exit;' \
3369    'extern "C" void exit (int) throw ();' \
3370    'extern "C" void exit (int);' \
3371    'void exit (int);'
3372 do
3373   cat >"conftest.$ac_ext" <<_ACEOF
3374 #line 3374 "configure"
3375 #include "confdefs.h"
3376 #include <stdlib.h>
3377 $ac_declaration
3378 int
3379 main (void)
3380 {
3381 exit (42);
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f "conftest.$ac_objext"
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388   (eval $ac_compile) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); } &&
3392          { ac_try='test -s "conftest.$ac_objext"'
3393   { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:3396: \$? = $ac_status" >&5
3397   (exit "$ac_status"); }; }; then
3398   :
3399 else
3400   echo "$as_me: failed program was:" >&5
3401 cat "conftest.$ac_ext" >&5
3402 continue
3403 fi
3404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3405   cat >"conftest.$ac_ext" <<_ACEOF
3406 #line 3406 "configure"
3407 #include "confdefs.h"
3408 $ac_declaration
3409 int
3410 main (void)
3411 {
3412 exit (42);
3413   ;
3414   return 0;
3415 }
3416 _ACEOF
3417 rm -f "conftest.$ac_objext"
3418 if { (eval echo "$as_me:3418: \"$ac_compile\"") >&5
3419   (eval $ac_compile) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423          { ac_try='test -s "conftest.$ac_objext"'
3424   { (eval echo "$as_me:3424: \"$ac_try\"") >&5
3425   (eval $ac_try) 2>&5
3426   ac_status=$?
3427   echo "$as_me:3427: \$? = $ac_status" >&5
3428   (exit "$ac_status"); }; }; then
3429   break
3430 else
3431   echo "$as_me: failed program was:" >&5
3432 cat "conftest.$ac_ext" >&5
3433 fi
3434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3435 done
3436 rm -rf conftest*
3437 if test -n "$ac_declaration"; then
3438   echo '#ifdef __cplusplus' >>confdefs.h
3439   echo "$ac_declaration"    >>confdefs.h
3440   echo '#endif'             >>confdefs.h
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3446 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448 ac_main_return="return"
3449
3450         ac_ext=cc
3451 ac_cpp='$CXXCPP $CPPFLAGS'
3452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3453 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3455 ac_main_return="return"
3456
3457         if test "x$cf_with_cxx" != xno
3458         then
3459                 # Several of the C++ configurations do not work, particularly when
3460                 # cross-compiling (20140913 -TD)
3461                 echo "$as_me:3461: checking if $CXX works" >&5
3462 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3463
3464                 save_CPPFLAGS="$CPPFLAGS"
3465                 eval cf_includedir=${includedir}
3466                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3467
3468 cat >"conftest.$ac_ext" <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdlib.h>
3473 #include <stdio.h>
3474
3475 int
3476 main (void)
3477 {
3478
3479                 printf("Hello world!\n")
3480
3481   ;
3482   return 0;
3483 }
3484 _ACEOF
3485 rm -f "conftest.$ac_objext"
3486 if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487   (eval $ac_compile) 2>&5
3488   ac_status=$?
3489   echo "$as_me:3489: \$? = $ac_status" >&5
3490   (exit "$ac_status"); } &&
3491          { ac_try='test -s "conftest.$ac_objext"'
3492   { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493   (eval $ac_try) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit "$ac_status"); }; }; then
3497   cf_cxx_works=yes
3498 else
3499   echo "$as_me: failed program was:" >&5
3500 cat "conftest.$ac_ext" >&5
3501 cf_cxx_works=no
3502 fi
3503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3504                 CPPFLAGS="$save_CPPFLAGS"
3505
3506                 echo "$as_me:3506: result: $cf_cxx_works" >&5
3507 echo "${ECHO_T}$cf_cxx_works" >&6
3508                 if test "x$cf_cxx_works" = xno
3509                 then
3510                         { echo "$as_me:3510: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3511 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3512                         cf_with_cxx=no; CXX=""; GXX="";
3513                 fi
3514         fi
3515         ac_ext=c
3516 ac_cpp='$CPP $CPPFLAGS'
3517 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3518 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3520 ac_main_return="return"
3521
3522         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3523         if test "$CXX" = "g++" ; then
3524                 # Extract the first word of "g++", so it can be a program name with args.
3525 set dummy g++; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_CXX+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   case $CXX in
3532   [\\/]* | ?:[\\/]*)
3533   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3534   ;;
3535   *)
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   if $as_executable_p "$ac_dir/$ac_word"; then
3542    ac_cv_path_CXX="$ac_dir/$ac_word"
3543    echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544    break
3545 fi
3546 done
3547
3548   ;;
3549 esac
3550 fi
3551 CXX=$ac_cv_path_CXX
3552
3553 if test -n "$CXX"; then
3554   echo "$as_me:3554: result: $CXX" >&5
3555 echo "${ECHO_T}$CXX" >&6
3556 else
3557   echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3559 fi
3560
3561         fi
3562         case "x$CXX" in
3563         (x|xg++)
3564                 { echo "$as_me:3564: WARNING: You don't have any C++ compiler, too bad" >&5
3565 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3566                 cf_with_cxx=no; CXX=""; GXX="";
3567                 ;;
3568         esac
3569 fi
3570
3571 GXX_VERSION=none
3572 if test "$GXX" = yes; then
3573         echo "$as_me:3573: checking version of ${CXX:-g++}" >&5
3574 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3575         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3576         if test -z "$GXX_VERSION"
3577         then
3578                 GXX_VERSION=unknown
3579                 GXX=no
3580         fi
3581         echo "$as_me:3581: result: $GXX_VERSION" >&5
3582 echo "${ECHO_T}$GXX_VERSION" >&6
3583 fi
3584
3585 case "$GXX_VERSION" in
3586 ([1-9][0-9].*)
3587         ;;
3588 (1.*|2.[0-6]*)
3589         { echo "$as_me:3589: WARNING: templates do not work" >&5
3590 echo "$as_me: WARNING: templates do not work" >&2;}
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: checking if you want to build C++ binding and demo" >&5
3595 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3596
3597 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3598 if test "${with_cxx_binding+set}" = set; then
3599   withval="$with_cxx_binding"
3600   cf_with_cxx_binding=$withval
3601 else
3602   cf_with_cxx_binding=$cf_with_cxx
3603 fi;
3604 echo "$as_me:3604: result: $cf_with_cxx_binding" >&5
3605 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3606
3607 echo "$as_me:3607: checking if you want to build with Ada" >&5
3608 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3609 echo "$as_me:3609: result: $cf_with_ada" >&5
3610 echo "${ECHO_T}$cf_with_ada" >&6
3611
3612 echo "$as_me:3612: checking if you want to install terminal database" >&5
3613 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3614
3615 # Check whether --enable-db-install or --disable-db-install was given.
3616 if test "${enable_db_install+set}" = set; then
3617   enableval="$enable_db_install"
3618   cf_with_db_install=$enableval
3619 else
3620   cf_with_db_install=yes
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_db_install" >&5
3623 echo "${ECHO_T}$cf_with_db_install" >&6
3624
3625 echo "$as_me:3625: checking if you want to install manpages" >&5
3626 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3627
3628 # Check whether --with-manpages or --without-manpages was given.
3629 if test "${with_manpages+set}" = set; then
3630   withval="$with_manpages"
3631   cf_with_manpages=$withval
3632 else
3633   cf_with_manpages=yes
3634 fi;
3635 echo "$as_me:3635: result: $cf_with_manpages" >&5
3636 echo "${ECHO_T}$cf_with_manpages" >&6
3637
3638 echo "$as_me:3638: checking if you want to build programs such as tic" >&5
3639 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3640
3641 # Check whether --with-progs or --without-progs was given.
3642 if test "${with_progs+set}" = set; then
3643   withval="$with_progs"
3644   cf_with_progs=$withval
3645 else
3646   cf_with_progs=yes
3647 fi;
3648 echo "$as_me:3648: result: $cf_with_progs" >&5
3649 echo "${ECHO_T}$cf_with_progs" >&6
3650
3651 if test -f "$srcdir/tack/tack.h" ; then
3652         if test "x$cross_compiling" = xyes ; then
3653                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3654
3655 echo "${as_me:-configure}:3655: testing ignoring tack because we are cross-compiling ..." 1>&5
3656
3657                 cf_with_tack=no
3658         else
3659                 echo "$as_me:3659: checking if you want to build the tack program" >&5
3660 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3661
3662 # Check whether --with-tack or --without-tack was given.
3663 if test "${with_tack+set}" = set; then
3664   withval="$with_tack"
3665   cf_with_tack=$withval
3666 else
3667   cf_with_tack=$cf_with_progs
3668 fi;
3669                 echo "$as_me:3669: result: $cf_with_tack" >&5
3670 echo "${ECHO_T}$cf_with_tack" >&6
3671         fi
3672 else
3673         cf_with_tack=no
3674 fi
3675
3676 echo "$as_me:3676: checking if you want to build test-programs" >&5
3677 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3678
3679 # Check whether --with-tests or --without-tests was given.
3680 if test "${with_tests+set}" = set; then
3681   withval="$with_tests"
3682   cf_with_tests=$withval
3683 else
3684   cf_with_tests=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_tests" >&5
3687 echo "${ECHO_T}$cf_with_tests" >&6
3688
3689 echo "$as_me:3689: checking if you wish to install curses.h" >&5
3690 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3691
3692 # Check whether --with-curses-h or --without-curses-h was given.
3693 if test "${with_curses_h+set}" = set; then
3694   withval="$with_curses_h"
3695   with_curses_h=$withval
3696 else
3697   with_curses_h=yes
3698 fi;
3699 echo "$as_me:3699: result: $with_curses_h" >&5
3700 echo "${ECHO_T}$with_curses_h" >&6
3701
3702 modules_to_build="ncurses"
3703 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3704 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3705 modules_to_build="$modules_to_build panel menu form"
3706
3707 test "$program_prefix" != NONE &&
3708   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3709 # Use a double $ so make ignores it.
3710 test "$program_suffix" != NONE &&
3711   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3712 # Double any \ or $.  echo might interpret backslashes.
3713 # By default was `s,x,x', remove it if useless.
3714 cat <<\_ACEOF >conftest.sed
3715 s/[\\$]/&&/g;s/;s,x,x,$//
3716 _ACEOF
3717 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3718 rm conftest.sed
3719
3720 for ac_prog in mawk gawk nawk awk
3721 do
3722   # Extract the first word of "$ac_prog", so it can be a program name with args.
3723 set dummy $ac_prog; ac_word=$2
3724 echo "$as_me:3724: checking for $ac_word" >&5
3725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3726 if test "${ac_cv_prog_AWK+set}" = set; then
3727   echo $ECHO_N "(cached) $ECHO_C" >&6
3728 else
3729   if test -n "$AWK"; then
3730   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3731 else
3732   ac_save_IFS=$IFS; IFS=$ac_path_separator
3733 ac_dummy="$PATH"
3734 for ac_dir in $ac_dummy; do
3735   IFS=$ac_save_IFS
3736   test -z "$ac_dir" && ac_dir=.
3737   $as_executable_p "$ac_dir/$ac_word" || continue
3738 ac_cv_prog_AWK="$ac_prog"
3739 echo "$as_me:3739: found $ac_dir/$ac_word" >&5
3740 break
3741 done
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   echo "$as_me:3747: result: $AWK" >&5
3748 echo "${ECHO_T}$AWK" >&6
3749 else
3750   echo "$as_me:3750: result: no" >&5
3751 echo "${ECHO_T}no" >&6
3752 fi
3753
3754   test -n "$AWK" && break
3755 done
3756
3757 test -z "$AWK" && { { echo "$as_me:3757: error: No awk program found" >&5
3758 echo "$as_me: error: No awk program found" >&2;}
3759    { (exit 1); exit 1; }; }
3760
3761 # Find a good install program.  We prefer a C program (faster),
3762 # so one script is as good as another.  But avoid the broken or
3763 # incompatible versions:
3764 # SysV /etc/install, /usr/sbin/install
3765 # SunOS /usr/etc/install
3766 # IRIX /sbin/install
3767 # AIX /bin/install
3768 # AmigaOS /C/install, which installs bootblocks on floppy discs
3769 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3770 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3771 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3772 # ./install, which can be erroneously created by make from ./install.sh.
3773 echo "$as_me:3773: checking for a BSD compatible install" >&5
3774 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3775 if test -z "$INSTALL"; then
3776 if test "${ac_cv_path_install+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779     ac_save_IFS=$IFS; IFS=$ac_path_separator
3780   for ac_dir in $PATH; do
3781     IFS=$ac_save_IFS
3782     # Account for people who put trailing slashes in PATH elements.
3783     case $ac_dir/ in
3784     / | ./ | .// | /cC/* \
3785     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3786     | /usr/ucb/* ) ;;
3787     *)
3788       # OSF1 and SCO ODT 3.0 have their own names for install.
3789       # Don't use installbsd from OSF since it installs stuff as root
3790       # by default.
3791       for ac_prog in ginstall scoinst install; do
3792         if $as_executable_p "$ac_dir/$ac_prog"; then
3793           if test $ac_prog = install &&
3794             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3795             # AIX install.  It has an incompatible calling convention.
3796             :
3797           elif test $ac_prog = install &&
3798             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3799             # program-specific install script used by HP pwplus--don't use.
3800             :
3801           else
3802             ac_cv_path_install="$ac_dir/$ac_prog -c"
3803             break 2
3804           fi
3805         fi
3806       done
3807       ;;
3808     esac
3809   done
3810
3811 fi
3812   if test "${ac_cv_path_install+set}" = set; then
3813     INSTALL=$ac_cv_path_install
3814   else
3815     # As a last resort, use the slow shell script.  We don't cache a
3816     # path for INSTALL within a source directory, because that will
3817     # break other packages using the cache if that directory is
3818     # removed, or if the path is relative.
3819     INSTALL=$ac_install_sh
3820   fi
3821 fi
3822 echo "$as_me:3822: result: $INSTALL" >&5
3823 echo "${ECHO_T}$INSTALL" >&6
3824
3825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3826 # It thinks the first close brace ends the variable substitution.
3827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3828
3829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3830
3831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3832
3833 case $INSTALL in
3834 (/*)
3835         ;;
3836 (*)
3837         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3838         test -z "$cf_dir" && cf_dir=.
3839         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3840         ;;
3841 esac
3842
3843 for ac_prog in lint cppcheck splint
3844 do
3845   # Extract the first word of "$ac_prog", so it can be a program name with args.
3846 set dummy $ac_prog; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_LINT+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$LINT"; then
3853   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_LINT="$ac_prog"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866 fi
3867 fi
3868 LINT=$ac_cv_prog_LINT
3869 if test -n "$LINT"; then
3870   echo "$as_me:3870: result: $LINT" >&5
3871 echo "${ECHO_T}$LINT" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   test -n "$LINT" && break
3878 done
3879
3880 case "x$LINT" in
3881 (xcppcheck|x*/cppcheck)
3882         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3883         ;;
3884 esac
3885
3886 echo "$as_me:3886: checking whether ln -s works" >&5
3887 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3888 LN_S=$as_ln_s
3889 if test "$LN_S" = "ln -s"; then
3890   echo "$as_me:3890: result: yes" >&5
3891 echo "${ECHO_T}yes" >&6
3892 else
3893   echo "$as_me:3893: result: no, using $LN_S" >&5
3894 echo "${ECHO_T}no, using $LN_S" >&6
3895 fi
3896
3897 echo "$as_me:3897: checking if $LN_S -f options work" >&5
3898 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3899
3900 rm -f conf$$.src conf$$dst
3901 echo >conf$$.dst
3902 echo first >conf$$.src
3903 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3904         cf_prog_ln_sf=yes
3905 else
3906         cf_prog_ln_sf=no
3907 fi
3908 rm -f conf$$.dst conf$$src
3909 echo "$as_me:3909: result: $cf_prog_ln_sf" >&5
3910 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3911
3912 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3913
3914 echo "$as_me:3914: checking for long file names" >&5
3915 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3916 if test "${ac_cv_sys_long_file_names+set}" = set; then
3917   echo $ECHO_N "(cached) $ECHO_C" >&6
3918 else
3919   ac_cv_sys_long_file_names=yes
3920 # Test for long file names in all the places we know might matter:
3921 #      .                the current directory, where building will happen
3922 #      $prefix/lib      where we will be installing things
3923 #      $exec_prefix/lib likewise
3924 # eval it to expand exec_prefix.
3925 #      $TMPDIR          if set, where it might want to write temporary files
3926 # if $TMPDIR is not set:
3927 #      /tmp             where it might want to write temporary files
3928 #      /var/tmp         likewise
3929 #      /usr/tmp         likewise
3930 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3931   ac_tmpdirs=$TMPDIR
3932 else
3933   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3934 fi
3935 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3936   test -d "$ac_dir" || continue
3937   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3938   ac_xdir=$ac_dir/cf$$
3939   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3940   ac_tf1=$ac_xdir/conftest9012345
3941   ac_tf2=$ac_xdir/conftest9012346
3942   (echo 1 >"$ac_tf1") 2>/dev/null
3943   (echo 2 >"$ac_tf2") 2>/dev/null
3944   ac_val=`cat "$ac_tf1" 2>/dev/null`
3945   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3946     ac_cv_sys_long_file_names=no
3947     rm -rf "$ac_xdir" 2>/dev/null
3948     break
3949   fi
3950   rm -rf "$ac_xdir" 2>/dev/null
3951 done
3952 fi
3953 echo "$as_me:3953: result: $ac_cv_sys_long_file_names" >&5
3954 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3955 if test "$ac_cv_sys_long_file_names" = yes; then
3956
3957 cat >>confdefs.h <<\EOF
3958 #define HAVE_LONG_FILE_NAMES 1
3959 EOF
3960
3961 fi
3962
3963 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3964 # of package conflict.
3965 cf_config_suffix=
3966
3967 # Check whether --with-config-suffix or --without-config-suffix was given.
3968 if test "${with_config_suffix+set}" = set; then
3969   withval="$with_config_suffix"
3970   case "x$withval" in
3971         (xyes|xno)
3972                 { echo "$as_me:3972: WARNING: expected a value for config-suffix option" >&5
3973 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3974                 ;;
3975         (*)     cf_config_suffix="$withval"
3976                 ;;
3977         esac
3978 fi;
3979
3980 # If we find pkg-config, check if we should install the ".pc" files.
3981
3982 echo "$as_me:3982: checking if you want to use pkg-config" >&5
3983 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3984
3985 # Check whether --with-pkg-config or --without-pkg-config was given.
3986 if test "${with_pkg_config+set}" = set; then
3987   withval="$with_pkg_config"
3988   cf_pkg_config=$withval
3989 else
3990   cf_pkg_config=yes
3991 fi;
3992 echo "$as_me:3992: result: $cf_pkg_config" >&5
3993 echo "${ECHO_T}$cf_pkg_config" >&6
3994
3995 case "$cf_pkg_config" in
3996 (no)
3997         PKG_CONFIG=none
3998         ;;
3999 (yes)
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $PKG_CONFIG in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   if $as_executable_p "$ac_dir/$ac_word"; then
4020    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4021    echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022    break
4023 fi
4024 done
4025
4026   ;;
4027 esac
4028 fi
4029 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4030
4031 if test -n "$PKG_CONFIG"; then
4032   echo "$as_me:4032: result: $PKG_CONFIG" >&5
4033 echo "${ECHO_T}$PKG_CONFIG" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039 fi
4040 if test -z "$ac_cv_path_PKG_CONFIG"; then
4041   ac_pt_PKG_CONFIG=$PKG_CONFIG
4042   # Extract the first word of "pkg-config", so it can be a program name with args.
4043 set dummy pkg-config; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   case $ac_pt_PKG_CONFIG in
4050   [\\/]* | ?:[\\/]*)
4051   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   *)
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   if $as_executable_p "$ac_dir/$ac_word"; then
4060    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4061    echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062    break
4063 fi
4064 done
4065
4066   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4067   ;;
4068 esac
4069 fi
4070 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4071
4072 if test -n "$ac_pt_PKG_CONFIG"; then
4073   echo "$as_me:4073: result: $ac_pt_PKG_CONFIG" >&5
4074 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   PKG_CONFIG=$ac_pt_PKG_CONFIG
4081 else
4082   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4083 fi
4084
4085         ;;
4086 (*)
4087         PKG_CONFIG=$withval
4088         ;;
4089 esac
4090
4091 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4092 if test "$PKG_CONFIG" != none ; then
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\$\{*prefix\}*|.\$\{*dir\}*)
4108         eval PKG_CONFIG="$PKG_CONFIG"
4109         case ".$PKG_CONFIG" in
4110         (.NONE/*)
4111                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125 elif test "x$cf_pkg_config" != xno ; then
4126         { echo "$as_me:4126: WARNING: pkg-config is not installed" >&5
4127 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4128 fi
4129
4130 case "$PKG_CONFIG" in
4131 (no|none|yes)
4132         echo "$as_me:4132: checking for pkg-config library directory" >&5
4133 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4134         ;;
4135 (*)
4136         echo "$as_me:4136: checking for $PKG_CONFIG library directory" >&5
4137 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4138         ;;
4139 esac
4140
4141 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4142
4143 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4144 if test "${with_pkg_config_libdir+set}" = set; then
4145   withval="$with_pkg_config_libdir"
4146   cf_search_path=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && cf_search_path=yes
4149 fi;
4150
4151 case x$cf_search_path in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         cf_search_path=
4156         test -n "$verbose" && echo "    auto..." 1>&6
4157
4158 echo "${as_me:-configure}:4158: testing auto... ..." 1>&5
4159
4160         # Look for the library directory using the same prefix as the executable
4161         echo "$as_me:4161: checking for search-list" >&5
4162 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4163         if test "x$PKG_CONFIG" != xnone
4164         then
4165                 # works for pkg-config since version 0.24 (2009)
4166                 cf_pkg_program=`echo "$PKG_CONFIG" | sed -e 's,^.*/,,'`
4167                 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4168
4169                 # works for pkgconf since version 0.8.3 (2012)
4170                 test -z "$cf_search_path" && \
4171                 cf_search_path=`pkgconf --variable=pc_path pkgconf 2>/dev/null | tr : ' '`
4172
4173                 # works for pkg-config since import in 2005 of original 2001 HP code.
4174                 test -z "$cf_search_path" && \
4175                 cf_search_path=`
4176                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4177 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4178         sub(\"^[^']*'\",\"\"); \
4179         sub(\"'.*\",\"\"); \
4180         printf \" %s\", \\$0; } \
4181 { next; } \
4182 "`
4183         fi
4184
4185         echo "$as_me:4185: result: $cf_search_path" >&5
4186 echo "${ECHO_T}$cf_search_path" >&6
4187
4188         ;;
4189 (*)
4190         ;;
4191 esac
4192
4193 echo "$as_me:4193: checking for first directory" >&5
4194 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4195 cf_pkg_config_path=none
4196 for cf_config in $cf_search_path
4197 do
4198         if test -d "$cf_config"
4199         then
4200                 cf_pkg_config_path=$cf_config
4201                 break
4202         fi
4203 done
4204 echo "$as_me:4204: result: $cf_pkg_config_path" >&5
4205 echo "${ECHO_T}$cf_pkg_config_path" >&6
4206
4207 if test "x$cf_pkg_config_path" != xnone ; then
4208         # limit this to the first directory found
4209         PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4210 fi
4211
4212 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4213 then
4214         echo "$as_me:4214: checking for workaround" >&5
4215 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4216         if test "$prefix" = "NONE" ; then
4217                 cf_prefix="$ac_default_prefix"
4218         else
4219                 cf_prefix="$prefix"
4220         fi
4221         eval cf_libdir=$libdir
4222         cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4223         cf_backup=
4224         for cf_config in $cf_search_path
4225         do
4226                 case $cf_config in
4227                 $cf_libdir/pkgconfig)
4228                         PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4229                         break
4230                         ;;
4231                 *)
4232                         test -z "$cf_backup" && cf_backup=$cf_config
4233                         ;;
4234                 esac
4235         done
4236         test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4237         echo "$as_me:4237: result: $PKG_CONFIG_LIBDIR" >&5
4238 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4239 fi
4240
4241 if test "x$PKG_CONFIG" != xnone
4242 then
4243         echo "$as_me:4243: checking if we should install .pc files for $PKG_CONFIG" >&5
4244 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4245 else
4246         echo "$as_me:4246: checking if we should install .pc files" >&5
4247 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4248 fi
4249
4250 # Check whether --enable-pc-files or --disable-pc-files was given.
4251 if test "${enable_pc_files+set}" = set; then
4252   enableval="$enable_pc_files"
4253   enable_pc_files=$enableval
4254 else
4255   enable_pc_files=no
4256 fi;
4257 echo "$as_me:4257: result: $enable_pc_files" >&5
4258 echo "${ECHO_T}$enable_pc_files" >&6
4259
4260 if test "x$enable_pc_files" != xno
4261 then
4262         MAKE_PC_FILES=
4263         case "x$PKG_CONFIG_LIBDIR" in
4264         (xno|xnone|xyes|x)
4265                 { echo "$as_me:4265: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4266 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4267                 ;;
4268         (*)
4269
4270 if test "x$prefix" != xNONE; then
4271         cf_path_syntax="$prefix"
4272 else
4273         cf_path_syntax="$ac_default_prefix"
4274 fi
4275
4276 case ".$PKG_CONFIG_LIBDIR" in
4277 (.\$\(*\)*|.\'*\'*)
4278         ;;
4279 (..|./*|.\\*)
4280         ;;
4281 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4282         ;;
4283 (.\$\{*prefix\}*|.\$\{*dir\}*)
4284         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4285         case ".$PKG_CONFIG_LIBDIR" in
4286         (.NONE/*)
4287                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4288                 ;;
4289         esac
4290         ;;
4291 (.no|.NONE/*)
4292         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4293         ;;
4294 (*)
4295         { { echo "$as_me:4295: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4296 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4297    { (exit 1); exit 1; }; }
4298         ;;
4299 esac
4300
4301                 ;;
4302         esac
4303 else
4304         MAKE_PC_FILES="#"
4305 fi
4306
4307 if test -z "$MAKE_PC_FILES"
4308 then
4309         echo "$as_me:4309: checking for suffix to add to pc-files" >&5
4310 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4311
4312 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4313 if test "${with_pc_suffix+set}" = set; then
4314   withval="$with_pc_suffix"
4315   case "x$withval" in
4316         (xyes|xno)
4317                 PC_MODULE_SUFFIX=
4318                 ;;
4319         (*)     PC_MODULE_SUFFIX="$withval"
4320                 ;;
4321         esac
4322 fi;
4323         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4324         echo "$as_me:4324: result: $PC_MODULE_SUFFIX" >&5
4325 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4326         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4327
4328 fi
4329
4330 echo "$as_me:4330: checking if we should assume mixed-case filenames" >&5
4331 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4332
4333 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4334 if test "${enable_mixed_case+set}" = set; then
4335   enableval="$enable_mixed_case"
4336   enable_mixedcase=$enableval
4337 else
4338   enable_mixedcase=auto
4339 fi;
4340 echo "$as_me:4340: result: $enable_mixedcase" >&5
4341 echo "${ECHO_T}$enable_mixedcase" >&6
4342 if test "$enable_mixedcase" = "auto" ; then
4343
4344 echo "$as_me:4344: checking if filesystem supports mixed-case filenames" >&5
4345 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4346 if test "${cf_cv_mixedcase+set}" = set; then
4347   echo $ECHO_N "(cached) $ECHO_C" >&6
4348 else
4349
4350 if test "$cross_compiling" = yes ; then
4351         case "$target_alias" in
4352         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4353                 cf_cv_mixedcase=no
4354                 ;;
4355         (*)
4356                 cf_cv_mixedcase=yes
4357                 ;;
4358         esac
4359 else
4360         rm -f conftest CONFTEST
4361         echo test >conftest
4362         if test -f CONFTEST ; then
4363                 cf_cv_mixedcase=no
4364         else
4365                 cf_cv_mixedcase=yes
4366         fi
4367         rm -f conftest CONFTEST
4368 fi
4369
4370 fi
4371 echo "$as_me:4371: result: $cf_cv_mixedcase" >&5
4372 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4373 test "$cf_cv_mixedcase" = yes &&
4374 cat >>confdefs.h <<\EOF
4375 #define MIXEDCASE_FILENAMES 1
4376 EOF
4377
4378 else
4379         cf_cv_mixedcase=$enable_mixedcase
4380         if test "x$enable_mixedcase" = "xyes" ; then
4381
4382 cat >>confdefs.h <<\EOF
4383 #define MIXEDCASE_FILENAMES 1
4384 EOF
4385
4386         fi
4387 fi
4388
4389 # do this after mixed-case option (tags/TAGS is not as important as tic).
4390 echo "$as_me:4390: checking whether ${MAKE-make} sets \${MAKE}" >&5
4391 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4392 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4393 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4394   echo $ECHO_N "(cached) $ECHO_C" >&6
4395 else
4396   cat >conftest.make <<\EOF
4397 all:
4398         @echo 'ac_maketemp="${MAKE}"'
4399 EOF
4400 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4401 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4402 if test -n "$ac_maketemp"; then
4403   eval ac_cv_prog_make_${ac_make}_set=yes
4404 else
4405   eval ac_cv_prog_make_${ac_make}_set=no
4406 fi
4407 rm -f conftest.make
4408 fi
4409 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4410   echo "$as_me:4410: result: yes" >&5
4411 echo "${ECHO_T}yes" >&6
4412   SET_MAKE=
4413 else
4414   echo "$as_me:4414: result: no" >&5
4415 echo "${ECHO_T}no" >&6
4416   SET_MAKE="MAKE=${MAKE-make}"
4417 fi
4418
4419 echo "$as_me:4419: checking for \".PHONY\" make-support" >&5
4420 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4421 if test "${cf_cv_make_PHONY+set}" = set; then
4422   echo $ECHO_N "(cached) $ECHO_C" >&6
4423 else
4424
4425         rm -rf conftest*
4426         (
4427                 mkdir conftest || exit 1
4428                 cd conftest
4429                 cat >makefile <<'CF_EOF'
4430 .PHONY: always
4431 DATA=0
4432 always: always.out
4433         @echo "** making $@ $(DATA)"
4434 once: once.out
4435         @echo "** making $@ $(DATA)"
4436 always.out:
4437         @echo "** making $@ $(DATA)"
4438         echo $(DATA) > $@
4439 once.out:
4440         @echo "** making $@ $(DATA)"
4441         echo $(DATA) > $@
4442 CF_EOF
4443                 for cf_data in 1 2 3
4444                 do
4445                         ${MAKE:-make} always DATA=$cf_data
4446                         ${MAKE:-make} once   DATA=$cf_data
4447                         ${MAKE:-make} -t always once
4448                         if test -f always ; then
4449                                 echo "no (case 1)" > ../conftest.tmp
4450                         elif test ! -f always.out ; then
4451                                 echo "no (case 2)" > ../conftest.tmp
4452                         elif test ! -f once.out ; then
4453                                 echo "no (case 3)" > ../conftest.tmp
4454                         elif ! cmp -s always.out once.out ; then
4455                                 echo "no (case 4)" > ../conftest.tmp
4456                                 diff always.out once.out
4457                         else
4458                                 cf_check="`cat always.out`"
4459                                 if test "x$cf_check" != "x$cf_data" ; then
4460                                         echo "no (case 5)" > ../conftest.tmp
4461                                 else
4462                                         echo yes > ../conftest.tmp
4463                                         rm -f ./*.out
4464                                         continue
4465                                 fi
4466                         fi
4467                         break
4468                 done
4469         ) >&5 2>&1
4470         cf_cv_make_PHONY="`cat conftest.tmp`"
4471         rm -rf conftest*
4472
4473 fi
4474 echo "$as_me:4474: result: $cf_cv_make_PHONY" >&5
4475 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4476 MAKE_NO_PHONY="#"
4477 MAKE_PHONY="#"
4478 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4479 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4480
4481 for ac_prog in exctags ctags
4482 do
4483   # Extract the first word of "$ac_prog", so it can be a program name with args.
4484 set dummy $ac_prog; ac_word=$2
4485 echo "$as_me:4485: checking for $ac_word" >&5
4486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4487 if test "${ac_cv_prog_CTAGS+set}" = set; then
4488   echo $ECHO_N "(cached) $ECHO_C" >&6
4489 else
4490   if test -n "$CTAGS"; then
4491   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4492 else
4493   ac_save_IFS=$IFS; IFS=$ac_path_separator
4494 ac_dummy="$PATH"
4495 for ac_dir in $ac_dummy; do
4496   IFS=$ac_save_IFS
4497   test -z "$ac_dir" && ac_dir=.
4498   $as_executable_p "$ac_dir/$ac_word" || continue
4499 ac_cv_prog_CTAGS="$ac_prog"
4500 echo "$as_me:4500: found $ac_dir/$ac_word" >&5
4501 break
4502 done
4503
4504 fi
4505 fi
4506 CTAGS=$ac_cv_prog_CTAGS
4507 if test -n "$CTAGS"; then
4508   echo "$as_me:4508: result: $CTAGS" >&5
4509 echo "${ECHO_T}$CTAGS" >&6
4510 else
4511   echo "$as_me:4511: result: no" >&5
4512 echo "${ECHO_T}no" >&6
4513 fi
4514
4515   test -n "$CTAGS" && break
4516 done
4517
4518 for ac_prog in exetags etags
4519 do
4520   # Extract the first word of "$ac_prog", so it can be a program name with args.
4521 set dummy $ac_prog; ac_word=$2
4522 echo "$as_me:4522: checking for $ac_word" >&5
4523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4524 if test "${ac_cv_prog_ETAGS+set}" = set; then
4525   echo $ECHO_N "(cached) $ECHO_C" >&6
4526 else
4527   if test -n "$ETAGS"; then
4528   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4529 else
4530   ac_save_IFS=$IFS; IFS=$ac_path_separator
4531 ac_dummy="$PATH"
4532 for ac_dir in $ac_dummy; do
4533   IFS=$ac_save_IFS
4534   test -z "$ac_dir" && ac_dir=.
4535   $as_executable_p "$ac_dir/$ac_word" || continue
4536 ac_cv_prog_ETAGS="$ac_prog"
4537 echo "$as_me:4537: found $ac_dir/$ac_word" >&5
4538 break
4539 done
4540
4541 fi
4542 fi
4543 ETAGS=$ac_cv_prog_ETAGS
4544 if test -n "$ETAGS"; then
4545   echo "$as_me:4545: result: $ETAGS" >&5
4546 echo "${ECHO_T}$ETAGS" >&6
4547 else
4548   echo "$as_me:4548: result: no" >&5
4549 echo "${ECHO_T}no" >&6
4550 fi
4551
4552   test -n "$ETAGS" && break
4553 done
4554
4555 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4556 set dummy ${CTAGS:-ctags}; ac_word=$2
4557 echo "$as_me:4557: checking for $ac_word" >&5
4558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4559 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4560   echo $ECHO_N "(cached) $ECHO_C" >&6
4561 else
4562   if test -n "$MAKE_LOWER_TAGS"; then
4563   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4564 else
4565   ac_save_IFS=$IFS; IFS=$ac_path_separator
4566 ac_dummy="$PATH"
4567 for ac_dir in $ac_dummy; do
4568   IFS=$ac_save_IFS
4569   test -z "$ac_dir" && ac_dir=.
4570   $as_executable_p "$ac_dir/$ac_word" || continue
4571 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4572 echo "$as_me:4572: found $ac_dir/$ac_word" >&5
4573 break
4574 done
4575
4576   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4577 fi
4578 fi
4579 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4580 if test -n "$MAKE_LOWER_TAGS"; then
4581   echo "$as_me:4581: result: $MAKE_LOWER_TAGS" >&5
4582 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4583 else
4584   echo "$as_me:4584: result: no" >&5
4585 echo "${ECHO_T}no" >&6
4586 fi
4587
4588 if test "$cf_cv_mixedcase" = yes ; then
4589         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4590 set dummy ${ETAGS:-etags}; ac_word=$2
4591 echo "$as_me:4591: checking for $ac_word" >&5
4592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4593 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   if test -n "$MAKE_UPPER_TAGS"; then
4597   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4598 else
4599   ac_save_IFS=$IFS; IFS=$ac_path_separator
4600 ac_dummy="$PATH"
4601 for ac_dir in $ac_dummy; do
4602   IFS=$ac_save_IFS
4603   test -z "$ac_dir" && ac_dir=.
4604   $as_executable_p "$ac_dir/$ac_word" || continue
4605 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4606 echo "$as_me:4606: found $ac_dir/$ac_word" >&5
4607 break
4608 done
4609
4610   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4611 fi
4612 fi
4613 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4614 if test -n "$MAKE_UPPER_TAGS"; then
4615   echo "$as_me:4615: result: $MAKE_UPPER_TAGS" >&5
4616 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4617 else
4618   echo "$as_me:4618: result: no" >&5
4619 echo "${ECHO_T}no" >&6
4620 fi
4621
4622 else
4623         MAKE_UPPER_TAGS=no
4624 fi
4625
4626 if test "$MAKE_UPPER_TAGS" = yes ; then
4627         MAKE_UPPER_TAGS=
4628 else
4629         MAKE_UPPER_TAGS="#"
4630 fi
4631
4632 if test "$MAKE_LOWER_TAGS" = yes ; then
4633         MAKE_LOWER_TAGS=
4634 else
4635         MAKE_LOWER_TAGS="#"
4636 fi
4637
4638 echo "$as_me:4638: checking for makeflags variable" >&5
4639 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4640 if test "${cf_cv_makeflags+set}" = set; then
4641   echo $ECHO_N "(cached) $ECHO_C" >&6
4642 else
4643
4644         cf_cv_makeflags=''
4645         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4646         do
4647                 cat >cf_makeflags.tmp <<CF_EOF
4648 SHELL = $SHELL
4649 all :
4650         @ echo '.$cf_option'
4651 CF_EOF
4652                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4653                 case "$cf_result" in
4654                 (.*k|.*kw)
4655                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4656                         case "$cf_result" in
4657                         (.*CC=*)        cf_cv_makeflags=
4658                                 ;;
4659                         (*)     cf_cv_makeflags=$cf_option
4660                                 ;;
4661                         esac
4662                         break
4663                         ;;
4664                 (.-)
4665                         ;;
4666                 (*)
4667
4668 echo "${as_me:-configure}:4668: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4669
4670                         ;;
4671                 esac
4672         done
4673         rm -f cf_makeflags.tmp
4674
4675 fi
4676 echo "$as_me:4676: result: $cf_cv_makeflags" >&5
4677 echo "${ECHO_T}$cf_cv_makeflags" >&6
4678
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4682 echo "$as_me:4682: checking for $ac_word" >&5
4683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4684 if test "${ac_cv_prog_RANLIB+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   if test -n "$RANLIB"; then
4688   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4689 else
4690   ac_save_IFS=$IFS; IFS=$ac_path_separator
4691 ac_dummy="$PATH"
4692 for ac_dir in $ac_dummy; do
4693   IFS=$ac_save_IFS
4694   test -z "$ac_dir" && ac_dir=.
4695   $as_executable_p "$ac_dir/$ac_word" || continue
4696 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4697 echo "$as_me:4697: found $ac_dir/$ac_word" >&5
4698 break
4699 done
4700
4701 fi
4702 fi
4703 RANLIB=$ac_cv_prog_RANLIB
4704 if test -n "$RANLIB"; then
4705   echo "$as_me:4705: result: $RANLIB" >&5
4706 echo "${ECHO_T}$RANLIB" >&6
4707 else
4708   echo "$as_me:4708: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712 fi
4713 if test -z "$ac_cv_prog_RANLIB"; then
4714   ac_ct_RANLIB=$RANLIB
4715   # Extract the first word of "ranlib", so it can be a program name with args.
4716 set dummy ranlib; ac_word=$2
4717 echo "$as_me:4717: checking for $ac_word" >&5
4718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4719 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   if test -n "$ac_ct_RANLIB"; then
4723   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4724 else
4725   ac_save_IFS=$IFS; IFS=$ac_path_separator
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728   IFS=$ac_save_IFS
4729   test -z "$ac_dir" && ac_dir=.
4730   $as_executable_p "$ac_dir/$ac_word" || continue
4731 ac_cv_prog_ac_ct_RANLIB="ranlib"
4732 echo "$as_me:4732: found $ac_dir/$ac_word" >&5
4733 break
4734 done
4735
4736   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4737 fi
4738 fi
4739 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4740 if test -n "$ac_ct_RANLIB"; then
4741   echo "$as_me:4741: result: $ac_ct_RANLIB" >&5
4742 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4743 else
4744   echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4746 fi
4747
4748   RANLIB=$ac_ct_RANLIB
4749 else
4750   RANLIB="$ac_cv_prog_RANLIB"
4751 fi
4752
4753 if test -n "$ac_tool_prefix"; then
4754   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4755 set dummy ${ac_tool_prefix}ld; ac_word=$2
4756 echo "$as_me:4756: checking for $ac_word" >&5
4757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4758 if test "${ac_cv_prog_LD+set}" = set; then
4759   echo $ECHO_N "(cached) $ECHO_C" >&6
4760 else
4761   if test -n "$LD"; then
4762   ac_cv_prog_LD="$LD" # Let the user override the test.
4763 else
4764   ac_save_IFS=$IFS; IFS=$ac_path_separator
4765 ac_dummy="$PATH"
4766 for ac_dir in $ac_dummy; do
4767   IFS=$ac_save_IFS
4768   test -z "$ac_dir" && ac_dir=.
4769   $as_executable_p "$ac_dir/$ac_word" || continue
4770 ac_cv_prog_LD="${ac_tool_prefix}ld"
4771 echo "$as_me:4771: found $ac_dir/$ac_word" >&5
4772 break
4773 done
4774
4775 fi
4776 fi
4777 LD=$ac_cv_prog_LD
4778 if test -n "$LD"; then
4779   echo "$as_me:4779: result: $LD" >&5
4780 echo "${ECHO_T}$LD" >&6
4781 else
4782   echo "$as_me:4782: result: no" >&5
4783 echo "${ECHO_T}no" >&6
4784 fi
4785
4786 fi
4787 if test -z "$ac_cv_prog_LD"; then
4788   ac_ct_LD=$LD
4789   # Extract the first word of "ld", so it can be a program name with args.
4790 set dummy ld; ac_word=$2
4791 echo "$as_me:4791: checking for $ac_word" >&5
4792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4793 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4794   echo $ECHO_N "(cached) $ECHO_C" >&6
4795 else
4796   if test -n "$ac_ct_LD"; then
4797   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4798 else
4799   ac_save_IFS=$IFS; IFS=$ac_path_separator
4800 ac_dummy="$PATH"
4801 for ac_dir in $ac_dummy; do
4802   IFS=$ac_save_IFS
4803   test -z "$ac_dir" && ac_dir=.
4804   $as_executable_p "$ac_dir/$ac_word" || continue
4805 ac_cv_prog_ac_ct_LD="ld"
4806 echo "$as_me:4806: found $ac_dir/$ac_word" >&5
4807 break
4808 done
4809
4810   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4811 fi
4812 fi
4813 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4814 if test -n "$ac_ct_LD"; then
4815   echo "$as_me:4815: result: $ac_ct_LD" >&5
4816 echo "${ECHO_T}$ac_ct_LD" >&6
4817 else
4818   echo "$as_me:4818: result: no" >&5
4819 echo "${ECHO_T}no" >&6
4820 fi
4821
4822   LD=$ac_ct_LD
4823 else
4824   LD="$ac_cv_prog_LD"
4825 fi
4826
4827 if test -n "$ac_tool_prefix"; then
4828   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4829 set dummy ${ac_tool_prefix}ar; ac_word=$2
4830 echo "$as_me:4830: checking for $ac_word" >&5
4831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4832 if test "${ac_cv_prog_AR+set}" = set; then
4833   echo $ECHO_N "(cached) $ECHO_C" >&6
4834 else
4835   if test -n "$AR"; then
4836   ac_cv_prog_AR="$AR" # Let the user override the test.
4837 else
4838   ac_save_IFS=$IFS; IFS=$ac_path_separator
4839 ac_dummy="$PATH"
4840 for ac_dir in $ac_dummy; do
4841   IFS=$ac_save_IFS
4842   test -z "$ac_dir" && ac_dir=.
4843   $as_executable_p "$ac_dir/$ac_word" || continue
4844 ac_cv_prog_AR="${ac_tool_prefix}ar"
4845 echo "$as_me:4845: found $ac_dir/$ac_word" >&5
4846 break
4847 done
4848
4849 fi
4850 fi
4851 AR=$ac_cv_prog_AR
4852 if test -n "$AR"; then
4853   echo "$as_me:4853: result: $AR" >&5
4854 echo "${ECHO_T}$AR" >&6
4855 else
4856   echo "$as_me:4856: result: no" >&5
4857 echo "${ECHO_T}no" >&6
4858 fi
4859
4860 fi
4861 if test -z "$ac_cv_prog_AR"; then
4862   ac_ct_AR=$AR
4863   # Extract the first word of "ar", so it can be a program name with args.
4864 set dummy ar; ac_word=$2
4865 echo "$as_me:4865: checking for $ac_word" >&5
4866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4867 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4868   echo $ECHO_N "(cached) $ECHO_C" >&6
4869 else
4870   if test -n "$ac_ct_AR"; then
4871   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4872 else
4873   ac_save_IFS=$IFS; IFS=$ac_path_separator
4874 ac_dummy="$PATH"
4875 for ac_dir in $ac_dummy; do
4876   IFS=$ac_save_IFS
4877   test -z "$ac_dir" && ac_dir=.
4878   $as_executable_p "$ac_dir/$ac_word" || continue
4879 ac_cv_prog_ac_ct_AR="ar"
4880 echo "$as_me:4880: found $ac_dir/$ac_word" >&5
4881 break
4882 done
4883
4884   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4885 fi
4886 fi
4887 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4888 if test -n "$ac_ct_AR"; then
4889   echo "$as_me:4889: result: $ac_ct_AR" >&5
4890 echo "${ECHO_T}$ac_ct_AR" >&6
4891 else
4892   echo "$as_me:4892: result: no" >&5
4893 echo "${ECHO_T}no" >&6
4894 fi
4895
4896   AR=$ac_ct_AR
4897 else
4898   AR="$ac_cv_prog_AR"
4899 fi
4900
4901 if test -n "$ac_tool_prefix"; then
4902   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4903 set dummy ${ac_tool_prefix}nm; ac_word=$2
4904 echo "$as_me:4904: checking for $ac_word" >&5
4905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4906 if test "${ac_cv_prog_NM+set}" = set; then
4907   echo $ECHO_N "(cached) $ECHO_C" >&6
4908 else
4909   if test -n "$NM"; then
4910   ac_cv_prog_NM="$NM" # Let the user override the test.
4911 else
4912   ac_save_IFS=$IFS; IFS=$ac_path_separator
4913 ac_dummy="$PATH"
4914 for ac_dir in $ac_dummy; do
4915   IFS=$ac_save_IFS
4916   test -z "$ac_dir" && ac_dir=.
4917   $as_executable_p "$ac_dir/$ac_word" || continue
4918 ac_cv_prog_NM="${ac_tool_prefix}nm"
4919 echo "$as_me:4919: found $ac_dir/$ac_word" >&5
4920 break
4921 done
4922
4923 fi
4924 fi
4925 NM=$ac_cv_prog_NM
4926 if test -n "$NM"; then
4927   echo "$as_me:4927: result: $NM" >&5
4928 echo "${ECHO_T}$NM" >&6
4929 else
4930   echo "$as_me:4930: result: no" >&5
4931 echo "${ECHO_T}no" >&6
4932 fi
4933
4934 fi
4935 if test -z "$ac_cv_prog_NM"; then
4936   ac_ct_NM=$NM
4937   # Extract the first word of "nm", so it can be a program name with args.
4938 set dummy nm; ac_word=$2
4939 echo "$as_me:4939: checking for $ac_word" >&5
4940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4941 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4942   echo $ECHO_N "(cached) $ECHO_C" >&6
4943 else
4944   if test -n "$ac_ct_NM"; then
4945   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4946 else
4947   ac_save_IFS=$IFS; IFS=$ac_path_separator
4948 ac_dummy="$PATH"
4949 for ac_dir in $ac_dummy; do
4950   IFS=$ac_save_IFS
4951   test -z "$ac_dir" && ac_dir=.
4952   $as_executable_p "$ac_dir/$ac_word" || continue
4953 ac_cv_prog_ac_ct_NM="nm"
4954 echo "$as_me:4954: found $ac_dir/$ac_word" >&5
4955 break
4956 done
4957
4958   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4959 fi
4960 fi
4961 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4962 if test -n "$ac_ct_NM"; then
4963   echo "$as_me:4963: result: $ac_ct_NM" >&5
4964 echo "${ECHO_T}$ac_ct_NM" >&6
4965 else
4966   echo "$as_me:4966: result: no" >&5
4967 echo "${ECHO_T}no" >&6
4968 fi
4969
4970   NM=$ac_ct_NM
4971 else
4972   NM="$ac_cv_prog_NM"
4973 fi
4974
4975 if test -n "$ac_tool_prefix"; then
4976   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4977 set dummy ${ac_tool_prefix}ar; ac_word=$2
4978 echo "$as_me:4978: checking for $ac_word" >&5
4979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4980 if test "${ac_cv_prog_AR+set}" = set; then
4981   echo $ECHO_N "(cached) $ECHO_C" >&6
4982 else
4983   if test -n "$AR"; then
4984   ac_cv_prog_AR="$AR" # Let the user override the test.
4985 else
4986   ac_save_IFS=$IFS; IFS=$ac_path_separator
4987 ac_dummy="$PATH"
4988 for ac_dir in $ac_dummy; do
4989   IFS=$ac_save_IFS
4990   test -z "$ac_dir" && ac_dir=.
4991   $as_executable_p "$ac_dir/$ac_word" || continue
4992 ac_cv_prog_AR="${ac_tool_prefix}ar"
4993 echo "$as_me:4993: found $ac_dir/$ac_word" >&5
4994 break
4995 done
4996
4997 fi
4998 fi
4999 AR=$ac_cv_prog_AR
5000 if test -n "$AR"; then
5001   echo "$as_me:5001: result: $AR" >&5
5002 echo "${ECHO_T}$AR" >&6
5003 else
5004   echo "$as_me:5004: result: no" >&5
5005 echo "${ECHO_T}no" >&6
5006 fi
5007
5008 fi
5009 if test -z "$ac_cv_prog_AR"; then
5010   ac_ct_AR=$AR
5011   # Extract the first word of "ar", so it can be a program name with args.
5012 set dummy ar; ac_word=$2
5013 echo "$as_me:5013: checking for $ac_word" >&5
5014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5015 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5016   echo $ECHO_N "(cached) $ECHO_C" >&6
5017 else
5018   if test -n "$ac_ct_AR"; then
5019   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5020 else
5021   ac_save_IFS=$IFS; IFS=$ac_path_separator
5022 ac_dummy="$PATH"
5023 for ac_dir in $ac_dummy; do
5024   IFS=$ac_save_IFS
5025   test -z "$ac_dir" && ac_dir=.
5026   $as_executable_p "$ac_dir/$ac_word" || continue
5027 ac_cv_prog_ac_ct_AR="ar"
5028 echo "$as_me:5028: found $ac_dir/$ac_word" >&5
5029 break
5030 done
5031
5032   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5033 fi
5034 fi
5035 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5036 if test -n "$ac_ct_AR"; then
5037   echo "$as_me:5037: result: $ac_ct_AR" >&5
5038 echo "${ECHO_T}$ac_ct_AR" >&6
5039 else
5040   echo "$as_me:5040: result: no" >&5
5041 echo "${ECHO_T}no" >&6
5042 fi
5043
5044   AR=$ac_ct_AR
5045 else
5046   AR="$ac_cv_prog_AR"
5047 fi
5048
5049 echo "$as_me:5049: checking for options to update archives" >&5
5050 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5051 if test "${cf_cv_ar_flags+set}" = set; then
5052   echo $ECHO_N "(cached) $ECHO_C" >&6
5053 else
5054
5055         case "$cf_cv_system_name" in
5056         (*-msvc*)
5057                 cf_cv_ar_flags=''
5058                 cat >mk_static_lib.sh <<-EOF
5059                 #!$SHELL
5060                 MSVC_BIN="$AR"
5061                 out="\$1"
5062                 shift
5063                 exec \$MSVC_BIN -out:"\$out" \$@
5064                 EOF
5065                 chmod +x mk_static_lib.sh
5066                 AR=`pwd`/mk_static_lib.sh
5067                 ;;
5068         (*)
5069                 cf_cv_ar_flags=unknown
5070                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5071                 do
5072
5073                         # check if $ARFLAGS already contains this choice
5074                         if test "x$ARFLAGS" != "x" ; then
5075                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5076                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5077                                         cf_cv_ar_flags=
5078                                         break
5079                                 fi
5080                         fi
5081
5082                         rm -f "conftest.$ac_cv_objext"
5083                         rm -f conftest.a
5084
5085                         cat >"conftest.$ac_ext" <<EOF
5086 #line 5086 "configure"
5087 int     testdata[3] = { 123, 456, 789 };
5088 EOF
5089                         if { (eval echo "$as_me:5089: \"$ac_compile\"") >&5
5090   (eval $ac_compile) 2>&5
5091   ac_status=$?
5092   echo "$as_me:5092: \$? = $ac_status" >&5
5093   (exit "$ac_status"); } ; then
5094                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5095                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5096                                 if test -f conftest.a ; then
5097                                         cf_cv_ar_flags="$cf_ar_flags"
5098                                         break
5099                                 fi
5100                         else
5101                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5102
5103 echo "${as_me:-configure}:5103: testing cannot compile test-program ..." 1>&5
5104
5105                                 break
5106                         fi
5107                 done
5108                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5109                 ;;
5110         esac
5111
5112 fi
5113 echo "$as_me:5113: result: $cf_cv_ar_flags" >&5
5114 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5115
5116 if test -n "$ARFLAGS" ; then
5117         if test -n "$cf_cv_ar_flags" ; then
5118                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5119         fi
5120 else
5121         ARFLAGS=$cf_cv_ar_flags
5122 fi
5123
5124 echo "$as_me:5124: checking if you have specified an install-prefix" >&5
5125 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5126
5127 # Check whether --with-install-prefix or --without-install-prefix was given.
5128 if test "${with_install_prefix+set}" = set; then
5129   withval="$with_install_prefix"
5130   case "x$withval" in
5131         (xyes|xno)
5132                 ;;
5133         (*)     DESTDIR="$withval"
5134                 ;;
5135         esac
5136 fi;
5137 echo "$as_me:5137: result: $DESTDIR" >&5
5138 echo "${ECHO_T}$DESTDIR" >&6
5139
5140 ###############################################################################
5141
5142 # If we're cross-compiling, allow the user to override the tools and their
5143 # options.  The configure script is oriented toward identifying the host
5144 # compiler, etc., but we need a build compiler to generate parts of the source.
5145
5146 case "$cf_cv_system_name" in
5147 (*-msvc*)
5148         LDFLAGS="$LDFLAGS user32.lib"
5149         export LDFLAGS
5150         ;;
5151 esac
5152
5153 if test "$cross_compiling" = yes ; then
5154
5155         # defaults that we might want to override
5156         : ${BUILD_CFLAGS:=''}
5157         : ${BUILD_CPPFLAGS:=''}
5158         : ${BUILD_LDFLAGS:=''}
5159         : ${BUILD_LIBS:=''}
5160         : ${BUILD_EXEEXT:='$x'}
5161         : ${BUILD_OBJEXT:='o'}
5162
5163 # Check whether --with-build-cc or --without-build-cc was given.
5164 if test "${with_build_cc+set}" = set; then
5165   withval="$with_build_cc"
5166   BUILD_CC="$withval"
5167 else
5168   for ac_prog in gcc clang c99 c89 cc cl
5169 do
5170   # Extract the first word of "$ac_prog", so it can be a program name with args.
5171 set dummy $ac_prog; ac_word=$2
5172 echo "$as_me:5172: checking for $ac_word" >&5
5173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5174 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5175   echo $ECHO_N "(cached) $ECHO_C" >&6
5176 else
5177   if test -n "$BUILD_CC"; then
5178   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5179 else
5180   ac_save_IFS=$IFS; IFS=$ac_path_separator
5181 ac_dummy="$PATH"
5182 for ac_dir in $ac_dummy; do
5183   IFS=$ac_save_IFS
5184   test -z "$ac_dir" && ac_dir=.
5185   $as_executable_p "$ac_dir/$ac_word" || continue
5186 ac_cv_prog_BUILD_CC="$ac_prog"
5187 echo "$as_me:5187: found $ac_dir/$ac_word" >&5
5188 break
5189 done
5190
5191 fi
5192 fi
5193 BUILD_CC=$ac_cv_prog_BUILD_CC
5194 if test -n "$BUILD_CC"; then
5195   echo "$as_me:5195: result: $BUILD_CC" >&5
5196 echo "${ECHO_T}$BUILD_CC" >&6
5197 else
5198   echo "$as_me:5198: result: no" >&5
5199 echo "${ECHO_T}no" >&6
5200 fi
5201
5202   test -n "$BUILD_CC" && break
5203 done
5204 test -n "$BUILD_CC" || BUILD_CC="none"
5205
5206 fi;
5207         echo "$as_me:5207: checking for native build C compiler" >&5
5208 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5209         echo "$as_me:5209: result: $BUILD_CC" >&5
5210 echo "${ECHO_T}$BUILD_CC" >&6
5211
5212         echo "$as_me:5212: checking for native build C preprocessor" >&5
5213 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5214
5215 # Check whether --with-build-cpp or --without-build-cpp was given.
5216 if test "${with_build_cpp+set}" = set; then
5217   withval="$with_build_cpp"
5218   BUILD_CPP="$withval"
5219 else
5220   BUILD_CPP='${BUILD_CC} -E'
5221 fi;
5222         echo "$as_me:5222: result: $BUILD_CPP" >&5
5223 echo "${ECHO_T}$BUILD_CPP" >&6
5224
5225         echo "$as_me:5225: checking for native build C flags" >&5
5226 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5227
5228 # Check whether --with-build-cflags or --without-build-cflags was given.
5229 if test "${with_build_cflags+set}" = set; then
5230   withval="$with_build_cflags"
5231   BUILD_CFLAGS="$withval"
5232 fi;
5233         echo "$as_me:5233: result: $BUILD_CFLAGS" >&5
5234 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5235
5236         echo "$as_me:5236: checking for native build C preprocessor-flags" >&5
5237 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5238
5239 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5240 if test "${with_build_cppflags+set}" = set; then
5241   withval="$with_build_cppflags"
5242   BUILD_CPPFLAGS="$withval"
5243 fi;
5244         echo "$as_me:5244: result: $BUILD_CPPFLAGS" >&5
5245 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5246
5247         echo "$as_me:5247: checking for native build linker-flags" >&5
5248 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5249
5250 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5251 if test "${with_build_ldflags+set}" = set; then
5252   withval="$with_build_ldflags"
5253   BUILD_LDFLAGS="$withval"
5254 fi;
5255         echo "$as_me:5255: result: $BUILD_LDFLAGS" >&5
5256 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5257
5258         echo "$as_me:5258: checking for native build linker-libraries" >&5
5259 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5260
5261 # Check whether --with-build-libs or --without-build-libs was given.
5262 if test "${with_build_libs+set}" = set; then
5263   withval="$with_build_libs"
5264   BUILD_LIBS="$withval"
5265 fi;
5266         echo "$as_me:5266: result: $BUILD_LIBS" >&5
5267 echo "${ECHO_T}$BUILD_LIBS" >&6
5268
5269         # this assumes we're on Unix.
5270         BUILD_EXEEXT=
5271         BUILD_OBJEXT=o
5272
5273         : ${BUILD_CC:='${CC}'}
5274
5275         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5276                 { { echo "$as_me:5276: error: Cross-build requires two compilers.
5277 Use --with-build-cc to specify the native compiler." >&5
5278 echo "$as_me: error: Cross-build requires two compilers.
5279 Use --with-build-cc to specify the native compiler." >&2;}
5280    { (exit 1); exit 1; }; }
5281         fi
5282
5283 else
5284         : ${BUILD_CC:='${CC}'}
5285         : ${BUILD_CPP:='${CPP}'}
5286         : ${BUILD_CFLAGS:='${CFLAGS}'}
5287         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5288         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5289         : ${BUILD_LIBS:='${LIBS}'}
5290         : ${BUILD_EXEEXT:='$x'}
5291         : ${BUILD_OBJEXT:='o'}
5292 fi
5293
5294 ###############################################################################
5295
5296 ### Options to allow the user to specify the set of libraries which are used.
5297 ### Use "--without-normal --with-shared" to allow the default model to be
5298 ### shared, for example.
5299 cf_list_models=""
5300
5301 echo "$as_me:5301: checking if libtool -version-number should be used" >&5
5302 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5303
5304 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5305 if test "${enable_libtool_version+set}" = set; then
5306   enableval="$enable_libtool_version"
5307   test "$enableval" != no && enableval=yes
5308         if test "$enableval" != "yes" ; then
5309     cf_libtool_version=no
5310         else
5311                 cf_libtool_version=yes
5312         fi
5313 else
5314   enableval=yes
5315         cf_libtool_version=yes
5316
5317 fi;
5318 echo "$as_me:5318: result: $cf_libtool_version" >&5
5319 echo "${ECHO_T}$cf_libtool_version" >&6
5320
5321 if test "$cf_libtool_version" = yes ; then
5322         LIBTOOL_VERSION="-version-number"
5323 else
5324         LIBTOOL_VERSION="-version-info"
5325         case "x$VERSION" in
5326         (x)
5327                 { echo "$as_me:5327: WARNING: VERSION was not set" >&5
5328 echo "$as_me: WARNING: VERSION was not set" >&2;}
5329                 ;;
5330         (x*.*.*)
5331                 ABI_VERSION="$VERSION"
5332                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5333
5334 echo "${as_me:-configure}:5334: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5335
5336                 ;;
5337         (x*:*:*)
5338                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5339                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5340
5341 echo "${as_me:-configure}:5341: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5342
5343                 ;;
5344         (*)
5345                 { echo "$as_me:5345: WARNING: unexpected VERSION value: $VERSION" >&5
5346 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5347                 ;;
5348         esac
5349 fi
5350
5351 LIBTOOL=
5352
5353 # common library maintenance symbols that are convenient for libtool scripts:
5354 LIB_CREATE='${AR} -cr'
5355 LIB_OBJECT='${OBJECTS}'
5356 LIB_SUFFIX=.a
5357 LIB_PREP="$RANLIB"
5358
5359 # symbols used to prop libtool up to enable it to determine what it should be
5360 # doing:
5361 LIB_CLEAN=
5362 LIB_COMPILE=
5363 LIB_LINK='${CC}'
5364 LIB_INSTALL=
5365 LIB_UNINSTALL=
5366
5367 echo "$as_me:5367: checking if you want to build libraries with libtool" >&5
5368 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5369
5370 # Check whether --with-libtool or --without-libtool was given.
5371 if test "${with_libtool+set}" = set; then
5372   withval="$with_libtool"
5373   with_libtool=$withval
5374 else
5375   with_libtool=no
5376 fi;
5377 echo "$as_me:5377: result: $with_libtool" >&5
5378 echo "${ECHO_T}$with_libtool" >&6
5379 if test "$with_libtool" != "no"; then
5380
5381         if test "$with_libtool" != "yes" ; then
5382
5383 if test "x$prefix" != xNONE; then
5384         cf_path_syntax="$prefix"
5385 else
5386         cf_path_syntax="$ac_default_prefix"
5387 fi
5388
5389 case ".$with_libtool" in
5390 (.\$\(*\)*|.\'*\'*)
5391         ;;
5392 (..|./*|.\\*)
5393         ;;
5394 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5395         ;;
5396 (.\$\{*prefix\}*|.\$\{*dir\}*)
5397         eval with_libtool="$with_libtool"
5398         case ".$with_libtool" in
5399         (.NONE/*)
5400                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5401                 ;;
5402         esac
5403         ;;
5404 (.no|.NONE/*)
5405         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5406         ;;
5407 (*)
5408         { { echo "$as_me:5408: error: expected a pathname, not \"$with_libtool\"" >&5
5409 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5410    { (exit 1); exit 1; }; }
5411         ;;
5412 esac
5413
5414                 LIBTOOL=$with_libtool
5415         else
5416                 if test -n "$ac_tool_prefix"; then
5417   for ac_prog in libtool glibtool
5418   do
5419     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5420 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5421 echo "$as_me:5421: checking for $ac_word" >&5
5422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5423 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5424   echo $ECHO_N "(cached) $ECHO_C" >&6
5425 else
5426   if test -n "$LIBTOOL"; then
5427   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5428 else
5429   ac_save_IFS=$IFS; IFS=$ac_path_separator
5430 ac_dummy="$PATH"
5431 for ac_dir in $ac_dummy; do
5432   IFS=$ac_save_IFS
5433   test -z "$ac_dir" && ac_dir=.
5434   $as_executable_p "$ac_dir/$ac_word" || continue
5435 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5436 echo "$as_me:5436: found $ac_dir/$ac_word" >&5
5437 break
5438 done
5439
5440 fi
5441 fi
5442 LIBTOOL=$ac_cv_prog_LIBTOOL
5443 if test -n "$LIBTOOL"; then
5444   echo "$as_me:5444: result: $LIBTOOL" >&5
5445 echo "${ECHO_T}$LIBTOOL" >&6
5446 else
5447   echo "$as_me:5447: result: no" >&5
5448 echo "${ECHO_T}no" >&6
5449 fi
5450
5451     test -n "$LIBTOOL" && break
5452   done
5453 fi
5454 if test -z "$LIBTOOL"; then
5455   ac_ct_LIBTOOL=$LIBTOOL
5456   for ac_prog in libtool glibtool
5457 do
5458   # Extract the first word of "$ac_prog", so it can be a program name with args.
5459 set dummy $ac_prog; ac_word=$2
5460 echo "$as_me:5460: checking for $ac_word" >&5
5461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5462 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5463   echo $ECHO_N "(cached) $ECHO_C" >&6
5464 else
5465   if test -n "$ac_ct_LIBTOOL"; then
5466   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5467 else
5468   ac_save_IFS=$IFS; IFS=$ac_path_separator
5469 ac_dummy="$PATH"
5470 for ac_dir in $ac_dummy; do
5471   IFS=$ac_save_IFS
5472   test -z "$ac_dir" && ac_dir=.
5473   $as_executable_p "$ac_dir/$ac_word" || continue
5474 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5475 echo "$as_me:5475: found $ac_dir/$ac_word" >&5
5476 break
5477 done
5478
5479 fi
5480 fi
5481 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5482 if test -n "$ac_ct_LIBTOOL"; then
5483   echo "$as_me:5483: result: $ac_ct_LIBTOOL" >&5
5484 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5485 else
5486   echo "$as_me:5486: result: no" >&5
5487 echo "${ECHO_T}no" >&6
5488 fi
5489
5490   test -n "$ac_ct_LIBTOOL" && break
5491 done
5492 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5493
5494   LIBTOOL=$ac_ct_LIBTOOL
5495 fi
5496
5497 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5498 then
5499         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.].*//'`
5500 else
5501         cf_cv_libtool_version=
5502 fi
5503 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5504
5505                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5506                 then
5507
5508 unset ac_cv_prog_ac_ct_LIBTOOL
5509 unset ac_ct_LIBTOOL
5510 unset LIBTOOL
5511
5512                         if test -n "$ac_tool_prefix"; then
5513   for ac_prog in glibtool
5514   do
5515     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5516 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5517 echo "$as_me:5517: checking for $ac_word" >&5
5518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5519 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5520   echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522   if test -n "$LIBTOOL"; then
5523   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5524 else
5525   ac_save_IFS=$IFS; IFS=$ac_path_separator
5526 ac_dummy="$PATH"
5527 for ac_dir in $ac_dummy; do
5528   IFS=$ac_save_IFS
5529   test -z "$ac_dir" && ac_dir=.
5530   $as_executable_p "$ac_dir/$ac_word" || continue
5531 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5532 echo "$as_me:5532: found $ac_dir/$ac_word" >&5
5533 break
5534 done
5535
5536 fi
5537 fi
5538 LIBTOOL=$ac_cv_prog_LIBTOOL
5539 if test -n "$LIBTOOL"; then
5540   echo "$as_me:5540: result: $LIBTOOL" >&5
5541 echo "${ECHO_T}$LIBTOOL" >&6
5542 else
5543   echo "$as_me:5543: result: no" >&5
5544 echo "${ECHO_T}no" >&6
5545 fi
5546
5547     test -n "$LIBTOOL" && break
5548   done
5549 fi
5550 if test -z "$LIBTOOL"; then
5551   ac_ct_LIBTOOL=$LIBTOOL
5552   for ac_prog in glibtool
5553 do
5554   # Extract the first word of "$ac_prog", so it can be a program name with args.
5555 set dummy $ac_prog; ac_word=$2
5556 echo "$as_me:5556: checking for $ac_word" >&5
5557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5558 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5559   echo $ECHO_N "(cached) $ECHO_C" >&6
5560 else
5561   if test -n "$ac_ct_LIBTOOL"; then
5562   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5563 else
5564   ac_save_IFS=$IFS; IFS=$ac_path_separator
5565 ac_dummy="$PATH"
5566 for ac_dir in $ac_dummy; do
5567   IFS=$ac_save_IFS
5568   test -z "$ac_dir" && ac_dir=.
5569   $as_executable_p "$ac_dir/$ac_word" || continue
5570 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5571 echo "$as_me:5571: found $ac_dir/$ac_word" >&5
5572 break
5573 done
5574
5575 fi
5576 fi
5577 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5578 if test -n "$ac_ct_LIBTOOL"; then
5579   echo "$as_me:5579: result: $ac_ct_LIBTOOL" >&5
5580 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5581 else
5582   echo "$as_me:5582: result: no" >&5
5583 echo "${ECHO_T}no" >&6
5584 fi
5585
5586   test -n "$ac_ct_LIBTOOL" && break
5587 done
5588 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5589
5590   LIBTOOL=$ac_ct_LIBTOOL
5591 fi
5592
5593 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5594 then
5595         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.].*//'`
5596 else
5597         cf_cv_libtool_version=
5598 fi
5599 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5600
5601                 fi
5602         fi
5603         if test -z "$LIBTOOL" ; then
5604                 { { echo "$as_me:5604: error: Cannot find libtool" >&5
5605 echo "$as_me: error: Cannot find libtool" >&2;}
5606    { (exit 1); exit 1; }; }
5607         fi
5608         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5609         LIB_OBJECT='${OBJECTS:.o=.lo}'
5610         LIB_SUFFIX=.la
5611         LIB_CLEAN='${LIBTOOL} --mode=clean'
5612         LIB_COMPILE='${LIBTOOL} --mode=compile'
5613         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5614         LIB_INSTALL='${LIBTOOL} --mode=install'
5615         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5616         LIB_PREP=:
5617
5618 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5619 then
5620         echo "$as_me:5620: checking version of $LIBTOOL" >&5
5621 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5622
5623 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5624 then
5625         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.].*//'`
5626 else
5627         cf_cv_libtool_version=
5628 fi
5629 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5630
5631         echo "$as_me:5631: result: $cf_cv_libtool_version" >&5
5632 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5633         if test -n "$cf_cv_libtool_version"
5634         then
5635                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5636                 case "x$cf_check_libtool_version" in
5637                 (*...GNU-libtool...*)
5638                         ;;
5639                 (*)
5640                         { { echo "$as_me:5640: error: This is not GNU libtool" >&5
5641 echo "$as_me: error: This is not GNU libtool" >&2;}
5642    { (exit 1); exit 1; }; }
5643                         ;;
5644                 esac
5645         else
5646                 { { echo "$as_me:5646: error: No version found for $LIBTOOL" >&5
5647 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5648    { (exit 1); exit 1; }; }
5649         fi
5650 else
5651         { { echo "$as_me:5651: error: GNU libtool has not been found" >&5
5652 echo "$as_me: error: GNU libtool has not been found" >&2;}
5653    { (exit 1); exit 1; }; }
5654 fi
5655
5656         # special hack to add -no-undefined (which libtool should do for itself)
5657         LT_UNDEF=
5658         case "$cf_cv_system_name" in
5659         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5660                 LT_UNDEF=-no-undefined
5661                 ;;
5662         esac
5663
5664         # special hack to add --tag option for C++ compiler
5665         case "$cf_cv_libtool_version" in
5666         (1.[5-9]*|[2-9].[0-9.a-z]*)
5667                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5668                 LIBTOOL="$LIBTOOL --tag=CC"
5669                 ;;
5670         (*)
5671                 LIBTOOL_CXX="$LIBTOOL"
5672                 ;;
5673         esac
5674 else
5675         LIBTOOL=""
5676         LIBTOOL_CXX=""
5677 fi
5678
5679 test -z "$LIBTOOL" && ECHO_LT=
5680
5681 if test "$with_libtool" != "no" ; then
5682
5683 cf_list_models="$cf_list_models libtool"
5684
5685 else
5686
5687 echo "$as_me:5687: checking if you want to build shared libraries" >&5
5688 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5689
5690 # Check whether --with-shared or --without-shared was given.
5691 if test "${with_shared+set}" = set; then
5692   withval="$with_shared"
5693   with_shared=$withval
5694 else
5695   with_shared=no
5696 fi;
5697 echo "$as_me:5697: result: $with_shared" >&5
5698 echo "${ECHO_T}$with_shared" >&6
5699 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5700
5701 echo "$as_me:5701: checking if you want to build static libraries" >&5
5702 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5703
5704 # Check whether --with-normal or --without-normal was given.
5705 if test "${with_normal+set}" = set; then
5706   withval="$with_normal"
5707   with_normal=$withval
5708 else
5709   with_normal=yes
5710 fi;
5711 echo "$as_me:5711: result: $with_normal" >&5
5712 echo "${ECHO_T}$with_normal" >&6
5713 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5714
5715 echo "$as_me:5715: checking if you want to build debug libraries" >&5
5716 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5717
5718 # Check whether --with-debug or --without-debug was given.
5719 if test "${with_debug+set}" = set; then
5720   withval="$with_debug"
5721   with_debug=$withval
5722 else
5723   with_debug=yes
5724 fi;
5725 echo "$as_me:5725: result: $with_debug" >&5
5726 echo "${ECHO_T}$with_debug" >&6
5727 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5728
5729 echo "$as_me:5729: checking if you want to build profiling libraries" >&5
5730 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5731
5732 # Check whether --with-profile or --without-profile was given.
5733 if test "${with_profile+set}" = set; then
5734   withval="$with_profile"
5735   with_profile=$withval
5736 else
5737   with_profile=no
5738 fi;
5739 echo "$as_me:5739: result: $with_profile" >&5
5740 echo "${ECHO_T}$with_profile" >&6
5741 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5742
5743 fi
5744
5745 if test "X$cf_with_cxx_binding" != Xno; then
5746 if test "x$with_shared" = "xyes"; then
5747 echo "$as_me:5747: checking if you want to build C++ shared libraries" >&5
5748 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5749
5750 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5751 if test "${with_cxx_shared+set}" = set; then
5752   withval="$with_cxx_shared"
5753   with_shared_cxx=$withval
5754 else
5755   with_shared_cxx=no
5756 fi;
5757 echo "$as_me:5757: result: $with_shared_cxx" >&5
5758 echo "${ECHO_T}$with_shared_cxx" >&6
5759 fi
5760 fi
5761
5762 ###############################################################################
5763
5764 echo "$as_me:5764: checking for specified models" >&5
5765 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5766 test -z "$cf_list_models" && cf_list_models=normal
5767 test "$with_libtool" != "no" && cf_list_models=libtool
5768 echo "$as_me:5768: result: $cf_list_models" >&5
5769 echo "${ECHO_T}$cf_list_models" >&6
5770
5771 ### Use the first model as the default, and save its suffix for use in building
5772 ### up test-applications.
5773 echo "$as_me:5773: checking for default model" >&5
5774 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5775 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5776 echo "$as_me:5776: result: $DFT_LWR_MODEL" >&5
5777 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5778
5779 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5780
5781 TICS_NAME=tic
5782
5783 TINFO_NAME=tinfo
5784
5785 LIB_NAME=ncurses
5786
5787 LIB_DIR=../lib
5788 LIB_2ND=../../lib
5789
5790 echo "$as_me:5790: checking if you want to have a library-prefix" >&5
5791 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5792
5793 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5794 if test "${with_lib_prefix+set}" = set; then
5795   withval="$with_lib_prefix"
5796   with_lib_prefix=$withval
5797 else
5798   with_lib_prefix=auto
5799 fi;
5800 echo "$as_me:5800: result: $with_lib_prefix" >&5
5801 echo "${ECHO_T}$with_lib_prefix" >&6
5802
5803 if test "$with_lib_prefix" = auto
5804 then
5805
5806         case "$cf_cv_system_name" in
5807         (OS/2*|os2*)
5808                 if test "$DFT_LWR_MODEL" = libtool; then
5809                         LIB_PREFIX='lib'
5810                 else
5811                         LIB_PREFIX=''
5812                 fi
5813                 ;;
5814         (*-msvc*)
5815                 LIB_PREFIX=''
5816                 ;;
5817         (*)     LIB_PREFIX='lib'
5818                 ;;
5819         esac
5820 cf_prefix=$LIB_PREFIX
5821
5822 elif test "$with_lib_prefix" = no
5823 then
5824         LIB_PREFIX=
5825 else
5826         LIB_PREFIX=$with_lib_prefix
5827 fi
5828
5829 LIB_SUFFIX=
5830
5831         echo "$as_me:5831: checking for PATH separator" >&5
5832 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5833         case "$cf_cv_system_name" in
5834         (os2*)  PATH_SEPARATOR=';'  ;;
5835         (*)     ${PATH_SEPARATOR:=':'}  ;;
5836         esac
5837
5838         echo "$as_me:5838: result: $PATH_SEPARATOR" >&5
5839 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5840
5841 ###############################################################################
5842
5843 echo "$as_me:5843: checking if you want to build a separate terminfo library" >&5
5844 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5845
5846 # Check whether --with-termlib or --without-termlib was given.
5847 if test "${with_termlib+set}" = set; then
5848   withval="$with_termlib"
5849   with_termlib=$withval
5850 else
5851   with_termlib=no
5852 fi;
5853 echo "$as_me:5853: result: $with_termlib" >&5
5854 echo "${ECHO_T}$with_termlib" >&6
5855
5856 echo "$as_me:5856: checking if you want to build a separate tic library" >&5
5857 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5858
5859 # Check whether --with-ticlib or --without-ticlib was given.
5860 if test "${with_ticlib+set}" = set; then
5861   withval="$with_ticlib"
5862   with_ticlib=$withval
5863 else
5864   with_ticlib=no
5865 fi;
5866 echo "$as_me:5866: result: $with_ticlib" >&5
5867 echo "${ECHO_T}$with_ticlib" >&6
5868
5869 if test X"$CC_G_OPT" = X"" ; then
5870         CC_G_OPT='-g'
5871         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5872 fi
5873
5874 if test X"$CXX_G_OPT" = X"" ; then
5875         CXX_G_OPT='-g'
5876         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5877 fi
5878
5879 echo "$as_me:5879: checking for default loader flags" >&5
5880 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5881 case "$DFT_LWR_MODEL" in
5882 (libtool) LD_MODEL=''   ;;
5883 (normal)  LD_MODEL=''   ;;
5884 (debug)   LD_MODEL=$CC_G_OPT ;;
5885 (profile) LD_MODEL='-pg';;
5886 (shared)  LD_MODEL=''   ;;
5887 esac
5888 echo "$as_me:5888: result: $LD_MODEL" >&5
5889 echo "${ECHO_T}$LD_MODEL" >&6
5890
5891 case "$DFT_LWR_MODEL" in
5892 (shared)
5893
5894 echo "$as_me:5894: checking if rpath option should be used" >&5
5895 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5896
5897 # Check whether --enable-rpath or --disable-rpath was given.
5898 if test "${enable_rpath+set}" = set; then
5899   enableval="$enable_rpath"
5900   cf_cv_enable_rpath=$enableval
5901 else
5902   cf_cv_enable_rpath=no
5903 fi;
5904 echo "$as_me:5904: result: $cf_cv_enable_rpath" >&5
5905 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5906
5907 echo "$as_me:5907: checking if shared libraries should be relinked during install" >&5
5908 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5909
5910 # Check whether --enable-relink or --disable-relink was given.
5911 if test "${enable_relink+set}" = set; then
5912   enableval="$enable_relink"
5913   cf_cv_do_relink=$enableval
5914 else
5915   cf_cv_do_relink=yes
5916 fi;
5917 echo "$as_me:5917: result: $cf_cv_do_relink" >&5
5918 echo "${ECHO_T}$cf_cv_do_relink" >&6
5919         ;;
5920 esac
5921
5922 # we will build libraries one-level down.
5923 rel_builddir=..
5924
5925 LD_RPATH_OPT=
5926 if test "x$cf_cv_enable_rpath" != xno
5927 then
5928         echo "$as_me:5928: checking for an rpath option" >&5
5929 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5930         case "$cf_cv_system_name" in
5931         (irix*)
5932                 if test "$GCC" = yes; then
5933                         LD_RPATH_OPT="-Wl,-rpath,"
5934                 else
5935                         LD_RPATH_OPT="-rpath "
5936                 fi
5937                 ;;
5938         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5939                 LD_RPATH_OPT="-Wl,-rpath,"
5940                 ;;
5941         (openbsd[2-9].*|mirbsd*)
5942                 LD_RPATH_OPT="-Wl,-rpath,"
5943                 ;;
5944         (dragonfly*)
5945                 LD_RPATH_OPT="-rpath "
5946                 ;;
5947         (netbsd*)
5948                 LD_RPATH_OPT="-Wl,-rpath,"
5949                 ;;
5950         (osf*|mls+*)
5951                 LD_RPATH_OPT="-rpath "
5952                 ;;
5953         (solaris2*)
5954                 LD_RPATH_OPT="-R"
5955                 ;;
5956         (*)
5957                 ;;
5958         esac
5959         echo "$as_me:5959: result: $LD_RPATH_OPT" >&5
5960 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5961
5962         case "x$LD_RPATH_OPT" in
5963         (x-R*)
5964                 echo "$as_me:5964: checking if we need a space after rpath option" >&5
5965 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5966                 cf_save_LIBS="$LIBS"
5967
5968 cf_add_libs="$LIBS"
5969 # reverse order
5970 cf_add_0lib=
5971 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5972 # filter duplicates
5973 for cf_add_1lib in $cf_add_0lib; do
5974         for cf_add_2lib in $cf_add_libs; do
5975                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5976                         cf_add_1lib=
5977                         break
5978                 fi
5979         done
5980         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5981 done
5982 LIBS="$cf_add_libs"
5983
5984                 cat >"conftest.$ac_ext" <<_ACEOF
5985 #line 5985 "configure"
5986 #include "confdefs.h"
5987
5988 int
5989 main (void)
5990 {
5991
5992   ;
5993   return 0;
5994 }
5995 _ACEOF
5996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5997 if { (eval echo "$as_me:5997: \"$ac_link\"") >&5
5998   (eval $ac_link) 2>&5
5999   ac_status=$?
6000   echo "$as_me:6000: \$? = $ac_status" >&5
6001   (exit "$ac_status"); } &&
6002          { ac_try='test -s "conftest$ac_exeext"'
6003   { (eval echo "$as_me:6003: \"$ac_try\"") >&5
6004   (eval $ac_try) 2>&5
6005   ac_status=$?
6006   echo "$as_me:6006: \$? = $ac_status" >&5
6007   (exit "$ac_status"); }; }; then
6008   cf_rpath_space=no
6009 else
6010   echo "$as_me: failed program was:" >&5
6011 cat "conftest.$ac_ext" >&5
6012 cf_rpath_space=yes
6013 fi
6014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6015                 LIBS="$cf_save_LIBS"
6016                 echo "$as_me:6016: result: $cf_rpath_space" >&5
6017 echo "${ECHO_T}$cf_rpath_space" >&6
6018                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6019                 ;;
6020         esac
6021 fi
6022
6023         RM_SHARED_OPTS=
6024         LOCAL_LDFLAGS=
6025         LOCAL_LDFLAGS2=
6026         LD_SHARED_OPTS=
6027         INSTALL_LIB="-m 644"
6028         : ${rel_builddir:=.}
6029
6030         shlibdir=$libdir
6031
6032         MAKE_DLLS="#"
6033
6034         cf_cv_do_symlinks=no
6035         cf_ld_rpath_opt=
6036         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6037
6038         echo "$as_me:6038: checking if release/abi version should be used for shared libs" >&5
6039 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6040
6041 # Check whether --with-shlib-version or --without-shlib-version was given.
6042 if test "${with_shlib_version+set}" = set; then
6043   withval="$with_shlib_version"
6044   test -z "$withval" && withval=auto
6045         case "$withval" in
6046         (yes)
6047                 cf_cv_shlib_version=auto
6048                 ;;
6049         (rel|abi|auto)
6050                 cf_cv_shlib_version=$withval
6051                 ;;
6052         (*)
6053                 echo "$as_me:6053: result: $withval" >&5
6054 echo "${ECHO_T}$withval" >&6
6055                 { { echo "$as_me:6055: error: option value must be one of: rel, abi, or auto" >&5
6056 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6057    { (exit 1); exit 1; }; }
6058                 ;;
6059         esac
6060
6061 else
6062   cf_cv_shlib_version=auto
6063 fi;
6064         echo "$as_me:6064: result: $cf_cv_shlib_version" >&5
6065 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6066
6067         cf_cv_rm_so_locs=no
6068         cf_try_cflags=
6069
6070         # Some less-capable ports of gcc support only -fpic
6071         CC_SHARED_OPTS=
6072
6073         cf_try_fPIC=no
6074         if test "$GCC" = yes
6075         then
6076                 cf_try_fPIC=yes
6077         else
6078                 case "$cf_cv_system_name" in
6079                 (*linux*)       # e.g., PGI compiler
6080                         cf_try_fPIC=yes
6081                         ;;
6082                 esac
6083         fi
6084
6085         if test "$cf_try_fPIC" = yes
6086         then
6087                 echo "$as_me:6087: checking which $CC option to use" >&5
6088 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6089                 cf_save_CFLAGS="$CFLAGS"
6090                 for CC_SHARED_OPTS in -fPIC -fpic ''
6091                 do
6092                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6093                         cat >"conftest.$ac_ext" <<_ACEOF
6094 #line 6094 "configure"
6095 #include "confdefs.h"
6096 #include <stdio.h>
6097 int
6098 main (void)
6099 {
6100 int x = 1
6101   ;
6102   return 0;
6103 }
6104 _ACEOF
6105 rm -f "conftest.$ac_objext"
6106 if { (eval echo "$as_me:6106: \"$ac_compile\"") >&5
6107   (eval $ac_compile) 2>&5
6108   ac_status=$?
6109   echo "$as_me:6109: \$? = $ac_status" >&5
6110   (exit "$ac_status"); } &&
6111          { ac_try='test -s "conftest.$ac_objext"'
6112   { (eval echo "$as_me:6112: \"$ac_try\"") >&5
6113   (eval $ac_try) 2>&5
6114   ac_status=$?
6115   echo "$as_me:6115: \$? = $ac_status" >&5
6116   (exit "$ac_status"); }; }; then
6117   break
6118 else
6119   echo "$as_me: failed program was:" >&5
6120 cat "conftest.$ac_ext" >&5
6121 fi
6122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6123                 done
6124                 echo "$as_me:6124: result: $CC_SHARED_OPTS" >&5
6125 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6126                 CFLAGS="$cf_save_CFLAGS"
6127         fi
6128
6129         cf_cv_shlib_version_infix=no
6130
6131         case "$cf_cv_system_name" in
6132         (aix4.3-9*|aix[5-7]*)
6133                 if test "$GCC" = yes; then
6134                         CC_SHARED_OPTS='-Wl,-brtl'
6135                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6136                 else
6137                         CC_SHARED_OPTS='-brtl'
6138                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6139                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6140                 fi
6141                 ;;
6142         (beos*)
6143                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6144                 ;;
6145         (cygwin*)
6146                 CC_SHARED_OPTS=
6147                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6148                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6149                 cf_cv_shlib_version=cygdll
6150                 cf_cv_shlib_version_infix=cygdll
6151                 shlibdir=$bindir
6152                 MAKE_DLLS=
6153                 cat >mk_shared_lib.sh <<-CF_EOF
6154                 #!$SHELL
6155                 SHARED_LIB=\$1
6156                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6157                 shift
6158                 cat <<-EOF
6159                 Linking shared library
6160                 ** SHARED_LIB \$SHARED_LIB
6161                 ** IMPORT_LIB \$IMPORT_LIB
6162 EOF
6163                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6164 CF_EOF
6165                 chmod +x mk_shared_lib.sh
6166                 ;;
6167         (msys*)
6168                 CC_SHARED_OPTS=
6169                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6170                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6171                 cf_cv_shlib_version=msysdll
6172                 cf_cv_shlib_version_infix=msysdll
6173                 shlibdir=$bindir
6174                 MAKE_DLLS=
6175                 cat >mk_shared_lib.sh <<-CF_EOF
6176                 #!$SHELL
6177                 SHARED_LIB=\$1
6178                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6179                 shift
6180                 cat <<-EOF
6181                 Linking shared library
6182                 ** SHARED_LIB \$SHARED_LIB
6183                 ** IMPORT_LIB \$IMPORT_LIB
6184 EOF
6185                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6186 CF_EOF
6187                 chmod +x mk_shared_lib.sh
6188                 ;;
6189         (darwin*)
6190                 cf_try_cflags="no-cpp-precomp"
6191                 CC_SHARED_OPTS="-dynamic"
6192                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6193                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6194                 cf_cv_shlib_version_infix=yes
6195                 echo "$as_me:6195: checking if ld -search_paths_first works" >&5
6196 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6197 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6198   echo $ECHO_N "(cached) $ECHO_C" >&6
6199 else
6200
6201                         cf_save_LDFLAGS=$LDFLAGS
6202                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6203                         cat >"conftest.$ac_ext" <<_ACEOF
6204 #line 6204 "configure"
6205 #include "confdefs.h"
6206
6207 int
6208 main (void)
6209 {
6210 int i;
6211   ;
6212   return 0;
6213 }
6214 _ACEOF
6215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6216 if { (eval echo "$as_me:6216: \"$ac_link\"") >&5
6217   (eval $ac_link) 2>&5
6218   ac_status=$?
6219   echo "$as_me:6219: \$? = $ac_status" >&5
6220   (exit "$ac_status"); } &&
6221          { ac_try='test -s "conftest$ac_exeext"'
6222   { (eval echo "$as_me:6222: \"$ac_try\"") >&5
6223   (eval $ac_try) 2>&5
6224   ac_status=$?
6225   echo "$as_me:6225: \$? = $ac_status" >&5
6226   (exit "$ac_status"); }; }; then
6227   cf_cv_ldflags_search_paths_first=yes
6228 else
6229   echo "$as_me: failed program was:" >&5
6230 cat "conftest.$ac_ext" >&5
6231 cf_cv_ldflags_search_paths_first=no
6232 fi
6233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6234                                 LDFLAGS=$cf_save_LDFLAGS
6235 fi
6236 echo "$as_me:6236: result: $cf_cv_ldflags_search_paths_first" >&5
6237 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6238                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6239                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6240                 fi
6241                 ;;
6242         (haiku*)
6243
6244         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6245         if test "$cf_cv_shlib_version" = rel; then
6246                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6247         else
6248                 cf_cv_shared_soname='`basename $@`'
6249         fi
6250
6251                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6252                 ;;
6253         (hpux[7-8]*)
6254                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6255                 if test "$GCC" != yes; then
6256                         CC_SHARED_OPTS='+Z'
6257                 fi
6258                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6259                 INSTALL_LIB="-m 555"
6260                 ;;
6261         (hpux*)
6262                 # (tested with gcc 2.7.2 -- I don't have c89)
6263                 if test "$GCC" = yes; then
6264                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6265                 else
6266                         CC_SHARED_OPTS='+Z'
6267                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6268                 fi
6269                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6270                 # HP-UX shared libraries must be executable, and should be
6271                 # readonly to exploit a quirk in the memory manager.
6272                 INSTALL_LIB="-m 555"
6273                 ;;
6274         (interix*)
6275                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6276                 if test "$cf_cv_shlib_version" = rel; then
6277                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6278                 else
6279                         cf_shared_soname='`basename $@`'
6280                 fi
6281                 CC_SHARED_OPTS=
6282                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6283                 ;;
6284         (irix*)
6285                 if test "$cf_cv_enable_rpath" = yes ; then
6286                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6287                 fi
6288                 # tested with IRIX 5.2 and 'cc'.
6289                 if test "$GCC" != yes; then
6290                         CC_SHARED_OPTS='-KPIC'
6291                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6292                 else
6293                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6294                 fi
6295                 cf_cv_rm_so_locs=yes
6296                 ;;
6297         (linux*|gnu*|k*bsd*-gnu)
6298                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6299                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6300                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6301                 fi
6302                 if test "$cf_cv_enable_rpath" = yes ; then
6303                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6304                 fi
6305
6306         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6307         if test "$cf_cv_shlib_version" = rel; then
6308                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6309         else
6310                 cf_cv_shared_soname='`basename $@`'
6311         fi
6312
6313                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6314                 ;;
6315         (mingw*msvc*)
6316                 cf_cv_shlib_version=msvcdll
6317                 cf_cv_shlib_version_infix=msvcdll
6318                 shlibdir=$bindir
6319                 MAKE_DLLS=
6320                 if test "$DFT_LWR_MODEL" = "shared" ; then
6321                         LOCAL_LDFLAGS="-link -dll"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6324                 fi
6325                 CC_SHARED_OPTS=
6326                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6327                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6328                 cat >mk_shared_lib.sh <<-CF_EOF
6329                 #!$SHELL
6330                 SHARED_LIB=\$1
6331                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6332                 shift
6333                 my_ld=\$1
6334                 shift
6335                 cat <<-EOF
6336                 Linking shared library
6337                 ** SHARED LIB \$SHARED_LIB
6338                 ** IMPORT_LIB \$IMPORT_LIB
6339 EOF
6340                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6341                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6342                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6343 CF_EOF
6344                 chmod +x mk_shared_lib.sh
6345                 cat >mk_prog.sh <<-CF_EOF
6346                 #!$SHELL
6347                 shift
6348                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6349                 LD="$LD"
6350                 clopts=()
6351                 ldopts=("/subsystem:console")
6352                 libs=()
6353                 isdll=0
6354                 while test \$# -gt 0; do
6355                         case "\$1" in
6356                                 -link)
6357                                         # ignore -link argument
6358                                         ;;
6359                                 -M[TD] | -M[TD]d)
6360                                         # ignore runtime-library option
6361                                         ;;
6362                                 -dll)
6363                                         isdll=1
6364                                         ;;
6365                                 -W* | -w*)
6366                                         # ignore warnings
6367                                         ;;
6368                                 -D*)
6369                                         clopts+=("\$1")
6370                                         ;;
6371                                 -I*)
6372                                         clopts+=("\$1")
6373                                         ;;
6374                                 -l*)
6375                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6376                                         ;;
6377                                 -L*)
6378                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6379                                         ;;
6380                                 *.obj | *.o)
6381                                         ldopts+=("\$1")
6382                                         ;;
6383                                 -Wl,*)
6384                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6385                                                 ldopts+=("\${linkarg}")
6386                                         done
6387                                         ;;
6388                                 *.lib)
6389                                         ldopts+=("\$1")
6390                                         ;;
6391                                 -o)
6392                                         shift
6393                                         ldopts+=("-out:\$1")
6394                                         ;;
6395                                 *)
6396                                         clopts+=("\$1")
6397                                         ldopts+=("\$1")
6398                                         ;;
6399                         esac
6400                         shift
6401                 done
6402                 if [ "\$isdll" -ne 0 ]; then
6403                         for lib in \${libs[*]}; do
6404                                 ldopts+=("\$lib.dll.lib")
6405                         done
6406                 else
6407                         for lib in \${libs[*]}; do
6408                                 ldopts+=("\$lib.lib")
6409                         done
6410                 fi
6411                 cat <<-EOF
6412                 Creating program
6413                 ** ld options:   "\${ldopts[@]}"
6414 EOF
6415                 exec \$LD \${ldopts[@]}
6416 CF_EOF
6417                 chmod +x mk_prog.sh
6418                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6419                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6420                 ;;
6421         (mingw*)
6422                 cf_cv_shlib_version=mingw
6423                 cf_cv_shlib_version_infix=mingw
6424                 shlibdir=$bindir
6425                 MAKE_DLLS=
6426                 if test "$DFT_LWR_MODEL" = "shared" ; then
6427                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6428                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6429                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6430                 fi
6431                 CC_SHARED_OPTS=
6432                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6433                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6434                 cat >mk_shared_lib.sh <<-CF_EOF
6435                 #!$SHELL
6436                 SHARED_LIB=\$1
6437                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6438                 shift
6439                 cat <<-EOF
6440                 Linking shared library
6441                 ** SHARED_LIB \$SHARED_LIB
6442                 ** IMPORT_LIB \$IMPORT_LIB
6443 EOF
6444                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6445 CF_EOF
6446                 chmod +x mk_shared_lib.sh
6447                 ;;
6448         (openbsd[2-9].*|mirbsd*)
6449                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6450                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6451                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6452                 fi
6453                 if test "$cf_cv_enable_rpath" = yes ; then
6454                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6455                 fi
6456                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6457
6458         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6459         if test "$cf_cv_shlib_version" = rel; then
6460                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6461         else
6462                 cf_cv_shared_soname='`basename $@`'
6463         fi
6464
6465                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6466                 ;;
6467         (nskJ*)
6468                 CC_SHARED_OPTS=
6469                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6470                 ;;
6471         (nskL*)
6472                 CC_SHARED_OPTS=
6473                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6474                 ;;
6475         (nto-qnx*|openbsd*|freebsd[12].*)
6476                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6477                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6478                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6479                 ;;
6480         (dragonfly*|freebsd*)
6481                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6482                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6483                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6484                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6485                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6486                 fi
6487
6488         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6489         if test "$cf_cv_shlib_version" = rel; then
6490                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6491         else
6492                 cf_cv_shared_soname='`basename $@`'
6493         fi
6494
6495                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6496                 ;;
6497         (netbsd*)
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6500                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6501                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6502                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6503                         if test "$cf_cv_shlib_version" = auto; then
6504                         if test -f /usr/libexec/ld.elf_so; then
6505                                 cf_cv_shlib_version=abi
6506                         else
6507                                 cf_cv_shlib_version=rel
6508                         fi
6509                         fi
6510
6511         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6512         if test "$cf_cv_shlib_version" = rel; then
6513                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6514         else
6515                 cf_cv_shared_soname='`basename $@`'
6516         fi
6517
6518                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6519                 else
6520                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6521                 fi
6522                 ;;
6523         (osf*|mls+*)
6524                 # tested with OSF/1 V3.2 and 'cc'
6525                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6526                 # link with shared libs).
6527                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6528                 case "$host_os" in
6529                 (osf4*)
6530                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6531                         ;;
6532                 esac
6533                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6534                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6535                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6536                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6537                 fi
6538                 cf_cv_rm_so_locs=yes
6539                 ;;
6540         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6541                 # tested with osr5.0.5
6542                 if test "$GCC" != yes; then
6543                         CC_SHARED_OPTS='-belf -KPIC'
6544                 fi
6545                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6546                 if test "$cf_cv_enable_rpath" = yes ; then
6547                         # only way is to set LD_RUN_PATH but no switch for it
6548                         RUN_PATH=$libdir
6549                 fi
6550                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6551                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6552                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6553                 ;;
6554         (sunos4*)
6555                 # tested with SunOS 4.1.1 and gcc 2.7.0
6556                 if test "$GCC" != yes; then
6557                         CC_SHARED_OPTS='-KPIC'
6558                 fi
6559                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6560                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6561                 ;;
6562         (solaris2*)
6563                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6564                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6565                 if test "$DFT_LWR_MODEL" = "shared" ; then
6566                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6567                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6568                 fi
6569                 if test "$cf_cv_enable_rpath" = yes ; then
6570                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6571                 fi
6572
6573         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6574         if test "$cf_cv_shlib_version" = rel; then
6575                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6576         else
6577                 cf_cv_shared_soname='`basename $@`'
6578         fi
6579
6580                 if test "$GCC" != yes; then
6581                         cf_save_CFLAGS="$CFLAGS"
6582                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6583                         do
6584                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6585                                 cat >"conftest.$ac_ext" <<_ACEOF
6586 #line 6586 "configure"
6587 #include "confdefs.h"
6588 #include <stdio.h>
6589 int
6590 main (void)
6591 {
6592 printf("Hello\\n");
6593   ;
6594   return 0;
6595 }
6596 _ACEOF
6597 rm -f "conftest.$ac_objext"
6598 if { (eval echo "$as_me:6598: \"$ac_compile\"") >&5
6599   (eval $ac_compile) 2>&5
6600   ac_status=$?
6601   echo "$as_me:6601: \$? = $ac_status" >&5
6602   (exit "$ac_status"); } &&
6603          { ac_try='test -s "conftest.$ac_objext"'
6604   { (eval echo "$as_me:6604: \"$ac_try\"") >&5
6605   (eval $ac_try) 2>&5
6606   ac_status=$?
6607   echo "$as_me:6607: \$? = $ac_status" >&5
6608   (exit "$ac_status"); }; }; then
6609   break
6610 else
6611   echo "$as_me: failed program was:" >&5
6612 cat "conftest.$ac_ext" >&5
6613 fi
6614 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6615                         done
6616                         CFLAGS="$cf_save_CFLAGS"
6617                         CC_SHARED_OPTS=$cf_shared_opts
6618                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6619                 else
6620                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6621                 fi
6622                 ;;
6623         (sysv5uw7*|unix_sv*)
6624                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6625                 if test "$GCC" != yes; then
6626                         CC_SHARED_OPTS='-KPIC'
6627                 fi
6628                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6629                 ;;
6630         (*)
6631                 CC_SHARED_OPTS='unknown'
6632                 MK_SHARED_LIB='echo unknown'
6633                 ;;
6634         esac
6635
6636         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6637         case "$cf_cv_shlib_version" in
6638         (rel|abi)
6639                 case "$MK_SHARED_LIB" in
6640                 (*'-o $@')
6641                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6642                         ;;
6643                 (*)
6644                         { echo "$as_me:6644: WARNING: ignored --with-shlib-version" >&5
6645 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6646                         ;;
6647                 esac
6648                 ;;
6649         esac
6650
6651         if test -n "$cf_try_cflags"
6652         then
6653 cat > conftest.$ac_ext <<EOF
6654 #line 6654 "${as_me:-configure}"
6655 #include <stdio.h>
6656 int main(int argc, char *argv[])
6657 {
6658         printf("hello\\n");
6659         return (argv[argc-1] == 0) ;
6660 }
6661 EOF
6662                 cf_save_CFLAGS="$CFLAGS"
6663                 for cf_opt in $cf_try_cflags
6664                 do
6665                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6666                         echo "$as_me:6666: checking if CFLAGS option -$cf_opt works" >&5
6667 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6668                         if { (eval echo "$as_me:6668: \"$ac_compile\"") >&5
6669   (eval $ac_compile) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit "$ac_status"); }; then
6673                                 echo "$as_me:6673: result: yes" >&5
6674 echo "${ECHO_T}yes" >&6
6675                                 cf_save_CFLAGS="$CFLAGS"
6676                         else
6677                                 echo "$as_me:6677: result: no" >&5
6678 echo "${ECHO_T}no" >&6
6679                         fi
6680                 done
6681                 CFLAGS="$cf_save_CFLAGS"
6682         fi
6683
6684         # RPATH_LIST is a colon-separated list of directories
6685         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6686         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6687
6688         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6689
6690         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6691
6692 echo "${as_me:-configure}:6692: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6693
6694         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6695
6696 echo "${as_me:-configure}:6696: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6697
6698 for model in $cf_list_models ; do
6699         case "$model" in
6700         (libtool)
6701
6702 echo "$as_me:6702: checking for additional libtool options" >&5
6703 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6704
6705 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6706 if test "${with_libtool_opts+set}" = set; then
6707   withval="$with_libtool_opts"
6708   with_libtool_opts=$withval
6709 else
6710   with_libtool_opts=no
6711 fi;
6712 echo "$as_me:6712: result: $with_libtool_opts" >&5
6713 echo "${ECHO_T}$with_libtool_opts" >&6
6714
6715 case .$with_libtool_opts in
6716 (.yes|.no|.)
6717         ;;
6718 (*)
6719         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6720         ;;
6721 esac
6722
6723 echo "$as_me:6723: checking if exported-symbols file should be used" >&5
6724 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6725
6726 # Check whether --with-export-syms or --without-export-syms was given.
6727 if test "${with_export_syms+set}" = set; then
6728   withval="$with_export_syms"
6729   with_export_syms=$withval
6730 else
6731   with_export_syms=no
6732 fi;
6733 if test "x$with_export_syms" = xyes
6734 then
6735         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6736
6737 fi
6738 echo "$as_me:6738: result: $with_export_syms" >&5
6739 echo "${ECHO_T}$with_export_syms" >&6
6740 if test "x$with_export_syms" != xno
6741 then
6742         EXPORT_SYMS="-export-symbols $with_export_syms"
6743
6744 fi
6745
6746                 ;;
6747         (shared)
6748                 if test "$CC_SHARED_OPTS" = "unknown"; then
6749                         { { echo "$as_me:6749: error: Shared libraries are not supported in this version" >&5
6750 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6751    { (exit 1); exit 1; }; }
6752                 fi
6753                 # workaround for inept transition to PIE vs PIC...
6754                 echo "$as_me:6754: checking if current CFLAGS link properly" >&5
6755 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6756                 cat >"conftest.$ac_ext" <<_ACEOF
6757 #line 6757 "configure"
6758 #include "confdefs.h"
6759 #include <stdio.h>
6760 int
6761 main (void)
6762 {
6763 printf("Hello work\\n");
6764   ;
6765   return 0;
6766 }
6767 _ACEOF
6768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6769 if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
6770   (eval $ac_link) 2>&5
6771   ac_status=$?
6772   echo "$as_me:6772: \$? = $ac_status" >&5
6773   (exit "$ac_status"); } &&
6774          { ac_try='test -s "conftest$ac_exeext"'
6775   { (eval echo "$as_me:6775: \"$ac_try\"") >&5
6776   (eval $ac_try) 2>&5
6777   ac_status=$?
6778   echo "$as_me:6778: \$? = $ac_status" >&5
6779   (exit "$ac_status"); }; }; then
6780   cf_cflags_work=yes
6781 else
6782   echo "$as_me: failed program was:" >&5
6783 cat "conftest.$ac_ext" >&5
6784 cf_cflags_work=no
6785 fi
6786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6787                 echo "$as_me:6787: result: $cf_cflags_work" >&5
6788 echo "${ECHO_T}$cf_cflags_work" >&6
6789                 if test "$cf_cflags_work" = no
6790                 then
6791                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6792
6793 echo "${as_me:-configure}:6793: testing try to work around by appending shared-options ..." 1>&5
6794
6795                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6796                 fi
6797
6798 echo "$as_me:6798: checking if versioned-symbols file should be used" >&5
6799 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6800
6801 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6802 if test "${with_versioned_syms+set}" = set; then
6803   withval="$with_versioned_syms"
6804   with_versioned_syms=$withval
6805 else
6806   with_versioned_syms=no
6807 fi;
6808 case "x$with_versioned_syms" in
6809 (xyes)
6810         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6811
6812         ;;
6813 (xno)
6814         ;;
6815 (x/*)
6816         test -f "$with_versioned_syms" || { { echo "$as_me:6816: error: expected a filename: $with_versioned_syms" >&5
6817 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6818    { (exit 1); exit 1; }; }
6819         ;;
6820 (*)
6821         test -f "$with_versioned_syms" || { { echo "$as_me:6821: error: expected a filename: $with_versioned_syms" >&5
6822 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6823    { (exit 1); exit 1; }; }
6824         with_versioned_syms=`pwd`/"$with_versioned_syms"
6825         ;;
6826 esac
6827 echo "$as_me:6827: result: $with_versioned_syms" >&5
6828 echo "${ECHO_T}$with_versioned_syms" >&6
6829
6830 RESULTING_SYMS=
6831 VERSIONED_SYMS=
6832 WILDCARD_SYMS=
6833
6834 if test "x$with_versioned_syms" != xno
6835 then
6836         RESULTING_SYMS=$with_versioned_syms
6837         case "x$MK_SHARED_LIB" in
6838         (*-Wl,*)
6839                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6840                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6841                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6842
6843 echo "${as_me:-configure}:6843: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6844
6845                 ;;
6846         (*-dy\ *)
6847                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6848                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6849                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6850
6851 echo "${as_me:-configure}:6851: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6852
6853                 ;;
6854         (*)
6855                 { echo "$as_me:6855: WARNING: this system does not support versioned-symbols" >&5
6856 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6857                 ;;
6858         esac
6859
6860         # Linux ld can selectively override scope, e.g., of symbols beginning with
6861         # "_" by first declaring some as global, and then using a wildcard to
6862         # declare the others as local.  Some other loaders cannot do this.  Check
6863         # by constructing a (very) simple shared library and inspecting its
6864         # symbols.
6865         if test "x$VERSIONED_SYMS" != "x"
6866         then
6867                 echo "$as_me:6867: checking if wildcards can be used to selectively omit symbols" >&5
6868 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6869                 WILDCARD_SYMS=no
6870
6871                 # make sources
6872                 rm -f conftest.*
6873
6874                 cat >conftest.ver <<EOF
6875 module_1.0 {
6876 global:
6877         globalf1;
6878 local:
6879         localf1;
6880 };
6881 module_2.0 {
6882 global:
6883         globalf2;
6884 local:
6885         localf2;
6886         _*;
6887 } module_1.0;
6888 submodule_1.0 {
6889 global:
6890         subglobalf1;
6891         _ismissing;
6892 local:
6893         sublocalf1;
6894 };
6895 submodule_2.0 {
6896 global:
6897         subglobalf2;
6898 local:
6899         sublocalf2;
6900         _*;
6901 } submodule_1.0;
6902 EOF
6903                 cat >conftest.$ac_ext <<EOF
6904 #line 6904 "configure"
6905 int     _ismissing(void) { return 1; }
6906 int     _localf1(void) { return 1; }
6907 int     _localf2(void) { return 2; }
6908 int     globalf1(void) { return 1; }
6909 int     globalf2(void) { return 2; }
6910 int     _sublocalf1(void) { return 1; }
6911 int     _sublocalf2(void) { return 2; }
6912 int     subglobalf1(void) { return 1; }
6913 int     subglobalf2(void) { return 2; }
6914 EOF
6915                 cat >conftest.mk <<EOF
6916 CC=${CC}
6917 CFLAGS=${CFLAGS}
6918 CPPFLAGS=${CPPFLAGS}
6919 LDFLAGS=${LDFLAGS}
6920 LIBS=${LIBS}
6921 VERSIONED_SYMS=${VERSIONED_SYMS}
6922 RESULTING_SYMS=conftest.ver
6923 MK_SHARED_LIB=${MK_SHARED_LIB}
6924 conftest.so: conftest.$ac_cv_objext
6925                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6926 EOF
6927
6928                 # compile source, make library
6929                 if make -f conftest.mk 2>&5 >/dev/null
6930                 then
6931                         # test for missing symbol in either Data or Text section
6932                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6933                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6934                 fi
6935                 echo "$as_me:6935: result: $WILDCARD_SYMS" >&5
6936 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6937                 rm -f conftest.*
6938         fi
6939 fi
6940
6941                 ;;
6942         esac
6943 done
6944
6945 ### Checks for special libraries, must be done up-front.
6946 SHLIB_LIST=""
6947
6948 echo "$as_me:6948: checking if you want to link with the GPM mouse library" >&5
6949 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6950
6951 # Check whether --with-gpm or --without-gpm was given.
6952 if test "${with_gpm+set}" = set; then
6953   withval="$with_gpm"
6954   with_gpm=$withval
6955 else
6956   with_gpm=maybe
6957 fi;
6958 echo "$as_me:6958: result: $with_gpm" >&5
6959 echo "${ECHO_T}$with_gpm" >&6
6960
6961 if test "$with_gpm" != no ; then
6962         echo "$as_me:6962: checking for gpm.h" >&5
6963 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6964 if test "${ac_cv_header_gpm_h+set}" = set; then
6965   echo $ECHO_N "(cached) $ECHO_C" >&6
6966 else
6967   cat >"conftest.$ac_ext" <<_ACEOF
6968 #line 6968 "configure"
6969 #include "confdefs.h"
6970 #include <gpm.h>
6971 _ACEOF
6972 if { (eval echo "$as_me:6972: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6973   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6974   ac_status=$?
6975   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6976   rm -f conftest.er1
6977   cat conftest.err >&5
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit "$ac_status"); } >/dev/null; then
6980   if test -s conftest.err; then
6981     ac_cpp_err=$ac_c_preproc_warn_flag
6982   else
6983     ac_cpp_err=
6984   fi
6985 else
6986   ac_cpp_err=yes
6987 fi
6988 if test -z "$ac_cpp_err"; then
6989   ac_cv_header_gpm_h=yes
6990 else
6991   echo "$as_me: failed program was:" >&5
6992   cat "conftest.$ac_ext" >&5
6993   ac_cv_header_gpm_h=no
6994 fi
6995 rm -f conftest.err "conftest.$ac_ext"
6996 fi
6997 echo "$as_me:6997: result: $ac_cv_header_gpm_h" >&5
6998 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6999 if test "$ac_cv_header_gpm_h" = yes; then
7000
7001 cat >>confdefs.h <<\EOF
7002 #define HAVE_GPM_H 1
7003 EOF
7004
7005                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7006                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7007
7008 echo "${as_me:-configure}:7008: testing assuming we really have GPM library ..." 1>&5
7009
7010 cat >>confdefs.h <<\EOF
7011 #define HAVE_LIBGPM 1
7012 EOF
7013
7014                         with_gpm=yes
7015                 else
7016                         echo "$as_me:7016: checking for Gpm_Open in -lgpm" >&5
7017 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7018 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7019   echo $ECHO_N "(cached) $ECHO_C" >&6
7020 else
7021   ac_check_lib_save_LIBS=$LIBS
7022 LIBS="-lgpm  $LIBS"
7023 cat >"conftest.$ac_ext" <<_ACEOF
7024 #line 7024 "configure"
7025 #include "confdefs.h"
7026
7027 /* Override any gcc2 internal prototype to avoid an error.  */
7028 #ifdef __cplusplus
7029 extern "C"
7030 #endif
7031 /* We use char because int might match the return type of a gcc2
7032    builtin and then its argument prototype would still apply.  */
7033 char Gpm_Open ();
7034 int
7035 main (void)
7036 {
7037 Gpm_Open ();
7038   ;
7039   return 0;
7040 }
7041 _ACEOF
7042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7043 if { (eval echo "$as_me:7043: \"$ac_link\"") >&5
7044   (eval $ac_link) 2>&5
7045   ac_status=$?
7046   echo "$as_me:7046: \$? = $ac_status" >&5
7047   (exit "$ac_status"); } &&
7048          { ac_try='test -s "conftest$ac_exeext"'
7049   { (eval echo "$as_me:7049: \"$ac_try\"") >&5
7050   (eval $ac_try) 2>&5
7051   ac_status=$?
7052   echo "$as_me:7052: \$? = $ac_status" >&5
7053   (exit "$ac_status"); }; }; then
7054   ac_cv_lib_gpm_Gpm_Open=yes
7055 else
7056   echo "$as_me: failed program was:" >&5
7057 cat "conftest.$ac_ext" >&5
7058 ac_cv_lib_gpm_Gpm_Open=no
7059 fi
7060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7061 LIBS=$ac_check_lib_save_LIBS
7062 fi
7063 echo "$as_me:7063: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7064 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7065 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7066   with_gpm=yes
7067 else
7068
7069                                 if test "$with_gpm" = maybe; then
7070                                         { echo "$as_me:7070: WARNING: Cannot link with GPM library" >&5
7071 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7072                                         with_gpm=no
7073                                 else
7074                                         { { echo "$as_me:7074: error: Cannot link with GPM library" >&5
7075 echo "$as_me: error: Cannot link with GPM library" >&2;}
7076    { (exit 1); exit 1; }; }
7077                                 fi
7078
7079 fi
7080
7081                 fi
7082
7083 else
7084
7085                 test "$with_gpm" != maybe && { echo "$as_me:7085: WARNING: Cannot find GPM header" >&5
7086 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7087                 with_gpm=no
7088
7089 fi
7090
7091 fi
7092
7093 if test "$with_gpm" != no ; then
7094         echo "$as_me:7094: checking if you want to load GPM dynamically" >&5
7095 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7096
7097 # Check whether --with-dlsym or --without-dlsym was given.
7098 if test "${with_dlsym+set}" = set; then
7099   withval="$with_dlsym"
7100   with_dlsym=$withval
7101 else
7102   with_dlsym=yes
7103 fi;
7104         echo "$as_me:7104: result: $with_dlsym" >&5
7105 echo "${ECHO_T}$with_dlsym" >&6
7106         if test "x$with_dlsym" = xyes ; then
7107
7108 cf_have_dlsym=no
7109 echo "$as_me:7109: checking for dlsym" >&5
7110 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7111 if test "${ac_cv_func_dlsym+set}" = set; then
7112   echo $ECHO_N "(cached) $ECHO_C" >&6
7113 else
7114   cat >"conftest.$ac_ext" <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7117 #define dlsym autoconf_temporary
7118 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7119 #undef dlsym
7120
7121 #ifdef __cplusplus
7122 extern "C"
7123 #endif
7124
7125 /* We use char because int might match the return type of a gcc2
7126    builtin and then its argument prototype would still apply.  */
7127 char dlsym (void);
7128
7129 int
7130 main (void)
7131 {
7132
7133 /* The GNU C library defines stubs for functions which it implements
7134     to always fail with ENOSYS.  Some functions are actually named
7135     something starting with __ and the normal name is an alias.  */
7136 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7137 #error found stub for dlsym
7138 #endif
7139
7140         return dlsym ();
7141   ;
7142   return 0;
7143 }
7144 _ACEOF
7145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7146 if { (eval echo "$as_me:7146: \"$ac_link\"") >&5
7147   (eval $ac_link) 2>&5
7148   ac_status=$?
7149   echo "$as_me:7149: \$? = $ac_status" >&5
7150   (exit "$ac_status"); } &&
7151          { ac_try='test -s "conftest$ac_exeext"'
7152   { (eval echo "$as_me:7152: \"$ac_try\"") >&5
7153   (eval $ac_try) 2>&5
7154   ac_status=$?
7155   echo "$as_me:7155: \$? = $ac_status" >&5
7156   (exit "$ac_status"); }; }; then
7157   ac_cv_func_dlsym=yes
7158 else
7159   echo "$as_me: failed program was:" >&5
7160 cat "conftest.$ac_ext" >&5
7161 ac_cv_func_dlsym=no
7162 fi
7163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7164 fi
7165 echo "$as_me:7165: result: $ac_cv_func_dlsym" >&5
7166 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7167 if test "$ac_cv_func_dlsym" = yes; then
7168   cf_have_dlsym=yes
7169 else
7170
7171 cf_have_libdl=no
7172 echo "$as_me:7172: checking for dlsym in -ldl" >&5
7173 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7174 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7175   echo $ECHO_N "(cached) $ECHO_C" >&6
7176 else
7177   ac_check_lib_save_LIBS=$LIBS
7178 LIBS="-ldl  $LIBS"
7179 cat >"conftest.$ac_ext" <<_ACEOF
7180 #line 7180 "configure"
7181 #include "confdefs.h"
7182
7183 /* Override any gcc2 internal prototype to avoid an error.  */
7184 #ifdef __cplusplus
7185 extern "C"
7186 #endif
7187 /* We use char because int might match the return type of a gcc2
7188    builtin and then its argument prototype would still apply.  */
7189 char dlsym ();
7190 int
7191 main (void)
7192 {
7193 dlsym ();
7194   ;
7195   return 0;
7196 }
7197 _ACEOF
7198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7199 if { (eval echo "$as_me:7199: \"$ac_link\"") >&5
7200   (eval $ac_link) 2>&5
7201   ac_status=$?
7202   echo "$as_me:7202: \$? = $ac_status" >&5
7203   (exit "$ac_status"); } &&
7204          { ac_try='test -s "conftest$ac_exeext"'
7205   { (eval echo "$as_me:7205: \"$ac_try\"") >&5
7206   (eval $ac_try) 2>&5
7207   ac_status=$?
7208   echo "$as_me:7208: \$? = $ac_status" >&5
7209   (exit "$ac_status"); }; }; then
7210   ac_cv_lib_dl_dlsym=yes
7211 else
7212   echo "$as_me: failed program was:" >&5
7213 cat "conftest.$ac_ext" >&5
7214 ac_cv_lib_dl_dlsym=no
7215 fi
7216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7217 LIBS=$ac_check_lib_save_LIBS
7218 fi
7219 echo "$as_me:7219: result: $ac_cv_lib_dl_dlsym" >&5
7220 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7221 if test "$ac_cv_lib_dl_dlsym" = yes; then
7222
7223         cf_have_dlsym=yes
7224         cf_have_libdl=yes
7225 fi
7226
7227 fi
7228
7229 if test "$cf_have_dlsym" = yes ; then
7230         test "$cf_have_libdl" = yes && {
7231 cf_add_libs="$LIBS"
7232 # reverse order
7233 cf_add_0lib=
7234 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7235 # filter duplicates
7236 for cf_add_1lib in $cf_add_0lib; do
7237         for cf_add_2lib in $cf_add_libs; do
7238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7239                         cf_add_1lib=
7240                         break
7241                 fi
7242         done
7243         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7244 done
7245 LIBS="$cf_add_libs"
7246  }
7247
7248         echo "$as_me:7248: checking whether able to link to dl*() functions" >&5
7249 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7250         cat >"conftest.$ac_ext" <<_ACEOF
7251 #line 7251 "configure"
7252 #include "confdefs.h"
7253 #include <dlfcn.h>
7254 int
7255 main (void)
7256 {
7257
7258                 void *obj;
7259                 if ((obj = dlopen("filename", 0)) != 0) {
7260                         if (dlsym(obj, "symbolname") == 0) {
7261                         dlclose(obj);
7262                         }
7263                 }
7264   ;
7265   return 0;
7266 }
7267 _ACEOF
7268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7269 if { (eval echo "$as_me:7269: \"$ac_link\"") >&5
7270   (eval $ac_link) 2>&5
7271   ac_status=$?
7272   echo "$as_me:7272: \$? = $ac_status" >&5
7273   (exit "$ac_status"); } &&
7274          { ac_try='test -s "conftest$ac_exeext"'
7275   { (eval echo "$as_me:7275: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:7278: \$? = $ac_status" >&5
7279   (exit "$ac_status"); }; }; then
7280
7281 cat >>confdefs.h <<\EOF
7282 #define HAVE_LIBDL 1
7283 EOF
7284
7285 else
7286   echo "$as_me: failed program was:" >&5
7287 cat "conftest.$ac_ext" >&5
7288
7289                 { { echo "$as_me:7289: error: Cannot link test program for libdl" >&5
7290 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7291    { (exit 1); exit 1; }; }
7292 fi
7293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7294         echo "$as_me:7294: result: ok" >&5
7295 echo "${ECHO_T}ok" >&6
7296 else
7297         { { echo "$as_me:7297: error: Cannot find dlsym function" >&5
7298 echo "$as_me: error: Cannot find dlsym function" >&2;}
7299    { (exit 1); exit 1; }; }
7300 fi
7301
7302                 if test "x$with_gpm" != xyes ; then
7303                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7304
7305 echo "${as_me:-configure}:7305: testing assuming soname for gpm is $with_gpm ..." 1>&5
7306
7307                         cf_cv_gpm_soname="$with_gpm"
7308                 else
7309
7310 echo "$as_me:7310: checking for soname of gpm library" >&5
7311 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7312 if test "${cf_cv_gpm_soname+set}" = set; then
7313   echo $ECHO_N "(cached) $ECHO_C" >&6
7314 else
7315
7316 cf_cv_gpm_soname=unknown
7317 if test "$cross_compiling" != yes ; then
7318 cat >conftest.$ac_ext <<CF_EOF
7319 #include <gpm.h>
7320 int main(void)
7321 {
7322 if (Gpm_Open(0,0)) Gpm_Close();
7323         ${cf_cv_main_return:-return}(0);
7324 }
7325 CF_EOF
7326 cf_save_LIBS="$LIBS"
7327
7328 cf_add_libs="$LIBS"
7329 # reverse order
7330 cf_add_0lib=
7331 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7332 # filter duplicates
7333 for cf_add_1lib in $cf_add_0lib; do
7334         for cf_add_2lib in $cf_add_libs; do
7335                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7336                         cf_add_1lib=
7337                         break
7338                 fi
7339         done
7340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7341 done
7342 LIBS="$cf_add_libs"
7343
7344         if { (eval echo "$as_me:7344: \"$ac_compile\"") >&5
7345   (eval $ac_compile) 2>&5
7346   ac_status=$?
7347   echo "$as_me:7347: \$? = $ac_status" >&5
7348   (exit "$ac_status"); } ; then
7349                 if { (eval echo "$as_me:7349: \"$ac_link\"") >&5
7350   (eval $ac_link) 2>&5
7351   ac_status=$?
7352   echo "$as_me:7352: \$? = $ac_status" >&5
7353   (exit "$ac_status"); } ; then
7354                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7355                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7356                 fi
7357         fi
7358 rm -rf ./conftest*
7359 LIBS="$cf_save_LIBS"
7360 fi
7361
7362 fi
7363 echo "$as_me:7363: result: $cf_cv_gpm_soname" >&5
7364 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7365
7366                 fi
7367                 test "$cf_cv_gpm_soname" != "unknown" &&
7368 cat >>confdefs.h <<EOF
7369 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7370 EOF
7371
7372                 SHLIB_LIST="-ldl $SHLIB_LIST"
7373
7374 cf_add_libs="$PRIVATE_LIBS"
7375 # reverse order
7376 cf_add_0lib=
7377 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7378 # filter duplicates
7379 for cf_add_1lib in $cf_add_0lib; do
7380         for cf_add_2lib in $cf_add_libs; do
7381                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7382                         cf_add_1lib=
7383                         break
7384                 fi
7385         done
7386         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7387 done
7388 PRIVATE_LIBS="$cf_add_libs"
7389
7390         else
7391                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7392
7393 cf_add_libs="$TEST_LIBS"
7394 # reverse order
7395 cf_add_0lib=
7396 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7397 # filter duplicates
7398 for cf_add_1lib in $cf_add_0lib; do
7399         for cf_add_2lib in $cf_add_libs; do
7400                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7401                         cf_add_1lib=
7402                         break
7403                 fi
7404         done
7405         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7406 done
7407 TEST_LIBS="$cf_add_libs"
7408
7409 cf_add_libs="$PRIVATE_LIBS"
7410 # reverse order
7411 cf_add_0lib=
7412 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7413 # filter duplicates
7414 for cf_add_1lib in $cf_add_0lib; do
7415         for cf_add_2lib in $cf_add_libs; do
7416                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7417                         cf_add_1lib=
7418                         break
7419                 fi
7420         done
7421         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7422 done
7423 PRIVATE_LIBS="$cf_add_libs"
7424
7425         fi
7426
7427 cat >>confdefs.h <<\EOF
7428 #define HAVE_LIBGPM 1
7429 EOF
7430
7431 echo "$as_me:7431: checking for Gpm_Wgetch in -lgpm" >&5
7432 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7433 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7434   echo $ECHO_N "(cached) $ECHO_C" >&6
7435 else
7436   ac_check_lib_save_LIBS=$LIBS
7437 LIBS="-lgpm  $LIBS"
7438 cat >"conftest.$ac_ext" <<_ACEOF
7439 #line 7439 "configure"
7440 #include "confdefs.h"
7441
7442 /* Override any gcc2 internal prototype to avoid an error.  */
7443 #ifdef __cplusplus
7444 extern "C"
7445 #endif
7446 /* We use char because int might match the return type of a gcc2
7447    builtin and then its argument prototype would still apply.  */
7448 char Gpm_Wgetch ();
7449 int
7450 main (void)
7451 {
7452 Gpm_Wgetch ();
7453   ;
7454   return 0;
7455 }
7456 _ACEOF
7457 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7458 if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
7459   (eval $ac_link) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit "$ac_status"); } &&
7463          { ac_try='test -s "conftest$ac_exeext"'
7464   { (eval echo "$as_me:7464: \"$ac_try\"") >&5
7465   (eval $ac_try) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit "$ac_status"); }; }; then
7469   ac_cv_lib_gpm_Gpm_Wgetch=yes
7470 else
7471   echo "$as_me: failed program was:" >&5
7472 cat "conftest.$ac_ext" >&5
7473 ac_cv_lib_gpm_Gpm_Wgetch=no
7474 fi
7475 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7476 LIBS=$ac_check_lib_save_LIBS
7477 fi
7478 echo "$as_me:7478: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7479 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7480 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7481
7482 echo "$as_me:7482: checking if GPM is weakly bound to curses library" >&5
7483 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7484 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7485   echo $ECHO_N "(cached) $ECHO_C" >&6
7486 else
7487
7488 cf_cv_check_gpm_wgetch=unknown
7489 if test "$cross_compiling" != yes ; then
7490
7491 cat >conftest.$ac_ext <<CF_EOF
7492 #include <gpm.h>
7493 int main(void)
7494 {
7495         Gpm_Wgetch();
7496         ${cf_cv_main_return:-return}(0);
7497 }
7498 CF_EOF
7499
7500         cf_save_LIBS="$LIBS"
7501         # This only works if we can look at the symbol table.  If a shared
7502         # library is stripped for install, we cannot use that.  So we're forced
7503         # to rely on the static library, noting that some packagers may not
7504         # include it.
7505         LIBS="-static -lgpm -dynamic $LIBS"
7506         if { (eval echo "$as_me:7506: \"$ac_compile\"") >&5
7507   (eval $ac_compile) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit "$ac_status"); } ; then
7511                 if { (eval echo "$as_me:7511: \"$ac_link\"") >&5
7512   (eval $ac_link) 2>&5
7513   ac_status=$?
7514   echo "$as_me:7514: \$? = $ac_status" >&5
7515   (exit "$ac_status"); } ; then
7516                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7517                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7518                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7519                 fi
7520         fi
7521         rm -rf ./conftest*
7522         LIBS="$cf_save_LIBS"
7523 fi
7524
7525 fi
7526 echo "$as_me:7526: result: $cf_cv_check_gpm_wgetch" >&5
7527 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7528
7529 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7530         { echo "$as_me:7530: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7531 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7532 fi
7533
7534 fi
7535
7536 fi
7537
7538 echo "$as_me:7538: checking if you want to use PCRE2 for regular-expressions" >&5
7539 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7540
7541 # Check whether --with-pcre2 or --without-pcre2 was given.
7542 if test "${with_pcre2+set}" = set; then
7543   withval="$with_pcre2"
7544
7545 fi;
7546 test -z "$with_pcre2" && with_pcre2=no
7547 echo "$as_me:7547: result: $with_pcre2" >&5
7548 echo "${ECHO_T}$with_pcre2" >&6
7549
7550 if test "x$with_pcre2" != xno ; then
7551         cf_with_pcre2_ok=no
7552         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7553         do
7554
7555 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7556         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7557
7558 echo "${as_me:-configure}:7558: testing found package $cf_with_pcre2 ..." 1>&5
7559
7560         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7561         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7562         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7563
7564 echo "${as_me:-configure}:7564: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7565
7566         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7567
7568 echo "${as_me:-configure}:7568: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7569
7570 cf_fix_cppflags=no
7571 cf_new_cflags=
7572 cf_new_cppflags=
7573 cf_new_extra_cppflags=
7574
7575 for cf_add_cflags in $cf_pkgconfig_incs
7576 do
7577 case "$cf_fix_cppflags" in
7578 (no)
7579         case "$cf_add_cflags" in
7580         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7581                 case "$cf_add_cflags" in
7582                 (-D*)
7583                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7584
7585                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7586                                 && test -z "${cf_tst_cflags}" \
7587                                 && cf_fix_cppflags=yes
7588
7589                         if test "$cf_fix_cppflags" = yes ; then
7590
7591         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7592         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7593
7594                                 continue
7595                         elif test "${cf_tst_cflags}" = "\"'" ; then
7596
7597         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7598         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7599
7600                                 continue
7601                         fi
7602                         ;;
7603                 esac
7604                 case "$CPPFLAGS" in
7605                 (*$cf_add_cflags)
7606                         ;;
7607                 (*)
7608                         case "$cf_add_cflags" in
7609                         (-D*)
7610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7611
7612 CPPFLAGS=`echo "$CPPFLAGS" | \
7613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7615
7616                                 ;;
7617                         esac
7618
7619         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7620         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7621
7622                         ;;
7623                 esac
7624                 ;;
7625         (*)
7626
7627         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7628         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7629
7630                 ;;
7631         esac
7632         ;;
7633 (yes)
7634
7635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7637
7638         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7639
7640         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7641                 && test -z "${cf_tst_cflags}" \
7642                 && cf_fix_cppflags=no
7643         ;;
7644 esac
7645 done
7646
7647 if test -n "$cf_new_cflags" ; then
7648
7649         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7650         CFLAGS="${CFLAGS}$cf_new_cflags"
7651
7652 fi
7653
7654 if test -n "$cf_new_cppflags" ; then
7655
7656         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7657         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7658
7659 fi
7660
7661 if test -n "$cf_new_extra_cppflags" ; then
7662
7663         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7664         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7665
7666 fi
7667
7668 cf_add_libs="$LIBS"
7669 # reverse order
7670 cf_add_0lib=
7671 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7672 # filter duplicates
7673 for cf_add_1lib in $cf_add_0lib; do
7674         for cf_add_2lib in $cf_add_libs; do
7675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7676                         cf_add_1lib=
7677                         break
7678                 fi
7679         done
7680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7681 done
7682 LIBS="$cf_add_libs"
7683
7684         cf_with_pcre2_ok=yes; break
7685 else
7686         cf_pkgconfig_incs=
7687         cf_pkgconfig_libs=
7688         :
7689 fi
7690
7691         done
7692         cf_with_pcre2_ok=yes || { { echo "$as_me:7692: error: Cannot find PCRE2 library" >&5
7693 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7694    { (exit 1); exit 1; }; }
7695
7696 cat >>confdefs.h <<\EOF
7697 #define HAVE_LIB_PCRE2 1
7698 EOF
7699
7700         # if pkgconfig gave no results, look for the libraries directly
7701         case "$LIBS" in
7702         (*pcre2-posix*|*pcreposix*)
7703                 ;;
7704         (*)
7705                 echo "$as_me:7705: checking for regcomp in -lpcre2-posix" >&5
7706 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7707 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7708   echo $ECHO_N "(cached) $ECHO_C" >&6
7709 else
7710   ac_check_lib_save_LIBS=$LIBS
7711 LIBS="-lpcre2-posix  $LIBS"
7712 cat >"conftest.$ac_ext" <<_ACEOF
7713 #line 7713 "configure"
7714 #include "confdefs.h"
7715
7716 /* Override any gcc2 internal prototype to avoid an error.  */
7717 #ifdef __cplusplus
7718 extern "C"
7719 #endif
7720 /* We use char because int might match the return type of a gcc2
7721    builtin and then its argument prototype would still apply.  */
7722 char regcomp ();
7723 int
7724 main (void)
7725 {
7726 regcomp ();
7727   ;
7728   return 0;
7729 }
7730 _ACEOF
7731 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7732 if { (eval echo "$as_me:7732: \"$ac_link\"") >&5
7733   (eval $ac_link) 2>&5
7734   ac_status=$?
7735   echo "$as_me:7735: \$? = $ac_status" >&5
7736   (exit "$ac_status"); } &&
7737          { ac_try='test -s "conftest$ac_exeext"'
7738   { (eval echo "$as_me:7738: \"$ac_try\"") >&5
7739   (eval $ac_try) 2>&5
7740   ac_status=$?
7741   echo "$as_me:7741: \$? = $ac_status" >&5
7742   (exit "$ac_status"); }; }; then
7743   ac_cv_lib_pcre2_posix_regcomp=yes
7744 else
7745   echo "$as_me: failed program was:" >&5
7746 cat "conftest.$ac_ext" >&5
7747 ac_cv_lib_pcre2_posix_regcomp=no
7748 fi
7749 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7750 LIBS=$ac_check_lib_save_LIBS
7751 fi
7752 echo "$as_me:7752: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7753 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7754 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7755
7756 cf_add_libs="$LIBS"
7757 # reverse order
7758 cf_add_0lib=
7759 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7760 # filter duplicates
7761 for cf_add_1lib in $cf_add_0lib; do
7762         for cf_add_2lib in $cf_add_libs; do
7763                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7764                         cf_add_1lib=
7765                         break
7766                 fi
7767         done
7768         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7769 done
7770 LIBS="$cf_add_libs"
7771
7772 else
7773   echo "$as_me:7773: checking for regcomp in -lpcreposix" >&5
7774 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7775 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7776   echo $ECHO_N "(cached) $ECHO_C" >&6
7777 else
7778   ac_check_lib_save_LIBS=$LIBS
7779 LIBS="-lpcreposix  $LIBS"
7780 cat >"conftest.$ac_ext" <<_ACEOF
7781 #line 7781 "configure"
7782 #include "confdefs.h"
7783
7784 /* Override any gcc2 internal prototype to avoid an error.  */
7785 #ifdef __cplusplus
7786 extern "C"
7787 #endif
7788 /* We use char because int might match the return type of a gcc2
7789    builtin and then its argument prototype would still apply.  */
7790 char regcomp ();
7791 int
7792 main (void)
7793 {
7794 regcomp ();
7795   ;
7796   return 0;
7797 }
7798 _ACEOF
7799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7800 if { (eval echo "$as_me:7800: \"$ac_link\"") >&5
7801   (eval $ac_link) 2>&5
7802   ac_status=$?
7803   echo "$as_me:7803: \$? = $ac_status" >&5
7804   (exit "$ac_status"); } &&
7805          { ac_try='test -s "conftest$ac_exeext"'
7806   { (eval echo "$as_me:7806: \"$ac_try\"") >&5
7807   (eval $ac_try) 2>&5
7808   ac_status=$?
7809   echo "$as_me:7809: \$? = $ac_status" >&5
7810   (exit "$ac_status"); }; }; then
7811   ac_cv_lib_pcreposix_regcomp=yes
7812 else
7813   echo "$as_me: failed program was:" >&5
7814 cat "conftest.$ac_ext" >&5
7815 ac_cv_lib_pcreposix_regcomp=no
7816 fi
7817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7818 LIBS=$ac_check_lib_save_LIBS
7819 fi
7820 echo "$as_me:7820: result: $ac_cv_lib_pcreposix_regcomp" >&5
7821 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7822 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7823
7824 cf_add_libs="$LIBS"
7825 # reverse order
7826 cf_add_0lib=
7827 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7828 # filter duplicates
7829 for cf_add_1lib in $cf_add_0lib; do
7830         for cf_add_2lib in $cf_add_libs; do
7831                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7832                         cf_add_1lib=
7833                         break
7834                 fi
7835         done
7836         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7837 done
7838 LIBS="$cf_add_libs"
7839
7840 else
7841   { { echo "$as_me:7841: error: Cannot find PCRE2 POSIX library" >&5
7842 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7843    { (exit 1); exit 1; }; }
7844 fi
7845
7846 fi
7847
7848                 ;;
7849         esac
7850
7851         # either way, check for the library header files
7852
7853 for ac_header in pcre2posix.h pcreposix.h
7854 do
7855 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7856 echo "$as_me:7856: checking for $ac_header" >&5
7857 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7858 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7859   echo $ECHO_N "(cached) $ECHO_C" >&6
7860 else
7861   cat >"conftest.$ac_ext" <<_ACEOF
7862 #line 7862 "configure"
7863 #include "confdefs.h"
7864 #include <$ac_header>
7865 _ACEOF
7866 if { (eval echo "$as_me:7866: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7867   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7868   ac_status=$?
7869   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7870   rm -f conftest.er1
7871   cat conftest.err >&5
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit "$ac_status"); } >/dev/null; then
7874   if test -s conftest.err; then
7875     ac_cpp_err=$ac_c_preproc_warn_flag
7876   else
7877     ac_cpp_err=
7878   fi
7879 else
7880   ac_cpp_err=yes
7881 fi
7882 if test -z "$ac_cpp_err"; then
7883   eval "$as_ac_Header=yes"
7884 else
7885   echo "$as_me: failed program was:" >&5
7886   cat "conftest.$ac_ext" >&5
7887   eval "$as_ac_Header=no"
7888 fi
7889 rm -f conftest.err "conftest.$ac_ext"
7890 fi
7891 echo "$as_me:7891: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7892 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7893 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7894   cat >>confdefs.h <<EOF
7895 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7896 EOF
7897
7898 fi
7899 done
7900
7901 for ac_func in PCRE2regcomp
7902 do
7903 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7904 echo "$as_me:7904: checking for $ac_func" >&5
7905 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7906 if eval "test \"\${$as_ac_var+set}\" = set"; then
7907   echo $ECHO_N "(cached) $ECHO_C" >&6
7908 else
7909   cat >"conftest.$ac_ext" <<_ACEOF
7910 #line 7910 "configure"
7911 #include "confdefs.h"
7912 #define $ac_func autoconf_temporary
7913 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7914 #undef $ac_func
7915
7916 #ifdef __cplusplus
7917 extern "C"
7918 #endif
7919
7920 /* We use char because int might match the return type of a gcc2
7921    builtin and then its argument prototype would still apply.  */
7922 char $ac_func (void);
7923
7924 int
7925 main (void)
7926 {
7927
7928 /* The GNU C library defines stubs for functions which it implements
7929     to always fail with ENOSYS.  Some functions are actually named
7930     something starting with __ and the normal name is an alias.  */
7931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7932 #error found stub for $ac_func
7933 #endif
7934
7935         return $ac_func ();
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7941 if { (eval echo "$as_me:7941: \"$ac_link\"") >&5
7942   (eval $ac_link) 2>&5
7943   ac_status=$?
7944   echo "$as_me:7944: \$? = $ac_status" >&5
7945   (exit "$ac_status"); } &&
7946          { ac_try='test -s "conftest$ac_exeext"'
7947   { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7948   (eval $ac_try) 2>&5
7949   ac_status=$?
7950   echo "$as_me:7950: \$? = $ac_status" >&5
7951   (exit "$ac_status"); }; }; then
7952   eval "$as_ac_var=yes"
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 cat "conftest.$ac_ext" >&5
7956 eval "$as_ac_var=no"
7957 fi
7958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7959 fi
7960 echo "$as_me:7960: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7961 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7962 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7963   cat >>confdefs.h <<EOF
7964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7965 EOF
7966
7967 fi
7968 done
7969
7970 fi
7971
7972 # not everyone has "test -c"
7973 if test -c /dev/sysmouse 2>/dev/null ; then
7974 echo "$as_me:7974: checking if you want to use sysmouse" >&5
7975 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7976
7977 # Check whether --with-sysmouse or --without-sysmouse was given.
7978 if test "${with_sysmouse+set}" = set; then
7979   withval="$with_sysmouse"
7980   cf_with_sysmouse=$withval
7981 else
7982   cf_with_sysmouse=maybe
7983 fi;
7984         if test "$cf_with_sysmouse" != no ; then
7985         cat >"conftest.$ac_ext" <<_ACEOF
7986 #line 7986 "configure"
7987 #include "confdefs.h"
7988
7989 #include <osreldate.h>
7990 #if (__FreeBSD_version >= 400017)
7991 #include <sys/consio.h>
7992 #include <sys/fbio.h>
7993 #else
7994 #include <machine/console.h>
7995 #endif
7996
7997 int
7998 main (void)
7999 {
8000
8001         struct mouse_info the_mouse;
8002         ioctl(0, CONS_MOUSECTL, &the_mouse);
8003
8004   ;
8005   return 0;
8006 }
8007 _ACEOF
8008 rm -f "conftest.$ac_objext"
8009 if { (eval echo "$as_me:8009: \"$ac_compile\"") >&5
8010   (eval $ac_compile) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit "$ac_status"); } &&
8014          { ac_try='test -s "conftest.$ac_objext"'
8015   { (eval echo "$as_me:8015: \"$ac_try\"") >&5
8016   (eval $ac_try) 2>&5
8017   ac_status=$?
8018   echo "$as_me:8018: \$? = $ac_status" >&5
8019   (exit "$ac_status"); }; }; then
8020   cf_with_sysmouse=yes
8021 else
8022   echo "$as_me: failed program was:" >&5
8023 cat "conftest.$ac_ext" >&5
8024 cf_with_sysmouse=no
8025 fi
8026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8027         fi
8028 echo "$as_me:8028: result: $cf_with_sysmouse" >&5
8029 echo "${ECHO_T}$cf_with_sysmouse" >&6
8030 test "$cf_with_sysmouse" = yes &&
8031 cat >>confdefs.h <<\EOF
8032 #define USE_SYSMOUSE 1
8033 EOF
8034
8035 fi
8036
8037 # pretend that ncurses==ncursesw==ncursest
8038 echo "$as_me:8038: checking if you want to disable library suffixes" >&5
8039 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8040
8041 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8042 if test "${enable_lib_suffixes+set}" = set; then
8043   enableval="$enable_lib_suffixes"
8044   test "$enableval" != no && enableval=yes
8045         if test "$enableval" != "yes" ; then
8046     disable_lib_suffixes=yes
8047         else
8048                 disable_lib_suffixes=no
8049         fi
8050 else
8051   enableval=yes
8052         disable_lib_suffixes=no
8053
8054 fi;
8055 echo "$as_me:8055: result: $disable_lib_suffixes" >&5
8056 echo "${ECHO_T}$disable_lib_suffixes" >&6
8057
8058 ### If we're building with rpath, try to link non-standard libs that way too.
8059 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8060
8061 echo "$as_me:8061: checking if rpath-hack should be disabled" >&5
8062 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8063
8064 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8065 if test "${enable_rpath_hack+set}" = set; then
8066   enableval="$enable_rpath_hack"
8067   test "$enableval" != no && enableval=yes
8068         if test "$enableval" != "yes" ; then
8069     enable_rpath_hack=no
8070         else
8071                 enable_rpath_hack=yes
8072         fi
8073 else
8074   enableval=yes
8075         enable_rpath_hack=yes
8076
8077 fi;
8078 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8079 echo "$as_me:8079: result: $cf_disable_rpath_hack" >&5
8080 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8081
8082 if test "$enable_rpath_hack" = yes ; then
8083
8084 echo "$as_me:8084: checking for updated LDFLAGS" >&5
8085 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8086 if test -n "$LD_RPATH_OPT" ; then
8087         echo "$as_me:8087: result: maybe" >&5
8088 echo "${ECHO_T}maybe" >&6
8089
8090         for ac_prog in ldd
8091 do
8092   # Extract the first word of "$ac_prog", so it can be a program name with args.
8093 set dummy $ac_prog; ac_word=$2
8094 echo "$as_me:8094: checking for $ac_word" >&5
8095 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8096 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8097   echo $ECHO_N "(cached) $ECHO_C" >&6
8098 else
8099   if test -n "$cf_ldd_prog"; then
8100   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8101 else
8102   ac_save_IFS=$IFS; IFS=$ac_path_separator
8103 ac_dummy="$PATH"
8104 for ac_dir in $ac_dummy; do
8105   IFS=$ac_save_IFS
8106   test -z "$ac_dir" && ac_dir=.
8107   $as_executable_p "$ac_dir/$ac_word" || continue
8108 ac_cv_prog_cf_ldd_prog="$ac_prog"
8109 echo "$as_me:8109: found $ac_dir/$ac_word" >&5
8110 break
8111 done
8112
8113 fi
8114 fi
8115 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8116 if test -n "$cf_ldd_prog"; then
8117   echo "$as_me:8117: result: $cf_ldd_prog" >&5
8118 echo "${ECHO_T}$cf_ldd_prog" >&6
8119 else
8120   echo "$as_me:8120: result: no" >&5
8121 echo "${ECHO_T}no" >&6
8122 fi
8123
8124   test -n "$cf_ldd_prog" && break
8125 done
8126 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8127
8128         cf_rpath_list="/usr/lib /lib"
8129         if test "$cf_ldd_prog" != no
8130         then
8131                 cf_rpath_oops=
8132
8133 cat >"conftest.$ac_ext" <<_ACEOF
8134 #line 8134 "configure"
8135 #include "confdefs.h"
8136 #include <stdio.h>
8137 int
8138 main (void)
8139 {
8140 printf("Hello");
8141   ;
8142   return 0;
8143 }
8144 _ACEOF
8145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8146 if { (eval echo "$as_me:8146: \"$ac_link\"") >&5
8147   (eval $ac_link) 2>&5
8148   ac_status=$?
8149   echo "$as_me:8149: \$? = $ac_status" >&5
8150   (exit "$ac_status"); } &&
8151          { ac_try='test -s "conftest$ac_exeext"'
8152   { (eval echo "$as_me:8152: \"$ac_try\"") >&5
8153   (eval $ac_try) 2>&5
8154   ac_status=$?
8155   echo "$as_me:8155: \$? = $ac_status" >&5
8156   (exit "$ac_status"); }; }; then
8157   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8158                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8159 else
8160   echo "$as_me: failed program was:" >&5
8161 cat "conftest.$ac_ext" >&5
8162 fi
8163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8164
8165                 # If we passed the link-test, but get a "not found" on a given library,
8166                 # this could be due to inept reconfiguration of gcc to make it only
8167                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8168                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8169                 # /usr/local libraries.
8170                 if test -n "$cf_rpath_oops"
8171                 then
8172                         for cf_rpath_src in $cf_rpath_oops
8173                         do
8174                                 for cf_rpath_dir in \
8175                                         /usr/local \
8176                                         /usr/pkg \
8177                                         /opt/sfw
8178                                 do
8179                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8180                                         then
8181                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8182
8183 echo "${as_me:-configure}:8183: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8184
8185                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8186                                                 break
8187                                         fi
8188                                 done
8189                         done
8190                 fi
8191         fi
8192
8193         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8194
8195 echo "${as_me:-configure}:8195: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8196
8197 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8198
8199 echo "${as_me:-configure}:8199: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8200
8201 cf_rpath_dst=
8202 for cf_rpath_src in $LDFLAGS
8203 do
8204         case "$cf_rpath_src" in
8205         (-L*)
8206
8207                 # check if this refers to a directory which we will ignore
8208                 cf_rpath_skip=no
8209                 if test -n "$cf_rpath_list"
8210                 then
8211                         for cf_rpath_item in $cf_rpath_list
8212                         do
8213                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8214                                 then
8215                                         cf_rpath_skip=yes
8216                                         break
8217                                 fi
8218                         done
8219                 fi
8220
8221                 if test "$cf_rpath_skip" = no
8222                 then
8223                         # transform the option
8224                         if test "$LD_RPATH_OPT" = "-R " ; then
8225                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8226                         else
8227                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8228                         fi
8229
8230                         # if we have not already added this, add it now
8231                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8232                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8233                         then
8234                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8235
8236 echo "${as_me:-configure}:8236: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8237
8238                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8239                         fi
8240                 fi
8241                 ;;
8242         esac
8243         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8244 done
8245 LDFLAGS=$cf_rpath_dst
8246
8247 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8248
8249 echo "${as_me:-configure}:8249: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8250
8251 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8252
8253 echo "${as_me:-configure}:8253: testing ...checking LIBS $LIBS ..." 1>&5
8254
8255 cf_rpath_dst=
8256 for cf_rpath_src in $LIBS
8257 do
8258         case "$cf_rpath_src" in
8259         (-L*)
8260
8261                 # check if this refers to a directory which we will ignore
8262                 cf_rpath_skip=no
8263                 if test -n "$cf_rpath_list"
8264                 then
8265                         for cf_rpath_item in $cf_rpath_list
8266                         do
8267                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8268                                 then
8269                                         cf_rpath_skip=yes
8270                                         break
8271                                 fi
8272                         done
8273                 fi
8274
8275                 if test "$cf_rpath_skip" = no
8276                 then
8277                         # transform the option
8278                         if test "$LD_RPATH_OPT" = "-R " ; then
8279                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8280                         else
8281                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8282                         fi
8283
8284                         # if we have not already added this, add it now
8285                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8286                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8287                         then
8288                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8289
8290 echo "${as_me:-configure}:8290: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8291
8292                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8293                         fi
8294                 fi
8295                 ;;
8296         esac
8297         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8298 done
8299 LIBS=$cf_rpath_dst
8300
8301 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8302
8303 echo "${as_me:-configure}:8303: testing ...checked LIBS $LIBS ..." 1>&5
8304
8305         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8306
8307 echo "${as_me:-configure}:8307: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8308
8309 else
8310         echo "$as_me:8310: result: no" >&5
8311 echo "${ECHO_T}no" >&6
8312 fi
8313
8314 fi
8315
8316 fi
8317
8318 ### Depending on the system, someone may use rpath to build ncurses but not
8319 # want users of the package to rely upon that feature.  Give those people an
8320 # option to suppress that detail from EXTRA_LDFLAGS.
8321 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8322 if test -n "$EXTRA_PKG_LDFLAGS"
8323 then
8324         echo "$as_me:8324: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8325 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8326
8327 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8328 if test "${enable_pkg_ldflags+set}" = set; then
8329   enableval="$enable_pkg_ldflags"
8330   test "$enableval" != no && enableval=yes
8331         if test "$enableval" != "yes" ; then
8332     disable_pkg_ldflags=yes
8333         else
8334                 disable_pkg_ldflags=no
8335         fi
8336 else
8337   enableval=yes
8338         disable_pkg_ldflags=no
8339
8340 fi;
8341         echo "$as_me:8341: result: $disable_pkg_ldflags" >&5
8342 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8343         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8344 fi
8345
8346 ###############################################################################
8347
8348 ###     use option --with-extra-suffix to append suffix to headers and libraries
8349 echo "$as_me:8349: checking if you wish to append extra suffix to header/library paths" >&5
8350 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8351 EXTRA_SUFFIX=
8352
8353 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8354 if test "${with_extra_suffix+set}" = set; then
8355   withval="$with_extra_suffix"
8356   case x$withval in
8357         (xno)
8358                 ;;
8359         (xyes|x)
8360                 EXTRA_SUFFIX=$cf_cv_abi_version
8361                 ;;
8362         (*)
8363                 EXTRA_SUFFIX=$withval
8364                 ;;
8365         esac
8366
8367 fi;
8368 echo "$as_me:8368: result: $EXTRA_SUFFIX" >&5
8369 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8370
8371 ###     use option --disable-overwrite to leave out the link to -lcurses
8372 echo "$as_me:8372: checking if you wish to install ncurses overwriting curses" >&5
8373 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8374
8375 # Check whether --enable-overwrite or --disable-overwrite was given.
8376 if test "${enable_overwrite+set}" = set; then
8377   enableval="$enable_overwrite"
8378   with_overwrite=$enableval
8379 else
8380   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8381 fi;
8382 echo "$as_me:8382: result: $with_overwrite" >&5
8383 echo "${ECHO_T}$with_overwrite" >&6
8384
8385 echo "$as_me:8385: checking if external terminfo-database is used" >&5
8386 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8387
8388 # Check whether --enable-database or --disable-database was given.
8389 if test "${enable_database+set}" = set; then
8390   enableval="$enable_database"
8391   use_database=$enableval
8392 else
8393   use_database=yes
8394 fi;
8395 echo "$as_me:8395: result: $use_database" >&5
8396 echo "${ECHO_T}$use_database" >&6
8397
8398 case "$host_os" in
8399 (os2*)
8400         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8401         ;;
8402 (*)
8403         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8404         ;;
8405 esac
8406
8407 NCURSES_USE_DATABASE=0
8408 if test "$use_database" != no ; then
8409         NCURSES_USE_DATABASE=1
8410
8411         echo "$as_me:8411: checking which terminfo source-file will be installed" >&5
8412 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8413
8414 # Check whether --with-database or --without-database was given.
8415 if test "${with_database+set}" = set; then
8416   withval="$with_database"
8417   TERMINFO_SRC=$withval
8418 fi;
8419         echo "$as_me:8419: result: $TERMINFO_SRC" >&5
8420 echo "${ECHO_T}$TERMINFO_SRC" >&6
8421
8422         echo "$as_me:8422: checking whether to use hashed database instead of directory/tree" >&5
8423 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8424
8425 # Check whether --with-hashed-db or --without-hashed-db was given.
8426 if test "${with_hashed_db+set}" = set; then
8427   withval="$with_hashed_db"
8428
8429 else
8430   with_hashed_db=no
8431 fi;
8432         echo "$as_me:8432: result: $with_hashed_db" >&5
8433 echo "${ECHO_T}$with_hashed_db" >&6
8434 else
8435         with_hashed_db=no
8436 fi
8437
8438 echo "$as_me:8438: checking for list of fallback descriptions" >&5
8439 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8440
8441 # Check whether --with-fallbacks or --without-fallbacks was given.
8442 if test "${with_fallbacks+set}" = set; then
8443   withval="$with_fallbacks"
8444   with_fallback=$withval
8445 else
8446   with_fallback=
8447 fi;
8448 echo "$as_me:8448: result: $with_fallback" >&5
8449 echo "${ECHO_T}$with_fallback" >&6
8450
8451 case ".$with_fallback" in
8452 (.|.no)
8453         FALLBACK_LIST=
8454         ;;
8455 (.yes)
8456         { echo "$as_me:8456: WARNING: expected a list of terminal descriptions" >&5
8457 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8458         ;;
8459 (*)
8460         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8461         ;;
8462 esac
8463
8464 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8465 # tree for generating the terminal descriptions that will be compiled into the
8466 # library.  If your toolchain is old, it may not handle current terminal
8467 # databases.  Use configure-options to point to the tools which will be used,
8468 # rather than the first ones found on the $PATH.
8469 if test -n "$ac_tool_prefix"; then
8470   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8471 set dummy ${ac_tool_prefix}tic; ac_word=$2
8472 echo "$as_me:8472: checking for $ac_word" >&5
8473 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8474 if test "${ac_cv_prog_TIC+set}" = set; then
8475   echo $ECHO_N "(cached) $ECHO_C" >&6
8476 else
8477   if test -n "$TIC"; then
8478   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8479 else
8480   ac_save_IFS=$IFS; IFS=$ac_path_separator
8481 ac_dummy="$PATH"
8482 for ac_dir in $ac_dummy; do
8483   IFS=$ac_save_IFS
8484   test -z "$ac_dir" && ac_dir=.
8485   $as_executable_p "$ac_dir/$ac_word" || continue
8486 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8487 echo "$as_me:8487: found $ac_dir/$ac_word" >&5
8488 break
8489 done
8490
8491 fi
8492 fi
8493 TIC=$ac_cv_prog_TIC
8494 if test -n "$TIC"; then
8495   echo "$as_me:8495: result: $TIC" >&5
8496 echo "${ECHO_T}$TIC" >&6
8497 else
8498   echo "$as_me:8498: result: no" >&5
8499 echo "${ECHO_T}no" >&6
8500 fi
8501
8502 fi
8503 if test -z "$ac_cv_prog_TIC"; then
8504   ac_ct_TIC=$TIC
8505   # Extract the first word of "tic", so it can be a program name with args.
8506 set dummy tic; ac_word=$2
8507 echo "$as_me:8507: checking for $ac_word" >&5
8508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8509 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8510   echo $ECHO_N "(cached) $ECHO_C" >&6
8511 else
8512   if test -n "$ac_ct_TIC"; then
8513   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8514 else
8515   ac_save_IFS=$IFS; IFS=$ac_path_separator
8516 ac_dummy="$PATH"
8517 for ac_dir in $ac_dummy; do
8518   IFS=$ac_save_IFS
8519   test -z "$ac_dir" && ac_dir=.
8520   $as_executable_p "$ac_dir/$ac_word" || continue
8521 ac_cv_prog_ac_ct_TIC="tic"
8522 echo "$as_me:8522: found $ac_dir/$ac_word" >&5
8523 break
8524 done
8525
8526 fi
8527 fi
8528 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8529 if test -n "$ac_ct_TIC"; then
8530   echo "$as_me:8530: result: $ac_ct_TIC" >&5
8531 echo "${ECHO_T}$ac_ct_TIC" >&6
8532 else
8533   echo "$as_me:8533: result: no" >&5
8534 echo "${ECHO_T}no" >&6
8535 fi
8536
8537   TIC=$ac_ct_TIC
8538 else
8539   TIC="$ac_cv_prog_TIC"
8540 fi
8541
8542 if test -n "$ac_tool_prefix"; then
8543   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8544 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8545 echo "$as_me:8545: checking for $ac_word" >&5
8546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8547 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8548   echo $ECHO_N "(cached) $ECHO_C" >&6
8549 else
8550   if test -n "$INFOCMP"; then
8551   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8552 else
8553   ac_save_IFS=$IFS; IFS=$ac_path_separator
8554 ac_dummy="$PATH"
8555 for ac_dir in $ac_dummy; do
8556   IFS=$ac_save_IFS
8557   test -z "$ac_dir" && ac_dir=.
8558   $as_executable_p "$ac_dir/$ac_word" || continue
8559 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8560 echo "$as_me:8560: found $ac_dir/$ac_word" >&5
8561 break
8562 done
8563
8564 fi
8565 fi
8566 INFOCMP=$ac_cv_prog_INFOCMP
8567 if test -n "$INFOCMP"; then
8568   echo "$as_me:8568: result: $INFOCMP" >&5
8569 echo "${ECHO_T}$INFOCMP" >&6
8570 else
8571   echo "$as_me:8571: result: no" >&5
8572 echo "${ECHO_T}no" >&6
8573 fi
8574
8575 fi
8576 if test -z "$ac_cv_prog_INFOCMP"; then
8577   ac_ct_INFOCMP=$INFOCMP
8578   # Extract the first word of "infocmp", so it can be a program name with args.
8579 set dummy infocmp; ac_word=$2
8580 echo "$as_me:8580: checking for $ac_word" >&5
8581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8582 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8583   echo $ECHO_N "(cached) $ECHO_C" >&6
8584 else
8585   if test -n "$ac_ct_INFOCMP"; then
8586   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8587 else
8588   ac_save_IFS=$IFS; IFS=$ac_path_separator
8589 ac_dummy="$PATH"
8590 for ac_dir in $ac_dummy; do
8591   IFS=$ac_save_IFS
8592   test -z "$ac_dir" && ac_dir=.
8593   $as_executable_p "$ac_dir/$ac_word" || continue
8594 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8595 echo "$as_me:8595: found $ac_dir/$ac_word" >&5
8596 break
8597 done
8598
8599 fi
8600 fi
8601 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8602 if test -n "$ac_ct_INFOCMP"; then
8603   echo "$as_me:8603: result: $ac_ct_INFOCMP" >&5
8604 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8605 else
8606   echo "$as_me:8606: result: no" >&5
8607 echo "${ECHO_T}no" >&6
8608 fi
8609
8610   INFOCMP=$ac_ct_INFOCMP
8611 else
8612   INFOCMP="$ac_cv_prog_INFOCMP"
8613 fi
8614
8615 if test -n "$FALLBACK_LIST"
8616 then
8617
8618 # Check whether --with-tic-path or --without-tic-path was given.
8619 if test "${with_tic_path+set}" = set; then
8620   withval="$with_tic_path"
8621   echo "$as_me:8621: checking for tic program for fallbacks" >&5
8622 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8623                 TIC=$withval
8624                 echo "$as_me:8624: result: $TIC" >&5
8625 echo "${ECHO_T}$TIC" >&6
8626
8627 if test "x$prefix" != xNONE; then
8628         cf_path_syntax="$prefix"
8629 else
8630         cf_path_syntax="$ac_default_prefix"
8631 fi
8632
8633 case ".$TIC" in
8634 (.\$\(*\)*|.\'*\'*)
8635         ;;
8636 (..|./*|.\\*)
8637         ;;
8638 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8639         ;;
8640 (.\$\{*prefix\}*|.\$\{*dir\}*)
8641         eval TIC="$TIC"
8642         case ".$TIC" in
8643         (.NONE/*)
8644                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8645                 ;;
8646         esac
8647         ;;
8648 (.no|.NONE/*)
8649         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8650         ;;
8651 (*)
8652         { { echo "$as_me:8652: error: expected a pathname, not \"$TIC\"" >&5
8653 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8654    { (exit 1); exit 1; }; }
8655         ;;
8656 esac
8657
8658 else
8659
8660 test -z "$TIC" && TIC="tic"
8661 for ac_prog in $TIC tic
8662 do
8663   # Extract the first word of "$ac_prog", so it can be a program name with args.
8664 set dummy $ac_prog; ac_word=$2
8665 echo "$as_me:8665: checking for $ac_word" >&5
8666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8667 if test "${ac_cv_path_TIC+set}" = set; then
8668   echo $ECHO_N "(cached) $ECHO_C" >&6
8669 else
8670   case $TIC in
8671   [\\/]* | ?:[\\/]*)
8672   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8673   ;;
8674   *)
8675   ac_save_IFS=$IFS; IFS=$ac_path_separator
8676 ac_dummy="$PATH:/usr/local/ncurses/bin"
8677 for ac_dir in $ac_dummy; do
8678   IFS=$ac_save_IFS
8679   test -z "$ac_dir" && ac_dir=.
8680   if $as_executable_p "$ac_dir/$ac_word"; then
8681    ac_cv_path_TIC="$ac_dir/$ac_word"
8682    echo "$as_me:8682: found $ac_dir/$ac_word" >&5
8683    break
8684 fi
8685 done
8686
8687   ;;
8688 esac
8689 fi
8690 TIC=$ac_cv_path_TIC
8691
8692 if test -n "$TIC"; then
8693   echo "$as_me:8693: result: $TIC" >&5
8694 echo "${ECHO_T}$TIC" >&6
8695 else
8696   echo "$as_me:8696: result: no" >&5
8697 echo "${ECHO_T}no" >&6
8698 fi
8699
8700   test -n "$TIC" && break
8701 done
8702 test -n "$TIC" || TIC="$TIC"
8703
8704 cf_path_prog=""
8705 cf_path_args=""
8706 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8707 for cf_temp in $ac_cv_path_TIC
8708 do
8709         if test -z "$cf_path_prog" ; then
8710                 if test "$with_full_paths" = yes ; then
8711
8712 if test "x$prefix" != xNONE; then
8713         cf_path_syntax="$prefix"
8714 else
8715         cf_path_syntax="$ac_default_prefix"
8716 fi
8717
8718 case ".$cf_temp" in
8719 (.\$\(*\)*|.\'*\'*)
8720         ;;
8721 (..|./*|.\\*)
8722         ;;
8723 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8724         ;;
8725 (.\$\{*prefix\}*|.\$\{*dir\}*)
8726         eval cf_temp="$cf_temp"
8727         case ".$cf_temp" in
8728         (.NONE/*)
8729                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8730                 ;;
8731         esac
8732         ;;
8733 (.no|.NONE/*)
8734         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8735         ;;
8736 (*)
8737         break
8738         ;;
8739 esac
8740
8741                         cf_path_prog="$cf_temp"
8742                 else
8743                         cf_path_prog="`basename "$cf_temp"`"
8744                 fi
8745         elif test -z "$cf_path_args" ; then
8746                 cf_path_args="$cf_temp"
8747         else
8748                 cf_path_args="$cf_path_args $cf_temp"
8749         fi
8750 done
8751 IFS="$cf_save_ifs"
8752
8753 if test -n "$cf_path_prog" ; then
8754
8755 echo "${as_me:-configure}:8755: testing defining path for ${cf_path_prog} ..." 1>&5
8756
8757 cat >>confdefs.h <<EOF
8758 #define TIC_PATH "$cf_path_prog"
8759 EOF
8760
8761         test -n "$cf_path_args" &&
8762 cat >>confdefs.h <<EOF
8763 #define TIC_ARGS "$cf_path_args"
8764 EOF
8765
8766 fi
8767
8768                 if test -z "$TIC"
8769                 then
8770                         { echo "$as_me:8770: WARNING: no tic program found for fallbacks" >&5
8771 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8772                 fi
8773
8774 fi;
8775
8776 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8777 if test "${with_infocmp_path+set}" = set; then
8778   withval="$with_infocmp_path"
8779   echo "$as_me:8779: checking for infocmp program for fallbacks" >&5
8780 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8781                 INFOCMP=$withval
8782                 echo "$as_me:8782: result: $INFOCMP" >&5
8783 echo "${ECHO_T}$INFOCMP" >&6
8784
8785 if test "x$prefix" != xNONE; then
8786         cf_path_syntax="$prefix"
8787 else
8788         cf_path_syntax="$ac_default_prefix"
8789 fi
8790
8791 case ".$INFOCMP" in
8792 (.\$\(*\)*|.\'*\'*)
8793         ;;
8794 (..|./*|.\\*)
8795         ;;
8796 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8797         ;;
8798 (.\$\{*prefix\}*|.\$\{*dir\}*)
8799         eval INFOCMP="$INFOCMP"
8800         case ".$INFOCMP" in
8801         (.NONE/*)
8802                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8803                 ;;
8804         esac
8805         ;;
8806 (.no|.NONE/*)
8807         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8808         ;;
8809 (*)
8810         { { echo "$as_me:8810: error: expected a pathname, not \"$INFOCMP\"" >&5
8811 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8812    { (exit 1); exit 1; }; }
8813         ;;
8814 esac
8815
8816 else
8817
8818 test -z "$INFOCMP" && INFOCMP="infocmp"
8819 for ac_prog in $INFOCMP infocmp
8820 do
8821   # Extract the first word of "$ac_prog", so it can be a program name with args.
8822 set dummy $ac_prog; ac_word=$2
8823 echo "$as_me:8823: checking for $ac_word" >&5
8824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8825 if test "${ac_cv_path_INFOCMP+set}" = set; then
8826   echo $ECHO_N "(cached) $ECHO_C" >&6
8827 else
8828   case $INFOCMP in
8829   [\\/]* | ?:[\\/]*)
8830   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8831   ;;
8832   *)
8833   ac_save_IFS=$IFS; IFS=$ac_path_separator
8834 ac_dummy="$PATH:/usr/local/ncurses/bin"
8835 for ac_dir in $ac_dummy; do
8836   IFS=$ac_save_IFS
8837   test -z "$ac_dir" && ac_dir=.
8838   if $as_executable_p "$ac_dir/$ac_word"; then
8839    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8840    echo "$as_me:8840: found $ac_dir/$ac_word" >&5
8841    break
8842 fi
8843 done
8844
8845   ;;
8846 esac
8847 fi
8848 INFOCMP=$ac_cv_path_INFOCMP
8849
8850 if test -n "$INFOCMP"; then
8851   echo "$as_me:8851: result: $INFOCMP" >&5
8852 echo "${ECHO_T}$INFOCMP" >&6
8853 else
8854   echo "$as_me:8854: result: no" >&5
8855 echo "${ECHO_T}no" >&6
8856 fi
8857
8858   test -n "$INFOCMP" && break
8859 done
8860 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8861
8862 cf_path_prog=""
8863 cf_path_args=""
8864 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8865 for cf_temp in $ac_cv_path_INFOCMP
8866 do
8867         if test -z "$cf_path_prog" ; then
8868                 if test "$with_full_paths" = yes ; then
8869
8870 if test "x$prefix" != xNONE; then
8871         cf_path_syntax="$prefix"
8872 else
8873         cf_path_syntax="$ac_default_prefix"
8874 fi
8875
8876 case ".$cf_temp" in
8877 (.\$\(*\)*|.\'*\'*)
8878         ;;
8879 (..|./*|.\\*)
8880         ;;
8881 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8882         ;;
8883 (.\$\{*prefix\}*|.\$\{*dir\}*)
8884         eval cf_temp="$cf_temp"
8885         case ".$cf_temp" in
8886         (.NONE/*)
8887                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8888                 ;;
8889         esac
8890         ;;
8891 (.no|.NONE/*)
8892         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8893         ;;
8894 (*)
8895         break
8896         ;;
8897 esac
8898
8899                         cf_path_prog="$cf_temp"
8900                 else
8901                         cf_path_prog="`basename "$cf_temp"`"
8902                 fi
8903         elif test -z "$cf_path_args" ; then
8904                 cf_path_args="$cf_temp"
8905         else
8906                 cf_path_args="$cf_path_args $cf_temp"
8907         fi
8908 done
8909 IFS="$cf_save_ifs"
8910
8911 if test -n "$cf_path_prog" ; then
8912
8913 echo "${as_me:-configure}:8913: testing defining path for ${cf_path_prog} ..." 1>&5
8914
8915 cat >>confdefs.h <<EOF
8916 #define INFOCMP_PATH "$cf_path_prog"
8917 EOF
8918
8919         test -n "$cf_path_args" &&
8920 cat >>confdefs.h <<EOF
8921 #define INFOCMP_ARGS "$cf_path_args"
8922 EOF
8923
8924 fi
8925
8926                 if test -z "$INFOCMP"
8927                 then
8928                         { echo "$as_me:8928: WARNING: no infocmp program found for fallbacks" >&5
8929 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8930                 fi
8931
8932 fi;
8933
8934         test -z "$TIC" && FALLBACK_LIST=
8935         test -z "$INFOCMP" && FALLBACK_LIST=
8936         if test -z "$FALLBACK_LIST"
8937         then
8938                 { echo "$as_me:8938: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8939 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8940         fi
8941 fi
8942
8943 USE_FALLBACKS=
8944 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8945
8946 echo "$as_me:8946: checking if you want modern xterm or antique" >&5
8947 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8948
8949 # Check whether --with-xterm-new or --without-xterm-new was given.
8950 if test "${with_xterm_new+set}" = set; then
8951   withval="$with_xterm_new"
8952   with_xterm_new=$withval
8953 else
8954   with_xterm_new=yes
8955 fi;
8956 case "$with_xterm_new" in
8957 (no) with_xterm_new=xterm-old;;
8958 (*)      with_xterm_new=xterm-new;;
8959 esac
8960 echo "$as_me:8960: result: $with_xterm_new" >&5
8961 echo "${ECHO_T}$with_xterm_new" >&6
8962 WHICH_XTERM=$with_xterm_new
8963
8964 echo "$as_me:8964: checking if xterm backspace sends BS or DEL" >&5
8965 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8966
8967 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8968 if test "${with_xterm_kbs+set}" = set; then
8969   withval="$with_xterm_kbs"
8970   with_xterm_kbs=$withval
8971 else
8972   with_xterm_kbs=BS
8973 fi;
8974 case x$with_xterm_kbs in
8975 (xyes|xno|xBS|xbs|x8)
8976         with_xterm_kbs=BS
8977         ;;
8978 (xDEL|xdel|x127)
8979         with_xterm_kbs=DEL
8980         ;;
8981 (*)
8982         with_xterm_kbs=$withval
8983         ;;
8984 esac
8985 echo "$as_me:8985: result: $with_xterm_kbs" >&5
8986 echo "${ECHO_T}$with_xterm_kbs" >&6
8987 XTERM_KBS=$with_xterm_kbs
8988
8989 MAKE_TERMINFO=
8990 if test "$use_database" = no ; then
8991         TERMINFO="${datadir}/terminfo"
8992         MAKE_TERMINFO="#"
8993 else
8994
8995 echo "$as_me:8995: checking for list of terminfo directories" >&5
8996 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8997
8998 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8999 if test "${with_terminfo_dirs+set}" = set; then
9000   withval="$with_terminfo_dirs"
9001
9002 else
9003   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9004 fi;
9005 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9006 cf_dst_path=
9007 for cf_src_path in $withval
9008 do
9009
9010 if test "x$prefix" != xNONE; then
9011         cf_path_syntax="$prefix"
9012 else
9013         cf_path_syntax="$ac_default_prefix"
9014 fi
9015
9016 case ".$cf_src_path" in
9017 (.\$\(*\)*|.\'*\'*)
9018         ;;
9019 (..|./*|.\\*)
9020         ;;
9021 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9022         ;;
9023 (.\$\{*prefix\}*|.\$\{*dir\}*)
9024         eval cf_src_path="$cf_src_path"
9025         case ".$cf_src_path" in
9026         (.NONE/*)
9027                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9028                 ;;
9029         esac
9030         ;;
9031 (.no|.NONE/*)
9032         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9033         ;;
9034 (*)
9035         { { echo "$as_me:9035: error: expected a pathname, not \"$cf_src_path\"" >&5
9036 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9037    { (exit 1); exit 1; }; }
9038         ;;
9039 esac
9040
9041   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9042   cf_dst_path="${cf_dst_path}${cf_src_path}"
9043 done
9044 IFS="$ac_save_ifs"
9045
9046 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9047 # so we have to check/work around.  We do prefer the result of "eval"...
9048 eval cf_dst_eval="$cf_dst_path"
9049 case "x$cf_dst_eval" in
9050 (xNONE*)
9051         TERMINFO_DIRS=$cf_dst_path
9052         ;;
9053 (*)
9054         TERMINFO_DIRS="$cf_dst_eval"
9055         ;;
9056 esac
9057
9058 echo "$as_me:9058: result: $TERMINFO_DIRS" >&5
9059 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9060 test -n "$TERMINFO_DIRS" &&
9061 cat >>confdefs.h <<EOF
9062 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9063 EOF
9064
9065 case "x$TERMINFO" in
9066 x???:*)
9067         { echo "$as_me:9067: WARNING: ignoring non-directory/file TERMINFO value" >&5
9068 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9069         unset TERMINFO
9070         ;;
9071 esac
9072
9073 echo "$as_me:9073: checking for default terminfo directory" >&5
9074 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9075
9076 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9077 if test "${with_default_terminfo_dir+set}" = set; then
9078   withval="$with_default_terminfo_dir"
9079
9080 else
9081   withval="${TERMINFO:-${datadir}/terminfo}"
9082 fi; if test -n "${datadir}/terminfo" ; then
9083
9084 if test "x$prefix" != xNONE; then
9085         cf_path_syntax="$prefix"
9086 else
9087         cf_path_syntax="$ac_default_prefix"
9088 fi
9089
9090 case ".$withval" in
9091 (.\$\(*\)*|.\'*\'*)
9092         ;;
9093 (..|./*|.\\*)
9094         ;;
9095 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9096         ;;
9097 (.\$\{*prefix\}*|.\$\{*dir\}*)
9098         eval withval="$withval"
9099         case ".$withval" in
9100         (.NONE/*)
9101                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9102                 ;;
9103         esac
9104         ;;
9105 (.no|.NONE/*)
9106         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9107         ;;
9108 (*)
9109         { { echo "$as_me:9109: error: expected a pathname, not \"$withval\"" >&5
9110 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9111    { (exit 1); exit 1; }; }
9112         ;;
9113 esac
9114
9115 fi
9116 eval TERMINFO="$withval"
9117
9118 echo "$as_me:9118: result: $TERMINFO" >&5
9119 echo "${ECHO_T}$TERMINFO" >&6
9120
9121 cat >>confdefs.h <<EOF
9122 #define TERMINFO "$TERMINFO"
9123 EOF
9124
9125 fi
9126
9127 ###     use option --disable-big-core to make tic run on small machines
9128 ###     We need 4Mb, check if we can allocate 50% more than that.
9129 echo "$as_me:9129: checking if big-core option selected" >&5
9130 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9131
9132 # Check whether --enable-big-core or --disable-big-core was given.
9133 if test "${enable_big_core+set}" = set; then
9134   enableval="$enable_big_core"
9135   with_big_core=$enableval
9136 else
9137   if test "$cross_compiling" = yes; then
9138   with_big_core=no
9139 else
9140   cat >"conftest.$ac_ext" <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143
9144 #include <stdlib.h>
9145 #include <string.h>
9146 int main() {
9147         unsigned long n = 6000000L;
9148         char *s = malloc(n);
9149         if (s != 0)
9150                 s[0] = s[n-1] = 0;
9151         ${cf_cv_main_return:-return}(s == 0);
9152 }
9153 _ACEOF
9154 rm -f "conftest$ac_exeext"
9155 if { (eval echo "$as_me:9155: \"$ac_link\"") >&5
9156   (eval $ac_link) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9160   { (eval echo "$as_me:9160: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit "$ac_status"); }; }; then
9165   with_big_core=yes
9166 else
9167   echo "$as_me: program exited with status $ac_status" >&5
9168 echo "$as_me: failed program was:" >&5
9169 cat "conftest.$ac_ext" >&5
9170 with_big_core=no
9171 fi
9172 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9173 fi
9174 fi;
9175 echo "$as_me:9175: result: $with_big_core" >&5
9176 echo "${ECHO_T}$with_big_core" >&6
9177 test "x$with_big_core" = "xyes" &&
9178 cat >>confdefs.h <<\EOF
9179 #define HAVE_BIG_CORE 1
9180 EOF
9181
9182 ### ISO C only guarantees 512-char strings, we have tables which load faster
9183 ### when constructed using "big" strings.  More than the C compiler, the awk
9184 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9185 echo "$as_me:9185: checking if big-strings option selected" >&5
9186 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9187
9188 # Check whether --enable-big-strings or --disable-big-strings was given.
9189 if test "${enable_big_strings+set}" = set; then
9190   enableval="$enable_big_strings"
9191   with_big_strings=$enableval
9192 else
9193
9194         case x$AWK in
9195         (x)
9196                 eval with_big_strings=no
9197                 ;;
9198         (*)
9199                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9200                         | $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
9201                         eval with_big_strings=yes
9202                 else
9203                         eval with_big_strings=no
9204                 fi
9205                 ;;
9206         esac
9207
9208 fi;
9209 echo "$as_me:9209: result: $with_big_strings" >&5
9210 echo "${ECHO_T}$with_big_strings" >&6
9211
9212 USE_BIG_STRINGS=0
9213 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9214
9215 ###     use option --enable-termcap to compile in the termcap fallback support
9216 echo "$as_me:9216: checking if you want termcap-fallback support" >&5
9217 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9218
9219 # Check whether --enable-termcap or --disable-termcap was given.
9220 if test "${enable_termcap+set}" = set; then
9221   enableval="$enable_termcap"
9222   with_termcap=$enableval
9223 else
9224   with_termcap=no
9225 fi;
9226 echo "$as_me:9226: result: $with_termcap" >&5
9227 echo "${ECHO_T}$with_termcap" >&6
9228
9229 NCURSES_USE_TERMCAP=0
9230 if test "x$with_termcap" != "xyes" ; then
9231         if test "$use_database" = no ; then
9232                 if test -z "$with_fallback" ; then
9233                         { { echo "$as_me:9233: error: You have disabled the database w/o specifying fallbacks" >&5
9234 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9235    { (exit 1); exit 1; }; }
9236                 fi
9237         fi
9238
9239 cat >>confdefs.h <<\EOF
9240 #define PURE_TERMINFO 1
9241 EOF
9242
9243 else
9244
9245         if test "$with_ticlib" != no ; then
9246                 { { echo "$as_me:9246: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9247 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9248    { (exit 1); exit 1; }; }
9249         fi
9250
9251         NCURSES_USE_TERMCAP=1
9252         echo "$as_me:9252: checking for list of termcap files" >&5
9253 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9254
9255 # Check whether --with-termpath or --without-termpath was given.
9256 if test "${with_termpath+set}" = set; then
9257   withval="$with_termpath"
9258
9259 else
9260   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9261 fi;
9262 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9263 cf_dst_path=
9264 for cf_src_path in $withval
9265 do
9266
9267 if test "x$prefix" != xNONE; then
9268         cf_path_syntax="$prefix"
9269 else
9270         cf_path_syntax="$ac_default_prefix"
9271 fi
9272
9273 case ".$cf_src_path" in
9274 (.\$\(*\)*|.\'*\'*)
9275         ;;
9276 (..|./*|.\\*)
9277         ;;
9278 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9279         ;;
9280 (.\$\{*prefix\}*|.\$\{*dir\}*)
9281         eval cf_src_path="$cf_src_path"
9282         case ".$cf_src_path" in
9283         (.NONE/*)
9284                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9285                 ;;
9286         esac
9287         ;;
9288 (.no|.NONE/*)
9289         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9290         ;;
9291 (*)
9292         { { echo "$as_me:9292: error: expected a pathname, not \"$cf_src_path\"" >&5
9293 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9294    { (exit 1); exit 1; }; }
9295         ;;
9296 esac
9297
9298   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9299   cf_dst_path="${cf_dst_path}${cf_src_path}"
9300 done
9301 IFS="$ac_save_ifs"
9302
9303 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9304 # so we have to check/work around.  We do prefer the result of "eval"...
9305 eval cf_dst_eval="$cf_dst_path"
9306 case "x$cf_dst_eval" in
9307 (xNONE*)
9308         TERMPATH=$cf_dst_path
9309         ;;
9310 (*)
9311         TERMPATH="$cf_dst_eval"
9312         ;;
9313 esac
9314
9315         echo "$as_me:9315: result: $TERMPATH" >&5
9316 echo "${ECHO_T}$TERMPATH" >&6
9317         test -n "$TERMPATH" &&
9318 cat >>confdefs.h <<EOF
9319 #define TERMPATH "$TERMPATH"
9320 EOF
9321
9322         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9323         echo "$as_me:9323: checking if fast termcap-loader is needed" >&5
9324 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9325
9326 # Check whether --enable-getcap or --disable-getcap was given.
9327 if test "${enable_getcap+set}" = set; then
9328   enableval="$enable_getcap"
9329   with_getcap=$enableval
9330 else
9331   with_getcap=no
9332 fi;
9333         echo "$as_me:9333: result: $with_getcap" >&5
9334 echo "${ECHO_T}$with_getcap" >&6
9335         test "x$with_getcap" = "xyes" &&
9336 cat >>confdefs.h <<\EOF
9337 #define USE_GETCAP 1
9338 EOF
9339
9340         echo "$as_me:9340: checking if translated termcaps will be cached in ~/.terminfo" >&5
9341 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9342
9343 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9344 if test "${enable_getcap_cache+set}" = set; then
9345   enableval="$enable_getcap_cache"
9346   with_getcap_cache=$enableval
9347 else
9348   with_getcap_cache=no
9349 fi;
9350         echo "$as_me:9350: result: $with_getcap_cache" >&5
9351 echo "${ECHO_T}$with_getcap_cache" >&6
9352         test "x$with_getcap_cache" = "xyes" &&
9353 cat >>confdefs.h <<\EOF
9354 #define USE_GETCAP_CACHE 1
9355 EOF
9356
9357 fi
9358
9359 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9360 echo "$as_me:9360: checking if ~/.terminfo is wanted" >&5
9361 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9362
9363 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9364 if test "${enable_home_terminfo+set}" = set; then
9365   enableval="$enable_home_terminfo"
9366   with_home_terminfo=$enableval
9367 else
9368   with_home_terminfo=yes
9369 fi;
9370 echo "$as_me:9370: result: $with_home_terminfo" >&5
9371 echo "${ECHO_T}$with_home_terminfo" >&6
9372 test "x$with_home_terminfo" = "xyes" &&
9373 cat >>confdefs.h <<\EOF
9374 #define USE_HOME_TERMINFO 1
9375 EOF
9376
9377 echo "$as_me:9377: checking if you want to permit root to use ncurses environment variables" >&5
9378 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9379
9380 # Check whether --enable-root-environ or --disable-root-environ was given.
9381 if test "${enable_root_environ+set}" = set; then
9382   enableval="$enable_root_environ"
9383   with_root_environ=$enableval
9384 else
9385   with_root_environ=yes
9386 fi;
9387 echo "$as_me:9387: result: $with_root_environ" >&5
9388 echo "${ECHO_T}$with_root_environ" >&6
9389 test "x$with_root_environ" = xyes &&
9390 cat >>confdefs.h <<\EOF
9391 #define USE_ROOT_ENVIRON 1
9392 EOF
9393
9394 echo "$as_me:9394: checking if you want to permit setuid programs to access all files" >&5
9395 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9396
9397 # Check whether --enable-root-environ or --disable-root-environ was given.
9398 if test "${enable_root_environ+set}" = set; then
9399   enableval="$enable_root_environ"
9400   with_root_access=$enableval
9401 else
9402   with_root_access=yes
9403 fi;
9404 echo "$as_me:9404: result: $with_root_access" >&5
9405 echo "${ECHO_T}$with_root_access" >&6
9406 test "x$with_root_access" = xyes &&
9407 cat >>confdefs.h <<\EOF
9408 #define USE_ROOT_ACCESS 1
9409 EOF
9410
9411 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9412 ###   to reduce storage requirements for the terminfo database.
9413
9414 for ac_header in \
9415 unistd.h \
9416
9417 do
9418 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9419 echo "$as_me:9419: checking for $ac_header" >&5
9420 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9421 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9422   echo $ECHO_N "(cached) $ECHO_C" >&6
9423 else
9424   cat >"conftest.$ac_ext" <<_ACEOF
9425 #line 9425 "configure"
9426 #include "confdefs.h"
9427 #include <$ac_header>
9428 _ACEOF
9429 if { (eval echo "$as_me:9429: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9430   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9431   ac_status=$?
9432   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9433   rm -f conftest.er1
9434   cat conftest.err >&5
9435   echo "$as_me:9435: \$? = $ac_status" >&5
9436   (exit "$ac_status"); } >/dev/null; then
9437   if test -s conftest.err; then
9438     ac_cpp_err=$ac_c_preproc_warn_flag
9439   else
9440     ac_cpp_err=
9441   fi
9442 else
9443   ac_cpp_err=yes
9444 fi
9445 if test -z "$ac_cpp_err"; then
9446   eval "$as_ac_Header=yes"
9447 else
9448   echo "$as_me: failed program was:" >&5
9449   cat "conftest.$ac_ext" >&5
9450   eval "$as_ac_Header=no"
9451 fi
9452 rm -f conftest.err "conftest.$ac_ext"
9453 fi
9454 echo "$as_me:9454: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9455 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9456 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9457   cat >>confdefs.h <<EOF
9458 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9459 EOF
9460
9461 fi
9462 done
9463
9464 for ac_func in \
9465         remove \
9466         unlink
9467 do
9468 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9469 echo "$as_me:9469: checking for $ac_func" >&5
9470 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9471 if eval "test \"\${$as_ac_var+set}\" = set"; then
9472   echo $ECHO_N "(cached) $ECHO_C" >&6
9473 else
9474   cat >"conftest.$ac_ext" <<_ACEOF
9475 #line 9475 "configure"
9476 #include "confdefs.h"
9477 #define $ac_func autoconf_temporary
9478 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9479 #undef $ac_func
9480
9481 #ifdef __cplusplus
9482 extern "C"
9483 #endif
9484
9485 /* We use char because int might match the return type of a gcc2
9486    builtin and then its argument prototype would still apply.  */
9487 char $ac_func (void);
9488
9489 int
9490 main (void)
9491 {
9492
9493 /* The GNU C library defines stubs for functions which it implements
9494     to always fail with ENOSYS.  Some functions are actually named
9495     something starting with __ and the normal name is an alias.  */
9496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9497 #error found stub for $ac_func
9498 #endif
9499
9500         return $ac_func ();
9501   ;
9502   return 0;
9503 }
9504 _ACEOF
9505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9506 if { (eval echo "$as_me:9506: \"$ac_link\"") >&5
9507   (eval $ac_link) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit "$ac_status"); } &&
9511          { ac_try='test -s "conftest$ac_exeext"'
9512   { (eval echo "$as_me:9512: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:9515: \$? = $ac_status" >&5
9516   (exit "$ac_status"); }; }; then
9517   eval "$as_ac_var=yes"
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 cat "conftest.$ac_ext" >&5
9521 eval "$as_ac_var=no"
9522 fi
9523 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9524 fi
9525 echo "$as_me:9525: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9526 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9527 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9528   cat >>confdefs.h <<EOF
9529 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9530 EOF
9531
9532 fi
9533 done
9534
9535 if test "$cross_compiling" = yes ; then
9536
9537 for ac_func in \
9538                 link \
9539                 symlink
9540 do
9541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9542 echo "$as_me:9542: checking for $ac_func" >&5
9543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9544 if eval "test \"\${$as_ac_var+set}\" = set"; then
9545   echo $ECHO_N "(cached) $ECHO_C" >&6
9546 else
9547   cat >"conftest.$ac_ext" <<_ACEOF
9548 #line 9548 "configure"
9549 #include "confdefs.h"
9550 #define $ac_func autoconf_temporary
9551 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9552 #undef $ac_func
9553
9554 #ifdef __cplusplus
9555 extern "C"
9556 #endif
9557
9558 /* We use char because int might match the return type of a gcc2
9559    builtin and then its argument prototype would still apply.  */
9560 char $ac_func (void);
9561
9562 int
9563 main (void)
9564 {
9565
9566 /* The GNU C library defines stubs for functions which it implements
9567     to always fail with ENOSYS.  Some functions are actually named
9568     something starting with __ and the normal name is an alias.  */
9569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9570 #error found stub for $ac_func
9571 #endif
9572
9573         return $ac_func ();
9574   ;
9575   return 0;
9576 }
9577 _ACEOF
9578 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9579 if { (eval echo "$as_me:9579: \"$ac_link\"") >&5
9580   (eval $ac_link) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit "$ac_status"); } &&
9584          { ac_try='test -s "conftest$ac_exeext"'
9585   { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9586   (eval $ac_try) 2>&5
9587   ac_status=$?
9588   echo "$as_me:9588: \$? = $ac_status" >&5
9589   (exit "$ac_status"); }; }; then
9590   eval "$as_ac_var=yes"
9591 else
9592   echo "$as_me: failed program was:" >&5
9593 cat "conftest.$ac_ext" >&5
9594 eval "$as_ac_var=no"
9595 fi
9596 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9597 fi
9598 echo "$as_me:9598: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9599 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9600 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9601   cat >>confdefs.h <<EOF
9602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9603 EOF
9604
9605 fi
9606 done
9607
9608 else
9609         echo "$as_me:9609: checking if link/symlink functions work" >&5
9610 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9611 if test "${cf_cv_link_funcs+set}" = set; then
9612   echo $ECHO_N "(cached) $ECHO_C" >&6
9613 else
9614
9615                 cf_cv_link_funcs=
9616                 for cf_func in link symlink ; do
9617                         if test "$cross_compiling" = yes; then
9618
9619                         eval 'ac_cv_func_'$cf_func'=error'
9620 else
9621   cat >"conftest.$ac_ext" <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624
9625 #include <stdio.h>
9626 #include <sys/types.h>
9627 #include <sys/stat.h>
9628 #ifdef HAVE_UNISTD_H
9629 #include <unistd.h>
9630 #endif
9631 int main(void)
9632 {
9633         int fail = 0;
9634         char *src = "conftest.tmp";
9635         char *dst = "conftest.chk";
9636         struct stat src_sb, dst_sb;
9637         FILE *fp = fopen(src, "w");
9638         if (fp == 0) { fail = 3; } else {
9639                 fclose(fp); stat(src, &src_sb);
9640                 if ($cf_func(src, dst) < 0) {
9641                         fail = 1;
9642                 } else if (stat(dst, &dst_sb) < 0) {
9643                         fail = 2;
9644                 } else {
9645                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9646                         if (diff < 0) diff = -diff;
9647                         if (diff > 2) fail = 3;
9648                 }
9649         }
9650 #ifdef HAVE_UNLINK
9651         unlink(dst); unlink(src);
9652 #else
9653         remove(dst); remove(src);
9654 #endif
9655         ${cf_cv_main_return:-return} (fail);
9656 }
9657
9658 _ACEOF
9659 rm -f "conftest$ac_exeext"
9660 if { (eval echo "$as_me:9660: \"$ac_link\"") >&5
9661   (eval $ac_link) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9665   { (eval echo "$as_me:9665: \"$ac_try\"") >&5
9666   (eval $ac_try) 2>&5
9667   ac_status=$?
9668   echo "$as_me:9668: \$? = $ac_status" >&5
9669   (exit "$ac_status"); }; }; then
9670
9671                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9672                         eval 'ac_cv_func_'$cf_func'=yes'
9673 else
9674   echo "$as_me: program exited with status $ac_status" >&5
9675 echo "$as_me: failed program was:" >&5
9676 cat "conftest.$ac_ext" >&5
9677
9678                         eval 'ac_cv_func_'$cf_func'=no'
9679 fi
9680 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9681 fi
9682                 done
9683                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9684
9685 fi
9686 echo "$as_me:9686: result: $cf_cv_link_funcs" >&5
9687 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9688         test "$ac_cv_func_link"    = yes &&
9689 cat >>confdefs.h <<\EOF
9690 #define HAVE_LINK 1
9691 EOF
9692
9693         test "$ac_cv_func_symlink" = yes &&
9694 cat >>confdefs.h <<\EOF
9695 #define HAVE_SYMLINK 1
9696 EOF
9697
9698 fi
9699
9700 with_links=no
9701 with_symlinks=no
9702
9703 # soft links (symbolic links) are useful for some systems where hard links do
9704 # not work, or to make it simpler to copy terminfo trees around.
9705 if test "x$ac_cv_func_symlink" = xyes ; then
9706         echo "$as_me:9706: checking if tic should use symbolic links" >&5
9707 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9708
9709 # Check whether --enable-symlinks or --disable-symlinks was given.
9710 if test "${enable_symlinks+set}" = set; then
9711   enableval="$enable_symlinks"
9712   with_symlinks=$enableval
9713 else
9714   with_symlinks=no
9715 fi;
9716         echo "$as_me:9716: result: $with_symlinks" >&5
9717 echo "${ECHO_T}$with_symlinks" >&6
9718 fi
9719
9720 # If we have hard links and did not choose to use soft links instead, there is
9721 # no reason to make this choice optional - use the hard links.
9722 if test "$with_symlinks" = no ; then
9723         echo "$as_me:9723: checking if tic should use hard links" >&5
9724 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9725         if test "x$ac_cv_func_link" = xyes ; then
9726                 with_links=yes
9727         else
9728                 with_links=no
9729         fi
9730         echo "$as_me:9730: result: $with_links" >&5
9731 echo "${ECHO_T}$with_links" >&6
9732 fi
9733
9734 test "x$with_links" = xyes &&
9735 cat >>confdefs.h <<\EOF
9736 #define USE_LINKS 1
9737 EOF
9738
9739 test "x$with_symlinks" = xyes &&
9740 cat >>confdefs.h <<\EOF
9741 #define USE_SYMLINKS 1
9742 EOF
9743
9744 ###   use option --enable-broken-linker to force on use of broken-linker support
9745
9746 echo "$as_me:9746: checking if you want broken-linker support code" >&5
9747 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9748
9749 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9750 if test "${enable_broken_linker+set}" = set; then
9751   enableval="$enable_broken_linker"
9752   with_broken_linker=$enableval
9753 else
9754   with_broken_linker=no
9755 fi;
9756 echo "$as_me:9756: result: $with_broken_linker" >&5
9757 echo "${ECHO_T}$with_broken_linker" >&6
9758
9759 : "${BROKEN_LINKER:=0}"
9760 if test "x$with_broken_linker" = xyes ; then
9761
9762 cat >>confdefs.h <<\EOF
9763 #define BROKEN_LINKER 1
9764 EOF
9765
9766         BROKEN_LINKER=1
9767 fi
9768
9769 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9770 echo "$as_me:9770: checking if tputs should process BSD-style prefix padding" >&5
9771 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9772
9773 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9774 if test "${enable_bsdpad+set}" = set; then
9775   enableval="$enable_bsdpad"
9776   with_bsdpad=$enableval
9777 else
9778   with_bsdpad=no
9779 fi;
9780 echo "$as_me:9780: result: $with_bsdpad" >&5
9781 echo "${ECHO_T}$with_bsdpad" >&6
9782 test "x$with_bsdpad" = xyes &&
9783 cat >>confdefs.h <<\EOF
9784 #define BSD_TPUTS 1
9785 EOF
9786
9787 ###   use option --enable-widec to turn on use of wide-character support
9788 NCURSES_CH_T=chtype
9789 NCURSES_LIBUTF8=0
9790
9791 NEED_WCHAR_H=0
9792 NCURSES_MBSTATE_T=0
9793 NCURSES_WCHAR_T=0
9794 NCURSES_WINT_T=0
9795
9796 # Check to define _XOPEN_SOURCE "automatically"
9797 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9798
9799 echo "$as_me:9799: checking if the POSIX test-macros are already defined" >&5
9800 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9801 if test "${cf_cv_posix_visible+set}" = set; then
9802   echo $ECHO_N "(cached) $ECHO_C" >&6
9803 else
9804
9805 cat >"conftest.$ac_ext" <<_ACEOF
9806 #line 9806 "configure"
9807 #include "confdefs.h"
9808 #include <stdio.h>
9809 int
9810 main (void)
9811 {
9812
9813 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9814         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9815         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9816         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9817 #error conflicting symbols found
9818 #endif
9819
9820   ;
9821   return 0;
9822 }
9823 _ACEOF
9824 rm -f "conftest.$ac_objext"
9825 if { (eval echo "$as_me:9825: \"$ac_compile\"") >&5
9826   (eval $ac_compile) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit "$ac_status"); } &&
9830          { ac_try='test -s "conftest.$ac_objext"'
9831   { (eval echo "$as_me:9831: \"$ac_try\"") >&5
9832   (eval $ac_try) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit "$ac_status"); }; }; then
9836   cf_cv_posix_visible=no
9837 else
9838   echo "$as_me: failed program was:" >&5
9839 cat "conftest.$ac_ext" >&5
9840 cf_cv_posix_visible=yes
9841 fi
9842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9843
9844 fi
9845 echo "$as_me:9845: result: $cf_cv_posix_visible" >&5
9846 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9847
9848 if test "$cf_cv_posix_visible" = no; then
9849
9850 cf_XOPEN_SOURCE=600
9851 cf_POSIX_C_SOURCE=199506L
9852 cf_xopen_source=
9853
9854 case "$host_os" in
9855 (aix[4-7]*)
9856         cf_xopen_source="-D_ALL_SOURCE"
9857         ;;
9858 (msys)
9859         cf_XOPEN_SOURCE=600
9860         ;;
9861 (darwin[0-8].*)
9862         cf_xopen_source="-D_APPLE_C_SOURCE"
9863         ;;
9864 (darwin*)
9865         cf_xopen_source="-D_DARWIN_C_SOURCE"
9866         cf_XOPEN_SOURCE=
9867         ;;
9868 (freebsd*|dragonfly*|midnightbsd*)
9869         # 5.x headers associate
9870         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9871         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9872         cf_POSIX_C_SOURCE=200112L
9873         cf_XOPEN_SOURCE=600
9874         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9875         ;;
9876 (hpux11*)
9877         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9878         ;;
9879 (hpux*)
9880         cf_xopen_source="-D_HPUX_SOURCE"
9881         ;;
9882 (irix[56].*)
9883         cf_xopen_source="-D_SGI_SOURCE"
9884         cf_XOPEN_SOURCE=
9885         ;;
9886 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9887
9888 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9889
9890 echo "$as_me:9890: checking if this is the GNU C library" >&5
9891 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9892 if test "${cf_cv_gnu_library+set}" = set; then
9893   echo $ECHO_N "(cached) $ECHO_C" >&6
9894 else
9895
9896 cat >"conftest.$ac_ext" <<_ACEOF
9897 #line 9897 "configure"
9898 #include "confdefs.h"
9899 #include <sys/types.h>
9900 int
9901 main (void)
9902 {
9903
9904         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9905                 return 0;
9906         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9907                 return 0;
9908         #else
9909         #       error not GNU C library
9910         #endif
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 rm -f "conftest.$ac_objext"
9916 if { (eval echo "$as_me:9916: \"$ac_compile\"") >&5
9917   (eval $ac_compile) 2>&5
9918   ac_status=$?
9919   echo "$as_me:9919: \$? = $ac_status" >&5
9920   (exit "$ac_status"); } &&
9921          { ac_try='test -s "conftest.$ac_objext"'
9922   { (eval echo "$as_me:9922: \"$ac_try\"") >&5
9923   (eval $ac_try) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit "$ac_status"); }; }; then
9927   cf_cv_gnu_library=yes
9928 else
9929   echo "$as_me: failed program was:" >&5
9930 cat "conftest.$ac_ext" >&5
9931 cf_cv_gnu_library=no
9932 fi
9933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9934
9935 fi
9936 echo "$as_me:9936: result: $cf_cv_gnu_library" >&5
9937 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9938
9939 if test x$cf_cv_gnu_library = xyes; then
9940
9941         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9942         # was changed to help a little.  newlib incorporated the change about 4
9943         # years later.
9944         echo "$as_me:9944: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9945 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9946 if test "${cf_cv_gnu_library_219+set}" = set; then
9947   echo $ECHO_N "(cached) $ECHO_C" >&6
9948 else
9949
9950                 cf_save="$CPPFLAGS"
9951
9952         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9953         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9954
9955                 cat >"conftest.$ac_ext" <<_ACEOF
9956 #line 9956 "configure"
9957 #include "confdefs.h"
9958 #include <sys/types.h>
9959 int
9960 main (void)
9961 {
9962
9963                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9964                                 return 0;
9965                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9966                                 return 0;
9967                         #else
9968                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9969                         #endif
9970   ;
9971   return 0;
9972 }
9973 _ACEOF
9974 rm -f "conftest.$ac_objext"
9975 if { (eval echo "$as_me:9975: \"$ac_compile\"") >&5
9976   (eval $ac_compile) 2>&5
9977   ac_status=$?
9978   echo "$as_me:9978: \$? = $ac_status" >&5
9979   (exit "$ac_status"); } &&
9980          { ac_try='test -s "conftest.$ac_objext"'
9981   { (eval echo "$as_me:9981: \"$ac_try\"") >&5
9982   (eval $ac_try) 2>&5
9983   ac_status=$?
9984   echo "$as_me:9984: \$? = $ac_status" >&5
9985   (exit "$ac_status"); }; }; then
9986   cf_cv_gnu_library_219=yes
9987 else
9988   echo "$as_me: failed program was:" >&5
9989 cat "conftest.$ac_ext" >&5
9990 cf_cv_gnu_library_219=no
9991 fi
9992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9993                 CPPFLAGS="$cf_save"
9994
9995 fi
9996 echo "$as_me:9996: result: $cf_cv_gnu_library_219" >&5
9997 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9998
9999         if test "x$cf_cv_gnu_library_219" = xyes; then
10000                 cf_save="$CPPFLAGS"
10001                 echo "$as_me:10001: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10002 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10003 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10004   echo $ECHO_N "(cached) $ECHO_C" >&6
10005 else
10006
10007 cf_fix_cppflags=no
10008 cf_new_cflags=
10009 cf_new_cppflags=
10010 cf_new_extra_cppflags=
10011
10012 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10013 do
10014 case "$cf_fix_cppflags" in
10015 (no)
10016         case "$cf_add_cflags" in
10017         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10018                 case "$cf_add_cflags" in
10019                 (-D*)
10020                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10021
10022                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10023                                 && test -z "${cf_tst_cflags}" \
10024                                 && cf_fix_cppflags=yes
10025
10026                         if test "$cf_fix_cppflags" = yes ; then
10027
10028         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10029         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10030
10031                                 continue
10032                         elif test "${cf_tst_cflags}" = "\"'" ; then
10033
10034         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10035         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10036
10037                                 continue
10038                         fi
10039                         ;;
10040                 esac
10041                 case "$CPPFLAGS" in
10042                 (*$cf_add_cflags)
10043                         ;;
10044                 (*)
10045                         case "$cf_add_cflags" in
10046                         (-D*)
10047                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10048
10049 CPPFLAGS=`echo "$CPPFLAGS" | \
10050         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10051                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10052
10053                                 ;;
10054                         esac
10055
10056         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10057         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10058
10059                         ;;
10060                 esac
10061                 ;;
10062         (*)
10063
10064         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10065         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10066
10067                 ;;
10068         esac
10069         ;;
10070 (yes)
10071
10072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10074
10075         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10076
10077         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10078                 && test -z "${cf_tst_cflags}" \
10079                 && cf_fix_cppflags=no
10080         ;;
10081 esac
10082 done
10083
10084 if test -n "$cf_new_cflags" ; then
10085
10086         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10087         CFLAGS="${CFLAGS}$cf_new_cflags"
10088
10089 fi
10090
10091 if test -n "$cf_new_cppflags" ; then
10092
10093         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10094         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10095
10096 fi
10097
10098 if test -n "$cf_new_extra_cppflags" ; then
10099
10100         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10101         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10102
10103 fi
10104
10105                         cat >"conftest.$ac_ext" <<_ACEOF
10106 #line 10106 "configure"
10107 #include "confdefs.h"
10108
10109                                 #include <limits.h>
10110                                 #include <sys/types.h>
10111
10112 int
10113 main (void)
10114 {
10115
10116                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10117                                         return 0;
10118                                 #else
10119                                 #       error GNU C library is too old
10120                                 #endif
10121   ;
10122   return 0;
10123 }
10124 _ACEOF
10125 rm -f "conftest.$ac_objext"
10126 if { (eval echo "$as_me:10126: \"$ac_compile\"") >&5
10127   (eval $ac_compile) 2>&5
10128   ac_status=$?
10129   echo "$as_me:10129: \$? = $ac_status" >&5
10130   (exit "$ac_status"); } &&
10131          { ac_try='test -s "conftest.$ac_objext"'
10132   { (eval echo "$as_me:10132: \"$ac_try\"") >&5
10133   (eval $ac_try) 2>&5
10134   ac_status=$?
10135   echo "$as_me:10135: \$? = $ac_status" >&5
10136   (exit "$ac_status"); }; }; then
10137   cf_cv_gnu_dftsrc_219=yes
10138 else
10139   echo "$as_me: failed program was:" >&5
10140 cat "conftest.$ac_ext" >&5
10141 cf_cv_gnu_dftsrc_219=no
10142 fi
10143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10144
10145 fi
10146 echo "$as_me:10146: result: $cf_cv_gnu_dftsrc_219" >&5
10147 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10148                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10149         else
10150                 cf_cv_gnu_dftsrc_219=maybe
10151         fi
10152
10153         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10154
10155                 echo "$as_me:10155: checking if we must define _GNU_SOURCE" >&5
10156 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10157 if test "${cf_cv_gnu_source+set}" = set; then
10158   echo $ECHO_N "(cached) $ECHO_C" >&6
10159 else
10160
10161                 cat >"conftest.$ac_ext" <<_ACEOF
10162 #line 10162 "configure"
10163 #include "confdefs.h"
10164 #include <sys/types.h>
10165 int
10166 main (void)
10167 {
10168
10169                         #ifndef _XOPEN_SOURCE
10170                         #error  expected _XOPEN_SOURCE to be defined
10171                         #endif
10172   ;
10173   return 0;
10174 }
10175 _ACEOF
10176 rm -f "conftest.$ac_objext"
10177 if { (eval echo "$as_me:10177: \"$ac_compile\"") >&5
10178   (eval $ac_compile) 2>&5
10179   ac_status=$?
10180   echo "$as_me:10180: \$? = $ac_status" >&5
10181   (exit "$ac_status"); } &&
10182          { ac_try='test -s "conftest.$ac_objext"'
10183   { (eval echo "$as_me:10183: \"$ac_try\"") >&5
10184   (eval $ac_try) 2>&5
10185   ac_status=$?
10186   echo "$as_me:10186: \$? = $ac_status" >&5
10187   (exit "$ac_status"); }; }; then
10188   cf_cv_gnu_source=no
10189 else
10190   echo "$as_me: failed program was:" >&5
10191 cat "conftest.$ac_ext" >&5
10192 cf_save="$CPPFLAGS"
10193
10194 cf_fix_cppflags=no
10195 cf_new_cflags=
10196 cf_new_cppflags=
10197 cf_new_extra_cppflags=
10198
10199 for cf_add_cflags in -D_GNU_SOURCE
10200 do
10201 case "$cf_fix_cppflags" in
10202 (no)
10203         case "$cf_add_cflags" in
10204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10205                 case "$cf_add_cflags" in
10206                 (-D*)
10207                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10208
10209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10210                                 && test -z "${cf_tst_cflags}" \
10211                                 && cf_fix_cppflags=yes
10212
10213                         if test "$cf_fix_cppflags" = yes ; then
10214
10215         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10216         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10217
10218                                 continue
10219                         elif test "${cf_tst_cflags}" = "\"'" ; then
10220
10221         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10222         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10223
10224                                 continue
10225                         fi
10226                         ;;
10227                 esac
10228                 case "$CPPFLAGS" in
10229                 (*$cf_add_cflags)
10230                         ;;
10231                 (*)
10232                         case "$cf_add_cflags" in
10233                         (-D*)
10234                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10235
10236 CPPFLAGS=`echo "$CPPFLAGS" | \
10237         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10238                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10239
10240                                 ;;
10241                         esac
10242
10243         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10244         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10245
10246                         ;;
10247                 esac
10248                 ;;
10249         (*)
10250
10251         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10252         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10253
10254                 ;;
10255         esac
10256         ;;
10257 (yes)
10258
10259         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10260         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10261
10262         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10263
10264         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10265                 && test -z "${cf_tst_cflags}" \
10266                 && cf_fix_cppflags=no
10267         ;;
10268 esac
10269 done
10270
10271 if test -n "$cf_new_cflags" ; then
10272
10273         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10274         CFLAGS="${CFLAGS}$cf_new_cflags"
10275
10276 fi
10277
10278 if test -n "$cf_new_cppflags" ; then
10279
10280         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10281         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10282
10283 fi
10284
10285 if test -n "$cf_new_extra_cppflags" ; then
10286
10287         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10288         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10289
10290 fi
10291
10292                          cat >"conftest.$ac_ext" <<_ACEOF
10293 #line 10293 "configure"
10294 #include "confdefs.h"
10295 #include <sys/types.h>
10296 int
10297 main (void)
10298 {
10299
10300                                 #ifdef _XOPEN_SOURCE
10301                                 #error  expected _XOPEN_SOURCE to be undefined
10302                                 #endif
10303   ;
10304   return 0;
10305 }
10306 _ACEOF
10307 rm -f "conftest.$ac_objext"
10308 if { (eval echo "$as_me:10308: \"$ac_compile\"") >&5
10309   (eval $ac_compile) 2>&5
10310   ac_status=$?
10311   echo "$as_me:10311: \$? = $ac_status" >&5
10312   (exit "$ac_status"); } &&
10313          { ac_try='test -s "conftest.$ac_objext"'
10314   { (eval echo "$as_me:10314: \"$ac_try\"") >&5
10315   (eval $ac_try) 2>&5
10316   ac_status=$?
10317   echo "$as_me:10317: \$? = $ac_status" >&5
10318   (exit "$ac_status"); }; }; then
10319   cf_cv_gnu_source=no
10320 else
10321   echo "$as_me: failed program was:" >&5
10322 cat "conftest.$ac_ext" >&5
10323 cf_cv_gnu_source=yes
10324 fi
10325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10326                         CPPFLAGS="$cf_save"
10327
10328 fi
10329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10330
10331 fi
10332 echo "$as_me:10332: result: $cf_cv_gnu_source" >&5
10333 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10334
10335                 if test "$cf_cv_gnu_source" = yes
10336                 then
10337                 echo "$as_me:10337: checking if we should also define _DEFAULT_SOURCE" >&5
10338 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10339 if test "${cf_cv_default_source+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342
10343         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10344         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10345
10346                         cat >"conftest.$ac_ext" <<_ACEOF
10347 #line 10347 "configure"
10348 #include "confdefs.h"
10349 #include <sys/types.h>
10350 int
10351 main (void)
10352 {
10353
10354                                 #ifdef _DEFAULT_SOURCE
10355                                 #error  expected _DEFAULT_SOURCE to be undefined
10356                                 #endif
10357   ;
10358   return 0;
10359 }
10360 _ACEOF
10361 rm -f "conftest.$ac_objext"
10362 if { (eval echo "$as_me:10362: \"$ac_compile\"") >&5
10363   (eval $ac_compile) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit "$ac_status"); } &&
10367          { ac_try='test -s "conftest.$ac_objext"'
10368   { (eval echo "$as_me:10368: \"$ac_try\"") >&5
10369   (eval $ac_try) 2>&5
10370   ac_status=$?
10371   echo "$as_me:10371: \$? = $ac_status" >&5
10372   (exit "$ac_status"); }; }; then
10373   cf_cv_default_source=no
10374 else
10375   echo "$as_me: failed program was:" >&5
10376 cat "conftest.$ac_ext" >&5
10377 cf_cv_default_source=yes
10378 fi
10379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10380
10381 fi
10382 echo "$as_me:10382: result: $cf_cv_default_source" >&5
10383 echo "${ECHO_T}$cf_cv_default_source" >&6
10384                         if test "$cf_cv_default_source" = yes
10385                         then
10386
10387         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10388         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10389
10390                         fi
10391                 fi
10392         fi
10393
10394 fi
10395
10396         ;;
10397 (minix*)
10398         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10399         ;;
10400 (mirbsd*)
10401         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10402         cf_XOPEN_SOURCE=
10403
10404 if test "$cf_cv_posix_visible" = no; then
10405
10406 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10407
10408 cf_save_CFLAGS="$CFLAGS"
10409 cf_save_CPPFLAGS="$CPPFLAGS"
10410
10411 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10412         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10413                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10414
10415 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10416         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10417                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10418
10419 echo "$as_me:10419: checking if we should define _POSIX_C_SOURCE" >&5
10420 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10421 if test "${cf_cv_posix_c_source+set}" = set; then
10422   echo $ECHO_N "(cached) $ECHO_C" >&6
10423 else
10424
10425 echo "${as_me:-configure}:10425: testing if the symbol is already defined go no further ..." 1>&5
10426
10427         cat >"conftest.$ac_ext" <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #include <sys/types.h>
10431 int
10432 main (void)
10433 {
10434
10435 #ifndef _POSIX_C_SOURCE
10436 make an error
10437 #endif
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 rm -f "conftest.$ac_objext"
10443 if { (eval echo "$as_me:10443: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit "$ac_status"); } &&
10448          { ac_try='test -s "conftest.$ac_objext"'
10449   { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450   (eval $ac_try) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit "$ac_status"); }; }; then
10454   cf_cv_posix_c_source=no
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 cat "conftest.$ac_ext" >&5
10458 cf_want_posix_source=no
10459          case .$cf_POSIX_C_SOURCE in
10460          (.[12]??*)
10461                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10462                 ;;
10463          (.2)
10464                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10465                 cf_want_posix_source=yes
10466                 ;;
10467          (.*)
10468                 cf_want_posix_source=yes
10469                 ;;
10470          esac
10471          if test "$cf_want_posix_source" = yes ; then
10472                 cat >"conftest.$ac_ext" <<_ACEOF
10473 #line 10473 "configure"
10474 #include "confdefs.h"
10475 #include <sys/types.h>
10476 int
10477 main (void)
10478 {
10479
10480 #ifdef _POSIX_SOURCE
10481 make an error
10482 #endif
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f "conftest.$ac_objext"
10488 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit "$ac_status"); } &&
10493          { ac_try='test -s "conftest.$ac_objext"'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit "$ac_status"); }; }; then
10499   :
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat "conftest.$ac_ext" >&5
10503 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10504 fi
10505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10506          fi
10507
10508 echo "${as_me:-configure}:10508: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10509
10510          CFLAGS="$cf_trim_CFLAGS"
10511          CPPFLAGS="$cf_trim_CPPFLAGS"
10512
10513         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10514         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10515
10516 echo "${as_me:-configure}:10516: testing if the second compile does not leave our definition intact error ..." 1>&5
10517
10518          cat >"conftest.$ac_ext" <<_ACEOF
10519 #line 10519 "configure"
10520 #include "confdefs.h"
10521 #include <sys/types.h>
10522 int
10523 main (void)
10524 {
10525
10526 #ifndef _POSIX_C_SOURCE
10527 make an error
10528 #endif
10529   ;
10530   return 0;
10531 }
10532 _ACEOF
10533 rm -f "conftest.$ac_objext"
10534 if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
10535   (eval $ac_compile) 2>&5
10536   ac_status=$?
10537   echo "$as_me:10537: \$? = $ac_status" >&5
10538   (exit "$ac_status"); } &&
10539          { ac_try='test -s "conftest.$ac_objext"'
10540   { (eval echo "$as_me:10540: \"$ac_try\"") >&5
10541   (eval $ac_try) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit "$ac_status"); }; }; then
10545   :
10546 else
10547   echo "$as_me: failed program was:" >&5
10548 cat "conftest.$ac_ext" >&5
10549 cf_cv_posix_c_source=no
10550 fi
10551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10552          CFLAGS="$cf_save_CFLAGS"
10553          CPPFLAGS="$cf_save_CPPFLAGS"
10554
10555 fi
10556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10557
10558 fi
10559 echo "$as_me:10559: result: $cf_cv_posix_c_source" >&5
10560 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10561
10562 if test "$cf_cv_posix_c_source" != no ; then
10563         CFLAGS="$cf_trim_CFLAGS"
10564         CPPFLAGS="$cf_trim_CPPFLAGS"
10565
10566 cf_fix_cppflags=no
10567 cf_new_cflags=
10568 cf_new_cppflags=
10569 cf_new_extra_cppflags=
10570
10571 for cf_add_cflags in $cf_cv_posix_c_source
10572 do
10573 case "$cf_fix_cppflags" in
10574 (no)
10575         case "$cf_add_cflags" in
10576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10577                 case "$cf_add_cflags" in
10578                 (-D*)
10579                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10580
10581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10582                                 && test -z "${cf_tst_cflags}" \
10583                                 && cf_fix_cppflags=yes
10584
10585                         if test "$cf_fix_cppflags" = yes ; then
10586
10587         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10588         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10589
10590                                 continue
10591                         elif test "${cf_tst_cflags}" = "\"'" ; then
10592
10593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10595
10596                                 continue
10597                         fi
10598                         ;;
10599                 esac
10600                 case "$CPPFLAGS" in
10601                 (*$cf_add_cflags)
10602                         ;;
10603                 (*)
10604                         case "$cf_add_cflags" in
10605                         (-D*)
10606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10607
10608 CPPFLAGS=`echo "$CPPFLAGS" | \
10609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10611
10612                                 ;;
10613                         esac
10614
10615         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10616         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10617
10618                         ;;
10619                 esac
10620                 ;;
10621         (*)
10622
10623         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10624         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10625
10626                 ;;
10627         esac
10628         ;;
10629 (yes)
10630
10631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10633
10634         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10635
10636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10637                 && test -z "${cf_tst_cflags}" \
10638                 && cf_fix_cppflags=no
10639         ;;
10640 esac
10641 done
10642
10643 if test -n "$cf_new_cflags" ; then
10644
10645         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10646         CFLAGS="${CFLAGS}$cf_new_cflags"
10647
10648 fi
10649
10650 if test -n "$cf_new_cppflags" ; then
10651
10652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10653         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10654
10655 fi
10656
10657 if test -n "$cf_new_extra_cppflags" ; then
10658
10659         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10660         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10661
10662 fi
10663
10664 fi
10665
10666 fi # cf_cv_posix_visible
10667
10668         ;;
10669 (netbsd*)
10670         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10671         ;;
10672 (openbsd[6-9]*)
10673         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10674         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10675         # Abusing the conformance level is a workaround.
10676         { echo "$as_me:10676: WARNING: this system does not provide usable locale support" >&5
10677 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10678         cf_xopen_source="-D_BSD_SOURCE"
10679         cf_XOPEN_SOURCE=700
10680         ;;
10681 (openbsd[4-5]*)
10682         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10683         cf_xopen_source="-D_BSD_SOURCE"
10684         cf_XOPEN_SOURCE=600
10685         ;;
10686 (openbsd*)
10687         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10688         ;;
10689 (osf[45]*)
10690         cf_xopen_source="-D_OSF_SOURCE"
10691         ;;
10692 (nto-qnx*)
10693         cf_xopen_source="-D_QNX_SOURCE"
10694         ;;
10695 (sco*)
10696         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10697         ;;
10698 (solaris2.*)
10699         cf_xopen_source="-D__EXTENSIONS__"
10700         cf_cv_xopen_source=broken
10701         ;;
10702 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10703         cf_XOPEN_SOURCE=
10704         cf_POSIX_C_SOURCE=
10705         ;;
10706 (*)
10707
10708 echo "$as_me:10708: checking if we should define _XOPEN_SOURCE" >&5
10709 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10710 if test "${cf_cv_xopen_source+set}" = set; then
10711   echo $ECHO_N "(cached) $ECHO_C" >&6
10712 else
10713
10714         cat >"conftest.$ac_ext" <<_ACEOF
10715 #line 10715 "configure"
10716 #include "confdefs.h"
10717
10718 #include <stdlib.h>
10719 #include <string.h>
10720 #include <sys/types.h>
10721
10722 int
10723 main (void)
10724 {
10725
10726 #ifndef _XOPEN_SOURCE
10727 make an error
10728 #endif
10729   ;
10730   return 0;
10731 }
10732 _ACEOF
10733 rm -f "conftest.$ac_objext"
10734 if { (eval echo "$as_me:10734: \"$ac_compile\"") >&5
10735   (eval $ac_compile) 2>&5
10736   ac_status=$?
10737   echo "$as_me:10737: \$? = $ac_status" >&5
10738   (exit "$ac_status"); } &&
10739          { ac_try='test -s "conftest.$ac_objext"'
10740   { (eval echo "$as_me:10740: \"$ac_try\"") >&5
10741   (eval $ac_try) 2>&5
10742   ac_status=$?
10743   echo "$as_me:10743: \$? = $ac_status" >&5
10744   (exit "$ac_status"); }; }; then
10745   cf_cv_xopen_source=no
10746 else
10747   echo "$as_me: failed program was:" >&5
10748 cat "conftest.$ac_ext" >&5
10749 cf_save="$CPPFLAGS"
10750
10751         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10752         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10753
10754          cat >"conftest.$ac_ext" <<_ACEOF
10755 #line 10755 "configure"
10756 #include "confdefs.h"
10757
10758 #include <stdlib.h>
10759 #include <string.h>
10760 #include <sys/types.h>
10761
10762 int
10763 main (void)
10764 {
10765
10766 #ifdef _XOPEN_SOURCE
10767 make an error
10768 #endif
10769   ;
10770   return 0;
10771 }
10772 _ACEOF
10773 rm -f "conftest.$ac_objext"
10774 if { (eval echo "$as_me:10774: \"$ac_compile\"") >&5
10775   (eval $ac_compile) 2>&5
10776   ac_status=$?
10777   echo "$as_me:10777: \$? = $ac_status" >&5
10778   (exit "$ac_status"); } &&
10779          { ac_try='test -s "conftest.$ac_objext"'
10780   { (eval echo "$as_me:10780: \"$ac_try\"") >&5
10781   (eval $ac_try) 2>&5
10782   ac_status=$?
10783   echo "$as_me:10783: \$? = $ac_status" >&5
10784   (exit "$ac_status"); }; }; then
10785   cf_cv_xopen_source=no
10786 else
10787   echo "$as_me: failed program was:" >&5
10788 cat "conftest.$ac_ext" >&5
10789 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10790 fi
10791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10792         CPPFLAGS="$cf_save"
10793
10794 fi
10795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10796
10797 fi
10798 echo "$as_me:10798: result: $cf_cv_xopen_source" >&5
10799 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10800
10801 if test "$cf_cv_xopen_source" != no ; then
10802
10803 CFLAGS=`echo "$CFLAGS" | \
10804         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10805                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10806
10807 CPPFLAGS=`echo "$CPPFLAGS" | \
10808         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10809                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10810
10811         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10812
10813 for cf_add_cflags in $cf_temp_xopen_source
10814 do
10815         case "x$cf_add_cflags" in
10816         (x-[DU]*)
10817
10818 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10819 while true
10820 do
10821         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'`
10822         test "$CFLAGS" != "$cf_old_cflag" || break
10823
10824         CFLAGS="$cf_old_cflag"
10825 done
10826
10827 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10828 while true
10829 do
10830         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'`
10831         test "$CPPFLAGS" != "$cf_old_cflag" || break
10832
10833         CPPFLAGS="$cf_old_cflag"
10834 done
10835
10836                 ;;
10837         esac
10838
10839 cf_fix_cppflags=no
10840 cf_new_cflags=
10841 cf_new_cppflags=
10842 cf_new_extra_cppflags=
10843
10844 for cf_add_cflags in $cf_add_cflags
10845 do
10846 case "$cf_fix_cppflags" in
10847 (no)
10848         case "$cf_add_cflags" in
10849         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10850                 case "$cf_add_cflags" in
10851                 (-D*)
10852                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10853
10854                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10855                                 && test -z "${cf_tst_cflags}" \
10856                                 && cf_fix_cppflags=yes
10857
10858                         if test "$cf_fix_cppflags" = yes ; then
10859
10860         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10861         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10862
10863                                 continue
10864                         elif test "${cf_tst_cflags}" = "\"'" ; then
10865
10866         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10867         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10868
10869                                 continue
10870                         fi
10871                         ;;
10872                 esac
10873                 case "$CPPFLAGS" in
10874                 (*$cf_add_cflags)
10875                         ;;
10876                 (*)
10877                         case "$cf_add_cflags" in
10878                         (-D*)
10879                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10880
10881 CPPFLAGS=`echo "$CPPFLAGS" | \
10882         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10883                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10884
10885                                 ;;
10886                         esac
10887
10888         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10889         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10890
10891                         ;;
10892                 esac
10893                 ;;
10894         (*)
10895
10896         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10897         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10898
10899                 ;;
10900         esac
10901         ;;
10902 (yes)
10903
10904         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10905         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10906
10907         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10908
10909         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10910                 && test -z "${cf_tst_cflags}" \
10911                 && cf_fix_cppflags=no
10912         ;;
10913 esac
10914 done
10915
10916 if test -n "$cf_new_cflags" ; then
10917
10918         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10919         CFLAGS="${CFLAGS}$cf_new_cflags"
10920
10921 fi
10922
10923 if test -n "$cf_new_cppflags" ; then
10924
10925         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10926         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10927
10928 fi
10929
10930 if test -n "$cf_new_extra_cppflags" ; then
10931
10932         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10933         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10934
10935 fi
10936
10937 done
10938
10939 fi
10940
10941 if test "$cf_cv_posix_visible" = no; then
10942
10943 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10944
10945 cf_save_CFLAGS="$CFLAGS"
10946 cf_save_CPPFLAGS="$CPPFLAGS"
10947
10948 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10949         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10950                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10951
10952 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10953         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10954                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10955
10956 echo "$as_me:10956: checking if we should define _POSIX_C_SOURCE" >&5
10957 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10958 if test "${cf_cv_posix_c_source+set}" = set; then
10959   echo $ECHO_N "(cached) $ECHO_C" >&6
10960 else
10961
10962 echo "${as_me:-configure}:10962: testing if the symbol is already defined go no further ..." 1>&5
10963
10964         cat >"conftest.$ac_ext" <<_ACEOF
10965 #line 10965 "configure"
10966 #include "confdefs.h"
10967 #include <sys/types.h>
10968 int
10969 main (void)
10970 {
10971
10972 #ifndef _POSIX_C_SOURCE
10973 make an error
10974 #endif
10975   ;
10976   return 0;
10977 }
10978 _ACEOF
10979 rm -f "conftest.$ac_objext"
10980 if { (eval echo "$as_me:10980: \"$ac_compile\"") >&5
10981   (eval $ac_compile) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit "$ac_status"); } &&
10985          { ac_try='test -s "conftest.$ac_objext"'
10986   { (eval echo "$as_me:10986: \"$ac_try\"") >&5
10987   (eval $ac_try) 2>&5
10988   ac_status=$?
10989   echo "$as_me:10989: \$? = $ac_status" >&5
10990   (exit "$ac_status"); }; }; then
10991   cf_cv_posix_c_source=no
10992 else
10993   echo "$as_me: failed program was:" >&5
10994 cat "conftest.$ac_ext" >&5
10995 cf_want_posix_source=no
10996          case .$cf_POSIX_C_SOURCE in
10997          (.[12]??*)
10998                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10999                 ;;
11000          (.2)
11001                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11002                 cf_want_posix_source=yes
11003                 ;;
11004          (.*)
11005                 cf_want_posix_source=yes
11006                 ;;
11007          esac
11008          if test "$cf_want_posix_source" = yes ; then
11009                 cat >"conftest.$ac_ext" <<_ACEOF
11010 #line 11010 "configure"
11011 #include "confdefs.h"
11012 #include <sys/types.h>
11013 int
11014 main (void)
11015 {
11016
11017 #ifdef _POSIX_SOURCE
11018 make an error
11019 #endif
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f "conftest.$ac_objext"
11025 if { (eval echo "$as_me:11025: \"$ac_compile\"") >&5
11026   (eval $ac_compile) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit "$ac_status"); } &&
11030          { ac_try='test -s "conftest.$ac_objext"'
11031   { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032   (eval $ac_try) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit "$ac_status"); }; }; then
11036   :
11037 else
11038   echo "$as_me: failed program was:" >&5
11039 cat "conftest.$ac_ext" >&5
11040 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11041 fi
11042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11043          fi
11044
11045 echo "${as_me:-configure}:11045: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11046
11047          CFLAGS="$cf_trim_CFLAGS"
11048          CPPFLAGS="$cf_trim_CPPFLAGS"
11049
11050         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11051         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11052
11053 echo "${as_me:-configure}:11053: testing if the second compile does not leave our definition intact error ..." 1>&5
11054
11055          cat >"conftest.$ac_ext" <<_ACEOF
11056 #line 11056 "configure"
11057 #include "confdefs.h"
11058 #include <sys/types.h>
11059 int
11060 main (void)
11061 {
11062
11063 #ifndef _POSIX_C_SOURCE
11064 make an error
11065 #endif
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f "conftest.$ac_objext"
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072   (eval $ac_compile) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit "$ac_status"); } &&
11076          { ac_try='test -s "conftest.$ac_objext"'
11077   { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit "$ac_status"); }; }; then
11082   :
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat "conftest.$ac_ext" >&5
11086 cf_cv_posix_c_source=no
11087 fi
11088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11089          CFLAGS="$cf_save_CFLAGS"
11090          CPPFLAGS="$cf_save_CPPFLAGS"
11091
11092 fi
11093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11094
11095 fi
11096 echo "$as_me:11096: result: $cf_cv_posix_c_source" >&5
11097 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11098
11099 if test "$cf_cv_posix_c_source" != no ; then
11100         CFLAGS="$cf_trim_CFLAGS"
11101         CPPFLAGS="$cf_trim_CPPFLAGS"
11102
11103 cf_fix_cppflags=no
11104 cf_new_cflags=
11105 cf_new_cppflags=
11106 cf_new_extra_cppflags=
11107
11108 for cf_add_cflags in $cf_cv_posix_c_source
11109 do
11110 case "$cf_fix_cppflags" in
11111 (no)
11112         case "$cf_add_cflags" in
11113         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11114                 case "$cf_add_cflags" in
11115                 (-D*)
11116                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11117
11118                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11119                                 && test -z "${cf_tst_cflags}" \
11120                                 && cf_fix_cppflags=yes
11121
11122                         if test "$cf_fix_cppflags" = yes ; then
11123
11124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11126
11127                                 continue
11128                         elif test "${cf_tst_cflags}" = "\"'" ; then
11129
11130         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11131         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11132
11133                                 continue
11134                         fi
11135                         ;;
11136                 esac
11137                 case "$CPPFLAGS" in
11138                 (*$cf_add_cflags)
11139                         ;;
11140                 (*)
11141                         case "$cf_add_cflags" in
11142                         (-D*)
11143                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11144
11145 CPPFLAGS=`echo "$CPPFLAGS" | \
11146         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11147                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11148
11149                                 ;;
11150                         esac
11151
11152         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11153         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11154
11155                         ;;
11156                 esac
11157                 ;;
11158         (*)
11159
11160         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11161         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11162
11163                 ;;
11164         esac
11165         ;;
11166 (yes)
11167
11168         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11169         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11170
11171         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11172
11173         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11174                 && test -z "${cf_tst_cflags}" \
11175                 && cf_fix_cppflags=no
11176         ;;
11177 esac
11178 done
11179
11180 if test -n "$cf_new_cflags" ; then
11181
11182         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11183         CFLAGS="${CFLAGS}$cf_new_cflags"
11184
11185 fi
11186
11187 if test -n "$cf_new_cppflags" ; then
11188
11189         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11190         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11191
11192 fi
11193
11194 if test -n "$cf_new_extra_cppflags" ; then
11195
11196         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11197         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11198
11199 fi
11200
11201 fi
11202
11203 fi # cf_cv_posix_visible
11204
11205         ;;
11206 esac
11207
11208 if test -n "$cf_xopen_source" ; then
11209
11210 for cf_add_cflags in $cf_xopen_source
11211 do
11212         case "x$cf_add_cflags" in
11213         (x-[DU]*)
11214
11215 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11216 while true
11217 do
11218         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'`
11219         test "$CFLAGS" != "$cf_old_cflag" || break
11220         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11221
11222 echo "${as_me:-configure}:11222: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11223
11224         CFLAGS="$cf_old_cflag"
11225 done
11226
11227 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11228 while true
11229 do
11230         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'`
11231         test "$CPPFLAGS" != "$cf_old_cflag" || break
11232         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11233
11234 echo "${as_me:-configure}:11234: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11235
11236         CPPFLAGS="$cf_old_cflag"
11237 done
11238
11239                 ;;
11240         esac
11241
11242 cf_fix_cppflags=no
11243 cf_new_cflags=
11244 cf_new_cppflags=
11245 cf_new_extra_cppflags=
11246
11247 for cf_add_cflags in $cf_add_cflags
11248 do
11249 case "$cf_fix_cppflags" in
11250 (no)
11251         case "$cf_add_cflags" in
11252         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11253                 case "$cf_add_cflags" in
11254                 (-D*)
11255                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11256
11257                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11258                                 && test -z "${cf_tst_cflags}" \
11259                                 && cf_fix_cppflags=yes
11260
11261                         if test "$cf_fix_cppflags" = yes ; then
11262
11263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11265
11266                                 continue
11267                         elif test "${cf_tst_cflags}" = "\"'" ; then
11268
11269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11271
11272                                 continue
11273                         fi
11274                         ;;
11275                 esac
11276                 case "$CPPFLAGS" in
11277                 (*$cf_add_cflags)
11278                         ;;
11279                 (*)
11280                         case "$cf_add_cflags" in
11281                         (-D*)
11282                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11283
11284 CPPFLAGS=`echo "$CPPFLAGS" | \
11285         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11286                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11287
11288                                 ;;
11289                         esac
11290
11291         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11292         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11293
11294                         ;;
11295                 esac
11296                 ;;
11297         (*)
11298
11299         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11300         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11301
11302                 ;;
11303         esac
11304         ;;
11305 (yes)
11306
11307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11309
11310         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11311
11312         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11313                 && test -z "${cf_tst_cflags}" \
11314                 && cf_fix_cppflags=no
11315         ;;
11316 esac
11317 done
11318
11319 if test -n "$cf_new_cflags" ; then
11320         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11321
11322 echo "${as_me:-configure}:11322: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11323
11324         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11325         CFLAGS="${CFLAGS}$cf_new_cflags"
11326
11327 fi
11328
11329 if test -n "$cf_new_cppflags" ; then
11330         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11331
11332 echo "${as_me:-configure}:11332: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11333
11334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11335         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11336
11337 fi
11338
11339 if test -n "$cf_new_extra_cppflags" ; then
11340         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11341
11342 echo "${as_me:-configure}:11342: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11343
11344         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11345         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11346
11347 fi
11348
11349 done
11350
11351 fi
11352
11353 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11354         echo "$as_me:11354: checking if _XOPEN_SOURCE really is set" >&5
11355 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11356         cat >"conftest.$ac_ext" <<_ACEOF
11357 #line 11357 "configure"
11358 #include "confdefs.h"
11359 #include <stdlib.h>
11360 int
11361 main (void)
11362 {
11363
11364 #ifndef _XOPEN_SOURCE
11365 make an error
11366 #endif
11367   ;
11368   return 0;
11369 }
11370 _ACEOF
11371 rm -f "conftest.$ac_objext"
11372 if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5
11373   (eval $ac_compile) 2>&5
11374   ac_status=$?
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit "$ac_status"); } &&
11377          { ac_try='test -s "conftest.$ac_objext"'
11378   { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit "$ac_status"); }; }; then
11383   cf_XOPEN_SOURCE_set=yes
11384 else
11385   echo "$as_me: failed program was:" >&5
11386 cat "conftest.$ac_ext" >&5
11387 cf_XOPEN_SOURCE_set=no
11388 fi
11389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11390         echo "$as_me:11390: result: $cf_XOPEN_SOURCE_set" >&5
11391 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11392         if test "$cf_XOPEN_SOURCE_set" = yes
11393         then
11394                 cat >"conftest.$ac_ext" <<_ACEOF
11395 #line 11395 "configure"
11396 #include "confdefs.h"
11397 #include <stdlib.h>
11398 int
11399 main (void)
11400 {
11401
11402 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11403 make an error
11404 #endif
11405   ;
11406   return 0;
11407 }
11408 _ACEOF
11409 rm -f "conftest.$ac_objext"
11410 if { (eval echo "$as_me:11410: \"$ac_compile\"") >&5
11411   (eval $ac_compile) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit "$ac_status"); } &&
11415          { ac_try='test -s "conftest.$ac_objext"'
11416   { (eval echo "$as_me:11416: \"$ac_try\"") >&5
11417   (eval $ac_try) 2>&5
11418   ac_status=$?
11419   echo "$as_me:11419: \$? = $ac_status" >&5
11420   (exit "$ac_status"); }; }; then
11421   cf_XOPEN_SOURCE_set_ok=yes
11422 else
11423   echo "$as_me: failed program was:" >&5
11424 cat "conftest.$ac_ext" >&5
11425 cf_XOPEN_SOURCE_set_ok=no
11426 fi
11427 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11428                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11429                 then
11430                         { echo "$as_me:11430: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11431 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11432                 fi
11433         else
11434
11435 echo "$as_me:11435: checking if we should define _XOPEN_SOURCE" >&5
11436 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11437 if test "${cf_cv_xopen_source+set}" = set; then
11438   echo $ECHO_N "(cached) $ECHO_C" >&6
11439 else
11440
11441         cat >"conftest.$ac_ext" <<_ACEOF
11442 #line 11442 "configure"
11443 #include "confdefs.h"
11444
11445 #include <stdlib.h>
11446 #include <string.h>
11447 #include <sys/types.h>
11448
11449 int
11450 main (void)
11451 {
11452
11453 #ifndef _XOPEN_SOURCE
11454 make an error
11455 #endif
11456   ;
11457   return 0;
11458 }
11459 _ACEOF
11460 rm -f "conftest.$ac_objext"
11461 if { (eval echo "$as_me:11461: \"$ac_compile\"") >&5
11462   (eval $ac_compile) 2>&5
11463   ac_status=$?
11464   echo "$as_me:11464: \$? = $ac_status" >&5
11465   (exit "$ac_status"); } &&
11466          { ac_try='test -s "conftest.$ac_objext"'
11467   { (eval echo "$as_me:11467: \"$ac_try\"") >&5
11468   (eval $ac_try) 2>&5
11469   ac_status=$?
11470   echo "$as_me:11470: \$? = $ac_status" >&5
11471   (exit "$ac_status"); }; }; then
11472   cf_cv_xopen_source=no
11473 else
11474   echo "$as_me: failed program was:" >&5
11475 cat "conftest.$ac_ext" >&5
11476 cf_save="$CPPFLAGS"
11477
11478         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11479         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11480
11481          cat >"conftest.$ac_ext" <<_ACEOF
11482 #line 11482 "configure"
11483 #include "confdefs.h"
11484
11485 #include <stdlib.h>
11486 #include <string.h>
11487 #include <sys/types.h>
11488
11489 int
11490 main (void)
11491 {
11492
11493 #ifdef _XOPEN_SOURCE
11494 make an error
11495 #endif
11496   ;
11497   return 0;
11498 }
11499 _ACEOF
11500 rm -f "conftest.$ac_objext"
11501 if { (eval echo "$as_me:11501: \"$ac_compile\"") >&5
11502   (eval $ac_compile) 2>&5
11503   ac_status=$?
11504   echo "$as_me:11504: \$? = $ac_status" >&5
11505   (exit "$ac_status"); } &&
11506          { ac_try='test -s "conftest.$ac_objext"'
11507   { (eval echo "$as_me:11507: \"$ac_try\"") >&5
11508   (eval $ac_try) 2>&5
11509   ac_status=$?
11510   echo "$as_me:11510: \$? = $ac_status" >&5
11511   (exit "$ac_status"); }; }; then
11512   cf_cv_xopen_source=no
11513 else
11514   echo "$as_me: failed program was:" >&5
11515 cat "conftest.$ac_ext" >&5
11516 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11517 fi
11518 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11519         CPPFLAGS="$cf_save"
11520
11521 fi
11522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11523
11524 fi
11525 echo "$as_me:11525: result: $cf_cv_xopen_source" >&5
11526 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11527
11528 if test "$cf_cv_xopen_source" != no ; then
11529
11530 CFLAGS=`echo "$CFLAGS" | \
11531         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11532                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11533
11534 CPPFLAGS=`echo "$CPPFLAGS" | \
11535         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11536                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11537
11538         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11539
11540 for cf_add_cflags in $cf_temp_xopen_source
11541 do
11542         case "x$cf_add_cflags" in
11543         (x-[DU]*)
11544
11545 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11546 while true
11547 do
11548         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'`
11549         test "$CFLAGS" != "$cf_old_cflag" || break
11550
11551         CFLAGS="$cf_old_cflag"
11552 done
11553
11554 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11555 while true
11556 do
11557         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'`
11558         test "$CPPFLAGS" != "$cf_old_cflag" || break
11559
11560         CPPFLAGS="$cf_old_cflag"
11561 done
11562
11563                 ;;
11564         esac
11565
11566 cf_fix_cppflags=no
11567 cf_new_cflags=
11568 cf_new_cppflags=
11569 cf_new_extra_cppflags=
11570
11571 for cf_add_cflags in $cf_add_cflags
11572 do
11573 case "$cf_fix_cppflags" in
11574 (no)
11575         case "$cf_add_cflags" in
11576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11577                 case "$cf_add_cflags" in
11578                 (-D*)
11579                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11580
11581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11582                                 && test -z "${cf_tst_cflags}" \
11583                                 && cf_fix_cppflags=yes
11584
11585                         if test "$cf_fix_cppflags" = yes ; then
11586
11587         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11588         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11589
11590                                 continue
11591                         elif test "${cf_tst_cflags}" = "\"'" ; then
11592
11593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11595
11596                                 continue
11597                         fi
11598                         ;;
11599                 esac
11600                 case "$CPPFLAGS" in
11601                 (*$cf_add_cflags)
11602                         ;;
11603                 (*)
11604                         case "$cf_add_cflags" in
11605                         (-D*)
11606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11607
11608 CPPFLAGS=`echo "$CPPFLAGS" | \
11609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11611
11612                                 ;;
11613                         esac
11614
11615         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11616         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11617
11618                         ;;
11619                 esac
11620                 ;;
11621         (*)
11622
11623         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11624         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11625
11626                 ;;
11627         esac
11628         ;;
11629 (yes)
11630
11631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11633
11634         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11635
11636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11637                 && test -z "${cf_tst_cflags}" \
11638                 && cf_fix_cppflags=no
11639         ;;
11640 esac
11641 done
11642
11643 if test -n "$cf_new_cflags" ; then
11644
11645         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11646         CFLAGS="${CFLAGS}$cf_new_cflags"
11647
11648 fi
11649
11650 if test -n "$cf_new_cppflags" ; then
11651
11652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11653         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11654
11655 fi
11656
11657 if test -n "$cf_new_extra_cppflags" ; then
11658
11659         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11660         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11661
11662 fi
11663
11664 done
11665
11666 fi
11667
11668         fi
11669 fi
11670 fi # cf_cv_posix_visible
11671
11672 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11673
11674 # Work around breakage on OS X
11675
11676 echo "$as_me:11676: checking if SIGWINCH is defined" >&5
11677 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11678 if test "${cf_cv_define_sigwinch+set}" = set; then
11679   echo $ECHO_N "(cached) $ECHO_C" >&6
11680 else
11681
11682         cat >"conftest.$ac_ext" <<_ACEOF
11683 #line 11683 "configure"
11684 #include "confdefs.h"
11685
11686 #include <sys/types.h>
11687 #include <sys/signal.h>
11688
11689 int
11690 main (void)
11691 {
11692 int x = SIGWINCH; (void)x
11693   ;
11694   return 0;
11695 }
11696 _ACEOF
11697 rm -f "conftest.$ac_objext"
11698 if { (eval echo "$as_me:11698: \"$ac_compile\"") >&5
11699   (eval $ac_compile) 2>&5
11700   ac_status=$?
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit "$ac_status"); } &&
11703          { ac_try='test -s "conftest.$ac_objext"'
11704   { (eval echo "$as_me:11704: \"$ac_try\"") >&5
11705   (eval $ac_try) 2>&5
11706   ac_status=$?
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit "$ac_status"); }; }; then
11709   cf_cv_define_sigwinch=yes
11710 else
11711   echo "$as_me: failed program was:" >&5
11712 cat "conftest.$ac_ext" >&5
11713 cat >"conftest.$ac_ext" <<_ACEOF
11714 #line 11714 "configure"
11715 #include "confdefs.h"
11716
11717 #undef _XOPEN_SOURCE
11718 #undef _POSIX_SOURCE
11719 #undef _POSIX_C_SOURCE
11720 #include <sys/types.h>
11721 #include <sys/signal.h>
11722
11723 int
11724 main (void)
11725 {
11726 int x = SIGWINCH; (void)x
11727   ;
11728   return 0;
11729 }
11730 _ACEOF
11731 rm -f "conftest.$ac_objext"
11732 if { (eval echo "$as_me:11732: \"$ac_compile\"") >&5
11733   (eval $ac_compile) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit "$ac_status"); } &&
11737          { ac_try='test -s "conftest.$ac_objext"'
11738   { (eval echo "$as_me:11738: \"$ac_try\"") >&5
11739   (eval $ac_try) 2>&5
11740   ac_status=$?
11741   echo "$as_me:11741: \$? = $ac_status" >&5
11742   (exit "$ac_status"); }; }; then
11743   cf_cv_define_sigwinch=maybe
11744 else
11745   echo "$as_me: failed program was:" >&5
11746 cat "conftest.$ac_ext" >&5
11747 cf_cv_define_sigwinch=no
11748 fi
11749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11750
11751 fi
11752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11753
11754 fi
11755 echo "$as_me:11755: result: $cf_cv_define_sigwinch" >&5
11756 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11757
11758 if test "$cf_cv_define_sigwinch" = maybe ; then
11759 echo "$as_me:11759: checking for actual SIGWINCH definition" >&5
11760 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11761 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11762   echo $ECHO_N "(cached) $ECHO_C" >&6
11763 else
11764
11765 cf_cv_fixup_sigwinch=unknown
11766 cf_sigwinch=32
11767 while test "$cf_sigwinch" != 1
11768 do
11769         cat >"conftest.$ac_ext" <<_ACEOF
11770 #line 11770 "configure"
11771 #include "confdefs.h"
11772
11773 #undef _XOPEN_SOURCE
11774 #undef _POSIX_SOURCE
11775 #undef _POSIX_C_SOURCE
11776 #include <sys/types.h>
11777 #include <sys/signal.h>
11778
11779 int
11780 main (void)
11781 {
11782
11783 #if SIGWINCH != $cf_sigwinch
11784 make an error
11785 #endif
11786 int x = SIGWINCH; (void)x
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 rm -f "conftest.$ac_objext"
11792 if { (eval echo "$as_me:11792: \"$ac_compile\"") >&5
11793   (eval $ac_compile) 2>&5
11794   ac_status=$?
11795   echo "$as_me:11795: \$? = $ac_status" >&5
11796   (exit "$ac_status"); } &&
11797          { ac_try='test -s "conftest.$ac_objext"'
11798   { (eval echo "$as_me:11798: \"$ac_try\"") >&5
11799   (eval $ac_try) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit "$ac_status"); }; }; then
11803   cf_cv_fixup_sigwinch=$cf_sigwinch
11804          break
11805 else
11806   echo "$as_me: failed program was:" >&5
11807 cat "conftest.$ac_ext" >&5
11808 fi
11809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11810
11811 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11812 done
11813
11814 fi
11815 echo "$as_me:11815: result: $cf_cv_fixup_sigwinch" >&5
11816 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11817
11818         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11819                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11820         fi
11821 fi
11822
11823 # Checks for CODESET support.
11824
11825 echo "$as_me:11825: checking for nl_langinfo and CODESET" >&5
11826 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11827 if test "${am_cv_langinfo_codeset+set}" = set; then
11828   echo $ECHO_N "(cached) $ECHO_C" >&6
11829 else
11830   cat >"conftest.$ac_ext" <<_ACEOF
11831 #line 11831 "configure"
11832 #include "confdefs.h"
11833 #include <langinfo.h>
11834 int
11835 main (void)
11836 {
11837 char* cs = nl_langinfo(CODESET); (void)cs
11838   ;
11839   return 0;
11840 }
11841 _ACEOF
11842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11843 if { (eval echo "$as_me:11843: \"$ac_link\"") >&5
11844   (eval $ac_link) 2>&5
11845   ac_status=$?
11846   echo "$as_me:11846: \$? = $ac_status" >&5
11847   (exit "$ac_status"); } &&
11848          { ac_try='test -s "conftest$ac_exeext"'
11849   { (eval echo "$as_me:11849: \"$ac_try\"") >&5
11850   (eval $ac_try) 2>&5
11851   ac_status=$?
11852   echo "$as_me:11852: \$? = $ac_status" >&5
11853   (exit "$ac_status"); }; }; then
11854   am_cv_langinfo_codeset=yes
11855 else
11856   echo "$as_me: failed program was:" >&5
11857 cat "conftest.$ac_ext" >&5
11858 am_cv_langinfo_codeset=no
11859 fi
11860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11861
11862 fi
11863 echo "$as_me:11863: result: $am_cv_langinfo_codeset" >&5
11864 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11865         if test "$am_cv_langinfo_codeset" = yes; then
11866
11867 cat >>confdefs.h <<\EOF
11868 #define HAVE_LANGINFO_CODESET 1
11869 EOF
11870
11871         fi
11872
11873 # use these variables to work around a defect in gcc's fixincludes.
11874 NCURSES_OK_WCHAR_T=
11875 NCURSES_OK_WINT_T=
11876
11877 echo "$as_me:11877: checking if you want wide-character code" >&5
11878 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11879
11880 # Check whether --enable-widec or --disable-widec was given.
11881 if test "${enable_widec+set}" = set; then
11882   enableval="$enable_widec"
11883   with_widec=$enableval
11884 else
11885   with_widec=no
11886 fi;
11887 echo "$as_me:11887: result: $with_widec" >&5
11888 echo "${ECHO_T}$with_widec" >&6
11889
11890 NCURSES_WCWIDTH_GRAPHICS=1
11891
11892 if test "x$with_widec" = xyes ; then
11893         if test "x$disable_lib_suffixes" = xno ; then
11894                 LIB_SUFFIX="w${LIB_SUFFIX}"
11895         fi
11896
11897 cat >>confdefs.h <<\EOF
11898 #define USE_WIDEC_SUPPORT 1
11899 EOF
11900
11901 cat >>confdefs.h <<\EOF
11902 #define NCURSES_WIDECHAR 1
11903 EOF
11904
11905 for ac_header in \
11906 wchar.h \
11907 wctype.h \
11908
11909 do
11910 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11911 echo "$as_me:11911: checking for $ac_header" >&5
11912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11913 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11914   echo $ECHO_N "(cached) $ECHO_C" >&6
11915 else
11916   cat >"conftest.$ac_ext" <<_ACEOF
11917 #line 11917 "configure"
11918 #include "confdefs.h"
11919 #include <$ac_header>
11920 _ACEOF
11921 if { (eval echo "$as_me:11921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11922   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11923   ac_status=$?
11924   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11925   rm -f conftest.er1
11926   cat conftest.err >&5
11927   echo "$as_me:11927: \$? = $ac_status" >&5
11928   (exit "$ac_status"); } >/dev/null; then
11929   if test -s conftest.err; then
11930     ac_cpp_err=$ac_c_preproc_warn_flag
11931   else
11932     ac_cpp_err=
11933   fi
11934 else
11935   ac_cpp_err=yes
11936 fi
11937 if test -z "$ac_cpp_err"; then
11938   eval "$as_ac_Header=yes"
11939 else
11940   echo "$as_me: failed program was:" >&5
11941   cat "conftest.$ac_ext" >&5
11942   eval "$as_ac_Header=no"
11943 fi
11944 rm -f conftest.err "conftest.$ac_ext"
11945 fi
11946 echo "$as_me:11946: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11947 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11948 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11949   cat >>confdefs.h <<EOF
11950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11951 EOF
11952
11953 fi
11954 done
11955
11956 echo "$as_me:11956: checking if wchar.h can be used as is" >&5
11957 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11958 if test "${cf_cv_wchar_h_okay+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961
11962 cat >"conftest.$ac_ext" <<_ACEOF
11963 #line 11963 "configure"
11964 #include "confdefs.h"
11965
11966 #include <stdlib.h>
11967 #ifdef HAVE_WCHAR_H
11968 #include <wchar.h>
11969 #endif
11970 #ifdef HAVE_WCTYPE_H
11971 #include <wctype.h>
11972 #endif
11973
11974 int
11975 main (void)
11976 {
11977
11978         wint_t foo = 0;
11979         int bar = iswpunct(foo)
11980   ;
11981   return 0;
11982 }
11983 _ACEOF
11984 rm -f "conftest.$ac_objext"
11985 if { (eval echo "$as_me:11985: \"$ac_compile\"") >&5
11986   (eval $ac_compile) 2>&5
11987   ac_status=$?
11988   echo "$as_me:11988: \$? = $ac_status" >&5
11989   (exit "$ac_status"); } &&
11990          { ac_try='test -s "conftest.$ac_objext"'
11991   { (eval echo "$as_me:11991: \"$ac_try\"") >&5
11992   (eval $ac_try) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit "$ac_status"); }; }; then
11996   cf_cv_wchar_h_okay=yes
11997 else
11998   echo "$as_me: failed program was:" >&5
11999 cat "conftest.$ac_ext" >&5
12000 cf_cv_wchar_h_okay=no
12001 fi
12002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12003 fi
12004 echo "$as_me:12004: result: $cf_cv_wchar_h_okay" >&5
12005 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12006
12007 if test "$cf_cv_wchar_h_okay" = no
12008 then
12009
12010 echo "$as_me:12010: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12011 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12012 cat >"conftest.$ac_ext" <<_ACEOF
12013 #line 12013 "configure"
12014 #include "confdefs.h"
12015 #include <sys/types.h>
12016
12017 int
12018 main (void)
12019 {
12020
12021 #ifndef _XOPEN_SOURCE_EXTENDED
12022 make an error
12023 #endif
12024   ;
12025   return 0;
12026 }
12027 _ACEOF
12028 rm -f "conftest.$ac_objext"
12029 if { (eval echo "$as_me:12029: \"$ac_compile\"") >&5
12030   (eval $ac_compile) 2>&5
12031   ac_status=$?
12032   echo "$as_me:12032: \$? = $ac_status" >&5
12033   (exit "$ac_status"); } &&
12034          { ac_try='test -s "conftest.$ac_objext"'
12035   { (eval echo "$as_me:12035: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit "$ac_status"); }; }; then
12040   cf_result=no
12041 else
12042   echo "$as_me: failed program was:" >&5
12043 cat "conftest.$ac_ext" >&5
12044 cf_result=yes
12045 fi
12046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12047 echo "$as_me:12047: result: $cf_result" >&5
12048 echo "${ECHO_T}$cf_result" >&6
12049
12050 if test "$cf_result" = yes ; then
12051         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12052 elif test "x" != "x" ; then
12053         echo "$as_me:12053: checking checking for compatible value versus " >&5
12054 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12055         cat >"conftest.$ac_ext" <<_ACEOF
12056 #line 12056 "configure"
12057 #include "confdefs.h"
12058 #include <sys/types.h>
12059
12060 int
12061 main (void)
12062 {
12063
12064 #if _XOPEN_SOURCE_EXTENDED- < 0
12065 make an error
12066 #endif
12067   ;
12068   return 0;
12069 }
12070 _ACEOF
12071 rm -f "conftest.$ac_objext"
12072 if { (eval echo "$as_me:12072: \"$ac_compile\"") >&5
12073   (eval $ac_compile) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit "$ac_status"); } &&
12077          { ac_try='test -s "conftest.$ac_objext"'
12078   { (eval echo "$as_me:12078: \"$ac_try\"") >&5
12079   (eval $ac_try) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit "$ac_status"); }; }; then
12083   cf_result=yes
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 cat "conftest.$ac_ext" >&5
12087 cf_result=no
12088 fi
12089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12090         echo "$as_me:12090: result: $cf_result" >&5
12091 echo "${ECHO_T}$cf_result" >&6
12092         if test "$cf_result" = no ; then
12093                 # perhaps we can override it - try...
12094                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12095         fi
12096 fi
12097
12098 fi
12099
12100 echo "$as_me:12100: checking if wcwidth agrees graphics are single-width" >&5
12101 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12102 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12103   echo $ECHO_N "(cached) $ECHO_C" >&6
12104 else
12105
12106 cat >conftest.in <<CF_EOF
12107 -       VT100 symbols
12108 0x250c  upper left corner
12109 0x2514  lower left corner
12110 0x2510  upper right corner
12111 0x2518  lower right corner
12112 0x251c  tee pointing left
12113 0x2524  tee pointing right
12114 0x2534  tee pointing up
12115 0x252c  tee pointing down
12116 0x2500  horizontal line
12117 0x2502  vertical line
12118 0x253c  large plus or crossover
12119 0x23ba  scan line 1
12120 0x23bd  scan line 9
12121 0x25c6  diamond
12122 0x2592  checker board (stipple)
12123 0x00b0  degree symbol
12124 0x00b1  plus/minus
12125 0x00b7  bullet
12126 -       Teletype 5410v1 symbols
12127 0x2190  arrow pointing left
12128 0x2192  arrow pointing right
12129 0x2193  arrow pointing down
12130 0x2191  arrow pointing up
12131 0x2592  board of squares
12132 0x2603  lantern symbol
12133 0x25ae  solid square block
12134 -       these defaults were invented for ncurses
12135 0x23bb  scan line 3
12136 0x23bc  scan line 7
12137 0x2264  less-than-or-equal-to
12138 0x2265  greater-than-or-equal-to
12139 0x03c0  greek pi
12140 0x2260  not-equal
12141 0x00a3  pound-sterling symbol
12142 -       thick-line-drawing
12143 0x250f  upper left corner
12144 0x2517  lower left corner
12145 0x2513  upper right corner
12146 0x251b  lower right corner
12147 0x2523  tee pointing left
12148 0x252b  tee pointing right
12149 0x253b  tee pointing up
12150 0x2533  tee pointing down
12151 0x2501  horizontal line
12152 0x2503  vertical line
12153 0x254b  large plus or crossover
12154 -       double-line-drawing
12155 0x2554  upper left corner
12156 0x255a  lower left corner
12157 0x2557  upper right corner
12158 0x255d  lower right corner
12159 0x2563  tee pointing left
12160 0x2560  tee pointing right
12161 0x2569  tee pointing up
12162 0x2566  tee pointing down
12163 0x2550  horizontal line
12164 0x2551  vertical line
12165 0x256c  large plus or crossover
12166 CF_EOF
12167 if test "$cross_compiling" = yes; then
12168   cf_cv_wcwidth_graphics=unknown
12169 else
12170   cat >"conftest.$ac_ext" <<_ACEOF
12171 #line 12171 "configure"
12172 #include "confdefs.h"
12173
12174 #include <locale.h>
12175 #include <stdio.h>
12176 #include <wchar.h>
12177
12178 #define MY_LEN 80
12179
12180 int
12181 main(void)
12182 {
12183         FILE *fp;
12184         int value;
12185         char buffer[MY_LEN + 1];
12186         char notes[MY_LEN + 1];
12187         int totals = 0;
12188         int passed = 0;
12189
12190         if (setlocale(LC_ALL, "en_US.UTF8") ||
12191                 setlocale(LC_ALL, "en_US.UTF-8") ||
12192                 setlocale(LC_ALL, "en_US.utf8") ||
12193                 setlocale(LC_ALL, "en_US.utf-8")) {
12194                 if ((fp = fopen("conftest.in", "r")) != 0) {
12195                         while (fgets(buffer, MY_LEN, fp) != 0) {
12196                                 if (*buffer == '-') {
12197                                         fprintf(stderr, "\\t%s", buffer);
12198                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12199                                         ++totals;
12200                                         if (wcwidth(value) == 1)
12201                                                 ++passed;
12202                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12203                                 } else {
12204                                         fprintf(stderr, "?\\t%s", buffer);
12205                                 }
12206                         }
12207                 }
12208         }
12209         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12210         return (totals == passed) ? 0 : 1;
12211 }
12212
12213 _ACEOF
12214 rm -f "conftest$ac_exeext"
12215 if { (eval echo "$as_me:12215: \"$ac_link\"") >&5
12216   (eval $ac_link) 2>&5
12217   ac_status=$?
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12220   { (eval echo "$as_me:12220: \"$ac_try\"") >&5
12221   (eval $ac_try) 2>&5
12222   ac_status=$?
12223   echo "$as_me:12223: \$? = $ac_status" >&5
12224   (exit "$ac_status"); }; }; then
12225   cf_cv_wcwidth_graphics=yes
12226 else
12227   echo "$as_me: program exited with status $ac_status" >&5
12228 echo "$as_me: failed program was:" >&5
12229 cat "conftest.$ac_ext" >&5
12230 cf_cv_wcwidth_graphics=no
12231 fi
12232 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12233 fi
12234
12235 fi
12236 echo "$as_me:12236: result: $cf_cv_wcwidth_graphics" >&5
12237 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12238
12239         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12240
12241         # with_overwrite=no
12242         NCURSES_CH_T=cchar_t
12243
12244 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12245 do
12246 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12247 echo "$as_me:12247: checking for $ac_func" >&5
12248 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12249 if eval "test \"\${$as_ac_var+set}\" = set"; then
12250   echo $ECHO_N "(cached) $ECHO_C" >&6
12251 else
12252   cat >"conftest.$ac_ext" <<_ACEOF
12253 #line 12253 "configure"
12254 #include "confdefs.h"
12255 #define $ac_func autoconf_temporary
12256 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12257 #undef $ac_func
12258
12259 #ifdef __cplusplus
12260 extern "C"
12261 #endif
12262
12263 /* We use char because int might match the return type of a gcc2
12264    builtin and then its argument prototype would still apply.  */
12265 char $ac_func (void);
12266
12267 int
12268 main (void)
12269 {
12270
12271 /* The GNU C library defines stubs for functions which it implements
12272     to always fail with ENOSYS.  Some functions are actually named
12273     something starting with __ and the normal name is an alias.  */
12274 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12275 #error found stub for $ac_func
12276 #endif
12277
12278         return $ac_func ();
12279   ;
12280   return 0;
12281 }
12282 _ACEOF
12283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12284 if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
12285   (eval $ac_link) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit "$ac_status"); } &&
12289          { ac_try='test -s "conftest$ac_exeext"'
12290   { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291   (eval $ac_try) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit "$ac_status"); }; }; then
12295   eval "$as_ac_var=yes"
12296 else
12297   echo "$as_me: failed program was:" >&5
12298 cat "conftest.$ac_ext" >&5
12299 eval "$as_ac_var=no"
12300 fi
12301 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12302 fi
12303 echo "$as_me:12303: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12304 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12305 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12306   cat >>confdefs.h <<EOF
12307 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12308 EOF
12309
12310 fi
12311 done
12312
12313         if test "x$ac_cv_func_putwc" != xyes ; then
12314
12315 for ac_header in wchar.h
12316 do
12317 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12318 echo "$as_me:12318: checking for $ac_header" >&5
12319 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12320 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12321   echo $ECHO_N "(cached) $ECHO_C" >&6
12322 else
12323   cat >"conftest.$ac_ext" <<_ACEOF
12324 #line 12324 "configure"
12325 #include "confdefs.h"
12326 #include <$ac_header>
12327 _ACEOF
12328 if { (eval echo "$as_me:12328: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12329   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12330   ac_status=$?
12331   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12332   rm -f conftest.er1
12333   cat conftest.err >&5
12334   echo "$as_me:12334: \$? = $ac_status" >&5
12335   (exit "$ac_status"); } >/dev/null; then
12336   if test -s conftest.err; then
12337     ac_cpp_err=$ac_c_preproc_warn_flag
12338   else
12339     ac_cpp_err=
12340   fi
12341 else
12342   ac_cpp_err=yes
12343 fi
12344 if test -z "$ac_cpp_err"; then
12345   eval "$as_ac_Header=yes"
12346 else
12347   echo "$as_me: failed program was:" >&5
12348   cat "conftest.$ac_ext" >&5
12349   eval "$as_ac_Header=no"
12350 fi
12351 rm -f conftest.err "conftest.$ac_ext"
12352 fi
12353 echo "$as_me:12353: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12354 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12355 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12356   cat >>confdefs.h <<EOF
12357 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12358 EOF
12359
12360 fi
12361 done
12362
12363 echo "$as_me:12363: checking for multibyte character support" >&5
12364 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12365 if test "${cf_cv_utf8_lib+set}" = set; then
12366   echo $ECHO_N "(cached) $ECHO_C" >&6
12367 else
12368
12369         cf_save_LIBS="$LIBS"
12370         cat >"conftest.$ac_ext" <<_ACEOF
12371 #line 12371 "configure"
12372 #include "confdefs.h"
12373
12374 #include <stdlib.h>
12375 #include <stdio.h>
12376 #ifdef HAVE_WCHAR_H
12377 #include <wchar.h>
12378 #endif
12379
12380 int
12381 main (void)
12382 {
12383 putwc(0,0);
12384   ;
12385   return 0;
12386 }
12387 _ACEOF
12388 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12389 if { (eval echo "$as_me:12389: \"$ac_link\"") >&5
12390   (eval $ac_link) 2>&5
12391   ac_status=$?
12392   echo "$as_me:12392: \$? = $ac_status" >&5
12393   (exit "$ac_status"); } &&
12394          { ac_try='test -s "conftest$ac_exeext"'
12395   { (eval echo "$as_me:12395: \"$ac_try\"") >&5
12396   (eval $ac_try) 2>&5
12397   ac_status=$?
12398   echo "$as_me:12398: \$? = $ac_status" >&5
12399   (exit "$ac_status"); }; }; then
12400   cf_cv_utf8_lib=yes
12401 else
12402   echo "$as_me: failed program was:" >&5
12403 cat "conftest.$ac_ext" >&5
12404
12405 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12406 # will be set on completion of the AC_TRY_LINK below.
12407 cf_cv_header_path_utf8=
12408 cf_cv_library_path_utf8=
12409
12410 echo "${as_me:-configure}:12410: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12411
12412 cf_save_LIBS="$LIBS"
12413
12414 cat >"conftest.$ac_ext" <<_ACEOF
12415 #line 12415 "configure"
12416 #include "confdefs.h"
12417
12418 #include <libutf8.h>
12419 int
12420 main (void)
12421 {
12422 putwc(0,0);
12423   ;
12424   return 0;
12425 }
12426 _ACEOF
12427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12428 if { (eval echo "$as_me:12428: \"$ac_link\"") >&5
12429   (eval $ac_link) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit "$ac_status"); } &&
12433          { ac_try='test -s "conftest$ac_exeext"'
12434   { (eval echo "$as_me:12434: \"$ac_try\"") >&5
12435   (eval $ac_try) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit "$ac_status"); }; }; then
12439
12440         cf_cv_find_linkage_utf8=yes
12441         cf_cv_header_path_utf8=/usr/include
12442         cf_cv_library_path_utf8=/usr/lib
12443
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 cat "conftest.$ac_ext" >&5
12447
12448 LIBS="-lutf8  $cf_save_LIBS"
12449
12450 cat >"conftest.$ac_ext" <<_ACEOF
12451 #line 12451 "configure"
12452 #include "confdefs.h"
12453
12454 #include <libutf8.h>
12455 int
12456 main (void)
12457 {
12458 putwc(0,0);
12459   ;
12460   return 0;
12461 }
12462 _ACEOF
12463 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12464 if { (eval echo "$as_me:12464: \"$ac_link\"") >&5
12465   (eval $ac_link) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit "$ac_status"); } &&
12469          { ac_try='test -s "conftest$ac_exeext"'
12470   { (eval echo "$as_me:12470: \"$ac_try\"") >&5
12471   (eval $ac_try) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit "$ac_status"); }; }; then
12475
12476         cf_cv_find_linkage_utf8=yes
12477         cf_cv_header_path_utf8=/usr/include
12478         cf_cv_library_path_utf8=/usr/lib
12479         cf_cv_library_file_utf8="-lutf8"
12480
12481 else
12482   echo "$as_me: failed program was:" >&5
12483 cat "conftest.$ac_ext" >&5
12484
12485         cf_cv_find_linkage_utf8=no
12486         LIBS="$cf_save_LIBS"
12487
12488         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12489
12490 echo "${as_me:-configure}:12490: testing find linkage for utf8 library ..." 1>&5
12491
12492 echo "${as_me:-configure}:12492: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12493
12494         cf_save_CPPFLAGS="$CPPFLAGS"
12495         cf_test_CPPFLAGS="$CPPFLAGS"
12496
12497 cf_search=
12498
12499 # collect the current set of include-directories from compiler flags
12500 cf_header_path_list=""
12501 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12502         for cf_header_path in $CPPFLAGS $CFLAGS
12503         do
12504                 case "$cf_header_path" in
12505                 (-I*)
12506                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12507
12508 test "x$cf_header_path" != "xNONE" && \
12509 test -d "$cf_header_path" && \
12510  {
12511         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12512         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12513         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12514         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12515         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12516         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12517 }
12518
12519                         cf_header_path_list="$cf_header_path_list $cf_search"
12520                         ;;
12521                 esac
12522         done
12523 fi
12524
12525 # add the variations for the package we are looking for
12526
12527 cf_search=
12528
12529 test "x$prefix" != "xNONE" && \
12530 test -d "$prefix" && \
12531  {
12532         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12533         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12534         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12535         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12536         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12537         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12538 }
12539
12540 for cf_subdir_prefix in \
12541         /usr \
12542         /usr/local \
12543         /usr/pkg \
12544         /opt \
12545         /opt/local \
12546         $HOME
12547 do
12548
12549 test "x$cf_subdir_prefix" != "x$prefix" && \
12550 test -d "$cf_subdir_prefix" && \
12551 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12552         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12553         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12554         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12555         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12556         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12557         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12558 }
12559
12560 done
12561
12562 test "$includedir" != NONE && \
12563 test "$includedir" != "/usr/include" && \
12564 test -d "$includedir" && {
12565         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12566         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12567 }
12568
12569 test "$oldincludedir" != NONE && \
12570 test "$oldincludedir" != "/usr/include" && \
12571 test -d "$oldincludedir" && {
12572         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12573         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12574 }
12575
12576 cf_search="$cf_search $cf_header_path_list"
12577
12578         for cf_cv_header_path_utf8 in $cf_search
12579         do
12580                 if test -d "$cf_cv_header_path_utf8" ; then
12581                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12582
12583 echo "${as_me:-configure}:12583: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12584
12585                         CPPFLAGS="$cf_save_CPPFLAGS"
12586
12587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12588         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12589
12590                         cat >"conftest.$ac_ext" <<_ACEOF
12591 #line 12591 "configure"
12592 #include "confdefs.h"
12593
12594 #include <libutf8.h>
12595 int
12596 main (void)
12597 {
12598 putwc(0,0);
12599   ;
12600   return 0;
12601 }
12602 _ACEOF
12603 rm -f "conftest.$ac_objext"
12604 if { (eval echo "$as_me:12604: \"$ac_compile\"") >&5
12605   (eval $ac_compile) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit "$ac_status"); } &&
12609          { ac_try='test -s "conftest.$ac_objext"'
12610   { (eval echo "$as_me:12610: \"$ac_try\"") >&5
12611   (eval $ac_try) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit "$ac_status"); }; }; then
12615
12616                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12617
12618 echo "${as_me:-configure}:12618: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12619
12620                                 cf_cv_find_linkage_utf8=maybe
12621                                 cf_test_CPPFLAGS="$CPPFLAGS"
12622                                 break
12623 else
12624   echo "$as_me: failed program was:" >&5
12625 cat "conftest.$ac_ext" >&5
12626
12627                                 CPPFLAGS="$cf_save_CPPFLAGS"
12628
12629 fi
12630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12631                 fi
12632         done
12633
12634         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12635
12636 echo "${as_me:-configure}:12636: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12637
12638                 cf_save_LIBS="$LIBS"
12639                 cf_save_LDFLAGS="$LDFLAGS"
12640
12641                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12642
12643 cf_search=
12644 cf_library_path_list=""
12645 if test -n "${LDFLAGS}${LIBS}" ; then
12646         for cf_library_path in $LDFLAGS $LIBS
12647         do
12648                 case "$cf_library_path" in
12649                 (-L*)
12650                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12651
12652 test "x$cf_library_path" != "xNONE" && \
12653 test -d "$cf_library_path" && \
12654  {
12655         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12656         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12657         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12658         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12659         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12660         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12661 }
12662
12663                         cf_library_path_list="$cf_library_path_list $cf_search"
12664                         ;;
12665                 esac
12666         done
12667 fi
12668
12669 cf_search=
12670
12671 test "x$prefix" != "xNONE" && \
12672 test -d "$prefix" && \
12673  {
12674         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12675         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12676         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12677         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12678         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12679         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12680 }
12681
12682 for cf_subdir_prefix in \
12683         /usr \
12684         /usr/local \
12685         /usr/pkg \
12686         /opt \
12687         /opt/local \
12688         $HOME
12689 do
12690
12691 test "x$cf_subdir_prefix" != "x$prefix" && \
12692 test -d "$cf_subdir_prefix" && \
12693 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12694         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12695         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12696         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12697         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12698         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12699         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12700 }
12701
12702 done
12703
12704 cf_search="$cf_library_path_list $cf_search"
12705
12706                         for cf_cv_library_path_utf8 in $cf_search
12707                         do
12708                                 if test -d "$cf_cv_library_path_utf8" ; then
12709                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12710
12711 echo "${as_me:-configure}:12711: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12712
12713                                         CPPFLAGS="$cf_test_CPPFLAGS"
12714                                         LIBS="-lutf8  $cf_save_LIBS"
12715                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12716                                         cat >"conftest.$ac_ext" <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719
12720 #include <libutf8.h>
12721 int
12722 main (void)
12723 {
12724 putwc(0,0);
12725   ;
12726   return 0;
12727 }
12728 _ACEOF
12729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12730 if { (eval echo "$as_me:12730: \"$ac_link\"") >&5
12731   (eval $ac_link) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit "$ac_status"); } &&
12735          { ac_try='test -s "conftest$ac_exeext"'
12736   { (eval echo "$as_me:12736: \"$ac_try\"") >&5
12737   (eval $ac_try) 2>&5
12738   ac_status=$?
12739   echo "$as_me:12739: \$? = $ac_status" >&5
12740   (exit "$ac_status"); }; }; then
12741
12742                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12743
12744 echo "${as_me:-configure}:12744: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12745
12746                                         cf_cv_find_linkage_utf8=yes
12747                                         cf_cv_library_file_utf8="-lutf8"
12748                                         break
12749 else
12750   echo "$as_me: failed program was:" >&5
12751 cat "conftest.$ac_ext" >&5
12752
12753                                         CPPFLAGS="$cf_save_CPPFLAGS"
12754                                         LIBS="$cf_save_LIBS"
12755                                         LDFLAGS="$cf_save_LDFLAGS"
12756
12757 fi
12758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12759                                 fi
12760                         done
12761                         CPPFLAGS="$cf_save_CPPFLAGS"
12762                         LDFLAGS="$cf_save_LDFLAGS"
12763                 fi
12764
12765         else
12766                 cf_cv_find_linkage_utf8=no
12767         fi
12768
12769 fi
12770 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12771
12772 fi
12773 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12774
12775 LIBS="$cf_save_LIBS"
12776
12777 if test "$cf_cv_find_linkage_utf8" = yes ; then
12778 cf_cv_utf8_lib=add-on
12779 else
12780 cf_cv_utf8_lib=no
12781 fi
12782
12783 fi
12784 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12785 fi
12786 echo "$as_me:12786: result: $cf_cv_utf8_lib" >&5
12787 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12788
12789 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12790 # ncurses/ncursesw:
12791 if test "$cf_cv_utf8_lib" = "add-on" ; then
12792
12793 cat >>confdefs.h <<\EOF
12794 #define HAVE_LIBUTF8_H 1
12795 EOF
12796
12797 if test -n "$cf_cv_header_path_utf8" ; then
12798   for cf_add_incdir in $cf_cv_header_path_utf8
12799   do
12800         while test "$cf_add_incdir" != /usr/include
12801         do
12802           if test -d "$cf_add_incdir"
12803           then
12804                 cf_have_incdir=no
12805                 if test -n "$CFLAGS$CPPFLAGS" ; then
12806                   # a loop is needed to ensure we can add subdirs of existing dirs
12807                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12808                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12809                           cf_have_incdir=yes; break
12810                         fi
12811                   done
12812                 fi
12813
12814                 if test "$cf_have_incdir" = no ; then
12815                   if test "$cf_add_incdir" = /usr/local/include ; then
12816                         if test "$GCC" = yes
12817                         then
12818                           cf_save_CPPFLAGS=$CPPFLAGS
12819
12820         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12821         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12822
12823                           cat >"conftest.$ac_ext" <<_ACEOF
12824 #line 12824 "configure"
12825 #include "confdefs.h"
12826 #include <stdio.h>
12827 int
12828 main (void)
12829 {
12830 printf("Hello")
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 rm -f "conftest.$ac_objext"
12836 if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5
12837   (eval $ac_compile) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit "$ac_status"); } &&
12841          { ac_try='test -s "conftest.$ac_objext"'
12842   { (eval echo "$as_me:12842: \"$ac_try\"") >&5
12843   (eval $ac_try) 2>&5
12844   ac_status=$?
12845   echo "$as_me:12845: \$? = $ac_status" >&5
12846   (exit "$ac_status"); }; }; then
12847   :
12848 else
12849   echo "$as_me: failed program was:" >&5
12850 cat "conftest.$ac_ext" >&5
12851 cf_have_incdir=yes
12852 fi
12853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12854                           CPPFLAGS=$cf_save_CPPFLAGS
12855                         fi
12856                   fi
12857                 fi
12858
12859                 if test "$cf_have_incdir" = no ; then
12860                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12861
12862 echo "${as_me:-configure}:12862: testing adding $cf_add_incdir to include-path ..." 1>&5
12863
12864                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12865
12866                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12867                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12868                   cf_add_incdir="$cf_top_incdir"
12869                 else
12870                   break
12871                 fi
12872           else
12873                 break
12874           fi
12875         done
12876   done
12877 fi
12878
12879 if test -n "$cf_cv_library_path_utf8" ; then
12880         for cf_add_libdir in $cf_cv_library_path_utf8
12881         do
12882                 if test "$cf_add_libdir" = /usr/lib ; then
12883                         :
12884                 elif test -d "$cf_add_libdir"
12885                 then
12886                         cf_have_libdir=no
12887                         if test -n "$LDFLAGS$LIBS" ; then
12888                                 # a loop is needed to ensure we can add subdirs of existing dirs
12889                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12890                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12891                                                 cf_have_libdir=yes; break
12892                                         fi
12893                                 done
12894                         fi
12895                         if test "$cf_have_libdir" = no ; then
12896                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12897
12898 echo "${as_me:-configure}:12898: testing adding $cf_add_libdir to library-path ..." 1>&5
12899
12900                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12901                         fi
12902                 fi
12903         done
12904 fi
12905
12906 cf_add_libs="$LIBS"
12907 # reverse order
12908 cf_add_0lib=
12909 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12910 # filter duplicates
12911 for cf_add_1lib in $cf_add_0lib; do
12912         for cf_add_2lib in $cf_add_libs; do
12913                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12914                         cf_add_1lib=
12915                         break
12916                 fi
12917         done
12918         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12919 done
12920 LIBS="$cf_add_libs"
12921
12922 fi
12923
12924                 if test "$cf_cv_utf8_lib" != no ; then
12925                         NCURSES_LIBUTF8=1
12926                 fi
12927         fi
12928
12929 # This is needed on Tru64 5.0 to declare mbstate_t
12930 echo "$as_me:12930: checking if we must include wchar.h to declare mbstate_t" >&5
12931 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12932 if test "${cf_cv_mbstate_t+set}" = set; then
12933   echo $ECHO_N "(cached) $ECHO_C" >&6
12934 else
12935
12936 cat >"conftest.$ac_ext" <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939
12940 #include <stdlib.h>
12941 #include <stdarg.h>
12942 #include <stdio.h>
12943 #ifdef HAVE_LIBUTF8_H
12944 #include <libutf8.h>
12945 #endif
12946 int
12947 main (void)
12948 {
12949 mbstate_t state
12950   ;
12951   return 0;
12952 }
12953 _ACEOF
12954 rm -f "conftest.$ac_objext"
12955 if { (eval echo "$as_me:12955: \"$ac_compile\"") >&5
12956   (eval $ac_compile) 2>&5
12957   ac_status=$?
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit "$ac_status"); } &&
12960          { ac_try='test -s "conftest.$ac_objext"'
12961   { (eval echo "$as_me:12961: \"$ac_try\"") >&5
12962   (eval $ac_try) 2>&5
12963   ac_status=$?
12964   echo "$as_me:12964: \$? = $ac_status" >&5
12965   (exit "$ac_status"); }; }; then
12966   cf_cv_mbstate_t=no
12967 else
12968   echo "$as_me: failed program was:" >&5
12969 cat "conftest.$ac_ext" >&5
12970 cat >"conftest.$ac_ext" <<_ACEOF
12971 #line 12971 "configure"
12972 #include "confdefs.h"
12973
12974 #include <stdlib.h>
12975 #include <stdarg.h>
12976 #include <stdio.h>
12977 #include <wchar.h>
12978 #ifdef HAVE_LIBUTF8_H
12979 #include <libutf8.h>
12980 #endif
12981 int
12982 main (void)
12983 {
12984 mbstate_t value
12985   ;
12986   return 0;
12987 }
12988 _ACEOF
12989 rm -f "conftest.$ac_objext"
12990 if { (eval echo "$as_me:12990: \"$ac_compile\"") >&5
12991   (eval $ac_compile) 2>&5
12992   ac_status=$?
12993   echo "$as_me:12993: \$? = $ac_status" >&5
12994   (exit "$ac_status"); } &&
12995          { ac_try='test -s "conftest.$ac_objext"'
12996   { (eval echo "$as_me:12996: \"$ac_try\"") >&5
12997   (eval $ac_try) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit "$ac_status"); }; }; then
13001   cf_cv_mbstate_t=yes
13002 else
13003   echo "$as_me: failed program was:" >&5
13004 cat "conftest.$ac_ext" >&5
13005 cf_cv_mbstate_t=unknown
13006 fi
13007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13008 fi
13009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13010 fi
13011 echo "$as_me:13011: result: $cf_cv_mbstate_t" >&5
13012 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13013
13014 if test "$cf_cv_mbstate_t" = yes ; then
13015
13016 cat >>confdefs.h <<\EOF
13017 #define NEED_WCHAR_H 1
13018 EOF
13019
13020         NEED_WCHAR_H=1
13021 fi
13022
13023 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13024 if test "$cf_cv_mbstate_t" = unknown ; then
13025         NCURSES_MBSTATE_T=1
13026 fi
13027
13028 # This is needed on Tru64 5.0 to declare wchar_t
13029 echo "$as_me:13029: checking if we must include wchar.h to declare wchar_t" >&5
13030 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13031 if test "${cf_cv_wchar_t+set}" = set; then
13032   echo $ECHO_N "(cached) $ECHO_C" >&6
13033 else
13034
13035 cat >"conftest.$ac_ext" <<_ACEOF
13036 #line 13036 "configure"
13037 #include "confdefs.h"
13038
13039 #include <stdlib.h>
13040 #include <stdarg.h>
13041 #include <stdio.h>
13042 #ifdef HAVE_LIBUTF8_H
13043 #include <libutf8.h>
13044 #endif
13045 int
13046 main (void)
13047 {
13048 wchar_t state
13049   ;
13050   return 0;
13051 }
13052 _ACEOF
13053 rm -f "conftest.$ac_objext"
13054 if { (eval echo "$as_me:13054: \"$ac_compile\"") >&5
13055   (eval $ac_compile) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit "$ac_status"); } &&
13059          { ac_try='test -s "conftest.$ac_objext"'
13060   { (eval echo "$as_me:13060: \"$ac_try\"") >&5
13061   (eval $ac_try) 2>&5
13062   ac_status=$?
13063   echo "$as_me:13063: \$? = $ac_status" >&5
13064   (exit "$ac_status"); }; }; then
13065   cf_cv_wchar_t=no
13066 else
13067   echo "$as_me: failed program was:" >&5
13068 cat "conftest.$ac_ext" >&5
13069 cat >"conftest.$ac_ext" <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072
13073 #include <stdlib.h>
13074 #include <stdarg.h>
13075 #include <stdio.h>
13076 #include <wchar.h>
13077 #ifdef HAVE_LIBUTF8_H
13078 #include <libutf8.h>
13079 #endif
13080 int
13081 main (void)
13082 {
13083 wchar_t value
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 rm -f "conftest.$ac_objext"
13089 if { (eval echo "$as_me:13089: \"$ac_compile\"") >&5
13090   (eval $ac_compile) 2>&5
13091   ac_status=$?
13092   echo "$as_me:13092: \$? = $ac_status" >&5
13093   (exit "$ac_status"); } &&
13094          { ac_try='test -s "conftest.$ac_objext"'
13095   { (eval echo "$as_me:13095: \"$ac_try\"") >&5
13096   (eval $ac_try) 2>&5
13097   ac_status=$?
13098   echo "$as_me:13098: \$? = $ac_status" >&5
13099   (exit "$ac_status"); }; }; then
13100   cf_cv_wchar_t=yes
13101 else
13102   echo "$as_me: failed program was:" >&5
13103 cat "conftest.$ac_ext" >&5
13104 cf_cv_wchar_t=unknown
13105 fi
13106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13107 fi
13108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13109 fi
13110 echo "$as_me:13110: result: $cf_cv_wchar_t" >&5
13111 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13112
13113 if test "$cf_cv_wchar_t" = yes ; then
13114
13115 cat >>confdefs.h <<\EOF
13116 #define NEED_WCHAR_H 1
13117 EOF
13118
13119         NEED_WCHAR_H=1
13120 fi
13121
13122 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13123 if test "$cf_cv_wchar_t" = unknown ; then
13124         NCURSES_WCHAR_T=1
13125 fi
13126
13127 # if we find wchar_t in either place, use substitution to provide a fallback.
13128 if test "$cf_cv_wchar_t" != unknown ; then
13129         NCURSES_OK_WCHAR_T=1
13130 fi
13131
13132 # This is needed on Tru64 5.0 to declare wint_t
13133 echo "$as_me:13133: checking if we must include wchar.h to declare wint_t" >&5
13134 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13135 if test "${cf_cv_wint_t+set}" = set; then
13136   echo $ECHO_N "(cached) $ECHO_C" >&6
13137 else
13138
13139 cat >"conftest.$ac_ext" <<_ACEOF
13140 #line 13140 "configure"
13141 #include "confdefs.h"
13142
13143 #include <stdlib.h>
13144 #include <stdarg.h>
13145 #include <stdio.h>
13146 #ifdef HAVE_LIBUTF8_H
13147 #include <libutf8.h>
13148 #endif
13149 int
13150 main (void)
13151 {
13152 wint_t state
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 rm -f "conftest.$ac_objext"
13158 if { (eval echo "$as_me:13158: \"$ac_compile\"") >&5
13159   (eval $ac_compile) 2>&5
13160   ac_status=$?
13161   echo "$as_me:13161: \$? = $ac_status" >&5
13162   (exit "$ac_status"); } &&
13163          { ac_try='test -s "conftest.$ac_objext"'
13164   { (eval echo "$as_me:13164: \"$ac_try\"") >&5
13165   (eval $ac_try) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit "$ac_status"); }; }; then
13169   cf_cv_wint_t=no
13170 else
13171   echo "$as_me: failed program was:" >&5
13172 cat "conftest.$ac_ext" >&5
13173 cat >"conftest.$ac_ext" <<_ACEOF
13174 #line 13174 "configure"
13175 #include "confdefs.h"
13176
13177 #include <stdlib.h>
13178 #include <stdarg.h>
13179 #include <stdio.h>
13180 #include <wchar.h>
13181 #ifdef HAVE_LIBUTF8_H
13182 #include <libutf8.h>
13183 #endif
13184 int
13185 main (void)
13186 {
13187 wint_t value
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f "conftest.$ac_objext"
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194   (eval $ac_compile) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit "$ac_status"); } &&
13198          { ac_try='test -s "conftest.$ac_objext"'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit "$ac_status"); }; }; then
13204   cf_cv_wint_t=yes
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 cat "conftest.$ac_ext" >&5
13208 cf_cv_wint_t=unknown
13209 fi
13210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13211 fi
13212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13213 fi
13214 echo "$as_me:13214: result: $cf_cv_wint_t" >&5
13215 echo "${ECHO_T}$cf_cv_wint_t" >&6
13216
13217 if test "$cf_cv_wint_t" = yes ; then
13218
13219 cat >>confdefs.h <<\EOF
13220 #define NEED_WCHAR_H 1
13221 EOF
13222
13223         NEED_WCHAR_H=1
13224 fi
13225
13226 # if we do not find wint_t in either place, use substitution to provide a fallback.
13227 if test "$cf_cv_wint_t" = unknown ; then
13228         NCURSES_WINT_T=1
13229 fi
13230
13231 # if we find wint_t in either place, use substitution to provide a fallback.
13232 if test "$cf_cv_wint_t" != unknown ; then
13233         NCURSES_OK_WINT_T=1
13234 fi
13235
13236         if test "$NCURSES_MBSTATE_T" != 0; then
13237
13238 cat >>confdefs.h <<\EOF
13239 #define NEED_MBSTATE_T_DEF 1
13240 EOF
13241
13242         fi
13243 fi
13244
13245 ###   use option --disable-lp64 to allow long chtype
13246 echo "$as_me:13246: checking whether to enable _LP64 definition in curses.h" >&5
13247 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13248
13249 # Check whether --enable-lp64 or --disable-lp64 was given.
13250 if test "${enable_lp64+set}" = set; then
13251   enableval="$enable_lp64"
13252   with_lp64=$enableval
13253 else
13254   with_lp64=$cf_dft_with_lp64
13255 fi;
13256 echo "$as_me:13256: result: $with_lp64" >&5
13257 echo "${ECHO_T}$with_lp64" >&6
13258
13259 if test "x$with_lp64" = xyes ; then
13260         cf_cv_enable_lp64=1
13261 else
13262         cf_cv_enable_lp64=0
13263 fi
13264
13265 # Check whether --enable-largefile or --disable-largefile was given.
13266 if test "${enable_largefile+set}" = set; then
13267   enableval="$enable_largefile"
13268
13269 fi;
13270 if test "$enable_largefile" != no; then
13271
13272   echo "$as_me:13272: checking for special C compiler options needed for large files" >&5
13273 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13274 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13275   echo $ECHO_N "(cached) $ECHO_C" >&6
13276 else
13277   ac_cv_sys_largefile_CC=no
13278      if test "$GCC" != yes; then
13279        ac_save_CC=$CC
13280        while :; do
13281          # IRIX 6.2 and later do not support large files by default,
13282          # so use the C compiler's -n32 option if that helps.
13283          cat >"conftest.$ac_ext" <<_ACEOF
13284 #line 13284 "configure"
13285 #include "confdefs.h"
13286 #include <sys/types.h>
13287  /* Check that off_t can represent 2**63 - 1 correctly.
13288     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13289     since some C++ compilers masquerading as C compilers
13290     incorrectly reject 9223372036854775807.  */
13291 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13292   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13293                        && LARGE_OFF_T % 2147483647 == 1)
13294                       ? 1 : -1];
13295 int
13296 main (void)
13297 {
13298
13299   ;
13300   return 0;
13301 }
13302 _ACEOF
13303          rm -f "conftest.$ac_objext"
13304 if { (eval echo "$as_me:13304: \"$ac_compile\"") >&5
13305   (eval $ac_compile) 2>&5
13306   ac_status=$?
13307   echo "$as_me:13307: \$? = $ac_status" >&5
13308   (exit "$ac_status"); } &&
13309          { ac_try='test -s "conftest.$ac_objext"'
13310   { (eval echo "$as_me:13310: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:13313: \$? = $ac_status" >&5
13314   (exit "$ac_status"); }; }; then
13315   break
13316 else
13317   echo "$as_me: failed program was:" >&5
13318 cat "conftest.$ac_ext" >&5
13319 fi
13320 rm -f "conftest.$ac_objext"
13321          CC="$CC -n32"
13322          rm -f "conftest.$ac_objext"
13323 if { (eval echo "$as_me:13323: \"$ac_compile\"") >&5
13324   (eval $ac_compile) 2>&5
13325   ac_status=$?
13326   echo "$as_me:13326: \$? = $ac_status" >&5
13327   (exit "$ac_status"); } &&
13328          { ac_try='test -s "conftest.$ac_objext"'
13329   { (eval echo "$as_me:13329: \"$ac_try\"") >&5
13330   (eval $ac_try) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit "$ac_status"); }; }; then
13334   ac_cv_sys_largefile_CC=' -n32'; break
13335 else
13336   echo "$as_me: failed program was:" >&5
13337 cat "conftest.$ac_ext" >&5
13338 fi
13339 rm -f "conftest.$ac_objext"
13340          break
13341        done
13342        CC=$ac_save_CC
13343        rm -f "conftest.$ac_ext"
13344     fi
13345 fi
13346 echo "$as_me:13346: result: $ac_cv_sys_largefile_CC" >&5
13347 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13348   if test "$ac_cv_sys_largefile_CC" != no; then
13349     CC=$CC$ac_cv_sys_largefile_CC
13350   fi
13351
13352   echo "$as_me:13352: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13353 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13354 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13355   echo $ECHO_N "(cached) $ECHO_C" >&6
13356 else
13357   while :; do
13358   ac_cv_sys_file_offset_bits=no
13359   cat >"conftest.$ac_ext" <<_ACEOF
13360 #line 13360 "configure"
13361 #include "confdefs.h"
13362 #include <sys/types.h>
13363  /* Check that off_t can represent 2**63 - 1 correctly.
13364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13365     since some C++ compilers masquerading as C compilers
13366     incorrectly reject 9223372036854775807.  */
13367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13369                        && LARGE_OFF_T % 2147483647 == 1)
13370                       ? 1 : -1];
13371 int
13372 main (void)
13373 {
13374
13375   ;
13376   return 0;
13377 }
13378 _ACEOF
13379 rm -f "conftest.$ac_objext"
13380 if { (eval echo "$as_me:13380: \"$ac_compile\"") >&5
13381   (eval $ac_compile) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit "$ac_status"); } &&
13385          { ac_try='test -s "conftest.$ac_objext"'
13386   { (eval echo "$as_me:13386: \"$ac_try\"") >&5
13387   (eval $ac_try) 2>&5
13388   ac_status=$?
13389   echo "$as_me:13389: \$? = $ac_status" >&5
13390   (exit "$ac_status"); }; }; then
13391   break
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 cat "conftest.$ac_ext" >&5
13395 fi
13396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13397   cat >"conftest.$ac_ext" <<_ACEOF
13398 #line 13398 "configure"
13399 #include "confdefs.h"
13400 #define _FILE_OFFSET_BITS 64
13401 #include <sys/types.h>
13402  /* Check that off_t can represent 2**63 - 1 correctly.
13403     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13404     since some C++ compilers masquerading as C compilers
13405     incorrectly reject 9223372036854775807.  */
13406 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13407   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13408                        && LARGE_OFF_T % 2147483647 == 1)
13409                       ? 1 : -1];
13410 int
13411 main (void)
13412 {
13413
13414   ;
13415   return 0;
13416 }
13417 _ACEOF
13418 rm -f "conftest.$ac_objext"
13419 if { (eval echo "$as_me:13419: \"$ac_compile\"") >&5
13420   (eval $ac_compile) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit "$ac_status"); } &&
13424          { ac_try='test -s "conftest.$ac_objext"'
13425   { (eval echo "$as_me:13425: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit "$ac_status"); }; }; then
13430   ac_cv_sys_file_offset_bits=64; break
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 cat "conftest.$ac_ext" >&5
13434 fi
13435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13436   break
13437 done
13438 fi
13439 echo "$as_me:13439: result: $ac_cv_sys_file_offset_bits" >&5
13440 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13441 if test "$ac_cv_sys_file_offset_bits" != no; then
13442
13443 cat >>confdefs.h <<EOF
13444 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13445 EOF
13446
13447 fi
13448 rm -rf conftest*
13449   echo "$as_me:13449: checking for _LARGE_FILES value needed for large files" >&5
13450 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13451 if test "${ac_cv_sys_large_files+set}" = set; then
13452   echo $ECHO_N "(cached) $ECHO_C" >&6
13453 else
13454   while :; do
13455   ac_cv_sys_large_files=no
13456   cat >"conftest.$ac_ext" <<_ACEOF
13457 #line 13457 "configure"
13458 #include "confdefs.h"
13459 #include <sys/types.h>
13460  /* Check that off_t can represent 2**63 - 1 correctly.
13461     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13462     since some C++ compilers masquerading as C compilers
13463     incorrectly reject 9223372036854775807.  */
13464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13465   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13466                        && LARGE_OFF_T % 2147483647 == 1)
13467                       ? 1 : -1];
13468 int
13469 main (void)
13470 {
13471
13472   ;
13473   return 0;
13474 }
13475 _ACEOF
13476 rm -f "conftest.$ac_objext"
13477 if { (eval echo "$as_me:13477: \"$ac_compile\"") >&5
13478   (eval $ac_compile) 2>&5
13479   ac_status=$?
13480   echo "$as_me:13480: \$? = $ac_status" >&5
13481   (exit "$ac_status"); } &&
13482          { ac_try='test -s "conftest.$ac_objext"'
13483   { (eval echo "$as_me:13483: \"$ac_try\"") >&5
13484   (eval $ac_try) 2>&5
13485   ac_status=$?
13486   echo "$as_me:13486: \$? = $ac_status" >&5
13487   (exit "$ac_status"); }; }; then
13488   break
13489 else
13490   echo "$as_me: failed program was:" >&5
13491 cat "conftest.$ac_ext" >&5
13492 fi
13493 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13494   cat >"conftest.$ac_ext" <<_ACEOF
13495 #line 13495 "configure"
13496 #include "confdefs.h"
13497 #define _LARGE_FILES 1
13498 #include <sys/types.h>
13499  /* Check that off_t can represent 2**63 - 1 correctly.
13500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13501     since some C++ compilers masquerading as C compilers
13502     incorrectly reject 9223372036854775807.  */
13503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13505                        && LARGE_OFF_T % 2147483647 == 1)
13506                       ? 1 : -1];
13507 int
13508 main (void)
13509 {
13510
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 rm -f "conftest.$ac_objext"
13516 if { (eval echo "$as_me:13516: \"$ac_compile\"") >&5
13517   (eval $ac_compile) 2>&5
13518   ac_status=$?
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit "$ac_status"); } &&
13521          { ac_try='test -s "conftest.$ac_objext"'
13522   { (eval echo "$as_me:13522: \"$ac_try\"") >&5
13523   (eval $ac_try) 2>&5
13524   ac_status=$?
13525   echo "$as_me:13525: \$? = $ac_status" >&5
13526   (exit "$ac_status"); }; }; then
13527   ac_cv_sys_large_files=1; break
13528 else
13529   echo "$as_me: failed program was:" >&5
13530 cat "conftest.$ac_ext" >&5
13531 fi
13532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13533   break
13534 done
13535 fi
13536 echo "$as_me:13536: result: $ac_cv_sys_large_files" >&5
13537 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13538 if test "$ac_cv_sys_large_files" != no; then
13539
13540 cat >>confdefs.h <<EOF
13541 #define _LARGE_FILES $ac_cv_sys_large_files
13542 EOF
13543
13544 fi
13545 rm -rf conftest*
13546 fi
13547
13548         if test "$enable_largefile" != no ; then
13549         echo "$as_me:13549: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13550 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13551 if test "${ac_cv_sys_largefile_source+set}" = set; then
13552   echo $ECHO_N "(cached) $ECHO_C" >&6
13553 else
13554   while :; do
13555   ac_cv_sys_largefile_source=no
13556   cat >"conftest.$ac_ext" <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559 #include <stdio.h>
13560 int
13561 main (void)
13562 {
13563 return !fseeko;
13564   ;
13565   return 0;
13566 }
13567 _ACEOF
13568 rm -f "conftest.$ac_objext"
13569 if { (eval echo "$as_me:13569: \"$ac_compile\"") >&5
13570   (eval $ac_compile) 2>&5
13571   ac_status=$?
13572   echo "$as_me:13572: \$? = $ac_status" >&5
13573   (exit "$ac_status"); } &&
13574          { ac_try='test -s "conftest.$ac_objext"'
13575   { (eval echo "$as_me:13575: \"$ac_try\"") >&5
13576   (eval $ac_try) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit "$ac_status"); }; }; then
13580   break
13581 else
13582   echo "$as_me: failed program was:" >&5
13583 cat "conftest.$ac_ext" >&5
13584 fi
13585 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13586   cat >"conftest.$ac_ext" <<_ACEOF
13587 #line 13587 "configure"
13588 #include "confdefs.h"
13589 #define _LARGEFILE_SOURCE 1
13590 #include <stdio.h>
13591 int
13592 main (void)
13593 {
13594 return !fseeko;
13595   ;
13596   return 0;
13597 }
13598 _ACEOF
13599 rm -f "conftest.$ac_objext"
13600 if { (eval echo "$as_me:13600: \"$ac_compile\"") >&5
13601   (eval $ac_compile) 2>&5
13602   ac_status=$?
13603   echo "$as_me:13603: \$? = $ac_status" >&5
13604   (exit "$ac_status"); } &&
13605          { ac_try='test -s "conftest.$ac_objext"'
13606   { (eval echo "$as_me:13606: \"$ac_try\"") >&5
13607   (eval $ac_try) 2>&5
13608   ac_status=$?
13609   echo "$as_me:13609: \$? = $ac_status" >&5
13610   (exit "$ac_status"); }; }; then
13611   ac_cv_sys_largefile_source=1; break
13612 else
13613   echo "$as_me: failed program was:" >&5
13614 cat "conftest.$ac_ext" >&5
13615 fi
13616 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13617   break
13618 done
13619 fi
13620 echo "$as_me:13620: result: $ac_cv_sys_largefile_source" >&5
13621 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13622 if test "$ac_cv_sys_largefile_source" != no; then
13623
13624 cat >>confdefs.h <<EOF
13625 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13626 EOF
13627
13628 fi
13629 rm -rf conftest*
13630
13631 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13632 # in glibc 2.1.3, but that breaks too many other things.
13633 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13634 echo "$as_me:13634: checking for fseeko" >&5
13635 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13636 if test "${ac_cv_func_fseeko+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639   cat >"conftest.$ac_ext" <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13642 #include <stdio.h>
13643 int
13644 main (void)
13645 {
13646 return fseeko && fseeko (stdin, 0, 0);
13647   ;
13648   return 0;
13649 }
13650 _ACEOF
13651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13652 if { (eval echo "$as_me:13652: \"$ac_link\"") >&5
13653   (eval $ac_link) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit "$ac_status"); } &&
13657          { ac_try='test -s "conftest$ac_exeext"'
13658   { (eval echo "$as_me:13658: \"$ac_try\"") >&5
13659   (eval $ac_try) 2>&5
13660   ac_status=$?
13661   echo "$as_me:13661: \$? = $ac_status" >&5
13662   (exit "$ac_status"); }; }; then
13663   ac_cv_func_fseeko=yes
13664 else
13665   echo "$as_me: failed program was:" >&5
13666 cat "conftest.$ac_ext" >&5
13667 ac_cv_func_fseeko=no
13668 fi
13669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13670 fi
13671 echo "$as_me:13671: result: $ac_cv_func_fseeko" >&5
13672 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13673 if test $ac_cv_func_fseeko = yes; then
13674
13675 cat >>confdefs.h <<\EOF
13676 #define HAVE_FSEEKO 1
13677 EOF
13678
13679 fi
13680
13681         # Normally we would collect these definitions in the config.h,
13682         # but (like _XOPEN_SOURCE), some environments rely on having these
13683         # defined before any of the system headers are included.  Another
13684         # case comes up with C++, e.g., on AIX the compiler compiles the
13685         # header files by themselves before looking at the body files it is
13686         # told to compile.  For ncurses, those header files do not include
13687         # the config.h
13688         if test "$ac_cv_sys_large_files" != no
13689         then
13690
13691         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13692         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13693
13694         fi
13695         if test "$ac_cv_sys_largefile_source" != no
13696         then
13697
13698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13699         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13700
13701         fi
13702         if test "$ac_cv_sys_file_offset_bits" != no
13703         then
13704
13705         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13706         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13707
13708         fi
13709
13710         echo "$as_me:13710: checking whether to use struct dirent64" >&5
13711 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13712 if test "${cf_cv_struct_dirent64+set}" = set; then
13713   echo $ECHO_N "(cached) $ECHO_C" >&6
13714 else
13715
13716                 cat >"conftest.$ac_ext" <<_ACEOF
13717 #line 13717 "configure"
13718 #include "confdefs.h"
13719
13720 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13721 #include <sys/types.h>
13722 #include <dirent.h>
13723
13724 int
13725 main (void)
13726 {
13727
13728                 /* if transitional largefile support is setup, this is true */
13729                 extern struct dirent64 * readdir(DIR *);
13730                 struct dirent64 *x = readdir((DIR *)0);
13731                 struct dirent *y = readdir((DIR *)0);
13732                 int z = x - y;
13733                 (void)z;
13734
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 rm -f "conftest.$ac_objext"
13740 if { (eval echo "$as_me:13740: \"$ac_compile\"") >&5
13741   (eval $ac_compile) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit "$ac_status"); } &&
13745          { ac_try='test -s "conftest.$ac_objext"'
13746   { (eval echo "$as_me:13746: \"$ac_try\"") >&5
13747   (eval $ac_try) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit "$ac_status"); }; }; then
13751   cf_cv_struct_dirent64=yes
13752 else
13753   echo "$as_me: failed program was:" >&5
13754 cat "conftest.$ac_ext" >&5
13755 cf_cv_struct_dirent64=no
13756 fi
13757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13758
13759 fi
13760 echo "$as_me:13760: result: $cf_cv_struct_dirent64" >&5
13761 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13762         test "$cf_cv_struct_dirent64" = yes &&
13763 cat >>confdefs.h <<\EOF
13764 #define HAVE_STRUCT_DIRENT64 1
13765 EOF
13766
13767         fi
13768
13769 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13770 echo "$as_me:13770: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13771 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13772
13773 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13774 if test "${enable_tparm_varargs+set}" = set; then
13775   enableval="$enable_tparm_varargs"
13776   with_tparm_varargs=$enableval
13777 else
13778   with_tparm_varargs=yes
13779 fi;
13780 echo "$as_me:13780: result: $with_tparm_varargs" >&5
13781 echo "${ECHO_T}$with_tparm_varargs" >&6
13782 NCURSES_TPARM_VARARGS=0
13783 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13784
13785 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13786 if test "$with_ticlib" != no ; then
13787 echo "$as_me:13787: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13788 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13789
13790 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13791 if test "${enable_tic_depends+set}" = set; then
13792   enableval="$enable_tic_depends"
13793   with_tic_depends=$enableval
13794 else
13795   with_tic_depends=yes
13796 fi;
13797 echo "$as_me:13797: result: $with_tic_depends" >&5
13798 echo "${ECHO_T}$with_tic_depends" >&6
13799 else
13800         with_tic_depends=no
13801 fi
13802
13803 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13804 echo "$as_me:13804: checking if you want to enable wattr* macros" >&5
13805 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13806
13807 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13808 if test "${enable_wattr_macros+set}" = set; then
13809   enableval="$enable_wattr_macros"
13810   with_wattr_macros=$enableval
13811 else
13812   with_wattr_macros=no
13813 fi;
13814 if [ "x$with_wattr_macros" != xyes ]; then
13815         NCURSES_WATTR_MACROS=0
13816         echo "$as_me:13816: result: no" >&5
13817 echo "${ECHO_T}no" >&6
13818 else
13819         NCURSES_WATTR_MACROS=1
13820         echo "$as_me:13820: result: yes" >&5
13821 echo "${ECHO_T}yes" >&6
13822 fi
13823
13824 echo "$as_me:13824: checking for X11 rgb file" >&5
13825 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13826
13827 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13828 if test "${with_x11_rgb+set}" = set; then
13829   withval="$with_x11_rgb"
13830   RGB_PATH=$withval
13831 else
13832   RGB_PATH=auto
13833 fi;
13834
13835 if test "x$RGB_PATH" = xauto
13836 then
13837         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13838         for cf_path in \
13839                 /opt/local/share/X11/rgb.txt \
13840                 /opt/X11/share/X11/rgb.txt \
13841                 /usr/share/X11/rgb.txt \
13842                 /usr/X11/share/X11/rgb.txt \
13843                 /usr/X11/lib/X11/rgb.txt \
13844                 /usr/lib/X11/rgb.txt \
13845                 /etc/X11/rgb.txt \
13846                 /usr/pkg/lib/X11/rgb.txt \
13847                 /usr/X11R7/lib/X11/rgb.txt \
13848                 /usr/X11R6/lib/X11/rgb.txt \
13849                 /usr/X11R5/lib/X11/rgb.txt \
13850                 /usr/X11R4/lib/X11/rgb.txt \
13851                 /usr/local/lib/X11/rgb.txt \
13852                 /usr/local/share/X11/rgb.txt \
13853                 /usr/lib64/X11/rgb.txt
13854         do
13855                 if test -f "$cf_path" ; then
13856                         RGB_PATH="$cf_path"
13857                         break
13858                 fi
13859         done
13860 else
13861         cf_path=$RGB_PATH
13862
13863 if test "x$prefix" != xNONE; then
13864         cf_path_syntax="$prefix"
13865 else
13866         cf_path_syntax="$ac_default_prefix"
13867 fi
13868
13869 case ".$cf_path" in
13870 (.\$\(*\)*|.\'*\'*)
13871         ;;
13872 (..|./*|.\\*)
13873         ;;
13874 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13875         ;;
13876 (.\$\{*prefix\}*|.\$\{*dir\}*)
13877         eval cf_path="$cf_path"
13878         case ".$cf_path" in
13879         (.NONE/*)
13880                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13881                 ;;
13882         esac
13883         ;;
13884 (.no|.NONE/*)
13885         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13886         ;;
13887 (*)
13888         { { echo "$as_me:13888: error: expected a pathname, not \"$cf_path\"" >&5
13889 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13890    { (exit 1); exit 1; }; }
13891         ;;
13892 esac
13893
13894 fi
13895
13896 echo "$as_me:13896: result: $RGB_PATH" >&5
13897 echo "${ECHO_T}$RGB_PATH" >&6
13898
13899 cat >>confdefs.h <<EOF
13900 #define RGB_PATH "$cf_path"
13901 EOF
13902
13903 no_x11_rgb=
13904 if test "$RGB_PATH" = no
13905 then
13906         no_x11_rgb="#"
13907 fi
13908
13909 ###   use option --with-bool to override bool's type
13910 echo "$as_me:13910: checking for type of bool" >&5
13911 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13912
13913 # Check whether --with-bool or --without-bool was given.
13914 if test "${with_bool+set}" = set; then
13915   withval="$with_bool"
13916   NCURSES_BOOL="$withval"
13917 else
13918   NCURSES_BOOL=auto
13919 fi;
13920 echo "$as_me:13920: result: $NCURSES_BOOL" >&5
13921 echo "${ECHO_T}$NCURSES_BOOL" >&6
13922
13923 echo "$as_me:13923: checking for alternate terminal capabilities file" >&5
13924 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13925
13926 # Check whether --with-caps or --without-caps was given.
13927 if test "${with_caps+set}" = set; then
13928   withval="$with_caps"
13929   TERMINFO_CAPS=Caps.$withval
13930 else
13931   TERMINFO_CAPS=Caps
13932 fi;
13933 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13934 echo "$as_me:13934: result: $TERMINFO_CAPS" >&5
13935 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13936
13937 ###   use option --with-chtype to override chtype's type
13938 echo "$as_me:13938: checking for type of chtype" >&5
13939 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13940
13941 # Check whether --with-chtype or --without-chtype was given.
13942 if test "${with_chtype+set}" = set; then
13943   withval="$with_chtype"
13944   NCURSES_CHTYPE="$withval"
13945 else
13946   NCURSES_CHTYPE=$cf_dft_chtype
13947 fi;
13948 echo "$as_me:13948: result: $NCURSES_CHTYPE" >&5
13949 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13950
13951 ###   use option --with-ospeed to override ospeed's type
13952 echo "$as_me:13952: checking for type of ospeed" >&5
13953 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13954
13955 # Check whether --with-ospeed or --without-ospeed was given.
13956 if test "${with_ospeed+set}" = set; then
13957   withval="$with_ospeed"
13958   NCURSES_OSPEED="$withval"
13959 else
13960   NCURSES_OSPEED=short
13961 fi;
13962 echo "$as_me:13962: result: $NCURSES_OSPEED" >&5
13963 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13964
13965 ###   use option --with-mmask-t to override mmask_t's type
13966 echo "$as_me:13966: checking for type of mmask_t" >&5
13967 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13968
13969 # Check whether --with-mmask-t or --without-mmask-t was given.
13970 if test "${with_mmask_t+set}" = set; then
13971   withval="$with_mmask_t"
13972   NCURSES_MMASK_T="$withval"
13973 else
13974   NCURSES_MMASK_T=$cf_dft_mmask_t
13975 fi;
13976 echo "$as_me:13976: result: $NCURSES_MMASK_T" >&5
13977 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13978
13979 ###   use option --with-ccharw-max to override CCHARW_MAX size
13980 echo "$as_me:13980: checking for size CCHARW_MAX" >&5
13981 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13982
13983 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13984 if test "${with_ccharw_max+set}" = set; then
13985   withval="$with_ccharw_max"
13986   NCURSES_CCHARW_MAX="$withval"
13987 else
13988   NCURSES_CCHARW_MAX=5
13989 fi;
13990 echo "$as_me:13990: result: $NCURSES_CCHARW_MAX" >&5
13991 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13992
13993 echo "$as_me:13993: checking for ANSI C header files" >&5
13994 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13995 if test "${ac_cv_header_stdc+set}" = set; then
13996   echo $ECHO_N "(cached) $ECHO_C" >&6
13997 else
13998   cat >"conftest.$ac_ext" <<_ACEOF
13999 #line 13999 "configure"
14000 #include "confdefs.h"
14001 #include <stdlib.h>
14002 #include <stdarg.h>
14003 #include <string.h>
14004 #include <float.h>
14005
14006 _ACEOF
14007 if { (eval echo "$as_me:14007: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14008   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14009   ac_status=$?
14010   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14011   rm -f conftest.er1
14012   cat conftest.err >&5
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit "$ac_status"); } >/dev/null; then
14015   if test -s conftest.err; then
14016     ac_cpp_err=$ac_c_preproc_warn_flag
14017   else
14018     ac_cpp_err=
14019   fi
14020 else
14021   ac_cpp_err=yes
14022 fi
14023 if test -z "$ac_cpp_err"; then
14024   ac_cv_header_stdc=yes
14025 else
14026   echo "$as_me: failed program was:" >&5
14027   cat "conftest.$ac_ext" >&5
14028   ac_cv_header_stdc=no
14029 fi
14030 rm -f conftest.err "conftest.$ac_ext"
14031
14032 if test $ac_cv_header_stdc = yes; then
14033   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14034   cat >"conftest.$ac_ext" <<_ACEOF
14035 #line 14035 "configure"
14036 #include "confdefs.h"
14037 #include <string.h>
14038
14039 _ACEOF
14040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14041   $EGREP "memchr" >/dev/null 2>&1; then
14042   :
14043 else
14044   ac_cv_header_stdc=no
14045 fi
14046 rm -rf conftest*
14047
14048 fi
14049
14050 if test $ac_cv_header_stdc = yes; then
14051   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14052   cat >"conftest.$ac_ext" <<_ACEOF
14053 #line 14053 "configure"
14054 #include "confdefs.h"
14055 #include <stdlib.h>
14056
14057 _ACEOF
14058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14059   $EGREP "free" >/dev/null 2>&1; then
14060   :
14061 else
14062   ac_cv_header_stdc=no
14063 fi
14064 rm -rf conftest*
14065
14066 fi
14067
14068 if test $ac_cv_header_stdc = yes; then
14069   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14070   if test "$cross_compiling" = yes; then
14071   :
14072 else
14073   cat >"conftest.$ac_ext" <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076 #include <ctype.h>
14077 #if ((' ' & 0x0FF) == 0x020)
14078 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14079 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14080 #else
14081 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14082                      || ('j' <= (c) && (c) <= 'r') \
14083                      || ('s' <= (c) && (c) <= 'z'))
14084 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14085 #endif
14086
14087 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14088 int
14089 main (void)
14090 {
14091   int i;
14092   for (i = 0; i < 256; i++)
14093     if (XOR (islower (i), ISLOWER (i))
14094         || toupper (i) != TOUPPER (i))
14095       $ac_main_return(2);
14096   $ac_main_return (0);
14097 }
14098 _ACEOF
14099 rm -f "conftest$ac_exeext"
14100 if { (eval echo "$as_me:14100: \"$ac_link\"") >&5
14101   (eval $ac_link) 2>&5
14102   ac_status=$?
14103   echo "$as_me:14103: \$? = $ac_status" >&5
14104   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14105   { (eval echo "$as_me:14105: \"$ac_try\"") >&5
14106   (eval $ac_try) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit "$ac_status"); }; }; then
14110   :
14111 else
14112   echo "$as_me: program exited with status $ac_status" >&5
14113 echo "$as_me: failed program was:" >&5
14114 cat "conftest.$ac_ext" >&5
14115 ac_cv_header_stdc=no
14116 fi
14117 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14118 fi
14119 fi
14120 fi
14121 echo "$as_me:14121: result: $ac_cv_header_stdc" >&5
14122 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14123 if test $ac_cv_header_stdc = yes; then
14124
14125 cat >>confdefs.h <<\EOF
14126 #define STDC_HEADERS 1
14127 EOF
14128
14129 fi
14130
14131 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14132
14133 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14134                   inttypes.h stdint.h unistd.h
14135 do
14136 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14137 echo "$as_me:14137: checking for $ac_header" >&5
14138 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14139 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14140   echo $ECHO_N "(cached) $ECHO_C" >&6
14141 else
14142   cat >"conftest.$ac_ext" <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145 $ac_includes_default
14146 #include <$ac_header>
14147 _ACEOF
14148 rm -f "conftest.$ac_objext"
14149 if { (eval echo "$as_me:14149: \"$ac_compile\"") >&5
14150   (eval $ac_compile) 2>&5
14151   ac_status=$?
14152   echo "$as_me:14152: \$? = $ac_status" >&5
14153   (exit "$ac_status"); } &&
14154          { ac_try='test -s "conftest.$ac_objext"'
14155   { (eval echo "$as_me:14155: \"$ac_try\"") >&5
14156   (eval $ac_try) 2>&5
14157   ac_status=$?
14158   echo "$as_me:14158: \$? = $ac_status" >&5
14159   (exit "$ac_status"); }; }; then
14160   eval "$as_ac_Header=yes"
14161 else
14162   echo "$as_me: failed program was:" >&5
14163 cat "conftest.$ac_ext" >&5
14164 eval "$as_ac_Header=no"
14165 fi
14166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14167 fi
14168 echo "$as_me:14168: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14169 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14170 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14171   cat >>confdefs.h <<EOF
14172 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14173 EOF
14174
14175 fi
14176 done
14177
14178 echo "$as_me:14178: checking for signed char" >&5
14179 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14180 if test "${ac_cv_type_signed_char+set}" = set; then
14181   echo $ECHO_N "(cached) $ECHO_C" >&6
14182 else
14183   cat >"conftest.$ac_ext" <<_ACEOF
14184 #line 14184 "configure"
14185 #include "confdefs.h"
14186 $ac_includes_default
14187 int
14188 main (void)
14189 {
14190 if ((signed char *) 0)
14191   return 0;
14192 if (sizeof (signed char))
14193   return 0;
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f "conftest.$ac_objext"
14199 if { (eval echo "$as_me:14199: \"$ac_compile\"") >&5
14200   (eval $ac_compile) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit "$ac_status"); } &&
14204          { ac_try='test -s "conftest.$ac_objext"'
14205   { (eval echo "$as_me:14205: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit "$ac_status"); }; }; then
14210   ac_cv_type_signed_char=yes
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 cat "conftest.$ac_ext" >&5
14214 ac_cv_type_signed_char=no
14215 fi
14216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14217 fi
14218 echo "$as_me:14218: result: $ac_cv_type_signed_char" >&5
14219 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14220
14221 echo "$as_me:14221: checking size of signed char" >&5
14222 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14223 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   if test "$ac_cv_type_signed_char" = yes; then
14227   if test "$cross_compiling" = yes; then
14228   # Depending upon the size, compute the lo and hi bounds.
14229 cat >"conftest.$ac_ext" <<_ACEOF
14230 #line 14230 "configure"
14231 #include "confdefs.h"
14232 $ac_includes_default
14233 int
14234 main (void)
14235 {
14236 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14237   ;
14238   return 0;
14239 }
14240 _ACEOF
14241 rm -f "conftest.$ac_objext"
14242 if { (eval echo "$as_me:14242: \"$ac_compile\"") >&5
14243   (eval $ac_compile) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit "$ac_status"); } &&
14247          { ac_try='test -s "conftest.$ac_objext"'
14248   { (eval echo "$as_me:14248: \"$ac_try\"") >&5
14249   (eval $ac_try) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit "$ac_status"); }; }; then
14253   ac_lo=0 ac_mid=0
14254   while :; do
14255     cat >"conftest.$ac_ext" <<_ACEOF
14256 #line 14256 "configure"
14257 #include "confdefs.h"
14258 $ac_includes_default
14259 int
14260 main (void)
14261 {
14262 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14263   ;
14264   return 0;
14265 }
14266 _ACEOF
14267 rm -f "conftest.$ac_objext"
14268 if { (eval echo "$as_me:14268: \"$ac_compile\"") >&5
14269   (eval $ac_compile) 2>&5
14270   ac_status=$?
14271   echo "$as_me:14271: \$? = $ac_status" >&5
14272   (exit "$ac_status"); } &&
14273          { ac_try='test -s "conftest.$ac_objext"'
14274   { (eval echo "$as_me:14274: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:14277: \$? = $ac_status" >&5
14278   (exit "$ac_status"); }; }; then
14279   ac_hi=$ac_mid; break
14280 else
14281   echo "$as_me: failed program was:" >&5
14282 cat "conftest.$ac_ext" >&5
14283 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14284 fi
14285 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14286   done
14287 else
14288   echo "$as_me: failed program was:" >&5
14289 cat "conftest.$ac_ext" >&5
14290 ac_hi=-1 ac_mid=-1
14291   while :; do
14292     cat >"conftest.$ac_ext" <<_ACEOF
14293 #line 14293 "configure"
14294 #include "confdefs.h"
14295 $ac_includes_default
14296 int
14297 main (void)
14298 {
14299 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f "conftest.$ac_objext"
14305 if { (eval echo "$as_me:14305: \"$ac_compile\"") >&5
14306   (eval $ac_compile) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit "$ac_status"); } &&
14310          { ac_try='test -s "conftest.$ac_objext"'
14311   { (eval echo "$as_me:14311: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit "$ac_status"); }; }; then
14316   ac_lo=$ac_mid; break
14317 else
14318   echo "$as_me: failed program was:" >&5
14319 cat "conftest.$ac_ext" >&5
14320 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14321 fi
14322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14323   done
14324 fi
14325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14326 # Binary search between lo and hi bounds.
14327 while test "x$ac_lo" != "x$ac_hi"; do
14328   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14329   cat >"conftest.$ac_ext" <<_ACEOF
14330 #line 14330 "configure"
14331 #include "confdefs.h"
14332 $ac_includes_default
14333 int
14334 main (void)
14335 {
14336 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14337   ;
14338   return 0;
14339 }
14340 _ACEOF
14341 rm -f "conftest.$ac_objext"
14342 if { (eval echo "$as_me:14342: \"$ac_compile\"") >&5
14343   (eval $ac_compile) 2>&5
14344   ac_status=$?
14345   echo "$as_me:14345: \$? = $ac_status" >&5
14346   (exit "$ac_status"); } &&
14347          { ac_try='test -s "conftest.$ac_objext"'
14348   { (eval echo "$as_me:14348: \"$ac_try\"") >&5
14349   (eval $ac_try) 2>&5
14350   ac_status=$?
14351   echo "$as_me:14351: \$? = $ac_status" >&5
14352   (exit "$ac_status"); }; }; then
14353   ac_hi=$ac_mid
14354 else
14355   echo "$as_me: failed program was:" >&5
14356 cat "conftest.$ac_ext" >&5
14357 ac_lo=`expr "$ac_mid" + 1`
14358 fi
14359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14360 done
14361 ac_cv_sizeof_signed_char=$ac_lo
14362 else
14363   if test "$cross_compiling" = yes; then
14364   { { echo "$as_me:14364: error: cannot run test program while cross compiling" >&5
14365 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14366    { (exit 1); exit 1; }; }
14367 else
14368   cat >"conftest.$ac_ext" <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14371 $ac_includes_default
14372 int
14373 main (void)
14374 {
14375 FILE *f = fopen ("conftest.val", "w");
14376 if (!f)
14377   $ac_main_return (1);
14378 fprintf (f, "%ld", (long)(sizeof (signed char)));
14379 fclose (f);
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 rm -f "conftest$ac_exeext"
14385 if { (eval echo "$as_me:14385: \"$ac_link\"") >&5
14386   (eval $ac_link) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14390   { (eval echo "$as_me:14390: \"$ac_try\"") >&5
14391   (eval $ac_try) 2>&5
14392   ac_status=$?
14393   echo "$as_me:14393: \$? = $ac_status" >&5
14394   (exit "$ac_status"); }; }; then
14395   ac_cv_sizeof_signed_char=`cat conftest.val`
14396 else
14397   echo "$as_me: program exited with status $ac_status" >&5
14398 echo "$as_me: failed program was:" >&5
14399 cat "conftest.$ac_ext" >&5
14400 fi
14401 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14402 fi
14403 fi
14404 rm -f conftest.val
14405 else
14406   ac_cv_sizeof_signed_char=0
14407 fi
14408 fi
14409 echo "$as_me:14409: result: $ac_cv_sizeof_signed_char" >&5
14410 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14411 cat >>confdefs.h <<EOF
14412 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14413 EOF
14414
14415 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14416         NCURSES_SBOOL="signed char"
14417 else
14418         NCURSES_SBOOL="char"
14419 fi
14420 echo "$as_me:14420: checking if you want to use signed Boolean array in term.h" >&5
14421 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14422
14423 # Check whether --enable-signed-char or --disable-signed-char was given.
14424 if test "${enable_signed_char+set}" = set; then
14425   enableval="$enable_signed_char"
14426   with_signed_char=$enableval
14427 else
14428   with_signed_char=no
14429 fi;
14430 echo "$as_me:14430: result: $with_signed_char" >&5
14431 echo "${ECHO_T}$with_signed_char" >&6
14432 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14433
14434 ###   use option --with-tparm-arg to override tparm's argument type
14435 echo "$as_me:14435: checking for type of tparm args" >&5
14436 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14437
14438 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14439 if test "${with_tparm_arg+set}" = set; then
14440   withval="$with_tparm_arg"
14441   NCURSES_TPARM_ARG="$withval"
14442 else
14443   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14444 fi;
14445 echo "$as_me:14445: result: $NCURSES_TPARM_ARG" >&5
14446 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14447
14448 ### Enable compiling-in rcs id's
14449 echo "$as_me:14449: checking if RCS identifiers should be compiled-in" >&5
14450 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14451
14452 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14453 if test "${with_rcs_ids+set}" = set; then
14454   withval="$with_rcs_ids"
14455   with_rcs_ids=$withval
14456 else
14457   with_rcs_ids=no
14458 fi;
14459 echo "$as_me:14459: result: $with_rcs_ids" >&5
14460 echo "${ECHO_T}$with_rcs_ids" >&6
14461 test "x$with_rcs_ids" = xyes &&
14462 cat >>confdefs.h <<\EOF
14463 #define USE_RCS_IDS 1
14464 EOF
14465
14466 ###############################################################################
14467
14468 echo "$as_me:14468: checking format of man-pages" >&5
14469 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14470
14471 # Check whether --with-manpage-format or --without-manpage-format was given.
14472 if test "${with_manpage_format+set}" = set; then
14473   withval="$with_manpage_format"
14474   MANPAGE_FORMAT=$withval
14475 else
14476   MANPAGE_FORMAT=unknown
14477 fi;
14478
14479 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14480 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14481
14482 cf_unknown=
14483
14484 case "$MANPAGE_FORMAT" in
14485 (unknown)
14486         if test -z "$MANPATH" ; then
14487                 MANPATH="/usr/man:/usr/share/man"
14488         fi
14489
14490         # look for the 'date' man-page (it is most likely to be installed!)
14491         MANPAGE_FORMAT=
14492         cf_preform="no"
14493         cf_catonly="yes"
14494         cf_example="date"
14495
14496         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14497         for cf_dir in $MANPATH; do
14498                 test -z "$cf_dir" && cf_dir=/usr/man
14499                 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
14500                 do
14501                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14502                         if test "x$cf_test" = "x$cf_name" ; then
14503
14504                                 case "$cf_name" in
14505                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14506                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14507                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14508                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14509                                 esac
14510
14511                                 case "$cf_name" in
14512                                 ($cf_dir/man*)
14513                                         cf_catonly=no
14514                                         ;;
14515                                 ($cf_dir/cat*)
14516                                         cf_preform=yes
14517                                         ;;
14518                                 esac
14519                                 break
14520                         fi
14521
14522                         # if we found a match in either man* or cat*, stop looking
14523                         if test -n "$MANPAGE_FORMAT" ; then
14524                                 cf_found=no
14525                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14526                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14527                                 case "$cf_name" in
14528                                 ($cf_dir/cat*)
14529                                         cf_found=yes
14530                                         ;;
14531                                 esac
14532                                 test "$cf_found" = yes && break
14533                         fi
14534                 done
14535                 # only check the first directory in $MANPATH where we find manpages
14536                 if test -n "$MANPAGE_FORMAT" ; then
14537                         break
14538                 fi
14539         done
14540         # if we did not find the example, just assume it is normal
14541         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14542         IFS="$ac_save_ifs"
14543         ;;
14544 (*)
14545         for cf_option in $MANPAGE_FORMAT; do
14546         case "$cf_option" in
14547         (gzip|compress|BSDI|normal|formatted|catonly)
14548                 ;;
14549         (*)
14550                 cf_unknown="$cf_unknown $cf_option"
14551                 ;;
14552         esac
14553         done
14554         ;;
14555 esac
14556
14557 echo "$as_me:14557: result: $MANPAGE_FORMAT" >&5
14558 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14559 if test -n "$cf_unknown" ; then
14560         { echo "$as_me:14560: WARNING: Unexpected manpage-format $cf_unknown" >&5
14561 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14562 fi
14563
14564 echo "$as_me:14564: checking for manpage renaming" >&5
14565 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14566
14567 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14568 if test "${with_manpage_renames+set}" = set; then
14569   withval="$with_manpage_renames"
14570   MANPAGE_RENAMES=$withval
14571 else
14572   MANPAGE_RENAMES=yes
14573 fi;
14574
14575 case ".$MANPAGE_RENAMES" in
14576 (.no)
14577         ;;
14578 (.|.yes)
14579         # Debian 'man' program?
14580         if test -f /etc/debian_version ; then
14581                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14582         else
14583                 MANPAGE_RENAMES=no
14584         fi
14585         ;;
14586 esac
14587
14588 if test "$MANPAGE_RENAMES" != no ; then
14589         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14590                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14591         elif test ! -f "$MANPAGE_RENAMES" ; then
14592                 { { echo "$as_me:14592: error: not a filename: $MANPAGE_RENAMES" >&5
14593 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14594    { (exit 1); exit 1; }; }
14595         fi
14596
14597         test ! -d man && mkdir man
14598
14599         # Construct a sed-script to perform renaming within man-pages
14600         if test -n "$MANPAGE_RENAMES" ; then
14601                 test ! -d man && mkdir man
14602                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14603         fi
14604 fi
14605
14606 echo "$as_me:14606: result: $MANPAGE_RENAMES" >&5
14607 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14608
14609 echo "$as_me:14609: checking if manpage aliases will be installed" >&5
14610 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14611
14612 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14613 if test "${with_manpage_aliases+set}" = set; then
14614   withval="$with_manpage_aliases"
14615   MANPAGE_ALIASES=$withval
14616 else
14617   MANPAGE_ALIASES=yes
14618 fi;
14619
14620 echo "$as_me:14620: result: $MANPAGE_ALIASES" >&5
14621 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14622
14623 case "x$LN_S" in
14624 (xln*)
14625         cf_use_symlinks=yes
14626         ;;
14627 (*)
14628         cf_use_symlinks=no
14629         ;;
14630 esac
14631
14632 MANPAGE_SYMLINKS=no
14633 if test "$MANPAGE_ALIASES" = yes ; then
14634 echo "$as_me:14634: checking if manpage symlinks should be used" >&5
14635 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14636
14637 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14638 if test "${with_manpage_symlinks+set}" = set; then
14639   withval="$with_manpage_symlinks"
14640   MANPAGE_SYMLINKS=$withval
14641 else
14642   MANPAGE_SYMLINKS=$cf_use_symlinks
14643 fi;
14644
14645 if test "$$cf_use_symlinks" = no; then
14646 if test "$MANPAGE_SYMLINKS" = yes ; then
14647         { echo "$as_me:14647: WARNING: cannot make symlinks" >&5
14648 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14649         MANPAGE_SYMLINKS=no
14650 fi
14651 fi
14652
14653 echo "$as_me:14653: result: $MANPAGE_SYMLINKS" >&5
14654 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14655 fi
14656
14657 echo "$as_me:14657: checking for manpage tbl" >&5
14658 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14659
14660 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14661 if test "${with_manpage_tbl+set}" = set; then
14662   withval="$with_manpage_tbl"
14663   MANPAGE_TBL=$withval
14664 else
14665   MANPAGE_TBL=no
14666 fi;
14667
14668 echo "$as_me:14668: result: $MANPAGE_TBL" >&5
14669 echo "${ECHO_T}$MANPAGE_TBL" >&6
14670
14671 if test "$prefix" = "NONE" ; then
14672         cf_prefix="$ac_default_prefix"
14673 else
14674         cf_prefix="$prefix"
14675 fi
14676
14677 case "$MANPAGE_FORMAT" in
14678 (*catonly*)
14679         cf_format=yes
14680         cf_inboth=no
14681         ;;
14682 (*formatted*)
14683         cf_format=yes
14684         cf_inboth=yes
14685         ;;
14686 (*)
14687         cf_format=no
14688         cf_inboth=no
14689         ;;
14690 esac
14691
14692 test ! -d man && mkdir man
14693
14694 cf_so_strip=
14695 cf_compress=
14696 case "$MANPAGE_FORMAT" in
14697 (*compress*)
14698         cf_so_strip="Z"
14699         cf_compress=compress
14700         ;;
14701 (*gzip*)
14702         cf_so_strip="gz"
14703         cf_compress=gzip
14704         ;;
14705 esac
14706
14707 cf_edit_man=./edit_man.sh
14708 cf_man_alias=`pwd`/man_alias.sed
14709
14710 cat >$cf_edit_man <<CF_EOF
14711 #! $SHELL
14712 # this script is generated by the configure-script CF_MAN_PAGES macro.
14713
14714 prefix="$cf_prefix"
14715 datarootdir="$datarootdir"
14716 datadir="$datadir"
14717
14718 NCURSES_MAJOR="$NCURSES_MAJOR"
14719 NCURSES_MINOR="$NCURSES_MINOR"
14720 NCURSES_PATCH="$NCURSES_PATCH"
14721
14722 NCURSES_OSPEED="$NCURSES_OSPEED"
14723 TERMINFO="$TERMINFO"
14724
14725 INSTALL="$INSTALL"
14726 INSTALL_DATA="$INSTALL_DATA"
14727
14728 transform="$program_transform_name"
14729
14730 TMP=\${TMPDIR:=/tmp}/man\$\$
14731 trap "rm -f \$TMP" 0 1 2 3 15
14732
14733 form=\$1
14734 shift || exit 1
14735
14736 verb=\$1
14737 shift || exit 1
14738
14739 mandir=\$1
14740 shift || exit 1
14741
14742 srcdir=\$1
14743 top_srcdir=\$srcdir/..
14744 shift || exit 1
14745
14746 if test "\$form" = normal ; then
14747         if test "$cf_format" = yes ; then
14748         if test "$cf_inboth" = no ; then
14749                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14750                 exit $?
14751         fi
14752         fi
14753         cf_subdir=\$mandir/man
14754         cf_tables=$MANPAGE_TBL
14755 else
14756         cf_subdir=\$mandir/cat
14757         cf_tables=yes
14758 fi
14759
14760 # process the list of source-files
14761 for i in "\$@" ; do
14762 case \$i in
14763 (*.orig|*.rej) ;;
14764 (*.[0-9]*)
14765         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14766         if test "\$verb" = installing ; then
14767         if test ! -d "\$cf_subdir\${section}" ; then
14768                 mkdir -p "\$cf_subdir\$section"
14769         fi
14770         fi
14771
14772         # replace variables in man page
14773         if test ! -f "$cf_man_alias" ; then
14774 cat >>$cf_man_alias <<-CF_EOF2
14775                 s,@DATADIR@,\$datadir,g
14776                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14777                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14778                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14779                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14780                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14781                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14782 CF_EOF
14783
14784         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14785         do
14786                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14787                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14788 cat >>$cf_edit_man <<-CF_EOF
14789                 s,@$cf_NAME@,$cf_name,g
14790 CF_EOF
14791         done
14792
14793 cat >>$cf_edit_man <<CF_EOF
14794 CF_EOF2
14795                 echo "...made $cf_man_alias"
14796         fi
14797
14798         aliases=
14799         cf_source=\`basename "\$i"\`
14800         inalias=\$cf_source
14801         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14802         if test ! -f "\$inalias" ; then
14803                 echo ".. skipped \$cf_source"
14804                 continue
14805         fi
14806 CF_EOF
14807
14808 if test "$MANPAGE_ALIASES" != no ; then
14809 cat >>$cf_edit_man <<CF_EOF
14810         nCurses=ignore.3x
14811         test "$with_curses_h" = yes && nCurses=ncurses.3x
14812         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14813 CF_EOF
14814 fi
14815
14816 if test "$MANPAGE_RENAMES" = no ; then
14817 cat >>$cf_edit_man <<CF_EOF
14818         # perform program transformations for section 1 man pages
14819         if test \$section = 1 ; then
14820                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14821         else
14822                 cf_target=\$cf_subdir\${section}/\$cf_source
14823         fi
14824 CF_EOF
14825 else
14826 cat >>$cf_edit_man <<CF_EOF
14827         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14828         if test -z "\$cf_target" ; then
14829                 echo "? missing rename for \$cf_source"
14830                 cf_target="\$cf_source"
14831         fi
14832         cf_target="\$cf_subdir\${section}/\${cf_target}"
14833
14834 CF_EOF
14835 fi
14836
14837 cat >>$cf_edit_man <<CF_EOF
14838         sed     -f "$cf_man_alias" \\
14839 CF_EOF
14840
14841 if test -f "$MANPAGE_RENAMES" ; then
14842 cat >>$cf_edit_man <<CF_EOF
14843                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14844 CF_EOF
14845 else
14846 cat >>$cf_edit_man <<CF_EOF
14847                 < "\$i" >\$TMP
14848 CF_EOF
14849 fi
14850
14851 cat >>$cf_edit_man <<CF_EOF
14852 if test \$cf_tables = yes ; then
14853         tbl \$TMP >\$TMP.out
14854         mv \$TMP.out \$TMP
14855 fi
14856 CF_EOF
14857
14858 if test "$with_overwrite" != yes ; then
14859 cat >>$cf_edit_man <<CF_EOF
14860         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14861         mv \$TMP.out \$TMP
14862 CF_EOF
14863 fi
14864
14865 if test "$with_curses_h" != yes ; then
14866 cat >>$cf_edit_man <<CF_EOF
14867         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14868         mv \$TMP.out \$TMP
14869 CF_EOF
14870 fi
14871
14872 cat >>$cf_edit_man <<CF_EOF
14873         if test "\$form" = format ; then
14874                 nroff -man \$TMP >\$TMP.out
14875                 mv \$TMP.out \$TMP
14876         fi
14877 CF_EOF
14878
14879 if test -n "$cf_compress" ; then
14880 cat >>$cf_edit_man <<CF_EOF
14881         if test "\$verb" = installing ; then
14882         if ( "$cf_compress" -f \$TMP )
14883         then
14884                 mv \$TMP.$cf_so_strip \$TMP
14885         fi
14886         fi
14887         cf_target="\$cf_target.$cf_so_strip"
14888 CF_EOF
14889 fi
14890
14891 case "$MANPAGE_FORMAT" in
14892 (*BSDI*)
14893 cat >>$cf_edit_man <<CF_EOF
14894         if test "\$form" = format ; then
14895                 # BSDI installs only .0 suffixes in the cat directories
14896                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14897         fi
14898 CF_EOF
14899   ;;
14900 esac
14901
14902 cat >>$cf_edit_man <<CF_EOF
14903         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14904         if test "\$verb" = installing ; then
14905                 echo "\$verb \$cf_target"
14906                 \$INSTALL_DATA \$TMP "\$cf_target"
14907                 test -d "\$cf_subdir\${section}" &&
14908                 test -n "\$aliases" && (
14909                         cd "\$cf_subdir\${section}" && (
14910                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14911                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14912                                 cf_target=\`basename "\$cf_target"\`
14913                                 for cf_alias in \$aliases
14914                                 do
14915                                         if test "\$section" = 1 ; then
14916                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14917                                         fi
14918
14919                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14920                                                 if test -f "\$cf_alias\${suffix}" ; then
14921                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14922                                                         then
14923                                                                 continue
14924                                                         fi
14925                                                 fi
14926                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14927 CF_EOF
14928 case "x$LN_S" in
14929 (*-f)
14930 cat >>$cf_edit_man <<CF_EOF
14931                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14932 CF_EOF
14933         ;;
14934 (*)
14935 cat >>$cf_edit_man <<CF_EOF
14936                                                 rm -f "\$cf_alias\${suffix}"
14937                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14938 CF_EOF
14939         ;;
14940 esac
14941 cat >>$cf_edit_man <<CF_EOF
14942                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14943                                                 echo ".so \$cf_source" >\$TMP
14944 CF_EOF
14945 if test -n "$cf_compress" ; then
14946 cat >>$cf_edit_man <<CF_EOF
14947                                                 if test -n "$cf_so_strip" ; then
14948                                                         "$cf_compress" -f \$TMP
14949                                                         mv \$TMP.$cf_so_strip \$TMP
14950                                                 fi
14951 CF_EOF
14952 fi
14953 cat >>$cf_edit_man <<CF_EOF
14954                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14955                                                 rm -f "\$cf_alias\${suffix}"
14956                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14957                                         fi
14958                                 done
14959                         )
14960                 )
14961         elif test "\$verb" = removing ; then
14962                 test -f "\$cf_target" && (
14963                         echo "\$verb \$cf_target"
14964                         rm -f "\$cf_target"
14965                 )
14966                 test -d "\$cf_subdir\${section}" &&
14967                 test -n "\$aliases" && (
14968                         cd "\$cf_subdir\${section}" && (
14969                                 for cf_alias in \$aliases
14970                                 do
14971                                         if test "\$section" = 1 ; then
14972                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14973                                         fi
14974
14975                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14976                                         rm -f "\$cf_alias\${suffix}"
14977                                 done
14978                         )
14979                 )
14980         else
14981 #               echo ".hy 0"
14982                 cat \$TMP
14983         fi
14984         ;;
14985 esac
14986 done
14987
14988 if test "$cf_inboth" = yes ; then
14989 if test "\$form" != format ; then
14990         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14991 fi
14992 fi
14993
14994 exit 0
14995 CF_EOF
14996 chmod 755 "$cf_edit_man"
14997
14998 ###############################################################################
14999
15000 ### Note that some functions (such as const) are normally disabled anyway.
15001 echo "$as_me:15001: checking if you want to build with function extensions" >&5
15002 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15003
15004 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15005 if test "${enable_ext_funcs+set}" = set; then
15006   enableval="$enable_ext_funcs"
15007   with_ext_funcs=$enableval
15008 else
15009   with_ext_funcs=yes
15010 fi;
15011 echo "$as_me:15011: result: $with_ext_funcs" >&5
15012 echo "${ECHO_T}$with_ext_funcs" >&6
15013 if test "x$with_ext_funcs" = xyes ; then
15014         NCURSES_EXT_FUNCS=1
15015
15016 cat >>confdefs.h <<\EOF
15017 #define NCURSES_EXT_FUNCS 1
15018 EOF
15019
15020 cat >>confdefs.h <<\EOF
15021 #define HAVE_ASSUME_DEFAULT_COLORS 1
15022 EOF
15023
15024 cat >>confdefs.h <<\EOF
15025 #define HAVE_CURSES_VERSION 1
15026 EOF
15027
15028 cat >>confdefs.h <<\EOF
15029 #define HAVE_HAS_KEY 1
15030 EOF
15031
15032 cat >>confdefs.h <<\EOF
15033 #define HAVE_RESIZETERM 1
15034 EOF
15035
15036 cat >>confdefs.h <<\EOF
15037 #define HAVE_RESIZE_TERM 1
15038 EOF
15039
15040 cat >>confdefs.h <<\EOF
15041 #define HAVE_TERM_ENTRY_H 1
15042 EOF
15043
15044 cat >>confdefs.h <<\EOF
15045 #define HAVE_USE_DEFAULT_COLORS 1
15046 EOF
15047
15048 cat >>confdefs.h <<\EOF
15049 #define HAVE_USE_EXTENDED_NAMES 1
15050 EOF
15051
15052 cat >>confdefs.h <<\EOF
15053 #define HAVE_USE_SCREEN 1
15054 EOF
15055
15056 cat >>confdefs.h <<\EOF
15057 #define HAVE_USE_WINDOW 1
15058 EOF
15059
15060 cat >>confdefs.h <<\EOF
15061 #define HAVE_WRESIZE 1
15062 EOF
15063
15064         GENERATED_EXT_FUNCS=generated
15065         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15066 else
15067         NCURSES_EXT_FUNCS=0
15068         GENERATED_EXT_FUNCS=
15069 fi
15070
15071 echo "$as_me:15071: checking if you want to build with SCREEN extensions" >&5
15072 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15073
15074 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15075 if test "${enable_sp_funcs+set}" = set; then
15076   enableval="$enable_sp_funcs"
15077   with_sp_funcs=$enableval
15078 else
15079   with_sp_funcs=$cf_dft_ext_spfuncs
15080 fi;
15081 echo "$as_me:15081: result: $with_sp_funcs" >&5
15082 echo "${ECHO_T}$with_sp_funcs" >&6
15083 if test "x$with_sp_funcs" = xyes ; then
15084         NCURSES_SP_FUNCS=1
15085
15086 cat >>confdefs.h <<\EOF
15087 #define NCURSES_SP_FUNCS 1
15088 EOF
15089
15090 cat >>confdefs.h <<\EOF
15091 #define HAVE_TPUTS_SP 1
15092 EOF
15093
15094         GENERATED_SP_FUNCS=generated
15095 else
15096         NCURSES_SP_FUNCS=0
15097         GENERATED_SP_FUNCS=
15098 fi
15099
15100 echo "$as_me:15100: checking if you want to build with terminal-driver" >&5
15101 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15102
15103 # Check whether --enable-term-driver or --disable-term-driver was given.
15104 if test "${enable_term_driver+set}" = set; then
15105   enableval="$enable_term_driver"
15106   with_term_driver=$enableval
15107 else
15108   with_term_driver=no
15109 fi;
15110 echo "$as_me:15110: result: $with_term_driver" >&5
15111 echo "${ECHO_T}$with_term_driver" >&6
15112 if test "x$with_term_driver" = xyes ; then
15113
15114 cat >>confdefs.h <<\EOF
15115 #define USE_TERM_DRIVER 1
15116 EOF
15117
15118         if test "x$with_termlib" != xno ; then
15119                 { { echo "$as_me:15119: error: The term-driver option conflicts with the termlib option" >&5
15120 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15121    { (exit 1); exit 1; }; }
15122         fi
15123         if test "x$with_sp_funcs" != xyes ; then
15124                 { { echo "$as_me:15124: error: The term-driver option relies upon sp-funcs" >&5
15125 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15126    { (exit 1); exit 1; }; }
15127         fi
15128 fi
15129
15130 ###   use option --enable-const to turn on use of const beyond that in XSI.
15131 echo "$as_me:15131: checking for extended use of const keyword" >&5
15132 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15133
15134 # Check whether --enable-const or --disable-const was given.
15135 if test "${enable_const+set}" = set; then
15136   enableval="$enable_const"
15137   with_ext_const=$enableval
15138 else
15139   with_ext_const=$cf_dft_ext_const
15140 fi;
15141 echo "$as_me:15141: result: $with_ext_const" >&5
15142 echo "${ECHO_T}$with_ext_const" >&6
15143 NCURSES_CONST='/*nothing*/'
15144 if test "x$with_ext_const" = xyes ; then
15145         NCURSES_CONST=const
15146 fi
15147
15148 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15149 echo "$as_me:15149: checking if you want to use extended colors" >&5
15150 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15151
15152 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15153 if test "${enable_ext_colors+set}" = set; then
15154   enableval="$enable_ext_colors"
15155   with_ext_colors=$enableval
15156 else
15157   with_ext_colors=$cf_dft_ext_colors
15158 fi;
15159 echo "$as_me:15159: result: $with_ext_colors" >&5
15160 echo "${ECHO_T}$with_ext_colors" >&6
15161 NCURSES_EXT_COLORS=0
15162 if test "x$with_ext_colors" = xyes ; then
15163         if test "x$with_widec" != xyes ; then
15164                 { echo "$as_me:15164: WARNING: This option applies only to wide-character library" >&5
15165 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15166         else
15167                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15168
15169 if test "${with_abi_version+set}" != set; then
15170         case "$cf_cv_rel_version" in
15171         (5.*)
15172                 cf_cv_rel_version=6.0
15173                 cf_cv_abi_version=6
15174                 { echo "$as_me:15174: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15175 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15176                 ;;
15177         esac
15178 fi
15179
15180                 NCURSES_EXT_COLORS=1
15181
15182 cat >>confdefs.h <<\EOF
15183 #define NCURSES_EXT_COLORS 1
15184 EOF
15185
15186 cat >>confdefs.h <<\EOF
15187 #define HAVE_ALLOC_PAIR 1
15188 EOF
15189
15190 cat >>confdefs.h <<\EOF
15191 #define HAVE_INIT_EXTENDED_COLOR 1
15192 EOF
15193
15194 cat >>confdefs.h <<\EOF
15195 #define HAVE_RESET_COLOR_PAIRS 1
15196 EOF
15197
15198         fi
15199 fi
15200
15201 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15202 echo "$as_me:15202: checking if you want to use extended mouse encoding" >&5
15203 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15204
15205 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15206 if test "${enable_ext_mouse+set}" = set; then
15207   enableval="$enable_ext_mouse"
15208   with_ext_mouse=$enableval
15209 else
15210   with_ext_mouse=$cf_dft_ext_mouse
15211 fi;
15212 echo "$as_me:15212: result: $with_ext_mouse" >&5
15213 echo "${ECHO_T}$with_ext_mouse" >&6
15214 NCURSES_MOUSE_VERSION=1
15215 if test "x$with_ext_mouse" = xyes ; then
15216         NCURSES_MOUSE_VERSION=2
15217
15218 if test "${with_abi_version+set}" != set; then
15219         case "$cf_cv_rel_version" in
15220         (5.*)
15221                 cf_cv_rel_version=6.0
15222                 cf_cv_abi_version=6
15223                 { echo "$as_me:15223: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15224 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15225                 ;;
15226         esac
15227 fi
15228
15229 fi
15230
15231 ###   use option --enable-ext-putwin to turn on extended screendumps
15232 echo "$as_me:15232: checking if you want to use extended putwin/screendump" >&5
15233 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15234
15235 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15236 if test "${enable_ext_putwin+set}" = set; then
15237   enableval="$enable_ext_putwin"
15238   with_ext_putwin=$enableval
15239 else
15240   with_ext_putwin=$cf_dft_ext_putwin
15241 fi;
15242 echo "$as_me:15242: result: $with_ext_putwin" >&5
15243 echo "${ECHO_T}$with_ext_putwin" >&6
15244 if test "x$with_ext_putwin" = xyes ; then
15245
15246 cat >>confdefs.h <<\EOF
15247 #define NCURSES_EXT_PUTWIN 1
15248 EOF
15249
15250 fi
15251
15252 echo "$as_me:15252: checking if you want \$NCURSES_NO_PADDING code" >&5
15253 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15254
15255 # Check whether --enable-no-padding or --disable-no-padding was given.
15256 if test "${enable_no_padding+set}" = set; then
15257   enableval="$enable_no_padding"
15258   with_no_padding=$enableval
15259 else
15260   with_no_padding=$with_ext_funcs
15261 fi;
15262 echo "$as_me:15262: result: $with_no_padding" >&5
15263 echo "${ECHO_T}$with_no_padding" >&6
15264 test "x$with_no_padding" = xyes &&
15265 cat >>confdefs.h <<\EOF
15266 #define NCURSES_NO_PADDING 1
15267 EOF
15268
15269 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15270 echo "$as_me:15270: checking if you want SIGWINCH handler" >&5
15271 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15272
15273 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15274 if test "${enable_sigwinch+set}" = set; then
15275   enableval="$enable_sigwinch"
15276   with_sigwinch=$enableval
15277 else
15278   with_sigwinch=$with_ext_funcs
15279 fi;
15280 echo "$as_me:15280: result: $with_sigwinch" >&5
15281 echo "${ECHO_T}$with_sigwinch" >&6
15282 test "x$with_sigwinch" = xyes &&
15283 cat >>confdefs.h <<\EOF
15284 #define USE_SIGWINCH 1
15285 EOF
15286
15287 ###   use option --enable-tcap-names to allow user to define new capabilities
15288 echo "$as_me:15288: checking if you want user-definable terminal capabilities like termcap" >&5
15289 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15290
15291 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15292 if test "${enable_tcap_names+set}" = set; then
15293   enableval="$enable_tcap_names"
15294   with_tcap_names=$enableval
15295 else
15296   with_tcap_names=$with_ext_funcs
15297 fi;
15298 echo "$as_me:15298: result: $with_tcap_names" >&5
15299 echo "${ECHO_T}$with_tcap_names" >&6
15300 NCURSES_XNAMES=0
15301 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15302
15303 ##############################################################################
15304
15305 echo "$as_me:15305: checking if you want to link with the pthread library" >&5
15306 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15307
15308 # Check whether --with-pthread or --without-pthread was given.
15309 if test "${with_pthread+set}" = set; then
15310   withval="$with_pthread"
15311   with_pthread=$withval
15312 else
15313   with_pthread=no
15314 fi;
15315 echo "$as_me:15315: result: $with_pthread" >&5
15316 echo "${ECHO_T}$with_pthread" >&6
15317
15318 if test "$with_pthread" != no ; then
15319         echo "$as_me:15319: checking for pthread.h" >&5
15320 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15321 if test "${ac_cv_header_pthread_h+set}" = set; then
15322   echo $ECHO_N "(cached) $ECHO_C" >&6
15323 else
15324   cat >"conftest.$ac_ext" <<_ACEOF
15325 #line 15325 "configure"
15326 #include "confdefs.h"
15327 #include <pthread.h>
15328 _ACEOF
15329 if { (eval echo "$as_me:15329: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15330   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15331   ac_status=$?
15332   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15333   rm -f conftest.er1
15334   cat conftest.err >&5
15335   echo "$as_me:15335: \$? = $ac_status" >&5
15336   (exit "$ac_status"); } >/dev/null; then
15337   if test -s conftest.err; then
15338     ac_cpp_err=$ac_c_preproc_warn_flag
15339   else
15340     ac_cpp_err=
15341   fi
15342 else
15343   ac_cpp_err=yes
15344 fi
15345 if test -z "$ac_cpp_err"; then
15346   ac_cv_header_pthread_h=yes
15347 else
15348   echo "$as_me: failed program was:" >&5
15349   cat "conftest.$ac_ext" >&5
15350   ac_cv_header_pthread_h=no
15351 fi
15352 rm -f conftest.err "conftest.$ac_ext"
15353 fi
15354 echo "$as_me:15354: result: $ac_cv_header_pthread_h" >&5
15355 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15356 if test "$ac_cv_header_pthread_h" = yes; then
15357
15358 cat >>confdefs.h <<\EOF
15359 #define HAVE_PTHREADS_H 1
15360 EOF
15361
15362         for cf_lib_pthread in pthread c_r
15363         do
15364             echo "$as_me:15364: checking if we can link with the $cf_lib_pthread library" >&5
15365 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15366             cf_save_LIBS="$LIBS"
15367
15368 cf_add_libs="$LIBS"
15369 # reverse order
15370 cf_add_0lib=
15371 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15372 # filter duplicates
15373 for cf_add_1lib in $cf_add_0lib; do
15374         for cf_add_2lib in $cf_add_libs; do
15375                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15376                         cf_add_1lib=
15377                         break
15378                 fi
15379         done
15380         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15381 done
15382 LIBS="$cf_add_libs"
15383
15384             cat >"conftest.$ac_ext" <<_ACEOF
15385 #line 15385 "configure"
15386 #include "confdefs.h"
15387
15388 #include <pthread.h>
15389
15390 int
15391 main (void)
15392 {
15393
15394                 int rc = pthread_create(0,0,0,0);
15395                 int r2 = pthread_mutexattr_settype(0, 0);
15396
15397   ;
15398   return 0;
15399 }
15400 _ACEOF
15401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15402 if { (eval echo "$as_me:15402: \"$ac_link\"") >&5
15403   (eval $ac_link) 2>&5
15404   ac_status=$?
15405   echo "$as_me:15405: \$? = $ac_status" >&5
15406   (exit "$ac_status"); } &&
15407          { ac_try='test -s "conftest$ac_exeext"'
15408   { (eval echo "$as_me:15408: \"$ac_try\"") >&5
15409   (eval $ac_try) 2>&5
15410   ac_status=$?
15411   echo "$as_me:15411: \$? = $ac_status" >&5
15412   (exit "$ac_status"); }; }; then
15413   with_pthread=yes
15414 else
15415   echo "$as_me: failed program was:" >&5
15416 cat "conftest.$ac_ext" >&5
15417 with_pthread=no
15418 fi
15419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15420             LIBS="$cf_save_LIBS"
15421             echo "$as_me:15421: result: $with_pthread" >&5
15422 echo "${ECHO_T}$with_pthread" >&6
15423             test "$with_pthread" = yes && break
15424         done
15425
15426         if test "$with_pthread" = yes ; then
15427
15428 cf_add_libs="$LIBS"
15429 # reverse order
15430 cf_add_0lib=
15431 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15432 # filter duplicates
15433 for cf_add_1lib in $cf_add_0lib; do
15434         for cf_add_2lib in $cf_add_libs; do
15435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15436                         cf_add_1lib=
15437                         break
15438                 fi
15439         done
15440         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15441 done
15442 LIBS="$cf_add_libs"
15443
15444 cat >>confdefs.h <<\EOF
15445 #define HAVE_LIBPTHREADS 1
15446 EOF
15447
15448         else
15449             { { echo "$as_me:15449: error: Cannot link with pthread library" >&5
15450 echo "$as_me: error: Cannot link with pthread library" >&2;}
15451    { (exit 1); exit 1; }; }
15452         fi
15453
15454 fi
15455
15456 fi
15457
15458 if test "x$with_pthread" != xno; then
15459         echo "$as_me:15459: checking for pthread_kill" >&5
15460 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15461 if test "${ac_cv_func_pthread_kill+set}" = set; then
15462   echo $ECHO_N "(cached) $ECHO_C" >&6
15463 else
15464   cat >"conftest.$ac_ext" <<_ACEOF
15465 #line 15465 "configure"
15466 #include "confdefs.h"
15467 #define pthread_kill autoconf_temporary
15468 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15469 #undef pthread_kill
15470
15471 #ifdef __cplusplus
15472 extern "C"
15473 #endif
15474
15475 /* We use char because int might match the return type of a gcc2
15476    builtin and then its argument prototype would still apply.  */
15477 char pthread_kill (void);
15478
15479 int
15480 main (void)
15481 {
15482
15483 /* The GNU C library defines stubs for functions which it implements
15484     to always fail with ENOSYS.  Some functions are actually named
15485     something starting with __ and the normal name is an alias.  */
15486 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15487 #error found stub for pthread_kill
15488 #endif
15489
15490         return pthread_kill ();
15491   ;
15492   return 0;
15493 }
15494 _ACEOF
15495 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15496 if { (eval echo "$as_me:15496: \"$ac_link\"") >&5
15497   (eval $ac_link) 2>&5
15498   ac_status=$?
15499   echo "$as_me:15499: \$? = $ac_status" >&5
15500   (exit "$ac_status"); } &&
15501          { ac_try='test -s "conftest$ac_exeext"'
15502   { (eval echo "$as_me:15502: \"$ac_try\"") >&5
15503   (eval $ac_try) 2>&5
15504   ac_status=$?
15505   echo "$as_me:15505: \$? = $ac_status" >&5
15506   (exit "$ac_status"); }; }; then
15507   ac_cv_func_pthread_kill=yes
15508 else
15509   echo "$as_me: failed program was:" >&5
15510 cat "conftest.$ac_ext" >&5
15511 ac_cv_func_pthread_kill=no
15512 fi
15513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15514 fi
15515 echo "$as_me:15515: result: $ac_cv_func_pthread_kill" >&5
15516 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15517 if test "$ac_cv_func_pthread_kill" = yes; then
15518
15519                 echo "$as_me:15519: checking if you want to allow EINTR in wgetch with pthreads" >&5
15520 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15521
15522 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15523 if test "${enable_pthreads_eintr+set}" = set; then
15524   enableval="$enable_pthreads_eintr"
15525   use_pthreads_eintr=$enableval
15526 else
15527   use_pthreads_eintr=no
15528 fi;
15529                 echo "$as_me:15529: result: $use_pthreads_eintr" >&5
15530 echo "${ECHO_T}$use_pthreads_eintr" >&6
15531                 if test "x$use_pthreads_eintr" = xyes ; then
15532
15533 cat >>confdefs.h <<\EOF
15534 #define USE_PTHREADS_EINTR 1
15535 EOF
15536
15537                 fi
15538 fi
15539
15540         echo "$as_me:15540: checking if you want to use weak-symbols for pthreads" >&5
15541 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15542
15543 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15544 if test "${enable_weak_symbols+set}" = set; then
15545   enableval="$enable_weak_symbols"
15546   use_weak_symbols=$enableval
15547 else
15548   use_weak_symbols=no
15549 fi;
15550         echo "$as_me:15550: result: $use_weak_symbols" >&5
15551 echo "${ECHO_T}$use_weak_symbols" >&6
15552         if test "x$use_weak_symbols" = xyes ; then
15553
15554 echo "$as_me:15554: checking if $CC supports weak symbols" >&5
15555 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15556 if test "${cf_cv_weak_symbols+set}" = set; then
15557   echo $ECHO_N "(cached) $ECHO_C" >&6
15558 else
15559
15560 cat >"conftest.$ac_ext" <<_ACEOF
15561 #line 15561 "configure"
15562 #include "confdefs.h"
15563
15564 #include <stdio.h>
15565 int
15566 main (void)
15567 {
15568
15569 #if defined(__GNUC__)
15570 #  if defined __USE_ISOC99
15571 #    define _cat_pragma(exp)    _Pragma(#exp)
15572 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15573 #  else
15574 #    define _weak_pragma(exp)
15575 #  endif
15576 #  define _declare(name)        __extension__ extern __typeof__(name) name
15577 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15578 #endif
15579
15580 weak_symbol(fopen);
15581
15582   ;
15583   return 0;
15584 }
15585 _ACEOF
15586 rm -f "conftest.$ac_objext"
15587 if { (eval echo "$as_me:15587: \"$ac_compile\"") >&5
15588   (eval $ac_compile) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit "$ac_status"); } &&
15592          { ac_try='test -s "conftest.$ac_objext"'
15593   { (eval echo "$as_me:15593: \"$ac_try\"") >&5
15594   (eval $ac_try) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit "$ac_status"); }; }; then
15598   cf_cv_weak_symbols=yes
15599 else
15600   echo "$as_me: failed program was:" >&5
15601 cat "conftest.$ac_ext" >&5
15602 cf_cv_weak_symbols=no
15603 fi
15604 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15605
15606 fi
15607 echo "$as_me:15607: result: $cf_cv_weak_symbols" >&5
15608 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15609
15610         else
15611                 cf_cv_weak_symbols=no
15612         fi
15613
15614         if test "x$cf_cv_weak_symbols" = xyes ; then
15615
15616 cat >>confdefs.h <<\EOF
15617 #define USE_WEAK_SYMBOLS 1
15618 EOF
15619
15620         fi
15621 fi
15622
15623 PTHREAD=
15624 if test "x$with_pthread" = "xyes" ; then
15625
15626 cat >>confdefs.h <<\EOF
15627 #define USE_PTHREADS 1
15628 EOF
15629
15630         enable_reentrant=yes
15631         if test "x$cf_cv_weak_symbols" = xyes ; then
15632                 PTHREAD=-lpthread
15633
15634 cf_add_libs="$PRIVATE_LIBS"
15635 # reverse order
15636 cf_add_0lib=
15637 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15638 # filter duplicates
15639 for cf_add_1lib in $cf_add_0lib; do
15640         for cf_add_2lib in $cf_add_libs; do
15641                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15642                         cf_add_1lib=
15643                         break
15644                 fi
15645         done
15646         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15647 done
15648 PRIVATE_LIBS="$cf_add_libs"
15649
15650         fi
15651 fi
15652
15653 # Reentrant code has to be opaque; there's little advantage to making ncurses
15654 # opaque outside of that, so there is no --enable-opaque option.  We can use
15655 # this option without --with-pthreads, but this will be always set for
15656 # pthreads.
15657 echo "$as_me:15657: checking if you want reentrant code" >&5
15658 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15659
15660 # Check whether --enable-reentrant or --disable-reentrant was given.
15661 if test "${enable_reentrant+set}" = set; then
15662   enableval="$enable_reentrant"
15663   with_reentrant=$enableval
15664 else
15665   with_reentrant=no
15666 fi;
15667 echo "$as_me:15667: result: $with_reentrant" >&5
15668 echo "${ECHO_T}$with_reentrant" >&6
15669 if test "x$with_reentrant" = xyes ; then
15670         cf_cv_enable_reentrant=1
15671         cf_cv_enable_opaque="NCURSES_INTERNALS"
15672         NCURSES_SIZE_T=int
15673         if test "x$cf_cv_weak_symbols" = xyes ; then
15674
15675 # remove pthread library from $LIBS
15676 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15677
15678 cf_add_libs="$TEST_LIBS"
15679 # reverse order
15680 cf_add_0lib=
15681 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15682 # filter duplicates
15683 for cf_add_1lib in $cf_add_0lib; do
15684         for cf_add_2lib in $cf_add_libs; do
15685                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15686                         cf_add_1lib=
15687                         break
15688                 fi
15689         done
15690         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15691 done
15692 TEST_LIBS="$cf_add_libs"
15693
15694 cf_add_libs="$TEST_LIBS2"
15695 # reverse order
15696 cf_add_0lib=
15697 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15698 # filter duplicates
15699 for cf_add_1lib in $cf_add_0lib; do
15700         for cf_add_2lib in $cf_add_libs; do
15701                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15702                         cf_add_1lib=
15703                         break
15704                 fi
15705         done
15706         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15707 done
15708 TEST_LIBS2="$cf_add_libs"
15709
15710 cf_add_libs="$PRIVATE_LIBS"
15711 # reverse order
15712 cf_add_0lib=
15713 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15714 # filter duplicates
15715 for cf_add_1lib in $cf_add_0lib; do
15716         for cf_add_2lib in $cf_add_libs; do
15717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15718                         cf_add_1lib=
15719                         break
15720                 fi
15721         done
15722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15723 done
15724 PRIVATE_LIBS="$cf_add_libs"
15725
15726         else
15727                 # when not using weak symbols but with_reentrant,
15728                 # add 't' to the library suffix on all platforms
15729                 # except cygwin, where we only do that if ALSO
15730                 # compiling with full thread support.
15731                 case "$host" in
15732                 (*cygwin* | *msys*)
15733                         if test "$with_pthread" = "yes" ; then
15734                                 if test "x$disable_lib_suffixes" = "xno" ; then
15735                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15736                                 fi
15737                         fi ;;
15738                 (*)
15739                         if test "x$disable_lib_suffixes" = "xno" ; then
15740                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15741                         fi
15742                         ;;
15743                 esac
15744         fi
15745
15746 cat >>confdefs.h <<\EOF
15747 #define USE_REENTRANT 1
15748 EOF
15749
15750 if test "${with_abi_version+set}" != set; then
15751         case "$cf_cv_rel_version" in
15752         (5.*)
15753                 cf_cv_rel_version=6.0
15754                 cf_cv_abi_version=6
15755                 { echo "$as_me:15755: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15756 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15757                 ;;
15758         esac
15759 fi
15760
15761 else
15762         cf_cv_enable_reentrant=0
15763         cf_cv_enable_opaque="NCURSES_OPAQUE"
15764         NCURSES_SIZE_T=short
15765 fi
15766
15767 echo "$as_me:15767: checking if you want opaque curses-library structures" >&5
15768 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15769
15770 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15771 if test "${enable_opaque_curses+set}" = set; then
15772   enableval="$enable_opaque_curses"
15773   test "$enableval" != yes && enableval=no
15774         if test "$enableval" != "no" ; then
15775     enable_opaque_curses=yes
15776         else
15777
15778          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15779          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15780
15781         fi
15782 else
15783   enableval=no
15784
15785          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15786          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15787
15788 fi;
15789 echo "$as_me:15789: result: $enable_opaque_curses" >&5
15790 echo "${ECHO_T}$enable_opaque_curses" >&6
15791
15792 test "$cf_cv_enable_reentrant" = 1 && \
15793 test "$enable_opaque_curses" = no && \
15794 { { echo "$as_me:15794: error: reentrant configuration requires opaque library" >&5
15795 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15796    { (exit 1); exit 1; }; }
15797
15798 echo "$as_me:15798: checking if you want opaque form-library structures" >&5
15799 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15800
15801 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15802 if test "${enable_opaque_form+set}" = set; then
15803   enableval="$enable_opaque_form"
15804   enable_opaque_form=yes
15805 else
15806   enable_opaque_form=no
15807 fi;
15808 echo "$as_me:15808: result: $enable_opaque_form" >&5
15809 echo "${ECHO_T}$enable_opaque_form" >&6
15810
15811 echo "$as_me:15811: checking if you want opaque menu-library structures" >&5
15812 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15813
15814 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15815 if test "${enable_opaque_menu+set}" = set; then
15816   enableval="$enable_opaque_menu"
15817   enable_opaque_menu=yes
15818 else
15819   enable_opaque_menu=no
15820 fi;
15821 echo "$as_me:15821: result: $enable_opaque_menu" >&5
15822 echo "${ECHO_T}$enable_opaque_menu" >&6
15823
15824 echo "$as_me:15824: checking if you want opaque panel-library structures" >&5
15825 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15826
15827 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15828 if test "${enable_opaque_panel+set}" = set; then
15829   enableval="$enable_opaque_panel"
15830   enable_opaque_panel=yes
15831 else
15832   enable_opaque_panel=no
15833 fi;
15834 echo "$as_me:15834: result: $enable_opaque_panel" >&5
15835 echo "${ECHO_T}$enable_opaque_panel" >&6
15836
15837 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15838 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15839 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15840 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15841
15842 ### Allow using a different wrap-prefix
15843 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15844         echo "$as_me:15844: checking for prefix used to wrap public variables" >&5
15845 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15846
15847 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15848 if test "${with_wrap_prefix+set}" = set; then
15849   withval="$with_wrap_prefix"
15850   NCURSES_WRAP_PREFIX=$withval
15851 else
15852   NCURSES_WRAP_PREFIX=_nc_
15853 fi;
15854         echo "$as_me:15854: result: $NCURSES_WRAP_PREFIX" >&5
15855 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15856 else
15857         NCURSES_WRAP_PREFIX=_nc_
15858 fi
15859
15860 cat >>confdefs.h <<EOF
15861 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15862 EOF
15863
15864 ###############################################################################
15865 # These options are relatively safe to experiment with.
15866
15867 echo "$as_me:15867: checking if you want all development code" >&5
15868 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15869
15870 # Check whether --with-develop or --without-develop was given.
15871 if test "${with_develop+set}" = set; then
15872   withval="$with_develop"
15873   with_develop=$withval
15874 else
15875   with_develop=no
15876 fi;
15877 echo "$as_me:15877: result: $with_develop" >&5
15878 echo "${ECHO_T}$with_develop" >&6
15879
15880 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15881 echo "$as_me:15881: checking if you want hard-tabs code" >&5
15882 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15883
15884 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15885 if test "${enable_hard_tabs+set}" = set; then
15886   enableval="$enable_hard_tabs"
15887
15888 else
15889   enable_hard_tabs=$with_develop
15890 fi;
15891 echo "$as_me:15891: result: $enable_hard_tabs" >&5
15892 echo "${ECHO_T}$enable_hard_tabs" >&6
15893 test "x$enable_hard_tabs" = xyes &&
15894 cat >>confdefs.h <<\EOF
15895 #define USE_HARD_TABS 1
15896 EOF
15897
15898 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15899 echo "$as_me:15899: checking if you want limited support for xmc" >&5
15900 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15901
15902 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15903 if test "${enable_xmc_glitch+set}" = set; then
15904   enableval="$enable_xmc_glitch"
15905
15906 else
15907   enable_xmc_glitch=$with_develop
15908 fi;
15909 echo "$as_me:15909: result: $enable_xmc_glitch" >&5
15910 echo "${ECHO_T}$enable_xmc_glitch" >&6
15911 test "x$enable_xmc_glitch" = xyes &&
15912 cat >>confdefs.h <<\EOF
15913 #define USE_XMC_SUPPORT 1
15914 EOF
15915
15916 ###############################################################################
15917 # These are just experimental, probably should not be in a package:
15918
15919 echo "$as_me:15919: checking if you do not want to assume colors are white-on-black" >&5
15920 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15921
15922 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15923 if test "${enable_assumed_color+set}" = set; then
15924   enableval="$enable_assumed_color"
15925   with_assumed_color=$enableval
15926 else
15927   with_assumed_color=yes
15928 fi;
15929 echo "$as_me:15929: result: $with_assumed_color" >&5
15930 echo "${ECHO_T}$with_assumed_color" >&6
15931 test "x$with_assumed_color" = xyes &&
15932 cat >>confdefs.h <<\EOF
15933 #define USE_ASSUMED_COLOR 1
15934 EOF
15935
15936 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15937 echo "$as_me:15937: checking if you want hashmap scrolling-optimization code" >&5
15938 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15939
15940 # Check whether --enable-hashmap or --disable-hashmap was given.
15941 if test "${enable_hashmap+set}" = set; then
15942   enableval="$enable_hashmap"
15943   with_hashmap=$enableval
15944 else
15945   with_hashmap=yes
15946 fi;
15947 echo "$as_me:15947: result: $with_hashmap" >&5
15948 echo "${ECHO_T}$with_hashmap" >&6
15949 test "x$with_hashmap" = xyes &&
15950 cat >>confdefs.h <<\EOF
15951 #define USE_HASHMAP 1
15952 EOF
15953
15954 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15955 echo "$as_me:15955: checking if you want colorfgbg code" >&5
15956 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15957
15958 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15959 if test "${enable_colorfgbg+set}" = set; then
15960   enableval="$enable_colorfgbg"
15961   with_colorfgbg=$enableval
15962 else
15963   with_colorfgbg=no
15964 fi;
15965 echo "$as_me:15965: result: $with_colorfgbg" >&5
15966 echo "${ECHO_T}$with_colorfgbg" >&6
15967 test "x$with_colorfgbg" = xyes &&
15968 cat >>confdefs.h <<\EOF
15969 #define USE_COLORFGBG 1
15970 EOF
15971
15972 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15973 echo "$as_me:15973: checking if you want to use gcc -fvisibility option" >&5
15974 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15975
15976 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15977 if test "${enable_fvisibility+set}" = set; then
15978   enableval="$enable_fvisibility"
15979   cf_with_fvisibility=$enableval
15980 else
15981   cf_with_fvisibility=no
15982 fi;
15983 echo "$as_me:15983: result: $cf_with_fvisibility" >&5
15984 echo "${ECHO_T}$cf_with_fvisibility" >&6
15985
15986 NCURSES_IMPEXP=
15987 NCURSES_CXX_IMPEXP=
15988 if test "x$cf_with_fvisibility" = xyes; then
15989
15990 echo "$as_me:15990: checking if $CC -fvisibility=hidden option works" >&5
15991 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15992 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15993   echo $ECHO_N "(cached) $ECHO_C" >&6
15994 else
15995
15996     cf_save_cflags="$CFLAGS"
15997     CFLAGS="$CFLAGS -fvisibility=hidden"
15998     cat >"conftest.$ac_ext" <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001
16002 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16003
16004 int
16005 main (void)
16006 {
16007
16008         if (somefunc()) return 1;
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit "$ac_status"); } &&
16020          { ac_try='test -s "conftest$ac_exeext"'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit "$ac_status"); }; }; then
16026   cf_cv_fvisibility_hidden=yes
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat "conftest.$ac_ext" >&5
16030 cf_cv_fvisibility_hidden=no
16031 fi
16032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16033     CFLAGS=$cf_save_cflags
16034
16035 fi
16036 echo "$as_me:16036: result: $cf_cv_fvisibility_hidden" >&5
16037 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16038
16039         if test "x$cf_cv_fvisibility_hidden" = xyes
16040         then
16041
16042 cf_fix_cppflags=no
16043 cf_new_cflags=
16044 cf_new_cppflags=
16045 cf_new_extra_cppflags=
16046
16047 for cf_add_cflags in -fvisibility=hidden
16048 do
16049 case "$cf_fix_cppflags" in
16050 (no)
16051         case "$cf_add_cflags" in
16052         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16053                 case "$cf_add_cflags" in
16054                 (-D*)
16055                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16056
16057                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16058                                 && test -z "${cf_tst_cflags}" \
16059                                 && cf_fix_cppflags=yes
16060
16061                         if test "$cf_fix_cppflags" = yes ; then
16062
16063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16065
16066                                 continue
16067                         elif test "${cf_tst_cflags}" = "\"'" ; then
16068
16069         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16070         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16071
16072                                 continue
16073                         fi
16074                         ;;
16075                 esac
16076                 case "$CPPFLAGS" in
16077                 (*$cf_add_cflags)
16078                         ;;
16079                 (*)
16080                         case "$cf_add_cflags" in
16081                         (-D*)
16082                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16083
16084 CPPFLAGS=`echo "$CPPFLAGS" | \
16085         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16086                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16087
16088                                 ;;
16089                         esac
16090
16091         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16092         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16093
16094                         ;;
16095                 esac
16096                 ;;
16097         (*)
16098
16099         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16100         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16101
16102                 ;;
16103         esac
16104         ;;
16105 (yes)
16106
16107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16109
16110         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16111
16112         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16113                 && test -z "${cf_tst_cflags}" \
16114                 && cf_fix_cppflags=no
16115         ;;
16116 esac
16117 done
16118
16119 if test -n "$cf_new_cflags" ; then
16120
16121         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16122         CFLAGS="${CFLAGS}$cf_new_cflags"
16123
16124 fi
16125
16126 if test -n "$cf_new_cppflags" ; then
16127
16128         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16129         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16130
16131 fi
16132
16133 if test -n "$cf_new_extra_cppflags" ; then
16134
16135         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16136         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16137
16138 fi
16139
16140                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16141         fi
16142         if test -n "$CXX"
16143         then
16144                 ac_ext=cc
16145 ac_cpp='$CXXCPP $CPPFLAGS'
16146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16147 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16149 ac_main_return="return"
16150
16151 echo "$as_me:16151: checking if $CXX -fvisibility=hidden option works" >&5
16152 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16153 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16154   echo $ECHO_N "(cached) $ECHO_C" >&6
16155 else
16156
16157     cf_save_cflags="$CXXFLAGS"
16158     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16159     cat >"conftest.$ac_ext" <<_ACEOF
16160 #line 16160 "configure"
16161 #include "confdefs.h"
16162
16163 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16164
16165 int
16166 main (void)
16167 {
16168
16169         if (somefunc()) return 1;
16170
16171   ;
16172   return 0;
16173 }
16174 _ACEOF
16175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16176 if { (eval echo "$as_me:16176: \"$ac_link\"") >&5
16177   (eval $ac_link) 2>&5
16178   ac_status=$?
16179   echo "$as_me:16179: \$? = $ac_status" >&5
16180   (exit "$ac_status"); } &&
16181          { ac_try='test -s "conftest$ac_exeext"'
16182   { (eval echo "$as_me:16182: \"$ac_try\"") >&5
16183   (eval $ac_try) 2>&5
16184   ac_status=$?
16185   echo "$as_me:16185: \$? = $ac_status" >&5
16186   (exit "$ac_status"); }; }; then
16187   cf_cv_fvisibility_hidden2=yes
16188 else
16189   echo "$as_me: failed program was:" >&5
16190 cat "conftest.$ac_ext" >&5
16191 cf_cv_fvisibility_hidden2=no
16192 fi
16193 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16194     CXXFLAGS=$cf_save_cflags
16195
16196 fi
16197 echo "$as_me:16197: result: $cf_cv_fvisibility_hidden2" >&5
16198 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16199
16200                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16201                 then
16202
16203 cf_save_CXXFLAGS="$CFLAGS"
16204 CFLAGS="$CXXFLAGS"
16205
16206 cf_fix_cppflags=no
16207 cf_new_cflags=
16208 cf_new_cppflags=
16209 cf_new_extra_cppflags=
16210
16211 for cf_add_cflags in -fvisibility=hidden
16212 do
16213 case "$cf_fix_cppflags" in
16214 (no)
16215         case "$cf_add_cflags" in
16216         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16217                 case "$cf_add_cflags" in
16218                 (-D*)
16219                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16220
16221                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16222                                 && test -z "${cf_tst_cflags}" \
16223                                 && cf_fix_cppflags=yes
16224
16225                         if test "$cf_fix_cppflags" = yes ; then
16226
16227         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16228         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16229
16230                                 continue
16231                         elif test "${cf_tst_cflags}" = "\"'" ; then
16232
16233         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16234         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16235
16236                                 continue
16237                         fi
16238                         ;;
16239                 esac
16240                 case "$CPPFLAGS" in
16241                 (*$cf_add_cflags)
16242                         ;;
16243                 (*)
16244                         case "$cf_add_cflags" in
16245                         (-D*)
16246                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16247
16248 CPPFLAGS=`echo "$CPPFLAGS" | \
16249         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16250                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16251
16252                                 ;;
16253                         esac
16254
16255         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16256         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16257
16258                         ;;
16259                 esac
16260                 ;;
16261         (*)
16262
16263         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16264         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16265
16266                 ;;
16267         esac
16268         ;;
16269 (yes)
16270
16271         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16272         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16273
16274         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16275
16276         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16277                 && test -z "${cf_tst_cflags}" \
16278                 && cf_fix_cppflags=no
16279         ;;
16280 esac
16281 done
16282
16283 if test -n "$cf_new_cflags" ; then
16284
16285         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16286         CFLAGS="${CFLAGS}$cf_new_cflags"
16287
16288 fi
16289
16290 if test -n "$cf_new_cppflags" ; then
16291
16292         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16293         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16294
16295 fi
16296
16297 if test -n "$cf_new_extra_cppflags" ; then
16298
16299         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16300         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16301
16302 fi
16303
16304 CXXFLAGS="$CFLAGS"
16305 CFLAGS="$cf_save_CXXFLAGS"
16306
16307                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16308                 fi
16309                 ac_ext=c
16310 ac_cpp='$CPP $CPPFLAGS'
16311 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16312 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16314 ac_main_return="return"
16315
16316         fi
16317 fi
16318
16319 ###   use option --enable-interop to turn on use of bindings used for interop
16320 echo "$as_me:16320: checking if you want interop bindings" >&5
16321 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16322
16323 # Check whether --enable-interop or --disable-interop was given.
16324 if test "${enable_interop+set}" = set; then
16325   enableval="$enable_interop"
16326   with_exp_interop=$enableval
16327 else
16328   with_exp_interop=$cf_dft_interop
16329 fi;
16330 echo "$as_me:16330: result: $with_exp_interop" >&5
16331 echo "${ECHO_T}$with_exp_interop" >&6
16332
16333 NCURSES_INTEROP_FUNCS=0
16334 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16335
16336 echo "$as_me:16336: checking if you want experimental safe-sprintf code" >&5
16337 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16338
16339 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16340 if test "${enable_safe_sprintf+set}" = set; then
16341   enableval="$enable_safe_sprintf"
16342   with_safe_sprintf=$enableval
16343 else
16344   with_safe_sprintf=no
16345 fi;
16346 echo "$as_me:16346: result: $with_safe_sprintf" >&5
16347 echo "${ECHO_T}$with_safe_sprintf" >&6
16348
16349 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16350 # when hashmap is used scroll hints are useless
16351 if test "$with_hashmap" = no ; then
16352 echo "$as_me:16352: checking if you want to experiment without scrolling-hints code" >&5
16353 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16354
16355 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16356 if test "${enable_scroll_hints+set}" = set; then
16357   enableval="$enable_scroll_hints"
16358   with_scroll_hints=$enableval
16359 else
16360   with_scroll_hints=yes
16361 fi;
16362 echo "$as_me:16362: result: $with_scroll_hints" >&5
16363 echo "${ECHO_T}$with_scroll_hints" >&6
16364 test "x$with_scroll_hints" = xyes &&
16365 cat >>confdefs.h <<\EOF
16366 #define USE_SCROLL_HINTS 1
16367 EOF
16368
16369 fi
16370
16371 echo "$as_me:16371: checking if you want wgetch-events code" >&5
16372 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16373
16374 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16375 if test "${enable_wgetch_events+set}" = set; then
16376   enableval="$enable_wgetch_events"
16377   with_wgetch_events=$enableval
16378 else
16379   with_wgetch_events=no
16380 fi;
16381 echo "$as_me:16381: result: $with_wgetch_events" >&5
16382 echo "${ECHO_T}$with_wgetch_events" >&6
16383 if test "x$with_wgetch_events" = xyes ; then
16384
16385 cat >>confdefs.h <<\EOF
16386 #define NCURSES_WGETCH_EVENTS 1
16387 EOF
16388
16389         NCURSES_WGETCH_EVENTS=1
16390 else
16391         NCURSES_WGETCH_EVENTS=0
16392 fi
16393
16394 case "$cf_cv_system_name" in
16395 (*mingw32*|*mingw64*|*-msvc*)
16396         echo "$as_me:16396: checking if you want experimental-Windows driver" >&5
16397 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16398
16399 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16400 if test "${enable_exp_win32+set}" = set; then
16401   enableval="$enable_exp_win32"
16402   with_exp_win32=$enableval
16403 else
16404   with_exp_win32=no
16405 fi;
16406         echo "$as_me:16406: result: $with_exp_win32" >&5
16407 echo "${ECHO_T}$with_exp_win32" >&6
16408         if test "x$with_exp_win32" = xyes
16409         then
16410
16411 cat >>confdefs.h <<\EOF
16412 #define EXP_WIN32_DRIVER 1
16413 EOF
16414
16415                 EXP_WIN32_DRIVER=1
16416                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16417         else
16418                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16419                 EXP_WIN32_DRIVER=0
16420         fi
16421         ;;
16422 (*)
16423         EXP_WIN32_DRIVER=0
16424         INTERNALS_HDR=
16425         ;;
16426 esac
16427
16428 ###############################################################################
16429
16430 ###     use option --disable-echo to suppress full display compiling commands
16431
16432 echo "$as_me:16432: checking if you want to see long compiling messages" >&5
16433 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16434
16435 # Check whether --enable-echo or --disable-echo was given.
16436 if test "${enable_echo+set}" = set; then
16437   enableval="$enable_echo"
16438   test "$enableval" != no && enableval=yes
16439         if test "$enableval" != "yes" ; then
16440
16441         ECHO_LT='--silent'
16442         ECHO_LD='@echo linking $@;'
16443         RULE_CC='@echo compiling $<'
16444         SHOW_CC='@echo compiling $@'
16445         ECHO_CC='@'
16446
16447         else
16448
16449         ECHO_LT=''
16450         ECHO_LD=''
16451         RULE_CC=''
16452         SHOW_CC=''
16453         ECHO_CC=''
16454
16455         fi
16456 else
16457   enableval=yes
16458
16459         ECHO_LT=''
16460         ECHO_LD=''
16461         RULE_CC=''
16462         SHOW_CC=''
16463         ECHO_CC=''
16464
16465 fi;
16466 echo "$as_me:16466: result: $enableval" >&5
16467 echo "${ECHO_T}$enableval" >&6
16468
16469 if test "x$enable_echo" = xyes; then
16470         ECHO_LINK=
16471 else
16472         ECHO_LINK='@ echo linking $@ ... ;'
16473         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16474         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16475 fi
16476
16477 # --disable-stripping is used for debugging
16478
16479 echo "$as_me:16479: checking if you want to install stripped executables" >&5
16480 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16481
16482 # Check whether --enable-stripping or --disable-stripping was given.
16483 if test "${enable_stripping+set}" = set; then
16484   enableval="$enable_stripping"
16485   test "$enableval" != no && enableval=yes
16486         if test "$enableval" != "yes" ; then
16487     enable_stripping=no
16488         else
16489                 enable_stripping=yes
16490         fi
16491 else
16492   enableval=yes
16493         enable_stripping=yes
16494
16495 fi;
16496 echo "$as_me:16496: result: $enable_stripping" >&5
16497 echo "${ECHO_T}$enable_stripping" >&6
16498
16499 if test "$enable_stripping" = yes
16500 then
16501         INSTALL_OPT_S="-s"
16502 else
16503         INSTALL_OPT_S=
16504 fi
16505
16506 : "${INSTALL:=install}"
16507 echo "$as_me:16507: checking if install accepts -p option" >&5
16508 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16509 if test "${cf_cv_install_p+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513         rm -rf ./conftest*
16514         date >conftest.in
16515         mkdir conftest.out
16516         sleep 3
16517         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16518         then
16519                 if test -f conftest.out/conftest.in
16520                 then
16521                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16522                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16523                         if test -s conftest.err
16524                         then
16525                                 cf_cv_install_p=no
16526                         else
16527                                 cf_cv_install_p=yes
16528                         fi
16529                 else
16530                         cf_cv_install_p=no
16531                 fi
16532         else
16533                 cf_cv_install_p=no
16534         fi
16535         rm -rf ./conftest*
16536
16537 fi
16538 echo "$as_me:16538: result: $cf_cv_install_p" >&5
16539 echo "${ECHO_T}$cf_cv_install_p" >&6
16540
16541 echo "$as_me:16541: checking if install needs to be told about ownership" >&5
16542 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16543 case `$ac_config_guess` in
16544 (*minix)
16545         with_install_o=yes
16546         ;;
16547 (*)
16548         with_install_o=no
16549         ;;
16550 esac
16551
16552 echo "$as_me:16552: result: $with_install_o" >&5
16553 echo "${ECHO_T}$with_install_o" >&6
16554 if test "x$with_install_o" = xyes
16555 then
16556         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'`"
16557 else
16558         INSTALL_OPT_O=
16559 fi
16560
16561 # If we're avoiding relinking of shared libraries during install, that is to
16562 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16563 # the install program has "-p" (for preserving timestamps).
16564 cf_cv_do_reranlib=yes
16565 if test "x$cf_cv_install_p" = xyes
16566 then
16567         if test "x$cf_cv_do_relink" != xyes
16568         then
16569                 cf_cv_do_reranlib=no
16570                 INSTALL_OPT_P="-p"
16571                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16572         fi
16573 fi
16574
16575 ###     use option --enable-warnings to turn on all gcc warnings
16576
16577 echo "$as_me:16577: checking if you want to use C11 _Noreturn feature" >&5
16578 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16579
16580 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16581 if test "${enable_stdnoreturn+set}" = set; then
16582   enableval="$enable_stdnoreturn"
16583   test "$enableval" != yes && enableval=no
16584         if test "$enableval" != "no" ; then
16585     enable_stdnoreturn=yes
16586         else
16587                 enable_stdnoreturn=no
16588         fi
16589 else
16590   enableval=no
16591         enable_stdnoreturn=no
16592
16593 fi;
16594 echo "$as_me:16594: result: $enable_stdnoreturn" >&5
16595 echo "${ECHO_T}$enable_stdnoreturn" >&6
16596
16597 if test $enable_stdnoreturn = yes; then
16598 echo "$as_me:16598: checking for C11 _Noreturn feature" >&5
16599 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16600 if test "${cf_cv_c11_noreturn+set}" = set; then
16601   echo $ECHO_N "(cached) $ECHO_C" >&6
16602 else
16603   cat >"conftest.$ac_ext" <<_ACEOF
16604 #line 16604 "configure"
16605 #include "confdefs.h"
16606
16607 #include <stdio.h>
16608 #include <stdlib.h>
16609 #include <stdnoreturn.h>
16610 static _Noreturn void giveup(void) { exit(0); }
16611
16612 int
16613 main (void)
16614 {
16615 if (feof(stdin)) giveup()
16616   ;
16617   return 0;
16618 }
16619 _ACEOF
16620 rm -f "conftest.$ac_objext"
16621 if { (eval echo "$as_me:16621: \"$ac_compile\"") >&5
16622   (eval $ac_compile) 2>&5
16623   ac_status=$?
16624   echo "$as_me:16624: \$? = $ac_status" >&5
16625   (exit "$ac_status"); } &&
16626          { ac_try='test -s "conftest.$ac_objext"'
16627   { (eval echo "$as_me:16627: \"$ac_try\"") >&5
16628   (eval $ac_try) 2>&5
16629   ac_status=$?
16630   echo "$as_me:16630: \$? = $ac_status" >&5
16631   (exit "$ac_status"); }; }; then
16632   cf_cv_c11_noreturn=yes
16633 else
16634   echo "$as_me: failed program was:" >&5
16635 cat "conftest.$ac_ext" >&5
16636 cf_cv_c11_noreturn=no
16637 fi
16638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16639
16640 fi
16641 echo "$as_me:16641: result: $cf_cv_c11_noreturn" >&5
16642 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16643 else
16644         cf_cv_c11_noreturn=no,
16645 fi
16646
16647 if test "$cf_cv_c11_noreturn" = yes; then
16648
16649 cat >>confdefs.h <<\EOF
16650 #define HAVE_STDNORETURN_H 1
16651 EOF
16652
16653 cat >>confdefs.h <<EOF
16654 #define STDC_NORETURN _Noreturn
16655 EOF
16656
16657         HAVE_STDNORETURN_H=1
16658 else
16659         HAVE_STDNORETURN_H=0
16660 fi
16661
16662 if test "$GCC" = yes || test "$GXX" = yes
16663 then
16664
16665 if test "$GCC" = yes || test "$GXX" = yes
16666 then
16667         case $CFLAGS in
16668         (*-Werror=*)
16669                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16670
16671 echo "${as_me:-configure}:16671: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16672
16673                 cf_temp_flags=
16674                 for cf_temp_scan in $CFLAGS
16675                 do
16676                         case "x$cf_temp_scan" in
16677                         (x-Werror=*)
16678
16679         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16680         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16681
16682                                 ;;
16683                         (*)
16684
16685         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16686         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16687
16688                                 ;;
16689                         esac
16690                 done
16691                 CFLAGS="$cf_temp_flags"
16692                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16693
16694 echo "${as_me:-configure}:16694: testing ... fixed $CFLAGS ..." 1>&5
16695
16696                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16697
16698 echo "${as_me:-configure}:16698: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16699
16700                 ;;
16701         esac
16702 fi
16703
16704 if test "$GCC" = yes || test "$GXX" = yes
16705 then
16706         case $CPPFLAGS in
16707         (*-Werror=*)
16708                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16709
16710 echo "${as_me:-configure}:16710: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16711
16712                 cf_temp_flags=
16713                 for cf_temp_scan in $CPPFLAGS
16714                 do
16715                         case "x$cf_temp_scan" in
16716                         (x-Werror=*)
16717
16718         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16719         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16720
16721                                 ;;
16722                         (*)
16723
16724         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16725         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16726
16727                                 ;;
16728                         esac
16729                 done
16730                 CPPFLAGS="$cf_temp_flags"
16731                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16732
16733 echo "${as_me:-configure}:16733: testing ... fixed $CPPFLAGS ..." 1>&5
16734
16735                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16736
16737 echo "${as_me:-configure}:16737: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16738
16739                 ;;
16740         esac
16741 fi
16742
16743 if test "$GCC" = yes || test "$GXX" = yes
16744 then
16745         case $LDFLAGS in
16746         (*-Werror=*)
16747                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16748
16749 echo "${as_me:-configure}:16749: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16750
16751                 cf_temp_flags=
16752                 for cf_temp_scan in $LDFLAGS
16753                 do
16754                         case "x$cf_temp_scan" in
16755                         (x-Werror=*)
16756
16757         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16758         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16759
16760                                 ;;
16761                         (*)
16762
16763         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16764         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16765
16766                                 ;;
16767                         esac
16768                 done
16769                 LDFLAGS="$cf_temp_flags"
16770                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16771
16772 echo "${as_me:-configure}:16772: testing ... fixed $LDFLAGS ..." 1>&5
16773
16774                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16775
16776 echo "${as_me:-configure}:16776: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16777
16778                 ;;
16779         esac
16780 fi
16781
16782 echo "$as_me:16782: checking if you want to turn on gcc warnings" >&5
16783 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16784
16785 # Check whether --enable-warnings or --disable-warnings was given.
16786 if test "${enable_warnings+set}" = set; then
16787   enableval="$enable_warnings"
16788   test "$enableval" != yes && enableval=no
16789         if test "$enableval" != "no" ; then
16790     enable_warnings=yes
16791         else
16792                 enable_warnings=no
16793         fi
16794 else
16795   enableval=no
16796         enable_warnings=no
16797
16798 fi;
16799 echo "$as_me:16799: result: $enable_warnings" >&5
16800 echo "${ECHO_T}$enable_warnings" >&6
16801 if test "$enable_warnings" = "yes"
16802 then
16803
16804 if test "x$have_x" = xyes; then
16805
16806 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16807 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16808 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16809 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16810 for cf_X_CFLAGS in $X_CFLAGS
16811 do
16812         case "x$cf_X_CFLAGS" in
16813         x-[IUD]*)
16814                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16815                 ;;
16816         *)
16817                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16818                 ;;
16819         esac
16820 done
16821
16822 cat >"conftest.$ac_ext" <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16825
16826 #include <stdlib.h>
16827 #include <X11/Intrinsic.h>
16828
16829 int
16830 main (void)
16831 {
16832 String foo = malloc(1); free((void*)foo)
16833   ;
16834   return 0;
16835 }
16836 _ACEOF
16837 rm -f "conftest.$ac_objext"
16838 if { (eval echo "$as_me:16838: \"$ac_compile\"") >&5
16839   (eval $ac_compile) 2>&5
16840   ac_status=$?
16841   echo "$as_me:16841: \$? = $ac_status" >&5
16842   (exit "$ac_status"); } &&
16843          { ac_try='test -s "conftest.$ac_objext"'
16844   { (eval echo "$as_me:16844: \"$ac_try\"") >&5
16845   (eval $ac_try) 2>&5
16846   ac_status=$?
16847   echo "$as_me:16847: \$? = $ac_status" >&5
16848   (exit "$ac_status"); }; }; then
16849
16850 echo "$as_me:16850: checking for X11/Xt const-feature" >&5
16851 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16852 if test "${cf_cv_const_x_string+set}" = set; then
16853   echo $ECHO_N "(cached) $ECHO_C" >&6
16854 else
16855
16856         cat >"conftest.$ac_ext" <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859
16860 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16861 #undef  XTSTRINGDEFINES /* X11R5 and later */
16862 #include <stdlib.h>
16863 #include <X11/Intrinsic.h>
16864
16865 int
16866 main (void)
16867 {
16868 String foo = malloc(1); *foo = 0
16869   ;
16870   return 0;
16871 }
16872 _ACEOF
16873 rm -f "conftest.$ac_objext"
16874 if { (eval echo "$as_me:16874: \"$ac_compile\"") >&5
16875   (eval $ac_compile) 2>&5
16876   ac_status=$?
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit "$ac_status"); } &&
16879          { ac_try='test -s "conftest.$ac_objext"'
16880   { (eval echo "$as_me:16880: \"$ac_try\"") >&5
16881   (eval $ac_try) 2>&5
16882   ac_status=$?
16883   echo "$as_me:16883: \$? = $ac_status" >&5
16884   (exit "$ac_status"); }; }; then
16885
16886                         cf_cv_const_x_string=no
16887
16888 else
16889   echo "$as_me: failed program was:" >&5
16890 cat "conftest.$ac_ext" >&5
16891
16892                         cf_cv_const_x_string=yes
16893
16894 fi
16895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16896
16897 fi
16898 echo "$as_me:16898: result: $cf_cv_const_x_string" >&5
16899 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16900
16901 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16902 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16903 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16904
16905 case "$cf_cv_const_x_string" in
16906 (no)
16907
16908         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16909         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16910
16911         ;;
16912 (*)
16913
16914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16915         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16916
16917         ;;
16918 esac
16919
16920 else
16921   echo "$as_me: failed program was:" >&5
16922 cat "conftest.$ac_ext" >&5
16923 fi
16924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16925  fi
16926 cat > "conftest.$ac_ext" <<EOF
16927 #line 16927 "${as_me:-configure}"
16928 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16929 EOF
16930 if test "$INTEL_COMPILER" = yes
16931 then
16932 # The "-wdXXX" options suppress warnings:
16933 # remark #1419: external declaration in primary source file
16934 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16935 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16936 # remark #193: zero used for undefined preprocessing identifier
16937 # remark #593: variable "curs_sb_left_arrow" was set but never used
16938 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16939 # remark #869: parameter "tw" was never referenced
16940 # remark #981: operands are evaluated in unspecified order
16941 # warning #279: controlling expression is constant
16942
16943         { echo "$as_me:16943: checking for $CC warning options..." >&5
16944 echo "$as_me: checking for $CC warning options..." >&6;}
16945         cf_save_CFLAGS="$CFLAGS"
16946         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16947         for cf_opt in \
16948                 wd1419 \
16949                 wd1683 \
16950                 wd1684 \
16951                 wd193 \
16952                 wd593 \
16953                 wd279 \
16954                 wd810 \
16955                 wd869 \
16956                 wd981
16957         do
16958                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16959                 if { (eval echo "$as_me:16959: \"$ac_compile\"") >&5
16960   (eval $ac_compile) 2>&5
16961   ac_status=$?
16962   echo "$as_me:16962: \$? = $ac_status" >&5
16963   (exit "$ac_status"); }; then
16964                         test -n "$verbose" && echo "$as_me:16964: result: ... -$cf_opt" >&5
16965 echo "${ECHO_T}... -$cf_opt" >&6
16966                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16967                 fi
16968         done
16969         CFLAGS="$cf_save_CFLAGS"
16970 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16971 then
16972         { echo "$as_me:16972: checking for $CC warning options..." >&5
16973 echo "$as_me: checking for $CC warning options..." >&6;}
16974         cf_save_CFLAGS="$CFLAGS"
16975         cf_warn_CONST=""
16976         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16977         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16978         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16979         for cf_opt in W Wall \
16980                 Wbad-function-cast \
16981                 Wcast-align \
16982                 Wcast-qual \
16983                 Wdeclaration-after-statement \
16984                 Wextra \
16985                 Winline \
16986                 Wmissing-declarations \
16987                 Wmissing-prototypes \
16988                 Wnested-externs \
16989                 Wpointer-arith \
16990                 Wshadow \
16991                 Wstrict-prototypes \
16992                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16993         do
16994                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16995                 if { (eval echo "$as_me:16995: \"$ac_compile\"") >&5
16996   (eval $ac_compile) 2>&5
16997   ac_status=$?
16998   echo "$as_me:16998: \$? = $ac_status" >&5
16999   (exit "$ac_status"); }; then
17000                         test -n "$verbose" && echo "$as_me:17000: result: ... -$cf_opt" >&5
17001 echo "${ECHO_T}... -$cf_opt" >&6
17002                         case "$cf_opt" in
17003                         (Winline)
17004                                 case "$GCC_VERSION" in
17005                                 ([34].*)
17006                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17007
17008 echo "${as_me:-configure}:17008: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17009
17010                                         continue;;
17011                                 esac
17012                                 ;;
17013                         (Wpointer-arith)
17014                                 case "$GCC_VERSION" in
17015                                 ([12].*)
17016                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17017
17018 echo "${as_me:-configure}:17018: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17019
17020                                         continue;;
17021                                 esac
17022                                 ;;
17023                         esac
17024                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17025                 fi
17026         done
17027         CFLAGS="$cf_save_CFLAGS"
17028 fi
17029 rm -rf ./conftest*
17030
17031 fi
17032
17033 if test "$GCC" = yes || test "$GXX" = yes
17034 then
17035 cat > conftest.i <<EOF
17036 #ifndef GCC_PRINTF
17037 #define GCC_PRINTF 0
17038 #endif
17039 #ifndef GCC_SCANF
17040 #define GCC_SCANF 0
17041 #endif
17042 #ifndef GCC_NORETURN
17043 #define GCC_NORETURN /* nothing */
17044 #endif
17045 #ifndef GCC_UNUSED
17046 #define GCC_UNUSED /* nothing */
17047 #endif
17048 EOF
17049 if test "$GCC" = yes
17050 then
17051         { echo "$as_me:17051: checking for $CC __attribute__ directives..." >&5
17052 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17053 cat > "conftest.$ac_ext" <<EOF
17054 #line 17054 "${as_me:-configure}"
17055 #include "confdefs.h"
17056 #include "conftest.h"
17057 #include "conftest.i"
17058 #if     GCC_PRINTF
17059 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17060 #else
17061 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17062 #endif
17063 #if     GCC_SCANF
17064 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17065 #else
17066 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17067 #endif
17068 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17069 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17070 extern GCC_NORETURN void foo(void);
17071 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17072 EOF
17073         cf_printf_attribute=no
17074         cf_scanf_attribute=no
17075         for cf_attribute in scanf printf unused noreturn
17076         do
17077
17078 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17079
17080                 cf_directive="__attribute__(($cf_attribute))"
17081                 echo "checking for $CC $cf_directive" 1>&5
17082
17083                 case "$cf_attribute" in
17084                 (printf)
17085                         cf_printf_attribute=yes
17086                         cat >conftest.h <<EOF
17087 #define GCC_$cf_ATTRIBUTE 1
17088 EOF
17089                         ;;
17090                 (scanf)
17091                         cf_scanf_attribute=yes
17092                         cat >conftest.h <<EOF
17093 #define GCC_$cf_ATTRIBUTE 1
17094 EOF
17095                         ;;
17096                 (*)
17097                         cat >conftest.h <<EOF
17098 #define GCC_$cf_ATTRIBUTE $cf_directive
17099 EOF
17100                         ;;
17101                 esac
17102
17103                 if { (eval echo "$as_me:17103: \"$ac_compile\"") >&5
17104   (eval $ac_compile) 2>&5
17105   ac_status=$?
17106   echo "$as_me:17106: \$? = $ac_status" >&5
17107   (exit "$ac_status"); }; then
17108                         test -n "$verbose" && echo "$as_me:17108: result: ... $cf_attribute" >&5
17109 echo "${ECHO_T}... $cf_attribute" >&6
17110                         cat conftest.h >>confdefs.h
17111                         case "$cf_attribute" in
17112                         (noreturn)
17113
17114 cat >>confdefs.h <<EOF
17115 #define GCC_NORETURN $cf_directive
17116 EOF
17117
17118                                 ;;
17119                         (printf)
17120                                 cf_value='/* nothing */'
17121                                 if test "$cf_printf_attribute" != no ; then
17122                                         cf_value='__attribute__((format(printf,fmt,var)))'
17123
17124 cat >>confdefs.h <<\EOF
17125 #define GCC_PRINTF 1
17126 EOF
17127
17128                                 fi
17129
17130 cat >>confdefs.h <<EOF
17131 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17132 EOF
17133
17134                                 ;;
17135                         (scanf)
17136                                 cf_value='/* nothing */'
17137                                 if test "$cf_scanf_attribute" != no ; then
17138                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17139
17140 cat >>confdefs.h <<\EOF
17141 #define GCC_SCANF 1
17142 EOF
17143
17144                                 fi
17145
17146 cat >>confdefs.h <<EOF
17147 #define GCC_SCANFLIKE(fmt,var) $cf_value
17148 EOF
17149
17150                                 ;;
17151                         (unused)
17152
17153 cat >>confdefs.h <<EOF
17154 #define GCC_UNUSED $cf_directive
17155 EOF
17156
17157                                 ;;
17158                         esac
17159                 fi
17160         done
17161 else
17162         ${FGREP-fgrep} define conftest.i >>confdefs.h
17163 fi
17164 rm -rf ./conftest*
17165 fi
17166
17167 fi
17168
17169 if test "x$enable_warnings" = "xyes"; then
17170
17171         ADAFLAGS="$ADAFLAGS -gnatg"
17172
17173         if test "x$cf_with_cxx" = xyes ; then
17174
17175 INTEL_CPLUSPLUS=no
17176
17177 if test "$GCC" = yes ; then
17178         case "$host_os" in
17179         (linux*|gnu*)
17180                 echo "$as_me:17180: checking if this is really Intel C++ compiler" >&5
17181 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17182                 cf_save_CFLAGS="$CXXFLAGS"
17183                 CXXFLAGS="$CXXFLAGS -no-gcc"
17184                 cat >"conftest.$ac_ext" <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187
17188 int
17189 main (void)
17190 {
17191
17192 #ifdef __INTEL_COMPILER
17193 #else
17194 make an error
17195 #endif
17196
17197   ;
17198   return 0;
17199 }
17200 _ACEOF
17201 rm -f "conftest.$ac_objext"
17202 if { (eval echo "$as_me:17202: \"$ac_compile\"") >&5
17203   (eval $ac_compile) 2>&5
17204   ac_status=$?
17205   echo "$as_me:17205: \$? = $ac_status" >&5
17206   (exit "$ac_status"); } &&
17207          { ac_try='test -s "conftest.$ac_objext"'
17208   { (eval echo "$as_me:17208: \"$ac_try\"") >&5
17209   (eval $ac_try) 2>&5
17210   ac_status=$?
17211   echo "$as_me:17211: \$? = $ac_status" >&5
17212   (exit "$ac_status"); }; }; then
17213   INTEL_CPLUSPLUS=yes
17214 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17215
17216 else
17217   echo "$as_me: failed program was:" >&5
17218 cat "conftest.$ac_ext" >&5
17219 fi
17220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17221                 CXXFLAGS="$cf_save_CFLAGS"
17222                 echo "$as_me:17222: result: $INTEL_CPLUSPLUS" >&5
17223 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17224                 ;;
17225         esac
17226 fi
17227
17228 CLANG_CPLUSPLUS=no
17229
17230 if test "$GCC" = yes ; then
17231         echo "$as_me:17231: checking if this is really Clang C++ compiler" >&5
17232 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17233         cf_save_CFLAGS="$CXXFLAGS"
17234         cat >"conftest.$ac_ext" <<_ACEOF
17235 #line 17235 "configure"
17236 #include "confdefs.h"
17237
17238 int
17239 main (void)
17240 {
17241
17242 #ifdef __clang__
17243 #else
17244 make an error
17245 #endif
17246
17247   ;
17248   return 0;
17249 }
17250 _ACEOF
17251 rm -f "conftest.$ac_objext"
17252 if { (eval echo "$as_me:17252: \"$ac_compile\"") >&5
17253   (eval $ac_compile) 2>&5
17254   ac_status=$?
17255   echo "$as_me:17255: \$? = $ac_status" >&5
17256   (exit "$ac_status"); } &&
17257          { ac_try='test -s "conftest.$ac_objext"'
17258   { (eval echo "$as_me:17258: \"$ac_try\"") >&5
17259   (eval $ac_try) 2>&5
17260   ac_status=$?
17261   echo "$as_me:17261: \$? = $ac_status" >&5
17262   (exit "$ac_status"); }; }; then
17263   CLANG_CPLUSPLUS=yes
17264
17265 else
17266   echo "$as_me: failed program was:" >&5
17267 cat "conftest.$ac_ext" >&5
17268 fi
17269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17270         CXXFLAGS="$cf_save_CFLAGS"
17271         echo "$as_me:17271: result: $CLANG_CPLUSPLUS" >&5
17272 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17273 fi
17274
17275 CLANG_VERSION=none
17276
17277 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17278         case "$CC" in
17279         (c[1-9][0-9]|*/c[1-9][0-9])
17280                 { echo "$as_me:17280: WARNING: replacing broken compiler alias $CC" >&5
17281 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17282                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17283                 CC=clang
17284                 ;;
17285         esac
17286
17287         echo "$as_me:17287: checking version of $CC" >&5
17288 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17289         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.].*//'`"
17290         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17291         echo "$as_me:17291: result: $CLANG_VERSION" >&5
17292 echo "${ECHO_T}$CLANG_VERSION" >&6
17293
17294         for cf_clang_opt in \
17295                 -Qunused-arguments \
17296                 -Wno-error=implicit-function-declaration
17297         do
17298                 echo "$as_me:17298: checking if option $cf_clang_opt works" >&5
17299 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17300                 cf_save_CFLAGS="$CFLAGS"
17301                 CFLAGS="$CFLAGS $cf_clang_opt"
17302                 cat >"conftest.$ac_ext" <<_ACEOF
17303 #line 17303 "configure"
17304 #include "confdefs.h"
17305
17306                         #include <stdio.h>
17307 int
17308 main (void)
17309 {
17310
17311                         printf("hello!\\n");
17312   ;
17313   return 0;
17314 }
17315 _ACEOF
17316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17317 if { (eval echo "$as_me:17317: \"$ac_link\"") >&5
17318   (eval $ac_link) 2>&5
17319   ac_status=$?
17320   echo "$as_me:17320: \$? = $ac_status" >&5
17321   (exit "$ac_status"); } &&
17322          { ac_try='test -s "conftest$ac_exeext"'
17323   { (eval echo "$as_me:17323: \"$ac_try\"") >&5
17324   (eval $ac_try) 2>&5
17325   ac_status=$?
17326   echo "$as_me:17326: \$? = $ac_status" >&5
17327   (exit "$ac_status"); }; }; then
17328
17329                         cf_clang_optok=yes
17330 else
17331   echo "$as_me: failed program was:" >&5
17332 cat "conftest.$ac_ext" >&5
17333
17334                         cf_clang_optok=no
17335 fi
17336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17337                 echo "$as_me:17337: result: $cf_clang_optok" >&5
17338 echo "${ECHO_T}$cf_clang_optok" >&6
17339                 CFLAGS="$cf_save_CFLAGS"
17340                 if test "$cf_clang_optok" = yes; then
17341                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17342
17343 echo "${as_me:-configure}:17343: testing adding option $cf_clang_opt ..." 1>&5
17344
17345         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17346         CFLAGS="${CFLAGS}$cf_clang_opt"
17347
17348                 fi
17349         done
17350 fi
17351
17352 ac_ext=cc
17353 ac_cpp='$CXXCPP $CPPFLAGS'
17354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17355 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17357 ac_main_return="return"
17358
17359 cat > conftest.$ac_ext <<EOF
17360 #line 17360 "configure"
17361 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17362 EOF
17363
17364 if test "$INTEL_CPLUSPLUS" = yes
17365 then
17366 # The "-wdXXX" options suppress warnings:
17367 # remark #1419: external declaration in primary source file
17368 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17369 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17370 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17371 # remark #193: zero used for undefined preprocessing identifier
17372 # remark #593: variable "curs_sb_left_arrow" was set but never used
17373 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17374 # remark #869: parameter "tw" was never referenced
17375 # remark #981: operands are evaluated in unspecified order
17376 # warning #269: invalid format string conversion
17377
17378         { echo "$as_me:17378: checking for $CC warning options..." >&5
17379 echo "$as_me: checking for $CC warning options..." >&6;}
17380         cf_save_CXXFLAGS="$CXXFLAGS"
17381         EXTRA_CXXFLAGS="-Wall"
17382         for cf_opt in \
17383                 wd1419 \
17384                 wd1682 \
17385                 wd1683 \
17386                 wd1684 \
17387                 wd193 \
17388                 wd279 \
17389                 wd593 \
17390                 wd810 \
17391                 wd869 \
17392                 wd981
17393         do
17394                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17395                 if { (eval echo "$as_me:17395: \"$ac_compile\"") >&5
17396   (eval $ac_compile) 2>&5
17397   ac_status=$?
17398   echo "$as_me:17398: \$? = $ac_status" >&5
17399   (exit "$ac_status"); }; then
17400                         test -n "$verbose" && echo "$as_me:17400: result: ... -$cf_opt" >&5
17401 echo "${ECHO_T}... -$cf_opt" >&6
17402                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17403                 fi
17404         done
17405         CXXFLAGS="$cf_save_CXXFLAGS"
17406
17407 elif test "$GXX" = yes
17408 then
17409         { echo "$as_me:17409: checking for $CXX warning options..." >&5
17410 echo "$as_me: checking for $CXX warning options..." >&6;}
17411         cf_save_CXXFLAGS="$CXXFLAGS"
17412         EXTRA_CXXFLAGS="-W -Wall"
17413         cf_gxx_extra_warnings=""
17414         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17415         case "$GXX_VERSION" in
17416         ([1-2].*)
17417                 ;;
17418         (*)
17419                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17420                 ;;
17421         esac
17422         for cf_opt in \
17423                 Wabi \
17424                 fabi-version=0 \
17425                 Wextra \
17426                 Wignored-qualifiers \
17427                 Wlogical-op \
17428                 Woverloaded-virtual \
17429                 Wsign-promo \
17430                 Wsynth \
17431                 Wold-style-cast \
17432                 Wcast-align \
17433                 Wcast-qual \
17434                 Wpointer-arith \
17435                 Wshadow \
17436                 Wundef $cf_gxx_extra_warnings Wno-unused
17437         do
17438                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17439                 if { (eval echo "$as_me:17439: \"$ac_compile\"") >&5
17440   (eval $ac_compile) 2>&5
17441   ac_status=$?
17442   echo "$as_me:17442: \$? = $ac_status" >&5
17443   (exit "$ac_status"); }; then
17444                         test -n "$verbose" && echo "$as_me:17444: result: ... -$cf_opt" >&5
17445 echo "${ECHO_T}... -$cf_opt" >&6
17446                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17447                 else
17448                         test -n "$verbose" && echo "$as_me:17448: result: ... no -$cf_opt" >&5
17449 echo "${ECHO_T}... no -$cf_opt" >&6
17450                 fi
17451         done
17452         CXXFLAGS="$cf_save_CXXFLAGS"
17453 fi
17454
17455 rm -rf ./conftest*
17456 ac_ext=c
17457 ac_cpp='$CPP $CPPFLAGS'
17458 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17459 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17461 ac_main_return="return"
17462
17463         fi
17464 fi
17465
17466 echo "$as_me:17466: checking if you want to work around bogus compiler/loader warnings" >&5
17467 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17468
17469 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17470 if test "${enable_string_hacks+set}" = set; then
17471   enableval="$enable_string_hacks"
17472   enable_string_hacks=$enableval
17473 else
17474   enable_string_hacks=no
17475 fi;
17476 echo "$as_me:17476: result: $enable_string_hacks" >&5
17477 echo "${ECHO_T}$enable_string_hacks" >&6
17478
17479 if test "x$enable_string_hacks" = "xyes"; then
17480
17481 cat >>confdefs.h <<\EOF
17482 #define USE_STRING_HACKS 1
17483 EOF
17484
17485         { echo "$as_me:17485: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17486 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17487         echo "$as_me:17487: checking for strlcat" >&5
17488 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17489 if test "${ac_cv_func_strlcat+set}" = set; then
17490   echo $ECHO_N "(cached) $ECHO_C" >&6
17491 else
17492   cat >"conftest.$ac_ext" <<_ACEOF
17493 #line 17493 "configure"
17494 #include "confdefs.h"
17495 #define strlcat autoconf_temporary
17496 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17497 #undef strlcat
17498
17499 #ifdef __cplusplus
17500 extern "C"
17501 #endif
17502
17503 /* We use char because int might match the return type of a gcc2
17504    builtin and then its argument prototype would still apply.  */
17505 char strlcat (void);
17506
17507 int
17508 main (void)
17509 {
17510
17511 /* The GNU C library defines stubs for functions which it implements
17512     to always fail with ENOSYS.  Some functions are actually named
17513     something starting with __ and the normal name is an alias.  */
17514 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17515 #error found stub for strlcat
17516 #endif
17517
17518         return strlcat ();
17519   ;
17520   return 0;
17521 }
17522 _ACEOF
17523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17524 if { (eval echo "$as_me:17524: \"$ac_link\"") >&5
17525   (eval $ac_link) 2>&5
17526   ac_status=$?
17527   echo "$as_me:17527: \$? = $ac_status" >&5
17528   (exit "$ac_status"); } &&
17529          { ac_try='test -s "conftest$ac_exeext"'
17530   { (eval echo "$as_me:17530: \"$ac_try\"") >&5
17531   (eval $ac_try) 2>&5
17532   ac_status=$?
17533   echo "$as_me:17533: \$? = $ac_status" >&5
17534   (exit "$ac_status"); }; }; then
17535   ac_cv_func_strlcat=yes
17536 else
17537   echo "$as_me: failed program was:" >&5
17538 cat "conftest.$ac_ext" >&5
17539 ac_cv_func_strlcat=no
17540 fi
17541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17542 fi
17543 echo "$as_me:17543: result: $ac_cv_func_strlcat" >&5
17544 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17545 if test "$ac_cv_func_strlcat" = yes; then
17546
17547 cat >>confdefs.h <<\EOF
17548 #define HAVE_STRLCAT 1
17549 EOF
17550
17551 else
17552
17553                 echo "$as_me:17553: checking for strlcat in -lbsd" >&5
17554 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17555 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17556   echo $ECHO_N "(cached) $ECHO_C" >&6
17557 else
17558   ac_check_lib_save_LIBS=$LIBS
17559 LIBS="-lbsd  $LIBS"
17560 cat >"conftest.$ac_ext" <<_ACEOF
17561 #line 17561 "configure"
17562 #include "confdefs.h"
17563
17564 /* Override any gcc2 internal prototype to avoid an error.  */
17565 #ifdef __cplusplus
17566 extern "C"
17567 #endif
17568 /* We use char because int might match the return type of a gcc2
17569    builtin and then its argument prototype would still apply.  */
17570 char strlcat ();
17571 int
17572 main (void)
17573 {
17574 strlcat ();
17575   ;
17576   return 0;
17577 }
17578 _ACEOF
17579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17580 if { (eval echo "$as_me:17580: \"$ac_link\"") >&5
17581   (eval $ac_link) 2>&5
17582   ac_status=$?
17583   echo "$as_me:17583: \$? = $ac_status" >&5
17584   (exit "$ac_status"); } &&
17585          { ac_try='test -s "conftest$ac_exeext"'
17586   { (eval echo "$as_me:17586: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:17589: \$? = $ac_status" >&5
17590   (exit "$ac_status"); }; }; then
17591   ac_cv_lib_bsd_strlcat=yes
17592 else
17593   echo "$as_me: failed program was:" >&5
17594 cat "conftest.$ac_ext" >&5
17595 ac_cv_lib_bsd_strlcat=no
17596 fi
17597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17598 LIBS=$ac_check_lib_save_LIBS
17599 fi
17600 echo "$as_me:17600: result: $ac_cv_lib_bsd_strlcat" >&5
17601 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17602 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17603
17604 cf_add_libs="$LIBS"
17605 # reverse order
17606 cf_add_0lib=
17607 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17608 # filter duplicates
17609 for cf_add_1lib in $cf_add_0lib; do
17610         for cf_add_2lib in $cf_add_libs; do
17611                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17612                         cf_add_1lib=
17613                         break
17614                 fi
17615         done
17616         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17617 done
17618 LIBS="$cf_add_libs"
17619
17620 for ac_header in bsd/string.h
17621 do
17622 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17623 echo "$as_me:17623: checking for $ac_header" >&5
17624 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17625 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17626   echo $ECHO_N "(cached) $ECHO_C" >&6
17627 else
17628   cat >"conftest.$ac_ext" <<_ACEOF
17629 #line 17629 "configure"
17630 #include "confdefs.h"
17631 #include <$ac_header>
17632 _ACEOF
17633 if { (eval echo "$as_me:17633: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17634   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17635   ac_status=$?
17636   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17637   rm -f conftest.er1
17638   cat conftest.err >&5
17639   echo "$as_me:17639: \$? = $ac_status" >&5
17640   (exit "$ac_status"); } >/dev/null; then
17641   if test -s conftest.err; then
17642     ac_cpp_err=$ac_c_preproc_warn_flag
17643   else
17644     ac_cpp_err=
17645   fi
17646 else
17647   ac_cpp_err=yes
17648 fi
17649 if test -z "$ac_cpp_err"; then
17650   eval "$as_ac_Header=yes"
17651 else
17652   echo "$as_me: failed program was:" >&5
17653   cat "conftest.$ac_ext" >&5
17654   eval "$as_ac_Header=no"
17655 fi
17656 rm -f conftest.err "conftest.$ac_ext"
17657 fi
17658 echo "$as_me:17658: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17659 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17660 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17661   cat >>confdefs.h <<EOF
17662 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17663 EOF
17664
17665 fi
17666 done
17667
17668 cat >>confdefs.h <<\EOF
17669 #define HAVE_STRLCAT 1
17670 EOF
17671
17672 fi
17673
17674 fi
17675
17676 for ac_func in strlcpy snprintf
17677 do
17678 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17679 echo "$as_me:17679: checking for $ac_func" >&5
17680 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17681 if eval "test \"\${$as_ac_var+set}\" = set"; then
17682   echo $ECHO_N "(cached) $ECHO_C" >&6
17683 else
17684   cat >"conftest.$ac_ext" <<_ACEOF
17685 #line 17685 "configure"
17686 #include "confdefs.h"
17687 #define $ac_func autoconf_temporary
17688 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17689 #undef $ac_func
17690
17691 #ifdef __cplusplus
17692 extern "C"
17693 #endif
17694
17695 /* We use char because int might match the return type of a gcc2
17696    builtin and then its argument prototype would still apply.  */
17697 char $ac_func (void);
17698
17699 int
17700 main (void)
17701 {
17702
17703 /* The GNU C library defines stubs for functions which it implements
17704     to always fail with ENOSYS.  Some functions are actually named
17705     something starting with __ and the normal name is an alias.  */
17706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17707 #error found stub for $ac_func
17708 #endif
17709
17710         return $ac_func ();
17711   ;
17712   return 0;
17713 }
17714 _ACEOF
17715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17716 if { (eval echo "$as_me:17716: \"$ac_link\"") >&5
17717   (eval $ac_link) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit "$ac_status"); } &&
17721          { ac_try='test -s "conftest$ac_exeext"'
17722   { (eval echo "$as_me:17722: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit "$ac_status"); }; }; then
17727   eval "$as_ac_var=yes"
17728 else
17729   echo "$as_me: failed program was:" >&5
17730 cat "conftest.$ac_ext" >&5
17731 eval "$as_ac_var=no"
17732 fi
17733 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17734 fi
17735 echo "$as_me:17735: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17736 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17737 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17738   cat >>confdefs.h <<EOF
17739 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17740 EOF
17741
17742 fi
17743 done
17744
17745 fi
17746
17747 ###     use option --enable-assertions to turn on generation of assertion code
17748 echo "$as_me:17748: checking if you want to enable runtime assertions" >&5
17749 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17750
17751 # Check whether --enable-assertions or --disable-assertions was given.
17752 if test "${enable_assertions+set}" = set; then
17753   enableval="$enable_assertions"
17754   with_assertions=$enableval
17755 else
17756   with_assertions=no
17757 fi;
17758 echo "$as_me:17758: result: $with_assertions" >&5
17759 echo "${ECHO_T}$with_assertions" >&6
17760 if test -n "$GCC"
17761 then
17762         if test "$with_assertions" = no
17763         then
17764                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17765         else
17766
17767         ADAFLAGS="$ADAFLAGS -gnata"
17768
17769         fi
17770 fi
17771
17772 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17773
17774 echo "$as_me:17774: checking if you want to use dmalloc for testing" >&5
17775 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17776
17777 # Check whether --with-dmalloc or --without-dmalloc was given.
17778 if test "${with_dmalloc+set}" = set; then
17779   withval="$with_dmalloc"
17780   case "x$withval" in
17781         (x|xno) ;;
17782         (*)
17783                 : "${with_cflags:=-g}"
17784                 : "${enable_leaks:=no}"
17785                 with_dmalloc=yes
17786
17787 cat >>confdefs.h <<EOF
17788 #define USE_DMALLOC 1
17789 EOF
17790
17791                 ;;
17792         esac
17793 else
17794   with_dmalloc=
17795 fi;
17796 echo "$as_me:17796: result: ${with_dmalloc:-no}" >&5
17797 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17798
17799 case ".$with_cflags" in
17800 (.*-g*)
17801         case .$CFLAGS in
17802         (.*-g*)
17803                 ;;
17804         (*)
17805
17806 cf_fix_cppflags=no
17807 cf_new_cflags=
17808 cf_new_cppflags=
17809 cf_new_extra_cppflags=
17810
17811 for cf_add_cflags in -g
17812 do
17813 case "$cf_fix_cppflags" in
17814 (no)
17815         case "$cf_add_cflags" in
17816         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17817                 case "$cf_add_cflags" in
17818                 (-D*)
17819                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17820
17821                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17822                                 && test -z "${cf_tst_cflags}" \
17823                                 && cf_fix_cppflags=yes
17824
17825                         if test "$cf_fix_cppflags" = yes ; then
17826
17827         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17828         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17829
17830                                 continue
17831                         elif test "${cf_tst_cflags}" = "\"'" ; then
17832
17833         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17834         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17835
17836                                 continue
17837                         fi
17838                         ;;
17839                 esac
17840                 case "$CPPFLAGS" in
17841                 (*$cf_add_cflags)
17842                         ;;
17843                 (*)
17844                         case "$cf_add_cflags" in
17845                         (-D*)
17846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17847
17848 CPPFLAGS=`echo "$CPPFLAGS" | \
17849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17851
17852                                 ;;
17853                         esac
17854
17855         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17856         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17857
17858                         ;;
17859                 esac
17860                 ;;
17861         (*)
17862
17863         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17864         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17865
17866                 ;;
17867         esac
17868         ;;
17869 (yes)
17870
17871         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17872         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17873
17874         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17875
17876         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17877                 && test -z "${cf_tst_cflags}" \
17878                 && cf_fix_cppflags=no
17879         ;;
17880 esac
17881 done
17882
17883 if test -n "$cf_new_cflags" ; then
17884
17885         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17886         CFLAGS="${CFLAGS}$cf_new_cflags"
17887
17888 fi
17889
17890 if test -n "$cf_new_cppflags" ; then
17891
17892         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17893         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17894
17895 fi
17896
17897 if test -n "$cf_new_extra_cppflags" ; then
17898
17899         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17900         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17901
17902 fi
17903
17904                 ;;
17905         esac
17906         ;;
17907 esac
17908
17909 if test "$with_dmalloc" = yes ; then
17910         echo "$as_me:17910: checking for dmalloc.h" >&5
17911 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17912 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17913   echo $ECHO_N "(cached) $ECHO_C" >&6
17914 else
17915   cat >"conftest.$ac_ext" <<_ACEOF
17916 #line 17916 "configure"
17917 #include "confdefs.h"
17918 #include <dmalloc.h>
17919 _ACEOF
17920 if { (eval echo "$as_me:17920: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17921   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17922   ac_status=$?
17923   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17924   rm -f conftest.er1
17925   cat conftest.err >&5
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit "$ac_status"); } >/dev/null; then
17928   if test -s conftest.err; then
17929     ac_cpp_err=$ac_c_preproc_warn_flag
17930   else
17931     ac_cpp_err=
17932   fi
17933 else
17934   ac_cpp_err=yes
17935 fi
17936 if test -z "$ac_cpp_err"; then
17937   ac_cv_header_dmalloc_h=yes
17938 else
17939   echo "$as_me: failed program was:" >&5
17940   cat "conftest.$ac_ext" >&5
17941   ac_cv_header_dmalloc_h=no
17942 fi
17943 rm -f conftest.err "conftest.$ac_ext"
17944 fi
17945 echo "$as_me:17945: result: $ac_cv_header_dmalloc_h" >&5
17946 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17947 if test "$ac_cv_header_dmalloc_h" = yes; then
17948
17949 echo "$as_me:17949: checking for dmalloc_debug in -ldmalloc" >&5
17950 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17951 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17952   echo $ECHO_N "(cached) $ECHO_C" >&6
17953 else
17954   ac_check_lib_save_LIBS=$LIBS
17955 LIBS="-ldmalloc  $LIBS"
17956 cat >"conftest.$ac_ext" <<_ACEOF
17957 #line 17957 "configure"
17958 #include "confdefs.h"
17959
17960 /* Override any gcc2 internal prototype to avoid an error.  */
17961 #ifdef __cplusplus
17962 extern "C"
17963 #endif
17964 /* We use char because int might match the return type of a gcc2
17965    builtin and then its argument prototype would still apply.  */
17966 char dmalloc_debug ();
17967 int
17968 main (void)
17969 {
17970 dmalloc_debug ();
17971   ;
17972   return 0;
17973 }
17974 _ACEOF
17975 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17976 if { (eval echo "$as_me:17976: \"$ac_link\"") >&5
17977   (eval $ac_link) 2>&5
17978   ac_status=$?
17979   echo "$as_me:17979: \$? = $ac_status" >&5
17980   (exit "$ac_status"); } &&
17981          { ac_try='test -s "conftest$ac_exeext"'
17982   { (eval echo "$as_me:17982: \"$ac_try\"") >&5
17983   (eval $ac_try) 2>&5
17984   ac_status=$?
17985   echo "$as_me:17985: \$? = $ac_status" >&5
17986   (exit "$ac_status"); }; }; then
17987   ac_cv_lib_dmalloc_dmalloc_debug=yes
17988 else
17989   echo "$as_me: failed program was:" >&5
17990 cat "conftest.$ac_ext" >&5
17991 ac_cv_lib_dmalloc_dmalloc_debug=no
17992 fi
17993 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17994 LIBS=$ac_check_lib_save_LIBS
17995 fi
17996 echo "$as_me:17996: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17997 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17998 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17999   cat >>confdefs.h <<EOF
18000 #define HAVE_LIBDMALLOC 1
18001 EOF
18002
18003   LIBS="-ldmalloc $LIBS"
18004
18005 fi
18006
18007 fi
18008
18009 fi
18010
18011 echo "$as_me:18011: checking if you want to use dbmalloc for testing" >&5
18012 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18013
18014 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18015 if test "${with_dbmalloc+set}" = set; then
18016   withval="$with_dbmalloc"
18017   case "x$withval" in
18018         (x|xno) ;;
18019         (*)
18020                 : "${with_cflags:=-g}"
18021                 : "${enable_leaks:=no}"
18022                 with_dbmalloc=yes
18023
18024 cat >>confdefs.h <<EOF
18025 #define USE_DBMALLOC 1
18026 EOF
18027
18028                 ;;
18029         esac
18030 else
18031   with_dbmalloc=
18032 fi;
18033 echo "$as_me:18033: result: ${with_dbmalloc:-no}" >&5
18034 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18035
18036 case ".$with_cflags" in
18037 (.*-g*)
18038         case .$CFLAGS in
18039         (.*-g*)
18040                 ;;
18041         (*)
18042
18043 cf_fix_cppflags=no
18044 cf_new_cflags=
18045 cf_new_cppflags=
18046 cf_new_extra_cppflags=
18047
18048 for cf_add_cflags in -g
18049 do
18050 case "$cf_fix_cppflags" in
18051 (no)
18052         case "$cf_add_cflags" in
18053         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18054                 case "$cf_add_cflags" in
18055                 (-D*)
18056                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18057
18058                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18059                                 && test -z "${cf_tst_cflags}" \
18060                                 && cf_fix_cppflags=yes
18061
18062                         if test "$cf_fix_cppflags" = yes ; then
18063
18064         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18065         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18066
18067                                 continue
18068                         elif test "${cf_tst_cflags}" = "\"'" ; then
18069
18070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18072
18073                                 continue
18074                         fi
18075                         ;;
18076                 esac
18077                 case "$CPPFLAGS" in
18078                 (*$cf_add_cflags)
18079                         ;;
18080                 (*)
18081                         case "$cf_add_cflags" in
18082                         (-D*)
18083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18084
18085 CPPFLAGS=`echo "$CPPFLAGS" | \
18086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18088
18089                                 ;;
18090                         esac
18091
18092         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18093         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18094
18095                         ;;
18096                 esac
18097                 ;;
18098         (*)
18099
18100         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18101         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18102
18103                 ;;
18104         esac
18105         ;;
18106 (yes)
18107
18108         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18109         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18110
18111         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18112
18113         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18114                 && test -z "${cf_tst_cflags}" \
18115                 && cf_fix_cppflags=no
18116         ;;
18117 esac
18118 done
18119
18120 if test -n "$cf_new_cflags" ; then
18121
18122         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18123         CFLAGS="${CFLAGS}$cf_new_cflags"
18124
18125 fi
18126
18127 if test -n "$cf_new_cppflags" ; then
18128
18129         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18130         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18131
18132 fi
18133
18134 if test -n "$cf_new_extra_cppflags" ; then
18135
18136         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18137         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18138
18139 fi
18140
18141                 ;;
18142         esac
18143         ;;
18144 esac
18145
18146 if test "$with_dbmalloc" = yes ; then
18147         echo "$as_me:18147: checking for dbmalloc.h" >&5
18148 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18149 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18150   echo $ECHO_N "(cached) $ECHO_C" >&6
18151 else
18152   cat >"conftest.$ac_ext" <<_ACEOF
18153 #line 18153 "configure"
18154 #include "confdefs.h"
18155 #include <dbmalloc.h>
18156 _ACEOF
18157 if { (eval echo "$as_me:18157: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18158   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18159   ac_status=$?
18160   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18161   rm -f conftest.er1
18162   cat conftest.err >&5
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit "$ac_status"); } >/dev/null; then
18165   if test -s conftest.err; then
18166     ac_cpp_err=$ac_c_preproc_warn_flag
18167   else
18168     ac_cpp_err=
18169   fi
18170 else
18171   ac_cpp_err=yes
18172 fi
18173 if test -z "$ac_cpp_err"; then
18174   ac_cv_header_dbmalloc_h=yes
18175 else
18176   echo "$as_me: failed program was:" >&5
18177   cat "conftest.$ac_ext" >&5
18178   ac_cv_header_dbmalloc_h=no
18179 fi
18180 rm -f conftest.err "conftest.$ac_ext"
18181 fi
18182 echo "$as_me:18182: result: $ac_cv_header_dbmalloc_h" >&5
18183 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18184 if test "$ac_cv_header_dbmalloc_h" = yes; then
18185
18186 echo "$as_me:18186: checking for debug_malloc in -ldbmalloc" >&5
18187 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18188 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18189   echo $ECHO_N "(cached) $ECHO_C" >&6
18190 else
18191   ac_check_lib_save_LIBS=$LIBS
18192 LIBS="-ldbmalloc  $LIBS"
18193 cat >"conftest.$ac_ext" <<_ACEOF
18194 #line 18194 "configure"
18195 #include "confdefs.h"
18196
18197 /* Override any gcc2 internal prototype to avoid an error.  */
18198 #ifdef __cplusplus
18199 extern "C"
18200 #endif
18201 /* We use char because int might match the return type of a gcc2
18202    builtin and then its argument prototype would still apply.  */
18203 char debug_malloc ();
18204 int
18205 main (void)
18206 {
18207 debug_malloc ();
18208   ;
18209   return 0;
18210 }
18211 _ACEOF
18212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18213 if { (eval echo "$as_me:18213: \"$ac_link\"") >&5
18214   (eval $ac_link) 2>&5
18215   ac_status=$?
18216   echo "$as_me:18216: \$? = $ac_status" >&5
18217   (exit "$ac_status"); } &&
18218          { ac_try='test -s "conftest$ac_exeext"'
18219   { (eval echo "$as_me:18219: \"$ac_try\"") >&5
18220   (eval $ac_try) 2>&5
18221   ac_status=$?
18222   echo "$as_me:18222: \$? = $ac_status" >&5
18223   (exit "$ac_status"); }; }; then
18224   ac_cv_lib_dbmalloc_debug_malloc=yes
18225 else
18226   echo "$as_me: failed program was:" >&5
18227 cat "conftest.$ac_ext" >&5
18228 ac_cv_lib_dbmalloc_debug_malloc=no
18229 fi
18230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18231 LIBS=$ac_check_lib_save_LIBS
18232 fi
18233 echo "$as_me:18233: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18234 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18235 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18236   cat >>confdefs.h <<EOF
18237 #define HAVE_LIBDBMALLOC 1
18238 EOF
18239
18240   LIBS="-ldbmalloc $LIBS"
18241
18242 fi
18243
18244 fi
18245
18246 fi
18247
18248 echo "$as_me:18248: checking if you want to use valgrind for testing" >&5
18249 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18250
18251 # Check whether --with-valgrind or --without-valgrind was given.
18252 if test "${with_valgrind+set}" = set; then
18253   withval="$with_valgrind"
18254   case "x$withval" in
18255         (x|xno) ;;
18256         (*)
18257                 : "${with_cflags:=-g}"
18258                 : "${enable_leaks:=no}"
18259                 with_valgrind=yes
18260
18261 cat >>confdefs.h <<EOF
18262 #define USE_VALGRIND 1
18263 EOF
18264
18265                 ;;
18266         esac
18267 else
18268   with_valgrind=
18269 fi;
18270 echo "$as_me:18270: result: ${with_valgrind:-no}" >&5
18271 echo "${ECHO_T}${with_valgrind:-no}" >&6
18272
18273 case ".$with_cflags" in
18274 (.*-g*)
18275         case .$CFLAGS in
18276         (.*-g*)
18277                 ;;
18278         (*)
18279
18280 cf_fix_cppflags=no
18281 cf_new_cflags=
18282 cf_new_cppflags=
18283 cf_new_extra_cppflags=
18284
18285 for cf_add_cflags in -g
18286 do
18287 case "$cf_fix_cppflags" in
18288 (no)
18289         case "$cf_add_cflags" in
18290         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18291                 case "$cf_add_cflags" in
18292                 (-D*)
18293                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18294
18295                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18296                                 && test -z "${cf_tst_cflags}" \
18297                                 && cf_fix_cppflags=yes
18298
18299                         if test "$cf_fix_cppflags" = yes ; then
18300
18301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18303
18304                                 continue
18305                         elif test "${cf_tst_cflags}" = "\"'" ; then
18306
18307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18309
18310                                 continue
18311                         fi
18312                         ;;
18313                 esac
18314                 case "$CPPFLAGS" in
18315                 (*$cf_add_cflags)
18316                         ;;
18317                 (*)
18318                         case "$cf_add_cflags" in
18319                         (-D*)
18320                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18321
18322 CPPFLAGS=`echo "$CPPFLAGS" | \
18323         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18324                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18325
18326                                 ;;
18327                         esac
18328
18329         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18330         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18331
18332                         ;;
18333                 esac
18334                 ;;
18335         (*)
18336
18337         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18338         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18339
18340                 ;;
18341         esac
18342         ;;
18343 (yes)
18344
18345         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18346         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18347
18348         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18349
18350         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18351                 && test -z "${cf_tst_cflags}" \
18352                 && cf_fix_cppflags=no
18353         ;;
18354 esac
18355 done
18356
18357 if test -n "$cf_new_cflags" ; then
18358
18359         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18360         CFLAGS="${CFLAGS}$cf_new_cflags"
18361
18362 fi
18363
18364 if test -n "$cf_new_cppflags" ; then
18365
18366         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18367         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18368
18369 fi
18370
18371 if test -n "$cf_new_extra_cppflags" ; then
18372
18373         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18374         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18375
18376 fi
18377
18378                 ;;
18379         esac
18380         ;;
18381 esac
18382
18383 echo "$as_me:18383: checking if you want to perform memory-leak testing" >&5
18384 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18385
18386 # Check whether --enable-leaks or --disable-leaks was given.
18387 if test "${enable_leaks+set}" = set; then
18388   enableval="$enable_leaks"
18389   enable_leaks=$enableval
18390 else
18391   enable_leaks=yes
18392 fi;
18393 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18394 echo "$as_me:18394: result: $with_no_leaks" >&5
18395 echo "${ECHO_T}$with_no_leaks" >&6
18396
18397 if test "$enable_leaks" = no ; then
18398
18399 cat >>confdefs.h <<\EOF
18400 #define NO_LEAKS 1
18401 EOF
18402
18403 cat >>confdefs.h <<\EOF
18404 #define YY_NO_LEAKS 1
18405 EOF
18406
18407 fi
18408
18409 cat >>confdefs.h <<\EOF
18410 #define HAVE_NC_ALLOC_H 1
18411 EOF
18412
18413 ###     use option --enable-expanded to generate certain macros as functions
18414
18415 # Check whether --enable-expanded or --disable-expanded was given.
18416 if test "${enable_expanded+set}" = set; then
18417   enableval="$enable_expanded"
18418   test "x$enableval" = xyes &&
18419 cat >>confdefs.h <<\EOF
18420 #define NCURSES_EXPANDED 1
18421 EOF
18422
18423 fi;
18424
18425 ###     use option --disable-macros to suppress macros in favor of functions
18426
18427 # Check whether --enable-macros or --disable-macros was given.
18428 if test "${enable_macros+set}" = set; then
18429   enableval="$enable_macros"
18430   test "$enableval" = no &&
18431 cat >>confdefs.h <<\EOF
18432 #define NCURSES_NOMACROS 1
18433 EOF
18434
18435 fi;
18436
18437 # Normally we only add trace() to the debug-library.  Allow this to be
18438 # extended to all models of the ncurses library:
18439 cf_all_traces=no
18440 case "$CFLAGS $CPPFLAGS" in
18441 (*-DTRACE*)
18442         cf_all_traces=yes
18443         ;;
18444 esac
18445
18446 echo "$as_me:18446: checking whether to add trace feature to all models" >&5
18447 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18448
18449 # Check whether --with-trace or --without-trace was given.
18450 if test "${with_trace+set}" = set; then
18451   withval="$with_trace"
18452   cf_with_trace=$withval
18453 else
18454   cf_with_trace=$cf_all_traces
18455 fi;
18456 echo "$as_me:18456: result: $cf_with_trace" >&5
18457 echo "${ECHO_T}$cf_with_trace" >&6
18458
18459 if test "x$cf_with_trace" = xyes ; then
18460         LIB_TRACING=all
18461         ADA_TRACE=TRUE
18462
18463 cf_fix_cppflags=no
18464 cf_new_cflags=
18465 cf_new_cppflags=
18466 cf_new_extra_cppflags=
18467
18468 for cf_add_cflags in -DTRACE
18469 do
18470 case "$cf_fix_cppflags" in
18471 (no)
18472         case "$cf_add_cflags" in
18473         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18474                 case "$cf_add_cflags" in
18475                 (-D*)
18476                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18477
18478                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18479                                 && test -z "${cf_tst_cflags}" \
18480                                 && cf_fix_cppflags=yes
18481
18482                         if test "$cf_fix_cppflags" = yes ; then
18483
18484         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18485         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18486
18487                                 continue
18488                         elif test "${cf_tst_cflags}" = "\"'" ; then
18489
18490         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18491         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18492
18493                                 continue
18494                         fi
18495                         ;;
18496                 esac
18497                 case "$CPPFLAGS" in
18498                 (*$cf_add_cflags)
18499                         ;;
18500                 (*)
18501                         case "$cf_add_cflags" in
18502                         (-D*)
18503                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18504
18505 CPPFLAGS=`echo "$CPPFLAGS" | \
18506         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18507                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18508
18509                                 ;;
18510                         esac
18511
18512         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18513         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18514
18515                         ;;
18516                 esac
18517                 ;;
18518         (*)
18519
18520         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18521         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18522
18523                 ;;
18524         esac
18525         ;;
18526 (yes)
18527
18528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18530
18531         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18532
18533         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18534                 && test -z "${cf_tst_cflags}" \
18535                 && cf_fix_cppflags=no
18536         ;;
18537 esac
18538 done
18539
18540 if test -n "$cf_new_cflags" ; then
18541
18542         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18543         CFLAGS="${CFLAGS}$cf_new_cflags"
18544
18545 fi
18546
18547 if test -n "$cf_new_cppflags" ; then
18548
18549         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18550         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18551
18552 fi
18553
18554 if test -n "$cf_new_extra_cppflags" ; then
18555
18556         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18557         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18558
18559 fi
18560
18561 cat >>confdefs.h <<\EOF
18562 #define HAVE__TRACEF 1
18563 EOF
18564
18565 else
18566         LIB_TRACING=DEBUG
18567         ADA_TRACE=FALSE
18568 fi
18569
18570 echo "$as_me:18570: checking if we want to use GNAT projects" >&5
18571 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18572
18573 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18574 if test "${enable_gnat_projects+set}" = set; then
18575   enableval="$enable_gnat_projects"
18576   test "$enableval" != no && enableval=yes
18577         if test "$enableval" != "yes" ; then
18578     enable_gnat_projects=no
18579         else
18580                 enable_gnat_projects=yes
18581         fi
18582 else
18583   enableval=yes
18584         enable_gnat_projects=yes
18585
18586 fi;
18587 echo "$as_me:18587: result: $enable_gnat_projects" >&5
18588 echo "${ECHO_T}$enable_gnat_projects" >&6
18589
18590 ###     Checks for libraries.
18591 case "$cf_cv_system_name" in
18592 (*mingw32*|*mingw64*)
18593         # Note: WINVER may be a problem with Windows 10
18594         if test "x$with_exp_win32" = xyes ; then
18595                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18596         else
18597                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18598         fi
18599
18600 echo "$as_me:18600: checking if ssp library is needed" >&5
18601 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18602 if test "${cf_cv_need_libssp+set}" = set; then
18603   echo $ECHO_N "(cached) $ECHO_C" >&6
18604 else
18605
18606 cat >"conftest.$ac_ext" <<_ACEOF
18607 #line 18607 "configure"
18608 #include "confdefs.h"
18609
18610 #include <sys/types.h>
18611 #include <dirent.h>
18612
18613 int
18614 main (void)
18615 {
18616
18617        DIR *dp = opendir(".");
18618
18619   ;
18620   return 0;
18621 }
18622 _ACEOF
18623 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18624 if { (eval echo "$as_me:18624: \"$ac_link\"") >&5
18625   (eval $ac_link) 2>&5
18626   ac_status=$?
18627   echo "$as_me:18627: \$? = $ac_status" >&5
18628   (exit "$ac_status"); } &&
18629          { ac_try='test -s "conftest$ac_exeext"'
18630   { (eval echo "$as_me:18630: \"$ac_try\"") >&5
18631   (eval $ac_try) 2>&5
18632   ac_status=$?
18633   echo "$as_me:18633: \$? = $ac_status" >&5
18634   (exit "$ac_status"); }; }; then
18635   cf_cv_need_libssp=no
18636 else
18637   echo "$as_me: failed program was:" >&5
18638 cat "conftest.$ac_ext" >&5
18639
18640         cf_save_LIBS="$LIBS"
18641         LIBS="$LIBS -lssp"
18642         cat >"conftest.$ac_ext" <<_ACEOF
18643 #line 18643 "configure"
18644 #include "confdefs.h"
18645
18646 #include <sys/types.h>
18647 #include <dirent.h>
18648
18649 int
18650 main (void)
18651 {
18652
18653                    DIR *dp = opendir(".");
18654
18655   ;
18656   return 0;
18657 }
18658 _ACEOF
18659 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18660 if { (eval echo "$as_me:18660: \"$ac_link\"") >&5
18661   (eval $ac_link) 2>&5
18662   ac_status=$?
18663   echo "$as_me:18663: \$? = $ac_status" >&5
18664   (exit "$ac_status"); } &&
18665          { ac_try='test -s "conftest$ac_exeext"'
18666   { (eval echo "$as_me:18666: \"$ac_try\"") >&5
18667   (eval $ac_try) 2>&5
18668   ac_status=$?
18669   echo "$as_me:18669: \$? = $ac_status" >&5
18670   (exit "$ac_status"); }; }; then
18671   cf_cv_need_libssp=yes
18672 else
18673   echo "$as_me: failed program was:" >&5
18674 cat "conftest.$ac_ext" >&5
18675 cf_cv_need_libssp=maybe
18676 fi
18677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18678         LIBS="$cf_save_LIBS"
18679
18680 fi
18681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18682 fi
18683 echo "$as_me:18683: result: $cf_cv_need_libssp" >&5
18684 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18685
18686 if test "x$cf_cv_need_libssp" = xyes
18687 then
18688
18689 cf_add_libs="$LIBS"
18690 # reverse order
18691 cf_add_0lib=
18692 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18693 # filter duplicates
18694 for cf_add_1lib in $cf_add_0lib; do
18695         for cf_add_2lib in $cf_add_libs; do
18696                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18697                         cf_add_1lib=
18698                         break
18699                 fi
18700         done
18701         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18702 done
18703 LIBS="$cf_add_libs"
18704
18705 fi
18706
18707         ;;
18708 (*)
18709 echo "$as_me:18709: checking for gettimeofday" >&5
18710 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18711 if test "${ac_cv_func_gettimeofday+set}" = set; then
18712   echo $ECHO_N "(cached) $ECHO_C" >&6
18713 else
18714   cat >"conftest.$ac_ext" <<_ACEOF
18715 #line 18715 "configure"
18716 #include "confdefs.h"
18717 #define gettimeofday autoconf_temporary
18718 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18719 #undef gettimeofday
18720
18721 #ifdef __cplusplus
18722 extern "C"
18723 #endif
18724
18725 /* We use char because int might match the return type of a gcc2
18726    builtin and then its argument prototype would still apply.  */
18727 char gettimeofday (void);
18728
18729 int
18730 main (void)
18731 {
18732
18733 /* The GNU C library defines stubs for functions which it implements
18734     to always fail with ENOSYS.  Some functions are actually named
18735     something starting with __ and the normal name is an alias.  */
18736 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18737 #error found stub for gettimeofday
18738 #endif
18739
18740         return gettimeofday ();
18741   ;
18742   return 0;
18743 }
18744 _ACEOF
18745 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18746 if { (eval echo "$as_me:18746: \"$ac_link\"") >&5
18747   (eval $ac_link) 2>&5
18748   ac_status=$?
18749   echo "$as_me:18749: \$? = $ac_status" >&5
18750   (exit "$ac_status"); } &&
18751          { ac_try='test -s "conftest$ac_exeext"'
18752   { (eval echo "$as_me:18752: \"$ac_try\"") >&5
18753   (eval $ac_try) 2>&5
18754   ac_status=$?
18755   echo "$as_me:18755: \$? = $ac_status" >&5
18756   (exit "$ac_status"); }; }; then
18757   ac_cv_func_gettimeofday=yes
18758 else
18759   echo "$as_me: failed program was:" >&5
18760 cat "conftest.$ac_ext" >&5
18761 ac_cv_func_gettimeofday=no
18762 fi
18763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18764 fi
18765 echo "$as_me:18765: result: $ac_cv_func_gettimeofday" >&5
18766 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18767 if test "$ac_cv_func_gettimeofday" = yes; then
18768
18769 cat >>confdefs.h <<\EOF
18770 #define HAVE_GETTIMEOFDAY 1
18771 EOF
18772
18773 else
18774
18775 echo "$as_me:18775: checking for gettimeofday in -lbsd" >&5
18776 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18777 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18778   echo $ECHO_N "(cached) $ECHO_C" >&6
18779 else
18780   ac_check_lib_save_LIBS=$LIBS
18781 LIBS="-lbsd  $LIBS"
18782 cat >"conftest.$ac_ext" <<_ACEOF
18783 #line 18783 "configure"
18784 #include "confdefs.h"
18785
18786 /* Override any gcc2 internal prototype to avoid an error.  */
18787 #ifdef __cplusplus
18788 extern "C"
18789 #endif
18790 /* We use char because int might match the return type of a gcc2
18791    builtin and then its argument prototype would still apply.  */
18792 char gettimeofday ();
18793 int
18794 main (void)
18795 {
18796 gettimeofday ();
18797   ;
18798   return 0;
18799 }
18800 _ACEOF
18801 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18802 if { (eval echo "$as_me:18802: \"$ac_link\"") >&5
18803   (eval $ac_link) 2>&5
18804   ac_status=$?
18805   echo "$as_me:18805: \$? = $ac_status" >&5
18806   (exit "$ac_status"); } &&
18807          { ac_try='test -s "conftest$ac_exeext"'
18808   { (eval echo "$as_me:18808: \"$ac_try\"") >&5
18809   (eval $ac_try) 2>&5
18810   ac_status=$?
18811   echo "$as_me:18811: \$? = $ac_status" >&5
18812   (exit "$ac_status"); }; }; then
18813   ac_cv_lib_bsd_gettimeofday=yes
18814 else
18815   echo "$as_me: failed program was:" >&5
18816 cat "conftest.$ac_ext" >&5
18817 ac_cv_lib_bsd_gettimeofday=no
18818 fi
18819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18820 LIBS=$ac_check_lib_save_LIBS
18821 fi
18822 echo "$as_me:18822: result: $ac_cv_lib_bsd_gettimeofday" >&5
18823 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18824 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18825
18826 cat >>confdefs.h <<\EOF
18827 #define HAVE_GETTIMEOFDAY 1
18828 EOF
18829
18830 cf_add_libs="$LIBS"
18831 # reverse order
18832 cf_add_0lib=
18833 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18834 # filter duplicates
18835 for cf_add_1lib in $cf_add_0lib; do
18836         for cf_add_2lib in $cf_add_libs; do
18837                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18838                         cf_add_1lib=
18839                         break
18840                 fi
18841         done
18842         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18843 done
18844 LIBS="$cf_add_libs"
18845
18846 fi
18847
18848 fi
18849         ;;
18850 esac
18851
18852 echo "$as_me:18852: checking if -lm needed for math functions" >&5
18853 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18854 if test "${cf_cv_need_libm+set}" = set; then
18855   echo $ECHO_N "(cached) $ECHO_C" >&6
18856 else
18857
18858         cat >"conftest.$ac_ext" <<_ACEOF
18859 #line 18859 "configure"
18860 #include "confdefs.h"
18861
18862         #include <stdio.h>
18863         #include <stdlib.h>
18864         #include <math.h>
18865
18866 int
18867 main (void)
18868 {
18869 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18870   ;
18871   return 0;
18872 }
18873 _ACEOF
18874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18875 if { (eval echo "$as_me:18875: \"$ac_link\"") >&5
18876   (eval $ac_link) 2>&5
18877   ac_status=$?
18878   echo "$as_me:18878: \$? = $ac_status" >&5
18879   (exit "$ac_status"); } &&
18880          { ac_try='test -s "conftest$ac_exeext"'
18881   { (eval echo "$as_me:18881: \"$ac_try\"") >&5
18882   (eval $ac_try) 2>&5
18883   ac_status=$?
18884   echo "$as_me:18884: \$? = $ac_status" >&5
18885   (exit "$ac_status"); }; }; then
18886   cf_cv_need_libm=no
18887 else
18888   echo "$as_me: failed program was:" >&5
18889 cat "conftest.$ac_ext" >&5
18890 cf_cv_need_libm=yes
18891 fi
18892 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18893 fi
18894 echo "$as_me:18894: result: $cf_cv_need_libm" >&5
18895 echo "${ECHO_T}$cf_cv_need_libm" >&6
18896 if test "$cf_cv_need_libm" = yes
18897 then
18898 MATH_LIB=-lm
18899 fi
18900
18901 ###     Checks for header files.
18902 echo "$as_me:18902: checking for ANSI C header files" >&5
18903 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18904 if test "${ac_cv_header_stdc+set}" = set; then
18905   echo $ECHO_N "(cached) $ECHO_C" >&6
18906 else
18907   cat >"conftest.$ac_ext" <<_ACEOF
18908 #line 18908 "configure"
18909 #include "confdefs.h"
18910 #include <stdlib.h>
18911 #include <stdarg.h>
18912 #include <string.h>
18913 #include <float.h>
18914
18915 _ACEOF
18916 if { (eval echo "$as_me:18916: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18917   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18918   ac_status=$?
18919   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18920   rm -f conftest.er1
18921   cat conftest.err >&5
18922   echo "$as_me:18922: \$? = $ac_status" >&5
18923   (exit "$ac_status"); } >/dev/null; then
18924   if test -s conftest.err; then
18925     ac_cpp_err=$ac_c_preproc_warn_flag
18926   else
18927     ac_cpp_err=
18928   fi
18929 else
18930   ac_cpp_err=yes
18931 fi
18932 if test -z "$ac_cpp_err"; then
18933   ac_cv_header_stdc=yes
18934 else
18935   echo "$as_me: failed program was:" >&5
18936   cat "conftest.$ac_ext" >&5
18937   ac_cv_header_stdc=no
18938 fi
18939 rm -f conftest.err "conftest.$ac_ext"
18940
18941 if test $ac_cv_header_stdc = yes; then
18942   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18943   cat >"conftest.$ac_ext" <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946 #include <string.h>
18947
18948 _ACEOF
18949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18950   $EGREP "memchr" >/dev/null 2>&1; then
18951   :
18952 else
18953   ac_cv_header_stdc=no
18954 fi
18955 rm -rf conftest*
18956
18957 fi
18958
18959 if test $ac_cv_header_stdc = yes; then
18960   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18961   cat >"conftest.$ac_ext" <<_ACEOF
18962 #line 18962 "configure"
18963 #include "confdefs.h"
18964 #include <stdlib.h>
18965
18966 _ACEOF
18967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18968   $EGREP "free" >/dev/null 2>&1; then
18969   :
18970 else
18971   ac_cv_header_stdc=no
18972 fi
18973 rm -rf conftest*
18974
18975 fi
18976
18977 if test $ac_cv_header_stdc = yes; then
18978   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18979   if test "$cross_compiling" = yes; then
18980   :
18981 else
18982   cat >"conftest.$ac_ext" <<_ACEOF
18983 #line 18983 "configure"
18984 #include "confdefs.h"
18985 #include <ctype.h>
18986 #if ((' ' & 0x0FF) == 0x020)
18987 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18988 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18989 #else
18990 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18991                      || ('j' <= (c) && (c) <= 'r') \
18992                      || ('s' <= (c) && (c) <= 'z'))
18993 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18994 #endif
18995
18996 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18997 int
18998 main (void)
18999 {
19000   int i;
19001   for (i = 0; i < 256; i++)
19002     if (XOR (islower (i), ISLOWER (i))
19003         || toupper (i) != TOUPPER (i))
19004       $ac_main_return(2);
19005   $ac_main_return (0);
19006 }
19007 _ACEOF
19008 rm -f "conftest$ac_exeext"
19009 if { (eval echo "$as_me:19009: \"$ac_link\"") >&5
19010   (eval $ac_link) 2>&5
19011   ac_status=$?
19012   echo "$as_me:19012: \$? = $ac_status" >&5
19013   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19014   { (eval echo "$as_me:19014: \"$ac_try\"") >&5
19015   (eval $ac_try) 2>&5
19016   ac_status=$?
19017   echo "$as_me:19017: \$? = $ac_status" >&5
19018   (exit "$ac_status"); }; }; then
19019   :
19020 else
19021   echo "$as_me: program exited with status $ac_status" >&5
19022 echo "$as_me: failed program was:" >&5
19023 cat "conftest.$ac_ext" >&5
19024 ac_cv_header_stdc=no
19025 fi
19026 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19027 fi
19028 fi
19029 fi
19030 echo "$as_me:19030: result: $ac_cv_header_stdc" >&5
19031 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19032 if test $ac_cv_header_stdc = yes; then
19033
19034 cat >>confdefs.h <<\EOF
19035 #define STDC_HEADERS 1
19036 EOF
19037
19038 fi
19039
19040 ac_header_dirent=no
19041 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19042   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19043 echo "$as_me:19043: checking for $ac_hdr that defines DIR" >&5
19044 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19046   echo $ECHO_N "(cached) $ECHO_C" >&6
19047 else
19048   cat >"conftest.$ac_ext" <<_ACEOF
19049 #line 19049 "configure"
19050 #include "confdefs.h"
19051 #include <sys/types.h>
19052 #include <$ac_hdr>
19053
19054 int
19055 main (void)
19056 {
19057 if ((DIR *) 0)
19058 return 0;
19059   ;
19060   return 0;
19061 }
19062 _ACEOF
19063 rm -f "conftest.$ac_objext"
19064 if { (eval echo "$as_me:19064: \"$ac_compile\"") >&5
19065   (eval $ac_compile) 2>&5
19066   ac_status=$?
19067   echo "$as_me:19067: \$? = $ac_status" >&5
19068   (exit "$ac_status"); } &&
19069          { ac_try='test -s "conftest.$ac_objext"'
19070   { (eval echo "$as_me:19070: \"$ac_try\"") >&5
19071   (eval $ac_try) 2>&5
19072   ac_status=$?
19073   echo "$as_me:19073: \$? = $ac_status" >&5
19074   (exit "$ac_status"); }; }; then
19075   eval "$as_ac_Header=yes"
19076 else
19077   echo "$as_me: failed program was:" >&5
19078 cat "conftest.$ac_ext" >&5
19079 eval "$as_ac_Header=no"
19080 fi
19081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19082 fi
19083 echo "$as_me:19083: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19084 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19085 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19086   cat >>confdefs.h <<EOF
19087 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19088 EOF
19089
19090 ac_header_dirent=$ac_hdr; break
19091 fi
19092
19093 done
19094 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19095 if test $ac_header_dirent = dirent.h; then
19096   echo "$as_me:19096: checking for opendir in -ldir" >&5
19097 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19098 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19099   echo $ECHO_N "(cached) $ECHO_C" >&6
19100 else
19101   ac_check_lib_save_LIBS=$LIBS
19102 LIBS="-ldir  $LIBS"
19103 cat >"conftest.$ac_ext" <<_ACEOF
19104 #line 19104 "configure"
19105 #include "confdefs.h"
19106
19107 /* Override any gcc2 internal prototype to avoid an error.  */
19108 #ifdef __cplusplus
19109 extern "C"
19110 #endif
19111 /* We use char because int might match the return type of a gcc2
19112    builtin and then its argument prototype would still apply.  */
19113 char opendir ();
19114 int
19115 main (void)
19116 {
19117 opendir ();
19118   ;
19119   return 0;
19120 }
19121 _ACEOF
19122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19123 if { (eval echo "$as_me:19123: \"$ac_link\"") >&5
19124   (eval $ac_link) 2>&5
19125   ac_status=$?
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit "$ac_status"); } &&
19128          { ac_try='test -s "conftest$ac_exeext"'
19129   { (eval echo "$as_me:19129: \"$ac_try\"") >&5
19130   (eval $ac_try) 2>&5
19131   ac_status=$?
19132   echo "$as_me:19132: \$? = $ac_status" >&5
19133   (exit "$ac_status"); }; }; then
19134   ac_cv_lib_dir_opendir=yes
19135 else
19136   echo "$as_me: failed program was:" >&5
19137 cat "conftest.$ac_ext" >&5
19138 ac_cv_lib_dir_opendir=no
19139 fi
19140 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19141 LIBS=$ac_check_lib_save_LIBS
19142 fi
19143 echo "$as_me:19143: result: $ac_cv_lib_dir_opendir" >&5
19144 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19145 if test "$ac_cv_lib_dir_opendir" = yes; then
19146   LIBS="$LIBS -ldir"
19147 fi
19148
19149 else
19150   echo "$as_me:19150: checking for opendir in -lx" >&5
19151 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19152 if test "${ac_cv_lib_x_opendir+set}" = set; then
19153   echo $ECHO_N "(cached) $ECHO_C" >&6
19154 else
19155   ac_check_lib_save_LIBS=$LIBS
19156 LIBS="-lx  $LIBS"
19157 cat >"conftest.$ac_ext" <<_ACEOF
19158 #line 19158 "configure"
19159 #include "confdefs.h"
19160
19161 /* Override any gcc2 internal prototype to avoid an error.  */
19162 #ifdef __cplusplus
19163 extern "C"
19164 #endif
19165 /* We use char because int might match the return type of a gcc2
19166    builtin and then its argument prototype would still apply.  */
19167 char opendir ();
19168 int
19169 main (void)
19170 {
19171 opendir ();
19172   ;
19173   return 0;
19174 }
19175 _ACEOF
19176 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19177 if { (eval echo "$as_me:19177: \"$ac_link\"") >&5
19178   (eval $ac_link) 2>&5
19179   ac_status=$?
19180   echo "$as_me:19180: \$? = $ac_status" >&5
19181   (exit "$ac_status"); } &&
19182          { ac_try='test -s "conftest$ac_exeext"'
19183   { (eval echo "$as_me:19183: \"$ac_try\"") >&5
19184   (eval $ac_try) 2>&5
19185   ac_status=$?
19186   echo "$as_me:19186: \$? = $ac_status" >&5
19187   (exit "$ac_status"); }; }; then
19188   ac_cv_lib_x_opendir=yes
19189 else
19190   echo "$as_me: failed program was:" >&5
19191 cat "conftest.$ac_ext" >&5
19192 ac_cv_lib_x_opendir=no
19193 fi
19194 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19195 LIBS=$ac_check_lib_save_LIBS
19196 fi
19197 echo "$as_me:19197: result: $ac_cv_lib_x_opendir" >&5
19198 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19199 if test "$ac_cv_lib_x_opendir" = yes; then
19200   LIBS="$LIBS -lx"
19201 fi
19202
19203 fi
19204
19205 echo "$as_me:19205: checking whether time.h and sys/time.h may both be included" >&5
19206 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19207 if test "${ac_cv_header_time+set}" = set; then
19208   echo $ECHO_N "(cached) $ECHO_C" >&6
19209 else
19210   cat >"conftest.$ac_ext" <<_ACEOF
19211 #line 19211 "configure"
19212 #include "confdefs.h"
19213 #include <sys/types.h>
19214 #include <sys/time.h>
19215 #include <time.h>
19216
19217 int
19218 main (void)
19219 {
19220 if ((struct tm *) 0)
19221 return 0;
19222   ;
19223   return 0;
19224 }
19225 _ACEOF
19226 rm -f "conftest.$ac_objext"
19227 if { (eval echo "$as_me:19227: \"$ac_compile\"") >&5
19228   (eval $ac_compile) 2>&5
19229   ac_status=$?
19230   echo "$as_me:19230: \$? = $ac_status" >&5
19231   (exit "$ac_status"); } &&
19232          { ac_try='test -s "conftest.$ac_objext"'
19233   { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234   (eval $ac_try) 2>&5
19235   ac_status=$?
19236   echo "$as_me:19236: \$? = $ac_status" >&5
19237   (exit "$ac_status"); }; }; then
19238   ac_cv_header_time=yes
19239 else
19240   echo "$as_me: failed program was:" >&5
19241 cat "conftest.$ac_ext" >&5
19242 ac_cv_header_time=no
19243 fi
19244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19245 fi
19246 echo "$as_me:19246: result: $ac_cv_header_time" >&5
19247 echo "${ECHO_T}$ac_cv_header_time" >&6
19248 if test $ac_cv_header_time = yes; then
19249
19250 cat >>confdefs.h <<\EOF
19251 #define TIME_WITH_SYS_TIME 1
19252 EOF
19253
19254 fi
19255
19256 cf_regex_func=no
19257 cf_regex_libs=
19258 case "$host_os" in
19259 (mingw*)
19260         # -lsystre -ltre -lintl -liconv
19261         echo "$as_me:19261: checking for regcomp in -lsystre" >&5
19262 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19263 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19264   echo $ECHO_N "(cached) $ECHO_C" >&6
19265 else
19266   ac_check_lib_save_LIBS=$LIBS
19267 LIBS="-lsystre  $LIBS"
19268 cat >"conftest.$ac_ext" <<_ACEOF
19269 #line 19269 "configure"
19270 #include "confdefs.h"
19271
19272 /* Override any gcc2 internal prototype to avoid an error.  */
19273 #ifdef __cplusplus
19274 extern "C"
19275 #endif
19276 /* We use char because int might match the return type of a gcc2
19277    builtin and then its argument prototype would still apply.  */
19278 char regcomp ();
19279 int
19280 main (void)
19281 {
19282 regcomp ();
19283   ;
19284   return 0;
19285 }
19286 _ACEOF
19287 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19288 if { (eval echo "$as_me:19288: \"$ac_link\"") >&5
19289   (eval $ac_link) 2>&5
19290   ac_status=$?
19291   echo "$as_me:19291: \$? = $ac_status" >&5
19292   (exit "$ac_status"); } &&
19293          { ac_try='test -s "conftest$ac_exeext"'
19294   { (eval echo "$as_me:19294: \"$ac_try\"") >&5
19295   (eval $ac_try) 2>&5
19296   ac_status=$?
19297   echo "$as_me:19297: \$? = $ac_status" >&5
19298   (exit "$ac_status"); }; }; then
19299   ac_cv_lib_systre_regcomp=yes
19300 else
19301   echo "$as_me: failed program was:" >&5
19302 cat "conftest.$ac_ext" >&5
19303 ac_cv_lib_systre_regcomp=no
19304 fi
19305 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19306 LIBS=$ac_check_lib_save_LIBS
19307 fi
19308 echo "$as_me:19308: result: $ac_cv_lib_systre_regcomp" >&5
19309 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19310 if test "$ac_cv_lib_systre_regcomp" = yes; then
19311
19312                 echo "$as_me:19312: checking for libiconv_open in -liconv" >&5
19313 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19314 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19315   echo $ECHO_N "(cached) $ECHO_C" >&6
19316 else
19317   ac_check_lib_save_LIBS=$LIBS
19318 LIBS="-liconv  $LIBS"
19319 cat >"conftest.$ac_ext" <<_ACEOF
19320 #line 19320 "configure"
19321 #include "confdefs.h"
19322
19323 /* Override any gcc2 internal prototype to avoid an error.  */
19324 #ifdef __cplusplus
19325 extern "C"
19326 #endif
19327 /* We use char because int might match the return type of a gcc2
19328    builtin and then its argument prototype would still apply.  */
19329 char libiconv_open ();
19330 int
19331 main (void)
19332 {
19333 libiconv_open ();
19334   ;
19335   return 0;
19336 }
19337 _ACEOF
19338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19339 if { (eval echo "$as_me:19339: \"$ac_link\"") >&5
19340   (eval $ac_link) 2>&5
19341   ac_status=$?
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit "$ac_status"); } &&
19344          { ac_try='test -s "conftest$ac_exeext"'
19345   { (eval echo "$as_me:19345: \"$ac_try\"") >&5
19346   (eval $ac_try) 2>&5
19347   ac_status=$?
19348   echo "$as_me:19348: \$? = $ac_status" >&5
19349   (exit "$ac_status"); }; }; then
19350   ac_cv_lib_iconv_libiconv_open=yes
19351 else
19352   echo "$as_me: failed program was:" >&5
19353 cat "conftest.$ac_ext" >&5
19354 ac_cv_lib_iconv_libiconv_open=no
19355 fi
19356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19357 LIBS=$ac_check_lib_save_LIBS
19358 fi
19359 echo "$as_me:19359: result: $ac_cv_lib_iconv_libiconv_open" >&5
19360 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19361 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19362
19363 cf_add_libs="$LIBS"
19364 # reverse order
19365 cf_add_0lib=
19366 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19367 # filter duplicates
19368 for cf_add_1lib in $cf_add_0lib; do
19369         for cf_add_2lib in $cf_add_libs; do
19370                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19371                         cf_add_1lib=
19372                         break
19373                 fi
19374         done
19375         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19376 done
19377 LIBS="$cf_add_libs"
19378
19379 fi
19380
19381                 echo "$as_me:19381: checking for libintl_gettext in -lintl" >&5
19382 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19383 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19384   echo $ECHO_N "(cached) $ECHO_C" >&6
19385 else
19386   ac_check_lib_save_LIBS=$LIBS
19387 LIBS="-lintl  $LIBS"
19388 cat >"conftest.$ac_ext" <<_ACEOF
19389 #line 19389 "configure"
19390 #include "confdefs.h"
19391
19392 /* Override any gcc2 internal prototype to avoid an error.  */
19393 #ifdef __cplusplus
19394 extern "C"
19395 #endif
19396 /* We use char because int might match the return type of a gcc2
19397    builtin and then its argument prototype would still apply.  */
19398 char libintl_gettext ();
19399 int
19400 main (void)
19401 {
19402 libintl_gettext ();
19403   ;
19404   return 0;
19405 }
19406 _ACEOF
19407 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19408 if { (eval echo "$as_me:19408: \"$ac_link\"") >&5
19409   (eval $ac_link) 2>&5
19410   ac_status=$?
19411   echo "$as_me:19411: \$? = $ac_status" >&5
19412   (exit "$ac_status"); } &&
19413          { ac_try='test -s "conftest$ac_exeext"'
19414   { (eval echo "$as_me:19414: \"$ac_try\"") >&5
19415   (eval $ac_try) 2>&5
19416   ac_status=$?
19417   echo "$as_me:19417: \$? = $ac_status" >&5
19418   (exit "$ac_status"); }; }; then
19419   ac_cv_lib_intl_libintl_gettext=yes
19420 else
19421   echo "$as_me: failed program was:" >&5
19422 cat "conftest.$ac_ext" >&5
19423 ac_cv_lib_intl_libintl_gettext=no
19424 fi
19425 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19426 LIBS=$ac_check_lib_save_LIBS
19427 fi
19428 echo "$as_me:19428: result: $ac_cv_lib_intl_libintl_gettext" >&5
19429 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19430 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19431
19432 cf_add_libs="$LIBS"
19433 # reverse order
19434 cf_add_0lib=
19435 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19436 # filter duplicates
19437 for cf_add_1lib in $cf_add_0lib; do
19438         for cf_add_2lib in $cf_add_libs; do
19439                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19440                         cf_add_1lib=
19441                         break
19442                 fi
19443         done
19444         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19445 done
19446 LIBS="$cf_add_libs"
19447
19448 fi
19449
19450                 echo "$as_me:19450: checking for tre_regcomp in -ltre" >&5
19451 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19452 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19453   echo $ECHO_N "(cached) $ECHO_C" >&6
19454 else
19455   ac_check_lib_save_LIBS=$LIBS
19456 LIBS="-ltre  $LIBS"
19457 cat >"conftest.$ac_ext" <<_ACEOF
19458 #line 19458 "configure"
19459 #include "confdefs.h"
19460
19461 /* Override any gcc2 internal prototype to avoid an error.  */
19462 #ifdef __cplusplus
19463 extern "C"
19464 #endif
19465 /* We use char because int might match the return type of a gcc2
19466    builtin and then its argument prototype would still apply.  */
19467 char tre_regcomp ();
19468 int
19469 main (void)
19470 {
19471 tre_regcomp ();
19472   ;
19473   return 0;
19474 }
19475 _ACEOF
19476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19477 if { (eval echo "$as_me:19477: \"$ac_link\"") >&5
19478   (eval $ac_link) 2>&5
19479   ac_status=$?
19480   echo "$as_me:19480: \$? = $ac_status" >&5
19481   (exit "$ac_status"); } &&
19482          { ac_try='test -s "conftest$ac_exeext"'
19483   { (eval echo "$as_me:19483: \"$ac_try\"") >&5
19484   (eval $ac_try) 2>&5
19485   ac_status=$?
19486   echo "$as_me:19486: \$? = $ac_status" >&5
19487   (exit "$ac_status"); }; }; then
19488   ac_cv_lib_tre_tre_regcomp=yes
19489 else
19490   echo "$as_me: failed program was:" >&5
19491 cat "conftest.$ac_ext" >&5
19492 ac_cv_lib_tre_tre_regcomp=no
19493 fi
19494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19495 LIBS=$ac_check_lib_save_LIBS
19496 fi
19497 echo "$as_me:19497: result: $ac_cv_lib_tre_tre_regcomp" >&5
19498 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19499 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19500
19501 cf_add_libs="$LIBS"
19502 # reverse order
19503 cf_add_0lib=
19504 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19505 # filter duplicates
19506 for cf_add_1lib in $cf_add_0lib; do
19507         for cf_add_2lib in $cf_add_libs; do
19508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19509                         cf_add_1lib=
19510                         break
19511                 fi
19512         done
19513         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19514 done
19515 LIBS="$cf_add_libs"
19516
19517 fi
19518
19519 cf_add_libs="$LIBS"
19520 # reverse order
19521 cf_add_0lib=
19522 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19523 # filter duplicates
19524 for cf_add_1lib in $cf_add_0lib; do
19525         for cf_add_2lib in $cf_add_libs; do
19526                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19527                         cf_add_1lib=
19528                         break
19529                 fi
19530         done
19531         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19532 done
19533 LIBS="$cf_add_libs"
19534
19535                 cf_regex_func=regcomp
19536
19537 else
19538
19539                 echo "$as_me:19539: checking for regcomp in -lgnurx" >&5
19540 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19541 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19542   echo $ECHO_N "(cached) $ECHO_C" >&6
19543 else
19544   ac_check_lib_save_LIBS=$LIBS
19545 LIBS="-lgnurx  $LIBS"
19546 cat >"conftest.$ac_ext" <<_ACEOF
19547 #line 19547 "configure"
19548 #include "confdefs.h"
19549
19550 /* Override any gcc2 internal prototype to avoid an error.  */
19551 #ifdef __cplusplus
19552 extern "C"
19553 #endif
19554 /* We use char because int might match the return type of a gcc2
19555    builtin and then its argument prototype would still apply.  */
19556 char regcomp ();
19557 int
19558 main (void)
19559 {
19560 regcomp ();
19561   ;
19562   return 0;
19563 }
19564 _ACEOF
19565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19566 if { (eval echo "$as_me:19566: \"$ac_link\"") >&5
19567   (eval $ac_link) 2>&5
19568   ac_status=$?
19569   echo "$as_me:19569: \$? = $ac_status" >&5
19570   (exit "$ac_status"); } &&
19571          { ac_try='test -s "conftest$ac_exeext"'
19572   { (eval echo "$as_me:19572: \"$ac_try\"") >&5
19573   (eval $ac_try) 2>&5
19574   ac_status=$?
19575   echo "$as_me:19575: \$? = $ac_status" >&5
19576   (exit "$ac_status"); }; }; then
19577   ac_cv_lib_gnurx_regcomp=yes
19578 else
19579   echo "$as_me: failed program was:" >&5
19580 cat "conftest.$ac_ext" >&5
19581 ac_cv_lib_gnurx_regcomp=no
19582 fi
19583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19584 LIBS=$ac_check_lib_save_LIBS
19585 fi
19586 echo "$as_me:19586: result: $ac_cv_lib_gnurx_regcomp" >&5
19587 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19588 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19589
19590 cf_add_libs="$LIBS"
19591 # reverse order
19592 cf_add_0lib=
19593 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19594 # filter duplicates
19595 for cf_add_1lib in $cf_add_0lib; do
19596         for cf_add_2lib in $cf_add_libs; do
19597                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19598                         cf_add_1lib=
19599                         break
19600                 fi
19601         done
19602         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19603 done
19604 LIBS="$cf_add_libs"
19605
19606                         cf_regex_func=regcomp
19607 fi
19608
19609 fi
19610
19611         ;;
19612 (*)
19613         cf_regex_libs="regex re"
19614         echo "$as_me:19614: checking for regcomp" >&5
19615 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19616 if test "${ac_cv_func_regcomp+set}" = set; then
19617   echo $ECHO_N "(cached) $ECHO_C" >&6
19618 else
19619   cat >"conftest.$ac_ext" <<_ACEOF
19620 #line 19620 "configure"
19621 #include "confdefs.h"
19622 #define regcomp autoconf_temporary
19623 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19624 #undef regcomp
19625
19626 #ifdef __cplusplus
19627 extern "C"
19628 #endif
19629
19630 /* We use char because int might match the return type of a gcc2
19631    builtin and then its argument prototype would still apply.  */
19632 char regcomp (void);
19633
19634 int
19635 main (void)
19636 {
19637
19638 /* The GNU C library defines stubs for functions which it implements
19639     to always fail with ENOSYS.  Some functions are actually named
19640     something starting with __ and the normal name is an alias.  */
19641 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19642 #error found stub for regcomp
19643 #endif
19644
19645         return regcomp ();
19646   ;
19647   return 0;
19648 }
19649 _ACEOF
19650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19651 if { (eval echo "$as_me:19651: \"$ac_link\"") >&5
19652   (eval $ac_link) 2>&5
19653   ac_status=$?
19654   echo "$as_me:19654: \$? = $ac_status" >&5
19655   (exit "$ac_status"); } &&
19656          { ac_try='test -s "conftest$ac_exeext"'
19657   { (eval echo "$as_me:19657: \"$ac_try\"") >&5
19658   (eval $ac_try) 2>&5
19659   ac_status=$?
19660   echo "$as_me:19660: \$? = $ac_status" >&5
19661   (exit "$ac_status"); }; }; then
19662   ac_cv_func_regcomp=yes
19663 else
19664   echo "$as_me: failed program was:" >&5
19665 cat "conftest.$ac_ext" >&5
19666 ac_cv_func_regcomp=no
19667 fi
19668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19669 fi
19670 echo "$as_me:19670: result: $ac_cv_func_regcomp" >&5
19671 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19672 if test "$ac_cv_func_regcomp" = yes; then
19673   cf_regex_func=regcomp
19674 else
19675
19676                 for cf_regex_lib in $cf_regex_libs
19677                 do
19678                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19679 echo "$as_me:19679: checking for regcomp in -l$cf_regex_lib" >&5
19680 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19681 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19682   echo $ECHO_N "(cached) $ECHO_C" >&6
19683 else
19684   ac_check_lib_save_LIBS=$LIBS
19685 LIBS="-l$cf_regex_lib  $LIBS"
19686 cat >"conftest.$ac_ext" <<_ACEOF
19687 #line 19687 "configure"
19688 #include "confdefs.h"
19689
19690 /* Override any gcc2 internal prototype to avoid an error.  */
19691 #ifdef __cplusplus
19692 extern "C"
19693 #endif
19694 /* We use char because int might match the return type of a gcc2
19695    builtin and then its argument prototype would still apply.  */
19696 char regcomp ();
19697 int
19698 main (void)
19699 {
19700 regcomp ();
19701   ;
19702   return 0;
19703 }
19704 _ACEOF
19705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19706 if { (eval echo "$as_me:19706: \"$ac_link\"") >&5
19707   (eval $ac_link) 2>&5
19708   ac_status=$?
19709   echo "$as_me:19709: \$? = $ac_status" >&5
19710   (exit "$ac_status"); } &&
19711          { ac_try='test -s "conftest$ac_exeext"'
19712   { (eval echo "$as_me:19712: \"$ac_try\"") >&5
19713   (eval $ac_try) 2>&5
19714   ac_status=$?
19715   echo "$as_me:19715: \$? = $ac_status" >&5
19716   (exit "$ac_status"); }; }; then
19717   eval "$as_ac_Lib=yes"
19718 else
19719   echo "$as_me: failed program was:" >&5
19720 cat "conftest.$ac_ext" >&5
19721 eval "$as_ac_Lib=no"
19722 fi
19723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19724 LIBS=$ac_check_lib_save_LIBS
19725 fi
19726 echo "$as_me:19726: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19727 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19728 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19729
19730 cf_add_libs="$LIBS"
19731 # reverse order
19732 cf_add_0lib=
19733 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19734 # filter duplicates
19735 for cf_add_1lib in $cf_add_0lib; do
19736         for cf_add_2lib in $cf_add_libs; do
19737                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19738                         cf_add_1lib=
19739                         break
19740                 fi
19741         done
19742         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19743 done
19744 LIBS="$cf_add_libs"
19745
19746                                         cf_regex_func=regcomp
19747                                         break
19748 fi
19749
19750                 done
19751
19752 fi
19753
19754         ;;
19755 esac
19756
19757 if test "$cf_regex_func" = no ; then
19758         echo "$as_me:19758: checking for compile" >&5
19759 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19760 if test "${ac_cv_func_compile+set}" = set; then
19761   echo $ECHO_N "(cached) $ECHO_C" >&6
19762 else
19763   cat >"conftest.$ac_ext" <<_ACEOF
19764 #line 19764 "configure"
19765 #include "confdefs.h"
19766 #define compile autoconf_temporary
19767 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19768 #undef compile
19769
19770 #ifdef __cplusplus
19771 extern "C"
19772 #endif
19773
19774 /* We use char because int might match the return type of a gcc2
19775    builtin and then its argument prototype would still apply.  */
19776 char compile (void);
19777
19778 int
19779 main (void)
19780 {
19781
19782 /* The GNU C library defines stubs for functions which it implements
19783     to always fail with ENOSYS.  Some functions are actually named
19784     something starting with __ and the normal name is an alias.  */
19785 #if defined (__stub_compile) || defined (__stub___compile)
19786 #error found stub for compile
19787 #endif
19788
19789         return compile ();
19790   ;
19791   return 0;
19792 }
19793 _ACEOF
19794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19795 if { (eval echo "$as_me:19795: \"$ac_link\"") >&5
19796   (eval $ac_link) 2>&5
19797   ac_status=$?
19798   echo "$as_me:19798: \$? = $ac_status" >&5
19799   (exit "$ac_status"); } &&
19800          { ac_try='test -s "conftest$ac_exeext"'
19801   { (eval echo "$as_me:19801: \"$ac_try\"") >&5
19802   (eval $ac_try) 2>&5
19803   ac_status=$?
19804   echo "$as_me:19804: \$? = $ac_status" >&5
19805   (exit "$ac_status"); }; }; then
19806   ac_cv_func_compile=yes
19807 else
19808   echo "$as_me: failed program was:" >&5
19809 cat "conftest.$ac_ext" >&5
19810 ac_cv_func_compile=no
19811 fi
19812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19813 fi
19814 echo "$as_me:19814: result: $ac_cv_func_compile" >&5
19815 echo "${ECHO_T}$ac_cv_func_compile" >&6
19816 if test "$ac_cv_func_compile" = yes; then
19817   cf_regex_func=compile
19818 else
19819
19820                 echo "$as_me:19820: checking for compile in -lgen" >&5
19821 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19822 if test "${ac_cv_lib_gen_compile+set}" = set; then
19823   echo $ECHO_N "(cached) $ECHO_C" >&6
19824 else
19825   ac_check_lib_save_LIBS=$LIBS
19826 LIBS="-lgen  $LIBS"
19827 cat >"conftest.$ac_ext" <<_ACEOF
19828 #line 19828 "configure"
19829 #include "confdefs.h"
19830
19831 /* Override any gcc2 internal prototype to avoid an error.  */
19832 #ifdef __cplusplus
19833 extern "C"
19834 #endif
19835 /* We use char because int might match the return type of a gcc2
19836    builtin and then its argument prototype would still apply.  */
19837 char compile ();
19838 int
19839 main (void)
19840 {
19841 compile ();
19842   ;
19843   return 0;
19844 }
19845 _ACEOF
19846 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19847 if { (eval echo "$as_me:19847: \"$ac_link\"") >&5
19848   (eval $ac_link) 2>&5
19849   ac_status=$?
19850   echo "$as_me:19850: \$? = $ac_status" >&5
19851   (exit "$ac_status"); } &&
19852          { ac_try='test -s "conftest$ac_exeext"'
19853   { (eval echo "$as_me:19853: \"$ac_try\"") >&5
19854   (eval $ac_try) 2>&5
19855   ac_status=$?
19856   echo "$as_me:19856: \$? = $ac_status" >&5
19857   (exit "$ac_status"); }; }; then
19858   ac_cv_lib_gen_compile=yes
19859 else
19860   echo "$as_me: failed program was:" >&5
19861 cat "conftest.$ac_ext" >&5
19862 ac_cv_lib_gen_compile=no
19863 fi
19864 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19865 LIBS=$ac_check_lib_save_LIBS
19866 fi
19867 echo "$as_me:19867: result: $ac_cv_lib_gen_compile" >&5
19868 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19869 if test "$ac_cv_lib_gen_compile" = yes; then
19870
19871 cf_add_libs="$LIBS"
19872 # reverse order
19873 cf_add_0lib=
19874 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19875 # filter duplicates
19876 for cf_add_1lib in $cf_add_0lib; do
19877         for cf_add_2lib in $cf_add_libs; do
19878                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19879                         cf_add_1lib=
19880                         break
19881                 fi
19882         done
19883         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19884 done
19885 LIBS="$cf_add_libs"
19886
19887                                 cf_regex_func=compile
19888 fi
19889
19890 fi
19891
19892 fi
19893
19894 if test "$cf_regex_func" = no ; then
19895         { echo "$as_me:19895: WARNING: cannot find regular expression library" >&5
19896 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19897 fi
19898
19899 echo "$as_me:19899: checking for regular-expression headers" >&5
19900 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19901 if test "${cf_cv_regex_hdrs+set}" = set; then
19902   echo $ECHO_N "(cached) $ECHO_C" >&6
19903 else
19904
19905 cf_cv_regex_hdrs=no
19906 case "$cf_regex_func" in
19907 (compile)
19908         for cf_regex_hdr in regexp.h regexpr.h
19909         do
19910                 cat >"conftest.$ac_ext" <<_ACEOF
19911 #line 19911 "configure"
19912 #include "confdefs.h"
19913 #include <$cf_regex_hdr>
19914 int
19915 main (void)
19916 {
19917
19918                         char *p = compile("", "", "", 0);
19919                         int x = step("", "");
19920                         (void)p;
19921                         (void)x;
19922
19923   ;
19924   return 0;
19925 }
19926 _ACEOF
19927 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19928 if { (eval echo "$as_me:19928: \"$ac_link\"") >&5
19929   (eval $ac_link) 2>&5
19930   ac_status=$?
19931   echo "$as_me:19931: \$? = $ac_status" >&5
19932   (exit "$ac_status"); } &&
19933          { ac_try='test -s "conftest$ac_exeext"'
19934   { (eval echo "$as_me:19934: \"$ac_try\"") >&5
19935   (eval $ac_try) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit "$ac_status"); }; }; then
19939
19940                         cf_cv_regex_hdrs=$cf_regex_hdr
19941                         break
19942
19943 else
19944   echo "$as_me: failed program was:" >&5
19945 cat "conftest.$ac_ext" >&5
19946 fi
19947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19948         done
19949         ;;
19950 (*)
19951         for cf_regex_hdr in regex.h
19952         do
19953                 cat >"conftest.$ac_ext" <<_ACEOF
19954 #line 19954 "configure"
19955 #include "confdefs.h"
19956 #include <sys/types.h>
19957 #include <$cf_regex_hdr>
19958 int
19959 main (void)
19960 {
19961
19962                         regex_t *p = 0;
19963                         int x = regcomp(p, "", 0);
19964                         int y = regexec(p, "", 0, 0, 0);
19965                         (void)x;
19966                         (void)y;
19967                         regfree(p);
19968
19969   ;
19970   return 0;
19971 }
19972 _ACEOF
19973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19974 if { (eval echo "$as_me:19974: \"$ac_link\"") >&5
19975   (eval $ac_link) 2>&5
19976   ac_status=$?
19977   echo "$as_me:19977: \$? = $ac_status" >&5
19978   (exit "$ac_status"); } &&
19979          { ac_try='test -s "conftest$ac_exeext"'
19980   { (eval echo "$as_me:19980: \"$ac_try\"") >&5
19981   (eval $ac_try) 2>&5
19982   ac_status=$?
19983   echo "$as_me:19983: \$? = $ac_status" >&5
19984   (exit "$ac_status"); }; }; then
19985
19986                         cf_cv_regex_hdrs=$cf_regex_hdr
19987                         break
19988
19989 else
19990   echo "$as_me: failed program was:" >&5
19991 cat "conftest.$ac_ext" >&5
19992 fi
19993 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19994         done
19995         ;;
19996 esac
19997
19998 fi
19999 echo "$as_me:19999: result: $cf_cv_regex_hdrs" >&5
20000 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20001
20002 case "$cf_cv_regex_hdrs" in
20003         (no)            { echo "$as_me:20003: WARNING: no regular expression header found" >&5
20004 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20005         (regex.h)
20006 cat >>confdefs.h <<\EOF
20007 #define HAVE_REGEX_H_FUNCS 1
20008 EOF
20009  ;;
20010         (regexp.h)
20011 cat >>confdefs.h <<\EOF
20012 #define HAVE_REGEXP_H_FUNCS 1
20013 EOF
20014  ;;
20015         (regexpr.h)
20016 cat >>confdefs.h <<\EOF
20017 #define HAVE_REGEXPR_H_FUNCS 1
20018 EOF
20019  ;;
20020 esac
20021
20022 for ac_header in \
20023 fcntl.h \
20024 getopt.h \
20025 limits.h \
20026 locale.h \
20027 math.h \
20028 poll.h \
20029 sys/ioctl.h \
20030 sys/param.h \
20031 sys/poll.h \
20032 sys/select.h \
20033 sys/time.h \
20034 sys/times.h \
20035 ttyent.h \
20036 unistd.h \
20037 wctype.h \
20038
20039 do
20040 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20041 echo "$as_me:20041: checking for $ac_header" >&5
20042 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20043 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20044   echo $ECHO_N "(cached) $ECHO_C" >&6
20045 else
20046   cat >"conftest.$ac_ext" <<_ACEOF
20047 #line 20047 "configure"
20048 #include "confdefs.h"
20049 #include <$ac_header>
20050 _ACEOF
20051 if { (eval echo "$as_me:20051: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20052   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20053   ac_status=$?
20054   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20055   rm -f conftest.er1
20056   cat conftest.err >&5
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit "$ac_status"); } >/dev/null; then
20059   if test -s conftest.err; then
20060     ac_cpp_err=$ac_c_preproc_warn_flag
20061   else
20062     ac_cpp_err=
20063   fi
20064 else
20065   ac_cpp_err=yes
20066 fi
20067 if test -z "$ac_cpp_err"; then
20068   eval "$as_ac_Header=yes"
20069 else
20070   echo "$as_me: failed program was:" >&5
20071   cat "conftest.$ac_ext" >&5
20072   eval "$as_ac_Header=no"
20073 fi
20074 rm -f conftest.err "conftest.$ac_ext"
20075 fi
20076 echo "$as_me:20076: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20077 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20078 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20079   cat >>confdefs.h <<EOF
20080 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20081 EOF
20082
20083 fi
20084 done
20085
20086 for ac_header in unistd.h getopt.h
20087 do
20088 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20089 echo "$as_me:20089: checking for $ac_header" >&5
20090 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20092   echo $ECHO_N "(cached) $ECHO_C" >&6
20093 else
20094   cat >"conftest.$ac_ext" <<_ACEOF
20095 #line 20095 "configure"
20096 #include "confdefs.h"
20097 #include <$ac_header>
20098 _ACEOF
20099 if { (eval echo "$as_me:20099: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20100   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20101   ac_status=$?
20102   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20103   rm -f conftest.er1
20104   cat conftest.err >&5
20105   echo "$as_me:20105: \$? = $ac_status" >&5
20106   (exit "$ac_status"); } >/dev/null; then
20107   if test -s conftest.err; then
20108     ac_cpp_err=$ac_c_preproc_warn_flag
20109   else
20110     ac_cpp_err=
20111   fi
20112 else
20113   ac_cpp_err=yes
20114 fi
20115 if test -z "$ac_cpp_err"; then
20116   eval "$as_ac_Header=yes"
20117 else
20118   echo "$as_me: failed program was:" >&5
20119   cat "conftest.$ac_ext" >&5
20120   eval "$as_ac_Header=no"
20121 fi
20122 rm -f conftest.err "conftest.$ac_ext"
20123 fi
20124 echo "$as_me:20124: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20125 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20126 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20127   cat >>confdefs.h <<EOF
20128 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20129 EOF
20130
20131 fi
20132 done
20133
20134 echo "$as_me:20134: checking for header declaring getopt variables" >&5
20135 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20136 if test "${cf_cv_getopt_header+set}" = set; then
20137   echo $ECHO_N "(cached) $ECHO_C" >&6
20138 else
20139
20140 cf_cv_getopt_header=none
20141 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20142 do
20143 cat >"conftest.$ac_ext" <<_ACEOF
20144 #line 20144 "configure"
20145 #include "confdefs.h"
20146
20147 #include <$cf_header>
20148 int
20149 main (void)
20150 {
20151 int x = optind; char *y = optarg; (void)x; (void)y
20152   ;
20153   return 0;
20154 }
20155 _ACEOF
20156 rm -f "conftest.$ac_objext"
20157 if { (eval echo "$as_me:20157: \"$ac_compile\"") >&5
20158   (eval $ac_compile) 2>&5
20159   ac_status=$?
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit "$ac_status"); } &&
20162          { ac_try='test -s "conftest.$ac_objext"'
20163   { (eval echo "$as_me:20163: \"$ac_try\"") >&5
20164   (eval $ac_try) 2>&5
20165   ac_status=$?
20166   echo "$as_me:20166: \$? = $ac_status" >&5
20167   (exit "$ac_status"); }; }; then
20168   cf_cv_getopt_header=$cf_header
20169  break
20170 else
20171   echo "$as_me: failed program was:" >&5
20172 cat "conftest.$ac_ext" >&5
20173 fi
20174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20175 done
20176
20177 fi
20178 echo "$as_me:20178: result: $cf_cv_getopt_header" >&5
20179 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20180 if test "$cf_cv_getopt_header" != none ; then
20181
20182 cat >>confdefs.h <<\EOF
20183 #define HAVE_GETOPT_HEADER 1
20184 EOF
20185
20186 fi
20187 if test "$cf_cv_getopt_header" = getopt.h ; then
20188
20189 cat >>confdefs.h <<\EOF
20190 #define NEED_GETOPT_H 1
20191 EOF
20192
20193 fi
20194
20195 echo "$as_me:20195: checking if external environ is declared" >&5
20196 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20197 if test "${cf_cv_dcl_environ+set}" = set; then
20198   echo $ECHO_N "(cached) $ECHO_C" >&6
20199 else
20200
20201     cat >"conftest.$ac_ext" <<_ACEOF
20202 #line 20202 "configure"
20203 #include "confdefs.h"
20204
20205 #ifdef HAVE_STDLIB_H
20206 #include <stdlib.h>
20207 #endif
20208 #include <unistd.h>
20209 int
20210 main (void)
20211 {
20212 int x = (int) environ
20213   ;
20214   return 0;
20215 }
20216 _ACEOF
20217 rm -f "conftest.$ac_objext"
20218 if { (eval echo "$as_me:20218: \"$ac_compile\"") >&5
20219   (eval $ac_compile) 2>&5
20220   ac_status=$?
20221   echo "$as_me:20221: \$? = $ac_status" >&5
20222   (exit "$ac_status"); } &&
20223          { ac_try='test -s "conftest.$ac_objext"'
20224   { (eval echo "$as_me:20224: \"$ac_try\"") >&5
20225   (eval $ac_try) 2>&5
20226   ac_status=$?
20227   echo "$as_me:20227: \$? = $ac_status" >&5
20228   (exit "$ac_status"); }; }; then
20229   cf_cv_dcl_environ=yes
20230 else
20231   echo "$as_me: failed program was:" >&5
20232 cat "conftest.$ac_ext" >&5
20233 cf_cv_dcl_environ=no
20234 fi
20235 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20236
20237 fi
20238 echo "$as_me:20238: result: $cf_cv_dcl_environ" >&5
20239 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20240
20241 if test "$cf_cv_dcl_environ" = no ; then
20242
20243 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20244
20245     cat >>confdefs.h <<EOF
20246 #define $cf_result 1
20247 EOF
20248
20249 fi
20250
20251 # It's possible (for near-UNIX clones) that the data doesn't exist
20252
20253 echo "$as_me:20253: checking if external environ exists" >&5
20254 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20255 if test "${cf_cv_have_environ+set}" = set; then
20256   echo $ECHO_N "(cached) $ECHO_C" >&6
20257 else
20258
20259         cat >"conftest.$ac_ext" <<_ACEOF
20260 #line 20260 "configure"
20261 #include "confdefs.h"
20262
20263 #undef environ
20264 extern int environ;
20265
20266 int
20267 main (void)
20268 {
20269 environ = 2
20270   ;
20271   return 0;
20272 }
20273 _ACEOF
20274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20275 if { (eval echo "$as_me:20275: \"$ac_link\"") >&5
20276   (eval $ac_link) 2>&5
20277   ac_status=$?
20278   echo "$as_me:20278: \$? = $ac_status" >&5
20279   (exit "$ac_status"); } &&
20280          { ac_try='test -s "conftest$ac_exeext"'
20281   { (eval echo "$as_me:20281: \"$ac_try\"") >&5
20282   (eval $ac_try) 2>&5
20283   ac_status=$?
20284   echo "$as_me:20284: \$? = $ac_status" >&5
20285   (exit "$ac_status"); }; }; then
20286   cf_cv_have_environ=yes
20287 else
20288   echo "$as_me: failed program was:" >&5
20289 cat "conftest.$ac_ext" >&5
20290 cf_cv_have_environ=no
20291 fi
20292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20293
20294 fi
20295 echo "$as_me:20295: result: $cf_cv_have_environ" >&5
20296 echo "${ECHO_T}$cf_cv_have_environ" >&6
20297
20298 if test "$cf_cv_have_environ" = yes ; then
20299
20300 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20301
20302         cat >>confdefs.h <<EOF
20303 #define $cf_result 1
20304 EOF
20305
20306 fi
20307
20308 echo "$as_me:20308: checking for getenv" >&5
20309 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20310 if test "${ac_cv_func_getenv+set}" = set; then
20311   echo $ECHO_N "(cached) $ECHO_C" >&6
20312 else
20313   cat >"conftest.$ac_ext" <<_ACEOF
20314 #line 20314 "configure"
20315 #include "confdefs.h"
20316 #define getenv autoconf_temporary
20317 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20318 #undef getenv
20319
20320 #ifdef __cplusplus
20321 extern "C"
20322 #endif
20323
20324 /* We use char because int might match the return type of a gcc2
20325    builtin and then its argument prototype would still apply.  */
20326 char getenv (void);
20327
20328 int
20329 main (void)
20330 {
20331
20332 /* The GNU C library defines stubs for functions which it implements
20333     to always fail with ENOSYS.  Some functions are actually named
20334     something starting with __ and the normal name is an alias.  */
20335 #if defined (__stub_getenv) || defined (__stub___getenv)
20336 #error found stub for getenv
20337 #endif
20338
20339         return getenv ();
20340   ;
20341   return 0;
20342 }
20343 _ACEOF
20344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20345 if { (eval echo "$as_me:20345: \"$ac_link\"") >&5
20346   (eval $ac_link) 2>&5
20347   ac_status=$?
20348   echo "$as_me:20348: \$? = $ac_status" >&5
20349   (exit "$ac_status"); } &&
20350          { ac_try='test -s "conftest$ac_exeext"'
20351   { (eval echo "$as_me:20351: \"$ac_try\"") >&5
20352   (eval $ac_try) 2>&5
20353   ac_status=$?
20354   echo "$as_me:20354: \$? = $ac_status" >&5
20355   (exit "$ac_status"); }; }; then
20356   ac_cv_func_getenv=yes
20357 else
20358   echo "$as_me: failed program was:" >&5
20359 cat "conftest.$ac_ext" >&5
20360 ac_cv_func_getenv=no
20361 fi
20362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20363 fi
20364 echo "$as_me:20364: result: $ac_cv_func_getenv" >&5
20365 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20366
20367 for ac_func in putenv setenv strdup
20368 do
20369 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20370 echo "$as_me:20370: checking for $ac_func" >&5
20371 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20372 if eval "test \"\${$as_ac_var+set}\" = set"; then
20373   echo $ECHO_N "(cached) $ECHO_C" >&6
20374 else
20375   cat >"conftest.$ac_ext" <<_ACEOF
20376 #line 20376 "configure"
20377 #include "confdefs.h"
20378 #define $ac_func autoconf_temporary
20379 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20380 #undef $ac_func
20381
20382 #ifdef __cplusplus
20383 extern "C"
20384 #endif
20385
20386 /* We use char because int might match the return type of a gcc2
20387    builtin and then its argument prototype would still apply.  */
20388 char $ac_func (void);
20389
20390 int
20391 main (void)
20392 {
20393
20394 /* The GNU C library defines stubs for functions which it implements
20395     to always fail with ENOSYS.  Some functions are actually named
20396     something starting with __ and the normal name is an alias.  */
20397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20398 #error found stub for $ac_func
20399 #endif
20400
20401         return $ac_func ();
20402   ;
20403   return 0;
20404 }
20405 _ACEOF
20406 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20407 if { (eval echo "$as_me:20407: \"$ac_link\"") >&5
20408   (eval $ac_link) 2>&5
20409   ac_status=$?
20410   echo "$as_me:20410: \$? = $ac_status" >&5
20411   (exit "$ac_status"); } &&
20412          { ac_try='test -s "conftest$ac_exeext"'
20413   { (eval echo "$as_me:20413: \"$ac_try\"") >&5
20414   (eval $ac_try) 2>&5
20415   ac_status=$?
20416   echo "$as_me:20416: \$? = $ac_status" >&5
20417   (exit "$ac_status"); }; }; then
20418   eval "$as_ac_var=yes"
20419 else
20420   echo "$as_me: failed program was:" >&5
20421 cat "conftest.$ac_ext" >&5
20422 eval "$as_ac_var=no"
20423 fi
20424 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20425 fi
20426 echo "$as_me:20426: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20427 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20428 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20429   cat >>confdefs.h <<EOF
20430 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20431 EOF
20432
20433 fi
20434 done
20435
20436 echo "$as_me:20436: checking if getenv returns consistent values" >&5
20437 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20438 if test "${cf_cv_consistent_getenv+set}" = set; then
20439   echo $ECHO_N "(cached) $ECHO_C" >&6
20440 else
20441
20442 if test "$cross_compiling" = yes; then
20443   cf_cv_consistent_getenv=unknown
20444 else
20445   cat >"conftest.$ac_ext" <<_ACEOF
20446 #line 20446 "configure"
20447 #include "confdefs.h"
20448
20449 #include <stdlib.h>
20450 #include <unistd.h>
20451 #include <stdio.h>
20452 #include <string.h>
20453 #include <sys/types.h>
20454
20455 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20456 extern char **environ;  /* POSIX, but some systems are not... */
20457 #endif
20458
20459 #if defined(HAVE_STRDUP)
20460 #define str_alloc(s) strdup(s)
20461 #else
20462 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20463 #endif
20464
20465 static void set_value(const char *name, const char *value)
20466 {
20467 #if defined(HAVE_SETENV)
20468         setenv(name, value, 1);
20469 #elif defined(HAVE_PUTENV)
20470         char buffer[1024];
20471         sprintf(buffer, "%s=%s", name, value);
20472         putenv(str_alloc(buffer));
20473 #else
20474 #error neither putenv/setenv found
20475 #endif
20476 }
20477 int main(void)
20478 {
20479         int pass;
20480         size_t numenv, limit, j;
20481         char **mynames;
20482         char **myvalues;
20483         char **mypointer;
20484         char *equals;
20485         for (numenv = 0; environ[numenv]; ++numenv) ;
20486         limit = numenv + 10;
20487         mynames = (char **) calloc(limit + 1, sizeof(char *));
20488         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20489         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20490 #if defined(HAVE_ENVIRON)
20491         for (j = 0; environ[j]; ++j) {
20492                 mynames[j] = str_alloc(environ[j]);
20493                 equals = strchr(mynames[j], '=');
20494                 if (equals != 0) {
20495                         *equals++ = '\\0';
20496                         myvalues[j] = str_alloc(equals);
20497                 } else {
20498                         myvalues[j] = str_alloc("");
20499                 }
20500         }
20501 #endif
20502         for (j = numenv; j < limit; ++j) {
20503                 char name[80];
20504                 char value[80];
20505                 size_t found;
20506                 size_t k = 0;
20507                 do {
20508                         size_t jk;
20509                         found = 0;
20510                         sprintf(name, "TERM%lu", (unsigned long) k);
20511                         for (jk = 0; jk < j; ++jk) {
20512                                 if (!strcmp(name, mynames[jk])) {
20513                                         found = 1;
20514                                         ++k;
20515                                         break;
20516                                 }
20517                         }
20518                 } while (found);
20519                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20520                 set_value(name, value);
20521                 mynames[j] = str_alloc(name);
20522                 myvalues[j] = str_alloc(value);
20523         }
20524         for (pass = 0; pass < 3; ++pass) {
20525                 for (j = 0; j < limit; ++j) {
20526                         char *value = getenv(mynames[j]);
20527                         if (pass) {
20528                                 if (value == 0) {
20529                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20530                                         ${cf_cv_main_return:-return}(1);
20531                                 } else if (value != mypointer[j]) {
20532                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20533                                         ${cf_cv_main_return:-return}(1);
20534                                 } else if (strcmp(value, myvalues[j])) {
20535                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20536                                         ${cf_cv_main_return:-return}(1);
20537                                 }
20538                         } else {
20539                                 size_t k;
20540                                 mypointer[j] = value;
20541                                 for (k = 0; k < j; ++k) {
20542                                         if (mypointer[j] == mypointer[k]) {
20543                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20544                                                 ${cf_cv_main_return:-return}(1);
20545                                         }
20546                                 }
20547                         }
20548                 }
20549         }
20550         ${cf_cv_main_return:-return}(0);
20551 }
20552
20553 _ACEOF
20554 rm -f "conftest$ac_exeext"
20555 if { (eval echo "$as_me:20555: \"$ac_link\"") >&5
20556   (eval $ac_link) 2>&5
20557   ac_status=$?
20558   echo "$as_me:20558: \$? = $ac_status" >&5
20559   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20560   { (eval echo "$as_me:20560: \"$ac_try\"") >&5
20561   (eval $ac_try) 2>&5
20562   ac_status=$?
20563   echo "$as_me:20563: \$? = $ac_status" >&5
20564   (exit "$ac_status"); }; }; then
20565   cf_cv_consistent_getenv=yes
20566 else
20567   echo "$as_me: program exited with status $ac_status" >&5
20568 echo "$as_me: failed program was:" >&5
20569 cat "conftest.$ac_ext" >&5
20570 cf_cv_consistent_getenv=no
20571 fi
20572 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20573 fi
20574
20575 fi
20576 echo "$as_me:20576: result: $cf_cv_consistent_getenv" >&5
20577 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20578
20579 if test "x$cf_cv_consistent_getenv" = xno
20580 then
20581
20582 cat >>confdefs.h <<\EOF
20583 #define HAVE_CONSISTENT_GETENV 1
20584 EOF
20585
20586 fi
20587
20588 if test "x$cf_cv_consistent_getenv" = xno && \
20589         test "x$cf_with_trace" = xyes
20590 then
20591         { echo "$as_me:20591: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20592 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20593 fi
20594
20595 echo "$as_me:20595: checking if sys/time.h works with sys/select.h" >&5
20596 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20597 if test "${cf_cv_sys_time_select+set}" = set; then
20598   echo $ECHO_N "(cached) $ECHO_C" >&6
20599 else
20600
20601 cat >"conftest.$ac_ext" <<_ACEOF
20602 #line 20602 "configure"
20603 #include "confdefs.h"
20604
20605 #include <sys/types.h>
20606 #ifdef HAVE_SYS_TIME_H
20607 #include <sys/time.h>
20608 #endif
20609 #ifdef HAVE_SYS_SELECT_H
20610 #include <sys/select.h>
20611 #endif
20612
20613 int
20614 main (void)
20615 {
20616
20617   ;
20618   return 0;
20619 }
20620 _ACEOF
20621 rm -f "conftest.$ac_objext"
20622 if { (eval echo "$as_me:20622: \"$ac_compile\"") >&5
20623   (eval $ac_compile) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit "$ac_status"); } &&
20627          { ac_try='test -s "conftest.$ac_objext"'
20628   { (eval echo "$as_me:20628: \"$ac_try\"") >&5
20629   (eval $ac_try) 2>&5
20630   ac_status=$?
20631   echo "$as_me:20631: \$? = $ac_status" >&5
20632   (exit "$ac_status"); }; }; then
20633   cf_cv_sys_time_select=yes
20634 else
20635   echo "$as_me: failed program was:" >&5
20636 cat "conftest.$ac_ext" >&5
20637 cf_cv_sys_time_select=no
20638 fi
20639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20640
20641 fi
20642
20643 echo "$as_me:20643: result: $cf_cv_sys_time_select" >&5
20644 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20645 test "$cf_cv_sys_time_select" = yes &&
20646 cat >>confdefs.h <<\EOF
20647 #define HAVE_SYS_TIME_SELECT 1
20648 EOF
20649
20650 ###     checks for compiler characteristics
20651 ac_ext=c
20652 ac_cpp='$CPP $CPPFLAGS'
20653 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20654 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20655 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20656 ac_main_return="return"
20657
20658 echo "$as_me:20658: checking for an ANSI C-conforming const" >&5
20659 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20660 if test "${ac_cv_c_const+set}" = set; then
20661   echo $ECHO_N "(cached) $ECHO_C" >&6
20662 else
20663   cat >"conftest.$ac_ext" <<_ACEOF
20664 #line 20664 "configure"
20665 #include "confdefs.h"
20666
20667 int
20668 main (void)
20669 {
20670 /* FIXME: Include the comments suggested by Paul. */
20671 #ifndef __cplusplus
20672   /* Ultrix mips cc rejects this.  */
20673   typedef int charset[2];
20674   const charset x;
20675   /* SunOS 4.1.1 cc rejects this.  */
20676   char const *const *ccp;
20677   char **p;
20678   /* NEC SVR4.0.2 mips cc rejects this.  */
20679   struct point {int x, y;};
20680   static struct point const zero = {0,0};
20681   /* AIX XL C 1.02.0.0 rejects this.
20682      It does not let you subtract one const X* pointer from another in
20683      an arm of an if-expression whose if-part is not a constant
20684      expression */
20685   const char *g = "string";
20686   ccp = &g + (g ? g-g : 0);
20687   /* HPUX 7.0 cc rejects these. */
20688   ++ccp;
20689   p = (char**) ccp;
20690   ccp = (char const *const *) p;
20691   { /* SCO 3.2v4 cc rejects this.  */
20692     char *t;
20693     char const *s = 0 ? (char *) 0 : (char const *) 0;
20694
20695     *t++ = 0;
20696   }
20697   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20698     int x[] = {25, 17};
20699     const int *foo = &x[0];
20700     ++foo;
20701   }
20702   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20703     typedef const int *iptr;
20704     iptr p = 0;
20705     ++p;
20706   }
20707   { /* AIX XL C 1.02.0.0 rejects this saying
20708        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20709     struct s { int j; const int *ap[3]; };
20710     struct s *b; b->j = 5;
20711   }
20712   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20713     const int foo = 10;
20714   }
20715 #endif
20716
20717   ;
20718   return 0;
20719 }
20720 _ACEOF
20721 rm -f "conftest.$ac_objext"
20722 if { (eval echo "$as_me:20722: \"$ac_compile\"") >&5
20723   (eval $ac_compile) 2>&5
20724   ac_status=$?
20725   echo "$as_me:20725: \$? = $ac_status" >&5
20726   (exit "$ac_status"); } &&
20727          { ac_try='test -s "conftest.$ac_objext"'
20728   { (eval echo "$as_me:20728: \"$ac_try\"") >&5
20729   (eval $ac_try) 2>&5
20730   ac_status=$?
20731   echo "$as_me:20731: \$? = $ac_status" >&5
20732   (exit "$ac_status"); }; }; then
20733   ac_cv_c_const=yes
20734 else
20735   echo "$as_me: failed program was:" >&5
20736 cat "conftest.$ac_ext" >&5
20737 ac_cv_c_const=no
20738 fi
20739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20740 fi
20741 echo "$as_me:20741: result: $ac_cv_c_const" >&5
20742 echo "${ECHO_T}$ac_cv_c_const" >&6
20743 if test $ac_cv_c_const = no; then
20744
20745 cat >>confdefs.h <<\EOF
20746 #define const
20747 EOF
20748
20749 fi
20750
20751 echo "$as_me:20751: checking for inline" >&5
20752 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20753 if test "${ac_cv_c_inline+set}" = set; then
20754   echo $ECHO_N "(cached) $ECHO_C" >&6
20755 else
20756   ac_cv_c_inline=no
20757 for ac_kw in inline __inline__ __inline; do
20758   cat >"conftest.$ac_ext" <<_ACEOF
20759 #line 20759 "configure"
20760 #include "confdefs.h"
20761 #ifndef __cplusplus
20762 static $ac_kw int static_foo () {return 0; }
20763 $ac_kw int foo () {return 0; }
20764 #endif
20765
20766 _ACEOF
20767 rm -f "conftest.$ac_objext"
20768 if { (eval echo "$as_me:20768: \"$ac_compile\"") >&5
20769   (eval $ac_compile) 2>&5
20770   ac_status=$?
20771   echo "$as_me:20771: \$? = $ac_status" >&5
20772   (exit "$ac_status"); } &&
20773          { ac_try='test -s "conftest.$ac_objext"'
20774   { (eval echo "$as_me:20774: \"$ac_try\"") >&5
20775   (eval $ac_try) 2>&5
20776   ac_status=$?
20777   echo "$as_me:20777: \$? = $ac_status" >&5
20778   (exit "$ac_status"); }; }; then
20779   ac_cv_c_inline=$ac_kw; break
20780 else
20781   echo "$as_me: failed program was:" >&5
20782 cat "conftest.$ac_ext" >&5
20783 fi
20784 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20785 done
20786
20787 fi
20788 echo "$as_me:20788: result: $ac_cv_c_inline" >&5
20789 echo "${ECHO_T}$ac_cv_c_inline" >&6
20790 case $ac_cv_c_inline in
20791   inline | yes) ;;
20792   no)
20793 cat >>confdefs.h <<\EOF
20794 #define inline
20795 EOF
20796  ;;
20797   *)  cat >>confdefs.h <<EOF
20798 #define inline $ac_cv_c_inline
20799 EOF
20800  ;;
20801 esac
20802
20803 NCURSES_INLINE=
20804 if test "$ac_cv_c_inline" != no ; then
20805         NCURSES_INLINE=inline
20806         if test "$INTEL_COMPILER" = yes
20807         then
20808                 :
20809         elif test "$CLANG_COMPILER" = yes
20810         then
20811                 :
20812         elif test "$GCC" = yes
20813         then
20814                 echo "$as_me:20814: checking if $CC supports options to tune inlining" >&5
20815 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20816 if test "${cf_cv_gcc_inline+set}" = set; then
20817   echo $ECHO_N "(cached) $ECHO_C" >&6
20818 else
20819
20820                 cf_save_CFLAGS=$CFLAGS
20821                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20822                 cat >"conftest.$ac_ext" <<_ACEOF
20823 #line 20823 "configure"
20824 #include "confdefs.h"
20825 inline int foo(void) { return 1; }
20826 int
20827 main (void)
20828 {
20829 ${cf_cv_main_return:-return} foo()
20830   ;
20831   return 0;
20832 }
20833 _ACEOF
20834 rm -f "conftest.$ac_objext"
20835 if { (eval echo "$as_me:20835: \"$ac_compile\"") >&5
20836   (eval $ac_compile) 2>&5
20837   ac_status=$?
20838   echo "$as_me:20838: \$? = $ac_status" >&5
20839   (exit "$ac_status"); } &&
20840          { ac_try='test -s "conftest.$ac_objext"'
20841   { (eval echo "$as_me:20841: \"$ac_try\"") >&5
20842   (eval $ac_try) 2>&5
20843   ac_status=$?
20844   echo "$as_me:20844: \$? = $ac_status" >&5
20845   (exit "$ac_status"); }; }; then
20846   cf_cv_gcc_inline=yes
20847 else
20848   echo "$as_me: failed program was:" >&5
20849 cat "conftest.$ac_ext" >&5
20850 cf_cv_gcc_inline=no
20851 fi
20852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20853                 CFLAGS=$cf_save_CFLAGS
20854
20855 fi
20856 echo "$as_me:20856: result: $cf_cv_gcc_inline" >&5
20857 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20858                 if test "$cf_cv_gcc_inline" = yes ; then
20859
20860 cf_fix_cppflags=no
20861 cf_new_cflags=
20862 cf_new_cppflags=
20863 cf_new_extra_cppflags=
20864
20865 for cf_add_cflags in --param max-inline-insns-single=1200
20866 do
20867 case "$cf_fix_cppflags" in
20868 (no)
20869         case "$cf_add_cflags" in
20870         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20871                 case "$cf_add_cflags" in
20872                 (-D*)
20873                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20874
20875                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20876                                 && test -z "${cf_tst_cflags}" \
20877                                 && cf_fix_cppflags=yes
20878
20879                         if test "$cf_fix_cppflags" = yes ; then
20880
20881         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20882         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20883
20884                                 continue
20885                         elif test "${cf_tst_cflags}" = "\"'" ; then
20886
20887         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20888         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20889
20890                                 continue
20891                         fi
20892                         ;;
20893                 esac
20894                 case "$CPPFLAGS" in
20895                 (*$cf_add_cflags)
20896                         ;;
20897                 (*)
20898                         case "$cf_add_cflags" in
20899                         (-D*)
20900                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20901
20902 CPPFLAGS=`echo "$CPPFLAGS" | \
20903         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20904                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20905
20906                                 ;;
20907                         esac
20908
20909         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20910         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20911
20912                         ;;
20913                 esac
20914                 ;;
20915         (*)
20916
20917         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20918         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20919
20920                 ;;
20921         esac
20922         ;;
20923 (yes)
20924
20925         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20926         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20927
20928         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20929
20930         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20931                 && test -z "${cf_tst_cflags}" \
20932                 && cf_fix_cppflags=no
20933         ;;
20934 esac
20935 done
20936
20937 if test -n "$cf_new_cflags" ; then
20938
20939         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20940         CFLAGS="${CFLAGS}$cf_new_cflags"
20941
20942 fi
20943
20944 if test -n "$cf_new_cppflags" ; then
20945
20946         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20947         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20948
20949 fi
20950
20951 if test -n "$cf_new_extra_cppflags" ; then
20952
20953         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20954         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20955
20956 fi
20957
20958                 fi
20959         fi
20960 fi
20961
20962 echo "$as_me:20962: checking for signal global datatype" >&5
20963 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20964 if test "${cf_cv_sig_atomic_t+set}" = set; then
20965   echo $ECHO_N "(cached) $ECHO_C" >&6
20966 else
20967
20968         for cf_type in \
20969                 "volatile sig_atomic_t" \
20970                 "sig_atomic_t" \
20971                 "int"
20972         do
20973         cat >"conftest.$ac_ext" <<_ACEOF
20974 #line 20974 "configure"
20975 #include "confdefs.h"
20976
20977 #include <sys/types.h>
20978 #include <signal.h>
20979 #include <stdio.h>
20980
20981 extern $cf_type x;
20982 $cf_type x;
20983 static void handler(int sig)
20984 {
20985         (void)sig;
20986         x = 5;
20987 }
20988 int
20989 main (void)
20990 {
20991 signal(SIGINT, handler);
20992                  x = 1
20993   ;
20994   return 0;
20995 }
20996 _ACEOF
20997 rm -f "conftest.$ac_objext"
20998 if { (eval echo "$as_me:20998: \"$ac_compile\"") >&5
20999   (eval $ac_compile) 2>&5
21000   ac_status=$?
21001   echo "$as_me:21001: \$? = $ac_status" >&5
21002   (exit "$ac_status"); } &&
21003          { ac_try='test -s "conftest.$ac_objext"'
21004   { (eval echo "$as_me:21004: \"$ac_try\"") >&5
21005   (eval $ac_try) 2>&5
21006   ac_status=$?
21007   echo "$as_me:21007: \$? = $ac_status" >&5
21008   (exit "$ac_status"); }; }; then
21009   cf_cv_sig_atomic_t=$cf_type
21010 else
21011   echo "$as_me: failed program was:" >&5
21012 cat "conftest.$ac_ext" >&5
21013 cf_cv_sig_atomic_t=no
21014 fi
21015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21016                 test "$cf_cv_sig_atomic_t" != no && break
21017         done
21018
21019 fi
21020
21021 echo "$as_me:21021: result: $cf_cv_sig_atomic_t" >&5
21022 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21023 test "$cf_cv_sig_atomic_t" != no &&
21024 cat >>confdefs.h <<EOF
21025 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21026 EOF
21027
21028 if test "$NCURSES_CHTYPE" = auto ; then
21029
21030 echo "$as_me:21030: checking for type of chtype" >&5
21031 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21032 if test "${cf_cv_typeof_chtype+set}" = set; then
21033   echo $ECHO_N "(cached) $ECHO_C" >&6
21034 else
21035
21036                 if test "$cross_compiling" = yes; then
21037   cf_cv_typeof_chtype=long
21038 else
21039   cat >"conftest.$ac_ext" <<_ACEOF
21040 #line 21040 "configure"
21041 #include "confdefs.h"
21042
21043 #define WANT_BITS 31
21044 #include <stdio.h>
21045 int main(void)
21046 {
21047         FILE *fp = fopen("cf_test.out", "w");
21048         if (fp != 0) {
21049                 char *result = "long";
21050                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21051                         int n;
21052                         unsigned int x, y;
21053                         for (n = 0; n < WANT_BITS; n++) {
21054                                 x = (1 << n);
21055                                 y = (x >> n);
21056                                 if (y != 1 || x == 0) {
21057                                         x = 0;
21058                                         break;
21059                                 }
21060                         }
21061                         /*
21062                          * If x is nonzero, an int is big enough for the bits
21063                          * that we want.
21064                          */
21065                         result = (x != 0) ? "int" : "long";
21066                 }
21067                 fputs(result, fp);
21068                 fclose(fp);
21069         }
21070         ${cf_cv_main_return:-return}(0);
21071 }
21072
21073 _ACEOF
21074 rm -f "conftest$ac_exeext"
21075 if { (eval echo "$as_me:21075: \"$ac_link\"") >&5
21076   (eval $ac_link) 2>&5
21077   ac_status=$?
21078   echo "$as_me:21078: \$? = $ac_status" >&5
21079   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21080   { (eval echo "$as_me:21080: \"$ac_try\"") >&5
21081   (eval $ac_try) 2>&5
21082   ac_status=$?
21083   echo "$as_me:21083: \$? = $ac_status" >&5
21084   (exit "$ac_status"); }; }; then
21085   cf_cv_typeof_chtype=`cat cf_test.out`
21086 else
21087   echo "$as_me: program exited with status $ac_status" >&5
21088 echo "$as_me: failed program was:" >&5
21089 cat "conftest.$ac_ext" >&5
21090 cf_cv_typeof_chtype=long
21091 fi
21092 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21093 fi
21094                 rm -f cf_test.out
21095
21096 fi
21097
21098 echo "$as_me:21098: result: $cf_cv_typeof_chtype" >&5
21099 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21100
21101 cat >>confdefs.h <<EOF
21102 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21103 EOF
21104
21105 else
21106         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21107 fi
21108 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21109
21110 echo "$as_me:21110: checking if unsigned literals are legal" >&5
21111 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21112 if test "${cf_cv_unsigned_literals+set}" = set; then
21113   echo $ECHO_N "(cached) $ECHO_C" >&6
21114 else
21115
21116         cat >"conftest.$ac_ext" <<_ACEOF
21117 #line 21117 "configure"
21118 #include "confdefs.h"
21119
21120 int
21121 main (void)
21122 {
21123 long x = 1L + 1UL + 1U + 1
21124   ;
21125   return 0;
21126 }
21127 _ACEOF
21128 rm -f "conftest.$ac_objext"
21129 if { (eval echo "$as_me:21129: \"$ac_compile\"") >&5
21130   (eval $ac_compile) 2>&5
21131   ac_status=$?
21132   echo "$as_me:21132: \$? = $ac_status" >&5
21133   (exit "$ac_status"); } &&
21134          { ac_try='test -s "conftest.$ac_objext"'
21135   { (eval echo "$as_me:21135: \"$ac_try\"") >&5
21136   (eval $ac_try) 2>&5
21137   ac_status=$?
21138   echo "$as_me:21138: \$? = $ac_status" >&5
21139   (exit "$ac_status"); }; }; then
21140   cf_cv_unsigned_literals=yes
21141 else
21142   echo "$as_me: failed program was:" >&5
21143 cat "conftest.$ac_ext" >&5
21144 cf_cv_unsigned_literals=no
21145 fi
21146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21147
21148 fi
21149
21150 echo "$as_me:21150: result: $cf_cv_unsigned_literals" >&5
21151 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21152
21153 cf_cv_1UL="1"
21154 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21155 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21156
21157 if test "$NCURSES_MMASK_T" = auto ; then
21158         cf_cv_typeof_mmask_t=long
21159 else
21160         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21161 fi
21162 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21163
21164 ###     Checks for external-data
21165
21166 echo "$as_me:21166: checking if external errno is declared" >&5
21167 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21168 if test "${cf_cv_dcl_errno+set}" = set; then
21169   echo $ECHO_N "(cached) $ECHO_C" >&6
21170 else
21171
21172         cat >"conftest.$ac_ext" <<_ACEOF
21173 #line 21173 "configure"
21174 #include "confdefs.h"
21175
21176 #ifdef HAVE_STDLIB_H
21177 #include <stdlib.h>
21178 #endif
21179 #include <stdio.h>
21180 #include <sys/types.h>
21181 #include <errno.h>
21182 int
21183 main (void)
21184 {
21185 int x = (int) errno; (void)x
21186   ;
21187   return 0;
21188 }
21189 _ACEOF
21190 rm -f "conftest.$ac_objext"
21191 if { (eval echo "$as_me:21191: \"$ac_compile\"") >&5
21192   (eval $ac_compile) 2>&5
21193   ac_status=$?
21194   echo "$as_me:21194: \$? = $ac_status" >&5
21195   (exit "$ac_status"); } &&
21196          { ac_try='test -s "conftest.$ac_objext"'
21197   { (eval echo "$as_me:21197: \"$ac_try\"") >&5
21198   (eval $ac_try) 2>&5
21199   ac_status=$?
21200   echo "$as_me:21200: \$? = $ac_status" >&5
21201   (exit "$ac_status"); }; }; then
21202   cf_cv_dcl_errno=yes
21203 else
21204   echo "$as_me: failed program was:" >&5
21205 cat "conftest.$ac_ext" >&5
21206 cf_cv_dcl_errno=no
21207 fi
21208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21209
21210 fi
21211 echo "$as_me:21211: result: $cf_cv_dcl_errno" >&5
21212 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21213
21214 if test "$cf_cv_dcl_errno" = no ; then
21215
21216 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21217
21218         cat >>confdefs.h <<EOF
21219 #define $cf_result 1
21220 EOF
21221
21222 fi
21223
21224 # It's possible (for near-UNIX clones) that the data doesn't exist
21225
21226 echo "$as_me:21226: checking if external errno exists" >&5
21227 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21228 if test "${cf_cv_have_errno+set}" = set; then
21229   echo $ECHO_N "(cached) $ECHO_C" >&6
21230 else
21231
21232         cat >"conftest.$ac_ext" <<_ACEOF
21233 #line 21233 "configure"
21234 #include "confdefs.h"
21235
21236 #undef errno
21237 extern int errno;
21238
21239 int
21240 main (void)
21241 {
21242 errno = 2
21243   ;
21244   return 0;
21245 }
21246 _ACEOF
21247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21248 if { (eval echo "$as_me:21248: \"$ac_link\"") >&5
21249   (eval $ac_link) 2>&5
21250   ac_status=$?
21251   echo "$as_me:21251: \$? = $ac_status" >&5
21252   (exit "$ac_status"); } &&
21253          { ac_try='test -s "conftest$ac_exeext"'
21254   { (eval echo "$as_me:21254: \"$ac_try\"") >&5
21255   (eval $ac_try) 2>&5
21256   ac_status=$?
21257   echo "$as_me:21257: \$? = $ac_status" >&5
21258   (exit "$ac_status"); }; }; then
21259   cf_cv_have_errno=yes
21260 else
21261   echo "$as_me: failed program was:" >&5
21262 cat "conftest.$ac_ext" >&5
21263 cf_cv_have_errno=no
21264 fi
21265 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21266
21267 fi
21268 echo "$as_me:21268: result: $cf_cv_have_errno" >&5
21269 echo "${ECHO_T}$cf_cv_have_errno" >&6
21270
21271 if test "$cf_cv_have_errno" = yes ; then
21272
21273 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21274
21275         cat >>confdefs.h <<EOF
21276 #define $cf_result 1
21277 EOF
21278
21279 fi
21280
21281 echo "$as_me:21281: checking if data-only library module links" >&5
21282 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21283 if test "${cf_cv_link_dataonly+set}" = set; then
21284   echo $ECHO_N "(cached) $ECHO_C" >&6
21285 else
21286
21287         rm -f conftest.a
21288         cat >conftest.$ac_ext <<EOF
21289 #line 21289 "configure"
21290 int     testdata[3] = { 123, 456, 789 };
21291 EOF
21292         if { (eval echo "$as_me:21292: \"$ac_compile\"") >&5
21293   (eval $ac_compile) 2>&5
21294   ac_status=$?
21295   echo "$as_me:21295: \$? = $ac_status" >&5
21296   (exit "$ac_status"); } ; then
21297                 mv conftest.o data.o && \
21298                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21299         fi
21300         rm -f conftest.$ac_ext data.o
21301         cat >conftest.$ac_ext <<EOF
21302 #line 21302 "configure"
21303 int     testfunc(void)
21304 {
21305 #if defined(NeXT)
21306         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21307 #else
21308         extern int testdata[3];
21309         return testdata[0] == 123
21310            &&  testdata[1] == 456
21311            &&  testdata[2] == 789;
21312 #endif
21313 }
21314 EOF
21315         if { (eval echo "$as_me:21315: \"$ac_compile\"") >&5
21316   (eval $ac_compile) 2>&5
21317   ac_status=$?
21318   echo "$as_me:21318: \$? = $ac_status" >&5
21319   (exit "$ac_status"); }; then
21320                 mv conftest.o func.o && \
21321                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21322         fi
21323         rm -f conftest.$ac_ext func.o
21324         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21325         cf_saveLIBS="$LIBS"
21326         LIBS="conftest.a $LIBS"
21327         if test "$cross_compiling" = yes; then
21328   cf_cv_link_dataonly=unknown
21329 else
21330   cat >"conftest.$ac_ext" <<_ACEOF
21331 #line 21331 "configure"
21332 #include "confdefs.h"
21333
21334         int main(void)
21335         {
21336                 extern int testfunc();
21337                 ${cf_cv_main_return:-return} (!testfunc());
21338         }
21339
21340 _ACEOF
21341 rm -f "conftest$ac_exeext"
21342 if { (eval echo "$as_me:21342: \"$ac_link\"") >&5
21343   (eval $ac_link) 2>&5
21344   ac_status=$?
21345   echo "$as_me:21345: \$? = $ac_status" >&5
21346   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21347   { (eval echo "$as_me:21347: \"$ac_try\"") >&5
21348   (eval $ac_try) 2>&5
21349   ac_status=$?
21350   echo "$as_me:21350: \$? = $ac_status" >&5
21351   (exit "$ac_status"); }; }; then
21352   cf_cv_link_dataonly=yes
21353 else
21354   echo "$as_me: program exited with status $ac_status" >&5
21355 echo "$as_me: failed program was:" >&5
21356 cat "conftest.$ac_ext" >&5
21357 cf_cv_link_dataonly=no
21358 fi
21359 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21360 fi
21361         LIBS="$cf_saveLIBS"
21362
21363 fi
21364
21365 echo "$as_me:21365: result: $cf_cv_link_dataonly" >&5
21366 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21367
21368 if test "$cf_cv_link_dataonly" = no ; then
21369
21370 cat >>confdefs.h <<\EOF
21371 #define BROKEN_LINKER 1
21372 EOF
21373
21374         BROKEN_LINKER=1
21375 fi
21376
21377 ###     Checks for library functions.
21378
21379 for ac_func in \
21380 getcwd \
21381 getegid \
21382 geteuid \
21383 getopt \
21384 getttynam \
21385 issetugid \
21386 localeconv \
21387 poll \
21388 putenv \
21389 remove \
21390 select \
21391 setbuf \
21392 setbuffer \
21393 setenv \
21394 setfsuid \
21395 setvbuf \
21396 sigaction \
21397 sigvec \
21398 snprintf \
21399 strdup \
21400 strstr \
21401 sysconf \
21402 tcgetpgrp \
21403 times \
21404 tsearch \
21405 vsnprintf \
21406
21407 do
21408 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21409 echo "$as_me:21409: checking for $ac_func" >&5
21410 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21411 if eval "test \"\${$as_ac_var+set}\" = set"; then
21412   echo $ECHO_N "(cached) $ECHO_C" >&6
21413 else
21414   cat >"conftest.$ac_ext" <<_ACEOF
21415 #line 21415 "configure"
21416 #include "confdefs.h"
21417 #define $ac_func autoconf_temporary
21418 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21419 #undef $ac_func
21420
21421 #ifdef __cplusplus
21422 extern "C"
21423 #endif
21424
21425 /* We use char because int might match the return type of a gcc2
21426    builtin and then its argument prototype would still apply.  */
21427 char $ac_func (void);
21428
21429 int
21430 main (void)
21431 {
21432
21433 /* The GNU C library defines stubs for functions which it implements
21434     to always fail with ENOSYS.  Some functions are actually named
21435     something starting with __ and the normal name is an alias.  */
21436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21437 #error found stub for $ac_func
21438 #endif
21439
21440         return $ac_func ();
21441   ;
21442   return 0;
21443 }
21444 _ACEOF
21445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21446 if { (eval echo "$as_me:21446: \"$ac_link\"") >&5
21447   (eval $ac_link) 2>&5
21448   ac_status=$?
21449   echo "$as_me:21449: \$? = $ac_status" >&5
21450   (exit "$ac_status"); } &&
21451          { ac_try='test -s "conftest$ac_exeext"'
21452   { (eval echo "$as_me:21452: \"$ac_try\"") >&5
21453   (eval $ac_try) 2>&5
21454   ac_status=$?
21455   echo "$as_me:21455: \$? = $ac_status" >&5
21456   (exit "$ac_status"); }; }; then
21457   eval "$as_ac_var=yes"
21458 else
21459   echo "$as_me: failed program was:" >&5
21460 cat "conftest.$ac_ext" >&5
21461 eval "$as_ac_var=no"
21462 fi
21463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21464 fi
21465 echo "$as_me:21465: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21466 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21467 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21468   cat >>confdefs.h <<EOF
21469 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21470 EOF
21471
21472 fi
21473 done
21474
21475 if test "x$ac_cv_func_getopt" = xno && \
21476    test "x$cf_with_progs$cf_with_tests" != xnono; then
21477         { { echo "$as_me:21477: error: getopt is required for building programs" >&5
21478 echo "$as_me: error: getopt is required for building programs" >&2;}
21479    { (exit 1); exit 1; }; }
21480 fi
21481
21482 if test "x$with_safe_sprintf" = xyes
21483 then
21484         if test "x$ac_cv_func_vsnprintf" = xyes
21485         then
21486                 { echo "$as_me:21486: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21487 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21488         else
21489
21490 cat >>confdefs.h <<\EOF
21491 #define USE_SAFE_SPRINTF 1
21492 EOF
21493
21494         fi
21495 fi
21496
21497 if test "x$with_getcap" = "xyes" ; then
21498
21499 echo "$as_me:21499: checking for terminal-capability database functions" >&5
21500 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21501 if test "${cf_cv_cgetent+set}" = set; then
21502   echo $ECHO_N "(cached) $ECHO_C" >&6
21503 else
21504
21505 cat >"conftest.$ac_ext" <<_ACEOF
21506 #line 21506 "configure"
21507 #include "confdefs.h"
21508
21509 #include <stdlib.h>
21510 int
21511 main (void)
21512 {
21513
21514         char temp[128];
21515         char *buf = temp;
21516         char *db_array = temp;
21517         cgetent(&buf, &db_array, "vt100");
21518         cgetcap(buf, "tc", '=');
21519         cgetmatch(buf, "tc");
21520
21521   ;
21522   return 0;
21523 }
21524 _ACEOF
21525 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21526 if { (eval echo "$as_me:21526: \"$ac_link\"") >&5
21527   (eval $ac_link) 2>&5
21528   ac_status=$?
21529   echo "$as_me:21529: \$? = $ac_status" >&5
21530   (exit "$ac_status"); } &&
21531          { ac_try='test -s "conftest$ac_exeext"'
21532   { (eval echo "$as_me:21532: \"$ac_try\"") >&5
21533   (eval $ac_try) 2>&5
21534   ac_status=$?
21535   echo "$as_me:21535: \$? = $ac_status" >&5
21536   (exit "$ac_status"); }; }; then
21537   cf_cv_cgetent=yes
21538 else
21539   echo "$as_me: failed program was:" >&5
21540 cat "conftest.$ac_ext" >&5
21541 cf_cv_cgetent=no
21542 fi
21543 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21544
21545 fi
21546 echo "$as_me:21546: result: $cf_cv_cgetent" >&5
21547 echo "${ECHO_T}$cf_cv_cgetent" >&6
21548
21549 if test "$cf_cv_cgetent" = yes
21550 then
21551
21552 cat >>confdefs.h <<\EOF
21553 #define HAVE_BSD_CGETENT 1
21554 EOF
21555
21556 echo "$as_me:21556: checking if cgetent uses const parameter" >&5
21557 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21558 if test "${cf_cv_cgetent_const+set}" = set; then
21559   echo $ECHO_N "(cached) $ECHO_C" >&6
21560 else
21561
21562 cat >"conftest.$ac_ext" <<_ACEOF
21563 #line 21563 "configure"
21564 #include "confdefs.h"
21565
21566 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21567 #include <stdlib.h>
21568 int
21569 main (void)
21570 {
21571
21572         char temp[128];
21573         char *buf = temp;
21574 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21575         const char *db_array = temp;
21576         cgetent(&buf, &db_array, "vt100");
21577 #endif
21578         cgetcap(buf, "tc", '=');
21579         cgetmatch(buf, "tc");
21580
21581   ;
21582   return 0;
21583 }
21584 _ACEOF
21585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21586 if { (eval echo "$as_me:21586: \"$ac_link\"") >&5
21587   (eval $ac_link) 2>&5
21588   ac_status=$?
21589   echo "$as_me:21589: \$? = $ac_status" >&5
21590   (exit "$ac_status"); } &&
21591          { ac_try='test -s "conftest$ac_exeext"'
21592   { (eval echo "$as_me:21592: \"$ac_try\"") >&5
21593   (eval $ac_try) 2>&5
21594   ac_status=$?
21595   echo "$as_me:21595: \$? = $ac_status" >&5
21596   (exit "$ac_status"); }; }; then
21597   cf_cv_cgetent_const=yes
21598 else
21599   echo "$as_me: failed program was:" >&5
21600 cat "conftest.$ac_ext" >&5
21601 cf_cv_cgetent_const=no
21602 fi
21603 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21604
21605 fi
21606 echo "$as_me:21606: result: $cf_cv_cgetent_const" >&5
21607 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21608         if test "$cf_cv_cgetent_const" = yes
21609         then
21610
21611 cat >>confdefs.h <<EOF
21612 #define CGETENT_CONST const
21613 EOF
21614
21615         fi
21616 fi
21617
21618 fi
21619
21620 echo "$as_me:21620: checking for isascii" >&5
21621 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21622 if test "${cf_cv_have_isascii+set}" = set; then
21623   echo $ECHO_N "(cached) $ECHO_C" >&6
21624 else
21625
21626         cat >"conftest.$ac_ext" <<_ACEOF
21627 #line 21627 "configure"
21628 #include "confdefs.h"
21629 #include <ctype.h>
21630 int
21631 main (void)
21632 {
21633 int x = isascii(' ')
21634   ;
21635   return 0;
21636 }
21637 _ACEOF
21638 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21639 if { (eval echo "$as_me:21639: \"$ac_link\"") >&5
21640   (eval $ac_link) 2>&5
21641   ac_status=$?
21642   echo "$as_me:21642: \$? = $ac_status" >&5
21643   (exit "$ac_status"); } &&
21644          { ac_try='test -s "conftest$ac_exeext"'
21645   { (eval echo "$as_me:21645: \"$ac_try\"") >&5
21646   (eval $ac_try) 2>&5
21647   ac_status=$?
21648   echo "$as_me:21648: \$? = $ac_status" >&5
21649   (exit "$ac_status"); }; }; then
21650   cf_cv_have_isascii=yes
21651 else
21652   echo "$as_me: failed program was:" >&5
21653 cat "conftest.$ac_ext" >&5
21654 cf_cv_have_isascii=no
21655 fi
21656 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21657
21658 fi
21659 echo "$as_me:21659: result: $cf_cv_have_isascii" >&5
21660 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21661 test "$cf_cv_have_isascii" = yes &&
21662 cat >>confdefs.h <<\EOF
21663 #define HAVE_ISASCII 1
21664 EOF
21665
21666 if test "$ac_cv_func_sigaction" = yes; then
21667 echo "$as_me:21667: checking whether sigaction needs _POSIX_SOURCE" >&5
21668 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21669 cat >"conftest.$ac_ext" <<_ACEOF
21670 #line 21670 "configure"
21671 #include "confdefs.h"
21672
21673 #include <sys/types.h>
21674 #include <signal.h>
21675 int
21676 main (void)
21677 {
21678 struct sigaction act
21679   ;
21680   return 0;
21681 }
21682 _ACEOF
21683 rm -f "conftest.$ac_objext"
21684 if { (eval echo "$as_me:21684: \"$ac_compile\"") >&5
21685   (eval $ac_compile) 2>&5
21686   ac_status=$?
21687   echo "$as_me:21687: \$? = $ac_status" >&5
21688   (exit "$ac_status"); } &&
21689          { ac_try='test -s "conftest.$ac_objext"'
21690   { (eval echo "$as_me:21690: \"$ac_try\"") >&5
21691   (eval $ac_try) 2>&5
21692   ac_status=$?
21693   echo "$as_me:21693: \$? = $ac_status" >&5
21694   (exit "$ac_status"); }; }; then
21695   sigact_bad=no
21696 else
21697   echo "$as_me: failed program was:" >&5
21698 cat "conftest.$ac_ext" >&5
21699
21700 cat >"conftest.$ac_ext" <<_ACEOF
21701 #line 21701 "configure"
21702 #include "confdefs.h"
21703
21704 #define _POSIX_SOURCE
21705 #include <sys/types.h>
21706 #include <signal.h>
21707 int
21708 main (void)
21709 {
21710 struct sigaction act
21711   ;
21712   return 0;
21713 }
21714 _ACEOF
21715 rm -f "conftest.$ac_objext"
21716 if { (eval echo "$as_me:21716: \"$ac_compile\"") >&5
21717   (eval $ac_compile) 2>&5
21718   ac_status=$?
21719   echo "$as_me:21719: \$? = $ac_status" >&5
21720   (exit "$ac_status"); } &&
21721          { ac_try='test -s "conftest.$ac_objext"'
21722   { (eval echo "$as_me:21722: \"$ac_try\"") >&5
21723   (eval $ac_try) 2>&5
21724   ac_status=$?
21725   echo "$as_me:21725: \$? = $ac_status" >&5
21726   (exit "$ac_status"); }; }; then
21727   sigact_bad=yes
21728
21729 cat >>confdefs.h <<\EOF
21730 #define _POSIX_SOURCE 1
21731 EOF
21732
21733 else
21734   echo "$as_me: failed program was:" >&5
21735 cat "conftest.$ac_ext" >&5
21736 sigact_bad=unknown
21737 fi
21738 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21739 fi
21740 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21741 echo "$as_me:21741: result: $sigact_bad" >&5
21742 echo "${ECHO_T}$sigact_bad" >&6
21743 fi
21744
21745 echo "$as_me:21745: checking if nanosleep really works" >&5
21746 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21747 if test "${cf_cv_func_nanosleep+set}" = set; then
21748   echo $ECHO_N "(cached) $ECHO_C" >&6
21749 else
21750
21751 if test "$cross_compiling" = yes; then
21752   cf_cv_func_nanosleep=unknown
21753 else
21754   cat >"conftest.$ac_ext" <<_ACEOF
21755 #line 21755 "configure"
21756 #include "confdefs.h"
21757
21758 #include <stdio.h>
21759 #include <errno.h>
21760 #include <time.h>
21761
21762 #ifdef HAVE_SYS_TIME_H
21763 #include <sys/time.h>
21764 #endif
21765
21766 int main(void) {
21767         struct timespec ts1, ts2;
21768         int code;
21769         ts1.tv_sec  = 0;
21770         ts1.tv_nsec = 750000000;
21771         ts2.tv_sec  = 0;
21772         ts2.tv_nsec = 0;
21773         errno = 0;
21774         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21775         ${cf_cv_main_return:-return}(code != 0);
21776 }
21777
21778 _ACEOF
21779 rm -f "conftest$ac_exeext"
21780 if { (eval echo "$as_me:21780: \"$ac_link\"") >&5
21781   (eval $ac_link) 2>&5
21782   ac_status=$?
21783   echo "$as_me:21783: \$? = $ac_status" >&5
21784   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21785   { (eval echo "$as_me:21785: \"$ac_try\"") >&5
21786   (eval $ac_try) 2>&5
21787   ac_status=$?
21788   echo "$as_me:21788: \$? = $ac_status" >&5
21789   (exit "$ac_status"); }; }; then
21790   cf_cv_func_nanosleep=yes
21791 else
21792   echo "$as_me: program exited with status $ac_status" >&5
21793 echo "$as_me: failed program was:" >&5
21794 cat "conftest.$ac_ext" >&5
21795 cf_cv_func_nanosleep=no
21796 fi
21797 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21798 fi
21799 fi
21800 echo "$as_me:21800: result: $cf_cv_func_nanosleep" >&5
21801 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21802
21803 test "$cf_cv_func_nanosleep" = "yes" &&
21804 cat >>confdefs.h <<\EOF
21805 #define HAVE_NANOSLEEP 1
21806 EOF
21807
21808 for ac_header in \
21809 termio.h \
21810 termios.h \
21811 unistd.h \
21812 sys/ioctl.h \
21813 sys/termio.h \
21814
21815 do
21816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21817 echo "$as_me:21817: checking for $ac_header" >&5
21818 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21819 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21820   echo $ECHO_N "(cached) $ECHO_C" >&6
21821 else
21822   cat >"conftest.$ac_ext" <<_ACEOF
21823 #line 21823 "configure"
21824 #include "confdefs.h"
21825 #include <$ac_header>
21826 _ACEOF
21827 if { (eval echo "$as_me:21827: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21828   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21829   ac_status=$?
21830   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21831   rm -f conftest.er1
21832   cat conftest.err >&5
21833   echo "$as_me:21833: \$? = $ac_status" >&5
21834   (exit "$ac_status"); } >/dev/null; then
21835   if test -s conftest.err; then
21836     ac_cpp_err=$ac_c_preproc_warn_flag
21837   else
21838     ac_cpp_err=
21839   fi
21840 else
21841   ac_cpp_err=yes
21842 fi
21843 if test -z "$ac_cpp_err"; then
21844   eval "$as_ac_Header=yes"
21845 else
21846   echo "$as_me: failed program was:" >&5
21847   cat "conftest.$ac_ext" >&5
21848   eval "$as_ac_Header=no"
21849 fi
21850 rm -f conftest.err "conftest.$ac_ext"
21851 fi
21852 echo "$as_me:21852: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21853 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21854 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21855   cat >>confdefs.h <<EOF
21856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21857 EOF
21858
21859 fi
21860 done
21861
21862 if test "$ac_cv_header_termios_h" = yes ; then
21863         case "$CFLAGS $CPPFLAGS" in
21864         (*-D_POSIX_SOURCE*)
21865                 termios_bad=dunno ;;
21866         (*)     termios_bad=maybe ;;
21867         esac
21868         if test "$termios_bad" = maybe ; then
21869         echo "$as_me:21869: checking whether termios.h needs _POSIX_SOURCE" >&5
21870 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21871         cat >"conftest.$ac_ext" <<_ACEOF
21872 #line 21872 "configure"
21873 #include "confdefs.h"
21874 #include <termios.h>
21875 int
21876 main (void)
21877 {
21878 struct termios foo; int x = foo.c_iflag = 1; (void)x
21879   ;
21880   return 0;
21881 }
21882 _ACEOF
21883 rm -f "conftest.$ac_objext"
21884 if { (eval echo "$as_me:21884: \"$ac_compile\"") >&5
21885   (eval $ac_compile) 2>&5
21886   ac_status=$?
21887   echo "$as_me:21887: \$? = $ac_status" >&5
21888   (exit "$ac_status"); } &&
21889          { ac_try='test -s "conftest.$ac_objext"'
21890   { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891   (eval $ac_try) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit "$ac_status"); }; }; then
21895   termios_bad=no
21896 else
21897   echo "$as_me: failed program was:" >&5
21898 cat "conftest.$ac_ext" >&5
21899
21900                 cat >"conftest.$ac_ext" <<_ACEOF
21901 #line 21901 "configure"
21902 #include "confdefs.h"
21903
21904 #define _POSIX_SOURCE
21905 #include <termios.h>
21906 int
21907 main (void)
21908 {
21909 struct termios foo; int x = foo.c_iflag = 2; (void)x
21910   ;
21911   return 0;
21912 }
21913 _ACEOF
21914 rm -f "conftest.$ac_objext"
21915 if { (eval echo "$as_me:21915: \"$ac_compile\"") >&5
21916   (eval $ac_compile) 2>&5
21917   ac_status=$?
21918   echo "$as_me:21918: \$? = $ac_status" >&5
21919   (exit "$ac_status"); } &&
21920          { ac_try='test -s "conftest.$ac_objext"'
21921   { (eval echo "$as_me:21921: \"$ac_try\"") >&5
21922   (eval $ac_try) 2>&5
21923   ac_status=$?
21924   echo "$as_me:21924: \$? = $ac_status" >&5
21925   (exit "$ac_status"); }; }; then
21926   termios_bad=unknown
21927 else
21928   echo "$as_me: failed program was:" >&5
21929 cat "conftest.$ac_ext" >&5
21930 termios_bad=yes
21931 cat >>confdefs.h <<\EOF
21932 #define _POSIX_SOURCE 1
21933 EOF
21934
21935 fi
21936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21937
21938 fi
21939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21940         echo "$as_me:21940: result: $termios_bad" >&5
21941 echo "${ECHO_T}$termios_bad" >&6
21942         fi
21943 fi
21944
21945 echo "$as_me:21945: checking for tcgetattr" >&5
21946 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21947 if test "${cf_cv_have_tcgetattr+set}" = set; then
21948   echo $ECHO_N "(cached) $ECHO_C" >&6
21949 else
21950
21951 cat >"conftest.$ac_ext" <<_ACEOF
21952 #line 21952 "configure"
21953 #include "confdefs.h"
21954
21955 #include <sys/types.h>
21956 #ifdef HAVE_UNISTD_H
21957 #include <unistd.h>
21958 #endif
21959 #ifdef HAVE_TERMIOS_H
21960 #include <termios.h>
21961 #define TTY struct termios
21962 #else
21963 #ifdef HAVE_TERMIO_H
21964 #include <termio.h>
21965 #define TTY struct termio
21966 #endif
21967 #endif
21968
21969 int
21970 main (void)
21971 {
21972
21973 TTY foo;
21974 tcgetattr(1, &foo);
21975   ;
21976   return 0;
21977 }
21978 _ACEOF
21979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21980 if { (eval echo "$as_me:21980: \"$ac_link\"") >&5
21981   (eval $ac_link) 2>&5
21982   ac_status=$?
21983   echo "$as_me:21983: \$? = $ac_status" >&5
21984   (exit "$ac_status"); } &&
21985          { ac_try='test -s "conftest$ac_exeext"'
21986   { (eval echo "$as_me:21986: \"$ac_try\"") >&5
21987   (eval $ac_try) 2>&5
21988   ac_status=$?
21989   echo "$as_me:21989: \$? = $ac_status" >&5
21990   (exit "$ac_status"); }; }; then
21991   cf_cv_have_tcgetattr=yes
21992 else
21993   echo "$as_me: failed program was:" >&5
21994 cat "conftest.$ac_ext" >&5
21995 cf_cv_have_tcgetattr=no
21996 fi
21997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21998 fi
21999 echo "$as_me:21999: result: $cf_cv_have_tcgetattr" >&5
22000 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22001 test "$cf_cv_have_tcgetattr" = yes &&
22002 cat >>confdefs.h <<\EOF
22003 #define HAVE_TCGETATTR 1
22004 EOF
22005
22006 echo "$as_me:22006: checking for vsscanf function or workaround" >&5
22007 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22008 if test "${cf_cv_func_vsscanf+set}" = set; then
22009   echo $ECHO_N "(cached) $ECHO_C" >&6
22010 else
22011
22012 cat >"conftest.$ac_ext" <<_ACEOF
22013 #line 22013 "configure"
22014 #include "confdefs.h"
22015
22016 #include <stdarg.h>
22017 #include <stdio.h>
22018 int
22019 main (void)
22020 {
22021
22022         va_list ap;
22023         vsscanf("from", "%d", ap)
22024   ;
22025   return 0;
22026 }
22027 _ACEOF
22028 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22029 if { (eval echo "$as_me:22029: \"$ac_link\"") >&5
22030   (eval $ac_link) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit "$ac_status"); } &&
22034          { ac_try='test -s "conftest$ac_exeext"'
22035   { (eval echo "$as_me:22035: \"$ac_try\"") >&5
22036   (eval $ac_try) 2>&5
22037   ac_status=$?
22038   echo "$as_me:22038: \$? = $ac_status" >&5
22039   (exit "$ac_status"); }; }; then
22040   cf_cv_func_vsscanf=vsscanf
22041 else
22042   echo "$as_me: failed program was:" >&5
22043 cat "conftest.$ac_ext" >&5
22044
22045 cat >"conftest.$ac_ext" <<_ACEOF
22046 #line 22046 "configure"
22047 #include "confdefs.h"
22048
22049 #include <stdarg.h>
22050 #include <stdio.h>
22051 int
22052 main (void)
22053 {
22054
22055         FILE strbuf;
22056         char *str = "from";
22057
22058         strbuf._flag = _IOREAD;
22059         strbuf._ptr = strbuf._base = (unsigned char *) str;
22060         strbuf._cnt = strlen(str);
22061         strbuf._file = _NFILE;
22062         return (vfscanf(&strbuf, "%d", ap))
22063   ;
22064   return 0;
22065 }
22066 _ACEOF
22067 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22068 if { (eval echo "$as_me:22068: \"$ac_link\"") >&5
22069   (eval $ac_link) 2>&5
22070   ac_status=$?
22071   echo "$as_me:22071: \$? = $ac_status" >&5
22072   (exit "$ac_status"); } &&
22073          { ac_try='test -s "conftest$ac_exeext"'
22074   { (eval echo "$as_me:22074: \"$ac_try\"") >&5
22075   (eval $ac_try) 2>&5
22076   ac_status=$?
22077   echo "$as_me:22077: \$? = $ac_status" >&5
22078   (exit "$ac_status"); }; }; then
22079   cf_cv_func_vsscanf=vfscanf
22080 else
22081   echo "$as_me: failed program was:" >&5
22082 cat "conftest.$ac_ext" >&5
22083
22084 cat >"conftest.$ac_ext" <<_ACEOF
22085 #line 22085 "configure"
22086 #include "confdefs.h"
22087
22088 #include <stdarg.h>
22089 #include <stdio.h>
22090 int
22091 main (void)
22092 {
22093
22094         FILE strbuf;
22095         char *str = "from";
22096
22097         strbuf._flag = _IOREAD;
22098         strbuf._ptr = strbuf._base = (unsigned char *) str;
22099         strbuf._cnt = strlen(str);
22100         strbuf._file = _NFILE;
22101         return (_doscan(&strbuf, "%d", ap))
22102   ;
22103   return 0;
22104 }
22105 _ACEOF
22106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22107 if { (eval echo "$as_me:22107: \"$ac_link\"") >&5
22108   (eval $ac_link) 2>&5
22109   ac_status=$?
22110   echo "$as_me:22110: \$? = $ac_status" >&5
22111   (exit "$ac_status"); } &&
22112          { ac_try='test -s "conftest$ac_exeext"'
22113   { (eval echo "$as_me:22113: \"$ac_try\"") >&5
22114   (eval $ac_try) 2>&5
22115   ac_status=$?
22116   echo "$as_me:22116: \$? = $ac_status" >&5
22117   (exit "$ac_status"); }; }; then
22118   cf_cv_func_vsscanf=_doscan
22119 else
22120   echo "$as_me: failed program was:" >&5
22121 cat "conftest.$ac_ext" >&5
22122
22123 cf_cv_func_vsscanf=no
22124 fi
22125 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22126 fi
22127 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22128 fi
22129 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22130 fi
22131 echo "$as_me:22131: result: $cf_cv_func_vsscanf" >&5
22132 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22133
22134 case "$cf_cv_func_vsscanf" in
22135 (vsscanf)
22136 cat >>confdefs.h <<\EOF
22137 #define HAVE_VSSCANF 1
22138 EOF
22139 ;;
22140 (vfscanf)
22141 cat >>confdefs.h <<\EOF
22142 #define HAVE_VFSCANF 1
22143 EOF
22144 ;;
22145 (_doscan)
22146 cat >>confdefs.h <<\EOF
22147 #define HAVE__DOSCAN 1
22148 EOF
22149 ;;
22150 esac
22151
22152 for ac_header in \
22153 unistd.h \
22154
22155 do
22156 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22157 echo "$as_me:22157: checking for $ac_header" >&5
22158 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22159 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22160   echo $ECHO_N "(cached) $ECHO_C" >&6
22161 else
22162   cat >"conftest.$ac_ext" <<_ACEOF
22163 #line 22163 "configure"
22164 #include "confdefs.h"
22165 #include <$ac_header>
22166 _ACEOF
22167 if { (eval echo "$as_me:22167: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22168   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22169   ac_status=$?
22170   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22171   rm -f conftest.er1
22172   cat conftest.err >&5
22173   echo "$as_me:22173: \$? = $ac_status" >&5
22174   (exit "$ac_status"); } >/dev/null; then
22175   if test -s conftest.err; then
22176     ac_cpp_err=$ac_c_preproc_warn_flag
22177   else
22178     ac_cpp_err=
22179   fi
22180 else
22181   ac_cpp_err=yes
22182 fi
22183 if test -z "$ac_cpp_err"; then
22184   eval "$as_ac_Header=yes"
22185 else
22186   echo "$as_me: failed program was:" >&5
22187   cat "conftest.$ac_ext" >&5
22188   eval "$as_ac_Header=no"
22189 fi
22190 rm -f conftest.err "conftest.$ac_ext"
22191 fi
22192 echo "$as_me:22192: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22193 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22194 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22195   cat >>confdefs.h <<EOF
22196 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22197 EOF
22198
22199 fi
22200 done
22201
22202 echo "$as_me:22202: checking for working mkstemp" >&5
22203 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22204 if test "${cf_cv_func_mkstemp+set}" = set; then
22205   echo $ECHO_N "(cached) $ECHO_C" >&6
22206 else
22207
22208 rm -rf ./conftest*
22209 if test "$cross_compiling" = yes; then
22210   cf_cv_func_mkstemp=maybe
22211 else
22212   cat >"conftest.$ac_ext" <<_ACEOF
22213 #line 22213 "configure"
22214 #include "confdefs.h"
22215
22216 #include <sys/types.h>
22217 #ifdef HAVE_UNISTD_H
22218 #include <unistd.h>
22219 #endif
22220 #include <stdlib.h>
22221 #include <stdio.h>
22222 #include <string.h>
22223 #include <sys/stat.h>
22224 int main(void)
22225 {
22226         char *tmpl = "conftestXXXXXX";
22227         char name[2][80];
22228         int n;
22229         int result = 0;
22230         int fd;
22231         struct stat sb;
22232
22233         umask(077);
22234         for (n = 0; n < 2; ++n) {
22235                 strcpy(name[n], tmpl);
22236                 if ((fd = mkstemp(name[n])) >= 0) {
22237                         if (!strcmp(name[n], tmpl)
22238                          || stat(name[n], &sb) != 0
22239                          || (sb.st_mode & S_IFMT) != S_IFREG
22240                          || (sb.st_mode & 077) != 0) {
22241                                 result = 1;
22242                         }
22243                         close(fd);
22244                 }
22245         }
22246         if (result == 0
22247          && !strcmp(name[0], name[1]))
22248                 result = 1;
22249         ${cf_cv_main_return:-return}(result);
22250 }
22251
22252 _ACEOF
22253 rm -f "conftest$ac_exeext"
22254 if { (eval echo "$as_me:22254: \"$ac_link\"") >&5
22255   (eval $ac_link) 2>&5
22256   ac_status=$?
22257   echo "$as_me:22257: \$? = $ac_status" >&5
22258   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22259   { (eval echo "$as_me:22259: \"$ac_try\"") >&5
22260   (eval $ac_try) 2>&5
22261   ac_status=$?
22262   echo "$as_me:22262: \$? = $ac_status" >&5
22263   (exit "$ac_status"); }; }; then
22264   cf_cv_func_mkstemp=yes
22265
22266 else
22267   echo "$as_me: program exited with status $ac_status" >&5
22268 echo "$as_me: failed program was:" >&5
22269 cat "conftest.$ac_ext" >&5
22270 cf_cv_func_mkstemp=no
22271
22272 fi
22273 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22274 fi
22275
22276 fi
22277 echo "$as_me:22277: result: $cf_cv_func_mkstemp" >&5
22278 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22279 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22280         echo "$as_me:22280: checking for mkstemp" >&5
22281 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22282 if test "${ac_cv_func_mkstemp+set}" = set; then
22283   echo $ECHO_N "(cached) $ECHO_C" >&6
22284 else
22285   cat >"conftest.$ac_ext" <<_ACEOF
22286 #line 22286 "configure"
22287 #include "confdefs.h"
22288 #define mkstemp autoconf_temporary
22289 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22290 #undef mkstemp
22291
22292 #ifdef __cplusplus
22293 extern "C"
22294 #endif
22295
22296 /* We use char because int might match the return type of a gcc2
22297    builtin and then its argument prototype would still apply.  */
22298 char mkstemp (void);
22299
22300 int
22301 main (void)
22302 {
22303
22304 /* The GNU C library defines stubs for functions which it implements
22305     to always fail with ENOSYS.  Some functions are actually named
22306     something starting with __ and the normal name is an alias.  */
22307 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22308 #error found stub for mkstemp
22309 #endif
22310
22311         return mkstemp ();
22312   ;
22313   return 0;
22314 }
22315 _ACEOF
22316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22317 if { (eval echo "$as_me:22317: \"$ac_link\"") >&5
22318   (eval $ac_link) 2>&5
22319   ac_status=$?
22320   echo "$as_me:22320: \$? = $ac_status" >&5
22321   (exit "$ac_status"); } &&
22322          { ac_try='test -s "conftest$ac_exeext"'
22323   { (eval echo "$as_me:22323: \"$ac_try\"") >&5
22324   (eval $ac_try) 2>&5
22325   ac_status=$?
22326   echo "$as_me:22326: \$? = $ac_status" >&5
22327   (exit "$ac_status"); }; }; then
22328   ac_cv_func_mkstemp=yes
22329 else
22330   echo "$as_me: failed program was:" >&5
22331 cat "conftest.$ac_ext" >&5
22332 ac_cv_func_mkstemp=no
22333 fi
22334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22335 fi
22336 echo "$as_me:22336: result: $ac_cv_func_mkstemp" >&5
22337 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22338
22339 fi
22340 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22341
22342 cat >>confdefs.h <<\EOF
22343 #define HAVE_MKSTEMP 1
22344 EOF
22345
22346 fi
22347
22348 # setup for prototype of fallback for vsscanf()
22349
22350 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22351         HAVE_VSSCANF=1
22352 else
22353         HAVE_VSSCANF=0
22354 fi
22355
22356 if test "x$cross_compiling" = xyes ; then
22357         { echo "$as_me:22357: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22358 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22359 else
22360         echo "$as_me:22360: checking whether setvbuf arguments are reversed" >&5
22361 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22362 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22363   echo $ECHO_N "(cached) $ECHO_C" >&6
22364 else
22365   if test "$cross_compiling" = yes; then
22366   { { echo "$as_me:22366: error: cannot run test program while cross compiling" >&5
22367 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22368    { (exit 1); exit 1; }; }
22369 else
22370   cat >"conftest.$ac_ext" <<_ACEOF
22371 #line 22371 "configure"
22372 #include "confdefs.h"
22373 #include <stdio.h>
22374 /* If setvbuf has the reversed format, exit 0. */
22375 int
22376 main (void)
22377 {
22378   /* This call has the arguments reversed.
22379      A reversed system may check and see that the address of main
22380      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22381   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22382     $ac_main_return(1);
22383   putc('\r', stdout);
22384   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22385 }
22386 _ACEOF
22387 rm -f "conftest$ac_exeext"
22388 if { (eval echo "$as_me:22388: \"$ac_link\"") >&5
22389   (eval $ac_link) 2>&5
22390   ac_status=$?
22391   echo "$as_me:22391: \$? = $ac_status" >&5
22392   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22393   { (eval echo "$as_me:22393: \"$ac_try\"") >&5
22394   (eval $ac_try) 2>&5
22395   ac_status=$?
22396   echo "$as_me:22396: \$? = $ac_status" >&5
22397   (exit "$ac_status"); }; }; then
22398   ac_cv_func_setvbuf_reversed=yes
22399 else
22400   echo "$as_me: program exited with status $ac_status" >&5
22401 echo "$as_me: failed program was:" >&5
22402 cat "conftest.$ac_ext" >&5
22403 ac_cv_func_setvbuf_reversed=no
22404 fi
22405 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22406 fi
22407 rm -f core ./core.* ./*.core
22408 fi
22409 echo "$as_me:22409: result: $ac_cv_func_setvbuf_reversed" >&5
22410 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22411 if test $ac_cv_func_setvbuf_reversed = yes; then
22412
22413 cat >>confdefs.h <<\EOF
22414 #define SETVBUF_REVERSED 1
22415 EOF
22416
22417 fi
22418
22419 fi
22420 echo "$as_me:22420: checking for intptr_t" >&5
22421 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22422 if test "${ac_cv_type_intptr_t+set}" = set; then
22423   echo $ECHO_N "(cached) $ECHO_C" >&6
22424 else
22425   cat >"conftest.$ac_ext" <<_ACEOF
22426 #line 22426 "configure"
22427 #include "confdefs.h"
22428 $ac_includes_default
22429 int
22430 main (void)
22431 {
22432 if ((intptr_t *) 0)
22433   return 0;
22434 if (sizeof (intptr_t))
22435   return 0;
22436   ;
22437   return 0;
22438 }
22439 _ACEOF
22440 rm -f "conftest.$ac_objext"
22441 if { (eval echo "$as_me:22441: \"$ac_compile\"") >&5
22442   (eval $ac_compile) 2>&5
22443   ac_status=$?
22444   echo "$as_me:22444: \$? = $ac_status" >&5
22445   (exit "$ac_status"); } &&
22446          { ac_try='test -s "conftest.$ac_objext"'
22447   { (eval echo "$as_me:22447: \"$ac_try\"") >&5
22448   (eval $ac_try) 2>&5
22449   ac_status=$?
22450   echo "$as_me:22450: \$? = $ac_status" >&5
22451   (exit "$ac_status"); }; }; then
22452   ac_cv_type_intptr_t=yes
22453 else
22454   echo "$as_me: failed program was:" >&5
22455 cat "conftest.$ac_ext" >&5
22456 ac_cv_type_intptr_t=no
22457 fi
22458 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22459 fi
22460 echo "$as_me:22460: result: $ac_cv_type_intptr_t" >&5
22461 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22462 if test "$ac_cv_type_intptr_t" = yes; then
22463   :
22464 else
22465
22466 cat >>confdefs.h <<EOF
22467 #define intptr_t long
22468 EOF
22469
22470 fi
22471
22472 echo "$as_me:22472: checking for ssize_t" >&5
22473 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22474 if test "${ac_cv_type_ssize_t+set}" = set; then
22475   echo $ECHO_N "(cached) $ECHO_C" >&6
22476 else
22477   cat >"conftest.$ac_ext" <<_ACEOF
22478 #line 22478 "configure"
22479 #include "confdefs.h"
22480 $ac_includes_default
22481 int
22482 main (void)
22483 {
22484 if ((ssize_t *) 0)
22485   return 0;
22486 if (sizeof (ssize_t))
22487   return 0;
22488   ;
22489   return 0;
22490 }
22491 _ACEOF
22492 rm -f "conftest.$ac_objext"
22493 if { (eval echo "$as_me:22493: \"$ac_compile\"") >&5
22494   (eval $ac_compile) 2>&5
22495   ac_status=$?
22496   echo "$as_me:22496: \$? = $ac_status" >&5
22497   (exit "$ac_status"); } &&
22498          { ac_try='test -s "conftest.$ac_objext"'
22499   { (eval echo "$as_me:22499: \"$ac_try\"") >&5
22500   (eval $ac_try) 2>&5
22501   ac_status=$?
22502   echo "$as_me:22502: \$? = $ac_status" >&5
22503   (exit "$ac_status"); }; }; then
22504   ac_cv_type_ssize_t=yes
22505 else
22506   echo "$as_me: failed program was:" >&5
22507 cat "conftest.$ac_ext" >&5
22508 ac_cv_type_ssize_t=no
22509 fi
22510 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22511 fi
22512 echo "$as_me:22512: result: $ac_cv_type_ssize_t" >&5
22513 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22514 if test "$ac_cv_type_ssize_t" = yes; then
22515   :
22516 else
22517
22518 cat >>confdefs.h <<EOF
22519 #define ssize_t int
22520 EOF
22521
22522 fi
22523
22524 echo "$as_me:22524: checking for type sigaction_t" >&5
22525 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22526 if test "${cf_cv_type_sigaction+set}" = set; then
22527   echo $ECHO_N "(cached) $ECHO_C" >&6
22528 else
22529
22530         cat >"conftest.$ac_ext" <<_ACEOF
22531 #line 22531 "configure"
22532 #include "confdefs.h"
22533
22534 #include <signal.h>
22535 int
22536 main (void)
22537 {
22538 sigaction_t x
22539   ;
22540   return 0;
22541 }
22542 _ACEOF
22543 rm -f "conftest.$ac_objext"
22544 if { (eval echo "$as_me:22544: \"$ac_compile\"") >&5
22545   (eval $ac_compile) 2>&5
22546   ac_status=$?
22547   echo "$as_me:22547: \$? = $ac_status" >&5
22548   (exit "$ac_status"); } &&
22549          { ac_try='test -s "conftest.$ac_objext"'
22550   { (eval echo "$as_me:22550: \"$ac_try\"") >&5
22551   (eval $ac_try) 2>&5
22552   ac_status=$?
22553   echo "$as_me:22553: \$? = $ac_status" >&5
22554   (exit "$ac_status"); }; }; then
22555   cf_cv_type_sigaction=yes
22556 else
22557   echo "$as_me: failed program was:" >&5
22558 cat "conftest.$ac_ext" >&5
22559 cf_cv_type_sigaction=no
22560 fi
22561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22562 fi
22563
22564 echo "$as_me:22564: result: $cf_cv_type_sigaction" >&5
22565 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22566 test "$cf_cv_type_sigaction" = yes &&
22567 cat >>confdefs.h <<\EOF
22568 #define HAVE_TYPE_SIGACTION 1
22569 EOF
22570
22571 echo "$as_me:22571: checking declaration of size-change" >&5
22572 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22573 if test "${cf_cv_sizechange+set}" = set; then
22574   echo $ECHO_N "(cached) $ECHO_C" >&6
22575 else
22576
22577         cf_cv_sizechange=unknown
22578         cf_save_CPPFLAGS="$CPPFLAGS"
22579
22580 for cf_opts in "" "NEED_PTEM_H"
22581 do
22582
22583         CPPFLAGS="$cf_save_CPPFLAGS"
22584         if test -n "$cf_opts"
22585         then
22586
22587         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22588         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22589
22590         fi
22591         cat >"conftest.$ac_ext" <<_ACEOF
22592 #line 22592 "configure"
22593 #include "confdefs.h"
22594 #include <sys/types.h>
22595 #ifdef HAVE_TERMIOS_H
22596 #include <termios.h>
22597 #else
22598 #ifdef HAVE_TERMIO_H
22599 #include <termio.h>
22600 #endif
22601 #endif
22602
22603 #ifdef NEED_PTEM_H
22604 /* This is a workaround for SCO:  they neglected to define struct winsize in
22605  * termios.h -- it is only in termio.h and ptem.h
22606  */
22607 #include <sys/stream.h>
22608 #include <sys/ptem.h>
22609 #endif
22610
22611 #ifdef HAVE_SYS_IOCTL_H
22612 #include <sys/ioctl.h>
22613 #endif
22614
22615 int
22616 main (void)
22617 {
22618
22619 #ifdef TIOCGSIZE
22620         struct ttysize win;     /* SunOS 3.0... */
22621         int y = win.ts_lines = 2;
22622         int x = win.ts_cols = 1;
22623         (void)y;
22624         (void)x;
22625 #else
22626 #ifdef TIOCGWINSZ
22627         struct winsize win;     /* everything else */
22628         int y = win.ws_row = 2;
22629         int x = win.ws_col = 1;
22630         (void)y;
22631         (void)x;
22632 #else
22633         no TIOCGSIZE or TIOCGWINSZ
22634 #endif /* TIOCGWINSZ */
22635 #endif /* TIOCGSIZE */
22636
22637   ;
22638   return 0;
22639 }
22640 _ACEOF
22641 rm -f "conftest.$ac_objext"
22642 if { (eval echo "$as_me:22642: \"$ac_compile\"") >&5
22643   (eval $ac_compile) 2>&5
22644   ac_status=$?
22645   echo "$as_me:22645: \$? = $ac_status" >&5
22646   (exit "$ac_status"); } &&
22647          { ac_try='test -s "conftest.$ac_objext"'
22648   { (eval echo "$as_me:22648: \"$ac_try\"") >&5
22649   (eval $ac_try) 2>&5
22650   ac_status=$?
22651   echo "$as_me:22651: \$? = $ac_status" >&5
22652   (exit "$ac_status"); }; }; then
22653   cf_cv_sizechange=yes
22654 else
22655   echo "$as_me: failed program was:" >&5
22656 cat "conftest.$ac_ext" >&5
22657 cf_cv_sizechange=no
22658 fi
22659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22660
22661         CPPFLAGS="$cf_save_CPPFLAGS"
22662         if test "$cf_cv_sizechange" = yes ; then
22663                 echo "size-change succeeded ($cf_opts)" >&5
22664                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22665                 break
22666         fi
22667 done
22668
22669 fi
22670 echo "$as_me:22670: result: $cf_cv_sizechange" >&5
22671 echo "${ECHO_T}$cf_cv_sizechange" >&6
22672 if test "$cf_cv_sizechange" != no ; then
22673
22674 cat >>confdefs.h <<\EOF
22675 #define HAVE_SIZECHANGE 1
22676 EOF
22677
22678         case "$cf_cv_sizechange" in
22679         (NEED*)
22680                 cat >>confdefs.h <<EOF
22681 #define $cf_cv_sizechange  1
22682 EOF
22683
22684                 ;;
22685         esac
22686 fi
22687
22688 echo "$as_me:22688: checking for memmove" >&5
22689 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22690 if test "${ac_cv_func_memmove+set}" = set; then
22691   echo $ECHO_N "(cached) $ECHO_C" >&6
22692 else
22693   cat >"conftest.$ac_ext" <<_ACEOF
22694 #line 22694 "configure"
22695 #include "confdefs.h"
22696 #define memmove autoconf_temporary
22697 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22698 #undef memmove
22699
22700 #ifdef __cplusplus
22701 extern "C"
22702 #endif
22703
22704 /* We use char because int might match the return type of a gcc2
22705    builtin and then its argument prototype would still apply.  */
22706 char memmove (void);
22707
22708 int
22709 main (void)
22710 {
22711
22712 /* The GNU C library defines stubs for functions which it implements
22713     to always fail with ENOSYS.  Some functions are actually named
22714     something starting with __ and the normal name is an alias.  */
22715 #if defined (__stub_memmove) || defined (__stub___memmove)
22716 #error found stub for memmove
22717 #endif
22718
22719         return memmove ();
22720   ;
22721   return 0;
22722 }
22723 _ACEOF
22724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22725 if { (eval echo "$as_me:22725: \"$ac_link\"") >&5
22726   (eval $ac_link) 2>&5
22727   ac_status=$?
22728   echo "$as_me:22728: \$? = $ac_status" >&5
22729   (exit "$ac_status"); } &&
22730          { ac_try='test -s "conftest$ac_exeext"'
22731   { (eval echo "$as_me:22731: \"$ac_try\"") >&5
22732   (eval $ac_try) 2>&5
22733   ac_status=$?
22734   echo "$as_me:22734: \$? = $ac_status" >&5
22735   (exit "$ac_status"); }; }; then
22736   ac_cv_func_memmove=yes
22737 else
22738   echo "$as_me: failed program was:" >&5
22739 cat "conftest.$ac_ext" >&5
22740 ac_cv_func_memmove=no
22741 fi
22742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22743 fi
22744 echo "$as_me:22744: result: $ac_cv_func_memmove" >&5
22745 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22746 if test "$ac_cv_func_memmove" = yes; then
22747   :
22748 else
22749
22750 echo "$as_me:22750: checking for bcopy" >&5
22751 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22752 if test "${ac_cv_func_bcopy+set}" = set; then
22753   echo $ECHO_N "(cached) $ECHO_C" >&6
22754 else
22755   cat >"conftest.$ac_ext" <<_ACEOF
22756 #line 22756 "configure"
22757 #include "confdefs.h"
22758 #define bcopy autoconf_temporary
22759 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22760 #undef bcopy
22761
22762 #ifdef __cplusplus
22763 extern "C"
22764 #endif
22765
22766 /* We use char because int might match the return type of a gcc2
22767    builtin and then its argument prototype would still apply.  */
22768 char bcopy (void);
22769
22770 int
22771 main (void)
22772 {
22773
22774 /* The GNU C library defines stubs for functions which it implements
22775     to always fail with ENOSYS.  Some functions are actually named
22776     something starting with __ and the normal name is an alias.  */
22777 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22778 #error found stub for bcopy
22779 #endif
22780
22781         return bcopy ();
22782   ;
22783   return 0;
22784 }
22785 _ACEOF
22786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22787 if { (eval echo "$as_me:22787: \"$ac_link\"") >&5
22788   (eval $ac_link) 2>&5
22789   ac_status=$?
22790   echo "$as_me:22790: \$? = $ac_status" >&5
22791   (exit "$ac_status"); } &&
22792          { ac_try='test -s "conftest$ac_exeext"'
22793   { (eval echo "$as_me:22793: \"$ac_try\"") >&5
22794   (eval $ac_try) 2>&5
22795   ac_status=$?
22796   echo "$as_me:22796: \$? = $ac_status" >&5
22797   (exit "$ac_status"); }; }; then
22798   ac_cv_func_bcopy=yes
22799 else
22800   echo "$as_me: failed program was:" >&5
22801 cat "conftest.$ac_ext" >&5
22802 ac_cv_func_bcopy=no
22803 fi
22804 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22805 fi
22806 echo "$as_me:22806: result: $ac_cv_func_bcopy" >&5
22807 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22808 if test "$ac_cv_func_bcopy" = yes; then
22809
22810         echo "$as_me:22810: checking if bcopy does overlapping moves" >&5
22811 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22812 if test "${cf_cv_good_bcopy+set}" = set; then
22813   echo $ECHO_N "(cached) $ECHO_C" >&6
22814 else
22815
22816                 if test "$cross_compiling" = yes; then
22817   cf_cv_good_bcopy=unknown
22818 else
22819   cat >"conftest.$ac_ext" <<_ACEOF
22820 #line 22820 "configure"
22821 #include "confdefs.h"
22822
22823 int main(void) {
22824         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22825         char temp[40];
22826         bcopy(data, temp, sizeof(data));
22827         bcopy(temp+10, temp, 15);
22828         bcopy(temp+5, temp+15, 10);
22829         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22830 }
22831
22832 _ACEOF
22833 rm -f "conftest$ac_exeext"
22834 if { (eval echo "$as_me:22834: \"$ac_link\"") >&5
22835   (eval $ac_link) 2>&5
22836   ac_status=$?
22837   echo "$as_me:22837: \$? = $ac_status" >&5
22838   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22839   { (eval echo "$as_me:22839: \"$ac_try\"") >&5
22840   (eval $ac_try) 2>&5
22841   ac_status=$?
22842   echo "$as_me:22842: \$? = $ac_status" >&5
22843   (exit "$ac_status"); }; }; then
22844   cf_cv_good_bcopy=yes
22845 else
22846   echo "$as_me: program exited with status $ac_status" >&5
22847 echo "$as_me: failed program was:" >&5
22848 cat "conftest.$ac_ext" >&5
22849 cf_cv_good_bcopy=no
22850 fi
22851 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22852 fi
22853
22854 fi
22855 echo "$as_me:22855: result: $cf_cv_good_bcopy" >&5
22856 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22857
22858 else
22859   cf_cv_good_bcopy=no
22860 fi
22861
22862         if test "$cf_cv_good_bcopy" = yes ; then
22863
22864 cat >>confdefs.h <<\EOF
22865 #define USE_OK_BCOPY 1
22866 EOF
22867
22868         else
22869
22870 cat >>confdefs.h <<\EOF
22871 #define USE_MY_MEMMOVE 1
22872 EOF
22873
22874         fi
22875
22876 fi
22877
22878 tty >/dev/null 2>&1 || {
22879 for ac_func in posix_openpt
22880 do
22881 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22882 echo "$as_me:22882: checking for $ac_func" >&5
22883 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22884 if eval "test \"\${$as_ac_var+set}\" = set"; then
22885   echo $ECHO_N "(cached) $ECHO_C" >&6
22886 else
22887   cat >"conftest.$ac_ext" <<_ACEOF
22888 #line 22888 "configure"
22889 #include "confdefs.h"
22890 #define $ac_func autoconf_temporary
22891 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22892 #undef $ac_func
22893
22894 #ifdef __cplusplus
22895 extern "C"
22896 #endif
22897
22898 /* We use char because int might match the return type of a gcc2
22899    builtin and then its argument prototype would still apply.  */
22900 char $ac_func (void);
22901
22902 int
22903 main (void)
22904 {
22905
22906 /* The GNU C library defines stubs for functions which it implements
22907     to always fail with ENOSYS.  Some functions are actually named
22908     something starting with __ and the normal name is an alias.  */
22909 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22910 #error found stub for $ac_func
22911 #endif
22912
22913         return $ac_func ();
22914   ;
22915   return 0;
22916 }
22917 _ACEOF
22918 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22919 if { (eval echo "$as_me:22919: \"$ac_link\"") >&5
22920   (eval $ac_link) 2>&5
22921   ac_status=$?
22922   echo "$as_me:22922: \$? = $ac_status" >&5
22923   (exit "$ac_status"); } &&
22924          { ac_try='test -s "conftest$ac_exeext"'
22925   { (eval echo "$as_me:22925: \"$ac_try\"") >&5
22926   (eval $ac_try) 2>&5
22927   ac_status=$?
22928   echo "$as_me:22928: \$? = $ac_status" >&5
22929   (exit "$ac_status"); }; }; then
22930   eval "$as_ac_var=yes"
22931 else
22932   echo "$as_me: failed program was:" >&5
22933 cat "conftest.$ac_ext" >&5
22934 eval "$as_ac_var=no"
22935 fi
22936 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22937 fi
22938 echo "$as_me:22938: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22939 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22940 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22941   cat >>confdefs.h <<EOF
22942 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22943 EOF
22944
22945 fi
22946 done
22947  }
22948 echo "$as_me:22948: checking if poll really works" >&5
22949 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22950 if test "${cf_cv_working_poll+set}" = set; then
22951   echo $ECHO_N "(cached) $ECHO_C" >&6
22952 else
22953
22954 if test "$cross_compiling" = yes; then
22955   cf_cv_working_poll=unknown
22956 else
22957   cat >"conftest.$ac_ext" <<_ACEOF
22958 #line 22958 "configure"
22959 #include "confdefs.h"
22960
22961 #include <stdlib.h>
22962 #include <stdio.h>
22963 #include <unistd.h>
22964 #include <fcntl.h>
22965 #ifdef HAVE_POLL_H
22966 #include <poll.h>
22967 #else
22968 #include <sys/poll.h>
22969 #endif
22970 int main(void) {
22971         struct pollfd myfds;
22972         int ret;
22973
22974         /* check for Darwin bug with respect to "devices" */
22975         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22976         if (myfds.fd < 0)
22977                 myfds.fd = 0;
22978         myfds.events = POLLIN;
22979         myfds.revents = 0;
22980
22981         ret = poll(&myfds, 1, 100);
22982
22983         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22984                 ret = -1;
22985         } else {
22986                 int fd = 0;
22987                 if (!isatty(fd)) {
22988                         fd = open("/dev/tty", 2);       /* O_RDWR */
22989                 }
22990 #ifdef HAVE_POSIX_OPENPT
22991                 if (fd < 0) {
22992                         fd = posix_openpt(O_RDWR);
22993                 }
22994 #endif
22995
22996                 if (fd >= 0) {
22997                         /* also check with standard input */
22998                         myfds.fd = fd;
22999                         myfds.events = POLLIN;
23000                         myfds.revents = 0;
23001                         ret = poll(&myfds, 1, 100);
23002                 } else {
23003                         ret = -1;
23004                 }
23005         }
23006         ${cf_cv_main_return:-return}(ret < 0);
23007 }
23008 _ACEOF
23009 rm -f "conftest$ac_exeext"
23010 if { (eval echo "$as_me:23010: \"$ac_link\"") >&5
23011   (eval $ac_link) 2>&5
23012   ac_status=$?
23013   echo "$as_me:23013: \$? = $ac_status" >&5
23014   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23015   { (eval echo "$as_me:23015: \"$ac_try\"") >&5
23016   (eval $ac_try) 2>&5
23017   ac_status=$?
23018   echo "$as_me:23018: \$? = $ac_status" >&5
23019   (exit "$ac_status"); }; }; then
23020   cf_cv_working_poll=yes
23021 else
23022   echo "$as_me: program exited with status $ac_status" >&5
23023 echo "$as_me: failed program was:" >&5
23024 cat "conftest.$ac_ext" >&5
23025 cf_cv_working_poll=no
23026 fi
23027 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23028 fi
23029 fi
23030 echo "$as_me:23030: result: $cf_cv_working_poll" >&5
23031 echo "${ECHO_T}$cf_cv_working_poll" >&6
23032 test "$cf_cv_working_poll" = "yes" &&
23033 cat >>confdefs.h <<\EOF
23034 #define HAVE_WORKING_POLL 1
23035 EOF
23036
23037 echo "$as_me:23037: checking for va_copy" >&5
23038 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23039 if test "${cf_cv_have_va_copy+set}" = set; then
23040   echo $ECHO_N "(cached) $ECHO_C" >&6
23041 else
23042
23043 cat >"conftest.$ac_ext" <<_ACEOF
23044 #line 23044 "configure"
23045 #include "confdefs.h"
23046
23047 #include <stdarg.h>
23048
23049 int
23050 main (void)
23051 {
23052
23053         static va_list dst;
23054         static va_list src;
23055         va_copy(dst, src)
23056   ;
23057   return 0;
23058 }
23059 _ACEOF
23060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23061 if { (eval echo "$as_me:23061: \"$ac_link\"") >&5
23062   (eval $ac_link) 2>&5
23063   ac_status=$?
23064   echo "$as_me:23064: \$? = $ac_status" >&5
23065   (exit "$ac_status"); } &&
23066          { ac_try='test -s "conftest$ac_exeext"'
23067   { (eval echo "$as_me:23067: \"$ac_try\"") >&5
23068   (eval $ac_try) 2>&5
23069   ac_status=$?
23070   echo "$as_me:23070: \$? = $ac_status" >&5
23071   (exit "$ac_status"); }; }; then
23072   cf_cv_have_va_copy=yes
23073 else
23074   echo "$as_me: failed program was:" >&5
23075 cat "conftest.$ac_ext" >&5
23076 cf_cv_have_va_copy=no
23077 fi
23078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23079 fi
23080 echo "$as_me:23080: result: $cf_cv_have_va_copy" >&5
23081 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23082
23083 if test "$cf_cv_have_va_copy" = yes;
23084 then
23085
23086 cat >>confdefs.h <<\EOF
23087 #define HAVE_VA_COPY 1
23088 EOF
23089
23090 else # !cf_cv_have_va_copy
23091
23092 echo "$as_me:23092: checking for __va_copy" >&5
23093 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23094 if test "${cf_cv_have___va_copy+set}" = set; then
23095   echo $ECHO_N "(cached) $ECHO_C" >&6
23096 else
23097
23098 cat >"conftest.$ac_ext" <<_ACEOF
23099 #line 23099 "configure"
23100 #include "confdefs.h"
23101
23102 #include <stdarg.h>
23103
23104 int
23105 main (void)
23106 {
23107
23108         static va_list dst;
23109         static va_list src;
23110         __va_copy(dst, src)
23111   ;
23112   return 0;
23113 }
23114 _ACEOF
23115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23116 if { (eval echo "$as_me:23116: \"$ac_link\"") >&5
23117   (eval $ac_link) 2>&5
23118   ac_status=$?
23119   echo "$as_me:23119: \$? = $ac_status" >&5
23120   (exit "$ac_status"); } &&
23121          { ac_try='test -s "conftest$ac_exeext"'
23122   { (eval echo "$as_me:23122: \"$ac_try\"") >&5
23123   (eval $ac_try) 2>&5
23124   ac_status=$?
23125   echo "$as_me:23125: \$? = $ac_status" >&5
23126   (exit "$ac_status"); }; }; then
23127   cf_cv_have___va_copy=yes
23128 else
23129   echo "$as_me: failed program was:" >&5
23130 cat "conftest.$ac_ext" >&5
23131 cf_cv_have___va_copy=no
23132 fi
23133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23134 fi
23135 echo "$as_me:23135: result: $cf_cv_have___va_copy" >&5
23136 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23137
23138 if test "$cf_cv_have___va_copy" = yes
23139 then
23140
23141 cat >>confdefs.h <<\EOF
23142 #define HAVE___VA_COPY 1
23143 EOF
23144
23145 else # !cf_cv_have___va_copy
23146
23147 echo "$as_me:23147: checking for __builtin_va_copy" >&5
23148 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23149 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23150   echo $ECHO_N "(cached) $ECHO_C" >&6
23151 else
23152
23153 cat >"conftest.$ac_ext" <<_ACEOF
23154 #line 23154 "configure"
23155 #include "confdefs.h"
23156
23157 #include <stdarg.h>
23158
23159 int
23160 main (void)
23161 {
23162
23163         static va_list dst;
23164         static va_list src;
23165         __builtin_va_copy(dst, src)
23166   ;
23167   return 0;
23168 }
23169 _ACEOF
23170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23171 if { (eval echo "$as_me:23171: \"$ac_link\"") >&5
23172   (eval $ac_link) 2>&5
23173   ac_status=$?
23174   echo "$as_me:23174: \$? = $ac_status" >&5
23175   (exit "$ac_status"); } &&
23176          { ac_try='test -s "conftest$ac_exeext"'
23177   { (eval echo "$as_me:23177: \"$ac_try\"") >&5
23178   (eval $ac_try) 2>&5
23179   ac_status=$?
23180   echo "$as_me:23180: \$? = $ac_status" >&5
23181   (exit "$ac_status"); }; }; then
23182   cf_cv_have___builtin_va_copy=yes
23183 else
23184   echo "$as_me: failed program was:" >&5
23185 cat "conftest.$ac_ext" >&5
23186 cf_cv_have___builtin_va_copy=no
23187 fi
23188 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23189 fi
23190 echo "$as_me:23190: result: $cf_cv_have___builtin_va_copy" >&5
23191 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23192
23193 test "$cf_cv_have___builtin_va_copy" = yes &&
23194
23195 cat >>confdefs.h <<\EOF
23196 #define HAVE___BUILTIN_VA_COPY 1
23197 EOF
23198
23199 fi # cf_cv_have___va_copy
23200
23201 fi # cf_cv_have_va_copy
23202
23203 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23204 (*yes*)
23205         ;;
23206
23207 (*)
23208         echo "$as_me:23208: checking if we can simply copy va_list" >&5
23209 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23210 if test "${cf_cv_pointer_va_list+set}" = set; then
23211   echo $ECHO_N "(cached) $ECHO_C" >&6
23212 else
23213
23214 cat >"conftest.$ac_ext" <<_ACEOF
23215 #line 23215 "configure"
23216 #include "confdefs.h"
23217
23218 #include <stdarg.h>
23219
23220 int
23221 main (void)
23222 {
23223
23224         va_list dst;
23225         va_list src;
23226         dst = src
23227   ;
23228   return 0;
23229 }
23230 _ACEOF
23231 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23232 if { (eval echo "$as_me:23232: \"$ac_link\"") >&5
23233   (eval $ac_link) 2>&5
23234   ac_status=$?
23235   echo "$as_me:23235: \$? = $ac_status" >&5
23236   (exit "$ac_status"); } &&
23237          { ac_try='test -s "conftest$ac_exeext"'
23238   { (eval echo "$as_me:23238: \"$ac_try\"") >&5
23239   (eval $ac_try) 2>&5
23240   ac_status=$?
23241   echo "$as_me:23241: \$? = $ac_status" >&5
23242   (exit "$ac_status"); }; }; then
23243   cf_cv_pointer_va_list=yes
23244 else
23245   echo "$as_me: failed program was:" >&5
23246 cat "conftest.$ac_ext" >&5
23247 cf_cv_pointer_va_list=no
23248 fi
23249 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23250 fi
23251 echo "$as_me:23251: result: $cf_cv_pointer_va_list" >&5
23252 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23253
23254         if test "$cf_cv_pointer_va_list" = no
23255         then
23256                 echo "$as_me:23256: checking if we can copy va_list indirectly" >&5
23257 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23258 if test "${cf_cv_array_va_list+set}" = set; then
23259   echo $ECHO_N "(cached) $ECHO_C" >&6
23260 else
23261
23262 cat >"conftest.$ac_ext" <<_ACEOF
23263 #line 23263 "configure"
23264 #include "confdefs.h"
23265
23266 #include <stdarg.h>
23267
23268 int
23269 main (void)
23270 {
23271
23272         va_list dst;
23273         va_list src;
23274         *dst = *src
23275   ;
23276   return 0;
23277 }
23278 _ACEOF
23279 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23280 if { (eval echo "$as_me:23280: \"$ac_link\"") >&5
23281   (eval $ac_link) 2>&5
23282   ac_status=$?
23283   echo "$as_me:23283: \$? = $ac_status" >&5
23284   (exit "$ac_status"); } &&
23285          { ac_try='test -s "conftest$ac_exeext"'
23286   { (eval echo "$as_me:23286: \"$ac_try\"") >&5
23287   (eval $ac_try) 2>&5
23288   ac_status=$?
23289   echo "$as_me:23289: \$? = $ac_status" >&5
23290   (exit "$ac_status"); }; }; then
23291   cf_cv_array_va_list=yes
23292 else
23293   echo "$as_me: failed program was:" >&5
23294 cat "conftest.$ac_ext" >&5
23295 cf_cv_array_va_list=no
23296 fi
23297 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23298 fi
23299 echo "$as_me:23299: result: $cf_cv_array_va_list" >&5
23300 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23301                 test "$cf_cv_array_va_list" = yes &&
23302 cat >>confdefs.h <<\EOF
23303 #define ARRAY_VA_LIST 1
23304 EOF
23305
23306         fi
23307         ;;
23308 esac
23309
23310 echo "$as_me:23310: checking for pid_t" >&5
23311 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23312 if test "${ac_cv_type_pid_t+set}" = set; then
23313   echo $ECHO_N "(cached) $ECHO_C" >&6
23314 else
23315   cat >"conftest.$ac_ext" <<_ACEOF
23316 #line 23316 "configure"
23317 #include "confdefs.h"
23318 $ac_includes_default
23319 int
23320 main (void)
23321 {
23322 if ((pid_t *) 0)
23323   return 0;
23324 if (sizeof (pid_t))
23325   return 0;
23326   ;
23327   return 0;
23328 }
23329 _ACEOF
23330 rm -f "conftest.$ac_objext"
23331 if { (eval echo "$as_me:23331: \"$ac_compile\"") >&5
23332   (eval $ac_compile) 2>&5
23333   ac_status=$?
23334   echo "$as_me:23334: \$? = $ac_status" >&5
23335   (exit "$ac_status"); } &&
23336          { ac_try='test -s "conftest.$ac_objext"'
23337   { (eval echo "$as_me:23337: \"$ac_try\"") >&5
23338   (eval $ac_try) 2>&5
23339   ac_status=$?
23340   echo "$as_me:23340: \$? = $ac_status" >&5
23341   (exit "$ac_status"); }; }; then
23342   ac_cv_type_pid_t=yes
23343 else
23344   echo "$as_me: failed program was:" >&5
23345 cat "conftest.$ac_ext" >&5
23346 ac_cv_type_pid_t=no
23347 fi
23348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23349 fi
23350 echo "$as_me:23350: result: $ac_cv_type_pid_t" >&5
23351 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23352 if test "$ac_cv_type_pid_t" = yes; then
23353   :
23354 else
23355
23356 cat >>confdefs.h <<EOF
23357 #define pid_t int
23358 EOF
23359
23360 fi
23361
23362 for ac_header in unistd.h vfork.h
23363 do
23364 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23365 echo "$as_me:23365: checking for $ac_header" >&5
23366 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23367 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23368   echo $ECHO_N "(cached) $ECHO_C" >&6
23369 else
23370   cat >"conftest.$ac_ext" <<_ACEOF
23371 #line 23371 "configure"
23372 #include "confdefs.h"
23373 #include <$ac_header>
23374 _ACEOF
23375 if { (eval echo "$as_me:23375: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23376   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23377   ac_status=$?
23378   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23379   rm -f conftest.er1
23380   cat conftest.err >&5
23381   echo "$as_me:23381: \$? = $ac_status" >&5
23382   (exit "$ac_status"); } >/dev/null; then
23383   if test -s conftest.err; then
23384     ac_cpp_err=$ac_c_preproc_warn_flag
23385   else
23386     ac_cpp_err=
23387   fi
23388 else
23389   ac_cpp_err=yes
23390 fi
23391 if test -z "$ac_cpp_err"; then
23392   eval "$as_ac_Header=yes"
23393 else
23394   echo "$as_me: failed program was:" >&5
23395   cat "conftest.$ac_ext" >&5
23396   eval "$as_ac_Header=no"
23397 fi
23398 rm -f conftest.err "conftest.$ac_ext"
23399 fi
23400 echo "$as_me:23400: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23401 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23402 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23403   cat >>confdefs.h <<EOF
23404 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23405 EOF
23406
23407 fi
23408 done
23409
23410 for ac_func in fork vfork
23411 do
23412 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23413 echo "$as_me:23413: checking for $ac_func" >&5
23414 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23415 if eval "test \"\${$as_ac_var+set}\" = set"; then
23416   echo $ECHO_N "(cached) $ECHO_C" >&6
23417 else
23418   cat >"conftest.$ac_ext" <<_ACEOF
23419 #line 23419 "configure"
23420 #include "confdefs.h"
23421 #define $ac_func autoconf_temporary
23422 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23423 #undef $ac_func
23424
23425 #ifdef __cplusplus
23426 extern "C"
23427 #endif
23428
23429 /* We use char because int might match the return type of a gcc2
23430    builtin and then its argument prototype would still apply.  */
23431 char $ac_func (void);
23432
23433 int
23434 main (void)
23435 {
23436
23437 /* The GNU C library defines stubs for functions which it implements
23438     to always fail with ENOSYS.  Some functions are actually named
23439     something starting with __ and the normal name is an alias.  */
23440 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23441 #error found stub for $ac_func
23442 #endif
23443
23444         return $ac_func ();
23445   ;
23446   return 0;
23447 }
23448 _ACEOF
23449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23450 if { (eval echo "$as_me:23450: \"$ac_link\"") >&5
23451   (eval $ac_link) 2>&5
23452   ac_status=$?
23453   echo "$as_me:23453: \$? = $ac_status" >&5
23454   (exit "$ac_status"); } &&
23455          { ac_try='test -s "conftest$ac_exeext"'
23456   { (eval echo "$as_me:23456: \"$ac_try\"") >&5
23457   (eval $ac_try) 2>&5
23458   ac_status=$?
23459   echo "$as_me:23459: \$? = $ac_status" >&5
23460   (exit "$ac_status"); }; }; then
23461   eval "$as_ac_var=yes"
23462 else
23463   echo "$as_me: failed program was:" >&5
23464 cat "conftest.$ac_ext" >&5
23465 eval "$as_ac_var=no"
23466 fi
23467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23468 fi
23469 echo "$as_me:23469: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23470 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23471 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23472   cat >>confdefs.h <<EOF
23473 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23474 EOF
23475
23476 fi
23477 done
23478
23479 ac_cv_func_fork_works=$ac_cv_func_fork
23480 if test "x$ac_cv_func_fork" = xyes; then
23481   echo "$as_me:23481: checking for working fork" >&5
23482 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23483 if test "${ac_cv_func_fork_works+set}" = set; then
23484   echo $ECHO_N "(cached) $ECHO_C" >&6
23485 else
23486   if test "$cross_compiling" = yes; then
23487   ac_cv_func_fork_works=cross
23488 else
23489   cat >"conftest.$ac_ext" <<_ACEOF
23490 /* By Rüdiger Kuhlmann. */
23491       #include <sys/types.h>
23492       #if HAVE_UNISTD_H
23493       # include <unistd.h>
23494       #endif
23495       /* Some systems only have a dummy stub for fork() */
23496       int main (void)
23497       {
23498         if (fork() < 0)
23499           $ac_main_return (1);
23500         $ac_main_return (0);
23501       }
23502 _ACEOF
23503 rm -f "conftest$ac_exeext"
23504 if { (eval echo "$as_me:23504: \"$ac_link\"") >&5
23505   (eval $ac_link) 2>&5
23506   ac_status=$?
23507   echo "$as_me:23507: \$? = $ac_status" >&5
23508   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23509   { (eval echo "$as_me:23509: \"$ac_try\"") >&5
23510   (eval $ac_try) 2>&5
23511   ac_status=$?
23512   echo "$as_me:23512: \$? = $ac_status" >&5
23513   (exit "$ac_status"); }; }; then
23514   ac_cv_func_fork_works=yes
23515 else
23516   echo "$as_me: program exited with status $ac_status" >&5
23517 echo "$as_me: failed program was:" >&5
23518 cat "conftest.$ac_ext" >&5
23519 ac_cv_func_fork_works=no
23520 fi
23521 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23522 fi
23523 fi
23524 echo "$as_me:23524: result: $ac_cv_func_fork_works" >&5
23525 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23526
23527 fi
23528 if test "x$ac_cv_func_fork_works" = xcross; then
23529   case $host in
23530     *-*-amigaos* | *-*-msdosdjgpp*)
23531       # Override, as these systems have only a dummy fork() stub
23532       ac_cv_func_fork_works=no
23533       ;;
23534     *)
23535       ac_cv_func_fork_works=yes
23536       ;;
23537   esac
23538   { echo "$as_me:23538: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23539 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23540 fi
23541 ac_cv_func_vfork_works=$ac_cv_func_vfork
23542 if test "x$ac_cv_func_vfork" = xyes; then
23543   echo "$as_me:23543: checking for working vfork" >&5
23544 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23545 if test "${ac_cv_func_vfork_works+set}" = set; then
23546   echo $ECHO_N "(cached) $ECHO_C" >&6
23547 else
23548   if test "$cross_compiling" = yes; then
23549   ac_cv_func_vfork_works=cross
23550 else
23551   cat >"conftest.$ac_ext" <<_ACEOF
23552 #line 23552 "configure"
23553 #include "confdefs.h"
23554 /* Thanks to Paul Eggert for this test.  */
23555 #include <stdio.h>
23556 #include <sys/types.h>
23557 #include <sys/stat.h>
23558 #if HAVE_UNISTD_H
23559 # include <unistd.h>
23560 #endif
23561 #if HAVE_VFORK_H
23562 # include <vfork.h>
23563 #endif
23564 /* On some sparc systems, changes by the child to local and incoming
23565    argument registers are propagated back to the parent.  The compiler
23566    is told about this with #include <vfork.h>, but some compilers
23567    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23568    static variable whose address is put into a register that is
23569    clobbered by the vfork.  */
23570 static
23571 #ifdef __cplusplus
23572 sparc_address_test (int arg)
23573 # else
23574 sparc_address_test (arg) int arg;
23575 #endif
23576 {
23577   static pid_t child;
23578   if (!child) {
23579     child = vfork ();
23580     if (child < 0) {
23581       perror ("vfork");
23582       _exit(2);
23583     }
23584     if (!child) {
23585       arg = getpid();
23586       write(-1, "", 0);
23587       _exit (arg);
23588     }
23589   }
23590 }
23591
23592 int
23593 main (void)
23594 {
23595   pid_t parent = getpid ();
23596   pid_t child;
23597
23598   sparc_address_test ();
23599
23600   child = vfork ();
23601
23602   if (child == 0) {
23603     /* Here is another test for sparc vfork register problems.  This
23604        test uses lots of local variables, at least as many local
23605        variables as main has allocated so far including compiler
23606        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23607        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23608        reuse the register of parent for one of the local variables,
23609        since it will think that parent can't possibly be used any more
23610        in this routine.  Assigning to the local variable will thus
23611        munge parent in the parent process.  */
23612     pid_t
23613       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23614       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23615     /* Convince the compiler that p..p7 are live; otherwise, it might
23616        use the same hardware register for all 8 local variables.  */
23617     if (p != p1 || p != p2 || p != p3 || p != p4
23618         || p != p5 || p != p6 || p != p7)
23619       _exit(1);
23620
23621     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23622        from child file descriptors.  If the child closes a descriptor
23623        before it execs or exits, this munges the parent's descriptor
23624        as well.  Test for this by closing stdout in the child.  */
23625     _exit(close(fileno(stdout)) != 0);
23626   } else {
23627     int status;
23628     struct stat st;
23629
23630     while (wait(&status) != child)
23631       ;
23632     $ac_main_return(
23633          /* Was there some problem with vforking?  */
23634          child < 0
23635
23636          /* Did the child fail?  (This shouldn't happen.)  */
23637          || status
23638
23639          /* Did the vfork/compiler bug occur?  */
23640          || parent != getpid()
23641
23642          /* Did the file descriptor bug occur?  */
23643          || fstat(fileno(stdout), &st) != 0
23644          );
23645   }
23646 }
23647 _ACEOF
23648 rm -f "conftest$ac_exeext"
23649 if { (eval echo "$as_me:23649: \"$ac_link\"") >&5
23650   (eval $ac_link) 2>&5
23651   ac_status=$?
23652   echo "$as_me:23652: \$? = $ac_status" >&5
23653   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23654   { (eval echo "$as_me:23654: \"$ac_try\"") >&5
23655   (eval $ac_try) 2>&5
23656   ac_status=$?
23657   echo "$as_me:23657: \$? = $ac_status" >&5
23658   (exit "$ac_status"); }; }; then
23659   ac_cv_func_vfork_works=yes
23660 else
23661   echo "$as_me: program exited with status $ac_status" >&5
23662 echo "$as_me: failed program was:" >&5
23663 cat "conftest.$ac_ext" >&5
23664 ac_cv_func_vfork_works=no
23665 fi
23666 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23667 fi
23668 fi
23669 echo "$as_me:23669: result: $ac_cv_func_vfork_works" >&5
23670 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23671
23672 fi;
23673 if test "x$ac_cv_func_fork_works" = xcross; then
23674   ac_cv_func_vfork_works=ac_cv_func_vfork
23675   { echo "$as_me:23675: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23676 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23677 fi
23678
23679 if test "x$ac_cv_func_vfork_works" = xyes; then
23680
23681 cat >>confdefs.h <<\EOF
23682 #define HAVE_WORKING_VFORK 1
23683 EOF
23684
23685 else
23686
23687 cat >>confdefs.h <<\EOF
23688 #define vfork fork
23689 EOF
23690
23691 fi
23692 if test "x$ac_cv_func_fork_works" = xyes; then
23693
23694 cat >>confdefs.h <<\EOF
23695 #define HAVE_WORKING_FORK 1
23696 EOF
23697
23698 fi
23699
23700 echo "$as_me:23700: checking if fopen accepts explicit binary mode" >&5
23701 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23702 if test "${cf_cv_fopen_bin_r+set}" = set; then
23703   echo $ECHO_N "(cached) $ECHO_C" >&6
23704 else
23705
23706         if test "$cross_compiling" = yes; then
23707   cf_cv_fopen_bin_r=unknown
23708 else
23709   cat >"conftest.$ac_ext" <<_ACEOF
23710 #line 23710 "configure"
23711 #include "confdefs.h"
23712
23713 #include <stdio.h>
23714 int main(void) {
23715         FILE *fp = fopen("conftest.tmp", "wb");
23716         int rc = 0;
23717         if (fp != 0) {
23718                 int p, q;
23719                 for (p = 0; p < 256; ++p) {
23720                         fputc(p, fp);
23721                 }
23722                 fclose(fp);
23723                 fp = fopen("conftest.tmp", "rb");
23724                 if (fp != 0) {
23725                         for (p = 0; p < 256; ++p) {
23726                                 q = fgetc(fp);
23727                                 if (q != p) {
23728                                         rc = 1;
23729                                         break;
23730                                 }
23731                         }
23732                 } else {
23733                         rc = 1;
23734                 }
23735         } else {
23736                 rc = 1;
23737         }
23738         ${cf_cv_main_return:-return} (rc);
23739 }
23740
23741 _ACEOF
23742 rm -f "conftest$ac_exeext"
23743 if { (eval echo "$as_me:23743: \"$ac_link\"") >&5
23744   (eval $ac_link) 2>&5
23745   ac_status=$?
23746   echo "$as_me:23746: \$? = $ac_status" >&5
23747   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23748   { (eval echo "$as_me:23748: \"$ac_try\"") >&5
23749   (eval $ac_try) 2>&5
23750   ac_status=$?
23751   echo "$as_me:23751: \$? = $ac_status" >&5
23752   (exit "$ac_status"); }; }; then
23753   cf_cv_fopen_bin_r=yes
23754 else
23755   echo "$as_me: program exited with status $ac_status" >&5
23756 echo "$as_me: failed program was:" >&5
23757 cat "conftest.$ac_ext" >&5
23758 cf_cv_fopen_bin_r=no
23759 fi
23760 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23761 fi
23762
23763 fi
23764 echo "$as_me:23764: result: $cf_cv_fopen_bin_r" >&5
23765 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23766 test "x$cf_cv_fopen_bin_r" != xno &&
23767 cat >>confdefs.h <<\EOF
23768 #define USE_FOPEN_BIN_R 1
23769 EOF
23770
23771 # special check for test/ditto.c
23772
23773 echo "$as_me:23773: checking for openpty in -lutil" >&5
23774 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23775 if test "${ac_cv_lib_util_openpty+set}" = set; then
23776   echo $ECHO_N "(cached) $ECHO_C" >&6
23777 else
23778   ac_check_lib_save_LIBS=$LIBS
23779 LIBS="-lutil  $LIBS"
23780 cat >"conftest.$ac_ext" <<_ACEOF
23781 #line 23781 "configure"
23782 #include "confdefs.h"
23783
23784 /* Override any gcc2 internal prototype to avoid an error.  */
23785 #ifdef __cplusplus
23786 extern "C"
23787 #endif
23788 /* We use char because int might match the return type of a gcc2
23789    builtin and then its argument prototype would still apply.  */
23790 char openpty ();
23791 int
23792 main (void)
23793 {
23794 openpty ();
23795   ;
23796   return 0;
23797 }
23798 _ACEOF
23799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23800 if { (eval echo "$as_me:23800: \"$ac_link\"") >&5
23801   (eval $ac_link) 2>&5
23802   ac_status=$?
23803   echo "$as_me:23803: \$? = $ac_status" >&5
23804   (exit "$ac_status"); } &&
23805          { ac_try='test -s "conftest$ac_exeext"'
23806   { (eval echo "$as_me:23806: \"$ac_try\"") >&5
23807   (eval $ac_try) 2>&5
23808   ac_status=$?
23809   echo "$as_me:23809: \$? = $ac_status" >&5
23810   (exit "$ac_status"); }; }; then
23811   ac_cv_lib_util_openpty=yes
23812 else
23813   echo "$as_me: failed program was:" >&5
23814 cat "conftest.$ac_ext" >&5
23815 ac_cv_lib_util_openpty=no
23816 fi
23817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23818 LIBS=$ac_check_lib_save_LIBS
23819 fi
23820 echo "$as_me:23820: result: $ac_cv_lib_util_openpty" >&5
23821 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23822 if test "$ac_cv_lib_util_openpty" = yes; then
23823   cf_cv_lib_util=yes
23824 else
23825   cf_cv_lib_util=no
23826 fi
23827
23828 echo "$as_me:23828: checking for openpty header" >&5
23829 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23830 if test "${cf_cv_func_openpty+set}" = set; then
23831   echo $ECHO_N "(cached) $ECHO_C" >&6
23832 else
23833
23834         cf_save_LIBS="$LIBS"
23835         test "$cf_cv_lib_util" = yes && {
23836 cf_add_libs="$LIBS"
23837 # reverse order
23838 cf_add_0lib=
23839 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23840 # filter duplicates
23841 for cf_add_1lib in $cf_add_0lib; do
23842         for cf_add_2lib in $cf_add_libs; do
23843                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23844                         cf_add_1lib=
23845                         break
23846                 fi
23847         done
23848         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23849 done
23850 LIBS="$cf_add_libs"
23851  }
23852         for cf_header in pty.h libutil.h util.h
23853         do
23854         cat >"conftest.$ac_ext" <<_ACEOF
23855 #line 23855 "configure"
23856 #include "confdefs.h"
23857
23858 #include <$cf_header>
23859
23860 int
23861 main (void)
23862 {
23863
23864         int x = openpty((int *)0, (int *)0, (char *)0,
23865                                    (struct termios *)0, (struct winsize *)0);
23866
23867   ;
23868   return 0;
23869 }
23870 _ACEOF
23871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23872 if { (eval echo "$as_me:23872: \"$ac_link\"") >&5
23873   (eval $ac_link) 2>&5
23874   ac_status=$?
23875   echo "$as_me:23875: \$? = $ac_status" >&5
23876   (exit "$ac_status"); } &&
23877          { ac_try='test -s "conftest$ac_exeext"'
23878   { (eval echo "$as_me:23878: \"$ac_try\"") >&5
23879   (eval $ac_try) 2>&5
23880   ac_status=$?
23881   echo "$as_me:23881: \$? = $ac_status" >&5
23882   (exit "$ac_status"); }; }; then
23883
23884                 cf_cv_func_openpty=$cf_header
23885                 break
23886
23887 else
23888   echo "$as_me: failed program was:" >&5
23889 cat "conftest.$ac_ext" >&5
23890
23891                 cf_cv_func_openpty=no
23892
23893 fi
23894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23895         done
23896         LIBS="$cf_save_LIBS"
23897
23898 fi
23899 echo "$as_me:23899: result: $cf_cv_func_openpty" >&5
23900 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23901
23902 if test "$cf_cv_func_openpty" != no ; then
23903
23904 cat >>confdefs.h <<EOF
23905 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23906 EOF
23907
23908 cat >>confdefs.h <<\EOF
23909 #define USE_XTERM_PTY 1
23910 EOF
23911
23912         if test "x$cf_cv_lib_util" = xyes ; then
23913
23914 cf_add_libs="$TEST_LIBS"
23915 # reverse order
23916 cf_add_0lib=
23917 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23918 # filter duplicates
23919 for cf_add_1lib in $cf_add_0lib; do
23920         for cf_add_2lib in $cf_add_libs; do
23921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23922                         cf_add_1lib=
23923                         break
23924                 fi
23925         done
23926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23927 done
23928 TEST_LIBS="$cf_add_libs"
23929
23930         fi
23931 fi
23932
23933 if test "$with_hashed_db" != no ; then
23934
23935 cat >>confdefs.h <<\EOF
23936 #define USE_HASHED_DB 1
23937 EOF
23938
23939 case $with_hashed_db in
23940 (yes|*able*)
23941         ;;
23942 (*)
23943         if test -d "$with_hashed_db" ; then
23944
23945 if test -n "$with_hashed_db/include" ; then
23946   for cf_add_incdir in $with_hashed_db/include
23947   do
23948         while test "$cf_add_incdir" != /usr/include
23949         do
23950           if test -d "$cf_add_incdir"
23951           then
23952                 cf_have_incdir=no
23953                 if test -n "$CFLAGS$CPPFLAGS" ; then
23954                   # a loop is needed to ensure we can add subdirs of existing dirs
23955                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23956                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23957                           cf_have_incdir=yes; break
23958                         fi
23959                   done
23960                 fi
23961
23962                 if test "$cf_have_incdir" = no ; then
23963                   if test "$cf_add_incdir" = /usr/local/include ; then
23964                         if test "$GCC" = yes
23965                         then
23966                           cf_save_CPPFLAGS=$CPPFLAGS
23967
23968         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23969         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23970
23971                           cat >"conftest.$ac_ext" <<_ACEOF
23972 #line 23972 "configure"
23973 #include "confdefs.h"
23974 #include <stdio.h>
23975 int
23976 main (void)
23977 {
23978 printf("Hello")
23979   ;
23980   return 0;
23981 }
23982 _ACEOF
23983 rm -f "conftest.$ac_objext"
23984 if { (eval echo "$as_me:23984: \"$ac_compile\"") >&5
23985   (eval $ac_compile) 2>&5
23986   ac_status=$?
23987   echo "$as_me:23987: \$? = $ac_status" >&5
23988   (exit "$ac_status"); } &&
23989          { ac_try='test -s "conftest.$ac_objext"'
23990   { (eval echo "$as_me:23990: \"$ac_try\"") >&5
23991   (eval $ac_try) 2>&5
23992   ac_status=$?
23993   echo "$as_me:23993: \$? = $ac_status" >&5
23994   (exit "$ac_status"); }; }; then
23995   :
23996 else
23997   echo "$as_me: failed program was:" >&5
23998 cat "conftest.$ac_ext" >&5
23999 cf_have_incdir=yes
24000 fi
24001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24002                           CPPFLAGS=$cf_save_CPPFLAGS
24003                         fi
24004                   fi
24005                 fi
24006
24007                 if test "$cf_have_incdir" = no ; then
24008                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24009
24010 echo "${as_me:-configure}:24010: testing adding $cf_add_incdir to include-path ..." 1>&5
24011
24012                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24013
24014                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24015                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24016                   cf_add_incdir="$cf_top_incdir"
24017                 else
24018                   break
24019                 fi
24020           else
24021                 break
24022           fi
24023         done
24024   done
24025 fi
24026
24027 if test -n "$with_hashed_db/lib" ; then
24028         for cf_add_libdir in $with_hashed_db/lib
24029         do
24030                 if test "$cf_add_libdir" = /usr/lib ; then
24031                         :
24032                 elif test -d "$cf_add_libdir"
24033                 then
24034                         cf_have_libdir=no
24035                         if test -n "$LDFLAGS$LIBS" ; then
24036                                 # a loop is needed to ensure we can add subdirs of existing dirs
24037                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24038                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24039                                                 cf_have_libdir=yes; break
24040                                         fi
24041                                 done
24042                         fi
24043                         if test "$cf_have_libdir" = no ; then
24044                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24045
24046 echo "${as_me:-configure}:24046: testing adding $cf_add_libdir to library-path ..." 1>&5
24047
24048                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24049                         fi
24050                 fi
24051         done
24052 fi
24053
24054         else
24055                 case "$with_hashed_db" in
24056                 (./*|../*|/*)
24057                         { echo "$as_me:24057: WARNING: no such directory $with_hashed_db" >&5
24058 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24059                         ;;
24060                 (*)
24061
24062 cf_search=
24063
24064 test "x$prefix" != "xNONE" && \
24065 test -d "$prefix" && \
24066  {
24067         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24068         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24069         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24070         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24071         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24072         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24073 }
24074
24075 for cf_subdir_prefix in \
24076         /usr \
24077         /usr/local \
24078         /usr/pkg \
24079         /opt \
24080         /opt/local \
24081         $HOME
24082 do
24083
24084 test "x$cf_subdir_prefix" != "x$prefix" && \
24085 test -d "$cf_subdir_prefix" && \
24086 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24087         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24088         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24089         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24090         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24091         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24092         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"
24093 }
24094
24095 done
24096
24097         for cf_item in $cf_search
24098         do
24099                 case "$cf_item" in
24100                 (*/$with_hashed_db)
24101
24102 if test -n "$cf_item" ; then
24103   for cf_add_incdir in $cf_item
24104   do
24105         while test "$cf_add_incdir" != /usr/include
24106         do
24107           if test -d "$cf_add_incdir"
24108           then
24109                 cf_have_incdir=no
24110                 if test -n "$CFLAGS$CPPFLAGS" ; then
24111                   # a loop is needed to ensure we can add subdirs of existing dirs
24112                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24113                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24114                           cf_have_incdir=yes; break
24115                         fi
24116                   done
24117                 fi
24118
24119                 if test "$cf_have_incdir" = no ; then
24120                   if test "$cf_add_incdir" = /usr/local/include ; then
24121                         if test "$GCC" = yes
24122                         then
24123                           cf_save_CPPFLAGS=$CPPFLAGS
24124
24125         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24126         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24127
24128                           cat >"conftest.$ac_ext" <<_ACEOF
24129 #line 24129 "configure"
24130 #include "confdefs.h"
24131 #include <stdio.h>
24132 int
24133 main (void)
24134 {
24135 printf("Hello")
24136   ;
24137   return 0;
24138 }
24139 _ACEOF
24140 rm -f "conftest.$ac_objext"
24141 if { (eval echo "$as_me:24141: \"$ac_compile\"") >&5
24142   (eval $ac_compile) 2>&5
24143   ac_status=$?
24144   echo "$as_me:24144: \$? = $ac_status" >&5
24145   (exit "$ac_status"); } &&
24146          { ac_try='test -s "conftest.$ac_objext"'
24147   { (eval echo "$as_me:24147: \"$ac_try\"") >&5
24148   (eval $ac_try) 2>&5
24149   ac_status=$?
24150   echo "$as_me:24150: \$? = $ac_status" >&5
24151   (exit "$ac_status"); }; }; then
24152   :
24153 else
24154   echo "$as_me: failed program was:" >&5
24155 cat "conftest.$ac_ext" >&5
24156 cf_have_incdir=yes
24157 fi
24158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24159                           CPPFLAGS=$cf_save_CPPFLAGS
24160                         fi
24161                   fi
24162                 fi
24163
24164                 if test "$cf_have_incdir" = no ; then
24165                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24166
24167 echo "${as_me:-configure}:24167: testing adding $cf_add_incdir to include-path ..." 1>&5
24168
24169                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24170
24171                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24172                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24173                   cf_add_incdir="$cf_top_incdir"
24174                 else
24175                   break
24176                 fi
24177           else
24178                 break
24179           fi
24180         done
24181   done
24182 fi
24183
24184                         ;;
24185                 esac
24186         done
24187
24188 cf_search=
24189
24190 test "x$prefix" != "xNONE" && \
24191 test -d "$prefix" && \
24192  {
24193         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24194         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24195         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24196         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24197         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24198         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24199 }
24200
24201 for cf_subdir_prefix in \
24202         /usr \
24203         /usr/local \
24204         /usr/pkg \
24205         /opt \
24206         /opt/local \
24207         $HOME
24208 do
24209
24210 test "x$cf_subdir_prefix" != "x$prefix" && \
24211 test -d "$cf_subdir_prefix" && \
24212 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24213         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24214         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24215         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24216         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24217         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24218         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"
24219 }
24220
24221 done
24222
24223         for cf_item in $cf_search
24224         do
24225                 case "$cf_item" in
24226                 (*/$with_hashed_db)
24227
24228 if test -n "$cf_item" ; then
24229         for cf_add_libdir in $cf_item
24230         do
24231                 if test "$cf_add_libdir" = /usr/lib ; then
24232                         :
24233                 elif test -d "$cf_add_libdir"
24234                 then
24235                         cf_have_libdir=no
24236                         if test -n "$LDFLAGS$LIBS" ; then
24237                                 # a loop is needed to ensure we can add subdirs of existing dirs
24238                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24239                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24240                                                 cf_have_libdir=yes; break
24241                                         fi
24242                                 done
24243                         fi
24244                         if test "$cf_have_libdir" = no ; then
24245                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24246
24247 echo "${as_me:-configure}:24247: testing adding $cf_add_libdir to library-path ..." 1>&5
24248
24249                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24250                         fi
24251                 fi
24252         done
24253 fi
24254
24255                         ;;
24256                 esac
24257         done
24258
24259                         ;;
24260                 esac
24261         fi
24262 esac
24263
24264 echo "$as_me:24264: checking for db.h" >&5
24265 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24266 if test "${ac_cv_header_db_h+set}" = set; then
24267   echo $ECHO_N "(cached) $ECHO_C" >&6
24268 else
24269   cat >"conftest.$ac_ext" <<_ACEOF
24270 #line 24270 "configure"
24271 #include "confdefs.h"
24272 #include <db.h>
24273 _ACEOF
24274 if { (eval echo "$as_me:24274: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24275   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24276   ac_status=$?
24277   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24278   rm -f conftest.er1
24279   cat conftest.err >&5
24280   echo "$as_me:24280: \$? = $ac_status" >&5
24281   (exit "$ac_status"); } >/dev/null; then
24282   if test -s conftest.err; then
24283     ac_cpp_err=$ac_c_preproc_warn_flag
24284   else
24285     ac_cpp_err=
24286   fi
24287 else
24288   ac_cpp_err=yes
24289 fi
24290 if test -z "$ac_cpp_err"; then
24291   ac_cv_header_db_h=yes
24292 else
24293   echo "$as_me: failed program was:" >&5
24294   cat "conftest.$ac_ext" >&5
24295   ac_cv_header_db_h=no
24296 fi
24297 rm -f conftest.err "conftest.$ac_ext"
24298 fi
24299 echo "$as_me:24299: result: $ac_cv_header_db_h" >&5
24300 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24301 if test "$ac_cv_header_db_h" = yes; then
24302
24303 echo "$as_me:24303: checking for version of db" >&5
24304 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24305 if test "${cf_cv_hashed_db_version+set}" = set; then
24306   echo $ECHO_N "(cached) $ECHO_C" >&6
24307 else
24308
24309 cf_cv_hashed_db_version=unknown
24310
24311 for cf_db_version in 1 2 3 4 5 6
24312 do
24313
24314 echo "${as_me:-configure}:24314: testing checking for db version $cf_db_version ..." 1>&5
24315
24316         cat >"conftest.$ac_ext" <<_ACEOF
24317 #line 24317 "configure"
24318 #include "confdefs.h"
24319
24320 $ac_includes_default
24321 #include <db.h>
24322
24323 #ifdef DB_VERSION_MAJOR
24324         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24325 #if $cf_db_version == DB_VERSION_MAJOR
24326         /* ok */
24327 #else
24328         make an error
24329 #endif
24330 #else
24331 #if $cf_db_version == 1
24332         /* ok: assuming this is DB 1.8.5 */
24333 #else
24334         make an error
24335 #endif
24336 #endif
24337
24338 int
24339 main (void)
24340 {
24341 DBT *foo = 0
24342   ;
24343   return 0;
24344 }
24345 _ACEOF
24346 rm -f "conftest.$ac_objext"
24347 if { (eval echo "$as_me:24347: \"$ac_compile\"") >&5
24348   (eval $ac_compile) 2>&5
24349   ac_status=$?
24350   echo "$as_me:24350: \$? = $ac_status" >&5
24351   (exit "$ac_status"); } &&
24352          { ac_try='test -s "conftest.$ac_objext"'
24353   { (eval echo "$as_me:24353: \"$ac_try\"") >&5
24354   (eval $ac_try) 2>&5
24355   ac_status=$?
24356   echo "$as_me:24356: \$? = $ac_status" >&5
24357   (exit "$ac_status"); }; }; then
24358
24359         cf_cv_hashed_db_version=$cf_db_version
24360         break
24361
24362 else
24363   echo "$as_me: failed program was:" >&5
24364 cat "conftest.$ac_ext" >&5
24365 fi
24366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24367 done
24368
24369 fi
24370 echo "$as_me:24370: result: $cf_cv_hashed_db_version" >&5
24371 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24372
24373 if test "$cf_cv_hashed_db_version" = unknown ; then
24374         { { echo "$as_me:24374: error: Cannot determine version of db" >&5
24375 echo "$as_me: error: Cannot determine version of db" >&2;}
24376    { (exit 1); exit 1; }; }
24377 else
24378
24379 echo "$as_me:24379: checking for db libraries" >&5
24380 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24381 if test "${cf_cv_hashed_db_libs+set}" = set; then
24382   echo $ECHO_N "(cached) $ECHO_C" >&6
24383 else
24384
24385 cf_cv_hashed_db_libs=unknown
24386 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24387 do
24388         cf_save_libs="$LIBS"
24389         if test -n "$cf_db_libs"; then
24390
24391 cf_add_libs="$LIBS"
24392 # reverse order
24393 cf_add_0lib=
24394 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24395 # filter duplicates
24396 for cf_add_1lib in $cf_add_0lib; do
24397         for cf_add_2lib in $cf_add_libs; do
24398                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24399                         cf_add_1lib=
24400                         break
24401                 fi
24402         done
24403         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24404 done
24405 LIBS="$cf_add_libs"
24406
24407         fi
24408
24409 echo "${as_me:-configure}:24409: testing checking for library $cf_db_libs ..." 1>&5
24410
24411         cat >"conftest.$ac_ext" <<_ACEOF
24412 #line 24412 "configure"
24413 #include "confdefs.h"
24414
24415 $ac_includes_default
24416 #include <db.h>
24417
24418 int
24419 main (void)
24420 {
24421
24422         char *path = "/tmp/foo";
24423 #ifdef DB_VERSION_MAJOR
24424 #if DB_VERSION_MAJOR >= 4
24425         DB *result = 0;
24426         db_create(&result, NULL, 0);
24427         result->open(result,
24428                 NULL,
24429                 path,
24430                 path,
24431                 DB_HASH,
24432                 DB_CREATE,
24433                 0644);
24434 #elif DB_VERSION_MAJOR >= 3
24435         DB *result = 0;
24436         db_create(&result, NULL, 0);
24437         result->open(result,
24438                 path,
24439                 path,
24440                 DB_HASH,
24441                 DB_CREATE,
24442                 0644);
24443 #elif DB_VERSION_MAJOR >= 2
24444         DB *result = 0;
24445         db_open(path,
24446                 DB_HASH,
24447                 DB_CREATE,
24448                 0644,
24449                 (DB_ENV *) 0,
24450                 (DB_INFO *) 0,
24451                 &result);
24452 #endif /* DB_VERSION_MAJOR */
24453 #else
24454         DB *result = dbopen(path,
24455                      2,
24456                      0644,
24457                      DB_HASH,
24458                      0);
24459 #endif
24460         ${cf_cv_main_return:-return}(result != 0)
24461
24462   ;
24463   return 0;
24464 }
24465 _ACEOF
24466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24467 if { (eval echo "$as_me:24467: \"$ac_link\"") >&5
24468   (eval $ac_link) 2>&5
24469   ac_status=$?
24470   echo "$as_me:24470: \$? = $ac_status" >&5
24471   (exit "$ac_status"); } &&
24472          { ac_try='test -s "conftest$ac_exeext"'
24473   { (eval echo "$as_me:24473: \"$ac_try\"") >&5
24474   (eval $ac_try) 2>&5
24475   ac_status=$?
24476   echo "$as_me:24476: \$? = $ac_status" >&5
24477   (exit "$ac_status"); }; }; then
24478
24479         if test -n "$cf_db_libs" ; then
24480                 cf_cv_hashed_db_libs=$cf_db_libs
24481         else
24482                 cf_cv_hashed_db_libs=default
24483         fi
24484         LIBS="$cf_save_libs"
24485         break
24486
24487 else
24488   echo "$as_me: failed program was:" >&5
24489 cat "conftest.$ac_ext" >&5
24490 fi
24491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24492         LIBS="$cf_save_libs"
24493 done
24494
24495 fi
24496 echo "$as_me:24496: result: $cf_cv_hashed_db_libs" >&5
24497 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24498
24499         if test "$cf_cv_hashed_db_libs" = unknown ; then
24500                 { { echo "$as_me:24500: error: Cannot determine library for db" >&5
24501 echo "$as_me: error: Cannot determine library for db" >&2;}
24502    { (exit 1); exit 1; }; }
24503         elif test "$cf_cv_hashed_db_libs" != default ; then
24504
24505 cf_add_libs="$LIBS"
24506 # reverse order
24507 cf_add_0lib=
24508 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24509 # filter duplicates
24510 for cf_add_1lib in $cf_add_0lib; do
24511         for cf_add_2lib in $cf_add_libs; do
24512                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24513                         cf_add_1lib=
24514                         break
24515                 fi
24516         done
24517         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24518 done
24519 LIBS="$cf_add_libs"
24520
24521         fi
24522 fi
24523
24524 else
24525
24526         { { echo "$as_me:24526: error: Cannot find db.h" >&5
24527 echo "$as_me: error: Cannot find db.h" >&2;}
24528    { (exit 1); exit 1; }; }
24529
24530 fi
24531
24532 fi
24533
24534 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24535         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24536         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24537 fi
24538
24539 # Just in case, check if the C compiler has a bool type.
24540
24541 echo "$as_me:24541: checking if we should include stdbool.h" >&5
24542 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24543
24544 if test "${cf_cv_header_stdbool_h+set}" = set; then
24545   echo $ECHO_N "(cached) $ECHO_C" >&6
24546 else
24547
24548         cat >"conftest.$ac_ext" <<_ACEOF
24549 #line 24549 "configure"
24550 #include "confdefs.h"
24551
24552 int
24553 main (void)
24554 {
24555 bool foo = false
24556   ;
24557   return 0;
24558 }
24559 _ACEOF
24560 rm -f "conftest.$ac_objext"
24561 if { (eval echo "$as_me:24561: \"$ac_compile\"") >&5
24562   (eval $ac_compile) 2>&5
24563   ac_status=$?
24564   echo "$as_me:24564: \$? = $ac_status" >&5
24565   (exit "$ac_status"); } &&
24566          { ac_try='test -s "conftest.$ac_objext"'
24567   { (eval echo "$as_me:24567: \"$ac_try\"") >&5
24568   (eval $ac_try) 2>&5
24569   ac_status=$?
24570   echo "$as_me:24570: \$? = $ac_status" >&5
24571   (exit "$ac_status"); }; }; then
24572   cf_cv_header_stdbool_h=0
24573 else
24574   echo "$as_me: failed program was:" >&5
24575 cat "conftest.$ac_ext" >&5
24576 cat >"conftest.$ac_ext" <<_ACEOF
24577 #line 24577 "configure"
24578 #include "confdefs.h"
24579
24580 #ifndef __BEOS__
24581 #include <stdbool.h>
24582 #endif
24583
24584 int
24585 main (void)
24586 {
24587 bool foo = false
24588   ;
24589   return 0;
24590 }
24591 _ACEOF
24592 rm -f "conftest.$ac_objext"
24593 if { (eval echo "$as_me:24593: \"$ac_compile\"") >&5
24594   (eval $ac_compile) 2>&5
24595   ac_status=$?
24596   echo "$as_me:24596: \$? = $ac_status" >&5
24597   (exit "$ac_status"); } &&
24598          { ac_try='test -s "conftest.$ac_objext"'
24599   { (eval echo "$as_me:24599: \"$ac_try\"") >&5
24600   (eval $ac_try) 2>&5
24601   ac_status=$?
24602   echo "$as_me:24602: \$? = $ac_status" >&5
24603   (exit "$ac_status"); }; }; then
24604   cf_cv_header_stdbool_h=1
24605 else
24606   echo "$as_me: failed program was:" >&5
24607 cat "conftest.$ac_ext" >&5
24608 cf_cv_header_stdbool_h=0
24609 fi
24610 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24611 fi
24612 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24613 fi
24614
24615 if test "$cf_cv_header_stdbool_h" = 1
24616 then    echo "$as_me:24616: result: yes" >&5
24617 echo "${ECHO_T}yes" >&6
24618 else    echo "$as_me:24618: result: no" >&5
24619 echo "${ECHO_T}no" >&6
24620 fi
24621
24622 echo "$as_me:24622: checking for builtin bool type" >&5
24623 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24624
24625 if test "${cf_cv_cc_bool_type+set}" = set; then
24626   echo $ECHO_N "(cached) $ECHO_C" >&6
24627 else
24628
24629         cat >"conftest.$ac_ext" <<_ACEOF
24630 #line 24630 "configure"
24631 #include "confdefs.h"
24632
24633 #include <stdio.h>
24634 #include <sys/types.h>
24635
24636 int
24637 main (void)
24638 {
24639 bool x = false
24640   ;
24641   return 0;
24642 }
24643 _ACEOF
24644 rm -f "conftest.$ac_objext"
24645 if { (eval echo "$as_me:24645: \"$ac_compile\"") >&5
24646   (eval $ac_compile) 2>&5
24647   ac_status=$?
24648   echo "$as_me:24648: \$? = $ac_status" >&5
24649   (exit "$ac_status"); } &&
24650          { ac_try='test -s "conftest.$ac_objext"'
24651   { (eval echo "$as_me:24651: \"$ac_try\"") >&5
24652   (eval $ac_try) 2>&5
24653   ac_status=$?
24654   echo "$as_me:24654: \$? = $ac_status" >&5
24655   (exit "$ac_status"); }; }; then
24656   cf_cv_cc_bool_type=1
24657 else
24658   echo "$as_me: failed program was:" >&5
24659 cat "conftest.$ac_ext" >&5
24660 cf_cv_cc_bool_type=0
24661 fi
24662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24663
24664 fi
24665
24666 if test "$cf_cv_cc_bool_type" = 1
24667 then    echo "$as_me:24667: result: yes" >&5
24668 echo "${ECHO_T}yes" >&6
24669 else    echo "$as_me:24669: result: no" >&5
24670 echo "${ECHO_T}no" >&6
24671 fi
24672
24673 # Check for C++ compiler characteristics (and ensure that it's there!)
24674 if test -n "$CXX" ; then
24675         ac_ext=cc
24676 ac_cpp='$CXXCPP $CPPFLAGS'
24677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24678 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24680 ac_main_return="return"
24681
24682 if test -n "$GXX" ; then
24683
24684         cf_save="$LIBS"
24685         LIBS="$LIBS $CXXLIBS"
24686         echo "$as_me:24686: checking if we already have C++ library" >&5
24687 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24688         cat >"conftest.$ac_ext" <<_ACEOF
24689 #line 24689 "configure"
24690 #include "confdefs.h"
24691
24692                         #include <iostream>
24693 int
24694 main (void)
24695 {
24696
24697                         std::cout << "Hello World!" << std::endl;
24698   ;
24699   return 0;
24700 }
24701 _ACEOF
24702 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24703 if { (eval echo "$as_me:24703: \"$ac_link\"") >&5
24704   (eval $ac_link) 2>&5
24705   ac_status=$?
24706   echo "$as_me:24706: \$? = $ac_status" >&5
24707   (exit "$ac_status"); } &&
24708          { ac_try='test -s "conftest$ac_exeext"'
24709   { (eval echo "$as_me:24709: \"$ac_try\"") >&5
24710   (eval $ac_try) 2>&5
24711   ac_status=$?
24712   echo "$as_me:24712: \$? = $ac_status" >&5
24713   (exit "$ac_status"); }; }; then
24714   cf_have_libstdcpp=yes
24715 else
24716   echo "$as_me: failed program was:" >&5
24717 cat "conftest.$ac_ext" >&5
24718 cf_have_libstdcpp=no
24719 fi
24720 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24721         echo "$as_me:24721: result: $cf_have_libstdcpp" >&5
24722 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24723         LIBS="$cf_save"
24724
24725         if test "$cf_have_libstdcpp" != yes
24726         then
24727                 case "$cf_cv_system_name" in
24728                 (os2*)
24729                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24730                                 cf_stdcpp_libname=stdcpp
24731                         else
24732                                 cf_stdcpp_libname=stdc++
24733                         fi
24734                         ;;
24735                 (*)
24736                         cf_stdcpp_libname=stdc++
24737                         ;;
24738                 esac
24739
24740                 echo "$as_me:24740: checking for library $cf_stdcpp_libname" >&5
24741 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24742 if test "${cf_cv_libstdcpp+set}" = set; then
24743   echo $ECHO_N "(cached) $ECHO_C" >&6
24744 else
24745
24746                         cf_save="$LIBS"
24747                         LIBS="$LIBS $CXXLIBS"
24748
24749 cf_add_libs="$LIBS"
24750 # reverse order
24751 cf_add_0lib=
24752 for cf_add_1lib in -l$cf_stdcpp_libname; 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                 cat >"conftest.$ac_ext" <<_ACEOF
24766 #line 24766 "configure"
24767 #include "confdefs.h"
24768
24769                                 #include <iostream>
24770 int
24771 main (void)
24772 {
24773
24774                                 std::cout << "Hello World!" << std::endl;
24775   ;
24776   return 0;
24777 }
24778 _ACEOF
24779 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24780 if { (eval echo "$as_me:24780: \"$ac_link\"") >&5
24781   (eval $ac_link) 2>&5
24782   ac_status=$?
24783   echo "$as_me:24783: \$? = $ac_status" >&5
24784   (exit "$ac_status"); } &&
24785          { ac_try='test -s "conftest$ac_exeext"'
24786   { (eval echo "$as_me:24786: \"$ac_try\"") >&5
24787   (eval $ac_try) 2>&5
24788   ac_status=$?
24789   echo "$as_me:24789: \$? = $ac_status" >&5
24790   (exit "$ac_status"); }; }; then
24791   cf_cv_libstdcpp=yes
24792 else
24793   echo "$as_me: failed program was:" >&5
24794 cat "conftest.$ac_ext" >&5
24795 cf_cv_libstdcpp=no
24796 fi
24797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24798                         LIBS="$cf_save"
24799
24800 fi
24801 echo "$as_me:24801: result: $cf_cv_libstdcpp" >&5
24802 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24803                 test "$cf_cv_libstdcpp" = yes && {
24804 cf_add_libs="$CXXLIBS"
24805 # reverse order
24806 cf_add_0lib=
24807 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24808 # filter duplicates
24809 for cf_add_1lib in $cf_add_0lib; do
24810         for cf_add_2lib in $cf_add_libs; do
24811                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24812                         cf_add_1lib=
24813                         break
24814                 fi
24815         done
24816         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24817 done
24818 CXXLIBS="$cf_add_libs"
24819  }
24820         fi
24821 fi
24822
24823         echo "$as_me:24823: checking whether $CXX understands -c and -o together" >&5
24824 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24825 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24826   echo $ECHO_N "(cached) $ECHO_C" >&6
24827 else
24828
24829 cat > conftest.$ac_ext <<CF_EOF
24830 int main(void)
24831 {
24832         ${cf_cv_main_return:-return}(0);
24833 }
24834 CF_EOF
24835 # We do the test twice because some compilers refuse to overwrite an
24836 # existing .o file with -o, though they will create one.
24837 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24838 if { (eval echo "$as_me:24838: \"$ac_try\"") >&5
24839   (eval $ac_try) 2>&5
24840   ac_status=$?
24841   echo "$as_me:24841: \$? = $ac_status" >&5
24842   (exit "$ac_status"); } &&
24843   test -f conftest2.$ac_objext && { (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"); };
24848 then
24849   eval cf_cv_prog_CXX_c_o=yes
24850 else
24851   eval cf_cv_prog_CXX_c_o=no
24852 fi
24853 rm -rf ./conftest*
24854
24855 fi
24856 if test "$cf_cv_prog_CXX_c_o" = yes; then
24857   echo "$as_me:24857: result: yes" >&5
24858 echo "${ECHO_T}yes" >&6
24859 else
24860   echo "$as_me:24860: result: no" >&5
24861 echo "${ECHO_T}no" >&6
24862 fi
24863
24864         case "$GXX_VERSION" in
24865         (1.*|2.[0-6]*|[1-9][0-9].*)
24866                 cf_cxx_library=yes
24867                 ;;
24868         (*-2.7*|2.7*)
24869
24870 cf_cxx_library=unknown
24871 case "$cf_cv_system_name" in
24872 (os2*)
24873         cf_gpp_libname=gpp
24874         ;;
24875 (*)
24876         cf_gpp_libname=g++
24877         ;;
24878 esac
24879 if test "$GXX" = yes; then
24880         echo "$as_me:24880: checking for lib$cf_gpp_libname" >&5
24881 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24882         cf_save="$LIBS"
24883
24884 cf_add_libs="$LIBS"
24885 # reverse order
24886 cf_add_0lib=
24887 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24888 # filter duplicates
24889 for cf_add_1lib in $cf_add_0lib; do
24890         for cf_add_2lib in $cf_add_libs; do
24891                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24892                         cf_add_1lib=
24893                         break
24894                 fi
24895         done
24896         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24897 done
24898 LIBS="$cf_add_libs"
24899
24900         cat >"conftest.$ac_ext" <<_ACEOF
24901 #line 24901 "configure"
24902 #include "confdefs.h"
24903
24904 #include <$cf_gpp_libname/builtin.h>
24905
24906 int
24907 main (void)
24908 {
24909 two_arg_error_handler_t foo2 = lib_error_handler
24910   ;
24911   return 0;
24912 }
24913 _ACEOF
24914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24915 if { (eval echo "$as_me:24915: \"$ac_link\"") >&5
24916   (eval $ac_link) 2>&5
24917   ac_status=$?
24918   echo "$as_me:24918: \$? = $ac_status" >&5
24919   (exit "$ac_status"); } &&
24920          { ac_try='test -s "conftest$ac_exeext"'
24921   { (eval echo "$as_me:24921: \"$ac_try\"") >&5
24922   (eval $ac_try) 2>&5
24923   ac_status=$?
24924   echo "$as_me:24924: \$? = $ac_status" >&5
24925   (exit "$ac_status"); }; }; then
24926   cf_cxx_library=yes
24927
24928 cf_add_libs="$CXXLIBS"
24929 # reverse order
24930 cf_add_0lib=
24931 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24932 # filter duplicates
24933 for cf_add_1lib in $cf_add_0lib; do
24934         for cf_add_2lib in $cf_add_libs; do
24935                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24936                         cf_add_1lib=
24937                         break
24938                 fi
24939         done
24940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24941 done
24942 CXXLIBS="$cf_add_libs"
24943
24944          if test "$cf_gpp_libname" = cpp ; then
24945
24946 cat >>confdefs.h <<\EOF
24947 #define HAVE_GPP_BUILTIN_H 1
24948 EOF
24949
24950          else
24951
24952 cat >>confdefs.h <<\EOF
24953 #define HAVE_GXX_BUILTIN_H 1
24954 EOF
24955
24956          fi
24957 else
24958   echo "$as_me: failed program was:" >&5
24959 cat "conftest.$ac_ext" >&5
24960 cat >"conftest.$ac_ext" <<_ACEOF
24961 #line 24961 "configure"
24962 #include "confdefs.h"
24963
24964 #include <builtin.h>
24965
24966 int
24967 main (void)
24968 {
24969 two_arg_error_handler_t foo2 = lib_error_handler
24970   ;
24971   return 0;
24972 }
24973 _ACEOF
24974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24975 if { (eval echo "$as_me:24975: \"$ac_link\"") >&5
24976   (eval $ac_link) 2>&5
24977   ac_status=$?
24978   echo "$as_me:24978: \$? = $ac_status" >&5
24979   (exit "$ac_status"); } &&
24980          { ac_try='test -s "conftest$ac_exeext"'
24981   { (eval echo "$as_me:24981: \"$ac_try\"") >&5
24982   (eval $ac_try) 2>&5
24983   ac_status=$?
24984   echo "$as_me:24984: \$? = $ac_status" >&5
24985   (exit "$ac_status"); }; }; then
24986   cf_cxx_library=yes
24987
24988 cf_add_libs="$CXXLIBS"
24989 # reverse order
24990 cf_add_0lib=
24991 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24992 # filter duplicates
24993 for cf_add_1lib in $cf_add_0lib; do
24994         for cf_add_2lib in $cf_add_libs; do
24995                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24996                         cf_add_1lib=
24997                         break
24998                 fi
24999         done
25000         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25001 done
25002 CXXLIBS="$cf_add_libs"
25003
25004 cat >>confdefs.h <<\EOF
25005 #define HAVE_BUILTIN_H 1
25006 EOF
25007
25008 else
25009   echo "$as_me: failed program was:" >&5
25010 cat "conftest.$ac_ext" >&5
25011 cf_cxx_library=no
25012 fi
25013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25014 fi
25015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25016         LIBS="$cf_save"
25017         echo "$as_me:25017: result: $cf_cxx_library" >&5
25018 echo "${ECHO_T}$cf_cxx_library" >&6
25019 fi
25020
25021                 ;;
25022         (*)
25023                 cf_cxx_library=no
25024                 ;;
25025         esac
25026
25027         ac_ext=cc
25028 ac_cpp='$CXXCPP $CPPFLAGS'
25029 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25030 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25031 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25032 ac_main_return="return"
25033 echo "$as_me:25033: checking how to run the C++ preprocessor" >&5
25034 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25035 if test -z "$CXXCPP"; then
25036   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25037   echo $ECHO_N "(cached) $ECHO_C" >&6
25038 else
25039       # Double quotes because CXXCPP needs to be expanded
25040     for CXXCPP in "$CXX -E" "/lib/cpp"
25041     do
25042       ac_preproc_ok=false
25043 for ac_cxx_preproc_warn_flag in '' yes
25044 do
25045   # Use a header file that comes with gcc, so configuring glibc
25046   # with a fresh cross-compiler works.
25047   # On the NeXT, cc -E runs the code through the compiler's parser,
25048   # not just through cpp. "Syntax error" is here to catch this case.
25049   cat >"conftest.$ac_ext" <<_ACEOF
25050 #line 25050 "configure"
25051 #include "confdefs.h"
25052 #include <assert.h>
25053                      Syntax error
25054 _ACEOF
25055 if { (eval echo "$as_me:25055: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25056   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25057   ac_status=$?
25058   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25059   rm -f conftest.er1
25060   cat conftest.err >&5
25061   echo "$as_me:25061: \$? = $ac_status" >&5
25062   (exit "$ac_status"); } >/dev/null; then
25063   if test -s conftest.err; then
25064     ac_cpp_err=$ac_cxx_preproc_warn_flag
25065   else
25066     ac_cpp_err=
25067   fi
25068 else
25069   ac_cpp_err=yes
25070 fi
25071 if test -z "$ac_cpp_err"; then
25072   :
25073 else
25074   echo "$as_me: failed program was:" >&5
25075   cat "conftest.$ac_ext" >&5
25076   # Broken: fails on valid input.
25077 continue
25078 fi
25079 rm -f conftest.err "conftest.$ac_ext"
25080
25081   # OK, works on sane cases.  Now check whether non-existent headers
25082   # can be detected and how.
25083   cat >"conftest.$ac_ext" <<_ACEOF
25084 #line 25084 "configure"
25085 #include "confdefs.h"
25086 #include <ac_nonexistent.h>
25087 _ACEOF
25088 if { (eval echo "$as_me:25088: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25089   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25090   ac_status=$?
25091   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25092   rm -f conftest.er1
25093   cat conftest.err >&5
25094   echo "$as_me:25094: \$? = $ac_status" >&5
25095   (exit "$ac_status"); } >/dev/null; then
25096   if test -s conftest.err; then
25097     ac_cpp_err=$ac_cxx_preproc_warn_flag
25098   else
25099     ac_cpp_err=
25100   fi
25101 else
25102   ac_cpp_err=yes
25103 fi
25104 if test -z "$ac_cpp_err"; then
25105   # Broken: success on invalid input.
25106 continue
25107 else
25108   echo "$as_me: failed program was:" >&5
25109   cat "conftest.$ac_ext" >&5
25110   # Passes both tests.
25111 ac_preproc_ok=:
25112 break
25113 fi
25114 rm -f conftest.err "conftest.$ac_ext"
25115
25116 done
25117 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25118 rm -f conftest.err "conftest.$ac_ext"
25119 if $ac_preproc_ok; then
25120   break
25121 fi
25122
25123     done
25124     ac_cv_prog_CXXCPP=$CXXCPP
25125
25126 fi
25127   CXXCPP=$ac_cv_prog_CXXCPP
25128 else
25129   ac_cv_prog_CXXCPP=$CXXCPP
25130 fi
25131 echo "$as_me:25131: result: $CXXCPP" >&5
25132 echo "${ECHO_T}$CXXCPP" >&6
25133 ac_preproc_ok=false
25134 for ac_cxx_preproc_warn_flag in '' yes
25135 do
25136   # Use a header file that comes with gcc, so configuring glibc
25137   # with a fresh cross-compiler works.
25138   # On the NeXT, cc -E runs the code through the compiler's parser,
25139   # not just through cpp. "Syntax error" is here to catch this case.
25140   cat >"conftest.$ac_ext" <<_ACEOF
25141 #line 25141 "configure"
25142 #include "confdefs.h"
25143 #include <assert.h>
25144                      Syntax error
25145 _ACEOF
25146 if { (eval echo "$as_me:25146: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25147   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25148   ac_status=$?
25149   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25150   rm -f conftest.er1
25151   cat conftest.err >&5
25152   echo "$as_me:25152: \$? = $ac_status" >&5
25153   (exit "$ac_status"); } >/dev/null; then
25154   if test -s conftest.err; then
25155     ac_cpp_err=$ac_cxx_preproc_warn_flag
25156   else
25157     ac_cpp_err=
25158   fi
25159 else
25160   ac_cpp_err=yes
25161 fi
25162 if test -z "$ac_cpp_err"; then
25163   :
25164 else
25165   echo "$as_me: failed program was:" >&5
25166   cat "conftest.$ac_ext" >&5
25167   # Broken: fails on valid input.
25168 continue
25169 fi
25170 rm -f conftest.err "conftest.$ac_ext"
25171
25172   # OK, works on sane cases.  Now check whether non-existent headers
25173   # can be detected and how.
25174   cat >"conftest.$ac_ext" <<_ACEOF
25175 #line 25175 "configure"
25176 #include "confdefs.h"
25177 #include <ac_nonexistent.h>
25178 _ACEOF
25179 if { (eval echo "$as_me:25179: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25180   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25181   ac_status=$?
25182   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25183   rm -f conftest.er1
25184   cat conftest.err >&5
25185   echo "$as_me:25185: \$? = $ac_status" >&5
25186   (exit "$ac_status"); } >/dev/null; then
25187   if test -s conftest.err; then
25188     ac_cpp_err=$ac_cxx_preproc_warn_flag
25189   else
25190     ac_cpp_err=
25191   fi
25192 else
25193   ac_cpp_err=yes
25194 fi
25195 if test -z "$ac_cpp_err"; then
25196   # Broken: success on invalid input.
25197 continue
25198 else
25199   echo "$as_me: failed program was:" >&5
25200   cat "conftest.$ac_ext" >&5
25201   # Passes both tests.
25202 ac_preproc_ok=:
25203 break
25204 fi
25205 rm -f conftest.err "conftest.$ac_ext"
25206
25207 done
25208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25209 rm -f conftest.err "conftest.$ac_ext"
25210 if $ac_preproc_ok; then
25211   :
25212 else
25213   { { echo "$as_me:25213: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25214 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25215    { (exit 1); exit 1; }; }
25216 fi
25217
25218 ac_ext=cc
25219 ac_cpp='$CXXCPP $CPPFLAGS'
25220 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25221 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25222 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25223 ac_main_return="return"
25224
25225 for ac_header in typeinfo
25226 do
25227 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25228 echo "$as_me:25228: checking for $ac_header" >&5
25229 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25230 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25231   echo $ECHO_N "(cached) $ECHO_C" >&6
25232 else
25233   cat >"conftest.$ac_ext" <<_ACEOF
25234 #line 25234 "configure"
25235 #include "confdefs.h"
25236 #include <$ac_header>
25237 _ACEOF
25238 if { (eval echo "$as_me:25238: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25239   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25240   ac_status=$?
25241   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25242   rm -f conftest.er1
25243   cat conftest.err >&5
25244   echo "$as_me:25244: \$? = $ac_status" >&5
25245   (exit "$ac_status"); } >/dev/null; then
25246   if test -s conftest.err; then
25247     ac_cpp_err=$ac_cxx_preproc_warn_flag
25248   else
25249     ac_cpp_err=
25250   fi
25251 else
25252   ac_cpp_err=yes
25253 fi
25254 if test -z "$ac_cpp_err"; then
25255   eval "$as_ac_Header=yes"
25256 else
25257   echo "$as_me: failed program was:" >&5
25258   cat "conftest.$ac_ext" >&5
25259   eval "$as_ac_Header=no"
25260 fi
25261 rm -f conftest.err "conftest.$ac_ext"
25262 fi
25263 echo "$as_me:25263: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25264 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25265 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25266   cat >>confdefs.h <<EOF
25267 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25268 EOF
25269
25270 fi
25271 done
25272
25273 for ac_header in iostream
25274 do
25275 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25276 echo "$as_me:25276: checking for $ac_header" >&5
25277 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25278 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25279   echo $ECHO_N "(cached) $ECHO_C" >&6
25280 else
25281   cat >"conftest.$ac_ext" <<_ACEOF
25282 #line 25282 "configure"
25283 #include "confdefs.h"
25284 #include <$ac_header>
25285 _ACEOF
25286 if { (eval echo "$as_me:25286: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25287   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25288   ac_status=$?
25289   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25290   rm -f conftest.er1
25291   cat conftest.err >&5
25292   echo "$as_me:25292: \$? = $ac_status" >&5
25293   (exit "$ac_status"); } >/dev/null; then
25294   if test -s conftest.err; then
25295     ac_cpp_err=$ac_cxx_preproc_warn_flag
25296   else
25297     ac_cpp_err=
25298   fi
25299 else
25300   ac_cpp_err=yes
25301 fi
25302 if test -z "$ac_cpp_err"; then
25303   eval "$as_ac_Header=yes"
25304 else
25305   echo "$as_me: failed program was:" >&5
25306   cat "conftest.$ac_ext" >&5
25307   eval "$as_ac_Header=no"
25308 fi
25309 rm -f conftest.err "conftest.$ac_ext"
25310 fi
25311 echo "$as_me:25311: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25312 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25313 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25314   cat >>confdefs.h <<EOF
25315 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25316 EOF
25317
25318 fi
25319 done
25320
25321 if test x"$ac_cv_header_iostream" = xyes ; then
25322         echo "$as_me:25322: checking if iostream uses std-namespace" >&5
25323 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25324         cat >"conftest.$ac_ext" <<_ACEOF
25325 #line 25325 "configure"
25326 #include "confdefs.h"
25327
25328 #include <iostream>
25329 using std::endl;
25330 using std::cerr;
25331 int
25332 main (void)
25333 {
25334
25335 cerr << "testing" << endl;
25336
25337   ;
25338   return 0;
25339 }
25340 _ACEOF
25341 rm -f "conftest.$ac_objext"
25342 if { (eval echo "$as_me:25342: \"$ac_compile\"") >&5
25343   (eval $ac_compile) 2>&5
25344   ac_status=$?
25345   echo "$as_me:25345: \$? = $ac_status" >&5
25346   (exit "$ac_status"); } &&
25347          { ac_try='test -s "conftest.$ac_objext"'
25348   { (eval echo "$as_me:25348: \"$ac_try\"") >&5
25349   (eval $ac_try) 2>&5
25350   ac_status=$?
25351   echo "$as_me:25351: \$? = $ac_status" >&5
25352   (exit "$ac_status"); }; }; then
25353   cf_iostream_namespace=yes
25354 else
25355   echo "$as_me: failed program was:" >&5
25356 cat "conftest.$ac_ext" >&5
25357 cf_iostream_namespace=no
25358 fi
25359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25360         echo "$as_me:25360: result: $cf_iostream_namespace" >&5
25361 echo "${ECHO_T}$cf_iostream_namespace" >&6
25362         if test "$cf_iostream_namespace" = yes ; then
25363
25364 cat >>confdefs.h <<\EOF
25365 #define IOSTREAM_NAMESPACE 1
25366 EOF
25367
25368         fi
25369 fi
25370
25371 echo "$as_me:25371: checking if we should include stdbool.h" >&5
25372 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25373
25374 if test "${cf_cv_header_stdbool_h+set}" = set; then
25375   echo $ECHO_N "(cached) $ECHO_C" >&6
25376 else
25377
25378         cat >"conftest.$ac_ext" <<_ACEOF
25379 #line 25379 "configure"
25380 #include "confdefs.h"
25381
25382 int
25383 main (void)
25384 {
25385 bool foo = false
25386   ;
25387   return 0;
25388 }
25389 _ACEOF
25390 rm -f "conftest.$ac_objext"
25391 if { (eval echo "$as_me:25391: \"$ac_compile\"") >&5
25392   (eval $ac_compile) 2>&5
25393   ac_status=$?
25394   echo "$as_me:25394: \$? = $ac_status" >&5
25395   (exit "$ac_status"); } &&
25396          { ac_try='test -s "conftest.$ac_objext"'
25397   { (eval echo "$as_me:25397: \"$ac_try\"") >&5
25398   (eval $ac_try) 2>&5
25399   ac_status=$?
25400   echo "$as_me:25400: \$? = $ac_status" >&5
25401   (exit "$ac_status"); }; }; then
25402   cf_cv_header_stdbool_h=0
25403 else
25404   echo "$as_me: failed program was:" >&5
25405 cat "conftest.$ac_ext" >&5
25406 cat >"conftest.$ac_ext" <<_ACEOF
25407 #line 25407 "configure"
25408 #include "confdefs.h"
25409
25410 #ifndef __BEOS__
25411 #include <stdbool.h>
25412 #endif
25413
25414 int
25415 main (void)
25416 {
25417 bool foo = false
25418   ;
25419   return 0;
25420 }
25421 _ACEOF
25422 rm -f "conftest.$ac_objext"
25423 if { (eval echo "$as_me:25423: \"$ac_compile\"") >&5
25424   (eval $ac_compile) 2>&5
25425   ac_status=$?
25426   echo "$as_me:25426: \$? = $ac_status" >&5
25427   (exit "$ac_status"); } &&
25428          { ac_try='test -s "conftest.$ac_objext"'
25429   { (eval echo "$as_me:25429: \"$ac_try\"") >&5
25430   (eval $ac_try) 2>&5
25431   ac_status=$?
25432   echo "$as_me:25432: \$? = $ac_status" >&5
25433   (exit "$ac_status"); }; }; then
25434   cf_cv_header_stdbool_h=1
25435 else
25436   echo "$as_me: failed program was:" >&5
25437 cat "conftest.$ac_ext" >&5
25438 cf_cv_header_stdbool_h=0
25439 fi
25440 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25441 fi
25442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25443 fi
25444
25445 if test "$cf_cv_header_stdbool_h" = 1
25446 then    echo "$as_me:25446: result: yes" >&5
25447 echo "${ECHO_T}yes" >&6
25448 else    echo "$as_me:25448: result: no" >&5
25449 echo "${ECHO_T}no" >&6
25450 fi
25451
25452 echo "$as_me:25452: checking for builtin bool type" >&5
25453 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25454
25455 if test "${cf_cv_builtin_bool+set}" = set; then
25456   echo $ECHO_N "(cached) $ECHO_C" >&6
25457 else
25458
25459         cat >"conftest.$ac_ext" <<_ACEOF
25460 #line 25460 "configure"
25461 #include "confdefs.h"
25462
25463 #include <stdio.h>
25464 #include <sys/types.h>
25465
25466 int
25467 main (void)
25468 {
25469 bool x = false
25470   ;
25471   return 0;
25472 }
25473 _ACEOF
25474 rm -f "conftest.$ac_objext"
25475 if { (eval echo "$as_me:25475: \"$ac_compile\"") >&5
25476   (eval $ac_compile) 2>&5
25477   ac_status=$?
25478   echo "$as_me:25478: \$? = $ac_status" >&5
25479   (exit "$ac_status"); } &&
25480          { ac_try='test -s "conftest.$ac_objext"'
25481   { (eval echo "$as_me:25481: \"$ac_try\"") >&5
25482   (eval $ac_try) 2>&5
25483   ac_status=$?
25484   echo "$as_me:25484: \$? = $ac_status" >&5
25485   (exit "$ac_status"); }; }; then
25486   cf_cv_builtin_bool=1
25487 else
25488   echo "$as_me: failed program was:" >&5
25489 cat "conftest.$ac_ext" >&5
25490 cf_cv_builtin_bool=0
25491 fi
25492 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25493
25494 fi
25495
25496 if test "$cf_cv_builtin_bool" = 1
25497 then    echo "$as_me:25497: result: yes" >&5
25498 echo "${ECHO_T}yes" >&6
25499 else    echo "$as_me:25499: result: no" >&5
25500 echo "${ECHO_T}no" >&6
25501 fi
25502
25503 echo "$as_me:25503: checking for bool" >&5
25504 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25505 if test "${ac_cv_type_bool+set}" = set; then
25506   echo $ECHO_N "(cached) $ECHO_C" >&6
25507 else
25508   cat >"conftest.$ac_ext" <<_ACEOF
25509 #line 25509 "configure"
25510 #include "confdefs.h"
25511
25512 #include <stdlib.h>
25513 #include <stdio.h>
25514
25515 #if defined(__cplusplus)
25516
25517 #ifdef HAVE_GXX_BUILTIN_H
25518 #include <g++/builtin.h>
25519 #elif HAVE_GPP_BUILTIN_H
25520 #include <gpp/builtin.h>
25521 #elif HAVE_BUILTIN_H
25522 #include <builtin.h>
25523 #endif
25524
25525 #else
25526
25527 #if $cf_cv_header_stdbool_h
25528 #include <stdbool.h>
25529 #endif
25530
25531 #endif
25532
25533 int
25534 main (void)
25535 {
25536 if ((bool *) 0)
25537   return 0;
25538 if (sizeof (bool))
25539   return 0;
25540   ;
25541   return 0;
25542 }
25543 _ACEOF
25544 rm -f "conftest.$ac_objext"
25545 if { (eval echo "$as_me:25545: \"$ac_compile\"") >&5
25546   (eval $ac_compile) 2>&5
25547   ac_status=$?
25548   echo "$as_me:25548: \$? = $ac_status" >&5
25549   (exit "$ac_status"); } &&
25550          { ac_try='test -s "conftest.$ac_objext"'
25551   { (eval echo "$as_me:25551: \"$ac_try\"") >&5
25552   (eval $ac_try) 2>&5
25553   ac_status=$?
25554   echo "$as_me:25554: \$? = $ac_status" >&5
25555   (exit "$ac_status"); }; }; then
25556   ac_cv_type_bool=yes
25557 else
25558   echo "$as_me: failed program was:" >&5
25559 cat "conftest.$ac_ext" >&5
25560 ac_cv_type_bool=no
25561 fi
25562 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25563 fi
25564 echo "$as_me:25564: result: $ac_cv_type_bool" >&5
25565 echo "${ECHO_T}$ac_cv_type_bool" >&6
25566
25567 echo "$as_me:25567: checking size of bool" >&5
25568 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25569 if test "${ac_cv_sizeof_bool+set}" = set; then
25570   echo $ECHO_N "(cached) $ECHO_C" >&6
25571 else
25572   if test "$ac_cv_type_bool" = yes; then
25573   if test "$cross_compiling" = yes; then
25574   # Depending upon the size, compute the lo and hi bounds.
25575 cat >"conftest.$ac_ext" <<_ACEOF
25576 #line 25576 "configure"
25577 #include "confdefs.h"
25578
25579 #include <stdlib.h>
25580 #include <stdio.h>
25581
25582 #if defined(__cplusplus)
25583
25584 #ifdef HAVE_GXX_BUILTIN_H
25585 #include <g++/builtin.h>
25586 #elif HAVE_GPP_BUILTIN_H
25587 #include <gpp/builtin.h>
25588 #elif HAVE_BUILTIN_H
25589 #include <builtin.h>
25590 #endif
25591
25592 #else
25593
25594 #if $cf_cv_header_stdbool_h
25595 #include <stdbool.h>
25596 #endif
25597
25598 #endif
25599
25600 int
25601 main (void)
25602 {
25603 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25604   ;
25605   return 0;
25606 }
25607 _ACEOF
25608 rm -f "conftest.$ac_objext"
25609 if { (eval echo "$as_me:25609: \"$ac_compile\"") >&5
25610   (eval $ac_compile) 2>&5
25611   ac_status=$?
25612   echo "$as_me:25612: \$? = $ac_status" >&5
25613   (exit "$ac_status"); } &&
25614          { ac_try='test -s "conftest.$ac_objext"'
25615   { (eval echo "$as_me:25615: \"$ac_try\"") >&5
25616   (eval $ac_try) 2>&5
25617   ac_status=$?
25618   echo "$as_me:25618: \$? = $ac_status" >&5
25619   (exit "$ac_status"); }; }; then
25620   ac_lo=0 ac_mid=0
25621   while :; do
25622     cat >"conftest.$ac_ext" <<_ACEOF
25623 #line 25623 "configure"
25624 #include "confdefs.h"
25625
25626 #include <stdlib.h>
25627 #include <stdio.h>
25628
25629 #if defined(__cplusplus)
25630
25631 #ifdef HAVE_GXX_BUILTIN_H
25632 #include <g++/builtin.h>
25633 #elif HAVE_GPP_BUILTIN_H
25634 #include <gpp/builtin.h>
25635 #elif HAVE_BUILTIN_H
25636 #include <builtin.h>
25637 #endif
25638
25639 #else
25640
25641 #if $cf_cv_header_stdbool_h
25642 #include <stdbool.h>
25643 #endif
25644
25645 #endif
25646
25647 int
25648 main (void)
25649 {
25650 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25651   ;
25652   return 0;
25653 }
25654 _ACEOF
25655 rm -f "conftest.$ac_objext"
25656 if { (eval echo "$as_me:25656: \"$ac_compile\"") >&5
25657   (eval $ac_compile) 2>&5
25658   ac_status=$?
25659   echo "$as_me:25659: \$? = $ac_status" >&5
25660   (exit "$ac_status"); } &&
25661          { ac_try='test -s "conftest.$ac_objext"'
25662   { (eval echo "$as_me:25662: \"$ac_try\"") >&5
25663   (eval $ac_try) 2>&5
25664   ac_status=$?
25665   echo "$as_me:25665: \$? = $ac_status" >&5
25666   (exit "$ac_status"); }; }; then
25667   ac_hi=$ac_mid; break
25668 else
25669   echo "$as_me: failed program was:" >&5
25670 cat "conftest.$ac_ext" >&5
25671 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25672 fi
25673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25674   done
25675 else
25676   echo "$as_me: failed program was:" >&5
25677 cat "conftest.$ac_ext" >&5
25678 ac_hi=-1 ac_mid=-1
25679   while :; do
25680     cat >"conftest.$ac_ext" <<_ACEOF
25681 #line 25681 "configure"
25682 #include "confdefs.h"
25683
25684 #include <stdlib.h>
25685 #include <stdio.h>
25686
25687 #if defined(__cplusplus)
25688
25689 #ifdef HAVE_GXX_BUILTIN_H
25690 #include <g++/builtin.h>
25691 #elif HAVE_GPP_BUILTIN_H
25692 #include <gpp/builtin.h>
25693 #elif HAVE_BUILTIN_H
25694 #include <builtin.h>
25695 #endif
25696
25697 #else
25698
25699 #if $cf_cv_header_stdbool_h
25700 #include <stdbool.h>
25701 #endif
25702
25703 #endif
25704
25705 int
25706 main (void)
25707 {
25708 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25709   ;
25710   return 0;
25711 }
25712 _ACEOF
25713 rm -f "conftest.$ac_objext"
25714 if { (eval echo "$as_me:25714: \"$ac_compile\"") >&5
25715   (eval $ac_compile) 2>&5
25716   ac_status=$?
25717   echo "$as_me:25717: \$? = $ac_status" >&5
25718   (exit "$ac_status"); } &&
25719          { ac_try='test -s "conftest.$ac_objext"'
25720   { (eval echo "$as_me:25720: \"$ac_try\"") >&5
25721   (eval $ac_try) 2>&5
25722   ac_status=$?
25723   echo "$as_me:25723: \$? = $ac_status" >&5
25724   (exit "$ac_status"); }; }; then
25725   ac_lo=$ac_mid; break
25726 else
25727   echo "$as_me: failed program was:" >&5
25728 cat "conftest.$ac_ext" >&5
25729 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25730 fi
25731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25732   done
25733 fi
25734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25735 # Binary search between lo and hi bounds.
25736 while test "x$ac_lo" != "x$ac_hi"; do
25737   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25738   cat >"conftest.$ac_ext" <<_ACEOF
25739 #line 25739 "configure"
25740 #include "confdefs.h"
25741
25742 #include <stdlib.h>
25743 #include <stdio.h>
25744
25745 #if defined(__cplusplus)
25746
25747 #ifdef HAVE_GXX_BUILTIN_H
25748 #include <g++/builtin.h>
25749 #elif HAVE_GPP_BUILTIN_H
25750 #include <gpp/builtin.h>
25751 #elif HAVE_BUILTIN_H
25752 #include <builtin.h>
25753 #endif
25754
25755 #else
25756
25757 #if $cf_cv_header_stdbool_h
25758 #include <stdbool.h>
25759 #endif
25760
25761 #endif
25762
25763 int
25764 main (void)
25765 {
25766 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25767   ;
25768   return 0;
25769 }
25770 _ACEOF
25771 rm -f "conftest.$ac_objext"
25772 if { (eval echo "$as_me:25772: \"$ac_compile\"") >&5
25773   (eval $ac_compile) 2>&5
25774   ac_status=$?
25775   echo "$as_me:25775: \$? = $ac_status" >&5
25776   (exit "$ac_status"); } &&
25777          { ac_try='test -s "conftest.$ac_objext"'
25778   { (eval echo "$as_me:25778: \"$ac_try\"") >&5
25779   (eval $ac_try) 2>&5
25780   ac_status=$?
25781   echo "$as_me:25781: \$? = $ac_status" >&5
25782   (exit "$ac_status"); }; }; then
25783   ac_hi=$ac_mid
25784 else
25785   echo "$as_me: failed program was:" >&5
25786 cat "conftest.$ac_ext" >&5
25787 ac_lo=`expr "$ac_mid" + 1`
25788 fi
25789 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25790 done
25791 ac_cv_sizeof_bool=$ac_lo
25792 else
25793   if test "$cross_compiling" = yes; then
25794   { { echo "$as_me:25794: error: cannot run test program while cross compiling" >&5
25795 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25796    { (exit 1); exit 1; }; }
25797 else
25798   cat >"conftest.$ac_ext" <<_ACEOF
25799 #line 25799 "configure"
25800 #include "confdefs.h"
25801
25802 #include <stdlib.h>
25803 #include <stdio.h>
25804
25805 #if defined(__cplusplus)
25806
25807 #ifdef HAVE_GXX_BUILTIN_H
25808 #include <g++/builtin.h>
25809 #elif HAVE_GPP_BUILTIN_H
25810 #include <gpp/builtin.h>
25811 #elif HAVE_BUILTIN_H
25812 #include <builtin.h>
25813 #endif
25814
25815 #else
25816
25817 #if $cf_cv_header_stdbool_h
25818 #include <stdbool.h>
25819 #endif
25820
25821 #endif
25822
25823 int
25824 main (void)
25825 {
25826 FILE *f = fopen ("conftest.val", "w");
25827 if (!f)
25828   $ac_main_return (1);
25829 fprintf (f, "%ld", (long)(sizeof (bool)));
25830 fclose (f);
25831   ;
25832   return 0;
25833 }
25834 _ACEOF
25835 rm -f "conftest$ac_exeext"
25836 if { (eval echo "$as_me:25836: \"$ac_link\"") >&5
25837   (eval $ac_link) 2>&5
25838   ac_status=$?
25839   echo "$as_me:25839: \$? = $ac_status" >&5
25840   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25841   { (eval echo "$as_me:25841: \"$ac_try\"") >&5
25842   (eval $ac_try) 2>&5
25843   ac_status=$?
25844   echo "$as_me:25844: \$? = $ac_status" >&5
25845   (exit "$ac_status"); }; }; then
25846   ac_cv_sizeof_bool=`cat conftest.val`
25847 else
25848   echo "$as_me: program exited with status $ac_status" >&5
25849 echo "$as_me: failed program was:" >&5
25850 cat "conftest.$ac_ext" >&5
25851 fi
25852 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25853 fi
25854 fi
25855 rm -f conftest.val
25856 else
25857   ac_cv_sizeof_bool=0
25858 fi
25859 fi
25860 echo "$as_me:25860: result: $ac_cv_sizeof_bool" >&5
25861 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25862 cat >>confdefs.h <<EOF
25863 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25864 EOF
25865
25866 echo "$as_me:25866: checking for type of bool" >&5
25867 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25868 if test "${cf_cv_type_of_bool+set}" = set; then
25869   echo $ECHO_N "(cached) $ECHO_C" >&6
25870 else
25871
25872         rm -f cf_test.out
25873         if test "$cross_compiling" = yes; then
25874
25875                 case x$ac_cv_sizeof_bool in
25876                 (x1) cf_cv_type_of_bool="unsigned char";;
25877                 (x2) cf_cv_type_of_bool="unsigned short";;
25878                 (x4) cf_cv_type_of_bool="unsigned int";;
25879                 (x8) cf_cv_type_of_bool="unsigned long";;
25880                 (*)  cf_cv_type_of_bool=unknown;;
25881                 esac
25882
25883 else
25884   cat >"conftest.$ac_ext" <<_ACEOF
25885 #line 25885 "configure"
25886 #include "confdefs.h"
25887
25888 #include <stdlib.h>
25889 #include <stdio.h>
25890
25891 #if defined(__cplusplus)
25892
25893 #ifdef HAVE_GXX_BUILTIN_H
25894 #include <g++/builtin.h>
25895 #elif HAVE_GPP_BUILTIN_H
25896 #include <gpp/builtin.h>
25897 #elif HAVE_BUILTIN_H
25898 #include <builtin.h>
25899 #endif
25900
25901 #else
25902
25903 #if $cf_cv_header_stdbool_h
25904 #include <stdbool.h>
25905 #endif
25906
25907 #endif
25908
25909 int main(void)
25910 {
25911         FILE *fp = fopen("cf_test.out", "w");
25912         if (fp != 0) {
25913                 bool x = true;
25914                 if ((bool)(-x) >= 0)
25915                         fputs("unsigned ", fp);
25916                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25917                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25918                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25919                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25920                 fclose(fp);
25921         }
25922         ${cf_cv_main_return:-return}(0);
25923 }
25924
25925 _ACEOF
25926 rm -f "conftest$ac_exeext"
25927 if { (eval echo "$as_me:25927: \"$ac_link\"") >&5
25928   (eval $ac_link) 2>&5
25929   ac_status=$?
25930   echo "$as_me:25930: \$? = $ac_status" >&5
25931   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25932   { (eval echo "$as_me:25932: \"$ac_try\"") >&5
25933   (eval $ac_try) 2>&5
25934   ac_status=$?
25935   echo "$as_me:25935: \$? = $ac_status" >&5
25936   (exit "$ac_status"); }; }; then
25937   cf_cv_type_of_bool=`cat cf_test.out`
25938                  if test -z "$cf_cv_type_of_bool"; then
25939                    cf_cv_type_of_bool=unknown
25940                  fi
25941 else
25942   echo "$as_me: program exited with status $ac_status" >&5
25943 echo "$as_me: failed program was:" >&5
25944 cat "conftest.$ac_ext" >&5
25945 cf_cv_type_of_bool=unknown
25946 fi
25947 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25948 fi
25949         rm -f cf_test.out
25950
25951 fi
25952 echo "$as_me:25952: result: $cf_cv_type_of_bool" >&5
25953 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25954
25955 if test "$cf_cv_type_of_bool" = unknown ; then
25956         case .$NCURSES_BOOL in
25957         (.auto|.) NCURSES_BOOL=unsigned;;
25958         esac
25959         { echo "$as_me:25959: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25960 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25961         cf_cv_type_of_bool=$NCURSES_BOOL
25962 fi
25963
25964 echo "$as_me:25964: checking for special defines needed for etip.h" >&5
25965 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25966 cf_save_CXXFLAGS="$CXXFLAGS"
25967 cf_result="none"
25968
25969 # etip.h includes ncurses.h which includes ncurses_dll.h
25970 # But ncurses_dll.h is generated - fix here.
25971 test -d include || mkdir include
25972 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
25973
25974 for cf_math in "" MATH_H
25975 do
25976 for cf_excp in "" MATH_EXCEPTION
25977 do
25978         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25979         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25980         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25981 cat >"conftest.$ac_ext" <<_ACEOF
25982 #line 25982 "configure"
25983 #include "confdefs.h"
25984
25985 #include <etip.h.in>
25986
25987 int
25988 main (void)
25989 {
25990
25991   ;
25992   return 0;
25993 }
25994 _ACEOF
25995 rm -f "conftest.$ac_objext"
25996 if { (eval echo "$as_me:25996: \"$ac_compile\"") >&5
25997   (eval $ac_compile) 2>&5
25998   ac_status=$?
25999   echo "$as_me:25999: \$? = $ac_status" >&5
26000   (exit "$ac_status"); } &&
26001          { ac_try='test -s "conftest.$ac_objext"'
26002   { (eval echo "$as_me:26002: \"$ac_try\"") >&5
26003   (eval $ac_try) 2>&5
26004   ac_status=$?
26005   echo "$as_me:26005: \$? = $ac_status" >&5
26006   (exit "$ac_status"); }; }; then
26007
26008         test -n "$cf_math" && cat >>confdefs.h <<EOF
26009 #define ETIP_NEEDS_${cf_math} 1
26010 EOF
26011
26012         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26013 #define ETIP_NEEDS_${cf_excp} 1
26014 EOF
26015
26016         cf_result="$cf_math $cf_excp"
26017         break 2
26018
26019 else
26020   echo "$as_me: failed program was:" >&5
26021 cat "conftest.$ac_ext" >&5
26022 fi
26023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26024 done
26025 done
26026 echo "$as_me:26026: result: $cf_result" >&5
26027 echo "${ECHO_T}$cf_result" >&6
26028 CXXFLAGS="$cf_save_CXXFLAGS"
26029
26030 if test -n "$CXX"; then
26031 echo "$as_me:26031: checking if $CXX accepts parameter initialization" >&5
26032 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26033 if test "${cf_cv_cpp_param_init+set}" = set; then
26034   echo $ECHO_N "(cached) $ECHO_C" >&6
26035 else
26036
26037         ac_ext=cc
26038 ac_cpp='$CXXCPP $CPPFLAGS'
26039 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26040 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26041 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26042 ac_main_return="return"
26043
26044         if test "$cross_compiling" = yes; then
26045   cf_cv_cpp_param_init=unknown
26046 else
26047   cat >"conftest.$ac_ext" <<_ACEOF
26048 #line 26048 "configure"
26049 #include "confdefs.h"
26050
26051 class TEST {
26052 private:
26053         int value;
26054 public:
26055         TEST(int x = 1);
26056         ~TEST();
26057 };
26058
26059 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26060 {
26061         value = x;
26062 }
26063 int main(void) { }
26064
26065 _ACEOF
26066 rm -f "conftest$ac_exeext"
26067 if { (eval echo "$as_me:26067: \"$ac_link\"") >&5
26068   (eval $ac_link) 2>&5
26069   ac_status=$?
26070   echo "$as_me:26070: \$? = $ac_status" >&5
26071   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26072   { (eval echo "$as_me:26072: \"$ac_try\"") >&5
26073   (eval $ac_try) 2>&5
26074   ac_status=$?
26075   echo "$as_me:26075: \$? = $ac_status" >&5
26076   (exit "$ac_status"); }; }; then
26077   cf_cv_cpp_param_init=yes
26078 else
26079   echo "$as_me: program exited with status $ac_status" >&5
26080 echo "$as_me: failed program was:" >&5
26081 cat "conftest.$ac_ext" >&5
26082 cf_cv_cpp_param_init=no
26083 fi
26084 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26085 fi
26086         ac_ext=cc
26087 ac_cpp='$CXXCPP $CPPFLAGS'
26088 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26089 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26090 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26091 ac_main_return="return"
26092
26093 fi
26094 echo "$as_me:26094: result: $cf_cv_cpp_param_init" >&5
26095 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26096 fi
26097 test "$cf_cv_cpp_param_init" = yes &&
26098 cat >>confdefs.h <<\EOF
26099 #define CPP_HAS_PARAM_INIT 1
26100 EOF
26101
26102 if test -n "$CXX"; then
26103
26104 echo "$as_me:26104: checking if $CXX accepts static_cast" >&5
26105 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26106 if test "${cf_cv_cpp_static_cast+set}" = set; then
26107   echo $ECHO_N "(cached) $ECHO_C" >&6
26108 else
26109
26110         ac_ext=cc
26111 ac_cpp='$CXXCPP $CPPFLAGS'
26112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26113 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26115 ac_main_return="return"
26116
26117         cat >"conftest.$ac_ext" <<_ACEOF
26118 #line 26118 "configure"
26119 #include "confdefs.h"
26120
26121 class NCursesPanel
26122 {
26123 public:
26124   NCursesPanel(int nlines,
26125                int ncols,
26126                int begin_y = 0,
26127                int begin_x = 0)
26128   {
26129   }
26130   NCursesPanel();
26131   ~NCursesPanel();
26132 };
26133
26134 template<class T> class NCursesUserPanel : public NCursesPanel
26135 {
26136 public:
26137   NCursesUserPanel (int nlines,
26138                     int ncols,
26139                     int begin_y = 0,
26140                     int begin_x = 0,
26141                     const T* p_UserData = static_cast<T*>(0))
26142     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26143   {
26144   };
26145   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26146   {
26147   };
26148
26149   virtual ~NCursesUserPanel() {};
26150 };
26151
26152 int
26153 main (void)
26154 {
26155
26156         const char* p_UserData = static_cast<char*>(0)
26157   ;
26158   return 0;
26159 }
26160 _ACEOF
26161 rm -f "conftest.$ac_objext"
26162 if { (eval echo "$as_me:26162: \"$ac_compile\"") >&5
26163   (eval $ac_compile) 2>&5
26164   ac_status=$?
26165   echo "$as_me:26165: \$? = $ac_status" >&5
26166   (exit "$ac_status"); } &&
26167          { ac_try='test -s "conftest.$ac_objext"'
26168   { (eval echo "$as_me:26168: \"$ac_try\"") >&5
26169   (eval $ac_try) 2>&5
26170   ac_status=$?
26171   echo "$as_me:26171: \$? = $ac_status" >&5
26172   (exit "$ac_status"); }; }; then
26173   cf_cv_cpp_static_cast=yes
26174 else
26175   echo "$as_me: failed program was:" >&5
26176 cat "conftest.$ac_ext" >&5
26177 cf_cv_cpp_static_cast=no
26178 fi
26179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26180
26181         ac_ext=cc
26182 ac_cpp='$CXXCPP $CPPFLAGS'
26183 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26184 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26185 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26186 ac_main_return="return"
26187
26188 fi
26189 echo "$as_me:26189: result: $cf_cv_cpp_static_cast" >&5
26190 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26191
26192 fi
26193
26194 test "$cf_cv_cpp_static_cast" = yes &&
26195 cat >>confdefs.h <<\EOF
26196 #define CPP_HAS_STATIC_CAST 1
26197 EOF
26198
26199         CXX_AR='$(AR)'
26200         CXX_ARFLAGS='$(ARFLAGS)'
26201         case "$cf_cv_system_name" in
26202         (irix*)
26203             if test "$GXX" != yes ; then
26204                 CXX_AR='$(CXX)'
26205                 CXX_ARFLAGS='-ar -o'
26206             fi
26207             ;;
26208         (sco3.2v5*)
26209             CXXLDFLAGS="-u main"
26210             ;;
26211         (solaris2*)
26212             if test "$GXX" != yes ; then
26213                 CXX_AR='$(CXX)'
26214                 CXX_ARFLAGS='-xar -o'
26215             fi
26216             ;;
26217         esac
26218
26219 else
26220         cf_cxx_library=no
26221         cf_cv_builtin_bool=1
26222
26223         # Just because we are not configuring against C++ right now does not
26224         # mean that a user will not want to use C++.  Some distributors disable
26225         # the C++ portion of this configuration as a shortcut (or just to avoid
26226         # compiling the demo in the c++ directory).  So we need a reasonable
26227         # default for the 'bool' type.
26228         #
26229         # Caveat: since the storage of the bool type is not standardized, it
26230         # may change.
26231
26232         if test "$NCURSES_BOOL" != auto ; then
26233                 cf_cv_type_of_bool=$NCURSES_BOOL
26234                 cf_cv_header_stdbool_h=0
26235         else
26236                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26237
26238 echo "$as_me:26238: checking for bool" >&5
26239 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26240 if test "${ac_cv_type_bool+set}" = set; then
26241   echo $ECHO_N "(cached) $ECHO_C" >&6
26242 else
26243   cat >"conftest.$ac_ext" <<_ACEOF
26244 #line 26244 "configure"
26245 #include "confdefs.h"
26246
26247 #include <stdlib.h>
26248 #include <stdio.h>
26249
26250 #if defined(__cplusplus)
26251
26252 #ifdef HAVE_GXX_BUILTIN_H
26253 #include <g++/builtin.h>
26254 #elif HAVE_GPP_BUILTIN_H
26255 #include <gpp/builtin.h>
26256 #elif HAVE_BUILTIN_H
26257 #include <builtin.h>
26258 #endif
26259
26260 #else
26261
26262 #if $cf_cv_header_stdbool_h
26263 #include <stdbool.h>
26264 #endif
26265
26266 #endif
26267
26268 int
26269 main (void)
26270 {
26271 if ((bool *) 0)
26272   return 0;
26273 if (sizeof (bool))
26274   return 0;
26275   ;
26276   return 0;
26277 }
26278 _ACEOF
26279 rm -f "conftest.$ac_objext"
26280 if { (eval echo "$as_me:26280: \"$ac_compile\"") >&5
26281   (eval $ac_compile) 2>&5
26282   ac_status=$?
26283   echo "$as_me:26283: \$? = $ac_status" >&5
26284   (exit "$ac_status"); } &&
26285          { ac_try='test -s "conftest.$ac_objext"'
26286   { (eval echo "$as_me:26286: \"$ac_try\"") >&5
26287   (eval $ac_try) 2>&5
26288   ac_status=$?
26289   echo "$as_me:26289: \$? = $ac_status" >&5
26290   (exit "$ac_status"); }; }; then
26291   ac_cv_type_bool=yes
26292 else
26293   echo "$as_me: failed program was:" >&5
26294 cat "conftest.$ac_ext" >&5
26295 ac_cv_type_bool=no
26296 fi
26297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26298 fi
26299 echo "$as_me:26299: result: $ac_cv_type_bool" >&5
26300 echo "${ECHO_T}$ac_cv_type_bool" >&6
26301
26302 echo "$as_me:26302: checking size of bool" >&5
26303 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26304 if test "${ac_cv_sizeof_bool+set}" = set; then
26305   echo $ECHO_N "(cached) $ECHO_C" >&6
26306 else
26307   if test "$ac_cv_type_bool" = yes; then
26308   if test "$cross_compiling" = yes; then
26309   # Depending upon the size, compute the lo and hi bounds.
26310 cat >"conftest.$ac_ext" <<_ACEOF
26311 #line 26311 "configure"
26312 #include "confdefs.h"
26313
26314 #include <stdlib.h>
26315 #include <stdio.h>
26316
26317 #if defined(__cplusplus)
26318
26319 #ifdef HAVE_GXX_BUILTIN_H
26320 #include <g++/builtin.h>
26321 #elif HAVE_GPP_BUILTIN_H
26322 #include <gpp/builtin.h>
26323 #elif HAVE_BUILTIN_H
26324 #include <builtin.h>
26325 #endif
26326
26327 #else
26328
26329 #if $cf_cv_header_stdbool_h
26330 #include <stdbool.h>
26331 #endif
26332
26333 #endif
26334
26335 int
26336 main (void)
26337 {
26338 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26339   ;
26340   return 0;
26341 }
26342 _ACEOF
26343 rm -f "conftest.$ac_objext"
26344 if { (eval echo "$as_me:26344: \"$ac_compile\"") >&5
26345   (eval $ac_compile) 2>&5
26346   ac_status=$?
26347   echo "$as_me:26347: \$? = $ac_status" >&5
26348   (exit "$ac_status"); } &&
26349          { ac_try='test -s "conftest.$ac_objext"'
26350   { (eval echo "$as_me:26350: \"$ac_try\"") >&5
26351   (eval $ac_try) 2>&5
26352   ac_status=$?
26353   echo "$as_me:26353: \$? = $ac_status" >&5
26354   (exit "$ac_status"); }; }; then
26355   ac_lo=0 ac_mid=0
26356   while :; do
26357     cat >"conftest.$ac_ext" <<_ACEOF
26358 #line 26358 "configure"
26359 #include "confdefs.h"
26360
26361 #include <stdlib.h>
26362 #include <stdio.h>
26363
26364 #if defined(__cplusplus)
26365
26366 #ifdef HAVE_GXX_BUILTIN_H
26367 #include <g++/builtin.h>
26368 #elif HAVE_GPP_BUILTIN_H
26369 #include <gpp/builtin.h>
26370 #elif HAVE_BUILTIN_H
26371 #include <builtin.h>
26372 #endif
26373
26374 #else
26375
26376 #if $cf_cv_header_stdbool_h
26377 #include <stdbool.h>
26378 #endif
26379
26380 #endif
26381
26382 int
26383 main (void)
26384 {
26385 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26386   ;
26387   return 0;
26388 }
26389 _ACEOF
26390 rm -f "conftest.$ac_objext"
26391 if { (eval echo "$as_me:26391: \"$ac_compile\"") >&5
26392   (eval $ac_compile) 2>&5
26393   ac_status=$?
26394   echo "$as_me:26394: \$? = $ac_status" >&5
26395   (exit "$ac_status"); } &&
26396          { ac_try='test -s "conftest.$ac_objext"'
26397   { (eval echo "$as_me:26397: \"$ac_try\"") >&5
26398   (eval $ac_try) 2>&5
26399   ac_status=$?
26400   echo "$as_me:26400: \$? = $ac_status" >&5
26401   (exit "$ac_status"); }; }; then
26402   ac_hi=$ac_mid; break
26403 else
26404   echo "$as_me: failed program was:" >&5
26405 cat "conftest.$ac_ext" >&5
26406 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26407 fi
26408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26409   done
26410 else
26411   echo "$as_me: failed program was:" >&5
26412 cat "conftest.$ac_ext" >&5
26413 ac_hi=-1 ac_mid=-1
26414   while :; do
26415     cat >"conftest.$ac_ext" <<_ACEOF
26416 #line 26416 "configure"
26417 #include "confdefs.h"
26418
26419 #include <stdlib.h>
26420 #include <stdio.h>
26421
26422 #if defined(__cplusplus)
26423
26424 #ifdef HAVE_GXX_BUILTIN_H
26425 #include <g++/builtin.h>
26426 #elif HAVE_GPP_BUILTIN_H
26427 #include <gpp/builtin.h>
26428 #elif HAVE_BUILTIN_H
26429 #include <builtin.h>
26430 #endif
26431
26432 #else
26433
26434 #if $cf_cv_header_stdbool_h
26435 #include <stdbool.h>
26436 #endif
26437
26438 #endif
26439
26440 int
26441 main (void)
26442 {
26443 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26444   ;
26445   return 0;
26446 }
26447 _ACEOF
26448 rm -f "conftest.$ac_objext"
26449 if { (eval echo "$as_me:26449: \"$ac_compile\"") >&5
26450   (eval $ac_compile) 2>&5
26451   ac_status=$?
26452   echo "$as_me:26452: \$? = $ac_status" >&5
26453   (exit "$ac_status"); } &&
26454          { ac_try='test -s "conftest.$ac_objext"'
26455   { (eval echo "$as_me:26455: \"$ac_try\"") >&5
26456   (eval $ac_try) 2>&5
26457   ac_status=$?
26458   echo "$as_me:26458: \$? = $ac_status" >&5
26459   (exit "$ac_status"); }; }; then
26460   ac_lo=$ac_mid; break
26461 else
26462   echo "$as_me: failed program was:" >&5
26463 cat "conftest.$ac_ext" >&5
26464 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26465 fi
26466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26467   done
26468 fi
26469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26470 # Binary search between lo and hi bounds.
26471 while test "x$ac_lo" != "x$ac_hi"; do
26472   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26473   cat >"conftest.$ac_ext" <<_ACEOF
26474 #line 26474 "configure"
26475 #include "confdefs.h"
26476
26477 #include <stdlib.h>
26478 #include <stdio.h>
26479
26480 #if defined(__cplusplus)
26481
26482 #ifdef HAVE_GXX_BUILTIN_H
26483 #include <g++/builtin.h>
26484 #elif HAVE_GPP_BUILTIN_H
26485 #include <gpp/builtin.h>
26486 #elif HAVE_BUILTIN_H
26487 #include <builtin.h>
26488 #endif
26489
26490 #else
26491
26492 #if $cf_cv_header_stdbool_h
26493 #include <stdbool.h>
26494 #endif
26495
26496 #endif
26497
26498 int
26499 main (void)
26500 {
26501 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26502   ;
26503   return 0;
26504 }
26505 _ACEOF
26506 rm -f "conftest.$ac_objext"
26507 if { (eval echo "$as_me:26507: \"$ac_compile\"") >&5
26508   (eval $ac_compile) 2>&5
26509   ac_status=$?
26510   echo "$as_me:26510: \$? = $ac_status" >&5
26511   (exit "$ac_status"); } &&
26512          { ac_try='test -s "conftest.$ac_objext"'
26513   { (eval echo "$as_me:26513: \"$ac_try\"") >&5
26514   (eval $ac_try) 2>&5
26515   ac_status=$?
26516   echo "$as_me:26516: \$? = $ac_status" >&5
26517   (exit "$ac_status"); }; }; then
26518   ac_hi=$ac_mid
26519 else
26520   echo "$as_me: failed program was:" >&5
26521 cat "conftest.$ac_ext" >&5
26522 ac_lo=`expr "$ac_mid" + 1`
26523 fi
26524 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26525 done
26526 ac_cv_sizeof_bool=$ac_lo
26527 else
26528   if test "$cross_compiling" = yes; then
26529   { { echo "$as_me:26529: error: cannot run test program while cross compiling" >&5
26530 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26531    { (exit 1); exit 1; }; }
26532 else
26533   cat >"conftest.$ac_ext" <<_ACEOF
26534 #line 26534 "configure"
26535 #include "confdefs.h"
26536
26537 #include <stdlib.h>
26538 #include <stdio.h>
26539
26540 #if defined(__cplusplus)
26541
26542 #ifdef HAVE_GXX_BUILTIN_H
26543 #include <g++/builtin.h>
26544 #elif HAVE_GPP_BUILTIN_H
26545 #include <gpp/builtin.h>
26546 #elif HAVE_BUILTIN_H
26547 #include <builtin.h>
26548 #endif
26549
26550 #else
26551
26552 #if $cf_cv_header_stdbool_h
26553 #include <stdbool.h>
26554 #endif
26555
26556 #endif
26557
26558 int
26559 main (void)
26560 {
26561 FILE *f = fopen ("conftest.val", "w");
26562 if (!f)
26563   $ac_main_return (1);
26564 fprintf (f, "%ld", (long)(sizeof (bool)));
26565 fclose (f);
26566   ;
26567   return 0;
26568 }
26569 _ACEOF
26570 rm -f "conftest$ac_exeext"
26571 if { (eval echo "$as_me:26571: \"$ac_link\"") >&5
26572   (eval $ac_link) 2>&5
26573   ac_status=$?
26574   echo "$as_me:26574: \$? = $ac_status" >&5
26575   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26576   { (eval echo "$as_me:26576: \"$ac_try\"") >&5
26577   (eval $ac_try) 2>&5
26578   ac_status=$?
26579   echo "$as_me:26579: \$? = $ac_status" >&5
26580   (exit "$ac_status"); }; }; then
26581   ac_cv_sizeof_bool=`cat conftest.val`
26582 else
26583   echo "$as_me: program exited with status $ac_status" >&5
26584 echo "$as_me: failed program was:" >&5
26585 cat "conftest.$ac_ext" >&5
26586 fi
26587 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26588 fi
26589 fi
26590 rm -f conftest.val
26591 else
26592   ac_cv_sizeof_bool=0
26593 fi
26594 fi
26595 echo "$as_me:26595: result: $ac_cv_sizeof_bool" >&5
26596 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26597 cat >>confdefs.h <<EOF
26598 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26599 EOF
26600
26601 echo "$as_me:26601: checking for type of bool" >&5
26602 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26603 if test "${cf_cv_type_of_bool+set}" = set; then
26604   echo $ECHO_N "(cached) $ECHO_C" >&6
26605 else
26606
26607         rm -f cf_test.out
26608         if test "$cross_compiling" = yes; then
26609
26610                 case x$ac_cv_sizeof_bool in
26611                 (x1) cf_cv_type_of_bool="unsigned char";;
26612                 (x2) cf_cv_type_of_bool="unsigned short";;
26613                 (x4) cf_cv_type_of_bool="unsigned int";;
26614                 (x8) cf_cv_type_of_bool="unsigned long";;
26615                 (*)  cf_cv_type_of_bool=unknown;;
26616                 esac
26617
26618 else
26619   cat >"conftest.$ac_ext" <<_ACEOF
26620 #line 26620 "configure"
26621 #include "confdefs.h"
26622
26623 #include <stdlib.h>
26624 #include <stdio.h>
26625
26626 #if defined(__cplusplus)
26627
26628 #ifdef HAVE_GXX_BUILTIN_H
26629 #include <g++/builtin.h>
26630 #elif HAVE_GPP_BUILTIN_H
26631 #include <gpp/builtin.h>
26632 #elif HAVE_BUILTIN_H
26633 #include <builtin.h>
26634 #endif
26635
26636 #else
26637
26638 #if $cf_cv_header_stdbool_h
26639 #include <stdbool.h>
26640 #endif
26641
26642 #endif
26643
26644 int main(void)
26645 {
26646         FILE *fp = fopen("cf_test.out", "w");
26647         if (fp != 0) {
26648                 bool x = true;
26649                 if ((bool)(-x) >= 0)
26650                         fputs("unsigned ", fp);
26651                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26652                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26653                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26654                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26655                 fclose(fp);
26656         }
26657         ${cf_cv_main_return:-return}(0);
26658 }
26659
26660 _ACEOF
26661 rm -f "conftest$ac_exeext"
26662 if { (eval echo "$as_me:26662: \"$ac_link\"") >&5
26663   (eval $ac_link) 2>&5
26664   ac_status=$?
26665   echo "$as_me:26665: \$? = $ac_status" >&5
26666   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26667   { (eval echo "$as_me:26667: \"$ac_try\"") >&5
26668   (eval $ac_try) 2>&5
26669   ac_status=$?
26670   echo "$as_me:26670: \$? = $ac_status" >&5
26671   (exit "$ac_status"); }; }; then
26672   cf_cv_type_of_bool=`cat cf_test.out`
26673                  if test -z "$cf_cv_type_of_bool"; then
26674                    cf_cv_type_of_bool=unknown
26675                  fi
26676 else
26677   echo "$as_me: program exited with status $ac_status" >&5
26678 echo "$as_me: failed program was:" >&5
26679 cat "conftest.$ac_ext" >&5
26680 cf_cv_type_of_bool=unknown
26681 fi
26682 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26683 fi
26684         rm -f cf_test.out
26685
26686 fi
26687 echo "$as_me:26687: result: $cf_cv_type_of_bool" >&5
26688 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26689
26690 if test "$cf_cv_type_of_bool" = unknown ; then
26691         case .$NCURSES_BOOL in
26692         (.auto|.) NCURSES_BOOL=unsigned;;
26693         esac
26694         { echo "$as_me:26694: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26695 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26696         cf_cv_type_of_bool=$NCURSES_BOOL
26697 fi
26698
26699                 else
26700                         echo "$as_me:26700: checking for fallback type of bool" >&5
26701 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26702                         case "$host_cpu" in
26703                         (i?86)  cf_cv_type_of_bool=char ;;
26704                         (*)     cf_cv_type_of_bool=int  ;;
26705                         esac
26706                         echo "$as_me:26706: result: $cf_cv_type_of_bool" >&5
26707 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26708                 fi
26709         fi
26710 fi
26711
26712 # If the C compiler did not declare bool, and we did not determine that the C++
26713 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26714 # ncurses library use the same type as C++ bool.  Note that this allows one to
26715 # specify the type of bool in a configure-script option and postpone
26716 # integration with the C++ compiler provided that the types are compatible.
26717 USE_CXX_BOOL=1
26718 if test "$cf_cv_cc_bool_type" = 1
26719 then
26720         # oops: C has a bool.  Unlikely, but C++ could differ.
26721         USE_CXX_BOOL=0
26722 elif test "$cf_cv_builtin_bool" = 0
26723 then
26724         # C++ has no bool
26725         USE_CXX_BOOL=0
26726 else
26727         # this is the normal case
26728         USE_CXX_BOOL='defined(__cplusplus)'
26729 fi
26730
26731 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26732
26733         if test "$cf_with_ada" != "no" ; then
26734                 if test "$with_libtool" != "no"; then
26735                         { echo "$as_me:26735: WARNING: libtool does not support Ada - disabling feature" >&5
26736 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26737                         cf_with_ada=no
26738                 fi
26739         fi
26740
26741         if test "$cf_with_ada" != "no" ; then
26742
26743 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26744 do
26745
26746 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26747
26748         unset ac_cv_path_cf_TEMP_gnat
26749         unset cf_TEMP_gnat
26750         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26751 set dummy $cf_prog_gnat; ac_word=$2
26752 echo "$as_me:26752: checking for $ac_word" >&5
26753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26754 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26755   echo $ECHO_N "(cached) $ECHO_C" >&6
26756 else
26757   case $cf_TEMP_gnat in
26758   [\\/]* | ?:[\\/]*)
26759   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26760   ;;
26761   *)
26762   ac_save_IFS=$IFS; IFS=$ac_path_separator
26763 ac_dummy="$PATH"
26764 for ac_dir in $ac_dummy; do
26765   IFS=$ac_save_IFS
26766   test -z "$ac_dir" && ac_dir=.
26767   if $as_executable_p "$ac_dir/$ac_word"; then
26768    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26769    echo "$as_me:26769: found $ac_dir/$ac_word" >&5
26770    break
26771 fi
26772 done
26773
26774   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26775   ;;
26776 esac
26777 fi
26778 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26779
26780 if test -n "$cf_TEMP_gnat"; then
26781   echo "$as_me:26781: result: $cf_TEMP_gnat" >&5
26782 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26783 else
26784   echo "$as_me:26784: result: no" >&5
26785 echo "${ECHO_T}no" >&6
26786 fi
26787
26788         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26789
26790         if test "x$cf_TEMP_gnat" != xno; then
26791                 unset cf_cv_gnat_version
26792                 unset cf_TEMP_gnat
26793
26794 echo "$as_me:26794: checking for $cf_prog_gnat version" >&5
26795 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26796 if test "${cf_cv_gnat_version+set}" = set; then
26797   echo $ECHO_N "(cached) $ECHO_C" >&6
26798 else
26799
26800 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26801         grep '[0-9].[0-9][0-9]*' |\
26802         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26803
26804 fi
26805 echo "$as_me:26805: result: $cf_cv_gnat_version" >&5
26806 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26807 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26808 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26809
26810         fi
26811         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26812
26813         unset cf_TEMP_gnat
26814         unset cf_cv_gnat_version
26815         unset ac_cv_path_cf_TEMP_gnat
26816 done
26817
26818 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26819         cf_ada_make=
26820         cf_cv_prog_gnat_correct=no
26821 else
26822         cf_ada_make=gnatmake
26823         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26824                 # gprconfig is newer than gnatmake; we can continue...
26825                 cf_ada_config="##"
26826         else
26827                 rm -rf ./conftest* ./*~conftest*
26828                 if mkdir conftest.src
26829                 then
26830                         cf_ada_config=""
26831                         cd conftest.src
26832                         for cf_gprconfig in Ada C
26833                         do
26834                                 echo "$as_me:26834: checking for gprconfig name for $cf_gprconfig" >&5
26835 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26836                                 if test "$cf_gprconfig" = C
26837                                 then
26838                                         for cf_gprconfig_param in \
26839                                                 "$cf_gprconfig,,,,GNATGCC" \
26840                                                 "$cf_gprconfig,,,,GCC" \
26841                                                 "$cf_gprconfig"
26842                                         do
26843                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26844                                                 test -n "$cf_gprconfig_value" && break
26845                                         done
26846                                 else
26847                                         cf_gprconfig_param=$cf_gprconfig
26848                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26849                                 fi
26850                                 if test -n "$cf_gprconfig_value"
26851                                 then
26852                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26853                                         echo "$as_me:26853: result: $cf_gprconfig_value" >&5
26854 echo "${ECHO_T}$cf_gprconfig_value" >&6
26855                                 else
26856                                         echo "$as_me:26856: result: missing" >&5
26857 echo "${ECHO_T}missing" >&6
26858                                         cf_ada_config="#"
26859                                         break
26860                                 fi
26861                         done
26862                         cd ..
26863                         rm -rf ./conftest* ./*~conftest*
26864                 fi
26865         fi
26866         if test "x$cf_ada_config" != "x#"
26867         then
26868
26869 echo "$as_me:26869: checking for gnat version" >&5
26870 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26871 if test "${cf_cv_gnat_version+set}" = set; then
26872   echo $ECHO_N "(cached) $ECHO_C" >&6
26873 else
26874
26875 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26876         grep '[0-9].[0-9][0-9]*' |\
26877         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26878
26879 fi
26880 echo "$as_me:26880: result: $cf_cv_gnat_version" >&5
26881 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26882 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26883
26884 case "$cf_cv_gnat_version" in
26885 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26886         cf_cv_prog_gnat_correct=yes
26887         ;;
26888 (*)
26889         { echo "$as_me:26889: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26890 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26891         cf_cv_prog_gnat_correct=no
26892         ;;
26893 esac
26894
26895                 # Extract the first word of "m4", so it can be a program name with args.
26896 set dummy m4; ac_word=$2
26897 echo "$as_me:26897: checking for $ac_word" >&5
26898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26899 if test "${ac_cv_prog_M4_exists+set}" = set; then
26900   echo $ECHO_N "(cached) $ECHO_C" >&6
26901 else
26902   if test -n "$M4_exists"; then
26903   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26904 else
26905   ac_save_IFS=$IFS; IFS=$ac_path_separator
26906 ac_dummy="$PATH"
26907 for ac_dir in $ac_dummy; do
26908   IFS=$ac_save_IFS
26909   test -z "$ac_dir" && ac_dir=.
26910   $as_executable_p "$ac_dir/$ac_word" || continue
26911 ac_cv_prog_M4_exists="yes"
26912 echo "$as_me:26912: found $ac_dir/$ac_word" >&5
26913 break
26914 done
26915
26916   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26917 fi
26918 fi
26919 M4_exists=$ac_cv_prog_M4_exists
26920 if test -n "$M4_exists"; then
26921   echo "$as_me:26921: result: $M4_exists" >&5
26922 echo "${ECHO_T}$M4_exists" >&6
26923 else
26924   echo "$as_me:26924: result: no" >&5
26925 echo "${ECHO_T}no" >&6
26926 fi
26927
26928                 if test "$ac_cv_prog_M4_exists" = no; then
26929                         cf_cv_prog_gnat_correct=no
26930                         { echo "$as_me:26930: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26931 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26932                 fi
26933                 if test "$cf_cv_prog_gnat_correct" = yes; then
26934                         echo "$as_me:26934: checking if GNAT works" >&5
26935 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26936
26937 rm -rf ./conftest* ./*~conftest*
26938 cat >>conftest.ads <<CF_EOF
26939 procedure conftest;
26940 CF_EOF
26941 cat >>conftest.adb <<CF_EOF
26942 with Text_IO;
26943 with GNAT.OS_Lib;
26944 procedure conftest is
26945 begin
26946    Text_IO.Put ("Hello World");
26947    Text_IO.New_Line;
26948    GNAT.OS_Lib.OS_Exit (0);
26949 end conftest;
26950 CF_EOF
26951 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26952    if ( ./conftest 1>&5 2>&1 ) ; then
26953       cf_cv_prog_gnat_correct=yes
26954    else
26955       cf_cv_prog_gnat_correct=no
26956    fi
26957 else
26958    cf_cv_prog_gnat_correct=no
26959 fi
26960 rm -rf ./conftest* ./*~conftest*
26961
26962                         echo "$as_me:26962: result: $cf_cv_prog_gnat_correct" >&5
26963 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26964                 fi
26965         else
26966                 cf_cv_prog_gnat_correct=no
26967         fi
26968 fi
26969
26970                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26971
26972         ADAFLAGS="$ADAFLAGS -gnatpn"
26973
26974         echo "$as_me:26974: checking optimization options for ADAFLAGS" >&5
26975 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26976         case "$CFLAGS" in
26977         (*-g*)
26978
26979         ADAFLAGS="$ADAFLAGS -g"
26980
26981                 ;;
26982         esac
26983         case "$CFLAGS" in
26984         (*-O*)
26985                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26986
26987         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26988
26989                 ;;
26990         esac
26991         echo "$as_me:26991: result: $ADAFLAGS" >&5
26992 echo "${ECHO_T}$ADAFLAGS" >&6
26993
26994 echo "$as_me:26994: checking if GNATPREP supports -T option" >&5
26995 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26996 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26997   echo $ECHO_N "(cached) $ECHO_C" >&6
26998 else
26999
27000 cf_cv_gnatprep_opt_t=no
27001 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27002
27003 fi
27004 echo "$as_me:27004: result: $cf_cv_gnatprep_opt_t" >&5
27005 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27006 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27007
27008 echo "$as_me:27008: checking if GNAT supports generics" >&5
27009 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27010 case "$cf_cv_gnat_version" in
27011 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27012         cf_gnat_generics=yes
27013         ;;
27014 (*)
27015         cf_gnat_generics=no
27016         ;;
27017 esac
27018 echo "$as_me:27018: result: $cf_gnat_generics" >&5
27019 echo "${ECHO_T}$cf_gnat_generics" >&6
27020
27021 if test "$cf_gnat_generics" = yes
27022 then
27023         cf_compile_generics=generics
27024         cf_generic_objects="\${GENOBJS}"
27025 else
27026         cf_compile_generics=
27027         cf_generic_objects=
27028 fi
27029
27030 echo "$as_me:27030: checking if GNAT supports SIGINT" >&5
27031 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27032 if test "${cf_cv_gnat_sigint+set}" = set; then
27033   echo $ECHO_N "(cached) $ECHO_C" >&6
27034 else
27035
27036 rm -rf ./conftest* ./*~conftest*
27037 cat >>conftest.ads <<CF_EOF
27038 with Ada.Interrupts.Names;
27039
27040 package ConfTest is
27041
27042    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27043    pragma Unreserve_All_Interrupts;
27044    pragma Warnings (On);
27045
27046    protected Process is
27047       procedure Stop;
27048       function Continue return Boolean;
27049       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27050    private
27051       Done : Boolean := False;
27052    end Process;
27053
27054 end ConfTest;
27055 CF_EOF
27056 cat >>conftest.adb <<CF_EOF
27057 package body ConfTest is
27058    protected body Process is
27059       procedure Stop is
27060       begin
27061          Done := True;
27062       end Stop;
27063       function Continue return Boolean is
27064       begin
27065          return not Done;
27066       end Continue;
27067    end Process;
27068 end ConfTest;
27069 CF_EOF
27070 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27071       cf_cv_gnat_sigint=yes
27072 else
27073    cf_cv_gnat_sigint=no
27074 fi
27075 rm -rf ./conftest* ./*~conftest*
27076
27077 fi
27078 echo "$as_me:27078: result: $cf_cv_gnat_sigint" >&5
27079 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27080
27081 if test "$cf_cv_gnat_sigint" = yes ; then
27082         USE_GNAT_SIGINT=""
27083 else
27084         USE_GNAT_SIGINT="#"
27085 fi
27086
27087 cf_gnat_libraries=no
27088 cf_gnat_projects=no
27089
27090 if test "$enable_gnat_projects" != no ; then
27091 echo "$as_me:27091: checking if GNAT supports project files" >&5
27092 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27093 case "$cf_cv_gnat_version" in
27094 (3.[0-9]*)
27095         ;;
27096 (*)
27097         case "$cf_cv_system_name" in
27098         (cygwin*|msys*)
27099                 ;;
27100         (*)
27101                 rm -rf ./conftest* ./*~conftest*
27102                 if mkdir conftest.src conftest.bin conftest.lib
27103                 then
27104                         cd conftest.src
27105                         rm -rf ./conftest* ./*~conftest*
27106                         cat >>library.gpr <<CF_EOF
27107 project Library is
27108   Kind := External ("LIB_KIND");
27109   for Library_Name use "ConfTest";
27110   for Object_Dir use ".";
27111   for Library_ALI_Dir use External("LIBRARY_DIR");
27112   for Library_Version use External ("SONAME");
27113   for Library_Kind use Kind;
27114   for Library_Dir use External("BUILD_DIR");
27115   Source_Dir := External ("SOURCE_DIR");
27116   for Source_Dirs use (Source_Dir);
27117 end Library;
27118 CF_EOF
27119                         cat >>confpackage.ads <<CF_EOF
27120 package ConfPackage is
27121    procedure conftest;
27122 end ConfPackage;
27123 CF_EOF
27124                         cat >>confpackage.adb <<CF_EOF
27125 with Text_IO;
27126 package body ConfPackage is
27127    procedure conftest is
27128    begin
27129       Text_IO.Put ("Hello World");
27130       Text_IO.New_Line;
27131    end conftest;
27132 end ConfPackage;
27133 CF_EOF
27134                         if ( "$cf_ada_make" $ADAFLAGS \
27135                                         -Plibrary.gpr \
27136                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27137                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27138                                         -XSOURCE_DIR="`pwd`" \
27139                                         -XSONAME=libConfTest.so.1 \
27140                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27141                                 cf_gnat_projects=yes
27142                         fi
27143                         cd ..
27144                 fi
27145                 if test -f conftest.lib/confpackage.ali
27146                 then
27147                         cf_gnat_libraries=yes
27148                 fi
27149                 rm -rf ./conftest* ./*~conftest*
27150                 ;;
27151         esac
27152         ;;
27153 esac
27154 echo "$as_me:27154: result: $cf_gnat_projects" >&5
27155 echo "${ECHO_T}$cf_gnat_projects" >&6
27156 fi # enable_gnat_projects
27157
27158 if test "$cf_gnat_projects" = yes
27159 then
27160         echo "$as_me:27160: checking if GNAT supports libraries" >&5
27161 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27162         echo "$as_me:27162: result: $cf_gnat_libraries" >&5
27163 echo "${ECHO_T}$cf_gnat_libraries" >&6
27164 fi
27165
27166 USE_OLD_MAKERULES=""
27167 USE_GNAT_PROJECTS="#"
27168 USE_GNAT_MAKE_GPR="#"
27169 USE_GNAT_GPRBUILD="#"
27170
27171 if test "$cf_gnat_projects" = yes
27172 then
27173         USE_OLD_MAKERULES="#"
27174         USE_GNAT_PROJECTS=""
27175         if test "$cf_cv_VERSION_GPRBUILD" != no
27176         then
27177                 USE_GNAT_GPRBUILD=""
27178         elif test "$cf_cv_VERSION_GNATMAKE" != no
27179         then
27180                 USE_GNAT_MAKE_GPR=""
27181         else
27182                 { echo "$as_me:27182: WARNING: use old makefile rules since tools are missing" >&5
27183 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27184         fi
27185 fi
27186
27187 if test "$cf_gnat_libraries" = yes
27188 then
27189         USE_GNAT_LIBRARIES=""
27190 else
27191         USE_GNAT_LIBRARIES="#"
27192 fi
27193
27194 echo "$as_me:27194: checking for ada-compiler" >&5
27195 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27196
27197 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27198 if test "${with_ada_compiler+set}" = set; then
27199   withval="$with_ada_compiler"
27200   cf_ada_compiler=$withval
27201 else
27202   cf_ada_compiler=gnatmake
27203 fi;
27204
27205 echo "$as_me:27205: result: $cf_ada_compiler" >&5
27206 echo "${ECHO_T}$cf_ada_compiler" >&6
27207
27208                         cf_ada_package=terminal_interface
27209
27210 echo "$as_me:27210: checking for ada-include" >&5
27211 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27212
27213 # Check whether --with-ada-include or --without-ada-include was given.
27214 if test "${with_ada_include+set}" = set; then
27215   withval="$with_ada_include"
27216
27217 else
27218   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27219 fi; if test -n "$prefix/share/ada/adainclude" ; then
27220
27221 if test "x$prefix" != xNONE; then
27222         cf_path_syntax="$prefix"
27223 else
27224         cf_path_syntax="$ac_default_prefix"
27225 fi
27226
27227 case ".$withval" in
27228 (.\$\(*\)*|.\'*\'*)
27229         ;;
27230 (..|./*|.\\*)
27231         ;;
27232 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27233         ;;
27234 (.\$\{*prefix\}*|.\$\{*dir\}*)
27235         eval withval="$withval"
27236         case ".$withval" in
27237         (.NONE/*)
27238                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27239                 ;;
27240         esac
27241         ;;
27242 (.no|.NONE/*)
27243         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27244         ;;
27245 (*)
27246         { { echo "$as_me:27246: error: expected a pathname, not \"$withval\"" >&5
27247 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27248    { (exit 1); exit 1; }; }
27249         ;;
27250 esac
27251
27252 fi
27253 eval ADA_INCLUDE="$withval"
27254
27255 echo "$as_me:27255: result: $ADA_INCLUDE" >&5
27256 echo "${ECHO_T}$ADA_INCLUDE" >&6
27257
27258 echo "$as_me:27258: checking for ada-objects" >&5
27259 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27260
27261 # Check whether --with-ada-objects or --without-ada-objects was given.
27262 if test "${with_ada_objects+set}" = set; then
27263   withval="$with_ada_objects"
27264
27265 else
27266   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27267 fi; if test -n "$prefix/lib/ada/adalib" ; then
27268
27269 if test "x$prefix" != xNONE; then
27270         cf_path_syntax="$prefix"
27271 else
27272         cf_path_syntax="$ac_default_prefix"
27273 fi
27274
27275 case ".$withval" in
27276 (.\$\(*\)*|.\'*\'*)
27277         ;;
27278 (..|./*|.\\*)
27279         ;;
27280 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27281         ;;
27282 (.\$\{*prefix\}*|.\$\{*dir\}*)
27283         eval withval="$withval"
27284         case ".$withval" in
27285         (.NONE/*)
27286                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27287                 ;;
27288         esac
27289         ;;
27290 (.no|.NONE/*)
27291         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27292         ;;
27293 (*)
27294         { { echo "$as_me:27294: error: expected a pathname, not \"$withval\"" >&5
27295 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27296    { (exit 1); exit 1; }; }
27297         ;;
27298 esac
27299
27300 fi
27301 eval ADA_OBJECTS="$withval"
27302
27303 echo "$as_me:27303: result: $ADA_OBJECTS" >&5
27304 echo "${ECHO_T}$ADA_OBJECTS" >&6
27305
27306 echo "$as_me:27306: checking if an Ada95 shared-library should be built" >&5
27307 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27308
27309 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27310 if test "${with_ada_sharedlib+set}" = set; then
27311   withval="$with_ada_sharedlib"
27312   with_ada_sharedlib=$withval
27313 else
27314   with_ada_sharedlib=no
27315 fi;
27316 echo "$as_me:27316: result: $with_ada_sharedlib" >&5
27317 echo "${ECHO_T}$with_ada_sharedlib" >&6
27318
27319 if test "x$with_ada_sharedlib" != xno
27320 then
27321         if test "x$cf_gnat_projects" != xyes
27322         then
27323                 { echo "$as_me:27323: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27324 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27325                 with_ada_sharedlib=no
27326         fi
27327 fi
27328
27329 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27330 MAKE_ADA_SHAREDLIB="#"
27331
27332 if test "x$with_ada_sharedlib" != xno
27333 then
27334         MAKE_ADA_SHAREDLIB=
27335         if test "x$with_ada_sharedlib" != xyes
27336         then
27337                 ADA_SHAREDLIB="$with_ada_sharedlib"
27338         fi
27339 fi
27340
27341                         # allow the Ada binding to be renamed
27342
27343 echo "$as_me:27343: checking for ada-libname" >&5
27344 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27345
27346 # Check whether --with-ada-libname or --without-ada-libname was given.
27347 if test "${with_ada_libname+set}" = set; then
27348   withval="$with_ada_libname"
27349   ADA_LIBNAME=$withval
27350 else
27351   ADA_LIBNAME=AdaCurses
27352 fi;
27353 case "x$ADA_LIBNAME" in
27354 (x|xyes|xno)
27355         ADA_LIBNAME=AdaCurses
27356         ;;
27357 esac
27358
27359 echo "$as_me:27359: result: $ADA_LIBNAME" >&5
27360 echo "${ECHO_T}$ADA_LIBNAME" >&6
27361
27362                 fi
27363         fi
27364 else
27365         cf_with_ada=no
27366 fi
27367
27368 # do this "late" to avoid conflict with header-checks
27369 if test "x$with_widec" = xyes ; then
27370         echo "$as_me:27370: checking for wchar_t" >&5
27371 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27372 if test "${ac_cv_type_wchar_t+set}" = set; then
27373   echo $ECHO_N "(cached) $ECHO_C" >&6
27374 else
27375   cat >"conftest.$ac_ext" <<_ACEOF
27376 #line 27376 "configure"
27377 #include "confdefs.h"
27378 $ac_includes_default
27379 int
27380 main (void)
27381 {
27382 if ((wchar_t *) 0)
27383   return 0;
27384 if (sizeof (wchar_t))
27385   return 0;
27386   ;
27387   return 0;
27388 }
27389 _ACEOF
27390 rm -f "conftest.$ac_objext"
27391 if { (eval echo "$as_me:27391: \"$ac_compile\"") >&5
27392   (eval $ac_compile) 2>&5
27393   ac_status=$?
27394   echo "$as_me:27394: \$? = $ac_status" >&5
27395   (exit "$ac_status"); } &&
27396          { ac_try='test -s "conftest.$ac_objext"'
27397   { (eval echo "$as_me:27397: \"$ac_try\"") >&5
27398   (eval $ac_try) 2>&5
27399   ac_status=$?
27400   echo "$as_me:27400: \$? = $ac_status" >&5
27401   (exit "$ac_status"); }; }; then
27402   ac_cv_type_wchar_t=yes
27403 else
27404   echo "$as_me: failed program was:" >&5
27405 cat "conftest.$ac_ext" >&5
27406 ac_cv_type_wchar_t=no
27407 fi
27408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27409 fi
27410 echo "$as_me:27410: result: $ac_cv_type_wchar_t" >&5
27411 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27412
27413 echo "$as_me:27413: checking size of wchar_t" >&5
27414 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27415 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27416   echo $ECHO_N "(cached) $ECHO_C" >&6
27417 else
27418   if test "$ac_cv_type_wchar_t" = yes; then
27419   if test "$cross_compiling" = yes; then
27420   # Depending upon the size, compute the lo and hi bounds.
27421 cat >"conftest.$ac_ext" <<_ACEOF
27422 #line 27422 "configure"
27423 #include "confdefs.h"
27424 $ac_includes_default
27425 int
27426 main (void)
27427 {
27428 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27429   ;
27430   return 0;
27431 }
27432 _ACEOF
27433 rm -f "conftest.$ac_objext"
27434 if { (eval echo "$as_me:27434: \"$ac_compile\"") >&5
27435   (eval $ac_compile) 2>&5
27436   ac_status=$?
27437   echo "$as_me:27437: \$? = $ac_status" >&5
27438   (exit "$ac_status"); } &&
27439          { ac_try='test -s "conftest.$ac_objext"'
27440   { (eval echo "$as_me:27440: \"$ac_try\"") >&5
27441   (eval $ac_try) 2>&5
27442   ac_status=$?
27443   echo "$as_me:27443: \$? = $ac_status" >&5
27444   (exit "$ac_status"); }; }; then
27445   ac_lo=0 ac_mid=0
27446   while :; do
27447     cat >"conftest.$ac_ext" <<_ACEOF
27448 #line 27448 "configure"
27449 #include "confdefs.h"
27450 $ac_includes_default
27451 int
27452 main (void)
27453 {
27454 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27455   ;
27456   return 0;
27457 }
27458 _ACEOF
27459 rm -f "conftest.$ac_objext"
27460 if { (eval echo "$as_me:27460: \"$ac_compile\"") >&5
27461   (eval $ac_compile) 2>&5
27462   ac_status=$?
27463   echo "$as_me:27463: \$? = $ac_status" >&5
27464   (exit "$ac_status"); } &&
27465          { ac_try='test -s "conftest.$ac_objext"'
27466   { (eval echo "$as_me:27466: \"$ac_try\"") >&5
27467   (eval $ac_try) 2>&5
27468   ac_status=$?
27469   echo "$as_me:27469: \$? = $ac_status" >&5
27470   (exit "$ac_status"); }; }; then
27471   ac_hi=$ac_mid; break
27472 else
27473   echo "$as_me: failed program was:" >&5
27474 cat "conftest.$ac_ext" >&5
27475 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27476 fi
27477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27478   done
27479 else
27480   echo "$as_me: failed program was:" >&5
27481 cat "conftest.$ac_ext" >&5
27482 ac_hi=-1 ac_mid=-1
27483   while :; do
27484     cat >"conftest.$ac_ext" <<_ACEOF
27485 #line 27485 "configure"
27486 #include "confdefs.h"
27487 $ac_includes_default
27488 int
27489 main (void)
27490 {
27491 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27492   ;
27493   return 0;
27494 }
27495 _ACEOF
27496 rm -f "conftest.$ac_objext"
27497 if { (eval echo "$as_me:27497: \"$ac_compile\"") >&5
27498   (eval $ac_compile) 2>&5
27499   ac_status=$?
27500   echo "$as_me:27500: \$? = $ac_status" >&5
27501   (exit "$ac_status"); } &&
27502          { ac_try='test -s "conftest.$ac_objext"'
27503   { (eval echo "$as_me:27503: \"$ac_try\"") >&5
27504   (eval $ac_try) 2>&5
27505   ac_status=$?
27506   echo "$as_me:27506: \$? = $ac_status" >&5
27507   (exit "$ac_status"); }; }; then
27508   ac_lo=$ac_mid; break
27509 else
27510   echo "$as_me: failed program was:" >&5
27511 cat "conftest.$ac_ext" >&5
27512 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27513 fi
27514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27515   done
27516 fi
27517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27518 # Binary search between lo and hi bounds.
27519 while test "x$ac_lo" != "x$ac_hi"; do
27520   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27521   cat >"conftest.$ac_ext" <<_ACEOF
27522 #line 27522 "configure"
27523 #include "confdefs.h"
27524 $ac_includes_default
27525 int
27526 main (void)
27527 {
27528 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27529   ;
27530   return 0;
27531 }
27532 _ACEOF
27533 rm -f "conftest.$ac_objext"
27534 if { (eval echo "$as_me:27534: \"$ac_compile\"") >&5
27535   (eval $ac_compile) 2>&5
27536   ac_status=$?
27537   echo "$as_me:27537: \$? = $ac_status" >&5
27538   (exit "$ac_status"); } &&
27539          { ac_try='test -s "conftest.$ac_objext"'
27540   { (eval echo "$as_me:27540: \"$ac_try\"") >&5
27541   (eval $ac_try) 2>&5
27542   ac_status=$?
27543   echo "$as_me:27543: \$? = $ac_status" >&5
27544   (exit "$ac_status"); }; }; then
27545   ac_hi=$ac_mid
27546 else
27547   echo "$as_me: failed program was:" >&5
27548 cat "conftest.$ac_ext" >&5
27549 ac_lo=`expr "$ac_mid" + 1`
27550 fi
27551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27552 done
27553 ac_cv_sizeof_wchar_t=$ac_lo
27554 else
27555   if test "$cross_compiling" = yes; then
27556   { { echo "$as_me:27556: error: cannot run test program while cross compiling" >&5
27557 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27558    { (exit 1); exit 1; }; }
27559 else
27560   cat >"conftest.$ac_ext" <<_ACEOF
27561 #line 27561 "configure"
27562 #include "confdefs.h"
27563 $ac_includes_default
27564 int
27565 main (void)
27566 {
27567 FILE *f = fopen ("conftest.val", "w");
27568 if (!f)
27569   $ac_main_return (1);
27570 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27571 fclose (f);
27572   ;
27573   return 0;
27574 }
27575 _ACEOF
27576 rm -f "conftest$ac_exeext"
27577 if { (eval echo "$as_me:27577: \"$ac_link\"") >&5
27578   (eval $ac_link) 2>&5
27579   ac_status=$?
27580   echo "$as_me:27580: \$? = $ac_status" >&5
27581   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27582   { (eval echo "$as_me:27582: \"$ac_try\"") >&5
27583   (eval $ac_try) 2>&5
27584   ac_status=$?
27585   echo "$as_me:27585: \$? = $ac_status" >&5
27586   (exit "$ac_status"); }; }; then
27587   ac_cv_sizeof_wchar_t=`cat conftest.val`
27588 else
27589   echo "$as_me: program exited with status $ac_status" >&5
27590 echo "$as_me: failed program was:" >&5
27591 cat "conftest.$ac_ext" >&5
27592 fi
27593 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27594 fi
27595 fi
27596 rm -f conftest.val
27597 else
27598   ac_cv_sizeof_wchar_t=0
27599 fi
27600 fi
27601 echo "$as_me:27601: result: $ac_cv_sizeof_wchar_t" >&5
27602 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27603 cat >>confdefs.h <<EOF
27604 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27605 EOF
27606
27607         # cross-compiling to mingw can run into the problem that attempting to
27608         # link with the regex library fails, causing the test to not set this to
27609         # a number.  "recent" autoconf does not address this problem either -TD
27610         if test -z "$ac_cv_sizeof_wchar_t"
27611         then
27612                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27613
27614 echo "${as_me:-configure}:27614: testing test failed (assume 2) ..." 1>&5
27615
27616                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27617                 mv confdefs.tmp confdefs.h
27618                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27619         fi
27620 fi
27621
27622 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27623 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27624 ###
27625 ### ticlib modules may be a separate library, otherwise contained in termlib.
27626 ### termlib modules may be a separate library, otherwise contained in ncurses.
27627 ###
27628 ### The of "+" or " " between the tokens controls the way the script
27629 ### chooses to split module lists into libraries.
27630 ###
27631 ### (see CF_LIB_RULES).
27632 echo "$as_me:27632: checking for library subsets" >&5
27633 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27634 LIB_SUBSETS=
27635
27636 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27637         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27638         if test "$with_ticlib" != no ; then
27639                 LIB_SUBSETS="${LIB_SUBSETS} "
27640         else
27641                 LIB_SUBSETS="${LIB_SUBSETS}+"
27642         fi
27643 fi
27644
27645 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27646 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27647
27648 if test "$with_termlib" != no ; then
27649         LIB_SUBSETS="${LIB_SUBSETS} "
27650 else
27651         LIB_SUBSETS="${LIB_SUBSETS}+"
27652 fi
27653
27654 LIB_SUBSETS="${LIB_SUBSETS}base"
27655
27656 # Most term-driver calls are to tinfo, but some like init_pair are to the
27657 # base library (so it resides in base).
27658 if test "$with_term_driver" != no ; then
27659         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27660         case "$cf_cv_system_name" in
27661         (*mingw32*|*mingw64*)
27662                 if test "x$with_exp_win32" = xyes ; then
27663                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27664                 else
27665                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27666                 fi
27667                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27668                 ;;
27669         (*)
27670                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27671                 ;;
27672         esac
27673 elif test "x$with_exp_win32" = xyes ; then
27674         case "$cf_cv_system_name" in
27675         (*mingw32*|*mingw64*)
27676                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27677                 ;;
27678         (*)
27679                 ;;
27680         esac
27681 fi
27682
27683 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27684 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27685
27686 echo "$as_me:27686: result: $LIB_SUBSETS" >&5
27687 echo "${ECHO_T}$LIB_SUBSETS" >&6
27688
27689 ### Construct the list of include-directories to be generated
27690
27691 if test "$srcdir" != "."; then
27692         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27693 fi
27694 CPPFLAGS="-I../include $CPPFLAGS"
27695 if test "$srcdir" != "."; then
27696         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27697 fi
27698 CPPFLAGS="-I. $CPPFLAGS"
27699
27700 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27701 if test "$srcdir" != "."; then
27702         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27703 fi
27704 if test "$GCC" != yes; then
27705         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27706 elif test "$includedir" != "/usr/include"; then
27707         if test "$includedir" = '${prefix}/include' ; then
27708                 if test x$prefix != x/usr ; then
27709                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27710                 fi
27711         else
27712                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27713         fi
27714 fi
27715
27716 ### Build up pieces for makefile rules
27717 echo "$as_me:27717: checking default library suffix" >&5
27718 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27719
27720         case $DFT_LWR_MODEL in
27721         (libtool) DFT_ARG_SUFFIX=''   ;;
27722         (normal)  DFT_ARG_SUFFIX=''   ;;
27723         (debug)   DFT_ARG_SUFFIX='_g' ;;
27724         (profile) DFT_ARG_SUFFIX='_p' ;;
27725         (shared)  DFT_ARG_SUFFIX=''   ;;
27726         esac
27727         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27728 echo "$as_me:27728: result: $DFT_ARG_SUFFIX" >&5
27729 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27730
27731 echo "$as_me:27731: checking default library-dependency suffix" >&5
27732 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27733
27734         case X$DFT_LWR_MODEL in
27735         (Xlibtool)
27736                 DFT_LIB_SUFFIX='.la'
27737                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27738                 ;;
27739         (Xdebug)
27740                 case "$cf_cv_system_name" in
27741                 (*-msvc*)
27742                         DFT_LIB_SUFFIX='_g.lib'
27743                         ;;
27744                 (*)
27745                         DFT_LIB_SUFFIX='_g.a'
27746                         ;;
27747                 esac
27748                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27749                 ;;
27750         (Xprofile)
27751                 case "$cf_cv_system_name" in
27752                 (*-msvc*)
27753                         DFT_LIB_SUFFIX='_p.lib'
27754                         ;;
27755                 (*)
27756                         DFT_LIB_SUFFIX='_p.a'
27757                         ;;
27758                 esac
27759                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27760                 ;;
27761         (Xshared)
27762                 case "$cf_cv_system_name" in
27763                 (aix[5-7]*)
27764                         DFT_LIB_SUFFIX='.so'
27765                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27766                         ;;
27767                 (*-msvc*)
27768                         DFT_LIB_SUFFIX='.dll'
27769                         DFT_DEP_SUFFIX='.dll.lib'
27770                         ;;
27771                 (cygwin*|msys*|mingw*)
27772                         DFT_LIB_SUFFIX='.dll'
27773                         DFT_DEP_SUFFIX='.dll.a'
27774                         ;;
27775                 (darwin*)
27776                         DFT_LIB_SUFFIX='.dylib'
27777                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27778                         ;;
27779                 (hpux*)
27780                         case "$target" in
27781                         (ia64*)
27782                                 DFT_LIB_SUFFIX='.so'
27783                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27784                                 ;;
27785                         (*)
27786                                 DFT_LIB_SUFFIX='.sl'
27787                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27788                                 ;;
27789                         esac
27790                         ;;
27791                 (*)
27792                         DFT_LIB_SUFFIX='.so'
27793                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27794                         ;;
27795                 esac
27796                 ;;
27797         (*)
27798                 case "$target" in
27799                 (*-msvc*)
27800                         DFT_LIB_SUFFIX='.lib'
27801                         ;;
27802                 (*)
27803                         DFT_LIB_SUFFIX='.a'
27804                         ;;
27805                 esac
27806                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27807                 ;;
27808         esac
27809         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27810         then
27811                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27812                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27813         fi
27814 echo "$as_me:27814: result: $DFT_DEP_SUFFIX" >&5
27815 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27816
27817 echo "$as_me:27817: checking default object directory" >&5
27818 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27819
27820         case $DFT_LWR_MODEL in
27821         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27822         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27823         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27824         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27825         (shared)
27826                 case "$cf_cv_system_name" in
27827                 (cygwin|msys)
27828                         DFT_OBJ_SUBDIR='objects' ;;
27829                 (*)
27830                         DFT_OBJ_SUBDIR='obj_s' ;;
27831                 esac
27832         esac
27833 echo "$as_me:27833: result: $DFT_OBJ_SUBDIR" >&5
27834 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27835
27836 if test "x$cf_with_cxx" = xyes ; then
27837 echo "$as_me:27837: checking c++ library-dependency suffix" >&5
27838 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27839 if test "$with_libtool" != "no"; then
27840         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27841         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27842 elif test "$with_shared_cxx" != "no"; then
27843         # also for g++ users...
27844         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27845 else
27846         # we normally make a static library because C/C++ library rules differ
27847
27848         case Xnormal in
27849         (Xlibtool)
27850                 CXX_LIB_SUFFIX='.la'
27851                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27852                 ;;
27853         (Xdebug)
27854                 case "$cf_cv_system_name" in
27855                 (*-msvc*)
27856                         CXX_LIB_SUFFIX='_g.lib'
27857                         ;;
27858                 (*)
27859                         CXX_LIB_SUFFIX='_g.a'
27860                         ;;
27861                 esac
27862                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27863                 ;;
27864         (Xprofile)
27865                 case "$cf_cv_system_name" in
27866                 (*-msvc*)
27867                         CXX_LIB_SUFFIX='_p.lib'
27868                         ;;
27869                 (*)
27870                         CXX_LIB_SUFFIX='_p.a'
27871                         ;;
27872                 esac
27873                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27874                 ;;
27875         (Xshared)
27876                 case "$cf_cv_system_name" in
27877                 (aix[5-7]*)
27878                         CXX_LIB_SUFFIX='.so'
27879                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27880                         ;;
27881                 (*-msvc*)
27882                         CXX_LIB_SUFFIX='.dll'
27883                         CXX_DEP_SUFFIX='.dll.lib'
27884                         ;;
27885                 (cygwin*|msys*|mingw*)
27886                         CXX_LIB_SUFFIX='.dll'
27887                         CXX_DEP_SUFFIX='.dll.a'
27888                         ;;
27889                 (darwin*)
27890                         CXX_LIB_SUFFIX='.dylib'
27891                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27892                         ;;
27893                 (hpux*)
27894                         case "$target" in
27895                         (ia64*)
27896                                 CXX_LIB_SUFFIX='.so'
27897                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27898                                 ;;
27899                         (*)
27900                                 CXX_LIB_SUFFIX='.sl'
27901                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27902                                 ;;
27903                         esac
27904                         ;;
27905                 (*)
27906                         CXX_LIB_SUFFIX='.so'
27907                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27908                         ;;
27909                 esac
27910                 ;;
27911         (*)
27912                 case "$target" in
27913                 (*-msvc*)
27914                         CXX_LIB_SUFFIX='.lib'
27915                         ;;
27916                 (*)
27917                         CXX_LIB_SUFFIX='.a'
27918                         ;;
27919                 esac
27920                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27921                 ;;
27922         esac
27923         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27924         then
27925                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27926                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27927         fi
27928
27929 fi
27930 echo "$as_me:27930: result: $CXX_LIB_SUFFIX" >&5
27931 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27932
27933 fi
27934
27935 # do not want -ldl in build except as needed for -lncurses dependency
27936 if test "x$with_dlsym" = xyes ; then
27937 if test "$DFT_LWR_MODEL" = shared || \
27938    test "$DFT_LWR_MODEL" = libtool ; then
27939
27940 # remove dl library from $LIBS
27941 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27942
27943 fi
27944 fi
27945 ### Set up low-level terminfo dependencies for makefiles.
27946
27947 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27948 # do not need libdl
27949 TICS_LIST=
27950 if test "x$with_dlsym" = xyes ; then
27951
27952 # remove dl library from $SHLIB_LIST
27953 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27954
27955 fi
27956
27957 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27958 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27959 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27960 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27961 then
27962         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27963 fi
27964
27965 if test "$with_ticlib" != no ; then
27966
27967         if test "x$with_ticlib" != xyes ; then
27968                 TICS_NAME=$with_ticlib
27969                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27970                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27971                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27972                 TICS_LIB_SUFFIX="${with_ticlib}"
27973         else
27974                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27975                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27976                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27977                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27978         fi
27979         TICS_LDFLAGS="-L${LIB_DIR}"
27980         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27981 else
27982         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27983         TICS_LDFLAGS="-L${LIB_DIR}"
27984         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27985 fi
27986
27987 if test "$with_termlib" != no ; then
27988
27989         if test "x$with_termlib" != xyes ; then
27990                 TINFO_NAME=$with_termlib
27991                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27992                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27993                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27994                 TINFO_LIB_SUFFIX="${with_termlib}"
27995         else
27996                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27997                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27998                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27999                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28000         fi
28001
28002         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28003         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28004         if test "$DFT_LWR_MODEL" = "libtool"; then
28005                 TEST_ARGS="${TEST_DEPS}"
28006                 TEST_ARG2="${TEST_DEP2}"
28007                 TINFO_LDFLAGS="-L${LIB_DIR}"
28008                 TINFO_LIBS="$TEST_ARGS"
28009                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28010                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28011         else
28012                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28013                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28014                 if test "x$with_term_driver" != xno ; then
28015                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28016                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28017                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28018                 else
28019                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28020                         TINFO_LIBS="$TEST_ARGS"
28021                 fi
28022                 TINFO_LDFLAGS="-L${LIB_DIR}"
28023                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28024         fi
28025 else
28026         # the next lines are needed for linking libtic over libncurses
28027         TINFO_NAME=${LIB_NAME}
28028         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28029         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28030         if test "x$with_tic_depends" = xyes ; then
28031                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28032         else
28033                 TICS_LIST="$SHLIB_LIST"
28034         fi
28035
28036         TINFO_LDFLAGS="-L${LIB_DIR}"
28037         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28038 fi
28039
28040 if test "$DFT_LWR_MODEL" = shared ; then
28041         case "$cf_cv_system_name" in
28042         (cygwin*|msys*)
28043                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28044                 TINFO_SUFFIX=.dll
28045                 ;;
28046         esac
28047 fi
28048
28049 if test "x$with_dlsym" = xyes ; then
28050
28051 # remove dl library from $TICS_LIST
28052 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28053
28054 fi
28055
28056 if test "$DFT_LWR_MODEL" = "libtool"; then
28057         OBJEXT=lo
28058 fi
28059
28060 # needed for Ada95
28061 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28062
28063 case "$DFT_LWR_MODEL" in
28064 (normal|debug|profile)
28065
28066 if test "$GCC" = yes ; then
28067         case "$cf_cv_system_name" in
28068         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28069                 LDFLAGS_STATIC=
28070                 LDFLAGS_SHARED=
28071                 ;;
28072         (*)     # normally, except when broken
28073                 LDFLAGS_STATIC=-static
28074                 LDFLAGS_SHARED=-dynamic
28075                 ;;
28076         esac
28077 else
28078         case "$cf_cv_system_name" in
28079         (aix[4-7]*)     # from ld manpage
28080                 LDFLAGS_STATIC=-bstatic
28081                 LDFLAGS_SHARED=-bdynamic
28082                 ;;
28083         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28084                 # We could also use just "archive" and "shared".
28085                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28086                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28087                 ;;
28088         (irix*)         # from ld manpage IRIX64
28089                 LDFLAGS_STATIC=-Bstatic
28090                 LDFLAGS_SHARED=-Bdynamic
28091                 ;;
28092         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28093                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28094                 LDFLAGS_STATIC=-noso
28095                 LDFLAGS_SHARED=-so_archive
28096                 ;;
28097         (solaris2*)
28098                 LDFLAGS_STATIC=-Bstatic
28099                 LDFLAGS_SHARED=-Bdynamic
28100                 ;;
28101         esac
28102 fi
28103
28104 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28105 then
28106         echo "$as_me:28106: checking if linker supports switching between static/dynamic" >&5
28107 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28108
28109         rm -f libconftest.a
28110         cat >conftest.$ac_ext <<EOF
28111 #line 28111 "configure"
28112 #include <stdio.h>
28113 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28114 EOF
28115         if { (eval echo "$as_me:28115: \"$ac_compile\"") >&5
28116   (eval $ac_compile) 2>&5
28117   ac_status=$?
28118   echo "$as_me:28118: \$? = $ac_status" >&5
28119   (exit "$ac_status"); } ; then
28120                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28121                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28122         fi
28123         rm -f conftest.*
28124
28125         cf_save_LIBS="$LIBS"
28126
28127         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28128         cat >"conftest.$ac_ext" <<_ACEOF
28129 #line 28129 "configure"
28130 #include "confdefs.h"
28131
28132 #line 28132 "configure"
28133 #include <stdio.h>
28134 int cf_ldflags_static(FILE *fp);
28135
28136 int
28137 main (void)
28138 {
28139
28140         return cf_ldflags_static(stdin);
28141
28142   ;
28143   return 0;
28144 }
28145 _ACEOF
28146 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28147 if { (eval echo "$as_me:28147: \"$ac_link\"") >&5
28148   (eval $ac_link) 2>&5
28149   ac_status=$?
28150   echo "$as_me:28150: \$? = $ac_status" >&5
28151   (exit "$ac_status"); } &&
28152          { ac_try='test -s "conftest$ac_exeext"'
28153   { (eval echo "$as_me:28153: \"$ac_try\"") >&5
28154   (eval $ac_try) 2>&5
28155   ac_status=$?
28156   echo "$as_me:28156: \$? = $ac_status" >&5
28157   (exit "$ac_status"); }; }; then
28158
28159         # some linkers simply ignore the -dynamic
28160         case x`file "conftest$ac_exeext" 2>/dev/null` in
28161         (*static*)
28162                 cf_ldflags_static=no
28163                 ;;
28164         (*)
28165                 cf_ldflags_static=yes
28166                 ;;
28167         esac
28168
28169 else
28170   echo "$as_me: failed program was:" >&5
28171 cat "conftest.$ac_ext" >&5
28172 cf_ldflags_static=no
28173 fi
28174 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28175
28176         rm -f libconftest.*
28177         LIBS="$cf_save_LIBS"
28178
28179         echo "$as_me:28179: result: $cf_ldflags_static" >&5
28180 echo "${ECHO_T}$cf_ldflags_static" >&6
28181
28182         if test "$cf_ldflags_static" != yes
28183         then
28184                 LDFLAGS_STATIC=
28185                 LDFLAGS_SHARED=
28186         fi
28187 else
28188         LDFLAGS_STATIC=
28189         LDFLAGS_SHARED=
28190 fi
28191
28192         ;;
28193 esac
28194
28195 echo "$as_me:28195: checking where we will install curses.h" >&5
28196 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28197
28198 includesubdir=
28199 if test "$with_overwrite" = no && \
28200  { test "x$includedir" = 'x${prefix}/include' || \
28201    test "x$includedir" = "x${prefix}/include"; }
28202 then
28203         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28204 fi
28205 echo "$as_me:28205: result: ${includedir}${includesubdir}" >&5
28206 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28207
28208 ### Resolve a conflict between normal and wide-curses by forcing applications
28209 ### that will need libutf8 to add it to their configure script.
28210 if test "$with_overwrite" != no ; then
28211 if test "$NCURSES_LIBUTF8" = 1 ; then
28212         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28213         { echo "$as_me:28213: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28214 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28215 fi
28216 fi
28217 WITH_OVERWRITE=$with_overwrite
28218
28219 ### At least on MinGW a shared library build without libtool
28220 ### requires adding the additional libs to the link list.
28221 case "$cf_cv_system_name" in
28222 (*mingw32*|*mingw64*)
28223         if test "$DFT_LWR_MODEL" != "libtool"; then
28224            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28225         fi
28226         ;;
28227 *)      ;;
28228 esac
28229
28230 # used to separate tack out of the tree
28231 NCURSES_TREE=
28232
28233 ### predefined stuff for the test programs
28234
28235 cat >>confdefs.h <<\EOF
28236 #define HAVE_SLK_COLOR 1
28237 EOF
28238
28239 # pkgsrc uses these
28240
28241 echo "$as_me:28241: checking for desired basename for form library" >&5
28242 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28243
28244 # Check whether --with-form-libname or --without-form-libname was given.
28245 if test "${with_form_libname+set}" = set; then
28246   withval="$with_form_libname"
28247   with_lib_basename=$withval
28248 else
28249   with_lib_basename=form
28250 fi;
28251 FORM_NAME="$with_lib_basename"
28252
28253 case "x$FORM_NAME" in
28254 (x|xno|xnone|xyes)
28255         FORM_NAME=form
28256         ;;
28257 (*)
28258         ;;
28259 esac
28260
28261 echo "$as_me:28261: result: $FORM_NAME" >&5
28262 echo "${ECHO_T}$FORM_NAME" >&6
28263
28264 echo "$as_me:28264: checking for desired basename for menu library" >&5
28265 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28266
28267 # Check whether --with-menu-libname or --without-menu-libname was given.
28268 if test "${with_menu_libname+set}" = set; then
28269   withval="$with_menu_libname"
28270   with_lib_basename=$withval
28271 else
28272   with_lib_basename=menu
28273 fi;
28274 MENU_NAME="$with_lib_basename"
28275
28276 case "x$MENU_NAME" in
28277 (x|xno|xnone|xyes)
28278         MENU_NAME=menu
28279         ;;
28280 (*)
28281         ;;
28282 esac
28283
28284 echo "$as_me:28284: result: $MENU_NAME" >&5
28285 echo "${ECHO_T}$MENU_NAME" >&6
28286
28287 echo "$as_me:28287: checking for desired basename for panel library" >&5
28288 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28289
28290 # Check whether --with-panel-libname or --without-panel-libname was given.
28291 if test "${with_panel_libname+set}" = set; then
28292   withval="$with_panel_libname"
28293   with_lib_basename=$withval
28294 else
28295   with_lib_basename=panel
28296 fi;
28297 PANEL_NAME="$with_lib_basename"
28298
28299 case "x$PANEL_NAME" in
28300 (x|xno|xnone|xyes)
28301         PANEL_NAME=panel
28302         ;;
28303 (*)
28304         ;;
28305 esac
28306
28307 echo "$as_me:28307: result: $PANEL_NAME" >&5
28308 echo "${ECHO_T}$PANEL_NAME" >&6
28309
28310 echo "$as_me:28310: checking for desired basename for cxx library" >&5
28311 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28312
28313 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28314 if test "${with_cxx_libname+set}" = set; then
28315   withval="$with_cxx_libname"
28316   with_lib_basename=$withval
28317 else
28318   with_lib_basename=ncurses++
28319 fi;
28320 CXX_NAME="$with_lib_basename"
28321
28322 case "x$CXX_NAME" in
28323 (x|xno|xnone|xyes)
28324         CXX_NAME=ncurses++
28325         ;;
28326 (*)
28327         ;;
28328 esac
28329
28330 echo "$as_me:28330: result: $CXX_NAME" >&5
28331 echo "${ECHO_T}$CXX_NAME" >&6
28332
28333 ### Construct the list of subdirectories for which we'll customize makefiles
28334 ### with the appropriate compile-rules.
28335
28336 echo "$as_me:28336: checking for src modules" >&5
28337 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28338
28339 # dependencies and linker-arguments for test-programs
28340 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28341 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28342 if test "$DFT_LWR_MODEL" = "libtool"; then
28343         TEST_ARGS="${TEST_DEPS}"
28344         TEST_ARG2="${TEST_DEP2}"
28345 else
28346         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28347         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28348 fi
28349
28350 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28351 cf_cv_src_modules=
28352 for cf_dir in $modules_to_build
28353 do
28354         if test -f "$srcdir/$cf_dir/modules" ; then
28355
28356                 # We may/may not have tack in the distribution, though the
28357                 # makefile is.
28358                 if test "$cf_dir" = tack ; then
28359                         if test "x$cf_with_tack" != "xyes"; then
28360                                 continue
28361                         fi
28362                 fi
28363
28364                 if test -z "$cf_cv_src_modules"; then
28365                         cf_cv_src_modules=$cf_dir
28366                 else
28367                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28368                 fi
28369
28370                 # Make the ncurses_cfg.h file record the library interface files as
28371                 # well.  These are header files that are the same name as their
28372                 # directory.  Ncurses is the only library that does not follow
28373                 # that pattern.
28374                 if test "$cf_dir" = tack ; then
28375                         continue
28376                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28377
28378 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28379
28380                         cat >>confdefs.h <<EOF
28381 #define HAVE_${cf_have_include}_H 1
28382 EOF
28383
28384                         cat >>confdefs.h <<EOF
28385 #define HAVE_LIB${cf_have_include} 1
28386 EOF
28387
28388 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28389
28390 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28391
28392                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28393                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28394                         if test "$DFT_LWR_MODEL" = "libtool"; then
28395                                 TEST_ARGS="${TEST_DEPS}"
28396                                 TEST_ARG2="${TEST_DEP2}"
28397                         else
28398                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28399                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28400                         fi
28401                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28402                 fi
28403         fi
28404 done
28405 echo "$as_me:28405: result: $cf_cv_src_modules" >&5
28406 echo "${ECHO_T}$cf_cv_src_modules" >&6
28407
28408 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28409 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28410
28411 SRC_SUBDIRS=
28412 if test "x$cf_with_manpages" != xno ; then
28413         SRC_SUBDIRS="$SRC_SUBDIRS man"
28414 fi
28415 SRC_SUBDIRS="$SRC_SUBDIRS include"
28416 for cf_dir in $cf_cv_src_modules
28417 do
28418         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28419 done
28420 if test "x$cf_with_tests" != "xno" ; then
28421         SRC_SUBDIRS="$SRC_SUBDIRS test"
28422 fi
28423 # always make this, to install the ncurses-config script
28424 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28425 if test "$cf_with_cxx_binding" != no; then
28426         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28427         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28428 fi
28429
28430 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28431 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28432
28433 ADA_SUBDIRS=
28434 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28435         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28436         ADA_SUBDIRS="gen src"
28437         if test "x$cf_with_tests" != "xno" ; then
28438                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28439         fi
28440 fi
28441
28442 SUB_MAKEFILES=
28443 for cf_dir in $SRC_SUBDIRS
28444 do
28445         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28446 done
28447
28448 if test -n "$ADA_SUBDIRS"; then
28449         for cf_dir in $ADA_SUBDIRS
28450         do
28451                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28452         done
28453
28454 fi
28455
28456 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28457    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28458    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28459    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28460 fi
28461
28462 DIRS_TO_MAKE="lib"
28463 for cf_item in $cf_list_models
28464 do
28465
28466         case $cf_item in
28467         (libtool) cf_subdir='obj_lo'  ;;
28468         (normal)  cf_subdir='objects' ;;
28469         (debug)   cf_subdir='obj_g' ;;
28470         (profile) cf_subdir='obj_p' ;;
28471         (shared)
28472                 case "$cf_cv_system_name" in
28473                 (cygwin|msys)
28474                         cf_subdir='objects' ;;
28475                 (*)
28476                         cf_subdir='obj_s' ;;
28477                 esac
28478         esac
28479
28480         for cf_item2 in $DIRS_TO_MAKE
28481         do
28482                 test "$cf_item2" = "$cf_subdir" && break
28483         done
28484         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28485 done
28486 for cf_dir in $DIRS_TO_MAKE
28487 do
28488         test ! -d "$cf_dir" && mkdir "$cf_dir"
28489 done
28490
28491 # symbols that differ when compiling Ada95 by itself.
28492 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28493
28494 # values to use as strings
28495
28496 cat >>confdefs.h <<EOF
28497 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28498 EOF
28499
28500 cat >>confdefs.h <<EOF
28501 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28502 EOF
28503
28504 ### Define substitutions for header files to avoid name-pollution
28505
28506 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28507         HAVE_TCGETATTR=1
28508 else
28509         HAVE_TCGETATTR=0
28510 fi
28511
28512 if test "x$ac_cv_header_stdint_h" = xyes ; then
28513         HAVE_STDINT_H=1
28514 else
28515         HAVE_STDINT_H=0
28516 fi
28517
28518 if test "x$ac_cv_header_termio_h" = xyes ; then
28519         HAVE_TERMIO_H=1
28520 else
28521         HAVE_TERMIO_H=0
28522 fi
28523
28524 if test "x$ac_cv_header_termios_h" = xyes ; then
28525         HAVE_TERMIOS_H=1
28526 else
28527         HAVE_TERMIOS_H=0
28528 fi
28529
28530 ################################################################################
28531 test "x$use_database" = xyes && \
28532 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28533
28534 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28535 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28536
28537 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28538 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28539 fi
28540
28541 if test "x$cf_with_tests" != xno ; then
28542         MAKE_TESTS=
28543 else
28544         MAKE_TESTS="#"
28545 fi
28546
28547 ADAHTML_DIR=../../doc/html/ada
28548
28549 # workaround for OS/2 (20151017)
28550 case "$cf_cv_system_name" in
28551 (os2*)
28552         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28553         ;;
28554 (*)
28555         LIBTOOL_OPTS_CXX=
28556         ;;
28557 esac
28558
28559 # workaround for g++ versus Solaris (20131116)
28560 case "$cf_cv_system_name" in
28561 (solaris2*)
28562         case "x$CPPFLAGS" in
28563         (*-D_XOPEN_SOURCE_EXTENDED*)
28564                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28565
28566 echo "${as_me:-configure}:28566: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28567
28568                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28569                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28570                 ;;
28571         esac
28572         ;;
28573 esac
28574
28575 # Help to automatically enable the extended curses features when using either
28576 # the *-config or the ".pc" files by adding defines.
28577 echo "$as_me:28577: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28578 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28579 PKG_CFLAGS=
28580 for cf_loop1 in $CPPFLAGS_after_XOPEN
28581 do
28582         cf_found=no
28583         for cf_loop2 in $CPPFLAGS_before_XOPEN
28584         do
28585                 if test "x$cf_loop1" = "x$cf_loop2"
28586                 then
28587                         cf_found=yes
28588                         break
28589                 fi
28590         done
28591         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28592 done
28593 echo "$as_me:28593: result: $PKG_CFLAGS" >&5
28594 echo "${ECHO_T}$PKG_CFLAGS" >&6
28595
28596 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28597 case "x$NCURSES_OSPEED" in
28598 (*short*)
28599         cf_compatible=1
28600         ;;
28601 (*)
28602         cf_compatible=0
28603         ;;
28604 esac
28605
28606 cat >>confdefs.h <<EOF
28607 #define NCURSES_OSPEED_COMPAT $cf_compatible
28608 EOF
28609
28610 case "x$cf_cv_typeof_chtype" in
28611 (xshort|xint|xlong)
28612         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28613         ;;
28614 esac
28615
28616 case "x$cf_cv_typeof_mmask_t" in
28617 (xshort|xint|xlong)
28618         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28619         ;;
28620 esac
28621
28622 # substitute into misc/Makefile to suppress
28623 # (un)install.data from the
28624 # (un)install rules.
28625 if test "x$cf_with_db_install" = "xno"; then
28626         MISC_INSTALL_DATA=
28627         MISC_UNINSTALL_DATA=
28628 else
28629         MISC_INSTALL_DATA=install.data
28630         MISC_UNINSTALL_DATA=uninstall.data
28631 fi
28632
28633 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28634         MAKE_DATABASE="#"
28635 else
28636         MAKE_DATABASE="$MAKE_TERMINFO"
28637 fi
28638
28639 if test -n "$PACKAGE"
28640 then
28641         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28642         export PACKAGE
28643         echo "package: $PACKAGE"
28644 fi
28645
28646 UNALTERED_SYMS=
28647 cf_filter_syms=no
28648
28649 if test -n "$RESULTING_SYMS"
28650 then
28651         cf_filter_syms=$cf_dft_filter_syms
28652         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28653
28654 echo "${as_me:-configure}:28654: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28655
28656 fi
28657
28658 if test "x$WILDCARD_SYMS" = xno
28659 then
28660         cf_filter_syms=yes
28661 fi
28662
28663 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28664
28665 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28666 if test "$cf_filter_syms" = yes
28667 then
28668         RESULTING_SYMS=resulting.map
28669 fi
28670
28671 if test "x$cross_compiling" = xyes ; then
28672         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28673         CHECK_BUILD="#"
28674 else
28675         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28676         CHECK_BUILD=
28677 fi
28678
28679 # This is used for the *-config script and *.pc data files.
28680
28681 echo "$as_me:28681: checking for linker search path" >&5
28682 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28683 if test "${cf_cv_ld_searchpath+set}" = set; then
28684   echo $ECHO_N "(cached) $ECHO_C" >&6
28685 else
28686
28687 if test "$cross_compiling" != yes ; then
28688
28689 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28690 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28691
28692 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28693 # update the cache, which makes it run faster.
28694 test -z "$cf_pathlist" && \
28695         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28696
28697 test -z "$cf_pathlist" &&
28698         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28699
28700 # This works with OpenBSD 6.5, which lists only filenames
28701 test -z "$cf_pathlist" &&
28702         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28703
28704 if test -z "$cf_pathlist"
28705 then
28706         # dyld default path with MacOS
28707         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28708         then
28709                 # do this to bypass check
28710                 cf_cv_ld_searchpath='$HOME/lib'
28711                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28712         fi
28713 fi
28714
28715 if test -z "$cf_pathlist"
28716 then
28717         # Solaris is "SunOS"
28718         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28719         then
28720                 case x`(isainfo -b)` in
28721                 (x64)
28722                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28723                         ;;
28724                 (x32)
28725                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28726                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28727                         ;;
28728                 (*)
28729                         { echo "$as_me:28729: WARNING: problem with Solaris architecture" >&5
28730 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28731                         ;;
28732                 esac
28733         fi
28734 fi
28735
28736 if test -z "$cf_pathlist"
28737 then
28738         # HP-UX
28739         if test x"`uname -s`" = xHP-UX
28740         then
28741                 case x`getconf LONG_BIT` in
28742                 (x64)
28743                         cf_pathlist="/usr/lib/hpux64"
28744                         ;;
28745                 (x*)
28746                         cf_pathlist="/usr/lib/hpux32"
28747                         ;;
28748                 esac
28749         fi
28750 fi
28751
28752 fi
28753
28754 # If nothing else, assume it is conventional
28755 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28756
28757 # Finally, check that this is only directories
28758 for cf_path in $0 $cf_pathlist
28759 do
28760         if test -d "$cf_path"; then
28761                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28762                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28763         fi
28764 done
28765
28766 # Ensure that it is nonempty
28767 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28768
28769 fi
28770 echo "$as_me:28770: result: $cf_cv_ld_searchpath" >&5
28771 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28772
28773 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28774
28775 cat >>confdefs.h <<\EOF
28776 #define HAVE_CURSES_DATA_BOOLNAMES 1
28777 EOF
28778
28779 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"
28780 ac_config_commands="$ac_config_commands default"
28781 cat >confcache <<\_ACEOF
28782 # This file is a shell script that caches the results of configure
28783 # tests run on this system so they can be shared between configure
28784 # scripts and configure runs, see configure's option --config-cache.
28785 # It is not useful on other systems.  If it contains results you don't
28786 # want to keep, you may remove or edit it.
28787 #
28788 # config.status only pays attention to the cache file if you give it
28789 # the --recheck option to rerun configure.
28790 #
28791 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28792 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28793 # following values.
28794
28795 _ACEOF
28796
28797 # The following way of writing the cache mishandles newlines in values,
28798 # but we know of no workaround that is simple, portable, and efficient.
28799 # So, don't put newlines in cache variables' values.
28800 # Ultrix sh set writes to stderr and can't be redirected directly,
28801 # and sets the high bit in the cache file unless we assign to the vars.
28802 {
28803   (set) 2>&1 |
28804     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28805     *ac_space=\ *)
28806       # `set' does not quote correctly, so add quotes (double-quote
28807       # substitution turns \\\\ into \\, and sed turns \\ into \).
28808       sed -n \
28809         "s/'/'\\\\''/g;
28810           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28811       ;;
28812     *)
28813       # `set' quotes correctly as required by POSIX, so do not add quotes.
28814       sed -n \
28815         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28816       ;;
28817     esac;
28818 } |
28819   sed '
28820      t clear
28821      : clear
28822      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28823      t end
28824      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28825      : end' >>confcache
28826 if cmp -s $cache_file confcache; then :; else
28827   if test -w $cache_file; then
28828     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28829     cat confcache >$cache_file
28830   else
28831     echo "not updating unwritable cache $cache_file"
28832   fi
28833 fi
28834 rm -f confcache
28835
28836 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28837 # Let make expand exec_prefix.
28838 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28839
28840 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28841 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28842 # trailing colons and then remove the whole line if VPATH becomes empty
28843 # (actually we leave an empty line to preserve line numbers).
28844 if test "x$srcdir" = x.; then
28845   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28846 s/:*\$(srcdir):*/:/;
28847 s/:*\${srcdir}:*/:/;
28848 s/:*@srcdir@:*/:/;
28849 s/^\([^=]*=[    ]*\):*/\1/;
28850 s/:*$//;
28851 s/^[^=]*=[      ]*$//;
28852 }'
28853 fi
28854
28855 DEFS=-DHAVE_CONFIG_H
28856
28857 : "${CONFIG_STATUS=./config.status}"
28858 ac_clean_files_save=$ac_clean_files
28859 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28860 { echo "$as_me:28860: creating $CONFIG_STATUS" >&5
28861 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28862 cat >"$CONFIG_STATUS" <<_ACEOF
28863 #! $SHELL
28864 # Generated automatically by configure.
28865 # Run this file to recreate the current configuration.
28866 # Compiler output produced by configure, useful for debugging
28867 # configure, is in config.log if it exists.
28868
28869 debug=false
28870 SHELL=\${CONFIG_SHELL-$SHELL}
28871 ac_cs_invocation="\$0 \$@"
28872
28873 CLICOLOR_FORCE= GREP_OPTIONS=
28874 unset CLICOLOR_FORCE GREP_OPTIONS
28875 _ACEOF
28876
28877 cat >>"$CONFIG_STATUS" <<\_ACEOF
28878 # Be Bourne compatible
28879 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28880   emulate sh
28881   NULLCMD=:
28882 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28883   set -o posix
28884 fi
28885
28886 # Name of the executable.
28887 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28888
28889 if expr a : '\(a\)' >/dev/null 2>&1; then
28890   as_expr=expr
28891 else
28892   as_expr=false
28893 fi
28894
28895 rm -f conf$$ conf$$.exe conf$$.file
28896 echo >conf$$.file
28897 if ln -s conf$$.file conf$$ 2>/dev/null; then
28898   # We could just check for DJGPP; but this test a) works b) is more generic
28899   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28900   if test -f conf$$.exe; then
28901     # Don't use ln at all; we don't have any links
28902     as_ln_s='cp -p'
28903   else
28904     as_ln_s='ln -s'
28905   fi
28906 elif ln conf$$.file conf$$ 2>/dev/null; then
28907   as_ln_s=ln
28908 else
28909   as_ln_s='cp -p'
28910 fi
28911 rm -f conf$$ conf$$.exe conf$$.file
28912
28913 as_executable_p="test -f"
28914
28915 # Support unset when possible.
28916 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28917   as_unset="unset"
28918 else
28919   as_unset="false"
28920 fi
28921
28922 # NLS nuisances.
28923 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28924 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28925 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28926 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28927 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28928 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28929 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28930 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28931
28932 # IFS
28933 # We need space, tab and new line, in precisely that order.
28934 as_nl='
28935 '
28936 IFS="   $as_nl"
28937
28938 # CDPATH.
28939 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28940
28941 exec 6>&1
28942
28943 _ACEOF
28944
28945 # Files that config.status was made for.
28946 if test -n "$ac_config_files"; then
28947   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28948 fi
28949
28950 if test -n "$ac_config_headers"; then
28951   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28952 fi
28953
28954 if test -n "$ac_config_links"; then
28955   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28956 fi
28957
28958 if test -n "$ac_config_commands"; then
28959   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28960 fi
28961
28962 cat >>"$CONFIG_STATUS" <<\EOF
28963
28964 ac_cs_usage="\
28965 \`$as_me' instantiates files from templates according to the
28966 current configuration.
28967
28968 Usage: $0 [OPTIONS] [FILE]...
28969
28970   -h, --help       print this help, then exit
28971   -V, --version    print version number, then exit
28972   -d, --debug      don't remove temporary files
28973       --recheck    update $as_me by reconfiguring in the same conditions
28974   --file=FILE[:TEMPLATE]
28975                    instantiate the configuration file FILE
28976   --header=FILE[:TEMPLATE]
28977                    instantiate the configuration header FILE
28978
28979 Configuration files:
28980 $config_files
28981
28982 Configuration headers:
28983 $config_headers
28984
28985 Configuration commands:
28986 $config_commands
28987
28988 Report bugs to <dickey@invisible-island.net>."
28989 EOF
28990
28991 cat >>"$CONFIG_STATUS" <<EOF
28992 ac_cs_version="\\
28993 config.status
28994 configured by $0, generated by GNU Autoconf 2.52.20210509,
28995   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28996
28997 Copyright 2003-2020,2021        Thomas E. Dickey
28998 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28999 Free Software Foundation, Inc.
29000 This config.status script is free software; the Free Software Foundation
29001 gives unlimited permission to copy, distribute and modify it."
29002 srcdir="$srcdir"
29003 INSTALL="$INSTALL"
29004 EOF
29005
29006 cat >>"$CONFIG_STATUS" <<\EOF
29007 # If no file are specified by the user, then we need to provide default
29008 # value.  By we need to know if files were specified by the user.
29009 ac_need_defaults=:
29010 while test $# != 0
29011 do
29012   case $1 in
29013   --*=*)
29014     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29015     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29016     shift
29017     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29018     shift
29019     ;;
29020   -*);;
29021   *) # This is not an option, so the user has probably given explicit
29022      # arguments.
29023      ac_need_defaults=false;;
29024   esac
29025
29026   case $1 in
29027   # Handling of the options.
29028 EOF
29029 cat >>"$CONFIG_STATUS" <<EOF
29030   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29031     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29032     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29033 EOF
29034 cat >>"$CONFIG_STATUS" <<\EOF
29035   --version | --vers* | -V )
29036     echo "$ac_cs_version"; exit 0 ;;
29037   --he | --h)
29038     # Conflict between --help and --header
29039     { { echo "$as_me:29039: error: ambiguous option: $1
29040 Try \`$0 --help' for more information." >&5
29041 echo "$as_me: error: ambiguous option: $1
29042 Try \`$0 --help' for more information." >&2;}
29043    { (exit 1); exit 1; }; };;
29044   --help | --hel | -h )
29045     echo "$ac_cs_usage"; exit 0 ;;
29046   --debug | --d* | -d )
29047     debug=: ;;
29048   --file | --fil | --fi | --f )
29049     shift
29050     CONFIG_FILES="$CONFIG_FILES $1"
29051     ac_need_defaults=false;;
29052   --header | --heade | --head | --hea )
29053     shift
29054     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29055     ac_need_defaults=false;;
29056
29057   # This is an error.
29058   -*) { { echo "$as_me:29058: error: unrecognized option: $1
29059 Try \`$0 --help' for more information." >&5
29060 echo "$as_me: error: unrecognized option: $1
29061 Try \`$0 --help' for more information." >&2;}
29062    { (exit 1); exit 1; }; } ;;
29063
29064   *) ac_config_targets="$ac_config_targets $1" ;;
29065
29066   esac
29067   shift
29068 done
29069
29070 exec 5>>config.log
29071 cat >&5 << _ACEOF
29072
29073 ## ----------------------- ##
29074 ## Running config.status.  ##
29075 ## ----------------------- ##
29076
29077 This file was extended by $as_me 2.52.20210509, executed with
29078   CONFIG_FILES    = $CONFIG_FILES
29079   CONFIG_HEADERS  = $CONFIG_HEADERS
29080   CONFIG_LINKS    = $CONFIG_LINKS
29081   CONFIG_COMMANDS = $CONFIG_COMMANDS
29082   > "$ac_cs_invocation"
29083 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29084
29085 _ACEOF
29086 EOF
29087
29088 cat >>"$CONFIG_STATUS" <<EOF
29089 #
29090 # INIT-COMMANDS section.
29091 #
29092
29093 ### Special initialization commands, used to pass information from the
29094 ### configuration-run into config.status
29095
29096 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29097 AWK="$AWK"
29098 CXX_NAME="$CXX_NAME"
29099 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29100 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29101 ECHO_LD="$ECHO_LD"
29102 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29103 FORM_NAME="$FORM_NAME"
29104 LDCONFIG="$LDCONFIG"
29105 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29106 LIB_NAME="$LIB_NAME"
29107 LIB_PREFIX="$LIB_PREFIX"
29108 LIB_SUBSETS="$LIB_SUBSETS"
29109 LIB_SUFFIX="$LIB_SUFFIX"
29110 LIB_TRACING="$LIB_TRACING"
29111 LN_S="$LN_S"
29112 MAKE_TERMINFO="$MAKE_TERMINFO"
29113 MENU_NAME="$MENU_NAME"
29114 NCURSES_MAJOR="$NCURSES_MAJOR"
29115 NCURSES_MINOR="$NCURSES_MINOR"
29116 NCURSES_OSPEED="$NCURSES_OSPEED"
29117 NCURSES_PATCH="$NCURSES_PATCH"
29118 PANEL_NAME="$PANEL_NAME"
29119 SRC_SUBDIRS="$SRC_SUBDIRS"
29120 TERMINFO="$TERMINFO"
29121 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29122 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29123 TICS_NAME="$TICS_NAME"
29124 TICS_SUFFIX="$TICS_SUFFIX"
29125 TIC_PATH="$TIC_PATH"
29126 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29127 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29128 TINFO_NAME="$TINFO_NAME"
29129 TINFO_SUFFIX="$TINFO_SUFFIX"
29130 UNALTERED_SYMS="$UNALTERED_SYMS"
29131 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29132 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29133 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29134 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29135 WILDCARD_SYMS="$WILDCARD_SYMS"
29136 WITH_CURSES_H="$with_curses_h"
29137 WITH_ECHO="${enable_echo:=yes}"
29138 WITH_OVERWRITE="$with_overwrite"
29139 cf_LIST_MODELS="$cf_list_models"
29140 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29141 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29142 cf_cv_abi_version="$cf_cv_abi_version"
29143 cf_cv_do_relink="$cf_cv_do_relink"
29144 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29145 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29146 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29147 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29148 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29149 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29150 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29151 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29152 cf_cv_rel_version="$cf_cv_rel_version"
29153 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29154 cf_cv_shared_soname='$cf_cv_shared_soname'
29155 cf_cv_shlib_version="$cf_cv_shlib_version"
29156 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29157 cf_cv_system_name="$cf_cv_system_name"
29158 cf_cv_term_driver="$with_term_driver"
29159 cf_with_ada="$cf_with_ada"
29160 cf_with_cxx_binding="$cf_with_cxx_binding"
29161 cf_with_db_install="$cf_with_db_install"
29162 cf_with_manpages="$cf_with_manpages"
29163 cf_with_tests="$cf_with_tests"
29164 host="$host"
29165 target="$target"
29166 with_shared_cxx="$with_shared_cxx"
29167
29168 EOF
29169
29170 cat >>"$CONFIG_STATUS" <<\EOF
29171 for ac_config_target in $ac_config_targets
29172 do
29173   case "$ac_config_target" in
29174   # Handling of arguments.
29175   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29176   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29177   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29178   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29179   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29180   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29181   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29182   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29183   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29184   *) { { echo "$as_me:29184: error: invalid argument: $ac_config_target" >&5
29185 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29186    { (exit 1); exit 1; }; };;
29187   esac
29188 done
29189
29190 # If the user did not use the arguments to specify the items to instantiate,
29191 # then the envvar interface is used.  Set only those that are not.
29192 # We use the long form for the default assignment because of an extremely
29193 # bizarre bug on SunOS 4.1.3.
29194 if "$ac_need_defaults"; then
29195   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29196   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29197   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29198 fi
29199
29200 # Create a temporary directory, and hook for its removal unless debugging.
29201 $debug ||
29202 {
29203   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29204   trap '{ (exit 1); exit 1; }' 1 2 13 15
29205 }
29206
29207 # Create a (secure) tmp directory for tmp files.
29208 : ${TMPDIR=/tmp}
29209 {
29210   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29211   test -n "$tmp" && test -d "$tmp"
29212 }  ||
29213 {
29214   tmp=$TMPDIR/cs$$-$RANDOM
29215   (umask 077 && mkdir $tmp)
29216 } ||
29217 {
29218    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29219    { (exit 1); exit 1; }
29220 }
29221
29222 EOF
29223
29224 cat >>"$CONFIG_STATUS" <<EOF
29225
29226 #
29227 # CONFIG_FILES section.
29228 #
29229
29230 # No need to generate the scripts if there are no CONFIG_FILES.
29231 # This happens for instance when ./config.status config.h
29232 if test -n "\$CONFIG_FILES"; then
29233   # Protect against being on the right side of a sed subst in config.status.
29234   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29235    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29236 s,@SHELL@,$SHELL,;t t
29237 s,@exec_prefix@,$exec_prefix,;t t
29238 s,@prefix@,$prefix,;t t
29239 s,@program_transform_name@,$program_transform_name,;t t
29240 s,@bindir@,$bindir,;t t
29241 s,@sbindir@,$sbindir,;t t
29242 s,@libexecdir@,$libexecdir,;t t
29243 s,@datarootdir@,$datarootdir,;t t
29244 s,@datadir@,$datadir,;t t
29245 s,@sysconfdir@,$sysconfdir,;t t
29246 s,@sharedstatedir@,$sharedstatedir,;t t
29247 s,@localstatedir@,$localstatedir,;t t
29248 s,@runstatedir@,$runstatedir,;t t
29249 s,@libdir@,$libdir,;t t
29250 s,@includedir@,$includedir,;t t
29251 s,@oldincludedir@,$oldincludedir,;t t
29252 s,@infodir@,$infodir,;t t
29253 s,@mandir@,$mandir,;t t
29254 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29255 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29256 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29257 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29258 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29259 s,@build_alias@,$build_alias,;t t
29260 s,@host_alias@,$host_alias,;t t
29261 s,@target_alias@,$target_alias,;t t
29262 s,@ECHO_C@,$ECHO_C,;t t
29263 s,@ECHO_N@,$ECHO_N,;t t
29264 s,@ECHO_T@,$ECHO_T,;t t
29265 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29266 s,@DEFS@,$DEFS,;t t
29267 s,@LIBS@,$LIBS,;t t
29268 s,@top_builddir@,$top_builddir,;t t
29269 s,@GREP@,$GREP,;t t
29270 s,@EGREP@,$EGREP,;t t
29271 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29272 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29273 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29274 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29275 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29276 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29277 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29278 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29279 s,@VERSION@,$VERSION,;t t
29280 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29281 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29282 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29283 s,@PACKAGE@,$PACKAGE,;t t
29284 s,@build@,$build,;t t
29285 s,@build_cpu@,$build_cpu,;t t
29286 s,@build_vendor@,$build_vendor,;t t
29287 s,@build_os@,$build_os,;t t
29288 s,@host@,$host,;t t
29289 s,@host_cpu@,$host_cpu,;t t
29290 s,@host_vendor@,$host_vendor,;t t
29291 s,@host_os@,$host_os,;t t
29292 s,@target@,$target,;t t
29293 s,@target_cpu@,$target_cpu,;t t
29294 s,@target_vendor@,$target_vendor,;t t
29295 s,@target_os@,$target_os,;t t
29296 s,@FGREP@,$FGREP,;t t
29297 s,@CC@,$CC,;t t
29298 s,@CFLAGS@,$CFLAGS,;t t
29299 s,@LDFLAGS@,$LDFLAGS,;t t
29300 s,@CPPFLAGS@,$CPPFLAGS,;t t
29301 s,@ac_ct_CC@,$ac_ct_CC,;t t
29302 s,@EXEEXT@,$EXEEXT,;t t
29303 s,@OBJEXT@,$OBJEXT,;t t
29304 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29305 s,@CPP@,$CPP,;t t
29306 s,@LDCONFIG@,$LDCONFIG,;t t
29307 s,@CXX@,$CXX,;t t
29308 s,@CXXFLAGS@,$CXXFLAGS,;t t
29309 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29310 s,@AWK@,$AWK,;t t
29311 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29312 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29313 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29314 s,@LINT@,$LINT,;t t
29315 s,@LINT_OPTS@,$LINT_OPTS,;t t
29316 s,@LN_S@,$LN_S,;t t
29317 s,@cf_config_suffix@,$cf_config_suffix,;t t
29318 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29319 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29320 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29321 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29322 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29323 s,@SET_MAKE@,$SET_MAKE,;t t
29324 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29325 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29326 s,@CTAGS@,$CTAGS,;t t
29327 s,@ETAGS@,$ETAGS,;t t
29328 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29329 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29330 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29331 s,@RANLIB@,$RANLIB,;t t
29332 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29333 s,@LD@,$LD,;t t
29334 s,@ac_ct_LD@,$ac_ct_LD,;t t
29335 s,@AR@,$AR,;t t
29336 s,@ac_ct_AR@,$ac_ct_AR,;t t
29337 s,@NM@,$NM,;t t
29338 s,@ac_ct_NM@,$ac_ct_NM,;t t
29339 s,@ARFLAGS@,$ARFLAGS,;t t
29340 s,@DESTDIR@,$DESTDIR,;t t
29341 s,@BUILD_CC@,$BUILD_CC,;t t
29342 s,@BUILD_CPP@,$BUILD_CPP,;t t
29343 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29344 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29345 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29346 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29347 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29348 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29349 s,@cf_list_models@,$cf_list_models,;t t
29350 s,@ABI_VERSION@,$ABI_VERSION,;t t
29351 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29352 s,@LIBTOOL@,$LIBTOOL,;t t
29353 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29354 s,@LT_UNDEF@,$LT_UNDEF,;t t
29355 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29356 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29357 s,@LIB_CREATE@,$LIB_CREATE,;t t
29358 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29359 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29360 s,@LIB_PREP@,$LIB_PREP,;t t
29361 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29362 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29363 s,@LIB_LINK@,$LIB_LINK,;t t
29364 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29365 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29366 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29367 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29368 s,@TICS_NAME@,$TICS_NAME,;t t
29369 s,@TINFO_NAME@,$TINFO_NAME,;t t
29370 s,@LIB_NAME@,$LIB_NAME,;t t
29371 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29372 s,@CC_G_OPT@,$CC_G_OPT,;t t
29373 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29374 s,@LD_MODEL@,$LD_MODEL,;t t
29375 s,@shlibdir@,$shlibdir,;t t
29376 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29377 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29378 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29379 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29380 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29381 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29382 s,@LINK_PROGS@,$LINK_PROGS,;t t
29383 s,@LINK_TESTS@,$LINK_TESTS,;t t
29384 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29385 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29386 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29387 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29388 s,@RPATH_LIST@,$RPATH_LIST,;t t
29389 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29390 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29391 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29392 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29393 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29394 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29395 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29396 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29397 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29398 s,@TIC@,$TIC,;t t
29399 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29400 s,@INFOCMP@,$INFOCMP,;t t
29401 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29402 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29403 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29404 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29405 s,@XTERM_KBS@,$XTERM_KBS,;t t
29406 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29407 s,@TERMINFO@,$TERMINFO,;t t
29408 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29409 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29410 s,@TERMPATH@,$TERMPATH,;t t
29411 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29412 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29413 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29414 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29415 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29416 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29417 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29418 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29419 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29420 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29421 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29422 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29423 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29424 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29425 s,@RGB_PATH@,$RGB_PATH,;t t
29426 s,@no_x11_rgb@,$no_x11_rgb,;t t
29427 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29428 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29429 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29430 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29431 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29432 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29433 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29434 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29435 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29436 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29437 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29438 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29439 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29440 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29441 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29442 s,@PTHREAD@,$PTHREAD,;t t
29443 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29444 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29445 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29446 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29447 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29448 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29449 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29450 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29451 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29452 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29453 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29454 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29455 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29456 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29457 s,@ECHO_LT@,$ECHO_LT,;t t
29458 s,@ECHO_LD@,$ECHO_LD,;t t
29459 s,@RULE_CC@,$RULE_CC,;t t
29460 s,@SHOW_CC@,$SHOW_CC,;t t
29461 s,@ECHO_CC@,$ECHO_CC,;t t
29462 s,@ECHO_LINK@,$ECHO_LINK,;t t
29463 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29464 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29465 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29466 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29467 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29468 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29469 s,@ADAFLAGS@,$ADAFLAGS,;t t
29470 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29471 s,@ADA_TRACE@,$ADA_TRACE,;t t
29472 s,@MATH_LIB@,$MATH_LIB,;t t
29473 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29474 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29475 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29476 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29477 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29478 s,@TEST_LIBS@,$TEST_LIBS,;t t
29479 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29480 s,@CXXCPP@,$CXXCPP,;t t
29481 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29482 s,@CXX_AR@,$CXX_AR,;t t
29483 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29484 s,@CXXLIBS@,$CXXLIBS,;t t
29485 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29486 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29487 s,@M4_exists@,$M4_exists,;t t
29488 s,@cf_ada_make@,$cf_ada_make,;t t
29489 s,@cf_ada_config@,$cf_ada_config,;t t
29490 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29491 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29492 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29493 s,@cf_compile_generics@,$cf_compile_generics,;t t
29494 s,@cf_generic_objects@,$cf_generic_objects,;t t
29495 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29496 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29497 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29498 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29499 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29500 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29501 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29502 s,@cf_ada_package@,$cf_ada_package,;t t
29503 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29504 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29505 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29506 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29507 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29508 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29509 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29510 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29511 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29512 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29513 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29514 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29515 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29516 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29517 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29518 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29519 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29520 s,@TICS_LIBS@,$TICS_LIBS,;t t
29521 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29522 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29523 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29524 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29525 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29526 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29527 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29528 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29529 s,@includesubdir@,$includesubdir,;t t
29530 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29531 s,@TICS_LIST@,$TICS_LIST,;t t
29532 s,@TINFO_LIST@,$TINFO_LIST,;t t
29533 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29534 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29535 s,@FORM_NAME@,$FORM_NAME,;t t
29536 s,@MENU_NAME@,$MENU_NAME,;t t
29537 s,@PANEL_NAME@,$PANEL_NAME,;t t
29538 s,@CXX_NAME@,$CXX_NAME,;t t
29539 s,@TEST_ARGS@,$TEST_ARGS,;t t
29540 s,@TEST_DEPS@,$TEST_DEPS,;t t
29541 s,@TEST_ARG2@,$TEST_ARG2,;t t
29542 s,@TEST_DEP2@,$TEST_DEP2,;t t
29543 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29544 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29545 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29546 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29547 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29548 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29549 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29550 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29551 s,@cross_compiling@,$cross_compiling,;t t
29552 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29553 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29554 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29555 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29556 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29557 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29558 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29559 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29560 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29561 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29562 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29563 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29564 CEOF
29565
29566 EOF
29567
29568   cat >>"$CONFIG_STATUS" <<\EOF
29569   # Split the substitutions into bite-sized pieces for seds with
29570   # small command number limits, like on Digital OSF/1 and HP-UX.
29571   ac_max_sed_lines=48
29572   ac_sed_frag=1 # Number of current file.
29573   ac_beg=1 # First line for current file.
29574   ac_end=$ac_max_sed_lines # Line after last line for current file.
29575   ac_more_lines=:
29576   ac_sed_cmds=
29577   while "$ac_more_lines"; do
29578     if test "$ac_beg" -gt 1; then
29579       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29580     else
29581       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29582     fi
29583     if test ! -s $tmp/subs.frag; then
29584       ac_more_lines=false
29585     else
29586       # The purpose of the label and of the branching condition is to
29587       # speed up the sed processing (if there are no `@' at all, there
29588       # is no need to browse any of the substitutions).
29589       # These are the two extra sed commands mentioned above.
29590       (echo ':t
29591   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29592       # It is possible to make a multiline substitution using escaped newlines.
29593       # Ensure that we do not split the substitution between script fragments.
29594       ac_BEG=$ac_end
29595       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29596       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29597       if test -s $tmp/subs.next; then
29598         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29599         if test ! -s $tmp/subs.edit; then
29600           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29601           if test ! -s $tmp/subs.edit; then
29602             if test "$ac_beg" -gt 1; then
29603               ac_end=`expr "$ac_end" - 1`
29604               continue
29605             fi
29606           fi
29607         fi
29608       fi
29609
29610       if test -z "$ac_sed_cmds"; then
29611         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29612       else
29613         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29614       fi
29615       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29616       ac_beg=$ac_end
29617       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29618     fi
29619   done
29620   if test -z "$ac_sed_cmds"; then
29621     ac_sed_cmds=cat
29622   fi
29623 fi # test -n "$CONFIG_FILES"
29624
29625 EOF
29626 cat >>"$CONFIG_STATUS" <<\EOF
29627 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29628   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29629   case "$ac_file" in
29630   - | *:- | *:-:* ) # input from stdin
29631         cat >$tmp/stdin
29632         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29633         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29634   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29635         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29636   * )   ac_file_in=$ac_file.in ;;
29637   esac
29638
29639   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29640   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29641          X"$ac_file" : 'X\(//\)[^/]' \| \
29642          X"$ac_file" : 'X\(//\)$' \| \
29643          X"$ac_file" : 'X\(/\)' \| \
29644          .     : '\(.\)' 2>/dev/null ||
29645 echo X"$ac_file" |
29646     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29647           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29648           /^X\(\/\/\)$/{ s//\1/; q; }
29649           /^X\(\/\).*/{ s//\1/; q; }
29650           s/.*/./; q'`
29651   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29652     { case "$ac_dir" in
29653   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29654   *)                      as_incr_dir=.;;
29655 esac
29656 as_dummy="$ac_dir"
29657 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29658   case $as_mkdir_dir in
29659     # Skip DOS drivespec
29660     ?:) as_incr_dir=$as_mkdir_dir ;;
29661     *)
29662       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29663       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29664     ;;
29665   esac
29666 done; }
29667
29668     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29669     # A "../" for each directory in $ac_dir_suffix.
29670     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29671   else
29672     ac_dir_suffix= ac_dots=
29673   fi
29674
29675   case "$srcdir" in
29676   .)  ac_srcdir=.
29677       if test -z "$ac_dots"; then
29678          ac_top_srcdir=.
29679       else
29680          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29681       fi ;;
29682   [\\/]* | ?:[\\/]* )
29683       ac_srcdir="$srcdir$ac_dir_suffix";
29684       ac_top_srcdir="$srcdir" ;;
29685   *) # Relative path.
29686     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29687     ac_top_srcdir="$ac_dots$srcdir" ;;
29688   esac
29689
29690   case $INSTALL in
29691   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29692   *) ac_INSTALL=$ac_dots$INSTALL ;;
29693   esac
29694
29695   if test x"$ac_file" != x-; then
29696     { echo "$as_me:29696: creating $ac_file" >&5
29697 echo "$as_me: creating $ac_file" >&6;}
29698     rm -f "$ac_file"
29699   fi
29700   # Let's still pretend it is `configure' which instantiates (i.e., don't
29701   # use $as_me), people would be surprised to read:
29702   #    /* config.h.  Generated automatically by config.status.  */
29703   configure_input="Generated automatically from `echo $ac_file_in |
29704                                                  sed 's,.*/,,'` by configure."
29705
29706   # First look for the input files in the build tree, otherwise in the
29707   # src tree.
29708   ac_file_inputs=`IFS=:
29709     for f in $ac_file_in; do
29710       case $f in
29711       -) echo $tmp/stdin ;;
29712       [\\/$]*)
29713          # Absolute (can't be DOS-style, as IFS=:)
29714          test -f "$f" || { { echo "$as_me:29714: error: cannot find input file: $f" >&5
29715 echo "$as_me: error: cannot find input file: $f" >&2;}
29716    { (exit 1); exit 1; }; }
29717          echo $f;;
29718       *) # Relative
29719          if test -f "$f"; then
29720            # Build tree
29721            echo $f
29722          elif test -f "$srcdir/$f"; then
29723            # Source tree
29724            echo "$srcdir/$f"
29725          else
29726            # /dev/null tree
29727            { { echo "$as_me:29727: error: cannot find input file: $f" >&5
29728 echo "$as_me: error: cannot find input file: $f" >&2;}
29729    { (exit 1); exit 1; }; }
29730          fi;;
29731       esac
29732     done` || { (exit 1); exit 1; }
29733 EOF
29734 cat >>"$CONFIG_STATUS" <<\EOF
29735   ac_warn_datarootdir=no
29736   if test x"$ac_file" != x-; then
29737     for ac_item in $ac_file_inputs
29738     do
29739       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29740       if test -n "$ac_seen"; then
29741         ac_used=`grep '@datarootdir@' "$ac_item"`
29742         if test -z "$ac_used"; then
29743           { echo "$as_me:29743: WARNING: datarootdir was used implicitly but not set:
29744 $ac_seen" >&5
29745 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29746 $ac_seen" >&2;}
29747           ac_warn_datarootdir=yes
29748         fi
29749       fi
29750       ac_seen=`grep '${datarootdir}' "$ac_item"`
29751       if test -n "$ac_seen"; then
29752         { echo "$as_me:29752: WARNING: datarootdir was used explicitly but not set:
29753 $ac_seen" >&5
29754 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29755 $ac_seen" >&2;}
29756         ac_warn_datarootdir=yes
29757       fi
29758     done
29759   fi
29760
29761 if test "x$ac_warn_datarootdir" = xyes; then
29762   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29763 fi
29764
29765 EOF
29766 cat >>"$CONFIG_STATUS" <<EOF
29767   sed "$ac_vpsub
29768 $extrasub
29769 EOF
29770 cat >>"$CONFIG_STATUS" <<\EOF
29771 :t
29772 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29773 s,@configure_input@,$configure_input,;t t
29774 s,@srcdir@,$ac_srcdir,;t t
29775 s,@top_srcdir@,$ac_top_srcdir,;t t
29776 s,@INSTALL@,$ac_INSTALL,;t t
29777 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29778   rm -f $tmp/stdin
29779   if test x"$ac_file" != x-; then
29780     cp "$tmp/out" "$ac_file"
29781
29782     for ac_name in prefix exec_prefix datarootdir
29783     do
29784         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29785         if test -n "$ac_seen"; then
29786             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29787             if test -z "$ac_init"; then
29788               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29789               { echo "$as_me:29789: WARNING: Variable $ac_name is used but was not set:
29790 $ac_seen" >&5
29791 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29792 $ac_seen" >&2;}
29793             fi
29794         fi
29795     done
29796     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29797     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29798     if test -s $tmp/out; then
29799       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29800       { echo "$as_me:29800: WARNING: Some variables may not be substituted:
29801 $ac_seen" >&5
29802 echo "$as_me: WARNING: Some variables may not be substituted:
29803 $ac_seen" >&2;}
29804     fi
29805   else
29806     cat $tmp/out
29807   fi
29808   rm -f $tmp/out
29809
29810 done
29811 EOF
29812 cat >>"$CONFIG_STATUS" <<\EOF
29813
29814 #
29815 # CONFIG_HEADER section.
29816 #
29817
29818 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29819 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29820 #
29821 # ac_d sets the value in "#define NAME VALUE" lines.
29822 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29823 ac_dB='[        ].*$,\1#\2'
29824 ac_dC=' '
29825 ac_dD=',;t'
29826 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29827 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29828 ac_iB='\([      ]\),\1#\2define\3'
29829 ac_iC=' '
29830 ac_iD='\4,;t'
29831 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29832 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29833 ac_uB='$,\1#\2define\3'
29834 ac_uC=' '
29835 ac_uD=',;t'
29836
29837 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29838   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29839   case "$ac_file" in
29840   - | *:- | *:-:* ) # input from stdin
29841         cat >$tmp/stdin
29842         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29843         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29844   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29845         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29846   * )   ac_file_in=$ac_file.in ;;
29847   esac
29848
29849   test x"$ac_file" != x- && { echo "$as_me:29849: creating $ac_file" >&5
29850 echo "$as_me: creating $ac_file" >&6;}
29851
29852   # First look for the input files in the build tree, otherwise in the
29853   # src tree.
29854   ac_file_inputs=`IFS=:
29855     for f in $ac_file_in; do
29856       case $f in
29857       -) echo $tmp/stdin ;;
29858       [\\/$]*)
29859          # Absolute (can't be DOS-style, as IFS=:)
29860          test -f "$f" || { { echo "$as_me:29860: error: cannot find input file: $f" >&5
29861 echo "$as_me: error: cannot find input file: $f" >&2;}
29862    { (exit 1); exit 1; }; }
29863          echo $f;;
29864       *) # Relative
29865          if test -f "$f"; then
29866            # Build tree
29867            echo $f
29868          elif test -f "$srcdir/$f"; then
29869            # Source tree
29870            echo "$srcdir/$f"
29871          else
29872            # /dev/null tree
29873            { { echo "$as_me:29873: error: cannot find input file: $f" >&5
29874 echo "$as_me: error: cannot find input file: $f" >&2;}
29875    { (exit 1); exit 1; }; }
29876          fi;;
29877       esac
29878     done` || { (exit 1); exit 1; }
29879   # Remove the trailing spaces.
29880   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29881
29882 EOF
29883
29884 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29885 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29886 # be either 'cat' or 'sort'.
29887 cat confdefs.h | uniq >conftest.vals
29888
29889 # Break up conftest.vals because some shells have a limit on
29890 # the size of here documents, and old seds have small limits too.
29891
29892 rm -f conftest.tail
29893 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29894 while grep . conftest.vals >/dev/null
29895 do
29896   # Write chunks of a limited-size here document to conftest.frag.
29897   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29898   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29899   echo 'CEOF' >> "$CONFIG_STATUS"
29900   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29901   rm -f conftest.vals
29902   mv conftest.tail conftest.vals
29903 done
29904 rm -f conftest.vals
29905
29906 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29907 # marker @DEFS@.
29908 echo '  cat >> conftest.edit <<CEOF
29909 /@DEFS@/r conftest.frag
29910 /@DEFS@/d
29911 CEOF
29912 sed -f conftest.edit $tmp/in > $tmp/out
29913 rm -f $tmp/in
29914 mv $tmp/out $tmp/in
29915 rm -f conftest.edit conftest.frag
29916 ' >> "$CONFIG_STATUS"
29917
29918 cat >>"$CONFIG_STATUS" <<\EOF
29919   # Let's still pretend it is `configure' which instantiates (i.e., don't
29920   # use $as_me), people would be surprised to read:
29921   #    /* config.h.  Generated automatically by config.status.  */
29922   if test x"$ac_file" = x-; then
29923     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29924   else
29925     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29926   fi
29927   cat $tmp/in >>$tmp/config.h
29928   rm -f $tmp/in
29929   if test x"$ac_file" != x-; then
29930     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29931       { echo "$as_me:29931: $ac_file is unchanged" >&5
29932 echo "$as_me: $ac_file is unchanged" >&6;}
29933     else
29934       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29935          X"$ac_file" : 'X\(//\)[^/]' \| \
29936          X"$ac_file" : 'X\(//\)$' \| \
29937          X"$ac_file" : 'X\(/\)' \| \
29938          .     : '\(.\)' 2>/dev/null ||
29939 echo X"$ac_file" |
29940     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29941           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29942           /^X\(\/\/\)$/{ s//\1/; q; }
29943           /^X\(\/\).*/{ s//\1/; q; }
29944           s/.*/./; q'`
29945       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29946         { case "$ac_dir" in
29947   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29948   *)                      as_incr_dir=.;;
29949 esac
29950 as_dummy="$ac_dir"
29951 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29952   case $as_mkdir_dir in
29953     # Skip DOS drivespec
29954     ?:) as_incr_dir=$as_mkdir_dir ;;
29955     *)
29956       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29957       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29958     ;;
29959   esac
29960 done; }
29961
29962       fi
29963       rm -f "$ac_file"
29964       mv "$tmp/config.h" "$ac_file"
29965     fi
29966   else
29967     cat $tmp/config.h
29968     rm -f $tmp/config.h
29969   fi
29970 done
29971 EOF
29972 cat >>"$CONFIG_STATUS" <<\EOF
29973 #
29974 # CONFIG_COMMANDS section.
29975 #
29976 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29977   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29978   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29979
29980   case "$ac_dest" in
29981     default )
29982 if test "x$cf_with_tests" != xno ; then
29983
29984 for cf_dir in test
29985 do
29986         if test ! -d "$srcdir/$cf_dir" ; then
29987                 continue
29988         elif test -f "$srcdir/$cf_dir/programs" ; then
29989                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29990         fi
29991 done
29992
29993 fi
29994
29995 cf_prefix=$LIB_PREFIX
29996
29997 case "$cf_cv_shlib_version" in
29998 (cygdll|msysdll|mingw|msvcdll)
29999         TINFO_NAME=$TINFO_ARG_SUFFIX
30000         TINFO_SUFFIX=.dll
30001         ;;
30002 esac
30003
30004 if test -n "$TINFO_SUFFIX" ; then
30005         case "$TINFO_SUFFIX" in
30006         (tw*)
30007                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30008                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30009                 ;;
30010         (t*)
30011                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30012                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30013                 ;;
30014         (w*)
30015                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30016                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30017                 ;;
30018         esac
30019 fi
30020
30021 for cf_dir in $SRC_SUBDIRS
30022 do
30023         if test ! -d "$srcdir/$cf_dir" ; then
30024                 continue
30025         elif test -f "$srcdir/$cf_dir/modules" ; then
30026
30027                 SHARED_LIB=
30028                 Libs_To_Make=
30029                 cf_awk_program=
30030                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30031                 then
30032                         cf_awk_program="$cf_awk_program\
30033 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30034 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30035 "
30036                 fi
30037
30038                 if test "x$WILDCARD_SYMS" = xno
30039                 then
30040                         cf_awk_program="$cf_awk_program\
30041 /[      ]_\\*;/ { skip=1; next; }\
30042 "
30043                 fi
30044
30045                 if test "x$cf_awk_program" != "x"
30046                 then
30047                         cat >>$cf_dir/Makefile <<CF_EOF
30048
30049 # Generated by CF_LIB_RULES
30050 resulting.map: $UNALTERED_SYMS
30051         $AWK 'BEGIN { skip = 1; last=""; } \
30052 $cf_awk_program \
30053 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30054  skip = 0; last = \$\$0; } \
30055 END { print last; }' < "$UNALTERED_SYMS" >\$@
30056
30057 distclean::
30058         rm -f resulting.map
30059 CF_EOF
30060                 fi
30061
30062                 for cf_item in $cf_LIST_MODELS
30063                 do
30064
30065         case X$cf_item in
30066         (Xlibtool)
30067                 cf_suffix='.la'
30068                 cf_depsuf=$cf_suffix
30069                 ;;
30070         (Xdebug)
30071                 case "$cf_cv_system_name" in
30072                 (*-msvc*)
30073                         cf_suffix='_g.lib'
30074                         ;;
30075                 (*)
30076                         cf_suffix='_g.a'
30077                         ;;
30078                 esac
30079                 cf_depsuf=$cf_suffix
30080                 ;;
30081         (Xprofile)
30082                 case "$cf_cv_system_name" in
30083                 (*-msvc*)
30084                         cf_suffix='_p.lib'
30085                         ;;
30086                 (*)
30087                         cf_suffix='_p.a'
30088                         ;;
30089                 esac
30090                 cf_depsuf=$cf_suffix
30091                 ;;
30092         (Xshared)
30093                 case "$cf_cv_system_name" in
30094                 (aix[5-7]*)
30095                         cf_suffix='.so'
30096                         cf_depsuf=$cf_suffix
30097                         ;;
30098                 (*-msvc*)
30099                         cf_suffix='.dll'
30100                         cf_depsuf='.dll.lib'
30101                         ;;
30102                 (cygwin*|msys*|mingw*)
30103                         cf_suffix='.dll'
30104                         cf_depsuf='.dll.a'
30105                         ;;
30106                 (darwin*)
30107                         cf_suffix='.dylib'
30108                         cf_depsuf=$cf_suffix
30109                         ;;
30110                 (hpux*)
30111                         case "$target" in
30112                         (ia64*)
30113                                 cf_suffix='.so'
30114                                 cf_depsuf=$cf_suffix
30115                                 ;;
30116                         (*)
30117                                 cf_suffix='.sl'
30118                                 cf_depsuf=$cf_suffix
30119                                 ;;
30120                         esac
30121                         ;;
30122                 (*)
30123                         cf_suffix='.so'
30124                         cf_depsuf=$cf_suffix
30125                         ;;
30126                 esac
30127                 ;;
30128         (*)
30129                 case "$target" in
30130                 (*-msvc*)
30131                         cf_suffix='.lib'
30132                         ;;
30133                 (*)
30134                         cf_suffix='.a'
30135                         ;;
30136                 esac
30137                 cf_depsuf=$cf_suffix
30138                 ;;
30139         esac
30140         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30141         then
30142                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30143                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30144         fi
30145
30146                         if test "$cf_dir" = "c++"
30147                         then
30148
30149 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30150
30151 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30152
30153                         else
30154
30155 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30156
30157 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30158
30159                         fi
30160                         test -z "$cf_libname" && cf_libname="$cf_dir"
30161                         if test "$cf_item" = shared ; then
30162                                 if test -n "${LIB_SUFFIX}"
30163                                 then
30164                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30165                                 else
30166                                         cf_shared_suffix="$cf_suffix"
30167                                 fi
30168                                 if test "$cf_cv_do_symlinks" = yes ; then
30169                                         cf_version_name=
30170
30171                                         case "$cf_cv_shlib_version" in
30172                                         (rel)
30173                                                 cf_version_name=REL_VERSION
30174                                                 ;;
30175                                         (abi)
30176                                                 cf_version_name=ABI_VERSION
30177                                                 ;;
30178                                         esac
30179
30180                                         if test -n "$cf_version_name"
30181                                         then
30182                                                 case "$cf_cv_system_name" in
30183                                                 (darwin*)
30184                                                         # "w", etc?
30185                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30186                                                         ;;
30187                                                 (*)
30188                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30189                                                         ;;
30190                                                 esac
30191                                         fi
30192                                         if test -n "${USE_LIB_SUFFIX}"
30193                                         then
30194                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30195                                         else
30196                                                 cf_shared_suffix="$cf_suffix"
30197                                         fi
30198                                 fi
30199                                 # cygwin needs import library, and has unique naming convention
30200                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30201                                 # use 'cyg' prefix for shared lib.
30202                                 case "$cf_cv_shlib_version" in
30203                                 (cygdll)
30204                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30205                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30206                                         ;;
30207                                 (msysdll)
30208                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30209                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30210                                         ;;
30211                                 (mingw)
30212                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30213                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30214                                         ;;
30215                                 (msvcdll)
30216                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30217                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30218                                         ;;
30219                                 (*)
30220                                         cf_add_lib=
30221                                         ;;
30222                                 esac
30223                                 if test -n "$cf_add_lib"
30224                                 then
30225                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30226                                         continue
30227                                 fi
30228                         fi
30229                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30230                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30231                 done
30232
30233                 if test "$cf_dir" = ncurses ; then
30234                         cf_subsets="$LIB_SUBSETS"
30235                         cf_r_parts="$cf_subsets"
30236                         cf_liblist="$Libs_To_Make"
30237
30238                         while test -n "$cf_r_parts"
30239                         do
30240                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30241                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30242                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30243                                         cf_add_lib=
30244                                         case "$cf_l_parts" in
30245                                         (*termlib*)
30246                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30247                                                 ;;
30248                                         (*ticlib*)
30249                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30250                                                 ;;
30251                                         (*)
30252                                                 break
30253                                                 ;;
30254                                         esac
30255                                         if test -n "$cf_add_lib"; then
30256                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30257                                         fi
30258                                 else
30259                                         break
30260                                 fi
30261                         done
30262                 else
30263                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30264                 fi
30265
30266                 if test "$cf_dir" = c++; then
30267                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30268                                 cf_list=
30269                                 for cf_item in $Libs_To_Make
30270                                 do
30271                                         case "$cf_item" in
30272                                         (*.a)
30273                                                 ;;
30274                                         (*)
30275                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30276                                                 ;;
30277                                         esac
30278                                         for cf_test in $cf_list
30279                                         do
30280                                                 if test "$cf_test" = "$cf_item"
30281                                                 then
30282                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30283                                                         cf_item=
30284                                                         break
30285                                                 fi
30286                                         done
30287                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30288                                 done
30289                                 Libs_To_Make="$cf_list"
30290                         fi
30291                 fi
30292
30293                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30294                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30295                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30296                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30297
30298                 $AWK -f "$srcdir/mk-0th.awk" \
30299                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30300                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30301
30302                 for cf_subset in $cf_subsets
30303                 do
30304                         cf_subdirs=
30305                         for cf_item in $cf_LIST_MODELS
30306                         do
30307
30308                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30309
30310 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30311
30312                         CXX_MODEL=$cf_ITEM
30313                         if test "$CXX_MODEL" = SHARED; then
30314                                 case "$cf_cv_shlib_version" in
30315                                 (cygdll|msysdll|mingw|msvcdll)
30316                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30317
30318 echo "${as_me:-configure}:30318: testing overriding CXX_MODEL to SHARED ..." 1>&5
30319
30320                                         with_shared_cxx=yes
30321                                         ;;
30322                                 (*)
30323                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30324                                         ;;
30325                                 esac
30326                         fi
30327
30328         case X$cf_item in
30329         (Xlibtool)
30330                 cf_suffix='.la'
30331                 cf_depsuf=$cf_suffix
30332                 ;;
30333         (Xdebug)
30334                 case "$cf_cv_system_name" in
30335                 (*-msvc*)
30336                         cf_suffix='_g.lib'
30337                         ;;
30338                 (*)
30339                         cf_suffix='_g.a'
30340                         ;;
30341                 esac
30342                 cf_depsuf=$cf_suffix
30343                 ;;
30344         (Xprofile)
30345                 case "$cf_cv_system_name" in
30346                 (*-msvc*)
30347                         cf_suffix='_p.lib'
30348                         ;;
30349                 (*)
30350                         cf_suffix='_p.a'
30351                         ;;
30352                 esac
30353                 cf_depsuf=$cf_suffix
30354                 ;;
30355         (Xshared)
30356                 case "$cf_cv_system_name" in
30357                 (aix[5-7]*)
30358                         cf_suffix='.so'
30359                         cf_depsuf=$cf_suffix
30360                         ;;
30361                 (*-msvc*)
30362                         cf_suffix='.dll'
30363                         cf_depsuf='.dll.lib'
30364                         ;;
30365                 (cygwin*|msys*|mingw*)
30366                         cf_suffix='.dll'
30367                         cf_depsuf='.dll.a'
30368                         ;;
30369                 (darwin*)
30370                         cf_suffix='.dylib'
30371                         cf_depsuf=$cf_suffix
30372                         ;;
30373                 (hpux*)
30374                         case "$target" in
30375                         (ia64*)
30376                                 cf_suffix='.so'
30377                                 cf_depsuf=$cf_suffix
30378                                 ;;
30379                         (*)
30380                                 cf_suffix='.sl'
30381                                 cf_depsuf=$cf_suffix
30382                                 ;;
30383                         esac
30384                         ;;
30385                 (*)
30386                         cf_suffix='.so'
30387                         cf_depsuf=$cf_suffix
30388                         ;;
30389                 esac
30390                 ;;
30391         (*)
30392                 case "$target" in
30393                 (*-msvc*)
30394                         cf_suffix='.lib'
30395                         ;;
30396                 (*)
30397                         cf_suffix='.a'
30398                         ;;
30399                 esac
30400                 cf_depsuf=$cf_suffix
30401                 ;;
30402         esac
30403         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30404         then
30405                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30406                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30407         fi
30408
30409         case $cf_item in
30410         (libtool) cf_subdir='obj_lo'  ;;
30411         (normal)  cf_subdir='objects' ;;
30412         (debug)   cf_subdir='obj_g' ;;
30413         (profile) cf_subdir='obj_p' ;;
30414         (shared)
30415                 case "$cf_cv_system_name" in
30416                 (cygwin|msys)
30417                         cf_subdir='objects' ;;
30418                 (*)
30419                         cf_subdir='obj_s' ;;
30420                 esac
30421         esac
30422
30423                         # Test for case where we build libtinfo with a different name.
30424                         cf_libname=$cf_dir
30425                         if test "$cf_dir" = ncurses ; then
30426                                 case "$cf_subset" in
30427                                 (*base*)
30428                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30429                                         ;;
30430                                 (*termlib*)
30431                                         cf_libname=$TINFO_LIB_SUFFIX
30432                                         ;;
30433                                 (ticlib*)
30434                                         cf_libname=$TICS_LIB_SUFFIX
30435                                         ;;
30436                                 esac
30437                         elif test "$cf_dir" = c++ ; then
30438
30439 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30440
30441 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30442
30443                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30444                         else
30445
30446 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30447
30448 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30449
30450                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30451                         fi
30452                         if test -n "${USE_ARG_SUFFIX}" ; then
30453                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30454                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30455                         fi
30456
30457                         # These dependencies really are for development, not
30458                         # builds, but they are useful in porting, too.
30459                         cf_depend="../include/ncurses_cfg.h"
30460                         if test "$srcdir" = "."; then
30461                                 cf_reldir="."
30462                         else
30463                                 cf_reldir="\${srcdir}"
30464                         fi
30465
30466                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30467                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30468                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30469                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30470                         fi
30471
30472                         cf_dir_suffix=
30473                         old_cf_suffix="$cf_suffix"
30474                         if test "$cf_cv_shlib_version_infix" = yes ; then
30475                         if test -n "$USE_LIB_SUFFIX" ; then
30476                                 case "$USE_LIB_SUFFIX" in
30477                                 (tw*)
30478                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30479                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30480                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30481                                         ;;
30482                                 (t*)
30483                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30484                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30485                                         cf_dir_suffix=t$EXTRA_SUFFIX
30486                                         ;;
30487                                 (w*)
30488                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30489                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30490                                         cf_dir_suffix=w$EXTRA_SUFFIX
30491                                         ;;
30492                                 (*)
30493                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30494                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30495                                         cf_dir_suffix=$EXTRA_SUFFIX
30496                                         ;;
30497                                 esac
30498                         fi
30499                         fi
30500
30501                         $AWK -f "$srcdir/mk-1st.awk" \
30502                                 name=${cf_libname}${cf_dir_suffix} \
30503                                 traces=$LIB_TRACING \
30504                                 MODEL=$cf_ITEM \
30505                                 CXX_MODEL=$CXX_MODEL \
30506                                 LIB_SUFFIX=$LIB_SUFFIX \
30507                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30508                                 make_phony="${cf_cv_make_PHONY:-no}" \
30509                                 model=$cf_subdir \
30510                                 prefix=$cf_prefix \
30511                                 suffix=$cf_suffix \
30512                                 subset=$cf_subset \
30513                                 driver=$cf_cv_term_driver \
30514                                 SymLink="$LN_S" \
30515                                 TermlibRoot=$TINFO_NAME \
30516                                 TermlibSuffix=$TINFO_SUFFIX \
30517                                 ShlibVer=$cf_cv_shlib_version \
30518                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30519                                 ReLink=${cf_cv_do_relink:-no} \
30520                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30521                                 DoLinks=$cf_cv_do_symlinks \
30522                                 rmSoLocs=$cf_cv_rm_so_locs \
30523                                 ldconfig="$LDCONFIG" \
30524                                 overwrite=$WITH_OVERWRITE \
30525                                 depend="$cf_depend" \
30526                                 host="$host" \
30527                                 libtool_version="$LIBTOOL_VERSION" \
30528                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30529
30530                         cf_suffix="$old_cf_suffix"
30531
30532                         for cf_subdir2 in $cf_subdirs lib
30533                         do
30534                                 test "$cf_subdir" = "$cf_subdir2" && break
30535                         done
30536                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30537                         $AWK -f "$srcdir/mk-2nd.awk" \
30538                                 name=$cf_dir \
30539                                 traces=$LIB_TRACING \
30540                                 MODEL=$cf_ITEM \
30541                                 model=$cf_subdir \
30542                                 subset=$cf_subset \
30543                                 srcdir=$srcdir \
30544                                 echo=$WITH_ECHO \
30545                                 crenames=$cf_cv_prog_CC_c_o \
30546                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30547                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30548                         cf_subdirs="$cf_subdirs $cf_subdir"
30549                         done
30550                 done
30551         fi
30552
30553         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30554 done
30555
30556 echo >> Makefile
30557 echo '# generated by CF_LIB_RULES' >> Makefile
30558
30559 if test "x$cf_cv_make_PHONY" = xyes ; then
30560         cat >> Makefile <<-CF_EOF
30561
30562         .PHONY :        libs
30563         .PHONY :        lintlib
30564         .PHONY :        install.includes
30565         .PHONY :        uninstall.includes
30566         .PHONY :        install.libs
30567         .PHONY :        uninstall.libs
30568 CF_EOF
30569 fi
30570
30571 for cf_dir in $SRC_SUBDIRS
30572 do
30573         if test ! -d "$srcdir/$cf_dir" ; then
30574                 continue
30575         fi
30576
30577         if test -f "$cf_dir/Makefile" ; then
30578                 case "$cf_dir" in
30579                 (Ada95)
30580                         echo 'libs \' >> Makefile
30581                         echo 'install.libs \' >> Makefile
30582                         echo 'uninstall.libs ::' >> Makefile
30583                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30584                         ;;
30585                 esac
30586         fi
30587
30588         if test -f "$srcdir/$cf_dir/modules" ; then
30589
30590                 if test "x$cf_cv_make_PHONY" = xyes ; then
30591                         cat >> Makefile <<-CF_EOF
30592
30593                         .PHONY :        install.$cf_dir
30594                         .PHONY :        uninstall.$cf_dir
30595 CF_EOF
30596                 fi
30597
30598                 echo >> Makefile
30599                 if test -f "$srcdir/$cf_dir/headers" ; then
30600 cat >> Makefile <<CF_EOF
30601 install.includes \\
30602 uninstall.includes \\
30603 CF_EOF
30604                 fi
30605
30606 cat >> Makefile <<CF_EOF
30607 lint \\
30608 libs \\
30609 lintlib \\
30610 install.libs \\
30611 uninstall.libs \\
30612 install.$cf_dir \\
30613 uninstall.$cf_dir ::
30614         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30615 CF_EOF
30616         elif test -f "$srcdir/$cf_dir/headers" ; then
30617 cat >> Makefile <<CF_EOF
30618
30619 libs \\
30620 install.libs \\
30621 uninstall.libs \\
30622 install.includes \\
30623 uninstall.includes ::
30624         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30625 CF_EOF
30626 fi
30627 done
30628
30629 if test "x$cf_cv_make_PHONY" = xyes ; then
30630         cat >> Makefile <<-CF_EOF
30631
30632         .PHONY :        install.data
30633         .PHONY :        uninstall.data
30634 CF_EOF
30635 fi
30636
30637 if test "x$cf_with_db_install" = xyes; then
30638 cat >> Makefile <<CF_EOF
30639
30640 install.libs uninstall.libs \\
30641 install.data uninstall.data ::
30642 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30643 CF_EOF
30644 else
30645 cat >> Makefile <<CF_EOF
30646
30647 install.libs uninstall.libs ::
30648         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30649 CF_EOF
30650 fi
30651
30652 if test "x$cf_with_manpages" = xyes; then
30653
30654 if test "x$cf_cv_make_PHONY" = xyes ; then
30655         cat >> Makefile <<-CF_EOF
30656
30657         .PHONY :        install.man
30658         .PHONY :        uninstall.man
30659 CF_EOF
30660 fi
30661
30662 cat >> Makefile <<CF_EOF
30663
30664 install.man \\
30665 uninstall.man ::
30666         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30667 CF_EOF
30668 fi
30669
30670 cat >> Makefile <<CF_EOF
30671
30672 distclean ::
30673         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30674         rm -f headers.sh headers.sed mk_shared_lib.sh
30675         rm -f edit_man.* man_alias.*
30676         rm -rf \${DIRS_TO_MAKE}
30677 CF_EOF
30678
30679 # Special case: tack's manpage lives in its own directory.
30680 if test "x$cf_with_manpages" = xyes; then
30681 if test "x$cf_with_tack" = "xyes"; then
30682 cat >> Makefile <<CF_EOF
30683
30684 install.man \\
30685 uninstall.man ::
30686         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30687 CF_EOF
30688 fi
30689 fi
30690
30691 rm -f headers.sed headers.sh
30692
30693 echo creating headers.sh
30694 cat >headers.sh <<CF_EOF
30695 #! $SHELL
30696 # This shell script is generated by the 'configure' script.  It is invoked in a
30697 # subdirectory of the build tree.  It generates a sed-script in the parent
30698 # directory that is used to adjust includes for header files that reside in a
30699 # subdirectory of /usr/include, etc.
30700 PRG=""
30701 while test \$# != 3
30702 do
30703 PRG="\$PRG \$1"; shift
30704 done
30705 DST=\$1
30706 REF=\$2
30707 SRC=\$3
30708 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30709 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30710 echo installing \$SRC in \$DST
30711 CF_EOF
30712
30713 if test "$WITH_CURSES_H" = yes; then
30714         cat >>headers.sh <<CF_EOF
30715 case \$DST in
30716 (/*/include/*)
30717         END=\`basename \$DST\`
30718         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30719         do
30720                 NAME=\`basename \$i\`
30721                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30722         done
30723         ;;
30724 (*)
30725         echo "" >> \$TMPSED
30726         ;;
30727 esac
30728 CF_EOF
30729
30730 else
30731         cat >>headers.sh <<CF_EOF
30732 case \$DST in
30733 (/*/include/*)
30734         END=\`basename \$DST\`
30735         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30736         do
30737                 NAME=\`basename \$i\`
30738                 if test "\$NAME" = "curses.h"
30739                 then
30740                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30741                         NAME=ncurses.h
30742                 fi
30743                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30744         done
30745         ;;
30746 (*)
30747         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30748         ;;
30749 esac
30750 CF_EOF
30751 fi
30752 cat >>headers.sh <<CF_EOF
30753 rm -f \$TMPSRC
30754 sed -f \$TMPSED \$SRC > \$TMPSRC
30755 NAME=\`basename \$SRC\`
30756 CF_EOF
30757 if test "$WITH_CURSES_H" != yes; then
30758         cat >>headers.sh <<CF_EOF
30759 test "\$NAME" = "curses.h" && NAME=ncurses.h
30760 CF_EOF
30761 fi
30762 cat >>headers.sh <<CF_EOF
30763 # Just in case someone gzip'd manpages, remove the conflicting copy.
30764 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30765
30766 eval \$PRG \$TMPSRC \$DST/\$NAME
30767 rm -f \$TMPSRC \$TMPSED
30768 CF_EOF
30769
30770 chmod 0755 headers.sh
30771
30772 for cf_dir in $SRC_SUBDIRS
30773 do
30774         if test ! -d "$srcdir/$cf_dir" ; then
30775                 continue
30776         fi
30777
30778         if test -f "$srcdir/$cf_dir/headers" ; then
30779                 $AWK -f "$srcdir/mk-hdr.awk" \
30780                         subset="$LIB_SUBSETS" \
30781                         compat="$WITH_CURSES_H" \
30782                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30783         fi
30784
30785         if test -f "$srcdir/$cf_dir/modules" ; then
30786                 if test "$cf_dir" != "c++" ; then
30787                         if test "x$cf_cv_make_PHONY" = xyes ; then
30788                                 cat >> $cf_dir/Makefile <<-CF_EOF
30789
30790                                 .PHONY :        depend
30791 CF_EOF
30792                         fi
30793
30794                         cat >>$cf_dir/Makefile <<"CF_EOF"
30795 depend : ${AUTO_SRC}
30796         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30797
30798 # DO NOT DELETE THIS LINE -- make depend depends on it.
30799 CF_EOF
30800                 fi
30801         fi
30802 done
30803
30804 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30805 if test -z "$USE_OLD_MAKERULES" ; then
30806         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30807 fi
30808 fi
30809  ;;
30810   esac
30811 done
30812 EOF
30813
30814 cat >>"$CONFIG_STATUS" <<\EOF
30815
30816 { (exit 0); exit 0; }
30817 EOF
30818 chmod +x "$CONFIG_STATUS"
30819 ac_clean_files=$ac_clean_files_save
30820
30821 # configure is writing to config.log, and then calls config.status.
30822 # config.status does its own redirection, appending to config.log.
30823 # Unfortunately, on DOS this fails, as config.log is still kept open
30824 # by configure, so config.status won't be able to write to it; its
30825 # output is simply discarded.  So we exec the FD to /dev/null,
30826 # effectively closing config.log, so it can be properly (re)opened and
30827 # appended to by config.status.  When coming back to configure, we
30828 # need to make the FD available again.
30829 if test "$no_create" != yes; then
30830   ac_cs_success=:
30831   exec 5>/dev/null
30832   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30833   exec 5>>config.log
30834   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30835   # would make configure fail if this is the last instruction.
30836   "$ac_cs_success" || { (exit 1); exit 1; }
30837 fi
30838 ${MAKE:-make} preinstall