]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
4fc486fdcd15640a45d6fd4ef2d104b2fe45414b
[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 # if $PKG_CONFIG_LIBDIR is set, try to use that
4142 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4143
4144 # if the option is used, let that override.  otherwise default to "libdir"
4145
4146 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4147 if test "${with_pkg_config_libdir+set}" = set; then
4148   withval="$with_pkg_config_libdir"
4149   cf_search_path=$withval
4150 else
4151   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4152 fi;
4153
4154 case x$cf_search_path in
4155 (xlibdir)
4156         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4157         echo "$as_me:4157: result: $PKG_CONFIG_LIBDIR" >&5
4158 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4159         cf_search_path=
4160         ;;
4161 (x)
4162         ;;
4163 (x/*)
4164         PKG_CONFIG_LIBDIR="$cf_search_path"
4165         echo "$as_me:4165: result: $PKG_CONFIG_LIBDIR" >&5
4166 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4167         cf_search_path=
4168         ;;
4169 (xyes|xauto)
4170         echo "$as_me:4170: result: auto" >&5
4171 echo "${ECHO_T}auto" >&6
4172         cf_search_path=
4173         # Look for the library directory using the same prefix as the executable
4174         echo "$as_me:4174: checking for search-list" >&5
4175 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4176         if test "x$PKG_CONFIG" != xnone
4177         then
4178                 # works for pkg-config since version 0.24 (2009)
4179                 # works for pkgconf since version 0.8.3 (2012)
4180                 for cf_pkg_program in \
4181                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4182                         pkg-config \
4183                         pkgconf
4184                 do
4185                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4186                         test -n "$cf_search_path" && break
4187                 done
4188
4189                 # works for pkg-config since import in 2005 of original 2001 HP code.
4190                 test -z "$cf_search_path" && \
4191                 cf_search_path=`
4192                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4193 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4194         sub(\"^[^']*'\",\"\"); \
4195         sub(\"'.*\",\"\"); \
4196         printf \" %s\", \\$0; } \
4197 { next; } \
4198 "`
4199         fi
4200
4201         echo "$as_me:4201: result: $cf_search_path" >&5
4202 echo "${ECHO_T}$cf_search_path" >&6
4203         ;;
4204 (*)
4205         { { echo "$as_me:4205: error: Unexpected option value: $cf_search_path" >&5
4206 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4207    { (exit 1); exit 1; }; }
4208         ;;
4209 esac
4210
4211 if test -n "$cf_search_path"
4212 then
4213         echo "$as_me:4213: checking for first directory" >&5
4214 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4215         cf_pkg_config_path=none
4216         for cf_config in $cf_search_path
4217         do
4218                 if test -d "$cf_config"
4219                 then
4220                         cf_pkg_config_path=$cf_config
4221                         break
4222                 fi
4223         done
4224         echo "$as_me:4224: result: $cf_pkg_config_path" >&5
4225 echo "${ECHO_T}$cf_pkg_config_path" >&6
4226
4227         if test "x$cf_pkg_config_path" != xnone ; then
4228                 # limit this to the first directory found
4229                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4230         fi
4231
4232         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4233         then
4234                 echo "$as_me:4234: checking for workaround" >&5
4235 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4236                 if test "$prefix" = "NONE" ; then
4237                         cf_prefix="$ac_default_prefix"
4238                 else
4239                         cf_prefix="$prefix"
4240                 fi
4241                 eval cf_libdir=$libdir
4242                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4243                 cf_backup=
4244                 for cf_config in $cf_search_path
4245                 do
4246                         case $cf_config in
4247                         $cf_libdir/pkgconfig)
4248                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4249                                 break
4250                                 ;;
4251                         *)
4252                                 test -z "$cf_backup" && cf_backup=$cf_config
4253                                 ;;
4254                         esac
4255                 done
4256                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4257                 echo "$as_me:4257: result: $PKG_CONFIG_LIBDIR" >&5
4258 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4259         fi
4260 fi
4261
4262 if test "x$PKG_CONFIG" != xnone
4263 then
4264         echo "$as_me:4264: checking if we should install .pc files for $PKG_CONFIG" >&5
4265 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4266 else
4267         echo "$as_me:4267: checking if we should install .pc files" >&5
4268 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4269 fi
4270
4271 # Check whether --enable-pc-files or --disable-pc-files was given.
4272 if test "${enable_pc_files+set}" = set; then
4273   enableval="$enable_pc_files"
4274   enable_pc_files=$enableval
4275 else
4276   enable_pc_files=no
4277 fi;
4278 echo "$as_me:4278: result: $enable_pc_files" >&5
4279 echo "${ECHO_T}$enable_pc_files" >&6
4280
4281 if test "x$enable_pc_files" != xno
4282 then
4283         MAKE_PC_FILES=
4284         case "x$PKG_CONFIG_LIBDIR" in
4285         (xno|xnone|xyes|x)
4286                 { echo "$as_me:4286: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4287 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4288                 ;;
4289         (*)
4290                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4291
4292 if test "x$prefix" != xNONE; then
4293         cf_path_syntax="$prefix"
4294 else
4295         cf_path_syntax="$ac_default_prefix"
4296 fi
4297
4298 case ".$cf_pkg_config_libdir" in
4299 (.\$\(*\)*|.\'*\'*)
4300         ;;
4301 (..|./*|.\\*)
4302         ;;
4303 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4304         ;;
4305 (.\$\{*prefix\}*|.\$\{*dir\}*)
4306         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4307         case ".$cf_pkg_config_libdir" in
4308         (.NONE/*)
4309                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4310                 ;;
4311         esac
4312         ;;
4313 (.no|.NONE/*)
4314         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4315         ;;
4316 (*)
4317         { { echo "$as_me:4317: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4318 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4319    { (exit 1); exit 1; }; }
4320         ;;
4321 esac
4322
4323                 ;;
4324         esac
4325 else
4326         MAKE_PC_FILES="#"
4327 fi
4328
4329 if test -z "$MAKE_PC_FILES"
4330 then
4331         echo "$as_me:4331: checking for suffix to add to pc-files" >&5
4332 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4333
4334 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4335 if test "${with_pc_suffix+set}" = set; then
4336   withval="$with_pc_suffix"
4337   case "x$withval" in
4338         (xyes|xno)
4339                 PC_MODULE_SUFFIX=
4340                 ;;
4341         (*)     PC_MODULE_SUFFIX="$withval"
4342                 ;;
4343         esac
4344 fi;
4345         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4346         echo "$as_me:4346: result: $PC_MODULE_SUFFIX" >&5
4347 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4348         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4349
4350 fi
4351
4352 echo "$as_me:4352: checking if we should assume mixed-case filenames" >&5
4353 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4354
4355 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4356 if test "${enable_mixed_case+set}" = set; then
4357   enableval="$enable_mixed_case"
4358   enable_mixedcase=$enableval
4359 else
4360   enable_mixedcase=auto
4361 fi;
4362 echo "$as_me:4362: result: $enable_mixedcase" >&5
4363 echo "${ECHO_T}$enable_mixedcase" >&6
4364 if test "$enable_mixedcase" = "auto" ; then
4365
4366 echo "$as_me:4366: checking if filesystem supports mixed-case filenames" >&5
4367 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4368 if test "${cf_cv_mixedcase+set}" = set; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371
4372 if test "$cross_compiling" = yes ; then
4373         case "$target_alias" in
4374         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4375                 cf_cv_mixedcase=no
4376                 ;;
4377         (*)
4378                 cf_cv_mixedcase=yes
4379                 ;;
4380         esac
4381 else
4382         rm -f conftest CONFTEST
4383         echo test >conftest
4384         if test -f CONFTEST ; then
4385                 cf_cv_mixedcase=no
4386         else
4387                 cf_cv_mixedcase=yes
4388         fi
4389         rm -f conftest CONFTEST
4390 fi
4391
4392 fi
4393 echo "$as_me:4393: result: $cf_cv_mixedcase" >&5
4394 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4395 test "$cf_cv_mixedcase" = yes &&
4396 cat >>confdefs.h <<\EOF
4397 #define MIXEDCASE_FILENAMES 1
4398 EOF
4399
4400 else
4401         cf_cv_mixedcase=$enable_mixedcase
4402         if test "x$enable_mixedcase" = "xyes" ; then
4403
4404 cat >>confdefs.h <<\EOF
4405 #define MIXEDCASE_FILENAMES 1
4406 EOF
4407
4408         fi
4409 fi
4410
4411 # do this after mixed-case option (tags/TAGS is not as important as tic).
4412 echo "$as_me:4412: checking whether ${MAKE-make} sets \${MAKE}" >&5
4413 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4414 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4415 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4416   echo $ECHO_N "(cached) $ECHO_C" >&6
4417 else
4418   cat >conftest.make <<\EOF
4419 all:
4420         @echo 'ac_maketemp="${MAKE}"'
4421 EOF
4422 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4423 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4424 if test -n "$ac_maketemp"; then
4425   eval ac_cv_prog_make_${ac_make}_set=yes
4426 else
4427   eval ac_cv_prog_make_${ac_make}_set=no
4428 fi
4429 rm -f conftest.make
4430 fi
4431 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4432   echo "$as_me:4432: result: yes" >&5
4433 echo "${ECHO_T}yes" >&6
4434   SET_MAKE=
4435 else
4436   echo "$as_me:4436: result: no" >&5
4437 echo "${ECHO_T}no" >&6
4438   SET_MAKE="MAKE=${MAKE-make}"
4439 fi
4440
4441 echo "$as_me:4441: checking for \".PHONY\" make-support" >&5
4442 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4443 if test "${cf_cv_make_PHONY+set}" = set; then
4444   echo $ECHO_N "(cached) $ECHO_C" >&6
4445 else
4446
4447         rm -rf conftest*
4448         (
4449                 mkdir conftest || exit 1
4450                 cd conftest
4451                 cat >makefile <<'CF_EOF'
4452 .PHONY: always
4453 DATA=0
4454 always: always.out
4455         @echo "** making $@ $(DATA)"
4456 once: once.out
4457         @echo "** making $@ $(DATA)"
4458 always.out:
4459         @echo "** making $@ $(DATA)"
4460         echo $(DATA) > $@
4461 once.out:
4462         @echo "** making $@ $(DATA)"
4463         echo $(DATA) > $@
4464 CF_EOF
4465                 for cf_data in 1 2 3
4466                 do
4467                         ${MAKE:-make} always DATA=$cf_data
4468                         ${MAKE:-make} once   DATA=$cf_data
4469                         ${MAKE:-make} -t always once
4470                         if test -f always ; then
4471                                 echo "no (case 1)" > ../conftest.tmp
4472                         elif test ! -f always.out ; then
4473                                 echo "no (case 2)" > ../conftest.tmp
4474                         elif test ! -f once.out ; then
4475                                 echo "no (case 3)" > ../conftest.tmp
4476                         elif ! cmp -s always.out once.out ; then
4477                                 echo "no (case 4)" > ../conftest.tmp
4478                                 diff always.out once.out
4479                         else
4480                                 cf_check="`cat always.out`"
4481                                 if test "x$cf_check" != "x$cf_data" ; then
4482                                         echo "no (case 5)" > ../conftest.tmp
4483                                 else
4484                                         echo yes > ../conftest.tmp
4485                                         rm -f ./*.out
4486                                         continue
4487                                 fi
4488                         fi
4489                         break
4490                 done
4491         ) >&5 2>&1
4492         cf_cv_make_PHONY="`cat conftest.tmp`"
4493         rm -rf conftest*
4494
4495 fi
4496 echo "$as_me:4496: result: $cf_cv_make_PHONY" >&5
4497 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4498 MAKE_NO_PHONY="#"
4499 MAKE_PHONY="#"
4500 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4501 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4502
4503 for ac_prog in exctags ctags
4504 do
4505   # Extract the first word of "$ac_prog", so it can be a program name with args.
4506 set dummy $ac_prog; ac_word=$2
4507 echo "$as_me:4507: checking for $ac_word" >&5
4508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4509 if test "${ac_cv_prog_CTAGS+set}" = set; then
4510   echo $ECHO_N "(cached) $ECHO_C" >&6
4511 else
4512   if test -n "$CTAGS"; then
4513   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4514 else
4515   ac_save_IFS=$IFS; IFS=$ac_path_separator
4516 ac_dummy="$PATH"
4517 for ac_dir in $ac_dummy; do
4518   IFS=$ac_save_IFS
4519   test -z "$ac_dir" && ac_dir=.
4520   $as_executable_p "$ac_dir/$ac_word" || continue
4521 ac_cv_prog_CTAGS="$ac_prog"
4522 echo "$as_me:4522: found $ac_dir/$ac_word" >&5
4523 break
4524 done
4525
4526 fi
4527 fi
4528 CTAGS=$ac_cv_prog_CTAGS
4529 if test -n "$CTAGS"; then
4530   echo "$as_me:4530: result: $CTAGS" >&5
4531 echo "${ECHO_T}$CTAGS" >&6
4532 else
4533   echo "$as_me:4533: result: no" >&5
4534 echo "${ECHO_T}no" >&6
4535 fi
4536
4537   test -n "$CTAGS" && break
4538 done
4539
4540 for ac_prog in exetags etags
4541 do
4542   # Extract the first word of "$ac_prog", so it can be a program name with args.
4543 set dummy $ac_prog; ac_word=$2
4544 echo "$as_me:4544: checking for $ac_word" >&5
4545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4546 if test "${ac_cv_prog_ETAGS+set}" = set; then
4547   echo $ECHO_N "(cached) $ECHO_C" >&6
4548 else
4549   if test -n "$ETAGS"; then
4550   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4551 else
4552   ac_save_IFS=$IFS; IFS=$ac_path_separator
4553 ac_dummy="$PATH"
4554 for ac_dir in $ac_dummy; do
4555   IFS=$ac_save_IFS
4556   test -z "$ac_dir" && ac_dir=.
4557   $as_executable_p "$ac_dir/$ac_word" || continue
4558 ac_cv_prog_ETAGS="$ac_prog"
4559 echo "$as_me:4559: found $ac_dir/$ac_word" >&5
4560 break
4561 done
4562
4563 fi
4564 fi
4565 ETAGS=$ac_cv_prog_ETAGS
4566 if test -n "$ETAGS"; then
4567   echo "$as_me:4567: result: $ETAGS" >&5
4568 echo "${ECHO_T}$ETAGS" >&6
4569 else
4570   echo "$as_me:4570: result: no" >&5
4571 echo "${ECHO_T}no" >&6
4572 fi
4573
4574   test -n "$ETAGS" && break
4575 done
4576
4577 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4578 set dummy ${CTAGS:-ctags}; ac_word=$2
4579 echo "$as_me:4579: checking for $ac_word" >&5
4580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4581 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4582   echo $ECHO_N "(cached) $ECHO_C" >&6
4583 else
4584   if test -n "$MAKE_LOWER_TAGS"; then
4585   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4586 else
4587   ac_save_IFS=$IFS; IFS=$ac_path_separator
4588 ac_dummy="$PATH"
4589 for ac_dir in $ac_dummy; do
4590   IFS=$ac_save_IFS
4591   test -z "$ac_dir" && ac_dir=.
4592   $as_executable_p "$ac_dir/$ac_word" || continue
4593 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4594 echo "$as_me:4594: found $ac_dir/$ac_word" >&5
4595 break
4596 done
4597
4598   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4599 fi
4600 fi
4601 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4602 if test -n "$MAKE_LOWER_TAGS"; then
4603   echo "$as_me:4603: result: $MAKE_LOWER_TAGS" >&5
4604 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4605 else
4606   echo "$as_me:4606: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610 if test "$cf_cv_mixedcase" = yes ; then
4611         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4612 set dummy ${ETAGS:-etags}; ac_word=$2
4613 echo "$as_me:4613: checking for $ac_word" >&5
4614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4615 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4616   echo $ECHO_N "(cached) $ECHO_C" >&6
4617 else
4618   if test -n "$MAKE_UPPER_TAGS"; then
4619   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4620 else
4621   ac_save_IFS=$IFS; IFS=$ac_path_separator
4622 ac_dummy="$PATH"
4623 for ac_dir in $ac_dummy; do
4624   IFS=$ac_save_IFS
4625   test -z "$ac_dir" && ac_dir=.
4626   $as_executable_p "$ac_dir/$ac_word" || continue
4627 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4628 echo "$as_me:4628: found $ac_dir/$ac_word" >&5
4629 break
4630 done
4631
4632   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4633 fi
4634 fi
4635 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4636 if test -n "$MAKE_UPPER_TAGS"; then
4637   echo "$as_me:4637: result: $MAKE_UPPER_TAGS" >&5
4638 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4639 else
4640   echo "$as_me:4640: result: no" >&5
4641 echo "${ECHO_T}no" >&6
4642 fi
4643
4644 else
4645         MAKE_UPPER_TAGS=no
4646 fi
4647
4648 if test "$MAKE_UPPER_TAGS" = yes ; then
4649         MAKE_UPPER_TAGS=
4650 else
4651         MAKE_UPPER_TAGS="#"
4652 fi
4653
4654 if test "$MAKE_LOWER_TAGS" = yes ; then
4655         MAKE_LOWER_TAGS=
4656 else
4657         MAKE_LOWER_TAGS="#"
4658 fi
4659
4660 echo "$as_me:4660: checking for makeflags variable" >&5
4661 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4662 if test "${cf_cv_makeflags+set}" = set; then
4663   echo $ECHO_N "(cached) $ECHO_C" >&6
4664 else
4665
4666         cf_cv_makeflags=''
4667         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4668         do
4669                 cat >cf_makeflags.tmp <<CF_EOF
4670 SHELL = $SHELL
4671 all :
4672         @ echo '.$cf_option'
4673 CF_EOF
4674                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4675                 case "$cf_result" in
4676                 (.*k|.*kw)
4677                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4678                         case "$cf_result" in
4679                         (.*CC=*)        cf_cv_makeflags=
4680                                 ;;
4681                         (*)     cf_cv_makeflags=$cf_option
4682                                 ;;
4683                         esac
4684                         break
4685                         ;;
4686                 (.-)
4687                         ;;
4688                 (*)
4689
4690 echo "${as_me:-configure}:4690: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4691
4692                         ;;
4693                 esac
4694         done
4695         rm -f cf_makeflags.tmp
4696
4697 fi
4698 echo "$as_me:4698: result: $cf_cv_makeflags" >&5
4699 echo "${ECHO_T}$cf_cv_makeflags" >&6
4700
4701 if test -n "$ac_tool_prefix"; then
4702   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4703 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4704 echo "$as_me:4704: checking for $ac_word" >&5
4705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4706 if test "${ac_cv_prog_RANLIB+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709   if test -n "$RANLIB"; then
4710   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4711 else
4712   ac_save_IFS=$IFS; IFS=$ac_path_separator
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715   IFS=$ac_save_IFS
4716   test -z "$ac_dir" && ac_dir=.
4717   $as_executable_p "$ac_dir/$ac_word" || continue
4718 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4719 echo "$as_me:4719: found $ac_dir/$ac_word" >&5
4720 break
4721 done
4722
4723 fi
4724 fi
4725 RANLIB=$ac_cv_prog_RANLIB
4726 if test -n "$RANLIB"; then
4727   echo "$as_me:4727: result: $RANLIB" >&5
4728 echo "${ECHO_T}$RANLIB" >&6
4729 else
4730   echo "$as_me:4730: result: no" >&5
4731 echo "${ECHO_T}no" >&6
4732 fi
4733
4734 fi
4735 if test -z "$ac_cv_prog_RANLIB"; then
4736   ac_ct_RANLIB=$RANLIB
4737   # Extract the first word of "ranlib", so it can be a program name with args.
4738 set dummy ranlib; ac_word=$2
4739 echo "$as_me:4739: checking for $ac_word" >&5
4740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4741 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4742   echo $ECHO_N "(cached) $ECHO_C" >&6
4743 else
4744   if test -n "$ac_ct_RANLIB"; then
4745   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4746 else
4747   ac_save_IFS=$IFS; IFS=$ac_path_separator
4748 ac_dummy="$PATH"
4749 for ac_dir in $ac_dummy; do
4750   IFS=$ac_save_IFS
4751   test -z "$ac_dir" && ac_dir=.
4752   $as_executable_p "$ac_dir/$ac_word" || continue
4753 ac_cv_prog_ac_ct_RANLIB="ranlib"
4754 echo "$as_me:4754: found $ac_dir/$ac_word" >&5
4755 break
4756 done
4757
4758   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4759 fi
4760 fi
4761 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4762 if test -n "$ac_ct_RANLIB"; then
4763   echo "$as_me:4763: result: $ac_ct_RANLIB" >&5
4764 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4765 else
4766   echo "$as_me:4766: result: no" >&5
4767 echo "${ECHO_T}no" >&6
4768 fi
4769
4770   RANLIB=$ac_ct_RANLIB
4771 else
4772   RANLIB="$ac_cv_prog_RANLIB"
4773 fi
4774
4775 if test -n "$ac_tool_prefix"; then
4776   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4777 set dummy ${ac_tool_prefix}ld; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_LD+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$LD"; then
4784   ac_cv_prog_LD="$LD" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_LD="${ac_tool_prefix}ld"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797 fi
4798 fi
4799 LD=$ac_cv_prog_LD
4800 if test -n "$LD"; then
4801   echo "$as_me:4801: result: $LD" >&5
4802 echo "${ECHO_T}$LD" >&6
4803 else
4804   echo "$as_me:4804: result: no" >&5
4805 echo "${ECHO_T}no" >&6
4806 fi
4807
4808 fi
4809 if test -z "$ac_cv_prog_LD"; then
4810   ac_ct_LD=$LD
4811   # Extract the first word of "ld", so it can be a program name with args.
4812 set dummy ld; ac_word=$2
4813 echo "$as_me:4813: checking for $ac_word" >&5
4814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4815 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4816   echo $ECHO_N "(cached) $ECHO_C" >&6
4817 else
4818   if test -n "$ac_ct_LD"; then
4819   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4820 else
4821   ac_save_IFS=$IFS; IFS=$ac_path_separator
4822 ac_dummy="$PATH"
4823 for ac_dir in $ac_dummy; do
4824   IFS=$ac_save_IFS
4825   test -z "$ac_dir" && ac_dir=.
4826   $as_executable_p "$ac_dir/$ac_word" || continue
4827 ac_cv_prog_ac_ct_LD="ld"
4828 echo "$as_me:4828: found $ac_dir/$ac_word" >&5
4829 break
4830 done
4831
4832   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4833 fi
4834 fi
4835 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4836 if test -n "$ac_ct_LD"; then
4837   echo "$as_me:4837: result: $ac_ct_LD" >&5
4838 echo "${ECHO_T}$ac_ct_LD" >&6
4839 else
4840   echo "$as_me:4840: result: no" >&5
4841 echo "${ECHO_T}no" >&6
4842 fi
4843
4844   LD=$ac_ct_LD
4845 else
4846   LD="$ac_cv_prog_LD"
4847 fi
4848
4849 if test -n "$ac_tool_prefix"; then
4850   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4851 set dummy ${ac_tool_prefix}ar; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_AR+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$AR"; then
4858   ac_cv_prog_AR="$AR" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_AR="${ac_tool_prefix}ar"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871 fi
4872 fi
4873 AR=$ac_cv_prog_AR
4874 if test -n "$AR"; then
4875   echo "$as_me:4875: result: $AR" >&5
4876 echo "${ECHO_T}$AR" >&6
4877 else
4878   echo "$as_me:4878: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882 fi
4883 if test -z "$ac_cv_prog_AR"; then
4884   ac_ct_AR=$AR
4885   # Extract the first word of "ar", so it can be a program name with args.
4886 set dummy ar; ac_word=$2
4887 echo "$as_me:4887: checking for $ac_word" >&5
4888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4889 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   if test -n "$ac_ct_AR"; then
4893   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4894 else
4895   ac_save_IFS=$IFS; IFS=$ac_path_separator
4896 ac_dummy="$PATH"
4897 for ac_dir in $ac_dummy; do
4898   IFS=$ac_save_IFS
4899   test -z "$ac_dir" && ac_dir=.
4900   $as_executable_p "$ac_dir/$ac_word" || continue
4901 ac_cv_prog_ac_ct_AR="ar"
4902 echo "$as_me:4902: found $ac_dir/$ac_word" >&5
4903 break
4904 done
4905
4906   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4907 fi
4908 fi
4909 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4910 if test -n "$ac_ct_AR"; then
4911   echo "$as_me:4911: result: $ac_ct_AR" >&5
4912 echo "${ECHO_T}$ac_ct_AR" >&6
4913 else
4914   echo "$as_me:4914: result: no" >&5
4915 echo "${ECHO_T}no" >&6
4916 fi
4917
4918   AR=$ac_ct_AR
4919 else
4920   AR="$ac_cv_prog_AR"
4921 fi
4922
4923 if test -n "$ac_tool_prefix"; then
4924   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4925 set dummy ${ac_tool_prefix}nm; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_NM+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$NM"; then
4932   ac_cv_prog_NM="$NM" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_NM="${ac_tool_prefix}nm"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945 fi
4946 fi
4947 NM=$ac_cv_prog_NM
4948 if test -n "$NM"; then
4949   echo "$as_me:4949: result: $NM" >&5
4950 echo "${ECHO_T}$NM" >&6
4951 else
4952   echo "$as_me:4952: result: no" >&5
4953 echo "${ECHO_T}no" >&6
4954 fi
4955
4956 fi
4957 if test -z "$ac_cv_prog_NM"; then
4958   ac_ct_NM=$NM
4959   # Extract the first word of "nm", so it can be a program name with args.
4960 set dummy nm; ac_word=$2
4961 echo "$as_me:4961: checking for $ac_word" >&5
4962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4963 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4964   echo $ECHO_N "(cached) $ECHO_C" >&6
4965 else
4966   if test -n "$ac_ct_NM"; then
4967   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4968 else
4969   ac_save_IFS=$IFS; IFS=$ac_path_separator
4970 ac_dummy="$PATH"
4971 for ac_dir in $ac_dummy; do
4972   IFS=$ac_save_IFS
4973   test -z "$ac_dir" && ac_dir=.
4974   $as_executable_p "$ac_dir/$ac_word" || continue
4975 ac_cv_prog_ac_ct_NM="nm"
4976 echo "$as_me:4976: found $ac_dir/$ac_word" >&5
4977 break
4978 done
4979
4980   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4981 fi
4982 fi
4983 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4984 if test -n "$ac_ct_NM"; then
4985   echo "$as_me:4985: result: $ac_ct_NM" >&5
4986 echo "${ECHO_T}$ac_ct_NM" >&6
4987 else
4988   echo "$as_me:4988: result: no" >&5
4989 echo "${ECHO_T}no" >&6
4990 fi
4991
4992   NM=$ac_ct_NM
4993 else
4994   NM="$ac_cv_prog_NM"
4995 fi
4996
4997 if test -n "$ac_tool_prefix"; then
4998   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4999 set dummy ${ac_tool_prefix}ar; ac_word=$2
5000 echo "$as_me:5000: checking for $ac_word" >&5
5001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5002 if test "${ac_cv_prog_AR+set}" = set; then
5003   echo $ECHO_N "(cached) $ECHO_C" >&6
5004 else
5005   if test -n "$AR"; then
5006   ac_cv_prog_AR="$AR" # Let the user override the test.
5007 else
5008   ac_save_IFS=$IFS; IFS=$ac_path_separator
5009 ac_dummy="$PATH"
5010 for ac_dir in $ac_dummy; do
5011   IFS=$ac_save_IFS
5012   test -z "$ac_dir" && ac_dir=.
5013   $as_executable_p "$ac_dir/$ac_word" || continue
5014 ac_cv_prog_AR="${ac_tool_prefix}ar"
5015 echo "$as_me:5015: found $ac_dir/$ac_word" >&5
5016 break
5017 done
5018
5019 fi
5020 fi
5021 AR=$ac_cv_prog_AR
5022 if test -n "$AR"; then
5023   echo "$as_me:5023: result: $AR" >&5
5024 echo "${ECHO_T}$AR" >&6
5025 else
5026   echo "$as_me:5026: result: no" >&5
5027 echo "${ECHO_T}no" >&6
5028 fi
5029
5030 fi
5031 if test -z "$ac_cv_prog_AR"; then
5032   ac_ct_AR=$AR
5033   # Extract the first word of "ar", so it can be a program name with args.
5034 set dummy ar; ac_word=$2
5035 echo "$as_me:5035: checking for $ac_word" >&5
5036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5037 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5038   echo $ECHO_N "(cached) $ECHO_C" >&6
5039 else
5040   if test -n "$ac_ct_AR"; then
5041   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5042 else
5043   ac_save_IFS=$IFS; IFS=$ac_path_separator
5044 ac_dummy="$PATH"
5045 for ac_dir in $ac_dummy; do
5046   IFS=$ac_save_IFS
5047   test -z "$ac_dir" && ac_dir=.
5048   $as_executable_p "$ac_dir/$ac_word" || continue
5049 ac_cv_prog_ac_ct_AR="ar"
5050 echo "$as_me:5050: found $ac_dir/$ac_word" >&5
5051 break
5052 done
5053
5054   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5055 fi
5056 fi
5057 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5058 if test -n "$ac_ct_AR"; then
5059   echo "$as_me:5059: result: $ac_ct_AR" >&5
5060 echo "${ECHO_T}$ac_ct_AR" >&6
5061 else
5062   echo "$as_me:5062: result: no" >&5
5063 echo "${ECHO_T}no" >&6
5064 fi
5065
5066   AR=$ac_ct_AR
5067 else
5068   AR="$ac_cv_prog_AR"
5069 fi
5070
5071 echo "$as_me:5071: checking for options to update archives" >&5
5072 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5073 if test "${cf_cv_ar_flags+set}" = set; then
5074   echo $ECHO_N "(cached) $ECHO_C" >&6
5075 else
5076
5077         case "$cf_cv_system_name" in
5078         (*-msvc*)
5079                 cf_cv_ar_flags=''
5080                 cat >mk_static_lib.sh <<-EOF
5081                 #!$SHELL
5082                 MSVC_BIN="$AR"
5083                 out="\$1"
5084                 shift
5085                 exec \$MSVC_BIN -out:"\$out" \$@
5086                 EOF
5087                 chmod +x mk_static_lib.sh
5088                 AR=`pwd`/mk_static_lib.sh
5089                 ;;
5090         (*)
5091                 cf_cv_ar_flags=unknown
5092                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5093                 do
5094
5095                         # check if $ARFLAGS already contains this choice
5096                         if test "x$ARFLAGS" != "x" ; then
5097                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5098                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5099                                         cf_cv_ar_flags=
5100                                         break
5101                                 fi
5102                         fi
5103
5104                         rm -f "conftest.$ac_cv_objext"
5105                         rm -f conftest.a
5106
5107                         cat >"conftest.$ac_ext" <<EOF
5108 #line 5108 "configure"
5109 int     testdata[3] = { 123, 456, 789 };
5110 EOF
5111                         if { (eval echo "$as_me:5111: \"$ac_compile\"") >&5
5112   (eval $ac_compile) 2>&5
5113   ac_status=$?
5114   echo "$as_me:5114: \$? = $ac_status" >&5
5115   (exit "$ac_status"); } ; then
5116                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5117                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5118                                 if test -f conftest.a ; then
5119                                         cf_cv_ar_flags="$cf_ar_flags"
5120                                         break
5121                                 fi
5122                         else
5123                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5124
5125 echo "${as_me:-configure}:5125: testing cannot compile test-program ..." 1>&5
5126
5127                                 break
5128                         fi
5129                 done
5130                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5131                 ;;
5132         esac
5133
5134 fi
5135 echo "$as_me:5135: result: $cf_cv_ar_flags" >&5
5136 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5137
5138 if test -n "$ARFLAGS" ; then
5139         if test -n "$cf_cv_ar_flags" ; then
5140                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5141         fi
5142 else
5143         ARFLAGS=$cf_cv_ar_flags
5144 fi
5145
5146 echo "$as_me:5146: checking if you have specified an install-prefix" >&5
5147 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5148
5149 # Check whether --with-install-prefix or --without-install-prefix was given.
5150 if test "${with_install_prefix+set}" = set; then
5151   withval="$with_install_prefix"
5152   case "x$withval" in
5153         (xyes|xno)
5154                 ;;
5155         (*)     DESTDIR="$withval"
5156                 ;;
5157         esac
5158 fi;
5159 echo "$as_me:5159: result: $DESTDIR" >&5
5160 echo "${ECHO_T}$DESTDIR" >&6
5161
5162 ###############################################################################
5163
5164 # If we're cross-compiling, allow the user to override the tools and their
5165 # options.  The configure script is oriented toward identifying the host
5166 # compiler, etc., but we need a build compiler to generate parts of the source.
5167
5168 case "$cf_cv_system_name" in
5169 (*-msvc*)
5170         LDFLAGS="$LDFLAGS user32.lib"
5171         export LDFLAGS
5172         ;;
5173 esac
5174
5175 if test "$cross_compiling" = yes ; then
5176
5177         # defaults that we might want to override
5178         : ${BUILD_CFLAGS:=''}
5179         : ${BUILD_CPPFLAGS:=''}
5180         : ${BUILD_LDFLAGS:=''}
5181         : ${BUILD_LIBS:=''}
5182         : ${BUILD_EXEEXT:='$x'}
5183         : ${BUILD_OBJEXT:='o'}
5184
5185 # Check whether --with-build-cc or --without-build-cc was given.
5186 if test "${with_build_cc+set}" = set; then
5187   withval="$with_build_cc"
5188   BUILD_CC="$withval"
5189 else
5190   for ac_prog in gcc clang c99 c89 cc cl
5191 do
5192   # Extract the first word of "$ac_prog", so it can be a program name with args.
5193 set dummy $ac_prog; ac_word=$2
5194 echo "$as_me:5194: checking for $ac_word" >&5
5195 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5196 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5197   echo $ECHO_N "(cached) $ECHO_C" >&6
5198 else
5199   if test -n "$BUILD_CC"; then
5200   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5201 else
5202   ac_save_IFS=$IFS; IFS=$ac_path_separator
5203 ac_dummy="$PATH"
5204 for ac_dir in $ac_dummy; do
5205   IFS=$ac_save_IFS
5206   test -z "$ac_dir" && ac_dir=.
5207   $as_executable_p "$ac_dir/$ac_word" || continue
5208 ac_cv_prog_BUILD_CC="$ac_prog"
5209 echo "$as_me:5209: found $ac_dir/$ac_word" >&5
5210 break
5211 done
5212
5213 fi
5214 fi
5215 BUILD_CC=$ac_cv_prog_BUILD_CC
5216 if test -n "$BUILD_CC"; then
5217   echo "$as_me:5217: result: $BUILD_CC" >&5
5218 echo "${ECHO_T}$BUILD_CC" >&6
5219 else
5220   echo "$as_me:5220: result: no" >&5
5221 echo "${ECHO_T}no" >&6
5222 fi
5223
5224   test -n "$BUILD_CC" && break
5225 done
5226 test -n "$BUILD_CC" || BUILD_CC="none"
5227
5228 fi;
5229         echo "$as_me:5229: checking for native build C compiler" >&5
5230 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5231         echo "$as_me:5231: result: $BUILD_CC" >&5
5232 echo "${ECHO_T}$BUILD_CC" >&6
5233
5234         echo "$as_me:5234: checking for native build C preprocessor" >&5
5235 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5236
5237 # Check whether --with-build-cpp or --without-build-cpp was given.
5238 if test "${with_build_cpp+set}" = set; then
5239   withval="$with_build_cpp"
5240   BUILD_CPP="$withval"
5241 else
5242   BUILD_CPP='${BUILD_CC} -E'
5243 fi;
5244         echo "$as_me:5244: result: $BUILD_CPP" >&5
5245 echo "${ECHO_T}$BUILD_CPP" >&6
5246
5247         echo "$as_me:5247: checking for native build C flags" >&5
5248 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5249
5250 # Check whether --with-build-cflags or --without-build-cflags was given.
5251 if test "${with_build_cflags+set}" = set; then
5252   withval="$with_build_cflags"
5253   BUILD_CFLAGS="$withval"
5254 fi;
5255         echo "$as_me:5255: result: $BUILD_CFLAGS" >&5
5256 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5257
5258         echo "$as_me:5258: checking for native build C preprocessor-flags" >&5
5259 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5260
5261 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5262 if test "${with_build_cppflags+set}" = set; then
5263   withval="$with_build_cppflags"
5264   BUILD_CPPFLAGS="$withval"
5265 fi;
5266         echo "$as_me:5266: result: $BUILD_CPPFLAGS" >&5
5267 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5268
5269         echo "$as_me:5269: checking for native build linker-flags" >&5
5270 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5271
5272 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5273 if test "${with_build_ldflags+set}" = set; then
5274   withval="$with_build_ldflags"
5275   BUILD_LDFLAGS="$withval"
5276 fi;
5277         echo "$as_me:5277: result: $BUILD_LDFLAGS" >&5
5278 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5279
5280         echo "$as_me:5280: checking for native build linker-libraries" >&5
5281 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5282
5283 # Check whether --with-build-libs or --without-build-libs was given.
5284 if test "${with_build_libs+set}" = set; then
5285   withval="$with_build_libs"
5286   BUILD_LIBS="$withval"
5287 fi;
5288         echo "$as_me:5288: result: $BUILD_LIBS" >&5
5289 echo "${ECHO_T}$BUILD_LIBS" >&6
5290
5291         # this assumes we're on Unix.
5292         BUILD_EXEEXT=
5293         BUILD_OBJEXT=o
5294
5295         : ${BUILD_CC:='${CC}'}
5296
5297         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5298                 { { echo "$as_me:5298: error: Cross-build requires two compilers.
5299 Use --with-build-cc to specify the native compiler." >&5
5300 echo "$as_me: error: Cross-build requires two compilers.
5301 Use --with-build-cc to specify the native compiler." >&2;}
5302    { (exit 1); exit 1; }; }
5303         fi
5304
5305 else
5306         : ${BUILD_CC:='${CC}'}
5307         : ${BUILD_CPP:='${CPP}'}
5308         : ${BUILD_CFLAGS:='${CFLAGS}'}
5309         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5310         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5311         : ${BUILD_LIBS:='${LIBS}'}
5312         : ${BUILD_EXEEXT:='$x'}
5313         : ${BUILD_OBJEXT:='o'}
5314 fi
5315
5316 ###############################################################################
5317
5318 ### Options to allow the user to specify the set of libraries which are used.
5319 ### Use "--without-normal --with-shared" to allow the default model to be
5320 ### shared, for example.
5321 cf_list_models=""
5322
5323 echo "$as_me:5323: checking if libtool -version-number should be used" >&5
5324 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5325
5326 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5327 if test "${enable_libtool_version+set}" = set; then
5328   enableval="$enable_libtool_version"
5329   test "$enableval" != no && enableval=yes
5330         if test "$enableval" != "yes" ; then
5331     cf_libtool_version=no
5332         else
5333                 cf_libtool_version=yes
5334         fi
5335 else
5336   enableval=yes
5337         cf_libtool_version=yes
5338
5339 fi;
5340 echo "$as_me:5340: result: $cf_libtool_version" >&5
5341 echo "${ECHO_T}$cf_libtool_version" >&6
5342
5343 if test "$cf_libtool_version" = yes ; then
5344         LIBTOOL_VERSION="-version-number"
5345 else
5346         LIBTOOL_VERSION="-version-info"
5347         case "x$VERSION" in
5348         (x)
5349                 { echo "$as_me:5349: WARNING: VERSION was not set" >&5
5350 echo "$as_me: WARNING: VERSION was not set" >&2;}
5351                 ;;
5352         (x*.*.*)
5353                 ABI_VERSION="$VERSION"
5354                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5355
5356 echo "${as_me:-configure}:5356: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5357
5358                 ;;
5359         (x*:*:*)
5360                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5361                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5362
5363 echo "${as_me:-configure}:5363: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5364
5365                 ;;
5366         (*)
5367                 { echo "$as_me:5367: WARNING: unexpected VERSION value: $VERSION" >&5
5368 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5369                 ;;
5370         esac
5371 fi
5372
5373 LIBTOOL=
5374
5375 # common library maintenance symbols that are convenient for libtool scripts:
5376 LIB_CREATE='${AR} -cr'
5377 LIB_OBJECT='${OBJECTS}'
5378 LIB_SUFFIX=.a
5379 LIB_PREP="$RANLIB"
5380
5381 # symbols used to prop libtool up to enable it to determine what it should be
5382 # doing:
5383 LIB_CLEAN=
5384 LIB_COMPILE=
5385 LIB_LINK='${CC}'
5386 LIB_INSTALL=
5387 LIB_UNINSTALL=
5388
5389 echo "$as_me:5389: checking if you want to build libraries with libtool" >&5
5390 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5391
5392 # Check whether --with-libtool or --without-libtool was given.
5393 if test "${with_libtool+set}" = set; then
5394   withval="$with_libtool"
5395   with_libtool=$withval
5396 else
5397   with_libtool=no
5398 fi;
5399 echo "$as_me:5399: result: $with_libtool" >&5
5400 echo "${ECHO_T}$with_libtool" >&6
5401 if test "$with_libtool" != "no"; then
5402
5403         if test "$with_libtool" != "yes" ; then
5404
5405 if test "x$prefix" != xNONE; then
5406         cf_path_syntax="$prefix"
5407 else
5408         cf_path_syntax="$ac_default_prefix"
5409 fi
5410
5411 case ".$with_libtool" in
5412 (.\$\(*\)*|.\'*\'*)
5413         ;;
5414 (..|./*|.\\*)
5415         ;;
5416 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5417         ;;
5418 (.\$\{*prefix\}*|.\$\{*dir\}*)
5419         eval with_libtool="$with_libtool"
5420         case ".$with_libtool" in
5421         (.NONE/*)
5422                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5423                 ;;
5424         esac
5425         ;;
5426 (.no|.NONE/*)
5427         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5428         ;;
5429 (*)
5430         { { echo "$as_me:5430: error: expected a pathname, not \"$with_libtool\"" >&5
5431 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5432    { (exit 1); exit 1; }; }
5433         ;;
5434 esac
5435
5436                 LIBTOOL=$with_libtool
5437         else
5438                 if test -n "$ac_tool_prefix"; then
5439   for ac_prog in libtool glibtool
5440   do
5441     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5442 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5443 echo "$as_me:5443: checking for $ac_word" >&5
5444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5445 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5446   echo $ECHO_N "(cached) $ECHO_C" >&6
5447 else
5448   if test -n "$LIBTOOL"; then
5449   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5450 else
5451   ac_save_IFS=$IFS; IFS=$ac_path_separator
5452 ac_dummy="$PATH"
5453 for ac_dir in $ac_dummy; do
5454   IFS=$ac_save_IFS
5455   test -z "$ac_dir" && ac_dir=.
5456   $as_executable_p "$ac_dir/$ac_word" || continue
5457 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5458 echo "$as_me:5458: found $ac_dir/$ac_word" >&5
5459 break
5460 done
5461
5462 fi
5463 fi
5464 LIBTOOL=$ac_cv_prog_LIBTOOL
5465 if test -n "$LIBTOOL"; then
5466   echo "$as_me:5466: result: $LIBTOOL" >&5
5467 echo "${ECHO_T}$LIBTOOL" >&6
5468 else
5469   echo "$as_me:5469: result: no" >&5
5470 echo "${ECHO_T}no" >&6
5471 fi
5472
5473     test -n "$LIBTOOL" && break
5474   done
5475 fi
5476 if test -z "$LIBTOOL"; then
5477   ac_ct_LIBTOOL=$LIBTOOL
5478   for ac_prog in libtool glibtool
5479 do
5480   # Extract the first word of "$ac_prog", so it can be a program name with args.
5481 set dummy $ac_prog; ac_word=$2
5482 echo "$as_me:5482: checking for $ac_word" >&5
5483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5484 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5485   echo $ECHO_N "(cached) $ECHO_C" >&6
5486 else
5487   if test -n "$ac_ct_LIBTOOL"; then
5488   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5489 else
5490   ac_save_IFS=$IFS; IFS=$ac_path_separator
5491 ac_dummy="$PATH"
5492 for ac_dir in $ac_dummy; do
5493   IFS=$ac_save_IFS
5494   test -z "$ac_dir" && ac_dir=.
5495   $as_executable_p "$ac_dir/$ac_word" || continue
5496 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5497 echo "$as_me:5497: found $ac_dir/$ac_word" >&5
5498 break
5499 done
5500
5501 fi
5502 fi
5503 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5504 if test -n "$ac_ct_LIBTOOL"; then
5505   echo "$as_me:5505: result: $ac_ct_LIBTOOL" >&5
5506 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5507 else
5508   echo "$as_me:5508: result: no" >&5
5509 echo "${ECHO_T}no" >&6
5510 fi
5511
5512   test -n "$ac_ct_LIBTOOL" && break
5513 done
5514 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5515
5516   LIBTOOL=$ac_ct_LIBTOOL
5517 fi
5518
5519 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5520 then
5521         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.].*//'`
5522 else
5523         cf_cv_libtool_version=
5524 fi
5525 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5526
5527                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5528                 then
5529
5530 unset ac_cv_prog_ac_ct_LIBTOOL
5531 unset ac_ct_LIBTOOL
5532 unset LIBTOOL
5533
5534                         if test -n "$ac_tool_prefix"; then
5535   for ac_prog in glibtool
5536   do
5537     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5538 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5539 echo "$as_me:5539: checking for $ac_word" >&5
5540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5541 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5542   echo $ECHO_N "(cached) $ECHO_C" >&6
5543 else
5544   if test -n "$LIBTOOL"; then
5545   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5546 else
5547   ac_save_IFS=$IFS; IFS=$ac_path_separator
5548 ac_dummy="$PATH"
5549 for ac_dir in $ac_dummy; do
5550   IFS=$ac_save_IFS
5551   test -z "$ac_dir" && ac_dir=.
5552   $as_executable_p "$ac_dir/$ac_word" || continue
5553 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5554 echo "$as_me:5554: found $ac_dir/$ac_word" >&5
5555 break
5556 done
5557
5558 fi
5559 fi
5560 LIBTOOL=$ac_cv_prog_LIBTOOL
5561 if test -n "$LIBTOOL"; then
5562   echo "$as_me:5562: result: $LIBTOOL" >&5
5563 echo "${ECHO_T}$LIBTOOL" >&6
5564 else
5565   echo "$as_me:5565: result: no" >&5
5566 echo "${ECHO_T}no" >&6
5567 fi
5568
5569     test -n "$LIBTOOL" && break
5570   done
5571 fi
5572 if test -z "$LIBTOOL"; then
5573   ac_ct_LIBTOOL=$LIBTOOL
5574   for ac_prog in glibtool
5575 do
5576   # Extract the first word of "$ac_prog", so it can be a program name with args.
5577 set dummy $ac_prog; ac_word=$2
5578 echo "$as_me:5578: checking for $ac_word" >&5
5579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5580 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5581   echo $ECHO_N "(cached) $ECHO_C" >&6
5582 else
5583   if test -n "$ac_ct_LIBTOOL"; then
5584   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5585 else
5586   ac_save_IFS=$IFS; IFS=$ac_path_separator
5587 ac_dummy="$PATH"
5588 for ac_dir in $ac_dummy; do
5589   IFS=$ac_save_IFS
5590   test -z "$ac_dir" && ac_dir=.
5591   $as_executable_p "$ac_dir/$ac_word" || continue
5592 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5593 echo "$as_me:5593: found $ac_dir/$ac_word" >&5
5594 break
5595 done
5596
5597 fi
5598 fi
5599 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5600 if test -n "$ac_ct_LIBTOOL"; then
5601   echo "$as_me:5601: result: $ac_ct_LIBTOOL" >&5
5602 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5603 else
5604   echo "$as_me:5604: result: no" >&5
5605 echo "${ECHO_T}no" >&6
5606 fi
5607
5608   test -n "$ac_ct_LIBTOOL" && break
5609 done
5610 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5611
5612   LIBTOOL=$ac_ct_LIBTOOL
5613 fi
5614
5615 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5616 then
5617         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.].*//'`
5618 else
5619         cf_cv_libtool_version=
5620 fi
5621 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5622
5623                 fi
5624         fi
5625         if test -z "$LIBTOOL" ; then
5626                 { { echo "$as_me:5626: error: Cannot find libtool" >&5
5627 echo "$as_me: error: Cannot find libtool" >&2;}
5628    { (exit 1); exit 1; }; }
5629         fi
5630         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5631         LIB_OBJECT='${OBJECTS:.o=.lo}'
5632         LIB_SUFFIX=.la
5633         LIB_CLEAN='${LIBTOOL} --mode=clean'
5634         LIB_COMPILE='${LIBTOOL} --mode=compile'
5635         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5636         LIB_INSTALL='${LIBTOOL} --mode=install'
5637         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5638         LIB_PREP=:
5639
5640 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5641 then
5642         echo "$as_me:5642: checking version of $LIBTOOL" >&5
5643 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5644
5645 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5646 then
5647         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.].*//'`
5648 else
5649         cf_cv_libtool_version=
5650 fi
5651 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5652
5653         echo "$as_me:5653: result: $cf_cv_libtool_version" >&5
5654 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5655         if test -n "$cf_cv_libtool_version"
5656         then
5657                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5658                 case "x$cf_check_libtool_version" in
5659                 (*...GNU-libtool...*)
5660                         ;;
5661                 (*)
5662                         { { echo "$as_me:5662: error: This is not GNU libtool" >&5
5663 echo "$as_me: error: This is not GNU libtool" >&2;}
5664    { (exit 1); exit 1; }; }
5665                         ;;
5666                 esac
5667         else
5668                 { { echo "$as_me:5668: error: No version found for $LIBTOOL" >&5
5669 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5670    { (exit 1); exit 1; }; }
5671         fi
5672 else
5673         { { echo "$as_me:5673: error: GNU libtool has not been found" >&5
5674 echo "$as_me: error: GNU libtool has not been found" >&2;}
5675    { (exit 1); exit 1; }; }
5676 fi
5677
5678         # special hack to add -no-undefined (which libtool should do for itself)
5679         LT_UNDEF=
5680         case "$cf_cv_system_name" in
5681         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5682                 LT_UNDEF=-no-undefined
5683                 ;;
5684         esac
5685
5686         # special hack to add --tag option for C++ compiler
5687         case "$cf_cv_libtool_version" in
5688         (1.[5-9]*|[2-9].[0-9.a-z]*)
5689                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5690                 LIBTOOL="$LIBTOOL --tag=CC"
5691                 ;;
5692         (*)
5693                 LIBTOOL_CXX="$LIBTOOL"
5694                 ;;
5695         esac
5696 else
5697         LIBTOOL=""
5698         LIBTOOL_CXX=""
5699 fi
5700
5701 test -z "$LIBTOOL" && ECHO_LT=
5702
5703 if test "$with_libtool" != "no" ; then
5704
5705 cf_list_models="$cf_list_models libtool"
5706
5707 else
5708
5709 echo "$as_me:5709: checking if you want to build shared libraries" >&5
5710 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5711
5712 # Check whether --with-shared or --without-shared was given.
5713 if test "${with_shared+set}" = set; then
5714   withval="$with_shared"
5715   with_shared=$withval
5716 else
5717   with_shared=no
5718 fi;
5719 echo "$as_me:5719: result: $with_shared" >&5
5720 echo "${ECHO_T}$with_shared" >&6
5721 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5722
5723 echo "$as_me:5723: checking if you want to build static libraries" >&5
5724 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5725
5726 # Check whether --with-normal or --without-normal was given.
5727 if test "${with_normal+set}" = set; then
5728   withval="$with_normal"
5729   with_normal=$withval
5730 else
5731   with_normal=yes
5732 fi;
5733 echo "$as_me:5733: result: $with_normal" >&5
5734 echo "${ECHO_T}$with_normal" >&6
5735 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5736
5737 echo "$as_me:5737: checking if you want to build debug libraries" >&5
5738 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5739
5740 # Check whether --with-debug or --without-debug was given.
5741 if test "${with_debug+set}" = set; then
5742   withval="$with_debug"
5743   with_debug=$withval
5744 else
5745   with_debug=yes
5746 fi;
5747 echo "$as_me:5747: result: $with_debug" >&5
5748 echo "${ECHO_T}$with_debug" >&6
5749 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5750
5751 echo "$as_me:5751: checking if you want to build profiling libraries" >&5
5752 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5753
5754 # Check whether --with-profile or --without-profile was given.
5755 if test "${with_profile+set}" = set; then
5756   withval="$with_profile"
5757   with_profile=$withval
5758 else
5759   with_profile=no
5760 fi;
5761 echo "$as_me:5761: result: $with_profile" >&5
5762 echo "${ECHO_T}$with_profile" >&6
5763 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5764
5765 fi
5766
5767 if test "X$cf_with_cxx_binding" != Xno; then
5768 if test "x$with_shared" = "xyes"; then
5769 echo "$as_me:5769: checking if you want to build C++ shared libraries" >&5
5770 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5771
5772 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5773 if test "${with_cxx_shared+set}" = set; then
5774   withval="$with_cxx_shared"
5775   with_shared_cxx=$withval
5776 else
5777   with_shared_cxx=no
5778 fi;
5779 echo "$as_me:5779: result: $with_shared_cxx" >&5
5780 echo "${ECHO_T}$with_shared_cxx" >&6
5781 fi
5782 fi
5783
5784 ###############################################################################
5785
5786 echo "$as_me:5786: checking for specified models" >&5
5787 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5788 test -z "$cf_list_models" && cf_list_models=normal
5789 test "$with_libtool" != "no" && cf_list_models=libtool
5790 echo "$as_me:5790: result: $cf_list_models" >&5
5791 echo "${ECHO_T}$cf_list_models" >&6
5792
5793 ### Use the first model as the default, and save its suffix for use in building
5794 ### up test-applications.
5795 echo "$as_me:5795: checking for default model" >&5
5796 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5797 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5798 echo "$as_me:5798: result: $DFT_LWR_MODEL" >&5
5799 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5800
5801 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5802
5803 TICS_NAME=tic
5804
5805 TINFO_NAME=tinfo
5806
5807 LIB_NAME=ncurses
5808
5809 LIB_DIR=../lib
5810 LIB_2ND=../../lib
5811
5812 echo "$as_me:5812: checking if you want to have a library-prefix" >&5
5813 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5814
5815 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5816 if test "${with_lib_prefix+set}" = set; then
5817   withval="$with_lib_prefix"
5818   with_lib_prefix=$withval
5819 else
5820   with_lib_prefix=auto
5821 fi;
5822 echo "$as_me:5822: result: $with_lib_prefix" >&5
5823 echo "${ECHO_T}$with_lib_prefix" >&6
5824
5825 if test "$with_lib_prefix" = auto
5826 then
5827
5828         case "$cf_cv_system_name" in
5829         (OS/2*|os2*)
5830                 if test "$DFT_LWR_MODEL" = libtool; then
5831                         LIB_PREFIX='lib'
5832                 else
5833                         LIB_PREFIX=''
5834                 fi
5835                 ;;
5836         (*-msvc*)
5837                 LIB_PREFIX=''
5838                 ;;
5839         (*)     LIB_PREFIX='lib'
5840                 ;;
5841         esac
5842 cf_prefix=$LIB_PREFIX
5843
5844 elif test "$with_lib_prefix" = no
5845 then
5846         LIB_PREFIX=
5847 else
5848         LIB_PREFIX=$with_lib_prefix
5849 fi
5850
5851 LIB_SUFFIX=
5852
5853         echo "$as_me:5853: checking for PATH separator" >&5
5854 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5855         case "$cf_cv_system_name" in
5856         (os2*)  PATH_SEPARATOR=';'  ;;
5857         (*)     ${PATH_SEPARATOR:=':'}  ;;
5858         esac
5859
5860         echo "$as_me:5860: result: $PATH_SEPARATOR" >&5
5861 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5862
5863 ###############################################################################
5864
5865 echo "$as_me:5865: checking if you want to build a separate terminfo library" >&5
5866 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5867
5868 # Check whether --with-termlib or --without-termlib was given.
5869 if test "${with_termlib+set}" = set; then
5870   withval="$with_termlib"
5871   with_termlib=$withval
5872 else
5873   with_termlib=no
5874 fi;
5875 echo "$as_me:5875: result: $with_termlib" >&5
5876 echo "${ECHO_T}$with_termlib" >&6
5877
5878 echo "$as_me:5878: checking if you want to build a separate tic library" >&5
5879 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5880
5881 # Check whether --with-ticlib or --without-ticlib was given.
5882 if test "${with_ticlib+set}" = set; then
5883   withval="$with_ticlib"
5884   with_ticlib=$withval
5885 else
5886   with_ticlib=no
5887 fi;
5888 echo "$as_me:5888: result: $with_ticlib" >&5
5889 echo "${ECHO_T}$with_ticlib" >&6
5890
5891 if test X"$CC_G_OPT" = X"" ; then
5892         CC_G_OPT='-g'
5893         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5894 fi
5895
5896 if test X"$CXX_G_OPT" = X"" ; then
5897         CXX_G_OPT='-g'
5898         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5899 fi
5900
5901 echo "$as_me:5901: checking for default loader flags" >&5
5902 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5903 case "$DFT_LWR_MODEL" in
5904 (libtool) LD_MODEL=''   ;;
5905 (normal)  LD_MODEL=''   ;;
5906 (debug)   LD_MODEL=$CC_G_OPT ;;
5907 (profile) LD_MODEL='-pg';;
5908 (shared)  LD_MODEL=''   ;;
5909 esac
5910 echo "$as_me:5910: result: $LD_MODEL" >&5
5911 echo "${ECHO_T}$LD_MODEL" >&6
5912
5913 case "$DFT_LWR_MODEL" in
5914 (shared)
5915
5916 echo "$as_me:5916: checking if rpath option should be used" >&5
5917 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5918
5919 # Check whether --enable-rpath or --disable-rpath was given.
5920 if test "${enable_rpath+set}" = set; then
5921   enableval="$enable_rpath"
5922   cf_cv_enable_rpath=$enableval
5923 else
5924   cf_cv_enable_rpath=no
5925 fi;
5926 echo "$as_me:5926: result: $cf_cv_enable_rpath" >&5
5927 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5928
5929 echo "$as_me:5929: checking if shared libraries should be relinked during install" >&5
5930 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5931
5932 # Check whether --enable-relink or --disable-relink was given.
5933 if test "${enable_relink+set}" = set; then
5934   enableval="$enable_relink"
5935   cf_cv_do_relink=$enableval
5936 else
5937   cf_cv_do_relink=yes
5938 fi;
5939 echo "$as_me:5939: result: $cf_cv_do_relink" >&5
5940 echo "${ECHO_T}$cf_cv_do_relink" >&6
5941         ;;
5942 esac
5943
5944 # we will build libraries one-level down.
5945 rel_builddir=..
5946
5947 LD_RPATH_OPT=
5948 if test "x$cf_cv_enable_rpath" != xno
5949 then
5950         echo "$as_me:5950: checking for an rpath option" >&5
5951 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5952         case "$cf_cv_system_name" in
5953         (irix*)
5954                 if test "$GCC" = yes; then
5955                         LD_RPATH_OPT="-Wl,-rpath,"
5956                 else
5957                         LD_RPATH_OPT="-rpath "
5958                 fi
5959                 ;;
5960         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5961                 LD_RPATH_OPT="-Wl,-rpath,"
5962                 ;;
5963         (openbsd[2-9].*|mirbsd*)
5964                 LD_RPATH_OPT="-Wl,-rpath,"
5965                 ;;
5966         (dragonfly*)
5967                 LD_RPATH_OPT="-rpath "
5968                 ;;
5969         (netbsd*)
5970                 LD_RPATH_OPT="-Wl,-rpath,"
5971                 ;;
5972         (osf*|mls+*)
5973                 LD_RPATH_OPT="-rpath "
5974                 ;;
5975         (solaris2*)
5976                 LD_RPATH_OPT="-R"
5977                 ;;
5978         (*)
5979                 ;;
5980         esac
5981         echo "$as_me:5981: result: $LD_RPATH_OPT" >&5
5982 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5983
5984         case "x$LD_RPATH_OPT" in
5985         (x-R*)
5986                 echo "$as_me:5986: checking if we need a space after rpath option" >&5
5987 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5988                 cf_save_LIBS="$LIBS"
5989
5990 cf_add_libs="$LIBS"
5991 # reverse order
5992 cf_add_0lib=
5993 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5994 # filter duplicates
5995 for cf_add_1lib in $cf_add_0lib; do
5996         for cf_add_2lib in $cf_add_libs; do
5997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5998                         cf_add_1lib=
5999                         break
6000                 fi
6001         done
6002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6003 done
6004 LIBS="$cf_add_libs"
6005
6006                 cat >"conftest.$ac_ext" <<_ACEOF
6007 #line 6007 "configure"
6008 #include "confdefs.h"
6009
6010 int
6011 main (void)
6012 {
6013
6014   ;
6015   return 0;
6016 }
6017 _ACEOF
6018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6019 if { (eval echo "$as_me:6019: \"$ac_link\"") >&5
6020   (eval $ac_link) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit "$ac_status"); } &&
6024          { ac_try='test -s "conftest$ac_exeext"'
6025   { (eval echo "$as_me:6025: \"$ac_try\"") >&5
6026   (eval $ac_try) 2>&5
6027   ac_status=$?
6028   echo "$as_me:6028: \$? = $ac_status" >&5
6029   (exit "$ac_status"); }; }; then
6030   cf_rpath_space=no
6031 else
6032   echo "$as_me: failed program was:" >&5
6033 cat "conftest.$ac_ext" >&5
6034 cf_rpath_space=yes
6035 fi
6036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6037                 LIBS="$cf_save_LIBS"
6038                 echo "$as_me:6038: result: $cf_rpath_space" >&5
6039 echo "${ECHO_T}$cf_rpath_space" >&6
6040                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6041                 ;;
6042         esac
6043 fi
6044
6045         RM_SHARED_OPTS=
6046         LOCAL_LDFLAGS=
6047         LOCAL_LDFLAGS2=
6048         LD_SHARED_OPTS=
6049         INSTALL_LIB="-m 644"
6050         : ${rel_builddir:=.}
6051
6052         shlibdir=$libdir
6053
6054         MAKE_DLLS="#"
6055
6056         cf_cv_do_symlinks=no
6057         cf_ld_rpath_opt=
6058         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6059
6060         echo "$as_me:6060: checking if release/abi version should be used for shared libs" >&5
6061 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6062
6063 # Check whether --with-shlib-version or --without-shlib-version was given.
6064 if test "${with_shlib_version+set}" = set; then
6065   withval="$with_shlib_version"
6066   test -z "$withval" && withval=auto
6067         case "$withval" in
6068         (yes)
6069                 cf_cv_shlib_version=auto
6070                 ;;
6071         (rel|abi|auto)
6072                 cf_cv_shlib_version=$withval
6073                 ;;
6074         (*)
6075                 echo "$as_me:6075: result: $withval" >&5
6076 echo "${ECHO_T}$withval" >&6
6077                 { { echo "$as_me:6077: error: option value must be one of: rel, abi, or auto" >&5
6078 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6079    { (exit 1); exit 1; }; }
6080                 ;;
6081         esac
6082
6083 else
6084   cf_cv_shlib_version=auto
6085 fi;
6086         echo "$as_me:6086: result: $cf_cv_shlib_version" >&5
6087 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6088
6089         cf_cv_rm_so_locs=no
6090         cf_try_cflags=
6091
6092         # Some less-capable ports of gcc support only -fpic
6093         CC_SHARED_OPTS=
6094
6095         cf_try_fPIC=no
6096         if test "$GCC" = yes
6097         then
6098                 cf_try_fPIC=yes
6099         else
6100                 case "$cf_cv_system_name" in
6101                 (*linux*)       # e.g., PGI compiler
6102                         cf_try_fPIC=yes
6103                         ;;
6104                 esac
6105         fi
6106
6107         if test "$cf_try_fPIC" = yes
6108         then
6109                 echo "$as_me:6109: checking which $CC option to use" >&5
6110 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6111                 cf_save_CFLAGS="$CFLAGS"
6112                 for CC_SHARED_OPTS in -fPIC -fpic ''
6113                 do
6114                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6115                         cat >"conftest.$ac_ext" <<_ACEOF
6116 #line 6116 "configure"
6117 #include "confdefs.h"
6118 #include <stdio.h>
6119 int
6120 main (void)
6121 {
6122 int x = 1
6123   ;
6124   return 0;
6125 }
6126 _ACEOF
6127 rm -f "conftest.$ac_objext"
6128 if { (eval echo "$as_me:6128: \"$ac_compile\"") >&5
6129   (eval $ac_compile) 2>&5
6130   ac_status=$?
6131   echo "$as_me:6131: \$? = $ac_status" >&5
6132   (exit "$ac_status"); } &&
6133          { ac_try='test -s "conftest.$ac_objext"'
6134   { (eval echo "$as_me:6134: \"$ac_try\"") >&5
6135   (eval $ac_try) 2>&5
6136   ac_status=$?
6137   echo "$as_me:6137: \$? = $ac_status" >&5
6138   (exit "$ac_status"); }; }; then
6139   break
6140 else
6141   echo "$as_me: failed program was:" >&5
6142 cat "conftest.$ac_ext" >&5
6143 fi
6144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6145                 done
6146                 echo "$as_me:6146: result: $CC_SHARED_OPTS" >&5
6147 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6148                 CFLAGS="$cf_save_CFLAGS"
6149         fi
6150
6151         cf_cv_shlib_version_infix=no
6152
6153         case "$cf_cv_system_name" in
6154         (aix4.3-9*|aix[5-7]*)
6155                 if test "$GCC" = yes; then
6156                         CC_SHARED_OPTS='-Wl,-brtl'
6157                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6158                 else
6159                         CC_SHARED_OPTS='-brtl'
6160                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6161                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6162                 fi
6163                 ;;
6164         (beos*)
6165                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6166                 ;;
6167         (cygwin*)
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=cygdll
6172                 cf_cv_shlib_version_infix=cygdll
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/cyg/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         (msys*)
6190                 CC_SHARED_OPTS=
6191                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6192                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6193                 cf_cv_shlib_version=msysdll
6194                 cf_cv_shlib_version_infix=msysdll
6195                 shlibdir=$bindir
6196                 MAKE_DLLS=
6197                 cat >mk_shared_lib.sh <<-CF_EOF
6198                 #!$SHELL
6199                 SHARED_LIB=\$1
6200                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6201                 shift
6202                 cat <<-EOF
6203                 Linking shared library
6204                 ** SHARED_LIB \$SHARED_LIB
6205                 ** IMPORT_LIB \$IMPORT_LIB
6206 EOF
6207                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6208 CF_EOF
6209                 chmod +x mk_shared_lib.sh
6210                 ;;
6211         (darwin*)
6212                 cf_try_cflags="no-cpp-precomp"
6213                 CC_SHARED_OPTS="-dynamic"
6214                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6215                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6216                 cf_cv_shlib_version_infix=yes
6217                 echo "$as_me:6217: checking if ld -search_paths_first works" >&5
6218 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6219 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6220   echo $ECHO_N "(cached) $ECHO_C" >&6
6221 else
6222
6223                         cf_save_LDFLAGS=$LDFLAGS
6224                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6225                         cat >"conftest.$ac_ext" <<_ACEOF
6226 #line 6226 "configure"
6227 #include "confdefs.h"
6228
6229 int
6230 main (void)
6231 {
6232 int i;
6233   ;
6234   return 0;
6235 }
6236 _ACEOF
6237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6238 if { (eval echo "$as_me:6238: \"$ac_link\"") >&5
6239   (eval $ac_link) 2>&5
6240   ac_status=$?
6241   echo "$as_me:6241: \$? = $ac_status" >&5
6242   (exit "$ac_status"); } &&
6243          { ac_try='test -s "conftest$ac_exeext"'
6244   { (eval echo "$as_me:6244: \"$ac_try\"") >&5
6245   (eval $ac_try) 2>&5
6246   ac_status=$?
6247   echo "$as_me:6247: \$? = $ac_status" >&5
6248   (exit "$ac_status"); }; }; then
6249   cf_cv_ldflags_search_paths_first=yes
6250 else
6251   echo "$as_me: failed program was:" >&5
6252 cat "conftest.$ac_ext" >&5
6253 cf_cv_ldflags_search_paths_first=no
6254 fi
6255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6256                                 LDFLAGS=$cf_save_LDFLAGS
6257 fi
6258 echo "$as_me:6258: result: $cf_cv_ldflags_search_paths_first" >&5
6259 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6260                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6261                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6262                 fi
6263                 ;;
6264         (haiku*)
6265
6266         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6267         if test "$cf_cv_shlib_version" = rel; then
6268                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6269         else
6270                 cf_cv_shared_soname='`basename $@`'
6271         fi
6272
6273                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6274                 ;;
6275         (hpux[7-8]*)
6276                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6277                 if test "$GCC" != yes; then
6278                         CC_SHARED_OPTS='+Z'
6279                 fi
6280                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6281                 INSTALL_LIB="-m 555"
6282                 ;;
6283         (hpux*)
6284                 # (tested with gcc 2.7.2 -- I don't have c89)
6285                 if test "$GCC" = yes; then
6286                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6287                 else
6288                         CC_SHARED_OPTS='+Z'
6289                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6290                 fi
6291                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6292                 # HP-UX shared libraries must be executable, and should be
6293                 # readonly to exploit a quirk in the memory manager.
6294                 INSTALL_LIB="-m 555"
6295                 ;;
6296         (interix*)
6297                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6298                 if test "$cf_cv_shlib_version" = rel; then
6299                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6300                 else
6301                         cf_shared_soname='`basename $@`'
6302                 fi
6303                 CC_SHARED_OPTS=
6304                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6305                 ;;
6306         (irix*)
6307                 if test "$cf_cv_enable_rpath" = yes ; then
6308                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6309                 fi
6310                 # tested with IRIX 5.2 and 'cc'.
6311                 if test "$GCC" != yes; then
6312                         CC_SHARED_OPTS='-KPIC'
6313                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6314                 else
6315                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6316                 fi
6317                 cf_cv_rm_so_locs=yes
6318                 ;;
6319         (linux*|gnu*|k*bsd*-gnu)
6320                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6321                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                 fi
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6326                 fi
6327
6328         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6329         if test "$cf_cv_shlib_version" = rel; then
6330                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6331         else
6332                 cf_cv_shared_soname='`basename $@`'
6333         fi
6334
6335                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6336                 ;;
6337         (mingw*msvc*)
6338                 cf_cv_shlib_version=msvcdll
6339                 cf_cv_shlib_version_infix=msvcdll
6340                 shlibdir=$bindir
6341                 MAKE_DLLS=
6342                 if test "$DFT_LWR_MODEL" = "shared" ; then
6343                         LOCAL_LDFLAGS="-link -dll"
6344                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6345                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6346                 fi
6347                 CC_SHARED_OPTS=
6348                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6349                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6350                 cat >mk_shared_lib.sh <<-CF_EOF
6351                 #!$SHELL
6352                 SHARED_LIB=\$1
6353                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6354                 shift
6355                 my_ld=\$1
6356                 shift
6357                 cat <<-EOF
6358                 Linking shared library
6359                 ** SHARED LIB \$SHARED_LIB
6360                 ** IMPORT_LIB \$IMPORT_LIB
6361 EOF
6362                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6363                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6364                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6365 CF_EOF
6366                 chmod +x mk_shared_lib.sh
6367                 cat >mk_prog.sh <<-CF_EOF
6368                 #!$SHELL
6369                 shift
6370                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6371                 LD="$LD"
6372                 clopts=()
6373                 ldopts=("/subsystem:console")
6374                 libs=()
6375                 isdll=0
6376                 while test \$# -gt 0; do
6377                         case "\$1" in
6378                                 -link)
6379                                         # ignore -link argument
6380                                         ;;
6381                                 -M[TD] | -M[TD]d)
6382                                         # ignore runtime-library option
6383                                         ;;
6384                                 -dll)
6385                                         isdll=1
6386                                         ;;
6387                                 -W* | -w*)
6388                                         # ignore warnings
6389                                         ;;
6390                                 -D*)
6391                                         clopts+=("\$1")
6392                                         ;;
6393                                 -I*)
6394                                         clopts+=("\$1")
6395                                         ;;
6396                                 -l*)
6397                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6398                                         ;;
6399                                 -L*)
6400                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6401                                         ;;
6402                                 *.obj | *.o)
6403                                         ldopts+=("\$1")
6404                                         ;;
6405                                 -Wl,*)
6406                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6407                                                 ldopts+=("\${linkarg}")
6408                                         done
6409                                         ;;
6410                                 *.lib)
6411                                         ldopts+=("\$1")
6412                                         ;;
6413                                 -o)
6414                                         shift
6415                                         ldopts+=("-out:\$1")
6416                                         ;;
6417                                 *)
6418                                         clopts+=("\$1")
6419                                         ldopts+=("\$1")
6420                                         ;;
6421                         esac
6422                         shift
6423                 done
6424                 if [ "\$isdll" -ne 0 ]; then
6425                         for lib in \${libs[*]}; do
6426                                 ldopts+=("\$lib.dll.lib")
6427                         done
6428                 else
6429                         for lib in \${libs[*]}; do
6430                                 ldopts+=("\$lib.lib")
6431                         done
6432                 fi
6433                 cat <<-EOF
6434                 Creating program
6435                 ** ld options:   "\${ldopts[@]}"
6436 EOF
6437                 exec \$LD \${ldopts[@]}
6438 CF_EOF
6439                 chmod +x mk_prog.sh
6440                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6441                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6442                 ;;
6443         (mingw*)
6444                 cf_cv_shlib_version=mingw
6445                 cf_cv_shlib_version_infix=mingw
6446                 shlibdir=$bindir
6447                 MAKE_DLLS=
6448                 if test "$DFT_LWR_MODEL" = "shared" ; then
6449                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6450                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6451                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6452                 fi
6453                 CC_SHARED_OPTS=
6454                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6455                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6456                 cat >mk_shared_lib.sh <<-CF_EOF
6457                 #!$SHELL
6458                 SHARED_LIB=\$1
6459                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6460                 shift
6461                 cat <<-EOF
6462                 Linking shared library
6463                 ** SHARED_LIB \$SHARED_LIB
6464                 ** IMPORT_LIB \$IMPORT_LIB
6465 EOF
6466                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6467 CF_EOF
6468                 chmod +x mk_shared_lib.sh
6469                 ;;
6470         (openbsd[2-9].*|mirbsd*)
6471                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6472                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6473                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6474                 fi
6475                 if test "$cf_cv_enable_rpath" = yes ; then
6476                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6477                 fi
6478                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6479
6480         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6481         if test "$cf_cv_shlib_version" = rel; then
6482                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6483         else
6484                 cf_cv_shared_soname='`basename $@`'
6485         fi
6486
6487                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6488                 ;;
6489         (nskJ*)
6490                 CC_SHARED_OPTS=
6491                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6492                 ;;
6493         (nskL*)
6494                 CC_SHARED_OPTS=
6495                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6496                 ;;
6497         (nto-qnx*|openbsd*|freebsd[12].*)
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6500                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6501                 ;;
6502         (dragonfly*|freebsd*)
6503                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6504                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6505                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6506                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6507                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6508                 fi
6509
6510         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6511         if test "$cf_cv_shlib_version" = rel; then
6512                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6513         else
6514                 cf_cv_shared_soname='`basename $@`'
6515         fi
6516
6517                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6518                 ;;
6519         (netbsd*)
6520                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6521                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6522                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6523                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6524                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6525                         if test "$cf_cv_shlib_version" = auto; then
6526                         if test -f /usr/libexec/ld.elf_so; then
6527                                 cf_cv_shlib_version=abi
6528                         else
6529                                 cf_cv_shlib_version=rel
6530                         fi
6531                         fi
6532
6533         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6534         if test "$cf_cv_shlib_version" = rel; then
6535                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6536         else
6537                 cf_cv_shared_soname='`basename $@`'
6538         fi
6539
6540                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6541                 else
6542                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6543                 fi
6544                 ;;
6545         (osf*|mls+*)
6546                 # tested with OSF/1 V3.2 and 'cc'
6547                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6548                 # link with shared libs).
6549                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6550                 case "$host_os" in
6551                 (osf4*)
6552                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6553                         ;;
6554                 esac
6555                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6556                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6557                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6558                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6559                 fi
6560                 cf_cv_rm_so_locs=yes
6561                 ;;
6562         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6563                 # tested with osr5.0.5
6564                 if test "$GCC" != yes; then
6565                         CC_SHARED_OPTS='-belf -KPIC'
6566                 fi
6567                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6568                 if test "$cf_cv_enable_rpath" = yes ; then
6569                         # only way is to set LD_RUN_PATH but no switch for it
6570                         RUN_PATH=$libdir
6571                 fi
6572                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6573                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6574                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6575                 ;;
6576         (sunos4*)
6577                 # tested with SunOS 4.1.1 and gcc 2.7.0
6578                 if test "$GCC" != yes; then
6579                         CC_SHARED_OPTS='-KPIC'
6580                 fi
6581                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6582                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6583                 ;;
6584         (solaris2*)
6585                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6586                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6587                 if test "$DFT_LWR_MODEL" = "shared" ; then
6588                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6589                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6590                 fi
6591                 if test "$cf_cv_enable_rpath" = yes ; then
6592                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6593                 fi
6594
6595         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6596         if test "$cf_cv_shlib_version" = rel; then
6597                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6598         else
6599                 cf_cv_shared_soname='`basename $@`'
6600         fi
6601
6602                 if test "$GCC" != yes; then
6603                         cf_save_CFLAGS="$CFLAGS"
6604                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6605                         do
6606                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6607                                 cat >"conftest.$ac_ext" <<_ACEOF
6608 #line 6608 "configure"
6609 #include "confdefs.h"
6610 #include <stdio.h>
6611 int
6612 main (void)
6613 {
6614 printf("Hello\\n");
6615   ;
6616   return 0;
6617 }
6618 _ACEOF
6619 rm -f "conftest.$ac_objext"
6620 if { (eval echo "$as_me:6620: \"$ac_compile\"") >&5
6621   (eval $ac_compile) 2>&5
6622   ac_status=$?
6623   echo "$as_me:6623: \$? = $ac_status" >&5
6624   (exit "$ac_status"); } &&
6625          { ac_try='test -s "conftest.$ac_objext"'
6626   { (eval echo "$as_me:6626: \"$ac_try\"") >&5
6627   (eval $ac_try) 2>&5
6628   ac_status=$?
6629   echo "$as_me:6629: \$? = $ac_status" >&5
6630   (exit "$ac_status"); }; }; then
6631   break
6632 else
6633   echo "$as_me: failed program was:" >&5
6634 cat "conftest.$ac_ext" >&5
6635 fi
6636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6637                         done
6638                         CFLAGS="$cf_save_CFLAGS"
6639                         CC_SHARED_OPTS=$cf_shared_opts
6640                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6641                 else
6642                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6643                 fi
6644                 ;;
6645         (sysv5uw7*|unix_sv*)
6646                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6647                 if test "$GCC" != yes; then
6648                         CC_SHARED_OPTS='-KPIC'
6649                 fi
6650                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6651                 ;;
6652         (*)
6653                 CC_SHARED_OPTS='unknown'
6654                 MK_SHARED_LIB='echo unknown'
6655                 ;;
6656         esac
6657
6658         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6659         case "$cf_cv_shlib_version" in
6660         (rel|abi)
6661                 case "$MK_SHARED_LIB" in
6662                 (*'-o $@')
6663                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6664                         ;;
6665                 (*)
6666                         { echo "$as_me:6666: WARNING: ignored --with-shlib-version" >&5
6667 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6668                         ;;
6669                 esac
6670                 ;;
6671         esac
6672
6673         if test -n "$cf_try_cflags"
6674         then
6675 cat > conftest.$ac_ext <<EOF
6676 #line 6676 "${as_me:-configure}"
6677 #include <stdio.h>
6678 int main(int argc, char *argv[])
6679 {
6680         printf("hello\\n");
6681         return (argv[argc-1] == 0) ;
6682 }
6683 EOF
6684                 cf_save_CFLAGS="$CFLAGS"
6685                 for cf_opt in $cf_try_cflags
6686                 do
6687                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6688                         echo "$as_me:6688: checking if CFLAGS option -$cf_opt works" >&5
6689 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6690                         if { (eval echo "$as_me:6690: \"$ac_compile\"") >&5
6691   (eval $ac_compile) 2>&5
6692   ac_status=$?
6693   echo "$as_me:6693: \$? = $ac_status" >&5
6694   (exit "$ac_status"); }; then
6695                                 echo "$as_me:6695: result: yes" >&5
6696 echo "${ECHO_T}yes" >&6
6697                                 cf_save_CFLAGS="$CFLAGS"
6698                         else
6699                                 echo "$as_me:6699: result: no" >&5
6700 echo "${ECHO_T}no" >&6
6701                         fi
6702                 done
6703                 CFLAGS="$cf_save_CFLAGS"
6704         fi
6705
6706         # RPATH_LIST is a colon-separated list of directories
6707         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6708         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6709
6710         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6711
6712         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6713
6714 echo "${as_me:-configure}:6714: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6715
6716         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6717
6718 echo "${as_me:-configure}:6718: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6719
6720 for model in $cf_list_models ; do
6721         case "$model" in
6722         (libtool)
6723
6724 echo "$as_me:6724: checking for additional libtool options" >&5
6725 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6726
6727 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6728 if test "${with_libtool_opts+set}" = set; then
6729   withval="$with_libtool_opts"
6730   with_libtool_opts=$withval
6731 else
6732   with_libtool_opts=no
6733 fi;
6734 echo "$as_me:6734: result: $with_libtool_opts" >&5
6735 echo "${ECHO_T}$with_libtool_opts" >&6
6736
6737 case .$with_libtool_opts in
6738 (.yes|.no|.)
6739         ;;
6740 (*)
6741         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6742         ;;
6743 esac
6744
6745 echo "$as_me:6745: checking if exported-symbols file should be used" >&5
6746 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6747
6748 # Check whether --with-export-syms or --without-export-syms was given.
6749 if test "${with_export_syms+set}" = set; then
6750   withval="$with_export_syms"
6751   with_export_syms=$withval
6752 else
6753   with_export_syms=no
6754 fi;
6755 if test "x$with_export_syms" = xyes
6756 then
6757         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6758
6759 fi
6760 echo "$as_me:6760: result: $with_export_syms" >&5
6761 echo "${ECHO_T}$with_export_syms" >&6
6762 if test "x$with_export_syms" != xno
6763 then
6764         EXPORT_SYMS="-export-symbols $with_export_syms"
6765
6766 fi
6767
6768                 ;;
6769         (shared)
6770                 if test "$CC_SHARED_OPTS" = "unknown"; then
6771                         { { echo "$as_me:6771: error: Shared libraries are not supported in this version" >&5
6772 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6773    { (exit 1); exit 1; }; }
6774                 fi
6775                 # workaround for inept transition to PIE vs PIC...
6776                 echo "$as_me:6776: checking if current CFLAGS link properly" >&5
6777 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6778                 cat >"conftest.$ac_ext" <<_ACEOF
6779 #line 6779 "configure"
6780 #include "confdefs.h"
6781 #include <stdio.h>
6782 int
6783 main (void)
6784 {
6785 printf("Hello work\\n");
6786   ;
6787   return 0;
6788 }
6789 _ACEOF
6790 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6791 if { (eval echo "$as_me:6791: \"$ac_link\"") >&5
6792   (eval $ac_link) 2>&5
6793   ac_status=$?
6794   echo "$as_me:6794: \$? = $ac_status" >&5
6795   (exit "$ac_status"); } &&
6796          { ac_try='test -s "conftest$ac_exeext"'
6797   { (eval echo "$as_me:6797: \"$ac_try\"") >&5
6798   (eval $ac_try) 2>&5
6799   ac_status=$?
6800   echo "$as_me:6800: \$? = $ac_status" >&5
6801   (exit "$ac_status"); }; }; then
6802   cf_cflags_work=yes
6803 else
6804   echo "$as_me: failed program was:" >&5
6805 cat "conftest.$ac_ext" >&5
6806 cf_cflags_work=no
6807 fi
6808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6809                 echo "$as_me:6809: result: $cf_cflags_work" >&5
6810 echo "${ECHO_T}$cf_cflags_work" >&6
6811                 if test "$cf_cflags_work" = no
6812                 then
6813                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6814
6815 echo "${as_me:-configure}:6815: testing try to work around by appending shared-options ..." 1>&5
6816
6817                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6818                 fi
6819
6820 echo "$as_me:6820: checking if versioned-symbols file should be used" >&5
6821 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6822
6823 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6824 if test "${with_versioned_syms+set}" = set; then
6825   withval="$with_versioned_syms"
6826   with_versioned_syms=$withval
6827 else
6828   with_versioned_syms=no
6829 fi;
6830 case "x$with_versioned_syms" in
6831 (xyes)
6832         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6833
6834         ;;
6835 (xno)
6836         ;;
6837 (x/*)
6838         test -f "$with_versioned_syms" || { { echo "$as_me:6838: error: expected a filename: $with_versioned_syms" >&5
6839 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6840    { (exit 1); exit 1; }; }
6841         ;;
6842 (*)
6843         test -f "$with_versioned_syms" || { { echo "$as_me:6843: error: expected a filename: $with_versioned_syms" >&5
6844 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6845    { (exit 1); exit 1; }; }
6846         with_versioned_syms=`pwd`/"$with_versioned_syms"
6847         ;;
6848 esac
6849 echo "$as_me:6849: result: $with_versioned_syms" >&5
6850 echo "${ECHO_T}$with_versioned_syms" >&6
6851
6852 RESULTING_SYMS=
6853 VERSIONED_SYMS=
6854 WILDCARD_SYMS=
6855
6856 if test "x$with_versioned_syms" != xno
6857 then
6858         RESULTING_SYMS=$with_versioned_syms
6859         case "x$MK_SHARED_LIB" in
6860         (*-Wl,*)
6861                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6862                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6863                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6864
6865 echo "${as_me:-configure}:6865: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6866
6867                 ;;
6868         (*-dy\ *)
6869                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6870                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6871                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6872
6873 echo "${as_me:-configure}:6873: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6874
6875                 ;;
6876         (*)
6877                 { echo "$as_me:6877: WARNING: this system does not support versioned-symbols" >&5
6878 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6879                 ;;
6880         esac
6881
6882         # Linux ld can selectively override scope, e.g., of symbols beginning with
6883         # "_" by first declaring some as global, and then using a wildcard to
6884         # declare the others as local.  Some other loaders cannot do this.  Check
6885         # by constructing a (very) simple shared library and inspecting its
6886         # symbols.
6887         if test "x$VERSIONED_SYMS" != "x"
6888         then
6889                 echo "$as_me:6889: checking if wildcards can be used to selectively omit symbols" >&5
6890 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6891                 WILDCARD_SYMS=no
6892
6893                 # make sources
6894                 rm -f conftest.*
6895
6896                 cat >conftest.ver <<EOF
6897 module_1.0 {
6898 global:
6899         globalf1;
6900 local:
6901         localf1;
6902 };
6903 module_2.0 {
6904 global:
6905         globalf2;
6906 local:
6907         localf2;
6908         _*;
6909 } module_1.0;
6910 submodule_1.0 {
6911 global:
6912         subglobalf1;
6913         _ismissing;
6914 local:
6915         sublocalf1;
6916 };
6917 submodule_2.0 {
6918 global:
6919         subglobalf2;
6920 local:
6921         sublocalf2;
6922         _*;
6923 } submodule_1.0;
6924 EOF
6925                 cat >conftest.$ac_ext <<EOF
6926 #line 6926 "configure"
6927 int     _ismissing(void) { return 1; }
6928 int     _localf1(void) { return 1; }
6929 int     _localf2(void) { return 2; }
6930 int     globalf1(void) { return 1; }
6931 int     globalf2(void) { return 2; }
6932 int     _sublocalf1(void) { return 1; }
6933 int     _sublocalf2(void) { return 2; }
6934 int     subglobalf1(void) { return 1; }
6935 int     subglobalf2(void) { return 2; }
6936 EOF
6937                 cat >conftest.mk <<EOF
6938 CC=${CC}
6939 CFLAGS=${CFLAGS}
6940 CPPFLAGS=${CPPFLAGS}
6941 LDFLAGS=${LDFLAGS}
6942 LIBS=${LIBS}
6943 VERSIONED_SYMS=${VERSIONED_SYMS}
6944 RESULTING_SYMS=conftest.ver
6945 MK_SHARED_LIB=${MK_SHARED_LIB}
6946 conftest.so: conftest.$ac_cv_objext
6947                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6948 EOF
6949
6950                 # compile source, make library
6951                 if make -f conftest.mk 2>&5 >/dev/null
6952                 then
6953                         # test for missing symbol in either Data or Text section
6954                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6955                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6956                 fi
6957                 echo "$as_me:6957: result: $WILDCARD_SYMS" >&5
6958 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6959                 rm -f conftest.*
6960         fi
6961 fi
6962
6963                 ;;
6964         esac
6965 done
6966
6967 ### Checks for special libraries, must be done up-front.
6968 SHLIB_LIST=""
6969
6970 echo "$as_me:6970: checking if you want to link with the GPM mouse library" >&5
6971 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6972
6973 # Check whether --with-gpm or --without-gpm was given.
6974 if test "${with_gpm+set}" = set; then
6975   withval="$with_gpm"
6976   with_gpm=$withval
6977 else
6978   with_gpm=maybe
6979 fi;
6980 echo "$as_me:6980: result: $with_gpm" >&5
6981 echo "${ECHO_T}$with_gpm" >&6
6982
6983 if test "$with_gpm" != no ; then
6984         echo "$as_me:6984: checking for gpm.h" >&5
6985 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6986 if test "${ac_cv_header_gpm_h+set}" = set; then
6987   echo $ECHO_N "(cached) $ECHO_C" >&6
6988 else
6989   cat >"conftest.$ac_ext" <<_ACEOF
6990 #line 6990 "configure"
6991 #include "confdefs.h"
6992 #include <gpm.h>
6993 _ACEOF
6994 if { (eval echo "$as_me:6994: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6995   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6996   ac_status=$?
6997   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6998   rm -f conftest.er1
6999   cat conftest.err >&5
7000   echo "$as_me:7000: \$? = $ac_status" >&5
7001   (exit "$ac_status"); } >/dev/null; then
7002   if test -s conftest.err; then
7003     ac_cpp_err=$ac_c_preproc_warn_flag
7004   else
7005     ac_cpp_err=
7006   fi
7007 else
7008   ac_cpp_err=yes
7009 fi
7010 if test -z "$ac_cpp_err"; then
7011   ac_cv_header_gpm_h=yes
7012 else
7013   echo "$as_me: failed program was:" >&5
7014   cat "conftest.$ac_ext" >&5
7015   ac_cv_header_gpm_h=no
7016 fi
7017 rm -f conftest.err "conftest.$ac_ext"
7018 fi
7019 echo "$as_me:7019: result: $ac_cv_header_gpm_h" >&5
7020 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7021 if test "$ac_cv_header_gpm_h" = yes; then
7022
7023 cat >>confdefs.h <<\EOF
7024 #define HAVE_GPM_H 1
7025 EOF
7026
7027                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7028                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7029
7030 echo "${as_me:-configure}:7030: testing assuming we really have GPM library ..." 1>&5
7031
7032 cat >>confdefs.h <<\EOF
7033 #define HAVE_LIBGPM 1
7034 EOF
7035
7036                         with_gpm=yes
7037                 else
7038                         echo "$as_me:7038: checking for Gpm_Open in -lgpm" >&5
7039 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7040 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7041   echo $ECHO_N "(cached) $ECHO_C" >&6
7042 else
7043   ac_check_lib_save_LIBS=$LIBS
7044 LIBS="-lgpm  $LIBS"
7045 cat >"conftest.$ac_ext" <<_ACEOF
7046 #line 7046 "configure"
7047 #include "confdefs.h"
7048
7049 /* Override any gcc2 internal prototype to avoid an error.  */
7050 #ifdef __cplusplus
7051 extern "C"
7052 #endif
7053 /* We use char because int might match the return type of a gcc2
7054    builtin and then its argument prototype would still apply.  */
7055 char Gpm_Open ();
7056 int
7057 main (void)
7058 {
7059 Gpm_Open ();
7060   ;
7061   return 0;
7062 }
7063 _ACEOF
7064 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7065 if { (eval echo "$as_me:7065: \"$ac_link\"") >&5
7066   (eval $ac_link) 2>&5
7067   ac_status=$?
7068   echo "$as_me:7068: \$? = $ac_status" >&5
7069   (exit "$ac_status"); } &&
7070          { ac_try='test -s "conftest$ac_exeext"'
7071   { (eval echo "$as_me:7071: \"$ac_try\"") >&5
7072   (eval $ac_try) 2>&5
7073   ac_status=$?
7074   echo "$as_me:7074: \$? = $ac_status" >&5
7075   (exit "$ac_status"); }; }; then
7076   ac_cv_lib_gpm_Gpm_Open=yes
7077 else
7078   echo "$as_me: failed program was:" >&5
7079 cat "conftest.$ac_ext" >&5
7080 ac_cv_lib_gpm_Gpm_Open=no
7081 fi
7082 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7083 LIBS=$ac_check_lib_save_LIBS
7084 fi
7085 echo "$as_me:7085: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7086 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7087 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7088   with_gpm=yes
7089 else
7090
7091                                 if test "$with_gpm" = maybe; then
7092                                         { echo "$as_me:7092: WARNING: Cannot link with GPM library" >&5
7093 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7094                                         with_gpm=no
7095                                 else
7096                                         { { echo "$as_me:7096: error: Cannot link with GPM library" >&5
7097 echo "$as_me: error: Cannot link with GPM library" >&2;}
7098    { (exit 1); exit 1; }; }
7099                                 fi
7100
7101 fi
7102
7103                 fi
7104
7105 else
7106
7107                 test "$with_gpm" != maybe && { echo "$as_me:7107: WARNING: Cannot find GPM header" >&5
7108 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7109                 with_gpm=no
7110
7111 fi
7112
7113 fi
7114
7115 if test "$with_gpm" != no ; then
7116         echo "$as_me:7116: checking if you want to load GPM dynamically" >&5
7117 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7118
7119 # Check whether --with-dlsym or --without-dlsym was given.
7120 if test "${with_dlsym+set}" = set; then
7121   withval="$with_dlsym"
7122   with_dlsym=$withval
7123 else
7124   with_dlsym=yes
7125 fi;
7126         echo "$as_me:7126: result: $with_dlsym" >&5
7127 echo "${ECHO_T}$with_dlsym" >&6
7128         if test "x$with_dlsym" = xyes ; then
7129
7130 cf_have_dlsym=no
7131 echo "$as_me:7131: checking for dlsym" >&5
7132 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7133 if test "${ac_cv_func_dlsym+set}" = set; then
7134   echo $ECHO_N "(cached) $ECHO_C" >&6
7135 else
7136   cat >"conftest.$ac_ext" <<_ACEOF
7137 #line 7137 "configure"
7138 #include "confdefs.h"
7139 #define dlsym autoconf_temporary
7140 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7141 #undef dlsym
7142
7143 #ifdef __cplusplus
7144 extern "C"
7145 #endif
7146
7147 /* We use char because int might match the return type of a gcc2
7148    builtin and then its argument prototype would still apply.  */
7149 char dlsym (void);
7150
7151 int
7152 main (void)
7153 {
7154
7155 /* The GNU C library defines stubs for functions which it implements
7156     to always fail with ENOSYS.  Some functions are actually named
7157     something starting with __ and the normal name is an alias.  */
7158 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7159 #error found stub for dlsym
7160 #endif
7161
7162         return dlsym ();
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7168 if { (eval echo "$as_me:7168: \"$ac_link\"") >&5
7169   (eval $ac_link) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit "$ac_status"); } &&
7173          { ac_try='test -s "conftest$ac_exeext"'
7174   { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit "$ac_status"); }; }; then
7179   ac_cv_func_dlsym=yes
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 cat "conftest.$ac_ext" >&5
7183 ac_cv_func_dlsym=no
7184 fi
7185 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7186 fi
7187 echo "$as_me:7187: result: $ac_cv_func_dlsym" >&5
7188 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7189 if test "$ac_cv_func_dlsym" = yes; then
7190   cf_have_dlsym=yes
7191 else
7192
7193 cf_have_libdl=no
7194 echo "$as_me:7194: checking for dlsym in -ldl" >&5
7195 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7196 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7197   echo $ECHO_N "(cached) $ECHO_C" >&6
7198 else
7199   ac_check_lib_save_LIBS=$LIBS
7200 LIBS="-ldl  $LIBS"
7201 cat >"conftest.$ac_ext" <<_ACEOF
7202 #line 7202 "configure"
7203 #include "confdefs.h"
7204
7205 /* Override any gcc2 internal prototype to avoid an error.  */
7206 #ifdef __cplusplus
7207 extern "C"
7208 #endif
7209 /* We use char because int might match the return type of a gcc2
7210    builtin and then its argument prototype would still apply.  */
7211 char dlsym ();
7212 int
7213 main (void)
7214 {
7215 dlsym ();
7216   ;
7217   return 0;
7218 }
7219 _ACEOF
7220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7221 if { (eval echo "$as_me:7221: \"$ac_link\"") >&5
7222   (eval $ac_link) 2>&5
7223   ac_status=$?
7224   echo "$as_me:7224: \$? = $ac_status" >&5
7225   (exit "$ac_status"); } &&
7226          { ac_try='test -s "conftest$ac_exeext"'
7227   { (eval echo "$as_me:7227: \"$ac_try\"") >&5
7228   (eval $ac_try) 2>&5
7229   ac_status=$?
7230   echo "$as_me:7230: \$? = $ac_status" >&5
7231   (exit "$ac_status"); }; }; then
7232   ac_cv_lib_dl_dlsym=yes
7233 else
7234   echo "$as_me: failed program was:" >&5
7235 cat "conftest.$ac_ext" >&5
7236 ac_cv_lib_dl_dlsym=no
7237 fi
7238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7239 LIBS=$ac_check_lib_save_LIBS
7240 fi
7241 echo "$as_me:7241: result: $ac_cv_lib_dl_dlsym" >&5
7242 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7243 if test "$ac_cv_lib_dl_dlsym" = yes; then
7244
7245         cf_have_dlsym=yes
7246         cf_have_libdl=yes
7247 fi
7248
7249 fi
7250
7251 if test "$cf_have_dlsym" = yes ; then
7252         test "$cf_have_libdl" = yes && {
7253 cf_add_libs="$LIBS"
7254 # reverse order
7255 cf_add_0lib=
7256 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7257 # filter duplicates
7258 for cf_add_1lib in $cf_add_0lib; do
7259         for cf_add_2lib in $cf_add_libs; do
7260                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7261                         cf_add_1lib=
7262                         break
7263                 fi
7264         done
7265         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7266 done
7267 LIBS="$cf_add_libs"
7268  }
7269
7270         echo "$as_me:7270: checking whether able to link to dl*() functions" >&5
7271 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7272         cat >"conftest.$ac_ext" <<_ACEOF
7273 #line 7273 "configure"
7274 #include "confdefs.h"
7275 #include <dlfcn.h>
7276 int
7277 main (void)
7278 {
7279
7280                 void *obj;
7281                 if ((obj = dlopen("filename", 0)) != 0) {
7282                         if (dlsym(obj, "symbolname") == 0) {
7283                         dlclose(obj);
7284                         }
7285                 }
7286   ;
7287   return 0;
7288 }
7289 _ACEOF
7290 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7291 if { (eval echo "$as_me:7291: \"$ac_link\"") >&5
7292   (eval $ac_link) 2>&5
7293   ac_status=$?
7294   echo "$as_me:7294: \$? = $ac_status" >&5
7295   (exit "$ac_status"); } &&
7296          { ac_try='test -s "conftest$ac_exeext"'
7297   { (eval echo "$as_me:7297: \"$ac_try\"") >&5
7298   (eval $ac_try) 2>&5
7299   ac_status=$?
7300   echo "$as_me:7300: \$? = $ac_status" >&5
7301   (exit "$ac_status"); }; }; then
7302
7303 cat >>confdefs.h <<\EOF
7304 #define HAVE_LIBDL 1
7305 EOF
7306
7307 else
7308   echo "$as_me: failed program was:" >&5
7309 cat "conftest.$ac_ext" >&5
7310
7311                 { { echo "$as_me:7311: error: Cannot link test program for libdl" >&5
7312 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7313    { (exit 1); exit 1; }; }
7314 fi
7315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7316         echo "$as_me:7316: result: ok" >&5
7317 echo "${ECHO_T}ok" >&6
7318 else
7319         { { echo "$as_me:7319: error: Cannot find dlsym function" >&5
7320 echo "$as_me: error: Cannot find dlsym function" >&2;}
7321    { (exit 1); exit 1; }; }
7322 fi
7323
7324                 if test "x$with_gpm" != xyes ; then
7325                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7326
7327 echo "${as_me:-configure}:7327: testing assuming soname for gpm is $with_gpm ..." 1>&5
7328
7329                         cf_cv_gpm_soname="$with_gpm"
7330                 else
7331
7332 echo "$as_me:7332: checking for soname of gpm library" >&5
7333 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7334 if test "${cf_cv_gpm_soname+set}" = set; then
7335   echo $ECHO_N "(cached) $ECHO_C" >&6
7336 else
7337
7338 cf_cv_gpm_soname=unknown
7339 if test "$cross_compiling" != yes ; then
7340 cat >conftest.$ac_ext <<CF_EOF
7341 #include <gpm.h>
7342 int main(void)
7343 {
7344 if (Gpm_Open(0,0)) Gpm_Close();
7345         ${cf_cv_main_return:-return}(0);
7346 }
7347 CF_EOF
7348 cf_save_LIBS="$LIBS"
7349
7350 cf_add_libs="$LIBS"
7351 # reverse order
7352 cf_add_0lib=
7353 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7354 # filter duplicates
7355 for cf_add_1lib in $cf_add_0lib; do
7356         for cf_add_2lib in $cf_add_libs; do
7357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7358                         cf_add_1lib=
7359                         break
7360                 fi
7361         done
7362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7363 done
7364 LIBS="$cf_add_libs"
7365
7366         if { (eval echo "$as_me:7366: \"$ac_compile\"") >&5
7367   (eval $ac_compile) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit "$ac_status"); } ; then
7371                 if { (eval echo "$as_me:7371: \"$ac_link\"") >&5
7372   (eval $ac_link) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit "$ac_status"); } ; then
7376                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7377                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7378                 fi
7379         fi
7380 rm -rf ./conftest*
7381 LIBS="$cf_save_LIBS"
7382 fi
7383
7384 fi
7385 echo "$as_me:7385: result: $cf_cv_gpm_soname" >&5
7386 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7387
7388                 fi
7389                 test "$cf_cv_gpm_soname" != "unknown" &&
7390 cat >>confdefs.h <<EOF
7391 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7392 EOF
7393
7394                 SHLIB_LIST="-ldl $SHLIB_LIST"
7395
7396 cf_add_libs="$PRIVATE_LIBS"
7397 # reverse order
7398 cf_add_0lib=
7399 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7400 # filter duplicates
7401 for cf_add_1lib in $cf_add_0lib; do
7402         for cf_add_2lib in $cf_add_libs; do
7403                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7404                         cf_add_1lib=
7405                         break
7406                 fi
7407         done
7408         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7409 done
7410 PRIVATE_LIBS="$cf_add_libs"
7411
7412         else
7413                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7414
7415 cf_add_libs="$TEST_LIBS"
7416 # reverse order
7417 cf_add_0lib=
7418 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7419 # filter duplicates
7420 for cf_add_1lib in $cf_add_0lib; do
7421         for cf_add_2lib in $cf_add_libs; do
7422                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7423                         cf_add_1lib=
7424                         break
7425                 fi
7426         done
7427         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7428 done
7429 TEST_LIBS="$cf_add_libs"
7430
7431 cf_add_libs="$PRIVATE_LIBS"
7432 # reverse order
7433 cf_add_0lib=
7434 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7435 # filter duplicates
7436 for cf_add_1lib in $cf_add_0lib; do
7437         for cf_add_2lib in $cf_add_libs; do
7438                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7439                         cf_add_1lib=
7440                         break
7441                 fi
7442         done
7443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7444 done
7445 PRIVATE_LIBS="$cf_add_libs"
7446
7447         fi
7448
7449 cat >>confdefs.h <<\EOF
7450 #define HAVE_LIBGPM 1
7451 EOF
7452
7453 echo "$as_me:7453: checking for Gpm_Wgetch in -lgpm" >&5
7454 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7455 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7456   echo $ECHO_N "(cached) $ECHO_C" >&6
7457 else
7458   ac_check_lib_save_LIBS=$LIBS
7459 LIBS="-lgpm  $LIBS"
7460 cat >"conftest.$ac_ext" <<_ACEOF
7461 #line 7461 "configure"
7462 #include "confdefs.h"
7463
7464 /* Override any gcc2 internal prototype to avoid an error.  */
7465 #ifdef __cplusplus
7466 extern "C"
7467 #endif
7468 /* We use char because int might match the return type of a gcc2
7469    builtin and then its argument prototype would still apply.  */
7470 char Gpm_Wgetch ();
7471 int
7472 main (void)
7473 {
7474 Gpm_Wgetch ();
7475   ;
7476   return 0;
7477 }
7478 _ACEOF
7479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7480 if { (eval echo "$as_me:7480: \"$ac_link\"") >&5
7481   (eval $ac_link) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit "$ac_status"); } &&
7485          { ac_try='test -s "conftest$ac_exeext"'
7486   { (eval echo "$as_me:7486: \"$ac_try\"") >&5
7487   (eval $ac_try) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit "$ac_status"); }; }; then
7491   ac_cv_lib_gpm_Gpm_Wgetch=yes
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 cat "conftest.$ac_ext" >&5
7495 ac_cv_lib_gpm_Gpm_Wgetch=no
7496 fi
7497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7498 LIBS=$ac_check_lib_save_LIBS
7499 fi
7500 echo "$as_me:7500: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7501 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7502 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7503
7504 echo "$as_me:7504: checking if GPM is weakly bound to curses library" >&5
7505 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7506 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7507   echo $ECHO_N "(cached) $ECHO_C" >&6
7508 else
7509
7510 cf_cv_check_gpm_wgetch=unknown
7511 if test "$cross_compiling" != yes ; then
7512
7513 cat >conftest.$ac_ext <<CF_EOF
7514 #include <gpm.h>
7515 int main(void)
7516 {
7517         Gpm_Wgetch();
7518         ${cf_cv_main_return:-return}(0);
7519 }
7520 CF_EOF
7521
7522         cf_save_LIBS="$LIBS"
7523         # This only works if we can look at the symbol table.  If a shared
7524         # library is stripped for install, we cannot use that.  So we're forced
7525         # to rely on the static library, noting that some packagers may not
7526         # include it.
7527         LIBS="-static -lgpm -dynamic $LIBS"
7528         if { (eval echo "$as_me:7528: \"$ac_compile\"") >&5
7529   (eval $ac_compile) 2>&5
7530   ac_status=$?
7531   echo "$as_me:7531: \$? = $ac_status" >&5
7532   (exit "$ac_status"); } ; then
7533                 if { (eval echo "$as_me:7533: \"$ac_link\"") >&5
7534   (eval $ac_link) 2>&5
7535   ac_status=$?
7536   echo "$as_me:7536: \$? = $ac_status" >&5
7537   (exit "$ac_status"); } ; then
7538                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7539                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7540                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7541                 fi
7542         fi
7543         rm -rf ./conftest*
7544         LIBS="$cf_save_LIBS"
7545 fi
7546
7547 fi
7548 echo "$as_me:7548: result: $cf_cv_check_gpm_wgetch" >&5
7549 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7550
7551 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7552         { echo "$as_me:7552: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7553 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7554 fi
7555
7556 fi
7557
7558 fi
7559
7560 echo "$as_me:7560: checking if you want to use PCRE2 for regular-expressions" >&5
7561 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7562
7563 # Check whether --with-pcre2 or --without-pcre2 was given.
7564 if test "${with_pcre2+set}" = set; then
7565   withval="$with_pcre2"
7566
7567 fi;
7568 test -z "$with_pcre2" && with_pcre2=no
7569 echo "$as_me:7569: result: $with_pcre2" >&5
7570 echo "${ECHO_T}$with_pcre2" >&6
7571
7572 if test "x$with_pcre2" != xno ; then
7573         cf_with_pcre2_ok=no
7574         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7575         do
7576
7577 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7578         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7579
7580 echo "${as_me:-configure}:7580: testing found package $cf_with_pcre2 ..." 1>&5
7581
7582         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7583         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7584         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7585
7586 echo "${as_me:-configure}:7586: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7587
7588         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7589
7590 echo "${as_me:-configure}:7590: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7591
7592 cf_fix_cppflags=no
7593 cf_new_cflags=
7594 cf_new_cppflags=
7595 cf_new_extra_cppflags=
7596
7597 for cf_add_cflags in $cf_pkgconfig_incs
7598 do
7599 case "$cf_fix_cppflags" in
7600 (no)
7601         case "$cf_add_cflags" in
7602         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7603                 case "$cf_add_cflags" in
7604                 (-D*)
7605                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7606
7607                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7608                                 && test -z "${cf_tst_cflags}" \
7609                                 && cf_fix_cppflags=yes
7610
7611                         if test "$cf_fix_cppflags" = yes ; then
7612
7613         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7614         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7615
7616                                 continue
7617                         elif test "${cf_tst_cflags}" = "\"'" ; then
7618
7619         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7620         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7621
7622                                 continue
7623                         fi
7624                         ;;
7625                 esac
7626                 case "$CPPFLAGS" in
7627                 (*$cf_add_cflags)
7628                         ;;
7629                 (*)
7630                         case "$cf_add_cflags" in
7631                         (-D*)
7632                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7633
7634 CPPFLAGS=`echo "$CPPFLAGS" | \
7635         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7636                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7637
7638                                 ;;
7639                         esac
7640
7641         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7642         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7643
7644                         ;;
7645                 esac
7646                 ;;
7647         (*)
7648
7649         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7650         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7651
7652                 ;;
7653         esac
7654         ;;
7655 (yes)
7656
7657         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7658         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7659
7660         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7661
7662         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7663                 && test -z "${cf_tst_cflags}" \
7664                 && cf_fix_cppflags=no
7665         ;;
7666 esac
7667 done
7668
7669 if test -n "$cf_new_cflags" ; then
7670
7671         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7672         CFLAGS="${CFLAGS}$cf_new_cflags"
7673
7674 fi
7675
7676 if test -n "$cf_new_cppflags" ; then
7677
7678         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7679         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7680
7681 fi
7682
7683 if test -n "$cf_new_extra_cppflags" ; then
7684
7685         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7686         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7687
7688 fi
7689
7690 cf_add_libs="$LIBS"
7691 # reverse order
7692 cf_add_0lib=
7693 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7694 # filter duplicates
7695 for cf_add_1lib in $cf_add_0lib; do
7696         for cf_add_2lib in $cf_add_libs; do
7697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7698                         cf_add_1lib=
7699                         break
7700                 fi
7701         done
7702         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7703 done
7704 LIBS="$cf_add_libs"
7705
7706         cf_with_pcre2_ok=yes; break
7707 else
7708         cf_pkgconfig_incs=
7709         cf_pkgconfig_libs=
7710         :
7711 fi
7712
7713         done
7714         cf_with_pcre2_ok=yes || { { echo "$as_me:7714: error: Cannot find PCRE2 library" >&5
7715 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7716    { (exit 1); exit 1; }; }
7717
7718 cat >>confdefs.h <<\EOF
7719 #define HAVE_LIB_PCRE2 1
7720 EOF
7721
7722         # if pkgconfig gave no results, look for the libraries directly
7723         case "$LIBS" in
7724         (*pcre2-posix*|*pcreposix*)
7725                 ;;
7726         (*)
7727                 echo "$as_me:7727: checking for regcomp in -lpcre2-posix" >&5
7728 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7729 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7730   echo $ECHO_N "(cached) $ECHO_C" >&6
7731 else
7732   ac_check_lib_save_LIBS=$LIBS
7733 LIBS="-lpcre2-posix  $LIBS"
7734 cat >"conftest.$ac_ext" <<_ACEOF
7735 #line 7735 "configure"
7736 #include "confdefs.h"
7737
7738 /* Override any gcc2 internal prototype to avoid an error.  */
7739 #ifdef __cplusplus
7740 extern "C"
7741 #endif
7742 /* We use char because int might match the return type of a gcc2
7743    builtin and then its argument prototype would still apply.  */
7744 char regcomp ();
7745 int
7746 main (void)
7747 {
7748 regcomp ();
7749   ;
7750   return 0;
7751 }
7752 _ACEOF
7753 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7754 if { (eval echo "$as_me:7754: \"$ac_link\"") >&5
7755   (eval $ac_link) 2>&5
7756   ac_status=$?
7757   echo "$as_me:7757: \$? = $ac_status" >&5
7758   (exit "$ac_status"); } &&
7759          { ac_try='test -s "conftest$ac_exeext"'
7760   { (eval echo "$as_me:7760: \"$ac_try\"") >&5
7761   (eval $ac_try) 2>&5
7762   ac_status=$?
7763   echo "$as_me:7763: \$? = $ac_status" >&5
7764   (exit "$ac_status"); }; }; then
7765   ac_cv_lib_pcre2_posix_regcomp=yes
7766 else
7767   echo "$as_me: failed program was:" >&5
7768 cat "conftest.$ac_ext" >&5
7769 ac_cv_lib_pcre2_posix_regcomp=no
7770 fi
7771 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7772 LIBS=$ac_check_lib_save_LIBS
7773 fi
7774 echo "$as_me:7774: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7775 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7776 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7777
7778 cf_add_libs="$LIBS"
7779 # reverse order
7780 cf_add_0lib=
7781 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7782 # filter duplicates
7783 for cf_add_1lib in $cf_add_0lib; do
7784         for cf_add_2lib in $cf_add_libs; do
7785                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7786                         cf_add_1lib=
7787                         break
7788                 fi
7789         done
7790         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7791 done
7792 LIBS="$cf_add_libs"
7793
7794 else
7795   echo "$as_me:7795: checking for regcomp in -lpcreposix" >&5
7796 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7797 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7798   echo $ECHO_N "(cached) $ECHO_C" >&6
7799 else
7800   ac_check_lib_save_LIBS=$LIBS
7801 LIBS="-lpcreposix  $LIBS"
7802 cat >"conftest.$ac_ext" <<_ACEOF
7803 #line 7803 "configure"
7804 #include "confdefs.h"
7805
7806 /* Override any gcc2 internal prototype to avoid an error.  */
7807 #ifdef __cplusplus
7808 extern "C"
7809 #endif
7810 /* We use char because int might match the return type of a gcc2
7811    builtin and then its argument prototype would still apply.  */
7812 char regcomp ();
7813 int
7814 main (void)
7815 {
7816 regcomp ();
7817   ;
7818   return 0;
7819 }
7820 _ACEOF
7821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7822 if { (eval echo "$as_me:7822: \"$ac_link\"") >&5
7823   (eval $ac_link) 2>&5
7824   ac_status=$?
7825   echo "$as_me:7825: \$? = $ac_status" >&5
7826   (exit "$ac_status"); } &&
7827          { ac_try='test -s "conftest$ac_exeext"'
7828   { (eval echo "$as_me:7828: \"$ac_try\"") >&5
7829   (eval $ac_try) 2>&5
7830   ac_status=$?
7831   echo "$as_me:7831: \$? = $ac_status" >&5
7832   (exit "$ac_status"); }; }; then
7833   ac_cv_lib_pcreposix_regcomp=yes
7834 else
7835   echo "$as_me: failed program was:" >&5
7836 cat "conftest.$ac_ext" >&5
7837 ac_cv_lib_pcreposix_regcomp=no
7838 fi
7839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7840 LIBS=$ac_check_lib_save_LIBS
7841 fi
7842 echo "$as_me:7842: result: $ac_cv_lib_pcreposix_regcomp" >&5
7843 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7844 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7845
7846 cf_add_libs="$LIBS"
7847 # reverse order
7848 cf_add_0lib=
7849 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7850 # filter duplicates
7851 for cf_add_1lib in $cf_add_0lib; do
7852         for cf_add_2lib in $cf_add_libs; do
7853                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7854                         cf_add_1lib=
7855                         break
7856                 fi
7857         done
7858         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7859 done
7860 LIBS="$cf_add_libs"
7861
7862 else
7863   { { echo "$as_me:7863: error: Cannot find PCRE2 POSIX library" >&5
7864 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7865    { (exit 1); exit 1; }; }
7866 fi
7867
7868 fi
7869
7870                 ;;
7871         esac
7872
7873         # either way, check for the library header files
7874
7875 for ac_header in pcre2posix.h pcreposix.h
7876 do
7877 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7878 echo "$as_me:7878: checking for $ac_header" >&5
7879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7881   echo $ECHO_N "(cached) $ECHO_C" >&6
7882 else
7883   cat >"conftest.$ac_ext" <<_ACEOF
7884 #line 7884 "configure"
7885 #include "confdefs.h"
7886 #include <$ac_header>
7887 _ACEOF
7888 if { (eval echo "$as_me:7888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7889   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7890   ac_status=$?
7891   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7892   rm -f conftest.er1
7893   cat conftest.err >&5
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit "$ac_status"); } >/dev/null; then
7896   if test -s conftest.err; then
7897     ac_cpp_err=$ac_c_preproc_warn_flag
7898   else
7899     ac_cpp_err=
7900   fi
7901 else
7902   ac_cpp_err=yes
7903 fi
7904 if test -z "$ac_cpp_err"; then
7905   eval "$as_ac_Header=yes"
7906 else
7907   echo "$as_me: failed program was:" >&5
7908   cat "conftest.$ac_ext" >&5
7909   eval "$as_ac_Header=no"
7910 fi
7911 rm -f conftest.err "conftest.$ac_ext"
7912 fi
7913 echo "$as_me:7913: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7914 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7915 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7916   cat >>confdefs.h <<EOF
7917 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7918 EOF
7919
7920 fi
7921 done
7922
7923 for ac_func in PCRE2regcomp
7924 do
7925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7926 echo "$as_me:7926: checking for $ac_func" >&5
7927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7928 if eval "test \"\${$as_ac_var+set}\" = set"; then
7929   echo $ECHO_N "(cached) $ECHO_C" >&6
7930 else
7931   cat >"conftest.$ac_ext" <<_ACEOF
7932 #line 7932 "configure"
7933 #include "confdefs.h"
7934 #define $ac_func autoconf_temporary
7935 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7936 #undef $ac_func
7937
7938 #ifdef __cplusplus
7939 extern "C"
7940 #endif
7941
7942 /* We use char because int might match the return type of a gcc2
7943    builtin and then its argument prototype would still apply.  */
7944 char $ac_func (void);
7945
7946 int
7947 main (void)
7948 {
7949
7950 /* The GNU C library defines stubs for functions which it implements
7951     to always fail with ENOSYS.  Some functions are actually named
7952     something starting with __ and the normal name is an alias.  */
7953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7954 #error found stub for $ac_func
7955 #endif
7956
7957         return $ac_func ();
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7963 if { (eval echo "$as_me:7963: \"$ac_link\"") >&5
7964   (eval $ac_link) 2>&5
7965   ac_status=$?
7966   echo "$as_me:7966: \$? = $ac_status" >&5
7967   (exit "$ac_status"); } &&
7968          { ac_try='test -s "conftest$ac_exeext"'
7969   { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:7972: \$? = $ac_status" >&5
7973   (exit "$ac_status"); }; }; then
7974   eval "$as_ac_var=yes"
7975 else
7976   echo "$as_me: failed program was:" >&5
7977 cat "conftest.$ac_ext" >&5
7978 eval "$as_ac_var=no"
7979 fi
7980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7981 fi
7982 echo "$as_me:7982: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7983 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7984 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7985   cat >>confdefs.h <<EOF
7986 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7987 EOF
7988
7989 fi
7990 done
7991
7992 fi
7993
7994 # not everyone has "test -c"
7995 if test -c /dev/sysmouse 2>/dev/null ; then
7996 echo "$as_me:7996: checking if you want to use sysmouse" >&5
7997 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7998
7999 # Check whether --with-sysmouse or --without-sysmouse was given.
8000 if test "${with_sysmouse+set}" = set; then
8001   withval="$with_sysmouse"
8002   cf_with_sysmouse=$withval
8003 else
8004   cf_with_sysmouse=maybe
8005 fi;
8006         if test "$cf_with_sysmouse" != no ; then
8007         cat >"conftest.$ac_ext" <<_ACEOF
8008 #line 8008 "configure"
8009 #include "confdefs.h"
8010
8011 #include <osreldate.h>
8012 #if (__FreeBSD_version >= 400017)
8013 #include <sys/consio.h>
8014 #include <sys/fbio.h>
8015 #else
8016 #include <machine/console.h>
8017 #endif
8018
8019 int
8020 main (void)
8021 {
8022
8023         struct mouse_info the_mouse;
8024         ioctl(0, CONS_MOUSECTL, &the_mouse);
8025
8026   ;
8027   return 0;
8028 }
8029 _ACEOF
8030 rm -f "conftest.$ac_objext"
8031 if { (eval echo "$as_me:8031: \"$ac_compile\"") >&5
8032   (eval $ac_compile) 2>&5
8033   ac_status=$?
8034   echo "$as_me:8034: \$? = $ac_status" >&5
8035   (exit "$ac_status"); } &&
8036          { ac_try='test -s "conftest.$ac_objext"'
8037   { (eval echo "$as_me:8037: \"$ac_try\"") >&5
8038   (eval $ac_try) 2>&5
8039   ac_status=$?
8040   echo "$as_me:8040: \$? = $ac_status" >&5
8041   (exit "$ac_status"); }; }; then
8042   cf_with_sysmouse=yes
8043 else
8044   echo "$as_me: failed program was:" >&5
8045 cat "conftest.$ac_ext" >&5
8046 cf_with_sysmouse=no
8047 fi
8048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8049         fi
8050 echo "$as_me:8050: result: $cf_with_sysmouse" >&5
8051 echo "${ECHO_T}$cf_with_sysmouse" >&6
8052 test "$cf_with_sysmouse" = yes &&
8053 cat >>confdefs.h <<\EOF
8054 #define USE_SYSMOUSE 1
8055 EOF
8056
8057 fi
8058
8059 # pretend that ncurses==ncursesw==ncursest
8060 echo "$as_me:8060: checking if you want to disable library suffixes" >&5
8061 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8062
8063 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8064 if test "${enable_lib_suffixes+set}" = set; then
8065   enableval="$enable_lib_suffixes"
8066   test "$enableval" != no && enableval=yes
8067         if test "$enableval" != "yes" ; then
8068     disable_lib_suffixes=yes
8069         else
8070                 disable_lib_suffixes=no
8071         fi
8072 else
8073   enableval=yes
8074         disable_lib_suffixes=no
8075
8076 fi;
8077 echo "$as_me:8077: result: $disable_lib_suffixes" >&5
8078 echo "${ECHO_T}$disable_lib_suffixes" >&6
8079
8080 ### If we're building with rpath, try to link non-standard libs that way too.
8081 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8082
8083 echo "$as_me:8083: checking if rpath-hack should be disabled" >&5
8084 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8085
8086 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8087 if test "${enable_rpath_hack+set}" = set; then
8088   enableval="$enable_rpath_hack"
8089   test "$enableval" != no && enableval=yes
8090         if test "$enableval" != "yes" ; then
8091     enable_rpath_hack=no
8092         else
8093                 enable_rpath_hack=yes
8094         fi
8095 else
8096   enableval=yes
8097         enable_rpath_hack=yes
8098
8099 fi;
8100 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8101 echo "$as_me:8101: result: $cf_disable_rpath_hack" >&5
8102 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8103
8104 if test "$enable_rpath_hack" = yes ; then
8105
8106 echo "$as_me:8106: checking for updated LDFLAGS" >&5
8107 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8108 if test -n "$LD_RPATH_OPT" ; then
8109         echo "$as_me:8109: result: maybe" >&5
8110 echo "${ECHO_T}maybe" >&6
8111
8112         for ac_prog in ldd
8113 do
8114   # Extract the first word of "$ac_prog", so it can be a program name with args.
8115 set dummy $ac_prog; ac_word=$2
8116 echo "$as_me:8116: checking for $ac_word" >&5
8117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8118 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8119   echo $ECHO_N "(cached) $ECHO_C" >&6
8120 else
8121   if test -n "$cf_ldd_prog"; then
8122   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8123 else
8124   ac_save_IFS=$IFS; IFS=$ac_path_separator
8125 ac_dummy="$PATH"
8126 for ac_dir in $ac_dummy; do
8127   IFS=$ac_save_IFS
8128   test -z "$ac_dir" && ac_dir=.
8129   $as_executable_p "$ac_dir/$ac_word" || continue
8130 ac_cv_prog_cf_ldd_prog="$ac_prog"
8131 echo "$as_me:8131: found $ac_dir/$ac_word" >&5
8132 break
8133 done
8134
8135 fi
8136 fi
8137 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8138 if test -n "$cf_ldd_prog"; then
8139   echo "$as_me:8139: result: $cf_ldd_prog" >&5
8140 echo "${ECHO_T}$cf_ldd_prog" >&6
8141 else
8142   echo "$as_me:8142: result: no" >&5
8143 echo "${ECHO_T}no" >&6
8144 fi
8145
8146   test -n "$cf_ldd_prog" && break
8147 done
8148 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8149
8150         cf_rpath_list="/usr/lib /lib"
8151         if test "$cf_ldd_prog" != no
8152         then
8153                 cf_rpath_oops=
8154
8155 cat >"conftest.$ac_ext" <<_ACEOF
8156 #line 8156 "configure"
8157 #include "confdefs.h"
8158 #include <stdio.h>
8159 int
8160 main (void)
8161 {
8162 printf("Hello");
8163   ;
8164   return 0;
8165 }
8166 _ACEOF
8167 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8168 if { (eval echo "$as_me:8168: \"$ac_link\"") >&5
8169   (eval $ac_link) 2>&5
8170   ac_status=$?
8171   echo "$as_me:8171: \$? = $ac_status" >&5
8172   (exit "$ac_status"); } &&
8173          { ac_try='test -s "conftest$ac_exeext"'
8174   { (eval echo "$as_me:8174: \"$ac_try\"") >&5
8175   (eval $ac_try) 2>&5
8176   ac_status=$?
8177   echo "$as_me:8177: \$? = $ac_status" >&5
8178   (exit "$ac_status"); }; }; then
8179   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8180                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8181 else
8182   echo "$as_me: failed program was:" >&5
8183 cat "conftest.$ac_ext" >&5
8184 fi
8185 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8186
8187                 # If we passed the link-test, but get a "not found" on a given library,
8188                 # this could be due to inept reconfiguration of gcc to make it only
8189                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8190                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8191                 # /usr/local libraries.
8192                 if test -n "$cf_rpath_oops"
8193                 then
8194                         for cf_rpath_src in $cf_rpath_oops
8195                         do
8196                                 for cf_rpath_dir in \
8197                                         /usr/local \
8198                                         /usr/pkg \
8199                                         /opt/sfw
8200                                 do
8201                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8202                                         then
8203                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8204
8205 echo "${as_me:-configure}:8205: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8206
8207                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8208                                                 break
8209                                         fi
8210                                 done
8211                         done
8212                 fi
8213         fi
8214
8215         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8216
8217 echo "${as_me:-configure}:8217: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8218
8219 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8220
8221 echo "${as_me:-configure}:8221: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8222
8223 cf_rpath_dst=
8224 for cf_rpath_src in $LDFLAGS
8225 do
8226         case "$cf_rpath_src" in
8227         (-L*)
8228
8229                 # check if this refers to a directory which we will ignore
8230                 cf_rpath_skip=no
8231                 if test -n "$cf_rpath_list"
8232                 then
8233                         for cf_rpath_item in $cf_rpath_list
8234                         do
8235                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8236                                 then
8237                                         cf_rpath_skip=yes
8238                                         break
8239                                 fi
8240                         done
8241                 fi
8242
8243                 if test "$cf_rpath_skip" = no
8244                 then
8245                         # transform the option
8246                         if test "$LD_RPATH_OPT" = "-R " ; then
8247                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8248                         else
8249                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8250                         fi
8251
8252                         # if we have not already added this, add it now
8253                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8254                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8255                         then
8256                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8257
8258 echo "${as_me:-configure}:8258: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8259
8260                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8261                         fi
8262                 fi
8263                 ;;
8264         esac
8265         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8266 done
8267 LDFLAGS=$cf_rpath_dst
8268
8269 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8270
8271 echo "${as_me:-configure}:8271: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8272
8273 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8274
8275 echo "${as_me:-configure}:8275: testing ...checking LIBS $LIBS ..." 1>&5
8276
8277 cf_rpath_dst=
8278 for cf_rpath_src in $LIBS
8279 do
8280         case "$cf_rpath_src" in
8281         (-L*)
8282
8283                 # check if this refers to a directory which we will ignore
8284                 cf_rpath_skip=no
8285                 if test -n "$cf_rpath_list"
8286                 then
8287                         for cf_rpath_item in $cf_rpath_list
8288                         do
8289                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8290                                 then
8291                                         cf_rpath_skip=yes
8292                                         break
8293                                 fi
8294                         done
8295                 fi
8296
8297                 if test "$cf_rpath_skip" = no
8298                 then
8299                         # transform the option
8300                         if test "$LD_RPATH_OPT" = "-R " ; then
8301                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8302                         else
8303                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8304                         fi
8305
8306                         # if we have not already added this, add it now
8307                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8308                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8309                         then
8310                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8311
8312 echo "${as_me:-configure}:8312: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8313
8314                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8315                         fi
8316                 fi
8317                 ;;
8318         esac
8319         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8320 done
8321 LIBS=$cf_rpath_dst
8322
8323 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8324
8325 echo "${as_me:-configure}:8325: testing ...checked LIBS $LIBS ..." 1>&5
8326
8327         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8328
8329 echo "${as_me:-configure}:8329: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8330
8331 else
8332         echo "$as_me:8332: result: no" >&5
8333 echo "${ECHO_T}no" >&6
8334 fi
8335
8336 fi
8337
8338 fi
8339
8340 ### Depending on the system, someone may use rpath to build ncurses but not
8341 # want users of the package to rely upon that feature.  Give those people an
8342 # option to suppress that detail from EXTRA_LDFLAGS.
8343 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8344 if test -n "$EXTRA_PKG_LDFLAGS"
8345 then
8346         echo "$as_me:8346: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8347 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8348
8349 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8350 if test "${enable_pkg_ldflags+set}" = set; then
8351   enableval="$enable_pkg_ldflags"
8352   test "$enableval" != no && enableval=yes
8353         if test "$enableval" != "yes" ; then
8354     disable_pkg_ldflags=yes
8355         else
8356                 disable_pkg_ldflags=no
8357         fi
8358 else
8359   enableval=yes
8360         disable_pkg_ldflags=no
8361
8362 fi;
8363         echo "$as_me:8363: result: $disable_pkg_ldflags" >&5
8364 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8365         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8366 fi
8367
8368 ###############################################################################
8369
8370 ###     use option --with-extra-suffix to append suffix to headers and libraries
8371 echo "$as_me:8371: checking if you wish to append extra suffix to header/library paths" >&5
8372 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8373 EXTRA_SUFFIX=
8374
8375 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8376 if test "${with_extra_suffix+set}" = set; then
8377   withval="$with_extra_suffix"
8378   case x$withval in
8379         (xno)
8380                 ;;
8381         (xyes|x)
8382                 EXTRA_SUFFIX=$cf_cv_abi_version
8383                 ;;
8384         (*)
8385                 EXTRA_SUFFIX=$withval
8386                 ;;
8387         esac
8388
8389 fi;
8390 echo "$as_me:8390: result: $EXTRA_SUFFIX" >&5
8391 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8392
8393 ###     use option --disable-overwrite to leave out the link to -lcurses
8394 echo "$as_me:8394: checking if you wish to install ncurses overwriting curses" >&5
8395 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8396
8397 # Check whether --enable-overwrite or --disable-overwrite was given.
8398 if test "${enable_overwrite+set}" = set; then
8399   enableval="$enable_overwrite"
8400   with_overwrite=$enableval
8401 else
8402   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8403 fi;
8404 echo "$as_me:8404: result: $with_overwrite" >&5
8405 echo "${ECHO_T}$with_overwrite" >&6
8406
8407 echo "$as_me:8407: checking if external terminfo-database is used" >&5
8408 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8409
8410 # Check whether --enable-database or --disable-database was given.
8411 if test "${enable_database+set}" = set; then
8412   enableval="$enable_database"
8413   use_database=$enableval
8414 else
8415   use_database=yes
8416 fi;
8417 echo "$as_me:8417: result: $use_database" >&5
8418 echo "${ECHO_T}$use_database" >&6
8419
8420 case "$host_os" in
8421 (os2*)
8422         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8423         ;;
8424 (*)
8425         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8426         ;;
8427 esac
8428
8429 NCURSES_USE_DATABASE=0
8430 if test "$use_database" != no ; then
8431         NCURSES_USE_DATABASE=1
8432
8433         echo "$as_me:8433: checking which terminfo source-file will be installed" >&5
8434 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8435
8436 # Check whether --with-database or --without-database was given.
8437 if test "${with_database+set}" = set; then
8438   withval="$with_database"
8439   TERMINFO_SRC=$withval
8440 fi;
8441         echo "$as_me:8441: result: $TERMINFO_SRC" >&5
8442 echo "${ECHO_T}$TERMINFO_SRC" >&6
8443
8444         echo "$as_me:8444: checking whether to use hashed database instead of directory/tree" >&5
8445 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8446
8447 # Check whether --with-hashed-db or --without-hashed-db was given.
8448 if test "${with_hashed_db+set}" = set; then
8449   withval="$with_hashed_db"
8450
8451 else
8452   with_hashed_db=no
8453 fi;
8454         echo "$as_me:8454: result: $with_hashed_db" >&5
8455 echo "${ECHO_T}$with_hashed_db" >&6
8456 else
8457         with_hashed_db=no
8458 fi
8459
8460 echo "$as_me:8460: checking for list of fallback descriptions" >&5
8461 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8462
8463 # Check whether --with-fallbacks or --without-fallbacks was given.
8464 if test "${with_fallbacks+set}" = set; then
8465   withval="$with_fallbacks"
8466   with_fallback=$withval
8467 else
8468   with_fallback=
8469 fi;
8470 echo "$as_me:8470: result: $with_fallback" >&5
8471 echo "${ECHO_T}$with_fallback" >&6
8472
8473 case ".$with_fallback" in
8474 (.|.no)
8475         FALLBACK_LIST=
8476         ;;
8477 (.yes)
8478         { echo "$as_me:8478: WARNING: expected a list of terminal descriptions" >&5
8479 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8480         ;;
8481 (*)
8482         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8483         ;;
8484 esac
8485
8486 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8487 # tree for generating the terminal descriptions that will be compiled into the
8488 # library.  If your toolchain is old, it may not handle current terminal
8489 # databases.  Use configure-options to point to the tools which will be used,
8490 # rather than the first ones found on the $PATH.
8491 if test -n "$ac_tool_prefix"; then
8492   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8493 set dummy ${ac_tool_prefix}tic; ac_word=$2
8494 echo "$as_me:8494: checking for $ac_word" >&5
8495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8496 if test "${ac_cv_prog_TIC+set}" = set; then
8497   echo $ECHO_N "(cached) $ECHO_C" >&6
8498 else
8499   if test -n "$TIC"; then
8500   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8501 else
8502   ac_save_IFS=$IFS; IFS=$ac_path_separator
8503 ac_dummy="$PATH"
8504 for ac_dir in $ac_dummy; do
8505   IFS=$ac_save_IFS
8506   test -z "$ac_dir" && ac_dir=.
8507   $as_executable_p "$ac_dir/$ac_word" || continue
8508 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8509 echo "$as_me:8509: found $ac_dir/$ac_word" >&5
8510 break
8511 done
8512
8513 fi
8514 fi
8515 TIC=$ac_cv_prog_TIC
8516 if test -n "$TIC"; then
8517   echo "$as_me:8517: result: $TIC" >&5
8518 echo "${ECHO_T}$TIC" >&6
8519 else
8520   echo "$as_me:8520: result: no" >&5
8521 echo "${ECHO_T}no" >&6
8522 fi
8523
8524 fi
8525 if test -z "$ac_cv_prog_TIC"; then
8526   ac_ct_TIC=$TIC
8527   # Extract the first word of "tic", so it can be a program name with args.
8528 set dummy tic; ac_word=$2
8529 echo "$as_me:8529: checking for $ac_word" >&5
8530 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8531 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8532   echo $ECHO_N "(cached) $ECHO_C" >&6
8533 else
8534   if test -n "$ac_ct_TIC"; then
8535   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8536 else
8537   ac_save_IFS=$IFS; IFS=$ac_path_separator
8538 ac_dummy="$PATH"
8539 for ac_dir in $ac_dummy; do
8540   IFS=$ac_save_IFS
8541   test -z "$ac_dir" && ac_dir=.
8542   $as_executable_p "$ac_dir/$ac_word" || continue
8543 ac_cv_prog_ac_ct_TIC="tic"
8544 echo "$as_me:8544: found $ac_dir/$ac_word" >&5
8545 break
8546 done
8547
8548 fi
8549 fi
8550 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8551 if test -n "$ac_ct_TIC"; then
8552   echo "$as_me:8552: result: $ac_ct_TIC" >&5
8553 echo "${ECHO_T}$ac_ct_TIC" >&6
8554 else
8555   echo "$as_me:8555: result: no" >&5
8556 echo "${ECHO_T}no" >&6
8557 fi
8558
8559   TIC=$ac_ct_TIC
8560 else
8561   TIC="$ac_cv_prog_TIC"
8562 fi
8563
8564 if test -n "$ac_tool_prefix"; then
8565   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8566 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8567 echo "$as_me:8567: checking for $ac_word" >&5
8568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8569 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8570   echo $ECHO_N "(cached) $ECHO_C" >&6
8571 else
8572   if test -n "$INFOCMP"; then
8573   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8574 else
8575   ac_save_IFS=$IFS; IFS=$ac_path_separator
8576 ac_dummy="$PATH"
8577 for ac_dir in $ac_dummy; do
8578   IFS=$ac_save_IFS
8579   test -z "$ac_dir" && ac_dir=.
8580   $as_executable_p "$ac_dir/$ac_word" || continue
8581 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8582 echo "$as_me:8582: found $ac_dir/$ac_word" >&5
8583 break
8584 done
8585
8586 fi
8587 fi
8588 INFOCMP=$ac_cv_prog_INFOCMP
8589 if test -n "$INFOCMP"; then
8590   echo "$as_me:8590: result: $INFOCMP" >&5
8591 echo "${ECHO_T}$INFOCMP" >&6
8592 else
8593   echo "$as_me:8593: result: no" >&5
8594 echo "${ECHO_T}no" >&6
8595 fi
8596
8597 fi
8598 if test -z "$ac_cv_prog_INFOCMP"; then
8599   ac_ct_INFOCMP=$INFOCMP
8600   # Extract the first word of "infocmp", so it can be a program name with args.
8601 set dummy infocmp; ac_word=$2
8602 echo "$as_me:8602: checking for $ac_word" >&5
8603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8604 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8605   echo $ECHO_N "(cached) $ECHO_C" >&6
8606 else
8607   if test -n "$ac_ct_INFOCMP"; then
8608   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8609 else
8610   ac_save_IFS=$IFS; IFS=$ac_path_separator
8611 ac_dummy="$PATH"
8612 for ac_dir in $ac_dummy; do
8613   IFS=$ac_save_IFS
8614   test -z "$ac_dir" && ac_dir=.
8615   $as_executable_p "$ac_dir/$ac_word" || continue
8616 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8617 echo "$as_me:8617: found $ac_dir/$ac_word" >&5
8618 break
8619 done
8620
8621 fi
8622 fi
8623 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8624 if test -n "$ac_ct_INFOCMP"; then
8625   echo "$as_me:8625: result: $ac_ct_INFOCMP" >&5
8626 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8627 else
8628   echo "$as_me:8628: result: no" >&5
8629 echo "${ECHO_T}no" >&6
8630 fi
8631
8632   INFOCMP=$ac_ct_INFOCMP
8633 else
8634   INFOCMP="$ac_cv_prog_INFOCMP"
8635 fi
8636
8637 if test -n "$FALLBACK_LIST"
8638 then
8639
8640 # Check whether --with-tic-path or --without-tic-path was given.
8641 if test "${with_tic_path+set}" = set; then
8642   withval="$with_tic_path"
8643   echo "$as_me:8643: checking for tic program for fallbacks" >&5
8644 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8645                 TIC=$withval
8646                 echo "$as_me:8646: result: $TIC" >&5
8647 echo "${ECHO_T}$TIC" >&6
8648
8649 if test "x$prefix" != xNONE; then
8650         cf_path_syntax="$prefix"
8651 else
8652         cf_path_syntax="$ac_default_prefix"
8653 fi
8654
8655 case ".$TIC" in
8656 (.\$\(*\)*|.\'*\'*)
8657         ;;
8658 (..|./*|.\\*)
8659         ;;
8660 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8661         ;;
8662 (.\$\{*prefix\}*|.\$\{*dir\}*)
8663         eval TIC="$TIC"
8664         case ".$TIC" in
8665         (.NONE/*)
8666                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8667                 ;;
8668         esac
8669         ;;
8670 (.no|.NONE/*)
8671         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8672         ;;
8673 (*)
8674         { { echo "$as_me:8674: error: expected a pathname, not \"$TIC\"" >&5
8675 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8676    { (exit 1); exit 1; }; }
8677         ;;
8678 esac
8679
8680 else
8681
8682 test -z "$TIC" && TIC="tic"
8683 for ac_prog in $TIC tic
8684 do
8685   # Extract the first word of "$ac_prog", so it can be a program name with args.
8686 set dummy $ac_prog; ac_word=$2
8687 echo "$as_me:8687: checking for $ac_word" >&5
8688 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8689 if test "${ac_cv_path_TIC+set}" = set; then
8690   echo $ECHO_N "(cached) $ECHO_C" >&6
8691 else
8692   case $TIC in
8693   [\\/]* | ?:[\\/]*)
8694   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8695   ;;
8696   *)
8697   ac_save_IFS=$IFS; IFS=$ac_path_separator
8698 ac_dummy="$PATH:/usr/local/ncurses/bin"
8699 for ac_dir in $ac_dummy; do
8700   IFS=$ac_save_IFS
8701   test -z "$ac_dir" && ac_dir=.
8702   if $as_executable_p "$ac_dir/$ac_word"; then
8703    ac_cv_path_TIC="$ac_dir/$ac_word"
8704    echo "$as_me:8704: found $ac_dir/$ac_word" >&5
8705    break
8706 fi
8707 done
8708
8709   ;;
8710 esac
8711 fi
8712 TIC=$ac_cv_path_TIC
8713
8714 if test -n "$TIC"; then
8715   echo "$as_me:8715: result: $TIC" >&5
8716 echo "${ECHO_T}$TIC" >&6
8717 else
8718   echo "$as_me:8718: result: no" >&5
8719 echo "${ECHO_T}no" >&6
8720 fi
8721
8722   test -n "$TIC" && break
8723 done
8724 test -n "$TIC" || TIC="$TIC"
8725
8726 cf_path_prog=""
8727 cf_path_args=""
8728 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8729 for cf_temp in $ac_cv_path_TIC
8730 do
8731         if test -z "$cf_path_prog" ; then
8732                 if test "$with_full_paths" = yes ; then
8733
8734 if test "x$prefix" != xNONE; then
8735         cf_path_syntax="$prefix"
8736 else
8737         cf_path_syntax="$ac_default_prefix"
8738 fi
8739
8740 case ".$cf_temp" in
8741 (.\$\(*\)*|.\'*\'*)
8742         ;;
8743 (..|./*|.\\*)
8744         ;;
8745 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8746         ;;
8747 (.\$\{*prefix\}*|.\$\{*dir\}*)
8748         eval cf_temp="$cf_temp"
8749         case ".$cf_temp" in
8750         (.NONE/*)
8751                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8752                 ;;
8753         esac
8754         ;;
8755 (.no|.NONE/*)
8756         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8757         ;;
8758 (*)
8759         break
8760         ;;
8761 esac
8762
8763                         cf_path_prog="$cf_temp"
8764                 else
8765                         cf_path_prog="`basename "$cf_temp"`"
8766                 fi
8767         elif test -z "$cf_path_args" ; then
8768                 cf_path_args="$cf_temp"
8769         else
8770                 cf_path_args="$cf_path_args $cf_temp"
8771         fi
8772 done
8773 IFS="$cf_save_ifs"
8774
8775 if test -n "$cf_path_prog" ; then
8776
8777 echo "${as_me:-configure}:8777: testing defining path for ${cf_path_prog} ..." 1>&5
8778
8779 cat >>confdefs.h <<EOF
8780 #define TIC_PATH "$cf_path_prog"
8781 EOF
8782
8783         test -n "$cf_path_args" &&
8784 cat >>confdefs.h <<EOF
8785 #define TIC_ARGS "$cf_path_args"
8786 EOF
8787
8788 fi
8789
8790                 if test -z "$TIC"
8791                 then
8792                         { echo "$as_me:8792: WARNING: no tic program found for fallbacks" >&5
8793 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8794                 fi
8795
8796 fi;
8797
8798 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8799 if test "${with_infocmp_path+set}" = set; then
8800   withval="$with_infocmp_path"
8801   echo "$as_me:8801: checking for infocmp program for fallbacks" >&5
8802 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8803                 INFOCMP=$withval
8804                 echo "$as_me:8804: result: $INFOCMP" >&5
8805 echo "${ECHO_T}$INFOCMP" >&6
8806
8807 if test "x$prefix" != xNONE; then
8808         cf_path_syntax="$prefix"
8809 else
8810         cf_path_syntax="$ac_default_prefix"
8811 fi
8812
8813 case ".$INFOCMP" in
8814 (.\$\(*\)*|.\'*\'*)
8815         ;;
8816 (..|./*|.\\*)
8817         ;;
8818 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8819         ;;
8820 (.\$\{*prefix\}*|.\$\{*dir\}*)
8821         eval INFOCMP="$INFOCMP"
8822         case ".$INFOCMP" in
8823         (.NONE/*)
8824                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8825                 ;;
8826         esac
8827         ;;
8828 (.no|.NONE/*)
8829         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8830         ;;
8831 (*)
8832         { { echo "$as_me:8832: error: expected a pathname, not \"$INFOCMP\"" >&5
8833 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8834    { (exit 1); exit 1; }; }
8835         ;;
8836 esac
8837
8838 else
8839
8840 test -z "$INFOCMP" && INFOCMP="infocmp"
8841 for ac_prog in $INFOCMP infocmp
8842 do
8843   # Extract the first word of "$ac_prog", so it can be a program name with args.
8844 set dummy $ac_prog; ac_word=$2
8845 echo "$as_me:8845: checking for $ac_word" >&5
8846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8847 if test "${ac_cv_path_INFOCMP+set}" = set; then
8848   echo $ECHO_N "(cached) $ECHO_C" >&6
8849 else
8850   case $INFOCMP in
8851   [\\/]* | ?:[\\/]*)
8852   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8853   ;;
8854   *)
8855   ac_save_IFS=$IFS; IFS=$ac_path_separator
8856 ac_dummy="$PATH:/usr/local/ncurses/bin"
8857 for ac_dir in $ac_dummy; do
8858   IFS=$ac_save_IFS
8859   test -z "$ac_dir" && ac_dir=.
8860   if $as_executable_p "$ac_dir/$ac_word"; then
8861    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8862    echo "$as_me:8862: found $ac_dir/$ac_word" >&5
8863    break
8864 fi
8865 done
8866
8867   ;;
8868 esac
8869 fi
8870 INFOCMP=$ac_cv_path_INFOCMP
8871
8872 if test -n "$INFOCMP"; then
8873   echo "$as_me:8873: result: $INFOCMP" >&5
8874 echo "${ECHO_T}$INFOCMP" >&6
8875 else
8876   echo "$as_me:8876: result: no" >&5
8877 echo "${ECHO_T}no" >&6
8878 fi
8879
8880   test -n "$INFOCMP" && break
8881 done
8882 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8883
8884 cf_path_prog=""
8885 cf_path_args=""
8886 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8887 for cf_temp in $ac_cv_path_INFOCMP
8888 do
8889         if test -z "$cf_path_prog" ; then
8890                 if test "$with_full_paths" = yes ; then
8891
8892 if test "x$prefix" != xNONE; then
8893         cf_path_syntax="$prefix"
8894 else
8895         cf_path_syntax="$ac_default_prefix"
8896 fi
8897
8898 case ".$cf_temp" in
8899 (.\$\(*\)*|.\'*\'*)
8900         ;;
8901 (..|./*|.\\*)
8902         ;;
8903 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8904         ;;
8905 (.\$\{*prefix\}*|.\$\{*dir\}*)
8906         eval cf_temp="$cf_temp"
8907         case ".$cf_temp" in
8908         (.NONE/*)
8909                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8910                 ;;
8911         esac
8912         ;;
8913 (.no|.NONE/*)
8914         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8915         ;;
8916 (*)
8917         break
8918         ;;
8919 esac
8920
8921                         cf_path_prog="$cf_temp"
8922                 else
8923                         cf_path_prog="`basename "$cf_temp"`"
8924                 fi
8925         elif test -z "$cf_path_args" ; then
8926                 cf_path_args="$cf_temp"
8927         else
8928                 cf_path_args="$cf_path_args $cf_temp"
8929         fi
8930 done
8931 IFS="$cf_save_ifs"
8932
8933 if test -n "$cf_path_prog" ; then
8934
8935 echo "${as_me:-configure}:8935: testing defining path for ${cf_path_prog} ..." 1>&5
8936
8937 cat >>confdefs.h <<EOF
8938 #define INFOCMP_PATH "$cf_path_prog"
8939 EOF
8940
8941         test -n "$cf_path_args" &&
8942 cat >>confdefs.h <<EOF
8943 #define INFOCMP_ARGS "$cf_path_args"
8944 EOF
8945
8946 fi
8947
8948                 if test -z "$INFOCMP"
8949                 then
8950                         { echo "$as_me:8950: WARNING: no infocmp program found for fallbacks" >&5
8951 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8952                 fi
8953
8954 fi;
8955
8956         test -z "$TIC" && FALLBACK_LIST=
8957         test -z "$INFOCMP" && FALLBACK_LIST=
8958         if test -z "$FALLBACK_LIST"
8959         then
8960                 { echo "$as_me:8960: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8961 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8962         fi
8963 fi
8964
8965 USE_FALLBACKS=
8966 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8967
8968 echo "$as_me:8968: checking if you want modern xterm or antique" >&5
8969 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8970
8971 # Check whether --with-xterm-new or --without-xterm-new was given.
8972 if test "${with_xterm_new+set}" = set; then
8973   withval="$with_xterm_new"
8974   with_xterm_new=$withval
8975 else
8976   with_xterm_new=yes
8977 fi;
8978 case "$with_xterm_new" in
8979 (no) with_xterm_new=xterm-old;;
8980 (*)      with_xterm_new=xterm-new;;
8981 esac
8982 echo "$as_me:8982: result: $with_xterm_new" >&5
8983 echo "${ECHO_T}$with_xterm_new" >&6
8984 WHICH_XTERM=$with_xterm_new
8985
8986 echo "$as_me:8986: checking if xterm backspace sends BS or DEL" >&5
8987 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8988
8989 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8990 if test "${with_xterm_kbs+set}" = set; then
8991   withval="$with_xterm_kbs"
8992   with_xterm_kbs=$withval
8993 else
8994   with_xterm_kbs=BS
8995 fi;
8996 case x$with_xterm_kbs in
8997 (xyes|xno|xBS|xbs|x8)
8998         with_xterm_kbs=BS
8999         ;;
9000 (xDEL|xdel|x127)
9001         with_xterm_kbs=DEL
9002         ;;
9003 (*)
9004         with_xterm_kbs=$withval
9005         ;;
9006 esac
9007 echo "$as_me:9007: result: $with_xterm_kbs" >&5
9008 echo "${ECHO_T}$with_xterm_kbs" >&6
9009 XTERM_KBS=$with_xterm_kbs
9010
9011 MAKE_TERMINFO=
9012 if test "$use_database" = no ; then
9013         TERMINFO="${datadir}/terminfo"
9014         MAKE_TERMINFO="#"
9015 else
9016
9017 echo "$as_me:9017: checking for list of terminfo directories" >&5
9018 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9019
9020 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9021 if test "${with_terminfo_dirs+set}" = set; then
9022   withval="$with_terminfo_dirs"
9023
9024 else
9025   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9026 fi;
9027 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9028 cf_dst_path=
9029 for cf_src_path in $withval
9030 do
9031
9032 if test "x$prefix" != xNONE; then
9033         cf_path_syntax="$prefix"
9034 else
9035         cf_path_syntax="$ac_default_prefix"
9036 fi
9037
9038 case ".$cf_src_path" in
9039 (.\$\(*\)*|.\'*\'*)
9040         ;;
9041 (..|./*|.\\*)
9042         ;;
9043 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9044         ;;
9045 (.\$\{*prefix\}*|.\$\{*dir\}*)
9046         eval cf_src_path="$cf_src_path"
9047         case ".$cf_src_path" in
9048         (.NONE/*)
9049                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9050                 ;;
9051         esac
9052         ;;
9053 (.no|.NONE/*)
9054         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9055         ;;
9056 (*)
9057         { { echo "$as_me:9057: error: expected a pathname, not \"$cf_src_path\"" >&5
9058 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9059    { (exit 1); exit 1; }; }
9060         ;;
9061 esac
9062
9063   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9064   cf_dst_path="${cf_dst_path}${cf_src_path}"
9065 done
9066 IFS="$ac_save_ifs"
9067
9068 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9069 # so we have to check/work around.  We do prefer the result of "eval"...
9070 eval cf_dst_eval="$cf_dst_path"
9071 case "x$cf_dst_eval" in
9072 (xNONE*)
9073         TERMINFO_DIRS=$cf_dst_path
9074         ;;
9075 (*)
9076         TERMINFO_DIRS="$cf_dst_eval"
9077         ;;
9078 esac
9079
9080 echo "$as_me:9080: result: $TERMINFO_DIRS" >&5
9081 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9082 test -n "$TERMINFO_DIRS" &&
9083 cat >>confdefs.h <<EOF
9084 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9085 EOF
9086
9087 case "x$TERMINFO" in
9088 x???:*)
9089         { echo "$as_me:9089: WARNING: ignoring non-directory/file TERMINFO value" >&5
9090 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9091         unset TERMINFO
9092         ;;
9093 esac
9094
9095 echo "$as_me:9095: checking for default terminfo directory" >&5
9096 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9097
9098 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9099 if test "${with_default_terminfo_dir+set}" = set; then
9100   withval="$with_default_terminfo_dir"
9101
9102 else
9103   withval="${TERMINFO:-${datadir}/terminfo}"
9104 fi; if test -n "${datadir}/terminfo" ; then
9105
9106 if test "x$prefix" != xNONE; then
9107         cf_path_syntax="$prefix"
9108 else
9109         cf_path_syntax="$ac_default_prefix"
9110 fi
9111
9112 case ".$withval" in
9113 (.\$\(*\)*|.\'*\'*)
9114         ;;
9115 (..|./*|.\\*)
9116         ;;
9117 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9118         ;;
9119 (.\$\{*prefix\}*|.\$\{*dir\}*)
9120         eval withval="$withval"
9121         case ".$withval" in
9122         (.NONE/*)
9123                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9124                 ;;
9125         esac
9126         ;;
9127 (.no|.NONE/*)
9128         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9129         ;;
9130 (*)
9131         { { echo "$as_me:9131: error: expected a pathname, not \"$withval\"" >&5
9132 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9133    { (exit 1); exit 1; }; }
9134         ;;
9135 esac
9136
9137 fi
9138 eval TERMINFO="$withval"
9139
9140 echo "$as_me:9140: result: $TERMINFO" >&5
9141 echo "${ECHO_T}$TERMINFO" >&6
9142
9143 cat >>confdefs.h <<EOF
9144 #define TERMINFO "$TERMINFO"
9145 EOF
9146
9147 fi
9148
9149 ###     use option --disable-big-core to make tic run on small machines
9150 ###     We need 4Mb, check if we can allocate 50% more than that.
9151 echo "$as_me:9151: checking if big-core option selected" >&5
9152 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9153
9154 # Check whether --enable-big-core or --disable-big-core was given.
9155 if test "${enable_big_core+set}" = set; then
9156   enableval="$enable_big_core"
9157   with_big_core=$enableval
9158 else
9159   if test "$cross_compiling" = yes; then
9160   with_big_core=no
9161 else
9162   cat >"conftest.$ac_ext" <<_ACEOF
9163 #line 9163 "configure"
9164 #include "confdefs.h"
9165
9166 #include <stdlib.h>
9167 #include <string.h>
9168 int main() {
9169         unsigned long n = 6000000L;
9170         char *s = malloc(n);
9171         if (s != 0)
9172                 s[0] = s[n-1] = 0;
9173         ${cf_cv_main_return:-return}(s == 0);
9174 }
9175 _ACEOF
9176 rm -f "conftest$ac_exeext"
9177 if { (eval echo "$as_me:9177: \"$ac_link\"") >&5
9178   (eval $ac_link) 2>&5
9179   ac_status=$?
9180   echo "$as_me:9180: \$? = $ac_status" >&5
9181   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9182   { (eval echo "$as_me:9182: \"$ac_try\"") >&5
9183   (eval $ac_try) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit "$ac_status"); }; }; then
9187   with_big_core=yes
9188 else
9189   echo "$as_me: program exited with status $ac_status" >&5
9190 echo "$as_me: failed program was:" >&5
9191 cat "conftest.$ac_ext" >&5
9192 with_big_core=no
9193 fi
9194 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9195 fi
9196 fi;
9197 echo "$as_me:9197: result: $with_big_core" >&5
9198 echo "${ECHO_T}$with_big_core" >&6
9199 test "x$with_big_core" = "xyes" &&
9200 cat >>confdefs.h <<\EOF
9201 #define HAVE_BIG_CORE 1
9202 EOF
9203
9204 ### ISO C only guarantees 512-char strings, we have tables which load faster
9205 ### when constructed using "big" strings.  More than the C compiler, the awk
9206 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9207 echo "$as_me:9207: checking if big-strings option selected" >&5
9208 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9209
9210 # Check whether --enable-big-strings or --disable-big-strings was given.
9211 if test "${enable_big_strings+set}" = set; then
9212   enableval="$enable_big_strings"
9213   with_big_strings=$enableval
9214 else
9215
9216         case x$AWK in
9217         (x)
9218                 eval with_big_strings=no
9219                 ;;
9220         (*)
9221                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9222                         | $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
9223                         eval with_big_strings=yes
9224                 else
9225                         eval with_big_strings=no
9226                 fi
9227                 ;;
9228         esac
9229
9230 fi;
9231 echo "$as_me:9231: result: $with_big_strings" >&5
9232 echo "${ECHO_T}$with_big_strings" >&6
9233
9234 USE_BIG_STRINGS=0
9235 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9236
9237 ###     use option --enable-termcap to compile in the termcap fallback support
9238 echo "$as_me:9238: checking if you want termcap-fallback support" >&5
9239 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9240
9241 # Check whether --enable-termcap or --disable-termcap was given.
9242 if test "${enable_termcap+set}" = set; then
9243   enableval="$enable_termcap"
9244   with_termcap=$enableval
9245 else
9246   with_termcap=no
9247 fi;
9248 echo "$as_me:9248: result: $with_termcap" >&5
9249 echo "${ECHO_T}$with_termcap" >&6
9250
9251 NCURSES_USE_TERMCAP=0
9252 if test "x$with_termcap" != "xyes" ; then
9253         if test "$use_database" = no ; then
9254                 if test -z "$with_fallback" ; then
9255                         { { echo "$as_me:9255: error: You have disabled the database w/o specifying fallbacks" >&5
9256 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9257    { (exit 1); exit 1; }; }
9258                 fi
9259         fi
9260
9261 cat >>confdefs.h <<\EOF
9262 #define PURE_TERMINFO 1
9263 EOF
9264
9265 else
9266
9267         if test "$with_ticlib" != no ; then
9268                 { { echo "$as_me:9268: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9269 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9270    { (exit 1); exit 1; }; }
9271         fi
9272
9273         NCURSES_USE_TERMCAP=1
9274         echo "$as_me:9274: checking for list of termcap files" >&5
9275 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9276
9277 # Check whether --with-termpath or --without-termpath was given.
9278 if test "${with_termpath+set}" = set; then
9279   withval="$with_termpath"
9280
9281 else
9282   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9283 fi;
9284 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9285 cf_dst_path=
9286 for cf_src_path in $withval
9287 do
9288
9289 if test "x$prefix" != xNONE; then
9290         cf_path_syntax="$prefix"
9291 else
9292         cf_path_syntax="$ac_default_prefix"
9293 fi
9294
9295 case ".$cf_src_path" in
9296 (.\$\(*\)*|.\'*\'*)
9297         ;;
9298 (..|./*|.\\*)
9299         ;;
9300 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9301         ;;
9302 (.\$\{*prefix\}*|.\$\{*dir\}*)
9303         eval cf_src_path="$cf_src_path"
9304         case ".$cf_src_path" in
9305         (.NONE/*)
9306                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9307                 ;;
9308         esac
9309         ;;
9310 (.no|.NONE/*)
9311         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9312         ;;
9313 (*)
9314         { { echo "$as_me:9314: error: expected a pathname, not \"$cf_src_path\"" >&5
9315 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9316    { (exit 1); exit 1; }; }
9317         ;;
9318 esac
9319
9320   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9321   cf_dst_path="${cf_dst_path}${cf_src_path}"
9322 done
9323 IFS="$ac_save_ifs"
9324
9325 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9326 # so we have to check/work around.  We do prefer the result of "eval"...
9327 eval cf_dst_eval="$cf_dst_path"
9328 case "x$cf_dst_eval" in
9329 (xNONE*)
9330         TERMPATH=$cf_dst_path
9331         ;;
9332 (*)
9333         TERMPATH="$cf_dst_eval"
9334         ;;
9335 esac
9336
9337         echo "$as_me:9337: result: $TERMPATH" >&5
9338 echo "${ECHO_T}$TERMPATH" >&6
9339         test -n "$TERMPATH" &&
9340 cat >>confdefs.h <<EOF
9341 #define TERMPATH "$TERMPATH"
9342 EOF
9343
9344         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9345         echo "$as_me:9345: checking if fast termcap-loader is needed" >&5
9346 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9347
9348 # Check whether --enable-getcap or --disable-getcap was given.
9349 if test "${enable_getcap+set}" = set; then
9350   enableval="$enable_getcap"
9351   with_getcap=$enableval
9352 else
9353   with_getcap=no
9354 fi;
9355         echo "$as_me:9355: result: $with_getcap" >&5
9356 echo "${ECHO_T}$with_getcap" >&6
9357         test "x$with_getcap" = "xyes" &&
9358 cat >>confdefs.h <<\EOF
9359 #define USE_GETCAP 1
9360 EOF
9361
9362         echo "$as_me:9362: checking if translated termcaps will be cached in ~/.terminfo" >&5
9363 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9364
9365 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9366 if test "${enable_getcap_cache+set}" = set; then
9367   enableval="$enable_getcap_cache"
9368   with_getcap_cache=$enableval
9369 else
9370   with_getcap_cache=no
9371 fi;
9372         echo "$as_me:9372: result: $with_getcap_cache" >&5
9373 echo "${ECHO_T}$with_getcap_cache" >&6
9374         test "x$with_getcap_cache" = "xyes" &&
9375 cat >>confdefs.h <<\EOF
9376 #define USE_GETCAP_CACHE 1
9377 EOF
9378
9379 fi
9380
9381 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9382 echo "$as_me:9382: checking if ~/.terminfo is wanted" >&5
9383 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9384
9385 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9386 if test "${enable_home_terminfo+set}" = set; then
9387   enableval="$enable_home_terminfo"
9388   with_home_terminfo=$enableval
9389 else
9390   with_home_terminfo=yes
9391 fi;
9392 echo "$as_me:9392: result: $with_home_terminfo" >&5
9393 echo "${ECHO_T}$with_home_terminfo" >&6
9394 test "x$with_home_terminfo" = "xyes" &&
9395 cat >>confdefs.h <<\EOF
9396 #define USE_HOME_TERMINFO 1
9397 EOF
9398
9399 echo "$as_me:9399: checking if you want to permit root to use ncurses environment variables" >&5
9400 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9401
9402 # Check whether --enable-root-environ or --disable-root-environ was given.
9403 if test "${enable_root_environ+set}" = set; then
9404   enableval="$enable_root_environ"
9405   with_root_environ=$enableval
9406 else
9407   with_root_environ=yes
9408 fi;
9409 echo "$as_me:9409: result: $with_root_environ" >&5
9410 echo "${ECHO_T}$with_root_environ" >&6
9411 test "x$with_root_environ" = xyes &&
9412 cat >>confdefs.h <<\EOF
9413 #define USE_ROOT_ENVIRON 1
9414 EOF
9415
9416 echo "$as_me:9416: checking if you want to permit setuid programs to access all files" >&5
9417 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9418
9419 # Check whether --enable-root-environ or --disable-root-environ was given.
9420 if test "${enable_root_environ+set}" = set; then
9421   enableval="$enable_root_environ"
9422   with_root_access=$enableval
9423 else
9424   with_root_access=yes
9425 fi;
9426 echo "$as_me:9426: result: $with_root_access" >&5
9427 echo "${ECHO_T}$with_root_access" >&6
9428 test "x$with_root_access" = xyes &&
9429 cat >>confdefs.h <<\EOF
9430 #define USE_ROOT_ACCESS 1
9431 EOF
9432
9433 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9434 ###   to reduce storage requirements for the terminfo database.
9435
9436 for ac_header in \
9437 unistd.h \
9438
9439 do
9440 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9441 echo "$as_me:9441: checking for $ac_header" >&5
9442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9444   echo $ECHO_N "(cached) $ECHO_C" >&6
9445 else
9446   cat >"conftest.$ac_ext" <<_ACEOF
9447 #line 9447 "configure"
9448 #include "confdefs.h"
9449 #include <$ac_header>
9450 _ACEOF
9451 if { (eval echo "$as_me:9451: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9452   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9453   ac_status=$?
9454   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9455   rm -f conftest.er1
9456   cat conftest.err >&5
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit "$ac_status"); } >/dev/null; then
9459   if test -s conftest.err; then
9460     ac_cpp_err=$ac_c_preproc_warn_flag
9461   else
9462     ac_cpp_err=
9463   fi
9464 else
9465   ac_cpp_err=yes
9466 fi
9467 if test -z "$ac_cpp_err"; then
9468   eval "$as_ac_Header=yes"
9469 else
9470   echo "$as_me: failed program was:" >&5
9471   cat "conftest.$ac_ext" >&5
9472   eval "$as_ac_Header=no"
9473 fi
9474 rm -f conftest.err "conftest.$ac_ext"
9475 fi
9476 echo "$as_me:9476: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9477 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9478 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9479   cat >>confdefs.h <<EOF
9480 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9481 EOF
9482
9483 fi
9484 done
9485
9486 for ac_func in \
9487         remove \
9488         unlink
9489 do
9490 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9491 echo "$as_me:9491: checking for $ac_func" >&5
9492 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9493 if eval "test \"\${$as_ac_var+set}\" = set"; then
9494   echo $ECHO_N "(cached) $ECHO_C" >&6
9495 else
9496   cat >"conftest.$ac_ext" <<_ACEOF
9497 #line 9497 "configure"
9498 #include "confdefs.h"
9499 #define $ac_func autoconf_temporary
9500 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9501 #undef $ac_func
9502
9503 #ifdef __cplusplus
9504 extern "C"
9505 #endif
9506
9507 /* We use char because int might match the return type of a gcc2
9508    builtin and then its argument prototype would still apply.  */
9509 char $ac_func (void);
9510
9511 int
9512 main (void)
9513 {
9514
9515 /* The GNU C library defines stubs for functions which it implements
9516     to always fail with ENOSYS.  Some functions are actually named
9517     something starting with __ and the normal name is an alias.  */
9518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9519 #error found stub for $ac_func
9520 #endif
9521
9522         return $ac_func ();
9523   ;
9524   return 0;
9525 }
9526 _ACEOF
9527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9528 if { (eval echo "$as_me:9528: \"$ac_link\"") >&5
9529   (eval $ac_link) 2>&5
9530   ac_status=$?
9531   echo "$as_me:9531: \$? = $ac_status" >&5
9532   (exit "$ac_status"); } &&
9533          { ac_try='test -s "conftest$ac_exeext"'
9534   { (eval echo "$as_me:9534: \"$ac_try\"") >&5
9535   (eval $ac_try) 2>&5
9536   ac_status=$?
9537   echo "$as_me:9537: \$? = $ac_status" >&5
9538   (exit "$ac_status"); }; }; then
9539   eval "$as_ac_var=yes"
9540 else
9541   echo "$as_me: failed program was:" >&5
9542 cat "conftest.$ac_ext" >&5
9543 eval "$as_ac_var=no"
9544 fi
9545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9546 fi
9547 echo "$as_me:9547: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9548 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9549 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9550   cat >>confdefs.h <<EOF
9551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9552 EOF
9553
9554 fi
9555 done
9556
9557 if test "$cross_compiling" = yes ; then
9558
9559 for ac_func in \
9560                 link \
9561                 symlink
9562 do
9563 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9564 echo "$as_me:9564: checking for $ac_func" >&5
9565 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9566 if eval "test \"\${$as_ac_var+set}\" = set"; then
9567   echo $ECHO_N "(cached) $ECHO_C" >&6
9568 else
9569   cat >"conftest.$ac_ext" <<_ACEOF
9570 #line 9570 "configure"
9571 #include "confdefs.h"
9572 #define $ac_func autoconf_temporary
9573 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9574 #undef $ac_func
9575
9576 #ifdef __cplusplus
9577 extern "C"
9578 #endif
9579
9580 /* We use char because int might match the return type of a gcc2
9581    builtin and then its argument prototype would still apply.  */
9582 char $ac_func (void);
9583
9584 int
9585 main (void)
9586 {
9587
9588 /* The GNU C library defines stubs for functions which it implements
9589     to always fail with ENOSYS.  Some functions are actually named
9590     something starting with __ and the normal name is an alias.  */
9591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9592 #error found stub for $ac_func
9593 #endif
9594
9595         return $ac_func ();
9596   ;
9597   return 0;
9598 }
9599 _ACEOF
9600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9601 if { (eval echo "$as_me:9601: \"$ac_link\"") >&5
9602   (eval $ac_link) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit "$ac_status"); } &&
9606          { ac_try='test -s "conftest$ac_exeext"'
9607   { (eval echo "$as_me:9607: \"$ac_try\"") >&5
9608   (eval $ac_try) 2>&5
9609   ac_status=$?
9610   echo "$as_me:9610: \$? = $ac_status" >&5
9611   (exit "$ac_status"); }; }; then
9612   eval "$as_ac_var=yes"
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 cat "conftest.$ac_ext" >&5
9616 eval "$as_ac_var=no"
9617 fi
9618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9619 fi
9620 echo "$as_me:9620: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9621 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9622 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9623   cat >>confdefs.h <<EOF
9624 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9625 EOF
9626
9627 fi
9628 done
9629
9630 else
9631         echo "$as_me:9631: checking if link/symlink functions work" >&5
9632 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9633 if test "${cf_cv_link_funcs+set}" = set; then
9634   echo $ECHO_N "(cached) $ECHO_C" >&6
9635 else
9636
9637                 cf_cv_link_funcs=
9638                 for cf_func in link symlink ; do
9639                         if test "$cross_compiling" = yes; then
9640
9641                         eval 'ac_cv_func_'$cf_func'=error'
9642 else
9643   cat >"conftest.$ac_ext" <<_ACEOF
9644 #line 9644 "configure"
9645 #include "confdefs.h"
9646
9647 #include <stdio.h>
9648 #include <sys/types.h>
9649 #include <sys/stat.h>
9650 #ifdef HAVE_UNISTD_H
9651 #include <unistd.h>
9652 #endif
9653 int main(void)
9654 {
9655         int fail = 0;
9656         char *src = "conftest.tmp";
9657         char *dst = "conftest.chk";
9658         struct stat src_sb, dst_sb;
9659         FILE *fp = fopen(src, "w");
9660         if (fp == 0) { fail = 3; } else {
9661                 fclose(fp); stat(src, &src_sb);
9662                 if ($cf_func(src, dst) < 0) {
9663                         fail = 1;
9664                 } else if (stat(dst, &dst_sb) < 0) {
9665                         fail = 2;
9666                 } else {
9667                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9668                         if (diff < 0) diff = -diff;
9669                         if (diff > 2) fail = 3;
9670                 }
9671         }
9672 #ifdef HAVE_UNLINK
9673         unlink(dst); unlink(src);
9674 #else
9675         remove(dst); remove(src);
9676 #endif
9677         ${cf_cv_main_return:-return} (fail);
9678 }
9679
9680 _ACEOF
9681 rm -f "conftest$ac_exeext"
9682 if { (eval echo "$as_me:9682: \"$ac_link\"") >&5
9683   (eval $ac_link) 2>&5
9684   ac_status=$?
9685   echo "$as_me:9685: \$? = $ac_status" >&5
9686   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9687   { (eval echo "$as_me:9687: \"$ac_try\"") >&5
9688   (eval $ac_try) 2>&5
9689   ac_status=$?
9690   echo "$as_me:9690: \$? = $ac_status" >&5
9691   (exit "$ac_status"); }; }; then
9692
9693                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9694                         eval 'ac_cv_func_'$cf_func'=yes'
9695 else
9696   echo "$as_me: program exited with status $ac_status" >&5
9697 echo "$as_me: failed program was:" >&5
9698 cat "conftest.$ac_ext" >&5
9699
9700                         eval 'ac_cv_func_'$cf_func'=no'
9701 fi
9702 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9703 fi
9704                 done
9705                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9706
9707 fi
9708 echo "$as_me:9708: result: $cf_cv_link_funcs" >&5
9709 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9710         test "$ac_cv_func_link"    = yes &&
9711 cat >>confdefs.h <<\EOF
9712 #define HAVE_LINK 1
9713 EOF
9714
9715         test "$ac_cv_func_symlink" = yes &&
9716 cat >>confdefs.h <<\EOF
9717 #define HAVE_SYMLINK 1
9718 EOF
9719
9720 fi
9721
9722 with_links=no
9723 with_symlinks=no
9724
9725 # soft links (symbolic links) are useful for some systems where hard links do
9726 # not work, or to make it simpler to copy terminfo trees around.
9727 if test "x$ac_cv_func_symlink" = xyes ; then
9728         echo "$as_me:9728: checking if tic should use symbolic links" >&5
9729 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9730
9731 # Check whether --enable-symlinks or --disable-symlinks was given.
9732 if test "${enable_symlinks+set}" = set; then
9733   enableval="$enable_symlinks"
9734   with_symlinks=$enableval
9735 else
9736   with_symlinks=no
9737 fi;
9738         echo "$as_me:9738: result: $with_symlinks" >&5
9739 echo "${ECHO_T}$with_symlinks" >&6
9740 fi
9741
9742 # If we have hard links and did not choose to use soft links instead, there is
9743 # no reason to make this choice optional - use the hard links.
9744 if test "$with_symlinks" = no ; then
9745         echo "$as_me:9745: checking if tic should use hard links" >&5
9746 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9747         if test "x$ac_cv_func_link" = xyes ; then
9748                 with_links=yes
9749         else
9750                 with_links=no
9751         fi
9752         echo "$as_me:9752: result: $with_links" >&5
9753 echo "${ECHO_T}$with_links" >&6
9754 fi
9755
9756 test "x$with_links" = xyes &&
9757 cat >>confdefs.h <<\EOF
9758 #define USE_LINKS 1
9759 EOF
9760
9761 test "x$with_symlinks" = xyes &&
9762 cat >>confdefs.h <<\EOF
9763 #define USE_SYMLINKS 1
9764 EOF
9765
9766 ###   use option --enable-broken-linker to force on use of broken-linker support
9767
9768 echo "$as_me:9768: checking if you want broken-linker support code" >&5
9769 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9770
9771 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9772 if test "${enable_broken_linker+set}" = set; then
9773   enableval="$enable_broken_linker"
9774   with_broken_linker=$enableval
9775 else
9776   with_broken_linker=no
9777 fi;
9778 echo "$as_me:9778: result: $with_broken_linker" >&5
9779 echo "${ECHO_T}$with_broken_linker" >&6
9780
9781 : "${BROKEN_LINKER:=0}"
9782 if test "x$with_broken_linker" = xyes ; then
9783
9784 cat >>confdefs.h <<\EOF
9785 #define BROKEN_LINKER 1
9786 EOF
9787
9788         BROKEN_LINKER=1
9789 fi
9790
9791 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9792 echo "$as_me:9792: checking if tputs should process BSD-style prefix padding" >&5
9793 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9794
9795 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9796 if test "${enable_bsdpad+set}" = set; then
9797   enableval="$enable_bsdpad"
9798   with_bsdpad=$enableval
9799 else
9800   with_bsdpad=no
9801 fi;
9802 echo "$as_me:9802: result: $with_bsdpad" >&5
9803 echo "${ECHO_T}$with_bsdpad" >&6
9804 test "x$with_bsdpad" = xyes &&
9805 cat >>confdefs.h <<\EOF
9806 #define BSD_TPUTS 1
9807 EOF
9808
9809 ###   use option --enable-widec to turn on use of wide-character support
9810 NCURSES_CH_T=chtype
9811 NCURSES_LIBUTF8=0
9812
9813 NEED_WCHAR_H=0
9814 NCURSES_MBSTATE_T=0
9815 NCURSES_WCHAR_T=0
9816 NCURSES_WINT_T=0
9817
9818 # Check to define _XOPEN_SOURCE "automatically"
9819 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9820
9821 echo "$as_me:9821: checking if the POSIX test-macros are already defined" >&5
9822 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9823 if test "${cf_cv_posix_visible+set}" = set; then
9824   echo $ECHO_N "(cached) $ECHO_C" >&6
9825 else
9826
9827 cat >"conftest.$ac_ext" <<_ACEOF
9828 #line 9828 "configure"
9829 #include "confdefs.h"
9830 #include <stdio.h>
9831 int
9832 main (void)
9833 {
9834
9835 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9836         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9837         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9838         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9839 #error conflicting symbols found
9840 #endif
9841
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 rm -f "conftest.$ac_objext"
9847 if { (eval echo "$as_me:9847: \"$ac_compile\"") >&5
9848   (eval $ac_compile) 2>&5
9849   ac_status=$?
9850   echo "$as_me:9850: \$? = $ac_status" >&5
9851   (exit "$ac_status"); } &&
9852          { ac_try='test -s "conftest.$ac_objext"'
9853   { (eval echo "$as_me:9853: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:9856: \$? = $ac_status" >&5
9857   (exit "$ac_status"); }; }; then
9858   cf_cv_posix_visible=no
9859 else
9860   echo "$as_me: failed program was:" >&5
9861 cat "conftest.$ac_ext" >&5
9862 cf_cv_posix_visible=yes
9863 fi
9864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9865
9866 fi
9867 echo "$as_me:9867: result: $cf_cv_posix_visible" >&5
9868 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9869
9870 if test "$cf_cv_posix_visible" = no; then
9871
9872 cf_XOPEN_SOURCE=600
9873 cf_POSIX_C_SOURCE=199506L
9874 cf_xopen_source=
9875
9876 case "$host_os" in
9877 (aix[4-7]*)
9878         cf_xopen_source="-D_ALL_SOURCE"
9879         ;;
9880 (msys)
9881         cf_XOPEN_SOURCE=600
9882         ;;
9883 (darwin[0-8].*)
9884         cf_xopen_source="-D_APPLE_C_SOURCE"
9885         ;;
9886 (darwin*)
9887         cf_xopen_source="-D_DARWIN_C_SOURCE"
9888         cf_XOPEN_SOURCE=
9889         ;;
9890 (freebsd*|dragonfly*|midnightbsd*)
9891         # 5.x headers associate
9892         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9893         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9894         cf_POSIX_C_SOURCE=200112L
9895         cf_XOPEN_SOURCE=600
9896         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9897         ;;
9898 (hpux11*)
9899         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9900         ;;
9901 (hpux*)
9902         cf_xopen_source="-D_HPUX_SOURCE"
9903         ;;
9904 (irix[56].*)
9905         cf_xopen_source="-D_SGI_SOURCE"
9906         cf_XOPEN_SOURCE=
9907         ;;
9908 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9909
9910 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9911
9912 echo "$as_me:9912: checking if this is the GNU C library" >&5
9913 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9914 if test "${cf_cv_gnu_library+set}" = set; then
9915   echo $ECHO_N "(cached) $ECHO_C" >&6
9916 else
9917
9918 cat >"conftest.$ac_ext" <<_ACEOF
9919 #line 9919 "configure"
9920 #include "confdefs.h"
9921 #include <sys/types.h>
9922 int
9923 main (void)
9924 {
9925
9926         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9927                 return 0;
9928         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9929                 return 0;
9930         #else
9931         #       error not GNU C library
9932         #endif
9933   ;
9934   return 0;
9935 }
9936 _ACEOF
9937 rm -f "conftest.$ac_objext"
9938 if { (eval echo "$as_me:9938: \"$ac_compile\"") >&5
9939   (eval $ac_compile) 2>&5
9940   ac_status=$?
9941   echo "$as_me:9941: \$? = $ac_status" >&5
9942   (exit "$ac_status"); } &&
9943          { ac_try='test -s "conftest.$ac_objext"'
9944   { (eval echo "$as_me:9944: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:9947: \$? = $ac_status" >&5
9948   (exit "$ac_status"); }; }; then
9949   cf_cv_gnu_library=yes
9950 else
9951   echo "$as_me: failed program was:" >&5
9952 cat "conftest.$ac_ext" >&5
9953 cf_cv_gnu_library=no
9954 fi
9955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9956
9957 fi
9958 echo "$as_me:9958: result: $cf_cv_gnu_library" >&5
9959 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9960
9961 if test x$cf_cv_gnu_library = xyes; then
9962
9963         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9964         # was changed to help a little.  newlib incorporated the change about 4
9965         # years later.
9966         echo "$as_me:9966: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9967 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9968 if test "${cf_cv_gnu_library_219+set}" = set; then
9969   echo $ECHO_N "(cached) $ECHO_C" >&6
9970 else
9971
9972                 cf_save="$CPPFLAGS"
9973
9974         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9975         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9976
9977                 cat >"conftest.$ac_ext" <<_ACEOF
9978 #line 9978 "configure"
9979 #include "confdefs.h"
9980 #include <sys/types.h>
9981 int
9982 main (void)
9983 {
9984
9985                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9986                                 return 0;
9987                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9988                                 return 0;
9989                         #else
9990                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9991                         #endif
9992   ;
9993   return 0;
9994 }
9995 _ACEOF
9996 rm -f "conftest.$ac_objext"
9997 if { (eval echo "$as_me:9997: \"$ac_compile\"") >&5
9998   (eval $ac_compile) 2>&5
9999   ac_status=$?
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit "$ac_status"); } &&
10002          { ac_try='test -s "conftest.$ac_objext"'
10003   { (eval echo "$as_me:10003: \"$ac_try\"") >&5
10004   (eval $ac_try) 2>&5
10005   ac_status=$?
10006   echo "$as_me:10006: \$? = $ac_status" >&5
10007   (exit "$ac_status"); }; }; then
10008   cf_cv_gnu_library_219=yes
10009 else
10010   echo "$as_me: failed program was:" >&5
10011 cat "conftest.$ac_ext" >&5
10012 cf_cv_gnu_library_219=no
10013 fi
10014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10015                 CPPFLAGS="$cf_save"
10016
10017 fi
10018 echo "$as_me:10018: result: $cf_cv_gnu_library_219" >&5
10019 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10020
10021         if test "x$cf_cv_gnu_library_219" = xyes; then
10022                 cf_save="$CPPFLAGS"
10023                 echo "$as_me:10023: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10024 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10025 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10026   echo $ECHO_N "(cached) $ECHO_C" >&6
10027 else
10028
10029 cf_fix_cppflags=no
10030 cf_new_cflags=
10031 cf_new_cppflags=
10032 cf_new_extra_cppflags=
10033
10034 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10035 do
10036 case "$cf_fix_cppflags" in
10037 (no)
10038         case "$cf_add_cflags" in
10039         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10040                 case "$cf_add_cflags" in
10041                 (-D*)
10042                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10043
10044                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10045                                 && test -z "${cf_tst_cflags}" \
10046                                 && cf_fix_cppflags=yes
10047
10048                         if test "$cf_fix_cppflags" = yes ; then
10049
10050         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10051         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10052
10053                                 continue
10054                         elif test "${cf_tst_cflags}" = "\"'" ; then
10055
10056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10058
10059                                 continue
10060                         fi
10061                         ;;
10062                 esac
10063                 case "$CPPFLAGS" in
10064                 (*$cf_add_cflags)
10065                         ;;
10066                 (*)
10067                         case "$cf_add_cflags" in
10068                         (-D*)
10069                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10070
10071 CPPFLAGS=`echo "$CPPFLAGS" | \
10072         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10073                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10074
10075                                 ;;
10076                         esac
10077
10078         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10079         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10080
10081                         ;;
10082                 esac
10083                 ;;
10084         (*)
10085
10086         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10087         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10088
10089                 ;;
10090         esac
10091         ;;
10092 (yes)
10093
10094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10096
10097         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10098
10099         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10100                 && test -z "${cf_tst_cflags}" \
10101                 && cf_fix_cppflags=no
10102         ;;
10103 esac
10104 done
10105
10106 if test -n "$cf_new_cflags" ; then
10107
10108         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10109         CFLAGS="${CFLAGS}$cf_new_cflags"
10110
10111 fi
10112
10113 if test -n "$cf_new_cppflags" ; then
10114
10115         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10116         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10117
10118 fi
10119
10120 if test -n "$cf_new_extra_cppflags" ; then
10121
10122         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10123         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10124
10125 fi
10126
10127                         cat >"conftest.$ac_ext" <<_ACEOF
10128 #line 10128 "configure"
10129 #include "confdefs.h"
10130
10131                                 #include <limits.h>
10132                                 #include <sys/types.h>
10133
10134 int
10135 main (void)
10136 {
10137
10138                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10139                                         return 0;
10140                                 #else
10141                                 #       error GNU C library is too old
10142                                 #endif
10143   ;
10144   return 0;
10145 }
10146 _ACEOF
10147 rm -f "conftest.$ac_objext"
10148 if { (eval echo "$as_me:10148: \"$ac_compile\"") >&5
10149   (eval $ac_compile) 2>&5
10150   ac_status=$?
10151   echo "$as_me:10151: \$? = $ac_status" >&5
10152   (exit "$ac_status"); } &&
10153          { ac_try='test -s "conftest.$ac_objext"'
10154   { (eval echo "$as_me:10154: \"$ac_try\"") >&5
10155   (eval $ac_try) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit "$ac_status"); }; }; then
10159   cf_cv_gnu_dftsrc_219=yes
10160 else
10161   echo "$as_me: failed program was:" >&5
10162 cat "conftest.$ac_ext" >&5
10163 cf_cv_gnu_dftsrc_219=no
10164 fi
10165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10166
10167 fi
10168 echo "$as_me:10168: result: $cf_cv_gnu_dftsrc_219" >&5
10169 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10170                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10171         else
10172                 cf_cv_gnu_dftsrc_219=maybe
10173         fi
10174
10175         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10176
10177                 echo "$as_me:10177: checking if we must define _GNU_SOURCE" >&5
10178 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10179 if test "${cf_cv_gnu_source+set}" = set; then
10180   echo $ECHO_N "(cached) $ECHO_C" >&6
10181 else
10182
10183                 cat >"conftest.$ac_ext" <<_ACEOF
10184 #line 10184 "configure"
10185 #include "confdefs.h"
10186 #include <sys/types.h>
10187 int
10188 main (void)
10189 {
10190
10191                         #ifndef _XOPEN_SOURCE
10192                         #error  expected _XOPEN_SOURCE to be defined
10193                         #endif
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 rm -f "conftest.$ac_objext"
10199 if { (eval echo "$as_me:10199: \"$ac_compile\"") >&5
10200   (eval $ac_compile) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit "$ac_status"); } &&
10204          { ac_try='test -s "conftest.$ac_objext"'
10205   { (eval echo "$as_me:10205: \"$ac_try\"") >&5
10206   (eval $ac_try) 2>&5
10207   ac_status=$?
10208   echo "$as_me:10208: \$? = $ac_status" >&5
10209   (exit "$ac_status"); }; }; then
10210   cf_cv_gnu_source=no
10211 else
10212   echo "$as_me: failed program was:" >&5
10213 cat "conftest.$ac_ext" >&5
10214 cf_save="$CPPFLAGS"
10215
10216 cf_fix_cppflags=no
10217 cf_new_cflags=
10218 cf_new_cppflags=
10219 cf_new_extra_cppflags=
10220
10221 for cf_add_cflags in -D_GNU_SOURCE
10222 do
10223 case "$cf_fix_cppflags" in
10224 (no)
10225         case "$cf_add_cflags" in
10226         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10227                 case "$cf_add_cflags" in
10228                 (-D*)
10229                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10230
10231                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10232                                 && test -z "${cf_tst_cflags}" \
10233                                 && cf_fix_cppflags=yes
10234
10235                         if test "$cf_fix_cppflags" = yes ; then
10236
10237         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10238         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10239
10240                                 continue
10241                         elif test "${cf_tst_cflags}" = "\"'" ; then
10242
10243         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10244         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10245
10246                                 continue
10247                         fi
10248                         ;;
10249                 esac
10250                 case "$CPPFLAGS" in
10251                 (*$cf_add_cflags)
10252                         ;;
10253                 (*)
10254                         case "$cf_add_cflags" in
10255                         (-D*)
10256                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10257
10258 CPPFLAGS=`echo "$CPPFLAGS" | \
10259         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10260                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10261
10262                                 ;;
10263                         esac
10264
10265         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10266         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10267
10268                         ;;
10269                 esac
10270                 ;;
10271         (*)
10272
10273         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10274         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10275
10276                 ;;
10277         esac
10278         ;;
10279 (yes)
10280
10281         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10282         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10283
10284         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10285
10286         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10287                 && test -z "${cf_tst_cflags}" \
10288                 && cf_fix_cppflags=no
10289         ;;
10290 esac
10291 done
10292
10293 if test -n "$cf_new_cflags" ; then
10294
10295         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10296         CFLAGS="${CFLAGS}$cf_new_cflags"
10297
10298 fi
10299
10300 if test -n "$cf_new_cppflags" ; then
10301
10302         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10303         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10304
10305 fi
10306
10307 if test -n "$cf_new_extra_cppflags" ; then
10308
10309         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10310         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10311
10312 fi
10313
10314                          cat >"conftest.$ac_ext" <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317 #include <sys/types.h>
10318 int
10319 main (void)
10320 {
10321
10322                                 #ifdef _XOPEN_SOURCE
10323                                 #error  expected _XOPEN_SOURCE to be undefined
10324                                 #endif
10325   ;
10326   return 0;
10327 }
10328 _ACEOF
10329 rm -f "conftest.$ac_objext"
10330 if { (eval echo "$as_me:10330: \"$ac_compile\"") >&5
10331   (eval $ac_compile) 2>&5
10332   ac_status=$?
10333   echo "$as_me:10333: \$? = $ac_status" >&5
10334   (exit "$ac_status"); } &&
10335          { ac_try='test -s "conftest.$ac_objext"'
10336   { (eval echo "$as_me:10336: \"$ac_try\"") >&5
10337   (eval $ac_try) 2>&5
10338   ac_status=$?
10339   echo "$as_me:10339: \$? = $ac_status" >&5
10340   (exit "$ac_status"); }; }; then
10341   cf_cv_gnu_source=no
10342 else
10343   echo "$as_me: failed program was:" >&5
10344 cat "conftest.$ac_ext" >&5
10345 cf_cv_gnu_source=yes
10346 fi
10347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10348                         CPPFLAGS="$cf_save"
10349
10350 fi
10351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10352
10353 fi
10354 echo "$as_me:10354: result: $cf_cv_gnu_source" >&5
10355 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10356
10357                 if test "$cf_cv_gnu_source" = yes
10358                 then
10359                 echo "$as_me:10359: checking if we should also define _DEFAULT_SOURCE" >&5
10360 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10361 if test "${cf_cv_default_source+set}" = set; then
10362   echo $ECHO_N "(cached) $ECHO_C" >&6
10363 else
10364
10365         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10366         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10367
10368                         cat >"conftest.$ac_ext" <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10371 #include <sys/types.h>
10372 int
10373 main (void)
10374 {
10375
10376                                 #ifdef _DEFAULT_SOURCE
10377                                 #error  expected _DEFAULT_SOURCE to be undefined
10378                                 #endif
10379   ;
10380   return 0;
10381 }
10382 _ACEOF
10383 rm -f "conftest.$ac_objext"
10384 if { (eval echo "$as_me:10384: \"$ac_compile\"") >&5
10385   (eval $ac_compile) 2>&5
10386   ac_status=$?
10387   echo "$as_me:10387: \$? = $ac_status" >&5
10388   (exit "$ac_status"); } &&
10389          { ac_try='test -s "conftest.$ac_objext"'
10390   { (eval echo "$as_me:10390: \"$ac_try\"") >&5
10391   (eval $ac_try) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit "$ac_status"); }; }; then
10395   cf_cv_default_source=no
10396 else
10397   echo "$as_me: failed program was:" >&5
10398 cat "conftest.$ac_ext" >&5
10399 cf_cv_default_source=yes
10400 fi
10401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10402
10403 fi
10404 echo "$as_me:10404: result: $cf_cv_default_source" >&5
10405 echo "${ECHO_T}$cf_cv_default_source" >&6
10406                         if test "$cf_cv_default_source" = yes
10407                         then
10408
10409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10410         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10411
10412                         fi
10413                 fi
10414         fi
10415
10416 fi
10417
10418         ;;
10419 (minix*)
10420         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10421         ;;
10422 (mirbsd*)
10423         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10424         cf_XOPEN_SOURCE=
10425
10426 if test "$cf_cv_posix_visible" = no; then
10427
10428 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10429
10430 cf_save_CFLAGS="$CFLAGS"
10431 cf_save_CPPFLAGS="$CPPFLAGS"
10432
10433 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10434         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10435                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10436
10437 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10438         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10439                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10440
10441 echo "$as_me:10441: checking if we should define _POSIX_C_SOURCE" >&5
10442 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10443 if test "${cf_cv_posix_c_source+set}" = set; then
10444   echo $ECHO_N "(cached) $ECHO_C" >&6
10445 else
10446
10447 echo "${as_me:-configure}:10447: testing if the symbol is already defined go no further ..." 1>&5
10448
10449         cat >"conftest.$ac_ext" <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452 #include <sys/types.h>
10453 int
10454 main (void)
10455 {
10456
10457 #ifndef _POSIX_C_SOURCE
10458 make an error
10459 #endif
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 rm -f "conftest.$ac_objext"
10465 if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
10466   (eval $ac_compile) 2>&5
10467   ac_status=$?
10468   echo "$as_me:10468: \$? = $ac_status" >&5
10469   (exit "$ac_status"); } &&
10470          { ac_try='test -s "conftest.$ac_objext"'
10471   { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472   (eval $ac_try) 2>&5
10473   ac_status=$?
10474   echo "$as_me:10474: \$? = $ac_status" >&5
10475   (exit "$ac_status"); }; }; then
10476   cf_cv_posix_c_source=no
10477 else
10478   echo "$as_me: failed program was:" >&5
10479 cat "conftest.$ac_ext" >&5
10480 cf_want_posix_source=no
10481          case .$cf_POSIX_C_SOURCE in
10482          (.[12]??*)
10483                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10484                 ;;
10485          (.2)
10486                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10487                 cf_want_posix_source=yes
10488                 ;;
10489          (.*)
10490                 cf_want_posix_source=yes
10491                 ;;
10492          esac
10493          if test "$cf_want_posix_source" = yes ; then
10494                 cat >"conftest.$ac_ext" <<_ACEOF
10495 #line 10495 "configure"
10496 #include "confdefs.h"
10497 #include <sys/types.h>
10498 int
10499 main (void)
10500 {
10501
10502 #ifdef _POSIX_SOURCE
10503 make an error
10504 #endif
10505   ;
10506   return 0;
10507 }
10508 _ACEOF
10509 rm -f "conftest.$ac_objext"
10510 if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5
10511   (eval $ac_compile) 2>&5
10512   ac_status=$?
10513   echo "$as_me:10513: \$? = $ac_status" >&5
10514   (exit "$ac_status"); } &&
10515          { ac_try='test -s "conftest.$ac_objext"'
10516   { (eval echo "$as_me:10516: \"$ac_try\"") >&5
10517   (eval $ac_try) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit "$ac_status"); }; }; then
10521   :
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat "conftest.$ac_ext" >&5
10525 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528          fi
10529
10530 echo "${as_me:-configure}:10530: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10531
10532          CFLAGS="$cf_trim_CFLAGS"
10533          CPPFLAGS="$cf_trim_CPPFLAGS"
10534
10535         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10536         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10537
10538 echo "${as_me:-configure}:10538: testing if the second compile does not leave our definition intact error ..." 1>&5
10539
10540          cat >"conftest.$ac_ext" <<_ACEOF
10541 #line 10541 "configure"
10542 #include "confdefs.h"
10543 #include <sys/types.h>
10544 int
10545 main (void)
10546 {
10547
10548 #ifndef _POSIX_C_SOURCE
10549 make an error
10550 #endif
10551   ;
10552   return 0;
10553 }
10554 _ACEOF
10555 rm -f "conftest.$ac_objext"
10556 if { (eval echo "$as_me:10556: \"$ac_compile\"") >&5
10557   (eval $ac_compile) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit "$ac_status"); } &&
10561          { ac_try='test -s "conftest.$ac_objext"'
10562   { (eval echo "$as_me:10562: \"$ac_try\"") >&5
10563   (eval $ac_try) 2>&5
10564   ac_status=$?
10565   echo "$as_me:10565: \$? = $ac_status" >&5
10566   (exit "$ac_status"); }; }; then
10567   :
10568 else
10569   echo "$as_me: failed program was:" >&5
10570 cat "conftest.$ac_ext" >&5
10571 cf_cv_posix_c_source=no
10572 fi
10573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10574          CFLAGS="$cf_save_CFLAGS"
10575          CPPFLAGS="$cf_save_CPPFLAGS"
10576
10577 fi
10578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10579
10580 fi
10581 echo "$as_me:10581: result: $cf_cv_posix_c_source" >&5
10582 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10583
10584 if test "$cf_cv_posix_c_source" != no ; then
10585         CFLAGS="$cf_trim_CFLAGS"
10586         CPPFLAGS="$cf_trim_CPPFLAGS"
10587
10588 cf_fix_cppflags=no
10589 cf_new_cflags=
10590 cf_new_cppflags=
10591 cf_new_extra_cppflags=
10592
10593 for cf_add_cflags in $cf_cv_posix_c_source
10594 do
10595 case "$cf_fix_cppflags" in
10596 (no)
10597         case "$cf_add_cflags" in
10598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10599                 case "$cf_add_cflags" in
10600                 (-D*)
10601                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10602
10603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10604                                 && test -z "${cf_tst_cflags}" \
10605                                 && cf_fix_cppflags=yes
10606
10607                         if test "$cf_fix_cppflags" = yes ; then
10608
10609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10611
10612                                 continue
10613                         elif test "${cf_tst_cflags}" = "\"'" ; then
10614
10615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10617
10618                                 continue
10619                         fi
10620                         ;;
10621                 esac
10622                 case "$CPPFLAGS" in
10623                 (*$cf_add_cflags)
10624                         ;;
10625                 (*)
10626                         case "$cf_add_cflags" in
10627                         (-D*)
10628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10629
10630 CPPFLAGS=`echo "$CPPFLAGS" | \
10631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10633
10634                                 ;;
10635                         esac
10636
10637         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10638         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10639
10640                         ;;
10641                 esac
10642                 ;;
10643         (*)
10644
10645         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10646         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10647
10648                 ;;
10649         esac
10650         ;;
10651 (yes)
10652
10653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10655
10656         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10657
10658         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10659                 && test -z "${cf_tst_cflags}" \
10660                 && cf_fix_cppflags=no
10661         ;;
10662 esac
10663 done
10664
10665 if test -n "$cf_new_cflags" ; then
10666
10667         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10668         CFLAGS="${CFLAGS}$cf_new_cflags"
10669
10670 fi
10671
10672 if test -n "$cf_new_cppflags" ; then
10673
10674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10675         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10676
10677 fi
10678
10679 if test -n "$cf_new_extra_cppflags" ; then
10680
10681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10683
10684 fi
10685
10686 fi
10687
10688 fi # cf_cv_posix_visible
10689
10690         ;;
10691 (netbsd*)
10692         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10693         ;;
10694 (openbsd[6-9]*)
10695         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10696         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10697         # Abusing the conformance level is a workaround.
10698         { echo "$as_me:10698: WARNING: this system does not provide usable locale support" >&5
10699 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10700         cf_xopen_source="-D_BSD_SOURCE"
10701         cf_XOPEN_SOURCE=700
10702         ;;
10703 (openbsd[4-5]*)
10704         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10705         cf_xopen_source="-D_BSD_SOURCE"
10706         cf_XOPEN_SOURCE=600
10707         ;;
10708 (openbsd*)
10709         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10710         ;;
10711 (osf[45]*)
10712         cf_xopen_source="-D_OSF_SOURCE"
10713         ;;
10714 (nto-qnx*)
10715         cf_xopen_source="-D_QNX_SOURCE"
10716         ;;
10717 (sco*)
10718         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10719         ;;
10720 (solaris2.*)
10721         cf_xopen_source="-D__EXTENSIONS__"
10722         cf_cv_xopen_source=broken
10723         ;;
10724 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10725         cf_XOPEN_SOURCE=
10726         cf_POSIX_C_SOURCE=
10727         ;;
10728 (*)
10729
10730 echo "$as_me:10730: checking if we should define _XOPEN_SOURCE" >&5
10731 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10732 if test "${cf_cv_xopen_source+set}" = set; then
10733   echo $ECHO_N "(cached) $ECHO_C" >&6
10734 else
10735
10736         cat >"conftest.$ac_ext" <<_ACEOF
10737 #line 10737 "configure"
10738 #include "confdefs.h"
10739
10740 #include <stdlib.h>
10741 #include <string.h>
10742 #include <sys/types.h>
10743
10744 int
10745 main (void)
10746 {
10747
10748 #ifndef _XOPEN_SOURCE
10749 make an error
10750 #endif
10751   ;
10752   return 0;
10753 }
10754 _ACEOF
10755 rm -f "conftest.$ac_objext"
10756 if { (eval echo "$as_me:10756: \"$ac_compile\"") >&5
10757   (eval $ac_compile) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit "$ac_status"); } &&
10761          { ac_try='test -s "conftest.$ac_objext"'
10762   { (eval echo "$as_me:10762: \"$ac_try\"") >&5
10763   (eval $ac_try) 2>&5
10764   ac_status=$?
10765   echo "$as_me:10765: \$? = $ac_status" >&5
10766   (exit "$ac_status"); }; }; then
10767   cf_cv_xopen_source=no
10768 else
10769   echo "$as_me: failed program was:" >&5
10770 cat "conftest.$ac_ext" >&5
10771 cf_save="$CPPFLAGS"
10772
10773         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10774         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10775
10776          cat >"conftest.$ac_ext" <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10779
10780 #include <stdlib.h>
10781 #include <string.h>
10782 #include <sys/types.h>
10783
10784 int
10785 main (void)
10786 {
10787
10788 #ifdef _XOPEN_SOURCE
10789 make an error
10790 #endif
10791   ;
10792   return 0;
10793 }
10794 _ACEOF
10795 rm -f "conftest.$ac_objext"
10796 if { (eval echo "$as_me:10796: \"$ac_compile\"") >&5
10797   (eval $ac_compile) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit "$ac_status"); } &&
10801          { ac_try='test -s "conftest.$ac_objext"'
10802   { (eval echo "$as_me:10802: \"$ac_try\"") >&5
10803   (eval $ac_try) 2>&5
10804   ac_status=$?
10805   echo "$as_me:10805: \$? = $ac_status" >&5
10806   (exit "$ac_status"); }; }; then
10807   cf_cv_xopen_source=no
10808 else
10809   echo "$as_me: failed program was:" >&5
10810 cat "conftest.$ac_ext" >&5
10811 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10812 fi
10813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10814         CPPFLAGS="$cf_save"
10815
10816 fi
10817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10818
10819 fi
10820 echo "$as_me:10820: result: $cf_cv_xopen_source" >&5
10821 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10822
10823 if test "$cf_cv_xopen_source" != no ; then
10824
10825 CFLAGS=`echo "$CFLAGS" | \
10826         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10827                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10828
10829 CPPFLAGS=`echo "$CPPFLAGS" | \
10830         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10831                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10832
10833         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10834
10835 for cf_add_cflags in $cf_temp_xopen_source
10836 do
10837         case "x$cf_add_cflags" in
10838         (x-[DU]*)
10839
10840 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10841 while true
10842 do
10843         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'`
10844         test "$CFLAGS" != "$cf_old_cflag" || break
10845
10846         CFLAGS="$cf_old_cflag"
10847 done
10848
10849 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10850 while true
10851 do
10852         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'`
10853         test "$CPPFLAGS" != "$cf_old_cflag" || break
10854
10855         CPPFLAGS="$cf_old_cflag"
10856 done
10857
10858                 ;;
10859         esac
10860
10861 cf_fix_cppflags=no
10862 cf_new_cflags=
10863 cf_new_cppflags=
10864 cf_new_extra_cppflags=
10865
10866 for cf_add_cflags in $cf_add_cflags
10867 do
10868 case "$cf_fix_cppflags" in
10869 (no)
10870         case "$cf_add_cflags" in
10871         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10872                 case "$cf_add_cflags" in
10873                 (-D*)
10874                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10875
10876                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10877                                 && test -z "${cf_tst_cflags}" \
10878                                 && cf_fix_cppflags=yes
10879
10880                         if test "$cf_fix_cppflags" = yes ; then
10881
10882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10884
10885                                 continue
10886                         elif test "${cf_tst_cflags}" = "\"'" ; then
10887
10888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10890
10891                                 continue
10892                         fi
10893                         ;;
10894                 esac
10895                 case "$CPPFLAGS" in
10896                 (*$cf_add_cflags)
10897                         ;;
10898                 (*)
10899                         case "$cf_add_cflags" in
10900                         (-D*)
10901                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10902
10903 CPPFLAGS=`echo "$CPPFLAGS" | \
10904         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10905                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10906
10907                                 ;;
10908                         esac
10909
10910         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10911         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10912
10913                         ;;
10914                 esac
10915                 ;;
10916         (*)
10917
10918         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10919         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10920
10921                 ;;
10922         esac
10923         ;;
10924 (yes)
10925
10926         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10927         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10928
10929         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10930
10931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10932                 && test -z "${cf_tst_cflags}" \
10933                 && cf_fix_cppflags=no
10934         ;;
10935 esac
10936 done
10937
10938 if test -n "$cf_new_cflags" ; then
10939
10940         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10941         CFLAGS="${CFLAGS}$cf_new_cflags"
10942
10943 fi
10944
10945 if test -n "$cf_new_cppflags" ; then
10946
10947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10948         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10949
10950 fi
10951
10952 if test -n "$cf_new_extra_cppflags" ; then
10953
10954         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10955         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10956
10957 fi
10958
10959 done
10960
10961 fi
10962
10963 if test "$cf_cv_posix_visible" = no; then
10964
10965 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10966
10967 cf_save_CFLAGS="$CFLAGS"
10968 cf_save_CPPFLAGS="$CPPFLAGS"
10969
10970 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10971         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10972                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10973
10974 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10975         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10976                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10977
10978 echo "$as_me:10978: checking if we should define _POSIX_C_SOURCE" >&5
10979 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10980 if test "${cf_cv_posix_c_source+set}" = set; then
10981   echo $ECHO_N "(cached) $ECHO_C" >&6
10982 else
10983
10984 echo "${as_me:-configure}:10984: testing if the symbol is already defined go no further ..." 1>&5
10985
10986         cat >"conftest.$ac_ext" <<_ACEOF
10987 #line 10987 "configure"
10988 #include "confdefs.h"
10989 #include <sys/types.h>
10990 int
10991 main (void)
10992 {
10993
10994 #ifndef _POSIX_C_SOURCE
10995 make an error
10996 #endif
10997   ;
10998   return 0;
10999 }
11000 _ACEOF
11001 rm -f "conftest.$ac_objext"
11002 if { (eval echo "$as_me:11002: \"$ac_compile\"") >&5
11003   (eval $ac_compile) 2>&5
11004   ac_status=$?
11005   echo "$as_me:11005: \$? = $ac_status" >&5
11006   (exit "$ac_status"); } &&
11007          { ac_try='test -s "conftest.$ac_objext"'
11008   { (eval echo "$as_me:11008: \"$ac_try\"") >&5
11009   (eval $ac_try) 2>&5
11010   ac_status=$?
11011   echo "$as_me:11011: \$? = $ac_status" >&5
11012   (exit "$ac_status"); }; }; then
11013   cf_cv_posix_c_source=no
11014 else
11015   echo "$as_me: failed program was:" >&5
11016 cat "conftest.$ac_ext" >&5
11017 cf_want_posix_source=no
11018          case .$cf_POSIX_C_SOURCE in
11019          (.[12]??*)
11020                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11021                 ;;
11022          (.2)
11023                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11024                 cf_want_posix_source=yes
11025                 ;;
11026          (.*)
11027                 cf_want_posix_source=yes
11028                 ;;
11029          esac
11030          if test "$cf_want_posix_source" = yes ; then
11031                 cat >"conftest.$ac_ext" <<_ACEOF
11032 #line 11032 "configure"
11033 #include "confdefs.h"
11034 #include <sys/types.h>
11035 int
11036 main (void)
11037 {
11038
11039 #ifdef _POSIX_SOURCE
11040 make an error
11041 #endif
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 rm -f "conftest.$ac_objext"
11047 if { (eval echo "$as_me:11047: \"$ac_compile\"") >&5
11048   (eval $ac_compile) 2>&5
11049   ac_status=$?
11050   echo "$as_me:11050: \$? = $ac_status" >&5
11051   (exit "$ac_status"); } &&
11052          { ac_try='test -s "conftest.$ac_objext"'
11053   { (eval echo "$as_me:11053: \"$ac_try\"") >&5
11054   (eval $ac_try) 2>&5
11055   ac_status=$?
11056   echo "$as_me:11056: \$? = $ac_status" >&5
11057   (exit "$ac_status"); }; }; then
11058   :
11059 else
11060   echo "$as_me: failed program was:" >&5
11061 cat "conftest.$ac_ext" >&5
11062 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11063 fi
11064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11065          fi
11066
11067 echo "${as_me:-configure}:11067: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11068
11069          CFLAGS="$cf_trim_CFLAGS"
11070          CPPFLAGS="$cf_trim_CPPFLAGS"
11071
11072         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11073         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11074
11075 echo "${as_me:-configure}:11075: testing if the second compile does not leave our definition intact error ..." 1>&5
11076
11077          cat >"conftest.$ac_ext" <<_ACEOF
11078 #line 11078 "configure"
11079 #include "confdefs.h"
11080 #include <sys/types.h>
11081 int
11082 main (void)
11083 {
11084
11085 #ifndef _POSIX_C_SOURCE
11086 make an error
11087 #endif
11088   ;
11089   return 0;
11090 }
11091 _ACEOF
11092 rm -f "conftest.$ac_objext"
11093 if { (eval echo "$as_me:11093: \"$ac_compile\"") >&5
11094   (eval $ac_compile) 2>&5
11095   ac_status=$?
11096   echo "$as_me:11096: \$? = $ac_status" >&5
11097   (exit "$ac_status"); } &&
11098          { ac_try='test -s "conftest.$ac_objext"'
11099   { (eval echo "$as_me:11099: \"$ac_try\"") >&5
11100   (eval $ac_try) 2>&5
11101   ac_status=$?
11102   echo "$as_me:11102: \$? = $ac_status" >&5
11103   (exit "$ac_status"); }; }; then
11104   :
11105 else
11106   echo "$as_me: failed program was:" >&5
11107 cat "conftest.$ac_ext" >&5
11108 cf_cv_posix_c_source=no
11109 fi
11110 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11111          CFLAGS="$cf_save_CFLAGS"
11112          CPPFLAGS="$cf_save_CPPFLAGS"
11113
11114 fi
11115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11116
11117 fi
11118 echo "$as_me:11118: result: $cf_cv_posix_c_source" >&5
11119 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11120
11121 if test "$cf_cv_posix_c_source" != no ; then
11122         CFLAGS="$cf_trim_CFLAGS"
11123         CPPFLAGS="$cf_trim_CPPFLAGS"
11124
11125 cf_fix_cppflags=no
11126 cf_new_cflags=
11127 cf_new_cppflags=
11128 cf_new_extra_cppflags=
11129
11130 for cf_add_cflags in $cf_cv_posix_c_source
11131 do
11132 case "$cf_fix_cppflags" in
11133 (no)
11134         case "$cf_add_cflags" in
11135         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11136                 case "$cf_add_cflags" in
11137                 (-D*)
11138                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11139
11140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11141                                 && test -z "${cf_tst_cflags}" \
11142                                 && cf_fix_cppflags=yes
11143
11144                         if test "$cf_fix_cppflags" = yes ; then
11145
11146         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11147         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11148
11149                                 continue
11150                         elif test "${cf_tst_cflags}" = "\"'" ; then
11151
11152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11154
11155                                 continue
11156                         fi
11157                         ;;
11158                 esac
11159                 case "$CPPFLAGS" in
11160                 (*$cf_add_cflags)
11161                         ;;
11162                 (*)
11163                         case "$cf_add_cflags" in
11164                         (-D*)
11165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11166
11167 CPPFLAGS=`echo "$CPPFLAGS" | \
11168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11170
11171                                 ;;
11172                         esac
11173
11174         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11175         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11176
11177                         ;;
11178                 esac
11179                 ;;
11180         (*)
11181
11182         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11183         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11184
11185                 ;;
11186         esac
11187         ;;
11188 (yes)
11189
11190         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11191         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11192
11193         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11194
11195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11196                 && test -z "${cf_tst_cflags}" \
11197                 && cf_fix_cppflags=no
11198         ;;
11199 esac
11200 done
11201
11202 if test -n "$cf_new_cflags" ; then
11203
11204         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11205         CFLAGS="${CFLAGS}$cf_new_cflags"
11206
11207 fi
11208
11209 if test -n "$cf_new_cppflags" ; then
11210
11211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11212         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11213
11214 fi
11215
11216 if test -n "$cf_new_extra_cppflags" ; then
11217
11218         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11219         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11220
11221 fi
11222
11223 fi
11224
11225 fi # cf_cv_posix_visible
11226
11227         ;;
11228 esac
11229
11230 if test -n "$cf_xopen_source" ; then
11231
11232 for cf_add_cflags in $cf_xopen_source
11233 do
11234         case "x$cf_add_cflags" in
11235         (x-[DU]*)
11236
11237 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11238 while true
11239 do
11240         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'`
11241         test "$CFLAGS" != "$cf_old_cflag" || break
11242         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11243
11244 echo "${as_me:-configure}:11244: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11245
11246         CFLAGS="$cf_old_cflag"
11247 done
11248
11249 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11250 while true
11251 do
11252         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'`
11253         test "$CPPFLAGS" != "$cf_old_cflag" || break
11254         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11255
11256 echo "${as_me:-configure}:11256: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11257
11258         CPPFLAGS="$cf_old_cflag"
11259 done
11260
11261                 ;;
11262         esac
11263
11264 cf_fix_cppflags=no
11265 cf_new_cflags=
11266 cf_new_cppflags=
11267 cf_new_extra_cppflags=
11268
11269 for cf_add_cflags in $cf_add_cflags
11270 do
11271 case "$cf_fix_cppflags" in
11272 (no)
11273         case "$cf_add_cflags" in
11274         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11275                 case "$cf_add_cflags" in
11276                 (-D*)
11277                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11278
11279                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11280                                 && test -z "${cf_tst_cflags}" \
11281                                 && cf_fix_cppflags=yes
11282
11283                         if test "$cf_fix_cppflags" = yes ; then
11284
11285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11287
11288                                 continue
11289                         elif test "${cf_tst_cflags}" = "\"'" ; then
11290
11291         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11292         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11293
11294                                 continue
11295                         fi
11296                         ;;
11297                 esac
11298                 case "$CPPFLAGS" in
11299                 (*$cf_add_cflags)
11300                         ;;
11301                 (*)
11302                         case "$cf_add_cflags" in
11303                         (-D*)
11304                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11305
11306 CPPFLAGS=`echo "$CPPFLAGS" | \
11307         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11308                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11309
11310                                 ;;
11311                         esac
11312
11313         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11314         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11315
11316                         ;;
11317                 esac
11318                 ;;
11319         (*)
11320
11321         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11322         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11323
11324                 ;;
11325         esac
11326         ;;
11327 (yes)
11328
11329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11331
11332         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11333
11334         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11335                 && test -z "${cf_tst_cflags}" \
11336                 && cf_fix_cppflags=no
11337         ;;
11338 esac
11339 done
11340
11341 if test -n "$cf_new_cflags" ; then
11342         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11343
11344 echo "${as_me:-configure}:11344: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11345
11346         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11347         CFLAGS="${CFLAGS}$cf_new_cflags"
11348
11349 fi
11350
11351 if test -n "$cf_new_cppflags" ; then
11352         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11353
11354 echo "${as_me:-configure}:11354: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11355
11356         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11357         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11358
11359 fi
11360
11361 if test -n "$cf_new_extra_cppflags" ; then
11362         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11363
11364 echo "${as_me:-configure}:11364: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11365
11366         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11367         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11368
11369 fi
11370
11371 done
11372
11373 fi
11374
11375 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11376         echo "$as_me:11376: checking if _XOPEN_SOURCE really is set" >&5
11377 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11378         cat >"conftest.$ac_ext" <<_ACEOF
11379 #line 11379 "configure"
11380 #include "confdefs.h"
11381 #include <stdlib.h>
11382 int
11383 main (void)
11384 {
11385
11386 #ifndef _XOPEN_SOURCE
11387 make an error
11388 #endif
11389   ;
11390   return 0;
11391 }
11392 _ACEOF
11393 rm -f "conftest.$ac_objext"
11394 if { (eval echo "$as_me:11394: \"$ac_compile\"") >&5
11395   (eval $ac_compile) 2>&5
11396   ac_status=$?
11397   echo "$as_me:11397: \$? = $ac_status" >&5
11398   (exit "$ac_status"); } &&
11399          { ac_try='test -s "conftest.$ac_objext"'
11400   { (eval echo "$as_me:11400: \"$ac_try\"") >&5
11401   (eval $ac_try) 2>&5
11402   ac_status=$?
11403   echo "$as_me:11403: \$? = $ac_status" >&5
11404   (exit "$ac_status"); }; }; then
11405   cf_XOPEN_SOURCE_set=yes
11406 else
11407   echo "$as_me: failed program was:" >&5
11408 cat "conftest.$ac_ext" >&5
11409 cf_XOPEN_SOURCE_set=no
11410 fi
11411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11412         echo "$as_me:11412: result: $cf_XOPEN_SOURCE_set" >&5
11413 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11414         if test "$cf_XOPEN_SOURCE_set" = yes
11415         then
11416                 cat >"conftest.$ac_ext" <<_ACEOF
11417 #line 11417 "configure"
11418 #include "confdefs.h"
11419 #include <stdlib.h>
11420 int
11421 main (void)
11422 {
11423
11424 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11425 make an error
11426 #endif
11427   ;
11428   return 0;
11429 }
11430 _ACEOF
11431 rm -f "conftest.$ac_objext"
11432 if { (eval echo "$as_me:11432: \"$ac_compile\"") >&5
11433   (eval $ac_compile) 2>&5
11434   ac_status=$?
11435   echo "$as_me:11435: \$? = $ac_status" >&5
11436   (exit "$ac_status"); } &&
11437          { ac_try='test -s "conftest.$ac_objext"'
11438   { (eval echo "$as_me:11438: \"$ac_try\"") >&5
11439   (eval $ac_try) 2>&5
11440   ac_status=$?
11441   echo "$as_me:11441: \$? = $ac_status" >&5
11442   (exit "$ac_status"); }; }; then
11443   cf_XOPEN_SOURCE_set_ok=yes
11444 else
11445   echo "$as_me: failed program was:" >&5
11446 cat "conftest.$ac_ext" >&5
11447 cf_XOPEN_SOURCE_set_ok=no
11448 fi
11449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11450                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11451                 then
11452                         { echo "$as_me:11452: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11453 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11454                 fi
11455         else
11456
11457 echo "$as_me:11457: checking if we should define _XOPEN_SOURCE" >&5
11458 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11459 if test "${cf_cv_xopen_source+set}" = set; then
11460   echo $ECHO_N "(cached) $ECHO_C" >&6
11461 else
11462
11463         cat >"conftest.$ac_ext" <<_ACEOF
11464 #line 11464 "configure"
11465 #include "confdefs.h"
11466
11467 #include <stdlib.h>
11468 #include <string.h>
11469 #include <sys/types.h>
11470
11471 int
11472 main (void)
11473 {
11474
11475 #ifndef _XOPEN_SOURCE
11476 make an error
11477 #endif
11478   ;
11479   return 0;
11480 }
11481 _ACEOF
11482 rm -f "conftest.$ac_objext"
11483 if { (eval echo "$as_me:11483: \"$ac_compile\"") >&5
11484   (eval $ac_compile) 2>&5
11485   ac_status=$?
11486   echo "$as_me:11486: \$? = $ac_status" >&5
11487   (exit "$ac_status"); } &&
11488          { ac_try='test -s "conftest.$ac_objext"'
11489   { (eval echo "$as_me:11489: \"$ac_try\"") >&5
11490   (eval $ac_try) 2>&5
11491   ac_status=$?
11492   echo "$as_me:11492: \$? = $ac_status" >&5
11493   (exit "$ac_status"); }; }; then
11494   cf_cv_xopen_source=no
11495 else
11496   echo "$as_me: failed program was:" >&5
11497 cat "conftest.$ac_ext" >&5
11498 cf_save="$CPPFLAGS"
11499
11500         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11501         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11502
11503          cat >"conftest.$ac_ext" <<_ACEOF
11504 #line 11504 "configure"
11505 #include "confdefs.h"
11506
11507 #include <stdlib.h>
11508 #include <string.h>
11509 #include <sys/types.h>
11510
11511 int
11512 main (void)
11513 {
11514
11515 #ifdef _XOPEN_SOURCE
11516 make an error
11517 #endif
11518   ;
11519   return 0;
11520 }
11521 _ACEOF
11522 rm -f "conftest.$ac_objext"
11523 if { (eval echo "$as_me:11523: \"$ac_compile\"") >&5
11524   (eval $ac_compile) 2>&5
11525   ac_status=$?
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit "$ac_status"); } &&
11528          { ac_try='test -s "conftest.$ac_objext"'
11529   { (eval echo "$as_me:11529: \"$ac_try\"") >&5
11530   (eval $ac_try) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit "$ac_status"); }; }; then
11534   cf_cv_xopen_source=no
11535 else
11536   echo "$as_me: failed program was:" >&5
11537 cat "conftest.$ac_ext" >&5
11538 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11539 fi
11540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11541         CPPFLAGS="$cf_save"
11542
11543 fi
11544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11545
11546 fi
11547 echo "$as_me:11547: result: $cf_cv_xopen_source" >&5
11548 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11549
11550 if test "$cf_cv_xopen_source" != no ; then
11551
11552 CFLAGS=`echo "$CFLAGS" | \
11553         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11554                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11555
11556 CPPFLAGS=`echo "$CPPFLAGS" | \
11557         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11558                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11559
11560         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11561
11562 for cf_add_cflags in $cf_temp_xopen_source
11563 do
11564         case "x$cf_add_cflags" in
11565         (x-[DU]*)
11566
11567 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11568 while true
11569 do
11570         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'`
11571         test "$CFLAGS" != "$cf_old_cflag" || break
11572
11573         CFLAGS="$cf_old_cflag"
11574 done
11575
11576 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11577 while true
11578 do
11579         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'`
11580         test "$CPPFLAGS" != "$cf_old_cflag" || break
11581
11582         CPPFLAGS="$cf_old_cflag"
11583 done
11584
11585                 ;;
11586         esac
11587
11588 cf_fix_cppflags=no
11589 cf_new_cflags=
11590 cf_new_cppflags=
11591 cf_new_extra_cppflags=
11592
11593 for cf_add_cflags in $cf_add_cflags
11594 do
11595 case "$cf_fix_cppflags" in
11596 (no)
11597         case "$cf_add_cflags" in
11598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11599                 case "$cf_add_cflags" in
11600                 (-D*)
11601                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11602
11603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11604                                 && test -z "${cf_tst_cflags}" \
11605                                 && cf_fix_cppflags=yes
11606
11607                         if test "$cf_fix_cppflags" = yes ; then
11608
11609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11611
11612                                 continue
11613                         elif test "${cf_tst_cflags}" = "\"'" ; then
11614
11615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11617
11618                                 continue
11619                         fi
11620                         ;;
11621                 esac
11622                 case "$CPPFLAGS" in
11623                 (*$cf_add_cflags)
11624                         ;;
11625                 (*)
11626                         case "$cf_add_cflags" in
11627                         (-D*)
11628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11629
11630 CPPFLAGS=`echo "$CPPFLAGS" | \
11631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11633
11634                                 ;;
11635                         esac
11636
11637         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11638         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11639
11640                         ;;
11641                 esac
11642                 ;;
11643         (*)
11644
11645         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11646         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11647
11648                 ;;
11649         esac
11650         ;;
11651 (yes)
11652
11653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11655
11656         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11657
11658         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11659                 && test -z "${cf_tst_cflags}" \
11660                 && cf_fix_cppflags=no
11661         ;;
11662 esac
11663 done
11664
11665 if test -n "$cf_new_cflags" ; then
11666
11667         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11668         CFLAGS="${CFLAGS}$cf_new_cflags"
11669
11670 fi
11671
11672 if test -n "$cf_new_cppflags" ; then
11673
11674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11675         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11676
11677 fi
11678
11679 if test -n "$cf_new_extra_cppflags" ; then
11680
11681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11683
11684 fi
11685
11686 done
11687
11688 fi
11689
11690         fi
11691 fi
11692 fi # cf_cv_posix_visible
11693
11694 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11695
11696 # Work around breakage on OS X
11697
11698 echo "$as_me:11698: checking if SIGWINCH is defined" >&5
11699 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11700 if test "${cf_cv_define_sigwinch+set}" = set; then
11701   echo $ECHO_N "(cached) $ECHO_C" >&6
11702 else
11703
11704         cat >"conftest.$ac_ext" <<_ACEOF
11705 #line 11705 "configure"
11706 #include "confdefs.h"
11707
11708 #include <sys/types.h>
11709 #include <sys/signal.h>
11710
11711 int
11712 main (void)
11713 {
11714 int x = SIGWINCH; (void)x
11715   ;
11716   return 0;
11717 }
11718 _ACEOF
11719 rm -f "conftest.$ac_objext"
11720 if { (eval echo "$as_me:11720: \"$ac_compile\"") >&5
11721   (eval $ac_compile) 2>&5
11722   ac_status=$?
11723   echo "$as_me:11723: \$? = $ac_status" >&5
11724   (exit "$ac_status"); } &&
11725          { ac_try='test -s "conftest.$ac_objext"'
11726   { (eval echo "$as_me:11726: \"$ac_try\"") >&5
11727   (eval $ac_try) 2>&5
11728   ac_status=$?
11729   echo "$as_me:11729: \$? = $ac_status" >&5
11730   (exit "$ac_status"); }; }; then
11731   cf_cv_define_sigwinch=yes
11732 else
11733   echo "$as_me: failed program was:" >&5
11734 cat "conftest.$ac_ext" >&5
11735 cat >"conftest.$ac_ext" <<_ACEOF
11736 #line 11736 "configure"
11737 #include "confdefs.h"
11738
11739 #undef _XOPEN_SOURCE
11740 #undef _POSIX_SOURCE
11741 #undef _POSIX_C_SOURCE
11742 #include <sys/types.h>
11743 #include <sys/signal.h>
11744
11745 int
11746 main (void)
11747 {
11748 int x = SIGWINCH; (void)x
11749   ;
11750   return 0;
11751 }
11752 _ACEOF
11753 rm -f "conftest.$ac_objext"
11754 if { (eval echo "$as_me:11754: \"$ac_compile\"") >&5
11755   (eval $ac_compile) 2>&5
11756   ac_status=$?
11757   echo "$as_me:11757: \$? = $ac_status" >&5
11758   (exit "$ac_status"); } &&
11759          { ac_try='test -s "conftest.$ac_objext"'
11760   { (eval echo "$as_me:11760: \"$ac_try\"") >&5
11761   (eval $ac_try) 2>&5
11762   ac_status=$?
11763   echo "$as_me:11763: \$? = $ac_status" >&5
11764   (exit "$ac_status"); }; }; then
11765   cf_cv_define_sigwinch=maybe
11766 else
11767   echo "$as_me: failed program was:" >&5
11768 cat "conftest.$ac_ext" >&5
11769 cf_cv_define_sigwinch=no
11770 fi
11771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11772
11773 fi
11774 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11775
11776 fi
11777 echo "$as_me:11777: result: $cf_cv_define_sigwinch" >&5
11778 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11779
11780 if test "$cf_cv_define_sigwinch" = maybe ; then
11781 echo "$as_me:11781: checking for actual SIGWINCH definition" >&5
11782 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11783 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11784   echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786
11787 cf_cv_fixup_sigwinch=unknown
11788 cf_sigwinch=32
11789 while test "$cf_sigwinch" != 1
11790 do
11791         cat >"conftest.$ac_ext" <<_ACEOF
11792 #line 11792 "configure"
11793 #include "confdefs.h"
11794
11795 #undef _XOPEN_SOURCE
11796 #undef _POSIX_SOURCE
11797 #undef _POSIX_C_SOURCE
11798 #include <sys/types.h>
11799 #include <sys/signal.h>
11800
11801 int
11802 main (void)
11803 {
11804
11805 #if SIGWINCH != $cf_sigwinch
11806 make an error
11807 #endif
11808 int x = SIGWINCH; (void)x
11809   ;
11810   return 0;
11811 }
11812 _ACEOF
11813 rm -f "conftest.$ac_objext"
11814 if { (eval echo "$as_me:11814: \"$ac_compile\"") >&5
11815   (eval $ac_compile) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit "$ac_status"); } &&
11819          { ac_try='test -s "conftest.$ac_objext"'
11820   { (eval echo "$as_me:11820: \"$ac_try\"") >&5
11821   (eval $ac_try) 2>&5
11822   ac_status=$?
11823   echo "$as_me:11823: \$? = $ac_status" >&5
11824   (exit "$ac_status"); }; }; then
11825   cf_cv_fixup_sigwinch=$cf_sigwinch
11826          break
11827 else
11828   echo "$as_me: failed program was:" >&5
11829 cat "conftest.$ac_ext" >&5
11830 fi
11831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11832
11833 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11834 done
11835
11836 fi
11837 echo "$as_me:11837: result: $cf_cv_fixup_sigwinch" >&5
11838 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11839
11840         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11841                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11842         fi
11843 fi
11844
11845 # Checks for CODESET support.
11846
11847 echo "$as_me:11847: checking for nl_langinfo and CODESET" >&5
11848 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11849 if test "${am_cv_langinfo_codeset+set}" = set; then
11850   echo $ECHO_N "(cached) $ECHO_C" >&6
11851 else
11852   cat >"conftest.$ac_ext" <<_ACEOF
11853 #line 11853 "configure"
11854 #include "confdefs.h"
11855 #include <langinfo.h>
11856 int
11857 main (void)
11858 {
11859 char* cs = nl_langinfo(CODESET); (void)cs
11860   ;
11861   return 0;
11862 }
11863 _ACEOF
11864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11865 if { (eval echo "$as_me:11865: \"$ac_link\"") >&5
11866   (eval $ac_link) 2>&5
11867   ac_status=$?
11868   echo "$as_me:11868: \$? = $ac_status" >&5
11869   (exit "$ac_status"); } &&
11870          { ac_try='test -s "conftest$ac_exeext"'
11871   { (eval echo "$as_me:11871: \"$ac_try\"") >&5
11872   (eval $ac_try) 2>&5
11873   ac_status=$?
11874   echo "$as_me:11874: \$? = $ac_status" >&5
11875   (exit "$ac_status"); }; }; then
11876   am_cv_langinfo_codeset=yes
11877 else
11878   echo "$as_me: failed program was:" >&5
11879 cat "conftest.$ac_ext" >&5
11880 am_cv_langinfo_codeset=no
11881 fi
11882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11883
11884 fi
11885 echo "$as_me:11885: result: $am_cv_langinfo_codeset" >&5
11886 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11887         if test "$am_cv_langinfo_codeset" = yes; then
11888
11889 cat >>confdefs.h <<\EOF
11890 #define HAVE_LANGINFO_CODESET 1
11891 EOF
11892
11893         fi
11894
11895 # use these variables to work around a defect in gcc's fixincludes.
11896 NCURSES_OK_WCHAR_T=
11897 NCURSES_OK_WINT_T=
11898
11899 echo "$as_me:11899: checking if you want wide-character code" >&5
11900 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11901
11902 # Check whether --enable-widec or --disable-widec was given.
11903 if test "${enable_widec+set}" = set; then
11904   enableval="$enable_widec"
11905   with_widec=$enableval
11906 else
11907   with_widec=no
11908 fi;
11909 echo "$as_me:11909: result: $with_widec" >&5
11910 echo "${ECHO_T}$with_widec" >&6
11911
11912 NCURSES_WCWIDTH_GRAPHICS=1
11913
11914 if test "x$with_widec" = xyes ; then
11915         if test "x$disable_lib_suffixes" = xno ; then
11916                 LIB_SUFFIX="w${LIB_SUFFIX}"
11917         fi
11918
11919 cat >>confdefs.h <<\EOF
11920 #define USE_WIDEC_SUPPORT 1
11921 EOF
11922
11923 cat >>confdefs.h <<\EOF
11924 #define NCURSES_WIDECHAR 1
11925 EOF
11926
11927 for ac_header in \
11928 wchar.h \
11929 wctype.h \
11930
11931 do
11932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11933 echo "$as_me:11933: checking for $ac_header" >&5
11934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11936   echo $ECHO_N "(cached) $ECHO_C" >&6
11937 else
11938   cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <$ac_header>
11942 _ACEOF
11943 if { (eval echo "$as_me:11943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11945   ac_status=$?
11946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11947   rm -f conftest.er1
11948   cat conftest.err >&5
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit "$ac_status"); } >/dev/null; then
11951   if test -s conftest.err; then
11952     ac_cpp_err=$ac_c_preproc_warn_flag
11953   else
11954     ac_cpp_err=
11955   fi
11956 else
11957   ac_cpp_err=yes
11958 fi
11959 if test -z "$ac_cpp_err"; then
11960   eval "$as_ac_Header=yes"
11961 else
11962   echo "$as_me: failed program was:" >&5
11963   cat "conftest.$ac_ext" >&5
11964   eval "$as_ac_Header=no"
11965 fi
11966 rm -f conftest.err "conftest.$ac_ext"
11967 fi
11968 echo "$as_me:11968: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11969 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11970 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11971   cat >>confdefs.h <<EOF
11972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11973 EOF
11974
11975 fi
11976 done
11977
11978 echo "$as_me:11978: checking if wchar.h can be used as is" >&5
11979 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11980 if test "${cf_cv_wchar_h_okay+set}" = set; then
11981   echo $ECHO_N "(cached) $ECHO_C" >&6
11982 else
11983
11984 cat >"conftest.$ac_ext" <<_ACEOF
11985 #line 11985 "configure"
11986 #include "confdefs.h"
11987
11988 #include <stdlib.h>
11989 #ifdef HAVE_WCHAR_H
11990 #include <wchar.h>
11991 #endif
11992 #ifdef HAVE_WCTYPE_H
11993 #include <wctype.h>
11994 #endif
11995
11996 int
11997 main (void)
11998 {
11999
12000         wint_t foo = 0;
12001         int bar = iswpunct(foo)
12002   ;
12003   return 0;
12004 }
12005 _ACEOF
12006 rm -f "conftest.$ac_objext"
12007 if { (eval echo "$as_me:12007: \"$ac_compile\"") >&5
12008   (eval $ac_compile) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit "$ac_status"); } &&
12012          { ac_try='test -s "conftest.$ac_objext"'
12013   { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014   (eval $ac_try) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit "$ac_status"); }; }; then
12018   cf_cv_wchar_h_okay=yes
12019 else
12020   echo "$as_me: failed program was:" >&5
12021 cat "conftest.$ac_ext" >&5
12022 cf_cv_wchar_h_okay=no
12023 fi
12024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12025 fi
12026 echo "$as_me:12026: result: $cf_cv_wchar_h_okay" >&5
12027 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12028
12029 if test "$cf_cv_wchar_h_okay" = no
12030 then
12031
12032 echo "$as_me:12032: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12033 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12034 cat >"conftest.$ac_ext" <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12037 #include <sys/types.h>
12038
12039 int
12040 main (void)
12041 {
12042
12043 #ifndef _XOPEN_SOURCE_EXTENDED
12044 make an error
12045 #endif
12046   ;
12047   return 0;
12048 }
12049 _ACEOF
12050 rm -f "conftest.$ac_objext"
12051 if { (eval echo "$as_me:12051: \"$ac_compile\"") >&5
12052   (eval $ac_compile) 2>&5
12053   ac_status=$?
12054   echo "$as_me:12054: \$? = $ac_status" >&5
12055   (exit "$ac_status"); } &&
12056          { ac_try='test -s "conftest.$ac_objext"'
12057   { (eval echo "$as_me:12057: \"$ac_try\"") >&5
12058   (eval $ac_try) 2>&5
12059   ac_status=$?
12060   echo "$as_me:12060: \$? = $ac_status" >&5
12061   (exit "$ac_status"); }; }; then
12062   cf_result=no
12063 else
12064   echo "$as_me: failed program was:" >&5
12065 cat "conftest.$ac_ext" >&5
12066 cf_result=yes
12067 fi
12068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12069 echo "$as_me:12069: result: $cf_result" >&5
12070 echo "${ECHO_T}$cf_result" >&6
12071
12072 if test "$cf_result" = yes ; then
12073         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12074 elif test "x" != "x" ; then
12075         echo "$as_me:12075: checking checking for compatible value versus " >&5
12076 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12077         cat >"conftest.$ac_ext" <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 #include <sys/types.h>
12081
12082 int
12083 main (void)
12084 {
12085
12086 #if _XOPEN_SOURCE_EXTENDED- < 0
12087 make an error
12088 #endif
12089   ;
12090   return 0;
12091 }
12092 _ACEOF
12093 rm -f "conftest.$ac_objext"
12094 if { (eval echo "$as_me:12094: \"$ac_compile\"") >&5
12095   (eval $ac_compile) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit "$ac_status"); } &&
12099          { ac_try='test -s "conftest.$ac_objext"'
12100   { (eval echo "$as_me:12100: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit "$ac_status"); }; }; then
12105   cf_result=yes
12106 else
12107   echo "$as_me: failed program was:" >&5
12108 cat "conftest.$ac_ext" >&5
12109 cf_result=no
12110 fi
12111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12112         echo "$as_me:12112: result: $cf_result" >&5
12113 echo "${ECHO_T}$cf_result" >&6
12114         if test "$cf_result" = no ; then
12115                 # perhaps we can override it - try...
12116                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12117         fi
12118 fi
12119
12120 fi
12121
12122 echo "$as_me:12122: checking if wcwidth agrees graphics are single-width" >&5
12123 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12124 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12125   echo $ECHO_N "(cached) $ECHO_C" >&6
12126 else
12127
12128 cat >conftest.in <<CF_EOF
12129 -       VT100 symbols
12130 0x250c  upper left corner
12131 0x2514  lower left corner
12132 0x2510  upper right corner
12133 0x2518  lower right corner
12134 0x251c  tee pointing left
12135 0x2524  tee pointing right
12136 0x2534  tee pointing up
12137 0x252c  tee pointing down
12138 0x2500  horizontal line
12139 0x2502  vertical line
12140 0x253c  large plus or crossover
12141 0x23ba  scan line 1
12142 0x23bd  scan line 9
12143 0x25c6  diamond
12144 0x2592  checker board (stipple)
12145 0x00b0  degree symbol
12146 0x00b1  plus/minus
12147 0x00b7  bullet
12148 -       Teletype 5410v1 symbols
12149 0x2190  arrow pointing left
12150 0x2192  arrow pointing right
12151 0x2193  arrow pointing down
12152 0x2191  arrow pointing up
12153 0x2592  board of squares
12154 0x2603  lantern symbol
12155 0x25ae  solid square block
12156 -       these defaults were invented for ncurses
12157 0x23bb  scan line 3
12158 0x23bc  scan line 7
12159 0x2264  less-than-or-equal-to
12160 0x2265  greater-than-or-equal-to
12161 0x03c0  greek pi
12162 0x2260  not-equal
12163 0x00a3  pound-sterling symbol
12164 -       thick-line-drawing
12165 0x250f  upper left corner
12166 0x2517  lower left corner
12167 0x2513  upper right corner
12168 0x251b  lower right corner
12169 0x2523  tee pointing left
12170 0x252b  tee pointing right
12171 0x253b  tee pointing up
12172 0x2533  tee pointing down
12173 0x2501  horizontal line
12174 0x2503  vertical line
12175 0x254b  large plus or crossover
12176 -       double-line-drawing
12177 0x2554  upper left corner
12178 0x255a  lower left corner
12179 0x2557  upper right corner
12180 0x255d  lower right corner
12181 0x2563  tee pointing left
12182 0x2560  tee pointing right
12183 0x2569  tee pointing up
12184 0x2566  tee pointing down
12185 0x2550  horizontal line
12186 0x2551  vertical line
12187 0x256c  large plus or crossover
12188 CF_EOF
12189 if test "$cross_compiling" = yes; then
12190   cf_cv_wcwidth_graphics=unknown
12191 else
12192   cat >"conftest.$ac_ext" <<_ACEOF
12193 #line 12193 "configure"
12194 #include "confdefs.h"
12195
12196 #include <locale.h>
12197 #include <stdio.h>
12198 #include <wchar.h>
12199
12200 #define MY_LEN 80
12201
12202 int
12203 main(void)
12204 {
12205         FILE *fp;
12206         int value;
12207         char buffer[MY_LEN + 1];
12208         char notes[MY_LEN + 1];
12209         int totals = 0;
12210         int passed = 0;
12211
12212         if (setlocale(LC_ALL, "en_US.UTF8") ||
12213                 setlocale(LC_ALL, "en_US.UTF-8") ||
12214                 setlocale(LC_ALL, "en_US.utf8") ||
12215                 setlocale(LC_ALL, "en_US.utf-8")) {
12216                 if ((fp = fopen("conftest.in", "r")) != 0) {
12217                         while (fgets(buffer, MY_LEN, fp) != 0) {
12218                                 if (*buffer == '-') {
12219                                         fprintf(stderr, "\\t%s", buffer);
12220                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12221                                         ++totals;
12222                                         if (wcwidth(value) == 1)
12223                                                 ++passed;
12224                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12225                                 } else {
12226                                         fprintf(stderr, "?\\t%s", buffer);
12227                                 }
12228                         }
12229                 }
12230         }
12231         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12232         return (totals == passed) ? 0 : 1;
12233 }
12234
12235 _ACEOF
12236 rm -f "conftest$ac_exeext"
12237 if { (eval echo "$as_me:12237: \"$ac_link\"") >&5
12238   (eval $ac_link) 2>&5
12239   ac_status=$?
12240   echo "$as_me:12240: \$? = $ac_status" >&5
12241   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12242   { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit "$ac_status"); }; }; then
12247   cf_cv_wcwidth_graphics=yes
12248 else
12249   echo "$as_me: program exited with status $ac_status" >&5
12250 echo "$as_me: failed program was:" >&5
12251 cat "conftest.$ac_ext" >&5
12252 cf_cv_wcwidth_graphics=no
12253 fi
12254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12255 fi
12256
12257 fi
12258 echo "$as_me:12258: result: $cf_cv_wcwidth_graphics" >&5
12259 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12260
12261         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12262
12263         # with_overwrite=no
12264         NCURSES_CH_T=cchar_t
12265
12266 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12267 do
12268 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12269 echo "$as_me:12269: checking for $ac_func" >&5
12270 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12271 if eval "test \"\${$as_ac_var+set}\" = set"; then
12272   echo $ECHO_N "(cached) $ECHO_C" >&6
12273 else
12274   cat >"conftest.$ac_ext" <<_ACEOF
12275 #line 12275 "configure"
12276 #include "confdefs.h"
12277 #define $ac_func autoconf_temporary
12278 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12279 #undef $ac_func
12280
12281 #ifdef __cplusplus
12282 extern "C"
12283 #endif
12284
12285 /* We use char because int might match the return type of a gcc2
12286    builtin and then its argument prototype would still apply.  */
12287 char $ac_func (void);
12288
12289 int
12290 main (void)
12291 {
12292
12293 /* The GNU C library defines stubs for functions which it implements
12294     to always fail with ENOSYS.  Some functions are actually named
12295     something starting with __ and the normal name is an alias.  */
12296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12297 #error found stub for $ac_func
12298 #endif
12299
12300         return $ac_func ();
12301   ;
12302   return 0;
12303 }
12304 _ACEOF
12305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12306 if { (eval echo "$as_me:12306: \"$ac_link\"") >&5
12307   (eval $ac_link) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit "$ac_status"); } &&
12311          { ac_try='test -s "conftest$ac_exeext"'
12312   { (eval echo "$as_me:12312: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit "$ac_status"); }; }; then
12317   eval "$as_ac_var=yes"
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 cat "conftest.$ac_ext" >&5
12321 eval "$as_ac_var=no"
12322 fi
12323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12324 fi
12325 echo "$as_me:12325: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12326 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12327 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12328   cat >>confdefs.h <<EOF
12329 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12330 EOF
12331
12332 fi
12333 done
12334
12335         if test "x$ac_cv_func_putwc" != xyes ; then
12336
12337 for ac_header in wchar.h
12338 do
12339 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12340 echo "$as_me:12340: checking for $ac_header" >&5
12341 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12342 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12343   echo $ECHO_N "(cached) $ECHO_C" >&6
12344 else
12345   cat >"conftest.$ac_ext" <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348 #include <$ac_header>
12349 _ACEOF
12350 if { (eval echo "$as_me:12350: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12351   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12352   ac_status=$?
12353   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12354   rm -f conftest.er1
12355   cat conftest.err >&5
12356   echo "$as_me:12356: \$? = $ac_status" >&5
12357   (exit "$ac_status"); } >/dev/null; then
12358   if test -s conftest.err; then
12359     ac_cpp_err=$ac_c_preproc_warn_flag
12360   else
12361     ac_cpp_err=
12362   fi
12363 else
12364   ac_cpp_err=yes
12365 fi
12366 if test -z "$ac_cpp_err"; then
12367   eval "$as_ac_Header=yes"
12368 else
12369   echo "$as_me: failed program was:" >&5
12370   cat "conftest.$ac_ext" >&5
12371   eval "$as_ac_Header=no"
12372 fi
12373 rm -f conftest.err "conftest.$ac_ext"
12374 fi
12375 echo "$as_me:12375: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12376 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12377 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12378   cat >>confdefs.h <<EOF
12379 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12380 EOF
12381
12382 fi
12383 done
12384
12385 echo "$as_me:12385: checking for multibyte character support" >&5
12386 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12387 if test "${cf_cv_utf8_lib+set}" = set; then
12388   echo $ECHO_N "(cached) $ECHO_C" >&6
12389 else
12390
12391         cf_save_LIBS="$LIBS"
12392         cat >"conftest.$ac_ext" <<_ACEOF
12393 #line 12393 "configure"
12394 #include "confdefs.h"
12395
12396 #include <stdlib.h>
12397 #include <stdio.h>
12398 #ifdef HAVE_WCHAR_H
12399 #include <wchar.h>
12400 #endif
12401
12402 int
12403 main (void)
12404 {
12405 putwc(0,0);
12406   ;
12407   return 0;
12408 }
12409 _ACEOF
12410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12411 if { (eval echo "$as_me:12411: \"$ac_link\"") >&5
12412   (eval $ac_link) 2>&5
12413   ac_status=$?
12414   echo "$as_me:12414: \$? = $ac_status" >&5
12415   (exit "$ac_status"); } &&
12416          { ac_try='test -s "conftest$ac_exeext"'
12417   { (eval echo "$as_me:12417: \"$ac_try\"") >&5
12418   (eval $ac_try) 2>&5
12419   ac_status=$?
12420   echo "$as_me:12420: \$? = $ac_status" >&5
12421   (exit "$ac_status"); }; }; then
12422   cf_cv_utf8_lib=yes
12423 else
12424   echo "$as_me: failed program was:" >&5
12425 cat "conftest.$ac_ext" >&5
12426
12427 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12428 # will be set on completion of the AC_TRY_LINK below.
12429 cf_cv_header_path_utf8=
12430 cf_cv_library_path_utf8=
12431
12432 echo "${as_me:-configure}:12432: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12433
12434 cf_save_LIBS="$LIBS"
12435
12436 cat >"conftest.$ac_ext" <<_ACEOF
12437 #line 12437 "configure"
12438 #include "confdefs.h"
12439
12440 #include <libutf8.h>
12441 int
12442 main (void)
12443 {
12444 putwc(0,0);
12445   ;
12446   return 0;
12447 }
12448 _ACEOF
12449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12450 if { (eval echo "$as_me:12450: \"$ac_link\"") >&5
12451   (eval $ac_link) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit "$ac_status"); } &&
12455          { ac_try='test -s "conftest$ac_exeext"'
12456   { (eval echo "$as_me:12456: \"$ac_try\"") >&5
12457   (eval $ac_try) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit "$ac_status"); }; }; then
12461
12462         cf_cv_find_linkage_utf8=yes
12463         cf_cv_header_path_utf8=/usr/include
12464         cf_cv_library_path_utf8=/usr/lib
12465
12466 else
12467   echo "$as_me: failed program was:" >&5
12468 cat "conftest.$ac_ext" >&5
12469
12470 LIBS="-lutf8  $cf_save_LIBS"
12471
12472 cat >"conftest.$ac_ext" <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 #include <libutf8.h>
12477 int
12478 main (void)
12479 {
12480 putwc(0,0);
12481   ;
12482   return 0;
12483 }
12484 _ACEOF
12485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12486 if { (eval echo "$as_me:12486: \"$ac_link\"") >&5
12487   (eval $ac_link) 2>&5
12488   ac_status=$?
12489   echo "$as_me:12489: \$? = $ac_status" >&5
12490   (exit "$ac_status"); } &&
12491          { ac_try='test -s "conftest$ac_exeext"'
12492   { (eval echo "$as_me:12492: \"$ac_try\"") >&5
12493   (eval $ac_try) 2>&5
12494   ac_status=$?
12495   echo "$as_me:12495: \$? = $ac_status" >&5
12496   (exit "$ac_status"); }; }; then
12497
12498         cf_cv_find_linkage_utf8=yes
12499         cf_cv_header_path_utf8=/usr/include
12500         cf_cv_library_path_utf8=/usr/lib
12501         cf_cv_library_file_utf8="-lutf8"
12502
12503 else
12504   echo "$as_me: failed program was:" >&5
12505 cat "conftest.$ac_ext" >&5
12506
12507         cf_cv_find_linkage_utf8=no
12508         LIBS="$cf_save_LIBS"
12509
12510         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12511
12512 echo "${as_me:-configure}:12512: testing find linkage for utf8 library ..." 1>&5
12513
12514 echo "${as_me:-configure}:12514: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12515
12516         cf_save_CPPFLAGS="$CPPFLAGS"
12517         cf_test_CPPFLAGS="$CPPFLAGS"
12518
12519 cf_search=
12520
12521 # collect the current set of include-directories from compiler flags
12522 cf_header_path_list=""
12523 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12524         for cf_header_path in $CPPFLAGS $CFLAGS
12525         do
12526                 case "$cf_header_path" in
12527                 (-I*)
12528                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12529
12530 test "x$cf_header_path" != "xNONE" && \
12531 test -d "$cf_header_path" && \
12532  {
12533         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12534         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12535         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12536         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12537         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12538         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12539 }
12540
12541                         cf_header_path_list="$cf_header_path_list $cf_search"
12542                         ;;
12543                 esac
12544         done
12545 fi
12546
12547 # add the variations for the package we are looking for
12548
12549 cf_search=
12550
12551 test "x$prefix" != "xNONE" && \
12552 test -d "$prefix" && \
12553  {
12554         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12555         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12556         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12557         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12558         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12559         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12560 }
12561
12562 for cf_subdir_prefix in \
12563         /usr \
12564         /usr/local \
12565         /usr/pkg \
12566         /opt \
12567         /opt/local \
12568         $HOME
12569 do
12570
12571 test "x$cf_subdir_prefix" != "x$prefix" && \
12572 test -d "$cf_subdir_prefix" && \
12573 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12574         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12575         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12576         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12577         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12578         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12579         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12580 }
12581
12582 done
12583
12584 test "$includedir" != NONE && \
12585 test "$includedir" != "/usr/include" && \
12586 test -d "$includedir" && {
12587         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12588         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12589 }
12590
12591 test "$oldincludedir" != NONE && \
12592 test "$oldincludedir" != "/usr/include" && \
12593 test -d "$oldincludedir" && {
12594         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12595         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12596 }
12597
12598 cf_search="$cf_search $cf_header_path_list"
12599
12600         for cf_cv_header_path_utf8 in $cf_search
12601         do
12602                 if test -d "$cf_cv_header_path_utf8" ; then
12603                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12604
12605 echo "${as_me:-configure}:12605: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12606
12607                         CPPFLAGS="$cf_save_CPPFLAGS"
12608
12609         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12610         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12611
12612                         cat >"conftest.$ac_ext" <<_ACEOF
12613 #line 12613 "configure"
12614 #include "confdefs.h"
12615
12616 #include <libutf8.h>
12617 int
12618 main (void)
12619 {
12620 putwc(0,0);
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f "conftest.$ac_objext"
12626 if { (eval echo "$as_me:12626: \"$ac_compile\"") >&5
12627   (eval $ac_compile) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit "$ac_status"); } &&
12631          { ac_try='test -s "conftest.$ac_objext"'
12632   { (eval echo "$as_me:12632: \"$ac_try\"") >&5
12633   (eval $ac_try) 2>&5
12634   ac_status=$?
12635   echo "$as_me:12635: \$? = $ac_status" >&5
12636   (exit "$ac_status"); }; }; then
12637
12638                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12639
12640 echo "${as_me:-configure}:12640: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12641
12642                                 cf_cv_find_linkage_utf8=maybe
12643                                 cf_test_CPPFLAGS="$CPPFLAGS"
12644                                 break
12645 else
12646   echo "$as_me: failed program was:" >&5
12647 cat "conftest.$ac_ext" >&5
12648
12649                                 CPPFLAGS="$cf_save_CPPFLAGS"
12650
12651 fi
12652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12653                 fi
12654         done
12655
12656         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12657
12658 echo "${as_me:-configure}:12658: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12659
12660                 cf_save_LIBS="$LIBS"
12661                 cf_save_LDFLAGS="$LDFLAGS"
12662
12663                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12664
12665 cf_search=
12666 cf_library_path_list=""
12667 if test -n "${LDFLAGS}${LIBS}" ; then
12668         for cf_library_path in $LDFLAGS $LIBS
12669         do
12670                 case "$cf_library_path" in
12671                 (-L*)
12672                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12673
12674 test "x$cf_library_path" != "xNONE" && \
12675 test -d "$cf_library_path" && \
12676  {
12677         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12678         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12679         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12680         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12681         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12682         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12683 }
12684
12685                         cf_library_path_list="$cf_library_path_list $cf_search"
12686                         ;;
12687                 esac
12688         done
12689 fi
12690
12691 cf_search=
12692
12693 test "x$prefix" != "xNONE" && \
12694 test -d "$prefix" && \
12695  {
12696         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12697         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12698         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12699         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12700         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12701         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12702 }
12703
12704 for cf_subdir_prefix in \
12705         /usr \
12706         /usr/local \
12707         /usr/pkg \
12708         /opt \
12709         /opt/local \
12710         $HOME
12711 do
12712
12713 test "x$cf_subdir_prefix" != "x$prefix" && \
12714 test -d "$cf_subdir_prefix" && \
12715 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12716         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12717         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12718         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12719         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12720         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12721         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12722 }
12723
12724 done
12725
12726 cf_search="$cf_library_path_list $cf_search"
12727
12728                         for cf_cv_library_path_utf8 in $cf_search
12729                         do
12730                                 if test -d "$cf_cv_library_path_utf8" ; then
12731                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12732
12733 echo "${as_me:-configure}:12733: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12734
12735                                         CPPFLAGS="$cf_test_CPPFLAGS"
12736                                         LIBS="-lutf8  $cf_save_LIBS"
12737                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12738                                         cat >"conftest.$ac_ext" <<_ACEOF
12739 #line 12739 "configure"
12740 #include "confdefs.h"
12741
12742 #include <libutf8.h>
12743 int
12744 main (void)
12745 {
12746 putwc(0,0);
12747   ;
12748   return 0;
12749 }
12750 _ACEOF
12751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12752 if { (eval echo "$as_me:12752: \"$ac_link\"") >&5
12753   (eval $ac_link) 2>&5
12754   ac_status=$?
12755   echo "$as_me:12755: \$? = $ac_status" >&5
12756   (exit "$ac_status"); } &&
12757          { ac_try='test -s "conftest$ac_exeext"'
12758   { (eval echo "$as_me:12758: \"$ac_try\"") >&5
12759   (eval $ac_try) 2>&5
12760   ac_status=$?
12761   echo "$as_me:12761: \$? = $ac_status" >&5
12762   (exit "$ac_status"); }; }; then
12763
12764                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12765
12766 echo "${as_me:-configure}:12766: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12767
12768                                         cf_cv_find_linkage_utf8=yes
12769                                         cf_cv_library_file_utf8="-lutf8"
12770                                         break
12771 else
12772   echo "$as_me: failed program was:" >&5
12773 cat "conftest.$ac_ext" >&5
12774
12775                                         CPPFLAGS="$cf_save_CPPFLAGS"
12776                                         LIBS="$cf_save_LIBS"
12777                                         LDFLAGS="$cf_save_LDFLAGS"
12778
12779 fi
12780 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12781                                 fi
12782                         done
12783                         CPPFLAGS="$cf_save_CPPFLAGS"
12784                         LDFLAGS="$cf_save_LDFLAGS"
12785                 fi
12786
12787         else
12788                 cf_cv_find_linkage_utf8=no
12789         fi
12790
12791 fi
12792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12793
12794 fi
12795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12796
12797 LIBS="$cf_save_LIBS"
12798
12799 if test "$cf_cv_find_linkage_utf8" = yes ; then
12800 cf_cv_utf8_lib=add-on
12801 else
12802 cf_cv_utf8_lib=no
12803 fi
12804
12805 fi
12806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12807 fi
12808 echo "$as_me:12808: result: $cf_cv_utf8_lib" >&5
12809 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12810
12811 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12812 # ncurses/ncursesw:
12813 if test "$cf_cv_utf8_lib" = "add-on" ; then
12814
12815 cat >>confdefs.h <<\EOF
12816 #define HAVE_LIBUTF8_H 1
12817 EOF
12818
12819 if test -n "$cf_cv_header_path_utf8" ; then
12820   for cf_add_incdir in $cf_cv_header_path_utf8
12821   do
12822         while test "$cf_add_incdir" != /usr/include
12823         do
12824           if test -d "$cf_add_incdir"
12825           then
12826                 cf_have_incdir=no
12827                 if test -n "$CFLAGS$CPPFLAGS" ; then
12828                   # a loop is needed to ensure we can add subdirs of existing dirs
12829                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12830                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12831                           cf_have_incdir=yes; break
12832                         fi
12833                   done
12834                 fi
12835
12836                 if test "$cf_have_incdir" = no ; then
12837                   if test "$cf_add_incdir" = /usr/local/include ; then
12838                         if test "$GCC" = yes
12839                         then
12840                           cf_save_CPPFLAGS=$CPPFLAGS
12841
12842         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12843         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12844
12845                           cat >"conftest.$ac_ext" <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848 #include <stdio.h>
12849 int
12850 main (void)
12851 {
12852 printf("Hello")
12853   ;
12854   return 0;
12855 }
12856 _ACEOF
12857 rm -f "conftest.$ac_objext"
12858 if { (eval echo "$as_me:12858: \"$ac_compile\"") >&5
12859   (eval $ac_compile) 2>&5
12860   ac_status=$?
12861   echo "$as_me:12861: \$? = $ac_status" >&5
12862   (exit "$ac_status"); } &&
12863          { ac_try='test -s "conftest.$ac_objext"'
12864   { (eval echo "$as_me:12864: \"$ac_try\"") >&5
12865   (eval $ac_try) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit "$ac_status"); }; }; then
12869   :
12870 else
12871   echo "$as_me: failed program was:" >&5
12872 cat "conftest.$ac_ext" >&5
12873 cf_have_incdir=yes
12874 fi
12875 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12876                           CPPFLAGS=$cf_save_CPPFLAGS
12877                         fi
12878                   fi
12879                 fi
12880
12881                 if test "$cf_have_incdir" = no ; then
12882                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12883
12884 echo "${as_me:-configure}:12884: testing adding $cf_add_incdir to include-path ..." 1>&5
12885
12886                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12887
12888                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12889                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12890                   cf_add_incdir="$cf_top_incdir"
12891                 else
12892                   break
12893                 fi
12894           else
12895                 break
12896           fi
12897         done
12898   done
12899 fi
12900
12901 if test -n "$cf_cv_library_path_utf8" ; then
12902         for cf_add_libdir in $cf_cv_library_path_utf8
12903         do
12904                 if test "$cf_add_libdir" = /usr/lib ; then
12905                         :
12906                 elif test -d "$cf_add_libdir"
12907                 then
12908                         cf_have_libdir=no
12909                         if test -n "$LDFLAGS$LIBS" ; then
12910                                 # a loop is needed to ensure we can add subdirs of existing dirs
12911                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12912                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12913                                                 cf_have_libdir=yes; break
12914                                         fi
12915                                 done
12916                         fi
12917                         if test "$cf_have_libdir" = no ; then
12918                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12919
12920 echo "${as_me:-configure}:12920: testing adding $cf_add_libdir to library-path ..." 1>&5
12921
12922                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12923                         fi
12924                 fi
12925         done
12926 fi
12927
12928 cf_add_libs="$LIBS"
12929 # reverse order
12930 cf_add_0lib=
12931 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12932 # filter duplicates
12933 for cf_add_1lib in $cf_add_0lib; do
12934         for cf_add_2lib in $cf_add_libs; do
12935                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12936                         cf_add_1lib=
12937                         break
12938                 fi
12939         done
12940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12941 done
12942 LIBS="$cf_add_libs"
12943
12944 fi
12945
12946                 if test "$cf_cv_utf8_lib" != no ; then
12947                         NCURSES_LIBUTF8=1
12948                 fi
12949         fi
12950
12951 # This is needed on Tru64 5.0 to declare mbstate_t
12952 echo "$as_me:12952: checking if we must include wchar.h to declare mbstate_t" >&5
12953 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12954 if test "${cf_cv_mbstate_t+set}" = set; then
12955   echo $ECHO_N "(cached) $ECHO_C" >&6
12956 else
12957
12958 cat >"conftest.$ac_ext" <<_ACEOF
12959 #line 12959 "configure"
12960 #include "confdefs.h"
12961
12962 #include <stdlib.h>
12963 #include <stdarg.h>
12964 #include <stdio.h>
12965 #ifdef HAVE_LIBUTF8_H
12966 #include <libutf8.h>
12967 #endif
12968 int
12969 main (void)
12970 {
12971 mbstate_t state
12972   ;
12973   return 0;
12974 }
12975 _ACEOF
12976 rm -f "conftest.$ac_objext"
12977 if { (eval echo "$as_me:12977: \"$ac_compile\"") >&5
12978   (eval $ac_compile) 2>&5
12979   ac_status=$?
12980   echo "$as_me:12980: \$? = $ac_status" >&5
12981   (exit "$ac_status"); } &&
12982          { ac_try='test -s "conftest.$ac_objext"'
12983   { (eval echo "$as_me:12983: \"$ac_try\"") >&5
12984   (eval $ac_try) 2>&5
12985   ac_status=$?
12986   echo "$as_me:12986: \$? = $ac_status" >&5
12987   (exit "$ac_status"); }; }; then
12988   cf_cv_mbstate_t=no
12989 else
12990   echo "$as_me: failed program was:" >&5
12991 cat "conftest.$ac_ext" >&5
12992 cat >"conftest.$ac_ext" <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12995
12996 #include <stdlib.h>
12997 #include <stdarg.h>
12998 #include <stdio.h>
12999 #include <wchar.h>
13000 #ifdef HAVE_LIBUTF8_H
13001 #include <libutf8.h>
13002 #endif
13003 int
13004 main (void)
13005 {
13006 mbstate_t value
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f "conftest.$ac_objext"
13012 if { (eval echo "$as_me:13012: \"$ac_compile\"") >&5
13013   (eval $ac_compile) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit "$ac_status"); } &&
13017          { ac_try='test -s "conftest.$ac_objext"'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit "$ac_status"); }; }; then
13023   cf_cv_mbstate_t=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat "conftest.$ac_ext" >&5
13027 cf_cv_mbstate_t=unknown
13028 fi
13029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13030 fi
13031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13032 fi
13033 echo "$as_me:13033: result: $cf_cv_mbstate_t" >&5
13034 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13035
13036 if test "$cf_cv_mbstate_t" = yes ; then
13037
13038 cat >>confdefs.h <<\EOF
13039 #define NEED_WCHAR_H 1
13040 EOF
13041
13042         NEED_WCHAR_H=1
13043 fi
13044
13045 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13046 if test "$cf_cv_mbstate_t" = unknown ; then
13047         NCURSES_MBSTATE_T=1
13048 fi
13049
13050 # This is needed on Tru64 5.0 to declare wchar_t
13051 echo "$as_me:13051: checking if we must include wchar.h to declare wchar_t" >&5
13052 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13053 if test "${cf_cv_wchar_t+set}" = set; then
13054   echo $ECHO_N "(cached) $ECHO_C" >&6
13055 else
13056
13057 cat >"conftest.$ac_ext" <<_ACEOF
13058 #line 13058 "configure"
13059 #include "confdefs.h"
13060
13061 #include <stdlib.h>
13062 #include <stdarg.h>
13063 #include <stdio.h>
13064 #ifdef HAVE_LIBUTF8_H
13065 #include <libutf8.h>
13066 #endif
13067 int
13068 main (void)
13069 {
13070 wchar_t state
13071   ;
13072   return 0;
13073 }
13074 _ACEOF
13075 rm -f "conftest.$ac_objext"
13076 if { (eval echo "$as_me:13076: \"$ac_compile\"") >&5
13077   (eval $ac_compile) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit "$ac_status"); } &&
13081          { ac_try='test -s "conftest.$ac_objext"'
13082   { (eval echo "$as_me:13082: \"$ac_try\"") >&5
13083   (eval $ac_try) 2>&5
13084   ac_status=$?
13085   echo "$as_me:13085: \$? = $ac_status" >&5
13086   (exit "$ac_status"); }; }; then
13087   cf_cv_wchar_t=no
13088 else
13089   echo "$as_me: failed program was:" >&5
13090 cat "conftest.$ac_ext" >&5
13091 cat >"conftest.$ac_ext" <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094
13095 #include <stdlib.h>
13096 #include <stdarg.h>
13097 #include <stdio.h>
13098 #include <wchar.h>
13099 #ifdef HAVE_LIBUTF8_H
13100 #include <libutf8.h>
13101 #endif
13102 int
13103 main (void)
13104 {
13105 wchar_t value
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 rm -f "conftest.$ac_objext"
13111 if { (eval echo "$as_me:13111: \"$ac_compile\"") >&5
13112   (eval $ac_compile) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit "$ac_status"); } &&
13116          { ac_try='test -s "conftest.$ac_objext"'
13117   { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit "$ac_status"); }; }; then
13122   cf_cv_wchar_t=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 cat "conftest.$ac_ext" >&5
13126 cf_cv_wchar_t=unknown
13127 fi
13128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13129 fi
13130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13131 fi
13132 echo "$as_me:13132: result: $cf_cv_wchar_t" >&5
13133 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13134
13135 if test "$cf_cv_wchar_t" = yes ; then
13136
13137 cat >>confdefs.h <<\EOF
13138 #define NEED_WCHAR_H 1
13139 EOF
13140
13141         NEED_WCHAR_H=1
13142 fi
13143
13144 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13145 if test "$cf_cv_wchar_t" = unknown ; then
13146         NCURSES_WCHAR_T=1
13147 fi
13148
13149 # if we find wchar_t in either place, use substitution to provide a fallback.
13150 if test "$cf_cv_wchar_t" != unknown ; then
13151         NCURSES_OK_WCHAR_T=1
13152 fi
13153
13154 # This is needed on Tru64 5.0 to declare wint_t
13155 echo "$as_me:13155: checking if we must include wchar.h to declare wint_t" >&5
13156 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13157 if test "${cf_cv_wint_t+set}" = set; then
13158   echo $ECHO_N "(cached) $ECHO_C" >&6
13159 else
13160
13161 cat >"conftest.$ac_ext" <<_ACEOF
13162 #line 13162 "configure"
13163 #include "confdefs.h"
13164
13165 #include <stdlib.h>
13166 #include <stdarg.h>
13167 #include <stdio.h>
13168 #ifdef HAVE_LIBUTF8_H
13169 #include <libutf8.h>
13170 #endif
13171 int
13172 main (void)
13173 {
13174 wint_t state
13175   ;
13176   return 0;
13177 }
13178 _ACEOF
13179 rm -f "conftest.$ac_objext"
13180 if { (eval echo "$as_me:13180: \"$ac_compile\"") >&5
13181   (eval $ac_compile) 2>&5
13182   ac_status=$?
13183   echo "$as_me:13183: \$? = $ac_status" >&5
13184   (exit "$ac_status"); } &&
13185          { ac_try='test -s "conftest.$ac_objext"'
13186   { (eval echo "$as_me:13186: \"$ac_try\"") >&5
13187   (eval $ac_try) 2>&5
13188   ac_status=$?
13189   echo "$as_me:13189: \$? = $ac_status" >&5
13190   (exit "$ac_status"); }; }; then
13191   cf_cv_wint_t=no
13192 else
13193   echo "$as_me: failed program was:" >&5
13194 cat "conftest.$ac_ext" >&5
13195 cat >"conftest.$ac_ext" <<_ACEOF
13196 #line 13196 "configure"
13197 #include "confdefs.h"
13198
13199 #include <stdlib.h>
13200 #include <stdarg.h>
13201 #include <stdio.h>
13202 #include <wchar.h>
13203 #ifdef HAVE_LIBUTF8_H
13204 #include <libutf8.h>
13205 #endif
13206 int
13207 main (void)
13208 {
13209 wint_t value
13210   ;
13211   return 0;
13212 }
13213 _ACEOF
13214 rm -f "conftest.$ac_objext"
13215 if { (eval echo "$as_me:13215: \"$ac_compile\"") >&5
13216   (eval $ac_compile) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit "$ac_status"); } &&
13220          { ac_try='test -s "conftest.$ac_objext"'
13221   { (eval echo "$as_me:13221: \"$ac_try\"") >&5
13222   (eval $ac_try) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit "$ac_status"); }; }; then
13226   cf_cv_wint_t=yes
13227 else
13228   echo "$as_me: failed program was:" >&5
13229 cat "conftest.$ac_ext" >&5
13230 cf_cv_wint_t=unknown
13231 fi
13232 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13233 fi
13234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13235 fi
13236 echo "$as_me:13236: result: $cf_cv_wint_t" >&5
13237 echo "${ECHO_T}$cf_cv_wint_t" >&6
13238
13239 if test "$cf_cv_wint_t" = yes ; then
13240
13241 cat >>confdefs.h <<\EOF
13242 #define NEED_WCHAR_H 1
13243 EOF
13244
13245         NEED_WCHAR_H=1
13246 fi
13247
13248 # if we do not find wint_t in either place, use substitution to provide a fallback.
13249 if test "$cf_cv_wint_t" = unknown ; then
13250         NCURSES_WINT_T=1
13251 fi
13252
13253 # if we find wint_t in either place, use substitution to provide a fallback.
13254 if test "$cf_cv_wint_t" != unknown ; then
13255         NCURSES_OK_WINT_T=1
13256 fi
13257
13258         if test "$NCURSES_MBSTATE_T" != 0; then
13259
13260 cat >>confdefs.h <<\EOF
13261 #define NEED_MBSTATE_T_DEF 1
13262 EOF
13263
13264         fi
13265 fi
13266
13267 ###   use option --disable-lp64 to allow long chtype
13268 echo "$as_me:13268: checking whether to enable _LP64 definition in curses.h" >&5
13269 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13270
13271 # Check whether --enable-lp64 or --disable-lp64 was given.
13272 if test "${enable_lp64+set}" = set; then
13273   enableval="$enable_lp64"
13274   with_lp64=$enableval
13275 else
13276   with_lp64=$cf_dft_with_lp64
13277 fi;
13278 echo "$as_me:13278: result: $with_lp64" >&5
13279 echo "${ECHO_T}$with_lp64" >&6
13280
13281 if test "x$with_lp64" = xyes ; then
13282         cf_cv_enable_lp64=1
13283 else
13284         cf_cv_enable_lp64=0
13285 fi
13286
13287 # Check whether --enable-largefile or --disable-largefile was given.
13288 if test "${enable_largefile+set}" = set; then
13289   enableval="$enable_largefile"
13290
13291 fi;
13292 if test "$enable_largefile" != no; then
13293
13294   echo "$as_me:13294: checking for special C compiler options needed for large files" >&5
13295 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13296 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13297   echo $ECHO_N "(cached) $ECHO_C" >&6
13298 else
13299   ac_cv_sys_largefile_CC=no
13300      if test "$GCC" != yes; then
13301        ac_save_CC=$CC
13302        while :; do
13303          # IRIX 6.2 and later do not support large files by default,
13304          # so use the C compiler's -n32 option if that helps.
13305          cat >"conftest.$ac_ext" <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308 #include <sys/types.h>
13309  /* Check that off_t can represent 2**63 - 1 correctly.
13310     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13311     since some C++ compilers masquerading as C compilers
13312     incorrectly reject 9223372036854775807.  */
13313 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13314   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13315                        && LARGE_OFF_T % 2147483647 == 1)
13316                       ? 1 : -1];
13317 int
13318 main (void)
13319 {
13320
13321   ;
13322   return 0;
13323 }
13324 _ACEOF
13325          rm -f "conftest.$ac_objext"
13326 if { (eval echo "$as_me:13326: \"$ac_compile\"") >&5
13327   (eval $ac_compile) 2>&5
13328   ac_status=$?
13329   echo "$as_me:13329: \$? = $ac_status" >&5
13330   (exit "$ac_status"); } &&
13331          { ac_try='test -s "conftest.$ac_objext"'
13332   { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:13335: \$? = $ac_status" >&5
13336   (exit "$ac_status"); }; }; then
13337   break
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341 fi
13342 rm -f "conftest.$ac_objext"
13343          CC="$CC -n32"
13344          rm -f "conftest.$ac_objext"
13345 if { (eval echo "$as_me:13345: \"$ac_compile\"") >&5
13346   (eval $ac_compile) 2>&5
13347   ac_status=$?
13348   echo "$as_me:13348: \$? = $ac_status" >&5
13349   (exit "$ac_status"); } &&
13350          { ac_try='test -s "conftest.$ac_objext"'
13351   { (eval echo "$as_me:13351: \"$ac_try\"") >&5
13352   (eval $ac_try) 2>&5
13353   ac_status=$?
13354   echo "$as_me:13354: \$? = $ac_status" >&5
13355   (exit "$ac_status"); }; }; then
13356   ac_cv_sys_largefile_CC=' -n32'; break
13357 else
13358   echo "$as_me: failed program was:" >&5
13359 cat "conftest.$ac_ext" >&5
13360 fi
13361 rm -f "conftest.$ac_objext"
13362          break
13363        done
13364        CC=$ac_save_CC
13365        rm -f "conftest.$ac_ext"
13366     fi
13367 fi
13368 echo "$as_me:13368: result: $ac_cv_sys_largefile_CC" >&5
13369 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13370   if test "$ac_cv_sys_largefile_CC" != no; then
13371     CC=$CC$ac_cv_sys_largefile_CC
13372   fi
13373
13374   echo "$as_me:13374: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13375 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13376 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13377   echo $ECHO_N "(cached) $ECHO_C" >&6
13378 else
13379   while :; do
13380   ac_cv_sys_file_offset_bits=no
13381   cat >"conftest.$ac_ext" <<_ACEOF
13382 #line 13382 "configure"
13383 #include "confdefs.h"
13384 #include <sys/types.h>
13385  /* Check that off_t can represent 2**63 - 1 correctly.
13386     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13387     since some C++ compilers masquerading as C compilers
13388     incorrectly reject 9223372036854775807.  */
13389 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13390   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13391                        && LARGE_OFF_T % 2147483647 == 1)
13392                       ? 1 : -1];
13393 int
13394 main (void)
13395 {
13396
13397   ;
13398   return 0;
13399 }
13400 _ACEOF
13401 rm -f "conftest.$ac_objext"
13402 if { (eval echo "$as_me:13402: \"$ac_compile\"") >&5
13403   (eval $ac_compile) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit "$ac_status"); } &&
13407          { ac_try='test -s "conftest.$ac_objext"'
13408   { (eval echo "$as_me:13408: \"$ac_try\"") >&5
13409   (eval $ac_try) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit "$ac_status"); }; }; then
13413   break
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat "conftest.$ac_ext" >&5
13417 fi
13418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13419   cat >"conftest.$ac_ext" <<_ACEOF
13420 #line 13420 "configure"
13421 #include "confdefs.h"
13422 #define _FILE_OFFSET_BITS 64
13423 #include <sys/types.h>
13424  /* Check that off_t can represent 2**63 - 1 correctly.
13425     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13426     since some C++ compilers masquerading as C compilers
13427     incorrectly reject 9223372036854775807.  */
13428 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13429   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13430                        && LARGE_OFF_T % 2147483647 == 1)
13431                       ? 1 : -1];
13432 int
13433 main (void)
13434 {
13435
13436   ;
13437   return 0;
13438 }
13439 _ACEOF
13440 rm -f "conftest.$ac_objext"
13441 if { (eval echo "$as_me:13441: \"$ac_compile\"") >&5
13442   (eval $ac_compile) 2>&5
13443   ac_status=$?
13444   echo "$as_me:13444: \$? = $ac_status" >&5
13445   (exit "$ac_status"); } &&
13446          { ac_try='test -s "conftest.$ac_objext"'
13447   { (eval echo "$as_me:13447: \"$ac_try\"") >&5
13448   (eval $ac_try) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit "$ac_status"); }; }; then
13452   ac_cv_sys_file_offset_bits=64; break
13453 else
13454   echo "$as_me: failed program was:" >&5
13455 cat "conftest.$ac_ext" >&5
13456 fi
13457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13458   break
13459 done
13460 fi
13461 echo "$as_me:13461: result: $ac_cv_sys_file_offset_bits" >&5
13462 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13463 if test "$ac_cv_sys_file_offset_bits" != no; then
13464
13465 cat >>confdefs.h <<EOF
13466 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13467 EOF
13468
13469 fi
13470 rm -rf conftest*
13471   echo "$as_me:13471: checking for _LARGE_FILES value needed for large files" >&5
13472 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13473 if test "${ac_cv_sys_large_files+set}" = set; then
13474   echo $ECHO_N "(cached) $ECHO_C" >&6
13475 else
13476   while :; do
13477   ac_cv_sys_large_files=no
13478   cat >"conftest.$ac_ext" <<_ACEOF
13479 #line 13479 "configure"
13480 #include "confdefs.h"
13481 #include <sys/types.h>
13482  /* Check that off_t can represent 2**63 - 1 correctly.
13483     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13484     since some C++ compilers masquerading as C compilers
13485     incorrectly reject 9223372036854775807.  */
13486 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13487   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13488                        && LARGE_OFF_T % 2147483647 == 1)
13489                       ? 1 : -1];
13490 int
13491 main (void)
13492 {
13493
13494   ;
13495   return 0;
13496 }
13497 _ACEOF
13498 rm -f "conftest.$ac_objext"
13499 if { (eval echo "$as_me:13499: \"$ac_compile\"") >&5
13500   (eval $ac_compile) 2>&5
13501   ac_status=$?
13502   echo "$as_me:13502: \$? = $ac_status" >&5
13503   (exit "$ac_status"); } &&
13504          { ac_try='test -s "conftest.$ac_objext"'
13505   { (eval echo "$as_me:13505: \"$ac_try\"") >&5
13506   (eval $ac_try) 2>&5
13507   ac_status=$?
13508   echo "$as_me:13508: \$? = $ac_status" >&5
13509   (exit "$ac_status"); }; }; then
13510   break
13511 else
13512   echo "$as_me: failed program was:" >&5
13513 cat "conftest.$ac_ext" >&5
13514 fi
13515 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13516   cat >"conftest.$ac_ext" <<_ACEOF
13517 #line 13517 "configure"
13518 #include "confdefs.h"
13519 #define _LARGE_FILES 1
13520 #include <sys/types.h>
13521  /* Check that off_t can represent 2**63 - 1 correctly.
13522     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13523     since some C++ compilers masquerading as C compilers
13524     incorrectly reject 9223372036854775807.  */
13525 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13526   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13527                        && LARGE_OFF_T % 2147483647 == 1)
13528                       ? 1 : -1];
13529 int
13530 main (void)
13531 {
13532
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 rm -f "conftest.$ac_objext"
13538 if { (eval echo "$as_me:13538: \"$ac_compile\"") >&5
13539   (eval $ac_compile) 2>&5
13540   ac_status=$?
13541   echo "$as_me:13541: \$? = $ac_status" >&5
13542   (exit "$ac_status"); } &&
13543          { ac_try='test -s "conftest.$ac_objext"'
13544   { (eval echo "$as_me:13544: \"$ac_try\"") >&5
13545   (eval $ac_try) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit "$ac_status"); }; }; then
13549   ac_cv_sys_large_files=1; break
13550 else
13551   echo "$as_me: failed program was:" >&5
13552 cat "conftest.$ac_ext" >&5
13553 fi
13554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13555   break
13556 done
13557 fi
13558 echo "$as_me:13558: result: $ac_cv_sys_large_files" >&5
13559 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13560 if test "$ac_cv_sys_large_files" != no; then
13561
13562 cat >>confdefs.h <<EOF
13563 #define _LARGE_FILES $ac_cv_sys_large_files
13564 EOF
13565
13566 fi
13567 rm -rf conftest*
13568 fi
13569
13570         if test "$enable_largefile" != no ; then
13571         echo "$as_me:13571: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13572 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13573 if test "${ac_cv_sys_largefile_source+set}" = set; then
13574   echo $ECHO_N "(cached) $ECHO_C" >&6
13575 else
13576   while :; do
13577   ac_cv_sys_largefile_source=no
13578   cat >"conftest.$ac_ext" <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 #include <stdio.h>
13582 int
13583 main (void)
13584 {
13585 return !fseeko;
13586   ;
13587   return 0;
13588 }
13589 _ACEOF
13590 rm -f "conftest.$ac_objext"
13591 if { (eval echo "$as_me:13591: \"$ac_compile\"") >&5
13592   (eval $ac_compile) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit "$ac_status"); } &&
13596          { ac_try='test -s "conftest.$ac_objext"'
13597   { (eval echo "$as_me:13597: \"$ac_try\"") >&5
13598   (eval $ac_try) 2>&5
13599   ac_status=$?
13600   echo "$as_me:13600: \$? = $ac_status" >&5
13601   (exit "$ac_status"); }; }; then
13602   break
13603 else
13604   echo "$as_me: failed program was:" >&5
13605 cat "conftest.$ac_ext" >&5
13606 fi
13607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13608   cat >"conftest.$ac_ext" <<_ACEOF
13609 #line 13609 "configure"
13610 #include "confdefs.h"
13611 #define _LARGEFILE_SOURCE 1
13612 #include <stdio.h>
13613 int
13614 main (void)
13615 {
13616 return !fseeko;
13617   ;
13618   return 0;
13619 }
13620 _ACEOF
13621 rm -f "conftest.$ac_objext"
13622 if { (eval echo "$as_me:13622: \"$ac_compile\"") >&5
13623   (eval $ac_compile) 2>&5
13624   ac_status=$?
13625   echo "$as_me:13625: \$? = $ac_status" >&5
13626   (exit "$ac_status"); } &&
13627          { ac_try='test -s "conftest.$ac_objext"'
13628   { (eval echo "$as_me:13628: \"$ac_try\"") >&5
13629   (eval $ac_try) 2>&5
13630   ac_status=$?
13631   echo "$as_me:13631: \$? = $ac_status" >&5
13632   (exit "$ac_status"); }; }; then
13633   ac_cv_sys_largefile_source=1; break
13634 else
13635   echo "$as_me: failed program was:" >&5
13636 cat "conftest.$ac_ext" >&5
13637 fi
13638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13639   break
13640 done
13641 fi
13642 echo "$as_me:13642: result: $ac_cv_sys_largefile_source" >&5
13643 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13644 if test "$ac_cv_sys_largefile_source" != no; then
13645
13646 cat >>confdefs.h <<EOF
13647 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13648 EOF
13649
13650 fi
13651 rm -rf conftest*
13652
13653 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13654 # in glibc 2.1.3, but that breaks too many other things.
13655 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13656 echo "$as_me:13656: checking for fseeko" >&5
13657 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13658 if test "${ac_cv_func_fseeko+set}" = set; then
13659   echo $ECHO_N "(cached) $ECHO_C" >&6
13660 else
13661   cat >"conftest.$ac_ext" <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664 #include <stdio.h>
13665 int
13666 main (void)
13667 {
13668 return fseeko && fseeko (stdin, 0, 0);
13669   ;
13670   return 0;
13671 }
13672 _ACEOF
13673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13674 if { (eval echo "$as_me:13674: \"$ac_link\"") >&5
13675   (eval $ac_link) 2>&5
13676   ac_status=$?
13677   echo "$as_me:13677: \$? = $ac_status" >&5
13678   (exit "$ac_status"); } &&
13679          { ac_try='test -s "conftest$ac_exeext"'
13680   { (eval echo "$as_me:13680: \"$ac_try\"") >&5
13681   (eval $ac_try) 2>&5
13682   ac_status=$?
13683   echo "$as_me:13683: \$? = $ac_status" >&5
13684   (exit "$ac_status"); }; }; then
13685   ac_cv_func_fseeko=yes
13686 else
13687   echo "$as_me: failed program was:" >&5
13688 cat "conftest.$ac_ext" >&5
13689 ac_cv_func_fseeko=no
13690 fi
13691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13692 fi
13693 echo "$as_me:13693: result: $ac_cv_func_fseeko" >&5
13694 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13695 if test $ac_cv_func_fseeko = yes; then
13696
13697 cat >>confdefs.h <<\EOF
13698 #define HAVE_FSEEKO 1
13699 EOF
13700
13701 fi
13702
13703         # Normally we would collect these definitions in the config.h,
13704         # but (like _XOPEN_SOURCE), some environments rely on having these
13705         # defined before any of the system headers are included.  Another
13706         # case comes up with C++, e.g., on AIX the compiler compiles the
13707         # header files by themselves before looking at the body files it is
13708         # told to compile.  For ncurses, those header files do not include
13709         # the config.h
13710         if test "$ac_cv_sys_large_files" != no
13711         then
13712
13713         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13714         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13715
13716         fi
13717         if test "$ac_cv_sys_largefile_source" != no
13718         then
13719
13720         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13721         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13722
13723         fi
13724         if test "$ac_cv_sys_file_offset_bits" != no
13725         then
13726
13727         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13728         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13729
13730         fi
13731
13732         echo "$as_me:13732: checking whether to use struct dirent64" >&5
13733 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13734 if test "${cf_cv_struct_dirent64+set}" = set; then
13735   echo $ECHO_N "(cached) $ECHO_C" >&6
13736 else
13737
13738                 cat >"conftest.$ac_ext" <<_ACEOF
13739 #line 13739 "configure"
13740 #include "confdefs.h"
13741
13742 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13743 #include <sys/types.h>
13744 #include <dirent.h>
13745
13746 int
13747 main (void)
13748 {
13749
13750                 /* if transitional largefile support is setup, this is true */
13751                 extern struct dirent64 * readdir(DIR *);
13752                 struct dirent64 *x = readdir((DIR *)0);
13753                 struct dirent *y = readdir((DIR *)0);
13754                 int z = x - y;
13755                 (void)z;
13756
13757   ;
13758   return 0;
13759 }
13760 _ACEOF
13761 rm -f "conftest.$ac_objext"
13762 if { (eval echo "$as_me:13762: \"$ac_compile\"") >&5
13763   (eval $ac_compile) 2>&5
13764   ac_status=$?
13765   echo "$as_me:13765: \$? = $ac_status" >&5
13766   (exit "$ac_status"); } &&
13767          { ac_try='test -s "conftest.$ac_objext"'
13768   { (eval echo "$as_me:13768: \"$ac_try\"") >&5
13769   (eval $ac_try) 2>&5
13770   ac_status=$?
13771   echo "$as_me:13771: \$? = $ac_status" >&5
13772   (exit "$ac_status"); }; }; then
13773   cf_cv_struct_dirent64=yes
13774 else
13775   echo "$as_me: failed program was:" >&5
13776 cat "conftest.$ac_ext" >&5
13777 cf_cv_struct_dirent64=no
13778 fi
13779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13780
13781 fi
13782 echo "$as_me:13782: result: $cf_cv_struct_dirent64" >&5
13783 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13784         test "$cf_cv_struct_dirent64" = yes &&
13785 cat >>confdefs.h <<\EOF
13786 #define HAVE_STRUCT_DIRENT64 1
13787 EOF
13788
13789         fi
13790
13791 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13792 echo "$as_me:13792: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13793 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13794
13795 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13796 if test "${enable_tparm_varargs+set}" = set; then
13797   enableval="$enable_tparm_varargs"
13798   with_tparm_varargs=$enableval
13799 else
13800   with_tparm_varargs=yes
13801 fi;
13802 echo "$as_me:13802: result: $with_tparm_varargs" >&5
13803 echo "${ECHO_T}$with_tparm_varargs" >&6
13804 NCURSES_TPARM_VARARGS=0
13805 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13806
13807 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13808 if test "$with_ticlib" != no ; then
13809 echo "$as_me:13809: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13810 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13811
13812 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13813 if test "${enable_tic_depends+set}" = set; then
13814   enableval="$enable_tic_depends"
13815   with_tic_depends=$enableval
13816 else
13817   with_tic_depends=yes
13818 fi;
13819 echo "$as_me:13819: result: $with_tic_depends" >&5
13820 echo "${ECHO_T}$with_tic_depends" >&6
13821 else
13822         with_tic_depends=no
13823 fi
13824
13825 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13826 echo "$as_me:13826: checking if you want to enable wattr* macros" >&5
13827 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13828
13829 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13830 if test "${enable_wattr_macros+set}" = set; then
13831   enableval="$enable_wattr_macros"
13832   with_wattr_macros=$enableval
13833 else
13834   with_wattr_macros=no
13835 fi;
13836 if [ "x$with_wattr_macros" != xyes ]; then
13837         NCURSES_WATTR_MACROS=0
13838         echo "$as_me:13838: result: no" >&5
13839 echo "${ECHO_T}no" >&6
13840 else
13841         NCURSES_WATTR_MACROS=1
13842         echo "$as_me:13842: result: yes" >&5
13843 echo "${ECHO_T}yes" >&6
13844 fi
13845
13846 echo "$as_me:13846: checking for X11 rgb file" >&5
13847 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13848
13849 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13850 if test "${with_x11_rgb+set}" = set; then
13851   withval="$with_x11_rgb"
13852   RGB_PATH=$withval
13853 else
13854   RGB_PATH=auto
13855 fi;
13856
13857 if test "x$RGB_PATH" = xauto
13858 then
13859         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13860         for cf_path in \
13861                 /opt/local/share/X11/rgb.txt \
13862                 /opt/X11/share/X11/rgb.txt \
13863                 /usr/share/X11/rgb.txt \
13864                 /usr/X11/share/X11/rgb.txt \
13865                 /usr/X11/lib/X11/rgb.txt \
13866                 /usr/lib/X11/rgb.txt \
13867                 /etc/X11/rgb.txt \
13868                 /usr/pkg/lib/X11/rgb.txt \
13869                 /usr/X11R7/lib/X11/rgb.txt \
13870                 /usr/X11R6/lib/X11/rgb.txt \
13871                 /usr/X11R5/lib/X11/rgb.txt \
13872                 /usr/X11R4/lib/X11/rgb.txt \
13873                 /usr/local/lib/X11/rgb.txt \
13874                 /usr/local/share/X11/rgb.txt \
13875                 /usr/lib64/X11/rgb.txt
13876         do
13877                 if test -f "$cf_path" ; then
13878                         RGB_PATH="$cf_path"
13879                         break
13880                 fi
13881         done
13882 else
13883         cf_path=$RGB_PATH
13884
13885 if test "x$prefix" != xNONE; then
13886         cf_path_syntax="$prefix"
13887 else
13888         cf_path_syntax="$ac_default_prefix"
13889 fi
13890
13891 case ".$cf_path" in
13892 (.\$\(*\)*|.\'*\'*)
13893         ;;
13894 (..|./*|.\\*)
13895         ;;
13896 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13897         ;;
13898 (.\$\{*prefix\}*|.\$\{*dir\}*)
13899         eval cf_path="$cf_path"
13900         case ".$cf_path" in
13901         (.NONE/*)
13902                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13903                 ;;
13904         esac
13905         ;;
13906 (.no|.NONE/*)
13907         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13908         ;;
13909 (*)
13910         { { echo "$as_me:13910: error: expected a pathname, not \"$cf_path\"" >&5
13911 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13912    { (exit 1); exit 1; }; }
13913         ;;
13914 esac
13915
13916 fi
13917
13918 echo "$as_me:13918: result: $RGB_PATH" >&5
13919 echo "${ECHO_T}$RGB_PATH" >&6
13920
13921 cat >>confdefs.h <<EOF
13922 #define RGB_PATH "$cf_path"
13923 EOF
13924
13925 no_x11_rgb=
13926 if test "$RGB_PATH" = no
13927 then
13928         no_x11_rgb="#"
13929 fi
13930
13931 ###   use option --with-bool to override bool's type
13932 echo "$as_me:13932: checking for type of bool" >&5
13933 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13934
13935 # Check whether --with-bool or --without-bool was given.
13936 if test "${with_bool+set}" = set; then
13937   withval="$with_bool"
13938   NCURSES_BOOL="$withval"
13939 else
13940   NCURSES_BOOL=auto
13941 fi;
13942 echo "$as_me:13942: result: $NCURSES_BOOL" >&5
13943 echo "${ECHO_T}$NCURSES_BOOL" >&6
13944
13945 echo "$as_me:13945: checking for alternate terminal capabilities file" >&5
13946 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13947
13948 # Check whether --with-caps or --without-caps was given.
13949 if test "${with_caps+set}" = set; then
13950   withval="$with_caps"
13951   TERMINFO_CAPS=Caps.$withval
13952 else
13953   TERMINFO_CAPS=Caps
13954 fi;
13955 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13956 echo "$as_me:13956: result: $TERMINFO_CAPS" >&5
13957 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13958
13959 ###   use option --with-chtype to override chtype's type
13960 echo "$as_me:13960: checking for type of chtype" >&5
13961 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13962
13963 # Check whether --with-chtype or --without-chtype was given.
13964 if test "${with_chtype+set}" = set; then
13965   withval="$with_chtype"
13966   NCURSES_CHTYPE="$withval"
13967 else
13968   NCURSES_CHTYPE=$cf_dft_chtype
13969 fi;
13970 echo "$as_me:13970: result: $NCURSES_CHTYPE" >&5
13971 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13972
13973 ###   use option --with-ospeed to override ospeed's type
13974 echo "$as_me:13974: checking for type of ospeed" >&5
13975 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13976
13977 # Check whether --with-ospeed or --without-ospeed was given.
13978 if test "${with_ospeed+set}" = set; then
13979   withval="$with_ospeed"
13980   NCURSES_OSPEED="$withval"
13981 else
13982   NCURSES_OSPEED=short
13983 fi;
13984 echo "$as_me:13984: result: $NCURSES_OSPEED" >&5
13985 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13986
13987 ###   use option --with-mmask-t to override mmask_t's type
13988 echo "$as_me:13988: checking for type of mmask_t" >&5
13989 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13990
13991 # Check whether --with-mmask-t or --without-mmask-t was given.
13992 if test "${with_mmask_t+set}" = set; then
13993   withval="$with_mmask_t"
13994   NCURSES_MMASK_T="$withval"
13995 else
13996   NCURSES_MMASK_T=$cf_dft_mmask_t
13997 fi;
13998 echo "$as_me:13998: result: $NCURSES_MMASK_T" >&5
13999 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14000
14001 ###   use option --with-ccharw-max to override CCHARW_MAX size
14002 echo "$as_me:14002: checking for size CCHARW_MAX" >&5
14003 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14004
14005 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14006 if test "${with_ccharw_max+set}" = set; then
14007   withval="$with_ccharw_max"
14008   NCURSES_CCHARW_MAX="$withval"
14009 else
14010   NCURSES_CCHARW_MAX=5
14011 fi;
14012 echo "$as_me:14012: result: $NCURSES_CCHARW_MAX" >&5
14013 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14014
14015 echo "$as_me:14015: checking for ANSI C header files" >&5
14016 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14017 if test "${ac_cv_header_stdc+set}" = set; then
14018   echo $ECHO_N "(cached) $ECHO_C" >&6
14019 else
14020   cat >"conftest.$ac_ext" <<_ACEOF
14021 #line 14021 "configure"
14022 #include "confdefs.h"
14023 #include <stdlib.h>
14024 #include <stdarg.h>
14025 #include <string.h>
14026 #include <float.h>
14027
14028 _ACEOF
14029 if { (eval echo "$as_me:14029: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14030   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14031   ac_status=$?
14032   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14033   rm -f conftest.er1
14034   cat conftest.err >&5
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit "$ac_status"); } >/dev/null; then
14037   if test -s conftest.err; then
14038     ac_cpp_err=$ac_c_preproc_warn_flag
14039   else
14040     ac_cpp_err=
14041   fi
14042 else
14043   ac_cpp_err=yes
14044 fi
14045 if test -z "$ac_cpp_err"; then
14046   ac_cv_header_stdc=yes
14047 else
14048   echo "$as_me: failed program was:" >&5
14049   cat "conftest.$ac_ext" >&5
14050   ac_cv_header_stdc=no
14051 fi
14052 rm -f conftest.err "conftest.$ac_ext"
14053
14054 if test $ac_cv_header_stdc = yes; then
14055   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14056   cat >"conftest.$ac_ext" <<_ACEOF
14057 #line 14057 "configure"
14058 #include "confdefs.h"
14059 #include <string.h>
14060
14061 _ACEOF
14062 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14063   $EGREP "memchr" >/dev/null 2>&1; then
14064   :
14065 else
14066   ac_cv_header_stdc=no
14067 fi
14068 rm -rf conftest*
14069
14070 fi
14071
14072 if test $ac_cv_header_stdc = yes; then
14073   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14074   cat >"conftest.$ac_ext" <<_ACEOF
14075 #line 14075 "configure"
14076 #include "confdefs.h"
14077 #include <stdlib.h>
14078
14079 _ACEOF
14080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14081   $EGREP "free" >/dev/null 2>&1; then
14082   :
14083 else
14084   ac_cv_header_stdc=no
14085 fi
14086 rm -rf conftest*
14087
14088 fi
14089
14090 if test $ac_cv_header_stdc = yes; then
14091   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14092   if test "$cross_compiling" = yes; then
14093   :
14094 else
14095   cat >"conftest.$ac_ext" <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098 #include <ctype.h>
14099 #if ((' ' & 0x0FF) == 0x020)
14100 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14101 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14102 #else
14103 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14104                      || ('j' <= (c) && (c) <= 'r') \
14105                      || ('s' <= (c) && (c) <= 'z'))
14106 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14107 #endif
14108
14109 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14110 int
14111 main (void)
14112 {
14113   int i;
14114   for (i = 0; i < 256; i++)
14115     if (XOR (islower (i), ISLOWER (i))
14116         || toupper (i) != TOUPPER (i))
14117       $ac_main_return(2);
14118   $ac_main_return (0);
14119 }
14120 _ACEOF
14121 rm -f "conftest$ac_exeext"
14122 if { (eval echo "$as_me:14122: \"$ac_link\"") >&5
14123   (eval $ac_link) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14127   { (eval echo "$as_me:14127: \"$ac_try\"") >&5
14128   (eval $ac_try) 2>&5
14129   ac_status=$?
14130   echo "$as_me:14130: \$? = $ac_status" >&5
14131   (exit "$ac_status"); }; }; then
14132   :
14133 else
14134   echo "$as_me: program exited with status $ac_status" >&5
14135 echo "$as_me: failed program was:" >&5
14136 cat "conftest.$ac_ext" >&5
14137 ac_cv_header_stdc=no
14138 fi
14139 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14140 fi
14141 fi
14142 fi
14143 echo "$as_me:14143: result: $ac_cv_header_stdc" >&5
14144 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14145 if test $ac_cv_header_stdc = yes; then
14146
14147 cat >>confdefs.h <<\EOF
14148 #define STDC_HEADERS 1
14149 EOF
14150
14151 fi
14152
14153 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14154
14155 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14156                   inttypes.h stdint.h unistd.h
14157 do
14158 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14159 echo "$as_me:14159: checking for $ac_header" >&5
14160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14162   echo $ECHO_N "(cached) $ECHO_C" >&6
14163 else
14164   cat >"conftest.$ac_ext" <<_ACEOF
14165 #line 14165 "configure"
14166 #include "confdefs.h"
14167 $ac_includes_default
14168 #include <$ac_header>
14169 _ACEOF
14170 rm -f "conftest.$ac_objext"
14171 if { (eval echo "$as_me:14171: \"$ac_compile\"") >&5
14172   (eval $ac_compile) 2>&5
14173   ac_status=$?
14174   echo "$as_me:14174: \$? = $ac_status" >&5
14175   (exit "$ac_status"); } &&
14176          { ac_try='test -s "conftest.$ac_objext"'
14177   { (eval echo "$as_me:14177: \"$ac_try\"") >&5
14178   (eval $ac_try) 2>&5
14179   ac_status=$?
14180   echo "$as_me:14180: \$? = $ac_status" >&5
14181   (exit "$ac_status"); }; }; then
14182   eval "$as_ac_Header=yes"
14183 else
14184   echo "$as_me: failed program was:" >&5
14185 cat "conftest.$ac_ext" >&5
14186 eval "$as_ac_Header=no"
14187 fi
14188 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14189 fi
14190 echo "$as_me:14190: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14191 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14192 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14193   cat >>confdefs.h <<EOF
14194 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14195 EOF
14196
14197 fi
14198 done
14199
14200 echo "$as_me:14200: checking for signed char" >&5
14201 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14202 if test "${ac_cv_type_signed_char+set}" = set; then
14203   echo $ECHO_N "(cached) $ECHO_C" >&6
14204 else
14205   cat >"conftest.$ac_ext" <<_ACEOF
14206 #line 14206 "configure"
14207 #include "confdefs.h"
14208 $ac_includes_default
14209 int
14210 main (void)
14211 {
14212 if ((signed char *) 0)
14213   return 0;
14214 if (sizeof (signed char))
14215   return 0;
14216   ;
14217   return 0;
14218 }
14219 _ACEOF
14220 rm -f "conftest.$ac_objext"
14221 if { (eval echo "$as_me:14221: \"$ac_compile\"") >&5
14222   (eval $ac_compile) 2>&5
14223   ac_status=$?
14224   echo "$as_me:14224: \$? = $ac_status" >&5
14225   (exit "$ac_status"); } &&
14226          { ac_try='test -s "conftest.$ac_objext"'
14227   { (eval echo "$as_me:14227: \"$ac_try\"") >&5
14228   (eval $ac_try) 2>&5
14229   ac_status=$?
14230   echo "$as_me:14230: \$? = $ac_status" >&5
14231   (exit "$ac_status"); }; }; then
14232   ac_cv_type_signed_char=yes
14233 else
14234   echo "$as_me: failed program was:" >&5
14235 cat "conftest.$ac_ext" >&5
14236 ac_cv_type_signed_char=no
14237 fi
14238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14239 fi
14240 echo "$as_me:14240: result: $ac_cv_type_signed_char" >&5
14241 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14242
14243 echo "$as_me:14243: checking size of signed char" >&5
14244 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14245 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248   if test "$ac_cv_type_signed_char" = yes; then
14249   if test "$cross_compiling" = yes; then
14250   # Depending upon the size, compute the lo and hi bounds.
14251 cat >"conftest.$ac_ext" <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14254 $ac_includes_default
14255 int
14256 main (void)
14257 {
14258 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f "conftest.$ac_objext"
14264 if { (eval echo "$as_me:14264: \"$ac_compile\"") >&5
14265   (eval $ac_compile) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit "$ac_status"); } &&
14269          { ac_try='test -s "conftest.$ac_objext"'
14270   { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271   (eval $ac_try) 2>&5
14272   ac_status=$?
14273   echo "$as_me:14273: \$? = $ac_status" >&5
14274   (exit "$ac_status"); }; }; then
14275   ac_lo=0 ac_mid=0
14276   while :; do
14277     cat >"conftest.$ac_ext" <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14280 $ac_includes_default
14281 int
14282 main (void)
14283 {
14284 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14285   ;
14286   return 0;
14287 }
14288 _ACEOF
14289 rm -f "conftest.$ac_objext"
14290 if { (eval echo "$as_me:14290: \"$ac_compile\"") >&5
14291   (eval $ac_compile) 2>&5
14292   ac_status=$?
14293   echo "$as_me:14293: \$? = $ac_status" >&5
14294   (exit "$ac_status"); } &&
14295          { ac_try='test -s "conftest.$ac_objext"'
14296   { (eval echo "$as_me:14296: \"$ac_try\"") >&5
14297   (eval $ac_try) 2>&5
14298   ac_status=$?
14299   echo "$as_me:14299: \$? = $ac_status" >&5
14300   (exit "$ac_status"); }; }; then
14301   ac_hi=$ac_mid; break
14302 else
14303   echo "$as_me: failed program was:" >&5
14304 cat "conftest.$ac_ext" >&5
14305 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14306 fi
14307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14308   done
14309 else
14310   echo "$as_me: failed program was:" >&5
14311 cat "conftest.$ac_ext" >&5
14312 ac_hi=-1 ac_mid=-1
14313   while :; do
14314     cat >"conftest.$ac_ext" <<_ACEOF
14315 #line 14315 "configure"
14316 #include "confdefs.h"
14317 $ac_includes_default
14318 int
14319 main (void)
14320 {
14321 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14322   ;
14323   return 0;
14324 }
14325 _ACEOF
14326 rm -f "conftest.$ac_objext"
14327 if { (eval echo "$as_me:14327: \"$ac_compile\"") >&5
14328   (eval $ac_compile) 2>&5
14329   ac_status=$?
14330   echo "$as_me:14330: \$? = $ac_status" >&5
14331   (exit "$ac_status"); } &&
14332          { ac_try='test -s "conftest.$ac_objext"'
14333   { (eval echo "$as_me:14333: \"$ac_try\"") >&5
14334   (eval $ac_try) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit "$ac_status"); }; }; then
14338   ac_lo=$ac_mid; break
14339 else
14340   echo "$as_me: failed program was:" >&5
14341 cat "conftest.$ac_ext" >&5
14342 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14343 fi
14344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14345   done
14346 fi
14347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14348 # Binary search between lo and hi bounds.
14349 while test "x$ac_lo" != "x$ac_hi"; do
14350   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14351   cat >"conftest.$ac_ext" <<_ACEOF
14352 #line 14352 "configure"
14353 #include "confdefs.h"
14354 $ac_includes_default
14355 int
14356 main (void)
14357 {
14358 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14359   ;
14360   return 0;
14361 }
14362 _ACEOF
14363 rm -f "conftest.$ac_objext"
14364 if { (eval echo "$as_me:14364: \"$ac_compile\"") >&5
14365   (eval $ac_compile) 2>&5
14366   ac_status=$?
14367   echo "$as_me:14367: \$? = $ac_status" >&5
14368   (exit "$ac_status"); } &&
14369          { ac_try='test -s "conftest.$ac_objext"'
14370   { (eval echo "$as_me:14370: \"$ac_try\"") >&5
14371   (eval $ac_try) 2>&5
14372   ac_status=$?
14373   echo "$as_me:14373: \$? = $ac_status" >&5
14374   (exit "$ac_status"); }; }; then
14375   ac_hi=$ac_mid
14376 else
14377   echo "$as_me: failed program was:" >&5
14378 cat "conftest.$ac_ext" >&5
14379 ac_lo=`expr "$ac_mid" + 1`
14380 fi
14381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14382 done
14383 ac_cv_sizeof_signed_char=$ac_lo
14384 else
14385   if test "$cross_compiling" = yes; then
14386   { { echo "$as_me:14386: error: cannot run test program while cross compiling" >&5
14387 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14388    { (exit 1); exit 1; }; }
14389 else
14390   cat >"conftest.$ac_ext" <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14393 $ac_includes_default
14394 int
14395 main (void)
14396 {
14397 FILE *f = fopen ("conftest.val", "w");
14398 if (!f)
14399   $ac_main_return (1);
14400 fprintf (f, "%ld", (long)(sizeof (signed char)));
14401 fclose (f);
14402   ;
14403   return 0;
14404 }
14405 _ACEOF
14406 rm -f "conftest$ac_exeext"
14407 if { (eval echo "$as_me:14407: \"$ac_link\"") >&5
14408   (eval $ac_link) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14412   { (eval echo "$as_me:14412: \"$ac_try\"") >&5
14413   (eval $ac_try) 2>&5
14414   ac_status=$?
14415   echo "$as_me:14415: \$? = $ac_status" >&5
14416   (exit "$ac_status"); }; }; then
14417   ac_cv_sizeof_signed_char=`cat conftest.val`
14418 else
14419   echo "$as_me: program exited with status $ac_status" >&5
14420 echo "$as_me: failed program was:" >&5
14421 cat "conftest.$ac_ext" >&5
14422 fi
14423 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14424 fi
14425 fi
14426 rm -f conftest.val
14427 else
14428   ac_cv_sizeof_signed_char=0
14429 fi
14430 fi
14431 echo "$as_me:14431: result: $ac_cv_sizeof_signed_char" >&5
14432 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14433 cat >>confdefs.h <<EOF
14434 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14435 EOF
14436
14437 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14438         NCURSES_SBOOL="signed char"
14439 else
14440         NCURSES_SBOOL="char"
14441 fi
14442 echo "$as_me:14442: checking if you want to use signed Boolean array in term.h" >&5
14443 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14444
14445 # Check whether --enable-signed-char or --disable-signed-char was given.
14446 if test "${enable_signed_char+set}" = set; then
14447   enableval="$enable_signed_char"
14448   with_signed_char=$enableval
14449 else
14450   with_signed_char=no
14451 fi;
14452 echo "$as_me:14452: result: $with_signed_char" >&5
14453 echo "${ECHO_T}$with_signed_char" >&6
14454 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14455
14456 ###   use option --with-tparm-arg to override tparm's argument type
14457 echo "$as_me:14457: checking for type of tparm args" >&5
14458 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14459
14460 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14461 if test "${with_tparm_arg+set}" = set; then
14462   withval="$with_tparm_arg"
14463   NCURSES_TPARM_ARG="$withval"
14464 else
14465   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14466 fi;
14467 echo "$as_me:14467: result: $NCURSES_TPARM_ARG" >&5
14468 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14469
14470 ### Enable compiling-in rcs id's
14471 echo "$as_me:14471: checking if RCS identifiers should be compiled-in" >&5
14472 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14473
14474 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14475 if test "${with_rcs_ids+set}" = set; then
14476   withval="$with_rcs_ids"
14477   with_rcs_ids=$withval
14478 else
14479   with_rcs_ids=no
14480 fi;
14481 echo "$as_me:14481: result: $with_rcs_ids" >&5
14482 echo "${ECHO_T}$with_rcs_ids" >&6
14483 test "x$with_rcs_ids" = xyes &&
14484 cat >>confdefs.h <<\EOF
14485 #define USE_RCS_IDS 1
14486 EOF
14487
14488 ###############################################################################
14489
14490 echo "$as_me:14490: checking format of man-pages" >&5
14491 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14492
14493 # Check whether --with-manpage-format or --without-manpage-format was given.
14494 if test "${with_manpage_format+set}" = set; then
14495   withval="$with_manpage_format"
14496   MANPAGE_FORMAT=$withval
14497 else
14498   MANPAGE_FORMAT=unknown
14499 fi;
14500
14501 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14502 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14503
14504 cf_unknown=
14505
14506 case "$MANPAGE_FORMAT" in
14507 (unknown)
14508         if test -z "$MANPATH" ; then
14509                 MANPATH="/usr/man:/usr/share/man"
14510         fi
14511
14512         # look for the 'date' man-page (it is most likely to be installed!)
14513         MANPAGE_FORMAT=
14514         cf_preform="no"
14515         cf_catonly="yes"
14516         cf_example="date"
14517
14518         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14519         for cf_dir in $MANPATH; do
14520                 test -z "$cf_dir" && cf_dir=/usr/man
14521                 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
14522                 do
14523                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14524                         if test "x$cf_test" = "x$cf_name" ; then
14525
14526                                 case "$cf_name" in
14527                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14528                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14529                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14530                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14531                                 esac
14532
14533                                 case "$cf_name" in
14534                                 ($cf_dir/man*)
14535                                         cf_catonly=no
14536                                         ;;
14537                                 ($cf_dir/cat*)
14538                                         cf_preform=yes
14539                                         ;;
14540                                 esac
14541                                 break
14542                         fi
14543
14544                         # if we found a match in either man* or cat*, stop looking
14545                         if test -n "$MANPAGE_FORMAT" ; then
14546                                 cf_found=no
14547                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14548                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14549                                 case "$cf_name" in
14550                                 ($cf_dir/cat*)
14551                                         cf_found=yes
14552                                         ;;
14553                                 esac
14554                                 test "$cf_found" = yes && break
14555                         fi
14556                 done
14557                 # only check the first directory in $MANPATH where we find manpages
14558                 if test -n "$MANPAGE_FORMAT" ; then
14559                         break
14560                 fi
14561         done
14562         # if we did not find the example, just assume it is normal
14563         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14564         IFS="$ac_save_ifs"
14565         ;;
14566 (*)
14567         for cf_option in $MANPAGE_FORMAT; do
14568         case "$cf_option" in
14569         (gzip|compress|BSDI|normal|formatted|catonly)
14570                 ;;
14571         (*)
14572                 cf_unknown="$cf_unknown $cf_option"
14573                 ;;
14574         esac
14575         done
14576         ;;
14577 esac
14578
14579 echo "$as_me:14579: result: $MANPAGE_FORMAT" >&5
14580 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14581 if test -n "$cf_unknown" ; then
14582         { echo "$as_me:14582: WARNING: Unexpected manpage-format $cf_unknown" >&5
14583 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14584 fi
14585
14586 echo "$as_me:14586: checking for manpage renaming" >&5
14587 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14588
14589 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14590 if test "${with_manpage_renames+set}" = set; then
14591   withval="$with_manpage_renames"
14592   MANPAGE_RENAMES=$withval
14593 else
14594   MANPAGE_RENAMES=yes
14595 fi;
14596
14597 case ".$MANPAGE_RENAMES" in
14598 (.no)
14599         ;;
14600 (.|.yes)
14601         # Debian 'man' program?
14602         if test -f /etc/debian_version ; then
14603                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14604         else
14605                 MANPAGE_RENAMES=no
14606         fi
14607         ;;
14608 esac
14609
14610 if test "$MANPAGE_RENAMES" != no ; then
14611         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14612                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14613         elif test ! -f "$MANPAGE_RENAMES" ; then
14614                 { { echo "$as_me:14614: error: not a filename: $MANPAGE_RENAMES" >&5
14615 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14616    { (exit 1); exit 1; }; }
14617         fi
14618
14619         test ! -d man && mkdir man
14620
14621         # Construct a sed-script to perform renaming within man-pages
14622         if test -n "$MANPAGE_RENAMES" ; then
14623                 test ! -d man && mkdir man
14624                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14625         fi
14626 fi
14627
14628 echo "$as_me:14628: result: $MANPAGE_RENAMES" >&5
14629 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14630
14631 echo "$as_me:14631: checking if manpage aliases will be installed" >&5
14632 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14633
14634 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14635 if test "${with_manpage_aliases+set}" = set; then
14636   withval="$with_manpage_aliases"
14637   MANPAGE_ALIASES=$withval
14638 else
14639   MANPAGE_ALIASES=yes
14640 fi;
14641
14642 echo "$as_me:14642: result: $MANPAGE_ALIASES" >&5
14643 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14644
14645 case "x$LN_S" in
14646 (xln*)
14647         cf_use_symlinks=yes
14648         ;;
14649 (*)
14650         cf_use_symlinks=no
14651         ;;
14652 esac
14653
14654 MANPAGE_SYMLINKS=no
14655 if test "$MANPAGE_ALIASES" = yes ; then
14656 echo "$as_me:14656: checking if manpage symlinks should be used" >&5
14657 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14658
14659 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14660 if test "${with_manpage_symlinks+set}" = set; then
14661   withval="$with_manpage_symlinks"
14662   MANPAGE_SYMLINKS=$withval
14663 else
14664   MANPAGE_SYMLINKS=$cf_use_symlinks
14665 fi;
14666
14667 if test "$$cf_use_symlinks" = no; then
14668 if test "$MANPAGE_SYMLINKS" = yes ; then
14669         { echo "$as_me:14669: WARNING: cannot make symlinks" >&5
14670 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14671         MANPAGE_SYMLINKS=no
14672 fi
14673 fi
14674
14675 echo "$as_me:14675: result: $MANPAGE_SYMLINKS" >&5
14676 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14677 fi
14678
14679 echo "$as_me:14679: checking for manpage tbl" >&5
14680 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14681
14682 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14683 if test "${with_manpage_tbl+set}" = set; then
14684   withval="$with_manpage_tbl"
14685   MANPAGE_TBL=$withval
14686 else
14687   MANPAGE_TBL=no
14688 fi;
14689
14690 echo "$as_me:14690: result: $MANPAGE_TBL" >&5
14691 echo "${ECHO_T}$MANPAGE_TBL" >&6
14692
14693 if test "$prefix" = "NONE" ; then
14694         cf_prefix="$ac_default_prefix"
14695 else
14696         cf_prefix="$prefix"
14697 fi
14698
14699 case "$MANPAGE_FORMAT" in
14700 (*catonly*)
14701         cf_format=yes
14702         cf_inboth=no
14703         ;;
14704 (*formatted*)
14705         cf_format=yes
14706         cf_inboth=yes
14707         ;;
14708 (*)
14709         cf_format=no
14710         cf_inboth=no
14711         ;;
14712 esac
14713
14714 test ! -d man && mkdir man
14715
14716 cf_so_strip=
14717 cf_compress=
14718 case "$MANPAGE_FORMAT" in
14719 (*compress*)
14720         cf_so_strip="Z"
14721         cf_compress=compress
14722         ;;
14723 (*gzip*)
14724         cf_so_strip="gz"
14725         cf_compress=gzip
14726         ;;
14727 esac
14728
14729 cf_edit_man=./edit_man.sh
14730 cf_man_alias=`pwd`/man_alias.sed
14731
14732 cat >$cf_edit_man <<CF_EOF
14733 #! $SHELL
14734 # this script is generated by the configure-script CF_MAN_PAGES macro.
14735
14736 prefix="$cf_prefix"
14737 datarootdir="$datarootdir"
14738 datadir="$datadir"
14739
14740 NCURSES_MAJOR="$NCURSES_MAJOR"
14741 NCURSES_MINOR="$NCURSES_MINOR"
14742 NCURSES_PATCH="$NCURSES_PATCH"
14743
14744 NCURSES_OSPEED="$NCURSES_OSPEED"
14745 TERMINFO="$TERMINFO"
14746
14747 INSTALL="$INSTALL"
14748 INSTALL_DATA="$INSTALL_DATA"
14749
14750 transform="$program_transform_name"
14751
14752 TMP=\${TMPDIR:=/tmp}/man\$\$
14753 trap "rm -f \$TMP" 0 1 2 3 15
14754
14755 form=\$1
14756 shift || exit 1
14757
14758 verb=\$1
14759 shift || exit 1
14760
14761 mandir=\$1
14762 shift || exit 1
14763
14764 srcdir=\$1
14765 top_srcdir=\$srcdir/..
14766 shift || exit 1
14767
14768 if test "\$form" = normal ; then
14769         if test "$cf_format" = yes ; then
14770         if test "$cf_inboth" = no ; then
14771                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14772                 exit $?
14773         fi
14774         fi
14775         cf_subdir=\$mandir/man
14776         cf_tables=$MANPAGE_TBL
14777 else
14778         cf_subdir=\$mandir/cat
14779         cf_tables=yes
14780 fi
14781
14782 # process the list of source-files
14783 for i in "\$@" ; do
14784 case \$i in
14785 (*.orig|*.rej) ;;
14786 (*.[0-9]*)
14787         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14788         if test "\$verb" = installing ; then
14789         if test ! -d "\$cf_subdir\${section}" ; then
14790                 mkdir -p "\$cf_subdir\$section"
14791         fi
14792         fi
14793
14794         # replace variables in man page
14795         if test ! -f "$cf_man_alias" ; then
14796 cat >>$cf_man_alias <<-CF_EOF2
14797                 s,@DATADIR@,\$datadir,g
14798                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14799                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14800                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14801                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14802                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14803                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14804 CF_EOF
14805
14806         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14807         do
14808                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14809                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14810 cat >>$cf_edit_man <<-CF_EOF
14811                 s,@$cf_NAME@,$cf_name,g
14812 CF_EOF
14813         done
14814
14815 cat >>$cf_edit_man <<CF_EOF
14816 CF_EOF2
14817                 echo "...made $cf_man_alias"
14818         fi
14819
14820         aliases=
14821         cf_source=\`basename "\$i"\`
14822         inalias=\$cf_source
14823         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14824         if test ! -f "\$inalias" ; then
14825                 echo ".. skipped \$cf_source"
14826                 continue
14827         fi
14828 CF_EOF
14829
14830 if test "$MANPAGE_ALIASES" != no ; then
14831 cat >>$cf_edit_man <<CF_EOF
14832         nCurses=ignore.3x
14833         test "$with_curses_h" = yes && nCurses=ncurses.3x
14834         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14835 CF_EOF
14836 fi
14837
14838 if test "$MANPAGE_RENAMES" = no ; then
14839 cat >>$cf_edit_man <<CF_EOF
14840         # perform program transformations for section 1 man pages
14841         if test \$section = 1 ; then
14842                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14843         else
14844                 cf_target=\$cf_subdir\${section}/\$cf_source
14845         fi
14846 CF_EOF
14847 else
14848 cat >>$cf_edit_man <<CF_EOF
14849         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14850         if test -z "\$cf_target" ; then
14851                 echo "? missing rename for \$cf_source"
14852                 cf_target="\$cf_source"
14853         fi
14854         cf_target="\$cf_subdir\${section}/\${cf_target}"
14855
14856 CF_EOF
14857 fi
14858
14859 cat >>$cf_edit_man <<CF_EOF
14860         sed     -f "$cf_man_alias" \\
14861 CF_EOF
14862
14863 if test -f "$MANPAGE_RENAMES" ; then
14864 cat >>$cf_edit_man <<CF_EOF
14865                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14866 CF_EOF
14867 else
14868 cat >>$cf_edit_man <<CF_EOF
14869                 < "\$i" >\$TMP
14870 CF_EOF
14871 fi
14872
14873 cat >>$cf_edit_man <<CF_EOF
14874 if test \$cf_tables = yes ; then
14875         tbl \$TMP >\$TMP.out
14876         mv \$TMP.out \$TMP
14877 fi
14878 CF_EOF
14879
14880 if test "$with_overwrite" != yes ; then
14881 cat >>$cf_edit_man <<CF_EOF
14882         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14883         mv \$TMP.out \$TMP
14884 CF_EOF
14885 fi
14886
14887 if test "$with_curses_h" != yes ; then
14888 cat >>$cf_edit_man <<CF_EOF
14889         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14890         mv \$TMP.out \$TMP
14891 CF_EOF
14892 fi
14893
14894 cat >>$cf_edit_man <<CF_EOF
14895         if test "\$form" = format ; then
14896                 nroff -man \$TMP >\$TMP.out
14897                 mv \$TMP.out \$TMP
14898         fi
14899 CF_EOF
14900
14901 if test -n "$cf_compress" ; then
14902 cat >>$cf_edit_man <<CF_EOF
14903         if test "\$verb" = installing ; then
14904         if ( "$cf_compress" -f \$TMP )
14905         then
14906                 mv \$TMP.$cf_so_strip \$TMP
14907         fi
14908         fi
14909         cf_target="\$cf_target.$cf_so_strip"
14910 CF_EOF
14911 fi
14912
14913 case "$MANPAGE_FORMAT" in
14914 (*BSDI*)
14915 cat >>$cf_edit_man <<CF_EOF
14916         if test "\$form" = format ; then
14917                 # BSDI installs only .0 suffixes in the cat directories
14918                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14919         fi
14920 CF_EOF
14921   ;;
14922 esac
14923
14924 cat >>$cf_edit_man <<CF_EOF
14925         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14926         if test "\$verb" = installing ; then
14927                 echo "\$verb \$cf_target"
14928                 \$INSTALL_DATA \$TMP "\$cf_target"
14929                 test -d "\$cf_subdir\${section}" &&
14930                 test -n "\$aliases" && (
14931                         cd "\$cf_subdir\${section}" && (
14932                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14933                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14934                                 cf_target=\`basename "\$cf_target"\`
14935                                 for cf_alias in \$aliases
14936                                 do
14937                                         if test "\$section" = 1 ; then
14938                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14939                                         fi
14940
14941                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14942                                                 if test -f "\$cf_alias\${suffix}" ; then
14943                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14944                                                         then
14945                                                                 continue
14946                                                         fi
14947                                                 fi
14948                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14949 CF_EOF
14950 case "x$LN_S" in
14951 (*-f)
14952 cat >>$cf_edit_man <<CF_EOF
14953                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14954 CF_EOF
14955         ;;
14956 (*)
14957 cat >>$cf_edit_man <<CF_EOF
14958                                                 rm -f "\$cf_alias\${suffix}"
14959                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14960 CF_EOF
14961         ;;
14962 esac
14963 cat >>$cf_edit_man <<CF_EOF
14964                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14965                                                 echo ".so \$cf_source" >\$TMP
14966 CF_EOF
14967 if test -n "$cf_compress" ; then
14968 cat >>$cf_edit_man <<CF_EOF
14969                                                 if test -n "$cf_so_strip" ; then
14970                                                         "$cf_compress" -f \$TMP
14971                                                         mv \$TMP.$cf_so_strip \$TMP
14972                                                 fi
14973 CF_EOF
14974 fi
14975 cat >>$cf_edit_man <<CF_EOF
14976                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14977                                                 rm -f "\$cf_alias\${suffix}"
14978                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14979                                         fi
14980                                 done
14981                         )
14982                 )
14983         elif test "\$verb" = removing ; then
14984                 test -f "\$cf_target" && (
14985                         echo "\$verb \$cf_target"
14986                         rm -f "\$cf_target"
14987                 )
14988                 test -d "\$cf_subdir\${section}" &&
14989                 test -n "\$aliases" && (
14990                         cd "\$cf_subdir\${section}" && (
14991                                 for cf_alias in \$aliases
14992                                 do
14993                                         if test "\$section" = 1 ; then
14994                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14995                                         fi
14996
14997                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14998                                         rm -f "\$cf_alias\${suffix}"
14999                                 done
15000                         )
15001                 )
15002         else
15003 #               echo ".hy 0"
15004                 cat \$TMP
15005         fi
15006         ;;
15007 esac
15008 done
15009
15010 if test "$cf_inboth" = yes ; then
15011 if test "\$form" != format ; then
15012         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15013 fi
15014 fi
15015
15016 exit 0
15017 CF_EOF
15018 chmod 755 "$cf_edit_man"
15019
15020 ###############################################################################
15021
15022 ### Note that some functions (such as const) are normally disabled anyway.
15023 echo "$as_me:15023: checking if you want to build with function extensions" >&5
15024 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15025
15026 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15027 if test "${enable_ext_funcs+set}" = set; then
15028   enableval="$enable_ext_funcs"
15029   with_ext_funcs=$enableval
15030 else
15031   with_ext_funcs=yes
15032 fi;
15033 echo "$as_me:15033: result: $with_ext_funcs" >&5
15034 echo "${ECHO_T}$with_ext_funcs" >&6
15035 if test "x$with_ext_funcs" = xyes ; then
15036         NCURSES_EXT_FUNCS=1
15037
15038 cat >>confdefs.h <<\EOF
15039 #define NCURSES_EXT_FUNCS 1
15040 EOF
15041
15042 cat >>confdefs.h <<\EOF
15043 #define HAVE_ASSUME_DEFAULT_COLORS 1
15044 EOF
15045
15046 cat >>confdefs.h <<\EOF
15047 #define HAVE_CURSES_VERSION 1
15048 EOF
15049
15050 cat >>confdefs.h <<\EOF
15051 #define HAVE_HAS_KEY 1
15052 EOF
15053
15054 cat >>confdefs.h <<\EOF
15055 #define HAVE_RESIZETERM 1
15056 EOF
15057
15058 cat >>confdefs.h <<\EOF
15059 #define HAVE_RESIZE_TERM 1
15060 EOF
15061
15062 cat >>confdefs.h <<\EOF
15063 #define HAVE_TERM_ENTRY_H 1
15064 EOF
15065
15066 cat >>confdefs.h <<\EOF
15067 #define HAVE_USE_DEFAULT_COLORS 1
15068 EOF
15069
15070 cat >>confdefs.h <<\EOF
15071 #define HAVE_USE_EXTENDED_NAMES 1
15072 EOF
15073
15074 cat >>confdefs.h <<\EOF
15075 #define HAVE_USE_SCREEN 1
15076 EOF
15077
15078 cat >>confdefs.h <<\EOF
15079 #define HAVE_USE_WINDOW 1
15080 EOF
15081
15082 cat >>confdefs.h <<\EOF
15083 #define HAVE_WRESIZE 1
15084 EOF
15085
15086         GENERATED_EXT_FUNCS=generated
15087         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15088 else
15089         NCURSES_EXT_FUNCS=0
15090         GENERATED_EXT_FUNCS=
15091 fi
15092
15093 echo "$as_me:15093: checking if you want to build with SCREEN extensions" >&5
15094 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15095
15096 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15097 if test "${enable_sp_funcs+set}" = set; then
15098   enableval="$enable_sp_funcs"
15099   with_sp_funcs=$enableval
15100 else
15101   with_sp_funcs=$cf_dft_ext_spfuncs
15102 fi;
15103 echo "$as_me:15103: result: $with_sp_funcs" >&5
15104 echo "${ECHO_T}$with_sp_funcs" >&6
15105 if test "x$with_sp_funcs" = xyes ; then
15106         NCURSES_SP_FUNCS=1
15107
15108 cat >>confdefs.h <<\EOF
15109 #define NCURSES_SP_FUNCS 1
15110 EOF
15111
15112 cat >>confdefs.h <<\EOF
15113 #define HAVE_TPUTS_SP 1
15114 EOF
15115
15116         GENERATED_SP_FUNCS=generated
15117 else
15118         NCURSES_SP_FUNCS=0
15119         GENERATED_SP_FUNCS=
15120 fi
15121
15122 echo "$as_me:15122: checking if you want to build with terminal-driver" >&5
15123 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15124
15125 # Check whether --enable-term-driver or --disable-term-driver was given.
15126 if test "${enable_term_driver+set}" = set; then
15127   enableval="$enable_term_driver"
15128   with_term_driver=$enableval
15129 else
15130   with_term_driver=no
15131 fi;
15132 echo "$as_me:15132: result: $with_term_driver" >&5
15133 echo "${ECHO_T}$with_term_driver" >&6
15134 if test "x$with_term_driver" = xyes ; then
15135
15136 cat >>confdefs.h <<\EOF
15137 #define USE_TERM_DRIVER 1
15138 EOF
15139
15140         if test "x$with_termlib" != xno ; then
15141                 { { echo "$as_me:15141: error: The term-driver option conflicts with the termlib option" >&5
15142 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15143    { (exit 1); exit 1; }; }
15144         fi
15145         if test "x$with_sp_funcs" != xyes ; then
15146                 { { echo "$as_me:15146: error: The term-driver option relies upon sp-funcs" >&5
15147 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15148    { (exit 1); exit 1; }; }
15149         fi
15150 fi
15151
15152 ###   use option --enable-const to turn on use of const beyond that in XSI.
15153 echo "$as_me:15153: checking for extended use of const keyword" >&5
15154 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15155
15156 # Check whether --enable-const or --disable-const was given.
15157 if test "${enable_const+set}" = set; then
15158   enableval="$enable_const"
15159   with_ext_const=$enableval
15160 else
15161   with_ext_const=$cf_dft_ext_const
15162 fi;
15163 echo "$as_me:15163: result: $with_ext_const" >&5
15164 echo "${ECHO_T}$with_ext_const" >&6
15165 NCURSES_CONST='/*nothing*/'
15166 if test "x$with_ext_const" = xyes ; then
15167         NCURSES_CONST=const
15168 fi
15169
15170 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15171 echo "$as_me:15171: checking if you want to use extended colors" >&5
15172 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15173
15174 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15175 if test "${enable_ext_colors+set}" = set; then
15176   enableval="$enable_ext_colors"
15177   with_ext_colors=$enableval
15178 else
15179   with_ext_colors=$cf_dft_ext_colors
15180 fi;
15181 echo "$as_me:15181: result: $with_ext_colors" >&5
15182 echo "${ECHO_T}$with_ext_colors" >&6
15183 NCURSES_EXT_COLORS=0
15184 if test "x$with_ext_colors" = xyes ; then
15185         if test "x$with_widec" != xyes ; then
15186                 { echo "$as_me:15186: WARNING: This option applies only to wide-character library" >&5
15187 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15188         else
15189                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15190
15191 if test "${with_abi_version+set}" != set; then
15192         case "$cf_cv_rel_version" in
15193         (5.*)
15194                 cf_cv_rel_version=6.0
15195                 cf_cv_abi_version=6
15196                 { echo "$as_me:15196: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15197 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15198                 ;;
15199         esac
15200 fi
15201
15202                 NCURSES_EXT_COLORS=1
15203
15204 cat >>confdefs.h <<\EOF
15205 #define NCURSES_EXT_COLORS 1
15206 EOF
15207
15208 cat >>confdefs.h <<\EOF
15209 #define HAVE_ALLOC_PAIR 1
15210 EOF
15211
15212 cat >>confdefs.h <<\EOF
15213 #define HAVE_INIT_EXTENDED_COLOR 1
15214 EOF
15215
15216 cat >>confdefs.h <<\EOF
15217 #define HAVE_RESET_COLOR_PAIRS 1
15218 EOF
15219
15220         fi
15221 fi
15222
15223 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15224 echo "$as_me:15224: checking if you want to use extended mouse encoding" >&5
15225 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15226
15227 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15228 if test "${enable_ext_mouse+set}" = set; then
15229   enableval="$enable_ext_mouse"
15230   with_ext_mouse=$enableval
15231 else
15232   with_ext_mouse=$cf_dft_ext_mouse
15233 fi;
15234 echo "$as_me:15234: result: $with_ext_mouse" >&5
15235 echo "${ECHO_T}$with_ext_mouse" >&6
15236 NCURSES_MOUSE_VERSION=1
15237 if test "x$with_ext_mouse" = xyes ; then
15238         NCURSES_MOUSE_VERSION=2
15239
15240 if test "${with_abi_version+set}" != set; then
15241         case "$cf_cv_rel_version" in
15242         (5.*)
15243                 cf_cv_rel_version=6.0
15244                 cf_cv_abi_version=6
15245                 { echo "$as_me:15245: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15246 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15247                 ;;
15248         esac
15249 fi
15250
15251 fi
15252
15253 ###   use option --enable-ext-putwin to turn on extended screendumps
15254 echo "$as_me:15254: checking if you want to use extended putwin/screendump" >&5
15255 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15256
15257 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15258 if test "${enable_ext_putwin+set}" = set; then
15259   enableval="$enable_ext_putwin"
15260   with_ext_putwin=$enableval
15261 else
15262   with_ext_putwin=$cf_dft_ext_putwin
15263 fi;
15264 echo "$as_me:15264: result: $with_ext_putwin" >&5
15265 echo "${ECHO_T}$with_ext_putwin" >&6
15266 if test "x$with_ext_putwin" = xyes ; then
15267
15268 cat >>confdefs.h <<\EOF
15269 #define NCURSES_EXT_PUTWIN 1
15270 EOF
15271
15272 fi
15273
15274 echo "$as_me:15274: checking if you want \$NCURSES_NO_PADDING code" >&5
15275 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15276
15277 # Check whether --enable-no-padding or --disable-no-padding was given.
15278 if test "${enable_no_padding+set}" = set; then
15279   enableval="$enable_no_padding"
15280   with_no_padding=$enableval
15281 else
15282   with_no_padding=$with_ext_funcs
15283 fi;
15284 echo "$as_me:15284: result: $with_no_padding" >&5
15285 echo "${ECHO_T}$with_no_padding" >&6
15286 test "x$with_no_padding" = xyes &&
15287 cat >>confdefs.h <<\EOF
15288 #define NCURSES_NO_PADDING 1
15289 EOF
15290
15291 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15292 echo "$as_me:15292: checking if you want SIGWINCH handler" >&5
15293 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15294
15295 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15296 if test "${enable_sigwinch+set}" = set; then
15297   enableval="$enable_sigwinch"
15298   with_sigwinch=$enableval
15299 else
15300   with_sigwinch=$with_ext_funcs
15301 fi;
15302 echo "$as_me:15302: result: $with_sigwinch" >&5
15303 echo "${ECHO_T}$with_sigwinch" >&6
15304 test "x$with_sigwinch" = xyes &&
15305 cat >>confdefs.h <<\EOF
15306 #define USE_SIGWINCH 1
15307 EOF
15308
15309 ###   use option --enable-tcap-names to allow user to define new capabilities
15310 echo "$as_me:15310: checking if you want user-definable terminal capabilities like termcap" >&5
15311 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15312
15313 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15314 if test "${enable_tcap_names+set}" = set; then
15315   enableval="$enable_tcap_names"
15316   with_tcap_names=$enableval
15317 else
15318   with_tcap_names=$with_ext_funcs
15319 fi;
15320 echo "$as_me:15320: result: $with_tcap_names" >&5
15321 echo "${ECHO_T}$with_tcap_names" >&6
15322 NCURSES_XNAMES=0
15323 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15324
15325 ##############################################################################
15326
15327 echo "$as_me:15327: checking if you want to link with the pthread library" >&5
15328 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15329
15330 # Check whether --with-pthread or --without-pthread was given.
15331 if test "${with_pthread+set}" = set; then
15332   withval="$with_pthread"
15333   with_pthread=$withval
15334 else
15335   with_pthread=no
15336 fi;
15337 echo "$as_me:15337: result: $with_pthread" >&5
15338 echo "${ECHO_T}$with_pthread" >&6
15339
15340 if test "$with_pthread" != no ; then
15341         echo "$as_me:15341: checking for pthread.h" >&5
15342 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15343 if test "${ac_cv_header_pthread_h+set}" = set; then
15344   echo $ECHO_N "(cached) $ECHO_C" >&6
15345 else
15346   cat >"conftest.$ac_ext" <<_ACEOF
15347 #line 15347 "configure"
15348 #include "confdefs.h"
15349 #include <pthread.h>
15350 _ACEOF
15351 if { (eval echo "$as_me:15351: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15352   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15353   ac_status=$?
15354   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15355   rm -f conftest.er1
15356   cat conftest.err >&5
15357   echo "$as_me:15357: \$? = $ac_status" >&5
15358   (exit "$ac_status"); } >/dev/null; then
15359   if test -s conftest.err; then
15360     ac_cpp_err=$ac_c_preproc_warn_flag
15361   else
15362     ac_cpp_err=
15363   fi
15364 else
15365   ac_cpp_err=yes
15366 fi
15367 if test -z "$ac_cpp_err"; then
15368   ac_cv_header_pthread_h=yes
15369 else
15370   echo "$as_me: failed program was:" >&5
15371   cat "conftest.$ac_ext" >&5
15372   ac_cv_header_pthread_h=no
15373 fi
15374 rm -f conftest.err "conftest.$ac_ext"
15375 fi
15376 echo "$as_me:15376: result: $ac_cv_header_pthread_h" >&5
15377 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15378 if test "$ac_cv_header_pthread_h" = yes; then
15379
15380 cat >>confdefs.h <<\EOF
15381 #define HAVE_PTHREADS_H 1
15382 EOF
15383
15384         for cf_lib_pthread in pthread c_r
15385         do
15386             echo "$as_me:15386: checking if we can link with the $cf_lib_pthread library" >&5
15387 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15388             cf_save_LIBS="$LIBS"
15389
15390 cf_add_libs="$LIBS"
15391 # reverse order
15392 cf_add_0lib=
15393 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15394 # filter duplicates
15395 for cf_add_1lib in $cf_add_0lib; do
15396         for cf_add_2lib in $cf_add_libs; do
15397                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15398                         cf_add_1lib=
15399                         break
15400                 fi
15401         done
15402         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15403 done
15404 LIBS="$cf_add_libs"
15405
15406             cat >"conftest.$ac_ext" <<_ACEOF
15407 #line 15407 "configure"
15408 #include "confdefs.h"
15409
15410 #include <pthread.h>
15411
15412 int
15413 main (void)
15414 {
15415
15416                 int rc = pthread_create(0,0,0,0);
15417                 int r2 = pthread_mutexattr_settype(0, 0);
15418
15419   ;
15420   return 0;
15421 }
15422 _ACEOF
15423 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15424 if { (eval echo "$as_me:15424: \"$ac_link\"") >&5
15425   (eval $ac_link) 2>&5
15426   ac_status=$?
15427   echo "$as_me:15427: \$? = $ac_status" >&5
15428   (exit "$ac_status"); } &&
15429          { ac_try='test -s "conftest$ac_exeext"'
15430   { (eval echo "$as_me:15430: \"$ac_try\"") >&5
15431   (eval $ac_try) 2>&5
15432   ac_status=$?
15433   echo "$as_me:15433: \$? = $ac_status" >&5
15434   (exit "$ac_status"); }; }; then
15435   with_pthread=yes
15436 else
15437   echo "$as_me: failed program was:" >&5
15438 cat "conftest.$ac_ext" >&5
15439 with_pthread=no
15440 fi
15441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15442             LIBS="$cf_save_LIBS"
15443             echo "$as_me:15443: result: $with_pthread" >&5
15444 echo "${ECHO_T}$with_pthread" >&6
15445             test "$with_pthread" = yes && break
15446         done
15447
15448         if test "$with_pthread" = yes ; then
15449
15450 cf_add_libs="$LIBS"
15451 # reverse order
15452 cf_add_0lib=
15453 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15454 # filter duplicates
15455 for cf_add_1lib in $cf_add_0lib; do
15456         for cf_add_2lib in $cf_add_libs; do
15457                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15458                         cf_add_1lib=
15459                         break
15460                 fi
15461         done
15462         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15463 done
15464 LIBS="$cf_add_libs"
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_LIBPTHREADS 1
15468 EOF
15469
15470         else
15471             { { echo "$as_me:15471: error: Cannot link with pthread library" >&5
15472 echo "$as_me: error: Cannot link with pthread library" >&2;}
15473    { (exit 1); exit 1; }; }
15474         fi
15475
15476 fi
15477
15478 fi
15479
15480 if test "x$with_pthread" != xno; then
15481         echo "$as_me:15481: checking for pthread_kill" >&5
15482 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15483 if test "${ac_cv_func_pthread_kill+set}" = set; then
15484   echo $ECHO_N "(cached) $ECHO_C" >&6
15485 else
15486   cat >"conftest.$ac_ext" <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489 #define pthread_kill autoconf_temporary
15490 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15491 #undef pthread_kill
15492
15493 #ifdef __cplusplus
15494 extern "C"
15495 #endif
15496
15497 /* We use char because int might match the return type of a gcc2
15498    builtin and then its argument prototype would still apply.  */
15499 char pthread_kill (void);
15500
15501 int
15502 main (void)
15503 {
15504
15505 /* The GNU C library defines stubs for functions which it implements
15506     to always fail with ENOSYS.  Some functions are actually named
15507     something starting with __ and the normal name is an alias.  */
15508 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15509 #error found stub for pthread_kill
15510 #endif
15511
15512         return pthread_kill ();
15513   ;
15514   return 0;
15515 }
15516 _ACEOF
15517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15518 if { (eval echo "$as_me:15518: \"$ac_link\"") >&5
15519   (eval $ac_link) 2>&5
15520   ac_status=$?
15521   echo "$as_me:15521: \$? = $ac_status" >&5
15522   (exit "$ac_status"); } &&
15523          { ac_try='test -s "conftest$ac_exeext"'
15524   { (eval echo "$as_me:15524: \"$ac_try\"") >&5
15525   (eval $ac_try) 2>&5
15526   ac_status=$?
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit "$ac_status"); }; }; then
15529   ac_cv_func_pthread_kill=yes
15530 else
15531   echo "$as_me: failed program was:" >&5
15532 cat "conftest.$ac_ext" >&5
15533 ac_cv_func_pthread_kill=no
15534 fi
15535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15536 fi
15537 echo "$as_me:15537: result: $ac_cv_func_pthread_kill" >&5
15538 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15539 if test "$ac_cv_func_pthread_kill" = yes; then
15540
15541                 echo "$as_me:15541: checking if you want to allow EINTR in wgetch with pthreads" >&5
15542 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15543
15544 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15545 if test "${enable_pthreads_eintr+set}" = set; then
15546   enableval="$enable_pthreads_eintr"
15547   use_pthreads_eintr=$enableval
15548 else
15549   use_pthreads_eintr=no
15550 fi;
15551                 echo "$as_me:15551: result: $use_pthreads_eintr" >&5
15552 echo "${ECHO_T}$use_pthreads_eintr" >&6
15553                 if test "x$use_pthreads_eintr" = xyes ; then
15554
15555 cat >>confdefs.h <<\EOF
15556 #define USE_PTHREADS_EINTR 1
15557 EOF
15558
15559                 fi
15560 fi
15561
15562         echo "$as_me:15562: checking if you want to use weak-symbols for pthreads" >&5
15563 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15564
15565 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15566 if test "${enable_weak_symbols+set}" = set; then
15567   enableval="$enable_weak_symbols"
15568   use_weak_symbols=$enableval
15569 else
15570   use_weak_symbols=no
15571 fi;
15572         echo "$as_me:15572: result: $use_weak_symbols" >&5
15573 echo "${ECHO_T}$use_weak_symbols" >&6
15574         if test "x$use_weak_symbols" = xyes ; then
15575
15576 echo "$as_me:15576: checking if $CC supports weak symbols" >&5
15577 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15578 if test "${cf_cv_weak_symbols+set}" = set; then
15579   echo $ECHO_N "(cached) $ECHO_C" >&6
15580 else
15581
15582 cat >"conftest.$ac_ext" <<_ACEOF
15583 #line 15583 "configure"
15584 #include "confdefs.h"
15585
15586 #include <stdio.h>
15587 int
15588 main (void)
15589 {
15590
15591 #if defined(__GNUC__)
15592 #  if defined __USE_ISOC99
15593 #    define _cat_pragma(exp)    _Pragma(#exp)
15594 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15595 #  else
15596 #    define _weak_pragma(exp)
15597 #  endif
15598 #  define _declare(name)        __extension__ extern __typeof__(name) name
15599 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15600 #endif
15601
15602 weak_symbol(fopen);
15603
15604   ;
15605   return 0;
15606 }
15607 _ACEOF
15608 rm -f "conftest.$ac_objext"
15609 if { (eval echo "$as_me:15609: \"$ac_compile\"") >&5
15610   (eval $ac_compile) 2>&5
15611   ac_status=$?
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit "$ac_status"); } &&
15614          { ac_try='test -s "conftest.$ac_objext"'
15615   { (eval echo "$as_me:15615: \"$ac_try\"") >&5
15616   (eval $ac_try) 2>&5
15617   ac_status=$?
15618   echo "$as_me:15618: \$? = $ac_status" >&5
15619   (exit "$ac_status"); }; }; then
15620   cf_cv_weak_symbols=yes
15621 else
15622   echo "$as_me: failed program was:" >&5
15623 cat "conftest.$ac_ext" >&5
15624 cf_cv_weak_symbols=no
15625 fi
15626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15627
15628 fi
15629 echo "$as_me:15629: result: $cf_cv_weak_symbols" >&5
15630 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15631
15632         else
15633                 cf_cv_weak_symbols=no
15634         fi
15635
15636         if test "x$cf_cv_weak_symbols" = xyes ; then
15637
15638 cat >>confdefs.h <<\EOF
15639 #define USE_WEAK_SYMBOLS 1
15640 EOF
15641
15642         fi
15643 fi
15644
15645 PTHREAD=
15646 if test "x$with_pthread" = "xyes" ; then
15647
15648 cat >>confdefs.h <<\EOF
15649 #define USE_PTHREADS 1
15650 EOF
15651
15652         enable_reentrant=yes
15653         if test "x$cf_cv_weak_symbols" = xyes ; then
15654                 PTHREAD=-lpthread
15655
15656 cf_add_libs="$PRIVATE_LIBS"
15657 # reverse order
15658 cf_add_0lib=
15659 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15660 # filter duplicates
15661 for cf_add_1lib in $cf_add_0lib; do
15662         for cf_add_2lib in $cf_add_libs; do
15663                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15664                         cf_add_1lib=
15665                         break
15666                 fi
15667         done
15668         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15669 done
15670 PRIVATE_LIBS="$cf_add_libs"
15671
15672         fi
15673 fi
15674
15675 # Reentrant code has to be opaque; there's little advantage to making ncurses
15676 # opaque outside of that, so there is no --enable-opaque option.  We can use
15677 # this option without --with-pthreads, but this will be always set for
15678 # pthreads.
15679 echo "$as_me:15679: checking if you want reentrant code" >&5
15680 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15681
15682 # Check whether --enable-reentrant or --disable-reentrant was given.
15683 if test "${enable_reentrant+set}" = set; then
15684   enableval="$enable_reentrant"
15685   with_reentrant=$enableval
15686 else
15687   with_reentrant=no
15688 fi;
15689 echo "$as_me:15689: result: $with_reentrant" >&5
15690 echo "${ECHO_T}$with_reentrant" >&6
15691 if test "x$with_reentrant" = xyes ; then
15692         cf_cv_enable_reentrant=1
15693         cf_cv_enable_opaque="NCURSES_INTERNALS"
15694         NCURSES_SIZE_T=int
15695         if test "x$cf_cv_weak_symbols" = xyes ; then
15696
15697 # remove pthread library from $LIBS
15698 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15699
15700 cf_add_libs="$TEST_LIBS"
15701 # reverse order
15702 cf_add_0lib=
15703 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15704 # filter duplicates
15705 for cf_add_1lib in $cf_add_0lib; do
15706         for cf_add_2lib in $cf_add_libs; do
15707                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15708                         cf_add_1lib=
15709                         break
15710                 fi
15711         done
15712         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15713 done
15714 TEST_LIBS="$cf_add_libs"
15715
15716 cf_add_libs="$TEST_LIBS2"
15717 # reverse order
15718 cf_add_0lib=
15719 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15720 # filter duplicates
15721 for cf_add_1lib in $cf_add_0lib; do
15722         for cf_add_2lib in $cf_add_libs; do
15723                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15724                         cf_add_1lib=
15725                         break
15726                 fi
15727         done
15728         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15729 done
15730 TEST_LIBS2="$cf_add_libs"
15731
15732 cf_add_libs="$PRIVATE_LIBS"
15733 # reverse order
15734 cf_add_0lib=
15735 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15736 # filter duplicates
15737 for cf_add_1lib in $cf_add_0lib; do
15738         for cf_add_2lib in $cf_add_libs; do
15739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15740                         cf_add_1lib=
15741                         break
15742                 fi
15743         done
15744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15745 done
15746 PRIVATE_LIBS="$cf_add_libs"
15747
15748         else
15749                 # when not using weak symbols but with_reentrant,
15750                 # add 't' to the library suffix on all platforms
15751                 # except cygwin, where we only do that if ALSO
15752                 # compiling with full thread support.
15753                 case "$host" in
15754                 (*cygwin* | *msys*)
15755                         if test "$with_pthread" = "yes" ; then
15756                                 if test "x$disable_lib_suffixes" = "xno" ; then
15757                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15758                                 fi
15759                         fi ;;
15760                 (*)
15761                         if test "x$disable_lib_suffixes" = "xno" ; then
15762                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15763                         fi
15764                         ;;
15765                 esac
15766         fi
15767
15768 cat >>confdefs.h <<\EOF
15769 #define USE_REENTRANT 1
15770 EOF
15771
15772 if test "${with_abi_version+set}" != set; then
15773         case "$cf_cv_rel_version" in
15774         (5.*)
15775                 cf_cv_rel_version=6.0
15776                 cf_cv_abi_version=6
15777                 { echo "$as_me:15777: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15778 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15779                 ;;
15780         esac
15781 fi
15782
15783 else
15784         cf_cv_enable_reentrant=0
15785         cf_cv_enable_opaque="NCURSES_OPAQUE"
15786         NCURSES_SIZE_T=short
15787 fi
15788
15789 echo "$as_me:15789: checking if you want opaque curses-library structures" >&5
15790 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15791
15792 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15793 if test "${enable_opaque_curses+set}" = set; then
15794   enableval="$enable_opaque_curses"
15795   test "$enableval" != yes && enableval=no
15796         if test "$enableval" != "no" ; then
15797     enable_opaque_curses=yes
15798         else
15799
15800          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15801          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15802
15803         fi
15804 else
15805   enableval=no
15806
15807          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15808          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15809
15810 fi;
15811 echo "$as_me:15811: result: $enable_opaque_curses" >&5
15812 echo "${ECHO_T}$enable_opaque_curses" >&6
15813
15814 test "$cf_cv_enable_reentrant" = 1 && \
15815 test "$enable_opaque_curses" = no && \
15816 { { echo "$as_me:15816: error: reentrant configuration requires opaque library" >&5
15817 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15818    { (exit 1); exit 1; }; }
15819
15820 echo "$as_me:15820: checking if you want opaque form-library structures" >&5
15821 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15822
15823 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15824 if test "${enable_opaque_form+set}" = set; then
15825   enableval="$enable_opaque_form"
15826   enable_opaque_form=yes
15827 else
15828   enable_opaque_form=no
15829 fi;
15830 echo "$as_me:15830: result: $enable_opaque_form" >&5
15831 echo "${ECHO_T}$enable_opaque_form" >&6
15832
15833 echo "$as_me:15833: checking if you want opaque menu-library structures" >&5
15834 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15835
15836 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15837 if test "${enable_opaque_menu+set}" = set; then
15838   enableval="$enable_opaque_menu"
15839   enable_opaque_menu=yes
15840 else
15841   enable_opaque_menu=no
15842 fi;
15843 echo "$as_me:15843: result: $enable_opaque_menu" >&5
15844 echo "${ECHO_T}$enable_opaque_menu" >&6
15845
15846 echo "$as_me:15846: checking if you want opaque panel-library structures" >&5
15847 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15848
15849 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15850 if test "${enable_opaque_panel+set}" = set; then
15851   enableval="$enable_opaque_panel"
15852   enable_opaque_panel=yes
15853 else
15854   enable_opaque_panel=no
15855 fi;
15856 echo "$as_me:15856: result: $enable_opaque_panel" >&5
15857 echo "${ECHO_T}$enable_opaque_panel" >&6
15858
15859 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15860 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15861 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15862 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15863
15864 ### Allow using a different wrap-prefix
15865 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15866         echo "$as_me:15866: checking for prefix used to wrap public variables" >&5
15867 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15868
15869 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15870 if test "${with_wrap_prefix+set}" = set; then
15871   withval="$with_wrap_prefix"
15872   NCURSES_WRAP_PREFIX=$withval
15873 else
15874   NCURSES_WRAP_PREFIX=_nc_
15875 fi;
15876         echo "$as_me:15876: result: $NCURSES_WRAP_PREFIX" >&5
15877 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15878 else
15879         NCURSES_WRAP_PREFIX=_nc_
15880 fi
15881
15882 cat >>confdefs.h <<EOF
15883 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15884 EOF
15885
15886 ###############################################################################
15887 # These options are relatively safe to experiment with.
15888
15889 echo "$as_me:15889: checking if you want all development code" >&5
15890 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15891
15892 # Check whether --with-develop or --without-develop was given.
15893 if test "${with_develop+set}" = set; then
15894   withval="$with_develop"
15895   with_develop=$withval
15896 else
15897   with_develop=no
15898 fi;
15899 echo "$as_me:15899: result: $with_develop" >&5
15900 echo "${ECHO_T}$with_develop" >&6
15901
15902 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15903 echo "$as_me:15903: checking if you want hard-tabs code" >&5
15904 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15905
15906 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15907 if test "${enable_hard_tabs+set}" = set; then
15908   enableval="$enable_hard_tabs"
15909
15910 else
15911   enable_hard_tabs=$with_develop
15912 fi;
15913 echo "$as_me:15913: result: $enable_hard_tabs" >&5
15914 echo "${ECHO_T}$enable_hard_tabs" >&6
15915 test "x$enable_hard_tabs" = xyes &&
15916 cat >>confdefs.h <<\EOF
15917 #define USE_HARD_TABS 1
15918 EOF
15919
15920 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15921 echo "$as_me:15921: checking if you want limited support for xmc" >&5
15922 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15923
15924 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15925 if test "${enable_xmc_glitch+set}" = set; then
15926   enableval="$enable_xmc_glitch"
15927
15928 else
15929   enable_xmc_glitch=$with_develop
15930 fi;
15931 echo "$as_me:15931: result: $enable_xmc_glitch" >&5
15932 echo "${ECHO_T}$enable_xmc_glitch" >&6
15933 test "x$enable_xmc_glitch" = xyes &&
15934 cat >>confdefs.h <<\EOF
15935 #define USE_XMC_SUPPORT 1
15936 EOF
15937
15938 ###############################################################################
15939 # These are just experimental, probably should not be in a package:
15940
15941 echo "$as_me:15941: checking if you do not want to assume colors are white-on-black" >&5
15942 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15943
15944 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15945 if test "${enable_assumed_color+set}" = set; then
15946   enableval="$enable_assumed_color"
15947   with_assumed_color=$enableval
15948 else
15949   with_assumed_color=yes
15950 fi;
15951 echo "$as_me:15951: result: $with_assumed_color" >&5
15952 echo "${ECHO_T}$with_assumed_color" >&6
15953 test "x$with_assumed_color" = xyes &&
15954 cat >>confdefs.h <<\EOF
15955 #define USE_ASSUMED_COLOR 1
15956 EOF
15957
15958 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15959 echo "$as_me:15959: checking if you want hashmap scrolling-optimization code" >&5
15960 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15961
15962 # Check whether --enable-hashmap or --disable-hashmap was given.
15963 if test "${enable_hashmap+set}" = set; then
15964   enableval="$enable_hashmap"
15965   with_hashmap=$enableval
15966 else
15967   with_hashmap=yes
15968 fi;
15969 echo "$as_me:15969: result: $with_hashmap" >&5
15970 echo "${ECHO_T}$with_hashmap" >&6
15971 test "x$with_hashmap" = xyes &&
15972 cat >>confdefs.h <<\EOF
15973 #define USE_HASHMAP 1
15974 EOF
15975
15976 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15977 echo "$as_me:15977: checking if you want colorfgbg code" >&5
15978 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15979
15980 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15981 if test "${enable_colorfgbg+set}" = set; then
15982   enableval="$enable_colorfgbg"
15983   with_colorfgbg=$enableval
15984 else
15985   with_colorfgbg=no
15986 fi;
15987 echo "$as_me:15987: result: $with_colorfgbg" >&5
15988 echo "${ECHO_T}$with_colorfgbg" >&6
15989 test "x$with_colorfgbg" = xyes &&
15990 cat >>confdefs.h <<\EOF
15991 #define USE_COLORFGBG 1
15992 EOF
15993
15994 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15995 echo "$as_me:15995: checking if you want to use gcc -fvisibility option" >&5
15996 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15997
15998 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15999 if test "${enable_fvisibility+set}" = set; then
16000   enableval="$enable_fvisibility"
16001   cf_with_fvisibility=$enableval
16002 else
16003   cf_with_fvisibility=no
16004 fi;
16005 echo "$as_me:16005: result: $cf_with_fvisibility" >&5
16006 echo "${ECHO_T}$cf_with_fvisibility" >&6
16007
16008 NCURSES_IMPEXP=
16009 NCURSES_CXX_IMPEXP=
16010 if test "x$cf_with_fvisibility" = xyes; then
16011
16012 echo "$as_me:16012: checking if $CC -fvisibility=hidden option works" >&5
16013 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16014 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16015   echo $ECHO_N "(cached) $ECHO_C" >&6
16016 else
16017
16018     cf_save_cflags="$CFLAGS"
16019     CFLAGS="$CFLAGS -fvisibility=hidden"
16020     cat >"conftest.$ac_ext" <<_ACEOF
16021 #line 16021 "configure"
16022 #include "confdefs.h"
16023
16024 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16025
16026 int
16027 main (void)
16028 {
16029
16030         if (somefunc()) return 1;
16031
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16037 if { (eval echo "$as_me:16037: \"$ac_link\"") >&5
16038   (eval $ac_link) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit "$ac_status"); } &&
16042          { ac_try='test -s "conftest$ac_exeext"'
16043   { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044   (eval $ac_try) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit "$ac_status"); }; }; then
16048   cf_cv_fvisibility_hidden=yes
16049 else
16050   echo "$as_me: failed program was:" >&5
16051 cat "conftest.$ac_ext" >&5
16052 cf_cv_fvisibility_hidden=no
16053 fi
16054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16055     CFLAGS=$cf_save_cflags
16056
16057 fi
16058 echo "$as_me:16058: result: $cf_cv_fvisibility_hidden" >&5
16059 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16060
16061         if test "x$cf_cv_fvisibility_hidden" = xyes
16062         then
16063
16064 cf_fix_cppflags=no
16065 cf_new_cflags=
16066 cf_new_cppflags=
16067 cf_new_extra_cppflags=
16068
16069 for cf_add_cflags in -fvisibility=hidden
16070 do
16071 case "$cf_fix_cppflags" in
16072 (no)
16073         case "$cf_add_cflags" in
16074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16075                 case "$cf_add_cflags" in
16076                 (-D*)
16077                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16078
16079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16080                                 && test -z "${cf_tst_cflags}" \
16081                                 && cf_fix_cppflags=yes
16082
16083                         if test "$cf_fix_cppflags" = yes ; then
16084
16085         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16086         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16087
16088                                 continue
16089                         elif test "${cf_tst_cflags}" = "\"'" ; then
16090
16091         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16092         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16093
16094                                 continue
16095                         fi
16096                         ;;
16097                 esac
16098                 case "$CPPFLAGS" in
16099                 (*$cf_add_cflags)
16100                         ;;
16101                 (*)
16102                         case "$cf_add_cflags" in
16103                         (-D*)
16104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16105
16106 CPPFLAGS=`echo "$CPPFLAGS" | \
16107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16109
16110                                 ;;
16111                         esac
16112
16113         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16114         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16115
16116                         ;;
16117                 esac
16118                 ;;
16119         (*)
16120
16121         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16122         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16123
16124                 ;;
16125         esac
16126         ;;
16127 (yes)
16128
16129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16131
16132         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16133
16134         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16135                 && test -z "${cf_tst_cflags}" \
16136                 && cf_fix_cppflags=no
16137         ;;
16138 esac
16139 done
16140
16141 if test -n "$cf_new_cflags" ; then
16142
16143         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16144         CFLAGS="${CFLAGS}$cf_new_cflags"
16145
16146 fi
16147
16148 if test -n "$cf_new_cppflags" ; then
16149
16150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16151         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16152
16153 fi
16154
16155 if test -n "$cf_new_extra_cppflags" ; then
16156
16157         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16158         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16159
16160 fi
16161
16162                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16163         fi
16164         if test -n "$CXX"
16165         then
16166                 ac_ext=cc
16167 ac_cpp='$CXXCPP $CPPFLAGS'
16168 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16169 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16170 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16171 ac_main_return="return"
16172
16173 echo "$as_me:16173: checking if $CXX -fvisibility=hidden option works" >&5
16174 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16175 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16176   echo $ECHO_N "(cached) $ECHO_C" >&6
16177 else
16178
16179     cf_save_cflags="$CXXFLAGS"
16180     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16181     cat >"conftest.$ac_ext" <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16184
16185 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16186
16187 int
16188 main (void)
16189 {
16190
16191         if (somefunc()) return 1;
16192
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16198 if { (eval echo "$as_me:16198: \"$ac_link\"") >&5
16199   (eval $ac_link) 2>&5
16200   ac_status=$?
16201   echo "$as_me:16201: \$? = $ac_status" >&5
16202   (exit "$ac_status"); } &&
16203          { ac_try='test -s "conftest$ac_exeext"'
16204   { (eval echo "$as_me:16204: \"$ac_try\"") >&5
16205   (eval $ac_try) 2>&5
16206   ac_status=$?
16207   echo "$as_me:16207: \$? = $ac_status" >&5
16208   (exit "$ac_status"); }; }; then
16209   cf_cv_fvisibility_hidden2=yes
16210 else
16211   echo "$as_me: failed program was:" >&5
16212 cat "conftest.$ac_ext" >&5
16213 cf_cv_fvisibility_hidden2=no
16214 fi
16215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16216     CXXFLAGS=$cf_save_cflags
16217
16218 fi
16219 echo "$as_me:16219: result: $cf_cv_fvisibility_hidden2" >&5
16220 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16221
16222                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16223                 then
16224
16225 cf_save_CXXFLAGS="$CFLAGS"
16226 CFLAGS="$CXXFLAGS"
16227
16228 cf_fix_cppflags=no
16229 cf_new_cflags=
16230 cf_new_cppflags=
16231 cf_new_extra_cppflags=
16232
16233 for cf_add_cflags in -fvisibility=hidden
16234 do
16235 case "$cf_fix_cppflags" in
16236 (no)
16237         case "$cf_add_cflags" in
16238         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16239                 case "$cf_add_cflags" in
16240                 (-D*)
16241                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16242
16243                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16244                                 && test -z "${cf_tst_cflags}" \
16245                                 && cf_fix_cppflags=yes
16246
16247                         if test "$cf_fix_cppflags" = yes ; then
16248
16249         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16250         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16251
16252                                 continue
16253                         elif test "${cf_tst_cflags}" = "\"'" ; then
16254
16255         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16256         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16257
16258                                 continue
16259                         fi
16260                         ;;
16261                 esac
16262                 case "$CPPFLAGS" in
16263                 (*$cf_add_cflags)
16264                         ;;
16265                 (*)
16266                         case "$cf_add_cflags" in
16267                         (-D*)
16268                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16269
16270 CPPFLAGS=`echo "$CPPFLAGS" | \
16271         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16272                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16273
16274                                 ;;
16275                         esac
16276
16277         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16278         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16279
16280                         ;;
16281                 esac
16282                 ;;
16283         (*)
16284
16285         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16286         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16287
16288                 ;;
16289         esac
16290         ;;
16291 (yes)
16292
16293         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16294         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16295
16296         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16297
16298         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16299                 && test -z "${cf_tst_cflags}" \
16300                 && cf_fix_cppflags=no
16301         ;;
16302 esac
16303 done
16304
16305 if test -n "$cf_new_cflags" ; then
16306
16307         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16308         CFLAGS="${CFLAGS}$cf_new_cflags"
16309
16310 fi
16311
16312 if test -n "$cf_new_cppflags" ; then
16313
16314         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16315         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16316
16317 fi
16318
16319 if test -n "$cf_new_extra_cppflags" ; then
16320
16321         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16322         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16323
16324 fi
16325
16326 CXXFLAGS="$CFLAGS"
16327 CFLAGS="$cf_save_CXXFLAGS"
16328
16329                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16330                 fi
16331                 ac_ext=c
16332 ac_cpp='$CPP $CPPFLAGS'
16333 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16334 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16336 ac_main_return="return"
16337
16338         fi
16339 fi
16340
16341 ###   use option --enable-interop to turn on use of bindings used for interop
16342 echo "$as_me:16342: checking if you want interop bindings" >&5
16343 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16344
16345 # Check whether --enable-interop or --disable-interop was given.
16346 if test "${enable_interop+set}" = set; then
16347   enableval="$enable_interop"
16348   with_exp_interop=$enableval
16349 else
16350   with_exp_interop=$cf_dft_interop
16351 fi;
16352 echo "$as_me:16352: result: $with_exp_interop" >&5
16353 echo "${ECHO_T}$with_exp_interop" >&6
16354
16355 NCURSES_INTEROP_FUNCS=0
16356 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16357
16358 echo "$as_me:16358: checking if you want experimental safe-sprintf code" >&5
16359 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16360
16361 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16362 if test "${enable_safe_sprintf+set}" = set; then
16363   enableval="$enable_safe_sprintf"
16364   with_safe_sprintf=$enableval
16365 else
16366   with_safe_sprintf=no
16367 fi;
16368 echo "$as_me:16368: result: $with_safe_sprintf" >&5
16369 echo "${ECHO_T}$with_safe_sprintf" >&6
16370
16371 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16372 # when hashmap is used scroll hints are useless
16373 if test "$with_hashmap" = no ; then
16374 echo "$as_me:16374: checking if you want to experiment without scrolling-hints code" >&5
16375 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16376
16377 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16378 if test "${enable_scroll_hints+set}" = set; then
16379   enableval="$enable_scroll_hints"
16380   with_scroll_hints=$enableval
16381 else
16382   with_scroll_hints=yes
16383 fi;
16384 echo "$as_me:16384: result: $with_scroll_hints" >&5
16385 echo "${ECHO_T}$with_scroll_hints" >&6
16386 test "x$with_scroll_hints" = xyes &&
16387 cat >>confdefs.h <<\EOF
16388 #define USE_SCROLL_HINTS 1
16389 EOF
16390
16391 fi
16392
16393 echo "$as_me:16393: checking if you want wgetch-events code" >&5
16394 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16395
16396 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16397 if test "${enable_wgetch_events+set}" = set; then
16398   enableval="$enable_wgetch_events"
16399   with_wgetch_events=$enableval
16400 else
16401   with_wgetch_events=no
16402 fi;
16403 echo "$as_me:16403: result: $with_wgetch_events" >&5
16404 echo "${ECHO_T}$with_wgetch_events" >&6
16405 if test "x$with_wgetch_events" = xyes ; then
16406
16407 cat >>confdefs.h <<\EOF
16408 #define NCURSES_WGETCH_EVENTS 1
16409 EOF
16410
16411         NCURSES_WGETCH_EVENTS=1
16412 else
16413         NCURSES_WGETCH_EVENTS=0
16414 fi
16415
16416 case "$cf_cv_system_name" in
16417 (*mingw32*|*mingw64*|*-msvc*)
16418         echo "$as_me:16418: checking if you want experimental-Windows driver" >&5
16419 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16420
16421 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16422 if test "${enable_exp_win32+set}" = set; then
16423   enableval="$enable_exp_win32"
16424   with_exp_win32=$enableval
16425 else
16426   with_exp_win32=no
16427 fi;
16428         echo "$as_me:16428: result: $with_exp_win32" >&5
16429 echo "${ECHO_T}$with_exp_win32" >&6
16430         if test "x$with_exp_win32" = xyes
16431         then
16432
16433 cat >>confdefs.h <<\EOF
16434 #define EXP_WIN32_DRIVER 1
16435 EOF
16436
16437                 EXP_WIN32_DRIVER=1
16438                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16439         else
16440                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16441                 EXP_WIN32_DRIVER=0
16442         fi
16443         ;;
16444 (*)
16445         EXP_WIN32_DRIVER=0
16446         INTERNALS_HDR=
16447         ;;
16448 esac
16449
16450 ###############################################################################
16451
16452 ###     use option --disable-echo to suppress full display compiling commands
16453
16454 echo "$as_me:16454: checking if you want to see long compiling messages" >&5
16455 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16456
16457 # Check whether --enable-echo or --disable-echo was given.
16458 if test "${enable_echo+set}" = set; then
16459   enableval="$enable_echo"
16460   test "$enableval" != no && enableval=yes
16461         if test "$enableval" != "yes" ; then
16462
16463         ECHO_LT='--silent'
16464         ECHO_LD='@echo linking $@;'
16465         RULE_CC='@echo compiling $<'
16466         SHOW_CC='@echo compiling $@'
16467         ECHO_CC='@'
16468
16469         else
16470
16471         ECHO_LT=''
16472         ECHO_LD=''
16473         RULE_CC=''
16474         SHOW_CC=''
16475         ECHO_CC=''
16476
16477         fi
16478 else
16479   enableval=yes
16480
16481         ECHO_LT=''
16482         ECHO_LD=''
16483         RULE_CC=''
16484         SHOW_CC=''
16485         ECHO_CC=''
16486
16487 fi;
16488 echo "$as_me:16488: result: $enableval" >&5
16489 echo "${ECHO_T}$enableval" >&6
16490
16491 if test "x$enable_echo" = xyes; then
16492         ECHO_LINK=
16493 else
16494         ECHO_LINK='@ echo linking $@ ... ;'
16495         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16496         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16497 fi
16498
16499 # --disable-stripping is used for debugging
16500
16501 echo "$as_me:16501: checking if you want to install stripped executables" >&5
16502 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16503
16504 # Check whether --enable-stripping or --disable-stripping was given.
16505 if test "${enable_stripping+set}" = set; then
16506   enableval="$enable_stripping"
16507   test "$enableval" != no && enableval=yes
16508         if test "$enableval" != "yes" ; then
16509     enable_stripping=no
16510         else
16511                 enable_stripping=yes
16512         fi
16513 else
16514   enableval=yes
16515         enable_stripping=yes
16516
16517 fi;
16518 echo "$as_me:16518: result: $enable_stripping" >&5
16519 echo "${ECHO_T}$enable_stripping" >&6
16520
16521 if test "$enable_stripping" = yes
16522 then
16523         INSTALL_OPT_S="-s"
16524 else
16525         INSTALL_OPT_S=
16526 fi
16527
16528 : "${INSTALL:=install}"
16529 echo "$as_me:16529: checking if install accepts -p option" >&5
16530 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16531 if test "${cf_cv_install_p+set}" = set; then
16532   echo $ECHO_N "(cached) $ECHO_C" >&6
16533 else
16534
16535         rm -rf ./conftest*
16536         date >conftest.in
16537         mkdir conftest.out
16538         sleep 3
16539         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16540         then
16541                 if test -f conftest.out/conftest.in
16542                 then
16543                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16544                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16545                         if test -s conftest.err
16546                         then
16547                                 cf_cv_install_p=no
16548                         else
16549                                 cf_cv_install_p=yes
16550                         fi
16551                 else
16552                         cf_cv_install_p=no
16553                 fi
16554         else
16555                 cf_cv_install_p=no
16556         fi
16557         rm -rf ./conftest*
16558
16559 fi
16560 echo "$as_me:16560: result: $cf_cv_install_p" >&5
16561 echo "${ECHO_T}$cf_cv_install_p" >&6
16562
16563 echo "$as_me:16563: checking if install needs to be told about ownership" >&5
16564 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16565 case `$ac_config_guess` in
16566 (*minix)
16567         with_install_o=yes
16568         ;;
16569 (*)
16570         with_install_o=no
16571         ;;
16572 esac
16573
16574 echo "$as_me:16574: result: $with_install_o" >&5
16575 echo "${ECHO_T}$with_install_o" >&6
16576 if test "x$with_install_o" = xyes
16577 then
16578         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'`"
16579 else
16580         INSTALL_OPT_O=
16581 fi
16582
16583 # If we're avoiding relinking of shared libraries during install, that is to
16584 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16585 # the install program has "-p" (for preserving timestamps).
16586 cf_cv_do_reranlib=yes
16587 if test "x$cf_cv_install_p" = xyes
16588 then
16589         if test "x$cf_cv_do_relink" != xyes
16590         then
16591                 cf_cv_do_reranlib=no
16592                 INSTALL_OPT_P="-p"
16593                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16594         fi
16595 fi
16596
16597 ###     use option --enable-warnings to turn on all gcc warnings
16598
16599 echo "$as_me:16599: checking if you want to use C11 _Noreturn feature" >&5
16600 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16601
16602 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16603 if test "${enable_stdnoreturn+set}" = set; then
16604   enableval="$enable_stdnoreturn"
16605   test "$enableval" != yes && enableval=no
16606         if test "$enableval" != "no" ; then
16607     enable_stdnoreturn=yes
16608         else
16609                 enable_stdnoreturn=no
16610         fi
16611 else
16612   enableval=no
16613         enable_stdnoreturn=no
16614
16615 fi;
16616 echo "$as_me:16616: result: $enable_stdnoreturn" >&5
16617 echo "${ECHO_T}$enable_stdnoreturn" >&6
16618
16619 if test $enable_stdnoreturn = yes; then
16620 echo "$as_me:16620: checking for C11 _Noreturn feature" >&5
16621 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16622 if test "${cf_cv_c11_noreturn+set}" = set; then
16623   echo $ECHO_N "(cached) $ECHO_C" >&6
16624 else
16625   cat >"conftest.$ac_ext" <<_ACEOF
16626 #line 16626 "configure"
16627 #include "confdefs.h"
16628
16629 #include <stdio.h>
16630 #include <stdlib.h>
16631 #include <stdnoreturn.h>
16632 static _Noreturn void giveup(void) { exit(0); }
16633
16634 int
16635 main (void)
16636 {
16637 if (feof(stdin)) giveup()
16638   ;
16639   return 0;
16640 }
16641 _ACEOF
16642 rm -f "conftest.$ac_objext"
16643 if { (eval echo "$as_me:16643: \"$ac_compile\"") >&5
16644   (eval $ac_compile) 2>&5
16645   ac_status=$?
16646   echo "$as_me:16646: \$? = $ac_status" >&5
16647   (exit "$ac_status"); } &&
16648          { ac_try='test -s "conftest.$ac_objext"'
16649   { (eval echo "$as_me:16649: \"$ac_try\"") >&5
16650   (eval $ac_try) 2>&5
16651   ac_status=$?
16652   echo "$as_me:16652: \$? = $ac_status" >&5
16653   (exit "$ac_status"); }; }; then
16654   cf_cv_c11_noreturn=yes
16655 else
16656   echo "$as_me: failed program was:" >&5
16657 cat "conftest.$ac_ext" >&5
16658 cf_cv_c11_noreturn=no
16659 fi
16660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16661
16662 fi
16663 echo "$as_me:16663: result: $cf_cv_c11_noreturn" >&5
16664 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16665 else
16666         cf_cv_c11_noreturn=no,
16667 fi
16668
16669 if test "$cf_cv_c11_noreturn" = yes; then
16670
16671 cat >>confdefs.h <<\EOF
16672 #define HAVE_STDNORETURN_H 1
16673 EOF
16674
16675 cat >>confdefs.h <<EOF
16676 #define STDC_NORETURN _Noreturn
16677 EOF
16678
16679         HAVE_STDNORETURN_H=1
16680 else
16681         HAVE_STDNORETURN_H=0
16682 fi
16683
16684 if test "$GCC" = yes || test "$GXX" = yes
16685 then
16686
16687 if test "$GCC" = yes || test "$GXX" = yes
16688 then
16689         case $CFLAGS in
16690         (*-Werror=*)
16691                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16692
16693 echo "${as_me:-configure}:16693: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16694
16695                 cf_temp_flags=
16696                 for cf_temp_scan in $CFLAGS
16697                 do
16698                         case "x$cf_temp_scan" in
16699                         (x-Werror=*)
16700
16701         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16702         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16703
16704                                 ;;
16705                         (*)
16706
16707         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16708         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16709
16710                                 ;;
16711                         esac
16712                 done
16713                 CFLAGS="$cf_temp_flags"
16714                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16715
16716 echo "${as_me:-configure}:16716: testing ... fixed $CFLAGS ..." 1>&5
16717
16718                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16719
16720 echo "${as_me:-configure}:16720: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16721
16722                 ;;
16723         esac
16724 fi
16725
16726 if test "$GCC" = yes || test "$GXX" = yes
16727 then
16728         case $CPPFLAGS in
16729         (*-Werror=*)
16730                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16731
16732 echo "${as_me:-configure}:16732: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16733
16734                 cf_temp_flags=
16735                 for cf_temp_scan in $CPPFLAGS
16736                 do
16737                         case "x$cf_temp_scan" in
16738                         (x-Werror=*)
16739
16740         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16741         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16742
16743                                 ;;
16744                         (*)
16745
16746         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16747         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16748
16749                                 ;;
16750                         esac
16751                 done
16752                 CPPFLAGS="$cf_temp_flags"
16753                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16754
16755 echo "${as_me:-configure}:16755: testing ... fixed $CPPFLAGS ..." 1>&5
16756
16757                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16758
16759 echo "${as_me:-configure}:16759: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16760
16761                 ;;
16762         esac
16763 fi
16764
16765 if test "$GCC" = yes || test "$GXX" = yes
16766 then
16767         case $LDFLAGS in
16768         (*-Werror=*)
16769                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16770
16771 echo "${as_me:-configure}:16771: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16772
16773                 cf_temp_flags=
16774                 for cf_temp_scan in $LDFLAGS
16775                 do
16776                         case "x$cf_temp_scan" in
16777                         (x-Werror=*)
16778
16779         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16780         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16781
16782                                 ;;
16783                         (*)
16784
16785         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16786         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16787
16788                                 ;;
16789                         esac
16790                 done
16791                 LDFLAGS="$cf_temp_flags"
16792                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16793
16794 echo "${as_me:-configure}:16794: testing ... fixed $LDFLAGS ..." 1>&5
16795
16796                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16797
16798 echo "${as_me:-configure}:16798: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16799
16800                 ;;
16801         esac
16802 fi
16803
16804 echo "$as_me:16804: checking if you want to turn on gcc warnings" >&5
16805 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16806
16807 # Check whether --enable-warnings or --disable-warnings was given.
16808 if test "${enable_warnings+set}" = set; then
16809   enableval="$enable_warnings"
16810   test "$enableval" != yes && enableval=no
16811         if test "$enableval" != "no" ; then
16812     enable_warnings=yes
16813         else
16814                 enable_warnings=no
16815         fi
16816 else
16817   enableval=no
16818         enable_warnings=no
16819
16820 fi;
16821 echo "$as_me:16821: result: $enable_warnings" >&5
16822 echo "${ECHO_T}$enable_warnings" >&6
16823 if test "$enable_warnings" = "yes"
16824 then
16825
16826 if test "x$have_x" = xyes; then
16827
16828 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16829 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16830 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16831 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16832 for cf_X_CFLAGS in $X_CFLAGS
16833 do
16834         case "x$cf_X_CFLAGS" in
16835         x-[IUD]*)
16836                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16837                 ;;
16838         *)
16839                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16840                 ;;
16841         esac
16842 done
16843
16844 cat >"conftest.$ac_ext" <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847
16848 #include <stdlib.h>
16849 #include <X11/Intrinsic.h>
16850
16851 int
16852 main (void)
16853 {
16854 String foo = malloc(1); free((void*)foo)
16855   ;
16856   return 0;
16857 }
16858 _ACEOF
16859 rm -f "conftest.$ac_objext"
16860 if { (eval echo "$as_me:16860: \"$ac_compile\"") >&5
16861   (eval $ac_compile) 2>&5
16862   ac_status=$?
16863   echo "$as_me:16863: \$? = $ac_status" >&5
16864   (exit "$ac_status"); } &&
16865          { ac_try='test -s "conftest.$ac_objext"'
16866   { (eval echo "$as_me:16866: \"$ac_try\"") >&5
16867   (eval $ac_try) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit "$ac_status"); }; }; then
16871
16872 echo "$as_me:16872: checking for X11/Xt const-feature" >&5
16873 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16874 if test "${cf_cv_const_x_string+set}" = set; then
16875   echo $ECHO_N "(cached) $ECHO_C" >&6
16876 else
16877
16878         cat >"conftest.$ac_ext" <<_ACEOF
16879 #line 16879 "configure"
16880 #include "confdefs.h"
16881
16882 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16883 #undef  XTSTRINGDEFINES /* X11R5 and later */
16884 #include <stdlib.h>
16885 #include <X11/Intrinsic.h>
16886
16887 int
16888 main (void)
16889 {
16890 String foo = malloc(1); *foo = 0
16891   ;
16892   return 0;
16893 }
16894 _ACEOF
16895 rm -f "conftest.$ac_objext"
16896 if { (eval echo "$as_me:16896: \"$ac_compile\"") >&5
16897   (eval $ac_compile) 2>&5
16898   ac_status=$?
16899   echo "$as_me:16899: \$? = $ac_status" >&5
16900   (exit "$ac_status"); } &&
16901          { ac_try='test -s "conftest.$ac_objext"'
16902   { (eval echo "$as_me:16902: \"$ac_try\"") >&5
16903   (eval $ac_try) 2>&5
16904   ac_status=$?
16905   echo "$as_me:16905: \$? = $ac_status" >&5
16906   (exit "$ac_status"); }; }; then
16907
16908                         cf_cv_const_x_string=no
16909
16910 else
16911   echo "$as_me: failed program was:" >&5
16912 cat "conftest.$ac_ext" >&5
16913
16914                         cf_cv_const_x_string=yes
16915
16916 fi
16917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16918
16919 fi
16920 echo "$as_me:16920: result: $cf_cv_const_x_string" >&5
16921 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16922
16923 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16924 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16925 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16926
16927 case "$cf_cv_const_x_string" in
16928 (no)
16929
16930         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16931         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16932
16933         ;;
16934 (*)
16935
16936         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16937         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16938
16939         ;;
16940 esac
16941
16942 else
16943   echo "$as_me: failed program was:" >&5
16944 cat "conftest.$ac_ext" >&5
16945 fi
16946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16947  fi
16948 cat > "conftest.$ac_ext" <<EOF
16949 #line 16949 "${as_me:-configure}"
16950 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16951 EOF
16952 if test "$INTEL_COMPILER" = yes
16953 then
16954 # The "-wdXXX" options suppress warnings:
16955 # remark #1419: external declaration in primary source file
16956 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16957 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16958 # remark #193: zero used for undefined preprocessing identifier
16959 # remark #593: variable "curs_sb_left_arrow" was set but never used
16960 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16961 # remark #869: parameter "tw" was never referenced
16962 # remark #981: operands are evaluated in unspecified order
16963 # warning #279: controlling expression is constant
16964
16965         { echo "$as_me:16965: checking for $CC warning options..." >&5
16966 echo "$as_me: checking for $CC warning options..." >&6;}
16967         cf_save_CFLAGS="$CFLAGS"
16968         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16969         for cf_opt in \
16970                 wd1419 \
16971                 wd1683 \
16972                 wd1684 \
16973                 wd193 \
16974                 wd593 \
16975                 wd279 \
16976                 wd810 \
16977                 wd869 \
16978                 wd981
16979         do
16980                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16981                 if { (eval echo "$as_me:16981: \"$ac_compile\"") >&5
16982   (eval $ac_compile) 2>&5
16983   ac_status=$?
16984   echo "$as_me:16984: \$? = $ac_status" >&5
16985   (exit "$ac_status"); }; then
16986                         test -n "$verbose" && echo "$as_me:16986: result: ... -$cf_opt" >&5
16987 echo "${ECHO_T}... -$cf_opt" >&6
16988                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16989                 fi
16990         done
16991         CFLAGS="$cf_save_CFLAGS"
16992 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16993 then
16994         { echo "$as_me:16994: checking for $CC warning options..." >&5
16995 echo "$as_me: checking for $CC warning options..." >&6;}
16996         cf_save_CFLAGS="$CFLAGS"
16997         cf_warn_CONST=""
16998         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16999         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17000         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17001         for cf_opt in W Wall \
17002                 Wbad-function-cast \
17003                 Wcast-align \
17004                 Wcast-qual \
17005                 Wdeclaration-after-statement \
17006                 Wextra \
17007                 Winline \
17008                 Wmissing-declarations \
17009                 Wmissing-prototypes \
17010                 Wnested-externs \
17011                 Wpointer-arith \
17012                 Wshadow \
17013                 Wstrict-prototypes \
17014                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17015         do
17016                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17017                 if { (eval echo "$as_me:17017: \"$ac_compile\"") >&5
17018   (eval $ac_compile) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit "$ac_status"); }; then
17022                         test -n "$verbose" && echo "$as_me:17022: result: ... -$cf_opt" >&5
17023 echo "${ECHO_T}... -$cf_opt" >&6
17024                         case "$cf_opt" in
17025                         (Winline)
17026                                 case "$GCC_VERSION" in
17027                                 ([34].*)
17028                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17029
17030 echo "${as_me:-configure}:17030: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17031
17032                                         continue;;
17033                                 esac
17034                                 ;;
17035                         (Wpointer-arith)
17036                                 case "$GCC_VERSION" in
17037                                 ([12].*)
17038                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17039
17040 echo "${as_me:-configure}:17040: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17041
17042                                         continue;;
17043                                 esac
17044                                 ;;
17045                         esac
17046                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17047                 fi
17048         done
17049         CFLAGS="$cf_save_CFLAGS"
17050 fi
17051 rm -rf ./conftest*
17052
17053 fi
17054
17055 if test "$GCC" = yes || test "$GXX" = yes
17056 then
17057 cat > conftest.i <<EOF
17058 #ifndef GCC_PRINTF
17059 #define GCC_PRINTF 0
17060 #endif
17061 #ifndef GCC_SCANF
17062 #define GCC_SCANF 0
17063 #endif
17064 #ifndef GCC_NORETURN
17065 #define GCC_NORETURN /* nothing */
17066 #endif
17067 #ifndef GCC_UNUSED
17068 #define GCC_UNUSED /* nothing */
17069 #endif
17070 EOF
17071 if test "$GCC" = yes
17072 then
17073         { echo "$as_me:17073: checking for $CC __attribute__ directives..." >&5
17074 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17075 cat > "conftest.$ac_ext" <<EOF
17076 #line 17076 "${as_me:-configure}"
17077 #include "confdefs.h"
17078 #include "conftest.h"
17079 #include "conftest.i"
17080 #if     GCC_PRINTF
17081 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17082 #else
17083 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17084 #endif
17085 #if     GCC_SCANF
17086 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17087 #else
17088 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17089 #endif
17090 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17091 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17092 extern GCC_NORETURN void foo(void);
17093 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17094 EOF
17095         cf_printf_attribute=no
17096         cf_scanf_attribute=no
17097         for cf_attribute in scanf printf unused noreturn
17098         do
17099
17100 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17101
17102                 cf_directive="__attribute__(($cf_attribute))"
17103                 echo "checking for $CC $cf_directive" 1>&5
17104
17105                 case "$cf_attribute" in
17106                 (printf)
17107                         cf_printf_attribute=yes
17108                         cat >conftest.h <<EOF
17109 #define GCC_$cf_ATTRIBUTE 1
17110 EOF
17111                         ;;
17112                 (scanf)
17113                         cf_scanf_attribute=yes
17114                         cat >conftest.h <<EOF
17115 #define GCC_$cf_ATTRIBUTE 1
17116 EOF
17117                         ;;
17118                 (*)
17119                         cat >conftest.h <<EOF
17120 #define GCC_$cf_ATTRIBUTE $cf_directive
17121 EOF
17122                         ;;
17123                 esac
17124
17125                 if { (eval echo "$as_me:17125: \"$ac_compile\"") >&5
17126   (eval $ac_compile) 2>&5
17127   ac_status=$?
17128   echo "$as_me:17128: \$? = $ac_status" >&5
17129   (exit "$ac_status"); }; then
17130                         test -n "$verbose" && echo "$as_me:17130: result: ... $cf_attribute" >&5
17131 echo "${ECHO_T}... $cf_attribute" >&6
17132                         cat conftest.h >>confdefs.h
17133                         case "$cf_attribute" in
17134                         (noreturn)
17135
17136 cat >>confdefs.h <<EOF
17137 #define GCC_NORETURN $cf_directive
17138 EOF
17139
17140                                 ;;
17141                         (printf)
17142                                 cf_value='/* nothing */'
17143                                 if test "$cf_printf_attribute" != no ; then
17144                                         cf_value='__attribute__((format(printf,fmt,var)))'
17145
17146 cat >>confdefs.h <<\EOF
17147 #define GCC_PRINTF 1
17148 EOF
17149
17150                                 fi
17151
17152 cat >>confdefs.h <<EOF
17153 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17154 EOF
17155
17156                                 ;;
17157                         (scanf)
17158                                 cf_value='/* nothing */'
17159                                 if test "$cf_scanf_attribute" != no ; then
17160                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17161
17162 cat >>confdefs.h <<\EOF
17163 #define GCC_SCANF 1
17164 EOF
17165
17166                                 fi
17167
17168 cat >>confdefs.h <<EOF
17169 #define GCC_SCANFLIKE(fmt,var) $cf_value
17170 EOF
17171
17172                                 ;;
17173                         (unused)
17174
17175 cat >>confdefs.h <<EOF
17176 #define GCC_UNUSED $cf_directive
17177 EOF
17178
17179                                 ;;
17180                         esac
17181                 fi
17182         done
17183 else
17184         ${FGREP-fgrep} define conftest.i >>confdefs.h
17185 fi
17186 rm -rf ./conftest*
17187 fi
17188
17189 fi
17190
17191 if test "x$enable_warnings" = "xyes"; then
17192
17193         ADAFLAGS="$ADAFLAGS -gnatg"
17194
17195         if test "x$cf_with_cxx" = xyes ; then
17196
17197 INTEL_CPLUSPLUS=no
17198
17199 if test "$GCC" = yes ; then
17200         case "$host_os" in
17201         (linux*|gnu*)
17202                 echo "$as_me:17202: checking if this is really Intel C++ compiler" >&5
17203 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17204                 cf_save_CFLAGS="$CXXFLAGS"
17205                 CXXFLAGS="$CXXFLAGS -no-gcc"
17206                 cat >"conftest.$ac_ext" <<_ACEOF
17207 #line 17207 "configure"
17208 #include "confdefs.h"
17209
17210 int
17211 main (void)
17212 {
17213
17214 #ifdef __INTEL_COMPILER
17215 #else
17216 make an error
17217 #endif
17218
17219   ;
17220   return 0;
17221 }
17222 _ACEOF
17223 rm -f "conftest.$ac_objext"
17224 if { (eval echo "$as_me:17224: \"$ac_compile\"") >&5
17225   (eval $ac_compile) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit "$ac_status"); } &&
17229          { ac_try='test -s "conftest.$ac_objext"'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit "$ac_status"); }; }; then
17235   INTEL_CPLUSPLUS=yes
17236 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17237
17238 else
17239   echo "$as_me: failed program was:" >&5
17240 cat "conftest.$ac_ext" >&5
17241 fi
17242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17243                 CXXFLAGS="$cf_save_CFLAGS"
17244                 echo "$as_me:17244: result: $INTEL_CPLUSPLUS" >&5
17245 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17246                 ;;
17247         esac
17248 fi
17249
17250 CLANG_CPLUSPLUS=no
17251
17252 if test "$GCC" = yes ; then
17253         echo "$as_me:17253: checking if this is really Clang C++ compiler" >&5
17254 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17255         cf_save_CFLAGS="$CXXFLAGS"
17256         cat >"conftest.$ac_ext" <<_ACEOF
17257 #line 17257 "configure"
17258 #include "confdefs.h"
17259
17260 int
17261 main (void)
17262 {
17263
17264 #ifdef __clang__
17265 #else
17266 make an error
17267 #endif
17268
17269   ;
17270   return 0;
17271 }
17272 _ACEOF
17273 rm -f "conftest.$ac_objext"
17274 if { (eval echo "$as_me:17274: \"$ac_compile\"") >&5
17275   (eval $ac_compile) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit "$ac_status"); } &&
17279          { ac_try='test -s "conftest.$ac_objext"'
17280   { (eval echo "$as_me:17280: \"$ac_try\"") >&5
17281   (eval $ac_try) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit "$ac_status"); }; }; then
17285   CLANG_CPLUSPLUS=yes
17286
17287 else
17288   echo "$as_me: failed program was:" >&5
17289 cat "conftest.$ac_ext" >&5
17290 fi
17291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17292         CXXFLAGS="$cf_save_CFLAGS"
17293         echo "$as_me:17293: result: $CLANG_CPLUSPLUS" >&5
17294 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17295 fi
17296
17297 CLANG_VERSION=none
17298
17299 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17300         case "$CC" in
17301         (c[1-9][0-9]|*/c[1-9][0-9])
17302                 { echo "$as_me:17302: WARNING: replacing broken compiler alias $CC" >&5
17303 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17304                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17305                 CC=clang
17306                 ;;
17307         esac
17308
17309         echo "$as_me:17309: checking version of $CC" >&5
17310 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17311         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.].*//'`"
17312         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17313         echo "$as_me:17313: result: $CLANG_VERSION" >&5
17314 echo "${ECHO_T}$CLANG_VERSION" >&6
17315
17316         for cf_clang_opt in \
17317                 -Qunused-arguments \
17318                 -Wno-error=implicit-function-declaration
17319         do
17320                 echo "$as_me:17320: checking if option $cf_clang_opt works" >&5
17321 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17322                 cf_save_CFLAGS="$CFLAGS"
17323                 CFLAGS="$CFLAGS $cf_clang_opt"
17324                 cat >"conftest.$ac_ext" <<_ACEOF
17325 #line 17325 "configure"
17326 #include "confdefs.h"
17327
17328                         #include <stdio.h>
17329 int
17330 main (void)
17331 {
17332
17333                         printf("hello!\\n");
17334   ;
17335   return 0;
17336 }
17337 _ACEOF
17338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17339 if { (eval echo "$as_me:17339: \"$ac_link\"") >&5
17340   (eval $ac_link) 2>&5
17341   ac_status=$?
17342   echo "$as_me:17342: \$? = $ac_status" >&5
17343   (exit "$ac_status"); } &&
17344          { ac_try='test -s "conftest$ac_exeext"'
17345   { (eval echo "$as_me:17345: \"$ac_try\"") >&5
17346   (eval $ac_try) 2>&5
17347   ac_status=$?
17348   echo "$as_me:17348: \$? = $ac_status" >&5
17349   (exit "$ac_status"); }; }; then
17350
17351                         cf_clang_optok=yes
17352 else
17353   echo "$as_me: failed program was:" >&5
17354 cat "conftest.$ac_ext" >&5
17355
17356                         cf_clang_optok=no
17357 fi
17358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17359                 echo "$as_me:17359: result: $cf_clang_optok" >&5
17360 echo "${ECHO_T}$cf_clang_optok" >&6
17361                 CFLAGS="$cf_save_CFLAGS"
17362                 if test "$cf_clang_optok" = yes; then
17363                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17364
17365 echo "${as_me:-configure}:17365: testing adding option $cf_clang_opt ..." 1>&5
17366
17367         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17368         CFLAGS="${CFLAGS}$cf_clang_opt"
17369
17370                 fi
17371         done
17372 fi
17373
17374 ac_ext=cc
17375 ac_cpp='$CXXCPP $CPPFLAGS'
17376 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17377 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17378 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17379 ac_main_return="return"
17380
17381 cat > conftest.$ac_ext <<EOF
17382 #line 17382 "configure"
17383 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17384 EOF
17385
17386 if test "$INTEL_CPLUSPLUS" = yes
17387 then
17388 # The "-wdXXX" options suppress warnings:
17389 # remark #1419: external declaration in primary source file
17390 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17391 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17392 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17393 # remark #193: zero used for undefined preprocessing identifier
17394 # remark #593: variable "curs_sb_left_arrow" was set but never used
17395 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17396 # remark #869: parameter "tw" was never referenced
17397 # remark #981: operands are evaluated in unspecified order
17398 # warning #269: invalid format string conversion
17399
17400         { echo "$as_me:17400: checking for $CC warning options..." >&5
17401 echo "$as_me: checking for $CC warning options..." >&6;}
17402         cf_save_CXXFLAGS="$CXXFLAGS"
17403         EXTRA_CXXFLAGS="-Wall"
17404         for cf_opt in \
17405                 wd1419 \
17406                 wd1682 \
17407                 wd1683 \
17408                 wd1684 \
17409                 wd193 \
17410                 wd279 \
17411                 wd593 \
17412                 wd810 \
17413                 wd869 \
17414                 wd981
17415         do
17416                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17417                 if { (eval echo "$as_me:17417: \"$ac_compile\"") >&5
17418   (eval $ac_compile) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit "$ac_status"); }; then
17422                         test -n "$verbose" && echo "$as_me:17422: result: ... -$cf_opt" >&5
17423 echo "${ECHO_T}... -$cf_opt" >&6
17424                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17425                 fi
17426         done
17427         CXXFLAGS="$cf_save_CXXFLAGS"
17428
17429 elif test "$GXX" = yes
17430 then
17431         { echo "$as_me:17431: checking for $CXX warning options..." >&5
17432 echo "$as_me: checking for $CXX warning options..." >&6;}
17433         cf_save_CXXFLAGS="$CXXFLAGS"
17434         EXTRA_CXXFLAGS="-W -Wall"
17435         cf_gxx_extra_warnings=""
17436         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17437         case "$GXX_VERSION" in
17438         ([1-2].*)
17439                 ;;
17440         (*)
17441                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17442                 ;;
17443         esac
17444         for cf_opt in \
17445                 Wabi \
17446                 fabi-version=0 \
17447                 Wextra \
17448                 Wignored-qualifiers \
17449                 Wlogical-op \
17450                 Woverloaded-virtual \
17451                 Wsign-promo \
17452                 Wsynth \
17453                 Wold-style-cast \
17454                 Wcast-align \
17455                 Wcast-qual \
17456                 Wpointer-arith \
17457                 Wshadow \
17458                 Wundef $cf_gxx_extra_warnings Wno-unused
17459         do
17460                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17461                 if { (eval echo "$as_me:17461: \"$ac_compile\"") >&5
17462   (eval $ac_compile) 2>&5
17463   ac_status=$?
17464   echo "$as_me:17464: \$? = $ac_status" >&5
17465   (exit "$ac_status"); }; then
17466                         test -n "$verbose" && echo "$as_me:17466: result: ... -$cf_opt" >&5
17467 echo "${ECHO_T}... -$cf_opt" >&6
17468                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17469                 else
17470                         test -n "$verbose" && echo "$as_me:17470: result: ... no -$cf_opt" >&5
17471 echo "${ECHO_T}... no -$cf_opt" >&6
17472                 fi
17473         done
17474         CXXFLAGS="$cf_save_CXXFLAGS"
17475 fi
17476
17477 rm -rf ./conftest*
17478 ac_ext=c
17479 ac_cpp='$CPP $CPPFLAGS'
17480 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17481 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17482 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17483 ac_main_return="return"
17484
17485         fi
17486 fi
17487
17488 echo "$as_me:17488: checking if you want to work around bogus compiler/loader warnings" >&5
17489 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17490
17491 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17492 if test "${enable_string_hacks+set}" = set; then
17493   enableval="$enable_string_hacks"
17494   enable_string_hacks=$enableval
17495 else
17496   enable_string_hacks=no
17497 fi;
17498 echo "$as_me:17498: result: $enable_string_hacks" >&5
17499 echo "${ECHO_T}$enable_string_hacks" >&6
17500
17501 if test "x$enable_string_hacks" = "xyes"; then
17502
17503 cat >>confdefs.h <<\EOF
17504 #define USE_STRING_HACKS 1
17505 EOF
17506
17507         { echo "$as_me:17507: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17508 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17509         echo "$as_me:17509: checking for strlcat" >&5
17510 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17511 if test "${ac_cv_func_strlcat+set}" = set; then
17512   echo $ECHO_N "(cached) $ECHO_C" >&6
17513 else
17514   cat >"conftest.$ac_ext" <<_ACEOF
17515 #line 17515 "configure"
17516 #include "confdefs.h"
17517 #define strlcat autoconf_temporary
17518 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17519 #undef strlcat
17520
17521 #ifdef __cplusplus
17522 extern "C"
17523 #endif
17524
17525 /* We use char because int might match the return type of a gcc2
17526    builtin and then its argument prototype would still apply.  */
17527 char strlcat (void);
17528
17529 int
17530 main (void)
17531 {
17532
17533 /* The GNU C library defines stubs for functions which it implements
17534     to always fail with ENOSYS.  Some functions are actually named
17535     something starting with __ and the normal name is an alias.  */
17536 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17537 #error found stub for strlcat
17538 #endif
17539
17540         return strlcat ();
17541   ;
17542   return 0;
17543 }
17544 _ACEOF
17545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17546 if { (eval echo "$as_me:17546: \"$ac_link\"") >&5
17547   (eval $ac_link) 2>&5
17548   ac_status=$?
17549   echo "$as_me:17549: \$? = $ac_status" >&5
17550   (exit "$ac_status"); } &&
17551          { ac_try='test -s "conftest$ac_exeext"'
17552   { (eval echo "$as_me:17552: \"$ac_try\"") >&5
17553   (eval $ac_try) 2>&5
17554   ac_status=$?
17555   echo "$as_me:17555: \$? = $ac_status" >&5
17556   (exit "$ac_status"); }; }; then
17557   ac_cv_func_strlcat=yes
17558 else
17559   echo "$as_me: failed program was:" >&5
17560 cat "conftest.$ac_ext" >&5
17561 ac_cv_func_strlcat=no
17562 fi
17563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17564 fi
17565 echo "$as_me:17565: result: $ac_cv_func_strlcat" >&5
17566 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17567 if test "$ac_cv_func_strlcat" = yes; then
17568
17569 cat >>confdefs.h <<\EOF
17570 #define HAVE_STRLCAT 1
17571 EOF
17572
17573 else
17574
17575                 echo "$as_me:17575: checking for strlcat in -lbsd" >&5
17576 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17577 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17578   echo $ECHO_N "(cached) $ECHO_C" >&6
17579 else
17580   ac_check_lib_save_LIBS=$LIBS
17581 LIBS="-lbsd  $LIBS"
17582 cat >"conftest.$ac_ext" <<_ACEOF
17583 #line 17583 "configure"
17584 #include "confdefs.h"
17585
17586 /* Override any gcc2 internal prototype to avoid an error.  */
17587 #ifdef __cplusplus
17588 extern "C"
17589 #endif
17590 /* We use char because int might match the return type of a gcc2
17591    builtin and then its argument prototype would still apply.  */
17592 char strlcat ();
17593 int
17594 main (void)
17595 {
17596 strlcat ();
17597   ;
17598   return 0;
17599 }
17600 _ACEOF
17601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17602 if { (eval echo "$as_me:17602: \"$ac_link\"") >&5
17603   (eval $ac_link) 2>&5
17604   ac_status=$?
17605   echo "$as_me:17605: \$? = $ac_status" >&5
17606   (exit "$ac_status"); } &&
17607          { ac_try='test -s "conftest$ac_exeext"'
17608   { (eval echo "$as_me:17608: \"$ac_try\"") >&5
17609   (eval $ac_try) 2>&5
17610   ac_status=$?
17611   echo "$as_me:17611: \$? = $ac_status" >&5
17612   (exit "$ac_status"); }; }; then
17613   ac_cv_lib_bsd_strlcat=yes
17614 else
17615   echo "$as_me: failed program was:" >&5
17616 cat "conftest.$ac_ext" >&5
17617 ac_cv_lib_bsd_strlcat=no
17618 fi
17619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17620 LIBS=$ac_check_lib_save_LIBS
17621 fi
17622 echo "$as_me:17622: result: $ac_cv_lib_bsd_strlcat" >&5
17623 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17624 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17625
17626 cf_add_libs="$LIBS"
17627 # reverse order
17628 cf_add_0lib=
17629 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17630 # filter duplicates
17631 for cf_add_1lib in $cf_add_0lib; do
17632         for cf_add_2lib in $cf_add_libs; do
17633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17634                         cf_add_1lib=
17635                         break
17636                 fi
17637         done
17638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17639 done
17640 LIBS="$cf_add_libs"
17641
17642 for ac_header in bsd/string.h
17643 do
17644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17645 echo "$as_me:17645: checking for $ac_header" >&5
17646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17648   echo $ECHO_N "(cached) $ECHO_C" >&6
17649 else
17650   cat >"conftest.$ac_ext" <<_ACEOF
17651 #line 17651 "configure"
17652 #include "confdefs.h"
17653 #include <$ac_header>
17654 _ACEOF
17655 if { (eval echo "$as_me:17655: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17656   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17657   ac_status=$?
17658   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17659   rm -f conftest.er1
17660   cat conftest.err >&5
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit "$ac_status"); } >/dev/null; then
17663   if test -s conftest.err; then
17664     ac_cpp_err=$ac_c_preproc_warn_flag
17665   else
17666     ac_cpp_err=
17667   fi
17668 else
17669   ac_cpp_err=yes
17670 fi
17671 if test -z "$ac_cpp_err"; then
17672   eval "$as_ac_Header=yes"
17673 else
17674   echo "$as_me: failed program was:" >&5
17675   cat "conftest.$ac_ext" >&5
17676   eval "$as_ac_Header=no"
17677 fi
17678 rm -f conftest.err "conftest.$ac_ext"
17679 fi
17680 echo "$as_me:17680: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17681 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17682 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17683   cat >>confdefs.h <<EOF
17684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17685 EOF
17686
17687 fi
17688 done
17689
17690 cat >>confdefs.h <<\EOF
17691 #define HAVE_STRLCAT 1
17692 EOF
17693
17694 fi
17695
17696 fi
17697
17698 for ac_func in strlcpy snprintf
17699 do
17700 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17701 echo "$as_me:17701: checking for $ac_func" >&5
17702 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17703 if eval "test \"\${$as_ac_var+set}\" = set"; then
17704   echo $ECHO_N "(cached) $ECHO_C" >&6
17705 else
17706   cat >"conftest.$ac_ext" <<_ACEOF
17707 #line 17707 "configure"
17708 #include "confdefs.h"
17709 #define $ac_func autoconf_temporary
17710 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17711 #undef $ac_func
17712
17713 #ifdef __cplusplus
17714 extern "C"
17715 #endif
17716
17717 /* We use char because int might match the return type of a gcc2
17718    builtin and then its argument prototype would still apply.  */
17719 char $ac_func (void);
17720
17721 int
17722 main (void)
17723 {
17724
17725 /* The GNU C library defines stubs for functions which it implements
17726     to always fail with ENOSYS.  Some functions are actually named
17727     something starting with __ and the normal name is an alias.  */
17728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17729 #error found stub for $ac_func
17730 #endif
17731
17732         return $ac_func ();
17733   ;
17734   return 0;
17735 }
17736 _ACEOF
17737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17738 if { (eval echo "$as_me:17738: \"$ac_link\"") >&5
17739   (eval $ac_link) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit "$ac_status"); } &&
17743          { ac_try='test -s "conftest$ac_exeext"'
17744   { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit "$ac_status"); }; }; then
17749   eval "$as_ac_var=yes"
17750 else
17751   echo "$as_me: failed program was:" >&5
17752 cat "conftest.$ac_ext" >&5
17753 eval "$as_ac_var=no"
17754 fi
17755 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17756 fi
17757 echo "$as_me:17757: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17758 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17759 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17760   cat >>confdefs.h <<EOF
17761 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17762 EOF
17763
17764 fi
17765 done
17766
17767 fi
17768
17769 ###     use option --enable-assertions to turn on generation of assertion code
17770 echo "$as_me:17770: checking if you want to enable runtime assertions" >&5
17771 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17772
17773 # Check whether --enable-assertions or --disable-assertions was given.
17774 if test "${enable_assertions+set}" = set; then
17775   enableval="$enable_assertions"
17776   with_assertions=$enableval
17777 else
17778   with_assertions=no
17779 fi;
17780 echo "$as_me:17780: result: $with_assertions" >&5
17781 echo "${ECHO_T}$with_assertions" >&6
17782 if test -n "$GCC"
17783 then
17784         if test "$with_assertions" = no
17785         then
17786                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17787         else
17788
17789         ADAFLAGS="$ADAFLAGS -gnata"
17790
17791         fi
17792 fi
17793
17794 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17795
17796 echo "$as_me:17796: checking if you want to use dmalloc for testing" >&5
17797 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17798
17799 # Check whether --with-dmalloc or --without-dmalloc was given.
17800 if test "${with_dmalloc+set}" = set; then
17801   withval="$with_dmalloc"
17802   case "x$withval" in
17803         (x|xno) ;;
17804         (*)
17805                 : "${with_cflags:=-g}"
17806                 : "${enable_leaks:=no}"
17807                 with_dmalloc=yes
17808
17809 cat >>confdefs.h <<EOF
17810 #define USE_DMALLOC 1
17811 EOF
17812
17813                 ;;
17814         esac
17815 else
17816   with_dmalloc=
17817 fi;
17818 echo "$as_me:17818: result: ${with_dmalloc:-no}" >&5
17819 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17820
17821 case ".$with_cflags" in
17822 (.*-g*)
17823         case .$CFLAGS in
17824         (.*-g*)
17825                 ;;
17826         (*)
17827
17828 cf_fix_cppflags=no
17829 cf_new_cflags=
17830 cf_new_cppflags=
17831 cf_new_extra_cppflags=
17832
17833 for cf_add_cflags in -g
17834 do
17835 case "$cf_fix_cppflags" in
17836 (no)
17837         case "$cf_add_cflags" in
17838         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17839                 case "$cf_add_cflags" in
17840                 (-D*)
17841                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17842
17843                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17844                                 && test -z "${cf_tst_cflags}" \
17845                                 && cf_fix_cppflags=yes
17846
17847                         if test "$cf_fix_cppflags" = yes ; then
17848
17849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17851
17852                                 continue
17853                         elif test "${cf_tst_cflags}" = "\"'" ; then
17854
17855         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17856         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17857
17858                                 continue
17859                         fi
17860                         ;;
17861                 esac
17862                 case "$CPPFLAGS" in
17863                 (*$cf_add_cflags)
17864                         ;;
17865                 (*)
17866                         case "$cf_add_cflags" in
17867                         (-D*)
17868                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17869
17870 CPPFLAGS=`echo "$CPPFLAGS" | \
17871         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17872                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17873
17874                                 ;;
17875                         esac
17876
17877         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17878         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17879
17880                         ;;
17881                 esac
17882                 ;;
17883         (*)
17884
17885         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17886         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17887
17888                 ;;
17889         esac
17890         ;;
17891 (yes)
17892
17893         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17894         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17895
17896         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17897
17898         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17899                 && test -z "${cf_tst_cflags}" \
17900                 && cf_fix_cppflags=no
17901         ;;
17902 esac
17903 done
17904
17905 if test -n "$cf_new_cflags" ; then
17906
17907         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17908         CFLAGS="${CFLAGS}$cf_new_cflags"
17909
17910 fi
17911
17912 if test -n "$cf_new_cppflags" ; then
17913
17914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17915         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17916
17917 fi
17918
17919 if test -n "$cf_new_extra_cppflags" ; then
17920
17921         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17922         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17923
17924 fi
17925
17926                 ;;
17927         esac
17928         ;;
17929 esac
17930
17931 if test "$with_dmalloc" = yes ; then
17932         echo "$as_me:17932: checking for dmalloc.h" >&5
17933 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17934 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17935   echo $ECHO_N "(cached) $ECHO_C" >&6
17936 else
17937   cat >"conftest.$ac_ext" <<_ACEOF
17938 #line 17938 "configure"
17939 #include "confdefs.h"
17940 #include <dmalloc.h>
17941 _ACEOF
17942 if { (eval echo "$as_me:17942: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17943   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17944   ac_status=$?
17945   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17946   rm -f conftest.er1
17947   cat conftest.err >&5
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit "$ac_status"); } >/dev/null; then
17950   if test -s conftest.err; then
17951     ac_cpp_err=$ac_c_preproc_warn_flag
17952   else
17953     ac_cpp_err=
17954   fi
17955 else
17956   ac_cpp_err=yes
17957 fi
17958 if test -z "$ac_cpp_err"; then
17959   ac_cv_header_dmalloc_h=yes
17960 else
17961   echo "$as_me: failed program was:" >&5
17962   cat "conftest.$ac_ext" >&5
17963   ac_cv_header_dmalloc_h=no
17964 fi
17965 rm -f conftest.err "conftest.$ac_ext"
17966 fi
17967 echo "$as_me:17967: result: $ac_cv_header_dmalloc_h" >&5
17968 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17969 if test "$ac_cv_header_dmalloc_h" = yes; then
17970
17971 echo "$as_me:17971: checking for dmalloc_debug in -ldmalloc" >&5
17972 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17973 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17974   echo $ECHO_N "(cached) $ECHO_C" >&6
17975 else
17976   ac_check_lib_save_LIBS=$LIBS
17977 LIBS="-ldmalloc  $LIBS"
17978 cat >"conftest.$ac_ext" <<_ACEOF
17979 #line 17979 "configure"
17980 #include "confdefs.h"
17981
17982 /* Override any gcc2 internal prototype to avoid an error.  */
17983 #ifdef __cplusplus
17984 extern "C"
17985 #endif
17986 /* We use char because int might match the return type of a gcc2
17987    builtin and then its argument prototype would still apply.  */
17988 char dmalloc_debug ();
17989 int
17990 main (void)
17991 {
17992 dmalloc_debug ();
17993   ;
17994   return 0;
17995 }
17996 _ACEOF
17997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17998 if { (eval echo "$as_me:17998: \"$ac_link\"") >&5
17999   (eval $ac_link) 2>&5
18000   ac_status=$?
18001   echo "$as_me:18001: \$? = $ac_status" >&5
18002   (exit "$ac_status"); } &&
18003          { ac_try='test -s "conftest$ac_exeext"'
18004   { (eval echo "$as_me:18004: \"$ac_try\"") >&5
18005   (eval $ac_try) 2>&5
18006   ac_status=$?
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit "$ac_status"); }; }; then
18009   ac_cv_lib_dmalloc_dmalloc_debug=yes
18010 else
18011   echo "$as_me: failed program was:" >&5
18012 cat "conftest.$ac_ext" >&5
18013 ac_cv_lib_dmalloc_dmalloc_debug=no
18014 fi
18015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18016 LIBS=$ac_check_lib_save_LIBS
18017 fi
18018 echo "$as_me:18018: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18019 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18020 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18021   cat >>confdefs.h <<EOF
18022 #define HAVE_LIBDMALLOC 1
18023 EOF
18024
18025   LIBS="-ldmalloc $LIBS"
18026
18027 fi
18028
18029 fi
18030
18031 fi
18032
18033 echo "$as_me:18033: checking if you want to use dbmalloc for testing" >&5
18034 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18035
18036 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18037 if test "${with_dbmalloc+set}" = set; then
18038   withval="$with_dbmalloc"
18039   case "x$withval" in
18040         (x|xno) ;;
18041         (*)
18042                 : "${with_cflags:=-g}"
18043                 : "${enable_leaks:=no}"
18044                 with_dbmalloc=yes
18045
18046 cat >>confdefs.h <<EOF
18047 #define USE_DBMALLOC 1
18048 EOF
18049
18050                 ;;
18051         esac
18052 else
18053   with_dbmalloc=
18054 fi;
18055 echo "$as_me:18055: result: ${with_dbmalloc:-no}" >&5
18056 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18057
18058 case ".$with_cflags" in
18059 (.*-g*)
18060         case .$CFLAGS in
18061         (.*-g*)
18062                 ;;
18063         (*)
18064
18065 cf_fix_cppflags=no
18066 cf_new_cflags=
18067 cf_new_cppflags=
18068 cf_new_extra_cppflags=
18069
18070 for cf_add_cflags in -g
18071 do
18072 case "$cf_fix_cppflags" in
18073 (no)
18074         case "$cf_add_cflags" in
18075         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18076                 case "$cf_add_cflags" in
18077                 (-D*)
18078                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18079
18080                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18081                                 && test -z "${cf_tst_cflags}" \
18082                                 && cf_fix_cppflags=yes
18083
18084                         if test "$cf_fix_cppflags" = yes ; then
18085
18086         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18087         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18088
18089                                 continue
18090                         elif test "${cf_tst_cflags}" = "\"'" ; then
18091
18092         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18093         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18094
18095                                 continue
18096                         fi
18097                         ;;
18098                 esac
18099                 case "$CPPFLAGS" in
18100                 (*$cf_add_cflags)
18101                         ;;
18102                 (*)
18103                         case "$cf_add_cflags" in
18104                         (-D*)
18105                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18106
18107 CPPFLAGS=`echo "$CPPFLAGS" | \
18108         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18109                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18110
18111                                 ;;
18112                         esac
18113
18114         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18115         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18116
18117                         ;;
18118                 esac
18119                 ;;
18120         (*)
18121
18122         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18123         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18124
18125                 ;;
18126         esac
18127         ;;
18128 (yes)
18129
18130         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18131         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18132
18133         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18134
18135         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18136                 && test -z "${cf_tst_cflags}" \
18137                 && cf_fix_cppflags=no
18138         ;;
18139 esac
18140 done
18141
18142 if test -n "$cf_new_cflags" ; then
18143
18144         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18145         CFLAGS="${CFLAGS}$cf_new_cflags"
18146
18147 fi
18148
18149 if test -n "$cf_new_cppflags" ; then
18150
18151         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18152         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18153
18154 fi
18155
18156 if test -n "$cf_new_extra_cppflags" ; then
18157
18158         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18159         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18160
18161 fi
18162
18163                 ;;
18164         esac
18165         ;;
18166 esac
18167
18168 if test "$with_dbmalloc" = yes ; then
18169         echo "$as_me:18169: checking for dbmalloc.h" >&5
18170 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18171 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18172   echo $ECHO_N "(cached) $ECHO_C" >&6
18173 else
18174   cat >"conftest.$ac_ext" <<_ACEOF
18175 #line 18175 "configure"
18176 #include "confdefs.h"
18177 #include <dbmalloc.h>
18178 _ACEOF
18179 if { (eval echo "$as_me:18179: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18180   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18181   ac_status=$?
18182   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18183   rm -f conftest.er1
18184   cat conftest.err >&5
18185   echo "$as_me:18185: \$? = $ac_status" >&5
18186   (exit "$ac_status"); } >/dev/null; then
18187   if test -s conftest.err; then
18188     ac_cpp_err=$ac_c_preproc_warn_flag
18189   else
18190     ac_cpp_err=
18191   fi
18192 else
18193   ac_cpp_err=yes
18194 fi
18195 if test -z "$ac_cpp_err"; then
18196   ac_cv_header_dbmalloc_h=yes
18197 else
18198   echo "$as_me: failed program was:" >&5
18199   cat "conftest.$ac_ext" >&5
18200   ac_cv_header_dbmalloc_h=no
18201 fi
18202 rm -f conftest.err "conftest.$ac_ext"
18203 fi
18204 echo "$as_me:18204: result: $ac_cv_header_dbmalloc_h" >&5
18205 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18206 if test "$ac_cv_header_dbmalloc_h" = yes; then
18207
18208 echo "$as_me:18208: checking for debug_malloc in -ldbmalloc" >&5
18209 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18210 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18211   echo $ECHO_N "(cached) $ECHO_C" >&6
18212 else
18213   ac_check_lib_save_LIBS=$LIBS
18214 LIBS="-ldbmalloc  $LIBS"
18215 cat >"conftest.$ac_ext" <<_ACEOF
18216 #line 18216 "configure"
18217 #include "confdefs.h"
18218
18219 /* Override any gcc2 internal prototype to avoid an error.  */
18220 #ifdef __cplusplus
18221 extern "C"
18222 #endif
18223 /* We use char because int might match the return type of a gcc2
18224    builtin and then its argument prototype would still apply.  */
18225 char debug_malloc ();
18226 int
18227 main (void)
18228 {
18229 debug_malloc ();
18230   ;
18231   return 0;
18232 }
18233 _ACEOF
18234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18235 if { (eval echo "$as_me:18235: \"$ac_link\"") >&5
18236   (eval $ac_link) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit "$ac_status"); } &&
18240          { ac_try='test -s "conftest$ac_exeext"'
18241   { (eval echo "$as_me:18241: \"$ac_try\"") >&5
18242   (eval $ac_try) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit "$ac_status"); }; }; then
18246   ac_cv_lib_dbmalloc_debug_malloc=yes
18247 else
18248   echo "$as_me: failed program was:" >&5
18249 cat "conftest.$ac_ext" >&5
18250 ac_cv_lib_dbmalloc_debug_malloc=no
18251 fi
18252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18253 LIBS=$ac_check_lib_save_LIBS
18254 fi
18255 echo "$as_me:18255: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18256 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18257 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18258   cat >>confdefs.h <<EOF
18259 #define HAVE_LIBDBMALLOC 1
18260 EOF
18261
18262   LIBS="-ldbmalloc $LIBS"
18263
18264 fi
18265
18266 fi
18267
18268 fi
18269
18270 echo "$as_me:18270: checking if you want to use valgrind for testing" >&5
18271 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18272
18273 # Check whether --with-valgrind or --without-valgrind was given.
18274 if test "${with_valgrind+set}" = set; then
18275   withval="$with_valgrind"
18276   case "x$withval" in
18277         (x|xno) ;;
18278         (*)
18279                 : "${with_cflags:=-g}"
18280                 : "${enable_leaks:=no}"
18281                 with_valgrind=yes
18282
18283 cat >>confdefs.h <<EOF
18284 #define USE_VALGRIND 1
18285 EOF
18286
18287                 ;;
18288         esac
18289 else
18290   with_valgrind=
18291 fi;
18292 echo "$as_me:18292: result: ${with_valgrind:-no}" >&5
18293 echo "${ECHO_T}${with_valgrind:-no}" >&6
18294
18295 case ".$with_cflags" in
18296 (.*-g*)
18297         case .$CFLAGS in
18298         (.*-g*)
18299                 ;;
18300         (*)
18301
18302 cf_fix_cppflags=no
18303 cf_new_cflags=
18304 cf_new_cppflags=
18305 cf_new_extra_cppflags=
18306
18307 for cf_add_cflags in -g
18308 do
18309 case "$cf_fix_cppflags" in
18310 (no)
18311         case "$cf_add_cflags" in
18312         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18313                 case "$cf_add_cflags" in
18314                 (-D*)
18315                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18316
18317                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18318                                 && test -z "${cf_tst_cflags}" \
18319                                 && cf_fix_cppflags=yes
18320
18321                         if test "$cf_fix_cppflags" = yes ; then
18322
18323         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18324         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18325
18326                                 continue
18327                         elif test "${cf_tst_cflags}" = "\"'" ; then
18328
18329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18331
18332                                 continue
18333                         fi
18334                         ;;
18335                 esac
18336                 case "$CPPFLAGS" in
18337                 (*$cf_add_cflags)
18338                         ;;
18339                 (*)
18340                         case "$cf_add_cflags" in
18341                         (-D*)
18342                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18343
18344 CPPFLAGS=`echo "$CPPFLAGS" | \
18345         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18346                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18347
18348                                 ;;
18349                         esac
18350
18351         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18352         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18353
18354                         ;;
18355                 esac
18356                 ;;
18357         (*)
18358
18359         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18360         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18361
18362                 ;;
18363         esac
18364         ;;
18365 (yes)
18366
18367         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18368         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18369
18370         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18371
18372         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18373                 && test -z "${cf_tst_cflags}" \
18374                 && cf_fix_cppflags=no
18375         ;;
18376 esac
18377 done
18378
18379 if test -n "$cf_new_cflags" ; then
18380
18381         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18382         CFLAGS="${CFLAGS}$cf_new_cflags"
18383
18384 fi
18385
18386 if test -n "$cf_new_cppflags" ; then
18387
18388         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18389         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18390
18391 fi
18392
18393 if test -n "$cf_new_extra_cppflags" ; then
18394
18395         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18396         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18397
18398 fi
18399
18400                 ;;
18401         esac
18402         ;;
18403 esac
18404
18405 echo "$as_me:18405: checking if you want to perform memory-leak testing" >&5
18406 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18407
18408 # Check whether --enable-leaks or --disable-leaks was given.
18409 if test "${enable_leaks+set}" = set; then
18410   enableval="$enable_leaks"
18411   enable_leaks=$enableval
18412 else
18413   enable_leaks=yes
18414 fi;
18415 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18416 echo "$as_me:18416: result: $with_no_leaks" >&5
18417 echo "${ECHO_T}$with_no_leaks" >&6
18418
18419 if test "$enable_leaks" = no ; then
18420
18421 cat >>confdefs.h <<\EOF
18422 #define NO_LEAKS 1
18423 EOF
18424
18425 cat >>confdefs.h <<\EOF
18426 #define YY_NO_LEAKS 1
18427 EOF
18428
18429 fi
18430
18431 cat >>confdefs.h <<\EOF
18432 #define HAVE_NC_ALLOC_H 1
18433 EOF
18434
18435 ###     use option --enable-expanded to generate certain macros as functions
18436
18437 # Check whether --enable-expanded or --disable-expanded was given.
18438 if test "${enable_expanded+set}" = set; then
18439   enableval="$enable_expanded"
18440   test "x$enableval" = xyes &&
18441 cat >>confdefs.h <<\EOF
18442 #define NCURSES_EXPANDED 1
18443 EOF
18444
18445 fi;
18446
18447 ###     use option --disable-macros to suppress macros in favor of functions
18448
18449 # Check whether --enable-macros or --disable-macros was given.
18450 if test "${enable_macros+set}" = set; then
18451   enableval="$enable_macros"
18452   test "$enableval" = no &&
18453 cat >>confdefs.h <<\EOF
18454 #define NCURSES_NOMACROS 1
18455 EOF
18456
18457 fi;
18458
18459 # Normally we only add trace() to the debug-library.  Allow this to be
18460 # extended to all models of the ncurses library:
18461 cf_all_traces=no
18462 case "$CFLAGS $CPPFLAGS" in
18463 (*-DTRACE*)
18464         cf_all_traces=yes
18465         ;;
18466 esac
18467
18468 echo "$as_me:18468: checking whether to add trace feature to all models" >&5
18469 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18470
18471 # Check whether --with-trace or --without-trace was given.
18472 if test "${with_trace+set}" = set; then
18473   withval="$with_trace"
18474   cf_with_trace=$withval
18475 else
18476   cf_with_trace=$cf_all_traces
18477 fi;
18478 echo "$as_me:18478: result: $cf_with_trace" >&5
18479 echo "${ECHO_T}$cf_with_trace" >&6
18480
18481 if test "x$cf_with_trace" = xyes ; then
18482         LIB_TRACING=all
18483         ADA_TRACE=TRUE
18484
18485 cf_fix_cppflags=no
18486 cf_new_cflags=
18487 cf_new_cppflags=
18488 cf_new_extra_cppflags=
18489
18490 for cf_add_cflags in -DTRACE
18491 do
18492 case "$cf_fix_cppflags" in
18493 (no)
18494         case "$cf_add_cflags" in
18495         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18496                 case "$cf_add_cflags" in
18497                 (-D*)
18498                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18499
18500                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18501                                 && test -z "${cf_tst_cflags}" \
18502                                 && cf_fix_cppflags=yes
18503
18504                         if test "$cf_fix_cppflags" = yes ; then
18505
18506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18508
18509                                 continue
18510                         elif test "${cf_tst_cflags}" = "\"'" ; then
18511
18512         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18513         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18514
18515                                 continue
18516                         fi
18517                         ;;
18518                 esac
18519                 case "$CPPFLAGS" in
18520                 (*$cf_add_cflags)
18521                         ;;
18522                 (*)
18523                         case "$cf_add_cflags" in
18524                         (-D*)
18525                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18526
18527 CPPFLAGS=`echo "$CPPFLAGS" | \
18528         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18529                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18530
18531                                 ;;
18532                         esac
18533
18534         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18535         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18536
18537                         ;;
18538                 esac
18539                 ;;
18540         (*)
18541
18542         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18543         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18544
18545                 ;;
18546         esac
18547         ;;
18548 (yes)
18549
18550         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18551         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18552
18553         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18554
18555         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18556                 && test -z "${cf_tst_cflags}" \
18557                 && cf_fix_cppflags=no
18558         ;;
18559 esac
18560 done
18561
18562 if test -n "$cf_new_cflags" ; then
18563
18564         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18565         CFLAGS="${CFLAGS}$cf_new_cflags"
18566
18567 fi
18568
18569 if test -n "$cf_new_cppflags" ; then
18570
18571         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18572         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18573
18574 fi
18575
18576 if test -n "$cf_new_extra_cppflags" ; then
18577
18578         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18579         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18580
18581 fi
18582
18583 cat >>confdefs.h <<\EOF
18584 #define HAVE__TRACEF 1
18585 EOF
18586
18587 else
18588         LIB_TRACING=DEBUG
18589         ADA_TRACE=FALSE
18590 fi
18591
18592 echo "$as_me:18592: checking if we want to use GNAT projects" >&5
18593 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18594
18595 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18596 if test "${enable_gnat_projects+set}" = set; then
18597   enableval="$enable_gnat_projects"
18598   test "$enableval" != no && enableval=yes
18599         if test "$enableval" != "yes" ; then
18600     enable_gnat_projects=no
18601         else
18602                 enable_gnat_projects=yes
18603         fi
18604 else
18605   enableval=yes
18606         enable_gnat_projects=yes
18607
18608 fi;
18609 echo "$as_me:18609: result: $enable_gnat_projects" >&5
18610 echo "${ECHO_T}$enable_gnat_projects" >&6
18611
18612 ###     Checks for libraries.
18613 case "$cf_cv_system_name" in
18614 (*mingw32*|*mingw64*)
18615         # Note: WINVER may be a problem with Windows 10
18616         if test "x$with_exp_win32" = xyes ; then
18617                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18618         else
18619                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18620         fi
18621
18622 echo "$as_me:18622: checking if ssp library is needed" >&5
18623 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18624 if test "${cf_cv_need_libssp+set}" = set; then
18625   echo $ECHO_N "(cached) $ECHO_C" >&6
18626 else
18627
18628 cat >"conftest.$ac_ext" <<_ACEOF
18629 #line 18629 "configure"
18630 #include "confdefs.h"
18631
18632 #include <sys/types.h>
18633 #include <dirent.h>
18634
18635 int
18636 main (void)
18637 {
18638
18639        DIR *dp = opendir(".");
18640
18641   ;
18642   return 0;
18643 }
18644 _ACEOF
18645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18646 if { (eval echo "$as_me:18646: \"$ac_link\"") >&5
18647   (eval $ac_link) 2>&5
18648   ac_status=$?
18649   echo "$as_me:18649: \$? = $ac_status" >&5
18650   (exit "$ac_status"); } &&
18651          { ac_try='test -s "conftest$ac_exeext"'
18652   { (eval echo "$as_me:18652: \"$ac_try\"") >&5
18653   (eval $ac_try) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit "$ac_status"); }; }; then
18657   cf_cv_need_libssp=no
18658 else
18659   echo "$as_me: failed program was:" >&5
18660 cat "conftest.$ac_ext" >&5
18661
18662         cf_save_LIBS="$LIBS"
18663         LIBS="$LIBS -lssp"
18664         cat >"conftest.$ac_ext" <<_ACEOF
18665 #line 18665 "configure"
18666 #include "confdefs.h"
18667
18668 #include <sys/types.h>
18669 #include <dirent.h>
18670
18671 int
18672 main (void)
18673 {
18674
18675                    DIR *dp = opendir(".");
18676
18677   ;
18678   return 0;
18679 }
18680 _ACEOF
18681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18682 if { (eval echo "$as_me:18682: \"$ac_link\"") >&5
18683   (eval $ac_link) 2>&5
18684   ac_status=$?
18685   echo "$as_me:18685: \$? = $ac_status" >&5
18686   (exit "$ac_status"); } &&
18687          { ac_try='test -s "conftest$ac_exeext"'
18688   { (eval echo "$as_me:18688: \"$ac_try\"") >&5
18689   (eval $ac_try) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit "$ac_status"); }; }; then
18693   cf_cv_need_libssp=yes
18694 else
18695   echo "$as_me: failed program was:" >&5
18696 cat "conftest.$ac_ext" >&5
18697 cf_cv_need_libssp=maybe
18698 fi
18699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18700         LIBS="$cf_save_LIBS"
18701
18702 fi
18703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18704 fi
18705 echo "$as_me:18705: result: $cf_cv_need_libssp" >&5
18706 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18707
18708 if test "x$cf_cv_need_libssp" = xyes
18709 then
18710
18711 cf_add_libs="$LIBS"
18712 # reverse order
18713 cf_add_0lib=
18714 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18715 # filter duplicates
18716 for cf_add_1lib in $cf_add_0lib; do
18717         for cf_add_2lib in $cf_add_libs; do
18718                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18719                         cf_add_1lib=
18720                         break
18721                 fi
18722         done
18723         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18724 done
18725 LIBS="$cf_add_libs"
18726
18727 fi
18728
18729         ;;
18730 (*)
18731 echo "$as_me:18731: checking for gettimeofday" >&5
18732 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18733 if test "${ac_cv_func_gettimeofday+set}" = set; then
18734   echo $ECHO_N "(cached) $ECHO_C" >&6
18735 else
18736   cat >"conftest.$ac_ext" <<_ACEOF
18737 #line 18737 "configure"
18738 #include "confdefs.h"
18739 #define gettimeofday autoconf_temporary
18740 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18741 #undef gettimeofday
18742
18743 #ifdef __cplusplus
18744 extern "C"
18745 #endif
18746
18747 /* We use char because int might match the return type of a gcc2
18748    builtin and then its argument prototype would still apply.  */
18749 char gettimeofday (void);
18750
18751 int
18752 main (void)
18753 {
18754
18755 /* The GNU C library defines stubs for functions which it implements
18756     to always fail with ENOSYS.  Some functions are actually named
18757     something starting with __ and the normal name is an alias.  */
18758 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18759 #error found stub for gettimeofday
18760 #endif
18761
18762         return gettimeofday ();
18763   ;
18764   return 0;
18765 }
18766 _ACEOF
18767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18768 if { (eval echo "$as_me:18768: \"$ac_link\"") >&5
18769   (eval $ac_link) 2>&5
18770   ac_status=$?
18771   echo "$as_me:18771: \$? = $ac_status" >&5
18772   (exit "$ac_status"); } &&
18773          { ac_try='test -s "conftest$ac_exeext"'
18774   { (eval echo "$as_me:18774: \"$ac_try\"") >&5
18775   (eval $ac_try) 2>&5
18776   ac_status=$?
18777   echo "$as_me:18777: \$? = $ac_status" >&5
18778   (exit "$ac_status"); }; }; then
18779   ac_cv_func_gettimeofday=yes
18780 else
18781   echo "$as_me: failed program was:" >&5
18782 cat "conftest.$ac_ext" >&5
18783 ac_cv_func_gettimeofday=no
18784 fi
18785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18786 fi
18787 echo "$as_me:18787: result: $ac_cv_func_gettimeofday" >&5
18788 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18789 if test "$ac_cv_func_gettimeofday" = yes; then
18790
18791 cat >>confdefs.h <<\EOF
18792 #define HAVE_GETTIMEOFDAY 1
18793 EOF
18794
18795 else
18796
18797 echo "$as_me:18797: checking for gettimeofday in -lbsd" >&5
18798 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18799 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18800   echo $ECHO_N "(cached) $ECHO_C" >&6
18801 else
18802   ac_check_lib_save_LIBS=$LIBS
18803 LIBS="-lbsd  $LIBS"
18804 cat >"conftest.$ac_ext" <<_ACEOF
18805 #line 18805 "configure"
18806 #include "confdefs.h"
18807
18808 /* Override any gcc2 internal prototype to avoid an error.  */
18809 #ifdef __cplusplus
18810 extern "C"
18811 #endif
18812 /* We use char because int might match the return type of a gcc2
18813    builtin and then its argument prototype would still apply.  */
18814 char gettimeofday ();
18815 int
18816 main (void)
18817 {
18818 gettimeofday ();
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18824 if { (eval echo "$as_me:18824: \"$ac_link\"") >&5
18825   (eval $ac_link) 2>&5
18826   ac_status=$?
18827   echo "$as_me:18827: \$? = $ac_status" >&5
18828   (exit "$ac_status"); } &&
18829          { ac_try='test -s "conftest$ac_exeext"'
18830   { (eval echo "$as_me:18830: \"$ac_try\"") >&5
18831   (eval $ac_try) 2>&5
18832   ac_status=$?
18833   echo "$as_me:18833: \$? = $ac_status" >&5
18834   (exit "$ac_status"); }; }; then
18835   ac_cv_lib_bsd_gettimeofday=yes
18836 else
18837   echo "$as_me: failed program was:" >&5
18838 cat "conftest.$ac_ext" >&5
18839 ac_cv_lib_bsd_gettimeofday=no
18840 fi
18841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18842 LIBS=$ac_check_lib_save_LIBS
18843 fi
18844 echo "$as_me:18844: result: $ac_cv_lib_bsd_gettimeofday" >&5
18845 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18846 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18847
18848 cat >>confdefs.h <<\EOF
18849 #define HAVE_GETTIMEOFDAY 1
18850 EOF
18851
18852 cf_add_libs="$LIBS"
18853 # reverse order
18854 cf_add_0lib=
18855 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18856 # filter duplicates
18857 for cf_add_1lib in $cf_add_0lib; do
18858         for cf_add_2lib in $cf_add_libs; do
18859                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18860                         cf_add_1lib=
18861                         break
18862                 fi
18863         done
18864         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18865 done
18866 LIBS="$cf_add_libs"
18867
18868 fi
18869
18870 fi
18871         ;;
18872 esac
18873
18874 echo "$as_me:18874: checking if -lm needed for math functions" >&5
18875 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18876 if test "${cf_cv_need_libm+set}" = set; then
18877   echo $ECHO_N "(cached) $ECHO_C" >&6
18878 else
18879
18880         cat >"conftest.$ac_ext" <<_ACEOF
18881 #line 18881 "configure"
18882 #include "confdefs.h"
18883
18884         #include <stdio.h>
18885         #include <stdlib.h>
18886         #include <math.h>
18887
18888 int
18889 main (void)
18890 {
18891 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18892   ;
18893   return 0;
18894 }
18895 _ACEOF
18896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18897 if { (eval echo "$as_me:18897: \"$ac_link\"") >&5
18898   (eval $ac_link) 2>&5
18899   ac_status=$?
18900   echo "$as_me:18900: \$? = $ac_status" >&5
18901   (exit "$ac_status"); } &&
18902          { ac_try='test -s "conftest$ac_exeext"'
18903   { (eval echo "$as_me:18903: \"$ac_try\"") >&5
18904   (eval $ac_try) 2>&5
18905   ac_status=$?
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit "$ac_status"); }; }; then
18908   cf_cv_need_libm=no
18909 else
18910   echo "$as_me: failed program was:" >&5
18911 cat "conftest.$ac_ext" >&5
18912 cf_cv_need_libm=yes
18913 fi
18914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18915 fi
18916 echo "$as_me:18916: result: $cf_cv_need_libm" >&5
18917 echo "${ECHO_T}$cf_cv_need_libm" >&6
18918 if test "$cf_cv_need_libm" = yes
18919 then
18920 MATH_LIB=-lm
18921 fi
18922
18923 ###     Checks for header files.
18924 echo "$as_me:18924: checking for ANSI C header files" >&5
18925 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18926 if test "${ac_cv_header_stdc+set}" = set; then
18927   echo $ECHO_N "(cached) $ECHO_C" >&6
18928 else
18929   cat >"conftest.$ac_ext" <<_ACEOF
18930 #line 18930 "configure"
18931 #include "confdefs.h"
18932 #include <stdlib.h>
18933 #include <stdarg.h>
18934 #include <string.h>
18935 #include <float.h>
18936
18937 _ACEOF
18938 if { (eval echo "$as_me:18938: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18939   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18940   ac_status=$?
18941   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18942   rm -f conftest.er1
18943   cat conftest.err >&5
18944   echo "$as_me:18944: \$? = $ac_status" >&5
18945   (exit "$ac_status"); } >/dev/null; then
18946   if test -s conftest.err; then
18947     ac_cpp_err=$ac_c_preproc_warn_flag
18948   else
18949     ac_cpp_err=
18950   fi
18951 else
18952   ac_cpp_err=yes
18953 fi
18954 if test -z "$ac_cpp_err"; then
18955   ac_cv_header_stdc=yes
18956 else
18957   echo "$as_me: failed program was:" >&5
18958   cat "conftest.$ac_ext" >&5
18959   ac_cv_header_stdc=no
18960 fi
18961 rm -f conftest.err "conftest.$ac_ext"
18962
18963 if test $ac_cv_header_stdc = yes; then
18964   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18965   cat >"conftest.$ac_ext" <<_ACEOF
18966 #line 18966 "configure"
18967 #include "confdefs.h"
18968 #include <string.h>
18969
18970 _ACEOF
18971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18972   $EGREP "memchr" >/dev/null 2>&1; then
18973   :
18974 else
18975   ac_cv_header_stdc=no
18976 fi
18977 rm -rf conftest*
18978
18979 fi
18980
18981 if test $ac_cv_header_stdc = yes; then
18982   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18983   cat >"conftest.$ac_ext" <<_ACEOF
18984 #line 18984 "configure"
18985 #include "confdefs.h"
18986 #include <stdlib.h>
18987
18988 _ACEOF
18989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18990   $EGREP "free" >/dev/null 2>&1; then
18991   :
18992 else
18993   ac_cv_header_stdc=no
18994 fi
18995 rm -rf conftest*
18996
18997 fi
18998
18999 if test $ac_cv_header_stdc = yes; then
19000   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19001   if test "$cross_compiling" = yes; then
19002   :
19003 else
19004   cat >"conftest.$ac_ext" <<_ACEOF
19005 #line 19005 "configure"
19006 #include "confdefs.h"
19007 #include <ctype.h>
19008 #if ((' ' & 0x0FF) == 0x020)
19009 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19010 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19011 #else
19012 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19013                      || ('j' <= (c) && (c) <= 'r') \
19014                      || ('s' <= (c) && (c) <= 'z'))
19015 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19016 #endif
19017
19018 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19019 int
19020 main (void)
19021 {
19022   int i;
19023   for (i = 0; i < 256; i++)
19024     if (XOR (islower (i), ISLOWER (i))
19025         || toupper (i) != TOUPPER (i))
19026       $ac_main_return(2);
19027   $ac_main_return (0);
19028 }
19029 _ACEOF
19030 rm -f "conftest$ac_exeext"
19031 if { (eval echo "$as_me:19031: \"$ac_link\"") >&5
19032   (eval $ac_link) 2>&5
19033   ac_status=$?
19034   echo "$as_me:19034: \$? = $ac_status" >&5
19035   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19036   { (eval echo "$as_me:19036: \"$ac_try\"") >&5
19037   (eval $ac_try) 2>&5
19038   ac_status=$?
19039   echo "$as_me:19039: \$? = $ac_status" >&5
19040   (exit "$ac_status"); }; }; then
19041   :
19042 else
19043   echo "$as_me: program exited with status $ac_status" >&5
19044 echo "$as_me: failed program was:" >&5
19045 cat "conftest.$ac_ext" >&5
19046 ac_cv_header_stdc=no
19047 fi
19048 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19049 fi
19050 fi
19051 fi
19052 echo "$as_me:19052: result: $ac_cv_header_stdc" >&5
19053 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19054 if test $ac_cv_header_stdc = yes; then
19055
19056 cat >>confdefs.h <<\EOF
19057 #define STDC_HEADERS 1
19058 EOF
19059
19060 fi
19061
19062 ac_header_dirent=no
19063 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19064   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19065 echo "$as_me:19065: checking for $ac_hdr that defines DIR" >&5
19066 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19067 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19068   echo $ECHO_N "(cached) $ECHO_C" >&6
19069 else
19070   cat >"conftest.$ac_ext" <<_ACEOF
19071 #line 19071 "configure"
19072 #include "confdefs.h"
19073 #include <sys/types.h>
19074 #include <$ac_hdr>
19075
19076 int
19077 main (void)
19078 {
19079 if ((DIR *) 0)
19080 return 0;
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 rm -f "conftest.$ac_objext"
19086 if { (eval echo "$as_me:19086: \"$ac_compile\"") >&5
19087   (eval $ac_compile) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit "$ac_status"); } &&
19091          { ac_try='test -s "conftest.$ac_objext"'
19092   { (eval echo "$as_me:19092: \"$ac_try\"") >&5
19093   (eval $ac_try) 2>&5
19094   ac_status=$?
19095   echo "$as_me:19095: \$? = $ac_status" >&5
19096   (exit "$ac_status"); }; }; then
19097   eval "$as_ac_Header=yes"
19098 else
19099   echo "$as_me: failed program was:" >&5
19100 cat "conftest.$ac_ext" >&5
19101 eval "$as_ac_Header=no"
19102 fi
19103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19104 fi
19105 echo "$as_me:19105: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19106 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19107 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19108   cat >>confdefs.h <<EOF
19109 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19110 EOF
19111
19112 ac_header_dirent=$ac_hdr; break
19113 fi
19114
19115 done
19116 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19117 if test $ac_header_dirent = dirent.h; then
19118   echo "$as_me:19118: checking for opendir in -ldir" >&5
19119 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19120 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19121   echo $ECHO_N "(cached) $ECHO_C" >&6
19122 else
19123   ac_check_lib_save_LIBS=$LIBS
19124 LIBS="-ldir  $LIBS"
19125 cat >"conftest.$ac_ext" <<_ACEOF
19126 #line 19126 "configure"
19127 #include "confdefs.h"
19128
19129 /* Override any gcc2 internal prototype to avoid an error.  */
19130 #ifdef __cplusplus
19131 extern "C"
19132 #endif
19133 /* We use char because int might match the return type of a gcc2
19134    builtin and then its argument prototype would still apply.  */
19135 char opendir ();
19136 int
19137 main (void)
19138 {
19139 opendir ();
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19145 if { (eval echo "$as_me:19145: \"$ac_link\"") >&5
19146   (eval $ac_link) 2>&5
19147   ac_status=$?
19148   echo "$as_me:19148: \$? = $ac_status" >&5
19149   (exit "$ac_status"); } &&
19150          { ac_try='test -s "conftest$ac_exeext"'
19151   { (eval echo "$as_me:19151: \"$ac_try\"") >&5
19152   (eval $ac_try) 2>&5
19153   ac_status=$?
19154   echo "$as_me:19154: \$? = $ac_status" >&5
19155   (exit "$ac_status"); }; }; then
19156   ac_cv_lib_dir_opendir=yes
19157 else
19158   echo "$as_me: failed program was:" >&5
19159 cat "conftest.$ac_ext" >&5
19160 ac_cv_lib_dir_opendir=no
19161 fi
19162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19163 LIBS=$ac_check_lib_save_LIBS
19164 fi
19165 echo "$as_me:19165: result: $ac_cv_lib_dir_opendir" >&5
19166 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19167 if test "$ac_cv_lib_dir_opendir" = yes; then
19168   LIBS="$LIBS -ldir"
19169 fi
19170
19171 else
19172   echo "$as_me:19172: checking for opendir in -lx" >&5
19173 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19174 if test "${ac_cv_lib_x_opendir+set}" = set; then
19175   echo $ECHO_N "(cached) $ECHO_C" >&6
19176 else
19177   ac_check_lib_save_LIBS=$LIBS
19178 LIBS="-lx  $LIBS"
19179 cat >"conftest.$ac_ext" <<_ACEOF
19180 #line 19180 "configure"
19181 #include "confdefs.h"
19182
19183 /* Override any gcc2 internal prototype to avoid an error.  */
19184 #ifdef __cplusplus
19185 extern "C"
19186 #endif
19187 /* We use char because int might match the return type of a gcc2
19188    builtin and then its argument prototype would still apply.  */
19189 char opendir ();
19190 int
19191 main (void)
19192 {
19193 opendir ();
19194   ;
19195   return 0;
19196 }
19197 _ACEOF
19198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19199 if { (eval echo "$as_me:19199: \"$ac_link\"") >&5
19200   (eval $ac_link) 2>&5
19201   ac_status=$?
19202   echo "$as_me:19202: \$? = $ac_status" >&5
19203   (exit "$ac_status"); } &&
19204          { ac_try='test -s "conftest$ac_exeext"'
19205   { (eval echo "$as_me:19205: \"$ac_try\"") >&5
19206   (eval $ac_try) 2>&5
19207   ac_status=$?
19208   echo "$as_me:19208: \$? = $ac_status" >&5
19209   (exit "$ac_status"); }; }; then
19210   ac_cv_lib_x_opendir=yes
19211 else
19212   echo "$as_me: failed program was:" >&5
19213 cat "conftest.$ac_ext" >&5
19214 ac_cv_lib_x_opendir=no
19215 fi
19216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19217 LIBS=$ac_check_lib_save_LIBS
19218 fi
19219 echo "$as_me:19219: result: $ac_cv_lib_x_opendir" >&5
19220 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19221 if test "$ac_cv_lib_x_opendir" = yes; then
19222   LIBS="$LIBS -lx"
19223 fi
19224
19225 fi
19226
19227 echo "$as_me:19227: checking whether time.h and sys/time.h may both be included" >&5
19228 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19229 if test "${ac_cv_header_time+set}" = set; then
19230   echo $ECHO_N "(cached) $ECHO_C" >&6
19231 else
19232   cat >"conftest.$ac_ext" <<_ACEOF
19233 #line 19233 "configure"
19234 #include "confdefs.h"
19235 #include <sys/types.h>
19236 #include <sys/time.h>
19237 #include <time.h>
19238
19239 int
19240 main (void)
19241 {
19242 if ((struct tm *) 0)
19243 return 0;
19244   ;
19245   return 0;
19246 }
19247 _ACEOF
19248 rm -f "conftest.$ac_objext"
19249 if { (eval echo "$as_me:19249: \"$ac_compile\"") >&5
19250   (eval $ac_compile) 2>&5
19251   ac_status=$?
19252   echo "$as_me:19252: \$? = $ac_status" >&5
19253   (exit "$ac_status"); } &&
19254          { ac_try='test -s "conftest.$ac_objext"'
19255   { (eval echo "$as_me:19255: \"$ac_try\"") >&5
19256   (eval $ac_try) 2>&5
19257   ac_status=$?
19258   echo "$as_me:19258: \$? = $ac_status" >&5
19259   (exit "$ac_status"); }; }; then
19260   ac_cv_header_time=yes
19261 else
19262   echo "$as_me: failed program was:" >&5
19263 cat "conftest.$ac_ext" >&5
19264 ac_cv_header_time=no
19265 fi
19266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19267 fi
19268 echo "$as_me:19268: result: $ac_cv_header_time" >&5
19269 echo "${ECHO_T}$ac_cv_header_time" >&6
19270 if test $ac_cv_header_time = yes; then
19271
19272 cat >>confdefs.h <<\EOF
19273 #define TIME_WITH_SYS_TIME 1
19274 EOF
19275
19276 fi
19277
19278 cf_regex_func=no
19279 cf_regex_libs=
19280 case "$host_os" in
19281 (mingw*)
19282         # -lsystre -ltre -lintl -liconv
19283         echo "$as_me:19283: checking for regcomp in -lsystre" >&5
19284 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19285 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19286   echo $ECHO_N "(cached) $ECHO_C" >&6
19287 else
19288   ac_check_lib_save_LIBS=$LIBS
19289 LIBS="-lsystre  $LIBS"
19290 cat >"conftest.$ac_ext" <<_ACEOF
19291 #line 19291 "configure"
19292 #include "confdefs.h"
19293
19294 /* Override any gcc2 internal prototype to avoid an error.  */
19295 #ifdef __cplusplus
19296 extern "C"
19297 #endif
19298 /* We use char because int might match the return type of a gcc2
19299    builtin and then its argument prototype would still apply.  */
19300 char regcomp ();
19301 int
19302 main (void)
19303 {
19304 regcomp ();
19305   ;
19306   return 0;
19307 }
19308 _ACEOF
19309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19310 if { (eval echo "$as_me:19310: \"$ac_link\"") >&5
19311   (eval $ac_link) 2>&5
19312   ac_status=$?
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit "$ac_status"); } &&
19315          { ac_try='test -s "conftest$ac_exeext"'
19316   { (eval echo "$as_me:19316: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit "$ac_status"); }; }; then
19321   ac_cv_lib_systre_regcomp=yes
19322 else
19323   echo "$as_me: failed program was:" >&5
19324 cat "conftest.$ac_ext" >&5
19325 ac_cv_lib_systre_regcomp=no
19326 fi
19327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19328 LIBS=$ac_check_lib_save_LIBS
19329 fi
19330 echo "$as_me:19330: result: $ac_cv_lib_systre_regcomp" >&5
19331 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19332 if test "$ac_cv_lib_systre_regcomp" = yes; then
19333
19334                 echo "$as_me:19334: checking for libiconv_open in -liconv" >&5
19335 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19336 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19337   echo $ECHO_N "(cached) $ECHO_C" >&6
19338 else
19339   ac_check_lib_save_LIBS=$LIBS
19340 LIBS="-liconv  $LIBS"
19341 cat >"conftest.$ac_ext" <<_ACEOF
19342 #line 19342 "configure"
19343 #include "confdefs.h"
19344
19345 /* Override any gcc2 internal prototype to avoid an error.  */
19346 #ifdef __cplusplus
19347 extern "C"
19348 #endif
19349 /* We use char because int might match the return type of a gcc2
19350    builtin and then its argument prototype would still apply.  */
19351 char libiconv_open ();
19352 int
19353 main (void)
19354 {
19355 libiconv_open ();
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19361 if { (eval echo "$as_me:19361: \"$ac_link\"") >&5
19362   (eval $ac_link) 2>&5
19363   ac_status=$?
19364   echo "$as_me:19364: \$? = $ac_status" >&5
19365   (exit "$ac_status"); } &&
19366          { ac_try='test -s "conftest$ac_exeext"'
19367   { (eval echo "$as_me:19367: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit "$ac_status"); }; }; then
19372   ac_cv_lib_iconv_libiconv_open=yes
19373 else
19374   echo "$as_me: failed program was:" >&5
19375 cat "conftest.$ac_ext" >&5
19376 ac_cv_lib_iconv_libiconv_open=no
19377 fi
19378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19379 LIBS=$ac_check_lib_save_LIBS
19380 fi
19381 echo "$as_me:19381: result: $ac_cv_lib_iconv_libiconv_open" >&5
19382 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19383 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19384
19385 cf_add_libs="$LIBS"
19386 # reverse order
19387 cf_add_0lib=
19388 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19389 # filter duplicates
19390 for cf_add_1lib in $cf_add_0lib; do
19391         for cf_add_2lib in $cf_add_libs; do
19392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19393                         cf_add_1lib=
19394                         break
19395                 fi
19396         done
19397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19398 done
19399 LIBS="$cf_add_libs"
19400
19401 fi
19402
19403                 echo "$as_me:19403: checking for libintl_gettext in -lintl" >&5
19404 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19405 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19406   echo $ECHO_N "(cached) $ECHO_C" >&6
19407 else
19408   ac_check_lib_save_LIBS=$LIBS
19409 LIBS="-lintl  $LIBS"
19410 cat >"conftest.$ac_ext" <<_ACEOF
19411 #line 19411 "configure"
19412 #include "confdefs.h"
19413
19414 /* Override any gcc2 internal prototype to avoid an error.  */
19415 #ifdef __cplusplus
19416 extern "C"
19417 #endif
19418 /* We use char because int might match the return type of a gcc2
19419    builtin and then its argument prototype would still apply.  */
19420 char libintl_gettext ();
19421 int
19422 main (void)
19423 {
19424 libintl_gettext ();
19425   ;
19426   return 0;
19427 }
19428 _ACEOF
19429 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19430 if { (eval echo "$as_me:19430: \"$ac_link\"") >&5
19431   (eval $ac_link) 2>&5
19432   ac_status=$?
19433   echo "$as_me:19433: \$? = $ac_status" >&5
19434   (exit "$ac_status"); } &&
19435          { ac_try='test -s "conftest$ac_exeext"'
19436   { (eval echo "$as_me:19436: \"$ac_try\"") >&5
19437   (eval $ac_try) 2>&5
19438   ac_status=$?
19439   echo "$as_me:19439: \$? = $ac_status" >&5
19440   (exit "$ac_status"); }; }; then
19441   ac_cv_lib_intl_libintl_gettext=yes
19442 else
19443   echo "$as_me: failed program was:" >&5
19444 cat "conftest.$ac_ext" >&5
19445 ac_cv_lib_intl_libintl_gettext=no
19446 fi
19447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19448 LIBS=$ac_check_lib_save_LIBS
19449 fi
19450 echo "$as_me:19450: result: $ac_cv_lib_intl_libintl_gettext" >&5
19451 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19452 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19453
19454 cf_add_libs="$LIBS"
19455 # reverse order
19456 cf_add_0lib=
19457 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19458 # filter duplicates
19459 for cf_add_1lib in $cf_add_0lib; do
19460         for cf_add_2lib in $cf_add_libs; do
19461                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19462                         cf_add_1lib=
19463                         break
19464                 fi
19465         done
19466         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19467 done
19468 LIBS="$cf_add_libs"
19469
19470 fi
19471
19472                 echo "$as_me:19472: checking for tre_regcomp in -ltre" >&5
19473 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19474 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19475   echo $ECHO_N "(cached) $ECHO_C" >&6
19476 else
19477   ac_check_lib_save_LIBS=$LIBS
19478 LIBS="-ltre  $LIBS"
19479 cat >"conftest.$ac_ext" <<_ACEOF
19480 #line 19480 "configure"
19481 #include "confdefs.h"
19482
19483 /* Override any gcc2 internal prototype to avoid an error.  */
19484 #ifdef __cplusplus
19485 extern "C"
19486 #endif
19487 /* We use char because int might match the return type of a gcc2
19488    builtin and then its argument prototype would still apply.  */
19489 char tre_regcomp ();
19490 int
19491 main (void)
19492 {
19493 tre_regcomp ();
19494   ;
19495   return 0;
19496 }
19497 _ACEOF
19498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19499 if { (eval echo "$as_me:19499: \"$ac_link\"") >&5
19500   (eval $ac_link) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit "$ac_status"); } &&
19504          { ac_try='test -s "conftest$ac_exeext"'
19505   { (eval echo "$as_me:19505: \"$ac_try\"") >&5
19506   (eval $ac_try) 2>&5
19507   ac_status=$?
19508   echo "$as_me:19508: \$? = $ac_status" >&5
19509   (exit "$ac_status"); }; }; then
19510   ac_cv_lib_tre_tre_regcomp=yes
19511 else
19512   echo "$as_me: failed program was:" >&5
19513 cat "conftest.$ac_ext" >&5
19514 ac_cv_lib_tre_tre_regcomp=no
19515 fi
19516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19517 LIBS=$ac_check_lib_save_LIBS
19518 fi
19519 echo "$as_me:19519: result: $ac_cv_lib_tre_tre_regcomp" >&5
19520 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19521 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19522
19523 cf_add_libs="$LIBS"
19524 # reverse order
19525 cf_add_0lib=
19526 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19527 # filter duplicates
19528 for cf_add_1lib in $cf_add_0lib; do
19529         for cf_add_2lib in $cf_add_libs; do
19530                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19531                         cf_add_1lib=
19532                         break
19533                 fi
19534         done
19535         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19536 done
19537 LIBS="$cf_add_libs"
19538
19539 fi
19540
19541 cf_add_libs="$LIBS"
19542 # reverse order
19543 cf_add_0lib=
19544 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19545 # filter duplicates
19546 for cf_add_1lib in $cf_add_0lib; do
19547         for cf_add_2lib in $cf_add_libs; do
19548                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19549                         cf_add_1lib=
19550                         break
19551                 fi
19552         done
19553         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19554 done
19555 LIBS="$cf_add_libs"
19556
19557                 cf_regex_func=regcomp
19558
19559 else
19560
19561                 echo "$as_me:19561: checking for regcomp in -lgnurx" >&5
19562 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19563 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19564   echo $ECHO_N "(cached) $ECHO_C" >&6
19565 else
19566   ac_check_lib_save_LIBS=$LIBS
19567 LIBS="-lgnurx  $LIBS"
19568 cat >"conftest.$ac_ext" <<_ACEOF
19569 #line 19569 "configure"
19570 #include "confdefs.h"
19571
19572 /* Override any gcc2 internal prototype to avoid an error.  */
19573 #ifdef __cplusplus
19574 extern "C"
19575 #endif
19576 /* We use char because int might match the return type of a gcc2
19577    builtin and then its argument prototype would still apply.  */
19578 char regcomp ();
19579 int
19580 main (void)
19581 {
19582 regcomp ();
19583   ;
19584   return 0;
19585 }
19586 _ACEOF
19587 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19588 if { (eval echo "$as_me:19588: \"$ac_link\"") >&5
19589   (eval $ac_link) 2>&5
19590   ac_status=$?
19591   echo "$as_me:19591: \$? = $ac_status" >&5
19592   (exit "$ac_status"); } &&
19593          { ac_try='test -s "conftest$ac_exeext"'
19594   { (eval echo "$as_me:19594: \"$ac_try\"") >&5
19595   (eval $ac_try) 2>&5
19596   ac_status=$?
19597   echo "$as_me:19597: \$? = $ac_status" >&5
19598   (exit "$ac_status"); }; }; then
19599   ac_cv_lib_gnurx_regcomp=yes
19600 else
19601   echo "$as_me: failed program was:" >&5
19602 cat "conftest.$ac_ext" >&5
19603 ac_cv_lib_gnurx_regcomp=no
19604 fi
19605 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19606 LIBS=$ac_check_lib_save_LIBS
19607 fi
19608 echo "$as_me:19608: result: $ac_cv_lib_gnurx_regcomp" >&5
19609 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19610 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19611
19612 cf_add_libs="$LIBS"
19613 # reverse order
19614 cf_add_0lib=
19615 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19616 # filter duplicates
19617 for cf_add_1lib in $cf_add_0lib; do
19618         for cf_add_2lib in $cf_add_libs; do
19619                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19620                         cf_add_1lib=
19621                         break
19622                 fi
19623         done
19624         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19625 done
19626 LIBS="$cf_add_libs"
19627
19628                         cf_regex_func=regcomp
19629 fi
19630
19631 fi
19632
19633         ;;
19634 (*)
19635         cf_regex_libs="regex re"
19636         echo "$as_me:19636: checking for regcomp" >&5
19637 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19638 if test "${ac_cv_func_regcomp+set}" = set; then
19639   echo $ECHO_N "(cached) $ECHO_C" >&6
19640 else
19641   cat >"conftest.$ac_ext" <<_ACEOF
19642 #line 19642 "configure"
19643 #include "confdefs.h"
19644 #define regcomp autoconf_temporary
19645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19646 #undef regcomp
19647
19648 #ifdef __cplusplus
19649 extern "C"
19650 #endif
19651
19652 /* We use char because int might match the return type of a gcc2
19653    builtin and then its argument prototype would still apply.  */
19654 char regcomp (void);
19655
19656 int
19657 main (void)
19658 {
19659
19660 /* The GNU C library defines stubs for functions which it implements
19661     to always fail with ENOSYS.  Some functions are actually named
19662     something starting with __ and the normal name is an alias.  */
19663 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19664 #error found stub for regcomp
19665 #endif
19666
19667         return regcomp ();
19668   ;
19669   return 0;
19670 }
19671 _ACEOF
19672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19673 if { (eval echo "$as_me:19673: \"$ac_link\"") >&5
19674   (eval $ac_link) 2>&5
19675   ac_status=$?
19676   echo "$as_me:19676: \$? = $ac_status" >&5
19677   (exit "$ac_status"); } &&
19678          { ac_try='test -s "conftest$ac_exeext"'
19679   { (eval echo "$as_me:19679: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:19682: \$? = $ac_status" >&5
19683   (exit "$ac_status"); }; }; then
19684   ac_cv_func_regcomp=yes
19685 else
19686   echo "$as_me: failed program was:" >&5
19687 cat "conftest.$ac_ext" >&5
19688 ac_cv_func_regcomp=no
19689 fi
19690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19691 fi
19692 echo "$as_me:19692: result: $ac_cv_func_regcomp" >&5
19693 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19694 if test "$ac_cv_func_regcomp" = yes; then
19695   cf_regex_func=regcomp
19696 else
19697
19698                 for cf_regex_lib in $cf_regex_libs
19699                 do
19700                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19701 echo "$as_me:19701: checking for regcomp in -l$cf_regex_lib" >&5
19702 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19703 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19704   echo $ECHO_N "(cached) $ECHO_C" >&6
19705 else
19706   ac_check_lib_save_LIBS=$LIBS
19707 LIBS="-l$cf_regex_lib  $LIBS"
19708 cat >"conftest.$ac_ext" <<_ACEOF
19709 #line 19709 "configure"
19710 #include "confdefs.h"
19711
19712 /* Override any gcc2 internal prototype to avoid an error.  */
19713 #ifdef __cplusplus
19714 extern "C"
19715 #endif
19716 /* We use char because int might match the return type of a gcc2
19717    builtin and then its argument prototype would still apply.  */
19718 char regcomp ();
19719 int
19720 main (void)
19721 {
19722 regcomp ();
19723   ;
19724   return 0;
19725 }
19726 _ACEOF
19727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19728 if { (eval echo "$as_me:19728: \"$ac_link\"") >&5
19729   (eval $ac_link) 2>&5
19730   ac_status=$?
19731   echo "$as_me:19731: \$? = $ac_status" >&5
19732   (exit "$ac_status"); } &&
19733          { ac_try='test -s "conftest$ac_exeext"'
19734   { (eval echo "$as_me:19734: \"$ac_try\"") >&5
19735   (eval $ac_try) 2>&5
19736   ac_status=$?
19737   echo "$as_me:19737: \$? = $ac_status" >&5
19738   (exit "$ac_status"); }; }; then
19739   eval "$as_ac_Lib=yes"
19740 else
19741   echo "$as_me: failed program was:" >&5
19742 cat "conftest.$ac_ext" >&5
19743 eval "$as_ac_Lib=no"
19744 fi
19745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19746 LIBS=$ac_check_lib_save_LIBS
19747 fi
19748 echo "$as_me:19748: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19749 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19750 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19751
19752 cf_add_libs="$LIBS"
19753 # reverse order
19754 cf_add_0lib=
19755 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19756 # filter duplicates
19757 for cf_add_1lib in $cf_add_0lib; do
19758         for cf_add_2lib in $cf_add_libs; do
19759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19760                         cf_add_1lib=
19761                         break
19762                 fi
19763         done
19764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19765 done
19766 LIBS="$cf_add_libs"
19767
19768                                         cf_regex_func=regcomp
19769                                         break
19770 fi
19771
19772                 done
19773
19774 fi
19775
19776         ;;
19777 esac
19778
19779 if test "$cf_regex_func" = no ; then
19780         echo "$as_me:19780: checking for compile" >&5
19781 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19782 if test "${ac_cv_func_compile+set}" = set; then
19783   echo $ECHO_N "(cached) $ECHO_C" >&6
19784 else
19785   cat >"conftest.$ac_ext" <<_ACEOF
19786 #line 19786 "configure"
19787 #include "confdefs.h"
19788 #define compile autoconf_temporary
19789 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19790 #undef compile
19791
19792 #ifdef __cplusplus
19793 extern "C"
19794 #endif
19795
19796 /* We use char because int might match the return type of a gcc2
19797    builtin and then its argument prototype would still apply.  */
19798 char compile (void);
19799
19800 int
19801 main (void)
19802 {
19803
19804 /* The GNU C library defines stubs for functions which it implements
19805     to always fail with ENOSYS.  Some functions are actually named
19806     something starting with __ and the normal name is an alias.  */
19807 #if defined (__stub_compile) || defined (__stub___compile)
19808 #error found stub for compile
19809 #endif
19810
19811         return compile ();
19812   ;
19813   return 0;
19814 }
19815 _ACEOF
19816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19817 if { (eval echo "$as_me:19817: \"$ac_link\"") >&5
19818   (eval $ac_link) 2>&5
19819   ac_status=$?
19820   echo "$as_me:19820: \$? = $ac_status" >&5
19821   (exit "$ac_status"); } &&
19822          { ac_try='test -s "conftest$ac_exeext"'
19823   { (eval echo "$as_me:19823: \"$ac_try\"") >&5
19824   (eval $ac_try) 2>&5
19825   ac_status=$?
19826   echo "$as_me:19826: \$? = $ac_status" >&5
19827   (exit "$ac_status"); }; }; then
19828   ac_cv_func_compile=yes
19829 else
19830   echo "$as_me: failed program was:" >&5
19831 cat "conftest.$ac_ext" >&5
19832 ac_cv_func_compile=no
19833 fi
19834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19835 fi
19836 echo "$as_me:19836: result: $ac_cv_func_compile" >&5
19837 echo "${ECHO_T}$ac_cv_func_compile" >&6
19838 if test "$ac_cv_func_compile" = yes; then
19839   cf_regex_func=compile
19840 else
19841
19842                 echo "$as_me:19842: checking for compile in -lgen" >&5
19843 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19844 if test "${ac_cv_lib_gen_compile+set}" = set; then
19845   echo $ECHO_N "(cached) $ECHO_C" >&6
19846 else
19847   ac_check_lib_save_LIBS=$LIBS
19848 LIBS="-lgen  $LIBS"
19849 cat >"conftest.$ac_ext" <<_ACEOF
19850 #line 19850 "configure"
19851 #include "confdefs.h"
19852
19853 /* Override any gcc2 internal prototype to avoid an error.  */
19854 #ifdef __cplusplus
19855 extern "C"
19856 #endif
19857 /* We use char because int might match the return type of a gcc2
19858    builtin and then its argument prototype would still apply.  */
19859 char compile ();
19860 int
19861 main (void)
19862 {
19863 compile ();
19864   ;
19865   return 0;
19866 }
19867 _ACEOF
19868 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19869 if { (eval echo "$as_me:19869: \"$ac_link\"") >&5
19870   (eval $ac_link) 2>&5
19871   ac_status=$?
19872   echo "$as_me:19872: \$? = $ac_status" >&5
19873   (exit "$ac_status"); } &&
19874          { ac_try='test -s "conftest$ac_exeext"'
19875   { (eval echo "$as_me:19875: \"$ac_try\"") >&5
19876   (eval $ac_try) 2>&5
19877   ac_status=$?
19878   echo "$as_me:19878: \$? = $ac_status" >&5
19879   (exit "$ac_status"); }; }; then
19880   ac_cv_lib_gen_compile=yes
19881 else
19882   echo "$as_me: failed program was:" >&5
19883 cat "conftest.$ac_ext" >&5
19884 ac_cv_lib_gen_compile=no
19885 fi
19886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19887 LIBS=$ac_check_lib_save_LIBS
19888 fi
19889 echo "$as_me:19889: result: $ac_cv_lib_gen_compile" >&5
19890 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19891 if test "$ac_cv_lib_gen_compile" = yes; then
19892
19893 cf_add_libs="$LIBS"
19894 # reverse order
19895 cf_add_0lib=
19896 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19897 # filter duplicates
19898 for cf_add_1lib in $cf_add_0lib; do
19899         for cf_add_2lib in $cf_add_libs; do
19900                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19901                         cf_add_1lib=
19902                         break
19903                 fi
19904         done
19905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19906 done
19907 LIBS="$cf_add_libs"
19908
19909                                 cf_regex_func=compile
19910 fi
19911
19912 fi
19913
19914 fi
19915
19916 if test "$cf_regex_func" = no ; then
19917         { echo "$as_me:19917: WARNING: cannot find regular expression library" >&5
19918 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19919 fi
19920
19921 echo "$as_me:19921: checking for regular-expression headers" >&5
19922 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19923 if test "${cf_cv_regex_hdrs+set}" = set; then
19924   echo $ECHO_N "(cached) $ECHO_C" >&6
19925 else
19926
19927 cf_cv_regex_hdrs=no
19928 case "$cf_regex_func" in
19929 (compile)
19930         for cf_regex_hdr in regexp.h regexpr.h
19931         do
19932                 cat >"conftest.$ac_ext" <<_ACEOF
19933 #line 19933 "configure"
19934 #include "confdefs.h"
19935 #include <$cf_regex_hdr>
19936 int
19937 main (void)
19938 {
19939
19940                         char *p = compile("", "", "", 0);
19941                         int x = step("", "");
19942                         (void)p;
19943                         (void)x;
19944
19945   ;
19946   return 0;
19947 }
19948 _ACEOF
19949 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19950 if { (eval echo "$as_me:19950: \"$ac_link\"") >&5
19951   (eval $ac_link) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit "$ac_status"); } &&
19955          { ac_try='test -s "conftest$ac_exeext"'
19956   { (eval echo "$as_me:19956: \"$ac_try\"") >&5
19957   (eval $ac_try) 2>&5
19958   ac_status=$?
19959   echo "$as_me:19959: \$? = $ac_status" >&5
19960   (exit "$ac_status"); }; }; then
19961
19962                         cf_cv_regex_hdrs=$cf_regex_hdr
19963                         break
19964
19965 else
19966   echo "$as_me: failed program was:" >&5
19967 cat "conftest.$ac_ext" >&5
19968 fi
19969 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19970         done
19971         ;;
19972 (*)
19973         for cf_regex_hdr in regex.h
19974         do
19975                 cat >"conftest.$ac_ext" <<_ACEOF
19976 #line 19976 "configure"
19977 #include "confdefs.h"
19978 #include <sys/types.h>
19979 #include <$cf_regex_hdr>
19980 int
19981 main (void)
19982 {
19983
19984                         regex_t *p = 0;
19985                         int x = regcomp(p, "", 0);
19986                         int y = regexec(p, "", 0, 0, 0);
19987                         (void)x;
19988                         (void)y;
19989                         regfree(p);
19990
19991   ;
19992   return 0;
19993 }
19994 _ACEOF
19995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19996 if { (eval echo "$as_me:19996: \"$ac_link\"") >&5
19997   (eval $ac_link) 2>&5
19998   ac_status=$?
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit "$ac_status"); } &&
20001          { ac_try='test -s "conftest$ac_exeext"'
20002   { (eval echo "$as_me:20002: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:20005: \$? = $ac_status" >&5
20006   (exit "$ac_status"); }; }; then
20007
20008                         cf_cv_regex_hdrs=$cf_regex_hdr
20009                         break
20010
20011 else
20012   echo "$as_me: failed program was:" >&5
20013 cat "conftest.$ac_ext" >&5
20014 fi
20015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20016         done
20017         ;;
20018 esac
20019
20020 fi
20021 echo "$as_me:20021: result: $cf_cv_regex_hdrs" >&5
20022 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20023
20024 case "$cf_cv_regex_hdrs" in
20025         (no)            { echo "$as_me:20025: WARNING: no regular expression header found" >&5
20026 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20027         (regex.h)
20028 cat >>confdefs.h <<\EOF
20029 #define HAVE_REGEX_H_FUNCS 1
20030 EOF
20031  ;;
20032         (regexp.h)
20033 cat >>confdefs.h <<\EOF
20034 #define HAVE_REGEXP_H_FUNCS 1
20035 EOF
20036  ;;
20037         (regexpr.h)
20038 cat >>confdefs.h <<\EOF
20039 #define HAVE_REGEXPR_H_FUNCS 1
20040 EOF
20041  ;;
20042 esac
20043
20044 for ac_header in \
20045 fcntl.h \
20046 getopt.h \
20047 limits.h \
20048 locale.h \
20049 math.h \
20050 poll.h \
20051 sys/ioctl.h \
20052 sys/param.h \
20053 sys/poll.h \
20054 sys/select.h \
20055 sys/time.h \
20056 sys/times.h \
20057 unistd.h \
20058 wctype.h \
20059
20060 do
20061 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20062 echo "$as_me:20062: checking for $ac_header" >&5
20063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20065   echo $ECHO_N "(cached) $ECHO_C" >&6
20066 else
20067   cat >"conftest.$ac_ext" <<_ACEOF
20068 #line 20068 "configure"
20069 #include "confdefs.h"
20070 #include <$ac_header>
20071 _ACEOF
20072 if { (eval echo "$as_me:20072: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20073   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20074   ac_status=$?
20075   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20076   rm -f conftest.er1
20077   cat conftest.err >&5
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit "$ac_status"); } >/dev/null; then
20080   if test -s conftest.err; then
20081     ac_cpp_err=$ac_c_preproc_warn_flag
20082   else
20083     ac_cpp_err=
20084   fi
20085 else
20086   ac_cpp_err=yes
20087 fi
20088 if test -z "$ac_cpp_err"; then
20089   eval "$as_ac_Header=yes"
20090 else
20091   echo "$as_me: failed program was:" >&5
20092   cat "conftest.$ac_ext" >&5
20093   eval "$as_ac_Header=no"
20094 fi
20095 rm -f conftest.err "conftest.$ac_ext"
20096 fi
20097 echo "$as_me:20097: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20098 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20099 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20100   cat >>confdefs.h <<EOF
20101 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20102 EOF
20103
20104 fi
20105 done
20106
20107 for ac_header in unistd.h getopt.h
20108 do
20109 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20110 echo "$as_me:20110: checking for $ac_header" >&5
20111 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20112 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20113   echo $ECHO_N "(cached) $ECHO_C" >&6
20114 else
20115   cat >"conftest.$ac_ext" <<_ACEOF
20116 #line 20116 "configure"
20117 #include "confdefs.h"
20118 #include <$ac_header>
20119 _ACEOF
20120 if { (eval echo "$as_me:20120: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20121   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20122   ac_status=$?
20123   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20124   rm -f conftest.er1
20125   cat conftest.err >&5
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit "$ac_status"); } >/dev/null; then
20128   if test -s conftest.err; then
20129     ac_cpp_err=$ac_c_preproc_warn_flag
20130   else
20131     ac_cpp_err=
20132   fi
20133 else
20134   ac_cpp_err=yes
20135 fi
20136 if test -z "$ac_cpp_err"; then
20137   eval "$as_ac_Header=yes"
20138 else
20139   echo "$as_me: failed program was:" >&5
20140   cat "conftest.$ac_ext" >&5
20141   eval "$as_ac_Header=no"
20142 fi
20143 rm -f conftest.err "conftest.$ac_ext"
20144 fi
20145 echo "$as_me:20145: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20146 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20147 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20148   cat >>confdefs.h <<EOF
20149 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20150 EOF
20151
20152 fi
20153 done
20154
20155 echo "$as_me:20155: checking for header declaring getopt variables" >&5
20156 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20157 if test "${cf_cv_getopt_header+set}" = set; then
20158   echo $ECHO_N "(cached) $ECHO_C" >&6
20159 else
20160
20161 cf_cv_getopt_header=none
20162 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20163 do
20164 cat >"conftest.$ac_ext" <<_ACEOF
20165 #line 20165 "configure"
20166 #include "confdefs.h"
20167
20168 #include <$cf_header>
20169 int
20170 main (void)
20171 {
20172 int x = optind; char *y = optarg; (void)x; (void)y
20173   ;
20174   return 0;
20175 }
20176 _ACEOF
20177 rm -f "conftest.$ac_objext"
20178 if { (eval echo "$as_me:20178: \"$ac_compile\"") >&5
20179   (eval $ac_compile) 2>&5
20180   ac_status=$?
20181   echo "$as_me:20181: \$? = $ac_status" >&5
20182   (exit "$ac_status"); } &&
20183          { ac_try='test -s "conftest.$ac_objext"'
20184   { (eval echo "$as_me:20184: \"$ac_try\"") >&5
20185   (eval $ac_try) 2>&5
20186   ac_status=$?
20187   echo "$as_me:20187: \$? = $ac_status" >&5
20188   (exit "$ac_status"); }; }; then
20189   cf_cv_getopt_header=$cf_header
20190  break
20191 else
20192   echo "$as_me: failed program was:" >&5
20193 cat "conftest.$ac_ext" >&5
20194 fi
20195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20196 done
20197
20198 fi
20199 echo "$as_me:20199: result: $cf_cv_getopt_header" >&5
20200 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20201 if test "$cf_cv_getopt_header" != none ; then
20202
20203 cat >>confdefs.h <<\EOF
20204 #define HAVE_GETOPT_HEADER 1
20205 EOF
20206
20207 fi
20208 if test "$cf_cv_getopt_header" = getopt.h ; then
20209
20210 cat >>confdefs.h <<\EOF
20211 #define NEED_GETOPT_H 1
20212 EOF
20213
20214 fi
20215
20216 echo "$as_me:20216: checking if external environ is declared" >&5
20217 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20218 if test "${cf_cv_dcl_environ+set}" = set; then
20219   echo $ECHO_N "(cached) $ECHO_C" >&6
20220 else
20221
20222     cat >"conftest.$ac_ext" <<_ACEOF
20223 #line 20223 "configure"
20224 #include "confdefs.h"
20225
20226 #ifdef HAVE_STDLIB_H
20227 #include <stdlib.h>
20228 #endif
20229 #include <unistd.h>
20230 int
20231 main (void)
20232 {
20233 int x = (int) environ
20234   ;
20235   return 0;
20236 }
20237 _ACEOF
20238 rm -f "conftest.$ac_objext"
20239 if { (eval echo "$as_me:20239: \"$ac_compile\"") >&5
20240   (eval $ac_compile) 2>&5
20241   ac_status=$?
20242   echo "$as_me:20242: \$? = $ac_status" >&5
20243   (exit "$ac_status"); } &&
20244          { ac_try='test -s "conftest.$ac_objext"'
20245   { (eval echo "$as_me:20245: \"$ac_try\"") >&5
20246   (eval $ac_try) 2>&5
20247   ac_status=$?
20248   echo "$as_me:20248: \$? = $ac_status" >&5
20249   (exit "$ac_status"); }; }; then
20250   cf_cv_dcl_environ=yes
20251 else
20252   echo "$as_me: failed program was:" >&5
20253 cat "conftest.$ac_ext" >&5
20254 cf_cv_dcl_environ=no
20255 fi
20256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20257
20258 fi
20259 echo "$as_me:20259: result: $cf_cv_dcl_environ" >&5
20260 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20261
20262 if test "$cf_cv_dcl_environ" = no ; then
20263
20264 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20265
20266     cat >>confdefs.h <<EOF
20267 #define $cf_result 1
20268 EOF
20269
20270 fi
20271
20272 # It's possible (for near-UNIX clones) that the data doesn't exist
20273
20274 echo "$as_me:20274: checking if external environ exists" >&5
20275 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20276 if test "${cf_cv_have_environ+set}" = set; then
20277   echo $ECHO_N "(cached) $ECHO_C" >&6
20278 else
20279
20280         cat >"conftest.$ac_ext" <<_ACEOF
20281 #line 20281 "configure"
20282 #include "confdefs.h"
20283
20284 #undef environ
20285 extern int environ;
20286
20287 int
20288 main (void)
20289 {
20290 environ = 2
20291   ;
20292   return 0;
20293 }
20294 _ACEOF
20295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20296 if { (eval echo "$as_me:20296: \"$ac_link\"") >&5
20297   (eval $ac_link) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit "$ac_status"); } &&
20301          { ac_try='test -s "conftest$ac_exeext"'
20302   { (eval echo "$as_me:20302: \"$ac_try\"") >&5
20303   (eval $ac_try) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit "$ac_status"); }; }; then
20307   cf_cv_have_environ=yes
20308 else
20309   echo "$as_me: failed program was:" >&5
20310 cat "conftest.$ac_ext" >&5
20311 cf_cv_have_environ=no
20312 fi
20313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20314
20315 fi
20316 echo "$as_me:20316: result: $cf_cv_have_environ" >&5
20317 echo "${ECHO_T}$cf_cv_have_environ" >&6
20318
20319 if test "$cf_cv_have_environ" = yes ; then
20320
20321 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20322
20323         cat >>confdefs.h <<EOF
20324 #define $cf_result 1
20325 EOF
20326
20327 fi
20328
20329 echo "$as_me:20329: checking for getenv" >&5
20330 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20331 if test "${ac_cv_func_getenv+set}" = set; then
20332   echo $ECHO_N "(cached) $ECHO_C" >&6
20333 else
20334   cat >"conftest.$ac_ext" <<_ACEOF
20335 #line 20335 "configure"
20336 #include "confdefs.h"
20337 #define getenv autoconf_temporary
20338 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20339 #undef getenv
20340
20341 #ifdef __cplusplus
20342 extern "C"
20343 #endif
20344
20345 /* We use char because int might match the return type of a gcc2
20346    builtin and then its argument prototype would still apply.  */
20347 char getenv (void);
20348
20349 int
20350 main (void)
20351 {
20352
20353 /* The GNU C library defines stubs for functions which it implements
20354     to always fail with ENOSYS.  Some functions are actually named
20355     something starting with __ and the normal name is an alias.  */
20356 #if defined (__stub_getenv) || defined (__stub___getenv)
20357 #error found stub for getenv
20358 #endif
20359
20360         return getenv ();
20361   ;
20362   return 0;
20363 }
20364 _ACEOF
20365 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20366 if { (eval echo "$as_me:20366: \"$ac_link\"") >&5
20367   (eval $ac_link) 2>&5
20368   ac_status=$?
20369   echo "$as_me:20369: \$? = $ac_status" >&5
20370   (exit "$ac_status"); } &&
20371          { ac_try='test -s "conftest$ac_exeext"'
20372   { (eval echo "$as_me:20372: \"$ac_try\"") >&5
20373   (eval $ac_try) 2>&5
20374   ac_status=$?
20375   echo "$as_me:20375: \$? = $ac_status" >&5
20376   (exit "$ac_status"); }; }; then
20377   ac_cv_func_getenv=yes
20378 else
20379   echo "$as_me: failed program was:" >&5
20380 cat "conftest.$ac_ext" >&5
20381 ac_cv_func_getenv=no
20382 fi
20383 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20384 fi
20385 echo "$as_me:20385: result: $ac_cv_func_getenv" >&5
20386 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20387
20388 for ac_func in putenv setenv strdup
20389 do
20390 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20391 echo "$as_me:20391: checking for $ac_func" >&5
20392 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20393 if eval "test \"\${$as_ac_var+set}\" = set"; then
20394   echo $ECHO_N "(cached) $ECHO_C" >&6
20395 else
20396   cat >"conftest.$ac_ext" <<_ACEOF
20397 #line 20397 "configure"
20398 #include "confdefs.h"
20399 #define $ac_func autoconf_temporary
20400 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20401 #undef $ac_func
20402
20403 #ifdef __cplusplus
20404 extern "C"
20405 #endif
20406
20407 /* We use char because int might match the return type of a gcc2
20408    builtin and then its argument prototype would still apply.  */
20409 char $ac_func (void);
20410
20411 int
20412 main (void)
20413 {
20414
20415 /* The GNU C library defines stubs for functions which it implements
20416     to always fail with ENOSYS.  Some functions are actually named
20417     something starting with __ and the normal name is an alias.  */
20418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20419 #error found stub for $ac_func
20420 #endif
20421
20422         return $ac_func ();
20423   ;
20424   return 0;
20425 }
20426 _ACEOF
20427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20428 if { (eval echo "$as_me:20428: \"$ac_link\"") >&5
20429   (eval $ac_link) 2>&5
20430   ac_status=$?
20431   echo "$as_me:20431: \$? = $ac_status" >&5
20432   (exit "$ac_status"); } &&
20433          { ac_try='test -s "conftest$ac_exeext"'
20434   { (eval echo "$as_me:20434: \"$ac_try\"") >&5
20435   (eval $ac_try) 2>&5
20436   ac_status=$?
20437   echo "$as_me:20437: \$? = $ac_status" >&5
20438   (exit "$ac_status"); }; }; then
20439   eval "$as_ac_var=yes"
20440 else
20441   echo "$as_me: failed program was:" >&5
20442 cat "conftest.$ac_ext" >&5
20443 eval "$as_ac_var=no"
20444 fi
20445 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20446 fi
20447 echo "$as_me:20447: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20448 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20449 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20450   cat >>confdefs.h <<EOF
20451 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20452 EOF
20453
20454 fi
20455 done
20456
20457 echo "$as_me:20457: checking if getenv returns consistent values" >&5
20458 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20459 if test "${cf_cv_consistent_getenv+set}" = set; then
20460   echo $ECHO_N "(cached) $ECHO_C" >&6
20461 else
20462
20463 if test "$cross_compiling" = yes; then
20464   cf_cv_consistent_getenv=unknown
20465 else
20466   cat >"conftest.$ac_ext" <<_ACEOF
20467 #line 20467 "configure"
20468 #include "confdefs.h"
20469
20470 #include <stdlib.h>
20471 #include <unistd.h>
20472 #include <stdio.h>
20473 #include <string.h>
20474 #include <sys/types.h>
20475
20476 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20477 extern char **environ;  /* POSIX, but some systems are not... */
20478 #endif
20479
20480 #if defined(HAVE_STRDUP)
20481 #define str_alloc(s) strdup(s)
20482 #else
20483 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20484 #endif
20485
20486 static void set_value(const char *name, const char *value)
20487 {
20488 #if defined(HAVE_SETENV)
20489         setenv(name, value, 1);
20490 #elif defined(HAVE_PUTENV)
20491         char buffer[1024];
20492         sprintf(buffer, "%s=%s", name, value);
20493         putenv(str_alloc(buffer));
20494 #else
20495 #error neither putenv/setenv found
20496 #endif
20497 }
20498 int main(void)
20499 {
20500         int pass;
20501         size_t numenv, limit, j;
20502         char **mynames;
20503         char **myvalues;
20504         char **mypointer;
20505         char *equals;
20506         for (numenv = 0; environ[numenv]; ++numenv) ;
20507         limit = numenv + 10;
20508         mynames = (char **) calloc(limit + 1, sizeof(char *));
20509         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20510         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20511 #if defined(HAVE_ENVIRON)
20512         for (j = 0; environ[j]; ++j) {
20513                 mynames[j] = str_alloc(environ[j]);
20514                 equals = strchr(mynames[j], '=');
20515                 if (equals != 0) {
20516                         *equals++ = '\\0';
20517                         myvalues[j] = str_alloc(equals);
20518                 } else {
20519                         myvalues[j] = str_alloc("");
20520                 }
20521         }
20522 #endif
20523         for (j = numenv; j < limit; ++j) {
20524                 char name[80];
20525                 char value[80];
20526                 size_t found;
20527                 size_t k = 0;
20528                 do {
20529                         size_t jk;
20530                         found = 0;
20531                         sprintf(name, "TERM%lu", (unsigned long) k);
20532                         for (jk = 0; jk < j; ++jk) {
20533                                 if (!strcmp(name, mynames[jk])) {
20534                                         found = 1;
20535                                         ++k;
20536                                         break;
20537                                 }
20538                         }
20539                 } while (found);
20540                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20541                 set_value(name, value);
20542                 mynames[j] = str_alloc(name);
20543                 myvalues[j] = str_alloc(value);
20544         }
20545         for (pass = 0; pass < 3; ++pass) {
20546                 for (j = 0; j < limit; ++j) {
20547                         char *value = getenv(mynames[j]);
20548                         if (pass) {
20549                                 if (value == 0) {
20550                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20551                                         ${cf_cv_main_return:-return}(1);
20552                                 } else if (value != mypointer[j]) {
20553                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20554                                         ${cf_cv_main_return:-return}(1);
20555                                 } else if (strcmp(value, myvalues[j])) {
20556                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20557                                         ${cf_cv_main_return:-return}(1);
20558                                 }
20559                         } else {
20560                                 size_t k;
20561                                 mypointer[j] = value;
20562                                 for (k = 0; k < j; ++k) {
20563                                         if (mypointer[j] == mypointer[k]) {
20564                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20565                                                 ${cf_cv_main_return:-return}(1);
20566                                         }
20567                                 }
20568                         }
20569                 }
20570         }
20571         ${cf_cv_main_return:-return}(0);
20572 }
20573
20574 _ACEOF
20575 rm -f "conftest$ac_exeext"
20576 if { (eval echo "$as_me:20576: \"$ac_link\"") >&5
20577   (eval $ac_link) 2>&5
20578   ac_status=$?
20579   echo "$as_me:20579: \$? = $ac_status" >&5
20580   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20581   { (eval echo "$as_me:20581: \"$ac_try\"") >&5
20582   (eval $ac_try) 2>&5
20583   ac_status=$?
20584   echo "$as_me:20584: \$? = $ac_status" >&5
20585   (exit "$ac_status"); }; }; then
20586   cf_cv_consistent_getenv=yes
20587 else
20588   echo "$as_me: program exited with status $ac_status" >&5
20589 echo "$as_me: failed program was:" >&5
20590 cat "conftest.$ac_ext" >&5
20591 cf_cv_consistent_getenv=no
20592 fi
20593 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20594 fi
20595
20596 fi
20597 echo "$as_me:20597: result: $cf_cv_consistent_getenv" >&5
20598 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20599
20600 if test "x$cf_cv_consistent_getenv" = xno
20601 then
20602
20603 cat >>confdefs.h <<\EOF
20604 #define HAVE_CONSISTENT_GETENV 1
20605 EOF
20606
20607 fi
20608
20609 if test "x$cf_cv_consistent_getenv" = xno && \
20610         test "x$cf_with_trace" = xyes
20611 then
20612         { echo "$as_me:20612: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20613 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20614 fi
20615
20616 echo "$as_me:20616: checking if sys/time.h works with sys/select.h" >&5
20617 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20618 if test "${cf_cv_sys_time_select+set}" = set; then
20619   echo $ECHO_N "(cached) $ECHO_C" >&6
20620 else
20621
20622 cat >"conftest.$ac_ext" <<_ACEOF
20623 #line 20623 "configure"
20624 #include "confdefs.h"
20625
20626 #include <sys/types.h>
20627 #ifdef HAVE_SYS_TIME_H
20628 #include <sys/time.h>
20629 #endif
20630 #ifdef HAVE_SYS_SELECT_H
20631 #include <sys/select.h>
20632 #endif
20633
20634 int
20635 main (void)
20636 {
20637
20638   ;
20639   return 0;
20640 }
20641 _ACEOF
20642 rm -f "conftest.$ac_objext"
20643 if { (eval echo "$as_me:20643: \"$ac_compile\"") >&5
20644   (eval $ac_compile) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit "$ac_status"); } &&
20648          { ac_try='test -s "conftest.$ac_objext"'
20649   { (eval echo "$as_me:20649: \"$ac_try\"") >&5
20650   (eval $ac_try) 2>&5
20651   ac_status=$?
20652   echo "$as_me:20652: \$? = $ac_status" >&5
20653   (exit "$ac_status"); }; }; then
20654   cf_cv_sys_time_select=yes
20655 else
20656   echo "$as_me: failed program was:" >&5
20657 cat "conftest.$ac_ext" >&5
20658 cf_cv_sys_time_select=no
20659 fi
20660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20661
20662 fi
20663
20664 echo "$as_me:20664: result: $cf_cv_sys_time_select" >&5
20665 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20666 test "$cf_cv_sys_time_select" = yes &&
20667 cat >>confdefs.h <<\EOF
20668 #define HAVE_SYS_TIME_SELECT 1
20669 EOF
20670
20671 ###     checks for compiler characteristics
20672 ac_ext=c
20673 ac_cpp='$CPP $CPPFLAGS'
20674 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20675 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20677 ac_main_return="return"
20678
20679 echo "$as_me:20679: checking for an ANSI C-conforming const" >&5
20680 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20681 if test "${ac_cv_c_const+set}" = set; then
20682   echo $ECHO_N "(cached) $ECHO_C" >&6
20683 else
20684   cat >"conftest.$ac_ext" <<_ACEOF
20685 #line 20685 "configure"
20686 #include "confdefs.h"
20687
20688 int
20689 main (void)
20690 {
20691 /* FIXME: Include the comments suggested by Paul. */
20692 #ifndef __cplusplus
20693   /* Ultrix mips cc rejects this.  */
20694   typedef int charset[2];
20695   const charset x;
20696   /* SunOS 4.1.1 cc rejects this.  */
20697   char const *const *ccp;
20698   char **p;
20699   /* NEC SVR4.0.2 mips cc rejects this.  */
20700   struct point {int x, y;};
20701   static struct point const zero = {0,0};
20702   /* AIX XL C 1.02.0.0 rejects this.
20703      It does not let you subtract one const X* pointer from another in
20704      an arm of an if-expression whose if-part is not a constant
20705      expression */
20706   const char *g = "string";
20707   ccp = &g + (g ? g-g : 0);
20708   /* HPUX 7.0 cc rejects these. */
20709   ++ccp;
20710   p = (char**) ccp;
20711   ccp = (char const *const *) p;
20712   { /* SCO 3.2v4 cc rejects this.  */
20713     char *t;
20714     char const *s = 0 ? (char *) 0 : (char const *) 0;
20715
20716     *t++ = 0;
20717   }
20718   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20719     int x[] = {25, 17};
20720     const int *foo = &x[0];
20721     ++foo;
20722   }
20723   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20724     typedef const int *iptr;
20725     iptr p = 0;
20726     ++p;
20727   }
20728   { /* AIX XL C 1.02.0.0 rejects this saying
20729        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20730     struct s { int j; const int *ap[3]; };
20731     struct s *b; b->j = 5;
20732   }
20733   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20734     const int foo = 10;
20735   }
20736 #endif
20737
20738   ;
20739   return 0;
20740 }
20741 _ACEOF
20742 rm -f "conftest.$ac_objext"
20743 if { (eval echo "$as_me:20743: \"$ac_compile\"") >&5
20744   (eval $ac_compile) 2>&5
20745   ac_status=$?
20746   echo "$as_me:20746: \$? = $ac_status" >&5
20747   (exit "$ac_status"); } &&
20748          { ac_try='test -s "conftest.$ac_objext"'
20749   { (eval echo "$as_me:20749: \"$ac_try\"") >&5
20750   (eval $ac_try) 2>&5
20751   ac_status=$?
20752   echo "$as_me:20752: \$? = $ac_status" >&5
20753   (exit "$ac_status"); }; }; then
20754   ac_cv_c_const=yes
20755 else
20756   echo "$as_me: failed program was:" >&5
20757 cat "conftest.$ac_ext" >&5
20758 ac_cv_c_const=no
20759 fi
20760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20761 fi
20762 echo "$as_me:20762: result: $ac_cv_c_const" >&5
20763 echo "${ECHO_T}$ac_cv_c_const" >&6
20764 if test $ac_cv_c_const = no; then
20765
20766 cat >>confdefs.h <<\EOF
20767 #define const
20768 EOF
20769
20770 fi
20771
20772 echo "$as_me:20772: checking for inline" >&5
20773 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20774 if test "${ac_cv_c_inline+set}" = set; then
20775   echo $ECHO_N "(cached) $ECHO_C" >&6
20776 else
20777   ac_cv_c_inline=no
20778 for ac_kw in inline __inline__ __inline; do
20779   cat >"conftest.$ac_ext" <<_ACEOF
20780 #line 20780 "configure"
20781 #include "confdefs.h"
20782 #ifndef __cplusplus
20783 static $ac_kw int static_foo () {return 0; }
20784 $ac_kw int foo () {return 0; }
20785 #endif
20786
20787 _ACEOF
20788 rm -f "conftest.$ac_objext"
20789 if { (eval echo "$as_me:20789: \"$ac_compile\"") >&5
20790   (eval $ac_compile) 2>&5
20791   ac_status=$?
20792   echo "$as_me:20792: \$? = $ac_status" >&5
20793   (exit "$ac_status"); } &&
20794          { ac_try='test -s "conftest.$ac_objext"'
20795   { (eval echo "$as_me:20795: \"$ac_try\"") >&5
20796   (eval $ac_try) 2>&5
20797   ac_status=$?
20798   echo "$as_me:20798: \$? = $ac_status" >&5
20799   (exit "$ac_status"); }; }; then
20800   ac_cv_c_inline=$ac_kw; break
20801 else
20802   echo "$as_me: failed program was:" >&5
20803 cat "conftest.$ac_ext" >&5
20804 fi
20805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20806 done
20807
20808 fi
20809 echo "$as_me:20809: result: $ac_cv_c_inline" >&5
20810 echo "${ECHO_T}$ac_cv_c_inline" >&6
20811 case $ac_cv_c_inline in
20812   inline | yes) ;;
20813   no)
20814 cat >>confdefs.h <<\EOF
20815 #define inline
20816 EOF
20817  ;;
20818   *)  cat >>confdefs.h <<EOF
20819 #define inline $ac_cv_c_inline
20820 EOF
20821  ;;
20822 esac
20823
20824 NCURSES_INLINE=
20825 if test "$ac_cv_c_inline" != no ; then
20826         NCURSES_INLINE=inline
20827         if test "$INTEL_COMPILER" = yes
20828         then
20829                 :
20830         elif test "$CLANG_COMPILER" = yes
20831         then
20832                 :
20833         elif test "$GCC" = yes
20834         then
20835                 echo "$as_me:20835: checking if $CC supports options to tune inlining" >&5
20836 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20837 if test "${cf_cv_gcc_inline+set}" = set; then
20838   echo $ECHO_N "(cached) $ECHO_C" >&6
20839 else
20840
20841                 cf_save_CFLAGS=$CFLAGS
20842                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20843                 cat >"conftest.$ac_ext" <<_ACEOF
20844 #line 20844 "configure"
20845 #include "confdefs.h"
20846 inline int foo(void) { return 1; }
20847 int
20848 main (void)
20849 {
20850 ${cf_cv_main_return:-return} foo()
20851   ;
20852   return 0;
20853 }
20854 _ACEOF
20855 rm -f "conftest.$ac_objext"
20856 if { (eval echo "$as_me:20856: \"$ac_compile\"") >&5
20857   (eval $ac_compile) 2>&5
20858   ac_status=$?
20859   echo "$as_me:20859: \$? = $ac_status" >&5
20860   (exit "$ac_status"); } &&
20861          { ac_try='test -s "conftest.$ac_objext"'
20862   { (eval echo "$as_me:20862: \"$ac_try\"") >&5
20863   (eval $ac_try) 2>&5
20864   ac_status=$?
20865   echo "$as_me:20865: \$? = $ac_status" >&5
20866   (exit "$ac_status"); }; }; then
20867   cf_cv_gcc_inline=yes
20868 else
20869   echo "$as_me: failed program was:" >&5
20870 cat "conftest.$ac_ext" >&5
20871 cf_cv_gcc_inline=no
20872 fi
20873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20874                 CFLAGS=$cf_save_CFLAGS
20875
20876 fi
20877 echo "$as_me:20877: result: $cf_cv_gcc_inline" >&5
20878 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20879                 if test "$cf_cv_gcc_inline" = yes ; then
20880
20881 cf_fix_cppflags=no
20882 cf_new_cflags=
20883 cf_new_cppflags=
20884 cf_new_extra_cppflags=
20885
20886 for cf_add_cflags in --param max-inline-insns-single=1200
20887 do
20888 case "$cf_fix_cppflags" in
20889 (no)
20890         case "$cf_add_cflags" in
20891         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20892                 case "$cf_add_cflags" in
20893                 (-D*)
20894                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20895
20896                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20897                                 && test -z "${cf_tst_cflags}" \
20898                                 && cf_fix_cppflags=yes
20899
20900                         if test "$cf_fix_cppflags" = yes ; then
20901
20902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20904
20905                                 continue
20906                         elif test "${cf_tst_cflags}" = "\"'" ; then
20907
20908         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20909         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20910
20911                                 continue
20912                         fi
20913                         ;;
20914                 esac
20915                 case "$CPPFLAGS" in
20916                 (*$cf_add_cflags)
20917                         ;;
20918                 (*)
20919                         case "$cf_add_cflags" in
20920                         (-D*)
20921                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20922
20923 CPPFLAGS=`echo "$CPPFLAGS" | \
20924         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20925                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20926
20927                                 ;;
20928                         esac
20929
20930         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20931         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20932
20933                         ;;
20934                 esac
20935                 ;;
20936         (*)
20937
20938         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20939         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20940
20941                 ;;
20942         esac
20943         ;;
20944 (yes)
20945
20946         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20947         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20948
20949         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20950
20951         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20952                 && test -z "${cf_tst_cflags}" \
20953                 && cf_fix_cppflags=no
20954         ;;
20955 esac
20956 done
20957
20958 if test -n "$cf_new_cflags" ; then
20959
20960         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20961         CFLAGS="${CFLAGS}$cf_new_cflags"
20962
20963 fi
20964
20965 if test -n "$cf_new_cppflags" ; then
20966
20967         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20968         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20969
20970 fi
20971
20972 if test -n "$cf_new_extra_cppflags" ; then
20973
20974         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20975         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20976
20977 fi
20978
20979                 fi
20980         fi
20981 fi
20982
20983 echo "$as_me:20983: checking for signal global datatype" >&5
20984 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20985 if test "${cf_cv_sig_atomic_t+set}" = set; then
20986   echo $ECHO_N "(cached) $ECHO_C" >&6
20987 else
20988
20989         for cf_type in \
20990                 "volatile sig_atomic_t" \
20991                 "sig_atomic_t" \
20992                 "int"
20993         do
20994         cat >"conftest.$ac_ext" <<_ACEOF
20995 #line 20995 "configure"
20996 #include "confdefs.h"
20997
20998 #include <sys/types.h>
20999 #include <signal.h>
21000 #include <stdio.h>
21001
21002 extern $cf_type x;
21003 $cf_type x;
21004 static void handler(int sig)
21005 {
21006         (void)sig;
21007         x = 5;
21008 }
21009 int
21010 main (void)
21011 {
21012 signal(SIGINT, handler);
21013                  x = 1
21014   ;
21015   return 0;
21016 }
21017 _ACEOF
21018 rm -f "conftest.$ac_objext"
21019 if { (eval echo "$as_me:21019: \"$ac_compile\"") >&5
21020   (eval $ac_compile) 2>&5
21021   ac_status=$?
21022   echo "$as_me:21022: \$? = $ac_status" >&5
21023   (exit "$ac_status"); } &&
21024          { ac_try='test -s "conftest.$ac_objext"'
21025   { (eval echo "$as_me:21025: \"$ac_try\"") >&5
21026   (eval $ac_try) 2>&5
21027   ac_status=$?
21028   echo "$as_me:21028: \$? = $ac_status" >&5
21029   (exit "$ac_status"); }; }; then
21030   cf_cv_sig_atomic_t=$cf_type
21031 else
21032   echo "$as_me: failed program was:" >&5
21033 cat "conftest.$ac_ext" >&5
21034 cf_cv_sig_atomic_t=no
21035 fi
21036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21037                 test "$cf_cv_sig_atomic_t" != no && break
21038         done
21039
21040 fi
21041
21042 echo "$as_me:21042: result: $cf_cv_sig_atomic_t" >&5
21043 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21044 test "$cf_cv_sig_atomic_t" != no &&
21045 cat >>confdefs.h <<EOF
21046 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21047 EOF
21048
21049 if test "$NCURSES_CHTYPE" = auto ; then
21050
21051 echo "$as_me:21051: checking for type of chtype" >&5
21052 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21053 if test "${cf_cv_typeof_chtype+set}" = set; then
21054   echo $ECHO_N "(cached) $ECHO_C" >&6
21055 else
21056
21057                 if test "$cross_compiling" = yes; then
21058   cf_cv_typeof_chtype=long
21059 else
21060   cat >"conftest.$ac_ext" <<_ACEOF
21061 #line 21061 "configure"
21062 #include "confdefs.h"
21063
21064 #define WANT_BITS 31
21065 #include <stdio.h>
21066 int main(void)
21067 {
21068         FILE *fp = fopen("cf_test.out", "w");
21069         if (fp != 0) {
21070                 char *result = "long";
21071                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21072                         int n;
21073                         unsigned int x, y;
21074                         for (n = 0; n < WANT_BITS; n++) {
21075                                 x = (1 << n);
21076                                 y = (x >> n);
21077                                 if (y != 1 || x == 0) {
21078                                         x = 0;
21079                                         break;
21080                                 }
21081                         }
21082                         /*
21083                          * If x is nonzero, an int is big enough for the bits
21084                          * that we want.
21085                          */
21086                         result = (x != 0) ? "int" : "long";
21087                 }
21088                 fputs(result, fp);
21089                 fclose(fp);
21090         }
21091         ${cf_cv_main_return:-return}(0);
21092 }
21093
21094 _ACEOF
21095 rm -f "conftest$ac_exeext"
21096 if { (eval echo "$as_me:21096: \"$ac_link\"") >&5
21097   (eval $ac_link) 2>&5
21098   ac_status=$?
21099   echo "$as_me:21099: \$? = $ac_status" >&5
21100   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21101   { (eval echo "$as_me:21101: \"$ac_try\"") >&5
21102   (eval $ac_try) 2>&5
21103   ac_status=$?
21104   echo "$as_me:21104: \$? = $ac_status" >&5
21105   (exit "$ac_status"); }; }; then
21106   cf_cv_typeof_chtype=`cat cf_test.out`
21107 else
21108   echo "$as_me: program exited with status $ac_status" >&5
21109 echo "$as_me: failed program was:" >&5
21110 cat "conftest.$ac_ext" >&5
21111 cf_cv_typeof_chtype=long
21112 fi
21113 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21114 fi
21115                 rm -f cf_test.out
21116
21117 fi
21118
21119 echo "$as_me:21119: result: $cf_cv_typeof_chtype" >&5
21120 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21121
21122 cat >>confdefs.h <<EOF
21123 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21124 EOF
21125
21126 else
21127         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21128 fi
21129 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21130
21131 echo "$as_me:21131: checking if unsigned literals are legal" >&5
21132 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21133 if test "${cf_cv_unsigned_literals+set}" = set; then
21134   echo $ECHO_N "(cached) $ECHO_C" >&6
21135 else
21136
21137         cat >"conftest.$ac_ext" <<_ACEOF
21138 #line 21138 "configure"
21139 #include "confdefs.h"
21140
21141 int
21142 main (void)
21143 {
21144 long x = 1L + 1UL + 1U + 1
21145   ;
21146   return 0;
21147 }
21148 _ACEOF
21149 rm -f "conftest.$ac_objext"
21150 if { (eval echo "$as_me:21150: \"$ac_compile\"") >&5
21151   (eval $ac_compile) 2>&5
21152   ac_status=$?
21153   echo "$as_me:21153: \$? = $ac_status" >&5
21154   (exit "$ac_status"); } &&
21155          { ac_try='test -s "conftest.$ac_objext"'
21156   { (eval echo "$as_me:21156: \"$ac_try\"") >&5
21157   (eval $ac_try) 2>&5
21158   ac_status=$?
21159   echo "$as_me:21159: \$? = $ac_status" >&5
21160   (exit "$ac_status"); }; }; then
21161   cf_cv_unsigned_literals=yes
21162 else
21163   echo "$as_me: failed program was:" >&5
21164 cat "conftest.$ac_ext" >&5
21165 cf_cv_unsigned_literals=no
21166 fi
21167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21168
21169 fi
21170
21171 echo "$as_me:21171: result: $cf_cv_unsigned_literals" >&5
21172 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21173
21174 cf_cv_1UL="1"
21175 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21176 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21177
21178 if test "$NCURSES_MMASK_T" = auto ; then
21179         cf_cv_typeof_mmask_t=long
21180 else
21181         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21182 fi
21183 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21184
21185 ###     Checks for external-data
21186
21187 echo "$as_me:21187: checking if external errno is declared" >&5
21188 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21189 if test "${cf_cv_dcl_errno+set}" = set; then
21190   echo $ECHO_N "(cached) $ECHO_C" >&6
21191 else
21192
21193         cat >"conftest.$ac_ext" <<_ACEOF
21194 #line 21194 "configure"
21195 #include "confdefs.h"
21196
21197 #ifdef HAVE_STDLIB_H
21198 #include <stdlib.h>
21199 #endif
21200 #include <stdio.h>
21201 #include <sys/types.h>
21202 #include <errno.h>
21203 int
21204 main (void)
21205 {
21206 int x = (int) errno; (void)x
21207   ;
21208   return 0;
21209 }
21210 _ACEOF
21211 rm -f "conftest.$ac_objext"
21212 if { (eval echo "$as_me:21212: \"$ac_compile\"") >&5
21213   (eval $ac_compile) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit "$ac_status"); } &&
21217          { ac_try='test -s "conftest.$ac_objext"'
21218   { (eval echo "$as_me:21218: \"$ac_try\"") >&5
21219   (eval $ac_try) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit "$ac_status"); }; }; then
21223   cf_cv_dcl_errno=yes
21224 else
21225   echo "$as_me: failed program was:" >&5
21226 cat "conftest.$ac_ext" >&5
21227 cf_cv_dcl_errno=no
21228 fi
21229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21230
21231 fi
21232 echo "$as_me:21232: result: $cf_cv_dcl_errno" >&5
21233 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21234
21235 if test "$cf_cv_dcl_errno" = no ; then
21236
21237 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21238
21239         cat >>confdefs.h <<EOF
21240 #define $cf_result 1
21241 EOF
21242
21243 fi
21244
21245 # It's possible (for near-UNIX clones) that the data doesn't exist
21246
21247 echo "$as_me:21247: checking if external errno exists" >&5
21248 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21249 if test "${cf_cv_have_errno+set}" = set; then
21250   echo $ECHO_N "(cached) $ECHO_C" >&6
21251 else
21252
21253         cat >"conftest.$ac_ext" <<_ACEOF
21254 #line 21254 "configure"
21255 #include "confdefs.h"
21256
21257 #undef errno
21258 extern int errno;
21259
21260 int
21261 main (void)
21262 {
21263 errno = 2
21264   ;
21265   return 0;
21266 }
21267 _ACEOF
21268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21269 if { (eval echo "$as_me:21269: \"$ac_link\"") >&5
21270   (eval $ac_link) 2>&5
21271   ac_status=$?
21272   echo "$as_me:21272: \$? = $ac_status" >&5
21273   (exit "$ac_status"); } &&
21274          { ac_try='test -s "conftest$ac_exeext"'
21275   { (eval echo "$as_me:21275: \"$ac_try\"") >&5
21276   (eval $ac_try) 2>&5
21277   ac_status=$?
21278   echo "$as_me:21278: \$? = $ac_status" >&5
21279   (exit "$ac_status"); }; }; then
21280   cf_cv_have_errno=yes
21281 else
21282   echo "$as_me: failed program was:" >&5
21283 cat "conftest.$ac_ext" >&5
21284 cf_cv_have_errno=no
21285 fi
21286 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21287
21288 fi
21289 echo "$as_me:21289: result: $cf_cv_have_errno" >&5
21290 echo "${ECHO_T}$cf_cv_have_errno" >&6
21291
21292 if test "$cf_cv_have_errno" = yes ; then
21293
21294 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21295
21296         cat >>confdefs.h <<EOF
21297 #define $cf_result 1
21298 EOF
21299
21300 fi
21301
21302 echo "$as_me:21302: checking if data-only library module links" >&5
21303 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21304 if test "${cf_cv_link_dataonly+set}" = set; then
21305   echo $ECHO_N "(cached) $ECHO_C" >&6
21306 else
21307
21308         rm -f conftest.a
21309         cat >conftest.$ac_ext <<EOF
21310 #line 21310 "configure"
21311 int     testdata[3] = { 123, 456, 789 };
21312 EOF
21313         if { (eval echo "$as_me:21313: \"$ac_compile\"") >&5
21314   (eval $ac_compile) 2>&5
21315   ac_status=$?
21316   echo "$as_me:21316: \$? = $ac_status" >&5
21317   (exit "$ac_status"); } ; then
21318                 mv conftest.o data.o && \
21319                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21320         fi
21321         rm -f conftest.$ac_ext data.o
21322         cat >conftest.$ac_ext <<EOF
21323 #line 21323 "configure"
21324 int     testfunc(void)
21325 {
21326 #if defined(NeXT)
21327         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21328 #else
21329         extern int testdata[3];
21330         return testdata[0] == 123
21331            &&  testdata[1] == 456
21332            &&  testdata[2] == 789;
21333 #endif
21334 }
21335 EOF
21336         if { (eval echo "$as_me:21336: \"$ac_compile\"") >&5
21337   (eval $ac_compile) 2>&5
21338   ac_status=$?
21339   echo "$as_me:21339: \$? = $ac_status" >&5
21340   (exit "$ac_status"); }; then
21341                 mv conftest.o func.o && \
21342                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21343         fi
21344         rm -f conftest.$ac_ext func.o
21345         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21346         cf_saveLIBS="$LIBS"
21347         LIBS="conftest.a $LIBS"
21348         if test "$cross_compiling" = yes; then
21349   cf_cv_link_dataonly=unknown
21350 else
21351   cat >"conftest.$ac_ext" <<_ACEOF
21352 #line 21352 "configure"
21353 #include "confdefs.h"
21354
21355         int main(void)
21356         {
21357                 extern int testfunc();
21358                 ${cf_cv_main_return:-return} (!testfunc());
21359         }
21360
21361 _ACEOF
21362 rm -f "conftest$ac_exeext"
21363 if { (eval echo "$as_me:21363: \"$ac_link\"") >&5
21364   (eval $ac_link) 2>&5
21365   ac_status=$?
21366   echo "$as_me:21366: \$? = $ac_status" >&5
21367   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21368   { (eval echo "$as_me:21368: \"$ac_try\"") >&5
21369   (eval $ac_try) 2>&5
21370   ac_status=$?
21371   echo "$as_me:21371: \$? = $ac_status" >&5
21372   (exit "$ac_status"); }; }; then
21373   cf_cv_link_dataonly=yes
21374 else
21375   echo "$as_me: program exited with status $ac_status" >&5
21376 echo "$as_me: failed program was:" >&5
21377 cat "conftest.$ac_ext" >&5
21378 cf_cv_link_dataonly=no
21379 fi
21380 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21381 fi
21382         LIBS="$cf_saveLIBS"
21383
21384 fi
21385
21386 echo "$as_me:21386: result: $cf_cv_link_dataonly" >&5
21387 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21388
21389 if test "$cf_cv_link_dataonly" = no ; then
21390
21391 cat >>confdefs.h <<\EOF
21392 #define BROKEN_LINKER 1
21393 EOF
21394
21395         BROKEN_LINKER=1
21396 fi
21397
21398 ###     Checks for library functions.
21399
21400 for ac_func in \
21401 getcwd \
21402 getegid \
21403 geteuid \
21404 getopt \
21405 issetugid \
21406 localeconv \
21407 poll \
21408 putenv \
21409 remove \
21410 select \
21411 setbuf \
21412 setbuffer \
21413 setenv \
21414 setfsuid \
21415 setvbuf \
21416 sigaction \
21417 sigvec \
21418 snprintf \
21419 strdup \
21420 strstr \
21421 sysconf \
21422 tcgetpgrp \
21423 times \
21424 tsearch \
21425 vsnprintf \
21426
21427 do
21428 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21429 echo "$as_me:21429: checking for $ac_func" >&5
21430 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21431 if eval "test \"\${$as_ac_var+set}\" = set"; then
21432   echo $ECHO_N "(cached) $ECHO_C" >&6
21433 else
21434   cat >"conftest.$ac_ext" <<_ACEOF
21435 #line 21435 "configure"
21436 #include "confdefs.h"
21437 #define $ac_func autoconf_temporary
21438 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21439 #undef $ac_func
21440
21441 #ifdef __cplusplus
21442 extern "C"
21443 #endif
21444
21445 /* We use char because int might match the return type of a gcc2
21446    builtin and then its argument prototype would still apply.  */
21447 char $ac_func (void);
21448
21449 int
21450 main (void)
21451 {
21452
21453 /* The GNU C library defines stubs for functions which it implements
21454     to always fail with ENOSYS.  Some functions are actually named
21455     something starting with __ and the normal name is an alias.  */
21456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21457 #error found stub for $ac_func
21458 #endif
21459
21460         return $ac_func ();
21461   ;
21462   return 0;
21463 }
21464 _ACEOF
21465 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21466 if { (eval echo "$as_me:21466: \"$ac_link\"") >&5
21467   (eval $ac_link) 2>&5
21468   ac_status=$?
21469   echo "$as_me:21469: \$? = $ac_status" >&5
21470   (exit "$ac_status"); } &&
21471          { ac_try='test -s "conftest$ac_exeext"'
21472   { (eval echo "$as_me:21472: \"$ac_try\"") >&5
21473   (eval $ac_try) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit "$ac_status"); }; }; then
21477   eval "$as_ac_var=yes"
21478 else
21479   echo "$as_me: failed program was:" >&5
21480 cat "conftest.$ac_ext" >&5
21481 eval "$as_ac_var=no"
21482 fi
21483 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21484 fi
21485 echo "$as_me:21485: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21486 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21487 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21488   cat >>confdefs.h <<EOF
21489 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21490 EOF
21491
21492 fi
21493 done
21494
21495 echo "$as_me:21495: checking if _PATH_TTYS is defined in ttyent.h" >&5
21496 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21497 if test "${cf_cv_PATH_TTYS+set}" = set; then
21498   echo $ECHO_N "(cached) $ECHO_C" >&6
21499 else
21500
21501 cat >"conftest.$ac_ext" <<_ACEOF
21502 #line 21502 "configure"
21503 #include "confdefs.h"
21504
21505 #include <stdio.h>
21506 #include <ttyent.h>
21507 int
21508 main (void)
21509 {
21510
21511 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21512   ;
21513   return 0;
21514 }
21515 _ACEOF
21516 rm -f "conftest.$ac_objext"
21517 if { (eval echo "$as_me:21517: \"$ac_compile\"") >&5
21518   (eval $ac_compile) 2>&5
21519   ac_status=$?
21520   echo "$as_me:21520: \$? = $ac_status" >&5
21521   (exit "$ac_status"); } &&
21522          { ac_try='test -s "conftest.$ac_objext"'
21523   { (eval echo "$as_me:21523: \"$ac_try\"") >&5
21524   (eval $ac_try) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit "$ac_status"); }; }; then
21528   cf_cv_PATH_TTYS=yes
21529 else
21530   echo "$as_me: failed program was:" >&5
21531 cat "conftest.$ac_ext" >&5
21532 cf_cv_PATH_TTYS=no
21533 fi
21534 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21535 fi
21536 echo "$as_me:21536: result: $cf_cv_PATH_TTYS" >&5
21537 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21538
21539 if test $cf_cv_PATH_TTYS = no
21540 then
21541         for cf_ttys in /etc/ttytype /etc/ttys
21542         do
21543                 if test -f $cf_ttys
21544                 then
21545                         cf_cv_PATH_TTYS=maybe
21546
21547 cat >>confdefs.h <<\EOF
21548 #define _PATH_TTYS $cf_ttys
21549 EOF
21550
21551                         break
21552                 fi
21553         done
21554 fi
21555
21556 if test $cf_cv_PATH_TTYS != no
21557 then
21558         echo "$as_me:21558: checking if _PATH_TTYS file exists" >&5
21559 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21560 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21561   echo $ECHO_N "(cached) $ECHO_C" >&6
21562 else
21563
21564                 if test "$cross_compiling" = yes; then
21565   cf_cv_have_PATH_TTYS=unknown
21566 else
21567   cat >"conftest.$ac_ext" <<_ACEOF
21568 #line 21568 "configure"
21569 #include "confdefs.h"
21570
21571 #include <stdio.h>
21572 #include <ttyent.h>
21573 int main(void) {
21574         FILE *fp = fopen(_PATH_TTYS, "r");
21575         ${cf_cv_main_return:-return} (fp == 0);
21576 }
21577 _ACEOF
21578 rm -f "conftest$ac_exeext"
21579 if { (eval echo "$as_me:21579: \"$ac_link\"") >&5
21580   (eval $ac_link) 2>&5
21581   ac_status=$?
21582   echo "$as_me:21582: \$? = $ac_status" >&5
21583   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21584   { (eval echo "$as_me:21584: \"$ac_try\"") >&5
21585   (eval $ac_try) 2>&5
21586   ac_status=$?
21587   echo "$as_me:21587: \$? = $ac_status" >&5
21588   (exit "$ac_status"); }; }; then
21589   cf_cv_have_PATH_TTYS=yes
21590 else
21591   echo "$as_me: program exited with status $ac_status" >&5
21592 echo "$as_me: failed program was:" >&5
21593 cat "conftest.$ac_ext" >&5
21594 cf_cv_have_PATH_TTYS=no
21595 fi
21596 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21597 fi
21598 fi
21599 echo "$as_me:21599: result: $cf_cv_have_PATH_TTYS" >&5
21600 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21601         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21602 fi
21603
21604 if test $cf_cv_PATH_TTYS != no
21605 then
21606
21607 cat >>confdefs.h <<\EOF
21608 #define HAVE_PATH_TTYS 1
21609 EOF
21610
21611         echo "$as_me:21611: checking for getttynam" >&5
21612 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21613 if test "${cf_cv_func_getttynam+set}" = set; then
21614   echo $ECHO_N "(cached) $ECHO_C" >&6
21615 else
21616
21617                 cat >"conftest.$ac_ext" <<_ACEOF
21618 #line 21618 "configure"
21619 #include "confdefs.h"
21620 #include <ttyent.h>
21621 int
21622 main (void)
21623 {
21624 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21625   ;
21626   return 0;
21627 }
21628 _ACEOF
21629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21630 if { (eval echo "$as_me:21630: \"$ac_link\"") >&5
21631   (eval $ac_link) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit "$ac_status"); } &&
21635          { ac_try='test -s "conftest$ac_exeext"'
21636   { (eval echo "$as_me:21636: \"$ac_try\"") >&5
21637   (eval $ac_try) 2>&5
21638   ac_status=$?
21639   echo "$as_me:21639: \$? = $ac_status" >&5
21640   (exit "$ac_status"); }; }; then
21641   cf_cv_func_getttynam=yes
21642 else
21643   echo "$as_me: failed program was:" >&5
21644 cat "conftest.$ac_ext" >&5
21645 cf_cv_func_getttynam=no
21646 fi
21647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21648 fi
21649 echo "$as_me:21649: result: $cf_cv_func_getttynam" >&5
21650 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21651         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21652 #define HAVE_GETTTYNAM 1
21653 EOF
21654
21655 fi
21656
21657 if test "x$ac_cv_func_getopt" = xno && \
21658    test "x$cf_with_progs$cf_with_tests" != xnono; then
21659         { { echo "$as_me:21659: error: getopt is required for building programs" >&5
21660 echo "$as_me: error: getopt is required for building programs" >&2;}
21661    { (exit 1); exit 1; }; }
21662 fi
21663
21664 if test "x$with_safe_sprintf" = xyes
21665 then
21666         if test "x$ac_cv_func_vsnprintf" = xyes
21667         then
21668                 { echo "$as_me:21668: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21669 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21670         else
21671
21672 cat >>confdefs.h <<\EOF
21673 #define USE_SAFE_SPRINTF 1
21674 EOF
21675
21676         fi
21677 fi
21678
21679 if test "x$with_getcap" = "xyes" ; then
21680
21681 echo "$as_me:21681: checking for terminal-capability database functions" >&5
21682 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21683 if test "${cf_cv_cgetent+set}" = set; then
21684   echo $ECHO_N "(cached) $ECHO_C" >&6
21685 else
21686
21687 cat >"conftest.$ac_ext" <<_ACEOF
21688 #line 21688 "configure"
21689 #include "confdefs.h"
21690
21691 #include <stdlib.h>
21692 int
21693 main (void)
21694 {
21695
21696         char temp[128];
21697         char *buf = temp;
21698         char *db_array = temp;
21699         cgetent(&buf, &db_array, "vt100");
21700         cgetcap(buf, "tc", '=');
21701         cgetmatch(buf, "tc");
21702
21703   ;
21704   return 0;
21705 }
21706 _ACEOF
21707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21708 if { (eval echo "$as_me:21708: \"$ac_link\"") >&5
21709   (eval $ac_link) 2>&5
21710   ac_status=$?
21711   echo "$as_me:21711: \$? = $ac_status" >&5
21712   (exit "$ac_status"); } &&
21713          { ac_try='test -s "conftest$ac_exeext"'
21714   { (eval echo "$as_me:21714: \"$ac_try\"") >&5
21715   (eval $ac_try) 2>&5
21716   ac_status=$?
21717   echo "$as_me:21717: \$? = $ac_status" >&5
21718   (exit "$ac_status"); }; }; then
21719   cf_cv_cgetent=yes
21720 else
21721   echo "$as_me: failed program was:" >&5
21722 cat "conftest.$ac_ext" >&5
21723 cf_cv_cgetent=no
21724 fi
21725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21726
21727 fi
21728 echo "$as_me:21728: result: $cf_cv_cgetent" >&5
21729 echo "${ECHO_T}$cf_cv_cgetent" >&6
21730
21731 if test "$cf_cv_cgetent" = yes
21732 then
21733
21734 cat >>confdefs.h <<\EOF
21735 #define HAVE_BSD_CGETENT 1
21736 EOF
21737
21738 echo "$as_me:21738: checking if cgetent uses const parameter" >&5
21739 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21740 if test "${cf_cv_cgetent_const+set}" = set; then
21741   echo $ECHO_N "(cached) $ECHO_C" >&6
21742 else
21743
21744 cat >"conftest.$ac_ext" <<_ACEOF
21745 #line 21745 "configure"
21746 #include "confdefs.h"
21747
21748 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21749 #include <stdlib.h>
21750 int
21751 main (void)
21752 {
21753
21754         char temp[128];
21755         char *buf = temp;
21756 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21757         const char *db_array = temp;
21758         cgetent(&buf, &db_array, "vt100");
21759 #endif
21760         cgetcap(buf, "tc", '=');
21761         cgetmatch(buf, "tc");
21762
21763   ;
21764   return 0;
21765 }
21766 _ACEOF
21767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21768 if { (eval echo "$as_me:21768: \"$ac_link\"") >&5
21769   (eval $ac_link) 2>&5
21770   ac_status=$?
21771   echo "$as_me:21771: \$? = $ac_status" >&5
21772   (exit "$ac_status"); } &&
21773          { ac_try='test -s "conftest$ac_exeext"'
21774   { (eval echo "$as_me:21774: \"$ac_try\"") >&5
21775   (eval $ac_try) 2>&5
21776   ac_status=$?
21777   echo "$as_me:21777: \$? = $ac_status" >&5
21778   (exit "$ac_status"); }; }; then
21779   cf_cv_cgetent_const=yes
21780 else
21781   echo "$as_me: failed program was:" >&5
21782 cat "conftest.$ac_ext" >&5
21783 cf_cv_cgetent_const=no
21784 fi
21785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21786
21787 fi
21788 echo "$as_me:21788: result: $cf_cv_cgetent_const" >&5
21789 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21790         if test "$cf_cv_cgetent_const" = yes
21791         then
21792
21793 cat >>confdefs.h <<EOF
21794 #define CGETENT_CONST const
21795 EOF
21796
21797         fi
21798 fi
21799
21800 fi
21801
21802 echo "$as_me:21802: checking for isascii" >&5
21803 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21804 if test "${cf_cv_have_isascii+set}" = set; then
21805   echo $ECHO_N "(cached) $ECHO_C" >&6
21806 else
21807
21808         cat >"conftest.$ac_ext" <<_ACEOF
21809 #line 21809 "configure"
21810 #include "confdefs.h"
21811 #include <ctype.h>
21812 int
21813 main (void)
21814 {
21815 int x = isascii(' ')
21816   ;
21817   return 0;
21818 }
21819 _ACEOF
21820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21821 if { (eval echo "$as_me:21821: \"$ac_link\"") >&5
21822   (eval $ac_link) 2>&5
21823   ac_status=$?
21824   echo "$as_me:21824: \$? = $ac_status" >&5
21825   (exit "$ac_status"); } &&
21826          { ac_try='test -s "conftest$ac_exeext"'
21827   { (eval echo "$as_me:21827: \"$ac_try\"") >&5
21828   (eval $ac_try) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit "$ac_status"); }; }; then
21832   cf_cv_have_isascii=yes
21833 else
21834   echo "$as_me: failed program was:" >&5
21835 cat "conftest.$ac_ext" >&5
21836 cf_cv_have_isascii=no
21837 fi
21838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21839
21840 fi
21841 echo "$as_me:21841: result: $cf_cv_have_isascii" >&5
21842 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21843 test "$cf_cv_have_isascii" = yes &&
21844 cat >>confdefs.h <<\EOF
21845 #define HAVE_ISASCII 1
21846 EOF
21847
21848 if test "$ac_cv_func_sigaction" = yes; then
21849 echo "$as_me:21849: checking whether sigaction needs _POSIX_SOURCE" >&5
21850 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21851 cat >"conftest.$ac_ext" <<_ACEOF
21852 #line 21852 "configure"
21853 #include "confdefs.h"
21854
21855 #include <sys/types.h>
21856 #include <signal.h>
21857 int
21858 main (void)
21859 {
21860 struct sigaction act
21861   ;
21862   return 0;
21863 }
21864 _ACEOF
21865 rm -f "conftest.$ac_objext"
21866 if { (eval echo "$as_me:21866: \"$ac_compile\"") >&5
21867   (eval $ac_compile) 2>&5
21868   ac_status=$?
21869   echo "$as_me:21869: \$? = $ac_status" >&5
21870   (exit "$ac_status"); } &&
21871          { ac_try='test -s "conftest.$ac_objext"'
21872   { (eval echo "$as_me:21872: \"$ac_try\"") >&5
21873   (eval $ac_try) 2>&5
21874   ac_status=$?
21875   echo "$as_me:21875: \$? = $ac_status" >&5
21876   (exit "$ac_status"); }; }; then
21877   sigact_bad=no
21878 else
21879   echo "$as_me: failed program was:" >&5
21880 cat "conftest.$ac_ext" >&5
21881
21882 cat >"conftest.$ac_ext" <<_ACEOF
21883 #line 21883 "configure"
21884 #include "confdefs.h"
21885
21886 #define _POSIX_SOURCE
21887 #include <sys/types.h>
21888 #include <signal.h>
21889 int
21890 main (void)
21891 {
21892 struct sigaction act
21893   ;
21894   return 0;
21895 }
21896 _ACEOF
21897 rm -f "conftest.$ac_objext"
21898 if { (eval echo "$as_me:21898: \"$ac_compile\"") >&5
21899   (eval $ac_compile) 2>&5
21900   ac_status=$?
21901   echo "$as_me:21901: \$? = $ac_status" >&5
21902   (exit "$ac_status"); } &&
21903          { ac_try='test -s "conftest.$ac_objext"'
21904   { (eval echo "$as_me:21904: \"$ac_try\"") >&5
21905   (eval $ac_try) 2>&5
21906   ac_status=$?
21907   echo "$as_me:21907: \$? = $ac_status" >&5
21908   (exit "$ac_status"); }; }; then
21909   sigact_bad=yes
21910
21911 cat >>confdefs.h <<\EOF
21912 #define _POSIX_SOURCE 1
21913 EOF
21914
21915 else
21916   echo "$as_me: failed program was:" >&5
21917 cat "conftest.$ac_ext" >&5
21918 sigact_bad=unknown
21919 fi
21920 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21921 fi
21922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21923 echo "$as_me:21923: result: $sigact_bad" >&5
21924 echo "${ECHO_T}$sigact_bad" >&6
21925 fi
21926
21927 echo "$as_me:21927: checking if nanosleep really works" >&5
21928 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21929 if test "${cf_cv_func_nanosleep+set}" = set; then
21930   echo $ECHO_N "(cached) $ECHO_C" >&6
21931 else
21932
21933 if test "$cross_compiling" = yes; then
21934   cf_cv_func_nanosleep=unknown
21935 else
21936   cat >"conftest.$ac_ext" <<_ACEOF
21937 #line 21937 "configure"
21938 #include "confdefs.h"
21939
21940 #include <stdio.h>
21941 #include <errno.h>
21942 #include <time.h>
21943
21944 #ifdef HAVE_SYS_TIME_H
21945 #include <sys/time.h>
21946 #endif
21947
21948 int main(void) {
21949         struct timespec ts1, ts2;
21950         int code;
21951         ts1.tv_sec  = 0;
21952         ts1.tv_nsec = 750000000;
21953         ts2.tv_sec  = 0;
21954         ts2.tv_nsec = 0;
21955         errno = 0;
21956         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21957         ${cf_cv_main_return:-return}(code != 0);
21958 }
21959
21960 _ACEOF
21961 rm -f "conftest$ac_exeext"
21962 if { (eval echo "$as_me:21962: \"$ac_link\"") >&5
21963   (eval $ac_link) 2>&5
21964   ac_status=$?
21965   echo "$as_me:21965: \$? = $ac_status" >&5
21966   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21967   { (eval echo "$as_me:21967: \"$ac_try\"") >&5
21968   (eval $ac_try) 2>&5
21969   ac_status=$?
21970   echo "$as_me:21970: \$? = $ac_status" >&5
21971   (exit "$ac_status"); }; }; then
21972   cf_cv_func_nanosleep=yes
21973 else
21974   echo "$as_me: program exited with status $ac_status" >&5
21975 echo "$as_me: failed program was:" >&5
21976 cat "conftest.$ac_ext" >&5
21977 cf_cv_func_nanosleep=no
21978 fi
21979 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21980 fi
21981 fi
21982 echo "$as_me:21982: result: $cf_cv_func_nanosleep" >&5
21983 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21984
21985 test "$cf_cv_func_nanosleep" = "yes" &&
21986 cat >>confdefs.h <<\EOF
21987 #define HAVE_NANOSLEEP 1
21988 EOF
21989
21990 for ac_header in \
21991 termio.h \
21992 termios.h \
21993 unistd.h \
21994 sys/ioctl.h \
21995 sys/termio.h \
21996
21997 do
21998 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21999 echo "$as_me:21999: checking for $ac_header" >&5
22000 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22001 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22002   echo $ECHO_N "(cached) $ECHO_C" >&6
22003 else
22004   cat >"conftest.$ac_ext" <<_ACEOF
22005 #line 22005 "configure"
22006 #include "confdefs.h"
22007 #include <$ac_header>
22008 _ACEOF
22009 if { (eval echo "$as_me:22009: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22010   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22011   ac_status=$?
22012   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22013   rm -f conftest.er1
22014   cat conftest.err >&5
22015   echo "$as_me:22015: \$? = $ac_status" >&5
22016   (exit "$ac_status"); } >/dev/null; then
22017   if test -s conftest.err; then
22018     ac_cpp_err=$ac_c_preproc_warn_flag
22019   else
22020     ac_cpp_err=
22021   fi
22022 else
22023   ac_cpp_err=yes
22024 fi
22025 if test -z "$ac_cpp_err"; then
22026   eval "$as_ac_Header=yes"
22027 else
22028   echo "$as_me: failed program was:" >&5
22029   cat "conftest.$ac_ext" >&5
22030   eval "$as_ac_Header=no"
22031 fi
22032 rm -f conftest.err "conftest.$ac_ext"
22033 fi
22034 echo "$as_me:22034: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22035 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22036 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22037   cat >>confdefs.h <<EOF
22038 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22039 EOF
22040
22041 fi
22042 done
22043
22044 if test "$ac_cv_header_termios_h" = yes ; then
22045         case "$CFLAGS $CPPFLAGS" in
22046         (*-D_POSIX_SOURCE*)
22047                 termios_bad=dunno ;;
22048         (*)     termios_bad=maybe ;;
22049         esac
22050         if test "$termios_bad" = maybe ; then
22051         echo "$as_me:22051: checking whether termios.h needs _POSIX_SOURCE" >&5
22052 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22053         cat >"conftest.$ac_ext" <<_ACEOF
22054 #line 22054 "configure"
22055 #include "confdefs.h"
22056 #include <termios.h>
22057 int
22058 main (void)
22059 {
22060 struct termios foo; int x = foo.c_iflag = 1; (void)x
22061   ;
22062   return 0;
22063 }
22064 _ACEOF
22065 rm -f "conftest.$ac_objext"
22066 if { (eval echo "$as_me:22066: \"$ac_compile\"") >&5
22067   (eval $ac_compile) 2>&5
22068   ac_status=$?
22069   echo "$as_me:22069: \$? = $ac_status" >&5
22070   (exit "$ac_status"); } &&
22071          { ac_try='test -s "conftest.$ac_objext"'
22072   { (eval echo "$as_me:22072: \"$ac_try\"") >&5
22073   (eval $ac_try) 2>&5
22074   ac_status=$?
22075   echo "$as_me:22075: \$? = $ac_status" >&5
22076   (exit "$ac_status"); }; }; then
22077   termios_bad=no
22078 else
22079   echo "$as_me: failed program was:" >&5
22080 cat "conftest.$ac_ext" >&5
22081
22082                 cat >"conftest.$ac_ext" <<_ACEOF
22083 #line 22083 "configure"
22084 #include "confdefs.h"
22085
22086 #define _POSIX_SOURCE
22087 #include <termios.h>
22088 int
22089 main (void)
22090 {
22091 struct termios foo; int x = foo.c_iflag = 2; (void)x
22092   ;
22093   return 0;
22094 }
22095 _ACEOF
22096 rm -f "conftest.$ac_objext"
22097 if { (eval echo "$as_me:22097: \"$ac_compile\"") >&5
22098   (eval $ac_compile) 2>&5
22099   ac_status=$?
22100   echo "$as_me:22100: \$? = $ac_status" >&5
22101   (exit "$ac_status"); } &&
22102          { ac_try='test -s "conftest.$ac_objext"'
22103   { (eval echo "$as_me:22103: \"$ac_try\"") >&5
22104   (eval $ac_try) 2>&5
22105   ac_status=$?
22106   echo "$as_me:22106: \$? = $ac_status" >&5
22107   (exit "$ac_status"); }; }; then
22108   termios_bad=unknown
22109 else
22110   echo "$as_me: failed program was:" >&5
22111 cat "conftest.$ac_ext" >&5
22112 termios_bad=yes
22113 cat >>confdefs.h <<\EOF
22114 #define _POSIX_SOURCE 1
22115 EOF
22116
22117 fi
22118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22119
22120 fi
22121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22122         echo "$as_me:22122: result: $termios_bad" >&5
22123 echo "${ECHO_T}$termios_bad" >&6
22124         fi
22125 fi
22126
22127 echo "$as_me:22127: checking for tcgetattr" >&5
22128 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22129 if test "${cf_cv_have_tcgetattr+set}" = set; then
22130   echo $ECHO_N "(cached) $ECHO_C" >&6
22131 else
22132
22133 cat >"conftest.$ac_ext" <<_ACEOF
22134 #line 22134 "configure"
22135 #include "confdefs.h"
22136
22137 #include <sys/types.h>
22138 #ifdef HAVE_UNISTD_H
22139 #include <unistd.h>
22140 #endif
22141 #ifdef HAVE_TERMIOS_H
22142 #include <termios.h>
22143 #define TTY struct termios
22144 #else
22145 #ifdef HAVE_TERMIO_H
22146 #include <termio.h>
22147 #define TTY struct termio
22148 #endif
22149 #endif
22150
22151 int
22152 main (void)
22153 {
22154
22155 TTY foo;
22156 tcgetattr(1, &foo);
22157   ;
22158   return 0;
22159 }
22160 _ACEOF
22161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22162 if { (eval echo "$as_me:22162: \"$ac_link\"") >&5
22163   (eval $ac_link) 2>&5
22164   ac_status=$?
22165   echo "$as_me:22165: \$? = $ac_status" >&5
22166   (exit "$ac_status"); } &&
22167          { ac_try='test -s "conftest$ac_exeext"'
22168   { (eval echo "$as_me:22168: \"$ac_try\"") >&5
22169   (eval $ac_try) 2>&5
22170   ac_status=$?
22171   echo "$as_me:22171: \$? = $ac_status" >&5
22172   (exit "$ac_status"); }; }; then
22173   cf_cv_have_tcgetattr=yes
22174 else
22175   echo "$as_me: failed program was:" >&5
22176 cat "conftest.$ac_ext" >&5
22177 cf_cv_have_tcgetattr=no
22178 fi
22179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22180 fi
22181 echo "$as_me:22181: result: $cf_cv_have_tcgetattr" >&5
22182 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22183 test "$cf_cv_have_tcgetattr" = yes &&
22184 cat >>confdefs.h <<\EOF
22185 #define HAVE_TCGETATTR 1
22186 EOF
22187
22188 echo "$as_me:22188: checking for vsscanf function or workaround" >&5
22189 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22190 if test "${cf_cv_func_vsscanf+set}" = set; then
22191   echo $ECHO_N "(cached) $ECHO_C" >&6
22192 else
22193
22194 cat >"conftest.$ac_ext" <<_ACEOF
22195 #line 22195 "configure"
22196 #include "confdefs.h"
22197
22198 #include <stdarg.h>
22199 #include <stdio.h>
22200 int
22201 main (void)
22202 {
22203
22204         va_list ap;
22205         vsscanf("from", "%d", ap)
22206   ;
22207   return 0;
22208 }
22209 _ACEOF
22210 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22211 if { (eval echo "$as_me:22211: \"$ac_link\"") >&5
22212   (eval $ac_link) 2>&5
22213   ac_status=$?
22214   echo "$as_me:22214: \$? = $ac_status" >&5
22215   (exit "$ac_status"); } &&
22216          { ac_try='test -s "conftest$ac_exeext"'
22217   { (eval echo "$as_me:22217: \"$ac_try\"") >&5
22218   (eval $ac_try) 2>&5
22219   ac_status=$?
22220   echo "$as_me:22220: \$? = $ac_status" >&5
22221   (exit "$ac_status"); }; }; then
22222   cf_cv_func_vsscanf=vsscanf
22223 else
22224   echo "$as_me: failed program was:" >&5
22225 cat "conftest.$ac_ext" >&5
22226
22227 cat >"conftest.$ac_ext" <<_ACEOF
22228 #line 22228 "configure"
22229 #include "confdefs.h"
22230
22231 #include <stdarg.h>
22232 #include <stdio.h>
22233 int
22234 main (void)
22235 {
22236
22237         FILE strbuf;
22238         char *str = "from";
22239
22240         strbuf._flag = _IOREAD;
22241         strbuf._ptr = strbuf._base = (unsigned char *) str;
22242         strbuf._cnt = strlen(str);
22243         strbuf._file = _NFILE;
22244         return (vfscanf(&strbuf, "%d", ap))
22245   ;
22246   return 0;
22247 }
22248 _ACEOF
22249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22250 if { (eval echo "$as_me:22250: \"$ac_link\"") >&5
22251   (eval $ac_link) 2>&5
22252   ac_status=$?
22253   echo "$as_me:22253: \$? = $ac_status" >&5
22254   (exit "$ac_status"); } &&
22255          { ac_try='test -s "conftest$ac_exeext"'
22256   { (eval echo "$as_me:22256: \"$ac_try\"") >&5
22257   (eval $ac_try) 2>&5
22258   ac_status=$?
22259   echo "$as_me:22259: \$? = $ac_status" >&5
22260   (exit "$ac_status"); }; }; then
22261   cf_cv_func_vsscanf=vfscanf
22262 else
22263   echo "$as_me: failed program was:" >&5
22264 cat "conftest.$ac_ext" >&5
22265
22266 cat >"conftest.$ac_ext" <<_ACEOF
22267 #line 22267 "configure"
22268 #include "confdefs.h"
22269
22270 #include <stdarg.h>
22271 #include <stdio.h>
22272 int
22273 main (void)
22274 {
22275
22276         FILE strbuf;
22277         char *str = "from";
22278
22279         strbuf._flag = _IOREAD;
22280         strbuf._ptr = strbuf._base = (unsigned char *) str;
22281         strbuf._cnt = strlen(str);
22282         strbuf._file = _NFILE;
22283         return (_doscan(&strbuf, "%d", ap))
22284   ;
22285   return 0;
22286 }
22287 _ACEOF
22288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22289 if { (eval echo "$as_me:22289: \"$ac_link\"") >&5
22290   (eval $ac_link) 2>&5
22291   ac_status=$?
22292   echo "$as_me:22292: \$? = $ac_status" >&5
22293   (exit "$ac_status"); } &&
22294          { ac_try='test -s "conftest$ac_exeext"'
22295   { (eval echo "$as_me:22295: \"$ac_try\"") >&5
22296   (eval $ac_try) 2>&5
22297   ac_status=$?
22298   echo "$as_me:22298: \$? = $ac_status" >&5
22299   (exit "$ac_status"); }; }; then
22300   cf_cv_func_vsscanf=_doscan
22301 else
22302   echo "$as_me: failed program was:" >&5
22303 cat "conftest.$ac_ext" >&5
22304
22305 cf_cv_func_vsscanf=no
22306 fi
22307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22308 fi
22309 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22310 fi
22311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22312 fi
22313 echo "$as_me:22313: result: $cf_cv_func_vsscanf" >&5
22314 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22315
22316 case "$cf_cv_func_vsscanf" in
22317 (vsscanf)
22318 cat >>confdefs.h <<\EOF
22319 #define HAVE_VSSCANF 1
22320 EOF
22321 ;;
22322 (vfscanf)
22323 cat >>confdefs.h <<\EOF
22324 #define HAVE_VFSCANF 1
22325 EOF
22326 ;;
22327 (_doscan)
22328 cat >>confdefs.h <<\EOF
22329 #define HAVE__DOSCAN 1
22330 EOF
22331 ;;
22332 esac
22333
22334 for ac_header in \
22335 unistd.h \
22336
22337 do
22338 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22339 echo "$as_me:22339: checking for $ac_header" >&5
22340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22342   echo $ECHO_N "(cached) $ECHO_C" >&6
22343 else
22344   cat >"conftest.$ac_ext" <<_ACEOF
22345 #line 22345 "configure"
22346 #include "confdefs.h"
22347 #include <$ac_header>
22348 _ACEOF
22349 if { (eval echo "$as_me:22349: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22350   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22351   ac_status=$?
22352   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22353   rm -f conftest.er1
22354   cat conftest.err >&5
22355   echo "$as_me:22355: \$? = $ac_status" >&5
22356   (exit "$ac_status"); } >/dev/null; then
22357   if test -s conftest.err; then
22358     ac_cpp_err=$ac_c_preproc_warn_flag
22359   else
22360     ac_cpp_err=
22361   fi
22362 else
22363   ac_cpp_err=yes
22364 fi
22365 if test -z "$ac_cpp_err"; then
22366   eval "$as_ac_Header=yes"
22367 else
22368   echo "$as_me: failed program was:" >&5
22369   cat "conftest.$ac_ext" >&5
22370   eval "$as_ac_Header=no"
22371 fi
22372 rm -f conftest.err "conftest.$ac_ext"
22373 fi
22374 echo "$as_me:22374: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22375 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22376 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22377   cat >>confdefs.h <<EOF
22378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22379 EOF
22380
22381 fi
22382 done
22383
22384 echo "$as_me:22384: checking for working mkstemp" >&5
22385 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22386 if test "${cf_cv_func_mkstemp+set}" = set; then
22387   echo $ECHO_N "(cached) $ECHO_C" >&6
22388 else
22389
22390 rm -rf ./conftest*
22391 if test "$cross_compiling" = yes; then
22392   cf_cv_func_mkstemp=maybe
22393 else
22394   cat >"conftest.$ac_ext" <<_ACEOF
22395 #line 22395 "configure"
22396 #include "confdefs.h"
22397
22398 #include <sys/types.h>
22399 #ifdef HAVE_UNISTD_H
22400 #include <unistd.h>
22401 #endif
22402 #include <stdlib.h>
22403 #include <stdio.h>
22404 #include <string.h>
22405 #include <sys/stat.h>
22406 int main(void)
22407 {
22408         char *tmpl = "conftestXXXXXX";
22409         char name[2][80];
22410         int n;
22411         int result = 0;
22412         int fd;
22413         struct stat sb;
22414
22415         umask(077);
22416         for (n = 0; n < 2; ++n) {
22417                 strcpy(name[n], tmpl);
22418                 if ((fd = mkstemp(name[n])) >= 0) {
22419                         if (!strcmp(name[n], tmpl)
22420                          || stat(name[n], &sb) != 0
22421                          || (sb.st_mode & S_IFMT) != S_IFREG
22422                          || (sb.st_mode & 077) != 0) {
22423                                 result = 1;
22424                         }
22425                         close(fd);
22426                 }
22427         }
22428         if (result == 0
22429          && !strcmp(name[0], name[1]))
22430                 result = 1;
22431         ${cf_cv_main_return:-return}(result);
22432 }
22433
22434 _ACEOF
22435 rm -f "conftest$ac_exeext"
22436 if { (eval echo "$as_me:22436: \"$ac_link\"") >&5
22437   (eval $ac_link) 2>&5
22438   ac_status=$?
22439   echo "$as_me:22439: \$? = $ac_status" >&5
22440   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22441   { (eval echo "$as_me:22441: \"$ac_try\"") >&5
22442   (eval $ac_try) 2>&5
22443   ac_status=$?
22444   echo "$as_me:22444: \$? = $ac_status" >&5
22445   (exit "$ac_status"); }; }; then
22446   cf_cv_func_mkstemp=yes
22447
22448 else
22449   echo "$as_me: program exited with status $ac_status" >&5
22450 echo "$as_me: failed program was:" >&5
22451 cat "conftest.$ac_ext" >&5
22452 cf_cv_func_mkstemp=no
22453
22454 fi
22455 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22456 fi
22457
22458 fi
22459 echo "$as_me:22459: result: $cf_cv_func_mkstemp" >&5
22460 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22461 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22462         echo "$as_me:22462: checking for mkstemp" >&5
22463 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22464 if test "${ac_cv_func_mkstemp+set}" = set; then
22465   echo $ECHO_N "(cached) $ECHO_C" >&6
22466 else
22467   cat >"conftest.$ac_ext" <<_ACEOF
22468 #line 22468 "configure"
22469 #include "confdefs.h"
22470 #define mkstemp autoconf_temporary
22471 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22472 #undef mkstemp
22473
22474 #ifdef __cplusplus
22475 extern "C"
22476 #endif
22477
22478 /* We use char because int might match the return type of a gcc2
22479    builtin and then its argument prototype would still apply.  */
22480 char mkstemp (void);
22481
22482 int
22483 main (void)
22484 {
22485
22486 /* The GNU C library defines stubs for functions which it implements
22487     to always fail with ENOSYS.  Some functions are actually named
22488     something starting with __ and the normal name is an alias.  */
22489 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22490 #error found stub for mkstemp
22491 #endif
22492
22493         return mkstemp ();
22494   ;
22495   return 0;
22496 }
22497 _ACEOF
22498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22499 if { (eval echo "$as_me:22499: \"$ac_link\"") >&5
22500   (eval $ac_link) 2>&5
22501   ac_status=$?
22502   echo "$as_me:22502: \$? = $ac_status" >&5
22503   (exit "$ac_status"); } &&
22504          { ac_try='test -s "conftest$ac_exeext"'
22505   { (eval echo "$as_me:22505: \"$ac_try\"") >&5
22506   (eval $ac_try) 2>&5
22507   ac_status=$?
22508   echo "$as_me:22508: \$? = $ac_status" >&5
22509   (exit "$ac_status"); }; }; then
22510   ac_cv_func_mkstemp=yes
22511 else
22512   echo "$as_me: failed program was:" >&5
22513 cat "conftest.$ac_ext" >&5
22514 ac_cv_func_mkstemp=no
22515 fi
22516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22517 fi
22518 echo "$as_me:22518: result: $ac_cv_func_mkstemp" >&5
22519 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22520
22521 fi
22522 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22523
22524 cat >>confdefs.h <<\EOF
22525 #define HAVE_MKSTEMP 1
22526 EOF
22527
22528 fi
22529
22530 # setup for prototype of fallback for vsscanf()
22531
22532 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22533         HAVE_VSSCANF=1
22534 else
22535         HAVE_VSSCANF=0
22536 fi
22537
22538 if test "x$cross_compiling" = xyes ; then
22539         { echo "$as_me:22539: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22540 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22541 else
22542         echo "$as_me:22542: checking whether setvbuf arguments are reversed" >&5
22543 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22544 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22545   echo $ECHO_N "(cached) $ECHO_C" >&6
22546 else
22547   if test "$cross_compiling" = yes; then
22548   { { echo "$as_me:22548: error: cannot run test program while cross compiling" >&5
22549 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22550    { (exit 1); exit 1; }; }
22551 else
22552   cat >"conftest.$ac_ext" <<_ACEOF
22553 #line 22553 "configure"
22554 #include "confdefs.h"
22555 #include <stdio.h>
22556 /* If setvbuf has the reversed format, exit 0. */
22557 int
22558 main (void)
22559 {
22560   /* This call has the arguments reversed.
22561      A reversed system may check and see that the address of main
22562      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22563   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22564     $ac_main_return(1);
22565   putc('\r', stdout);
22566   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22567 }
22568 _ACEOF
22569 rm -f "conftest$ac_exeext"
22570 if { (eval echo "$as_me:22570: \"$ac_link\"") >&5
22571   (eval $ac_link) 2>&5
22572   ac_status=$?
22573   echo "$as_me:22573: \$? = $ac_status" >&5
22574   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22575   { (eval echo "$as_me:22575: \"$ac_try\"") >&5
22576   (eval $ac_try) 2>&5
22577   ac_status=$?
22578   echo "$as_me:22578: \$? = $ac_status" >&5
22579   (exit "$ac_status"); }; }; then
22580   ac_cv_func_setvbuf_reversed=yes
22581 else
22582   echo "$as_me: program exited with status $ac_status" >&5
22583 echo "$as_me: failed program was:" >&5
22584 cat "conftest.$ac_ext" >&5
22585 ac_cv_func_setvbuf_reversed=no
22586 fi
22587 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22588 fi
22589 rm -f core ./core.* ./*.core
22590 fi
22591 echo "$as_me:22591: result: $ac_cv_func_setvbuf_reversed" >&5
22592 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22593 if test $ac_cv_func_setvbuf_reversed = yes; then
22594
22595 cat >>confdefs.h <<\EOF
22596 #define SETVBUF_REVERSED 1
22597 EOF
22598
22599 fi
22600
22601 fi
22602 echo "$as_me:22602: checking for intptr_t" >&5
22603 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22604 if test "${ac_cv_type_intptr_t+set}" = set; then
22605   echo $ECHO_N "(cached) $ECHO_C" >&6
22606 else
22607   cat >"conftest.$ac_ext" <<_ACEOF
22608 #line 22608 "configure"
22609 #include "confdefs.h"
22610 $ac_includes_default
22611 int
22612 main (void)
22613 {
22614 if ((intptr_t *) 0)
22615   return 0;
22616 if (sizeof (intptr_t))
22617   return 0;
22618   ;
22619   return 0;
22620 }
22621 _ACEOF
22622 rm -f "conftest.$ac_objext"
22623 if { (eval echo "$as_me:22623: \"$ac_compile\"") >&5
22624   (eval $ac_compile) 2>&5
22625   ac_status=$?
22626   echo "$as_me:22626: \$? = $ac_status" >&5
22627   (exit "$ac_status"); } &&
22628          { ac_try='test -s "conftest.$ac_objext"'
22629   { (eval echo "$as_me:22629: \"$ac_try\"") >&5
22630   (eval $ac_try) 2>&5
22631   ac_status=$?
22632   echo "$as_me:22632: \$? = $ac_status" >&5
22633   (exit "$ac_status"); }; }; then
22634   ac_cv_type_intptr_t=yes
22635 else
22636   echo "$as_me: failed program was:" >&5
22637 cat "conftest.$ac_ext" >&5
22638 ac_cv_type_intptr_t=no
22639 fi
22640 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22641 fi
22642 echo "$as_me:22642: result: $ac_cv_type_intptr_t" >&5
22643 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22644 if test "$ac_cv_type_intptr_t" = yes; then
22645   :
22646 else
22647
22648 cat >>confdefs.h <<EOF
22649 #define intptr_t long
22650 EOF
22651
22652 fi
22653
22654 echo "$as_me:22654: checking for ssize_t" >&5
22655 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22656 if test "${ac_cv_type_ssize_t+set}" = set; then
22657   echo $ECHO_N "(cached) $ECHO_C" >&6
22658 else
22659   cat >"conftest.$ac_ext" <<_ACEOF
22660 #line 22660 "configure"
22661 #include "confdefs.h"
22662 $ac_includes_default
22663 int
22664 main (void)
22665 {
22666 if ((ssize_t *) 0)
22667   return 0;
22668 if (sizeof (ssize_t))
22669   return 0;
22670   ;
22671   return 0;
22672 }
22673 _ACEOF
22674 rm -f "conftest.$ac_objext"
22675 if { (eval echo "$as_me:22675: \"$ac_compile\"") >&5
22676   (eval $ac_compile) 2>&5
22677   ac_status=$?
22678   echo "$as_me:22678: \$? = $ac_status" >&5
22679   (exit "$ac_status"); } &&
22680          { ac_try='test -s "conftest.$ac_objext"'
22681   { (eval echo "$as_me:22681: \"$ac_try\"") >&5
22682   (eval $ac_try) 2>&5
22683   ac_status=$?
22684   echo "$as_me:22684: \$? = $ac_status" >&5
22685   (exit "$ac_status"); }; }; then
22686   ac_cv_type_ssize_t=yes
22687 else
22688   echo "$as_me: failed program was:" >&5
22689 cat "conftest.$ac_ext" >&5
22690 ac_cv_type_ssize_t=no
22691 fi
22692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22693 fi
22694 echo "$as_me:22694: result: $ac_cv_type_ssize_t" >&5
22695 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22696 if test "$ac_cv_type_ssize_t" = yes; then
22697   :
22698 else
22699
22700 cat >>confdefs.h <<EOF
22701 #define ssize_t int
22702 EOF
22703
22704 fi
22705
22706 echo "$as_me:22706: checking for type sigaction_t" >&5
22707 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22708 if test "${cf_cv_type_sigaction+set}" = set; then
22709   echo $ECHO_N "(cached) $ECHO_C" >&6
22710 else
22711
22712         cat >"conftest.$ac_ext" <<_ACEOF
22713 #line 22713 "configure"
22714 #include "confdefs.h"
22715
22716 #include <signal.h>
22717 int
22718 main (void)
22719 {
22720 sigaction_t x
22721   ;
22722   return 0;
22723 }
22724 _ACEOF
22725 rm -f "conftest.$ac_objext"
22726 if { (eval echo "$as_me:22726: \"$ac_compile\"") >&5
22727   (eval $ac_compile) 2>&5
22728   ac_status=$?
22729   echo "$as_me:22729: \$? = $ac_status" >&5
22730   (exit "$ac_status"); } &&
22731          { ac_try='test -s "conftest.$ac_objext"'
22732   { (eval echo "$as_me:22732: \"$ac_try\"") >&5
22733   (eval $ac_try) 2>&5
22734   ac_status=$?
22735   echo "$as_me:22735: \$? = $ac_status" >&5
22736   (exit "$ac_status"); }; }; then
22737   cf_cv_type_sigaction=yes
22738 else
22739   echo "$as_me: failed program was:" >&5
22740 cat "conftest.$ac_ext" >&5
22741 cf_cv_type_sigaction=no
22742 fi
22743 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22744 fi
22745
22746 echo "$as_me:22746: result: $cf_cv_type_sigaction" >&5
22747 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22748 test "$cf_cv_type_sigaction" = yes &&
22749 cat >>confdefs.h <<\EOF
22750 #define HAVE_TYPE_SIGACTION 1
22751 EOF
22752
22753 echo "$as_me:22753: checking declaration of size-change" >&5
22754 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22755 if test "${cf_cv_sizechange+set}" = set; then
22756   echo $ECHO_N "(cached) $ECHO_C" >&6
22757 else
22758
22759         cf_cv_sizechange=unknown
22760         cf_save_CPPFLAGS="$CPPFLAGS"
22761
22762 for cf_opts in "" "NEED_PTEM_H"
22763 do
22764
22765         CPPFLAGS="$cf_save_CPPFLAGS"
22766         if test -n "$cf_opts"
22767         then
22768
22769         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22770         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22771
22772         fi
22773         cat >"conftest.$ac_ext" <<_ACEOF
22774 #line 22774 "configure"
22775 #include "confdefs.h"
22776 #include <sys/types.h>
22777 #ifdef HAVE_TERMIOS_H
22778 #include <termios.h>
22779 #else
22780 #ifdef HAVE_TERMIO_H
22781 #include <termio.h>
22782 #endif
22783 #endif
22784
22785 #ifdef NEED_PTEM_H
22786 /* This is a workaround for SCO:  they neglected to define struct winsize in
22787  * termios.h -- it is only in termio.h and ptem.h
22788  */
22789 #include <sys/stream.h>
22790 #include <sys/ptem.h>
22791 #endif
22792
22793 #ifdef HAVE_SYS_IOCTL_H
22794 #include <sys/ioctl.h>
22795 #endif
22796
22797 int
22798 main (void)
22799 {
22800
22801 #ifdef TIOCGSIZE
22802         struct ttysize win;     /* SunOS 3.0... */
22803         int y = win.ts_lines = 2;
22804         int x = win.ts_cols = 1;
22805         (void)y;
22806         (void)x;
22807 #else
22808 #ifdef TIOCGWINSZ
22809         struct winsize win;     /* everything else */
22810         int y = win.ws_row = 2;
22811         int x = win.ws_col = 1;
22812         (void)y;
22813         (void)x;
22814 #else
22815         no TIOCGSIZE or TIOCGWINSZ
22816 #endif /* TIOCGWINSZ */
22817 #endif /* TIOCGSIZE */
22818
22819   ;
22820   return 0;
22821 }
22822 _ACEOF
22823 rm -f "conftest.$ac_objext"
22824 if { (eval echo "$as_me:22824: \"$ac_compile\"") >&5
22825   (eval $ac_compile) 2>&5
22826   ac_status=$?
22827   echo "$as_me:22827: \$? = $ac_status" >&5
22828   (exit "$ac_status"); } &&
22829          { ac_try='test -s "conftest.$ac_objext"'
22830   { (eval echo "$as_me:22830: \"$ac_try\"") >&5
22831   (eval $ac_try) 2>&5
22832   ac_status=$?
22833   echo "$as_me:22833: \$? = $ac_status" >&5
22834   (exit "$ac_status"); }; }; then
22835   cf_cv_sizechange=yes
22836 else
22837   echo "$as_me: failed program was:" >&5
22838 cat "conftest.$ac_ext" >&5
22839 cf_cv_sizechange=no
22840 fi
22841 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22842
22843         CPPFLAGS="$cf_save_CPPFLAGS"
22844         if test "$cf_cv_sizechange" = yes ; then
22845                 echo "size-change succeeded ($cf_opts)" >&5
22846                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22847                 break
22848         fi
22849 done
22850
22851 fi
22852 echo "$as_me:22852: result: $cf_cv_sizechange" >&5
22853 echo "${ECHO_T}$cf_cv_sizechange" >&6
22854 if test "$cf_cv_sizechange" != no ; then
22855
22856 cat >>confdefs.h <<\EOF
22857 #define HAVE_SIZECHANGE 1
22858 EOF
22859
22860         case "$cf_cv_sizechange" in
22861         (NEED*)
22862                 cat >>confdefs.h <<EOF
22863 #define $cf_cv_sizechange  1
22864 EOF
22865
22866                 ;;
22867         esac
22868 fi
22869
22870 echo "$as_me:22870: checking for memmove" >&5
22871 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22872 if test "${ac_cv_func_memmove+set}" = set; then
22873   echo $ECHO_N "(cached) $ECHO_C" >&6
22874 else
22875   cat >"conftest.$ac_ext" <<_ACEOF
22876 #line 22876 "configure"
22877 #include "confdefs.h"
22878 #define memmove autoconf_temporary
22879 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22880 #undef memmove
22881
22882 #ifdef __cplusplus
22883 extern "C"
22884 #endif
22885
22886 /* We use char because int might match the return type of a gcc2
22887    builtin and then its argument prototype would still apply.  */
22888 char memmove (void);
22889
22890 int
22891 main (void)
22892 {
22893
22894 /* The GNU C library defines stubs for functions which it implements
22895     to always fail with ENOSYS.  Some functions are actually named
22896     something starting with __ and the normal name is an alias.  */
22897 #if defined (__stub_memmove) || defined (__stub___memmove)
22898 #error found stub for memmove
22899 #endif
22900
22901         return memmove ();
22902   ;
22903   return 0;
22904 }
22905 _ACEOF
22906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22907 if { (eval echo "$as_me:22907: \"$ac_link\"") >&5
22908   (eval $ac_link) 2>&5
22909   ac_status=$?
22910   echo "$as_me:22910: \$? = $ac_status" >&5
22911   (exit "$ac_status"); } &&
22912          { ac_try='test -s "conftest$ac_exeext"'
22913   { (eval echo "$as_me:22913: \"$ac_try\"") >&5
22914   (eval $ac_try) 2>&5
22915   ac_status=$?
22916   echo "$as_me:22916: \$? = $ac_status" >&5
22917   (exit "$ac_status"); }; }; then
22918   ac_cv_func_memmove=yes
22919 else
22920   echo "$as_me: failed program was:" >&5
22921 cat "conftest.$ac_ext" >&5
22922 ac_cv_func_memmove=no
22923 fi
22924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22925 fi
22926 echo "$as_me:22926: result: $ac_cv_func_memmove" >&5
22927 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22928 if test "$ac_cv_func_memmove" = yes; then
22929   :
22930 else
22931
22932 echo "$as_me:22932: checking for bcopy" >&5
22933 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22934 if test "${ac_cv_func_bcopy+set}" = set; then
22935   echo $ECHO_N "(cached) $ECHO_C" >&6
22936 else
22937   cat >"conftest.$ac_ext" <<_ACEOF
22938 #line 22938 "configure"
22939 #include "confdefs.h"
22940 #define bcopy autoconf_temporary
22941 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22942 #undef bcopy
22943
22944 #ifdef __cplusplus
22945 extern "C"
22946 #endif
22947
22948 /* We use char because int might match the return type of a gcc2
22949    builtin and then its argument prototype would still apply.  */
22950 char bcopy (void);
22951
22952 int
22953 main (void)
22954 {
22955
22956 /* The GNU C library defines stubs for functions which it implements
22957     to always fail with ENOSYS.  Some functions are actually named
22958     something starting with __ and the normal name is an alias.  */
22959 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22960 #error found stub for bcopy
22961 #endif
22962
22963         return bcopy ();
22964   ;
22965   return 0;
22966 }
22967 _ACEOF
22968 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22969 if { (eval echo "$as_me:22969: \"$ac_link\"") >&5
22970   (eval $ac_link) 2>&5
22971   ac_status=$?
22972   echo "$as_me:22972: \$? = $ac_status" >&5
22973   (exit "$ac_status"); } &&
22974          { ac_try='test -s "conftest$ac_exeext"'
22975   { (eval echo "$as_me:22975: \"$ac_try\"") >&5
22976   (eval $ac_try) 2>&5
22977   ac_status=$?
22978   echo "$as_me:22978: \$? = $ac_status" >&5
22979   (exit "$ac_status"); }; }; then
22980   ac_cv_func_bcopy=yes
22981 else
22982   echo "$as_me: failed program was:" >&5
22983 cat "conftest.$ac_ext" >&5
22984 ac_cv_func_bcopy=no
22985 fi
22986 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22987 fi
22988 echo "$as_me:22988: result: $ac_cv_func_bcopy" >&5
22989 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22990 if test "$ac_cv_func_bcopy" = yes; then
22991
22992         echo "$as_me:22992: checking if bcopy does overlapping moves" >&5
22993 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22994 if test "${cf_cv_good_bcopy+set}" = set; then
22995   echo $ECHO_N "(cached) $ECHO_C" >&6
22996 else
22997
22998                 if test "$cross_compiling" = yes; then
22999   cf_cv_good_bcopy=unknown
23000 else
23001   cat >"conftest.$ac_ext" <<_ACEOF
23002 #line 23002 "configure"
23003 #include "confdefs.h"
23004
23005 int main(void) {
23006         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23007         char temp[40];
23008         bcopy(data, temp, sizeof(data));
23009         bcopy(temp+10, temp, 15);
23010         bcopy(temp+5, temp+15, 10);
23011         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23012 }
23013
23014 _ACEOF
23015 rm -f "conftest$ac_exeext"
23016 if { (eval echo "$as_me:23016: \"$ac_link\"") >&5
23017   (eval $ac_link) 2>&5
23018   ac_status=$?
23019   echo "$as_me:23019: \$? = $ac_status" >&5
23020   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23021   { (eval echo "$as_me:23021: \"$ac_try\"") >&5
23022   (eval $ac_try) 2>&5
23023   ac_status=$?
23024   echo "$as_me:23024: \$? = $ac_status" >&5
23025   (exit "$ac_status"); }; }; then
23026   cf_cv_good_bcopy=yes
23027 else
23028   echo "$as_me: program exited with status $ac_status" >&5
23029 echo "$as_me: failed program was:" >&5
23030 cat "conftest.$ac_ext" >&5
23031 cf_cv_good_bcopy=no
23032 fi
23033 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23034 fi
23035
23036 fi
23037 echo "$as_me:23037: result: $cf_cv_good_bcopy" >&5
23038 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23039
23040 else
23041   cf_cv_good_bcopy=no
23042 fi
23043
23044         if test "$cf_cv_good_bcopy" = yes ; then
23045
23046 cat >>confdefs.h <<\EOF
23047 #define USE_OK_BCOPY 1
23048 EOF
23049
23050         else
23051
23052 cat >>confdefs.h <<\EOF
23053 #define USE_MY_MEMMOVE 1
23054 EOF
23055
23056         fi
23057
23058 fi
23059
23060 tty >/dev/null 2>&1 || {
23061 for ac_func in posix_openpt
23062 do
23063 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23064 echo "$as_me:23064: checking for $ac_func" >&5
23065 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23066 if eval "test \"\${$as_ac_var+set}\" = set"; then
23067   echo $ECHO_N "(cached) $ECHO_C" >&6
23068 else
23069   cat >"conftest.$ac_ext" <<_ACEOF
23070 #line 23070 "configure"
23071 #include "confdefs.h"
23072 #define $ac_func autoconf_temporary
23073 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23074 #undef $ac_func
23075
23076 #ifdef __cplusplus
23077 extern "C"
23078 #endif
23079
23080 /* We use char because int might match the return type of a gcc2
23081    builtin and then its argument prototype would still apply.  */
23082 char $ac_func (void);
23083
23084 int
23085 main (void)
23086 {
23087
23088 /* The GNU C library defines stubs for functions which it implements
23089     to always fail with ENOSYS.  Some functions are actually named
23090     something starting with __ and the normal name is an alias.  */
23091 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23092 #error found stub for $ac_func
23093 #endif
23094
23095         return $ac_func ();
23096   ;
23097   return 0;
23098 }
23099 _ACEOF
23100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23101 if { (eval echo "$as_me:23101: \"$ac_link\"") >&5
23102   (eval $ac_link) 2>&5
23103   ac_status=$?
23104   echo "$as_me:23104: \$? = $ac_status" >&5
23105   (exit "$ac_status"); } &&
23106          { ac_try='test -s "conftest$ac_exeext"'
23107   { (eval echo "$as_me:23107: \"$ac_try\"") >&5
23108   (eval $ac_try) 2>&5
23109   ac_status=$?
23110   echo "$as_me:23110: \$? = $ac_status" >&5
23111   (exit "$ac_status"); }; }; then
23112   eval "$as_ac_var=yes"
23113 else
23114   echo "$as_me: failed program was:" >&5
23115 cat "conftest.$ac_ext" >&5
23116 eval "$as_ac_var=no"
23117 fi
23118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23119 fi
23120 echo "$as_me:23120: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23121 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23122 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23123   cat >>confdefs.h <<EOF
23124 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23125 EOF
23126
23127 fi
23128 done
23129  }
23130 echo "$as_me:23130: checking if poll really works" >&5
23131 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23132 if test "${cf_cv_working_poll+set}" = set; then
23133   echo $ECHO_N "(cached) $ECHO_C" >&6
23134 else
23135
23136 if test "$cross_compiling" = yes; then
23137   cf_cv_working_poll=unknown
23138 else
23139   cat >"conftest.$ac_ext" <<_ACEOF
23140 #line 23140 "configure"
23141 #include "confdefs.h"
23142
23143 #include <stdlib.h>
23144 #include <stdio.h>
23145 #include <unistd.h>
23146 #include <fcntl.h>
23147 #ifdef HAVE_POLL_H
23148 #include <poll.h>
23149 #else
23150 #include <sys/poll.h>
23151 #endif
23152 int main(void) {
23153         struct pollfd myfds;
23154         int ret;
23155
23156         /* check for Darwin bug with respect to "devices" */
23157         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23158         if (myfds.fd < 0)
23159                 myfds.fd = 0;
23160         myfds.events = POLLIN;
23161         myfds.revents = 0;
23162
23163         ret = poll(&myfds, 1, 100);
23164
23165         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23166                 ret = -1;
23167         } else {
23168                 int fd = 0;
23169                 if (!isatty(fd)) {
23170                         fd = open("/dev/tty", 2);       /* O_RDWR */
23171                 }
23172 #ifdef HAVE_POSIX_OPENPT
23173                 if (fd < 0) {
23174                         fd = posix_openpt(O_RDWR);
23175                 }
23176 #endif
23177
23178                 if (fd >= 0) {
23179                         /* also check with standard input */
23180                         myfds.fd = fd;
23181                         myfds.events = POLLIN;
23182                         myfds.revents = 0;
23183                         ret = poll(&myfds, 1, 100);
23184                 } else {
23185                         ret = -1;
23186                 }
23187         }
23188         ${cf_cv_main_return:-return}(ret < 0);
23189 }
23190 _ACEOF
23191 rm -f "conftest$ac_exeext"
23192 if { (eval echo "$as_me:23192: \"$ac_link\"") >&5
23193   (eval $ac_link) 2>&5
23194   ac_status=$?
23195   echo "$as_me:23195: \$? = $ac_status" >&5
23196   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23197   { (eval echo "$as_me:23197: \"$ac_try\"") >&5
23198   (eval $ac_try) 2>&5
23199   ac_status=$?
23200   echo "$as_me:23200: \$? = $ac_status" >&5
23201   (exit "$ac_status"); }; }; then
23202   cf_cv_working_poll=yes
23203 else
23204   echo "$as_me: program exited with status $ac_status" >&5
23205 echo "$as_me: failed program was:" >&5
23206 cat "conftest.$ac_ext" >&5
23207 cf_cv_working_poll=no
23208 fi
23209 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23210 fi
23211 fi
23212 echo "$as_me:23212: result: $cf_cv_working_poll" >&5
23213 echo "${ECHO_T}$cf_cv_working_poll" >&6
23214 test "$cf_cv_working_poll" = "yes" &&
23215 cat >>confdefs.h <<\EOF
23216 #define HAVE_WORKING_POLL 1
23217 EOF
23218
23219 echo "$as_me:23219: checking for va_copy" >&5
23220 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23221 if test "${cf_cv_have_va_copy+set}" = set; then
23222   echo $ECHO_N "(cached) $ECHO_C" >&6
23223 else
23224
23225 cat >"conftest.$ac_ext" <<_ACEOF
23226 #line 23226 "configure"
23227 #include "confdefs.h"
23228
23229 #include <stdarg.h>
23230
23231 int
23232 main (void)
23233 {
23234
23235         static va_list dst;
23236         static va_list src;
23237         va_copy(dst, src)
23238   ;
23239   return 0;
23240 }
23241 _ACEOF
23242 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23243 if { (eval echo "$as_me:23243: \"$ac_link\"") >&5
23244   (eval $ac_link) 2>&5
23245   ac_status=$?
23246   echo "$as_me:23246: \$? = $ac_status" >&5
23247   (exit "$ac_status"); } &&
23248          { ac_try='test -s "conftest$ac_exeext"'
23249   { (eval echo "$as_me:23249: \"$ac_try\"") >&5
23250   (eval $ac_try) 2>&5
23251   ac_status=$?
23252   echo "$as_me:23252: \$? = $ac_status" >&5
23253   (exit "$ac_status"); }; }; then
23254   cf_cv_have_va_copy=yes
23255 else
23256   echo "$as_me: failed program was:" >&5
23257 cat "conftest.$ac_ext" >&5
23258 cf_cv_have_va_copy=no
23259 fi
23260 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23261 fi
23262 echo "$as_me:23262: result: $cf_cv_have_va_copy" >&5
23263 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23264
23265 if test "$cf_cv_have_va_copy" = yes;
23266 then
23267
23268 cat >>confdefs.h <<\EOF
23269 #define HAVE_VA_COPY 1
23270 EOF
23271
23272 else # !cf_cv_have_va_copy
23273
23274 echo "$as_me:23274: checking for __va_copy" >&5
23275 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23276 if test "${cf_cv_have___va_copy+set}" = set; then
23277   echo $ECHO_N "(cached) $ECHO_C" >&6
23278 else
23279
23280 cat >"conftest.$ac_ext" <<_ACEOF
23281 #line 23281 "configure"
23282 #include "confdefs.h"
23283
23284 #include <stdarg.h>
23285
23286 int
23287 main (void)
23288 {
23289
23290         static va_list dst;
23291         static va_list src;
23292         __va_copy(dst, src)
23293   ;
23294   return 0;
23295 }
23296 _ACEOF
23297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23298 if { (eval echo "$as_me:23298: \"$ac_link\"") >&5
23299   (eval $ac_link) 2>&5
23300   ac_status=$?
23301   echo "$as_me:23301: \$? = $ac_status" >&5
23302   (exit "$ac_status"); } &&
23303          { ac_try='test -s "conftest$ac_exeext"'
23304   { (eval echo "$as_me:23304: \"$ac_try\"") >&5
23305   (eval $ac_try) 2>&5
23306   ac_status=$?
23307   echo "$as_me:23307: \$? = $ac_status" >&5
23308   (exit "$ac_status"); }; }; then
23309   cf_cv_have___va_copy=yes
23310 else
23311   echo "$as_me: failed program was:" >&5
23312 cat "conftest.$ac_ext" >&5
23313 cf_cv_have___va_copy=no
23314 fi
23315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23316 fi
23317 echo "$as_me:23317: result: $cf_cv_have___va_copy" >&5
23318 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23319
23320 if test "$cf_cv_have___va_copy" = yes
23321 then
23322
23323 cat >>confdefs.h <<\EOF
23324 #define HAVE___VA_COPY 1
23325 EOF
23326
23327 else # !cf_cv_have___va_copy
23328
23329 echo "$as_me:23329: checking for __builtin_va_copy" >&5
23330 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23331 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23332   echo $ECHO_N "(cached) $ECHO_C" >&6
23333 else
23334
23335 cat >"conftest.$ac_ext" <<_ACEOF
23336 #line 23336 "configure"
23337 #include "confdefs.h"
23338
23339 #include <stdarg.h>
23340
23341 int
23342 main (void)
23343 {
23344
23345         static va_list dst;
23346         static va_list src;
23347         __builtin_va_copy(dst, src)
23348   ;
23349   return 0;
23350 }
23351 _ACEOF
23352 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23353 if { (eval echo "$as_me:23353: \"$ac_link\"") >&5
23354   (eval $ac_link) 2>&5
23355   ac_status=$?
23356   echo "$as_me:23356: \$? = $ac_status" >&5
23357   (exit "$ac_status"); } &&
23358          { ac_try='test -s "conftest$ac_exeext"'
23359   { (eval echo "$as_me:23359: \"$ac_try\"") >&5
23360   (eval $ac_try) 2>&5
23361   ac_status=$?
23362   echo "$as_me:23362: \$? = $ac_status" >&5
23363   (exit "$ac_status"); }; }; then
23364   cf_cv_have___builtin_va_copy=yes
23365 else
23366   echo "$as_me: failed program was:" >&5
23367 cat "conftest.$ac_ext" >&5
23368 cf_cv_have___builtin_va_copy=no
23369 fi
23370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23371 fi
23372 echo "$as_me:23372: result: $cf_cv_have___builtin_va_copy" >&5
23373 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23374
23375 test "$cf_cv_have___builtin_va_copy" = yes &&
23376
23377 cat >>confdefs.h <<\EOF
23378 #define HAVE___BUILTIN_VA_COPY 1
23379 EOF
23380
23381 fi # cf_cv_have___va_copy
23382
23383 fi # cf_cv_have_va_copy
23384
23385 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23386 (*yes*)
23387         ;;
23388
23389 (*)
23390         echo "$as_me:23390: checking if we can simply copy va_list" >&5
23391 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23392 if test "${cf_cv_pointer_va_list+set}" = set; then
23393   echo $ECHO_N "(cached) $ECHO_C" >&6
23394 else
23395
23396 cat >"conftest.$ac_ext" <<_ACEOF
23397 #line 23397 "configure"
23398 #include "confdefs.h"
23399
23400 #include <stdarg.h>
23401
23402 int
23403 main (void)
23404 {
23405
23406         va_list dst;
23407         va_list src;
23408         dst = src
23409   ;
23410   return 0;
23411 }
23412 _ACEOF
23413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23414 if { (eval echo "$as_me:23414: \"$ac_link\"") >&5
23415   (eval $ac_link) 2>&5
23416   ac_status=$?
23417   echo "$as_me:23417: \$? = $ac_status" >&5
23418   (exit "$ac_status"); } &&
23419          { ac_try='test -s "conftest$ac_exeext"'
23420   { (eval echo "$as_me:23420: \"$ac_try\"") >&5
23421   (eval $ac_try) 2>&5
23422   ac_status=$?
23423   echo "$as_me:23423: \$? = $ac_status" >&5
23424   (exit "$ac_status"); }; }; then
23425   cf_cv_pointer_va_list=yes
23426 else
23427   echo "$as_me: failed program was:" >&5
23428 cat "conftest.$ac_ext" >&5
23429 cf_cv_pointer_va_list=no
23430 fi
23431 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23432 fi
23433 echo "$as_me:23433: result: $cf_cv_pointer_va_list" >&5
23434 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23435
23436         if test "$cf_cv_pointer_va_list" = no
23437         then
23438                 echo "$as_me:23438: checking if we can copy va_list indirectly" >&5
23439 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23440 if test "${cf_cv_array_va_list+set}" = set; then
23441   echo $ECHO_N "(cached) $ECHO_C" >&6
23442 else
23443
23444 cat >"conftest.$ac_ext" <<_ACEOF
23445 #line 23445 "configure"
23446 #include "confdefs.h"
23447
23448 #include <stdarg.h>
23449
23450 int
23451 main (void)
23452 {
23453
23454         va_list dst;
23455         va_list src;
23456         *dst = *src
23457   ;
23458   return 0;
23459 }
23460 _ACEOF
23461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23462 if { (eval echo "$as_me:23462: \"$ac_link\"") >&5
23463   (eval $ac_link) 2>&5
23464   ac_status=$?
23465   echo "$as_me:23465: \$? = $ac_status" >&5
23466   (exit "$ac_status"); } &&
23467          { ac_try='test -s "conftest$ac_exeext"'
23468   { (eval echo "$as_me:23468: \"$ac_try\"") >&5
23469   (eval $ac_try) 2>&5
23470   ac_status=$?
23471   echo "$as_me:23471: \$? = $ac_status" >&5
23472   (exit "$ac_status"); }; }; then
23473   cf_cv_array_va_list=yes
23474 else
23475   echo "$as_me: failed program was:" >&5
23476 cat "conftest.$ac_ext" >&5
23477 cf_cv_array_va_list=no
23478 fi
23479 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23480 fi
23481 echo "$as_me:23481: result: $cf_cv_array_va_list" >&5
23482 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23483                 test "$cf_cv_array_va_list" = yes &&
23484 cat >>confdefs.h <<\EOF
23485 #define ARRAY_VA_LIST 1
23486 EOF
23487
23488         fi
23489         ;;
23490 esac
23491
23492 echo "$as_me:23492: checking for pid_t" >&5
23493 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23494 if test "${ac_cv_type_pid_t+set}" = set; then
23495   echo $ECHO_N "(cached) $ECHO_C" >&6
23496 else
23497   cat >"conftest.$ac_ext" <<_ACEOF
23498 #line 23498 "configure"
23499 #include "confdefs.h"
23500 $ac_includes_default
23501 int
23502 main (void)
23503 {
23504 if ((pid_t *) 0)
23505   return 0;
23506 if (sizeof (pid_t))
23507   return 0;
23508   ;
23509   return 0;
23510 }
23511 _ACEOF
23512 rm -f "conftest.$ac_objext"
23513 if { (eval echo "$as_me:23513: \"$ac_compile\"") >&5
23514   (eval $ac_compile) 2>&5
23515   ac_status=$?
23516   echo "$as_me:23516: \$? = $ac_status" >&5
23517   (exit "$ac_status"); } &&
23518          { ac_try='test -s "conftest.$ac_objext"'
23519   { (eval echo "$as_me:23519: \"$ac_try\"") >&5
23520   (eval $ac_try) 2>&5
23521   ac_status=$?
23522   echo "$as_me:23522: \$? = $ac_status" >&5
23523   (exit "$ac_status"); }; }; then
23524   ac_cv_type_pid_t=yes
23525 else
23526   echo "$as_me: failed program was:" >&5
23527 cat "conftest.$ac_ext" >&5
23528 ac_cv_type_pid_t=no
23529 fi
23530 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23531 fi
23532 echo "$as_me:23532: result: $ac_cv_type_pid_t" >&5
23533 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23534 if test "$ac_cv_type_pid_t" = yes; then
23535   :
23536 else
23537
23538 cat >>confdefs.h <<EOF
23539 #define pid_t int
23540 EOF
23541
23542 fi
23543
23544 for ac_header in unistd.h vfork.h
23545 do
23546 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23547 echo "$as_me:23547: checking for $ac_header" >&5
23548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23550   echo $ECHO_N "(cached) $ECHO_C" >&6
23551 else
23552   cat >"conftest.$ac_ext" <<_ACEOF
23553 #line 23553 "configure"
23554 #include "confdefs.h"
23555 #include <$ac_header>
23556 _ACEOF
23557 if { (eval echo "$as_me:23557: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23558   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23559   ac_status=$?
23560   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23561   rm -f conftest.er1
23562   cat conftest.err >&5
23563   echo "$as_me:23563: \$? = $ac_status" >&5
23564   (exit "$ac_status"); } >/dev/null; then
23565   if test -s conftest.err; then
23566     ac_cpp_err=$ac_c_preproc_warn_flag
23567   else
23568     ac_cpp_err=
23569   fi
23570 else
23571   ac_cpp_err=yes
23572 fi
23573 if test -z "$ac_cpp_err"; then
23574   eval "$as_ac_Header=yes"
23575 else
23576   echo "$as_me: failed program was:" >&5
23577   cat "conftest.$ac_ext" >&5
23578   eval "$as_ac_Header=no"
23579 fi
23580 rm -f conftest.err "conftest.$ac_ext"
23581 fi
23582 echo "$as_me:23582: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23583 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23584 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23585   cat >>confdefs.h <<EOF
23586 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23587 EOF
23588
23589 fi
23590 done
23591
23592 for ac_func in fork vfork
23593 do
23594 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23595 echo "$as_me:23595: checking for $ac_func" >&5
23596 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23597 if eval "test \"\${$as_ac_var+set}\" = set"; then
23598   echo $ECHO_N "(cached) $ECHO_C" >&6
23599 else
23600   cat >"conftest.$ac_ext" <<_ACEOF
23601 #line 23601 "configure"
23602 #include "confdefs.h"
23603 #define $ac_func autoconf_temporary
23604 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23605 #undef $ac_func
23606
23607 #ifdef __cplusplus
23608 extern "C"
23609 #endif
23610
23611 /* We use char because int might match the return type of a gcc2
23612    builtin and then its argument prototype would still apply.  */
23613 char $ac_func (void);
23614
23615 int
23616 main (void)
23617 {
23618
23619 /* The GNU C library defines stubs for functions which it implements
23620     to always fail with ENOSYS.  Some functions are actually named
23621     something starting with __ and the normal name is an alias.  */
23622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23623 #error found stub for $ac_func
23624 #endif
23625
23626         return $ac_func ();
23627   ;
23628   return 0;
23629 }
23630 _ACEOF
23631 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23632 if { (eval echo "$as_me:23632: \"$ac_link\"") >&5
23633   (eval $ac_link) 2>&5
23634   ac_status=$?
23635   echo "$as_me:23635: \$? = $ac_status" >&5
23636   (exit "$ac_status"); } &&
23637          { ac_try='test -s "conftest$ac_exeext"'
23638   { (eval echo "$as_me:23638: \"$ac_try\"") >&5
23639   (eval $ac_try) 2>&5
23640   ac_status=$?
23641   echo "$as_me:23641: \$? = $ac_status" >&5
23642   (exit "$ac_status"); }; }; then
23643   eval "$as_ac_var=yes"
23644 else
23645   echo "$as_me: failed program was:" >&5
23646 cat "conftest.$ac_ext" >&5
23647 eval "$as_ac_var=no"
23648 fi
23649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23650 fi
23651 echo "$as_me:23651: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23652 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23653 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23654   cat >>confdefs.h <<EOF
23655 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23656 EOF
23657
23658 fi
23659 done
23660
23661 ac_cv_func_fork_works=$ac_cv_func_fork
23662 if test "x$ac_cv_func_fork" = xyes; then
23663   echo "$as_me:23663: checking for working fork" >&5
23664 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23665 if test "${ac_cv_func_fork_works+set}" = set; then
23666   echo $ECHO_N "(cached) $ECHO_C" >&6
23667 else
23668   if test "$cross_compiling" = yes; then
23669   ac_cv_func_fork_works=cross
23670 else
23671   cat >"conftest.$ac_ext" <<_ACEOF
23672 /* By Rüdiger Kuhlmann. */
23673       #include <sys/types.h>
23674       #if HAVE_UNISTD_H
23675       # include <unistd.h>
23676       #endif
23677       /* Some systems only have a dummy stub for fork() */
23678       int main (void)
23679       {
23680         if (fork() < 0)
23681           $ac_main_return (1);
23682         $ac_main_return (0);
23683       }
23684 _ACEOF
23685 rm -f "conftest$ac_exeext"
23686 if { (eval echo "$as_me:23686: \"$ac_link\"") >&5
23687   (eval $ac_link) 2>&5
23688   ac_status=$?
23689   echo "$as_me:23689: \$? = $ac_status" >&5
23690   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23691   { (eval echo "$as_me:23691: \"$ac_try\"") >&5
23692   (eval $ac_try) 2>&5
23693   ac_status=$?
23694   echo "$as_me:23694: \$? = $ac_status" >&5
23695   (exit "$ac_status"); }; }; then
23696   ac_cv_func_fork_works=yes
23697 else
23698   echo "$as_me: program exited with status $ac_status" >&5
23699 echo "$as_me: failed program was:" >&5
23700 cat "conftest.$ac_ext" >&5
23701 ac_cv_func_fork_works=no
23702 fi
23703 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23704 fi
23705 fi
23706 echo "$as_me:23706: result: $ac_cv_func_fork_works" >&5
23707 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23708
23709 fi
23710 if test "x$ac_cv_func_fork_works" = xcross; then
23711   case $host in
23712     *-*-amigaos* | *-*-msdosdjgpp*)
23713       # Override, as these systems have only a dummy fork() stub
23714       ac_cv_func_fork_works=no
23715       ;;
23716     *)
23717       ac_cv_func_fork_works=yes
23718       ;;
23719   esac
23720   { echo "$as_me:23720: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23721 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23722 fi
23723 ac_cv_func_vfork_works=$ac_cv_func_vfork
23724 if test "x$ac_cv_func_vfork" = xyes; then
23725   echo "$as_me:23725: checking for working vfork" >&5
23726 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23727 if test "${ac_cv_func_vfork_works+set}" = set; then
23728   echo $ECHO_N "(cached) $ECHO_C" >&6
23729 else
23730   if test "$cross_compiling" = yes; then
23731   ac_cv_func_vfork_works=cross
23732 else
23733   cat >"conftest.$ac_ext" <<_ACEOF
23734 #line 23734 "configure"
23735 #include "confdefs.h"
23736 /* Thanks to Paul Eggert for this test.  */
23737 #include <stdio.h>
23738 #include <sys/types.h>
23739 #include <sys/stat.h>
23740 #if HAVE_UNISTD_H
23741 # include <unistd.h>
23742 #endif
23743 #if HAVE_VFORK_H
23744 # include <vfork.h>
23745 #endif
23746 /* On some sparc systems, changes by the child to local and incoming
23747    argument registers are propagated back to the parent.  The compiler
23748    is told about this with #include <vfork.h>, but some compilers
23749    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23750    static variable whose address is put into a register that is
23751    clobbered by the vfork.  */
23752 static
23753 #ifdef __cplusplus
23754 sparc_address_test (int arg)
23755 # else
23756 sparc_address_test (arg) int arg;
23757 #endif
23758 {
23759   static pid_t child;
23760   if (!child) {
23761     child = vfork ();
23762     if (child < 0) {
23763       perror ("vfork");
23764       _exit(2);
23765     }
23766     if (!child) {
23767       arg = getpid();
23768       write(-1, "", 0);
23769       _exit (arg);
23770     }
23771   }
23772 }
23773
23774 int
23775 main (void)
23776 {
23777   pid_t parent = getpid ();
23778   pid_t child;
23779
23780   sparc_address_test ();
23781
23782   child = vfork ();
23783
23784   if (child == 0) {
23785     /* Here is another test for sparc vfork register problems.  This
23786        test uses lots of local variables, at least as many local
23787        variables as main has allocated so far including compiler
23788        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23789        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23790        reuse the register of parent for one of the local variables,
23791        since it will think that parent can't possibly be used any more
23792        in this routine.  Assigning to the local variable will thus
23793        munge parent in the parent process.  */
23794     pid_t
23795       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23796       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23797     /* Convince the compiler that p..p7 are live; otherwise, it might
23798        use the same hardware register for all 8 local variables.  */
23799     if (p != p1 || p != p2 || p != p3 || p != p4
23800         || p != p5 || p != p6 || p != p7)
23801       _exit(1);
23802
23803     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23804        from child file descriptors.  If the child closes a descriptor
23805        before it execs or exits, this munges the parent's descriptor
23806        as well.  Test for this by closing stdout in the child.  */
23807     _exit(close(fileno(stdout)) != 0);
23808   } else {
23809     int status;
23810     struct stat st;
23811
23812     while (wait(&status) != child)
23813       ;
23814     $ac_main_return(
23815          /* Was there some problem with vforking?  */
23816          child < 0
23817
23818          /* Did the child fail?  (This shouldn't happen.)  */
23819          || status
23820
23821          /* Did the vfork/compiler bug occur?  */
23822          || parent != getpid()
23823
23824          /* Did the file descriptor bug occur?  */
23825          || fstat(fileno(stdout), &st) != 0
23826          );
23827   }
23828 }
23829 _ACEOF
23830 rm -f "conftest$ac_exeext"
23831 if { (eval echo "$as_me:23831: \"$ac_link\"") >&5
23832   (eval $ac_link) 2>&5
23833   ac_status=$?
23834   echo "$as_me:23834: \$? = $ac_status" >&5
23835   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23836   { (eval echo "$as_me:23836: \"$ac_try\"") >&5
23837   (eval $ac_try) 2>&5
23838   ac_status=$?
23839   echo "$as_me:23839: \$? = $ac_status" >&5
23840   (exit "$ac_status"); }; }; then
23841   ac_cv_func_vfork_works=yes
23842 else
23843   echo "$as_me: program exited with status $ac_status" >&5
23844 echo "$as_me: failed program was:" >&5
23845 cat "conftest.$ac_ext" >&5
23846 ac_cv_func_vfork_works=no
23847 fi
23848 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23849 fi
23850 fi
23851 echo "$as_me:23851: result: $ac_cv_func_vfork_works" >&5
23852 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23853
23854 fi;
23855 if test "x$ac_cv_func_fork_works" = xcross; then
23856   ac_cv_func_vfork_works=ac_cv_func_vfork
23857   { echo "$as_me:23857: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23858 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23859 fi
23860
23861 if test "x$ac_cv_func_vfork_works" = xyes; then
23862
23863 cat >>confdefs.h <<\EOF
23864 #define HAVE_WORKING_VFORK 1
23865 EOF
23866
23867 else
23868
23869 cat >>confdefs.h <<\EOF
23870 #define vfork fork
23871 EOF
23872
23873 fi
23874 if test "x$ac_cv_func_fork_works" = xyes; then
23875
23876 cat >>confdefs.h <<\EOF
23877 #define HAVE_WORKING_FORK 1
23878 EOF
23879
23880 fi
23881
23882 echo "$as_me:23882: checking if fopen accepts explicit binary mode" >&5
23883 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23884 if test "${cf_cv_fopen_bin_r+set}" = set; then
23885   echo $ECHO_N "(cached) $ECHO_C" >&6
23886 else
23887
23888         if test "$cross_compiling" = yes; then
23889   cf_cv_fopen_bin_r=unknown
23890 else
23891   cat >"conftest.$ac_ext" <<_ACEOF
23892 #line 23892 "configure"
23893 #include "confdefs.h"
23894
23895 #include <stdio.h>
23896 int main(void) {
23897         FILE *fp = fopen("conftest.tmp", "wb");
23898         int rc = 0;
23899         if (fp != 0) {
23900                 int p, q;
23901                 for (p = 0; p < 256; ++p) {
23902                         fputc(p, fp);
23903                 }
23904                 fclose(fp);
23905                 fp = fopen("conftest.tmp", "rb");
23906                 if (fp != 0) {
23907                         for (p = 0; p < 256; ++p) {
23908                                 q = fgetc(fp);
23909                                 if (q != p) {
23910                                         rc = 1;
23911                                         break;
23912                                 }
23913                         }
23914                 } else {
23915                         rc = 1;
23916                 }
23917         } else {
23918                 rc = 1;
23919         }
23920         ${cf_cv_main_return:-return} (rc);
23921 }
23922
23923 _ACEOF
23924 rm -f "conftest$ac_exeext"
23925 if { (eval echo "$as_me:23925: \"$ac_link\"") >&5
23926   (eval $ac_link) 2>&5
23927   ac_status=$?
23928   echo "$as_me:23928: \$? = $ac_status" >&5
23929   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23930   { (eval echo "$as_me:23930: \"$ac_try\"") >&5
23931   (eval $ac_try) 2>&5
23932   ac_status=$?
23933   echo "$as_me:23933: \$? = $ac_status" >&5
23934   (exit "$ac_status"); }; }; then
23935   cf_cv_fopen_bin_r=yes
23936 else
23937   echo "$as_me: program exited with status $ac_status" >&5
23938 echo "$as_me: failed program was:" >&5
23939 cat "conftest.$ac_ext" >&5
23940 cf_cv_fopen_bin_r=no
23941 fi
23942 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23943 fi
23944
23945 fi
23946 echo "$as_me:23946: result: $cf_cv_fopen_bin_r" >&5
23947 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23948 test "x$cf_cv_fopen_bin_r" != xno &&
23949 cat >>confdefs.h <<\EOF
23950 #define USE_FOPEN_BIN_R 1
23951 EOF
23952
23953 # special check for test/ditto.c
23954
23955 echo "$as_me:23955: checking for openpty in -lutil" >&5
23956 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23957 if test "${ac_cv_lib_util_openpty+set}" = set; then
23958   echo $ECHO_N "(cached) $ECHO_C" >&6
23959 else
23960   ac_check_lib_save_LIBS=$LIBS
23961 LIBS="-lutil  $LIBS"
23962 cat >"conftest.$ac_ext" <<_ACEOF
23963 #line 23963 "configure"
23964 #include "confdefs.h"
23965
23966 /* Override any gcc2 internal prototype to avoid an error.  */
23967 #ifdef __cplusplus
23968 extern "C"
23969 #endif
23970 /* We use char because int might match the return type of a gcc2
23971    builtin and then its argument prototype would still apply.  */
23972 char openpty ();
23973 int
23974 main (void)
23975 {
23976 openpty ();
23977   ;
23978   return 0;
23979 }
23980 _ACEOF
23981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23982 if { (eval echo "$as_me:23982: \"$ac_link\"") >&5
23983   (eval $ac_link) 2>&5
23984   ac_status=$?
23985   echo "$as_me:23985: \$? = $ac_status" >&5
23986   (exit "$ac_status"); } &&
23987          { ac_try='test -s "conftest$ac_exeext"'
23988   { (eval echo "$as_me:23988: \"$ac_try\"") >&5
23989   (eval $ac_try) 2>&5
23990   ac_status=$?
23991   echo "$as_me:23991: \$? = $ac_status" >&5
23992   (exit "$ac_status"); }; }; then
23993   ac_cv_lib_util_openpty=yes
23994 else
23995   echo "$as_me: failed program was:" >&5
23996 cat "conftest.$ac_ext" >&5
23997 ac_cv_lib_util_openpty=no
23998 fi
23999 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24000 LIBS=$ac_check_lib_save_LIBS
24001 fi
24002 echo "$as_me:24002: result: $ac_cv_lib_util_openpty" >&5
24003 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24004 if test "$ac_cv_lib_util_openpty" = yes; then
24005   cf_cv_lib_util=yes
24006 else
24007   cf_cv_lib_util=no
24008 fi
24009
24010 echo "$as_me:24010: checking for openpty header" >&5
24011 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24012 if test "${cf_cv_func_openpty+set}" = set; then
24013   echo $ECHO_N "(cached) $ECHO_C" >&6
24014 else
24015
24016         cf_save_LIBS="$LIBS"
24017         test "$cf_cv_lib_util" = yes && {
24018 cf_add_libs="$LIBS"
24019 # reverse order
24020 cf_add_0lib=
24021 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24022 # filter duplicates
24023 for cf_add_1lib in $cf_add_0lib; do
24024         for cf_add_2lib in $cf_add_libs; do
24025                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24026                         cf_add_1lib=
24027                         break
24028                 fi
24029         done
24030         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24031 done
24032 LIBS="$cf_add_libs"
24033  }
24034         for cf_header in pty.h libutil.h util.h
24035         do
24036         cat >"conftest.$ac_ext" <<_ACEOF
24037 #line 24037 "configure"
24038 #include "confdefs.h"
24039
24040 #include <$cf_header>
24041
24042 int
24043 main (void)
24044 {
24045
24046         int x = openpty((int *)0, (int *)0, (char *)0,
24047                                    (struct termios *)0, (struct winsize *)0);
24048
24049   ;
24050   return 0;
24051 }
24052 _ACEOF
24053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24054 if { (eval echo "$as_me:24054: \"$ac_link\"") >&5
24055   (eval $ac_link) 2>&5
24056   ac_status=$?
24057   echo "$as_me:24057: \$? = $ac_status" >&5
24058   (exit "$ac_status"); } &&
24059          { ac_try='test -s "conftest$ac_exeext"'
24060   { (eval echo "$as_me:24060: \"$ac_try\"") >&5
24061   (eval $ac_try) 2>&5
24062   ac_status=$?
24063   echo "$as_me:24063: \$? = $ac_status" >&5
24064   (exit "$ac_status"); }; }; then
24065
24066                 cf_cv_func_openpty=$cf_header
24067                 break
24068
24069 else
24070   echo "$as_me: failed program was:" >&5
24071 cat "conftest.$ac_ext" >&5
24072
24073                 cf_cv_func_openpty=no
24074
24075 fi
24076 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24077         done
24078         LIBS="$cf_save_LIBS"
24079
24080 fi
24081 echo "$as_me:24081: result: $cf_cv_func_openpty" >&5
24082 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24083
24084 if test "$cf_cv_func_openpty" != no ; then
24085
24086 cat >>confdefs.h <<EOF
24087 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24088 EOF
24089
24090 cat >>confdefs.h <<\EOF
24091 #define USE_XTERM_PTY 1
24092 EOF
24093
24094         if test "x$cf_cv_lib_util" = xyes ; then
24095
24096 cf_add_libs="$TEST_LIBS"
24097 # reverse order
24098 cf_add_0lib=
24099 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24100 # filter duplicates
24101 for cf_add_1lib in $cf_add_0lib; do
24102         for cf_add_2lib in $cf_add_libs; do
24103                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24104                         cf_add_1lib=
24105                         break
24106                 fi
24107         done
24108         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24109 done
24110 TEST_LIBS="$cf_add_libs"
24111
24112         fi
24113 fi
24114
24115 if test "$with_hashed_db" != no ; then
24116
24117 cat >>confdefs.h <<\EOF
24118 #define USE_HASHED_DB 1
24119 EOF
24120
24121 case $with_hashed_db in
24122 (yes|*able*)
24123         ;;
24124 (*)
24125         if test -d "$with_hashed_db" ; then
24126
24127 if test -n "$with_hashed_db/include" ; then
24128   for cf_add_incdir in $with_hashed_db/include
24129   do
24130         while test "$cf_add_incdir" != /usr/include
24131         do
24132           if test -d "$cf_add_incdir"
24133           then
24134                 cf_have_incdir=no
24135                 if test -n "$CFLAGS$CPPFLAGS" ; then
24136                   # a loop is needed to ensure we can add subdirs of existing dirs
24137                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24138                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24139                           cf_have_incdir=yes; break
24140                         fi
24141                   done
24142                 fi
24143
24144                 if test "$cf_have_incdir" = no ; then
24145                   if test "$cf_add_incdir" = /usr/local/include ; then
24146                         if test "$GCC" = yes
24147                         then
24148                           cf_save_CPPFLAGS=$CPPFLAGS
24149
24150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24151         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24152
24153                           cat >"conftest.$ac_ext" <<_ACEOF
24154 #line 24154 "configure"
24155 #include "confdefs.h"
24156 #include <stdio.h>
24157 int
24158 main (void)
24159 {
24160 printf("Hello")
24161   ;
24162   return 0;
24163 }
24164 _ACEOF
24165 rm -f "conftest.$ac_objext"
24166 if { (eval echo "$as_me:24166: \"$ac_compile\"") >&5
24167   (eval $ac_compile) 2>&5
24168   ac_status=$?
24169   echo "$as_me:24169: \$? = $ac_status" >&5
24170   (exit "$ac_status"); } &&
24171          { ac_try='test -s "conftest.$ac_objext"'
24172   { (eval echo "$as_me:24172: \"$ac_try\"") >&5
24173   (eval $ac_try) 2>&5
24174   ac_status=$?
24175   echo "$as_me:24175: \$? = $ac_status" >&5
24176   (exit "$ac_status"); }; }; then
24177   :
24178 else
24179   echo "$as_me: failed program was:" >&5
24180 cat "conftest.$ac_ext" >&5
24181 cf_have_incdir=yes
24182 fi
24183 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24184                           CPPFLAGS=$cf_save_CPPFLAGS
24185                         fi
24186                   fi
24187                 fi
24188
24189                 if test "$cf_have_incdir" = no ; then
24190                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24191
24192 echo "${as_me:-configure}:24192: testing adding $cf_add_incdir to include-path ..." 1>&5
24193
24194                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24195
24196                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24197                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24198                   cf_add_incdir="$cf_top_incdir"
24199                 else
24200                   break
24201                 fi
24202           else
24203                 break
24204           fi
24205         done
24206   done
24207 fi
24208
24209 if test -n "$with_hashed_db/lib" ; then
24210         for cf_add_libdir in $with_hashed_db/lib
24211         do
24212                 if test "$cf_add_libdir" = /usr/lib ; then
24213                         :
24214                 elif test -d "$cf_add_libdir"
24215                 then
24216                         cf_have_libdir=no
24217                         if test -n "$LDFLAGS$LIBS" ; then
24218                                 # a loop is needed to ensure we can add subdirs of existing dirs
24219                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24220                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24221                                                 cf_have_libdir=yes; break
24222                                         fi
24223                                 done
24224                         fi
24225                         if test "$cf_have_libdir" = no ; then
24226                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24227
24228 echo "${as_me:-configure}:24228: testing adding $cf_add_libdir to library-path ..." 1>&5
24229
24230                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24231                         fi
24232                 fi
24233         done
24234 fi
24235
24236         else
24237                 case "$with_hashed_db" in
24238                 (./*|../*|/*)
24239                         { echo "$as_me:24239: WARNING: no such directory $with_hashed_db" >&5
24240 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24241                         ;;
24242                 (*)
24243
24244 cf_search=
24245
24246 test "x$prefix" != "xNONE" && \
24247 test -d "$prefix" && \
24248  {
24249         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24250         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24251         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24252         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24253         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24254         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24255 }
24256
24257 for cf_subdir_prefix in \
24258         /usr \
24259         /usr/local \
24260         /usr/pkg \
24261         /opt \
24262         /opt/local \
24263         $HOME
24264 do
24265
24266 test "x$cf_subdir_prefix" != "x$prefix" && \
24267 test -d "$cf_subdir_prefix" && \
24268 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24269         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24270         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24271         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24272         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24273         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24274         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"
24275 }
24276
24277 done
24278
24279         for cf_item in $cf_search
24280         do
24281                 case "$cf_item" in
24282                 (*/$with_hashed_db)
24283
24284 if test -n "$cf_item" ; then
24285   for cf_add_incdir in $cf_item
24286   do
24287         while test "$cf_add_incdir" != /usr/include
24288         do
24289           if test -d "$cf_add_incdir"
24290           then
24291                 cf_have_incdir=no
24292                 if test -n "$CFLAGS$CPPFLAGS" ; then
24293                   # a loop is needed to ensure we can add subdirs of existing dirs
24294                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24295                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24296                           cf_have_incdir=yes; break
24297                         fi
24298                   done
24299                 fi
24300
24301                 if test "$cf_have_incdir" = no ; then
24302                   if test "$cf_add_incdir" = /usr/local/include ; then
24303                         if test "$GCC" = yes
24304                         then
24305                           cf_save_CPPFLAGS=$CPPFLAGS
24306
24307         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24308         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24309
24310                           cat >"conftest.$ac_ext" <<_ACEOF
24311 #line 24311 "configure"
24312 #include "confdefs.h"
24313 #include <stdio.h>
24314 int
24315 main (void)
24316 {
24317 printf("Hello")
24318   ;
24319   return 0;
24320 }
24321 _ACEOF
24322 rm -f "conftest.$ac_objext"
24323 if { (eval echo "$as_me:24323: \"$ac_compile\"") >&5
24324   (eval $ac_compile) 2>&5
24325   ac_status=$?
24326   echo "$as_me:24326: \$? = $ac_status" >&5
24327   (exit "$ac_status"); } &&
24328          { ac_try='test -s "conftest.$ac_objext"'
24329   { (eval echo "$as_me:24329: \"$ac_try\"") >&5
24330   (eval $ac_try) 2>&5
24331   ac_status=$?
24332   echo "$as_me:24332: \$? = $ac_status" >&5
24333   (exit "$ac_status"); }; }; then
24334   :
24335 else
24336   echo "$as_me: failed program was:" >&5
24337 cat "conftest.$ac_ext" >&5
24338 cf_have_incdir=yes
24339 fi
24340 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24341                           CPPFLAGS=$cf_save_CPPFLAGS
24342                         fi
24343                   fi
24344                 fi
24345
24346                 if test "$cf_have_incdir" = no ; then
24347                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24348
24349 echo "${as_me:-configure}:24349: testing adding $cf_add_incdir to include-path ..." 1>&5
24350
24351                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24352
24353                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24354                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24355                   cf_add_incdir="$cf_top_incdir"
24356                 else
24357                   break
24358                 fi
24359           else
24360                 break
24361           fi
24362         done
24363   done
24364 fi
24365
24366                         ;;
24367                 esac
24368         done
24369
24370 cf_search=
24371
24372 test "x$prefix" != "xNONE" && \
24373 test -d "$prefix" && \
24374  {
24375         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24376         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24377         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24378         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24379         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24380         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24381 }
24382
24383 for cf_subdir_prefix in \
24384         /usr \
24385         /usr/local \
24386         /usr/pkg \
24387         /opt \
24388         /opt/local \
24389         $HOME
24390 do
24391
24392 test "x$cf_subdir_prefix" != "x$prefix" && \
24393 test -d "$cf_subdir_prefix" && \
24394 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24395         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24396         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24397         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24398         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24399         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24400         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"
24401 }
24402
24403 done
24404
24405         for cf_item in $cf_search
24406         do
24407                 case "$cf_item" in
24408                 (*/$with_hashed_db)
24409
24410 if test -n "$cf_item" ; then
24411         for cf_add_libdir in $cf_item
24412         do
24413                 if test "$cf_add_libdir" = /usr/lib ; then
24414                         :
24415                 elif test -d "$cf_add_libdir"
24416                 then
24417                         cf_have_libdir=no
24418                         if test -n "$LDFLAGS$LIBS" ; then
24419                                 # a loop is needed to ensure we can add subdirs of existing dirs
24420                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24421                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24422                                                 cf_have_libdir=yes; break
24423                                         fi
24424                                 done
24425                         fi
24426                         if test "$cf_have_libdir" = no ; then
24427                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24428
24429 echo "${as_me:-configure}:24429: testing adding $cf_add_libdir to library-path ..." 1>&5
24430
24431                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24432                         fi
24433                 fi
24434         done
24435 fi
24436
24437                         ;;
24438                 esac
24439         done
24440
24441                         ;;
24442                 esac
24443         fi
24444 esac
24445
24446 echo "$as_me:24446: checking for db.h" >&5
24447 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24448 if test "${ac_cv_header_db_h+set}" = set; then
24449   echo $ECHO_N "(cached) $ECHO_C" >&6
24450 else
24451   cat >"conftest.$ac_ext" <<_ACEOF
24452 #line 24452 "configure"
24453 #include "confdefs.h"
24454 #include <db.h>
24455 _ACEOF
24456 if { (eval echo "$as_me:24456: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24457   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24458   ac_status=$?
24459   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24460   rm -f conftest.er1
24461   cat conftest.err >&5
24462   echo "$as_me:24462: \$? = $ac_status" >&5
24463   (exit "$ac_status"); } >/dev/null; then
24464   if test -s conftest.err; then
24465     ac_cpp_err=$ac_c_preproc_warn_flag
24466   else
24467     ac_cpp_err=
24468   fi
24469 else
24470   ac_cpp_err=yes
24471 fi
24472 if test -z "$ac_cpp_err"; then
24473   ac_cv_header_db_h=yes
24474 else
24475   echo "$as_me: failed program was:" >&5
24476   cat "conftest.$ac_ext" >&5
24477   ac_cv_header_db_h=no
24478 fi
24479 rm -f conftest.err "conftest.$ac_ext"
24480 fi
24481 echo "$as_me:24481: result: $ac_cv_header_db_h" >&5
24482 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24483 if test "$ac_cv_header_db_h" = yes; then
24484
24485 echo "$as_me:24485: checking for version of db" >&5
24486 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24487 if test "${cf_cv_hashed_db_version+set}" = set; then
24488   echo $ECHO_N "(cached) $ECHO_C" >&6
24489 else
24490
24491 cf_cv_hashed_db_version=unknown
24492
24493 for cf_db_version in 1 2 3 4 5 6
24494 do
24495
24496 echo "${as_me:-configure}:24496: testing checking for db version $cf_db_version ..." 1>&5
24497
24498         cat >"conftest.$ac_ext" <<_ACEOF
24499 #line 24499 "configure"
24500 #include "confdefs.h"
24501
24502 $ac_includes_default
24503 #include <db.h>
24504
24505 #ifdef DB_VERSION_MAJOR
24506         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24507 #if $cf_db_version == DB_VERSION_MAJOR
24508         /* ok */
24509 #else
24510         make an error
24511 #endif
24512 #else
24513 #if $cf_db_version == 1
24514         /* ok: assuming this is DB 1.8.5 */
24515 #else
24516         make an error
24517 #endif
24518 #endif
24519
24520 int
24521 main (void)
24522 {
24523 DBT *foo = 0
24524   ;
24525   return 0;
24526 }
24527 _ACEOF
24528 rm -f "conftest.$ac_objext"
24529 if { (eval echo "$as_me:24529: \"$ac_compile\"") >&5
24530   (eval $ac_compile) 2>&5
24531   ac_status=$?
24532   echo "$as_me:24532: \$? = $ac_status" >&5
24533   (exit "$ac_status"); } &&
24534          { ac_try='test -s "conftest.$ac_objext"'
24535   { (eval echo "$as_me:24535: \"$ac_try\"") >&5
24536   (eval $ac_try) 2>&5
24537   ac_status=$?
24538   echo "$as_me:24538: \$? = $ac_status" >&5
24539   (exit "$ac_status"); }; }; then
24540
24541         cf_cv_hashed_db_version=$cf_db_version
24542         break
24543
24544 else
24545   echo "$as_me: failed program was:" >&5
24546 cat "conftest.$ac_ext" >&5
24547 fi
24548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24549 done
24550
24551 fi
24552 echo "$as_me:24552: result: $cf_cv_hashed_db_version" >&5
24553 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24554
24555 if test "$cf_cv_hashed_db_version" = unknown ; then
24556         { { echo "$as_me:24556: error: Cannot determine version of db" >&5
24557 echo "$as_me: error: Cannot determine version of db" >&2;}
24558    { (exit 1); exit 1; }; }
24559 else
24560
24561 echo "$as_me:24561: checking for db libraries" >&5
24562 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24563 if test "${cf_cv_hashed_db_libs+set}" = set; then
24564   echo $ECHO_N "(cached) $ECHO_C" >&6
24565 else
24566
24567 cf_cv_hashed_db_libs=unknown
24568 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24569 do
24570         cf_save_libs="$LIBS"
24571         if test -n "$cf_db_libs"; then
24572
24573 cf_add_libs="$LIBS"
24574 # reverse order
24575 cf_add_0lib=
24576 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24577 # filter duplicates
24578 for cf_add_1lib in $cf_add_0lib; do
24579         for cf_add_2lib in $cf_add_libs; do
24580                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24581                         cf_add_1lib=
24582                         break
24583                 fi
24584         done
24585         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24586 done
24587 LIBS="$cf_add_libs"
24588
24589         fi
24590
24591 echo "${as_me:-configure}:24591: testing checking for library $cf_db_libs ..." 1>&5
24592
24593         cat >"conftest.$ac_ext" <<_ACEOF
24594 #line 24594 "configure"
24595 #include "confdefs.h"
24596
24597 $ac_includes_default
24598 #include <db.h>
24599
24600 int
24601 main (void)
24602 {
24603
24604         char *path = "/tmp/foo";
24605 #ifdef DB_VERSION_MAJOR
24606 #if DB_VERSION_MAJOR >= 4
24607         DB *result = 0;
24608         db_create(&result, NULL, 0);
24609         result->open(result,
24610                 NULL,
24611                 path,
24612                 path,
24613                 DB_HASH,
24614                 DB_CREATE,
24615                 0644);
24616 #elif DB_VERSION_MAJOR >= 3
24617         DB *result = 0;
24618         db_create(&result, NULL, 0);
24619         result->open(result,
24620                 path,
24621                 path,
24622                 DB_HASH,
24623                 DB_CREATE,
24624                 0644);
24625 #elif DB_VERSION_MAJOR >= 2
24626         DB *result = 0;
24627         db_open(path,
24628                 DB_HASH,
24629                 DB_CREATE,
24630                 0644,
24631                 (DB_ENV *) 0,
24632                 (DB_INFO *) 0,
24633                 &result);
24634 #endif /* DB_VERSION_MAJOR */
24635 #else
24636         DB *result = dbopen(path,
24637                      2,
24638                      0644,
24639                      DB_HASH,
24640                      0);
24641 #endif
24642         ${cf_cv_main_return:-return}(result != 0)
24643
24644   ;
24645   return 0;
24646 }
24647 _ACEOF
24648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24649 if { (eval echo "$as_me:24649: \"$ac_link\"") >&5
24650   (eval $ac_link) 2>&5
24651   ac_status=$?
24652   echo "$as_me:24652: \$? = $ac_status" >&5
24653   (exit "$ac_status"); } &&
24654          { ac_try='test -s "conftest$ac_exeext"'
24655   { (eval echo "$as_me:24655: \"$ac_try\"") >&5
24656   (eval $ac_try) 2>&5
24657   ac_status=$?
24658   echo "$as_me:24658: \$? = $ac_status" >&5
24659   (exit "$ac_status"); }; }; then
24660
24661         if test -n "$cf_db_libs" ; then
24662                 cf_cv_hashed_db_libs=$cf_db_libs
24663         else
24664                 cf_cv_hashed_db_libs=default
24665         fi
24666         LIBS="$cf_save_libs"
24667         break
24668
24669 else
24670   echo "$as_me: failed program was:" >&5
24671 cat "conftest.$ac_ext" >&5
24672 fi
24673 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24674         LIBS="$cf_save_libs"
24675 done
24676
24677 fi
24678 echo "$as_me:24678: result: $cf_cv_hashed_db_libs" >&5
24679 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24680
24681         if test "$cf_cv_hashed_db_libs" = unknown ; then
24682                 { { echo "$as_me:24682: error: Cannot determine library for db" >&5
24683 echo "$as_me: error: Cannot determine library for db" >&2;}
24684    { (exit 1); exit 1; }; }
24685         elif test "$cf_cv_hashed_db_libs" != default ; then
24686
24687 cf_add_libs="$LIBS"
24688 # reverse order
24689 cf_add_0lib=
24690 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24691 # filter duplicates
24692 for cf_add_1lib in $cf_add_0lib; do
24693         for cf_add_2lib in $cf_add_libs; do
24694                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24695                         cf_add_1lib=
24696                         break
24697                 fi
24698         done
24699         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24700 done
24701 LIBS="$cf_add_libs"
24702
24703         fi
24704 fi
24705
24706 else
24707
24708         { { echo "$as_me:24708: error: Cannot find db.h" >&5
24709 echo "$as_me: error: Cannot find db.h" >&2;}
24710    { (exit 1); exit 1; }; }
24711
24712 fi
24713
24714 fi
24715
24716 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24717         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24718         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24719 fi
24720
24721 # Just in case, check if the C compiler has a bool type.
24722
24723 echo "$as_me:24723: checking if we should include stdbool.h" >&5
24724 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24725
24726 if test "${cf_cv_header_stdbool_h+set}" = set; then
24727   echo $ECHO_N "(cached) $ECHO_C" >&6
24728 else
24729
24730         cat >"conftest.$ac_ext" <<_ACEOF
24731 #line 24731 "configure"
24732 #include "confdefs.h"
24733
24734 int
24735 main (void)
24736 {
24737 bool foo = false
24738   ;
24739   return 0;
24740 }
24741 _ACEOF
24742 rm -f "conftest.$ac_objext"
24743 if { (eval echo "$as_me:24743: \"$ac_compile\"") >&5
24744   (eval $ac_compile) 2>&5
24745   ac_status=$?
24746   echo "$as_me:24746: \$? = $ac_status" >&5
24747   (exit "$ac_status"); } &&
24748          { ac_try='test -s "conftest.$ac_objext"'
24749   { (eval echo "$as_me:24749: \"$ac_try\"") >&5
24750   (eval $ac_try) 2>&5
24751   ac_status=$?
24752   echo "$as_me:24752: \$? = $ac_status" >&5
24753   (exit "$ac_status"); }; }; then
24754   cf_cv_header_stdbool_h=0
24755 else
24756   echo "$as_me: failed program was:" >&5
24757 cat "conftest.$ac_ext" >&5
24758 cat >"conftest.$ac_ext" <<_ACEOF
24759 #line 24759 "configure"
24760 #include "confdefs.h"
24761
24762 #ifndef __BEOS__
24763 #include <stdbool.h>
24764 #endif
24765
24766 int
24767 main (void)
24768 {
24769 bool foo = false
24770   ;
24771   return 0;
24772 }
24773 _ACEOF
24774 rm -f "conftest.$ac_objext"
24775 if { (eval echo "$as_me:24775: \"$ac_compile\"") >&5
24776   (eval $ac_compile) 2>&5
24777   ac_status=$?
24778   echo "$as_me:24778: \$? = $ac_status" >&5
24779   (exit "$ac_status"); } &&
24780          { ac_try='test -s "conftest.$ac_objext"'
24781   { (eval echo "$as_me:24781: \"$ac_try\"") >&5
24782   (eval $ac_try) 2>&5
24783   ac_status=$?
24784   echo "$as_me:24784: \$? = $ac_status" >&5
24785   (exit "$ac_status"); }; }; then
24786   cf_cv_header_stdbool_h=1
24787 else
24788   echo "$as_me: failed program was:" >&5
24789 cat "conftest.$ac_ext" >&5
24790 cf_cv_header_stdbool_h=0
24791 fi
24792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24793 fi
24794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24795 fi
24796
24797 if test "$cf_cv_header_stdbool_h" = 1
24798 then    echo "$as_me:24798: result: yes" >&5
24799 echo "${ECHO_T}yes" >&6
24800 else    echo "$as_me:24800: result: no" >&5
24801 echo "${ECHO_T}no" >&6
24802 fi
24803
24804 echo "$as_me:24804: checking for builtin bool type" >&5
24805 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24806
24807 if test "${cf_cv_cc_bool_type+set}" = set; then
24808   echo $ECHO_N "(cached) $ECHO_C" >&6
24809 else
24810
24811         cat >"conftest.$ac_ext" <<_ACEOF
24812 #line 24812 "configure"
24813 #include "confdefs.h"
24814
24815 #include <stdio.h>
24816 #include <sys/types.h>
24817
24818 int
24819 main (void)
24820 {
24821 bool x = false
24822   ;
24823   return 0;
24824 }
24825 _ACEOF
24826 rm -f "conftest.$ac_objext"
24827 if { (eval echo "$as_me:24827: \"$ac_compile\"") >&5
24828   (eval $ac_compile) 2>&5
24829   ac_status=$?
24830   echo "$as_me:24830: \$? = $ac_status" >&5
24831   (exit "$ac_status"); } &&
24832          { ac_try='test -s "conftest.$ac_objext"'
24833   { (eval echo "$as_me:24833: \"$ac_try\"") >&5
24834   (eval $ac_try) 2>&5
24835   ac_status=$?
24836   echo "$as_me:24836: \$? = $ac_status" >&5
24837   (exit "$ac_status"); }; }; then
24838   cf_cv_cc_bool_type=1
24839 else
24840   echo "$as_me: failed program was:" >&5
24841 cat "conftest.$ac_ext" >&5
24842 cf_cv_cc_bool_type=0
24843 fi
24844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24845
24846 fi
24847
24848 if test "$cf_cv_cc_bool_type" = 1
24849 then    echo "$as_me:24849: result: yes" >&5
24850 echo "${ECHO_T}yes" >&6
24851 else    echo "$as_me:24851: result: no" >&5
24852 echo "${ECHO_T}no" >&6
24853 fi
24854
24855 # Check for C++ compiler characteristics (and ensure that it's there!)
24856 if test -n "$CXX" ; then
24857         ac_ext=cc
24858 ac_cpp='$CXXCPP $CPPFLAGS'
24859 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24860 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24861 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24862 ac_main_return="return"
24863
24864 if test -n "$GXX" ; then
24865
24866         cf_save="$LIBS"
24867         LIBS="$LIBS $CXXLIBS"
24868         echo "$as_me:24868: checking if we already have C++ library" >&5
24869 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24870         cat >"conftest.$ac_ext" <<_ACEOF
24871 #line 24871 "configure"
24872 #include "confdefs.h"
24873
24874                         #include <iostream>
24875 int
24876 main (void)
24877 {
24878
24879                         std::cout << "Hello World!" << std::endl;
24880   ;
24881   return 0;
24882 }
24883 _ACEOF
24884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24885 if { (eval echo "$as_me:24885: \"$ac_link\"") >&5
24886   (eval $ac_link) 2>&5
24887   ac_status=$?
24888   echo "$as_me:24888: \$? = $ac_status" >&5
24889   (exit "$ac_status"); } &&
24890          { ac_try='test -s "conftest$ac_exeext"'
24891   { (eval echo "$as_me:24891: \"$ac_try\"") >&5
24892   (eval $ac_try) 2>&5
24893   ac_status=$?
24894   echo "$as_me:24894: \$? = $ac_status" >&5
24895   (exit "$ac_status"); }; }; then
24896   cf_have_libstdcpp=yes
24897 else
24898   echo "$as_me: failed program was:" >&5
24899 cat "conftest.$ac_ext" >&5
24900 cf_have_libstdcpp=no
24901 fi
24902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24903         echo "$as_me:24903: result: $cf_have_libstdcpp" >&5
24904 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24905         LIBS="$cf_save"
24906
24907         if test "$cf_have_libstdcpp" != yes
24908         then
24909                 case "$cf_cv_system_name" in
24910                 (os2*)
24911                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24912                                 cf_stdcpp_libname=stdcpp
24913                         else
24914                                 cf_stdcpp_libname=stdc++
24915                         fi
24916                         ;;
24917                 (*)
24918                         cf_stdcpp_libname=stdc++
24919                         ;;
24920                 esac
24921
24922                 echo "$as_me:24922: checking for library $cf_stdcpp_libname" >&5
24923 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24924 if test "${cf_cv_libstdcpp+set}" = set; then
24925   echo $ECHO_N "(cached) $ECHO_C" >&6
24926 else
24927
24928                         cf_save="$LIBS"
24929                         LIBS="$LIBS $CXXLIBS"
24930
24931 cf_add_libs="$LIBS"
24932 # reverse order
24933 cf_add_0lib=
24934 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24935 # filter duplicates
24936 for cf_add_1lib in $cf_add_0lib; do
24937         for cf_add_2lib in $cf_add_libs; do
24938                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24939                         cf_add_1lib=
24940                         break
24941                 fi
24942         done
24943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24944 done
24945 LIBS="$cf_add_libs"
24946
24947                 cat >"conftest.$ac_ext" <<_ACEOF
24948 #line 24948 "configure"
24949 #include "confdefs.h"
24950
24951                                 #include <iostream>
24952 int
24953 main (void)
24954 {
24955
24956                                 std::cout << "Hello World!" << std::endl;
24957   ;
24958   return 0;
24959 }
24960 _ACEOF
24961 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24962 if { (eval echo "$as_me:24962: \"$ac_link\"") >&5
24963   (eval $ac_link) 2>&5
24964   ac_status=$?
24965   echo "$as_me:24965: \$? = $ac_status" >&5
24966   (exit "$ac_status"); } &&
24967          { ac_try='test -s "conftest$ac_exeext"'
24968   { (eval echo "$as_me:24968: \"$ac_try\"") >&5
24969   (eval $ac_try) 2>&5
24970   ac_status=$?
24971   echo "$as_me:24971: \$? = $ac_status" >&5
24972   (exit "$ac_status"); }; }; then
24973   cf_cv_libstdcpp=yes
24974 else
24975   echo "$as_me: failed program was:" >&5
24976 cat "conftest.$ac_ext" >&5
24977 cf_cv_libstdcpp=no
24978 fi
24979 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24980                         LIBS="$cf_save"
24981
24982 fi
24983 echo "$as_me:24983: result: $cf_cv_libstdcpp" >&5
24984 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24985                 test "$cf_cv_libstdcpp" = yes && {
24986 cf_add_libs="$CXXLIBS"
24987 # reverse order
24988 cf_add_0lib=
24989 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24990 # filter duplicates
24991 for cf_add_1lib in $cf_add_0lib; do
24992         for cf_add_2lib in $cf_add_libs; do
24993                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24994                         cf_add_1lib=
24995                         break
24996                 fi
24997         done
24998         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24999 done
25000 CXXLIBS="$cf_add_libs"
25001  }
25002         fi
25003 fi
25004
25005         echo "$as_me:25005: checking whether $CXX understands -c and -o together" >&5
25006 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25007 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25008   echo $ECHO_N "(cached) $ECHO_C" >&6
25009 else
25010
25011 cat > conftest.$ac_ext <<CF_EOF
25012 int main(void)
25013 {
25014         ${cf_cv_main_return:-return}(0);
25015 }
25016 CF_EOF
25017 # We do the test twice because some compilers refuse to overwrite an
25018 # existing .o file with -o, though they will create one.
25019 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25020 if { (eval echo "$as_me:25020: \"$ac_try\"") >&5
25021   (eval $ac_try) 2>&5
25022   ac_status=$?
25023   echo "$as_me:25023: \$? = $ac_status" >&5
25024   (exit "$ac_status"); } &&
25025   test -f conftest2.$ac_objext && { (eval echo "$as_me:25025: \"$ac_try\"") >&5
25026   (eval $ac_try) 2>&5
25027   ac_status=$?
25028   echo "$as_me:25028: \$? = $ac_status" >&5
25029   (exit "$ac_status"); };
25030 then
25031   eval cf_cv_prog_CXX_c_o=yes
25032 else
25033   eval cf_cv_prog_CXX_c_o=no
25034 fi
25035 rm -rf ./conftest*
25036
25037 fi
25038 if test "$cf_cv_prog_CXX_c_o" = yes; then
25039   echo "$as_me:25039: result: yes" >&5
25040 echo "${ECHO_T}yes" >&6
25041 else
25042   echo "$as_me:25042: result: no" >&5
25043 echo "${ECHO_T}no" >&6
25044 fi
25045
25046         case "$GXX_VERSION" in
25047         (1.*|2.[0-6]*|[1-9][0-9].*)
25048                 cf_cxx_library=yes
25049                 ;;
25050         (*-2.7*|2.7*)
25051
25052 cf_cxx_library=unknown
25053 case "$cf_cv_system_name" in
25054 (os2*)
25055         cf_gpp_libname=gpp
25056         ;;
25057 (*)
25058         cf_gpp_libname=g++
25059         ;;
25060 esac
25061 if test "$GXX" = yes; then
25062         echo "$as_me:25062: checking for lib$cf_gpp_libname" >&5
25063 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25064         cf_save="$LIBS"
25065
25066 cf_add_libs="$LIBS"
25067 # reverse order
25068 cf_add_0lib=
25069 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25070 # filter duplicates
25071 for cf_add_1lib in $cf_add_0lib; do
25072         for cf_add_2lib in $cf_add_libs; do
25073                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25074                         cf_add_1lib=
25075                         break
25076                 fi
25077         done
25078         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25079 done
25080 LIBS="$cf_add_libs"
25081
25082         cat >"conftest.$ac_ext" <<_ACEOF
25083 #line 25083 "configure"
25084 #include "confdefs.h"
25085
25086 #include <$cf_gpp_libname/builtin.h>
25087
25088 int
25089 main (void)
25090 {
25091 two_arg_error_handler_t foo2 = lib_error_handler
25092   ;
25093   return 0;
25094 }
25095 _ACEOF
25096 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25097 if { (eval echo "$as_me:25097: \"$ac_link\"") >&5
25098   (eval $ac_link) 2>&5
25099   ac_status=$?
25100   echo "$as_me:25100: \$? = $ac_status" >&5
25101   (exit "$ac_status"); } &&
25102          { ac_try='test -s "conftest$ac_exeext"'
25103   { (eval echo "$as_me:25103: \"$ac_try\"") >&5
25104   (eval $ac_try) 2>&5
25105   ac_status=$?
25106   echo "$as_me:25106: \$? = $ac_status" >&5
25107   (exit "$ac_status"); }; }; then
25108   cf_cxx_library=yes
25109
25110 cf_add_libs="$CXXLIBS"
25111 # reverse order
25112 cf_add_0lib=
25113 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25114 # filter duplicates
25115 for cf_add_1lib in $cf_add_0lib; do
25116         for cf_add_2lib in $cf_add_libs; do
25117                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25118                         cf_add_1lib=
25119                         break
25120                 fi
25121         done
25122         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25123 done
25124 CXXLIBS="$cf_add_libs"
25125
25126          if test "$cf_gpp_libname" = cpp ; then
25127
25128 cat >>confdefs.h <<\EOF
25129 #define HAVE_GPP_BUILTIN_H 1
25130 EOF
25131
25132          else
25133
25134 cat >>confdefs.h <<\EOF
25135 #define HAVE_GXX_BUILTIN_H 1
25136 EOF
25137
25138          fi
25139 else
25140   echo "$as_me: failed program was:" >&5
25141 cat "conftest.$ac_ext" >&5
25142 cat >"conftest.$ac_ext" <<_ACEOF
25143 #line 25143 "configure"
25144 #include "confdefs.h"
25145
25146 #include <builtin.h>
25147
25148 int
25149 main (void)
25150 {
25151 two_arg_error_handler_t foo2 = lib_error_handler
25152   ;
25153   return 0;
25154 }
25155 _ACEOF
25156 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25157 if { (eval echo "$as_me:25157: \"$ac_link\"") >&5
25158   (eval $ac_link) 2>&5
25159   ac_status=$?
25160   echo "$as_me:25160: \$? = $ac_status" >&5
25161   (exit "$ac_status"); } &&
25162          { ac_try='test -s "conftest$ac_exeext"'
25163   { (eval echo "$as_me:25163: \"$ac_try\"") >&5
25164   (eval $ac_try) 2>&5
25165   ac_status=$?
25166   echo "$as_me:25166: \$? = $ac_status" >&5
25167   (exit "$ac_status"); }; }; then
25168   cf_cxx_library=yes
25169
25170 cf_add_libs="$CXXLIBS"
25171 # reverse order
25172 cf_add_0lib=
25173 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25174 # filter duplicates
25175 for cf_add_1lib in $cf_add_0lib; do
25176         for cf_add_2lib in $cf_add_libs; do
25177                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25178                         cf_add_1lib=
25179                         break
25180                 fi
25181         done
25182         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25183 done
25184 CXXLIBS="$cf_add_libs"
25185
25186 cat >>confdefs.h <<\EOF
25187 #define HAVE_BUILTIN_H 1
25188 EOF
25189
25190 else
25191   echo "$as_me: failed program was:" >&5
25192 cat "conftest.$ac_ext" >&5
25193 cf_cxx_library=no
25194 fi
25195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25196 fi
25197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25198         LIBS="$cf_save"
25199         echo "$as_me:25199: result: $cf_cxx_library" >&5
25200 echo "${ECHO_T}$cf_cxx_library" >&6
25201 fi
25202
25203                 ;;
25204         (*)
25205                 cf_cxx_library=no
25206                 ;;
25207         esac
25208
25209         ac_ext=cc
25210 ac_cpp='$CXXCPP $CPPFLAGS'
25211 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25212 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25213 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25214 ac_main_return="return"
25215 echo "$as_me:25215: checking how to run the C++ preprocessor" >&5
25216 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25217 if test -z "$CXXCPP"; then
25218   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25219   echo $ECHO_N "(cached) $ECHO_C" >&6
25220 else
25221       # Double quotes because CXXCPP needs to be expanded
25222     for CXXCPP in "$CXX -E" "/lib/cpp"
25223     do
25224       ac_preproc_ok=false
25225 for ac_cxx_preproc_warn_flag in '' yes
25226 do
25227   # Use a header file that comes with gcc, so configuring glibc
25228   # with a fresh cross-compiler works.
25229   # On the NeXT, cc -E runs the code through the compiler's parser,
25230   # not just through cpp. "Syntax error" is here to catch this case.
25231   cat >"conftest.$ac_ext" <<_ACEOF
25232 #line 25232 "configure"
25233 #include "confdefs.h"
25234 #include <assert.h>
25235                      Syntax error
25236 _ACEOF
25237 if { (eval echo "$as_me:25237: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25238   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25239   ac_status=$?
25240   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25241   rm -f conftest.er1
25242   cat conftest.err >&5
25243   echo "$as_me:25243: \$? = $ac_status" >&5
25244   (exit "$ac_status"); } >/dev/null; then
25245   if test -s conftest.err; then
25246     ac_cpp_err=$ac_cxx_preproc_warn_flag
25247   else
25248     ac_cpp_err=
25249   fi
25250 else
25251   ac_cpp_err=yes
25252 fi
25253 if test -z "$ac_cpp_err"; then
25254   :
25255 else
25256   echo "$as_me: failed program was:" >&5
25257   cat "conftest.$ac_ext" >&5
25258   # Broken: fails on valid input.
25259 continue
25260 fi
25261 rm -f conftest.err "conftest.$ac_ext"
25262
25263   # OK, works on sane cases.  Now check whether non-existent headers
25264   # can be detected and how.
25265   cat >"conftest.$ac_ext" <<_ACEOF
25266 #line 25266 "configure"
25267 #include "confdefs.h"
25268 #include <ac_nonexistent.h>
25269 _ACEOF
25270 if { (eval echo "$as_me:25270: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25271   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25272   ac_status=$?
25273   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25274   rm -f conftest.er1
25275   cat conftest.err >&5
25276   echo "$as_me:25276: \$? = $ac_status" >&5
25277   (exit "$ac_status"); } >/dev/null; then
25278   if test -s conftest.err; then
25279     ac_cpp_err=$ac_cxx_preproc_warn_flag
25280   else
25281     ac_cpp_err=
25282   fi
25283 else
25284   ac_cpp_err=yes
25285 fi
25286 if test -z "$ac_cpp_err"; then
25287   # Broken: success on invalid input.
25288 continue
25289 else
25290   echo "$as_me: failed program was:" >&5
25291   cat "conftest.$ac_ext" >&5
25292   # Passes both tests.
25293 ac_preproc_ok=:
25294 break
25295 fi
25296 rm -f conftest.err "conftest.$ac_ext"
25297
25298 done
25299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25300 rm -f conftest.err "conftest.$ac_ext"
25301 if $ac_preproc_ok; then
25302   break
25303 fi
25304
25305     done
25306     ac_cv_prog_CXXCPP=$CXXCPP
25307
25308 fi
25309   CXXCPP=$ac_cv_prog_CXXCPP
25310 else
25311   ac_cv_prog_CXXCPP=$CXXCPP
25312 fi
25313 echo "$as_me:25313: result: $CXXCPP" >&5
25314 echo "${ECHO_T}$CXXCPP" >&6
25315 ac_preproc_ok=false
25316 for ac_cxx_preproc_warn_flag in '' yes
25317 do
25318   # Use a header file that comes with gcc, so configuring glibc
25319   # with a fresh cross-compiler works.
25320   # On the NeXT, cc -E runs the code through the compiler's parser,
25321   # not just through cpp. "Syntax error" is here to catch this case.
25322   cat >"conftest.$ac_ext" <<_ACEOF
25323 #line 25323 "configure"
25324 #include "confdefs.h"
25325 #include <assert.h>
25326                      Syntax error
25327 _ACEOF
25328 if { (eval echo "$as_me:25328: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25329   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25330   ac_status=$?
25331   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25332   rm -f conftest.er1
25333   cat conftest.err >&5
25334   echo "$as_me:25334: \$? = $ac_status" >&5
25335   (exit "$ac_status"); } >/dev/null; then
25336   if test -s conftest.err; then
25337     ac_cpp_err=$ac_cxx_preproc_warn_flag
25338   else
25339     ac_cpp_err=
25340   fi
25341 else
25342   ac_cpp_err=yes
25343 fi
25344 if test -z "$ac_cpp_err"; then
25345   :
25346 else
25347   echo "$as_me: failed program was:" >&5
25348   cat "conftest.$ac_ext" >&5
25349   # Broken: fails on valid input.
25350 continue
25351 fi
25352 rm -f conftest.err "conftest.$ac_ext"
25353
25354   # OK, works on sane cases.  Now check whether non-existent headers
25355   # can be detected and how.
25356   cat >"conftest.$ac_ext" <<_ACEOF
25357 #line 25357 "configure"
25358 #include "confdefs.h"
25359 #include <ac_nonexistent.h>
25360 _ACEOF
25361 if { (eval echo "$as_me:25361: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25362   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25363   ac_status=$?
25364   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25365   rm -f conftest.er1
25366   cat conftest.err >&5
25367   echo "$as_me:25367: \$? = $ac_status" >&5
25368   (exit "$ac_status"); } >/dev/null; then
25369   if test -s conftest.err; then
25370     ac_cpp_err=$ac_cxx_preproc_warn_flag
25371   else
25372     ac_cpp_err=
25373   fi
25374 else
25375   ac_cpp_err=yes
25376 fi
25377 if test -z "$ac_cpp_err"; then
25378   # Broken: success on invalid input.
25379 continue
25380 else
25381   echo "$as_me: failed program was:" >&5
25382   cat "conftest.$ac_ext" >&5
25383   # Passes both tests.
25384 ac_preproc_ok=:
25385 break
25386 fi
25387 rm -f conftest.err "conftest.$ac_ext"
25388
25389 done
25390 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25391 rm -f conftest.err "conftest.$ac_ext"
25392 if $ac_preproc_ok; then
25393   :
25394 else
25395   { { echo "$as_me:25395: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25396 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25397    { (exit 1); exit 1; }; }
25398 fi
25399
25400 ac_ext=cc
25401 ac_cpp='$CXXCPP $CPPFLAGS'
25402 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25403 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25404 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25405 ac_main_return="return"
25406
25407 for ac_header in typeinfo
25408 do
25409 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25410 echo "$as_me:25410: checking for $ac_header" >&5
25411 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25413   echo $ECHO_N "(cached) $ECHO_C" >&6
25414 else
25415   cat >"conftest.$ac_ext" <<_ACEOF
25416 #line 25416 "configure"
25417 #include "confdefs.h"
25418 #include <$ac_header>
25419 _ACEOF
25420 if { (eval echo "$as_me:25420: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25421   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25422   ac_status=$?
25423   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25424   rm -f conftest.er1
25425   cat conftest.err >&5
25426   echo "$as_me:25426: \$? = $ac_status" >&5
25427   (exit "$ac_status"); } >/dev/null; then
25428   if test -s conftest.err; then
25429     ac_cpp_err=$ac_cxx_preproc_warn_flag
25430   else
25431     ac_cpp_err=
25432   fi
25433 else
25434   ac_cpp_err=yes
25435 fi
25436 if test -z "$ac_cpp_err"; then
25437   eval "$as_ac_Header=yes"
25438 else
25439   echo "$as_me: failed program was:" >&5
25440   cat "conftest.$ac_ext" >&5
25441   eval "$as_ac_Header=no"
25442 fi
25443 rm -f conftest.err "conftest.$ac_ext"
25444 fi
25445 echo "$as_me:25445: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25446 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25447 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25448   cat >>confdefs.h <<EOF
25449 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25450 EOF
25451
25452 fi
25453 done
25454
25455 for ac_header in iostream
25456 do
25457 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25458 echo "$as_me:25458: checking for $ac_header" >&5
25459 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25460 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25461   echo $ECHO_N "(cached) $ECHO_C" >&6
25462 else
25463   cat >"conftest.$ac_ext" <<_ACEOF
25464 #line 25464 "configure"
25465 #include "confdefs.h"
25466 #include <$ac_header>
25467 _ACEOF
25468 if { (eval echo "$as_me:25468: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25469   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25470   ac_status=$?
25471   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25472   rm -f conftest.er1
25473   cat conftest.err >&5
25474   echo "$as_me:25474: \$? = $ac_status" >&5
25475   (exit "$ac_status"); } >/dev/null; then
25476   if test -s conftest.err; then
25477     ac_cpp_err=$ac_cxx_preproc_warn_flag
25478   else
25479     ac_cpp_err=
25480   fi
25481 else
25482   ac_cpp_err=yes
25483 fi
25484 if test -z "$ac_cpp_err"; then
25485   eval "$as_ac_Header=yes"
25486 else
25487   echo "$as_me: failed program was:" >&5
25488   cat "conftest.$ac_ext" >&5
25489   eval "$as_ac_Header=no"
25490 fi
25491 rm -f conftest.err "conftest.$ac_ext"
25492 fi
25493 echo "$as_me:25493: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25494 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25495 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25496   cat >>confdefs.h <<EOF
25497 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25498 EOF
25499
25500 fi
25501 done
25502
25503 if test x"$ac_cv_header_iostream" = xyes ; then
25504         echo "$as_me:25504: checking if iostream uses std-namespace" >&5
25505 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25506         cat >"conftest.$ac_ext" <<_ACEOF
25507 #line 25507 "configure"
25508 #include "confdefs.h"
25509
25510 #include <iostream>
25511 using std::endl;
25512 using std::cerr;
25513 int
25514 main (void)
25515 {
25516
25517 cerr << "testing" << endl;
25518
25519   ;
25520   return 0;
25521 }
25522 _ACEOF
25523 rm -f "conftest.$ac_objext"
25524 if { (eval echo "$as_me:25524: \"$ac_compile\"") >&5
25525   (eval $ac_compile) 2>&5
25526   ac_status=$?
25527   echo "$as_me:25527: \$? = $ac_status" >&5
25528   (exit "$ac_status"); } &&
25529          { ac_try='test -s "conftest.$ac_objext"'
25530   { (eval echo "$as_me:25530: \"$ac_try\"") >&5
25531   (eval $ac_try) 2>&5
25532   ac_status=$?
25533   echo "$as_me:25533: \$? = $ac_status" >&5
25534   (exit "$ac_status"); }; }; then
25535   cf_iostream_namespace=yes
25536 else
25537   echo "$as_me: failed program was:" >&5
25538 cat "conftest.$ac_ext" >&5
25539 cf_iostream_namespace=no
25540 fi
25541 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25542         echo "$as_me:25542: result: $cf_iostream_namespace" >&5
25543 echo "${ECHO_T}$cf_iostream_namespace" >&6
25544         if test "$cf_iostream_namespace" = yes ; then
25545
25546 cat >>confdefs.h <<\EOF
25547 #define IOSTREAM_NAMESPACE 1
25548 EOF
25549
25550         fi
25551 fi
25552
25553 echo "$as_me:25553: checking if we should include stdbool.h" >&5
25554 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25555
25556 if test "${cf_cv_header_stdbool_h+set}" = set; then
25557   echo $ECHO_N "(cached) $ECHO_C" >&6
25558 else
25559
25560         cat >"conftest.$ac_ext" <<_ACEOF
25561 #line 25561 "configure"
25562 #include "confdefs.h"
25563
25564 int
25565 main (void)
25566 {
25567 bool foo = false
25568   ;
25569   return 0;
25570 }
25571 _ACEOF
25572 rm -f "conftest.$ac_objext"
25573 if { (eval echo "$as_me:25573: \"$ac_compile\"") >&5
25574   (eval $ac_compile) 2>&5
25575   ac_status=$?
25576   echo "$as_me:25576: \$? = $ac_status" >&5
25577   (exit "$ac_status"); } &&
25578          { ac_try='test -s "conftest.$ac_objext"'
25579   { (eval echo "$as_me:25579: \"$ac_try\"") >&5
25580   (eval $ac_try) 2>&5
25581   ac_status=$?
25582   echo "$as_me:25582: \$? = $ac_status" >&5
25583   (exit "$ac_status"); }; }; then
25584   cf_cv_header_stdbool_h=0
25585 else
25586   echo "$as_me: failed program was:" >&5
25587 cat "conftest.$ac_ext" >&5
25588 cat >"conftest.$ac_ext" <<_ACEOF
25589 #line 25589 "configure"
25590 #include "confdefs.h"
25591
25592 #ifndef __BEOS__
25593 #include <stdbool.h>
25594 #endif
25595
25596 int
25597 main (void)
25598 {
25599 bool foo = false
25600   ;
25601   return 0;
25602 }
25603 _ACEOF
25604 rm -f "conftest.$ac_objext"
25605 if { (eval echo "$as_me:25605: \"$ac_compile\"") >&5
25606   (eval $ac_compile) 2>&5
25607   ac_status=$?
25608   echo "$as_me:25608: \$? = $ac_status" >&5
25609   (exit "$ac_status"); } &&
25610          { ac_try='test -s "conftest.$ac_objext"'
25611   { (eval echo "$as_me:25611: \"$ac_try\"") >&5
25612   (eval $ac_try) 2>&5
25613   ac_status=$?
25614   echo "$as_me:25614: \$? = $ac_status" >&5
25615   (exit "$ac_status"); }; }; then
25616   cf_cv_header_stdbool_h=1
25617 else
25618   echo "$as_me: failed program was:" >&5
25619 cat "conftest.$ac_ext" >&5
25620 cf_cv_header_stdbool_h=0
25621 fi
25622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25623 fi
25624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25625 fi
25626
25627 if test "$cf_cv_header_stdbool_h" = 1
25628 then    echo "$as_me:25628: result: yes" >&5
25629 echo "${ECHO_T}yes" >&6
25630 else    echo "$as_me:25630: result: no" >&5
25631 echo "${ECHO_T}no" >&6
25632 fi
25633
25634 echo "$as_me:25634: checking for builtin bool type" >&5
25635 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25636
25637 if test "${cf_cv_builtin_bool+set}" = set; then
25638   echo $ECHO_N "(cached) $ECHO_C" >&6
25639 else
25640
25641         cat >"conftest.$ac_ext" <<_ACEOF
25642 #line 25642 "configure"
25643 #include "confdefs.h"
25644
25645 #include <stdio.h>
25646 #include <sys/types.h>
25647
25648 int
25649 main (void)
25650 {
25651 bool x = false
25652   ;
25653   return 0;
25654 }
25655 _ACEOF
25656 rm -f "conftest.$ac_objext"
25657 if { (eval echo "$as_me:25657: \"$ac_compile\"") >&5
25658   (eval $ac_compile) 2>&5
25659   ac_status=$?
25660   echo "$as_me:25660: \$? = $ac_status" >&5
25661   (exit "$ac_status"); } &&
25662          { ac_try='test -s "conftest.$ac_objext"'
25663   { (eval echo "$as_me:25663: \"$ac_try\"") >&5
25664   (eval $ac_try) 2>&5
25665   ac_status=$?
25666   echo "$as_me:25666: \$? = $ac_status" >&5
25667   (exit "$ac_status"); }; }; then
25668   cf_cv_builtin_bool=1
25669 else
25670   echo "$as_me: failed program was:" >&5
25671 cat "conftest.$ac_ext" >&5
25672 cf_cv_builtin_bool=0
25673 fi
25674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25675
25676 fi
25677
25678 if test "$cf_cv_builtin_bool" = 1
25679 then    echo "$as_me:25679: result: yes" >&5
25680 echo "${ECHO_T}yes" >&6
25681 else    echo "$as_me:25681: result: no" >&5
25682 echo "${ECHO_T}no" >&6
25683 fi
25684
25685 echo "$as_me:25685: checking for bool" >&5
25686 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25687 if test "${ac_cv_type_bool+set}" = set; then
25688   echo $ECHO_N "(cached) $ECHO_C" >&6
25689 else
25690   cat >"conftest.$ac_ext" <<_ACEOF
25691 #line 25691 "configure"
25692 #include "confdefs.h"
25693
25694 #include <stdlib.h>
25695 #include <stdio.h>
25696
25697 #if defined(__cplusplus)
25698
25699 #ifdef HAVE_GXX_BUILTIN_H
25700 #include <g++/builtin.h>
25701 #elif HAVE_GPP_BUILTIN_H
25702 #include <gpp/builtin.h>
25703 #elif HAVE_BUILTIN_H
25704 #include <builtin.h>
25705 #endif
25706
25707 #else
25708
25709 #if $cf_cv_header_stdbool_h
25710 #include <stdbool.h>
25711 #endif
25712
25713 #endif
25714
25715 int
25716 main (void)
25717 {
25718 if ((bool *) 0)
25719   return 0;
25720 if (sizeof (bool))
25721   return 0;
25722   ;
25723   return 0;
25724 }
25725 _ACEOF
25726 rm -f "conftest.$ac_objext"
25727 if { (eval echo "$as_me:25727: \"$ac_compile\"") >&5
25728   (eval $ac_compile) 2>&5
25729   ac_status=$?
25730   echo "$as_me:25730: \$? = $ac_status" >&5
25731   (exit "$ac_status"); } &&
25732          { ac_try='test -s "conftest.$ac_objext"'
25733   { (eval echo "$as_me:25733: \"$ac_try\"") >&5
25734   (eval $ac_try) 2>&5
25735   ac_status=$?
25736   echo "$as_me:25736: \$? = $ac_status" >&5
25737   (exit "$ac_status"); }; }; then
25738   ac_cv_type_bool=yes
25739 else
25740   echo "$as_me: failed program was:" >&5
25741 cat "conftest.$ac_ext" >&5
25742 ac_cv_type_bool=no
25743 fi
25744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25745 fi
25746 echo "$as_me:25746: result: $ac_cv_type_bool" >&5
25747 echo "${ECHO_T}$ac_cv_type_bool" >&6
25748
25749 echo "$as_me:25749: checking size of bool" >&5
25750 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25751 if test "${ac_cv_sizeof_bool+set}" = set; then
25752   echo $ECHO_N "(cached) $ECHO_C" >&6
25753 else
25754   if test "$ac_cv_type_bool" = yes; then
25755   if test "$cross_compiling" = yes; then
25756   # Depending upon the size, compute the lo and hi bounds.
25757 cat >"conftest.$ac_ext" <<_ACEOF
25758 #line 25758 "configure"
25759 #include "confdefs.h"
25760
25761 #include <stdlib.h>
25762 #include <stdio.h>
25763
25764 #if defined(__cplusplus)
25765
25766 #ifdef HAVE_GXX_BUILTIN_H
25767 #include <g++/builtin.h>
25768 #elif HAVE_GPP_BUILTIN_H
25769 #include <gpp/builtin.h>
25770 #elif HAVE_BUILTIN_H
25771 #include <builtin.h>
25772 #endif
25773
25774 #else
25775
25776 #if $cf_cv_header_stdbool_h
25777 #include <stdbool.h>
25778 #endif
25779
25780 #endif
25781
25782 int
25783 main (void)
25784 {
25785 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25786   ;
25787   return 0;
25788 }
25789 _ACEOF
25790 rm -f "conftest.$ac_objext"
25791 if { (eval echo "$as_me:25791: \"$ac_compile\"") >&5
25792   (eval $ac_compile) 2>&5
25793   ac_status=$?
25794   echo "$as_me:25794: \$? = $ac_status" >&5
25795   (exit "$ac_status"); } &&
25796          { ac_try='test -s "conftest.$ac_objext"'
25797   { (eval echo "$as_me:25797: \"$ac_try\"") >&5
25798   (eval $ac_try) 2>&5
25799   ac_status=$?
25800   echo "$as_me:25800: \$? = $ac_status" >&5
25801   (exit "$ac_status"); }; }; then
25802   ac_lo=0 ac_mid=0
25803   while :; do
25804     cat >"conftest.$ac_ext" <<_ACEOF
25805 #line 25805 "configure"
25806 #include "confdefs.h"
25807
25808 #include <stdlib.h>
25809 #include <stdio.h>
25810
25811 #if defined(__cplusplus)
25812
25813 #ifdef HAVE_GXX_BUILTIN_H
25814 #include <g++/builtin.h>
25815 #elif HAVE_GPP_BUILTIN_H
25816 #include <gpp/builtin.h>
25817 #elif HAVE_BUILTIN_H
25818 #include <builtin.h>
25819 #endif
25820
25821 #else
25822
25823 #if $cf_cv_header_stdbool_h
25824 #include <stdbool.h>
25825 #endif
25826
25827 #endif
25828
25829 int
25830 main (void)
25831 {
25832 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25833   ;
25834   return 0;
25835 }
25836 _ACEOF
25837 rm -f "conftest.$ac_objext"
25838 if { (eval echo "$as_me:25838: \"$ac_compile\"") >&5
25839   (eval $ac_compile) 2>&5
25840   ac_status=$?
25841   echo "$as_me:25841: \$? = $ac_status" >&5
25842   (exit "$ac_status"); } &&
25843          { ac_try='test -s "conftest.$ac_objext"'
25844   { (eval echo "$as_me:25844: \"$ac_try\"") >&5
25845   (eval $ac_try) 2>&5
25846   ac_status=$?
25847   echo "$as_me:25847: \$? = $ac_status" >&5
25848   (exit "$ac_status"); }; }; then
25849   ac_hi=$ac_mid; break
25850 else
25851   echo "$as_me: failed program was:" >&5
25852 cat "conftest.$ac_ext" >&5
25853 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25854 fi
25855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25856   done
25857 else
25858   echo "$as_me: failed program was:" >&5
25859 cat "conftest.$ac_ext" >&5
25860 ac_hi=-1 ac_mid=-1
25861   while :; do
25862     cat >"conftest.$ac_ext" <<_ACEOF
25863 #line 25863 "configure"
25864 #include "confdefs.h"
25865
25866 #include <stdlib.h>
25867 #include <stdio.h>
25868
25869 #if defined(__cplusplus)
25870
25871 #ifdef HAVE_GXX_BUILTIN_H
25872 #include <g++/builtin.h>
25873 #elif HAVE_GPP_BUILTIN_H
25874 #include <gpp/builtin.h>
25875 #elif HAVE_BUILTIN_H
25876 #include <builtin.h>
25877 #endif
25878
25879 #else
25880
25881 #if $cf_cv_header_stdbool_h
25882 #include <stdbool.h>
25883 #endif
25884
25885 #endif
25886
25887 int
25888 main (void)
25889 {
25890 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25891   ;
25892   return 0;
25893 }
25894 _ACEOF
25895 rm -f "conftest.$ac_objext"
25896 if { (eval echo "$as_me:25896: \"$ac_compile\"") >&5
25897   (eval $ac_compile) 2>&5
25898   ac_status=$?
25899   echo "$as_me:25899: \$? = $ac_status" >&5
25900   (exit "$ac_status"); } &&
25901          { ac_try='test -s "conftest.$ac_objext"'
25902   { (eval echo "$as_me:25902: \"$ac_try\"") >&5
25903   (eval $ac_try) 2>&5
25904   ac_status=$?
25905   echo "$as_me:25905: \$? = $ac_status" >&5
25906   (exit "$ac_status"); }; }; then
25907   ac_lo=$ac_mid; break
25908 else
25909   echo "$as_me: failed program was:" >&5
25910 cat "conftest.$ac_ext" >&5
25911 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25912 fi
25913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25914   done
25915 fi
25916 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25917 # Binary search between lo and hi bounds.
25918 while test "x$ac_lo" != "x$ac_hi"; do
25919   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25920   cat >"conftest.$ac_ext" <<_ACEOF
25921 #line 25921 "configure"
25922 #include "confdefs.h"
25923
25924 #include <stdlib.h>
25925 #include <stdio.h>
25926
25927 #if defined(__cplusplus)
25928
25929 #ifdef HAVE_GXX_BUILTIN_H
25930 #include <g++/builtin.h>
25931 #elif HAVE_GPP_BUILTIN_H
25932 #include <gpp/builtin.h>
25933 #elif HAVE_BUILTIN_H
25934 #include <builtin.h>
25935 #endif
25936
25937 #else
25938
25939 #if $cf_cv_header_stdbool_h
25940 #include <stdbool.h>
25941 #endif
25942
25943 #endif
25944
25945 int
25946 main (void)
25947 {
25948 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25949   ;
25950   return 0;
25951 }
25952 _ACEOF
25953 rm -f "conftest.$ac_objext"
25954 if { (eval echo "$as_me:25954: \"$ac_compile\"") >&5
25955   (eval $ac_compile) 2>&5
25956   ac_status=$?
25957   echo "$as_me:25957: \$? = $ac_status" >&5
25958   (exit "$ac_status"); } &&
25959          { ac_try='test -s "conftest.$ac_objext"'
25960   { (eval echo "$as_me:25960: \"$ac_try\"") >&5
25961   (eval $ac_try) 2>&5
25962   ac_status=$?
25963   echo "$as_me:25963: \$? = $ac_status" >&5
25964   (exit "$ac_status"); }; }; then
25965   ac_hi=$ac_mid
25966 else
25967   echo "$as_me: failed program was:" >&5
25968 cat "conftest.$ac_ext" >&5
25969 ac_lo=`expr "$ac_mid" + 1`
25970 fi
25971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25972 done
25973 ac_cv_sizeof_bool=$ac_lo
25974 else
25975   if test "$cross_compiling" = yes; then
25976   { { echo "$as_me:25976: error: cannot run test program while cross compiling" >&5
25977 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25978    { (exit 1); exit 1; }; }
25979 else
25980   cat >"conftest.$ac_ext" <<_ACEOF
25981 #line 25981 "configure"
25982 #include "confdefs.h"
25983
25984 #include <stdlib.h>
25985 #include <stdio.h>
25986
25987 #if defined(__cplusplus)
25988
25989 #ifdef HAVE_GXX_BUILTIN_H
25990 #include <g++/builtin.h>
25991 #elif HAVE_GPP_BUILTIN_H
25992 #include <gpp/builtin.h>
25993 #elif HAVE_BUILTIN_H
25994 #include <builtin.h>
25995 #endif
25996
25997 #else
25998
25999 #if $cf_cv_header_stdbool_h
26000 #include <stdbool.h>
26001 #endif
26002
26003 #endif
26004
26005 int
26006 main (void)
26007 {
26008 FILE *f = fopen ("conftest.val", "w");
26009 if (!f)
26010   $ac_main_return (1);
26011 fprintf (f, "%ld", (long)(sizeof (bool)));
26012 fclose (f);
26013   ;
26014   return 0;
26015 }
26016 _ACEOF
26017 rm -f "conftest$ac_exeext"
26018 if { (eval echo "$as_me:26018: \"$ac_link\"") >&5
26019   (eval $ac_link) 2>&5
26020   ac_status=$?
26021   echo "$as_me:26021: \$? = $ac_status" >&5
26022   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26023   { (eval echo "$as_me:26023: \"$ac_try\"") >&5
26024   (eval $ac_try) 2>&5
26025   ac_status=$?
26026   echo "$as_me:26026: \$? = $ac_status" >&5
26027   (exit "$ac_status"); }; }; then
26028   ac_cv_sizeof_bool=`cat conftest.val`
26029 else
26030   echo "$as_me: program exited with status $ac_status" >&5
26031 echo "$as_me: failed program was:" >&5
26032 cat "conftest.$ac_ext" >&5
26033 fi
26034 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26035 fi
26036 fi
26037 rm -f conftest.val
26038 else
26039   ac_cv_sizeof_bool=0
26040 fi
26041 fi
26042 echo "$as_me:26042: result: $ac_cv_sizeof_bool" >&5
26043 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26044 cat >>confdefs.h <<EOF
26045 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26046 EOF
26047
26048 echo "$as_me:26048: checking for type of bool" >&5
26049 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26050 if test "${cf_cv_type_of_bool+set}" = set; then
26051   echo $ECHO_N "(cached) $ECHO_C" >&6
26052 else
26053
26054         rm -f cf_test.out
26055         if test "$cross_compiling" = yes; then
26056
26057                 case x$ac_cv_sizeof_bool in
26058                 (x1) cf_cv_type_of_bool="unsigned char";;
26059                 (x2) cf_cv_type_of_bool="unsigned short";;
26060                 (x4) cf_cv_type_of_bool="unsigned int";;
26061                 (x8) cf_cv_type_of_bool="unsigned long";;
26062                 (*)  cf_cv_type_of_bool=unknown;;
26063                 esac
26064
26065 else
26066   cat >"conftest.$ac_ext" <<_ACEOF
26067 #line 26067 "configure"
26068 #include "confdefs.h"
26069
26070 #include <stdlib.h>
26071 #include <stdio.h>
26072
26073 #if defined(__cplusplus)
26074
26075 #ifdef HAVE_GXX_BUILTIN_H
26076 #include <g++/builtin.h>
26077 #elif HAVE_GPP_BUILTIN_H
26078 #include <gpp/builtin.h>
26079 #elif HAVE_BUILTIN_H
26080 #include <builtin.h>
26081 #endif
26082
26083 #else
26084
26085 #if $cf_cv_header_stdbool_h
26086 #include <stdbool.h>
26087 #endif
26088
26089 #endif
26090
26091 int main(void)
26092 {
26093         FILE *fp = fopen("cf_test.out", "w");
26094         if (fp != 0) {
26095                 bool x = true;
26096                 if ((bool)(-x) >= 0)
26097                         fputs("unsigned ", fp);
26098                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26099                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26100                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26101                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26102                 fclose(fp);
26103         }
26104         ${cf_cv_main_return:-return}(0);
26105 }
26106
26107 _ACEOF
26108 rm -f "conftest$ac_exeext"
26109 if { (eval echo "$as_me:26109: \"$ac_link\"") >&5
26110   (eval $ac_link) 2>&5
26111   ac_status=$?
26112   echo "$as_me:26112: \$? = $ac_status" >&5
26113   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26114   { (eval echo "$as_me:26114: \"$ac_try\"") >&5
26115   (eval $ac_try) 2>&5
26116   ac_status=$?
26117   echo "$as_me:26117: \$? = $ac_status" >&5
26118   (exit "$ac_status"); }; }; then
26119   cf_cv_type_of_bool=`cat cf_test.out`
26120                  if test -z "$cf_cv_type_of_bool"; then
26121                    cf_cv_type_of_bool=unknown
26122                  fi
26123 else
26124   echo "$as_me: program exited with status $ac_status" >&5
26125 echo "$as_me: failed program was:" >&5
26126 cat "conftest.$ac_ext" >&5
26127 cf_cv_type_of_bool=unknown
26128 fi
26129 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26130 fi
26131         rm -f cf_test.out
26132
26133 fi
26134 echo "$as_me:26134: result: $cf_cv_type_of_bool" >&5
26135 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26136
26137 if test "$cf_cv_type_of_bool" = unknown ; then
26138         case .$NCURSES_BOOL in
26139         (.auto|.) NCURSES_BOOL=unsigned;;
26140         esac
26141         { echo "$as_me:26141: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26142 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26143         cf_cv_type_of_bool=$NCURSES_BOOL
26144 fi
26145
26146 echo "$as_me:26146: checking for special defines needed for etip.h" >&5
26147 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26148 cf_save_CXXFLAGS="$CXXFLAGS"
26149 cf_result="none"
26150
26151 # etip.h includes ncurses.h which includes ncurses_dll.h
26152 # But ncurses_dll.h is generated - fix here.
26153 test -d include || mkdir include
26154 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
26155
26156 for cf_math in "" MATH_H
26157 do
26158 for cf_excp in "" MATH_EXCEPTION
26159 do
26160         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26161         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26162         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26163 cat >"conftest.$ac_ext" <<_ACEOF
26164 #line 26164 "configure"
26165 #include "confdefs.h"
26166
26167 #include <etip.h.in>
26168
26169 int
26170 main (void)
26171 {
26172
26173   ;
26174   return 0;
26175 }
26176 _ACEOF
26177 rm -f "conftest.$ac_objext"
26178 if { (eval echo "$as_me:26178: \"$ac_compile\"") >&5
26179   (eval $ac_compile) 2>&5
26180   ac_status=$?
26181   echo "$as_me:26181: \$? = $ac_status" >&5
26182   (exit "$ac_status"); } &&
26183          { ac_try='test -s "conftest.$ac_objext"'
26184   { (eval echo "$as_me:26184: \"$ac_try\"") >&5
26185   (eval $ac_try) 2>&5
26186   ac_status=$?
26187   echo "$as_me:26187: \$? = $ac_status" >&5
26188   (exit "$ac_status"); }; }; then
26189
26190         test -n "$cf_math" && cat >>confdefs.h <<EOF
26191 #define ETIP_NEEDS_${cf_math} 1
26192 EOF
26193
26194         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26195 #define ETIP_NEEDS_${cf_excp} 1
26196 EOF
26197
26198         cf_result="$cf_math $cf_excp"
26199         break 2
26200
26201 else
26202   echo "$as_me: failed program was:" >&5
26203 cat "conftest.$ac_ext" >&5
26204 fi
26205 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26206 done
26207 done
26208 echo "$as_me:26208: result: $cf_result" >&5
26209 echo "${ECHO_T}$cf_result" >&6
26210 CXXFLAGS="$cf_save_CXXFLAGS"
26211
26212 if test -n "$CXX"; then
26213 echo "$as_me:26213: checking if $CXX accepts parameter initialization" >&5
26214 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26215 if test "${cf_cv_cpp_param_init+set}" = set; then
26216   echo $ECHO_N "(cached) $ECHO_C" >&6
26217 else
26218
26219         ac_ext=cc
26220 ac_cpp='$CXXCPP $CPPFLAGS'
26221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26222 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26224 ac_main_return="return"
26225
26226         if test "$cross_compiling" = yes; then
26227   cf_cv_cpp_param_init=unknown
26228 else
26229   cat >"conftest.$ac_ext" <<_ACEOF
26230 #line 26230 "configure"
26231 #include "confdefs.h"
26232
26233 class TEST {
26234 private:
26235         int value;
26236 public:
26237         TEST(int x = 1);
26238         ~TEST();
26239 };
26240
26241 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26242 {
26243         value = x;
26244 }
26245 int main(void) { }
26246
26247 _ACEOF
26248 rm -f "conftest$ac_exeext"
26249 if { (eval echo "$as_me:26249: \"$ac_link\"") >&5
26250   (eval $ac_link) 2>&5
26251   ac_status=$?
26252   echo "$as_me:26252: \$? = $ac_status" >&5
26253   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26254   { (eval echo "$as_me:26254: \"$ac_try\"") >&5
26255   (eval $ac_try) 2>&5
26256   ac_status=$?
26257   echo "$as_me:26257: \$? = $ac_status" >&5
26258   (exit "$ac_status"); }; }; then
26259   cf_cv_cpp_param_init=yes
26260 else
26261   echo "$as_me: program exited with status $ac_status" >&5
26262 echo "$as_me: failed program was:" >&5
26263 cat "conftest.$ac_ext" >&5
26264 cf_cv_cpp_param_init=no
26265 fi
26266 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26267 fi
26268         ac_ext=cc
26269 ac_cpp='$CXXCPP $CPPFLAGS'
26270 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26271 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26272 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26273 ac_main_return="return"
26274
26275 fi
26276 echo "$as_me:26276: result: $cf_cv_cpp_param_init" >&5
26277 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26278 fi
26279 test "$cf_cv_cpp_param_init" = yes &&
26280 cat >>confdefs.h <<\EOF
26281 #define CPP_HAS_PARAM_INIT 1
26282 EOF
26283
26284 if test -n "$CXX"; then
26285
26286 echo "$as_me:26286: checking if $CXX accepts static_cast" >&5
26287 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26288 if test "${cf_cv_cpp_static_cast+set}" = set; then
26289   echo $ECHO_N "(cached) $ECHO_C" >&6
26290 else
26291
26292         ac_ext=cc
26293 ac_cpp='$CXXCPP $CPPFLAGS'
26294 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26295 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26296 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26297 ac_main_return="return"
26298
26299         cat >"conftest.$ac_ext" <<_ACEOF
26300 #line 26300 "configure"
26301 #include "confdefs.h"
26302
26303 class NCursesPanel
26304 {
26305 public:
26306   NCursesPanel(int nlines,
26307                int ncols,
26308                int begin_y = 0,
26309                int begin_x = 0)
26310   {
26311   }
26312   NCursesPanel();
26313   ~NCursesPanel();
26314 };
26315
26316 template<class T> class NCursesUserPanel : public NCursesPanel
26317 {
26318 public:
26319   NCursesUserPanel (int nlines,
26320                     int ncols,
26321                     int begin_y = 0,
26322                     int begin_x = 0,
26323                     const T* p_UserData = static_cast<T*>(0))
26324     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26325   {
26326   };
26327   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26328   {
26329   };
26330
26331   virtual ~NCursesUserPanel() {};
26332 };
26333
26334 int
26335 main (void)
26336 {
26337
26338         const char* p_UserData = static_cast<char*>(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   cf_cv_cpp_static_cast=yes
26356 else
26357   echo "$as_me: failed program was:" >&5
26358 cat "conftest.$ac_ext" >&5
26359 cf_cv_cpp_static_cast=no
26360 fi
26361 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26362
26363         ac_ext=cc
26364 ac_cpp='$CXXCPP $CPPFLAGS'
26365 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26366 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26367 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26368 ac_main_return="return"
26369
26370 fi
26371 echo "$as_me:26371: result: $cf_cv_cpp_static_cast" >&5
26372 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26373
26374 fi
26375
26376 test "$cf_cv_cpp_static_cast" = yes &&
26377 cat >>confdefs.h <<\EOF
26378 #define CPP_HAS_STATIC_CAST 1
26379 EOF
26380
26381         CXX_AR='$(AR)'
26382         CXX_ARFLAGS='$(ARFLAGS)'
26383         case "$cf_cv_system_name" in
26384         (irix*)
26385             if test "$GXX" != yes ; then
26386                 CXX_AR='$(CXX)'
26387                 CXX_ARFLAGS='-ar -o'
26388             fi
26389             ;;
26390         (sco3.2v5*)
26391             CXXLDFLAGS="-u main"
26392             ;;
26393         (solaris2*)
26394             if test "$GXX" != yes ; then
26395                 CXX_AR='$(CXX)'
26396                 CXX_ARFLAGS='-xar -o'
26397             fi
26398             ;;
26399         esac
26400
26401 else
26402         cf_cxx_library=no
26403         cf_cv_builtin_bool=1
26404
26405         # Just because we are not configuring against C++ right now does not
26406         # mean that a user will not want to use C++.  Some distributors disable
26407         # the C++ portion of this configuration as a shortcut (or just to avoid
26408         # compiling the demo in the c++ directory).  So we need a reasonable
26409         # default for the 'bool' type.
26410         #
26411         # Caveat: since the storage of the bool type is not standardized, it
26412         # may change.
26413
26414         if test "$NCURSES_BOOL" != auto ; then
26415                 cf_cv_type_of_bool=$NCURSES_BOOL
26416                 cf_cv_header_stdbool_h=0
26417         else
26418                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26419
26420 echo "$as_me:26420: checking for bool" >&5
26421 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26422 if test "${ac_cv_type_bool+set}" = set; then
26423   echo $ECHO_N "(cached) $ECHO_C" >&6
26424 else
26425   cat >"conftest.$ac_ext" <<_ACEOF
26426 #line 26426 "configure"
26427 #include "confdefs.h"
26428
26429 #include <stdlib.h>
26430 #include <stdio.h>
26431
26432 #if defined(__cplusplus)
26433
26434 #ifdef HAVE_GXX_BUILTIN_H
26435 #include <g++/builtin.h>
26436 #elif HAVE_GPP_BUILTIN_H
26437 #include <gpp/builtin.h>
26438 #elif HAVE_BUILTIN_H
26439 #include <builtin.h>
26440 #endif
26441
26442 #else
26443
26444 #if $cf_cv_header_stdbool_h
26445 #include <stdbool.h>
26446 #endif
26447
26448 #endif
26449
26450 int
26451 main (void)
26452 {
26453 if ((bool *) 0)
26454   return 0;
26455 if (sizeof (bool))
26456   return 0;
26457   ;
26458   return 0;
26459 }
26460 _ACEOF
26461 rm -f "conftest.$ac_objext"
26462 if { (eval echo "$as_me:26462: \"$ac_compile\"") >&5
26463   (eval $ac_compile) 2>&5
26464   ac_status=$?
26465   echo "$as_me:26465: \$? = $ac_status" >&5
26466   (exit "$ac_status"); } &&
26467          { ac_try='test -s "conftest.$ac_objext"'
26468   { (eval echo "$as_me:26468: \"$ac_try\"") >&5
26469   (eval $ac_try) 2>&5
26470   ac_status=$?
26471   echo "$as_me:26471: \$? = $ac_status" >&5
26472   (exit "$ac_status"); }; }; then
26473   ac_cv_type_bool=yes
26474 else
26475   echo "$as_me: failed program was:" >&5
26476 cat "conftest.$ac_ext" >&5
26477 ac_cv_type_bool=no
26478 fi
26479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26480 fi
26481 echo "$as_me:26481: result: $ac_cv_type_bool" >&5
26482 echo "${ECHO_T}$ac_cv_type_bool" >&6
26483
26484 echo "$as_me:26484: checking size of bool" >&5
26485 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26486 if test "${ac_cv_sizeof_bool+set}" = set; then
26487   echo $ECHO_N "(cached) $ECHO_C" >&6
26488 else
26489   if test "$ac_cv_type_bool" = yes; then
26490   if test "$cross_compiling" = yes; then
26491   # Depending upon the size, compute the lo and hi bounds.
26492 cat >"conftest.$ac_ext" <<_ACEOF
26493 #line 26493 "configure"
26494 #include "confdefs.h"
26495
26496 #include <stdlib.h>
26497 #include <stdio.h>
26498
26499 #if defined(__cplusplus)
26500
26501 #ifdef HAVE_GXX_BUILTIN_H
26502 #include <g++/builtin.h>
26503 #elif HAVE_GPP_BUILTIN_H
26504 #include <gpp/builtin.h>
26505 #elif HAVE_BUILTIN_H
26506 #include <builtin.h>
26507 #endif
26508
26509 #else
26510
26511 #if $cf_cv_header_stdbool_h
26512 #include <stdbool.h>
26513 #endif
26514
26515 #endif
26516
26517 int
26518 main (void)
26519 {
26520 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26521   ;
26522   return 0;
26523 }
26524 _ACEOF
26525 rm -f "conftest.$ac_objext"
26526 if { (eval echo "$as_me:26526: \"$ac_compile\"") >&5
26527   (eval $ac_compile) 2>&5
26528   ac_status=$?
26529   echo "$as_me:26529: \$? = $ac_status" >&5
26530   (exit "$ac_status"); } &&
26531          { ac_try='test -s "conftest.$ac_objext"'
26532   { (eval echo "$as_me:26532: \"$ac_try\"") >&5
26533   (eval $ac_try) 2>&5
26534   ac_status=$?
26535   echo "$as_me:26535: \$? = $ac_status" >&5
26536   (exit "$ac_status"); }; }; then
26537   ac_lo=0 ac_mid=0
26538   while :; do
26539     cat >"conftest.$ac_ext" <<_ACEOF
26540 #line 26540 "configure"
26541 #include "confdefs.h"
26542
26543 #include <stdlib.h>
26544 #include <stdio.h>
26545
26546 #if defined(__cplusplus)
26547
26548 #ifdef HAVE_GXX_BUILTIN_H
26549 #include <g++/builtin.h>
26550 #elif HAVE_GPP_BUILTIN_H
26551 #include <gpp/builtin.h>
26552 #elif HAVE_BUILTIN_H
26553 #include <builtin.h>
26554 #endif
26555
26556 #else
26557
26558 #if $cf_cv_header_stdbool_h
26559 #include <stdbool.h>
26560 #endif
26561
26562 #endif
26563
26564 int
26565 main (void)
26566 {
26567 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26568   ;
26569   return 0;
26570 }
26571 _ACEOF
26572 rm -f "conftest.$ac_objext"
26573 if { (eval echo "$as_me:26573: \"$ac_compile\"") >&5
26574   (eval $ac_compile) 2>&5
26575   ac_status=$?
26576   echo "$as_me:26576: \$? = $ac_status" >&5
26577   (exit "$ac_status"); } &&
26578          { ac_try='test -s "conftest.$ac_objext"'
26579   { (eval echo "$as_me:26579: \"$ac_try\"") >&5
26580   (eval $ac_try) 2>&5
26581   ac_status=$?
26582   echo "$as_me:26582: \$? = $ac_status" >&5
26583   (exit "$ac_status"); }; }; then
26584   ac_hi=$ac_mid; break
26585 else
26586   echo "$as_me: failed program was:" >&5
26587 cat "conftest.$ac_ext" >&5
26588 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26589 fi
26590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26591   done
26592 else
26593   echo "$as_me: failed program was:" >&5
26594 cat "conftest.$ac_ext" >&5
26595 ac_hi=-1 ac_mid=-1
26596   while :; do
26597     cat >"conftest.$ac_ext" <<_ACEOF
26598 #line 26598 "configure"
26599 #include "confdefs.h"
26600
26601 #include <stdlib.h>
26602 #include <stdio.h>
26603
26604 #if defined(__cplusplus)
26605
26606 #ifdef HAVE_GXX_BUILTIN_H
26607 #include <g++/builtin.h>
26608 #elif HAVE_GPP_BUILTIN_H
26609 #include <gpp/builtin.h>
26610 #elif HAVE_BUILTIN_H
26611 #include <builtin.h>
26612 #endif
26613
26614 #else
26615
26616 #if $cf_cv_header_stdbool_h
26617 #include <stdbool.h>
26618 #endif
26619
26620 #endif
26621
26622 int
26623 main (void)
26624 {
26625 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26626   ;
26627   return 0;
26628 }
26629 _ACEOF
26630 rm -f "conftest.$ac_objext"
26631 if { (eval echo "$as_me:26631: \"$ac_compile\"") >&5
26632   (eval $ac_compile) 2>&5
26633   ac_status=$?
26634   echo "$as_me:26634: \$? = $ac_status" >&5
26635   (exit "$ac_status"); } &&
26636          { ac_try='test -s "conftest.$ac_objext"'
26637   { (eval echo "$as_me:26637: \"$ac_try\"") >&5
26638   (eval $ac_try) 2>&5
26639   ac_status=$?
26640   echo "$as_me:26640: \$? = $ac_status" >&5
26641   (exit "$ac_status"); }; }; then
26642   ac_lo=$ac_mid; break
26643 else
26644   echo "$as_me: failed program was:" >&5
26645 cat "conftest.$ac_ext" >&5
26646 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26647 fi
26648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26649   done
26650 fi
26651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26652 # Binary search between lo and hi bounds.
26653 while test "x$ac_lo" != "x$ac_hi"; do
26654   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26655   cat >"conftest.$ac_ext" <<_ACEOF
26656 #line 26656 "configure"
26657 #include "confdefs.h"
26658
26659 #include <stdlib.h>
26660 #include <stdio.h>
26661
26662 #if defined(__cplusplus)
26663
26664 #ifdef HAVE_GXX_BUILTIN_H
26665 #include <g++/builtin.h>
26666 #elif HAVE_GPP_BUILTIN_H
26667 #include <gpp/builtin.h>
26668 #elif HAVE_BUILTIN_H
26669 #include <builtin.h>
26670 #endif
26671
26672 #else
26673
26674 #if $cf_cv_header_stdbool_h
26675 #include <stdbool.h>
26676 #endif
26677
26678 #endif
26679
26680 int
26681 main (void)
26682 {
26683 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26684   ;
26685   return 0;
26686 }
26687 _ACEOF
26688 rm -f "conftest.$ac_objext"
26689 if { (eval echo "$as_me:26689: \"$ac_compile\"") >&5
26690   (eval $ac_compile) 2>&5
26691   ac_status=$?
26692   echo "$as_me:26692: \$? = $ac_status" >&5
26693   (exit "$ac_status"); } &&
26694          { ac_try='test -s "conftest.$ac_objext"'
26695   { (eval echo "$as_me:26695: \"$ac_try\"") >&5
26696   (eval $ac_try) 2>&5
26697   ac_status=$?
26698   echo "$as_me:26698: \$? = $ac_status" >&5
26699   (exit "$ac_status"); }; }; then
26700   ac_hi=$ac_mid
26701 else
26702   echo "$as_me: failed program was:" >&5
26703 cat "conftest.$ac_ext" >&5
26704 ac_lo=`expr "$ac_mid" + 1`
26705 fi
26706 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26707 done
26708 ac_cv_sizeof_bool=$ac_lo
26709 else
26710   if test "$cross_compiling" = yes; then
26711   { { echo "$as_me:26711: error: cannot run test program while cross compiling" >&5
26712 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26713    { (exit 1); exit 1; }; }
26714 else
26715   cat >"conftest.$ac_ext" <<_ACEOF
26716 #line 26716 "configure"
26717 #include "confdefs.h"
26718
26719 #include <stdlib.h>
26720 #include <stdio.h>
26721
26722 #if defined(__cplusplus)
26723
26724 #ifdef HAVE_GXX_BUILTIN_H
26725 #include <g++/builtin.h>
26726 #elif HAVE_GPP_BUILTIN_H
26727 #include <gpp/builtin.h>
26728 #elif HAVE_BUILTIN_H
26729 #include <builtin.h>
26730 #endif
26731
26732 #else
26733
26734 #if $cf_cv_header_stdbool_h
26735 #include <stdbool.h>
26736 #endif
26737
26738 #endif
26739
26740 int
26741 main (void)
26742 {
26743 FILE *f = fopen ("conftest.val", "w");
26744 if (!f)
26745   $ac_main_return (1);
26746 fprintf (f, "%ld", (long)(sizeof (bool)));
26747 fclose (f);
26748   ;
26749   return 0;
26750 }
26751 _ACEOF
26752 rm -f "conftest$ac_exeext"
26753 if { (eval echo "$as_me:26753: \"$ac_link\"") >&5
26754   (eval $ac_link) 2>&5
26755   ac_status=$?
26756   echo "$as_me:26756: \$? = $ac_status" >&5
26757   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26758   { (eval echo "$as_me:26758: \"$ac_try\"") >&5
26759   (eval $ac_try) 2>&5
26760   ac_status=$?
26761   echo "$as_me:26761: \$? = $ac_status" >&5
26762   (exit "$ac_status"); }; }; then
26763   ac_cv_sizeof_bool=`cat conftest.val`
26764 else
26765   echo "$as_me: program exited with status $ac_status" >&5
26766 echo "$as_me: failed program was:" >&5
26767 cat "conftest.$ac_ext" >&5
26768 fi
26769 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26770 fi
26771 fi
26772 rm -f conftest.val
26773 else
26774   ac_cv_sizeof_bool=0
26775 fi
26776 fi
26777 echo "$as_me:26777: result: $ac_cv_sizeof_bool" >&5
26778 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26779 cat >>confdefs.h <<EOF
26780 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26781 EOF
26782
26783 echo "$as_me:26783: checking for type of bool" >&5
26784 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26785 if test "${cf_cv_type_of_bool+set}" = set; then
26786   echo $ECHO_N "(cached) $ECHO_C" >&6
26787 else
26788
26789         rm -f cf_test.out
26790         if test "$cross_compiling" = yes; then
26791
26792                 case x$ac_cv_sizeof_bool in
26793                 (x1) cf_cv_type_of_bool="unsigned char";;
26794                 (x2) cf_cv_type_of_bool="unsigned short";;
26795                 (x4) cf_cv_type_of_bool="unsigned int";;
26796                 (x8) cf_cv_type_of_bool="unsigned long";;
26797                 (*)  cf_cv_type_of_bool=unknown;;
26798                 esac
26799
26800 else
26801   cat >"conftest.$ac_ext" <<_ACEOF
26802 #line 26802 "configure"
26803 #include "confdefs.h"
26804
26805 #include <stdlib.h>
26806 #include <stdio.h>
26807
26808 #if defined(__cplusplus)
26809
26810 #ifdef HAVE_GXX_BUILTIN_H
26811 #include <g++/builtin.h>
26812 #elif HAVE_GPP_BUILTIN_H
26813 #include <gpp/builtin.h>
26814 #elif HAVE_BUILTIN_H
26815 #include <builtin.h>
26816 #endif
26817
26818 #else
26819
26820 #if $cf_cv_header_stdbool_h
26821 #include <stdbool.h>
26822 #endif
26823
26824 #endif
26825
26826 int main(void)
26827 {
26828         FILE *fp = fopen("cf_test.out", "w");
26829         if (fp != 0) {
26830                 bool x = true;
26831                 if ((bool)(-x) >= 0)
26832                         fputs("unsigned ", fp);
26833                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26834                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26835                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26836                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26837                 fclose(fp);
26838         }
26839         ${cf_cv_main_return:-return}(0);
26840 }
26841
26842 _ACEOF
26843 rm -f "conftest$ac_exeext"
26844 if { (eval echo "$as_me:26844: \"$ac_link\"") >&5
26845   (eval $ac_link) 2>&5
26846   ac_status=$?
26847   echo "$as_me:26847: \$? = $ac_status" >&5
26848   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26849   { (eval echo "$as_me:26849: \"$ac_try\"") >&5
26850   (eval $ac_try) 2>&5
26851   ac_status=$?
26852   echo "$as_me:26852: \$? = $ac_status" >&5
26853   (exit "$ac_status"); }; }; then
26854   cf_cv_type_of_bool=`cat cf_test.out`
26855                  if test -z "$cf_cv_type_of_bool"; then
26856                    cf_cv_type_of_bool=unknown
26857                  fi
26858 else
26859   echo "$as_me: program exited with status $ac_status" >&5
26860 echo "$as_me: failed program was:" >&5
26861 cat "conftest.$ac_ext" >&5
26862 cf_cv_type_of_bool=unknown
26863 fi
26864 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26865 fi
26866         rm -f cf_test.out
26867
26868 fi
26869 echo "$as_me:26869: result: $cf_cv_type_of_bool" >&5
26870 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26871
26872 if test "$cf_cv_type_of_bool" = unknown ; then
26873         case .$NCURSES_BOOL in
26874         (.auto|.) NCURSES_BOOL=unsigned;;
26875         esac
26876         { echo "$as_me:26876: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26877 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26878         cf_cv_type_of_bool=$NCURSES_BOOL
26879 fi
26880
26881                 else
26882                         echo "$as_me:26882: checking for fallback type of bool" >&5
26883 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26884                         case "$host_cpu" in
26885                         (i?86)  cf_cv_type_of_bool=char ;;
26886                         (*)     cf_cv_type_of_bool=int  ;;
26887                         esac
26888                         echo "$as_me:26888: result: $cf_cv_type_of_bool" >&5
26889 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26890                 fi
26891         fi
26892 fi
26893
26894 # If the C compiler did not declare bool, and we did not determine that the C++
26895 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26896 # ncurses library use the same type as C++ bool.  Note that this allows one to
26897 # specify the type of bool in a configure-script option and postpone
26898 # integration with the C++ compiler provided that the types are compatible.
26899 USE_CXX_BOOL=1
26900 if test "$cf_cv_cc_bool_type" = 1
26901 then
26902         # oops: C has a bool.  Unlikely, but C++ could differ.
26903         USE_CXX_BOOL=0
26904 elif test "$cf_cv_builtin_bool" = 0
26905 then
26906         # C++ has no bool
26907         USE_CXX_BOOL=0
26908 else
26909         # this is the normal case
26910         USE_CXX_BOOL='defined(__cplusplus)'
26911 fi
26912
26913 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26914
26915         if test "$cf_with_ada" != "no" ; then
26916                 if test "$with_libtool" != "no"; then
26917                         { echo "$as_me:26917: WARNING: libtool does not support Ada - disabling feature" >&5
26918 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26919                         cf_with_ada=no
26920                 fi
26921         fi
26922
26923         if test "$cf_with_ada" != "no" ; then
26924
26925 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26926 do
26927
26928 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26929
26930         unset ac_cv_path_cf_TEMP_gnat
26931         unset cf_TEMP_gnat
26932         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26933 set dummy $cf_prog_gnat; ac_word=$2
26934 echo "$as_me:26934: checking for $ac_word" >&5
26935 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26936 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26937   echo $ECHO_N "(cached) $ECHO_C" >&6
26938 else
26939   case $cf_TEMP_gnat in
26940   [\\/]* | ?:[\\/]*)
26941   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26942   ;;
26943   *)
26944   ac_save_IFS=$IFS; IFS=$ac_path_separator
26945 ac_dummy="$PATH"
26946 for ac_dir in $ac_dummy; do
26947   IFS=$ac_save_IFS
26948   test -z "$ac_dir" && ac_dir=.
26949   if $as_executable_p "$ac_dir/$ac_word"; then
26950    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26951    echo "$as_me:26951: found $ac_dir/$ac_word" >&5
26952    break
26953 fi
26954 done
26955
26956   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26957   ;;
26958 esac
26959 fi
26960 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26961
26962 if test -n "$cf_TEMP_gnat"; then
26963   echo "$as_me:26963: result: $cf_TEMP_gnat" >&5
26964 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26965 else
26966   echo "$as_me:26966: result: no" >&5
26967 echo "${ECHO_T}no" >&6
26968 fi
26969
26970         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26971
26972         if test "x$cf_TEMP_gnat" != xno; then
26973                 unset cf_cv_gnat_version
26974                 unset cf_TEMP_gnat
26975
26976 echo "$as_me:26976: checking for $cf_prog_gnat version" >&5
26977 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26978 if test "${cf_cv_gnat_version+set}" = set; then
26979   echo $ECHO_N "(cached) $ECHO_C" >&6
26980 else
26981
26982 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26983         grep '[0-9].[0-9][0-9]*' |\
26984         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26985
26986 fi
26987 echo "$as_me:26987: result: $cf_cv_gnat_version" >&5
26988 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26989 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26990 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26991
26992         fi
26993         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26994
26995         unset cf_TEMP_gnat
26996         unset cf_cv_gnat_version
26997         unset ac_cv_path_cf_TEMP_gnat
26998 done
26999
27000 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27001         cf_ada_make=
27002         cf_cv_prog_gnat_correct=no
27003 else
27004         cf_ada_make=gnatmake
27005         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27006                 # gprconfig is newer than gnatmake; we can continue...
27007                 cf_ada_config="##"
27008         else
27009                 rm -rf ./conftest* ./*~conftest*
27010                 if mkdir conftest.src
27011                 then
27012                         cf_ada_config=""
27013                         cd conftest.src
27014                         for cf_gprconfig in Ada C
27015                         do
27016                                 echo "$as_me:27016: checking for gprconfig name for $cf_gprconfig" >&5
27017 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27018                                 if test "$cf_gprconfig" = C
27019                                 then
27020                                         for cf_gprconfig_param in \
27021                                                 "$cf_gprconfig,,,,GNATGCC" \
27022                                                 "$cf_gprconfig,,,,GCC" \
27023                                                 "$cf_gprconfig"
27024                                         do
27025                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27026                                                 test -n "$cf_gprconfig_value" && break
27027                                         done
27028                                 else
27029                                         cf_gprconfig_param=$cf_gprconfig
27030                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27031                                 fi
27032                                 if test -n "$cf_gprconfig_value"
27033                                 then
27034                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27035                                         echo "$as_me:27035: result: $cf_gprconfig_value" >&5
27036 echo "${ECHO_T}$cf_gprconfig_value" >&6
27037                                 else
27038                                         echo "$as_me:27038: result: missing" >&5
27039 echo "${ECHO_T}missing" >&6
27040                                         cf_ada_config="#"
27041                                         break
27042                                 fi
27043                         done
27044                         cd ..
27045                         rm -rf ./conftest* ./*~conftest*
27046                 fi
27047         fi
27048         if test "x$cf_ada_config" != "x#"
27049         then
27050
27051 echo "$as_me:27051: checking for gnat version" >&5
27052 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27053 if test "${cf_cv_gnat_version+set}" = set; then
27054   echo $ECHO_N "(cached) $ECHO_C" >&6
27055 else
27056
27057 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27058         grep '[0-9].[0-9][0-9]*' |\
27059         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27060
27061 fi
27062 echo "$as_me:27062: result: $cf_cv_gnat_version" >&5
27063 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27064 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27065
27066 case "$cf_cv_gnat_version" in
27067 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27068         cf_cv_prog_gnat_correct=yes
27069         ;;
27070 (*)
27071         { echo "$as_me:27071: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27072 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27073         cf_cv_prog_gnat_correct=no
27074         ;;
27075 esac
27076
27077                 # Extract the first word of "m4", so it can be a program name with args.
27078 set dummy m4; ac_word=$2
27079 echo "$as_me:27079: checking for $ac_word" >&5
27080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27081 if test "${ac_cv_prog_M4_exists+set}" = set; then
27082   echo $ECHO_N "(cached) $ECHO_C" >&6
27083 else
27084   if test -n "$M4_exists"; then
27085   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27086 else
27087   ac_save_IFS=$IFS; IFS=$ac_path_separator
27088 ac_dummy="$PATH"
27089 for ac_dir in $ac_dummy; do
27090   IFS=$ac_save_IFS
27091   test -z "$ac_dir" && ac_dir=.
27092   $as_executable_p "$ac_dir/$ac_word" || continue
27093 ac_cv_prog_M4_exists="yes"
27094 echo "$as_me:27094: found $ac_dir/$ac_word" >&5
27095 break
27096 done
27097
27098   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27099 fi
27100 fi
27101 M4_exists=$ac_cv_prog_M4_exists
27102 if test -n "$M4_exists"; then
27103   echo "$as_me:27103: result: $M4_exists" >&5
27104 echo "${ECHO_T}$M4_exists" >&6
27105 else
27106   echo "$as_me:27106: result: no" >&5
27107 echo "${ECHO_T}no" >&6
27108 fi
27109
27110                 if test "$ac_cv_prog_M4_exists" = no; then
27111                         cf_cv_prog_gnat_correct=no
27112                         { echo "$as_me:27112: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27113 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27114                 fi
27115                 if test "$cf_cv_prog_gnat_correct" = yes; then
27116                         echo "$as_me:27116: checking if GNAT works" >&5
27117 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27118
27119 rm -rf ./conftest* ./*~conftest*
27120 cat >>conftest.ads <<CF_EOF
27121 procedure conftest;
27122 CF_EOF
27123 cat >>conftest.adb <<CF_EOF
27124 with Text_IO;
27125 with GNAT.OS_Lib;
27126 procedure conftest is
27127 begin
27128    Text_IO.Put ("Hello World");
27129    Text_IO.New_Line;
27130    GNAT.OS_Lib.OS_Exit (0);
27131 end conftest;
27132 CF_EOF
27133 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27134    if ( ./conftest 1>&5 2>&1 ) ; then
27135       cf_cv_prog_gnat_correct=yes
27136    else
27137       cf_cv_prog_gnat_correct=no
27138    fi
27139 else
27140    cf_cv_prog_gnat_correct=no
27141 fi
27142 rm -rf ./conftest* ./*~conftest*
27143
27144                         echo "$as_me:27144: result: $cf_cv_prog_gnat_correct" >&5
27145 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27146                 fi
27147         else
27148                 cf_cv_prog_gnat_correct=no
27149         fi
27150 fi
27151
27152                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27153
27154         ADAFLAGS="$ADAFLAGS -gnatpn"
27155
27156         echo "$as_me:27156: checking optimization options for ADAFLAGS" >&5
27157 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27158         case "$CFLAGS" in
27159         (*-g*)
27160
27161         ADAFLAGS="$ADAFLAGS -g"
27162
27163                 ;;
27164         esac
27165         case "$CFLAGS" in
27166         (*-O*)
27167                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27168
27169         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27170
27171                 ;;
27172         esac
27173         echo "$as_me:27173: result: $ADAFLAGS" >&5
27174 echo "${ECHO_T}$ADAFLAGS" >&6
27175
27176 echo "$as_me:27176: checking if GNATPREP supports -T option" >&5
27177 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27178 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27179   echo $ECHO_N "(cached) $ECHO_C" >&6
27180 else
27181
27182 cf_cv_gnatprep_opt_t=no
27183 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27184
27185 fi
27186 echo "$as_me:27186: result: $cf_cv_gnatprep_opt_t" >&5
27187 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27188 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27189
27190 echo "$as_me:27190: checking if GNAT supports generics" >&5
27191 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27192 case "$cf_cv_gnat_version" in
27193 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27194         cf_gnat_generics=yes
27195         ;;
27196 (*)
27197         cf_gnat_generics=no
27198         ;;
27199 esac
27200 echo "$as_me:27200: result: $cf_gnat_generics" >&5
27201 echo "${ECHO_T}$cf_gnat_generics" >&6
27202
27203 if test "$cf_gnat_generics" = yes
27204 then
27205         cf_compile_generics=generics
27206         cf_generic_objects="\${GENOBJS}"
27207 else
27208         cf_compile_generics=
27209         cf_generic_objects=
27210 fi
27211
27212 echo "$as_me:27212: checking if GNAT supports SIGINT" >&5
27213 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27214 if test "${cf_cv_gnat_sigint+set}" = set; then
27215   echo $ECHO_N "(cached) $ECHO_C" >&6
27216 else
27217
27218 rm -rf ./conftest* ./*~conftest*
27219 cat >>conftest.ads <<CF_EOF
27220 with Ada.Interrupts.Names;
27221
27222 package ConfTest is
27223
27224    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27225    pragma Unreserve_All_Interrupts;
27226    pragma Warnings (On);
27227
27228    protected Process is
27229       procedure Stop;
27230       function Continue return Boolean;
27231       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27232    private
27233       Done : Boolean := False;
27234    end Process;
27235
27236 end ConfTest;
27237 CF_EOF
27238 cat >>conftest.adb <<CF_EOF
27239 package body ConfTest is
27240    protected body Process is
27241       procedure Stop is
27242       begin
27243          Done := True;
27244       end Stop;
27245       function Continue return Boolean is
27246       begin
27247          return not Done;
27248       end Continue;
27249    end Process;
27250 end ConfTest;
27251 CF_EOF
27252 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27253       cf_cv_gnat_sigint=yes
27254 else
27255    cf_cv_gnat_sigint=no
27256 fi
27257 rm -rf ./conftest* ./*~conftest*
27258
27259 fi
27260 echo "$as_me:27260: result: $cf_cv_gnat_sigint" >&5
27261 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27262
27263 if test "$cf_cv_gnat_sigint" = yes ; then
27264         USE_GNAT_SIGINT=""
27265 else
27266         USE_GNAT_SIGINT="#"
27267 fi
27268
27269 cf_gnat_libraries=no
27270 cf_gnat_projects=no
27271
27272 if test "$enable_gnat_projects" != no ; then
27273 echo "$as_me:27273: checking if GNAT supports project files" >&5
27274 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27275 case "$cf_cv_gnat_version" in
27276 (3.[0-9]*)
27277         ;;
27278 (*)
27279         case "$cf_cv_system_name" in
27280         (cygwin*|msys*)
27281                 ;;
27282         (*)
27283                 rm -rf ./conftest* ./*~conftest*
27284                 if mkdir conftest.src conftest.bin conftest.lib
27285                 then
27286                         cd conftest.src
27287                         rm -rf ./conftest* ./*~conftest*
27288                         cat >>library.gpr <<CF_EOF
27289 project Library is
27290   Kind := External ("LIB_KIND");
27291   for Library_Name use "ConfTest";
27292   for Object_Dir use ".";
27293   for Library_ALI_Dir use External("LIBRARY_DIR");
27294   for Library_Version use External ("SONAME");
27295   for Library_Kind use Kind;
27296   for Library_Dir use External("BUILD_DIR");
27297   Source_Dir := External ("SOURCE_DIR");
27298   for Source_Dirs use (Source_Dir);
27299 end Library;
27300 CF_EOF
27301                         cat >>confpackage.ads <<CF_EOF
27302 package ConfPackage is
27303    procedure conftest;
27304 end ConfPackage;
27305 CF_EOF
27306                         cat >>confpackage.adb <<CF_EOF
27307 with Text_IO;
27308 package body ConfPackage is
27309    procedure conftest is
27310    begin
27311       Text_IO.Put ("Hello World");
27312       Text_IO.New_Line;
27313    end conftest;
27314 end ConfPackage;
27315 CF_EOF
27316                         if ( "$cf_ada_make" $ADAFLAGS \
27317                                         -Plibrary.gpr \
27318                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27319                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27320                                         -XSOURCE_DIR="`pwd`" \
27321                                         -XSONAME=libConfTest.so.1 \
27322                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27323                                 cf_gnat_projects=yes
27324                         fi
27325                         cd ..
27326                 fi
27327                 if test -f conftest.lib/confpackage.ali
27328                 then
27329                         cf_gnat_libraries=yes
27330                 fi
27331                 rm -rf ./conftest* ./*~conftest*
27332                 ;;
27333         esac
27334         ;;
27335 esac
27336 echo "$as_me:27336: result: $cf_gnat_projects" >&5
27337 echo "${ECHO_T}$cf_gnat_projects" >&6
27338 fi # enable_gnat_projects
27339
27340 if test "$cf_gnat_projects" = yes
27341 then
27342         echo "$as_me:27342: checking if GNAT supports libraries" >&5
27343 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27344         echo "$as_me:27344: result: $cf_gnat_libraries" >&5
27345 echo "${ECHO_T}$cf_gnat_libraries" >&6
27346 fi
27347
27348 USE_OLD_MAKERULES=""
27349 USE_GNAT_PROJECTS="#"
27350 USE_GNAT_MAKE_GPR="#"
27351 USE_GNAT_GPRBUILD="#"
27352
27353 if test "$cf_gnat_projects" = yes
27354 then
27355         USE_OLD_MAKERULES="#"
27356         USE_GNAT_PROJECTS=""
27357         if test "$cf_cv_VERSION_GPRBUILD" != no
27358         then
27359                 USE_GNAT_GPRBUILD=""
27360         elif test "$cf_cv_VERSION_GNATMAKE" != no
27361         then
27362                 USE_GNAT_MAKE_GPR=""
27363         else
27364                 { echo "$as_me:27364: WARNING: use old makefile rules since tools are missing" >&5
27365 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27366         fi
27367 fi
27368
27369 if test "$cf_gnat_libraries" = yes
27370 then
27371         USE_GNAT_LIBRARIES=""
27372 else
27373         USE_GNAT_LIBRARIES="#"
27374 fi
27375
27376 echo "$as_me:27376: checking for ada-compiler" >&5
27377 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27378
27379 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27380 if test "${with_ada_compiler+set}" = set; then
27381   withval="$with_ada_compiler"
27382   cf_ada_compiler=$withval
27383 else
27384   cf_ada_compiler=gnatmake
27385 fi;
27386
27387 echo "$as_me:27387: result: $cf_ada_compiler" >&5
27388 echo "${ECHO_T}$cf_ada_compiler" >&6
27389
27390                         cf_ada_package=terminal_interface
27391
27392 echo "$as_me:27392: checking for ada-include" >&5
27393 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27394
27395 # Check whether --with-ada-include or --without-ada-include was given.
27396 if test "${with_ada_include+set}" = set; then
27397   withval="$with_ada_include"
27398
27399 else
27400   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27401 fi; if test -n "$prefix/share/ada/adainclude" ; then
27402
27403 if test "x$prefix" != xNONE; then
27404         cf_path_syntax="$prefix"
27405 else
27406         cf_path_syntax="$ac_default_prefix"
27407 fi
27408
27409 case ".$withval" in
27410 (.\$\(*\)*|.\'*\'*)
27411         ;;
27412 (..|./*|.\\*)
27413         ;;
27414 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27415         ;;
27416 (.\$\{*prefix\}*|.\$\{*dir\}*)
27417         eval withval="$withval"
27418         case ".$withval" in
27419         (.NONE/*)
27420                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27421                 ;;
27422         esac
27423         ;;
27424 (.no|.NONE/*)
27425         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27426         ;;
27427 (*)
27428         { { echo "$as_me:27428: error: expected a pathname, not \"$withval\"" >&5
27429 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27430    { (exit 1); exit 1; }; }
27431         ;;
27432 esac
27433
27434 fi
27435 eval ADA_INCLUDE="$withval"
27436
27437 echo "$as_me:27437: result: $ADA_INCLUDE" >&5
27438 echo "${ECHO_T}$ADA_INCLUDE" >&6
27439
27440 echo "$as_me:27440: checking for ada-objects" >&5
27441 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27442
27443 # Check whether --with-ada-objects or --without-ada-objects was given.
27444 if test "${with_ada_objects+set}" = set; then
27445   withval="$with_ada_objects"
27446
27447 else
27448   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27449 fi; if test -n "$prefix/lib/ada/adalib" ; then
27450
27451 if test "x$prefix" != xNONE; then
27452         cf_path_syntax="$prefix"
27453 else
27454         cf_path_syntax="$ac_default_prefix"
27455 fi
27456
27457 case ".$withval" in
27458 (.\$\(*\)*|.\'*\'*)
27459         ;;
27460 (..|./*|.\\*)
27461         ;;
27462 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27463         ;;
27464 (.\$\{*prefix\}*|.\$\{*dir\}*)
27465         eval withval="$withval"
27466         case ".$withval" in
27467         (.NONE/*)
27468                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27469                 ;;
27470         esac
27471         ;;
27472 (.no|.NONE/*)
27473         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27474         ;;
27475 (*)
27476         { { echo "$as_me:27476: error: expected a pathname, not \"$withval\"" >&5
27477 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27478    { (exit 1); exit 1; }; }
27479         ;;
27480 esac
27481
27482 fi
27483 eval ADA_OBJECTS="$withval"
27484
27485 echo "$as_me:27485: result: $ADA_OBJECTS" >&5
27486 echo "${ECHO_T}$ADA_OBJECTS" >&6
27487
27488 echo "$as_me:27488: checking if an Ada95 shared-library should be built" >&5
27489 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27490
27491 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27492 if test "${with_ada_sharedlib+set}" = set; then
27493   withval="$with_ada_sharedlib"
27494   with_ada_sharedlib=$withval
27495 else
27496   with_ada_sharedlib=no
27497 fi;
27498 echo "$as_me:27498: result: $with_ada_sharedlib" >&5
27499 echo "${ECHO_T}$with_ada_sharedlib" >&6
27500
27501 if test "x$with_ada_sharedlib" != xno
27502 then
27503         if test "x$cf_gnat_projects" != xyes
27504         then
27505                 { echo "$as_me:27505: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27506 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27507                 with_ada_sharedlib=no
27508         fi
27509 fi
27510
27511 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27512 MAKE_ADA_SHAREDLIB="#"
27513
27514 if test "x$with_ada_sharedlib" != xno
27515 then
27516         MAKE_ADA_SHAREDLIB=
27517         if test "x$with_ada_sharedlib" != xyes
27518         then
27519                 ADA_SHAREDLIB="$with_ada_sharedlib"
27520         fi
27521 fi
27522
27523                         # allow the Ada binding to be renamed
27524
27525 echo "$as_me:27525: checking for ada-libname" >&5
27526 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27527
27528 # Check whether --with-ada-libname or --without-ada-libname was given.
27529 if test "${with_ada_libname+set}" = set; then
27530   withval="$with_ada_libname"
27531   ADA_LIBNAME=$withval
27532 else
27533   ADA_LIBNAME=AdaCurses
27534 fi;
27535 case "x$ADA_LIBNAME" in
27536 (x|xyes|xno)
27537         ADA_LIBNAME=AdaCurses
27538         ;;
27539 esac
27540
27541 echo "$as_me:27541: result: $ADA_LIBNAME" >&5
27542 echo "${ECHO_T}$ADA_LIBNAME" >&6
27543
27544                 fi
27545         fi
27546 else
27547         cf_with_ada=no
27548 fi
27549
27550 # do this "late" to avoid conflict with header-checks
27551 if test "x$with_widec" = xyes ; then
27552         echo "$as_me:27552: checking for wchar_t" >&5
27553 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27554 if test "${ac_cv_type_wchar_t+set}" = set; then
27555   echo $ECHO_N "(cached) $ECHO_C" >&6
27556 else
27557   cat >"conftest.$ac_ext" <<_ACEOF
27558 #line 27558 "configure"
27559 #include "confdefs.h"
27560 $ac_includes_default
27561 int
27562 main (void)
27563 {
27564 if ((wchar_t *) 0)
27565   return 0;
27566 if (sizeof (wchar_t))
27567   return 0;
27568   ;
27569   return 0;
27570 }
27571 _ACEOF
27572 rm -f "conftest.$ac_objext"
27573 if { (eval echo "$as_me:27573: \"$ac_compile\"") >&5
27574   (eval $ac_compile) 2>&5
27575   ac_status=$?
27576   echo "$as_me:27576: \$? = $ac_status" >&5
27577   (exit "$ac_status"); } &&
27578          { ac_try='test -s "conftest.$ac_objext"'
27579   { (eval echo "$as_me:27579: \"$ac_try\"") >&5
27580   (eval $ac_try) 2>&5
27581   ac_status=$?
27582   echo "$as_me:27582: \$? = $ac_status" >&5
27583   (exit "$ac_status"); }; }; then
27584   ac_cv_type_wchar_t=yes
27585 else
27586   echo "$as_me: failed program was:" >&5
27587 cat "conftest.$ac_ext" >&5
27588 ac_cv_type_wchar_t=no
27589 fi
27590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27591 fi
27592 echo "$as_me:27592: result: $ac_cv_type_wchar_t" >&5
27593 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27594
27595 echo "$as_me:27595: checking size of wchar_t" >&5
27596 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27597 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27598   echo $ECHO_N "(cached) $ECHO_C" >&6
27599 else
27600   if test "$ac_cv_type_wchar_t" = yes; then
27601   if test "$cross_compiling" = yes; then
27602   # Depending upon the size, compute the lo and hi bounds.
27603 cat >"conftest.$ac_ext" <<_ACEOF
27604 #line 27604 "configure"
27605 #include "confdefs.h"
27606 $ac_includes_default
27607 int
27608 main (void)
27609 {
27610 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27611   ;
27612   return 0;
27613 }
27614 _ACEOF
27615 rm -f "conftest.$ac_objext"
27616 if { (eval echo "$as_me:27616: \"$ac_compile\"") >&5
27617   (eval $ac_compile) 2>&5
27618   ac_status=$?
27619   echo "$as_me:27619: \$? = $ac_status" >&5
27620   (exit "$ac_status"); } &&
27621          { ac_try='test -s "conftest.$ac_objext"'
27622   { (eval echo "$as_me:27622: \"$ac_try\"") >&5
27623   (eval $ac_try) 2>&5
27624   ac_status=$?
27625   echo "$as_me:27625: \$? = $ac_status" >&5
27626   (exit "$ac_status"); }; }; then
27627   ac_lo=0 ac_mid=0
27628   while :; do
27629     cat >"conftest.$ac_ext" <<_ACEOF
27630 #line 27630 "configure"
27631 #include "confdefs.h"
27632 $ac_includes_default
27633 int
27634 main (void)
27635 {
27636 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27637   ;
27638   return 0;
27639 }
27640 _ACEOF
27641 rm -f "conftest.$ac_objext"
27642 if { (eval echo "$as_me:27642: \"$ac_compile\"") >&5
27643   (eval $ac_compile) 2>&5
27644   ac_status=$?
27645   echo "$as_me:27645: \$? = $ac_status" >&5
27646   (exit "$ac_status"); } &&
27647          { ac_try='test -s "conftest.$ac_objext"'
27648   { (eval echo "$as_me:27648: \"$ac_try\"") >&5
27649   (eval $ac_try) 2>&5
27650   ac_status=$?
27651   echo "$as_me:27651: \$? = $ac_status" >&5
27652   (exit "$ac_status"); }; }; then
27653   ac_hi=$ac_mid; break
27654 else
27655   echo "$as_me: failed program was:" >&5
27656 cat "conftest.$ac_ext" >&5
27657 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27658 fi
27659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27660   done
27661 else
27662   echo "$as_me: failed program was:" >&5
27663 cat "conftest.$ac_ext" >&5
27664 ac_hi=-1 ac_mid=-1
27665   while :; do
27666     cat >"conftest.$ac_ext" <<_ACEOF
27667 #line 27667 "configure"
27668 #include "confdefs.h"
27669 $ac_includes_default
27670 int
27671 main (void)
27672 {
27673 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27674   ;
27675   return 0;
27676 }
27677 _ACEOF
27678 rm -f "conftest.$ac_objext"
27679 if { (eval echo "$as_me:27679: \"$ac_compile\"") >&5
27680   (eval $ac_compile) 2>&5
27681   ac_status=$?
27682   echo "$as_me:27682: \$? = $ac_status" >&5
27683   (exit "$ac_status"); } &&
27684          { ac_try='test -s "conftest.$ac_objext"'
27685   { (eval echo "$as_me:27685: \"$ac_try\"") >&5
27686   (eval $ac_try) 2>&5
27687   ac_status=$?
27688   echo "$as_me:27688: \$? = $ac_status" >&5
27689   (exit "$ac_status"); }; }; then
27690   ac_lo=$ac_mid; break
27691 else
27692   echo "$as_me: failed program was:" >&5
27693 cat "conftest.$ac_ext" >&5
27694 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27695 fi
27696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27697   done
27698 fi
27699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27700 # Binary search between lo and hi bounds.
27701 while test "x$ac_lo" != "x$ac_hi"; do
27702   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27703   cat >"conftest.$ac_ext" <<_ACEOF
27704 #line 27704 "configure"
27705 #include "confdefs.h"
27706 $ac_includes_default
27707 int
27708 main (void)
27709 {
27710 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27711   ;
27712   return 0;
27713 }
27714 _ACEOF
27715 rm -f "conftest.$ac_objext"
27716 if { (eval echo "$as_me:27716: \"$ac_compile\"") >&5
27717   (eval $ac_compile) 2>&5
27718   ac_status=$?
27719   echo "$as_me:27719: \$? = $ac_status" >&5
27720   (exit "$ac_status"); } &&
27721          { ac_try='test -s "conftest.$ac_objext"'
27722   { (eval echo "$as_me:27722: \"$ac_try\"") >&5
27723   (eval $ac_try) 2>&5
27724   ac_status=$?
27725   echo "$as_me:27725: \$? = $ac_status" >&5
27726   (exit "$ac_status"); }; }; then
27727   ac_hi=$ac_mid
27728 else
27729   echo "$as_me: failed program was:" >&5
27730 cat "conftest.$ac_ext" >&5
27731 ac_lo=`expr "$ac_mid" + 1`
27732 fi
27733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27734 done
27735 ac_cv_sizeof_wchar_t=$ac_lo
27736 else
27737   if test "$cross_compiling" = yes; then
27738   { { echo "$as_me:27738: error: cannot run test program while cross compiling" >&5
27739 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27740    { (exit 1); exit 1; }; }
27741 else
27742   cat >"conftest.$ac_ext" <<_ACEOF
27743 #line 27743 "configure"
27744 #include "confdefs.h"
27745 $ac_includes_default
27746 int
27747 main (void)
27748 {
27749 FILE *f = fopen ("conftest.val", "w");
27750 if (!f)
27751   $ac_main_return (1);
27752 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27753 fclose (f);
27754   ;
27755   return 0;
27756 }
27757 _ACEOF
27758 rm -f "conftest$ac_exeext"
27759 if { (eval echo "$as_me:27759: \"$ac_link\"") >&5
27760   (eval $ac_link) 2>&5
27761   ac_status=$?
27762   echo "$as_me:27762: \$? = $ac_status" >&5
27763   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27764   { (eval echo "$as_me:27764: \"$ac_try\"") >&5
27765   (eval $ac_try) 2>&5
27766   ac_status=$?
27767   echo "$as_me:27767: \$? = $ac_status" >&5
27768   (exit "$ac_status"); }; }; then
27769   ac_cv_sizeof_wchar_t=`cat conftest.val`
27770 else
27771   echo "$as_me: program exited with status $ac_status" >&5
27772 echo "$as_me: failed program was:" >&5
27773 cat "conftest.$ac_ext" >&5
27774 fi
27775 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27776 fi
27777 fi
27778 rm -f conftest.val
27779 else
27780   ac_cv_sizeof_wchar_t=0
27781 fi
27782 fi
27783 echo "$as_me:27783: result: $ac_cv_sizeof_wchar_t" >&5
27784 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27785 cat >>confdefs.h <<EOF
27786 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27787 EOF
27788
27789         # cross-compiling to mingw can run into the problem that attempting to
27790         # link with the regex library fails, causing the test to not set this to
27791         # a number.  "recent" autoconf does not address this problem either -TD
27792         if test -z "$ac_cv_sizeof_wchar_t"
27793         then
27794                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27795
27796 echo "${as_me:-configure}:27796: testing test failed (assume 2) ..." 1>&5
27797
27798                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27799                 mv confdefs.tmp confdefs.h
27800                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27801         fi
27802 fi
27803
27804 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27805 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27806 ###
27807 ### ticlib modules may be a separate library, otherwise contained in termlib.
27808 ### termlib modules may be a separate library, otherwise contained in ncurses.
27809 ###
27810 ### The of "+" or " " between the tokens controls the way the script
27811 ### chooses to split module lists into libraries.
27812 ###
27813 ### (see CF_LIB_RULES).
27814 echo "$as_me:27814: checking for library subsets" >&5
27815 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27816 LIB_SUBSETS=
27817
27818 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27819         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27820         if test "$with_ticlib" != no ; then
27821                 LIB_SUBSETS="${LIB_SUBSETS} "
27822         else
27823                 LIB_SUBSETS="${LIB_SUBSETS}+"
27824         fi
27825 fi
27826
27827 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27828 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27829
27830 if test "$with_termlib" != no ; then
27831         LIB_SUBSETS="${LIB_SUBSETS} "
27832 else
27833         LIB_SUBSETS="${LIB_SUBSETS}+"
27834 fi
27835
27836 LIB_SUBSETS="${LIB_SUBSETS}base"
27837
27838 # Most term-driver calls are to tinfo, but some like init_pair are to the
27839 # base library (so it resides in base).
27840 if test "$with_term_driver" != no ; then
27841         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27842         case "$cf_cv_system_name" in
27843         (*mingw32*|*mingw64*)
27844                 if test "x$with_exp_win32" = xyes ; then
27845                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27846                 else
27847                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27848                 fi
27849                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27850                 ;;
27851         (*)
27852                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27853                 ;;
27854         esac
27855 elif test "x$with_exp_win32" = xyes ; then
27856         case "$cf_cv_system_name" in
27857         (*mingw32*|*mingw64*)
27858                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27859                 ;;
27860         (*)
27861                 ;;
27862         esac
27863 fi
27864
27865 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27866 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27867
27868 echo "$as_me:27868: result: $LIB_SUBSETS" >&5
27869 echo "${ECHO_T}$LIB_SUBSETS" >&6
27870
27871 ### Construct the list of include-directories to be generated
27872
27873 if test "$srcdir" != "."; then
27874         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27875 fi
27876 CPPFLAGS="-I../include $CPPFLAGS"
27877 if test "$srcdir" != "."; then
27878         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27879 fi
27880 CPPFLAGS="-I. $CPPFLAGS"
27881
27882 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27883 if test "$srcdir" != "."; then
27884         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27885 fi
27886 if test "$GCC" != yes; then
27887         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27888 elif test "$includedir" != "/usr/include"; then
27889         if test "$includedir" = '${prefix}/include' ; then
27890                 if test x$prefix != x/usr ; then
27891                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27892                 fi
27893         else
27894                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27895         fi
27896 fi
27897
27898 ### Build up pieces for makefile rules
27899 echo "$as_me:27899: checking default library suffix" >&5
27900 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27901
27902         case $DFT_LWR_MODEL in
27903         (libtool) DFT_ARG_SUFFIX=''   ;;
27904         (normal)  DFT_ARG_SUFFIX=''   ;;
27905         (debug)   DFT_ARG_SUFFIX='_g' ;;
27906         (profile) DFT_ARG_SUFFIX='_p' ;;
27907         (shared)  DFT_ARG_SUFFIX=''   ;;
27908         esac
27909         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27910 echo "$as_me:27910: result: $DFT_ARG_SUFFIX" >&5
27911 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27912
27913 echo "$as_me:27913: checking default library-dependency suffix" >&5
27914 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27915
27916         case X$DFT_LWR_MODEL in
27917         (Xlibtool)
27918                 DFT_LIB_SUFFIX='.la'
27919                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27920                 ;;
27921         (Xdebug)
27922                 case "$cf_cv_system_name" in
27923                 (*-msvc*)
27924                         DFT_LIB_SUFFIX='_g.lib'
27925                         ;;
27926                 (*)
27927                         DFT_LIB_SUFFIX='_g.a'
27928                         ;;
27929                 esac
27930                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27931                 ;;
27932         (Xprofile)
27933                 case "$cf_cv_system_name" in
27934                 (*-msvc*)
27935                         DFT_LIB_SUFFIX='_p.lib'
27936                         ;;
27937                 (*)
27938                         DFT_LIB_SUFFIX='_p.a'
27939                         ;;
27940                 esac
27941                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27942                 ;;
27943         (Xshared)
27944                 case "$cf_cv_system_name" in
27945                 (aix[5-7]*)
27946                         DFT_LIB_SUFFIX='.so'
27947                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27948                         ;;
27949                 (*-msvc*)
27950                         DFT_LIB_SUFFIX='.dll'
27951                         DFT_DEP_SUFFIX='.dll.lib'
27952                         ;;
27953                 (cygwin*|msys*|mingw*)
27954                         DFT_LIB_SUFFIX='.dll'
27955                         DFT_DEP_SUFFIX='.dll.a'
27956                         ;;
27957                 (darwin*)
27958                         DFT_LIB_SUFFIX='.dylib'
27959                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27960                         ;;
27961                 (hpux*)
27962                         case "$target" in
27963                         (ia64*)
27964                                 DFT_LIB_SUFFIX='.so'
27965                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27966                                 ;;
27967                         (*)
27968                                 DFT_LIB_SUFFIX='.sl'
27969                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27970                                 ;;
27971                         esac
27972                         ;;
27973                 (*)
27974                         DFT_LIB_SUFFIX='.so'
27975                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27976                         ;;
27977                 esac
27978                 ;;
27979         (*)
27980                 case "$target" in
27981                 (*-msvc*)
27982                         DFT_LIB_SUFFIX='.lib'
27983                         ;;
27984                 (*)
27985                         DFT_LIB_SUFFIX='.a'
27986                         ;;
27987                 esac
27988                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27989                 ;;
27990         esac
27991         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27992         then
27993                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27994                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27995         fi
27996 echo "$as_me:27996: result: $DFT_DEP_SUFFIX" >&5
27997 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27998
27999 echo "$as_me:27999: checking default object directory" >&5
28000 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28001
28002         case $DFT_LWR_MODEL in
28003         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28004         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28005         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28006         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28007         (shared)
28008                 case "$cf_cv_system_name" in
28009                 (cygwin|msys)
28010                         DFT_OBJ_SUBDIR='objects' ;;
28011                 (*)
28012                         DFT_OBJ_SUBDIR='obj_s' ;;
28013                 esac
28014         esac
28015 echo "$as_me:28015: result: $DFT_OBJ_SUBDIR" >&5
28016 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28017
28018 if test "x$cf_with_cxx" = xyes ; then
28019 echo "$as_me:28019: checking c++ library-dependency suffix" >&5
28020 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28021 if test "$with_libtool" != "no"; then
28022         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28023         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28024 elif test "$with_shared_cxx" != "no"; then
28025         # also for g++ users...
28026         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28027 else
28028         # we normally make a static library because C/C++ library rules differ
28029
28030         case Xnormal in
28031         (Xlibtool)
28032                 CXX_LIB_SUFFIX='.la'
28033                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28034                 ;;
28035         (Xdebug)
28036                 case "$cf_cv_system_name" in
28037                 (*-msvc*)
28038                         CXX_LIB_SUFFIX='_g.lib'
28039                         ;;
28040                 (*)
28041                         CXX_LIB_SUFFIX='_g.a'
28042                         ;;
28043                 esac
28044                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28045                 ;;
28046         (Xprofile)
28047                 case "$cf_cv_system_name" in
28048                 (*-msvc*)
28049                         CXX_LIB_SUFFIX='_p.lib'
28050                         ;;
28051                 (*)
28052                         CXX_LIB_SUFFIX='_p.a'
28053                         ;;
28054                 esac
28055                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28056                 ;;
28057         (Xshared)
28058                 case "$cf_cv_system_name" in
28059                 (aix[5-7]*)
28060                         CXX_LIB_SUFFIX='.so'
28061                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28062                         ;;
28063                 (*-msvc*)
28064                         CXX_LIB_SUFFIX='.dll'
28065                         CXX_DEP_SUFFIX='.dll.lib'
28066                         ;;
28067                 (cygwin*|msys*|mingw*)
28068                         CXX_LIB_SUFFIX='.dll'
28069                         CXX_DEP_SUFFIX='.dll.a'
28070                         ;;
28071                 (darwin*)
28072                         CXX_LIB_SUFFIX='.dylib'
28073                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28074                         ;;
28075                 (hpux*)
28076                         case "$target" in
28077                         (ia64*)
28078                                 CXX_LIB_SUFFIX='.so'
28079                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28080                                 ;;
28081                         (*)
28082                                 CXX_LIB_SUFFIX='.sl'
28083                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28084                                 ;;
28085                         esac
28086                         ;;
28087                 (*)
28088                         CXX_LIB_SUFFIX='.so'
28089                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28090                         ;;
28091                 esac
28092                 ;;
28093         (*)
28094                 case "$target" in
28095                 (*-msvc*)
28096                         CXX_LIB_SUFFIX='.lib'
28097                         ;;
28098                 (*)
28099                         CXX_LIB_SUFFIX='.a'
28100                         ;;
28101                 esac
28102                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28103                 ;;
28104         esac
28105         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28106         then
28107                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28108                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28109         fi
28110
28111 fi
28112 echo "$as_me:28112: result: $CXX_LIB_SUFFIX" >&5
28113 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28114
28115 fi
28116
28117 # do not want -ldl in build except as needed for -lncurses dependency
28118 if test "x$with_dlsym" = xyes ; then
28119 if test "$DFT_LWR_MODEL" = shared || \
28120    test "$DFT_LWR_MODEL" = libtool ; then
28121
28122 # remove dl library from $LIBS
28123 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28124
28125 fi
28126 fi
28127 ### Set up low-level terminfo dependencies for makefiles.
28128
28129 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28130 # do not need libdl
28131 TICS_LIST=
28132 if test "x$with_dlsym" = xyes ; then
28133
28134 # remove dl library from $SHLIB_LIST
28135 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28136
28137 fi
28138
28139 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28140 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28141 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28142 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28143 then
28144         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28145 fi
28146
28147 if test "$with_ticlib" != no ; then
28148
28149         if test "x$with_ticlib" != xyes ; then
28150                 TICS_NAME=$with_ticlib
28151                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28152                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28153                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28154                 TICS_LIB_SUFFIX="${with_ticlib}"
28155         else
28156                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28157                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28158                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28159                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28160         fi
28161         TICS_LDFLAGS="-L${LIB_DIR}"
28162         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28163 else
28164         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28165         TICS_LDFLAGS="-L${LIB_DIR}"
28166         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28167 fi
28168
28169 if test "$with_termlib" != no ; then
28170
28171         if test "x$with_termlib" != xyes ; then
28172                 TINFO_NAME=$with_termlib
28173                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28174                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28175                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28176                 TINFO_LIB_SUFFIX="${with_termlib}"
28177         else
28178                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28179                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28180                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28181                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28182         fi
28183
28184         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28185         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28186         if test "$DFT_LWR_MODEL" = "libtool"; then
28187                 TEST_ARGS="${TEST_DEPS}"
28188                 TEST_ARG2="${TEST_DEP2}"
28189                 TINFO_LDFLAGS="-L${LIB_DIR}"
28190                 TINFO_LIBS="$TEST_ARGS"
28191                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28192                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28193         else
28194                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28195                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28196                 if test "x$with_term_driver" != xno ; then
28197                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28198                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28199                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28200                 else
28201                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28202                         TINFO_LIBS="$TEST_ARGS"
28203                 fi
28204                 TINFO_LDFLAGS="-L${LIB_DIR}"
28205                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28206         fi
28207 else
28208         # the next lines are needed for linking libtic over libncurses
28209         TINFO_NAME=${LIB_NAME}
28210         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28211         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28212         if test "x$with_tic_depends" = xyes ; then
28213                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28214         else
28215                 TICS_LIST="$SHLIB_LIST"
28216         fi
28217
28218         TINFO_LDFLAGS="-L${LIB_DIR}"
28219         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28220 fi
28221
28222 if test "$DFT_LWR_MODEL" = shared ; then
28223         case "$cf_cv_system_name" in
28224         (cygwin*|msys*)
28225                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28226                 TINFO_SUFFIX=.dll
28227                 ;;
28228         esac
28229 fi
28230
28231 if test "x$with_dlsym" = xyes ; then
28232
28233 # remove dl library from $TICS_LIST
28234 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28235
28236 fi
28237
28238 if test "$DFT_LWR_MODEL" = "libtool"; then
28239         OBJEXT=lo
28240 fi
28241
28242 # needed for Ada95
28243 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28244
28245 case "$DFT_LWR_MODEL" in
28246 (normal|debug|profile)
28247
28248 if test "$GCC" = yes ; then
28249         case "$cf_cv_system_name" in
28250         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28251                 LDFLAGS_STATIC=
28252                 LDFLAGS_SHARED=
28253                 ;;
28254         (*)     # normally, except when broken
28255                 LDFLAGS_STATIC=-static
28256                 LDFLAGS_SHARED=-dynamic
28257                 ;;
28258         esac
28259 else
28260         case "$cf_cv_system_name" in
28261         (aix[4-7]*)     # from ld manpage
28262                 LDFLAGS_STATIC=-bstatic
28263                 LDFLAGS_SHARED=-bdynamic
28264                 ;;
28265         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28266                 # We could also use just "archive" and "shared".
28267                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28268                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28269                 ;;
28270         (irix*)         # from ld manpage IRIX64
28271                 LDFLAGS_STATIC=-Bstatic
28272                 LDFLAGS_SHARED=-Bdynamic
28273                 ;;
28274         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28275                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28276                 LDFLAGS_STATIC=-noso
28277                 LDFLAGS_SHARED=-so_archive
28278                 ;;
28279         (solaris2*)
28280                 LDFLAGS_STATIC=-Bstatic
28281                 LDFLAGS_SHARED=-Bdynamic
28282                 ;;
28283         esac
28284 fi
28285
28286 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28287 then
28288         echo "$as_me:28288: checking if linker supports switching between static/dynamic" >&5
28289 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28290
28291         rm -f libconftest.a
28292         cat >conftest.$ac_ext <<EOF
28293 #line 28293 "configure"
28294 #include <stdio.h>
28295 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28296 EOF
28297         if { (eval echo "$as_me:28297: \"$ac_compile\"") >&5
28298   (eval $ac_compile) 2>&5
28299   ac_status=$?
28300   echo "$as_me:28300: \$? = $ac_status" >&5
28301   (exit "$ac_status"); } ; then
28302                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28303                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28304         fi
28305         rm -f conftest.*
28306
28307         cf_save_LIBS="$LIBS"
28308
28309         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28310         cat >"conftest.$ac_ext" <<_ACEOF
28311 #line 28311 "configure"
28312 #include "confdefs.h"
28313
28314 #line 28314 "configure"
28315 #include <stdio.h>
28316 int cf_ldflags_static(FILE *fp);
28317
28318 int
28319 main (void)
28320 {
28321
28322         return cf_ldflags_static(stdin);
28323
28324   ;
28325   return 0;
28326 }
28327 _ACEOF
28328 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28329 if { (eval echo "$as_me:28329: \"$ac_link\"") >&5
28330   (eval $ac_link) 2>&5
28331   ac_status=$?
28332   echo "$as_me:28332: \$? = $ac_status" >&5
28333   (exit "$ac_status"); } &&
28334          { ac_try='test -s "conftest$ac_exeext"'
28335   { (eval echo "$as_me:28335: \"$ac_try\"") >&5
28336   (eval $ac_try) 2>&5
28337   ac_status=$?
28338   echo "$as_me:28338: \$? = $ac_status" >&5
28339   (exit "$ac_status"); }; }; then
28340
28341         # some linkers simply ignore the -dynamic
28342         case x`file "conftest$ac_exeext" 2>/dev/null` in
28343         (*static*)
28344                 cf_ldflags_static=no
28345                 ;;
28346         (*)
28347                 cf_ldflags_static=yes
28348                 ;;
28349         esac
28350
28351 else
28352   echo "$as_me: failed program was:" >&5
28353 cat "conftest.$ac_ext" >&5
28354 cf_ldflags_static=no
28355 fi
28356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28357
28358         rm -f libconftest.*
28359         LIBS="$cf_save_LIBS"
28360
28361         echo "$as_me:28361: result: $cf_ldflags_static" >&5
28362 echo "${ECHO_T}$cf_ldflags_static" >&6
28363
28364         if test "$cf_ldflags_static" != yes
28365         then
28366                 LDFLAGS_STATIC=
28367                 LDFLAGS_SHARED=
28368         fi
28369 else
28370         LDFLAGS_STATIC=
28371         LDFLAGS_SHARED=
28372 fi
28373
28374         ;;
28375 esac
28376
28377 echo "$as_me:28377: checking where we will install curses.h" >&5
28378 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28379
28380 includesubdir=
28381 if test "$with_overwrite" = no && \
28382  { test "x$includedir" = 'x${prefix}/include' || \
28383    test "x$includedir" = "x${prefix}/include"; }
28384 then
28385         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28386 fi
28387 echo "$as_me:28387: result: ${includedir}${includesubdir}" >&5
28388 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28389
28390 ### Resolve a conflict between normal and wide-curses by forcing applications
28391 ### that will need libutf8 to add it to their configure script.
28392 if test "$with_overwrite" != no ; then
28393 if test "$NCURSES_LIBUTF8" = 1 ; then
28394         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28395         { echo "$as_me:28395: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28396 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28397 fi
28398 fi
28399 WITH_OVERWRITE=$with_overwrite
28400
28401 ### At least on MinGW a shared library build without libtool
28402 ### requires adding the additional libs to the link list.
28403 case "$cf_cv_system_name" in
28404 (*mingw32*|*mingw64*)
28405         if test "$DFT_LWR_MODEL" != "libtool"; then
28406            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28407         fi
28408         ;;
28409 *)      ;;
28410 esac
28411
28412 # used to separate tack out of the tree
28413 NCURSES_TREE=
28414
28415 ### predefined stuff for the test programs
28416
28417 cat >>confdefs.h <<\EOF
28418 #define HAVE_SLK_COLOR 1
28419 EOF
28420
28421 # pkgsrc uses these
28422
28423 echo "$as_me:28423: checking for desired basename for form library" >&5
28424 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28425
28426 # Check whether --with-form-libname or --without-form-libname was given.
28427 if test "${with_form_libname+set}" = set; then
28428   withval="$with_form_libname"
28429   with_lib_basename=$withval
28430 else
28431   with_lib_basename=form
28432 fi;
28433 FORM_NAME="$with_lib_basename"
28434
28435 case "x$FORM_NAME" in
28436 (x|xno|xnone|xyes)
28437         FORM_NAME=form
28438         ;;
28439 (*)
28440         ;;
28441 esac
28442
28443 echo "$as_me:28443: result: $FORM_NAME" >&5
28444 echo "${ECHO_T}$FORM_NAME" >&6
28445
28446 echo "$as_me:28446: checking for desired basename for menu library" >&5
28447 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28448
28449 # Check whether --with-menu-libname or --without-menu-libname was given.
28450 if test "${with_menu_libname+set}" = set; then
28451   withval="$with_menu_libname"
28452   with_lib_basename=$withval
28453 else
28454   with_lib_basename=menu
28455 fi;
28456 MENU_NAME="$with_lib_basename"
28457
28458 case "x$MENU_NAME" in
28459 (x|xno|xnone|xyes)
28460         MENU_NAME=menu
28461         ;;
28462 (*)
28463         ;;
28464 esac
28465
28466 echo "$as_me:28466: result: $MENU_NAME" >&5
28467 echo "${ECHO_T}$MENU_NAME" >&6
28468
28469 echo "$as_me:28469: checking for desired basename for panel library" >&5
28470 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28471
28472 # Check whether --with-panel-libname or --without-panel-libname was given.
28473 if test "${with_panel_libname+set}" = set; then
28474   withval="$with_panel_libname"
28475   with_lib_basename=$withval
28476 else
28477   with_lib_basename=panel
28478 fi;
28479 PANEL_NAME="$with_lib_basename"
28480
28481 case "x$PANEL_NAME" in
28482 (x|xno|xnone|xyes)
28483         PANEL_NAME=panel
28484         ;;
28485 (*)
28486         ;;
28487 esac
28488
28489 echo "$as_me:28489: result: $PANEL_NAME" >&5
28490 echo "${ECHO_T}$PANEL_NAME" >&6
28491
28492 echo "$as_me:28492: checking for desired basename for cxx library" >&5
28493 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28494
28495 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28496 if test "${with_cxx_libname+set}" = set; then
28497   withval="$with_cxx_libname"
28498   with_lib_basename=$withval
28499 else
28500   with_lib_basename=ncurses++
28501 fi;
28502 CXX_NAME="$with_lib_basename"
28503
28504 case "x$CXX_NAME" in
28505 (x|xno|xnone|xyes)
28506         CXX_NAME=ncurses++
28507         ;;
28508 (*)
28509         ;;
28510 esac
28511
28512 echo "$as_me:28512: result: $CXX_NAME" >&5
28513 echo "${ECHO_T}$CXX_NAME" >&6
28514
28515 ### Construct the list of subdirectories for which we'll customize makefiles
28516 ### with the appropriate compile-rules.
28517
28518 echo "$as_me:28518: checking for src modules" >&5
28519 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28520
28521 # dependencies and linker-arguments for test-programs
28522 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28523 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28524 if test "$DFT_LWR_MODEL" = "libtool"; then
28525         TEST_ARGS="${TEST_DEPS}"
28526         TEST_ARG2="${TEST_DEP2}"
28527 else
28528         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28529         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28530 fi
28531
28532 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28533 cf_cv_src_modules=
28534 for cf_dir in $modules_to_build
28535 do
28536         if test -f "$srcdir/$cf_dir/modules" ; then
28537
28538                 # We may/may not have tack in the distribution, though the
28539                 # makefile is.
28540                 if test "$cf_dir" = tack ; then
28541                         if test "x$cf_with_tack" != "xyes"; then
28542                                 continue
28543                         fi
28544                 fi
28545
28546                 if test -z "$cf_cv_src_modules"; then
28547                         cf_cv_src_modules=$cf_dir
28548                 else
28549                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28550                 fi
28551
28552                 # Make the ncurses_cfg.h file record the library interface files as
28553                 # well.  These are header files that are the same name as their
28554                 # directory.  Ncurses is the only library that does not follow
28555                 # that pattern.
28556                 if test "$cf_dir" = tack ; then
28557                         continue
28558                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28559
28560 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28561
28562                         cat >>confdefs.h <<EOF
28563 #define HAVE_${cf_have_include}_H 1
28564 EOF
28565
28566                         cat >>confdefs.h <<EOF
28567 #define HAVE_LIB${cf_have_include} 1
28568 EOF
28569
28570 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28571
28572 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28573
28574                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28575                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28576                         if test "$DFT_LWR_MODEL" = "libtool"; then
28577                                 TEST_ARGS="${TEST_DEPS}"
28578                                 TEST_ARG2="${TEST_DEP2}"
28579                         else
28580                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28581                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28582                         fi
28583                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28584                 fi
28585         fi
28586 done
28587 echo "$as_me:28587: result: $cf_cv_src_modules" >&5
28588 echo "${ECHO_T}$cf_cv_src_modules" >&6
28589
28590 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28591 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28592
28593 SRC_SUBDIRS=
28594 if test "x$cf_with_manpages" != xno ; then
28595         SRC_SUBDIRS="$SRC_SUBDIRS man"
28596 fi
28597 SRC_SUBDIRS="$SRC_SUBDIRS include"
28598 for cf_dir in $cf_cv_src_modules
28599 do
28600         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28601 done
28602 if test "x$cf_with_tests" != "xno" ; then
28603         SRC_SUBDIRS="$SRC_SUBDIRS test"
28604 fi
28605 # always make this, to install the ncurses-config script
28606 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28607 if test "$cf_with_cxx_binding" != no; then
28608         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28609         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28610 fi
28611
28612 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28613 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28614
28615 ADA_SUBDIRS=
28616 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28617         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28618         ADA_SUBDIRS="gen src"
28619         if test "x$cf_with_tests" != "xno" ; then
28620                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28621         fi
28622 fi
28623
28624 SUB_MAKEFILES=
28625 for cf_dir in $SRC_SUBDIRS
28626 do
28627         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28628 done
28629
28630 if test -n "$ADA_SUBDIRS"; then
28631         for cf_dir in $ADA_SUBDIRS
28632         do
28633                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28634         done
28635
28636 fi
28637
28638 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28639    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28640    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28641    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28642 fi
28643
28644 DIRS_TO_MAKE="lib"
28645 for cf_item in $cf_list_models
28646 do
28647
28648         case $cf_item in
28649         (libtool) cf_subdir='obj_lo'  ;;
28650         (normal)  cf_subdir='objects' ;;
28651         (debug)   cf_subdir='obj_g' ;;
28652         (profile) cf_subdir='obj_p' ;;
28653         (shared)
28654                 case "$cf_cv_system_name" in
28655                 (cygwin|msys)
28656                         cf_subdir='objects' ;;
28657                 (*)
28658                         cf_subdir='obj_s' ;;
28659                 esac
28660         esac
28661
28662         for cf_item2 in $DIRS_TO_MAKE
28663         do
28664                 test "$cf_item2" = "$cf_subdir" && break
28665         done
28666         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28667 done
28668 for cf_dir in $DIRS_TO_MAKE
28669 do
28670         test ! -d "$cf_dir" && mkdir "$cf_dir"
28671 done
28672
28673 # symbols that differ when compiling Ada95 by itself.
28674 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28675
28676 # values to use as strings
28677
28678 cat >>confdefs.h <<EOF
28679 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28680 EOF
28681
28682 cat >>confdefs.h <<EOF
28683 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28684 EOF
28685
28686 ### Define substitutions for header files to avoid name-pollution
28687
28688 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28689         HAVE_TCGETATTR=1
28690 else
28691         HAVE_TCGETATTR=0
28692 fi
28693
28694 if test "x$ac_cv_header_stdint_h" = xyes ; then
28695         HAVE_STDINT_H=1
28696 else
28697         HAVE_STDINT_H=0
28698 fi
28699
28700 if test "x$ac_cv_header_termio_h" = xyes ; then
28701         HAVE_TERMIO_H=1
28702 else
28703         HAVE_TERMIO_H=0
28704 fi
28705
28706 if test "x$ac_cv_header_termios_h" = xyes ; then
28707         HAVE_TERMIOS_H=1
28708 else
28709         HAVE_TERMIOS_H=0
28710 fi
28711
28712 ################################################################################
28713 test "x$use_database" = xyes && \
28714 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28715
28716 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28717 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28718
28719 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28720 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28721 fi
28722
28723 if test "x$cf_with_tests" != xno ; then
28724         MAKE_TESTS=
28725 else
28726         MAKE_TESTS="#"
28727 fi
28728
28729 ADAHTML_DIR=../../doc/html/ada
28730
28731 # workaround for OS/2 (20151017)
28732 case "$cf_cv_system_name" in
28733 (os2*)
28734         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28735         ;;
28736 (*)
28737         LIBTOOL_OPTS_CXX=
28738         ;;
28739 esac
28740
28741 # workaround for g++ versus Solaris (20131116)
28742 case "$cf_cv_system_name" in
28743 (solaris2*)
28744         case "x$CPPFLAGS" in
28745         (*-D_XOPEN_SOURCE_EXTENDED*)
28746                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28747
28748 echo "${as_me:-configure}:28748: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28749
28750                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28751                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28752                 ;;
28753         esac
28754         ;;
28755 esac
28756
28757 # Help to automatically enable the extended curses features when using either
28758 # the *-config or the ".pc" files by adding defines.
28759 echo "$as_me:28759: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28760 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28761 PKG_CFLAGS=
28762 for cf_loop1 in $CPPFLAGS_after_XOPEN
28763 do
28764         cf_found=no
28765         for cf_loop2 in $CPPFLAGS_before_XOPEN
28766         do
28767                 if test "x$cf_loop1" = "x$cf_loop2"
28768                 then
28769                         cf_found=yes
28770                         break
28771                 fi
28772         done
28773         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28774 done
28775 echo "$as_me:28775: result: $PKG_CFLAGS" >&5
28776 echo "${ECHO_T}$PKG_CFLAGS" >&6
28777
28778 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28779 case "x$NCURSES_OSPEED" in
28780 (*short*)
28781         cf_compatible=1
28782         ;;
28783 (*)
28784         cf_compatible=0
28785         ;;
28786 esac
28787
28788 cat >>confdefs.h <<EOF
28789 #define NCURSES_OSPEED_COMPAT $cf_compatible
28790 EOF
28791
28792 case "x$cf_cv_typeof_chtype" in
28793 (xshort|xint|xlong)
28794         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28795         ;;
28796 esac
28797
28798 case "x$cf_cv_typeof_mmask_t" in
28799 (xshort|xint|xlong)
28800         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28801         ;;
28802 esac
28803
28804 # substitute into misc/Makefile to suppress
28805 # (un)install.data from the
28806 # (un)install rules.
28807 if test "x$cf_with_db_install" = "xno"; then
28808         MISC_INSTALL_DATA=
28809         MISC_UNINSTALL_DATA=
28810 else
28811         MISC_INSTALL_DATA=install.data
28812         MISC_UNINSTALL_DATA=uninstall.data
28813 fi
28814
28815 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28816         MAKE_DATABASE="#"
28817 else
28818         MAKE_DATABASE="$MAKE_TERMINFO"
28819 fi
28820
28821 if test -n "$PACKAGE"
28822 then
28823         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28824         export PACKAGE
28825         echo "package: $PACKAGE"
28826 fi
28827
28828 UNALTERED_SYMS=
28829 cf_filter_syms=no
28830
28831 if test -n "$RESULTING_SYMS"
28832 then
28833         cf_filter_syms=$cf_dft_filter_syms
28834         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28835
28836 echo "${as_me:-configure}:28836: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28837
28838 fi
28839
28840 if test "x$WILDCARD_SYMS" = xno
28841 then
28842         cf_filter_syms=yes
28843 fi
28844
28845 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28846
28847 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28848 if test "$cf_filter_syms" = yes
28849 then
28850         RESULTING_SYMS=resulting.map
28851 fi
28852
28853 if test "x$cross_compiling" = xyes ; then
28854         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28855         CHECK_BUILD="#"
28856 else
28857         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28858         CHECK_BUILD=
28859 fi
28860
28861 # This is used for the *-config script and *.pc data files.
28862
28863 echo "$as_me:28863: checking for linker search path" >&5
28864 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28865 if test "${cf_cv_ld_searchpath+set}" = set; then
28866   echo $ECHO_N "(cached) $ECHO_C" >&6
28867 else
28868
28869 if test "$cross_compiling" != yes ; then
28870
28871 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28872 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28873
28874 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28875 # update the cache, which makes it run faster.
28876 test -z "$cf_pathlist" && \
28877         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28878
28879 test -z "$cf_pathlist" &&
28880         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28881
28882 # This works with OpenBSD 6.5, which lists only filenames
28883 test -z "$cf_pathlist" &&
28884         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28885
28886 if test -z "$cf_pathlist"
28887 then
28888         # dyld default path with MacOS
28889         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28890         then
28891                 # do this to bypass check
28892                 cf_cv_ld_searchpath='$HOME/lib'
28893                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28894         fi
28895 fi
28896
28897 if test -z "$cf_pathlist"
28898 then
28899         # Solaris is "SunOS"
28900         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28901         then
28902                 case x`(isainfo -b)` in
28903                 (x64)
28904                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28905                         ;;
28906                 (x32)
28907                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28908                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28909                         ;;
28910                 (*)
28911                         { echo "$as_me:28911: WARNING: problem with Solaris architecture" >&5
28912 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28913                         ;;
28914                 esac
28915         fi
28916 fi
28917
28918 if test -z "$cf_pathlist"
28919 then
28920         # HP-UX
28921         if test x"`uname -s`" = xHP-UX
28922         then
28923                 case x`getconf LONG_BIT` in
28924                 (x64)
28925                         cf_pathlist="/usr/lib/hpux64"
28926                         ;;
28927                 (x*)
28928                         cf_pathlist="/usr/lib/hpux32"
28929                         ;;
28930                 esac
28931         fi
28932 fi
28933
28934 fi
28935
28936 # If nothing else, assume it is conventional
28937 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28938
28939 # Finally, check that this is only directories
28940 for cf_path in $0 $cf_pathlist
28941 do
28942         if test -d "$cf_path"; then
28943                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28944                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28945         fi
28946 done
28947
28948 # Ensure that it is nonempty
28949 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28950
28951 fi
28952 echo "$as_me:28952: result: $cf_cv_ld_searchpath" >&5
28953 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28954
28955 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28956
28957 cat >>confdefs.h <<\EOF
28958 #define HAVE_CURSES_DATA_BOOLNAMES 1
28959 EOF
28960
28961 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"
28962 ac_config_commands="$ac_config_commands default"
28963 cat >confcache <<\_ACEOF
28964 # This file is a shell script that caches the results of configure
28965 # tests run on this system so they can be shared between configure
28966 # scripts and configure runs, see configure's option --config-cache.
28967 # It is not useful on other systems.  If it contains results you don't
28968 # want to keep, you may remove or edit it.
28969 #
28970 # config.status only pays attention to the cache file if you give it
28971 # the --recheck option to rerun configure.
28972 #
28973 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28974 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28975 # following values.
28976
28977 _ACEOF
28978
28979 # The following way of writing the cache mishandles newlines in values,
28980 # but we know of no workaround that is simple, portable, and efficient.
28981 # So, don't put newlines in cache variables' values.
28982 # Ultrix sh set writes to stderr and can't be redirected directly,
28983 # and sets the high bit in the cache file unless we assign to the vars.
28984 {
28985   (set) 2>&1 |
28986     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28987     *ac_space=\ *)
28988       # `set' does not quote correctly, so add quotes (double-quote
28989       # substitution turns \\\\ into \\, and sed turns \\ into \).
28990       sed -n \
28991         "s/'/'\\\\''/g;
28992           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28993       ;;
28994     *)
28995       # `set' quotes correctly as required by POSIX, so do not add quotes.
28996       sed -n \
28997         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28998       ;;
28999     esac;
29000 } |
29001   sed '
29002      t clear
29003      : clear
29004      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29005      t end
29006      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29007      : end' >>confcache
29008 if cmp -s $cache_file confcache; then :; else
29009   if test -w $cache_file; then
29010     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29011     cat confcache >$cache_file
29012   else
29013     echo "not updating unwritable cache $cache_file"
29014   fi
29015 fi
29016 rm -f confcache
29017
29018 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29019 # Let make expand exec_prefix.
29020 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29021
29022 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29023 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29024 # trailing colons and then remove the whole line if VPATH becomes empty
29025 # (actually we leave an empty line to preserve line numbers).
29026 if test "x$srcdir" = x.; then
29027   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29028 s/:*\$(srcdir):*/:/;
29029 s/:*\${srcdir}:*/:/;
29030 s/:*@srcdir@:*/:/;
29031 s/^\([^=]*=[    ]*\):*/\1/;
29032 s/:*$//;
29033 s/^[^=]*=[      ]*$//;
29034 }'
29035 fi
29036
29037 DEFS=-DHAVE_CONFIG_H
29038
29039 : "${CONFIG_STATUS=./config.status}"
29040 ac_clean_files_save=$ac_clean_files
29041 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29042 { echo "$as_me:29042: creating $CONFIG_STATUS" >&5
29043 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29044 cat >"$CONFIG_STATUS" <<_ACEOF
29045 #! $SHELL
29046 # Generated automatically by configure.
29047 # Run this file to recreate the current configuration.
29048 # Compiler output produced by configure, useful for debugging
29049 # configure, is in config.log if it exists.
29050
29051 debug=false
29052 SHELL=\${CONFIG_SHELL-$SHELL}
29053 ac_cs_invocation="\$0 \$@"
29054
29055 CLICOLOR_FORCE= GREP_OPTIONS=
29056 unset CLICOLOR_FORCE GREP_OPTIONS
29057 _ACEOF
29058
29059 cat >>"$CONFIG_STATUS" <<\_ACEOF
29060 # Be Bourne compatible
29061 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29062   emulate sh
29063   NULLCMD=:
29064 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29065   set -o posix
29066 fi
29067
29068 # Name of the executable.
29069 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29070
29071 if expr a : '\(a\)' >/dev/null 2>&1; then
29072   as_expr=expr
29073 else
29074   as_expr=false
29075 fi
29076
29077 rm -f conf$$ conf$$.exe conf$$.file
29078 echo >conf$$.file
29079 if ln -s conf$$.file conf$$ 2>/dev/null; then
29080   # We could just check for DJGPP; but this test a) works b) is more generic
29081   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29082   if test -f conf$$.exe; then
29083     # Don't use ln at all; we don't have any links
29084     as_ln_s='cp -p'
29085   else
29086     as_ln_s='ln -s'
29087   fi
29088 elif ln conf$$.file conf$$ 2>/dev/null; then
29089   as_ln_s=ln
29090 else
29091   as_ln_s='cp -p'
29092 fi
29093 rm -f conf$$ conf$$.exe conf$$.file
29094
29095 as_executable_p="test -f"
29096
29097 # Support unset when possible.
29098 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29099   as_unset="unset"
29100 else
29101   as_unset="false"
29102 fi
29103
29104 # NLS nuisances.
29105 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29106 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29107 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29108 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29109 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29110 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29111 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29112 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29113
29114 # IFS
29115 # We need space, tab and new line, in precisely that order.
29116 as_nl='
29117 '
29118 IFS="   $as_nl"
29119
29120 # CDPATH.
29121 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29122
29123 exec 6>&1
29124
29125 _ACEOF
29126
29127 # Files that config.status was made for.
29128 if test -n "$ac_config_files"; then
29129   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29130 fi
29131
29132 if test -n "$ac_config_headers"; then
29133   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29134 fi
29135
29136 if test -n "$ac_config_links"; then
29137   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29138 fi
29139
29140 if test -n "$ac_config_commands"; then
29141   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29142 fi
29143
29144 cat >>"$CONFIG_STATUS" <<\EOF
29145
29146 ac_cs_usage="\
29147 \`$as_me' instantiates files from templates according to the
29148 current configuration.
29149
29150 Usage: $0 [OPTIONS] [FILE]...
29151
29152   -h, --help       print this help, then exit
29153   -V, --version    print version number, then exit
29154   -d, --debug      don't remove temporary files
29155       --recheck    update $as_me by reconfiguring in the same conditions
29156   --file=FILE[:TEMPLATE]
29157                    instantiate the configuration file FILE
29158   --header=FILE[:TEMPLATE]
29159                    instantiate the configuration header FILE
29160
29161 Configuration files:
29162 $config_files
29163
29164 Configuration headers:
29165 $config_headers
29166
29167 Configuration commands:
29168 $config_commands
29169
29170 Report bugs to <dickey@invisible-island.net>."
29171 EOF
29172
29173 cat >>"$CONFIG_STATUS" <<EOF
29174 ac_cs_version="\\
29175 config.status
29176 configured by $0, generated by GNU Autoconf 2.52.20210509,
29177   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29178
29179 Copyright 2003-2020,2021        Thomas E. Dickey
29180 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29181 Free Software Foundation, Inc.
29182 This config.status script is free software; the Free Software Foundation
29183 gives unlimited permission to copy, distribute and modify it."
29184 srcdir="$srcdir"
29185 INSTALL="$INSTALL"
29186 EOF
29187
29188 cat >>"$CONFIG_STATUS" <<\EOF
29189 # If no file are specified by the user, then we need to provide default
29190 # value.  By we need to know if files were specified by the user.
29191 ac_need_defaults=:
29192 while test $# != 0
29193 do
29194   case $1 in
29195   --*=*)
29196     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29197     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29198     shift
29199     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29200     shift
29201     ;;
29202   -*);;
29203   *) # This is not an option, so the user has probably given explicit
29204      # arguments.
29205      ac_need_defaults=false;;
29206   esac
29207
29208   case $1 in
29209   # Handling of the options.
29210 EOF
29211 cat >>"$CONFIG_STATUS" <<EOF
29212   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29213     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29214     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29215 EOF
29216 cat >>"$CONFIG_STATUS" <<\EOF
29217   --version | --vers* | -V )
29218     echo "$ac_cs_version"; exit 0 ;;
29219   --he | --h)
29220     # Conflict between --help and --header
29221     { { echo "$as_me:29221: error: ambiguous option: $1
29222 Try \`$0 --help' for more information." >&5
29223 echo "$as_me: error: ambiguous option: $1
29224 Try \`$0 --help' for more information." >&2;}
29225    { (exit 1); exit 1; }; };;
29226   --help | --hel | -h )
29227     echo "$ac_cs_usage"; exit 0 ;;
29228   --debug | --d* | -d )
29229     debug=: ;;
29230   --file | --fil | --fi | --f )
29231     shift
29232     CONFIG_FILES="$CONFIG_FILES $1"
29233     ac_need_defaults=false;;
29234   --header | --heade | --head | --hea )
29235     shift
29236     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29237     ac_need_defaults=false;;
29238
29239   # This is an error.
29240   -*) { { echo "$as_me:29240: error: unrecognized option: $1
29241 Try \`$0 --help' for more information." >&5
29242 echo "$as_me: error: unrecognized option: $1
29243 Try \`$0 --help' for more information." >&2;}
29244    { (exit 1); exit 1; }; } ;;
29245
29246   *) ac_config_targets="$ac_config_targets $1" ;;
29247
29248   esac
29249   shift
29250 done
29251
29252 exec 5>>config.log
29253 cat >&5 << _ACEOF
29254
29255 ## ----------------------- ##
29256 ## Running config.status.  ##
29257 ## ----------------------- ##
29258
29259 This file was extended by $as_me 2.52.20210509, executed with
29260   CONFIG_FILES    = $CONFIG_FILES
29261   CONFIG_HEADERS  = $CONFIG_HEADERS
29262   CONFIG_LINKS    = $CONFIG_LINKS
29263   CONFIG_COMMANDS = $CONFIG_COMMANDS
29264   > "$ac_cs_invocation"
29265 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29266
29267 _ACEOF
29268 EOF
29269
29270 cat >>"$CONFIG_STATUS" <<EOF
29271 #
29272 # INIT-COMMANDS section.
29273 #
29274
29275 ### Special initialization commands, used to pass information from the
29276 ### configuration-run into config.status
29277
29278 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29279 AWK="$AWK"
29280 CXX_NAME="$CXX_NAME"
29281 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29282 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29283 ECHO_LD="$ECHO_LD"
29284 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29285 FORM_NAME="$FORM_NAME"
29286 LDCONFIG="$LDCONFIG"
29287 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29288 LIB_NAME="$LIB_NAME"
29289 LIB_PREFIX="$LIB_PREFIX"
29290 LIB_SUBSETS="$LIB_SUBSETS"
29291 LIB_SUFFIX="$LIB_SUFFIX"
29292 LIB_TRACING="$LIB_TRACING"
29293 LN_S="$LN_S"
29294 MAKE_TERMINFO="$MAKE_TERMINFO"
29295 MENU_NAME="$MENU_NAME"
29296 NCURSES_MAJOR="$NCURSES_MAJOR"
29297 NCURSES_MINOR="$NCURSES_MINOR"
29298 NCURSES_OSPEED="$NCURSES_OSPEED"
29299 NCURSES_PATCH="$NCURSES_PATCH"
29300 PANEL_NAME="$PANEL_NAME"
29301 SRC_SUBDIRS="$SRC_SUBDIRS"
29302 TERMINFO="$TERMINFO"
29303 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29304 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29305 TICS_NAME="$TICS_NAME"
29306 TICS_SUFFIX="$TICS_SUFFIX"
29307 TIC_PATH="$TIC_PATH"
29308 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29309 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29310 TINFO_NAME="$TINFO_NAME"
29311 TINFO_SUFFIX="$TINFO_SUFFIX"
29312 UNALTERED_SYMS="$UNALTERED_SYMS"
29313 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29314 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29315 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29316 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29317 WILDCARD_SYMS="$WILDCARD_SYMS"
29318 WITH_CURSES_H="$with_curses_h"
29319 WITH_ECHO="${enable_echo:=yes}"
29320 WITH_OVERWRITE="$with_overwrite"
29321 cf_LIST_MODELS="$cf_list_models"
29322 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29323 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29324 cf_cv_abi_version="$cf_cv_abi_version"
29325 cf_cv_do_relink="$cf_cv_do_relink"
29326 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29327 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29328 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29329 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29330 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29331 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29332 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29333 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29334 cf_cv_rel_version="$cf_cv_rel_version"
29335 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29336 cf_cv_shared_soname='$cf_cv_shared_soname'
29337 cf_cv_shlib_version="$cf_cv_shlib_version"
29338 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29339 cf_cv_system_name="$cf_cv_system_name"
29340 cf_cv_term_driver="$with_term_driver"
29341 cf_with_ada="$cf_with_ada"
29342 cf_with_cxx_binding="$cf_with_cxx_binding"
29343 cf_with_db_install="$cf_with_db_install"
29344 cf_with_manpages="$cf_with_manpages"
29345 cf_with_tests="$cf_with_tests"
29346 host="$host"
29347 target="$target"
29348 with_shared_cxx="$with_shared_cxx"
29349
29350 EOF
29351
29352 cat >>"$CONFIG_STATUS" <<\EOF
29353 for ac_config_target in $ac_config_targets
29354 do
29355   case "$ac_config_target" in
29356   # Handling of arguments.
29357   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29358   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29359   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29360   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29361   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29362   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29363   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29364   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29365   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29366   *) { { echo "$as_me:29366: error: invalid argument: $ac_config_target" >&5
29367 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29368    { (exit 1); exit 1; }; };;
29369   esac
29370 done
29371
29372 # If the user did not use the arguments to specify the items to instantiate,
29373 # then the envvar interface is used.  Set only those that are not.
29374 # We use the long form for the default assignment because of an extremely
29375 # bizarre bug on SunOS 4.1.3.
29376 if "$ac_need_defaults"; then
29377   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29378   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29379   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29380 fi
29381
29382 # Create a temporary directory, and hook for its removal unless debugging.
29383 $debug ||
29384 {
29385   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29386   trap '{ (exit 1); exit 1; }' 1 2 13 15
29387 }
29388
29389 # Create a (secure) tmp directory for tmp files.
29390 : ${TMPDIR=/tmp}
29391 {
29392   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29393   test -n "$tmp" && test -d "$tmp"
29394 }  ||
29395 {
29396   tmp=$TMPDIR/cs$$-$RANDOM
29397   (umask 077 && mkdir $tmp)
29398 } ||
29399 {
29400    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29401    { (exit 1); exit 1; }
29402 }
29403
29404 EOF
29405
29406 cat >>"$CONFIG_STATUS" <<EOF
29407
29408 #
29409 # CONFIG_FILES section.
29410 #
29411
29412 # No need to generate the scripts if there are no CONFIG_FILES.
29413 # This happens for instance when ./config.status config.h
29414 if test -n "\$CONFIG_FILES"; then
29415   # Protect against being on the right side of a sed subst in config.status.
29416   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29417    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29418 s,@SHELL@,$SHELL,;t t
29419 s,@exec_prefix@,$exec_prefix,;t t
29420 s,@prefix@,$prefix,;t t
29421 s,@program_transform_name@,$program_transform_name,;t t
29422 s,@bindir@,$bindir,;t t
29423 s,@sbindir@,$sbindir,;t t
29424 s,@libexecdir@,$libexecdir,;t t
29425 s,@datarootdir@,$datarootdir,;t t
29426 s,@datadir@,$datadir,;t t
29427 s,@sysconfdir@,$sysconfdir,;t t
29428 s,@sharedstatedir@,$sharedstatedir,;t t
29429 s,@localstatedir@,$localstatedir,;t t
29430 s,@runstatedir@,$runstatedir,;t t
29431 s,@libdir@,$libdir,;t t
29432 s,@includedir@,$includedir,;t t
29433 s,@oldincludedir@,$oldincludedir,;t t
29434 s,@infodir@,$infodir,;t t
29435 s,@mandir@,$mandir,;t t
29436 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29437 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29438 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29439 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29440 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29441 s,@build_alias@,$build_alias,;t t
29442 s,@host_alias@,$host_alias,;t t
29443 s,@target_alias@,$target_alias,;t t
29444 s,@ECHO_C@,$ECHO_C,;t t
29445 s,@ECHO_N@,$ECHO_N,;t t
29446 s,@ECHO_T@,$ECHO_T,;t t
29447 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29448 s,@DEFS@,$DEFS,;t t
29449 s,@LIBS@,$LIBS,;t t
29450 s,@top_builddir@,$top_builddir,;t t
29451 s,@GREP@,$GREP,;t t
29452 s,@EGREP@,$EGREP,;t t
29453 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29454 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29455 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29456 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29457 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29458 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29459 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29460 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29461 s,@VERSION@,$VERSION,;t t
29462 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29463 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29464 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29465 s,@PACKAGE@,$PACKAGE,;t t
29466 s,@build@,$build,;t t
29467 s,@build_cpu@,$build_cpu,;t t
29468 s,@build_vendor@,$build_vendor,;t t
29469 s,@build_os@,$build_os,;t t
29470 s,@host@,$host,;t t
29471 s,@host_cpu@,$host_cpu,;t t
29472 s,@host_vendor@,$host_vendor,;t t
29473 s,@host_os@,$host_os,;t t
29474 s,@target@,$target,;t t
29475 s,@target_cpu@,$target_cpu,;t t
29476 s,@target_vendor@,$target_vendor,;t t
29477 s,@target_os@,$target_os,;t t
29478 s,@FGREP@,$FGREP,;t t
29479 s,@CC@,$CC,;t t
29480 s,@CFLAGS@,$CFLAGS,;t t
29481 s,@LDFLAGS@,$LDFLAGS,;t t
29482 s,@CPPFLAGS@,$CPPFLAGS,;t t
29483 s,@ac_ct_CC@,$ac_ct_CC,;t t
29484 s,@EXEEXT@,$EXEEXT,;t t
29485 s,@OBJEXT@,$OBJEXT,;t t
29486 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29487 s,@CPP@,$CPP,;t t
29488 s,@LDCONFIG@,$LDCONFIG,;t t
29489 s,@CXX@,$CXX,;t t
29490 s,@CXXFLAGS@,$CXXFLAGS,;t t
29491 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29492 s,@AWK@,$AWK,;t t
29493 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29494 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29495 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29496 s,@LINT@,$LINT,;t t
29497 s,@LINT_OPTS@,$LINT_OPTS,;t t
29498 s,@LN_S@,$LN_S,;t t
29499 s,@cf_config_suffix@,$cf_config_suffix,;t t
29500 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29501 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29502 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29503 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29504 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29505 s,@SET_MAKE@,$SET_MAKE,;t t
29506 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29507 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29508 s,@CTAGS@,$CTAGS,;t t
29509 s,@ETAGS@,$ETAGS,;t t
29510 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29511 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29512 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29513 s,@RANLIB@,$RANLIB,;t t
29514 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29515 s,@LD@,$LD,;t t
29516 s,@ac_ct_LD@,$ac_ct_LD,;t t
29517 s,@AR@,$AR,;t t
29518 s,@ac_ct_AR@,$ac_ct_AR,;t t
29519 s,@NM@,$NM,;t t
29520 s,@ac_ct_NM@,$ac_ct_NM,;t t
29521 s,@ARFLAGS@,$ARFLAGS,;t t
29522 s,@DESTDIR@,$DESTDIR,;t t
29523 s,@BUILD_CC@,$BUILD_CC,;t t
29524 s,@BUILD_CPP@,$BUILD_CPP,;t t
29525 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29526 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29527 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29528 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29529 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29530 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29531 s,@cf_list_models@,$cf_list_models,;t t
29532 s,@ABI_VERSION@,$ABI_VERSION,;t t
29533 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29534 s,@LIBTOOL@,$LIBTOOL,;t t
29535 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29536 s,@LT_UNDEF@,$LT_UNDEF,;t t
29537 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29538 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29539 s,@LIB_CREATE@,$LIB_CREATE,;t t
29540 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29541 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29542 s,@LIB_PREP@,$LIB_PREP,;t t
29543 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29544 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29545 s,@LIB_LINK@,$LIB_LINK,;t t
29546 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29547 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29548 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29549 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29550 s,@TICS_NAME@,$TICS_NAME,;t t
29551 s,@TINFO_NAME@,$TINFO_NAME,;t t
29552 s,@LIB_NAME@,$LIB_NAME,;t t
29553 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29554 s,@CC_G_OPT@,$CC_G_OPT,;t t
29555 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29556 s,@LD_MODEL@,$LD_MODEL,;t t
29557 s,@shlibdir@,$shlibdir,;t t
29558 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29559 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29560 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29561 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29562 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29563 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29564 s,@LINK_PROGS@,$LINK_PROGS,;t t
29565 s,@LINK_TESTS@,$LINK_TESTS,;t t
29566 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29567 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29568 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29569 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29570 s,@RPATH_LIST@,$RPATH_LIST,;t t
29571 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29572 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29573 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29574 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29575 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29576 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29577 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29578 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29579 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29580 s,@TIC@,$TIC,;t t
29581 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29582 s,@INFOCMP@,$INFOCMP,;t t
29583 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29584 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29585 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29586 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29587 s,@XTERM_KBS@,$XTERM_KBS,;t t
29588 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29589 s,@TERMINFO@,$TERMINFO,;t t
29590 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29591 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29592 s,@TERMPATH@,$TERMPATH,;t t
29593 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29594 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29595 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29596 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29597 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29598 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29599 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29600 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29601 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29602 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29603 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29604 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29605 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29606 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29607 s,@RGB_PATH@,$RGB_PATH,;t t
29608 s,@no_x11_rgb@,$no_x11_rgb,;t t
29609 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29610 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29611 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29612 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29613 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29614 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29615 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29616 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29617 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29618 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29619 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29620 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29621 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29622 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29623 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29624 s,@PTHREAD@,$PTHREAD,;t t
29625 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29626 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29627 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29628 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29629 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29630 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29631 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29632 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29633 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29634 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29635 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29636 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29637 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29638 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29639 s,@ECHO_LT@,$ECHO_LT,;t t
29640 s,@ECHO_LD@,$ECHO_LD,;t t
29641 s,@RULE_CC@,$RULE_CC,;t t
29642 s,@SHOW_CC@,$SHOW_CC,;t t
29643 s,@ECHO_CC@,$ECHO_CC,;t t
29644 s,@ECHO_LINK@,$ECHO_LINK,;t t
29645 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29646 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29647 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29648 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29649 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29650 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29651 s,@ADAFLAGS@,$ADAFLAGS,;t t
29652 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29653 s,@ADA_TRACE@,$ADA_TRACE,;t t
29654 s,@MATH_LIB@,$MATH_LIB,;t t
29655 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29656 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29657 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29658 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29659 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29660 s,@TEST_LIBS@,$TEST_LIBS,;t t
29661 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29662 s,@CXXCPP@,$CXXCPP,;t t
29663 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29664 s,@CXX_AR@,$CXX_AR,;t t
29665 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29666 s,@CXXLIBS@,$CXXLIBS,;t t
29667 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29668 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29669 s,@M4_exists@,$M4_exists,;t t
29670 s,@cf_ada_make@,$cf_ada_make,;t t
29671 s,@cf_ada_config@,$cf_ada_config,;t t
29672 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29673 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29674 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29675 s,@cf_compile_generics@,$cf_compile_generics,;t t
29676 s,@cf_generic_objects@,$cf_generic_objects,;t t
29677 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29678 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29679 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29680 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29681 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29682 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29683 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29684 s,@cf_ada_package@,$cf_ada_package,;t t
29685 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29686 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29687 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29688 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29689 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29690 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29691 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29692 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29693 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29694 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29695 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29696 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29697 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29698 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29699 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29700 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29701 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29702 s,@TICS_LIBS@,$TICS_LIBS,;t t
29703 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29704 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29705 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29706 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29707 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29708 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29709 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29710 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29711 s,@includesubdir@,$includesubdir,;t t
29712 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29713 s,@TICS_LIST@,$TICS_LIST,;t t
29714 s,@TINFO_LIST@,$TINFO_LIST,;t t
29715 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29716 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29717 s,@FORM_NAME@,$FORM_NAME,;t t
29718 s,@MENU_NAME@,$MENU_NAME,;t t
29719 s,@PANEL_NAME@,$PANEL_NAME,;t t
29720 s,@CXX_NAME@,$CXX_NAME,;t t
29721 s,@TEST_ARGS@,$TEST_ARGS,;t t
29722 s,@TEST_DEPS@,$TEST_DEPS,;t t
29723 s,@TEST_ARG2@,$TEST_ARG2,;t t
29724 s,@TEST_DEP2@,$TEST_DEP2,;t t
29725 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29726 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29727 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29728 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29729 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29730 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29731 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29732 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29733 s,@cross_compiling@,$cross_compiling,;t t
29734 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29735 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29736 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29737 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29738 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29739 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29740 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29741 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29742 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29743 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29744 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29745 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29746 CEOF
29747
29748 EOF
29749
29750   cat >>"$CONFIG_STATUS" <<\EOF
29751   # Split the substitutions into bite-sized pieces for seds with
29752   # small command number limits, like on Digital OSF/1 and HP-UX.
29753   ac_max_sed_lines=48
29754   ac_sed_frag=1 # Number of current file.
29755   ac_beg=1 # First line for current file.
29756   ac_end=$ac_max_sed_lines # Line after last line for current file.
29757   ac_more_lines=:
29758   ac_sed_cmds=
29759   while "$ac_more_lines"; do
29760     if test "$ac_beg" -gt 1; then
29761       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29762     else
29763       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29764     fi
29765     if test ! -s $tmp/subs.frag; then
29766       ac_more_lines=false
29767     else
29768       # The purpose of the label and of the branching condition is to
29769       # speed up the sed processing (if there are no `@' at all, there
29770       # is no need to browse any of the substitutions).
29771       # These are the two extra sed commands mentioned above.
29772       (echo ':t
29773   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29774       # It is possible to make a multiline substitution using escaped newlines.
29775       # Ensure that we do not split the substitution between script fragments.
29776       ac_BEG=$ac_end
29777       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29778       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29779       if test -s $tmp/subs.next; then
29780         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29781         if test ! -s $tmp/subs.edit; then
29782           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29783           if test ! -s $tmp/subs.edit; then
29784             if test "$ac_beg" -gt 1; then
29785               ac_end=`expr "$ac_end" - 1`
29786               continue
29787             fi
29788           fi
29789         fi
29790       fi
29791
29792       if test -z "$ac_sed_cmds"; then
29793         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29794       else
29795         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29796       fi
29797       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29798       ac_beg=$ac_end
29799       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29800     fi
29801   done
29802   if test -z "$ac_sed_cmds"; then
29803     ac_sed_cmds=cat
29804   fi
29805 fi # test -n "$CONFIG_FILES"
29806
29807 EOF
29808 cat >>"$CONFIG_STATUS" <<\EOF
29809 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29810   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29811   case "$ac_file" in
29812   - | *:- | *:-:* ) # input from stdin
29813         cat >$tmp/stdin
29814         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29815         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29816   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29817         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29818   * )   ac_file_in=$ac_file.in ;;
29819   esac
29820
29821   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29822   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29823          X"$ac_file" : 'X\(//\)[^/]' \| \
29824          X"$ac_file" : 'X\(//\)$' \| \
29825          X"$ac_file" : 'X\(/\)' \| \
29826          .     : '\(.\)' 2>/dev/null ||
29827 echo X"$ac_file" |
29828     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29829           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29830           /^X\(\/\/\)$/{ s//\1/; q; }
29831           /^X\(\/\).*/{ s//\1/; q; }
29832           s/.*/./; q'`
29833   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29834     { case "$ac_dir" in
29835   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29836   *)                      as_incr_dir=.;;
29837 esac
29838 as_dummy="$ac_dir"
29839 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29840   case $as_mkdir_dir in
29841     # Skip DOS drivespec
29842     ?:) as_incr_dir=$as_mkdir_dir ;;
29843     *)
29844       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29845       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29846     ;;
29847   esac
29848 done; }
29849
29850     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29851     # A "../" for each directory in $ac_dir_suffix.
29852     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29853   else
29854     ac_dir_suffix= ac_dots=
29855   fi
29856
29857   case "$srcdir" in
29858   .)  ac_srcdir=.
29859       if test -z "$ac_dots"; then
29860          ac_top_srcdir=.
29861       else
29862          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29863       fi ;;
29864   [\\/]* | ?:[\\/]* )
29865       ac_srcdir="$srcdir$ac_dir_suffix";
29866       ac_top_srcdir="$srcdir" ;;
29867   *) # Relative path.
29868     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29869     ac_top_srcdir="$ac_dots$srcdir" ;;
29870   esac
29871
29872   case $INSTALL in
29873   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29874   *) ac_INSTALL=$ac_dots$INSTALL ;;
29875   esac
29876
29877   if test x"$ac_file" != x-; then
29878     { echo "$as_me:29878: creating $ac_file" >&5
29879 echo "$as_me: creating $ac_file" >&6;}
29880     rm -f "$ac_file"
29881   fi
29882   # Let's still pretend it is `configure' which instantiates (i.e., don't
29883   # use $as_me), people would be surprised to read:
29884   #    /* config.h.  Generated automatically by config.status.  */
29885   configure_input="Generated automatically from `echo $ac_file_in |
29886                                                  sed 's,.*/,,'` by configure."
29887
29888   # First look for the input files in the build tree, otherwise in the
29889   # src tree.
29890   ac_file_inputs=`IFS=:
29891     for f in $ac_file_in; do
29892       case $f in
29893       -) echo $tmp/stdin ;;
29894       [\\/$]*)
29895          # Absolute (can't be DOS-style, as IFS=:)
29896          test -f "$f" || { { echo "$as_me:29896: error: cannot find input file: $f" >&5
29897 echo "$as_me: error: cannot find input file: $f" >&2;}
29898    { (exit 1); exit 1; }; }
29899          echo $f;;
29900       *) # Relative
29901          if test -f "$f"; then
29902            # Build tree
29903            echo $f
29904          elif test -f "$srcdir/$f"; then
29905            # Source tree
29906            echo "$srcdir/$f"
29907          else
29908            # /dev/null tree
29909            { { echo "$as_me:29909: error: cannot find input file: $f" >&5
29910 echo "$as_me: error: cannot find input file: $f" >&2;}
29911    { (exit 1); exit 1; }; }
29912          fi;;
29913       esac
29914     done` || { (exit 1); exit 1; }
29915 EOF
29916 cat >>"$CONFIG_STATUS" <<\EOF
29917   ac_warn_datarootdir=no
29918   if test x"$ac_file" != x-; then
29919     for ac_item in $ac_file_inputs
29920     do
29921       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29922       if test -n "$ac_seen"; then
29923         ac_used=`grep '@datarootdir@' "$ac_item"`
29924         if test -z "$ac_used"; then
29925           { echo "$as_me:29925: WARNING: datarootdir was used implicitly but not set:
29926 $ac_seen" >&5
29927 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29928 $ac_seen" >&2;}
29929           ac_warn_datarootdir=yes
29930         fi
29931       fi
29932       ac_seen=`grep '${datarootdir}' "$ac_item"`
29933       if test -n "$ac_seen"; then
29934         { echo "$as_me:29934: WARNING: datarootdir was used explicitly but not set:
29935 $ac_seen" >&5
29936 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29937 $ac_seen" >&2;}
29938         ac_warn_datarootdir=yes
29939       fi
29940     done
29941   fi
29942
29943 if test "x$ac_warn_datarootdir" = xyes; then
29944   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29945 fi
29946
29947 EOF
29948 cat >>"$CONFIG_STATUS" <<EOF
29949   sed "$ac_vpsub
29950 $extrasub
29951 EOF
29952 cat >>"$CONFIG_STATUS" <<\EOF
29953 :t
29954 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29955 s,@configure_input@,$configure_input,;t t
29956 s,@srcdir@,$ac_srcdir,;t t
29957 s,@top_srcdir@,$ac_top_srcdir,;t t
29958 s,@INSTALL@,$ac_INSTALL,;t t
29959 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29960   rm -f $tmp/stdin
29961   if test x"$ac_file" != x-; then
29962     cp "$tmp/out" "$ac_file"
29963
29964     for ac_name in prefix exec_prefix datarootdir
29965     do
29966         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29967         if test -n "$ac_seen"; then
29968             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29969             if test -z "$ac_init"; then
29970               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29971               { echo "$as_me:29971: WARNING: Variable $ac_name is used but was not set:
29972 $ac_seen" >&5
29973 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29974 $ac_seen" >&2;}
29975             fi
29976         fi
29977     done
29978     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29979     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29980     if test -s $tmp/out; then
29981       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29982       { echo "$as_me:29982: WARNING: Some variables may not be substituted:
29983 $ac_seen" >&5
29984 echo "$as_me: WARNING: Some variables may not be substituted:
29985 $ac_seen" >&2;}
29986     fi
29987   else
29988     cat $tmp/out
29989   fi
29990   rm -f $tmp/out
29991
29992 done
29993 EOF
29994 cat >>"$CONFIG_STATUS" <<\EOF
29995
29996 #
29997 # CONFIG_HEADER section.
29998 #
29999
30000 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30001 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30002 #
30003 # ac_d sets the value in "#define NAME VALUE" lines.
30004 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30005 ac_dB='[        ].*$,\1#\2'
30006 ac_dC=' '
30007 ac_dD=',;t'
30008 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30009 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30010 ac_iB='\([      ]\),\1#\2define\3'
30011 ac_iC=' '
30012 ac_iD='\4,;t'
30013 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30014 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30015 ac_uB='$,\1#\2define\3'
30016 ac_uC=' '
30017 ac_uD=',;t'
30018
30019 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30020   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30021   case "$ac_file" in
30022   - | *:- | *:-:* ) # input from stdin
30023         cat >$tmp/stdin
30024         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30025         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30026   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30027         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30028   * )   ac_file_in=$ac_file.in ;;
30029   esac
30030
30031   test x"$ac_file" != x- && { echo "$as_me:30031: creating $ac_file" >&5
30032 echo "$as_me: creating $ac_file" >&6;}
30033
30034   # First look for the input files in the build tree, otherwise in the
30035   # src tree.
30036   ac_file_inputs=`IFS=:
30037     for f in $ac_file_in; do
30038       case $f in
30039       -) echo $tmp/stdin ;;
30040       [\\/$]*)
30041          # Absolute (can't be DOS-style, as IFS=:)
30042          test -f "$f" || { { echo "$as_me:30042: error: cannot find input file: $f" >&5
30043 echo "$as_me: error: cannot find input file: $f" >&2;}
30044    { (exit 1); exit 1; }; }
30045          echo $f;;
30046       *) # Relative
30047          if test -f "$f"; then
30048            # Build tree
30049            echo $f
30050          elif test -f "$srcdir/$f"; then
30051            # Source tree
30052            echo "$srcdir/$f"
30053          else
30054            # /dev/null tree
30055            { { echo "$as_me:30055: error: cannot find input file: $f" >&5
30056 echo "$as_me: error: cannot find input file: $f" >&2;}
30057    { (exit 1); exit 1; }; }
30058          fi;;
30059       esac
30060     done` || { (exit 1); exit 1; }
30061   # Remove the trailing spaces.
30062   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30063
30064 EOF
30065
30066 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30067 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30068 # be either 'cat' or 'sort'.
30069 cat confdefs.h | uniq >conftest.vals
30070
30071 # Break up conftest.vals because some shells have a limit on
30072 # the size of here documents, and old seds have small limits too.
30073
30074 rm -f conftest.tail
30075 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30076 while grep . conftest.vals >/dev/null
30077 do
30078   # Write chunks of a limited-size here document to conftest.frag.
30079   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30080   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30081   echo 'CEOF' >> "$CONFIG_STATUS"
30082   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30083   rm -f conftest.vals
30084   mv conftest.tail conftest.vals
30085 done
30086 rm -f conftest.vals
30087
30088 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30089 # marker @DEFS@.
30090 echo '  cat >> conftest.edit <<CEOF
30091 /@DEFS@/r conftest.frag
30092 /@DEFS@/d
30093 CEOF
30094 sed -f conftest.edit $tmp/in > $tmp/out
30095 rm -f $tmp/in
30096 mv $tmp/out $tmp/in
30097 rm -f conftest.edit conftest.frag
30098 ' >> "$CONFIG_STATUS"
30099
30100 cat >>"$CONFIG_STATUS" <<\EOF
30101   # Let's still pretend it is `configure' which instantiates (i.e., don't
30102   # use $as_me), people would be surprised to read:
30103   #    /* config.h.  Generated automatically by config.status.  */
30104   if test x"$ac_file" = x-; then
30105     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30106   else
30107     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30108   fi
30109   cat $tmp/in >>$tmp/config.h
30110   rm -f $tmp/in
30111   if test x"$ac_file" != x-; then
30112     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30113       { echo "$as_me:30113: $ac_file is unchanged" >&5
30114 echo "$as_me: $ac_file is unchanged" >&6;}
30115     else
30116       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30117          X"$ac_file" : 'X\(//\)[^/]' \| \
30118          X"$ac_file" : 'X\(//\)$' \| \
30119          X"$ac_file" : 'X\(/\)' \| \
30120          .     : '\(.\)' 2>/dev/null ||
30121 echo X"$ac_file" |
30122     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30123           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30124           /^X\(\/\/\)$/{ s//\1/; q; }
30125           /^X\(\/\).*/{ s//\1/; q; }
30126           s/.*/./; q'`
30127       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30128         { case "$ac_dir" in
30129   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30130   *)                      as_incr_dir=.;;
30131 esac
30132 as_dummy="$ac_dir"
30133 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30134   case $as_mkdir_dir in
30135     # Skip DOS drivespec
30136     ?:) as_incr_dir=$as_mkdir_dir ;;
30137     *)
30138       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30139       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30140     ;;
30141   esac
30142 done; }
30143
30144       fi
30145       rm -f "$ac_file"
30146       mv "$tmp/config.h" "$ac_file"
30147     fi
30148   else
30149     cat $tmp/config.h
30150     rm -f $tmp/config.h
30151   fi
30152 done
30153 EOF
30154 cat >>"$CONFIG_STATUS" <<\EOF
30155 #
30156 # CONFIG_COMMANDS section.
30157 #
30158 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30159   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30160   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30161
30162   case "$ac_dest" in
30163     default )
30164 if test "x$cf_with_tests" != xno ; then
30165
30166 for cf_dir in test
30167 do
30168         if test ! -d "$srcdir/$cf_dir" ; then
30169                 continue
30170         elif test -f "$srcdir/$cf_dir/programs" ; then
30171                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30172         fi
30173 done
30174
30175 fi
30176
30177 cf_prefix=$LIB_PREFIX
30178
30179 case "$cf_cv_shlib_version" in
30180 (cygdll|msysdll|mingw|msvcdll)
30181         TINFO_NAME=$TINFO_ARG_SUFFIX
30182         TINFO_SUFFIX=.dll
30183         ;;
30184 esac
30185
30186 if test -n "$TINFO_SUFFIX" ; then
30187         case "$TINFO_SUFFIX" in
30188         (tw*)
30189                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30190                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30191                 ;;
30192         (t*)
30193                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30194                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30195                 ;;
30196         (w*)
30197                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30198                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30199                 ;;
30200         esac
30201 fi
30202
30203 for cf_dir in $SRC_SUBDIRS
30204 do
30205         if test ! -d "$srcdir/$cf_dir" ; then
30206                 continue
30207         elif test -f "$srcdir/$cf_dir/modules" ; then
30208
30209                 SHARED_LIB=
30210                 Libs_To_Make=
30211                 cf_awk_program=
30212                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30213                 then
30214                         cf_awk_program="$cf_awk_program\
30215 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30216 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30217 "
30218                 fi
30219
30220                 if test "x$WILDCARD_SYMS" = xno
30221                 then
30222                         cf_awk_program="$cf_awk_program\
30223 /[      ]_\\*;/ { skip=1; next; }\
30224 "
30225                 fi
30226
30227                 if test "x$cf_awk_program" != "x"
30228                 then
30229                         cat >>$cf_dir/Makefile <<CF_EOF
30230
30231 # Generated by CF_LIB_RULES
30232 resulting.map: $UNALTERED_SYMS
30233         $AWK 'BEGIN { skip = 1; last=""; } \
30234 $cf_awk_program \
30235 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30236  skip = 0; last = \$\$0; } \
30237 END { print last; }' < "$UNALTERED_SYMS" >\$@
30238
30239 distclean::
30240         rm -f resulting.map
30241 CF_EOF
30242                 fi
30243
30244                 for cf_item in $cf_LIST_MODELS
30245                 do
30246
30247         case X$cf_item in
30248         (Xlibtool)
30249                 cf_suffix='.la'
30250                 cf_depsuf=$cf_suffix
30251                 ;;
30252         (Xdebug)
30253                 case "$cf_cv_system_name" in
30254                 (*-msvc*)
30255                         cf_suffix='_g.lib'
30256                         ;;
30257                 (*)
30258                         cf_suffix='_g.a'
30259                         ;;
30260                 esac
30261                 cf_depsuf=$cf_suffix
30262                 ;;
30263         (Xprofile)
30264                 case "$cf_cv_system_name" in
30265                 (*-msvc*)
30266                         cf_suffix='_p.lib'
30267                         ;;
30268                 (*)
30269                         cf_suffix='_p.a'
30270                         ;;
30271                 esac
30272                 cf_depsuf=$cf_suffix
30273                 ;;
30274         (Xshared)
30275                 case "$cf_cv_system_name" in
30276                 (aix[5-7]*)
30277                         cf_suffix='.so'
30278                         cf_depsuf=$cf_suffix
30279                         ;;
30280                 (*-msvc*)
30281                         cf_suffix='.dll'
30282                         cf_depsuf='.dll.lib'
30283                         ;;
30284                 (cygwin*|msys*|mingw*)
30285                         cf_suffix='.dll'
30286                         cf_depsuf='.dll.a'
30287                         ;;
30288                 (darwin*)
30289                         cf_suffix='.dylib'
30290                         cf_depsuf=$cf_suffix
30291                         ;;
30292                 (hpux*)
30293                         case "$target" in
30294                         (ia64*)
30295                                 cf_suffix='.so'
30296                                 cf_depsuf=$cf_suffix
30297                                 ;;
30298                         (*)
30299                                 cf_suffix='.sl'
30300                                 cf_depsuf=$cf_suffix
30301                                 ;;
30302                         esac
30303                         ;;
30304                 (*)
30305                         cf_suffix='.so'
30306                         cf_depsuf=$cf_suffix
30307                         ;;
30308                 esac
30309                 ;;
30310         (*)
30311                 case "$target" in
30312                 (*-msvc*)
30313                         cf_suffix='.lib'
30314                         ;;
30315                 (*)
30316                         cf_suffix='.a'
30317                         ;;
30318                 esac
30319                 cf_depsuf=$cf_suffix
30320                 ;;
30321         esac
30322         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30323         then
30324                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30325                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30326         fi
30327
30328                         if test "$cf_dir" = "c++"
30329                         then
30330
30331 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30332
30333 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30334
30335                         else
30336
30337 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30338
30339 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30340
30341                         fi
30342                         test -z "$cf_libname" && cf_libname="$cf_dir"
30343                         if test "$cf_item" = shared ; then
30344                                 if test -n "${LIB_SUFFIX}"
30345                                 then
30346                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30347                                 else
30348                                         cf_shared_suffix="$cf_suffix"
30349                                 fi
30350                                 if test "$cf_cv_do_symlinks" = yes ; then
30351                                         cf_version_name=
30352
30353                                         case "$cf_cv_shlib_version" in
30354                                         (rel)
30355                                                 cf_version_name=REL_VERSION
30356                                                 ;;
30357                                         (abi)
30358                                                 cf_version_name=ABI_VERSION
30359                                                 ;;
30360                                         esac
30361
30362                                         if test -n "$cf_version_name"
30363                                         then
30364                                                 case "$cf_cv_system_name" in
30365                                                 (darwin*)
30366                                                         # "w", etc?
30367                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30368                                                         ;;
30369                                                 (*)
30370                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30371                                                         ;;
30372                                                 esac
30373                                         fi
30374                                         if test -n "${USE_LIB_SUFFIX}"
30375                                         then
30376                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30377                                         else
30378                                                 cf_shared_suffix="$cf_suffix"
30379                                         fi
30380                                 fi
30381                                 # cygwin needs import library, and has unique naming convention
30382                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30383                                 # use 'cyg' prefix for shared lib.
30384                                 case "$cf_cv_shlib_version" in
30385                                 (cygdll)
30386                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30387                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30388                                         ;;
30389                                 (msysdll)
30390                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30391                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30392                                         ;;
30393                                 (mingw)
30394                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30395                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30396                                         ;;
30397                                 (msvcdll)
30398                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30399                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30400                                         ;;
30401                                 (*)
30402                                         cf_add_lib=
30403                                         ;;
30404                                 esac
30405                                 if test -n "$cf_add_lib"
30406                                 then
30407                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30408                                         continue
30409                                 fi
30410                         fi
30411                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30412                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30413                 done
30414
30415                 if test "$cf_dir" = ncurses ; then
30416                         cf_subsets="$LIB_SUBSETS"
30417                         cf_r_parts="$cf_subsets"
30418                         cf_liblist="$Libs_To_Make"
30419
30420                         while test -n "$cf_r_parts"
30421                         do
30422                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30423                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30424                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30425                                         cf_add_lib=
30426                                         case "$cf_l_parts" in
30427                                         (*termlib*)
30428                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30429                                                 ;;
30430                                         (*ticlib*)
30431                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30432                                                 ;;
30433                                         (*)
30434                                                 break
30435                                                 ;;
30436                                         esac
30437                                         if test -n "$cf_add_lib"; then
30438                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30439                                         fi
30440                                 else
30441                                         break
30442                                 fi
30443                         done
30444                 else
30445                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30446                 fi
30447
30448                 if test "$cf_dir" = c++; then
30449                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30450                                 cf_list=
30451                                 for cf_item in $Libs_To_Make
30452                                 do
30453                                         case "$cf_item" in
30454                                         (*.a)
30455                                                 ;;
30456                                         (*)
30457                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30458                                                 ;;
30459                                         esac
30460                                         for cf_test in $cf_list
30461                                         do
30462                                                 if test "$cf_test" = "$cf_item"
30463                                                 then
30464                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30465                                                         cf_item=
30466                                                         break
30467                                                 fi
30468                                         done
30469                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30470                                 done
30471                                 Libs_To_Make="$cf_list"
30472                         fi
30473                 fi
30474
30475                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30476                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30477                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30478                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30479
30480                 $AWK -f "$srcdir/mk-0th.awk" \
30481                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30482                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30483
30484                 for cf_subset in $cf_subsets
30485                 do
30486                         cf_subdirs=
30487                         for cf_item in $cf_LIST_MODELS
30488                         do
30489
30490                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30491
30492 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30493
30494                         CXX_MODEL=$cf_ITEM
30495                         if test "$CXX_MODEL" = SHARED; then
30496                                 case "$cf_cv_shlib_version" in
30497                                 (cygdll|msysdll|mingw|msvcdll)
30498                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30499
30500 echo "${as_me:-configure}:30500: testing overriding CXX_MODEL to SHARED ..." 1>&5
30501
30502                                         with_shared_cxx=yes
30503                                         ;;
30504                                 (*)
30505                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30506                                         ;;
30507                                 esac
30508                         fi
30509
30510         case X$cf_item in
30511         (Xlibtool)
30512                 cf_suffix='.la'
30513                 cf_depsuf=$cf_suffix
30514                 ;;
30515         (Xdebug)
30516                 case "$cf_cv_system_name" in
30517                 (*-msvc*)
30518                         cf_suffix='_g.lib'
30519                         ;;
30520                 (*)
30521                         cf_suffix='_g.a'
30522                         ;;
30523                 esac
30524                 cf_depsuf=$cf_suffix
30525                 ;;
30526         (Xprofile)
30527                 case "$cf_cv_system_name" in
30528                 (*-msvc*)
30529                         cf_suffix='_p.lib'
30530                         ;;
30531                 (*)
30532                         cf_suffix='_p.a'
30533                         ;;
30534                 esac
30535                 cf_depsuf=$cf_suffix
30536                 ;;
30537         (Xshared)
30538                 case "$cf_cv_system_name" in
30539                 (aix[5-7]*)
30540                         cf_suffix='.so'
30541                         cf_depsuf=$cf_suffix
30542                         ;;
30543                 (*-msvc*)
30544                         cf_suffix='.dll'
30545                         cf_depsuf='.dll.lib'
30546                         ;;
30547                 (cygwin*|msys*|mingw*)
30548                         cf_suffix='.dll'
30549                         cf_depsuf='.dll.a'
30550                         ;;
30551                 (darwin*)
30552                         cf_suffix='.dylib'
30553                         cf_depsuf=$cf_suffix
30554                         ;;
30555                 (hpux*)
30556                         case "$target" in
30557                         (ia64*)
30558                                 cf_suffix='.so'
30559                                 cf_depsuf=$cf_suffix
30560                                 ;;
30561                         (*)
30562                                 cf_suffix='.sl'
30563                                 cf_depsuf=$cf_suffix
30564                                 ;;
30565                         esac
30566                         ;;
30567                 (*)
30568                         cf_suffix='.so'
30569                         cf_depsuf=$cf_suffix
30570                         ;;
30571                 esac
30572                 ;;
30573         (*)
30574                 case "$target" in
30575                 (*-msvc*)
30576                         cf_suffix='.lib'
30577                         ;;
30578                 (*)
30579                         cf_suffix='.a'
30580                         ;;
30581                 esac
30582                 cf_depsuf=$cf_suffix
30583                 ;;
30584         esac
30585         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30586         then
30587                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30588                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30589         fi
30590
30591         case $cf_item in
30592         (libtool) cf_subdir='obj_lo'  ;;
30593         (normal)  cf_subdir='objects' ;;
30594         (debug)   cf_subdir='obj_g' ;;
30595         (profile) cf_subdir='obj_p' ;;
30596         (shared)
30597                 case "$cf_cv_system_name" in
30598                 (cygwin|msys)
30599                         cf_subdir='objects' ;;
30600                 (*)
30601                         cf_subdir='obj_s' ;;
30602                 esac
30603         esac
30604
30605                         # Test for case where we build libtinfo with a different name.
30606                         cf_libname=$cf_dir
30607                         if test "$cf_dir" = ncurses ; then
30608                                 case "$cf_subset" in
30609                                 (*base*)
30610                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30611                                         ;;
30612                                 (*termlib*)
30613                                         cf_libname=$TINFO_LIB_SUFFIX
30614                                         ;;
30615                                 (ticlib*)
30616                                         cf_libname=$TICS_LIB_SUFFIX
30617                                         ;;
30618                                 esac
30619                         elif test "$cf_dir" = c++ ; then
30620
30621 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30622
30623 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30624
30625                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30626                         else
30627
30628 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30629
30630 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30631
30632                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30633                         fi
30634                         if test -n "${USE_ARG_SUFFIX}" ; then
30635                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30636                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30637                         fi
30638
30639                         # These dependencies really are for development, not
30640                         # builds, but they are useful in porting, too.
30641                         cf_depend="../include/ncurses_cfg.h"
30642                         if test "$srcdir" = "."; then
30643                                 cf_reldir="."
30644                         else
30645                                 cf_reldir="\${srcdir}"
30646                         fi
30647
30648                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30649                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30650                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30651                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30652                         fi
30653
30654                         cf_dir_suffix=
30655                         old_cf_suffix="$cf_suffix"
30656                         if test "$cf_cv_shlib_version_infix" = yes ; then
30657                         if test -n "$USE_LIB_SUFFIX" ; then
30658                                 case "$USE_LIB_SUFFIX" in
30659                                 (tw*)
30660                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30661                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30662                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30663                                         ;;
30664                                 (t*)
30665                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30666                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30667                                         cf_dir_suffix=t$EXTRA_SUFFIX
30668                                         ;;
30669                                 (w*)
30670                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30671                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30672                                         cf_dir_suffix=w$EXTRA_SUFFIX
30673                                         ;;
30674                                 (*)
30675                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30676                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30677                                         cf_dir_suffix=$EXTRA_SUFFIX
30678                                         ;;
30679                                 esac
30680                         fi
30681                         fi
30682
30683                         $AWK -f "$srcdir/mk-1st.awk" \
30684                                 name=${cf_libname}${cf_dir_suffix} \
30685                                 traces=$LIB_TRACING \
30686                                 MODEL=$cf_ITEM \
30687                                 CXX_MODEL=$CXX_MODEL \
30688                                 LIB_SUFFIX=$LIB_SUFFIX \
30689                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30690                                 make_phony="${cf_cv_make_PHONY:-no}" \
30691                                 model=$cf_subdir \
30692                                 prefix=$cf_prefix \
30693                                 suffix=$cf_suffix \
30694                                 subset=$cf_subset \
30695                                 driver=$cf_cv_term_driver \
30696                                 SymLink="$LN_S" \
30697                                 TermlibRoot=$TINFO_NAME \
30698                                 TermlibSuffix=$TINFO_SUFFIX \
30699                                 ShlibVer=$cf_cv_shlib_version \
30700                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30701                                 ReLink=${cf_cv_do_relink:-no} \
30702                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30703                                 DoLinks=$cf_cv_do_symlinks \
30704                                 rmSoLocs=$cf_cv_rm_so_locs \
30705                                 ldconfig="$LDCONFIG" \
30706                                 overwrite=$WITH_OVERWRITE \
30707                                 depend="$cf_depend" \
30708                                 host="$host" \
30709                                 libtool_version="$LIBTOOL_VERSION" \
30710                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30711
30712                         cf_suffix="$old_cf_suffix"
30713
30714                         for cf_subdir2 in $cf_subdirs lib
30715                         do
30716                                 test "$cf_subdir" = "$cf_subdir2" && break
30717                         done
30718                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30719                         $AWK -f "$srcdir/mk-2nd.awk" \
30720                                 name=$cf_dir \
30721                                 traces=$LIB_TRACING \
30722                                 MODEL=$cf_ITEM \
30723                                 model=$cf_subdir \
30724                                 subset=$cf_subset \
30725                                 srcdir=$srcdir \
30726                                 echo=$WITH_ECHO \
30727                                 crenames=$cf_cv_prog_CC_c_o \
30728                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30729                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30730                         cf_subdirs="$cf_subdirs $cf_subdir"
30731                         done
30732                 done
30733         fi
30734
30735         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30736 done
30737
30738 echo >> Makefile
30739 echo '# generated by CF_LIB_RULES' >> Makefile
30740
30741 if test "x$cf_cv_make_PHONY" = xyes ; then
30742         cat >> Makefile <<-CF_EOF
30743
30744         .PHONY :        libs
30745         .PHONY :        lintlib
30746         .PHONY :        install.includes
30747         .PHONY :        uninstall.includes
30748         .PHONY :        install.libs
30749         .PHONY :        uninstall.libs
30750 CF_EOF
30751 fi
30752
30753 for cf_dir in $SRC_SUBDIRS
30754 do
30755         if test ! -d "$srcdir/$cf_dir" ; then
30756                 continue
30757         fi
30758
30759         if test -f "$cf_dir/Makefile" ; then
30760                 case "$cf_dir" in
30761                 (Ada95)
30762                         echo 'libs \' >> Makefile
30763                         echo 'install.libs \' >> Makefile
30764                         echo 'uninstall.libs ::' >> Makefile
30765                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30766                         ;;
30767                 esac
30768         fi
30769
30770         if test -f "$srcdir/$cf_dir/modules" ; then
30771
30772                 if test "x$cf_cv_make_PHONY" = xyes ; then
30773                         cat >> Makefile <<-CF_EOF
30774
30775                         .PHONY :        install.$cf_dir
30776                         .PHONY :        uninstall.$cf_dir
30777 CF_EOF
30778                 fi
30779
30780                 echo >> Makefile
30781                 if test -f "$srcdir/$cf_dir/headers" ; then
30782 cat >> Makefile <<CF_EOF
30783 install.includes \\
30784 uninstall.includes \\
30785 CF_EOF
30786                 fi
30787
30788 cat >> Makefile <<CF_EOF
30789 lint \\
30790 libs \\
30791 lintlib \\
30792 install.libs \\
30793 uninstall.libs \\
30794 install.$cf_dir \\
30795 uninstall.$cf_dir ::
30796         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30797 CF_EOF
30798         elif test -f "$srcdir/$cf_dir/headers" ; then
30799 cat >> Makefile <<CF_EOF
30800
30801 libs \\
30802 install.libs \\
30803 uninstall.libs \\
30804 install.includes \\
30805 uninstall.includes ::
30806         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30807 CF_EOF
30808 fi
30809 done
30810
30811 if test "x$cf_cv_make_PHONY" = xyes ; then
30812         cat >> Makefile <<-CF_EOF
30813
30814         .PHONY :        install.data
30815         .PHONY :        uninstall.data
30816 CF_EOF
30817 fi
30818
30819 if test "x$cf_with_db_install" = xyes; then
30820 cat >> Makefile <<CF_EOF
30821
30822 install.libs uninstall.libs \\
30823 install.data uninstall.data ::
30824 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30825 CF_EOF
30826 else
30827 cat >> Makefile <<CF_EOF
30828
30829 install.libs uninstall.libs ::
30830         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30831 CF_EOF
30832 fi
30833
30834 if test "x$cf_with_manpages" = xyes; then
30835
30836 if test "x$cf_cv_make_PHONY" = xyes ; then
30837         cat >> Makefile <<-CF_EOF
30838
30839         .PHONY :        install.man
30840         .PHONY :        uninstall.man
30841 CF_EOF
30842 fi
30843
30844 cat >> Makefile <<CF_EOF
30845
30846 install.man \\
30847 uninstall.man ::
30848         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30849 CF_EOF
30850 fi
30851
30852 cat >> Makefile <<CF_EOF
30853
30854 distclean ::
30855         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30856         rm -f headers.sh headers.sed mk_shared_lib.sh
30857         rm -f edit_man.* man_alias.*
30858         rm -rf \${DIRS_TO_MAKE}
30859 CF_EOF
30860
30861 # Special case: tack's manpage lives in its own directory.
30862 if test "x$cf_with_manpages" = xyes; then
30863 if test "x$cf_with_tack" = "xyes"; then
30864 cat >> Makefile <<CF_EOF
30865
30866 install.man \\
30867 uninstall.man ::
30868         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30869 CF_EOF
30870 fi
30871 fi
30872
30873 rm -f headers.sed headers.sh
30874
30875 echo creating headers.sh
30876 cat >headers.sh <<CF_EOF
30877 #! $SHELL
30878 # This shell script is generated by the 'configure' script.  It is invoked in a
30879 # subdirectory of the build tree.  It generates a sed-script in the parent
30880 # directory that is used to adjust includes for header files that reside in a
30881 # subdirectory of /usr/include, etc.
30882 PRG=""
30883 while test \$# != 3
30884 do
30885 PRG="\$PRG \$1"; shift
30886 done
30887 DST=\$1
30888 REF=\$2
30889 SRC=\$3
30890 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30891 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30892 echo installing \$SRC in \$DST
30893 CF_EOF
30894
30895 if test "$WITH_CURSES_H" = yes; then
30896         cat >>headers.sh <<CF_EOF
30897 case \$DST in
30898 (/*/include/*)
30899         END=\`basename \$DST\`
30900         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30901         do
30902                 NAME=\`basename \$i\`
30903                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30904         done
30905         ;;
30906 (*)
30907         echo "" >> \$TMPSED
30908         ;;
30909 esac
30910 CF_EOF
30911
30912 else
30913         cat >>headers.sh <<CF_EOF
30914 case \$DST in
30915 (/*/include/*)
30916         END=\`basename \$DST\`
30917         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30918         do
30919                 NAME=\`basename \$i\`
30920                 if test "\$NAME" = "curses.h"
30921                 then
30922                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30923                         NAME=ncurses.h
30924                 fi
30925                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30926         done
30927         ;;
30928 (*)
30929         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30930         ;;
30931 esac
30932 CF_EOF
30933 fi
30934 cat >>headers.sh <<CF_EOF
30935 rm -f \$TMPSRC
30936 sed -f \$TMPSED \$SRC > \$TMPSRC
30937 NAME=\`basename \$SRC\`
30938 CF_EOF
30939 if test "$WITH_CURSES_H" != yes; then
30940         cat >>headers.sh <<CF_EOF
30941 test "\$NAME" = "curses.h" && NAME=ncurses.h
30942 CF_EOF
30943 fi
30944 cat >>headers.sh <<CF_EOF
30945 # Just in case someone gzip'd manpages, remove the conflicting copy.
30946 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30947
30948 eval \$PRG \$TMPSRC \$DST/\$NAME
30949 rm -f \$TMPSRC \$TMPSED
30950 CF_EOF
30951
30952 chmod 0755 headers.sh
30953
30954 for cf_dir in $SRC_SUBDIRS
30955 do
30956         if test ! -d "$srcdir/$cf_dir" ; then
30957                 continue
30958         fi
30959
30960         if test -f "$srcdir/$cf_dir/headers" ; then
30961                 $AWK -f "$srcdir/mk-hdr.awk" \
30962                         subset="$LIB_SUBSETS" \
30963                         compat="$WITH_CURSES_H" \
30964                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30965         fi
30966
30967         if test -f "$srcdir/$cf_dir/modules" ; then
30968                 if test "$cf_dir" != "c++" ; then
30969                         if test "x$cf_cv_make_PHONY" = xyes ; then
30970                                 cat >> $cf_dir/Makefile <<-CF_EOF
30971
30972                                 .PHONY :        depend
30973 CF_EOF
30974                         fi
30975
30976                         cat >>$cf_dir/Makefile <<"CF_EOF"
30977 depend : ${AUTO_SRC}
30978         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30979
30980 # DO NOT DELETE THIS LINE -- make depend depends on it.
30981 CF_EOF
30982                 fi
30983         fi
30984 done
30985
30986 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30987 if test -z "$USE_OLD_MAKERULES" ; then
30988         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30989 fi
30990 fi
30991  ;;
30992   esac
30993 done
30994 EOF
30995
30996 cat >>"$CONFIG_STATUS" <<\EOF
30997
30998 { (exit 0); exit 0; }
30999 EOF
31000 chmod +x "$CONFIG_STATUS"
31001 ac_clean_files=$ac_clean_files_save
31002
31003 # configure is writing to config.log, and then calls config.status.
31004 # config.status does its own redirection, appending to config.log.
31005 # Unfortunately, on DOS this fails, as config.log is still kept open
31006 # by configure, so config.status won't be able to write to it; its
31007 # output is simply discarded.  So we exec the FD to /dev/null,
31008 # effectively closing config.log, so it can be properly (re)opened and
31009 # appended to by config.status.  When coming back to configure, we
31010 # need to make the FD available again.
31011 if test "$no_create" != yes; then
31012   ac_cs_success=:
31013   exec 5>/dev/null
31014   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31015   exec 5>>config.log
31016   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31017   # would make configure fail if this is the last instruction.
31018   "$ac_cs_success" || { (exit 1); exit 1; }
31019 fi
31020 ${MAKE:-make} preinstall